Bug 135341 - request for packaging: cproto
Summary: request for packaging: cproto
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Development (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Philipp Thomas
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-23 16:23 UTC by Jon Nelson
Modified: 2005-11-24 11:20 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Nelson 2005-11-23 16:23:18 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...
Comment 1 Philipp Thomas 2005-11-23 16:32:18 UTC
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.
Comment 2 Jon Nelson 2005-11-23 17:02:50 UTC
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.
Comment 3 Philipp Thomas 2005-11-23 17:10:20 UTC
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.
Comment 4 Jon Nelson 2005-11-23 17:19:31 UTC
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!

Comment 5 Philipp Thomas 2005-11-23 17:53:45 UTC
Sorry, I probably didn't make myself clear enough. I was specifically interested in your personal uses of cproto.
Comment 6 Jon Nelson 2005-11-23 19:44:35 UTC
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.
Comment 7 Philipp Thomas 2005-11-24 11:20:55 UTC
No need to apologize, as that's part of my job. But given this discussion I'll not package it.