home *** CD-ROM | disk | FTP | other *** search
-
-
- CPROTO(1) Unix Programmer's Manual CPROTO(1)
-
-
- NAME
- cproto - generate C function prototypes from C source code
-
- SYNOPSIS
- cproto [ option ... ] [ file ... ]
-
- DESCRIPTION
- Cproto reads C source code files and outputs function prototypes for
- external functions defined in the source to standard output. The
- function definitions may be in the old style or ANSI style. Optionally,
- cproto also outputs declarations for any external variables defined in
- the file. If no file argument is given, cproto takes its input from the
- standard input.
-
- OPTIONS
-
- -e Output the keyword extern in front of each declaration having global
- scope.
-
- -fn Set the style of function prototype where n is a number from 0 to 4.
- For example, consider the function definition
-
- main (argc, argv)
- int argc;
- char *argv[];
- {
- ...
- }
-
- If the value is 0, then no prototypes are generated. When set to 1,
- the output is:
-
- int main(/*int argc, char *argv[]*/);
-
- For a value of 2, the output has the form:
-
- int main(int /*argc*/, char */*argv*/[]);
-
- The default value is 3. It produces the full function prototype:
-
- int main(int argc, char *argv[]);
-
- A value of 4 produces prototypes guarded by a macro:
-
- int main P_((int argc, char *argv[]));
-
-
- -mname
- Set the name of the macro used to guard prototypes when option -f4
- is selected. By default it is "P_".
-
- -d Omit the definition of the prototype macro named by the -m option.
-
- -p Disable promotion of formal parameters in function prototypes. By
- default, parameters of type char or short in traditional style
- function definitions are promoted to type int in the function
-
-
- February 28, 1991 1
-
-
-
-
- CPROTO(1) Unix Programmer's Manual CPROTO(1)
-
-
- prototype. Parameters of type float get promoted to double as well.
-
- -s Also output static declarations.
-
- -v Also output declarations for variables defined in the file.
-
- -Fstring
- Set the format used to output each prototype. The string is a
- template in the form
-
- " int main ( a, b )"
-
- where each space in the string may be replaced with whitespace
- characters. For example, the option
-
- -F"int main(\n\ta,\n\tb\n\t)"
-
- will produce prototypes in the format
-
- int main(
- int argc,
- char *argv[]
- );
-
-
- -Dname\[=value\]
- This option is passed through to the preprocessor and is used to
- define symbols for use with conditionals such as #ifdef.
-
- -Uname
- This option is passed through to the preprocessor and is used to
- remove any definitions of this symbol.
-
- -Idirectory
- This option is passed through to the preprocessor and is used to
- specify a directory to search for files that are referenced with
- #include.
-
- -V Print version information.
-
- BUGS
- When cproto finds an error, it usually outputs the not very descriptive
- message "syntax error".
-
- Options that take string arguments only interpret the following
- character escape sequences:
-
- \n newline
- \t tab
-
-
- AUTHOR
- Chin Huang
- cthuang@contact.uucp
- chin.huang@canrem.uucp
-
-
-
- February 28, 1991 2
-
-
-
-
- CPROTO(1) Unix Programmer's Manual CPROTO(1)
-
-
- SEE ALSO
- cc(1), cpp(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- February 28, 1991 3
-
-
-