X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6dd6d212866318cd2bbc42042e885eabb09a92d3..c0cac722f7e5d7498528a67a37477cdf9ed1745c:/src/vmsgetargs.c diff --git a/src/vmsgetargs.c b/src/vmsgetargs.c index 83cb8bfc..e5faa5ad 100644 --- a/src/vmsgetargs.c +++ b/src/vmsgetargs.c @@ -1,5 +1,5 @@ /* VMS version of getargs; Uses DCL command parsing. - Copyright (C) 1989, 1992 Free Software Foundation, Inc. + Copyright 1989, 1992 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bison; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #include @@ -26,20 +27,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ * VMS version of getargs: Uses DCL command parsing * (argc and argv are ignored) */ -int verboseflag; -int definesflag; -int debugflag; -int nolinesflag; -extern int noparserflag; -extern int toknumflag; -extern int rawtoknumflag; -extern int fixed_outfiles; +int verbose_flag; +int defines_flag; +int debug_flag; +int no_lines_flag; +extern int no_parser_flag; +extern int token_table_flag; +extern int raw_flag; +extern int yacc_flag; extern char * version_string; -/* Allocate storgate and initialize, since bison uses them elsewhere. */ -char *spec_name_prefix; -char *spec_file_prefix; - getargs(argc,argv) int argc; char *argv[]; @@ -49,27 +46,27 @@ getargs(argc,argv) static char output_spec[256], name_prefix_spec[256], file_prefix_spec[256]; extern char *infile; - verboseflag = 0; - definesflag = 0; - debugflag = 0; - fixed_outfiles = 0; - nolinesflag = 0; - noparserflag = 0; - toknumflag = 0; - rawtoknumflag = 0; + verbose_flag = 0; + defines_flag = 0; + debug_flag = 0; + yacc_flag = 0; + no_lines_flag = 0; + no_parser_flag = 0; + token_table_flag = 0; + raw_flag = 0; /* * Check for /VERBOSE qualifier */ - if (cli_present("BISON$VERBOSE")) verboseflag = 1; + if (cli_present("BISON$VERBOSE")) verbose_flag = 1; /* * Check for /DEFINES qualifier */ - if (cli_present("BISON$DEFINES")) definesflag = 1; + if (cli_present("BISON$DEFINES")) defines_flag = 1; /* * Check for /FIXED_OUTFILES qualifier */ - if (cli_present("BISON$FIXED_OUTFILES")) fixed_outfiles = 1; - if (cli_present("BISON$YACC")) fixed_outfiles = 1; + if (cli_present("BISON$FIXED_OUTFILES")) yacc_flag = 1; + if (cli_present("BISON$YACC")) yacc_flag = 1; /* * Check for /VERSION qualifier */ @@ -77,23 +74,23 @@ getargs(argc,argv) /* * Check for /NOLINES qualifier */ - if (cli_present("BISON$NOLINES")) nolinesflag = 1; + if (cli_present("BISON$NOLINES")) no_lines_flag = 1; /* * Check for /NOPARSER qualifier */ - if (cli_present("BISON$NOPARSER")) noparserflag = 1; + if (cli_present("BISON$NOPARSER")) no_parser_flag = 1; /* * Check for /RAW qualifier */ - if (cli_present("BISON$RAW")) rawtoknumflag = 1; + if (cli_present("BISON$RAW")) raw_flag = 1; /* * Check for /TOKEN_TABLE qualifier */ - if (cli_present("BISON$TOKEN_TABLE")) toknumflag = 1; + if (cli_present("BISON$TOKEN_TABLE")) token_table_flag = 1; /* * Check for /DEBUG qualifier */ - if (cli_present("BISON$DEBUG")) debugflag = 1; + if (cli_present("BISON$DEBUG")) debug_flag = 1; /* * Get the filename */ @@ -123,7 +120,7 @@ getargs(argc,argv) */ if (cli_present("BISON$FILE_PREFIX")) { - cli_get_value("BISON$FILE_PREFIX", file_prefix_spec, + cli_get_value("BISON$FILE_PREFIX", file_prefix_spec, sizeof(file_prefix_spec)); for (cp = spec_file_prefix = file_prefix_spec; *cp; cp++) if (isupper(*cp)) @@ -134,7 +131,7 @@ getargs(argc,argv) */ if (cli_present("BISON$NAME_PREFIX")) { - cli_get_value("BISON$NAME_PREFIX", name_prefix_spec, + cli_get_value("BISON$NAME_PREFIX", name_prefix_spec, sizeof(name_prefix_spec)); for (cp = spec_name_prefix = name_prefix_spec; *cp; cp++) if (isupper(*cp)) @@ -155,7 +152,7 @@ cli_present(Name) Descr.Ptr = Name; Descr.Size = strlen(Name); - return((cli$present(&Descr) & 1) ? 1 : 0); + return (cli$present(&Descr) & 1) ? 1 : 0; } /* @@ -174,7 +171,7 @@ cli_get_value(Name,Buffer,Size) Descr2.Size = Size-1; if (cli$get_value(&Descr1,&Descr2,&Descr2.Size) & 1) { Buffer[Descr2.Size] = 0; - return(1); + return 1; } - return(0); + return 0; }