4
- use newer versions of mkdirs.sh and install.sh
5
- regenerate configure script with autoconf 2.13
6
- restructure aclocal.m4
7
- modify Makefile.in to allow $(bindir) and $(mandir) to be altered
8
independently of $(prefix) and $(exec_prefix) (patch by Carsten Leonhardt
14
- add a clause to handle "__extension__" before extern declarations.
15
(report by Bob van der Poel <bvdpoel@uniserve.com>)
20
- correct check for size of vec[] array in yaccExpected(), broken in 4.6a
22
(report by Wolfgang Wander)
24
- add keywords "restrict", "_Bool", "_Complex", "_Imaginary" based on c9x
26
- add keywords "__restrict__" and "__restrict", for gcc.
27
(report by Wolfgang Wander <wwc@rentec.com>)
32
- change vec[] array in yaccExpected() to be dynamically allocated. It was a
33
fixed-size (10 entries) array before. Also fix problem reported by Wolfgang
34
Wander <wwc@rentec.com>, which is that if the array were empty, it was passed
35
to qsort() with a zero-size, causing a core dump.
36
- add to syntax.c & corresponding test-cases the typedef/identifier example.
38
- allow identifiers to be the same as typedef names, handle this case:
40
void badFunc(int *badStyle) { }
41
(reported by Paul Haas <paulh@iware.com>)
43
- add '__extension__' keyword
47
- Since cproto is no longer being distributed on USENET in shar file format,
48
the patchlev.h and MANIFEST files have been removed.
49
The patchlevel number has been removed from the version number.
51
- Moved files out of the porting directory into separate platform specific
52
directories. The emx directory has files used to compile using EMX.
53
The os2 directory has files used to compile on OS/2 using Watcom C/C++.
54
The win32 directory has files to compile on Windows 95 and Windows NT
57
- correct order of include-path to keep standard include (e.g., /usr/include)
58
at the end of the search list.
60
- modified lint-library include-stack recovery to work on OSF/1.
62
- supply default initializer for lint-library const data
64
- corrected reset of __attribute__((noreturn))
66
- added '__volatile', '__const__', '__inline' keywords to grammar to
69
- modified configure script to add several development/debugging options (i.e.,
70
--with-trace, --with-dbmalloc, --with-dmalloc).
72
- modified ifdefs to avoid using predefined 'unix' (not defined on AIX or CLIX)
74
Patchlevel 5 (April 1996)
76
- corrected instance of fclose on a file pointer after pclose was done (found
79
- corrected script make_bat.sh to prevent expansion of \n in argument-string.
81
- Modified handling of lint library option to allow generation of lint libraries
82
for ANSI compilers (set -a -l).
84
- corrected a missing 'void' in parameter list
86
- modified to allow compile/test with 'dmalloc' library in addition to
89
- corrected memory leak in yyerror.c, and allocation-size for cpp command.
91
- added keywords to work with gcc 2.7.0
93
- corrected unresolved references to flush_varargs() when OPT_LINTLIBRARY
96
Patchlevel 4 (August 1995)
98
- Added -S option to only output static declarations.
100
- Fix: The configure script didn't replace @CFLAGS@, @CPPFLAGS@ and @LDFLAGS@
101
in the makefile generated from makefile.in.
103
- Fix: The -a option generated incorrect function definitions.
105
- update test-cases for the -f2 fix in patch 3.
107
- remove dependency on GNU-make from makefile.in
109
- corrected configuration script that tests whether yyerror can be extended
110
(had cached wrong flag, preventing some configurations from being
113
- added calls for 'flush_varargs()' to correct situation in lint-library output
114
where VARARGS comments were not reset properly when a function
117
- improved the logic of 'strip_name()' (used to compute include-directives for
118
the lint-library option) so that it recognizes the conventional include
119
directory created by a GCC install.
121
Patchlevel 3 (January 1995)
123
- check for a special case in lint-library generation, i.e., prototype
124
arguments of the form "*()", which need more parentheses for SunOS's lint.
126
- modified configure.in, aclocal.m4, makefile.in to work with autoconf 2.1
127
(also added install.sh - note that "install-sh" is not an MS-DOS-compatible
130
- derive the program name from the argv[0] entry, in case it's installed
131
under a different name.
133
- Fix: The -f2 option generated incorrect prototypes for functions that
134
take a variable argument list.
136
- use 'sed' rather than 'flip' to apply trailing CR's to MS-DOS scripts.
138
Patchlevel 2 (October 1994)
140
- modified grammar to recognize C++ ref-variables (i.e., '&' as a prefix to
141
identifiers at the top lexical level). Lint libraries are formatted without
142
this '&', since lint doesn't grok C++. This corrects an error in cproto 4.0
143
which caused '&' characters to be suppressed altogether, e.g., when filtering
144
with the "-t" option.
146
- modified rules that generate MANIFEST to put auto-generated scripts there
147
also, if they've been created (e.g., cd testing; make scripts).
149
- modified makefile.in to have shar target for both GNU shar and Rick Salz's
152
- use 'const' in yyerror.c, otherwise the error-reporting auto-configuration
155
- don't use "#elif" preprocessor control; not all systems support it.
157
Patchlevel 1 (October 1994)
159
- Added testing scripts for MS-DOS and VMS.
161
- Added makefile for Borland C++ for OS/2.
163
- Fix: When the -a, -t or -b options were used, '&' characters were stripped
164
from the output files.
166
- Fix: The system.h file should define EXIT_SUCCESS and EXIT_FAILURE
167
regardless of the presence of <stdlib.h>.
169
Patchlevel 0 (dickey, September 1994)
171
- corrected two malloc-defects in lint library generation (one place where
172
generated parameter name was copied rather than allocated, and another memory
175
- corrected generation of lint library function body, to handle function
178
- changed the implicit lint library function type from "" to "void", to avoid
179
special-cases in the function-body generation.
181
- added logic using 'NestedParams' to suppress prototype-arguments in lint
182
library function-pointer arguments.
184
- corrected lint-library function parameter derived from prototype "char [2]"
185
(parameter name wasn't supplied).
187
- added PRINTFLIKE and SCANFLIKE to the comments interpreted for the lint
190
- modified "LINT_PREPRO" comment to pass-thru all comment text if no count is
193
- added new comment keyword "LINT_SHADOWED" to generate "#undef symbol" before
194
each function template in lint libraries (useful for processing files that
195
define both macros and functions with the same names).
197
- interpret GCC's __attribute__ noreturn and format for lint-library text
198
(GCC 2.5.8 preprocessor passes these macros through, GCC 2.6 apparently does
201
- treat carriage-return (^M) as whitespace where appropriate.
203
- added configuration-test to avoid conflict with prototype for 'popen()'
205
- added several function-pointer regression test-cases
209
Patchlevel 9 (dickey, August 1994)
211
- use 'autoconf' to make a UNIX configure-script.
213
- recognize GCC extensions '__inline' and '__attribute__'
215
- added ifdef OPT_LINTLIBRARY to allow compiling without the lint library
216
code (saves about 4kb).
218
- corrected some logic that made incorrect commenting for options -c -f1
219
(e.g., "void (*Sigdisp(int sig, void (*func)(int sig)))(int sig)").
221
- corrected logic that macroizes (e.g., with P_) functions like 'Sigdisp'
222
(it wasn't doing anything about the trailing "(int sig)").
224
- corrected handling of K&R conversion of mixed-mode functions (K&R style
225
with prototypes in arguments) to avoid losing comments.
227
- modified logic for options -c -f2 so that cproto inserts a space before
228
the beginning of a comment when it immediately follows an '*'.
230
- enhanced error reporting with new module yyerror.c which (attempts to)
231
report the expected token type/name when a syntax error is encountered.
233
- modified the grammar.y file to try to recover from errors at the next
234
semicolon (as well as the next right curly bracket).
236
- modified to process lex/yacc files with gcc as C-preprocessor.
238
- Added option "-O" to force redirection of errors without shell operations
239
(useful for VAX/VMS and MS-DOS in particular).
241
- added "\s" as a synonym for space in the format options (-P, -F, -C)
243
- tested on Solaris with lex/yacc and flex 2.4.6 / bison 1.22
244
(SunOS explorer 5.3 Generic_101318-42 sun4m sparc; gcc 2.6.0)
246
- tested on SunOS 4.1.1 with lex/yacc and flex 2.4.6 / bison 1.22
247
(SunOS calvin 4.1.1 1 sun4c)
249
- tested on IRIX with lex/yacc
250
(IRIX dbs3 5.2 02282015 IP19 mips)
252
- tested on Linux 0.99.15 with lex/yacc and flex 2.4.6 / bison 1.22 / byacc 1.9
254
- tested on MS-DOS with flex 2.37 / byacc 1.9 (built with turboc.mak).
255
(Bison uses too much stack space).
257
- tested on VAX/VMS 6.1 with VAX-C 3.2 and flex 2.4.6 / bison 1.22.
259
- moved non-UNIX files into 'porting' subdirectory.
261
- added 'testing' subdirectory, for simple regression tests.
263
- tested for memory leaks with dbmalloc (on Linux).
265
Patchlevel 8 (internal: dickey/cthuang, June 1993)
267
- added files 'lintlibs.c' and 'strkey.c'
269
- Allow dollar signs in identifiers
271
- Defined FAIL, SUCCESS to use in 'exit()' calls (VMS is approximately the
274
- Added option "-o" to force redirection without shell operations (useful for
275
VAX/VMS in particular).
277
- Added options "-l" (lintlibrary format), "-T" (typedefs), "-x" (externs
280
- Added "-C" option to cpp-invocation (to support VARARGS-decoding for -l
283
- Modified grammar.y so that if -T option is turned on, instances of untagged
284
struct, union or enum are shown with the contents of the curly braces.
286
- Modified lex.l so that it sets 'return_val' iff at least one return statement
287
within curly braces returns an expression. Use this to support -l option.
289
- Modified semantic.c (for -l option) to put tabs after short names for better
290
readability. Also (only -l option), put a blank line before function
291
definitions and typedefs.
293
- Corrected lex.l so that it recognizes preprocessor lines within curly braces.
295
- Modified 'gen_prototype()' to trim 'extern' and 'auto' keywords from the text
296
(so that 'extern' is emitted in this function only if the -e option is
297
specified). Do this to support -l option (and to correct normal usage, which
298
implies that -e option is needed to put an 'extern' before declaration).
300
- Corrected test in 'put_decl_spec()' by using 'strkey()' (which tests for a
301
name, not simply a substring).
303
- Modified semantic.c to use 'put_string()' and related procedures to simplify
304
pretty-printing of lint-library text (mainly to control blank lines). (See
307
- linted some xmalloc calls using ALLOC macro.
311
- Fix: The processing of string literals is now more robust.
313
- Removed the -f4 option which generated prototypes like
315
int main P_((int argc, char **argv));
317
Use the -m option now to put a guard macro around the prototype
318
parameter list. Use the -m option together with -f3 (which is the
319
default) to produce the same output as the old -f4 option. The option
320
to set the guard macro name is now -M.
322
- Comments in prototype parameter lists are now disabled by default.
323
Use the -c option now to output these comments.
325
- Can now process #include directives in which the file is specified with
328
- Now does not convert function definitions that take the formal
329
parameter va_alist from <varargs.h>.
331
- Now recognizes the GNU C modifiers __const and __inline__.
335
- Fix: A function in lex.l exploited the ANSI C feature of concatenating
336
string literals. This prevented the module from being compiled with
337
pre-ANSI C compilers.
341
- Fix: The -v option did not output declarations for function pointers.
343
- Fix: String literals continued over more than one line messed up the
346
- Fix: The program generated incorrect prototypes for functions that
347
take a variable argument list using <varargs.h>.
349
- Fix: When converting functions from the standard input, cproto
350
generated no output if no functions needed to be converted.
352
- Fix: Now does not output a warning if an untagged struct is found in a
355
- Added the -b option which rewrites function definition heads to
356
include both old style and new style declarations separated by a
357
conditional compilation directive. For example, the program can
363
main (int argc, char *argv[])
374
Added the -B option to set the preprocessor directive that appears at
375
the beginning of such definitions.
377
- Added the keyword "interrupt" to the set of type qualifiers when
378
compiled on a UNIX system.
380
- The MS-DOS version now recognizes the type modifiers introduced by
381
Microsoft C/C++ 7.00.
383
- Now recognizes ANSI C trigraphs (yuck!).
385
- Now use "#if __STDC__" instead of "#if defined(__STDC__)".
387
- GNU bison orders the y.tab.c sections differently than yacc, which
388
resulted in references to variables before they were declared. The
389
grammar specification was modified to also be compatible with bison.
393
- Fix: A typedef name defined as a pointer to char, short or float was
394
incorrectly promoted if it was used to specify a formal parameter.
395
For example, for the definition
397
typedef char *caddr_t;
404
cproto generated the incorrect prototype
408
- Added implementation of the ANSI function tmpfile() for systems that
410
- If compiled with Microsoft C, cproto preprocesses its input by running
411
the command "cl /E". To eliminate the error messages when the file
412
<malloc.h> is included, the program now recognizes the specifier
417
- Fix: The program didn't generate prototypes for functions defined with
418
the extern specifier.
419
- Fix: The -c option didn't output a space before parameter names in
420
generated prototypes.
421
- Added the -E option to specify a particular C preprocessor to run or
422
to stop the program from running the C preprocessor.
423
- Added the -q option to stop the program from outputting error messages
424
when it cannot read the file specified in an #include directive.
425
- Made the yacc specification compatible with UNIX SYSVR4 yacc.
429
- Fix: The function definition conversion may produce a mangled function
430
definition if an #include directive appears before the function and
431
no comments appear between the directive and the function.
432
- Fix: The size of the buffer allocated for the C preprocessor command
433
string did not include enough space for options set in the environment
435
- Replaced the -n option with -c which disables all comments in the
436
generated prototypes.
437
- Replaced the enum's with #define constants to accommodate C compilers
438
that don't like enumerators in constant expressions.
442
- Fix: The program was calling ftell() on an invalid FILE pointer.
446
- Added options to convert function definitions between the old style
448
- Options can be specified from the environment variable CPROTO.
449
- The MS-DOS version recognizes more Microsoft C and Borland C++ type
450
modifiers (such as _cdecl, _far, _near).
451
- Fix: Formal parameters specified with typedef names were not promoted.
452
For example, for the definition
454
typedef unsigned short ushort;
461
cproto generated the incorrect prototype
465
while the correct one is
469
- Fix: Incorrect prototypes were generated for functions that returned
470
function pointers. For example, cproto generated an incorrect
471
prototype for the function definition
473
void (*signal(int x, void (*func)(int y)))(int z)
477
- Fix: Changed calls to memory allocation functions to abort the program
484
- Made cproto compatible with GNU flex.
485
- After compiling with the preprocessor symbol TURBO_CPP defined, on
486
MS-DOS systems, cproto will pipe its input through the Turbo C
488
- Fix: Typedef names may now be omitted from typedef declarations.
489
For example, every C compiler I tried accepts
493
and some even give warnings when encountering this statement.
497
- Cproto is now able to generate prototypes for functions defined in lex
498
and yacc source files named on the command line. Lex and yacc source
499
files are recognized by the .l or .y extension.
500
- Fix: The memory allocated to the typedef symbol table was not being
501
freed after scanning each source file.
502
- Fix: Failure to reset a variable during error recovery caused
507
- Fix: Cproto incorrectly generated the parameter "int ..." in
508
prototypes of functions taking variable parameters.
509
- Fix: Function definitions can now be followed by an optional
510
semicolon. I found this feature in every C compiler I tried.
514
- Added formal parameter promotion.
515
- Added prototype style that surrounds prototypes with a guard macro.
516
- Handles C++ style comment //.
517
- Nifty new way to set prototype output format.
518
- Got rid of the shell wrapper used to pipe the input through the C
520
- For the port to MS-DOS, I modified cproto to run without cpp, but
521
since I didn't want to reimplement cpp, the program processes only the
522
#include and #define directives and ignores all others. Macro names
523
defined by the #define directive are treated like typedef names if
524
they appear in declaration specifiers.
530
- Fix: identical typedef names and struct tags should be allowed.
533
typedef struct egg_salad egg_salad;
539
void dine(egg_salad l)
545
- Fix: A typedef statement should allow a list of typedefs to be declared.
550
- Fix: When run with the -v option on this input, cproto did not output
551
a declaration for variable "b":
553
char *a="one"; char *b="two";
555
- The options were renamed. Added new options that change the output
556
format of the prototypes.
560
- Fix: Incorrect prototypes were produced for functions that take
561
function pointer parameters or return a function pointer. For example,
562
cproto produced an erroneous prototype for this function definition:
565
(*signal (sig, func))()
572
- The lexical analyser now uses LEX. It should still be compatible with