home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / reviewed / volume02 / cextract / part02 < prev    next >
Encoding:
Internet Message Format  |  1992-11-02  |  48.7 KB

  1. From: Adam Bryant <adb@cs.bu.edu>
  2. Subject: v02i040: cextract - (Ver. 1.7) C prototyper/header file generator, Part02/05
  3. Newsgroups: comp.sources.reviewed
  4. Approved: csr@calvin.dgbt.doc.ca
  5.  
  6. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  7. Posting-number: Volume 2, Issue 40
  8. Archive-name: cextract/part02
  9. Supersedes: cextract: Volume 1, Issue 4-8
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of archive 2 (of 5)."
  18. # Contents:  cextract.1 cextract.doc cextract.hlp cextrc.doc
  19. # Wrapped by adb@csa on Fri Oct 30 16:20:36 1992
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test -f 'cextract.1' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'cextract.1'\"
  23. else
  24. echo shar: Extracting \"'cextract.1'\" \(11153 characters\)
  25. sed "s/^X//" >'cextract.1' <<'END_OF_FILE'
  26. X.TH CEXTRACT 1 "30 October 1992"
  27. X.SH NAME
  28. Xcextract, CDOCNAME \- C prototype/documentation extractor
  29. X.SH SYNOPSIS
  30. X.B cextract
  31. X.RB [ " \-Q# " ]
  32. X.RB [ " \+AaPpNnxZ "]
  33. X.RB [ " \-o "
  34. X.IR "ofile " ]
  35. X.RB [ " \-H\fIstr\fB \-Y\fIprog\fB \-B \-b \-V \-v " ]
  36. X.RB [[ " \-options " ]
  37. X.IR filename \&.\|.\|. " " ]
  38. X.LP
  39. X.B CDOCNAME
  40. X.RB [ " \-Q# " ]
  41. X.RB [ " \+AaNnx "]
  42. X.RB [ " \-o "
  43. X.IR "outfile " ]
  44. X.RB [ " \-Y\fIprogram\fB \-B \-b \-V \-v " ]
  45. X.RB [[ " \-options " ]
  46. X.IR filename \&.\|.\|. " " ]
  47. X.SH DESCRIPTION
  48. XThe
  49. X.I cextract
  50. Xprogram is used to extract the function descriptions (aka prototypes)
  51. Xfrom a list of C source files and send them out to the standard output
  52. Xor a specified file.  It may also be used to generate basic
  53. Xdocumentation for a list of C source files.
  54. X.sp
  55. XThe specific reason this program was written was to provide a method
  56. Xof automatically generating header files, containing prototypes, for
  57. Xall of the functions used throughout a multi-file project.
  58. X.sp
  59. XAlong with the standard C preprocessing options, -D, -I, and -U, there
  60. Xare options which allow more control of what form the output will
  61. Xtake.
  62. X.sp
  63. XTo allow for conditional processing, \fIcextract\fR automatically
  64. Xpredefines the __CEXTRACT__ identifier.  Preprocessor commands, such
  65. Xas "#if", "#ifdef" and "#ifndef" may then be used to control what code
  66. Xis parsed by \fIcextract\fR.  If the \fICDOCNAME\fR command is used,
  67. Xthe program will also define __CEXTDOC__.
  68. X.sp
  69. XThe \fIcextract\fR program also supports the use of customization
  70. Xfiles.  A system configuration file will be read, and then any
  71. X"NORMRC" file in the user's home directory, and finally any "NORMRC"
  72. Xfile in the current directory.  For a description of the format of the
  73. Xcustomization file, see the \fIcextrc\fR(5) manual page.
  74. X.SH COMMAND LINE OPTIONS
  75. XThe \fIcextract\fR and \fICDOCNAME\fR programs support both long and
  76. Xshort command line options.  Also, a `+' sign before an option
  77. Xdescription means that it can be either on or off, with a `+' prefix
  78. Xenabling that option or a `-' prefix disabling it.  The prefix of
  79. X"no-" (or "no") is also supported for disabling an option.
  80. X.sp
  81. XMost command line arguments may be used anywhere on the command line,
  82. Xbut a few must be used before any file parsing begins [such as the -N,
  83. X+Z and -x options], and one can only be the first argument on the
  84. Xcommand line [the -Q flag].
  85. X.IP "+A, +sort-all"
  86. XSort the output, listing all functions in alphabetical order.  This
  87. Xoption is not compatible with the +C flag, since functions are sorted
  88. Xover the entire spectrum, not just for each file.
  89. X.IP "+a, +sort-by-files"
  90. XSort the output, listing functions alphabetically for each file.
  91. XSince this option sorts each file separately, it is compatible with
  92. Xthe +C flag, unlike the +A option.  For \fIcextract\fR, the default is
  93. Xto not do any sorting, while the \fICDOCNAME\fR default is to sort by
  94. Xfiles.
  95. X.IP "-b, -build-config"
  96. XAutomatically build a configuration file in the current directory
  97. Xbased on the current program settings.
  98. X.IP "-B, -system-build"
  99. XGenerate a system wide configuration file based on the current program
  100. Xsettings.
  101. X.IP "+C, +first-comments"
  102. XCapture the first comment encountered in each file and include it in
  103. Xthe generated output. [default off]
  104. X.IP "+c, +comments, +yank-comments"
  105. XTake the comment immediately preceding the function declaration and
  106. Xsend it as output along with the function prototype. [default on]
  107. X.IP "-D\fIexpression\fR, -define=\fIexpression\fR"
  108. XDefine a macro, as per the C "#define" preprocessor statement.
  109. X.IP "+E, +externs"
  110. XPlace the string 'extern' before each function prototype. [default on]
  111. X.IP "+F, +filename"
  112. XPrepend the name of the file to the initial comment when it
  113. Xis processed.  This flag requires the +C option. [default off]
  114. X.IP "-f%##, -font-%-##"
  115. XSpecify what fonts are to be used when generating troff documentation
  116. Xoutput.  The font name is a one or two character troff name which will
  117. Xbe interpreted later by the troff processor.  Four fonts are used: `1'
  118. Xor `t' which is used only for the title words "Function:" and "File:"
  119. X[default value of "C", Courier]; `2' or `c' which is used for comments
  120. X[default value of "CO", Courier Oblique]; `3' or `n' which is used for
  121. Xthe function name [default value of "B", Times Bold]; and `4' or `p' for
  122. Xthe parameter list [default value of "R", Times Roman].  Note that the `%'
  123. Xcharacter indicates the type being adjusted, and "##" indicates the
  124. Xone or two character font name.
  125. X.IP "-H\fIstring\fR, -header-string=\fIstring\fR"
  126. XDuring the normal extraction mode, enclose the output within the
  127. Xsequence "#ifndef \fIstring\fR", "#define \fIstring\fR", ..., "#endif
  128. X/* \fIstring\fR */".  This method is used with many system header
  129. Xfiles and prevents the header file from being parsed more than once.
  130. XIf this option is not used, the output will be enclosed within a
  131. X"#ifndef __CEXTRACT__", "#endif /* __CEXTRACT__ */" sequence instead.
  132. X.IP "-I\fIdirectory\fR, -include=\fIdirectory\fR"
  133. XAdd the indicated directory to the search path for include files
  134. Xaccessed via the "#include" preprocessor statement.  This flag is
  135. Xpassed on to the C preprocessor.
  136. X.IP "+m, +multi-comments, +multiple-comments"
  137. XIf the -c flag is set, look for a "block" of multiple comments,
  138. Xinstead of a single comment.  Comments with more than one newline in
  139. Xbetween are considered separate. [default off]
  140. X.IP "-N, -roff-mode, -troff-mode"
  141. XEnable documentation mode, sending output as -ms troff format.
  142. X.IP "-n, -doc-mode"
  143. XEnable documentation mode, sending output as normal text.  This is the
  144. Xdefault mode of the \fICDOCNAME\fR program.
  145. X.IP "-o \fIoutfile\fR, -output-file \fIoutfile\fR, -output-file=\fIoutfile\fR"
  146. XSend output to the specified file instead of the standard output.  The
  147. Xfile name need not immediately follow the `\-o' flag, but it must be
  148. Xthe first non-option argument. Warning: This will overwrite any
  149. Xexisting file of the same name.
  150. X.IP "+P, +dual-output"
  151. XIn extraction mode, generate both styles of C prototypes, separated by
  152. Xusing "#ifdef" and "#else" statements to test for __STDC__.  This
  153. Xoption must precede any file arguments. [default on]
  154. X.IP "+p, +ansi-code"
  155. XProduce output in ANSI C prototype format; otherwise, produce
  156. Xold-style declarations.  This option must precede any file arguments.
  157. X[default off]
  158. X.IP "-q\fIfile\fR, -config-file=\fIfile\fR"
  159. XRead in the specified file and parse it for customization commands.
  160. X.IP "-Q#, -read-config=#"
  161. XAn octal digit specifies which configuration files should be read;
  162. X1 for the system configuration file, 2 for the $HOME/NORMRC file and
  163. X4 for the "NORMRC" file in the current directory.  Add values to read
  164. Xmultiple files.  If no number is specified, a 0 is assumed.  This
  165. Xoption must be the very first argument on the command line.  [default
  166. Xvalue of 7 reads all three files]
  167. X.IP "+r, +remove-names, +discard-names"
  168. XStrip out the variable names when sending out the prototype lists.
  169. X.IP "+S, +show-all, +show-anyway"
  170. XIf the -p flag is off, output the prototype list anyway, but enclosed
  171. Xwithin comments. If the -P flag is set, comments and commented
  172. Xprototypes should also be duplicated within the non-ANSI portion of
  173. Xthe output. [default on]
  174. X.IP "+s, +s:none|all|only, +statics, +statics: none|all|only"
  175. XIndicate how static functions are to be treated.  If "none" is chosen,
  176. Xstatic functions will be ignored, if "only" then any non-static
  177. Xfunctions will be ignored, and "any" indicates that all functions will
  178. Xbe included.  If no selection is given, either "any" (`+' flag),  or
  179. X"none" (`-' flag) will be used.
  180. X.IP "-T#, -tab-width=#"
  181. XSpecify the tab width used during documentation output.  If no value
  182. Xis given, or a value of zero is given, tabs are passed though
  183. Xunformatted.
  184. X.IP "-U\fIname\fR, -undefine=\fIname\fR"
  185. XUndefine a macro.  If "-D\fIname\fR" was specified in a previous
  186. Xargument, it is removed from the argument list; otherwise, this option
  187. Xis passed on to the C preprocessor.
  188. X.IP "-V, -settings"
  189. XShow the current settings of the various program options.
  190. X.IP "-v, -version-info"
  191. XDisplay the version number of the program.
  192. X.IP "+W, +break-after-types, +break-types"
  193. XWhen enabled, a newline will be inserted between the function type and
  194. Xthe function name in the function declarations.
  195. X.IP "+w#, +wrap-parameters=#"
  196. XIf the length of the parameter list for a function would cause it to
  197. Xexceed a given number of columns [72 by default], a newline will be
  198. Xinserted in place of a space character, so that the function will not
  199. Xexceed that given length.  The optional number after the command will
  200. Xoverride a negation prefix if encountered.
  201. X.IP "-x, -extract-mode"
  202. XRun \fIcextract\fR or \fICDOCNAME\fR as a prototype extractor.  This is
  203. Xthe default mode for \fIcextract\fR.
  204. X.IP "-Y\fIprogram\fR -cpp-program=\fIprogram\fR"
  205. XSpecify which program to use as the C preprocessor.  This program
  206. Xshould resolve all of the C defines and preprocessor statements while,
  207. Xhopefully, leaving comments intact.
  208. X.IP "+Z, -merge-output"
  209. XCombine the ANSI and K&R C output of the \fIcextract\fR on one line,
  210. Xto create a much more compact header file.
  211. X.SH VMS
  212. XConfiguration files are also supported under VMS.  The default
  213. Xconfiguration files for VMS systems are sys$library:cext.cnf,
  214. Xsys$login:cext.cnf, and cext.cnf.
  215. X.sp
  216. XSince the VMS C compiler strips out comments, the documentation mode
  217. Xand comment options are not very useful.  Using the GNU C preprocessor
  218. Xinstead might be a possible solution.
  219. X.SH COPYRIGHT
  220. XThe code is freely distributable and there are no restrictions other
  221. Xthan the fact that it not be used for monetary gain and that copyright
  222. Xnotices must be kept intact.
  223. X.sp
  224. XBoth \fIcextract\fR and \fICDOCNAME\fR may be used to generate
  225. Xproprietary source code or documentation, but its own source code may
  226. Xnot be used as a part of any proprietary programs.
  227. X.sp
  228. XThe header files and documentation generated by \fIcextract\fR and
  229. X\fICDOCNAME\fR are not subject to this COPYRIGHT notice because they
  230. Xare derived from the source code which was read in by the program to
  231. Xcreate the output.
  232. X.SH FILES
  233. X.IP "SYSCXTRC, $HOME/NORMRC, NORMRC"
  234. XThe list of configuration files, and the order in which they are read
  235. Xin.
  236. X.SH SEE ALSO
  237. Xcc(1), cextrc(5)
  238. X.SH AUTHORS
  239. X.nf
  240. XAdam Bryant
  241. Xadb@cs.bu.edu
  242. X.sp
  243. Xinitial VMS port by John Carr
  244. Xjrcarr@iup.bitnet
  245. X.sp
  246. Xspecial thanks to comp.sources.reviewed reviewers, without whom this
  247. Xprogram would be much less useful.
  248. X.fi
  249. X.SH VMS
  250. XOn VMS systems, only the longer command line options are available,
  251. Xand the '/' character is used to specify command line options.
  252. X.SH BUGS
  253. X1) As far as I know, there is no way to tell the normal VMS C compiler
  254. Xnot to strip out comments.  This renders the comment extraction and
  255. Xdocumentation mode portions rather useless to VMS sites.  Getting the
  256. XGNU C preprocessor for such sites is recommended.
  257. X.sp
  258. X2) Cextract has problems with function pointers and structure
  259. Xdefinitions within the parameter list, using typedefs for such
  260. Xdeclarations is recommended.
  261. X.sp
  262. X3) Does not yet fully support C++ code.
  263. X.sp
  264. X4) It is dependent on the given C preprocessor, so will have any
  265. Xlimitations (such as maximum #defines) which the C preprocessor has.
  266. X.sp
  267. XIf any other bugs are detected, please notify the author.
  268. END_OF_FILE
  269. if test 11153 -ne `wc -c <'cextract.1'`; then
  270.     echo shar: \"'cextract.1'\" unpacked with wrong size!
  271. fi
  272. # end of 'cextract.1'
  273. fi
  274. if test -f 'cextract.doc' -a "${1}" != "-c" ; then 
  275.   echo shar: Will not clobber existing file \"'cextract.doc'\"
  276. else
  277. echo shar: Extracting \"'cextract.doc'\" \(13534 characters\)
  278. sed "s/^X//" >'cextract.doc' <<'END_OF_FILE'
  279. X
  280. X
  281. X
  282. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  283. X
  284. X
  285. X
  286. XNAME
  287. X     cextract, cextdoc - C prototype/documentation extractor
  288. X
  289. XSYNOPSIS
  290. X     cextract [ -Q# ] [ +AaPpNnxZ ] [ -o ofile ] [  -Hstr  -Yprog
  291. X     -B -b -V -v ] [[ -options ] filename... ]
  292. X
  293. X     cextdoc [ -Q# ] [ +AaNnx ] [ -o outfile ] [ -Yprogram -B  -b
  294. X     -V -v ] [[ -options ] filename... ]
  295. X
  296. XDESCRIPTION
  297. X     The  cextract  program  is  used  to  extract  the  function
  298. X     descriptions  (aka prototypes) from a list of C source files
  299. X     and send them out to the  standard  output  or  a  specified
  300. X     file.   It  may also be used to generate basic documentation
  301. X     for a list of C source files.
  302. X
  303. X     The specific reason this program was written was to  provide
  304. X     a  method of automatically generating header files, contain-
  305. X     ing prototypes, for all of the functions used  throughout  a
  306. X     multi-file project.
  307. X
  308. X     Along with the standard C preprocessing options, -D, -I, and
  309. X     -U,  there are options which allow more control of what form
  310. X     the output will take.
  311. X
  312. X     To allow for conditional processing, cextract  automatically
  313. X     predefines  the  __CEXTRACT__ identifier.  Preprocessor com-
  314. X     mands, such as "#if", "#ifdef" and  "#ifndef"  may  then  be
  315. X     used  to  control  what  code is parsed by cextract.  If the
  316. X     cextdoc command  is  used,  the  program  will  also  define
  317. X     __CEXTDOC__.
  318. X
  319. X     The cextract program also supports the use of  customization
  320. X     files.   A  system configuration file will be read, and then
  321. X     any ".cextrc" file in the user's home directory, and finally
  322. X     any ".cextrc" file in the current directory.  For a descrip-
  323. X     tion of the  format  of  the  customization  file,  see  the
  324. X     cextrc(5) manual page.
  325. X
  326. XCOMMAND LINE OPTIONS
  327. X     The cextract and cextdoc  programs  support  both  long  and
  328. X     short  command  line  options.   Also,  a `+' sign before an
  329. X     option description means that it can be either  on  or  off,
  330. X     with a `+' prefix enabling that option or a `-' prefix disa-
  331. X     bling it.  The prefix of "no-" (or "no") is  also  supported
  332. X     for disabling an option.
  333. X
  334. X     Most command line arguments may be used anywhere on the com-
  335. X     mand  line,  but  a few must be used before any file parsing
  336. X     begins [such as the -N, +Z and -x options], and one can only
  337. X     be the first argument on the command line [the -Q flag].
  338. X
  339. X
  340. X
  341. XSun Release 4.1   Last change: 30 October 1992                  1
  342. X
  343. X
  344. X
  345. X
  346. X
  347. X
  348. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  349. X
  350. X
  351. X
  352. X     +A, +sort-all
  353. X          Sort the output, listing all functions in  alphabetical
  354. X          order.  This option is not compatible with the +C flag,
  355. X          since functions are sorted over  the  entire  spectrum,
  356. X          not just for each file.
  357. X
  358. X     +a, +sort-by-files
  359. X          Sort the output, listing functions  alphabetically  for
  360. X          each   file.    Since   this  option  sorts  each  file
  361. X          separately, it is compatible with the +C  flag,  unlike
  362. X          the  +A option.  For cextract, the default is to not do
  363. X          any sorting, while the cextdoc default is  to  sort  by
  364. X          files.
  365. X
  366. X     -b, -build-config
  367. X          Automatically build a configuration file in the current
  368. X          directory based on the current program settings.
  369. X
  370. X     -B, -system-build
  371. X          Generate a system wide configuration file based on  the
  372. X          current program settings.
  373. X
  374. X     +C, +first-comments
  375. X          Capture the first comment encountered in each file  and
  376. X          include it in the generated output. [default off]
  377. X
  378. X     +c, +comments, +yank-comments
  379. X          Take the comment  immediately  preceding  the  function
  380. X          declaration  and send it as output along with the func-
  381. X          tion prototype. [default on]
  382. X
  383. X     -Dexpression, -define=expression
  384. X          Define a macro, as per  the  C  "#define"  preprocessor
  385. X          statement.
  386. X
  387. X     +E, +externs
  388. X          Place the string 'extern' before each  function  proto-
  389. X          type. [default on]
  390. X
  391. X     +F, +filename
  392. X          Prepend the name of the file  to  the  initial  comment
  393. X          when  it  is  processed.   This  flag  requires  the +C
  394. X          option. [default off]
  395. X
  396. X     -f%##, -font-%-##
  397. X          Specify what fonts are to be used when generating troff
  398. X          documentation  output.   The  font name is a one or two
  399. X          character troff name which will be interpreted later by
  400. X          the  troff  processor.  Four fonts are used: `1' or `t'
  401. X          which is used only for the title words "Function:"  and
  402. X          "File:"  [default  value  of  "C", Courier]; `2' or `c'
  403. X          which is used for  comments  [default  value  of  "CO",
  404. X
  405. X
  406. X
  407. XSun Release 4.1   Last change: 30 October 1992                  2
  408. X
  409. X
  410. X
  411. X
  412. X
  413. X
  414. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  415. X
  416. X
  417. X
  418. X          Courier  Oblique];  `3'  or  `n'  which is used for the
  419. X          function name [default value of "B", Times  Bold];  and
  420. X          `4'  or  `p'  for  the parameter list [default value of
  421. X          "R", Times Roman].  Note that the `%'  character  indi-
  422. X          cates  the  type being adjusted, and "##" indicates the
  423. X          one or two character font name.
  424. X
  425. X     -Hstring, -header-string=string
  426. X          During the normal extraction mode, enclose  the  output
  427. X          within the sequence "#ifndef string", "#define string",
  428. X          ..., "#endif /* string */".  This method is  used  with
  429. X          many  system  header files and prevents the header file
  430. X          from being parsed more than once.  If  this  option  is
  431. X          not used, the output will be enclosed within a "#ifndef
  432. X          __CEXTRACT__", "#endif  /*  __CEXTRACT__  */"  sequence
  433. X          instead.
  434. X
  435. X     -Idirectory, -include=directory
  436. X          Add the indicated directory  to  the  search  path  for
  437. X          include  files accessed via the "#include" preprocessor
  438. X          statement.  This flag is passed on to the C  preproces-
  439. X          sor.
  440. X
  441. X     +m, +multi-comments, +multiple-comments
  442. X          If the -c flag is set, look for a "block"  of  multiple
  443. X          comments,  instead  of a single comment.  Comments with
  444. X          more  than  one  newline  in  between  are   considered
  445. X          separate. [default off]
  446. X
  447. X     -N, -roff-mode, -troff-mode
  448. X          Enable documentation mode, sending output as -ms  troff
  449. X          format.
  450. X
  451. X     -n, -doc-mode
  452. X          Enable documentation mode,  sending  output  as  normal
  453. X          text.  This is the default mode of the cextdoc program.
  454. X
  455. X     -o outfile, -output-file outfile, -output-file=outfile
  456. X          Send output to the specified file instead of the  stan-
  457. X          dard output.  The file name need not immediately follow
  458. X          the `-o' flag, but it  must  be  the  first  non-option
  459. X          argument.  Warning:  This  will  overwrite any existing
  460. X          file of the same name.
  461. X
  462. X     +P, +dual-output
  463. X          In extraction mode, generate both styles  of  C  proto-
  464. X          types,  separated  by using "#ifdef" and "#else" state-
  465. X          ments to test for __STDC__.  This option  must  precede
  466. X          any file arguments. [default on]
  467. X
  468. X     +p, +ansi-code
  469. X          Produce output in ANSI C prototype  format;  otherwise,
  470. X
  471. X
  472. X
  473. XSun Release 4.1   Last change: 30 October 1992                  3
  474. X
  475. X
  476. X
  477. X
  478. X
  479. X
  480. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  481. X
  482. X
  483. X
  484. X          produce  old-style declarations.  This option must pre-
  485. X          cede any file arguments.  [default off]
  486. X
  487. X     -qfile, -config-file=file
  488. X          Read in the specified file and parse it for  customiza-
  489. X          tion commands.
  490. X
  491. X     -Q#, -read-config=#
  492. X          An octal  digit  specifies  which  configuration  files
  493. X          should  be read; 1 for the system configuration file, 2
  494. X          for the $HOME/.cextrc file and 4 for the ".cextrc" file
  495. X          in  the current directory.  Add values to read multiple
  496. X          files.  If no number is  specified,  a  0  is  assumed.
  497. X          This option must be the very first argument on the com-
  498. X          mand line.  [default value of 7 reads all three files]
  499. X
  500. X     +r, +remove-names, +discard-names
  501. X          Strip out the variable names when sending out the  pro-
  502. X          totype lists.
  503. X
  504. X     +S, +show-all, +show-anyway
  505. X          If the -p flag is off, output the prototype  list  any-
  506. X          way,  but  enclosed  within comments. If the -P flag is
  507. X          set, comments and commented prototypes should  also  be
  508. X          duplicated  within  the non-ANSI portion of the output.
  509. X          [default on]
  510. X
  511. X     +s, +s:none|all|only, +statics, +statics: none|all|only
  512. X          Indicate how static functions are to  be  treated.   If
  513. X          "none"  is chosen, static functions will be ignored, if
  514. X          "only" then any non-static functions will  be  ignored,
  515. X          and   "any"   indicates  that  all  functions  will  be
  516. X          included.  If no selection is given, either "any"  (`+'
  517. X          flag),  or "none" (`-' flag) will be used.
  518. X
  519. X     -T#, -tab-width=#
  520. X          Specify the tab width used during documentation output.
  521. X          If no value is given, or a value of zero is given, tabs
  522. X          are passed though unformatted.
  523. X
  524. X     -Uname, -undefine=name
  525. X          Undefine a macro.  If "-Dname" was specified in a  pre-
  526. X          vious  argument,  it is removed from the argument list;
  527. X          otherwise, this option is passed on to the C preproces-
  528. X          sor.
  529. X
  530. X     -V, -settings
  531. X          Show  the  current  settings  of  the  various  program
  532. X          options.
  533. X
  534. X     -v, -version-info
  535. X          Display the version number of the program.
  536. X
  537. X
  538. X
  539. XSun Release 4.1   Last change: 30 October 1992                  4
  540. X
  541. X
  542. X
  543. X
  544. X
  545. X
  546. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  547. X
  548. X
  549. X
  550. X     +W, +break-after-types, +break-types
  551. X          When enabled, a newline will be  inserted  between  the
  552. X          function  type  and  the  function name in the function
  553. X          declarations.
  554. X
  555. X     +w#, +wrap-parameters=#
  556. X          If the length of the  parameter  list  for  a  function
  557. X          would  cause it to exceed a given number of columns [72
  558. X          by default], a newline will be inserted in place  of  a
  559. X          space  character,  so that the function will not exceed
  560. X          that given length.  The optional number after the  com-
  561. X          mand will override a negation prefix if encountered.
  562. X
  563. X     -x, -extract-mode
  564. X          Run cextract or cextdoc as a prototype extractor.  This
  565. X          is the default mode for cextract.
  566. X
  567. X     -Yprogram -cpp-program=program
  568. X          Specify which program to use  as  the  C  preprocessor.
  569. X          This  program  should  resolve all of the C defines and
  570. X          preprocessor statements while, hopefully, leaving  com-
  571. X          ments intact.
  572. X
  573. X     +Z, -merge-output
  574. X          Combine the ANSI and K&R C output of  the  cextract  on
  575. X          one line, to create a much more compact header file.
  576. X
  577. XVMS
  578. X     Configuration files  are  also  supported  under  VMS.   The
  579. X     default    configuration   files   for   VMS   systems   are
  580. X     sys$library:cext.cnf, sys$login:cext.cnf, and cext.cnf.
  581. X
  582. X     Since the VMS C compiler strips out comments, the documenta-
  583. X     tion  mode  and  comment options are not very useful.  Using
  584. X     the GNU C preprocessor instead might be a possible solution.
  585. X
  586. XCOPYRIGHT
  587. X     The code is freely distributable and there are  no  restric-
  588. X     tions  other  than the fact that it not be used for monetary
  589. X     gain and that copyright notices must be kept intact.
  590. X
  591. X     Both  cextract  and  cextdoc  may  be   used   to   generate
  592. X     proprietary source code or documentation, but its own source
  593. X     code may not be used as a part of any proprietary programs.
  594. X
  595. X     The header files and documentation generated by cextract and
  596. X     cextdoc  are  not  subject  to this COPYRIGHT notice because
  597. X     they are derived from the source code which was read  in  by
  598. X     the program to create the output.
  599. X
  600. XFILES
  601. X     /usr/local/lib/cext.config, $HOME/.cextrc, .cextrc
  602. X
  603. X
  604. X
  605. XSun Release 4.1   Last change: 30 October 1992                  5
  606. X
  607. X
  608. X
  609. X
  610. X
  611. X
  612. XCEXTRACT(1)              USER COMMANDS                CEXTRACT(1)
  613. X
  614. X
  615. X
  616. X          The list of configuration files, and the order in which
  617. X          they are read in.
  618. X
  619. XSEE ALSO
  620. X     cc(1), cextrc(5)
  621. X
  622. XAUTHORS
  623. X     Adam Bryant
  624. X     adb@cs.bu.edu
  625. X
  626. X     initial VMS port by John Carr
  627. X     jrcarr@iup.bitnet
  628. X
  629. X     special thanks to comp.sources.reviewed reviewers, without whom this
  630. X     program would be much less useful.
  631. X
  632. XVMS
  633. X     On VMS systems, only the longer  command  line  options  are
  634. X     available,  and the '/' character is used to specify command
  635. X     line options.
  636. X
  637. XBUGS
  638. X     1) As far as I know, there is no way to tell the normal  VMS
  639. X     C compiler not to strip out comments.  This renders the com-
  640. X     ment extraction and documentation mode portions rather  use-
  641. X     less  to VMS sites.  Getting the GNU C preprocessor for such
  642. X     sites is recommended.
  643. X
  644. X     2) Cextract has problems with function pointers  and  struc-
  645. X     ture  definitions  within the parameter list, using typedefs
  646. X     for such declarations is recommended.
  647. X
  648. X     3) Does not yet fully support C++ code.
  649. X
  650. X     4) It is dependent on the given C preprocessor, so will have
  651. X     any  limitations  (such  as  maximum  #defines)  which the C
  652. X     preprocessor has.
  653. X
  654. X     If any other bugs are detected, please notify the author.
  655. X
  656. X
  657. X
  658. X
  659. X
  660. X
  661. X
  662. X
  663. X
  664. X
  665. X
  666. X
  667. X
  668. X
  669. X
  670. X
  671. XSun Release 4.1   Last change: 30 October 1992                  6
  672. X
  673. X
  674. X
  675. END_OF_FILE
  676. if test 13534 -ne `wc -c <'cextract.doc'`; then
  677.     echo shar: \"'cextract.doc'\" unpacked with wrong size!
  678. fi
  679. # end of 'cextract.doc'
  680. fi
  681. if test -f 'cextract.hlp' -a "${1}" != "-c" ; then 
  682.   echo shar: Will not clobber existing file \"'cextract.hlp'\"
  683. else
  684. echo shar: Extracting \"'cextract.hlp'\" \(11297 characters\)
  685. sed "s/^X//" >'cextract.hlp' <<'END_OF_FILE'
  686. X1 CEXTRACT
  687. X
  688. X  CEXTRACT is a program which will extract C prototypes from source
  689. X  code and then generate a header file or documentation file listing
  690. X  those functions which were encountered.
  691. X
  692. X  The extraction mode is ideal for building header files for multiple
  693. X  source projects, and the documentation mode is useful in helping
  694. X  write documentation for such projects.  [Note: due to limitations in
  695. X  the VAX compiler the comment extraction routines may not be
  696. X  available on your system.  This would cause the documentation mode
  697. X  to be mostly inoperable.]
  698. X
  699. X  Format:
  700. X
  701. X    CEXTRACT [/OPTIONS] file-name ...
  702. X
  703. X2 Parameter
  704. X
  705. X    file-name ...
  706. X
  707. X  Specify the list of files to be parsed by cextract.  Any parameter
  708. X  not beginning with a '/', '-', or a '+' is interpreted as a file
  709. X  name; the others will be parsed as command qualifiers.
  710. X
  711. X
  712. X2 Command_Qualifiers
  713. X
  714. X  Command qualifiers may be prefixed by either a '/', '-' or a '+'.
  715. X  If a '-' precedes a command qualifier, that option will be disabled,
  716. X  if appropriate, otherwise, it will be enabled.  Also, a "no" or
  717. X  "no-" may also be used to indicate negation.
  718. X
  719. X
  720. X/ANSI-CODE
  721. X
  722. X /ANSI-CODE                                     (default disabled)
  723. X /NOANSI-CODE
  724. X
  725. X If in extraction mode, with dual-output and merge-output disabled,
  726. X the output should be in ANSI C format.
  727. X
  728. X/BREAK-AFTER-TYPES
  729. X
  730. X /BREAK-TYPES                    (default disabled)
  731. X /BREAK-AFTER-TYPES
  732. X /NOBREAK-TYPES
  733. X /NOBREAK-AFTER-TYPES
  734. X
  735. X When enabled, a newline will be inserted between the function type
  736. X and the function name in the function declarations.
  737. X
  738. X/BUILD-CONFIG
  739. X
  740. X Generate a configuration file in the current directory based on the
  741. X current program settings.
  742. X
  743. X/COMMENTS
  744. X
  745. X /COMMENTS                                      (default disabled)
  746. X /NOCOMMENTS
  747. X /YANK-COMMENTS
  748. X /NOYANK-COMMENTS
  749. X
  750. X Capture the comment immediately preceding the function definition and
  751. X use it as a description of that function.
  752. X
  753. X/CONFIG-FILE
  754. X
  755. X /CONFIG-FILE=file_name
  756. X
  757. X Read in the indicated file and parse it for configuration commands.
  758. X
  759. X/CPP-PROGRAM
  760. X
  761. X /CPP-PROGRAM=program_name
  762. X
  763. X Specify which program is to be used as a C preprocessor.  This
  764. X program should resolve all C defines and preprocessor statements
  765. X while, hopefully, leaving all of the comments in place.  Note that
  766. X the default VMS C preprocessor is known to remove the comments, so
  767. X finding an alternative is recommended.
  768. X
  769. X/DOC-MODE
  770. X
  771. X /DOC-MODE                                      (default for cextdoc)
  772. X
  773. X Format the output as a normal text documentation file.
  774. X
  775. X/DEFINE
  776. X
  777. X /DEFINE=expression
  778. X
  779. X This option defines a macro by passing it on to the C preprocessor.
  780. X
  781. X/DUAL-OUTPUT
  782. X
  783. X /DUAL-OUTPUT                                   (default enabled)
  784. X /NODUAL-OUTPUT
  785. X
  786. X Generate both ANSI C and K&R C output when in extraction mode.  The
  787. X two styles will be separated using "#if __STDC__", "#else", and
  788. X "#endif" constructs.  This option may be overridden by the
  789. X merge-output option.
  790. X
  791. X/EXTERNS
  792. X
  793. X /EXTERNS                                       (default enabled)
  794. X /NOEXTERNS
  795. X
  796. X Prepend an extern to each function prototype before output.
  797. X
  798. X/EXTRACT-MODE
  799. X
  800. X /EXTRACT-MODE                                  (default mode for cextract)
  801. X
  802. X Extract the prototypes to build a header file for the functions.
  803. X
  804. X/FIRST-COMMENTS
  805. X
  806. X /FIRST-COMMENTS                                (default disabled)
  807. X /NOFIRST-COMMENTS
  808. X  
  809. X Capture the first comment encountered in each file and include it as
  810. X part of the output.
  811. X
  812. X/FILENAME
  813. X
  814. X /FILENAME                                      (default disabled)
  815. X /NOFILENAME
  816. X /PREPEND-FILENAME
  817. X /NOPREPEND-FILENAME
  818. X
  819. X If the first_comments option is enabled, prepend the name of the file
  820. X to the comment.
  821. X
  822. X/FONT
  823. X
  824. X /FONT_1_%%                                     (default="C", Courier)
  825. X /FONT_T_%%
  826. X
  827. X Specify the title font for troff-mode output.
  828. X
  829. X /FONT_2_%%                                     (default="CO", Courier Oblique)
  830. X /FONT_C_%%
  831. X
  832. X Specify the comment font for troff-mode output.
  833. X
  834. X /FONT_3_%%                                     (default="B", Times Bold)
  835. X /FONT_N_%%
  836. X
  837. X Specify the function name font for troff-mode output.
  838. X
  839. X /FONT_4_%%                                     (default="R", Times Roman)
  840. X /FONT_P_%%
  841. X
  842. X Specify the parameter list font for troff-mode output.
  843. X
  844. X/HEADER-STRING
  845. X
  846. X /HEADER-STRING=string                          (default disabled)
  847. X
  848. X Specify a string to be used as an indicator for file inclusion.  This
  849. X will cause the extraction mode output to be enclosed within the
  850. X construct:
  851. X
  852. X        #ifndef string
  853. X        #define string
  854. X
  855. X         /*... output ...*/
  856. X
  857. X        #endif /* string */
  858. X
  859. X This technique is used in many system header files to assure that the
  860. X header file is not "#included" more than once.  If not enabled, the
  861. X output will be enclosed within the construct:
  862. X
  863. X        #ifndef __CEXTRACT__
  864. X
  865. X         /*... output ...*/
  866. X
  867. X        #endif /* __CEXTRACT__ */
  868. X
  869. X/INCLUDE
  870. X
  871. X /INCLUDE=directory
  872. X
  873. X Specify a directory to be added to the include file search path.
  874. X This qualifier is passed on to the C preprocessor.
  875. X
  876. X/MERGE-OUTPUT
  877. X
  878. X /MERGE-OUTPUT                                  (default disabled)
  879. X /NOMERGE-OUTPUT
  880. X
  881. X In extraction mode, generate the prototypes enclosed within a macro
  882. X so that both the ANSI C and K&R C declarations are handled on the
  883. X same line.  This option overrides both the dual-output and ansi-code
  884. X option settings.
  885. X
  886. X/MULTIPLE-COMMENTS
  887. X
  888. X /MULTI-COMMENTS                                (default disabled)
  889. X /NOMULTI-COMMENTS
  890. X /MULTIPLE-COMMENTS
  891. X /NOMULTIPLE-COMMENTS 
  892. X
  893. X When extracting comments, assume that consecutive comments are
  894. X actually a single comment.  This allows for coding styles which make
  895. X use of "block" comments.
  896. X
  897. X/OUTPUT-FILE
  898. X
  899. X /OUTPUT-FILE=file_name                         (default=terminal)
  900. X
  901. X Specify a file to which output should be sent.  If no file name is
  902. X specified as part of the qualifier, the first non-qualifier is used
  903. X as the name of the output file.
  904. X
  905. X/READ-CONFIG
  906. X
  907. X /READ-CONFIG=#                                 (default=7)
  908. X
  909. X Specify an octal digit representing which configuration files should
  910. X or should not be read.  The system file is 1, the file in the user's
  911. X default directory is 2, and the file in the current directory is 4.
  912. X Add the numbers together to read in multiple configuration files.  If
  913. X no number is specified a zero is assumed.
  914. X
  915. X/REMOVE-NAMES
  916. X
  917. X /REMOVE-NAMES                    (default disabled)
  918. X /NOREMOVE-NAMES
  919. X /DISCARD-NAMES
  920. X /NODISCARD-NAMES
  921. X
  922. X Do not display the variable names in the prototype output.
  923. X
  924. X/ROFF-MODE
  925. X
  926. X /ROFF-MODE                                     (this mode is not a default)
  927. X /TROFF-MODE
  928. X
  929. X Generate documentation output, and use a UNIX -ms troff format.  This
  930. X will probably not prove too useful on a VMS system.
  931. X
  932. X/SETTINGS
  933. X
  934. X Show all of the configuration settings.  This is very useful for
  935. X determining if a configuration file is working properly.
  936. X
  937. X/SHOW-ALL
  938. X
  939. X /SHOW-ALL                                      (default enabled)
  940. X /NOSHOW-ALL
  941. X /SHOW-ANYWAY
  942. X /NOSHOW-ANYWAY
  943. X
  944. X If any output in K&R C is generated, that output should include the
  945. X ANSI C prototypes enclosed within comments.
  946. X
  947. X/SINGLE-COMMENTS
  948. X
  949. X /SINGLE-COMMENTS                               (default enabled)
  950. X /NOSINGLE-COMMENTS
  951. X
  952. X When extracting comments, do not search for multi-line comments.
  953. X
  954. X/SORT
  955. X
  956. X /SORT-ALL                                      (default=NOSORT)
  957. X /SORT-BY-FILES
  958. X /NOSORT
  959. X
  960. X Specify a sorting method for the functions.  Sort alphabetically
  961. X either over all of the functions, over each file, or not at all.
  962. X
  963. X/STATICS
  964. X
  965. X /STATICS                                       (default disabled)
  966. X /NOSTATICS                                     (enabled for cextdoc)
  967. X /STATICS=NONE
  968. X /STATICS=ANY
  969. X /STATICS=ONLY
  970. X
  971. X Set how static variables should be treated by the program.  By
  972. X default, they are excluded from searches, but they may also be either
  973. X included with non-statics, or searched for alone.  Using these
  974. X options you can determine whether the header file is for an entire
  975. X program or library, or just for a single file.
  976. X
  977. X/SYSTEM-BUILD
  978. X
  979. X Generate the system configuration file based on the current program
  980. X settings.
  981. X
  982. X/TAB-WIDTH
  983. X
  984. X /TAB-WIDTH=width                               (default=0)
  985. X
  986. X Specify a numeric width for the tab setting during conversion of tabs
  987. X to spaces for documentation generation.  A setting of 0 means to not
  988. X perform any conversion.
  989. X
  990. X/UNDEFINE
  991. X
  992. X /UNDEFINE=macro
  993. X
  994. X Specify a macro to undefine when calling the C preprocessor.
  995. X
  996. X/VERSION-INFO
  997. X
  998. X /VERSION-INFO
  999. X
  1000. X Display the version information for the program.
  1001. X
  1002. X/WRAP-PARAMETERS
  1003. X
  1004. X /WRAP-PARAMETERS                (default disabled)
  1005. X /NOWRAP-PARAMETERS
  1006. X
  1007. X If the length of the parameter list for a function would cause it to
  1008. X exceed a given number of columns [72 by default], a newline will be
  1009. X inserted in place of a space character, so that the function will not
  1010. X exceed that given length.  The optional number after the command will
  1011. X override a negation prefix if encountered.
  1012. X
  1013. X
  1014. X2 Customization Files
  1015. X
  1016. X  CEXTRACT has support for customization files which are read at
  1017. X  startup, before the qualifiers are checked, or whenever specified by
  1018. X  the /CONFIG-FILE qualifier.
  1019. X
  1020. X  Configuration files are checked for (on most VMS systems) in the
  1021. X  following locations:
  1022. X
  1023. X     sys$library:cext.cnf    - the system configuration file
  1024. X     sys$login:cext.cnf        - the initial directory upon login
  1025. X     cext.cnf            - the current directory
  1026. X
  1027. X  The file should be a normal text file, with each customization
  1028. X  command on a separate line.  Blank lines, and any line beginning
  1029. X  with a "#" will be ignored.  All commands should be in lowercase.
  1030. X
  1031. X  Any command preceded by the string "doc-only " will only be used
  1032. X  during the documentation mode, and any command preceded by
  1033. X  "extract-only " will only be used during the extraction mode.
  1034. X
  1035. X  Commands which are preceded by either a "!", the string "no", or
  1036. X  the string "no-" will be interpreted as disabling that option, if
  1037. X  appropriate.
  1038. X
  1039. X  The supported commands include all of the command qualifiers
  1040. X  (without the preceding '/', of course), except for the "read-config"
  1041. X  command, which is unsupported for obvious reasons.
  1042. X
  1043. X  In addition to the command qualifiers, the "replace" command is
  1044. X  supported to allow for the replacement of types, variables or
  1045. X  type-variable combinations after a "#define" has been expanded.
  1046. X
  1047. X  The format of the replace command is:
  1048. X
  1049. X     replace [type/variable/all] "string1" "string2"
  1050. X
  1051. X  As an example, the default replacement of FILE usually has the
  1052. X  format:
  1053. X
  1054. X     replace type "struct _iobuf" "FILE"
  1055. X
  1056. X  The varargs system is also replaced using this command.
  1057. X
  1058. X2 Examples
  1059. X
  1060. X  CEXTRACT FILEA.C
  1061. X
  1062. X  Extract the function prototypes in the default extraction format from
  1063. X  the C source file FILEA.C.
  1064. X
  1065. X  CEXTDOC FILEA.C FILEB.C
  1066. X
  1067. X  Extract the function prototypes in a normal documentation format from
  1068. X  the C source files FILEA.C and FILEB.C.
  1069. X
  1070. X  CEXTRACT /TROFF-MODE FILEA.C FILEB.C
  1071. X
  1072. X  Extract the function prototypes in a troff documentation format from
  1073. X  the C source files FILEA.C and FILEB.C.  Probably useless on a VMS
  1074. X  system.
  1075. X
  1076. X  CEXTRACT /SETTINGS
  1077. X
  1078. X  Find out what all of the default settings are.  This will show what
  1079. X  the normal environment is.
  1080. X
  1081. X  CEXTRACT /READ-CONFIG /DUAL-OUTPUT FILEA.C
  1082. X
  1083. X  Extract the function prototypes assuring that the configuration
  1084. X  files are not read in.  Also assure that both K&R and ANSI C output
  1085. X  will be used.
  1086. END_OF_FILE
  1087. if test 11297 -ne `wc -c <'cextract.hlp'`; then
  1088.     echo shar: \"'cextract.hlp'\" unpacked with wrong size!
  1089. fi
  1090. # end of 'cextract.hlp'
  1091. fi
  1092. if test -f 'cextrc.doc' -a "${1}" != "-c" ; then 
  1093.   echo shar: Will not clobber existing file \"'cextrc.doc'\"
  1094. else
  1095. echo shar: Extracting \"'cextrc.doc'\" \(9703 characters\)
  1096. sed "s/^X//" >'cextrc.doc' <<'END_OF_FILE'
  1097. X
  1098. X
  1099. X
  1100. XCEXTRC(5)                 FILE FORMATS                  CEXTRC(5)
  1101. X
  1102. X
  1103. X
  1104. XNAME
  1105. X     cextrc - C prototype/documentation  extractor  customization
  1106. X     file format
  1107. X
  1108. XSYNOPSIS
  1109. X     .cextrc
  1110. X
  1111. XDESCRIPTION
  1112. X     The programs cextract(1)  and  cextdoc(1)  extract  function
  1113. X     prototypes from C source code and create header and documen-
  1114. X     tation files respectively.  The .cextrc customization  files
  1115. X     allow  users to specify which options are set for those pro-
  1116. X     grams, without having to always use the command line.
  1117. X
  1118. X     The configuration files are read prior to the parsing of the
  1119. X     command  line  options, as well as whenever the `-q' flag is
  1120. X     encountered.
  1121. X
  1122. XFORMAT
  1123. X     The file should be a normal text file, with each  customiza-
  1124. X     tion  command  on a separate line.  Blank lines and any line
  1125. X     beginning with a `#' will be ignored.
  1126. X
  1127. X     Any command preceded by the string "doc-only " will only  be
  1128. X     used  in  documentation  mode,  and  any command preceded by
  1129. X     "extract-only " will only be used in extraction mode.
  1130. X
  1131. X     Commands which are preceded by either a `!'  or  the  string
  1132. X     "no-"  or "no" will be interpreted as disabling that option,
  1133. X     if appropriate.
  1134. X
  1135. XCOMMANDS
  1136. X     The full list of configuration commands is given below.
  1137. X
  1138. X     ansi-code
  1139. X          If dual-output and merge-output modes are not  enabled,
  1140. X          produce output in ANSI C format, with full prototyping.
  1141. X          This command does not do anything when used in documen-
  1142. X          tation mode.
  1143. X
  1144. X     break-after-types
  1145. X
  1146. X     break-types
  1147. X          When enabled, a newline will be  inserted  between  the
  1148. X          function  type  and  the  function name in the function
  1149. X          declarations.
  1150. X
  1151. X     comments
  1152. X
  1153. X     yank-comments
  1154. X          Extract the comment  immediately  before  the  function
  1155. X          definition, and display it upon output.
  1156. X
  1157. X
  1158. X
  1159. XSun Release 4.1   Last change: 3 September 1992                 1
  1160. X
  1161. X
  1162. X
  1163. X
  1164. X
  1165. X
  1166. XCEXTRC(5)                 FILE FORMATS                  CEXTRC(5)
  1167. X
  1168. X
  1169. X
  1170. X     config-file: file
  1171. X          Read in the specified file and parse it for  configura-
  1172. X          tion commands.
  1173. X
  1174. X     cpp-program: program
  1175. X          Specify which program is to be used as a  C  preproces-
  1176. X          sor.   This  program  should  resolve all C defines and
  1177. X          while, hopefully, leaving the comments intact.
  1178. X
  1179. X     doc-mode
  1180. X          Enable documentation  mode  with  normal  text  output.
  1181. X          This is the default setting for cextdoc(1).
  1182. X
  1183. X     define: expression
  1184. X          Pass the specified expression  to  the  C  preprocessor
  1185. X          with  a  "-D"  string prepended to it.  This command is
  1186. X          equivalent to the `-D' command line option.
  1187. X
  1188. X     dual-output
  1189. X          Provide  output  in  both  ANSI  and  K&R  C   formats,
  1190. X          separated by an "#if __STDC__" ... "#else" ... "#endif"
  1191. X          construct.  This command does not do anything when used
  1192. X          in  documentation mode or if the merge-output option is
  1193. X          enabled.
  1194. X
  1195. X     externs
  1196. X          Prepend an "extern" to each function  description  upon
  1197. X          output.
  1198. X
  1199. X     extract-mode
  1200. X          Enable extraction mode and generate output which can be
  1201. X          used as a C header file defining the prototypes for all
  1202. X          of the functions which are  encountered.   The  is  the
  1203. X          default mode for cextract(1).
  1204. X
  1205. X     first-comments
  1206. X          Include in the output the initial  comment  encountered
  1207. X          in each file.
  1208. X
  1209. X     filename
  1210. X
  1211. X     prepend-filename
  1212. X          If the "first-comments" option is enabled, prepend  the
  1213. X          name of each file to the output of initial comments.
  1214. X
  1215. X     font % ##
  1216. X          Assign a troff font "##" to a given font type `%', when
  1217. X          using  troff  documentation  mode.   The  possible font
  1218. X          types are `1' or `t', `2' or `c', `3' or `n',  and  `4'
  1219. X          or `p' for the title, comment, name, and parameter list
  1220. X          respectively.  The troff font "##" is a normal  one  or
  1221. X          two  character  troff  font,  such  as "CO" for Courier
  1222. X
  1223. X
  1224. X
  1225. XSun Release 4.1   Last change: 3 September 1992                 2
  1226. X
  1227. X
  1228. X
  1229. X
  1230. X
  1231. X
  1232. XCEXTRC(5)                 FILE FORMATS                  CEXTRC(5)
  1233. X
  1234. X
  1235. X
  1236. X          Oblique.
  1237. X
  1238. X     header-string: string
  1239. X          When in extraction  mode,  enclose  the  output  within
  1240. X          preprocessor  directives  testing for the definition of
  1241. X          string.  This method is used with  many  system  header
  1242. X          files,  to  insure  that  they are not "#include"d more
  1243. X          than once.  If this option is not used, the output will
  1244. X          be enclosed within a "#ifndef __CEXTRACT__", "#endif /*
  1245. X          __CEXTRACT__ */" sequence instead.
  1246. X
  1247. X     include: directory
  1248. X          Pass the specified directory to the C preprocessor with
  1249. X          a  "-I"  string  prepended  to  it.   This  command  is
  1250. X          equivalent to the `-I' command-line option.
  1251. X
  1252. X     merge-output
  1253. X          Merge the ANSI and K&R output into  a  single  line  of
  1254. X          output  to make it take up less space.  A macro is used
  1255. X          to expand the parameter list for ANSI compilers.   This
  1256. X          option  overrides  both  the  dual-output and ansi-code
  1257. X          options.  There is no affect if the documentation  mode
  1258. X          is enabled.
  1259. X
  1260. X     multi-comments
  1261. X
  1262. X     multiple-comments
  1263. X          When extracting comments, assume that consecutive  com-
  1264. X          ments  are  actually  one  single comment.  This allows
  1265. X          people that place comment delimiters at  the  beginning
  1266. X          and  end  of  each line to have their comments properly
  1267. X          captured.
  1268. X
  1269. X     output-file: outfile
  1270. X          Store the output in the specified file.
  1271. X
  1272. X     replace
  1273. X          Replace the first  string  which  matches  a  variable,
  1274. X          type,  or  both  (as  selected) with the second string.
  1275. X          The format is:
  1276. X               replace [all/type/variable] "string1" "string2"
  1277. X          For example, on  Sun  machines,  the  automatic  "FILE"
  1278. X          replacement could be accomplished using a command like:
  1279. X               replace type "struct _iobuf" "FILE"
  1280. X          However, this should not need  to  be  entered  by  the
  1281. X          average  user since it is handled automatically by cex-
  1282. X          tract(1), as is the varargs system.
  1283. X
  1284. X     remove-names
  1285. X
  1286. X     discard-names
  1287. X          Remove variable names from the prototype list prior  to
  1288. X
  1289. X
  1290. X
  1291. XSun Release 4.1   Last change: 3 September 1992                 3
  1292. X
  1293. X
  1294. X
  1295. X
  1296. X
  1297. X
  1298. XCEXTRC(5)                 FILE FORMATS                  CEXTRC(5)
  1299. X
  1300. X
  1301. X
  1302. X          output.
  1303. X
  1304. X     roff-mode
  1305. X
  1306. X     troff-mode
  1307. X          Enable documentation mode with troff -ms format output.
  1308. X          This  option  is overridden by the doc-mode or extract-
  1309. X          mode options.
  1310. X
  1311. X     show-all
  1312. X
  1313. X     show-anyway
  1314. X          When output is K&R C, display prototypes  in  comments.
  1315. X          When  dual-output is enabled, display comments and pro-
  1316. X          totypes in both sections; otherwise,  display  comments
  1317. X          and prototypes only in the ANSI C portion.  This option
  1318. X          does nothing in documentation mode.
  1319. X
  1320. X     single-comments
  1321. X          When extracting comments from a  file,  take  only  one
  1322. X          comment,   discarding  all  preceding  comments.   This
  1323. X          option is the reverse of the multi-comments option.
  1324. X
  1325. X     sort-all
  1326. X          Alphabetically sort all of the functions  from  all  of
  1327. X          the files before generating output.
  1328. X
  1329. X     sort-by-files
  1330. X          For each file processed,  sort  all  of  the  functions
  1331. X          prior to output.
  1332. X
  1333. X     statics
  1334. X
  1335. X     statics: none
  1336. X
  1337. X     statics: any
  1338. X
  1339. X     statics: only
  1340. X          Select the method for how static  functions  should  be
  1341. X          treated.   If  "none"  is  selected,  statics  will  be
  1342. X          ignored.  If "only" is selected,  non-static  functions
  1343. X          will  be  ignored.   Finally,  "any" indicates that all
  1344. X          functions will be extracted.  If no selection is  made,
  1345. X          it  will  be  the  same  as  selecting "any" or (with a
  1346. X          preceding `!') "none".
  1347. X
  1348. X     tab-width: width
  1349. X          Set the tab width to be an integer number width.   This
  1350. X          works only during documentation generation.
  1351. X
  1352. X     undefine: name
  1353. X          Undefine any previously  defined  macro.   If  none  is
  1354. X
  1355. X
  1356. X
  1357. XSun Release 4.1   Last change: 3 September 1992                 4
  1358. X
  1359. X
  1360. X
  1361. X
  1362. X
  1363. X
  1364. XCEXTRC(5)                 FILE FORMATS                  CEXTRC(5)
  1365. X
  1366. X
  1367. X
  1368. X          encountered,  pass  the  specified  expression to the C
  1369. X          preprocessor with a "-U" string prepended to it.   This
  1370. X          command is equivalent to the `-U' command-line option.
  1371. X
  1372. X     wrap-parameters: #
  1373. X          If the length of the  parameter  list  for  a  function
  1374. X          would  cause it to exceed a given number of columns [72
  1375. X          by default], a newline will be inserted in place  of  a
  1376. X          space  character,  so that the function will not exceed
  1377. X          that given length.  The optional number after the  com-
  1378. X          mand will override a negation prefix if encountered.
  1379. X
  1380. XFILES
  1381. X     /usr/local/lib/cext.config, $HOME/.cextrc, .cextrc
  1382. X          configuration files.
  1383. X
  1384. XVMS
  1385. X     Configuration files  are  also  supported  under  VMS.   The
  1386. X     default    configuration   files   for   VMS   systems   are
  1387. X     sys$library:cext.cnf, sys$login:cext.cnf, and cext.cnf.
  1388. X
  1389. X     Since the VMS C compiler strips out comments, the documenta-
  1390. X     tion  mode  and  comment options are not very useful.  Using
  1391. X     the GNU C preprocessor instead might be a possible solution.
  1392. X
  1393. XSEE ALSO
  1394. X     cextract(1), cextdoc(1)
  1395. X
  1396. XAUTHOR
  1397. X     Adam Bryant
  1398. X     adb@bu.edu
  1399. X
  1400. X     initial VMS port by John Carr
  1401. X     jrcarr@iup.bitnet
  1402. X
  1403. X
  1404. X
  1405. X
  1406. X
  1407. X
  1408. X
  1409. X
  1410. X
  1411. X
  1412. X
  1413. X
  1414. X
  1415. X
  1416. X
  1417. X
  1418. X
  1419. X
  1420. X
  1421. X
  1422. X
  1423. XSun Release 4.1   Last change: 3 September 1992                 5
  1424. X
  1425. X
  1426. X
  1427. END_OF_FILE
  1428. if test 9703 -ne `wc -c <'cextrc.doc'`; then
  1429.     echo shar: \"'cextrc.doc'\" unpacked with wrong size!
  1430. fi
  1431. # end of 'cextrc.doc'
  1432. fi
  1433. echo shar: End of archive 2 \(of 5\).
  1434. cp /dev/null ark2isdone
  1435. MISSING=""
  1436. for I in 1 2 3 4 5 ; do
  1437.     if test ! -f ark${I}isdone ; then
  1438.     MISSING="${MISSING} ${I}"
  1439.     fi
  1440. done
  1441. if test "${MISSING}" = "" ; then
  1442.     echo You have unpacked all 5 archives.
  1443.     rm -f ark[1-9]isdone
  1444. else
  1445.     echo You still need to unpack the following archives:
  1446.     echo "        " ${MISSING}
  1447. fi
  1448. ##  End of shell archive.
  1449. exit 0
  1450.  
  1451. exit 0 # Just in case...
  1452.