Bugzilla – Bug 135341
request for packaging: cproto
Last modified: 2005-11-24 11:20:55 UTC
Cproto is a handy utility that can scan C source files and generate K&R and ANSI function prototypes in a form that is useful for helping to generate header files, etc...
I don't see the need for that, given that the gcc package provides protoize and unprotoize. BTW, you should also provide a URL for the package so that we might evaluate it.
I had no idea protoize existed. Unfortunately, I could not locate any man pages or info pages on it whatsoever. I did find: http://gcc.gnu.org/onlinedocs/gcc/Running-Protoize.html Furthermore, protoize changes the contents of a .c file instead of producing output suitable for a .h file. The URL for cproto is cproto.sourceforge.net. cproto as a project has been around a very long time, and it's something I miss having come from Debian.
Being part of gcc, (un)protoize are documented in gcc.info. As for cproto, please tell me what you use it for. I only see a need for protoize to convert ancient K&R code to ANSI style.
Well, basically, cproto is a handy utility that can scan C source files and generate K&R or ANSI function prototypes in a form that is useful for helping to generate header files, etc... An example usage would be: cproto some_c_file.c > some_c_file.h From the manpage: Cproto generates function prototypes for functions defined in the spec‐ ified C source files to the standard output. The function definitions may be in the old style or ANSI C style. Optionally, cproto also out‐ puts declarations for variables defined in the files. If no file argu‐ ment is given, cproto reads its input from the standard input. Here is the output from cproto -h: cproto: invalid option -- h usage: cproto [ option ... ] [ file ... ] Options: -a, -t Convert function definitions to ANSI or traditional style -b Rewrite function definitions in both styles -c Enable comments in prototype parameters -e Output "extern" keyword before global declarations -f n Set function prototype style (0 to 3) -o file Redirect output to file -O file Redirect errors to file -p Disable formal parameter promotion -q Disable include file read failure messages -s Output static declarations also -S Output static declarations only -i Output inline declarations also -v Output variable declarations -x Output variables and functions declared "extern" -m Put macro around prototype parameters -M name Set name of prototype macro -d Omit prototype macro definition -P template Set prototype format template " int f (a, b)" -F template Set function definition format template " int f (a, b)" -C template Set format for function definition with parameter comments -D name[=value] Define C preprocessor symbol -U name Undefine C preprocessor symbol -I directory Add #include search directory -E command Run specified C preprocessor command -E 0 Do not run any C preprocessor -V Print version information It's really not that big of a deal. If it sounds useful, then go ahead, otherwise feel free to close this down -- I'll maintain my own package if necessary. Thanks for looking at it, though, you all do GREAT work!
Sorry, I probably didn't make myself clear enough. I was specifically interested in your personal uses of cproto.
OK, well. I can honestly say that I don't use cproto all that often (perhaps a few times a year), but when I am actively programming, especially new code, it's a pretty useful too. It is likely that there isn't enough audience for this software to justify packaging it - I've already taken up too much of your time, and for that you have my apologies.
No need to apologize, as that's part of my job. But given this discussion I'll not package it.