~ubuntu-branches/ubuntu/feisty/cproto/feisty

« back to all changes in this revision

Viewing changes to CHANGES

  • Committer: Bazaar Package Importer
  • Author(s): Carsten Leonhardt
  • Date: 2000-09-02 21:14:55 UTC
  • Revision ID: james.westby@ubuntu.com-20000902211455-ixe8p17zhnuk6jft
Tags: upstream-4.6d
ImportĀ upstreamĀ versionĀ 4.6d

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Version 4.6d
 
2
 
 
3
2000/8/10
 
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
 
9
  <leo@debian.org>).
 
10
 
 
11
Version 4.6c
 
12
 
 
13
2000/7/8
 
14
- add a clause to handle "__extension__" before extern declarations.
 
15
  (report by Bob van der Poel <bvdpoel@uniserve.com>)
 
16
 
 
17
Version 4.6b
 
18
 
 
19
1999/12/27
 
20
- correct check for size of vec[] array in yaccExpected(), broken in 4.6a
 
21
  changes.
 
22
  (report by Wolfgang Wander)
 
23
1999/12/19
 
24
- add keywords "restrict", "_Bool", "_Complex", "_Imaginary" based on c9x
 
25
  draft.
 
26
- add keywords "__restrict__" and "__restrict", for gcc.
 
27
  (report by Wolfgang Wander <wwc@rentec.com>)
 
28
 
 
29
Version 4.6a
 
30
 
 
31
1999/12/14
 
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.
 
37
1999/10/21
 
38
- allow identifiers to be the same as typedef names, handle this case:
 
39
  typedef int badStyle; 
 
40
  void badFunc(int *badStyle) { } 
 
41
  (reported by Paul Haas <paulh@iware.com>)
 
42
1999/1/3
 
43
- add '__extension__' keyword
 
44
 
 
45
Version 4.6
 
46
 
 
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.
 
50
 
 
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
 
55
  using Watcom C/C++.
 
56
 
 
57
- correct order of include-path to keep standard include (e.g., /usr/include)
 
58
  at the end of the search list.
 
59
 
 
60
- modified lint-library include-stack recovery to work on OSF/1.
 
61
 
 
62
- supply default initializer for lint-library const data
 
63
 
 
64
- corrected reset of __attribute__((noreturn))
 
65
 
 
66
- added '__volatile', '__const__', '__inline' keywords to grammar to
 
67
  accommodate gcc.
 
68
 
 
69
- modified configure script to add several development/debugging options (i.e.,
 
70
  --with-trace, --with-dbmalloc, --with-dmalloc).
 
71
 
 
72
- modified ifdefs to avoid using predefined 'unix' (not defined on AIX or CLIX)
 
73
 
 
74
Patchlevel 5 (April 1996)
 
75
 
 
76
- corrected instance of fclose on a file pointer after pclose was done (found
 
77
  with Electric Fence).
 
78
 
 
79
- corrected script make_bat.sh to prevent expansion of \n in argument-string.
 
80
 
 
81
- Modified handling of lint library option to allow generation of lint libraries
 
82
  for ANSI compilers (set -a -l).
 
83
 
 
84
- corrected a missing 'void' in parameter list
 
85
 
 
86
- modified to allow compile/test with 'dmalloc' library in addition to
 
87
  'dbmalloc'.
 
88
 
 
89
- corrected memory leak in yyerror.c, and allocation-size for cpp command.
 
90
 
 
91
- added keywords to work with gcc 2.7.0
 
92
 
 
93
- corrected unresolved references to flush_varargs() when OPT_LINTLIBRARY
 
94
  is not defined                                                         
 
95
 
 
96
Patchlevel 4 (August 1995)
 
97
 
 
98
- Added -S option to only output static declarations.
 
99
 
 
100
- Fix: The configure script didn't replace @CFLAGS@, @CPPFLAGS@ and @LDFLAGS@
 
101
  in the makefile generated from makefile.in.
 
102
 
 
103
- Fix: The -a option generated incorrect function definitions.
 
104
 
 
105
- update test-cases for the -f2 fix in patch 3.
 
106
 
 
107
- remove dependency on GNU-make from makefile.in
 
108
 
 
109
- corrected configuration script that tests whether yyerror can be extended
 
110
  (had cached wrong flag, preventing some configurations from being
 
111
  recognized).
 
112
 
 
113
- added calls for 'flush_varargs()' to correct situation in lint-library output
 
114
  where VARARGS comments were not reset properly when a function
 
115
  was skipped.
 
116
 
 
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.
 
120
 
 
121
Patchlevel 3 (January 1995)
 
122
 
 
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.
 
125
 
 
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
 
128
  filename).
 
129
 
 
130
- derive the program name from the argv[0] entry, in case it's installed
 
131
  under a different name.
 
132
 
 
133
- Fix: The -f2 option generated incorrect prototypes for functions that
 
134
  take a variable argument list.
 
135
 
 
136
- use 'sed' rather than 'flip' to apply trailing CR's to MS-DOS scripts.
 
137
 
 
138
Patchlevel 2 (October 1994)
 
139
 
 
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.
 
145
 
 
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).
 
148
 
 
149
- modified makefile.in to have shar target for both GNU shar and Rick Salz's
 
150
  cshar utility.
 
151
 
 
152
- use 'const' in yyerror.c, otherwise the error-reporting auto-configuration
 
153
  does not work.
 
154
 
 
155
- don't use "#elif" preprocessor control; not all systems support it.
 
156
 
 
157
Patchlevel 1 (October 1994)
 
158
 
 
159
- Added testing scripts for MS-DOS and VMS.
 
160
 
 
161
- Added makefile for Borland C++ for OS/2.
 
162
 
 
163
- Fix: When the -a, -t or -b options were used, '&' characters were stripped
 
164
  from the output files.
 
165
 
 
166
- Fix: The system.h file should define EXIT_SUCCESS and EXIT_FAILURE
 
167
  regardless of the presence of <stdlib.h>.
 
168
 
 
169
Patchlevel 0 (dickey, September 1994)
 
170
 
 
171
- corrected two malloc-defects in lint library generation (one place where
 
172
  generated parameter name was copied rather than allocated, and another memory
 
173
  leak).
 
174
 
 
175
- corrected generation of lint library function body, to handle function
 
176
  pointers.
 
177
 
 
178
- changed the implicit lint library function type from "" to "void", to avoid
 
179
  special-cases in the function-body generation.
 
180
 
 
181
- added logic using 'NestedParams' to suppress prototype-arguments in lint
 
182
  library function-pointer arguments.
 
183
 
 
184
- corrected lint-library function parameter derived from prototype "char [2]"
 
185
  (parameter name wasn't supplied).
 
186
 
 
187
- added PRINTFLIKE and SCANFLIKE to the comments interpreted for the lint
 
188
  library translation.
 
189
 
 
190
- modified "LINT_PREPRO" comment to pass-thru all comment text if no count is
 
191
  given.
 
192
 
 
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).
 
196
 
 
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
 
199
  not).
 
200
 
 
201
- treat carriage-return (^M) as whitespace where appropriate.
 
202
 
 
203
- added configuration-test to avoid conflict with prototype for 'popen()'
 
204
 
 
205
- added several function-pointer regression test-cases
 
206
 
 
207
Version 3
 
208
 
 
209
Patchlevel 9 (dickey, August 1994)
 
210
 
 
211
- use 'autoconf' to make a UNIX configure-script.
 
212
 
 
213
- recognize GCC extensions '__inline' and '__attribute__'
 
214
 
 
215
- added ifdef OPT_LINTLIBRARY to allow compiling without the lint library
 
216
  code (saves about 4kb).
 
217
 
 
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)").
 
220
 
 
221
- corrected logic that macroizes (e.g., with P_) functions like 'Sigdisp'
 
222
  (it wasn't doing anything about the trailing "(int sig)").
 
223
 
 
224
- corrected handling of K&R conversion of mixed-mode functions (K&R style
 
225
  with prototypes in arguments) to avoid losing comments.
 
226
 
 
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 '*'.
 
229
 
 
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.
 
232
 
 
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).
 
235
 
 
236
- modified to process lex/yacc files with gcc as C-preprocessor.
 
237
 
 
238
- Added option "-O" to force redirection of errors without shell operations
 
239
  (useful for VAX/VMS and MS-DOS in particular).
 
240
 
 
241
- added "\s" as a synonym for space in the format options (-P, -F, -C)
 
242
 
 
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)
 
245
 
 
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)
 
248
 
 
249
- tested on IRIX with lex/yacc
 
250
  (IRIX dbs3 5.2 02282015 IP19 mips)
 
251
 
 
252
- tested on Linux 0.99.15 with lex/yacc and flex 2.4.6 / bison 1.22 / byacc 1.9
 
253
 
 
254
- tested on MS-DOS with flex 2.37 / byacc 1.9 (built with turboc.mak).
 
255
  (Bison uses too much stack space).
 
256
 
 
257
- tested on VAX/VMS 6.1 with VAX-C 3.2 and flex 2.4.6 / bison 1.22.
 
258
 
 
259
- moved non-UNIX files into 'porting' subdirectory.
 
260
 
 
261
- added 'testing' subdirectory, for simple regression tests.
 
262
 
 
263
- tested for memory leaks with dbmalloc (on Linux).
 
264
 
 
265
Patchlevel 8 (internal: dickey/cthuang, June 1993)
 
266
 
 
267
- added files 'lintlibs.c' and 'strkey.c'
 
268
 
 
269
- Allow dollar signs in identifiers
 
270
 
 
271
- Defined FAIL, SUCCESS to use in 'exit()' calls (VMS is approximately the
 
272
  reverse of UNIX).
 
273
 
 
274
- Added option "-o" to force redirection without shell operations (useful for
 
275
  VAX/VMS in particular).
 
276
 
 
277
- Added options "-l" (lintlibrary format), "-T" (typedefs), "-x" (externs
 
278
  in include-files).
 
279
 
 
280
- Added "-C" option to cpp-invocation (to support VARARGS-decoding for -l
 
281
  option).
 
282
 
 
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.
 
285
 
 
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.
 
288
 
 
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.
 
292
 
 
293
- Corrected lex.l so that it recognizes preprocessor lines within curly braces.
 
294
 
 
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).
 
299
 
 
300
- Corrected test in 'put_decl_spec()' by using 'strkey()' (which tests for a
 
301
  name, not simply a substring).
 
302
 
 
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
 
305
  'fmt_library()').
 
306
 
 
307
- linted some xmalloc calls using ALLOC macro.
 
308
 
 
309
Patchlevel 7
 
310
 
 
311
- Fix: The processing of string literals is now more robust.
 
312
 
 
313
- Removed the -f4 option which generated prototypes like
 
314
 
 
315
        int main P_((int argc, char **argv));
 
316
 
 
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.
 
321
 
 
322
- Comments in prototype parameter lists are now disabled by default.
 
323
  Use the -c option now to output these comments.
 
324
 
 
325
- Can now process #include directives in which the file is specified with
 
326
  a #define macro.
 
327
 
 
328
- Now does not convert function definitions that take the formal
 
329
  parameter va_alist from <varargs.h>.
 
330
 
 
331
- Now recognizes the GNU C modifiers __const and __inline__.
 
332
 
 
333
Patchlevel 6
 
334
 
 
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.
 
338
 
 
339
Patchlevel 5
 
340
 
 
341
- Fix: The -v option did not output declarations for function pointers.
 
342
 
 
343
- Fix: String literals continued over more than one line messed up the
 
344
  line number count.
 
345
 
 
346
- Fix: The program generated incorrect prototypes for functions that
 
347
  take a variable argument list using <varargs.h>.
 
348
 
 
349
- Fix: When converting functions from the standard input, cproto
 
350
  generated no output if no functions needed to be converted.
 
351
 
 
352
- Fix: Now does not output a warning if an untagged struct is found in a
 
353
  typedef declaration.
 
354
 
 
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
 
358
  generate
 
359
 
 
360
        #ifdef ANSI_FUNC
 
361
 
 
362
        int
 
363
        main (int argc, char *argv[])
 
364
        #else
 
365
 
 
366
        int
 
367
        main (argc, argv)
 
368
        int argc;
 
369
        char *argv[]
 
370
        #endif
 
371
        {
 
372
        }
 
373
 
 
374
  Added the -B option to set the preprocessor directive that appears at
 
375
  the beginning of such definitions.
 
376
 
 
377
- Added the keyword "interrupt" to the set of type qualifiers when
 
378
  compiled on a UNIX system.
 
379
 
 
380
- The MS-DOS version now recognizes the type modifiers introduced by
 
381
  Microsoft C/C++ 7.00.
 
382
 
 
383
- Now recognizes ANSI C trigraphs (yuck!).
 
384
 
 
385
- Now use "#if __STDC__" instead of "#if defined(__STDC__)".
 
386
 
 
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.
 
390
 
 
391
Patchlevel 4
 
392
 
 
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
 
396
 
 
397
        typedef char *caddr_t;
 
398
 
 
399
        int strlen (s)
 
400
        caddr_t s;
 
401
        {
 
402
        }
 
403
 
 
404
  cproto generated the incorrect prototype
 
405
 
 
406
        int strlen(int s);
 
407
 
 
408
- Added implementation of the ANSI function tmpfile() for systems that
 
409
  don't have it.
 
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
 
413
  _based(void).
 
414
 
 
415
Patchlevel 3
 
416
 
 
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.
 
426
  
 
427
Patchlevel 2
 
428
 
 
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
 
434
  variable CPROTO.
 
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.
 
439
 
 
440
Patchlevel 1
 
441
 
 
442
- Fix: The program was calling ftell() on an invalid FILE pointer.
 
443
 
 
444
Patchlevel 0
 
445
 
 
446
- Added options to convert function definitions between the old style
 
447
  and ANSI C 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
 
453
 
 
454
        typedef unsigned short ushort;
 
455
 
 
456
        void test (x)
 
457
        ushort x;
 
458
        {
 
459
        }
 
460
 
 
461
  cproto generated the incorrect prototype
 
462
 
 
463
        void test(ushort x);
 
464
 
 
465
  while the correct one is
 
466
 
 
467
        void test(int x);
 
468
 
 
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
 
472
 
 
473
        void (*signal(int x, void (*func)(int y)))(int z)
 
474
        {
 
475
        }
 
476
 
 
477
- Fix: Changed calls to memory allocation functions to abort the program
 
478
  if they fail.
 
479
 
 
480
Version 2
 
481
 
 
482
Patchlevel 3
 
483
 
 
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
 
487
  preprocessor.
 
488
- Fix: Typedef names may now be omitted from typedef declarations.
 
489
  For example, every C compiler I tried accepts
 
490
 
 
491
        typedef int;
 
492
 
 
493
  and some even give warnings when encountering this statement.
 
494
 
 
495
Patchlevel 2
 
496
 
 
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
 
503
  segmentation faults.
 
504
 
 
505
Patchlevel 1
 
506
 
 
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.
 
511
 
 
512
Patchlevel 0
 
513
 
 
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
 
519
  preprocessor (cpp).
 
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.
 
525
 
 
526
Version 1
 
527
 
 
528
Patchlevel 3
 
529
 
 
530
- Fix: identical typedef names and struct tags should be allowed.
 
531
  For example:
 
532
 
 
533
        typedef struct egg_salad egg_salad;
 
534
 
 
535
        struct egg_salad {
 
536
            int mayo;
 
537
        };
 
538
 
 
539
        void dine(egg_salad l)
 
540
        {
 
541
        }
 
542
 
 
543
Patchlevel 2
 
544
 
 
545
- Fix: A typedef statement should allow a list of typedefs to be declared.
 
546
  Example:
 
547
 
 
548
        typedef int a, *b;
 
549
 
 
550
- Fix: When run with the -v option on this input, cproto did not output
 
551
  a declaration for variable "b":
 
552
 
 
553
        char *a="one"; char *b="two";
 
554
 
 
555
- The options were renamed.  Added new options that change the output
 
556
  format of the prototypes.
 
557
 
 
558
Patchlevel 1
 
559
 
 
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:
 
563
 
 
564
        void
 
565
        (*signal (sig, func))()
 
566
        int sig;
 
567
        void (*func)();
 
568
        {
 
569
            /* stuff */
 
570
        }
 
571
 
 
572
- The lexical analyser now uses LEX.  It should still be compatible with
 
573
  FLEX.