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 definition if an #include directive appears before the function and no comments appear between the directive and the function. - Fix: The size of the buffer allocated for the C preprocessor command string did not include enough space for options set in the environment variable CPROTO. - Replaced the -n option with -c which disables all comments in the generated prototypes. - Replaced the enum's with #define constants to accommodate C compilers that don't like enumerators in constant expressions. Patchlevel 1 - Fix: The program was calling ftell() on an invalid FILE pointer. Patchlevel 0 - Added options to convert function definitions between the old style and ANSI C style. - Options can be specified from the environment variable CPROTO. - The MS-DOS version recognizes more Microsoft C and Borland C++ type modifiers (such as _cdecl, _far, _near). - Fix: Formal parameters specified with typedef names were not promoted. For example, for the definition typedef unsigned short ushort; void test (x) ushort x; { } cproto generated the incorrect prototype void test(ushort x); while the correct one is void test(int x); - Fix: Incorrect prototypes were generated for functions that returned function pointers. For example, cproto generated an incorrect prototype for the function definition void (*signal(int x, void (*func)(int y)))(int z) { } - Fix: Changed calls to memory allocation functions to abort the program if they fail. Version 2 Patchlevel 3 - Made cproto compatible with GNU flex. - After compiling with the preprocessor symbol TURBO_CPP defined, on MS-DOS systems, cproto will pipe its input through the Turbo C preprocessor. - Fix: Typedef names may now be omitted from typedef declarations. For example, every C compiler I tried accepts typedef int; and some even give warnings when encountering this statement. Patchlevel 2 - Cproto is now able to generate prototypes for functions defined in lex and yacc source files named on the command line. Lex and yacc source files are recognized by the .l or .y extension. - Fix: The memory allocated to the typedef symbol table was not being freed after scanning each source file. - Fix: Failure to reset a variable during error recovery caused segmentation faults. Patchlevel 1 - Fix: Cproto incorrectly generated the parameter "int ..." in prototypes of functions taking variable parameters. - Fix: Function definitions can now be followed by an optional semicolon. I found this feature in every C compiler I tried. Patchlevel 0 - Added formal parameter promotion. - Added prototype style that surrounds prototypes with a guard macro. - Handles C++ style comment //. - Nifty new way to set prototype output format. - Got rid of the shell wrapper used to pipe the input through the C preprocessor (cpp). - For the port to MS-DOS, I modified cproto to run without cpp, but since I didn't want to reimplement cpp, the program processes only the #include and #define directives and ignores all others. Macro names defined by the #define directive are treated like typedef names if they appear in declaration specifiers. Version 1 Patchlevel 3 - Fix: identical typedef names and struct tags should be allowed. For example: typedef struct egg_salad egg_salad; struct egg_salad { int mayo; }; void dine(egg_salad l) { } Patchlevel 2 - Fix: A typedef statement should allow a list of typedefs to be declared. Example: typedef int a, *b; - Fix: When run with the -v option on this input, cproto did not output a declaration for variable "b": char *a="one"; char *b="two"; - The options were renamed. Added new options that change the output format of the prototypes. Patchlevel 1 - Fix: Incorrect prototypes were produced for functions that take function pointer parameters or return a function pointer. For example, cproto produced an erroneous prototype for this function definition: void (*signal (sig, func))() int sig; void (*func)(); { /* stuff */ } - The lexical analyser now uses LEX. It should still be compatible with FLEX.