home *** CD-ROM | disk | FTP | other *** search
- From: greyham@research.canon.oz.au (Graham Stoney)
- Newsgroups: comp.sources.misc
- Subject: v43i124: c2man-2.0 - automatic C documentation generator, Patch31
- Date: 24 Jul 1994 19:10:52 -0500
- Organization: Canon Information Systems Research Australia
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <30uvuc$dhu@sparky.sterling.com>
- Summary: This is an official patch for c2man 2.0. Please apply it.
- X-Md4-Signature: 423fc91208f0975bceecc40cc214c71c
-
- Submitted-by: greyham@research.canon.oz.au (Graham Stoney)
- Posting-number: Volume 43, Issue 124
- Archive-name: c2man-2.0/patch31
- Environment: UNIX, DOS, OS/2, lex, yacc
- Patch-To: c2man-2.0: Volume 42, Issue 55-63
-
- System: c2man version 2.0
- Patch #: 31
- Priority: MEDIUM
- Subject: Work around HP-UX 9.01 compiler stupidity.
- Subject: Handle ~ expansion correctly in Makefile.
- Subject: Update the Free Compilers Catalog entry a bit.
- Subject: Mention NeXT's stupidity re: breaking cc -E -C in INSTALL.
- Subject: Only break lines starting with '-' or '*'.
- Subject: Upgrade Configure with metaconfig 3.0 PL31.
- Subject: Fix NeXT cpp_opts bodge introduced by the VMS port.
- Subject: Note that NeXTstep 3.2's -lposix is broken.
- Subject: Generate the manual page at build time, rather than install time.
- Subject: Rename c2man.1 to c2man.man.
- Date: Wed Jun 22 13:10:50 EST 1994
- From: Graham Stoney <greyham@research.canon.oz.au>
-
- Description:
- Work around HP-UX 9.01 compiler stupidity.
- This little piggy won't do implicit comparisons against NULL when a
- pointer is used in an arithmetic context.
-
- Handle ~ expansion correctly in Makefile.
- If the install directory was specified using ~, it didn't fly.
-
- Only break lines starting with '-' or '*'.
- There is minimal support for bulleted lists:
- - They look like this.
- - Previously, the bullet could be any non-alphabetic character.
- That caused trouble because any numeric character that happened to fall
- at the start of a line would be treated as a new list entry, and cause
- a line break. It happened to me more than
- 1 time, and as you can see, it looks silly; so now I've changed it.
-
- Upgrade Configure with metaconfig 3.0 PL31.
- The main change here is backing off the behaviour that tried to link in
- every library under the sun.
-
- Fix NeXT cpp_opts bodge introduced by the VMS port.
- It was passing an uninitialised pointer to strappend.
-
- Note that NeXTstep 3.2's -lposix is broken.
- If you link with -lposix on NeXTstep 3.2, you'll get this reassuring
- message: Floating exception (core dumped). Thanks again, NeXT.
- To make matters worse, at patchlevel 30, Configure asked for -lposix by
- default, and it may still be in your config.sh file. If you're on a
- NeXTstep 3.2 system, you won't want to use your old config.sh file.
-
- Generate the manual page at build time, rather than install time.
- Marty Leisner has been hassling me for ages to do this, so I've
- collapsed and done it.
-
-
- Fix: From rn, say "| patch -p -N -d DIR", where DIR is your c2man source
- directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
- If you don't have the patch program, apply the following by hand,
- or get patch (version 2.0, latest patchlevel).
-
- After patching:
- *** NOTE: YOU MUST AT LEAST RUN Configure AFTER APPLYING ***
- *** THIS PATCH BEFORE APPLYING ANY SUBSEQUENT PATCHES. ***
-
- Configure -ders
- make depend
- make
- make test
- make install
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already
- have been applied. See the patchlevel.h file to find out what has or
- has not been applied. In any event, don't continue with the patch.
-
- If you are missing previous patches they can be obtained from me:
-
- Graham Stoney <greyham@research.canon.oz.au>
-
- If you send a mail message of the following form it will greatly speed
- processing:
-
- Subject: Command
- @SH mailpatch PATH c2man 2.0 LIST
- ^ note the c
-
- where PATH is a return path FROM ME TO YOU either in Internet notation,
- or in bang notation from some well-known host, and LIST is the number
- of one or more patches you need, separated by spaces, commas, and/or
- hyphens. Saying 35- says everything from 35 to the end.
-
- To get some more detailed instructions, send me the following mail:
-
- Subject: Command
- @SH mailhelp PATH
-
-
- Index: patchlevel.h
- Prereq: 30
- 2c2
- < #define PATCHLEVEL 30
- ---
- > #define PATCHLEVEL 31
-
- Index: Configure
- Prereq: 2.0.1.34
- *** Configure.old 1994/05/19 01:46:43
- --- Configure 1994/06/22 03:03:57
- ***************
- *** 18,26 ****
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 2.0.1.34 1994/05/19 01:46:43 greyham Exp $
- #
- ! # Generated on Thu May 19 11:21:25 EST 1994 [metaconfig 3.0 PL29]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- --- 18,26 ----
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 2.0.1.36 1994/06/22 03:03:57 greyham Exp $
- #
- ! # Generated on Wed Jun 22 13:00:10 EST 1994 [metaconfig 3.0 PL31]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- ***************
- *** 46,51 ****
- --- 46,60 ----
- (exit $?0) || exec sh $0 $argv:q
- rm -f /tmp/c1$$ /tmp/c2$$
-
- + : compute my invocation name
- + me=$0
- + case "$0" in
- + */*)
- + me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
- + test "$me" || me=$0
- + ;;
- + esac
- +
- : Sanity checks
- PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin"
- PATH=$PATH:'/usr/5bin:/etc:/usr/gnu/bin:/usr/new:/usr/new/bin:/usr/nbin'
- ***************
- *** 56,62 ****
- export PATH
-
- if test ! -t 0; then
- ! echo "Say 'sh Configure', not 'sh <Configure'"
- exit 1
- fi
-
- --- 65,71 ----
- export PATH
-
- if test ! -t 0; then
- ! echo "Say 'sh $me', not 'sh <$me'"
- exit 1
- fi
-
- ***************
- *** 73,80 ****
- else
- : Warn them if they use ksh on other systems
- (PATH=.; alias -x) >/dev/null 2>&1 && \
- ! cat <<'EOM'
- ! (I see you are using the Korn shell. Some ksh's blow up on Configure,
- especially on exotic machines. If yours does, try the Bourne shell instead.)
- EOM
- fi
- --- 82,89 ----
- else
- : Warn them if they use ksh on other systems
- (PATH=.; alias -x) >/dev/null 2>&1 && \
- ! cat <<EOM
- ! (I see you are using the Korn shell. Some ksh's blow up on $me,
- especially on exotic machines. If yours does, try the Bourne shell instead.)
- EOM
- fi
- ***************
- *** 106,111 ****
- --- 115,121 ----
- egrep=''
- emacs=''
- expr=''
- + find=''
- flex=''
- gcc=''
- grep=''
- ***************
- *** 257,262 ****
- --- 267,273 ----
- privlib=''
- privlibexp=''
- prototype=''
- + so=''
- sharpbang=''
- shsharp=''
- spitshell=''
- ***************
- *** 317,323 ****
- : produce awk script to parse command line options
- cat >options.awk <<'EOF'
- BEGIN {
- ! optstr = "deEf:hrsSV"; # getopt-style specification
-
- len = length(optstr);
- for (i = 1; i <= len; i++) {
- --- 328,334 ----
- : produce awk script to parse command line options
- cat >options.awk <<'EOF'
- BEGIN {
- ! optstr = "deEf:hrsSD:U:V"; # getopt-style specification
-
- len = length(optstr);
- for (i = 1; i <= len; i++) {
- ***************
- *** 374,379 ****
- --- 385,391 ----
- error=''
- silent=''
- extractsh=''
- + optdef='optdef.sh'
-
- : option parsing
- while test $# -gt 0; do
- ***************
- *** 386,392 ****
- if test -r "$1"; then
- config_sh="$1"
- else
- ! echo "Configure: cannot read config file $1." >&2
- error=true
- fi
- cd UU
- --- 398,404 ----
- if test -r "$1"; then
- config_sh="$1"
- else
- ! echo "$me: cannot read config file $1." >&2
- error=true
- fi
- cd UU
- ***************
- *** 396,405 ****
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -V) echo "Configure generated by metaconfig 3.0 PL29." >&2
- exit 0;;
- --) break;;
- ! -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
- *) break;;
- esac
- done
- --- 408,441 ----
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -D)
- ! shift
- ! case "$1" in
- ! *=)
- ! echo "$me: use '-U symbol=', not '-D symbol='." >&2
- ! echo "$me: ignoring -D $1" >&2
- ! ;;
- ! *=*) echo "$1" >> $optdef;;
- ! *) echo "$1='define'" >> $optdef;;
- ! esac
- ! shift
- ! ;;
- ! -U)
- ! shift
- ! case "$1" in
- ! *=) echo "$1" >> $optdef;;
- ! *=*)
- ! echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
- ! echo "$me: ignoring -U $1" >&2
- ! ;;
- ! *) echo "$1='undef'" >> $optdef;;
- ! esac
- ! shift
- ! ;;
- ! -V) echo "$me generated by metaconfig 3.0 PL31." >&2
- exit 0;;
- --) break;;
- ! -*) echo "$me: unknown option $1" >&2; shift; error=true;;
- *) break;;
- esac
- done
- ***************
- *** 407,421 ****
- case "$error" in
- true)
- cat >&2 <<EOM
- ! Usage: Configure [-dehrESV] [-f config.sh]
- -d : use defaults for all answers.
- -e : go on without questioning past the production of config.sh.
- -f : specify an alternate default configuration file.
- -h : print this help message and exit (with an error status).
- -r : reuse C symbols value if possible (skips costly nm extraction).
- -s : silent mode, only echoes questions and essential information.
- -E : stop at the end of questions, after having produced config.sh.
- -S : perform variable substitutions on all .SH files (can mix with -f)
- -V : print version number and exit (with a zero status).
- EOM
- exit 1
- --- 443,464 ----
- case "$error" in
- true)
- cat >&2 <<EOM
- ! Usage: $me [-dehrESV] [-f config.sh] [-D symbol] [-D symbol=value]
- ! [-U symbol] [-U symbol=]
- -d : use defaults for all answers.
- -e : go on without questioning past the production of config.sh.
- -f : specify an alternate default configuration file.
- -h : print this help message and exit (with an error status).
- -r : reuse C symbols value if possible (skips costly nm extraction).
- -s : silent mode, only echoes questions and essential information.
- + -D : define symbol to have some value:
- + -D symbol symbol gets the value 'define'
- + -D symbol=value symbol gets the value 'value'
- -E : stop at the end of questions, after having produced config.sh.
- -S : perform variable substitutions on all .SH files (can mix with -f)
- + -U : undefine symbol:
- + -U symbol symbol gets the value 'undef'
- + -U symbol= symbol gets completely empty
- -V : print version number and exit (with a zero status).
- EOM
- exit 1
- ***************
- *** 427,432 ****
- --- 470,480 ----
- true) exec 1>/dev/null;;
- esac
-
- + : run the defines and the undefines, if any
- + touch $optdef
- + . ./$optdef
- + rm -f $optdef
- +
- case "$extractsh" in
- true)
- case "$config_sh" in
- ***************
- *** 481,498 ****
- : general looking path for locating libraries
- glibpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
- glibpth="$glibpth /usr/lib/small /lib/small"
- ! glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
-
- : Private path used by Configure to find libraries. Its value
- : is prepended to libpth. This variable takes care of special
- : machines, like the mips. Usually, it should be empty.
- plibpth=''
-
- ! : default ordered library list
- ! libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl'
- ! libswanted="$libswanted dld sun m c_s posix cposix ndir dir ucb"
- ! libswanted="$libswanted bsd BSD PW x"
- !
- large=''
- : full support for void wanted by default
- defvoidused=15
- --- 529,543 ----
- : general looking path for locating libraries
- glibpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
- glibpth="$glibpth /usr/lib/small /lib/small"
- ! glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib /usr/shlib"
-
- : Private path used by Configure to find libraries. Its value
- : is prepended to libpth. This variable takes care of special
- : machines, like the mips. Usually, it should be empty.
- plibpth=''
-
- ! : default library list
- ! libswanted=''
- large=''
- : full support for void wanted by default
- defvoidused=15
- ***************
- *** 500,512 ****
- defvoidused=9
-
- : remove obsolete files from old patchlevels and their derivatives.
- ! rm -f ../c2man.man ../fixpre.in ../fixpre.sed ../fixpost.in ../fixpost.sed
- rm -f ../flatten_sed.SH ../fixexample.in ../fixexample.sed
- rm -f ../eg/commentafter.c ../eg/multipledecl.c
-
- : 2.0pl28 moved some files around - do it without the big patch baggage.
- mv -f ../pc/COPYING ../pc/getopt.[ch] ../pc/getopt1.c ../libc 2>/dev/null
-
- : Some greps do not return status, grrr.
- echo "grimblepritz" >grimble
- if grep blurfldyick grimble >/dev/null 2>&1 ; then
- --- 545,560 ----
- defvoidused=9
-
- : remove obsolete files from old patchlevels and their derivatives.
- ! rm -f ../fixpre.in ../fixpre.sed ../fixpost.in ../fixpost.sed
- rm -f ../flatten_sed.SH ../fixexample.in ../fixexample.sed
- rm -f ../eg/commentafter.c ../eg/multipledecl.c
-
- : 2.0pl28 moved some files around - do it without the big patch baggage.
- mv -f ../pc/COPYING ../pc/getopt.[ch] ../pc/getopt1.c ../libc 2>/dev/null
-
- + : 2.0pl31 changed the way the manual was organised
- + test -f ../c2man.man || mv -f ../c2man.1 ../c2man.man
- +
- : Some greps do not return status, grrr.
- echo "grimblepritz" >grimble
- if grep blurfldyick grimble >/dev/null 2>&1 ; then
- ***************
- *** 1047,1059 ****
- echo " "
- case "$sysman" in
- '')
- ! syspath='/usr/man/man1 /usr/man/man1 /usr/man/mann'
- ! syspath="$syspath /usr/man/manl /usr/man/local/man1"
- syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- ! syspath="$syspath /usr/man/man.L /local/man/man1"
- ! sysman=`./loc . $syspath`
- ;;
- esac
- if $test -d "$sysman"; then
- --- 1095,1106 ----
- echo " "
- case "$sysman" in
- '')
- ! syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
- syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- ! syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
- ! sysman=`./loc . /usr/man/man1 $syspath`
- ;;
- esac
- if $test -d "$sysman"; then
- ***************
- *** 1891,1896 ****
- --- 1938,1960 ----
- *) libpth="$ans";;
- esac
-
- + : compute shared library extension
- + echo " "
- + case "$so" in
- + '')
- + if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
- + dflt='sl'
- + else
- + dflt='so'
- + fi
- + ;;
- +
- + *) dflt="$so";;
- + esac
- + rp='What is the file extension used for shared libraries?'
- + . ./myread
- + so="$ans"
- +
- : Looking for optional libraries
- echo " "
- echo "Checking for optional libraries..." >&4
- ***************
- *** 1907,1969 ****
- *_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
- esac
- ! xxx=`./loc lib$thislib.a X $libpth`
- ! yyy=`./loc lib$thatlib.a X $libpth`
- ! zzz=`./loc lib$thislib.so.[0-9]'*' X $libpth`
- ! if $test -f $xxx; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*|*"-l$thatlib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- ! elif $test -f $yyy; then
- echo "Found -l$thatlib."
- case " $dflt " in
- *"-l$thatlib "*);;
- *) dflt="$dflt -l$thatlib";;
- esac
- ! elif $test -f $zzz; then
- echo "Found -l$thislib (shared only)."
- case " $dflt " in
- *"-l$thislib "*|*"-l$thatlib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- else
- ! xxx=`./loc Slib$thislib.a X $xlibpth`
- ! yyy=`./loc Slib$thatlib.a X $xlibpth`
- ! if $test -f $xxx; then
- ! echo "Found -l$thislib."
- ! case " $dflt " in
- ! *"-l$thislib "*|*"-l$thatlib "*);;
- ! *) dflt="$dflt -l$thislib";;
- ! esac
- ! elif $test -f $yyy; then
- ! echo "Found -l$thatlib."
- ! case " $dflt " in
- ! *"-l$thatlib "*);;
- ! *) dflt="$dflt -l$thatlib";;
- ! esac
- ! else
- ! xxx=`./loc lib$thislib.so X $libpth`
- ! if $test -f $xxx; then
- ! echo "Found -l$thislib (shared only)."
- ! case " $dflt " in
- ! *"-l$thislib "*|*"-l$thatlib "*);;
- ! *) dflt="$dflt -l$thislib";;
- ! esac
- ! else
- ! xxx=`./loc lib$thislib.so X $libpth`
- ! if $test -f $xxx; then
- ! echo "Found -l$thislib (shared only)."
- ! case "$dflt" in
- ! *-l$thislib*|*-l$thatlib*);;
- ! *) dflt="$dflt -l$thislib";;
- ! esac
- ! else
- ! echo "No -l$thislib."
- ! fi
- ! fi
- ! fi
- fi
- done
- set X $dflt
- --- 1971,2021 ----
- *_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
- esac
- !
- ! if xxx=`./loc lib$thislib.a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*|*"-l$thatlib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- ! elif xxx=`./loc lib$thatlib.a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thatlib."
- case " $dflt " in
- *"-l$thatlib "*);;
- *) dflt="$dflt -l$thatlib";;
- esac
- ! elif xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
- ! echo "Found -l$thislib (shared only)."
- ! case " $dflt " in
- ! *"-l$thislib "*|*"-l$thatlib "*);;
- ! *) dflt="$dflt -l$thislib";;
- ! esac
- ! elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- echo "Found -l$thislib (shared only)."
- case " $dflt " in
- *"-l$thislib "*|*"-l$thatlib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- + elif xxx=`./loc Slib$thislib.a X $xlibpth`; $test -f "$xxx"; then
- + echo "Found -l$thislib."
- + case " $dflt " in
- + *"-l$thislib "*|*"-l$thatlib "*);;
- + *) dflt="$dflt -l$thislib";;
- + esac
- + elif xxx=`./loc Slib$thatlib.a X $xlibpth`; $test -f "$xxx"; then
- + echo "Found -l$thatlib."
- + case " $dflt " in
- + *"-l$thatlib "*);;
- + *) dflt="$dflt -l$thatlib";;
- + esac
- + elif xxx=`./loc lib$thatlib.$so X $libpth`; $test -f "$xxx"; then
- + echo "Found -l$thatlib (shared only)."
- + case "$dflt" in
- + *-l$thislib*|*-l$thatlib*);;
- + *) dflt="$dflt -l$thatlib";;
- + esac
- else
- ! echo "No -l$thislib."
- fi
- done
- set X $dflt
- ***************
- *** 2068,2091 ****
- case "$thislib" in
- -l*)
- thislib=`expr X$thislib : 'X-l\(.*\)'`
- ! try=`./loc lib$thislib.a blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc lib$thislib blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc $thislib blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
- ! if test ! -f $try; then
- ! try=`./loc lib$thislib.so.'*' blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc lib$thislib.so blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=''
- ! fi
- ! fi
- ! fi
- ! fi
- ! fi
- fi
- libnames="$libnames $try"
- ;;
- --- 2120,2139 ----
- case "$thislib" in
- -l*)
- thislib=`expr X$thislib : 'X-l\(.*\)'`
- ! if try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
- ! :
- ! else
- ! try=''
- fi
- libnames="$libnames $try"
- ;;
- ***************
- *** 2097,2106 ****
- xxx=normal
- case "$libc" in
- unknown)
- ! set /usr/ccs/lib/libc.so
- ! $test -r $1 || set /usr/lib/libc.so
- ! $test -r $1 || set /usr/shlib/libc.so
- ! $test -r $1 || set /usr/lib/libc.so.[0-9]*
- $test -r $1 || set /lib/libsys_s.a
- eval set \$$#
- ;;
- --- 2145,2155 ----
- xxx=normal
- case "$libc" in
- unknown)
- ! set /usr/ccs/lib/libc.$so
- ! $test -r $1 || set /usr/lib/libc.$so
- ! $test -r $1 || set /usr/shlib/libc.$so
- ! $test -r $1 || set /usr/lib/libc.$so.[0-9]*
- ! $test -r $1 || set /lib/libc.$so
- $test -r $1 || set /lib/libsys_s.a
- eval set \$$#
- ;;
- ***************
- *** 3412,3425 ****
- '')
- echo "I can't determine whether signal handler returns void or int..." >&4
- dflt=void
- ! rp="What type does your signal handler returns?"
- . ./myread
- ! case "$ans" in
- ! void) val="$define"; signal_t="void";;
- ! *) val="$undef"; signal_t="int";;
- ! esac;;
- *) echo "As you already told me, signal handler returns $signal_t." >&4;;
- esac
- fi
- set d_voidsig
- eval $setvar
- --- 3461,3476 ----
- '')
- echo "I can't determine whether signal handler returns void or int..." >&4
- dflt=void
- ! rp="What type does your signal handler return?"
- . ./myread
- ! signal_t="$ans"
- ! ;;
- *) echo "As you already told me, signal handler returns $signal_t." >&4;;
- esac
- + case "$signal_t" in
- + void) val="$define";;
- + *) val="$undef";;
- + esac
- fi
- set d_voidsig
- eval $setvar
- ***************
- *** 4189,4196 ****
- : translate upper to lower if necessary
- case "$myhostname" in
- *[A-Z]*)
- - myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
- echo "(Normalizing case in your host name)"
- ;;
- esac
-
- --- 4240,4247 ----
- : translate upper to lower if necessary
- case "$myhostname" in
- *[A-Z]*)
- echo "(Normalizing case in your host name)"
- + myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
- ;;
- esac
-
- ***************
- *** 4227,4233 ****
- $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
- case "$dflt" in
- .) echo "(You do not have fully-qualified names in /etc/hosts)"
- ! dflt='.uucp';;
- esac
- $rm -f hosts
- ;;
- --- 4278,4304 ----
- $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
- case "$dflt" in
- .) echo "(You do not have fully-qualified names in /etc/hosts)"
- ! tans=`./loc resolv.conf X /etc /usr/etc`
- ! if $test -f "$tans"; then
- ! echo "(Attempting domain name extraction from $tans)"
- ! dflt=.`egrep '^domain' $tans | $sed 's/domain[ ]*\(.*\)/\1/' \
- ! | tr '[A-Z]' '[a-z]' 2>/dev/null`
- ! fi
- ! ;;
- ! esac
- ! case "$dflt" in
- ! .) echo "(No help from resolv.conf either -- attempting clever guess)"
- ! dflt=.`sh -c domainname 2>/dev/null`
- ! case "$dflt" in
- ! '') dflt='.';;
- ! .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
- ! esac
- ! ;;
- ! esac
- ! case "$dflt" in
- ! .) echo "(Lost all hope -- silly guess then)"
- ! dflt='.uucp'
- ! ;;
- esac
- $rm -f hosts
- ;;
- ***************
- *** 4245,4255 ****
- esac
- mydomain="$tans"
-
- : a little sanity check here
- case "$phostname" in
- '') ;;
- *)
- ! case `$phostname` in
- $myhostname$mydomain|$myhostname) ;;
- *)
- case "$phostname" in
- --- 4316,4334 ----
- esac
- mydomain="$tans"
-
- + : translate upper to lower if necessary
- + case "$mydomain" in
- + *[A-Z]*)
- + echo "(Normalizing case in your domain name)"
- + mydomain=`echo $mydomain | tr '[A-Z]' '[a-z]'`
- + ;;
- + esac
- +
- : a little sanity check here
- case "$phostname" in
- '') ;;
- *)
- ! case `$phostname | tr '[A-Z]' '[a-z]'` in
- $myhostname$mydomain|$myhostname) ;;
- *)
- case "$phostname" in
- ***************
- *** 4410,4415 ****
- --- 4489,4495 ----
- egrep='$egrep'
- emacs='$emacs'
- expr='$expr'
- + find='$find'
- flex='$flex'
- gcc='$gcc'
- grep='$grep'
- ***************
- *** 4561,4566 ****
- --- 4641,4647 ----
- privlib='$privlib'
- privlibexp='$privlibexp'
- prototype='$prototype'
- + so='$so'
- sharpbang='$sharpbang'
- shsharp='$shsharp'
- spitshell='$spitshell'
-
- Index: c2man.1
- Prereq: 2.0.1.37
- *** c2man.1.old 1994/05/12 02:21:13
- --- c2man.1 1994/06/20 06:16:36
- ***************
- *** 1,4 ****
- ! .\" $Id: c2man.1,v 2.0.1.37 1994/05/12 02:21:13 greyham Exp $
- .de EX \"Begin example
- .br
- .if \\$1 .ne \\$1
- --- 1,4 ----
- ! .\" $Id: c2man.man,v 2.0.1.38 1994/06/20 06:16:36 greyham Exp $
- .de EX \"Begin example
- .br
- .if \\$1 .ne \\$1
- ***************
- *** 52,58 ****
- .if t .sp .5
- .fi
- ..
- ! .TH C2MAN 1 "May 12, 1994"
- .BY "CISRA"
- .SH NAME
- c2man \- generate manual pages from C source code
- --- 52,58 ----
- .if t .sp .5
- .fi
- ..
- ! .TH C2MAN 1 "June 20, 1994"
- .BY "CISRA"
- .SH NAME
- c2man \- generate manual pages from C source code
- ***************
- *** 257,271 ****
- and
- .B "SEE ALSO"
- sections are omitted entirely if they aren't needed.
- - .SS "Processing of Comment Contents"
- - Basic punctuation and capitalisation corrections are made in each section for
- - neatness, and the typesetting program used to process the output will generally
- - reformat line breaks according to the width of the output device. Blank lines
- - in a comment will be preserved, and lines starting with a character that is
- - neither alphanumeric nor a single nor double quote will cause a line break,
- - allowing simple bulleted lists.
- - .PP
- - Typesetter specific commands may be included for more complex processing.
- .SS "Comment Style and Placement"
- Both
- .B C
- --- 257,262 ----
- ***************
- *** 380,385 ****
- --- 371,387 ----
- .B c2man
- will usually know which identifier a comment is associated with, unless you do
- something truly bizarre.
- + .SS "Processing of Comment Contents"
- + Basic punctuation and capitalisation corrections are made in each section for
- + neatness, and the typesetting program used to process the output will generally
- + reformat line breaks according to the width of the output device. Blank lines
- + in a comment will be preserved, and lines starting with a dash
- + .RB ( \- )
- + or an asterisk
- + .RB ( * )
- + will cause a line break, allowing simple bulleted lists.
- + .PP
- + Typesetter specific commands may be included for more complex processing.
- .SS "Grouped Manual Pages"
- Simple, closely related objects can be grouped together onto a single page with the
- .B \-g
-
- Index: catalog
- *** catalog.old 1994/05/19 01:13:58
- --- catalog 1994/06/07 01:36:03
- ***************
- *** 1,9 ****
- language: C, nroff, texinfo, latex
- package: c2man
- ! version: 2.0 patchlevel 28
- parts: documentation generator (C -> nroff -man, -> texinfo, -> latex)
- author: Graham Stoney <greyham@research.canon.oz.au>
- ! how to get: ftp from any comp.sources.misc archive, in volume42
- (the version in the comp.sources.reviewed archive is obsolete)
- ftp /pub/Unix/Util/c2man-2.0.*.tar.gz from ftp.et.tudelft.nl
- Australia: ftp /usenet/comp.sources.misc/volume42/c2man-2.0/*
- --- 1,9 ----
- language: C, nroff, texinfo, latex
- package: c2man
- ! version: 2.0 patchlevel 30
- parts: documentation generator (C -> nroff -man, -> texinfo, -> latex)
- author: Graham Stoney <greyham@research.canon.oz.au>
- ! location: ftp from any comp.sources.misc archive, in volume42
- (the version in the comp.sources.reviewed archive is obsolete)
- ftp /pub/Unix/Util/c2man-2.0.*.tar.gz from ftp.et.tudelft.nl
- Australia: ftp /usenet/comp.sources.misc/volume42/c2man-2.0/*
- ***************
- *** 34,41 ****
- ports: Unix, OS/2, MSDOS, VMS.
- portability: very high for unix, via Configure
- status: actively developed; contributions by users are encouraged.
- ! discussion: send "subscribe c2man <Your Name>" (in the message body) to
- ! listserv@research.canon.oz.au
- announcements: patches appear first in comp.sources.bugs, and then in
- comp.sources.misc.
- ! updated: 1994/05/12
- --- 34,43 ----
- ports: Unix, OS/2, MSDOS, VMS.
- portability: very high for unix, via Configure
- status: actively developed; contributions by users are encouraged.
- ! discussion: via a mailing list: send "subscribe c2man <Your Name>" (in the
- ! message body) to listserv@research.canon.oz.au
- ! help: from the author and other users on the mailing list:
- ! c2man@research.canon.oz.au
- announcements: patches appear first in comp.sources.bugs, and then in
- comp.sources.misc.
- ! updated: 1994/05/20
-
- Index: Makefile.SH
- Prereq: 2.0.1.23
- *** Makefile.SH.old 1994/02/23 07:18:41
- --- Makefile.SH 1994/06/22 03:05:44
- ***************
- *** 20,26 ****
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front. You may delete these comments.
- $spitshell >Makefile <<!GROK!THIS!
- ! # $Id: Makefile.SH,v 2.0.1.23 1994/02/23 07:18:41 greyham Exp $
- #
- # UNIX makefile for manual page generator
- # Note: any changes made here will be lost next time Configure is run!.
- --- 20,26 ----
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front. You may delete these comments.
- $spitshell >Makefile <<!GROK!THIS!
- ! # $Id: Makefile.SH,v 2.0.1.25 1994/06/22 03:05:44 greyham Exp $
- #
- # UNIX makefile for manual page generator
- # Note: any changes made here will be lost next time Configure is run!.
- ***************
- *** 37,43 ****
- MKDEP=$mkdep
-
- # where we get installed
- ! bin=$bin
- privlib=$installprivlib
-
- mansrc=$mansrc
- --- 37,43 ----
- MKDEP=$mkdep
-
- # where we get installed
- ! bin=$binexp
- privlib=$installprivlib
-
- mansrc=$mansrc
- ***************
- *** 66,76 ****
- fixexamp.sed flatten.sed
-
-
- ! all: c2man example.inc ctype_ex.inc flatten.sed
-
- install: all
- $(CP) c2man $(bin)
- ! $(SED) -f flatten.sed < c2man.1 > $(mansrc)/c2man.$(manext)
- -mkdir $(privlib)
- chmod 755 $(privlib)
- -mkdir $(privlib)/eg
- --- 66,76 ----
- fixexamp.sed flatten.sed
-
-
- ! all: c2man c2man.$(manext)
-
- install: all
- $(CP) c2man $(bin)
- ! $(CP) c2man.$(manext) $(mansrc)
- -mkdir $(privlib)
- chmod 755 $(privlib)
- -mkdir $(privlib)/eg
- ***************
- *** 86,91 ****
- --- 86,94 ----
-
- c2man: $(OBJECTS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
- +
- + c2man.$(manext): c2man.man c2man example.inc ctype_ex.inc flatten.sed
- + $(SED) -f flatten.sed < c2man.man > c2man.$(manext)
-
- .c.o:
- $(CC) $(CFLAGS) $(WARNFLAGS) -c $<
-
- Index: c2man.c
- Prereq: 2.0.1.31
- *** c2man.c.old 1994/05/19 01:16:02
- --- c2man.c 1994/06/22 02:43:20
- ***************
- *** 1,4 ****
- ! /* $Id: c2man.c,v 2.0.1.31 1994/05/19 01:16:02 greyham Exp $
- *
- * C Manual page generator.
- * Reads C source code and outputs manual pages.
- --- 1,4 ----
- ! /* $Id: c2man.c,v 2.0.1.33 1994/06/22 02:43:20 greyham Exp $
- *
- * C Manual page generator.
- * Reads C source code and outputs manual pages.
- ***************
- *** 625,634 ****
- #ifdef VMS
- cpp_opts = strconcat("-\"D__C2MAN__=", cbuf, "\"",NULLCP);
- #else
- #ifdef NeXT
- cpp_opts = strappend(cpp_opts, " -D_NEXT_SOURCE", NULLCP);
- - #else
- - cpp_opts = strconcat("-D__C2MAN__=", cbuf, NULLCP);
- #endif /* !NeXT */
- #endif /* !VMS */
-
- --- 625,633 ----
- #ifdef VMS
- cpp_opts = strconcat("-\"D__C2MAN__=", cbuf, "\"",NULLCP);
- #else
- + cpp_opts = strconcat("-D__C2MAN__=", cbuf, NULLCP);
- #ifdef NeXT
- cpp_opts = strappend(cpp_opts, " -D_NEXT_SOURCE", NULLCP);
- #endif /* !NeXT */
- #endif /* !VMS */
-
- ***************
- *** 778,784 ****
- default: usage();
- }
- s = strtok(&optarg[1], ",");
- ! if (s && ! *output->parse_option) usage();
- while(s)
- {
- if (output->parse_option(s)) usage();
- --- 777,783 ----
- default: usage();
- }
- s = strtok(&optarg[1], ",");
- ! if (s && *output->parse_option == NULL) usage();
- while(s)
- {
- if (output->parse_option(s)) usage();
-
- Index: README
- *** README.old 1994/05/19 01:12:53
- --- README 1994/06/22 02:53:20
- ***************
- *** 26,35 ****
- c2man owes a huge debt to the public domain program cproto, by Chin Huang, from
- which much of the code is derived.
-
- ! The manual page must be installed with 'make install'; it includes an
- ! automatically generated example and needs to be "flattened" when installed, so
- ! you can't just cp it into place. As a further consequence, the examples will be
- ! missing from the manual page if you try to read it before doing a make.
-
- c2man does not currently support C++, but if you think this would be worth
- while, look in the file C++autodoc for information on how I envisage C++
- --- 26,34 ----
- c2man owes a huge debt to the public domain program cproto, by Chin Huang, from
- which much of the code is derived.
-
- ! The manual page includes some automatically generated examples, which will be
- ! missing if you try to read it before doing a make. Running make will generate
- ! the complete manual page, which you can then copy around freely.
-
- c2man does not currently support C++, but if you think this would be worth
- while, look in the file C++autodoc for information on how I envisage C++
-
- Index: INSTALL
- *** INSTALL.old 1994/04/20 08:08:15
- --- INSTALL 1994/06/22 02:48:48
- ***************
- *** 42,47 ****
- --- 42,50 ----
- If you use gcc (which requires -posix) ignore the warnings about
- popen/pclose not being defined - apparently they aren't in POSIX.
-
- + NeXT: In NeXTstep 3.1 and greater, `cc -C -E' is broken; tell Configure to
- + run the preprocessor as `/lib/cpp -C' or `cc -C -E -traditional-cpp'.
- + On NeXTstep 3.2, don't link with -lposix. It's busted. Sigh.
-
- Otherwise, If you get any errors or warnings, please report them to me (with
- fixes if possible!). Don't worry too much about warnings from y.tab.c or
- ***************
- *** 65,69 ****
- during the test and in normal use.
-
- 6. As root, do "make install". This will install the c2man binary, the example
- ! files and the flattened the manual page. You should use "make install"
- ! because just manually cp'ing c2man.1 around will lose the examples.
- --- 68,71 ----
- during the test and in normal use.
-
- 6. As root, do "make install". This will install the c2man binary, the example
- ! files and the manual page.
-
- Index: MANIFEST
- *** MANIFEST.old 1994/05/20 01:21:39
- --- MANIFEST 1994/06/22 03:08:37
- ***************
- *** 4,10 ****
- C++autodoc An article describing how C++ support could be added.
- MANIFEST This list of all files in the package.
- Configure Automated installation script.
- ! c2man.1 Source for the manual pages; needs flattening.
- Makefile.SH Produces Makefile.
- catalog Free Compilers Catalog entry for c2man.
- example.h First example header file for the manual page.
- --- 4,10 ----
- C++autodoc An article describing how C++ support could be added.
- MANIFEST This list of all files in the package.
- Configure Automated installation script.
- ! c2man.man Source for the manual pages; needs flattening.
- Makefile.SH Produces Makefile.
- catalog Free Compilers Catalog entry for c2man.
- example.h First example header file for the manual page.
-
- Index: manpage.c
- Prereq: 2.0.1.43
- *** manpage.c.old 1994/05/12 02:24:51
- --- manpage.c 1994/06/20 06:17:27
- ***************
- *** 1,4 ****
- ! /* $Id: manpage.c,v 2.0.1.43 1994/05/12 02:24:51 greyham Exp $
- * stuff to do with manual page outputing
- */
-
- --- 1,4 ----
- ! /* $Id: manpage.c,v 2.0.1.44 1994/06/20 06:17:27 greyham Exp $
- * stuff to do with manual page outputing
- */
-
- ***************
- *** 181,187 ****
- }
- else if (new_line && c == '.')
- dot_command = TRUE;
- ! else if (new_line && !isalpha(c) && c != '"' && c != '\'' && c != '`')
- {
- output->break_line();
- state = CAPITALISE;
- --- 181,187 ----
- }
- else if (new_line && c == '.')
- dot_command = TRUE;
- ! else if (new_line && (c == '-' || c == '*'))
- {
- output->break_line();
- state = CAPITALISE;
-
- *** End of Patch 31 ***
- --
- Graham Stoney, Hardware/Software Engineer
- Canon Information Systems Research Australia
- Ph: + 61 2 805 2909 Fax: + 61 2 805 2929
-
- exit 0 # Just in case...
-