home *** CD-ROM | disk | FTP | other *** search
- diff -c old/CHANGES new/CHANGES
- *** old/CHANGES Sat Apr 11 19:11:26 1992
- --- new/CHANGES Sat Apr 11 19:23:02 1992
- ***************
- *** 1,5 ****
- --- 1,17 ----
- Version 3
-
- + Patchlevel 3
- +
- + - Fix: The program didn't generate prototypes for functions defined with
- + the extern specifier.
- + - Fix: The -c option didn't output a space before parameter names in
- + generated prototypes.
- + - Added the -E option to specify a particular C preprocessor to run or
- + to stop the program from running the C preprocessor.
- + - Added the -q option to stop the program from outputting error messages
- + when it cannot read the file specified in an #include directive.
- + - Made the yacc specification compatible with UNIX SYSVR4 yacc.
- +
- Patchlevel 2
-
- - Fix: The function definition conversion may produce a mangled function
- diff -c old/cproto.1 new/cproto.1
- *** old/cproto.1 Sat Apr 11 19:11:26 1992
- --- new/cproto.1 Sat Apr 11 19:27:16 1992
- ***************
- *** 1,4 ****
- ! .\" $Id: cproto.1 3.4 92/04/04 14:01:52 cthuang Exp $
- .\"
- .de EX \"Begin example
- .ne 5
- --- 1,4 ----
- ! .\" $Id: cproto.1 3.5 92/04/11 19:27:07 cthuang Exp $
- .\"
- .de EX \"Begin example
- .ne 5
- ***************
- *** 13,19 ****
- .if n .sp 1
- .if t .sp .5
- ..
- ! .TH CPROTO 1 "April 3, 1992"
- .SH NAME
- cproto \- generate C function prototypes and convert function definitions
- .SH SYNOPSIS
- --- 13,19 ----
- .if n .sp 1
- .if t .sp .5
- ..
- ! .TH CPROTO 1 "April 7, 1992"
- .SH NAME
- cproto \- generate C function prototypes and convert function definitions
- .SH SYNOPSIS
- ***************
- *** 55,62 ****
- such as in the example,
- .EX
- main (argc, argv)
- ! int argc; /* number of arguments */
- ! char *argv[]; /* arguments */
- {
- ...
- }
- --- 55,62 ----
- such as in the example,
- .EX
- main (argc, argv)
- ! int argc; /* number of arguments */
- ! char *argv[]; /* arguments */
- {
- ...
- }
- ***************
- *** 65,71 ****
- .EX
- int
- main (
- ! int argc; /* number of arguments */
- char *argv[]; /* arguments */
- )
- {
- --- 65,71 ----
- .EX
- int
- main (
- ! int argc; /* number of arguments */
- char *argv[]; /* arguments */
- )
- {
- ***************
- *** 132,147 ****
- .TP
- .B \-c
- Omit the parameter comments in the prototypes generated by
- ! the -f1 and -f2 options.
- This option also omits the comments naming the source files from which
- the prototypes were generated.
- .TP
- .BI \-m name
- ! Set the name of the macro used to guard prototypes when option -f4 is selected.
- The default is "P_".
- .TP
- .B \-d
- ! Omit the definition of the prototype macro named by the -m option.
- .TP
- .B \-p
- Disable promotion of formal parameters in old style function definitions.
- --- 132,147 ----
- .TP
- .B \-c
- Omit the parameter comments in the prototypes generated by
- ! the \-f1 and \-f2 options.
- This option also omits the comments naming the source files from which
- the prototypes were generated.
- .TP
- .BI \-m name
- ! Set the name of the macro used to guard prototypes when option \-f4 is selected.
- The default is "P_".
- .TP
- .B \-d
- ! Omit the definition of the prototype macro named by the \-m option.
- .TP
- .B \-p
- Disable promotion of formal parameters in old style function definitions.
- ***************
- *** 158,163 ****
- --- 158,169 ----
- .B double
- as well.
- .TP
- + .B \-q
- + Do not output any error messages when the program cannot read the
- + file specified in an
- + .I #include
- + directive.
- + .TP
- .B \-s
- By default,
- .B cproto
- ***************
- *** 212,217 ****
- --- 218,231 ----
- a directory to search for files that are referenced with
- .I #include.
- .TP
- + .BI \-E cpp
- + Pipe the input files through the specified C preprocessor command
- + when generating prototypes.
- + By default, the program uses /lib/cpp.
- + .TP
- + .BI \-E 0
- + Do not run the C preprocessor.
- + .TP
- .B \-V
- Print version information.
- .SH ENVIRONMENT
- ***************
- *** 229,235 ****
- The conversion also discards some comments in the function definition
- head.
- .LP
- ! The -v option does not generate declarations for variables defined with the
- .B extern
- specifier.
- This doesn't strictly conform to the C language standard but this rule
- --- 243,249 ----
- The conversion also discards some comments in the function definition
- head.
- .LP
- ! The \-v option does not generate declarations for variables defined with the
- .B extern
- specifier.
- This doesn't strictly conform to the C language standard but this rule
- diff -c old/cproto.c new/cproto.c
- *** old/cproto.c Sat Apr 11 19:11:38 1992
- --- new/cproto.c Sat Apr 11 19:28:06 1992
- ***************
- *** 1,9 ****
- ! /* $Id: cproto.c 3.4 92/04/04 13:59:22 cthuang Exp $
- *
- * C function prototype generator and function definition converter
- */
- #ifndef lint
- ! static char rcsid[] = "$Id: cproto.c 3.4 92/04/04 13:59:22 cthuang Exp $";
- #endif
- #include <stdio.h>
- #include <ctype.h>
- --- 1,9 ----
- ! /* $Id: cproto.c 3.5 92/04/11 19:28:01 cthuang Exp $
- *
- * C function prototype generator and function definition converter
- */
- #ifndef lint
- ! static char rcsid[] = "$Id: cproto.c 3.5 92/04/11 19:28:01 cthuang Exp $";
- #endif
- #include <stdio.h>
- #include <ctype.h>
- ***************
- *** 59,64 ****
- --- 59,67 ----
- { "", "\n", " ", "\n ", "\n ", "\n" },
- };
-
- + /* If TRUE, don't output message if unable to read an include file */
- + boolean quiet = FALSE;
- +
- /* Include file directories */
- #ifdef MSDOS
- int num_inc_dir = 1;
- ***************
- *** 72,78 ****
- #ifdef CPP
- extern FILE *popen();
- extern int pclose();
- ! static char *cpp_cmd, *cmd;
- #endif
-
-
- --- 75,81 ----
- #ifdef CPP
- extern FILE *popen();
- extern int pclose();
- ! static char *cpp = CPP, *cpp_opt, *cpp_cmd;
- #endif
-
-
- ***************
- *** 228,233 ****
- --- 231,237 ----
- stderr);
- fputs(" -f n Set function prototype style (0 to 4)\n", stderr);
- fputs(" -p Disable formal parameter promotion\n", stderr);
- + fputs(" -q Disable include file read failure messages\n", stderr);
- fputs(" -s Output static declarations\n", stderr);
- fputs(" -t Convert function definitions to traditional style\n",
- stderr);
- ***************
- *** 240,250 ****
- stderr);
- fputs(" -C fmt Set format for function definition with parameter comments\n",
- stderr);
- - fputs(" -V Print version information\n", stderr);
- fputs(" -D name[=value]\n", stderr);
- fputs(" -U name\n", stderr);
- fputs(" -I directory\n", stderr);
- fputs(" Set C preprocessor options\n", stderr);
- exit(1);
- }
-
- --- 244,256 ----
- stderr);
- fputs(" -C fmt Set format for function definition with parameter comments\n",
- stderr);
- fputs(" -D name[=value]\n", stderr);
- fputs(" -U name\n", stderr);
- fputs(" -I directory\n", stderr);
- fputs(" Set C preprocessor options\n", stderr);
- + fputs(" -E cpp Run specified C preprocessor command\n", stderr);
- + fputs(" -E 0 Do not run any C preprocessor\n", stderr);
- + fputs(" -V Print version information\n", stderr);
- exit(1);
- }
-
- ***************
- *** 288,299 ****
- for (i = 0; i < argc; ++i) {
- n += strlen(argv[i]) + 1;
- }
- cpp_cmd = xmalloc(n);
- - strcpy(cpp_cmd, CPP);
- - cmd = xmalloc(n);
- #endif
-
- ! while ((c = getopt(argc, argv, "aC:cD:deF:f:I:m:P:pstU:Vv")) != EOF) {
- switch (c) {
- case 'I':
- if (num_inc_dir < MAX_INC_DIR) {
- --- 294,305 ----
- for (i = 0; i < argc; ++i) {
- n += strlen(argv[i]) + 1;
- }
- + cpp_opt = xmalloc(n);
- + *cpp_opt = '\0';
- cpp_cmd = xmalloc(n);
- #endif
-
- ! while ((c = getopt(argc, argv, "aC:cD:dE:eF:f:I:m:P:pqstU:Vv")) != EOF) {
- switch (c) {
- case 'I':
- if (num_inc_dir < MAX_INC_DIR) {
- ***************
- *** 306,312 ****
- case 'U':
- #ifdef CPP
- sprintf(tmp, " -%c%s", c, optarg);
- ! strcat(cpp_cmd, tmp);
- #endif
- break;
- case 'a':
- --- 312,318 ----
- case 'U':
- #ifdef CPP
- sprintf(tmp, " -%c%s", c, optarg);
- ! strcat(cpp_opt, tmp);
- #endif
- break;
- case 'a':
- ***************
- *** 318,323 ****
- --- 324,338 ----
- case 'd':
- define_macro = FALSE;
- break;
- + case 'E':
- + #ifdef CPP
- + if (strcmp(optarg, "0") == 0) {
- + cpp = NULL;
- + } else {
- + cpp = optarg;
- + }
- + #endif
- + break;
- case 'e':
- extern_out = TRUE;
- break;
- ***************
- *** 377,382 ****
- --- 392,400 ----
- case 'p':
- promote_param = FALSE;
- break;
- + case 'q':
- + quiet = TRUE;
- + break;
- case 's':
- static_out = TRUE;
- break;
- ***************
- *** 385,390 ****
- --- 403,409 ----
- break;
- case 'V':
- fprintf(stderr, "%s patchlevel %d\n", rcsid, PATCHLEVEL);
- + exit(1);
- break;
- case 'v':
- variables_out = TRUE;
- ***************
- *** 428,443 ****
- } else {
- for (i = optind; i < argc; ++i) {
- #ifdef CPP
- ! if (func_style == FUNC_NONE) {
- ! sprintf(cmd, "%s %s", cpp_cmd, argv[i]);
- ! if ((inf = popen(cmd, "r")) == NULL) {
- ! fprintf(stderr, "%s: error running cpp\n", progname);
- continue;
- }
- } else {
- if ((inf = fopen(argv[i], "r")) == NULL) {
- fprintf(stderr, "%s: cannot read file %s\n", progname,
- ! argv[i]);
- continue;
- }
- }
- --- 447,463 ----
- } else {
- for (i = optind; i < argc; ++i) {
- #ifdef CPP
- ! if (func_style == FUNC_NONE && cpp != NULL) {
- ! sprintf(cpp_cmd, "%s%s %s", cpp, cpp_opt, argv[i]);
- ! if ((inf = popen(cpp_cmd, "r")) == NULL) {
- ! fprintf(stderr, "%s: error running %s\n", progname,
- ! cpp_cmd);
- continue;
- }
- } else {
- if ((inf = fopen(argv[i], "r")) == NULL) {
- fprintf(stderr, "%s: cannot read file %s\n", progname,
- ! argv[i]);
- continue;
- }
- }
- diff -c old/cproto.h new/cproto.h
- *** old/cproto.h Sat Apr 11 19:11:36 1992
- --- new/cproto.h Sat Apr 11 19:27:48 1992
- ***************
- *** 1,4 ****
- ! /* $Id: cproto.h 3.4 92/04/04 13:59:08 cthuang Exp $
- *
- * Declarations for C function prototype generator
- */
- --- 1,4 ----
- ! /* $Id: cproto.h 3.5 92/04/11 19:27:44 cthuang Exp $
- *
- * Declarations for C function prototype generator
- */
- ***************
- *** 25,36 ****
- } ParameterList;
-
- /* Declaration specifier flags */
- ! #define DS_EXTERN 0 /* default: external declaration */
- ! #define DS_STATIC 1 /* visible only in current file */
- ! #define DS_CHAR 2 /* "char" type specifier in declaration */
- ! #define DS_SHORT 4 /* "short" type specifier in declaration */
- ! #define DS_FLOAT 8 /* "float" type specifier in declaration */
- ! #define DS_JUNK 16 /* we're not interested in this declaration */
-
- /* This structure stores information about a declaration specifier. */
- typedef struct decl_spec {
- --- 25,37 ----
- } ParameterList;
-
- /* Declaration specifier flags */
- ! #define DS_NONE 0 /* default */
- ! #define DS_EXTERN 1 /* contains "extern" specifier */
- ! #define DS_STATIC 2 /* contains "static" specifier */
- ! #define DS_CHAR 4 /* contains "char" type specifier */
- ! #define DS_SHORT 8 /* contains "short" type specifier */
- ! #define DS_FLOAT 16 /* contains "float" type specifier */
- ! #define DS_JUNK 32 /* we're not interested in this declaration */
-
- /* This structure stores information about a declaration specifier. */
- typedef struct decl_spec {
- ***************
- *** 105,111 ****
- typedef int FuncFormatType;
-
- /* Prototype/function definition output format */
- ! typedef struct {
- char *decl_spec_prefix; /* output before declaration specifier */
- char *declarator_prefix; /* output before declarator name */
- char *declarator_suffix; /* output before '(' of parameter list */
- --- 106,112 ----
- typedef int FuncFormatType;
-
- /* Prototype/function definition output format */
- ! typedef struct func_format {
- char *decl_spec_prefix; /* output before declaration specifier */
- char *declarator_prefix; /* output before declarator name */
- char *declarator_suffix; /* output before '(' of parameter list */
- ***************
- *** 124,129 ****
- --- 125,131 ----
- extern boolean define_macro;
- extern char *macro_name;
- extern boolean proto_comments;
- + extern boolean quiet;
- extern int num_inc_dir;
- extern char *inc_dir[];
- extern FuncFormat fmt[4];
- diff -c old/grammar.y new/grammar.y
- *** old/grammar.y Sat Apr 11 19:11:28 1992
- --- new/grammar.y Sat Apr 11 19:27:38 1992
- ***************
- *** 1,4 ****
- ! /* $Id: grammar.y 3.4 92/04/04 13:58:58 cthuang Exp $
- *
- * yacc grammar for C function prototype generator
- * This was derived from the grammar in Appendix A of
- --- 1,4 ----
- ! /* $Id: grammar.y 3.5 92/04/11 19:27:34 cthuang Exp $
- *
- * yacc grammar for C function prototype generator
- * This was derived from the grammar in Appendix A of
- ***************
- *** 5,10 ****
- --- 5,12 ----
- * "The C Programming Language" by Kernighan and Ritchie.
- */
-
- + %token <text> '(' '*'
- +
- %token
- /* identifiers that are not reserved words */
- T_IDENTIFIER T_TYPEDEF_NAME
- ***************
- *** 203,209 ****
-
- func_params = NULL;
-
- ! new_decl_spec(&decl_spec, "int", $1->begin, DS_EXTERN);
- if (cur_file->convert)
- gen_func_definition(&decl_spec, $1);
- gen_prototype(&decl_spec, $1);
- --- 205,211 ----
-
- func_params = NULL;
-
- ! new_decl_spec(&decl_spec, "int", $1->begin, DS_NONE);
- if (cur_file->convert)
- gen_func_definition(&decl_spec, $1);
- gen_prototype(&decl_spec, $1);
- ***************
- *** 242,256 ****
- storage_class
- : T_AUTO
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_EXTERN
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_JUNK);
- }
- | T_REGISTER
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_STATIC
- {
- --- 244,258 ----
- storage_class
- : T_AUTO
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_EXTERN
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_REGISTER
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_STATIC
- {
- ***************
- *** 265,303 ****
- type_specifier
- : T_CHAR
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN | DS_CHAR);
- }
- | T_DOUBLE
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_FLOAT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN | DS_FLOAT);
- }
- | T_INT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_LONG
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_SHORT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN | DS_SHORT);
- }
- | T_SIGNED
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_UNSIGNED
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_VOID
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | struct_or_union_specifier
- | enum_specifier
- --- 267,305 ----
- type_specifier
- : T_CHAR
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_CHAR);
- }
- | T_DOUBLE
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_FLOAT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_FLOAT);
- }
- | T_INT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_LONG
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_SHORT
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_SHORT);
- }
- | T_SIGNED
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_UNSIGNED
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_VOID
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | struct_or_union_specifier
- | enum_specifier
- ***************
- *** 306,312 ****
- type_qualifier
- : T_TYPE_QUALIFIER
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_EXTERN);
- }
- | T_TYPEDEF_NAME
- {
- --- 308,314 ----
- type_qualifier
- : T_TYPE_QUALIFIER
- {
- ! new_decl_spec(&$$, $1.text, $1.begin, DS_NONE);
- }
- | T_TYPEDEF_NAME
- {
- ***************
- *** 324,340 ****
- : struct_or_union any_id braces
- {
- sprintf(buf, "%s %s", $1.text, $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_EXTERN);
- }
- | struct_or_union braces
- {
- sprintf(buf, "%s {}", $1.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_EXTERN);
- }
- | struct_or_union any_id
- {
- sprintf(buf, "%s %s", $1.text, $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_EXTERN);
- }
- ;
-
- --- 326,342 ----
- : struct_or_union any_id braces
- {
- sprintf(buf, "%s %s", $1.text, $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_NONE);
- }
- | struct_or_union braces
- {
- sprintf(buf, "%s {}", $1.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_NONE);
- }
- | struct_or_union any_id
- {
- sprintf(buf, "%s %s", $1.text, $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_NONE);
- }
- ;
-
- ***************
- *** 379,394 ****
- : T_ENUM any_id braces
- {
- sprintf(buf, "enum %s", $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_EXTERN);
- }
- | T_ENUM braces
- {
- ! new_decl_spec(&$$, "enum {}", $1.begin, DS_EXTERN);
- }
- | T_ENUM any_id
- {
- sprintf(buf, "enum %s", $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_EXTERN);
- }
- ;
-
- --- 381,396 ----
- : T_ENUM any_id braces
- {
- sprintf(buf, "enum %s", $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_NONE);
- }
- | T_ENUM braces
- {
- ! new_decl_spec(&$$, "enum {}", $1.begin, DS_NONE);
- }
- | T_ENUM any_id
- {
- sprintf(buf, "enum %s", $2.text);
- ! new_decl_spec(&$$, buf, $1.begin, DS_NONE);
- }
- ;
-
- ***************
- *** 651,657 ****
- /* Initialize type qualifier table. */
- type_qualifiers = new_symbol_table();
- for (i = 0; i < sizeof(keywords)/sizeof(keywords[0]); ++i) {
- ! new_symbol(type_qualifiers, keywords[i], DS_EXTERN);
- }
- }
-
- --- 653,659 ----
- /* Initialize type qualifier table. */
- type_qualifiers = new_symbol_table();
- for (i = 0; i < sizeof(keywords)/sizeof(keywords[0]); ++i) {
- ! new_symbol(type_qualifiers, keywords[i], DS_NONE);
- }
- }
-
- diff -c old/lex.l new/lex.l
- *** old/lex.l Sat Apr 11 19:11:28 1992
- --- new/lex.l Sat Apr 11 19:27:34 1992
- ***************
- *** 1,5 ****
- %{
- ! /* $Id: lex.l 3.5 92/04/04 13:58:53 cthuang Exp $
- *
- * Lexical analyzer for C function prototype generator
- */
- --- 1,5 ----
- %{
- ! /* $Id: lex.l 3.6 92/04/11 19:27:25 cthuang Exp $
- *
- * Lexical analyzer for C function prototype generator
- */
- ***************
- *** 9,15 ****
-
- /* information about the current input file */
- typedef struct {
- ! char *file_name; /* input file name */
- FILE *file; /* input file */
- unsigned line_num; /* current line number in input file */
- FILE *tmp_file; /* temporary file */
- --- 9,16 ----
-
- /* information about the current input file */
- typedef struct {
- ! char *base_name; /* base input file name */
- ! char *file_name; /* current file name */
- FILE *file; /* input file */
- unsigned line_num; /* current line number in input file */
- FILE *tmp_file; /* temporary file */
- ***************
- *** 344,349 ****
- --- 345,351 ----
- ++inc_depth;
- cur_file = inc_stack + inc_depth;
- cur_file->file = yyin;
- + cur_file->base_name = xstrdup(name);
- cur_file->file_name = strcpy(xmalloc(MAX_TEXT_SIZE), name);
- cur_file->line_num = 1;
- cur_file->convert = convert;
- ***************
- *** 402,418 ****
- if (cur_file->changed) {
- if (yyin == stdin) {
- put_file(stdout);
- ! } else if ((outf = fopen(cur_file->file_name, "w")) != NULL) {
- put_file(outf);
- fclose(outf);
- } else {
- fprintf(stderr, "%s: cannot create file %s\n", progname,
- ! cur_file->file_name);
- }
- }
-
- fclose(cur_file->tmp_file);
- }
- free(cur_file->file_name);
-
- #ifdef FLEX_SCANNER
- --- 404,421 ----
- if (cur_file->changed) {
- if (yyin == stdin) {
- put_file(stdout);
- ! } else if ((outf = fopen(cur_file->base_name, "w")) != NULL) {
- put_file(outf);
- fclose(outf);
- } else {
- fprintf(stderr, "%s: cannot create file %s\n", progname,
- ! cur_file->base_name);
- }
- }
-
- fclose(cur_file->tmp_file);
- }
- + free(cur_file->base_name);
- free(cur_file->file_name);
-
- #ifdef FLEX_SCANNER
- ***************
- *** 464,471 ****
- }
- }
-
- ! put_error();
- ! fprintf(stderr, "cannot read file %s\n", filename);
- }
-
- /* When the end of the current input file is reached, pop a
- --- 467,476 ----
- }
- }
-
- ! if (!quiet) {
- ! put_error();
- ! fprintf(stderr, "cannot read file %s\n", filename);
- ! }
- }
-
- /* When the end of the current input file is reached, pop a
- Only in new: makefile
- diff -c old/Makefile.uni new/Makefile.uni
- *** old/Makefile.uni Sat Apr 11 19:11:26 1992
- --- new/Makefile.uni Sat Apr 11 19:27:24 1992
- ***************
- *** 1,4 ****
- ! # $Id: makefile.uni 3.3 92/04/04 13:58:48 cthuang Exp $
- #
- # UNIX makefile for C prototype generator
-
- --- 1,4 ----
- ! # $Id: makefile.uni 3.4 92/04/11 19:27:21 cthuang Exp $
- #
- # UNIX makefile for C prototype generator
-
- ***************
- *** 31,37 ****
- nroff -man cproto.1 >$@
-
- clean:
- ! rm *.o *.bak *.log cproto
-
- ci:
- ci -u3 $(DIST2) $(DIST3) $(DIST4)
- --- 31,37 ----
- nroff -man cproto.1 >$@
-
- clean:
- ! rm -f *.o *.bak *.log cproto lex.yy.c y.tab.c
-
- ci:
- ci -u3 $(DIST2) $(DIST3) $(DIST4)
- diff -c old/patchlev.h new/patchlev.h
- *** old/patchlev.h Sat Apr 11 19:11:36 1992
- --- new/patchlev.h Sat Apr 11 19:28:34 1992
- ***************
- *** 1,1 ****
- ! #define PATCHLEVEL 2
- --- 1,1 ----
- ! #define PATCHLEVEL 3
- diff -c old/semantic.c new/semantic.c
- *** old/semantic.c Sat Apr 11 19:11:38 1992
- --- new/semantic.c Sat Apr 11 19:28:14 1992
- ***************
- *** 1,4 ****
- ! /* $Id: semantic.c 3.4 92/04/04 13:59:28 cthuang Exp $
- *
- * Semantic actions executed by the parser of the
- * C function prototype generator.
- --- 1,4 ----
- ! /* $Id: semantic.c 3.5 92/04/11 19:28:08 cthuang Exp $
- *
- * Semantic actions executed by the parser of the
- * C function prototype generator.
- ***************
- *** 365,373 ****
- {
- fputs(p->decl_spec.text, outf);
- if (strlen(p->declarator->text) > 0) {
- ! if (strcmp(p->declarator->text, "...") != 0)
- ! if (where != FUNC_PROTO || proto_comments)
- fputc(' ', outf);
- put_declarator(outf, p->declarator);
- }
- }
- --- 365,376 ----
- {
- fputs(p->decl_spec.text, outf);
- if (strlen(p->declarator->text) > 0) {
- ! if (strcmp(p->declarator->text, "...") != 0) {
- ! if (proto_style != PROTO_ABSTRACT || proto_comments ||
- ! where != FUNC_PROTO ||
- ! strcmp(p->declarator->text, p->declarator->name) != 0)
- fputc(' ', outf);
- + }
- put_declarator(outf, p->declarator);
- }
- }
- ***************
- *** 593,599 ****
- {
- Declarator *d;
-
- ! if (!variables_out || (decl_spec->flags & DS_JUNK))
- return;
- if (!static_out && (decl_spec->flags & DS_STATIC))
- return;
- --- 596,602 ----
- {
- Declarator *d;
-
- ! if (!variables_out || (decl_spec->flags & (DS_EXTERN|DS_JUNK)))
- return;
- if (!static_out && (decl_spec->flags & DS_STATIC))
- return;
- ***************
- *** 637,645 ****
- DeclSpec *decl_spec;
- Declarator *declarator;
- {
- ! if (proto_style == PROTO_NONE)
- ! return;
- ! if (decl_spec->flags & DS_JUNK)
- return;
- if (!static_out && (decl_spec->flags & DS_STATIC))
- return;
- --- 640,646 ----
- DeclSpec *decl_spec;
- Declarator *declarator;
- {
- ! if (proto_style == PROTO_NONE || (decl_spec->flags & DS_JUNK))
- return;
- if (!static_out && (decl_spec->flags & DS_STATIC))
- return;
-