home *** CD-ROM | disk | FTP | other *** search
- diff -c old/CHANGES new/CHANGES
- *** old/CHANGES Fri Jul 03 13:42:00 1992
- --- new/CHANGES Wed Jun 10 21:03:00 1992
- ***************
- *** 1,5 ****
- --- 1,29 ----
- Version 3
-
- + Patchlevel 4
- +
- + - Fix: A typedef name defined as a pointer to char, short or float was
- + incorrectly promoted if it was used to specify a formal parameter.
- + For example, for the definition
- +
- + typedef char *caddr_t;
- +
- + int strlen (s)
- + caddr_t s;
- + {
- + }
- +
- + cproto generated the incorrect prototype
- +
- + int strlen(int s);
- +
- + - Added implementation of the ANSI function tmpfile() for systems that
- + don't have it.
- + - If compiled with Microsoft C, cproto preprocesses its input by running
- + the command "cl /E". To eliminate the error messages when the file
- + <malloc.h> is included, the program now recognizes the specifier
- + _based(void).
- +
- Patchlevel 3
-
- - Fix: The program didn't generate prototypes for functions defined with
- diff -c old/config.h new/config.h
- *** old/config.h Fri Jul 03 13:41:48 1992
- --- new/config.h Fri Jul 03 13:37:52 1992
- ***************
- *** 1,8 ****
- ! /* $Id: config.h 3.3 92/04/04 13:59:06 cthuang Exp $
- *
- * cproto configuration and system dependencies
- */
-
- /* maximum include file nesting */
- #ifndef MAX_INC_DEPTH
- #define MAX_INC_DEPTH 15
- --- 1,32 ----
- ! /* $Id: config.h 3.4 92/07/03 13:37:48 cthuang Exp $
- *
- * cproto configuration and system dependencies
- */
-
- + /* Borland C predefines __MSDOS__ */
- + #ifdef __MSDOS__
- + #ifndef MSDOS
- + #define MSDOS
- + #endif
- + #endif
- +
- + /* Turbo C preprocessor */
- + #ifdef TURBO_CPP
- + #define CPP "cpp -P-"
- + #endif
- +
- + /* Microsoft C preprocessor */
- + #ifdef M_I86
- + #define CPP "cl /E /nologo"
- + #endif
- +
- + /* Default C preprocessor on UNIX systems */
- + #ifndef MSDOS
- + #ifndef CPP
- + #define CPP "/lib/cpp"
- + #endif
- + #endif
- +
- /* maximum include file nesting */
- #ifndef MAX_INC_DEPTH
- #define MAX_INC_DEPTH 15
- ***************
- *** 18,38 ****
- #define MAX_TEXT_SIZE 256
- #endif
-
- ! /* Borland C predefines __MSDOS__ */
- ! #ifdef __MSDOS__
- ! #ifndef MSDOS
- ! #define MSDOS
- ! #endif
- ! #endif
- !
- ! #ifdef MSDOS
- ! #include <malloc.h>
- #include <stdlib.h>
- #else
- - extern char *malloc();
- - extern char *getenv();
- - #endif
- -
- #ifdef BSD
- #include <strings.h>
- #define strchr index
- --- 42,51 ----
- #define MAX_TEXT_SIZE 256
- #endif
-
- ! #if defined(__STDC__) || defined(MSDOS)
- #include <stdlib.h>
- + #include <string.h>
- #else
- #ifdef BSD
- #include <strings.h>
- #define strchr index
- ***************
- *** 40,57 ****
- #else
- #include <string.h>
- #endif
- !
- ! #ifndef MSDOS
- ! extern char *strstr();
- ! #endif
- !
- ! /* C preprocessor */
- ! #ifdef TURBO_CPP
- ! #define CPP "cpp -P-"
- ! #endif
- !
- ! #ifndef MSDOS
- ! #ifndef CPP
- ! #define CPP "/lib/cpp"
- ! #endif
- #endif
- --- 53,57 ----
- #else
- #include <string.h>
- #endif
- ! extern char *getenv(), *malloc(), *strstr();
- #endif
- diff -c old/cproto.1 new/cproto.1
- *** old/cproto.1 Fri Jul 03 13:42:02 1992
- --- new/cproto.1 Wed Jun 10 21:03:02 1992
- ***************
- *** 1,4 ****
- ! .\" $Id: cproto.1 3.5 92/04/11 19:27:07 cthuang Exp $
- .\"
- .de EX \"Begin example
- .ne 5
- --- 1,4 ----
- ! .\" $Id: cproto.1 3.6 92/06/10 20:55:39 cthuang Exp $
- .\"
- .de EX \"Begin example
- .ne 5
- ***************
- *** 58,64 ****
- int argc; /* number of arguments */
- char *argv[]; /* arguments */
- {
- - ...
- }
- .EE
- then the converted function definition will have the form
- --- 58,63 ----
- ***************
- *** 65,75 ****
- .EX
- int
- main (
- ! int argc; /* number of arguments */
- ! char *argv[]; /* arguments */
- )
- {
- - ...
- }
- .EE
- Otherwise, the converted function definition will look like
- --- 64,73 ----
- .EX
- int
- main (
- ! int argc, /* number of arguments */
- ! char *argv[] /* arguments */
- )
- {
- }
- .EE
- Otherwise, the converted function definition will look like
- ***************
- *** 77,83 ****
- int
- main (int argc, char *argv[])
- {
- - ...
- }
- .EE
- .LP
- --- 75,80 ----
- ***************
- *** 108,114 ****
- int argc;
- char *argv[];
- {
- - ...
- }
- .EE
- If the value is 0, then no prototypes are generated.
- --- 105,110 ----
- ***************
- *** 199,207 ****
- will produce
- .EX
- int main(
- ! int argc,
- ! char *argv[]
- ! )
- .EE
- .TP
- .BI \-D name\[=value\]
- --- 195,203 ----
- will produce
- .EX
- int main(
- ! int argc,
- ! char *argv[]
- ! )
- .EE
- .TP
- .BI \-D name\[=value\]
- diff -c old/cproto.c new/cproto.c
- *** old/cproto.c Fri Jul 03 13:42:02 1992
- --- new/cproto.c Wed Jun 10 21:03:08 1992
- ***************
- *** 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>
- --- 1,9 ----
- ! /* $Id: cproto.c 3.6 92/06/10 20:56:26 cthuang Exp $
- *
- * C function prototype generator and function definition converter
- */
- #ifndef lint
- ! static char rcsid[] = "$Id: cproto.c 3.6 92/06/10 20:56:26 cthuang Exp $";
- #endif
- #include <stdio.h>
- #include <ctype.h>
- ***************
- *** 238,246 ****
- fputs(" -v Output variable declarations\n", stderr);
- fputs(" -m name Set name of prototype macro\n", stderr);
- fputs(" -d Omit prototype macro definition\n", stderr);
- ! fputs(" -P fmt Set prototype format template \"int main (a, b)\"\n",
- stderr);
- ! fputs(" -F fmt Set function definition format template \"int main (a, b)\"\n",
- stderr);
- fputs(" -C fmt Set format for function definition with parameter comments\n",
- stderr);
- --- 238,246 ----
- fputs(" -v Output variable declarations\n", stderr);
- fputs(" -m name Set name of prototype macro\n", stderr);
- fputs(" -d Omit prototype macro definition\n", stderr);
- ! fputs(" -P fmt Set prototype format template \" int main (a, b)\"\n",
- stderr);
- ! fputs(" -F fmt Set function definition format template \" int main (a, b)\"\n",
- stderr);
- fputs(" -C fmt Set format for function definition with parameter comments\n",
- stderr);
- ***************
- *** 469,475 ****
- #endif
- process_file(inf, argv[i]);
- #ifdef CPP
- ! if (func_style == FUNC_NONE) {
- pclose(inf);
- } else {
- pop_file();
- --- 469,475 ----
- #endif
- process_file(inf, argv[i]);
- #ifdef CPP
- ! if (func_style == FUNC_NONE && cpp != NULL) {
- pclose(inf);
- } else {
- pop_file();
- diff -c old/grammar.y new/grammar.y
- *** old/grammar.y Fri Jul 03 13:42:04 1992
- --- new/grammar.y Wed Jun 10 21:03:02 1992
- ***************
- *** 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
- --- 1,4 ----
- ! /* $Id: grammar.y 3.6 92/06/10 20:56:07 cthuang Exp $
- *
- * yacc grammar for C function prototype generator
- * This was derived from the grammar in Appendix A of
- ***************
- *** 6,13 ****
- */
-
- %token <text> '(' '*'
- -
- - %token
- /* identifiers that are not reserved words */
- T_IDENTIFIER T_TYPEDEF_NAME
-
- --- 6,11 ----
- ***************
- *** 24,37 ****
- /* type qualifiers */
- T_TYPE_QUALIFIER
-
- /* left brace */
- T_LBRACE
- /* all input to the matching right brace */
- T_MATCHRBRACE
-
- - /* paired square brackets and everything between them: [ ... ] */
- - T_BRACKETS
- -
- /* three periods */
- T_ELLIPSIS
-
- --- 22,36 ----
- /* type qualifiers */
- T_TYPE_QUALIFIER
-
- + /* paired square brackets and everything between them: [ ... ] */
- + T_BRACKETS
- +
- + %token
- /* left brace */
- T_LBRACE
- /* all input to the matching right brace */
- T_MATCHRBRACE
-
- /* three periods */
- T_ELLIPSIS
-
- ***************
- *** 55,69 ****
- %type <param_list> parameter_type_list parameter_list
- %type <parameter> parameter_declaration
- %type <param_list> opt_identifier_list identifier_list
- ! %type <text>
- ! struct_or_union pointer opt_type_qualifiers type_qualifier_list any_id
- ! T_BRACKETS
- ! T_IDENTIFIER T_TYPEDEF_NAME
- ! T_AUTO T_EXTERN T_REGISTER T_STATIC T_TYPEDEF T_INLINE
- ! T_CHAR T_DOUBLE T_FLOAT T_INT T_VOID T_LONG T_SHORT T_SIGNED T_UNSIGNED
- ! T_ENUM T_STRUCT T_UNION
- ! T_TYPE_QUALIFIER
- ! '(' '*'
-
- %{
- #include <stdio.h>
- --- 54,61 ----
- %type <param_list> parameter_type_list parameter_list
- %type <parameter> parameter_declaration
- %type <param_list> opt_identifier_list identifier_list
- ! %type <text> struct_or_union pointer opt_type_qualifiers type_qualifier_list
- ! any_id
-
- %{
- #include <stdio.h>
- ***************
- *** 112,118 ****
- | linkage_specification
- | T_ASM T_ASMARG ';'
- | error ';'
- ! | error braces
- ;
-
- braces
- --- 104,116 ----
- | linkage_specification
- | T_ASM T_ASMARG ';'
- | error ';'
- ! {
- ! yyerrok;
- ! }
- ! | error T_MATCHRBRACE
- ! {
- ! yyerrok;
- ! }
- ;
-
- braces
- ***************
- *** 156,167 ****
- declarator_list
- : declarator
- {
- ! new_symbol(typedef_names, $1->name, cur_decl_spec_flags);
- free_declarator($1);
- }
- | declarator_list ',' declarator
- {
- ! new_symbol(typedef_names, $3->name, cur_decl_spec_flags);
- free_declarator($3);
- }
- ;
- --- 154,176 ----
- declarator_list
- : declarator
- {
- ! int flags = cur_decl_spec_flags;
- !
- ! /* If the typedef is a pointer type, then reset the short type
- ! * flags so it does not get promoted.
- ! */
- ! if (strcmp($1->text, $1->name) != 0)
- ! flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
- ! new_symbol(typedef_names, $1->name, flags);
- free_declarator($1);
- }
- | declarator_list ',' declarator
- {
- ! int flags = cur_decl_spec_flags;
- !
- ! if (strcmp($3->text, $3->name) != 0)
- ! flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
- ! new_symbol(typedef_names, $3->name, flags);
- free_declarator($3);
- }
- ;
- ***************
- *** 474,486 ****
- type_qualifier_list
- : type_qualifier
- {
- ! strcpy($$.text, $1.text);
- $$.begin = $1.begin;
- free($1.text);
- }
- | type_qualifier_list type_qualifier
- {
- ! sprintf($$.text, "%s %s ", $1.text, $2.text);
- $$.begin = $1.begin;
- free($2.text);
- }
- --- 483,495 ----
- type_qualifier_list
- : type_qualifier
- {
- ! sprintf($$.text, "%s ", $1.text);
- $$.begin = $1.begin;
- free($1.text);
- }
- | type_qualifier_list type_qualifier
- {
- ! sprintf($$.text, "%s%s ", $1.text, $2.text);
- $$.begin = $1.begin;
- free($2.text);
- }
- diff -c old/lex.l new/lex.l
- *** old/lex.l Fri Jul 03 13:42:04 1992
- --- new/lex.l Wed Jun 10 21:03:02 1992
- ***************
- *** 1,5 ****
- %{
- ! /* $Id: lex.l 3.6 92/04/11 19:27:25 cthuang Exp $
- *
- * Lexical analyzer for C function prototype generator
- */
- --- 1,5 ----
- %{
- ! /* $Id: lex.l 3.7 92/06/10 20:56:04 cthuang Exp $
- *
- * Lexical analyzer for C function prototype generator
- */
- ***************
- *** 83,92 ****
- do_include(buf, TRUE);
- }
-
- <CPP1>[0-9]+{WS}+\".*$ {
- save_text();
- sscanf(yytext, "%d \"%[^\"]\"", &cur_file->line_num,
- ! cur_file->file_name);
- cur_file->line_num--;
- BEGIN INITIAL;
- }
- --- 83,99 ----
- do_include(buf, TRUE);
- }
-
- + <CPP1>line{WS}+[0-9]+{WS}+\".*$ {
- + save_text();
- + sscanf(yytext, "line %d \"%[^\"]\"",
- + &cur_file->line_num, cur_file->file_name);
- + cur_file->line_num--;
- + BEGIN INITIAL;
- + }
- <CPP1>[0-9]+{WS}+\".*$ {
- save_text();
- sscanf(yytext, "%d \"%[^\"]\"", &cur_file->line_num,
- ! cur_file->file_name);
- cur_file->line_num--;
- BEGIN INITIAL;
- }
- ***************
- *** 124,129 ****
- --- 131,138 ----
- <ASM>")" { save_text(); BEGIN INITIAL; return T_ASMARG; }
- <ASM>{QUOTED}|. save_text();
-
- + <INITIAL>_based[^(]*\([^)]*\) { save_text_offset(); return T_TYPE_QUALIFIER; }
- +
- <INITIAL>auto { save_text_offset(); return T_AUTO; }
- <INITIAL>extern { save_text_offset(); return T_EXTERN; }
- <INITIAL>register { save_text_offset(); return T_REGISTER; }
- ***************
- *** 333,338 ****
- --- 342,385 ----
- {
- return cur_file->begin_comment;
- }
- +
- + #ifdef NEED_tmpfile
- + /*
- + * tmpfile() - return a FILE* for a temporary file that will be
- + * removed automatically when the program exits.
- + *
- + * Not all systems have the ANSI tmpfile() function yet...
- + *
- + * DaviD W. Sanderson (dws@cs.wisc.edu)
- + */
- + FILE *
- + tmpfile ()
- + {
- + char name[1024];
- + char *tmpdir;
- + FILE *f;
- +
- + if ((tmpdir = getenv("TMPDIR")) == (char *)0)
- + {
- + tmpdir = "/tmp";
- + }
- + sprintf(name, "%s/TfXXXXXX", tmpdir);
- + mktemp(name);
- +
- + if ((f = fopen(name, "w+")) == (FILE *)0)
- + {
- + return (FILE *)0;
- + }
- +
- + if (unlink(name) == -1)
- + {
- + fclose(f);
- + return (FILE *)0;
- + }
- +
- + return f;
- + }
- + #endif /* NEED_tmpfile */
-
- /* Push a file onto the include stack. The stream yyin must already
- * point to the file.
- diff -c old/Makefile.msc new/Makefile.msc
- *** old/Makefile.msc Fri Jul 03 13:41:44 1992
- --- new/Makefile.msc Wed Jun 10 21:03:02 1992
- ***************
- *** 1,4 ****
- ! # $Id: makefile.msc 3.2 92/03/14 11:56:40 cthuang Exp $
- #
- # Microsoft C makefile for C prototype generator
-
- --- 1,4 ----
- ! # $Id: makefile.msc 3.3 92/06/10 20:55:56 cthuang Exp $
- #
- # Microsoft C makefile for C prototype generator
-
- ***************
- *** 18,29 ****
- DIST3 = config.h cproto.h patchlev.h semantic.h symbol.h
- DIST4 = cproto.c popen.c semantic.c strstr.c symbol.c
-
- ! OBJECTS = cproto.obj getopt.obj semantic.obj symbol.obj y_tab.obj
-
- all: cproto.exe
-
- cproto.exe: $(OBJECTS)
- ! $(CC) $(CFLAGS) -Fe$*.exe $(OBJECTS) $(LIBS) $(LDFLAGS)
-
- y_tab.obj: y_tab.c lex_yy.c config.h cproto.h symbol.h semantic.h
- $(CC) $(CFLAGS) -c $*.c
- --- 18,29 ----
- DIST3 = config.h cproto.h patchlev.h semantic.h symbol.h
- DIST4 = cproto.c popen.c semantic.c strstr.c symbol.c
-
- ! OBJECTS = cproto.obj getopt.obj semantic.obj symbol.obj y_tab.obj popen.obj
-
- all: cproto.exe
-
- cproto.exe: $(OBJECTS)
- ! $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) $(LDFLAGS)
-
- y_tab.obj: y_tab.c lex_yy.c config.h cproto.h symbol.h semantic.h
- $(CC) $(CFLAGS) -c $*.c
- diff -c old/Makefile.uni new/Makefile.uni
- *** old/Makefile.uni Fri Jul 03 13:42:04 1992
- --- new/Makefile.uni Wed Jun 10 21:03:02 1992
- ***************
- *** 1,8 ****
- ! # $Id: makefile.uni 3.4 92/04/11 19:27:21 cthuang Exp $
- #
- # UNIX makefile for C prototype generator
-
- # Define BSD for BSD, otherwise System V is assumed.
- #DEFINES = -DBSD
-
- LEX = lex
- --- 1,9 ----
- ! # $Id: makefile.uni 3.5 92/06/10 20:56:00 cthuang Exp $
- #
- # UNIX makefile for C prototype generator
-
- # Define BSD for BSD, otherwise System V is assumed.
- + # Define NEED_tmpfile if your system does not have the ANSI function tmpfile()
- #DEFINES = -DBSD
-
- LEX = lex
- diff -c old/patchlev.h new/patchlev.h
- *** old/patchlev.h Fri Jul 03 13:42:04 1992
- --- new/patchlev.h Wed Jun 10 21:03:08 1992
- ***************
- *** 1,1 ****
- ! #define PATCHLEVEL 3
- --- 1,1 ----
- ! #define PATCHLEVEL 4
- diff -c old/popen.c new/popen.c
- *** old/popen.c Fri Jul 03 13:41:48 1992
- --- new/popen.c Wed Jun 10 21:03:08 1992
- ***************
- *** 1,4 ****
- ! /* $Id: popen.c 3.2 92/03/14 11:58:07 cthuang Exp $
- *
- * Imitate a UNIX pipe in MS-DOS.
- */
- --- 1,4 ----
- ! /* $Id: popen.c 3.3 92/06/10 20:56:30 cthuang Exp $
- *
- * Imitate a UNIX pipe in MS-DOS.
- */
- ***************
- *** 34,53 ****
- arg = argv;
- s = strtok(cmdline, " ");
- *arg++ = s;
- ! #ifdef M_I86
- ! sprintf(opt, "-o%s.", pipe_name);
- ! #else
- sprintf(opt, "-o%s", pipe_name);
- - #endif
- *arg++ = opt;
- while ((s = strtok(NULL, " ")) != NULL) {
- *arg++ = s;
- }
- *arg = NULL;
-
- ! /* Redirect the program's stdout to /dev/null. */
- ostdout = dup(fileno(stdout));
- freopen("nul", "w", stdout);
-
- /* Run the program. */
- status = spawnvp(P_WAIT, argv[0], argv);
- --- 34,55 ----
- arg = argv;
- s = strtok(cmdline, " ");
- *arg++ = s;
- ! #ifdef TURBO_CPP
- sprintf(opt, "-o%s", pipe_name);
- *arg++ = opt;
- + #endif
- while ((s = strtok(NULL, " ")) != NULL) {
- *arg++ = s;
- }
- *arg = NULL;
-
- ! /* Redirect the program's stdout. */
- ostdout = dup(fileno(stdout));
- + #ifdef TURBO_CPP
- freopen("nul", "w", stdout);
- + #else
- + freopen(pipe_name, "w", stdout);
- + #endif
-
- /* Run the program. */
- status = spawnvp(P_WAIT, argv[0], argv);
- diff -c old/semantic.c new/semantic.c
- *** old/semantic.c Fri Jul 03 13:42:06 1992
- --- new/semantic.c Wed Jun 10 21:03:08 1992
- ***************
- *** 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.
- --- 1,4 ----
- ! /* $Id: semantic.c 3.6 92/06/10 20:56:35 cthuang Exp $
- *
- * Semantic actions executed by the parser of the
- * C function prototype generator.
- ***************
- *** 197,208 ****
-
- /* Return TRUE if the parameter is void.
- */
- ! boolean
- is_void_parameter (p)
- Parameter *p;
- {
- return p == NULL || (strcmp(p->decl_spec.text, "void") == 0 &&
- ! strlen(p->declarator->text) == 0);
- }
-
- /* Initialize a list of function parameters.
- --- 197,208 ----
-
- /* Return TRUE if the parameter is void.
- */
- ! static boolean
- is_void_parameter (p)
- Parameter *p;
- {
- return p == NULL || (strcmp(p->decl_spec.text, "void") == 0 &&
- ! p->declarator->text[0] == '\0');
- }
-
- /* Initialize a list of function parameters.
- ***************
- *** 333,340 ****
-
- for (d = declarators->first; d != NULL; d = d->next) {
- /* Search the parameter list for a matching name. */
- ! p = search_parameter_list(params, d->name);
- ! if (p == NULL) {
- put_error();
- fprintf(stderr, "declared argument \"%s\" is missing\n", d->name);
- } else {
- --- 333,339 ----
-
- for (d = declarators->first; d != NULL; d = d->next) {
- /* Search the parameter list for a matching name. */
- ! if ((p = search_parameter_list(params, d->name)) == NULL) {
- put_error();
- fprintf(stderr, "declared argument \"%s\" is missing\n", d->name);
- } else {
- ***************
- *** 364,370 ****
- Parameter *p;
- {
- 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 ||
- --- 363,369 ----
- Parameter *p;
- {
- fputs(p->decl_spec.text, outf);
- ! if (p->declarator->text[0] != '\0') {
- if (strcmp(p->declarator->text, "...") != 0) {
- if (proto_style != PROTO_ABSTRACT || proto_comments ||
- where != FUNC_PROTO ||
- ***************
- *** 478,484 ****
- if (declarator->func_stack->func_def == FUNC_NONE) {
-
- decl_text = declarator->func_stack->text;
- ! if (strlen(declarator->name) == 0) {
- fputs(decl_text, outf);
- } else {
-
- --- 477,483 ----
- if (declarator->func_stack->func_def == FUNC_NONE) {
-
- decl_text = declarator->func_stack->text;
- ! if (declarator->name[0] == '\0') {
- fputs(decl_text, outf);
- } else {
-
- ***************
- *** 551,557 ****
-
- if (declarator->func_def == FUNC_NONE) {
- if (where == FUNC_PROTO && proto_style == PROTO_ABSTRACT &&
- ! strlen(declarator->name) > 0) {
- if ((s = strstr(declarator->text, declarator->name)) == NULL)
- return;
- *s = '\0';
- --- 550,556 ----
-
- if (declarator->func_def == FUNC_NONE) {
- if (where == FUNC_PROTO && proto_style == PROTO_ABSTRACT &&
- ! declarator->name[0] != '\0') {
- if ((s = strstr(declarator->text, declarator->name)) == NULL)
- return;
- *s = '\0';
- ***************
- *** 625,632 ****
- Parameter *p;
-
- for (p = declarator->params.first; p != NULL; p = p->next) {
- ! if (strlen(p->decl_spec.text) == 0 &&
- ! strcmp(p->declarator->text, "...") != 0) {
- free(p->decl_spec.text);
- p->decl_spec.text = xstrdup("int");
- }
- --- 624,631 ----
- Parameter *p;
-
- for (p = declarator->params.first; p != NULL; p = p->next) {
- ! if (p->decl_spec.text[0] == '\0' &&
- ! strcmp(p->declarator->text, "...") != 0) {
- free(p->decl_spec.text);
- p->decl_spec.text = xstrdup("int");
- }
- diff -c old/semantic.h new/semantic.h
- *** old/semantic.h Fri Jul 03 13:41:48 1992
- --- new/semantic.h Wed Jun 10 21:03:08 1992
- ***************
- *** 1,4 ****
- ! /* $Id: semantic.h 3.2 92/03/06 00:54:38 cthuang Exp $
- *
- * Declarations of semantic action routines
- */
- --- 1,4 ----
- ! /* $Id: semantic.h 3.3 92/06/10 20:56:19 cthuang Exp $
- *
- * Declarations of semantic action routines
- */
- ***************
- *** 25,32 ****
- Parameter *param, DeclSpec *decl_spec, Declarator *declarator*/);
- extern void free_parameter(/*
- Parameter *param*/);
- - extern boolean is_void_parameter(/*
- - Parameter *p*/);
- extern void new_param_list(/*
- ParameterList *param_list, Parameter *param*/);
- extern void free_param_list(/*
- --- 25,30 ----
-