Unix Programming - javadoc like system for C wanted

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2006 > javadoc like system for C wanted





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author javadoc like system for C wanted
Sumo Wrestler (or just ate too much)

2006-04-27, 7:55 am

I'm looking for some opensource software that will allow me to embed
documentation into C source files--similar to the way javadoc allows
documentation inside of Java source files.

Cweb, funnelweb and noweb are not what I'm looking for because they
require that the programmer write in a language other than C. I want to
write in C, not in web.

This is what I'm looking for:

/ ****************************************
*****
* gobble - gobble some characters from a string
*
* param: str - the string to work on
* param: pos - the initial position in the string to start
* gobbling
* param: stopped - "points" to the next character in str
* to do more gobbling on
*
* Returns: (through the stopped parameter)
* If there are more characters to gobble, an index
* to the next character in str to gobble.
* If there are no more characters to gobble, -1.
****************************************
******/

void gobble (const char * str, int pos, int * stopped)
{
...
}



Then I want to execute the tool to create the documentation for the
functions in my C source file:

$ tool gobble.c
--> tool: wrote gobble.html

I hope that something like this already exists. Preferably it would be
free (even opensource), and optimally I could install it using apt-get


Patrick TJ McPhee

2006-04-27, 7:56 am

In article <4alm89FtmkcmU1@uni-berlin.de>,
Sumo Wrestler (or just ate too much) <sumo.wrestler@microsoft.invalid> wrote:

% I'm looking for some opensource software that will allow me to embed
% documentation into C source files--similar to the way javadoc allows
% documentation inside of Java source files.

You might want doc++ (http://docpp.sourceforge.net).

% Cweb, funnelweb and noweb are not what I'm looking for because they
% require that the programmer write in a language other than C. I want to
% write in C, not in web.

More to the point, litprog tools are not geared towards producing
canned documentation. They're meant to facilitate a method of writing
programs.

--

Patrick TJ McPhee
North York Canada
ptjm@interlog.com

Thomas Maier-Komor

2006-04-27, 7:56 am

Sumo Wrestler (or just ate too much) wrote:
> I'm looking for some opensource software that will allow me to embed
> documentation into C source files--similar to the way javadoc allows
> documentation inside of Java source files.
>
> Cweb, funnelweb and noweb are not what I'm looking for because they
> require that the programmer write in a language other than C. I want to
> write in C, not in web.
>
> This is what I'm looking for:
>
> / ****************************************
*****
> * gobble - gobble some characters from a string
> *
> * param: str - the string to work on
> * param: pos - the initial position in the string to start
> * gobbling
> * param: stopped - "points" to the next character in str
> * to do more gobbling on
> *
> * Returns: (through the stopped parameter)
> * If there are more characters to gobble, an index
> * to the next character in str to gobble.
> * If there are no more characters to gobble, -1.
> ****************************************
******/
>
> void gobble (const char * str, int pos, int * stopped)
> {
> ...
> }
>
>
>
> Then I want to execute the tool to create the documentation for the
> functions in my C source file:
>
> $ tool gobble.c
> --> tool: wrote gobble.html
>
> I hope that something like this already exists. Preferably it would be
> free (even opensource), and optimally I could install it using apt-get
>
>


Have you tried doxygen?

Tom

daniloco@mclink.it

2006-04-27, 7:56 am

Sumo Wrestler (or just ate too much) wrote:
> I'm looking for some opensource software that will allow me to embed
> documentation into C source files--similar to the way javadoc allows
> documentation inside of Java source files.
>
> Cweb, funnelweb and noweb are not what I'm looking for because they
> require that the programmer write in a language other than C. I want
> to write in C, not in web.
>
> This is what I'm looking for:
>
> / ****************************************
*****
> * gobble - gobble some characters from a string
> *
> * param: str - the string to work on
> * param: pos - the initial position in the string to start
> * gobbling
> * param: stopped - "points" to the next character in str
> * to do more gobbling on
> *
> * Returns: (through the stopped parameter)
> * If there are more characters to gobble, an index
> * to the next character in str to gobble.
> * If there are no more characters to gobble, -1.
> ****************************************
******/
>
> void gobble (const char * str, int pos, int * stopped)
> {
> ...
> }
>
>
>
> Then I want to execute the tool to create the documentation for the
> functions in my C source file:
>
> $ tool gobble.c
> --> tool: wrote gobble.html
>
> I hope that something like this already exists. Preferably it would be
> free (even opensource), and optimally I could install it using
> apt-get


--

Have you tried Doxygen?
It is open source:
http://www.stack.nl/~dimitri/doxyge....html#latestsrc
They have versions for Windows and various Linux
distributions, including Debian:
http://www.stack.nl/~dimitri/doxygen/download.html#rpm

A descendant of Doxygen is doxys, which you can find with sources at:

http://www.doxys.dk/homepage/Downlo...escription.html

Another similar tool is DOC++: http://docpp.sourceforge.net/
For this you'll find sources and some binaries at:
http://docpp.sourceforge.net/download.html
although just RPM's are available for Linux.

The syntax for these tools is not exactly the one you suggested, but
comes quite close, and definitely isn't web-like.
HTH.

________________________________________
____________________________________

Danilo Coccia email: daniloco 'at' acm 'dot' org
Via Cherubini 1 daniloco 'at' mclink 'dot'
it 20090 Buccinasco Phone: +39-0245712469
Italy
________________________________________
____________________________________


Thomas Maier-Komor

2006-04-27, 7:56 am

Sumo Wrestler (or just ate too much) wrote:
> I'm looking for some opensource software that will allow me to embed
> documentation into C source files--similar to the way javadoc allows
> documentation inside of Java source files.
>
> Cweb, funnelweb and noweb are not what I'm looking for because they
> require that the programmer write in a language other than C. I want to
> write in C, not in web.
>
> This is what I'm looking for:
>
> / ****************************************
*****
> * gobble - gobble some characters from a string
> *
> * param: str - the string to work on
> * param: pos - the initial position in the string to start
> * gobbling
> * param: stopped - "points" to the next character in str
> * to do more gobbling on
> *
> * Returns: (through the stopped parameter)
> * If there are more characters to gobble, an index
> * to the next character in str to gobble.
> * If there are no more characters to gobble, -1.
> ****************************************
******/
>
> void gobble (const char * str, int pos, int * stopped)
> {
> ...
> }
>
>
>
> Then I want to execute the tool to create the documentation for the
> functions in my C source file:
>
> $ tool gobble.c
> --> tool: wrote gobble.html
>
> I hope that something like this already exists. Preferably it would be
> free (even opensource), and optimally I could install it using apt-get
>
>


Have you tried doxygen?

Tom

daniloco@mclink.it

2006-04-27, 7:56 am

Sumo Wrestler (or just ate too much) wrote:
> I'm looking for some opensource software that will allow me to embed
> documentation into C source files--similar to the way javadoc allows
> documentation inside of Java source files.
>
> Cweb, funnelweb and noweb are not what I'm looking for because they
> require that the programmer write in a language other than C. I want
> to write in C, not in web.
>
> This is what I'm looking for:
>
> / ****************************************
*****
> * gobble - gobble some characters from a string
> *
> * param: str - the string to work on
> * param: pos - the initial position in the string to start
> * gobbling
> * param: stopped - "points" to the next character in str
> * to do more gobbling on
> *
> * Returns: (through the stopped parameter)
> * If there are more characters to gobble, an index
> * to the next character in str to gobble.
> * If there are no more characters to gobble, -1.
> ****************************************
******/
>
> void gobble (const char * str, int pos, int * stopped)
> {
> ...
> }
>
>
>
> Then I want to execute the tool to create the documentation for the
> functions in my C source file:
>
> $ tool gobble.c
> --> tool: wrote gobble.html
>
> I hope that something like this already exists. Preferably it would be
> free (even opensource), and optimally I could install it using
> apt-get


--

Have you tried Doxygen?
It is open source:
http://www.stack.nl/~dimitri/doxyge....html#latestsrc
They have versions for Windows and various Linux
distributions, including Debian:
http://www.stack.nl/~dimitri/doxygen/download.html#rpm

A descendant of Doxygen is doxys, which you can find with sources at:

http://www.doxys.dk/homepage/Downlo...escription.html

Another similar tool is DOC++: http://docpp.sourceforge.net/
For this you'll find sources and some binaries at:
http://docpp.sourceforge.net/download.html
although just RPM's are available for Linux.

The syntax for these tools is not exactly the one you suggested, but
comes quite close, and definitely isn't web-like.
HTH.

________________________________________
____________________________________

Danilo Coccia email: daniloco 'at' acm 'dot' org
Via Cherubini 1 daniloco 'at' mclink 'dot'
it 20090 Buccinasco Phone: +39-0245712469
Italy
________________________________________
____________________________________


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com