home *** CD-ROM | disk | FTP | other *** search
- From: greyham@research.canon.oz.au (Graham Stoney)
- Newsgroups: comp.sources.misc
- Subject: v43i021: c2man-2.0 - automatic C documentation generator, Patch28
- Date: 9 Jun 1994 11:49:14 -0500
- Organization: Canon Information Systems Research Australia
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <2t7h6a$34n@sparky.sterling.com>
- Summary: This is an official patch for c2man 2.0. Please apply it.
- X-Md4-Signature: 737d58e08651d1cd9c5bceca16cd1191
-
- Submitted-by: greyham@research.canon.oz.au (Graham Stoney)
- Posting-number: Volume 43, Issue 21
- Archive-name: c2man-2.0/patch28
- Environment: UNIX, DOS, OS/2, lex, yacc
- Patch-To: c2man-2.0: Volume 42, Issue 55-63
-
- [ Please note that this package was initially posted at patchlevel 27 ]
- [ and as such, patches are being numbered from that point. -Kent+ ]
-
- System: c2man version 2.0
- Patch #: 28
- Priority: LOW
- Subject: Limit enum descriptions to 20 values.
- Subject: Use .RE in fixexamp.in; from Diab Jerius.
- Subject: Add texinfo-specific options, from Diab Jerius.
- Subject: Update the pc Makefile.
- Subject: Add pc/updmake, used to regenerate pc/Makefile.pc.
- Subject: Add a libc directory for common routines (getopt et al).
- Subject: Update Configure with metaconfig 3.0 PL29.
- Subject: Change PC installation instructions with new libc dir.
- Subject: Add libc/alloca.c, principally for the VMS port.
- Subject: Add VMS port, from Rick Flower.
- Date: Fri May 20 11:24:56 EST 1994
- From: Graham Stoney <greyham@research.canon.oz.au>
-
- Description:
- Limit enum descriptions to 20 values.
- enums can sometimes have large numbers of values; particularly for
- uses similar to the traditional errno, or in cases where part of the
- source is automatically generated. This becomes a pain in the manual
- pages if there is a huge list, so the list is now omitted if the are
- more than 20 possible values.
-
- Use .RE in fixexamp.in; from Diab Jerius.
- Diab reported that the multiple use of .RS caused a problem if .RE was
- used later on; the fix doesn't seem to hurt, so I dropped it in.
-
- Add texinfo-specific options, from Diab Jerius.
- This is a pretty major contribution, documented in the manual page.
-
- Update the pc Makefile; it was somewhat out of date.
-
- Add pc/updmake, used to regenerate pc/Makefile.pc.
- This is the script I use to regenerate pc/Makefile.pc automatically in
- the distribution; I've decided to include it in case anyone ever needs
- to do work on the pc port for any reason.
-
- Add a libc directory for common routines (getopt et al).
- This is a place for generic routines required by various ports; the
- Configure script will move the getopt sources from the pc subdirectory
- to this new libc subdirectory, which is why it must be run after
- applying patch 30.
-
- Update Configure with metaconfig 3.0 PL29.
- More finely handcrafted changes, courtesy Raphael Manfredi & team.
-
- Add VMS port, from Rick Flower.
-
-
- 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:
- *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #30 FIRST ***
- *** NOTE: YOU MUST RUN Configure AFTER APPLYING PATCH 30 ***
-
- 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: 27
- 2c2
- < #define PATCHLEVEL 27
- ---
- > #define PATCHLEVEL 28
-
- Index: Configure
- Prereq: 2.0.1.31
- *** Configure.old 1994/02/23 07:08:43
- --- Configure 1994/05/19 01:46:43
- ***************
- *** 18,26 ****
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 2.0.1.31 1994/02/23 07:08:43 greyham Exp $
- #
- ! # Generated on Wed Feb 23 17:43:56 EST 1994 [metaconfig 3.0 PL22]
-
- 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.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!!!!!
- ***************
- *** 91,96 ****
- --- 91,97 ----
- awk=''
- bash=''
- bison=''
- + byacc=''
- cat=''
- chgrp=''
- chmod=''
- ***************
- *** 171,176 ****
- --- 172,178 ----
- binexp=''
- installbin=''
- cc=''
- + gccversion=''
- ccflags=''
- cppflags=''
- ldflags=''
- ***************
- *** 207,213 ****
- h_fcntl=''
- h_sysfile=''
- i_fcntl=''
- - i_stdarg=''
- i_stddef=''
- i_stdlib=''
- i_string=''
- --- 209,214 ----
- ***************
- *** 219,229 ****
- --- 220,232 ----
- i_time=''
- timeincl=''
- i_unistd=''
- + i_stdarg=''
- i_varargs=''
- i_varhdr=''
- lex=''
- libc=''
- liblex=''
- + glibpth=''
- libpth=''
- plibpth=''
- xlibpth=''
- ***************
- *** 393,399 ****
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -V) echo "Configure generated by metaconfig 3.0 PL22." >&2
- exit 0;;
- --) break;;
- -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
- --- 396,402 ----
- -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;;
- ***************
- *** 467,472 ****
- --- 470,476 ----
- eunicefix=/etc/unixtovms.exe
- fi
-
- + gccversion='1'
- : no include file wanted by default
- inclwanted=''
-
- ***************
- *** 475,485 ****
- xlibpth='/usr/lib/386 /lib/386'
-
- : general looking path for locating libraries
- ! libpth='/usr/lib/large /lib '$xlibpth' /lib/large'
- ! libpth=$libpth' /usr/lib/small /lib/small'
-
- ! : no additional library wanted by default
- ! libswanted=''
-
- large=''
- : full support for void wanted by default
- --- 479,497 ----
- xlibpth='/usr/lib/386 /lib/386'
-
- : 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
- ***************
- *** 491,496 ****
- --- 503,512 ----
- 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
- ***************
- *** 868,873 ****
- --- 884,890 ----
- trylist="
- Mcc
- bison
- + byacc
- cpp
- date
- flex
- ***************
- *** 1020,1026 ****
-
- : who configured the system
- cf_time=`$date 2>&1`
- ! cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
-
- : determine where manual pages are on this system
- echo " "
- --- 1037,1047 ----
-
- : who configured the system
- cf_time=`$date 2>&1`
- ! (logname > .temp) >/dev/null 2>&1
- ! $test -s .temp || (whoami > .temp) >/dev/null 2>&1
- ! $test -s .temp || echo unknown > .temp
- ! cf_by=`$cat .temp`
- ! $rm -f .temp
-
- : determine where manual pages are on this system
- echo " "
- ***************
- *** 1164,1170 ****
- cc="$ans"
- fi
- case "$cc" in
- ! gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
- esac
-
- : decide how portable to be
- --- 1185,1227 ----
- cc="$ans"
- fi
- case "$cc" in
- ! gcc*)
- ! echo "Checking out which version of gcc you have..." >&4
- ! $cat >gccvers.c <<EOM
- ! #include <stdio.h>
- ! int main()
- ! {
- ! char *v;
- ! v = "unknown";
- ! #ifdef __GNUC__
- ! #ifdef __VERSION__
- ! v = __VERSION__;
- ! #endif
- ! #endif
- ! switch((int) v[0]) {
- ! case '1': printf("1\n"); break;
- ! case '2': printf("2\n"); break;
- ! case '3': printf("3\n"); break;
- ! default: break;
- ! }
- ! #ifdef __GNUC__
- ! return 0;
- ! #else
- ! return 1;
- ! #endif
- ! }
- ! EOM
- ! if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
- ! gccversion=`./gccvers`
- ! echo "You appear to have version $gccversion."
- ! else
- ! echo "Doesn't appear to be GNU cc after all."
- ! fi
- ! $rm -f gccvers*
- ! if $test "$gccversion" = '1'; then
- ! cpp=`./loc gcc-cpp $cpp $pth`
- ! fi
- ! ;;
- esac
-
- : decide how portable to be
- ***************
- *** 1206,1212 ****
- ~*)
- if $test -f /bin/csh; then
- /bin/csh -f -c "glob \$1"
- ! failed=$?
- echo ""
- exit \$failed
- else
- --- 1263,1269 ----
- ~*)
- if $test -f /bin/csh; then
- /bin/csh -f -c "glob \$1"
- ! failed=\$?
- echo ""
- exit \$failed
- else
- ***************
- *** 1243,1252 ****
- --- 1300,1317 ----
- skip=''
- none_ok=''
- exp_file=''
- + nopath_ok=''
- orig_rp="$rp"
- orig_dflt="$dflt"
-
- case "$fn" in
- + *:*)
- + loc_file=`expr $fn : '.*:\(.*\)'`
- + fn=`expr $fn : '\(.*\):.*'`
- + ;;
- + esac
- +
- + case "$fn" in
- *~*) tilde=true;;
- esac
- case "$fn" in
- ***************
- *** 1261,1271 ****
- case "$fn" in
- *e*) exp_file=true;;
- esac
-
- case "$fn" in
- *f*) type='File';;
- *d*) type='Directory';;
- ! *l*) type='Locate'; fn=`expr $fn : '.*:\(.*\)'`;;
- esac
-
- what="$type"
- --- 1326,1339 ----
- case "$fn" in
- *e*) exp_file=true;;
- esac
- + case "$fn" in
- + *p*) nopath_ok=true;;
- + esac
-
- case "$fn" in
- *f*) type='File';;
- *d*) type='Directory';;
- ! *l*) type='Locate';;
- esac
-
- what="$type"
- ***************
- *** 1362,1373 ****
- ;;
- Locate)
- if test -d "$value"; then
- ! echo "(Looking for $fn in directory $value.)"
- ! value="$value/$fn"
- fi
- if test -f "$value"; then
- type=''
- fi
- ;;
- esac
-
- --- 1430,1450 ----
- ;;
- Locate)
- if test -d "$value"; then
- ! echo "(Looking for $loc_file in directory $value.)"
- ! value="$value/$loc_file"
- fi
- if test -f "$value"; then
- type=''
- fi
- + case "$nopath_ok" in
- + true) case "$value" in
- + */*) ;;
- + *) echo "Assuming $value will be in people's path."
- + type=''
- + ;;
- + esac
- + ;;
- + esac
- ;;
- esac
-
- ***************
- *** 1406,1415 ****
- : What should the include directory be ?
- echo " "
- $echo $n "Hmm... $c"
- ! case "$usrinc" in
- ! '') dflt='/usr/include';;
- ! *) dflt=$usrinc;;
- ! esac
- incpath=''
- mips_type=''
- if $test -f /bin/mips && /bin/mips; then
- --- 1483,1489 ----
- : What should the include directory be ?
- echo " "
- $echo $n "Hmm... $c"
- ! dflt='/usr/include'
- incpath=''
- mips_type=''
- if $test -f /bin/mips && /bin/mips; then
- ***************
- *** 1435,1449 ****
- $eunicefix mips
- fi
- echo " "
- fn=d/
- rp='Where are the include files you want to use?'
- . ./getfile
- usrinc="$ans"
-
- : determine optimize, if desired, or use for debug flag also
- case "$optimize" in
- ! ' ') dflt="none";;
- ! '') dflt="-O";;
- *) dflt="$optimize";;
- esac
- $cat <<EOH
- --- 1509,1665 ----
- $eunicefix mips
- fi
- echo " "
- + case "$usrinc" in
- + '') ;;
- + *) dflt="$usrinc";;
- + esac
- fn=d/
- rp='Where are the include files you want to use?'
- . ./getfile
- usrinc="$ans"
-
- + : see how we invoke the C preprocessor
- + echo " "
- + echo "Now, how can we feed standard input to your C preprocessor..." >&4
- + cat <<'EOT' >testcpp.c
- + #define ABC abc
- + #define XYZ xyz
- + ABC.XYZ
- + EOT
- + cd ..
- + echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- + chmod 755 cppstdin
- + wrapper=`pwd`/cppstdin
- + ok='false'
- + cd UU
- +
- + if $test "X$cppstdin" != "X" && \
- + $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "You used to use $cppstdin $cppminus so we'll use that again."
- + case "$cpprun" in
- + '') echo "But let's see if we can live without a wrapper..." ;;
- + *)
- + if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- + ok='true'
- + else
- + echo "(However, $cpprun $cpplast does not work, let's see...)"
- + fi
- + ;;
- + esac
- + else
- + case "$cppstdin" in
- + '') ;;
- + *)
- + echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- + ;;
- + esac
- + fi
- +
- + if $ok; then
- + : nothing
- + elif echo 'Maybe "'"$cc"' -E" will work...'; \
- + $cc -E <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yup, it does."
- + x_cpp="$cc -E"
- + x_minus='';
- + elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- + $cc -E - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yup, it does."
- + x_cpp="$cc -E"
- + x_minus='-';
- + elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- + $cc -P <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yipee, that works!"
- + x_cpp="$cc -P"
- + x_minus='';
- + elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- + $cc -P - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "At long last!"
- + x_cpp="$cc -P"
- + x_minus='-';
- + elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- + $cpp <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "It works!"
- + x_cpp="$cpp"
- + x_minus='';
- + elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- + $cpp - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Hooray, it works! I was beginning to wonder."
- + x_cpp="$cpp"
- + x_minus='-';
- + elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- + $wrapper <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + x_cpp="$wrapper"
- + x_minus=''
- + echo "Eureka!"
- + else
- + dflt=''
- + rp="No dice. I can't find a C preprocessor. Name one:"
- + . ./myread
- + x_cpp="$ans"
- + x_minus=''
- + $x_cpp <testcpp.c >testcpp.out 2>&1
- + if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "OK, that will do." >&4
- + else
- + echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
- + exit 1
- + fi
- + fi
- +
- + case "$ok" in
- + false)
- + cppstdin="$x_cpp"
- + cppminus="$x_minus"
- + cpprun="$x_cpp"
- + cpplast="$x_minus"
- + set X $x_cpp
- + shift
- + case "$1" in
- + "$cpp")
- + echo "Perhaps can we force $cc -E using a wrapper..."
- + if $wrapper <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "Yup, we can."
- + cppstdin="$wrapper"
- + cppminus='';
- + else
- + echo "Nope, we'll have to live without it..."
- + fi
- + ;;
- + esac
- + case "$cpprun" in
- + "$wrapper")
- + cpprun=''
- + cpplast=''
- + ;;
- + esac
- + ;;
- + esac
- +
- + case "$cppstdin" in
- + "$wrapper") ;;
- + *) $rm -f $wrapper;;
- + esac
- + $rm -f testcpp.c testcpp.out
- +
- : determine optimize, if desired, or use for debug flag also
- case "$optimize" in
- ! ' ') dflt='none';;
- ! '') dflt='-O';;
- *) dflt="$optimize";;
- esac
- $cat <<EOH
- ***************
- *** 1462,1471 ****
- 'none') optimize=" ";;
- esac
-
- case "$ccflags" in
- '') case "$cc" in
- ! *gcc*) dflt='-fpcc-struct-return';;
- ! *) dflt='';;
- esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUG";;
- --- 1678,1691 ----
- 'none') optimize=" ";;
- esac
-
- + dflt=''
- case "$ccflags" in
- '') case "$cc" in
- ! *gcc*)
- ! if $test "$gccversion" = '1'; then
- ! dflt='-fpcc-struct-return'
- ! fi
- ! ;;
- esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUG";;
- ***************
- *** 1479,1485 ****
- ;;
- esac
- ;;
- - *) dflt="$ccflags" ;;
- esac
-
- case "$mips_type" in
- --- 1699,1704 ----
- ***************
- *** 1523,1528 ****
- --- 1742,1751 ----
- case "$dflt" in
- '') dflt=none;;
- esac
- + case "$ccflags" in
- + '') ;;
- + *) dflt="$ccflags";;
- + esac
- $cat <<EOH
-
- Your C compiler may want other flags. For this question you should include
- ***************
- *** 1545,1551 ****
- : the following weeds options from ccflags that are of no interest to cpp
- cppflags="$ccflags"
- case "$cc" in
- ! *gcc*) cppflags="$cppflags -D__GNUC__";;
- esac
- case "$mips_type" in
- '');;
- --- 1768,1778 ----
- : the following weeds options from ccflags that are of no interest to cpp
- cppflags="$ccflags"
- case "$cc" in
- ! *gcc*)
- ! if $test "$gccversion" = "1"; then
- ! cppflags="$cppflags -D__GNUC__"
- ! fi
- ! ;;
- esac
- case "$mips_type" in
- '');;
- ***************
- *** 1553,1569 ****
- esac
- case "$cppflags" in
- '');;
- ! *) set X $cppflags
- cppflags=''
- ! for flag
- do
- ! case $flag in
- ! -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
- esac
- done
- case "$cppflags" in
- ! *-*) echo "(C preprocessor flags: $cppflags)";;
- esac
- ;;
- esac
-
- --- 1780,1823 ----
- esac
- case "$cppflags" in
- '');;
- ! *)
- ! echo " "
- ! echo "Let me guess what the preprocessor flags are..." >&4
- ! set X $cppflags
- ! shift
- cppflags=''
- ! $cat >cpp.c <<'EOM'
- ! #define BLURFL foo
- !
- ! BLURFL xx LFRULB
- ! EOM
- ! previous=''
- ! for flag in $*
- do
- ! case "$flag" in
- ! -*) ftry="$flag";;
- ! *) ftry="$previous $flag";;
- esac
- + if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
- + >cpp1.out 2>/dev/null && \
- + $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
- + >cpp2.out 2>/dev/null && \
- + $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
- + $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
- + then
- + cppflags="$cppflags $ftry"
- + previous=''
- + else
- + previous="$flag"
- + fi
- done
- + set X $cppflags
- + shift
- + cppflags=${1+"$@"}
- case "$cppflags" in
- ! *-*) echo "They appear to be: $cppflags";;
- esac
- + $rm -f cpp.c cpp?.out
- ;;
- esac
-
- ***************
- *** 1596,1606 ****
- case "$plibpth" in
- '') if mips; then
- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
- - else
- - plibpth="/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib"
- fi;;
- esac
- ! libpth="$plibpth $libpth"
-
- : Looking for optional libraries
- echo " "
- --- 1850,1895 ----
- case "$plibpth" in
- '') if mips; then
- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
- fi;;
- esac
- ! case "$libpth" in
- ! ' ') dlist='';;
- ! '') dlist="$plibpth $glibpth";;
- ! *) dlist="$libpth";;
- ! esac
- !
- ! : Now check and see which directories actually exist, avoiding duplicates
- ! libpth=''
- ! for xxx in $dlist
- ! do
- ! if $test -d $xxx; then
- ! case " $libpth " in
- ! *" $xxx "*) ;;
- ! *) libpth="$libpth $xxx";;
- ! esac
- ! fi
- ! done
- ! $cat <<'EOM'
- !
- ! Some systems have incompatible or broken versions of libraries. Among
- ! the directories listed in the question below, please remove the one
- ! you know not to be holding relevant libraries. Say "none" for none.
- !
- ! EOM
- ! case "$libpth" in
- ! '') dflt='none';;
- ! *)
- ! set X $libpth
- ! shift
- ! dflt=${1+"$@"}
- ! ;;
- ! esac
- ! rp="Directories to use for library searches?"
- ! . ./myread
- ! case "$ans" in
- ! none) libpth=' ';;
- ! *) libpth="$ans";;
- ! esac
-
- : Looking for optional libraries
- echo " "
- ***************
- *** 1617,1651 ****
- dbm) thatlib=ndbm;;
- *_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
- - *) thatlib=NONE;;
- esac
- ! yyy="$incpath/usr/ccs/lib $incpath/usr/lib $incpath/usr/ucblib"
- ! yyy="$yyy $incpath/usr/local/lib $incpath/lib"
- ! xxx=`./loc lib$thislib.a X $yyy`
- if $test -f $xxx; then
- echo "Found -l$thislib."
- ! case "$dflt" in
- ! *-l$thislib*|*-l$thatlib*);;
- *) dflt="$dflt -l$thislib";;
- esac
- else
- ! xxx=`./loc lib$thislib.a X $libpth`
- if $test -f $xxx; then
- ! echo "Found $xxx."
- ! case "$dflt" in
- ! *$xxx*);;
- ! *) dflt="$dflt $xxx";;
- esac
- else
- ! xxx=`./loc Slib$thislib.a X $xlibpth`
- if $test -f $xxx; then
- ! echo "Found -l$thislib."
- ! case "$dflt" in
- ! *-l$thislib*|*-l$thatlib*);;
- *) dflt="$dflt -l$thislib";;
- esac
- else
- ! echo "No -l$thislib."
- fi
- fi
- fi
- --- 1906,1967 ----
- dbm) thatlib=ndbm;;
- *_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
- ***************
- *** 1745,1751 ****
- esac
- ;;
- esac
- - libpth="$plibpth $libpth"
- libnames='';
- case "$libs" in
- '') ;;
- --- 2061,2066 ----
- ***************
- *** 1761,1767 ****
- if test ! -f $try; then
- try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
- if test ! -f $try; then
- ! try=''
- fi
- fi
- fi
- --- 2076,2088 ----
- 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
- ***************
- *** 2028,2178 ****
- esac;;
- esac'
-
- - : see how we invoke the C preprocessor
- - echo " "
- - echo "Now, how can we feed standard input to your C preprocessor..." >&4
- - cat <<'EOT' >testcpp.c
- - #define ABC abc
- - #define XYZ xyz
- - ABC.XYZ
- - EOT
- - cd ..
- - echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- - chmod 755 cppstdin
- - wrapper=`pwd`/cppstdin
- - ok='false'
- - cd UU
- -
- - if $test "X$cppstdin" != "X" && \
- - $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "You used to use $cppstdin $cppminus so we'll use that again."
- - case "$cpprun" in
- - '') echo "But let's see if we can live without a wrapper..." ;;
- - *)
- - if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- - ok='true'
- - else
- - echo "(However, $cpprun $cpplast does not work, let's see...)"
- - fi
- - ;;
- - esac
- - else
- - case "$cppstdin" in
- - '') ;;
- - *)
- - echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- - ;;
- - esac
- - fi
- -
- - if $ok; then
- - : nothing
- - elif echo 'Maybe "'"$cc"' -E" will work...'; \
- - $cc -E <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yup, it does."
- - x_cpp="$cc -E"
- - x_minus='';
- - elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- - $cc -E - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yup, it does."
- - x_cpp="$cc -E"
- - x_minus='-';
- - elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- - $cc -P <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yipee, that works!"
- - x_cpp="$cc -P"
- - x_minus='';
- - elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- - $cc -P - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "At long last!"
- - x_cpp="$cc -P"
- - x_minus='-';
- - elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- - $cpp <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "It works!"
- - x_cpp="$cpp"
- - x_minus='';
- - elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- - $cpp - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Hooray, it works! I was beginning to wonder."
- - x_cpp="$cpp"
- - x_minus='-';
- - elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- - $wrapper <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - x_cpp="$wrapper"
- - x_minus=''
- - echo "Eureka!"
- - else
- - dflt=''
- - rp="No dice. I can't find a C preprocessor. Name one:"
- - . ./myread
- - x_cpp="$ans"
- - x_minus=''
- - $x_cpp <testcpp.c >testcpp.out 2>&1
- - if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "OK, that will do." >&4
- - else
- - echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
- - exit 1
- - fi
- - fi
- -
- - case "$ok" in
- - false)
- - cppstdin="$x_cpp"
- - cppminus="$x_minus"
- - cpprun="$x_cpp"
- - cpplast="$x_minus"
- - set X $x_cpp
- - shift
- - case "$1" in
- - "$cpp")
- - echo "Perhaps can we force $cc -E using a wrapper..."
- - if $wrapper <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "Yup, we can."
- - cppstdin="$wrapper"
- - cppminus='';
- - else
- - echo "Nope, we'll have to live without it..."
- - fi
- - ;;
- - esac
- - case "$cpprun" in
- - "$wrapper")
- - cpprun=''
- - cpplast=''
- - ;;
- - esac
- - ;;
- - esac
- -
- - case "$cppstdin" in
- - "$wrapper") ;;
- - *) $rm -f $wrapper;;
- - esac
- - $rm -f testcpp.c testcpp.out
- -
- : determine filename position in cpp output
- echo " "
- echo "Computing filename position in cpp output for #include directives..." >&4
- echo '#include <stdio.h>' > foo.c
- $cat >fieldn <<EOF
- $startsh
- ! $cppstdin $cppminus $cppflags <foo.c 2>/dev/null | \
- $grep '^[ ]*#.*stdio\.h' | \
- while read cline; do
- pos=1
- --- 2349,2361 ----
- esac;;
- esac'
-
- : determine filename position in cpp output
- echo " "
- echo "Computing filename position in cpp output for #include directives..." >&4
- echo '#include <stdio.h>' > foo.c
- $cat >fieldn <<EOF
- $startsh
- ! $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
- $grep '^[ ]*#.*stdio\.h' | \
- while read cline; do
- pos=1
- ***************
- *** 2824,2829 ****
- --- 3007,3013 ----
- fi
- . ./myread
- lex="$ans"
- +
- : see if we should include -ll
- echo " "
- case "$lex" in
- ***************
- *** 2866,2876 ****
- dflt="$yacc";;
- esac
- echo " "
- if $test -f "$bison"; then
- ! rp='Which compiler compiler (yacc or bison -y) shall I use?'
- ! else
- ! rp='Which compiler compiler shall I use?'
- fi
- . ./myread
- yacc="$ans"
- case "$yacc" in
- --- 3050,3064 ----
- dflt="$yacc";;
- esac
- echo " "
- + comp='yacc'
- + if $test -f "$byacc"; then
- + dflt="$byacc"
- + comp="byacc or $comp"
- + fi
- if $test -f "$bison"; then
- ! comp="$comp or bison -y"
- fi
- + rp="Which compiler compiler ($comp) shall I use?"
- . ./myread
- yacc="$ans"
- case "$yacc" in
- ***************
- *** 2888,2893 ****
- --- 3076,3085 ----
- : see if we should include -ly
- echo " "
- case "$yacc" in
- + *byacc*)
- + echo "You are using byacc, so I won't look for a yacc library." >&4
- + libyacc=''
- + ;;
- *yacc)
- xxx=`./loc liby.a x $libpth`
- case "$xxx" in
- ***************
- *** 3188,3194 ****
- main(int argc, char *argv[]) {
- exit(0);}
- EOCP
- ! if $cc -c prototype.c >prototype.out 2>&1 ; then
- echo "Your C compiler appears to support function prototypes."
- val="$define"
- else
- --- 3380,3386 ----
- main(int argc, char *argv[]) {
- exit(0);}
- EOCP
- ! if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
- echo "Your C compiler appears to support function prototypes."
- val="$define"
- else
- ***************
- *** 3261,3299 ****
- set d_time
- eval $setvar
-
- - : define an alternate in-header-list? function
- - inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
- - cont=true; xxf="echo \"<\$1> found.\" >&4";
- - case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
- - *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
- - esac;
- - case $# in 4) instead=instead;; *) instead="at last";; esac;
- - while $test "$cont"; do
- - xxx=`./findhdr $1`
- - var=$2; eval "was=\$$2";
- - if $test "$xxx" && $test -r "$xxx";
- - then eval $xxf;
- - eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
- - cont="";
- - else eval $xxnf;
- - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
- - set $yyy; shift; shift; yyy=$@;
- - case $# in 0) cont="";;
- - 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
- - xxnf="echo \"and I did not find <\$1> either.\" >&4";;
- - *) xxf="echo \"but I found <\$1\> instead.\" >&4";
- - xxnf="echo \"there is no <\$1>, ...\" >&4";;
- - esac;
- - done;
- - while $test "$yyy";
- - do set $yyy; var=$2; eval "was=\$$2";
- - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
- - set $yyy; shift; shift; yyy=$@;
- - done'
- -
- : see if stdarg is available
- ! set stdarg.h i_stdarg
- ! eval $inhdr
-
- : see if prototypes support variable argument declarations
- echo " "
- --- 3453,3554 ----
- set d_time
- eval $setvar
-
- : see if stdarg is available
- ! echo " "
- ! if $test `./findhdr stdarg.h`; then
- ! echo "<stdarg.h> found." >&4
- ! valstd="$define"
- ! else
- ! echo "<stdarg.h> NOT found." >&4
- ! valstd="$undef"
- ! fi
- !
- ! : see if varags is available
- ! echo " "
- ! if $test `./findhdr varargs.h`; then
- ! echo "<varargs.h> found." >&4
- ! else
- ! echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
- ! fi
- !
- ! : set up the varargs testing programs
- ! $cat > varargs.c <<EOP
- ! #ifdef I_STDARG
- ! #include <stdarg.h>
- ! #endif
- ! #ifdef I_VARARGS
- ! #include <varargs.h>
- ! #endif
- !
- ! #ifdef I_STDARG
- ! int f(char *p, ...)
- ! #else
- ! int f(va_alist)
- ! va_dcl
- ! #endif
- ! {
- ! va_list ap;
- ! #ifndef I_STDARG
- ! char *p;
- ! #endif
- ! #ifdef I_STDARG
- ! va_start(ap,p);
- ! #else
- ! va_start(ap);
- ! p = va_arg(ap, char *);
- ! #endif
- ! va_end(ap);
- ! }
- ! EOP
- ! $cat > varargs <<EOP
- ! if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
- ! echo "true"
- ! else
- ! echo "false"
- ! fi
- ! $rm -f varargs.o
- ! EOP
- ! chmod +x varargs
- !
- ! : now check which varargs header should be included
- ! echo " "
- ! i_varhdr=''
- ! case "$valstd" in
- ! "$define")
- ! if `./varargs I_STDARG`; then
- ! val='stdarg.h'
- ! elif `./varargs I_VARARGS`; then
- ! val='varargs.h'
- ! fi
- ! ;;
- ! *)
- ! if `./varargs I_VARARGS`; then
- ! val='varargs.h'
- ! fi
- ! ;;
- ! esac
- ! case "$val" in
- ! '')
- ! echo "I could not find the definition for va_dcl... You have problems..." >&4
- ! val="$undef"; set i_stdarg; eval $setvar
- ! val="$undef"; set i_varargs; eval $setvar
- ! ;;
- ! *)
- ! set i_varhdr
- ! eval $setvar
- ! case "$i_varhdr" in
- ! stdarg.h)
- ! val="$define"; set i_stdarg; eval $setvar
- ! val="$undef"; set i_varargs; eval $setvar
- ! ;;
- ! varargs.h)
- ! val="$undef"; set i_stdarg; eval $setvar
- ! val="$define"; set i_varargs; eval $setvar
- ! ;;
- ! esac
- ! echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
- ! esac
- ! $rm -f varargs*
-
- : see if prototypes support variable argument declarations
- echo " "
- ***************
- *** 3342,3347 ****
- --- 3597,3632 ----
- *) warnflags="$ans";;
- esac
-
- + : define an alternate in-header-list? function
- + inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
- + cont=true; xxf="echo \"<\$1> found.\" >&4";
- + case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
- + *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
- + esac;
- + case $# in 4) instead=instead;; *) instead="at last";; esac;
- + while $test "$cont"; do
- + xxx=`./findhdr $1`
- + var=$2; eval "was=\$$2";
- + if $test "$xxx" && $test -r "$xxx";
- + then eval $xxf;
- + eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
- + cont="";
- + else eval $xxnf;
- + eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
- + set $yyy; shift; shift; yyy=$@;
- + case $# in 0) cont="";;
- + 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
- + xxnf="echo \"and I did not find <\$1> either.\" >&4";;
- + *) xxf="echo \"but I found <\$1\> instead.\" >&4";
- + xxnf="echo \"there is no <\$1>, ...\" >&4";;
- + esac;
- + done;
- + while $test "$yyy";
- + do set $yyy; var=$2; eval "was=\$$2";
- + eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
- + set $yyy; shift; shift; yyy=$@;
- + done'
- +
- : see if this is a sys/file.h system
- val=''
- set sys/file.h val
- ***************
- *** 3493,3576 ****
- set unistd.h i_unistd
- eval $inhdr
-
- - : see if this is a varargs system
- - echo " "
- - if $test `./findhdr varargs.h`; then
- - val="$define"
- - echo "<varargs.h> found." >&4
- - else
- - val="$undef"
- - echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
- - fi
- - set i_varargs
- - eval $setvar
- -
- - : set up the varargs testing programs
- - $cat > varargs.c <<EOP
- - #ifdef I_STDARG
- - #include <stdarg.h>
- - #endif
- - #ifdef I_VARARGS
- - #include <varargs.h>
- - #endif
- -
- - #ifdef I_STDARG
- - int f(char *p, ...)
- - #else
- - int f(va_alist)
- - va_dcl
- - #endif
- - {
- - va_list ap;
- - #ifndef I_STDARG
- - char *p;
- - #endif
- - #ifdef I_STDARG
- - va_start(ap,p);
- - #else
- - va_start(ap);
- - p = va_arg(ap, char *);
- - #endif
- - va_end(ap);
- - }
- - EOP
- - $cat > varargs <<EOP
- - if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
- - echo "true"
- - else
- - echo "false"
- - fi
- - $rm -f varargs.o
- - EOP
- - chmod +x varargs
- -
- - : now check which varargs header should be included
- - echo " "
- - i_varhdr=''
- - case "$i_stdarg" in
- - "$define")
- - if `./varargs I_STDARG`; then
- - i_varhdr='stdarg.h'
- - i_varargs="$undef"
- - elif `./varargs I_VARARGS`; then
- - i_varhdr='varargs.h'
- - i_stdarg="$undef"
- - fi
- - ;;
- - *)
- - if `./varargs I_VARARGS`; then
- - i_varhdr='varargs.h'
- - fi
- - ;;
- - esac
- - case "$i_varhdr" in
- - '')
- - echo "I could not find the definition for va_dcl... You have problems..." >&4
- - ;;
- - *) echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
- - esac
- - $rm -f varargs*
- -
- : determine the name of a reasonable mailer
- case "$mailer" in
- '')
- --- 3778,3783 ----
- ***************
- *** 3579,3585 ****
- elif $test -f "$_smail"; then
- dflt="$_smail"
- elif $test -f "$_rmail"; then
- ! dflt="$rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- --- 3786,3792 ----
- elif $test -f "$_smail"; then
- dflt="$_smail"
- elif $test -f "$_rmail"; then
- ! dflt="$_rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- ***************
- *** 4188,4193 ****
- --- 4395,4401 ----
- awk='$awk'
- bash='$bash'
- bison='$bison'
- + byacc='$byacc'
- cat='$cat'
- chgrp='$chgrp'
- chmod='$chmod'
- ***************
- *** 4268,4273 ****
- --- 4476,4482 ----
- binexp='$binexp'
- installbin='$installbin'
- cc='$cc'
- + gccversion='$gccversion'
- ccflags='$ccflags'
- cppflags='$cppflags'
- ldflags='$ldflags'
- ***************
- *** 4304,4310 ****
- h_fcntl='$h_fcntl'
- h_sysfile='$h_sysfile'
- i_fcntl='$i_fcntl'
- - i_stdarg='$i_stdarg'
- i_stddef='$i_stddef'
- i_stdlib='$i_stdlib'
- i_string='$i_string'
- --- 4513,4518 ----
- ***************
- *** 4316,4326 ****
- --- 4524,4536 ----
- i_time='$i_time'
- timeincl='$timeincl'
- i_unistd='$i_unistd'
- + i_stdarg='$i_stdarg'
- i_varargs='$i_varargs'
- i_varhdr='$i_varhdr'
- lex='$lex'
- libc='$libc'
- liblex='$liblex'
- + glibpth='$glibpth'
- libpth='$libpth'
- plibpth='$plibpth'
- xlibpth='$xlibpth'
- ***************
- *** 4465,4468 ****
- --- 4675,4680 ----
-
- $rm -f kit*isdone ark*isdone
- $rm -rf UU
- +
- : End of Configure
- +
-
- Index: manpage.c
- Prereq: 2.0.1.41
- *** manpage.c.old 1994/02/23 04:38:28
- --- manpage.c 1994/05/12 02:24:51
- ***************
- *** 1,4 ****
- ! /* $Id: manpage.c,v 2.0.1.41 1994/02/23 04:38:28 greyham Exp $
- * stuff to do with manual page outputing
- */
-
- --- 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
- */
-
- ***************
- *** 326,331 ****
- --- 326,341 ----
-
- }
-
- + /* output the phrase "a[n] <type name>" */
- + void output_conjunction(text)
- + char *text;
- + {
- + output->character('a');
- + if (strchr("aAeEiIoOuU",text[0])) output->character('n');
- + output->character(' ');
- + output->code(text);
- + }
- +
- /* output the description for an identifier; be it return value or param */
- static void output_identifier_description(comment, outfunc,
- decl_spec, declarator)
- ***************
- *** 341,346 ****
- --- 351,357 ----
- {
- int maxtaglen = 0;
- int descriptions = 0;
- + int entries = 0;
- Enumerator *e;
- int is_first = 1;
- boolean started = FALSE;
- ***************
- *** 359,419 ****
- int taglen = strlen(e->name);
- if (taglen > maxtaglen) maxtaglen = taglen;
- if (e->comment) descriptions = 1;
- }
-
- ! output->text("Possible values for a");
- ! if (strchr("aAeEiIoOuU",decl_spec->text[0])) output->character('n');
- ! output->character(' ');
- ! output->code(decl_spec->text);
- ! output->text(" are as follows:\n");
- !
- ! for (e = decl_spec->enum_list->first; e; e = e->next)
- {
- ! /* don't print names with a leading underscore! */
- ! if (e->name[0] == '_') continue;
- !
- ! if (e->group_comment)
- {
- ! /* break out of table mode for the group comment */
- ! if (started)
- {
- if (descriptions)
- ! output->table_end();
- else
- ! output->list_end();
- ! started = FALSE;
- }
- ! output->indent();
- ! output_comment(e->group_comment);
- ! }
- !
- ! if (!started)
- ! {
- if (descriptions)
- ! output->table_start();
- else
- ! output->list_start();
- ! started = TRUE;
- }
- !
- ! if (descriptions)
- ! output->table_entry(e->name, maxtaglen, e->comment);
- ! else
- {
- ! if (!is_first)
- ! output->list_separator();
- ! is_first = 0;
- ! output->list_entry(e->name);
- }
- }
- -
- - if (started)
- - {
- - if (descriptions)
- - output->table_end();
- - else
- - output->list_end();
- - }
- }
- else
- (*outfunc)(comment);
- --- 370,446 ----
- int taglen = strlen(e->name);
- if (taglen > maxtaglen) maxtaglen = taglen;
- if (e->comment) descriptions = 1;
- + entries++;
- }
-
- ! /* if there are a lot of them, the list may be automatically generated,
- ! * and probably isn't wanted in every manual page.
- ! */
- ! if (entries > 20)
- {
- ! char entries_s[15];
- ! sprintf(entries_s, "%d", entries);
- ! output->text("Since there are ");
- ! output->text(entries_s);
- ! output->text(" possible values for ");
- ! output_conjunction(decl_spec->text);
- ! output->text(", they are not all listed here.\n");
- ! }
- ! else
- ! {
- ! /* the number of possibilities is reasonable; list them all */
- ! output->text("Possible values for ");
- ! output_conjunction(decl_spec->text);
- ! output->text(" are as follows:\n");
- !
- ! for (e = decl_spec->enum_list->first; e; e = e->next)
- {
- ! /* don't print names with a leading underscore! */
- ! if (e->name[0] == '_') continue;
- !
- ! if (e->group_comment)
- ! {
- ! /* break out of table mode for the group comment */
- ! if (started)
- ! {
- ! if (descriptions)
- ! output->table_end();
- ! else
- ! output->list_end();
- ! started = FALSE;
- ! }
- ! output->indent();
- ! output_comment(e->group_comment);
- ! }
- !
- ! if (!started)
- {
- if (descriptions)
- ! output->table_start();
- else
- ! output->list_start();
- ! started = TRUE;
- }
- !
- if (descriptions)
- ! output->table_entry(e->name, maxtaglen, e->comment);
- else
- ! {
- ! if (!is_first)
- ! output->list_separator();
- ! is_first = 0;
- ! output->list_entry(e->name);
- ! }
- }
- !
- ! if (started)
- {
- ! if (descriptions)
- ! output->table_end();
- ! else
- ! output->list_end();
- }
- }
- }
- else
- (*outfunc)(comment);
- ***************
- *** 888,893 ****
- --- 915,932 ----
- }
- }
-
- + int exclude_section(section)
- + const char *section;
- + {
- + ExcludeSection *exclude;
- +
- + for (exclude = first_excluded_section ; exclude ; exclude = exclude->next)
- + if (!strcmp(section, exclude->name)) return 1;
- +
- + return 0;
- + }
- +
- +
- /* Writes the entire contents of the manual page specified by basepage. */
- void
- output_manpage(firstpage, basepage, input_files, title, section)
- ***************
- *** 927,952 ****
- /* work out what we'll actually print as a terse description */
- terseout = group_terse ? group_terse : (terse ? terse : "Not Described");
-
- ! if (!make_embeddable)
- ! {
- ! output->header(basepage, input_files, grouped,
- ! title ? title : basepage->declarator->name, section);
- ! }
- ! output->section("NAME");
-
- /* output the names of all the stuff documented on this page */
- for (page = basepage; page; page = page->next)
- {
- ! output->text(page->declarator->name);
-
- if (!group_together) break;
-
- if (page->next) output->text(",\n");
- }
-
- ! output->character(' ');
- ! output->dash();
- ! output->character(' ');
- output->text(terseout);
- output->character('\n');
-
- --- 966,986 ----
- /* work out what we'll actually print as a terse description */
- terseout = group_terse ? group_terse : (terse ? terse : "Not Described");
-
- ! output->header(basepage, input_files, grouped,
- ! title ? title : basepage->declarator->name, section);
-
- + output->name(NULL);
- /* output the names of all the stuff documented on this page */
- for (page = basepage; page; page = page->next)
- {
- ! output->name(page->declarator->name);
-
- if (!group_together) break;
-
- if (page->next) output->text(",\n");
- }
-
- ! output->terse_sep();
- output->text(terseout);
- output->character('\n');
-
- ***************
- *** 1090,1096 ****
- {
- next = section->next;
-
- ! if (!section->been_output && section->text)
- {
- output->section(section->name);
- if (grouped) output->sub_section(page->declarator->name);
- --- 1124,1131 ----
- {
- next = section->next;
-
- ! if (!section->been_output && section->text &&
- ! !exclude_section(section->name))
- {
- output->section(section->name);
- if (grouped) output->sub_section(page->declarator->name);
- ***************
- *** 1140,1146 ****
- for (also = firstpage; also && also == basepage; also = also->next)
- ;
-
- ! if (also) /* did we find at least one? */
- {
- int isfirst = 1;
-
- --- 1175,1181 ----
- for (also = firstpage; also && also == basepage; also = also->next)
- ;
-
- ! if (also && !exclude_section("SEE ALSO")) /* did we find at least one? */
- {
- int isfirst = 1;
-
-
- Index: fixexamp.in
- Prereq: 2.0.1.1
- *** fixexamp.in.old 1994/01/02 00:16:47
- --- fixexamp.in 1994/05/12 01:29:35
- ***************
- *** 1,4 ****
- ! # $Id: fixexamp.in,v 2.0.1.1 1994/01/02 00:16:47 greyham Exp $
- # Fix up c2man output for inclusion of examples in the c2man manual page.
- # This file gets processed to remove comments because some sed's can't handle
- # them. Can you believe it?.
- --- 1,4 ----
- ! # $Id: fixexamp.in,v 2.0.1.3 1994/05/12 01:29:35 greyham Exp $
- # Fix up c2man output for inclusion of examples in the c2man manual page.
- # This file gets processed to remove comments because some sed's can't handle
- # them. Can you believe it?.
- ***************
- *** 31,43 ****
- # surround all the .SH and .SS lines with page offset indents
- # the .ne line will force a page break before the .po is evaluated, in the case
- # where a .SH in an example is at the very bottom of the page. Otherwise the .SH
- ! # could case the break, resulting in the wrong .po setting for the new page's
- # title line.
- /^\.S[SH] /{
- i\
- .br\
- .ne 3\
- ! .RS -1i\
- .po +1i
- a\
- .po -1i\
- --- 31,43 ----
- # surround all the .SH and .SS lines with page offset indents
- # the .ne line will force a page break before the .po is evaluated, in the case
- # where a .SH in an example is at the very bottom of the page. Otherwise the .SH
- ! # could cause the break, resulting in the wrong .po setting for the new page's
- # title line.
- /^\.S[SH] /{
- i\
- .br\
- .ne 3\
- ! .RE\
- .po +1i
- a\
- .po -1i\
- ***************
- *** 56,60 ****
- # up the line length again at the end of the example file
- $a\
- .ll \\n(CLu+0.5i\
- ! .RS -1i
-
- --- 56,60 ----
- # up the line length again at the end of the example file
- $a\
- .ll \\n(CLu+0.5i\
- ! .RE
-
-
- *** End of Patch 28 ***
- --
- 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...
-