diff options
author | David MacKenzie <djm@cygnus> | 1994-06-03 17:42:27 +0000 |
---|---|---|
committer | David MacKenzie <djm@cygnus> | 1994-06-03 17:42:27 +0000 |
commit | f3d817d8b7dd2b45a294f2a2cb2a2eb4eed0af07 (patch) | |
tree | abba03b98ddaacc2f7f940a5d16cd2f2bf10485b /gas/config/tc-tahoe.c | |
parent | 172559ec3375efe6c3964670fe22c38255ee4280 (diff) | |
download | gdb-f3d817d8b7dd2b45a294f2a2cb2a2eb4eed0af07.zip gdb-f3d817d8b7dd2b45a294f2a2cb2a2eb4eed0af07.tar.gz gdb-f3d817d8b7dd2b45a294f2a2cb2a2eb4eed0af07.tar.bz2 |
* as.c (show_usage): Remove target specific messages;
instead, call md_show_usage.
(parse_args): Use getopt_long_only. Take pointers to argc and
argv.
(main): Pass parse_args pointers.
* as.h: Remove 3 variables that are redundant with flagseen.
* as.c, messages.c: Change their users to use flagseen.
Define getopt stuff.
* tc.h: Update md_parse_option decl. Add md_show_usage decl.
* config/tc-*.c: Add md_shortopts, md_longopts,
md_longopts_size, md_show_usage. Change calling convention for
md_parse_option. Remove md_parse_long_option.
* config/tc-ns32k.c: Rename `struct option' to `struct ns32k_option'.
* config/tc-i386.h: Don't define md_parse_option.
Diffstat (limited to 'gas/config/tc-tahoe.c')
-rw-r--r-- | gas/config/tc-tahoe.c | 73 |
1 files changed, 33 insertions, 40 deletions
diff --git a/gas/config/tc-tahoe.c b/gas/config/tc-tahoe.c index 17be9fe..c426252 100644 --- a/gas/config/tc-tahoe.c +++ b/gas/config/tc-tahoe.c @@ -371,59 +371,37 @@ md_begin () as_fatal (errorval); } +CONST char *md_shortopts = "ad:STt:V"; +struct option md_longopts[] = { + {NULL, no_argument, NULL, 0} +}; +size_t md_longopts_size = sizeof(md_longopts); + int -md_parse_option (argP, cntP, vecP) - char **argP; - int *cntP; - char ***vecP; +md_parse_option (c, arg) + int c; + char *arg; { - char *temp_name; /* name for -t or -d options */ - char opt; - - switch (**argP) + switch (c) { case 'a': - as_warn ("The -a option doesn't exits. (Dispite what the man page says!"); + as_warn ("The -a option doesn't exist. (Despite what the man page says!"); + break; - case 'J': - as_warn ("JUMPIFY (-J) not implemented, use psuedo ops instead."); + case 'd': + as_warn ("Displacement length %s ignored!", arg); break; case 'S': as_warn ("SYMBOL TABLE not implemented"); - break; /* SYMBOL TABLE not implemented */ + break; case 'T': as_warn ("TOKEN TRACE not implemented"); - break; /* TOKEN TRACE not implemented */ + break; - case 'd': case 't': - opt = **argP; - if (**argP) - { /* Rest of argument is filename. */ - temp_name = *argP; - while (**argP) - (*argP)++; - } - else if (*cntP) - { - while (**argP) - (*argP)++; - --(*cntP); - temp_name = *++(*vecP); - **vecP = NULL; /* Remember this is not a file-name. */ - } - else - { - as_warn ("I expected a filename after -%c.", opt); - temp_name = "{absent}"; - } - - if (opt == 'd') - as_warn ("Displacement length %s ignored!", temp_name); - else - as_warn ("I don't need or use temp. file \"%s\".", temp_name); + as_warn ("I don't need or use temp. file \"%s\".", arg); break; case 'V': @@ -432,10 +410,25 @@ md_parse_option (argP, cntP, vecP) default: return 0; - } + return 1; } + +void +md_show_usage (stream) + FILE *stream; +{ + fprintf(stream, "\ +Tahoe options:\n\ +-a ignored\n\ +-d LENGTH ignored\n\ +-J ignored\n\ +-S ignored\n\ +-t FILE ignored\n\ +-T ignored\n\ +-V ignored\n"); +} /* The functions in this section take numbers in the machine format, and munges them into Tahoe byte order. |