aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxd.c')
-rw-r--r--uxd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/uxd.c b/uxd.c
index 7f518e0..b1adaef 100644
--- a/uxd.c
+++ b/uxd.c
@@ -35,8 +35,8 @@ on stderr.
/* from getopt.c */
extern int my_getopt(int, char **, char *);
-extern char *optarg;
-extern int optind;
+extern char *my_optarg;
+extern int my_optind;
#ifndef VERSION
#define VERSION "(unknown version)"
@@ -293,19 +293,19 @@ void parse_args(int argc, char **argv) {
fprintf(stderr, "%s: multiple -d options not supported.\n", self);
exit(1);
}
- dump_data_arg = optarg; break;
+ dump_data_arg = my_optarg; break;
case '1':
alternate_colors = 0; break;
case 'i':
print_info_opt = 1; break;
case 'c':
- mono = 0; parse_colors(optarg); break;
+ mono = 0; parse_colors(my_optarg); break;
case 'n':
break; /* already handled in parse_options() */
case 'b':
bold = 1; break;
case 'l':
- limit = parse_number(opt, optarg);
+ limit = parse_number(opt, my_optarg);
if(limit < 0) {
fprintf(stderr, "%s: negative limit for -l not allowed.\n", self);
exit(1);
@@ -316,12 +316,12 @@ void parse_args(int argc, char **argv) {
case 'm':
mono = 1; break;
case 'o':
- display_offset = parse_number(opt, optarg); break;
+ display_offset = parse_number(opt, my_optarg); break;
case 'S':
seek_offset_zero = 1;
/* fall thru */
case 's':
- seekpos = parse_number(opt, optarg);
+ seekpos = parse_number(opt, my_optarg);
break;
case 'u':
hex_byte_fmt = UC_BYTE_FMT; hex_addr_fmt = UC_ADDR_FMT; break;
@@ -335,16 +335,16 @@ void parse_args(int argc, char **argv) {
}
if(dump_data_arg) {
- if(optind != argc) {
+ if(my_optind != argc) {
fprintf(stderr, "%s: cannot give a filename when -d is used.\n", self);
exit(1);
}
} else {
/* filename (if present) must come after all -options, and
there can only be one filename. */
- if(optind < (argc - 1)) usage();
+ if(my_optind < (argc - 1)) usage();
- open_input(argv[optind]);
+ open_input(argv[my_optind]);
}
}