Thread View: alt.sources.patches
1 messages
1 total messages
Started by Graham Stoney
Mon, 31 Aug 1992 05:14
c2man: generate man pages from C comments; patch v1.5 -> v1.6
Author: Graham Stoney
Date: Mon, 31 Aug 1992 05:14
Date: Mon, 31 Aug 1992 05:14
130 lines
4719 bytes
4719 bytes
Archive-name: c2man/patch.1.5-1.6
Submitted-by: greyham@research.canon.oz.au
This official patch brings c2man v1.5 up to v1.6.
This patch fixes a very embarassing bug which dropped asterisks from pointer-
to-pointer[-to-pointer] declarations, sometimes generating incorrect (and very
misleading) manual pages.
See the CHANGES file for more details.
As before, any feedback, comments or tips are greatly appreciated.
Graham
*** 1.7 1992/08/25 06:41:02
--- CHANGES 1992/08/31 05:06:17
***************
*** 74,76 ****
--- 74,80 ----
Require a white-space after a period before capitalising the next
letter. i.e. Don't damage "i.e.".
+
+ Version 1.6:
+ Don't reduce pointer-to-pointers down to a single indirection level;
+ eg: "char **argv" got output as "char *argv". Ugh!.
*** 1.2 1992/08/25 06:41:02
--- INSTALL 1992/08/31 05:06:17
***************
*** 28,30 ****
--- 28,31 ----
5. As root, do "make install". This will copy the c2man binary to
/usr/local/bin, and flatten the manual page into /usr/local/man/man1
+ You can't just manually cp c2man.1 around, or you will lose the examples.
*** 1.6 1992/08/25 06:41:02
--- README 1992/08/31 05:06:16
***************
*** 1,4 ****
! This is c2man (Version 1.5), a program for generating Unix style manual pages
in nroff/troff -man format directly from ordinary comments embedded in C source
code. It owes a huge debt to the public domain program cproto, by Chin Huang,
from which much of the code is derived.
--- 1,4 ----
! This is c2man (Version 1.6), a program for generating Unix style manual pages
in nroff/troff -man format directly from ordinary comments embedded in C source
code. It owes a huge debt to the public domain program cproto, by Chin Huang,
from which much of the code is derived.
*** 1.5 1992/08/25 06:41:02
--- c2man.c 1992/08/31 05:06:22
***************
*** 1,10 ****
! /* $Id: c2man.c,v 1.5 1992/08/25 06:41:02 greyham Exp $
*
* C Manual page.
* Reads C source code and outputs manual pages.
*/
#ifndef lint
! static char *rcsid = "$Id: c2man.c,v 1.5 1992/08/25 06:41:02 greyham Exp $";
#endif
#include <stdio.h>
#include <ctype.h>
--- 1,10 ----
! /* $Id: c2man.c,v 1.6 1992/08/31 05:03:31 greyham Exp $
*
* C Manual page.
* Reads C source code and outputs manual pages.
*/
#ifndef lint
! static char *rcsid = "$Id: c2man.c,v 1.6 1992/08/31 05:03:31 greyham Exp $";
#endif
#include <stdio.h>
#include <ctype.h>
*** 1.4 1992/08/25 06:41:02
--- grammar.y 1992/08/31 05:06:19
***************
*** 1,6 ****
! /* $Id: grammar.y,v 1.4 1992/08/25 06:41:02 greyham Exp $
*
! * yacc grammar for C prototype generator
* This was derived from the grammar given in Appendix A of
* "The C Programming Language" by Kernighan and Ritchie.
*/
--- 1,6 ----
! /* $Id: grammar.y,v 1.6 1992/08/31 05:06:03 greyham Exp $
*
! * yacc grammar for C manual page generator
* This was derived from the grammar given in Appendix A of
* "The C Programming Language" by Kernighan and Ritchie.
*/
***************
*** 504,510 ****
}
| '*' type_qualifier_list pointer
{
! $$ = strconcat("*",$2, $3, NULL);
free($2);
free($3);
}
--- 504,510 ----
}
| '*' type_qualifier_list pointer
{
! $$ = $2 ? strconcat("*",$2, $3, NULL) : strconcat("*", $3, NULL);
free($2);
free($3);
}
***************
*** 520,526 ****
$$ = $1 ? strconcat($1," ",$2.text," ",NULL)
: strconcat($2.text," ",NULL);
free($1);
! free($2.text);
}
;
--- 520,526 ----
$$ = $1 ? strconcat($1," ",$2.text," ",NULL)
: strconcat($2.text," ",NULL);
free($1);
! free_decl_spec(&$2);
}
;
--
Graham Stoney. Ph: +61-2-805-2909. Totally unrelated message follows:
Since 1900, there are 23 known cases of innocent people being put to death in
the USA; but since the execution ends any effort to investigate possible
misscarriages of justice, the real figure is certainly much higher.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads