diff options
author | Dave Brolley <brolley@cygnus.com> | 1998-06-10 10:18:45 +0000 |
---|---|---|
committer | Dave Brolley <brolley@gcc.gnu.org> | 1998-06-10 06:18:45 -0400 |
commit | ab9e0ff9c7fc514f6e5cfcadef49b233a706917b (patch) | |
tree | 83471fce0622c0edc93ed0faa3f673c2747f8c70 /gcc/f | |
parent | 297441fd872faf63cfb9ed802975fc8ebcb69a91 (diff) | |
download | gcc-ab9e0ff9c7fc514f6e5cfcadef49b233a706917b.zip gcc-ab9e0ff9c7fc514f6e5cfcadef49b233a706917b.tar.gz gcc-ab9e0ff9c7fc514f6e5cfcadef49b233a706917b.tar.bz2 |
New interface for lang_decode_option.
Wed Jun 10 13:17:32 1998 Dave Brolley <brolley@cygnus.com>
* top.h (ffe_decode_option): New argc/argv interface.
* top.c (ffe_decode_option): New argc/argv interface.
* parse.c (yyparse): New argc/argv interface for ffe_decode_option.
* com.c (lang_decode_option): New argc/argv interface.
From-SVN: r20409
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/f/com.c | 7 | ||||
-rw-r--r-- | gcc/f/parse.c | 17 | ||||
-rw-r--r-- | gcc/f/top.c | 5 | ||||
-rw-r--r-- | gcc/f/top.h | 2 |
5 files changed, 27 insertions, 10 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 98fdfd7..4f259ea 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 10 13:17:32 1998 Dave Brolley <brolley@cygnus.com> + + * top.h (ffe_decode_option): New argc/argv interface. + * top.c (ffe_decode_option): New argc/argv interface. + * parse.c (yyparse): New argc/argv interface for ffe_decode_option. + * com.c (lang_decode_option): New argc/argv interface. Mon Jun 1 19:37:42 1998 Craig Burley <burley@gnu.org> * com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7) diff --git a/gcc/f/com.c b/gcc/f/com.c index 85c9f5b..512e926 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -14904,10 +14904,11 @@ insert_block (block) } int -lang_decode_option (p) - char *p; +lang_decode_option (argc, argv) + int argc; + char **argv; { - return ffe_decode_option (p); + return ffe_decode_option (argc, argv); } /* used by print-tree.c */ diff --git a/gcc/f/parse.c b/gcc/f/parse.c index 1efdc77..a25a9ec 100644 --- a/gcc/f/parse.c +++ b/gcc/f/parse.c @@ -52,11 +52,18 @@ yyparse () #if FFECOM_targetCURRENT == FFECOM_targetFFE ffe_init_0 (); - for (--argc, ++argv; argc > 0; --argc, ++argv) - { - if (!ffe_decode_option (argv[0])) - fprintf (stderr, "Unrecognized option: %s\n", argv[0]); - } + { + int strings_processed; + for (--argc, ++argv; argc > 0; argc -= strings_processed, argv += strings_processed) + { + strings_processed = ffe_decode_option (argc, argv); + if (strings_processed == 0) + { + fprintf (stderr, "Unrecognized option: %s\n", argv[0]); + strings_processed = 1; + } + } + } #elif FFECOM_targetCURRENT == FFECOM_targetGCC if (!ffe_is_pedantic ()) ffe_set_is_pedantic (pedantic); diff --git a/gcc/f/top.c b/gcc/f/top.c index bbcc59d..c93ffd3 100644 --- a/gcc/f/top.c +++ b/gcc/f/top.c @@ -160,8 +160,11 @@ ffe_is_digit_string_ (char *s) recognized and handled. */ int -ffe_decode_option (char *opt) +ffe_decode_option (argc, argv) + int argc; + char **argv; { + char *opt = argv[0]; if (opt[0] != '-') return 0; if (opt[1] == 'f') diff --git a/gcc/f/top.h b/gcc/f/top.h index 7ecf998..0e159ce 100644 --- a/gcc/f/top.h +++ b/gcc/f/top.h @@ -141,7 +141,7 @@ extern bool ffe_in_4; /* Declare functions with prototypes. */ -int ffe_decode_option (char *opt); +int ffe_decode_option (int argc, char **argv); void ffe_file (ffewhereFile wf, FILE *f); void ffe_init_0 (void); void ffe_init_1 (void); |