The protoize(1) and unprotoize(1) utilities
convert C source files between the traditional (K&R) formats
and the ANSI/ISO C standard format (including prototypes). Both
tools make use of the gcc(1) compiler, which must be
installed on your system.
The protoize(1) utility converts existing function
declarations and definitions into prototype form, and can insert
declarations and prototypes for functions that are implicitly
declared. The unprotoize(1) utility reverses the
process.
The files indicated by file must be source files, not
header files. The utilities compile the files to find the functions
they define. Information about the functions in file is
saved in the file file.X; the .X files are
normally deleted (but see -x). The converted files replace
the original files, which are renamed with the file extension
.save. If the save file already exists, the source file is
discarded.
The protoize(1) and unprotoize(1) utilities take
the following options:
-Bdir
Look in directory dir for the SYSCALLS.c.X
file.
-C
Rename the files to end in .C instead of .c. This
can be useful when converting C++ files, but will not work properly
on file allocation table (FAT) file systems or on file systems
available across a network, where case sensitivity is not
available. This option is available in protoize(1)
only.
-ccompile_opts
Pass compile_opts to gcc(1) when creating the
.X file. The options must be passed as a single argument,
and the options -g, -O, -c, -S, and
-o are ignored if they are part of compile_opts.
-ddirlist
Search the directories in dirlist for files to be
converted. Files in those directories named with the -x
option will not be converted.
-g
Add a global declaration for each function that is called and
not declared. The declarations are inserted at the beginning of the
file before the first function definition that contains a call to
an undeclared function. This option is for protoize(1)
only.
-iindentstring
Indent the old-style parameter declarations with the specified
indentstring. This option is for unprotoize(1)
only.
-k
Keep the .X files; normally they are deleted.
-l
Add a local declaration for each function that is called and
not declared. A prototype declaration is inserted into each block
that calls the function without a declaration. This option is for
protoize(1) only.
-N
Do not create .save files; delete the originals. This is
a dangerous option to use.
-n
Do not change the files; instead, print information about the
conversions that would have been done.
-pcompiler
Use the specified compiler instead of gcc(1).
This is intended for use with alternate versions of
gcc(1).
-q
Quiet mode; suppress warnings about definitions and
declarations that cannot be converted.
-V
Display version number.
-v
Synonym for -V; display the version number of
protoize(1) or unprotoize(1).