aboutsummaryrefslogtreecommitdiff
path: root/display_args.c
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2009-04-07 15:45:53 +0200
committerJuan Cespedes <cespedes@debian.org>2009-04-07 15:45:53 +0200
commitcc813cd481c74ee4861baa5dd6154c3f234c7901 (patch)
tree10ac03e664e3f80918f3ec7eca8ce175ac3eda03 /display_args.c
parentda9b953284966b8c52de43713ebb5b503756e468 (diff)
downloadltrace-cc813cd481c74ee4861baa5dd6154c3f234c7901.tar.gz
More fields to struct "options", same output with or without -o
(opt_s, opt_f)
Diffstat (limited to 'display_args.c')
-rw-r--r--display_args.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/display_args.c b/display_args.c
index aade610..700e8f6 100644
--- a/display_args.c
+++ b/display_args.c
@@ -293,13 +293,13 @@ display_string(enum tof type, struct process *proc, void *addr,
return fprintf(options.output, "NULL");
}
- str1 = malloc(MIN(opt_s, maxlength) + 3);
+ str1 = malloc(MIN(options.strlen, maxlength) + 3);
if (!str1) {
return fprintf(options.output, "???");
}
- umovestr(proc, addr, MIN(opt_s, maxlength) + 1, str1);
+ umovestr(proc, addr, MIN(options.strlen, maxlength) + 1, str1);
len = fprintf(options.output, "\"");
- for (i = 0; i < MIN(opt_s, maxlength); i++) {
+ for (i = 0; i < MIN(options.strlen, maxlength); i++) {
if (str1[i]) {
len += display_char(str1[i]);
} else {
@@ -307,7 +307,7 @@ display_string(enum tof type, struct process *proc, void *addr,
}
}
len += fprintf(options.output, "\"");
- if (str1[i] && (opt_s <= maxlength)) {
+ if (str1[i] && (options.strlen <= maxlength)) {
len += fprintf(options.output, "...");
}
free(str1);
@@ -342,13 +342,13 @@ display_format(enum tof type, struct process *proc, int arg_num) {
return fprintf(options.output, "NULL");
}
- str1 = malloc(MIN(opt_s, string_maxlength) + 3);
+ str1 = malloc(MIN(options.strlen, string_maxlength) + 3);
if (!str1) {
return fprintf(options.output, "???");
}
- umovestr(proc, addr, MIN(opt_s, string_maxlength) + 1, str1);
+ umovestr(proc, addr, MIN(options.strlen, string_maxlength) + 1, str1);
len = fprintf(options.output, "\"");
- for (i = 0; len < MIN(opt_s, string_maxlength) + 1; i++) {
+ for (i = 0; len < MIN(options.strlen, string_maxlength) + 1; i++) {
if (str1[i]) {
len += display_char(str1[i]);
} else {
@@ -356,7 +356,7 @@ display_format(enum tof type, struct process *proc, int arg_num) {
}
}
len += fprintf(options.output, "\"");
- if (str1[i] && (opt_s <= string_maxlength)) {
+ if (str1[i] && (options.strlen <= string_maxlength)) {
len += fprintf(options.output, "...");
}
for (i = 0; str1[i]; i++) {