home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume28
/
cproto
/
part01
/
CHANGES
next >
Wrap
Text File
|
1992-03-15
|
4KB
|
133 lines
Version 3
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.