Changes for GNU Hello version 1.1, from version 1.0 This omits changes in the files hello.info* and TAGS. You can rebuild those files yourself by running makeinfo and etags. diff -rc2N hello-1.0/ChangeLog hello-1.1/ChangeLog *** hello-1.0/ChangeLog Fri Jun 26 02:55:03 1992 --- hello-1.1/ChangeLog Wed Sep 16 20:25:01 1992 *************** *** 1,2 **** --- 1,74 ---- + Wed Sep 16 19:30:08 1992 The King (elvis@graceland.gnu.ai.mit.edu) + + * Version 1.1 released. + + * Makefile.in (DISTFILES): Add TAGS. + + * Makefile.in (DISTFILES): Remove COPYING.LIB. + * COPYING.LIB: Removed. + + * hello.c (main): Shortened verbose variable name. + Robustified and simplified argument test. + + Wed Sep 2 23:45:10 1992 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * hello.c (main): added zork output compatibility. + + Wed Sep 2 22:58:15 1992 The King (elvis@graceland.gnu.ai.mit.edu) + + * Makefile.in (config.status): Find configure in $(srcdir). + + * Makefile.in: Regularize spacing after colons. + + Tue Aug 11 16:48:21 1992 The King (elvis@graceland.gnu.ai.mit.edu) + + * NEWS: New file. + * Makefile.in (DISTFILES): Add NEWS. + + * hello.c (usage): Capitalize first word. + + * Makefile.in (DISTFILES): Add COPYING.LIB. + + Wed Jul 1 02:43:47 1992 The King (elvis@graceland.gnu.ai.mit.edu) + + * Makefile.in (hello.dvi): New rule. + (doc): New rule. + (check): Depend on hello, not all. + + * hello.texi (Instructions): Add important warning to all our readers. + (Sample): Show new greeting msg, and --traditional option. + (Invoking hello): Document --traditional. + (Problems): Invite users to ask questions of the maintainer. + + * hello.c (longopts, main): Add new option --traditional/-t. + (main): When not under --traditional, use proper capitalization, + appropriate punctuation, and the most suited output function. + Under --traditional, retain compatibility with old implementations. + + * hello.c (main): Notice switches in flag variables and act on + them after the getopt loop is finished. + + * ChangeLog (3-1-78): Correct name. + + Sun Jun 28 12:54:28 1992 The King (elvis@graceland.gnu.ai.mit.edu) + + * Makefile.in: Add emacs mode cookie. + (DISTFILES): Indent contiuation lines reasonably. + + * hello.texi (Instructions): Properly capitalize title. + + Fri Jun 26 23:44:03 1992 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * hello.texi: new node "how to read this manual". + + Fri Jun 26 18:15:53 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) + + * Makefile.in (check): Look for testdata in $(srcdir). + From david d `zoo' zuhn (zoo@cygnus.com). + + Fri Jun 26 18:03:09 1992 Charles Hannum (mycroft@hill.gnu.ai.mit.edu) + + * hello.texi: Fix grammo in first line. + Fri Jun 26 02:55:44 1992 The King (elvis@graceland.gnu.ai.mit.edu) *************** *** 30,34 **** * Begin GNU project; add copyleft. ! Sat Apr 1 00:27:19 1978 Dennis Ritchie (dmr at research) * Initial version. --- 102,112 ---- * Begin GNU project; add copyleft. ! Sat Apr 1 00:27:19 1978 Brian Kernighan (bwk at research) * Initial version. + + Local Variables: + mode: indented-text + left-margin: 8 + version-control: never + End: diff -rc2N hello-1.0/INSTALL hello-1.1/INSTALL *** hello-1.0/INSTALL Fri Jun 19 15:07:44 1992 --- hello-1.1/INSTALL Tue Sep 1 17:41:24 1992 *************** *** 16,21 **** system-dependent definitions. It also creates a file `config.status' that you can run in the future to recreate the current configuration. - Running `configure' takes a minute or two. To compile the package in a different directory from the one containing the source code, you must use a version of make that --- 16,25 ---- system-dependent definitions. It also creates a file `config.status' that you can run in the future to recreate the current configuration. + Running `configure' takes a minute or two. While it is running, it + prints some messages that tell what it is doing. If you don't want to + see the messages, run `configure' with its standard output redirected + to `/dev/null'; for example, `./configure >/dev/null'. + To compile the package in a different directory from the one containing the source code, you must use a version of make that *************** *** 22,30 **** supports the VPATH variable, such as GNU make. `cd' to the directory where you want the object files and executables to go and run ! `configure' with the option `--srcdir=DIR', where DIR is the directory ! that contains the source code. Using this option is actually ! unnecessary if the source code is in the parent directory of the one ! in which you are compiling; `configure' automatically checks for the ! source code in `..' if it does not find it in the current directory. By default, `make install' will install the package's files in --- 26,35 ---- supports the VPATH variable, such as GNU make. `cd' to the directory where you want the object files and executables to go and run ! `configure'. `configure' automatically checks for the source code in ! the directory that `configure' is in and in `..'. If for some reason ! `configure' is not in the source code directory that you are ! configuring, then it will report that it can't find the source code. ! In that case, run `configure' with the option `--srcdir=DIR', where ! DIR is the directory that contains the source code. By default, `make install' will install the package's files in *************** *** 48,53 **** file). To do this, give `configure' the `--no-create' option. Later, you can run `./config.status' to actually configure the package. This ! option is useful mainly in `Makefile' rules for updating ! `config.status' and `Makefile'. `configure' ignores any other arguments that you give it. --- 53,60 ---- file). To do this, give `configure' the `--no-create' option. Later, you can run `./config.status' to actually configure the package. This ! option is useful mainly in `Makefile' rules for updating `config.status' ! and `Makefile'. You can also give `config.status' the `--recheck' ! option, which makes it re-run `configure' with the same arguments you ! used before. This is useful if you change `configure'. `configure' ignores any other arguments that you give it. *************** *** 76,82 **** If you need to do unusual things to compile the package, we encourage ! you to teach `configure' how to do them and mail the diffs to the ! address given in the README so we can include them in the next ! release. 2. Type `make' to compile the package. If you want, you can override --- 83,89 ---- If you need to do unusual things to compile the package, we encourage ! you to figure out how `configure' could check whether to do them, and ! mail diffs or instructions to the address given in the README so we ! can include them in the next release. 2. Type `make' to compile the package. If you want, you can override *************** *** 85,92 **** make CFLAGS=-O2 LDFLAGS=-s ! 3. Type `make install' to install programs, data files, and documentation. ! 4. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), the header file containing system-dependent definitions --- 92,105 ---- make CFLAGS=-O2 LDFLAGS=-s ! 3. If the package comes with self-tests and you want to run them, ! type `make check'. If you're not sure whether there are any, try it; ! if `make' responds with something like ! make: *** No way to make target `check'. Stop. ! then the package does not come with self-tests. ! ! 4. Type `make install' to install programs, data files, and documentation. ! 5. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), the header file containing system-dependent definitions diff -rc2N hello-1.0/Makefile.in hello-1.1/Makefile.in *** hello-1.0/Makefile.in Fri Jun 26 01:16:40 1992 --- hello-1.1/Makefile.in Wed Sep 16 20:24:48 1992 *************** *** 1,3 **** ! # Makefile for GNU hello. # Copyright (C) 1992 Free Software Foundation, Inc. --- 1,3 ---- ! # Makefile for GNU hello. -*- Indented-Text -*- # Copyright (C) 1992 Free Software Foundation, Inc. *************** *** 46,55 **** OBJS = hello.o version.o getopt.o getopt1.o @ALLOCA@ HDRS = getopt.h ! DISTFILES = $(SRCS) $(HDRS) COPYING ChangeLog Makefile.in \ ! README INSTALL hello.texi gpl.texinfo configure configure.in \ ! texinfo.tex hello.info testdata ! all: hello hello.info .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $< --- 46,57 ---- OBJS = hello.o version.o getopt.o getopt1.o @ALLOCA@ HDRS = getopt.h ! DISTFILES = $(SRCS) $(HDRS) COPYING ChangeLog NEWS Makefile.in \ ! README INSTALL hello.texi gpl.texinfo configure configure.in \ ! texinfo.tex hello.info testdata TAGS ! all: hello hello.info + doc: hello hello.info hello.dvi + .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $< *************** *** 59,63 **** -$(INSTALL_DATA) $(srcdir)/hello.info $(infodir)/hello.info ! hello: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) --- 61,65 ---- -$(INSTALL_DATA) $(srcdir)/hello.info $(infodir)/hello.info ! hello: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) *************** *** 66,74 **** hello.info: hello.texi makeinfo $(srcdir)/hello.texi ! check: all @echo expect no output from diff ./hello > test.out ! diff -c testdata test.out rm -f test.out --- 68,78 ---- hello.info: hello.texi makeinfo $(srcdir)/hello.texi + hello.dvi: hello.texi + texi2dvi $(srcdir)/hello.texi ! check: hello @echo expect no output from diff ./hello > test.out ! diff -c $(srcdir)/testdata test.out rm -f test.out *************** *** 77,81 **** config.status: configure ! ./configure --no-create configure: configure.in --- 81,85 ---- config.status: configure ! $(srcdir)/configure --no-create configure: configure.in *************** *** 82,86 **** autoconf ! TAGS: $(SRCS) etags $(SRCS) --- 86,90 ---- autoconf ! TAGS: $(SRCS) etags $(SRCS) diff -rc2N hello-1.0/NEWS hello-1.1/NEWS *** hello-1.0/NEWS --- hello-1.1/NEWS Wed Sep 16 19:37:33 1992 *************** *** 0 **** --- 1,36 ---- + GNU Hello NEWS -- history of user-visible changes. 16 September 1992 + + Copyright (C) 1992 Free Software Foundation, Inc. + See the end for copying conditions. + + Please send GNU Hello bug reports to bug-gnu-hello@prep.ai.mit.edu. + + Version 1.1 + + * There is a new, improved greeting message. + You can use the new `--traditional' option to get the old behavior. + + * Zork output compatibility has been added. + + * There is now a `NEWS' file (this one), giving a history of + user-visible changes. + + ---------------------------------------------------------------------- + Copyright information: + + Copyright (C) 1992 Free Software Foundation, Inc. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + + Local variables: + version-control: never + mode: indented-text + end: diff -rc2N hello-1.0/README hello-1.1/README *** hello-1.0/README Fri Jun 26 01:56:05 1992 --- hello-1.1/README Wed Sep 16 20:22:00 1992 *************** *** 1,3 **** ! We are pleased to announce the version 1.0 test release of GNU Hello. All reported bugs in previous test releases have been fixed. Some bugs surely remain. --- 1,3 ---- ! We are pleased to announce the version 1.1 test release of GNU Hello. All reported bugs in previous test releases have been fixed. Some bugs surely remain. diff -rc2N hello-1.0/configure hello-1.1/configure *** hello-1.0/configure Fri Jun 26 00:48:06 1992 --- hello-1.1/configure Mon Sep 14 21:23:57 1992 *************** *** 76,95 **** unique_file=hello.c - # Makefile rules whose targets are searched for in VPATH need to use $<. - # However, old makes do not support it, so we use a combination - # construction in Makefile.in: `$file<'. - # If srcdir is `.', we use sed to change that to `file' for old makes. - # Otherwise, we use sed to change it to `$<'. - # vpsub is the sed program, which changes `$file<' to one or the other. - vpsub='s,\$\([-./a-zA-Z0-9_][-./a-zA-Z0-9_]*\)<,\1,g' - # Find the source files, if location was not specified. if test -z "$srcdir"; then ! srcdirdefaulted=yes; srcdir=. ! if test ! -r $unique_file; then srcdir=..; fi fi if test ! -r $srcdir/$unique_file; then if test x$srcdirdefaulted = xyes; then ! echo "configure: Can not find sources in \`.' or \`..'." 1>&2 else echo "configure: Can not find sources in \`${srcdir}'." 1>&2 --- 76,94 ---- unique_file=hello.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ! srcdirdefaulted=yes ! # Try the directory containing this script, then `..'. ! prog=$0 ! confdir=`echo $prog|sed 's,/[^/][^/]*$,,'` ! test "X$confdir" = "X$prog" && confdir=. ! srcdir=$confdir ! if test ! -r $srcdir/$unique_file; then ! srcdir=.. ! fi fi if test ! -r $srcdir/$unique_file; then if test x$srcdirdefaulted = xyes; then ! echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2 else echo "configure: Can not find sources in \`${srcdir}'." 1>&2 *************** *** 97,103 **** exit 1 fi - if test $srcdir != .; then - vpsub='s,\$\([-./a-zA-Z0-9_][-./a-zA-Z0-9_]*\)<,\$<,g' - fi # Preserve a srcdir of `.' to avoid automounter screwups with pwd. # But we can't avoid them for `..', to make subdirectories work. --- 96,99 ---- *************** *** 107,127 **** esac ! ! # The Bourne shell writes "command not found" to /dev/tty, so if we get ! # a usage message on stderr, we have the program. ! # ! # ksh and zsh write "command not found" to stderr, but test -n does not ! # want any output if there is no program. So we use the `type' builtin ! # instead for them (and bash). ! if test "$RANDOM" = "$RANDOM"; then ! checkfor='test -n "`$checkprog $checkargs 2>&1`"' ! else ! checkfor='type $checkprog >/dev/null 2>&1' fi ! ! echo checking for gcc ! checkprog=gcc checkargs='' ! test -z "$CC" && eval $checkfor && CC='gcc' ! CC=${CC-cc} # Find out if we are using GNU C, under whatever name. --- 103,119 ---- esac ! if test -z "$CC"; then ! echo checking for gcc ! saveifs="$IFS"; IFS="${IFS}:" ! for dir in $PATH; do ! test -z "$dir" && dir=. ! if test -f $dir/gcc; then ! CC="gcc" ! break ! fi ! done ! IFS="$saveifs" fi ! test -z "$CC" && CC="cc" # Find out if we are using GNU C, under whatever name. *************** *** 154,166 **** fi - echo checking for install # Make sure to not get the incompatible SysV /etc/install and ! # /usr/sbin/install, which might be in PATH before a BSD-like install. if test -z "$INSTALL"; then ! saveifs="$IFS"; IFS="$IFS:" for dir in $PATH; do test -z "$dir" && dir=. case $dir in ! /etc|/usr/sbin) ;; *) if test -f $dir/install; then --- 146,159 ---- fi # Make sure to not get the incompatible SysV /etc/install and ! # /usr/sbin/install, which might be in PATH before a BSD-like install, ! # or the SunOS /usr/etc/install directory. if test -z "$INSTALL"; then ! echo checking for install ! saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. case $dir in ! /etc|/usr/sbin|/usr/etc) ;; *) if test -f $dir/install; then *************** *** 193,203 **** rm -f conftest* ! echo checking for alloca.h ! cat < conftest.c ! ! #include ! EOF ! err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"` ! if test -z "$err"; then DEFS="$DEFS -DHAVE_ALLOCA_H=1" fi --- 186,195 ---- rm -f conftest* ! # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works ! # for constant arguments. Useless! ! echo checking for working alloca.h ! echo "#include ! main() { exit(0); } t() { char *p = alloca(2 * sizeof(int)); }" > conftest.c ! if eval $compile; then DEFS="$DEFS -DHAVE_ALLOCA_H=1" fi *************** *** 231,237 **** SAVELIBS="$LIBS" # Maybe alloca is in a different library. ! if test -f /usr/ucblib/libucb.a; then ! LIBS="$LIBS -L/usr/ucblib -lucb" trylib=-lucb # SVR4 ! elif test -f /lib/libPW.a; then LIBS="$LIBS -lPW" trylib=-lPW # SVR2 and SVR3 fi --- 223,231 ---- SAVELIBS="$LIBS" # Maybe alloca is in a different library. ! #if test -f /usr/ucblib/libucb.a; then ! # Avoid the broken BSD compatibility library as much as possible. ! #LIBS="$LIBS -L/usr/ucblib -lc -lucb" trylib=-lucb # SVR4 ! #el ! if test -f /lib/libPW.a; then LIBS="$LIBS -lPW" trylib=-lPW # SVR2 and SVR3 fi *************** *** 270,275 **** # Generated automatically by configure. # Run this file to recreate the current configuration. ! # This directory was configured as follows: # $0 $* trap 'rm -f Makefile; exit 1' 1 3 15 CC='$CC' --- 264,277 ---- # Generated automatically by configure. # Run this file to recreate the current configuration. ! # This directory was configured as follows, ! # on host `(hostname || uname -n) 2>/dev/null`: ! # # $0 $* + + case "\$1" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + exec /bin/sh $0 $* ;; + esac + trap 'rm -f Makefile; exit 1' 1 3 15 CC='$CC' *************** *** 285,289 **** exec_prefix='$exec_prefix' prsub='$prsub' - vpsub='$vpsub' EOF cat <<\EOF >> config.status --- 287,290 ---- *************** *** 302,315 **** echo "# Generated automatically from `basename $file`.in by configure." > $file sed -e " - $vpsub $prsub ! s,@CC@,$CC, ! s,@CPP@,$CPP, ! s,@INSTALL@,$INSTALL, ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM, ! s,@INSTALL_DATA@,$INSTALL_DATA, ! s,@ALLOCA@,$ALLOCA, ! s,@LIBS@,$LIBS, ! s,@srcdir@,$srcdir, s,@DEFS@,$DEFS," $top_srcdir/${file}.in >> $file done --- 303,315 ---- echo "# Generated automatically from `basename $file`.in by configure." > $file sed -e " $prsub ! s,@CC@,$CC,g ! s,@CPP@,$CPP,g ! s,@INSTALL@,$INSTALL,g ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,g ! s,@INSTALL_DATA@,$INSTALL_DATA,g ! s,@ALLOCA@,$ALLOCA,g ! s,@LIBS@,$LIBS,g ! s,@srcdir@,$srcdir,g s,@DEFS@,$DEFS," $top_srcdir/${file}.in >> $file done diff -rc2N hello-1.0/configure.in hello-1.1/configure.in *** hello-1.0/configure.in Fri Jun 26 00:47:54 1992 --- hello-1.1/configure.in Tue Jul 14 02:40:00 1992 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. AC_INIT(hello.c) ! AC_PROG_GCC AC_PROG_CPP AC_PROG_INSTALL --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. AC_INIT(hello.c) ! AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL diff -rc2N hello-1.0/getopt.c hello-1.1/getopt.c *** hello-1.0/getopt.c Tue Jun 16 19:43:34 1992 --- hello-1.1/getopt.c Mon Aug 24 13:00:50 1992 *************** *** 7,14 **** This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU Library General Public License as published ! by the Free Software Foundation; either version 2, or (at your option) ! any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --- 7,14 ---- This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2, or (at your option) any ! later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *************** *** 15,24 **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ ! /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ #define alloca __builtin_alloca --- 15,24 ---- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ #define alloca __builtin_alloca *************** *** 37,40 **** --- 37,44 ---- #include + #if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__) + #include + #endif + /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ *************** *** 41,46 **** #ifdef __GNU_LIBRARY__ #undef alloca #include - #include #else /* Not GNU C library. */ #define __alloca alloca --- 45,51 ---- #ifdef __GNU_LIBRARY__ #undef alloca + /* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ #include #else /* Not GNU C library. */ #define __alloca alloca *************** *** 47,52 **** #endif /* GNU C library. */ ! ! #ifndef __STDC__ #define const #endif --- 52,56 ---- #endif /* GNU C library. */ ! #if !__STDC__ #define const #endif *************** *** 54,58 **** /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a long-named option. Because this is not POSIX.2 compliant, it is ! being phased out. */ #define GETOPT_COMPAT --- 58,62 ---- /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a long-named option. Because this is not POSIX.2 compliant, it is ! being phased out. */ #define GETOPT_COMPAT *************** *** 206,213 **** /* Interchange the two blocks of data in ARGV. */ ! my_bcopy (&argv[first_nonopt], temp, nonopts_size); ! my_bcopy (&argv[last_nonopt], &argv[first_nonopt], (optind - last_nonopt) * sizeof (char *)); ! my_bcopy (temp, &argv[first_nonopt + optind - last_nonopt], nonopts_size); /* Update records for the slots the non-options now occupy. */ --- 210,219 ---- /* Interchange the two blocks of data in ARGV. */ ! my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size); ! my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt], (optind - last_nonopt) * sizeof (char *)); ! my_bcopy ((char *) temp, ! (char *) &argv[first_nonopt + optind - last_nonopt], ! nonopts_size); /* Update records for the slots the non-options now occupy. */ *************** *** 453,457 **** { /* Don't test has_arg with >, because some C compilers don't ! allow it to be used on enums. */ if (pfound->has_arg) optarg = s + 1; --- 459,463 ---- { /* Don't test has_arg with >, because some C compilers don't ! allow it to be used on enums. */ if (pfound->has_arg) optarg = s + 1; *************** *** 501,505 **** or the option starts with '--' or is not a valid short option, then it's an error. ! Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' #ifdef GETOPT_COMPAT --- 507,511 ---- or the option starts with '--' or is not a valid short option, then it's an error. ! Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' #ifdef GETOPT_COMPAT diff -rc2N hello-1.0/getopt.h hello-1.1/getopt.h *** hello-1.0/getopt.h Sat May 23 22:29:47 1992 --- hello-1.1/getopt.h Fri Sep 11 10:41:55 1992 *************** *** 3,10 **** This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU Library General Public License as published ! by the Free Software Foundation; either version 2, or (at your option) ! any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --- 3,10 ---- This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2, or (at your option) any ! later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *************** *** 11,18 **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _GETOPT_H --- 11,18 ---- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _GETOPT_H *************** *** 95,99 **** --- 95,106 ---- #if __STDC__ + #if defined(__GNU_LIBRARY__) + /* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); + #else /* not __GNU_LIBRARY__ */ + extern int getopt (); + #endif /* not __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); diff -rc2N hello-1.0/getopt1.c hello-1.1/getopt1.c *** hello-1.0/getopt1.c Sat May 23 22:29:48 1992 --- hello-1.1/getopt1.c Tue Aug 18 17:33:48 1992 *************** *** 3,10 **** This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU Library General Public License as published ! by the Free Software Foundation; either version 2, or (at your option) ! any later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --- 3,10 ---- This program is free software; you can redistribute it and/or modify it ! under the terms of the GNU General Public License as published by the ! Free Software Foundation; either version 2, or (at your option) any ! later version. ! This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *************** *** 11,24 **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #ifdef LIBC - /* For when compiled as part of the GNU C library. */ - #include - #endif - #include "getopt.h" --- 11,19 ---- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "getopt.h" *************** *** 33,37 **** #endif /* STDC_HEADERS or __GNU_LIBRARY__ */ ! #if !defined (NULL) #define NULL 0 #endif --- 28,32 ---- #endif /* STDC_HEADERS or __GNU_LIBRARY__ */ ! #ifndef NULL #define NULL 0 #endif *************** *** 51,55 **** If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option ! instead. */ int --- 46,50 ---- If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option ! instead. */ int diff -rc2N hello-1.0/gpl.texinfo hello-1.1/gpl.texinfo *** hello-1.0/gpl.texinfo Fri Jun 12 18:18:24 1992 --- hello-1.1/gpl.texinfo Mon Jul 6 20:09:42 1992 *************** *** 379,382 **** --- 379,383 ---- @example + @group Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' *************** *** 386,389 **** --- 387,391 ---- @var{signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice + @end group @end example diff -rc2N hello-1.0/hello.c hello-1.1/hello.c *** hello-1.0/hello.c Fri Jun 26 02:00:06 1992 --- hello-1.1/hello.c Wed Sep 16 19:30:06 1992 *************** *** 26,38 **** struct option longopts[] = ! { ! { "version", 0, 0, 'v' }, ! { "help", 0, 0, 'h' }, ! { 0, 0, 0, 0 } ! }; extern char version[]; ! char usage[] = "usage: %s [-hv] [--help] [--version]\n"; int --- 26,39 ---- struct option longopts[] = ! { ! { "version", 0, 0, 'v' }, ! { "help", 0, 0, 'h' }, ! { "traditional", 0, 0, 't' }, ! { 0, 0, 0, 0 } ! }; extern char version[]; ! char usage[] = "Usage: %s [-htv] [--help] [--traditional] [--version]\n"; int *************** *** 42,47 **** { int optc; ! while ((optc = getopt_long (argc, argv, "vh", longopts, (int *) 0)) != EOF) { switch (optc) --- 43,49 ---- { int optc; + int h = 0, v = 0, t = 0, lose = 0, z = 0; ! while ((optc = getopt_long (argc, argv, "htv", longopts, (int *) 0)) != EOF) { switch (optc) *************** *** 48,69 **** { case 'v': ! /* Print version number. */ ! fprintf (stderr, "%s\n", version); break; case 'h': ! fputs ("This is GNU Hello, THE greeting printing program.\n", ! stderr); ! fprintf (stderr, usage, argv[0]); ! fputs (" -h, --help\t\t\tPrint a summary of the options\n", stderr); ! fputs (" -v, --version\t\t\tPrint the version number\n", stderr); ! exit (1); default: ! /* Print error message and exit. */ ! fprintf (stderr, usage, argv[0]); ! exit (1); } } ! if (optind < argc) { /* Print error message and exit. */ --- 50,70 ---- { case 'v': ! v = 1; break; case 'h': ! h = 1; ! break; ! case 't': ! t = 1; ! break; default: ! lose = 1; ! break; } } ! if (optind == argc - 1 && !strcmp (argv[optind], "sailor")) ! z = 1; ! else if (lose || optind < argc) { /* Print error message and exit. */ *************** *** 72,77 **** } /* Print greeting message and exit. */ ! printf ("hello, world\n"); exit (0); } --- 73,105 ---- } + if (v) + /* Print version number. */ + fprintf (stderr, "%s\n", version); + + if (h) + { + /* Print help info and exit. */ + fputs ("This is GNU Hello, THE greeting printing program.\n", + stderr); + fprintf (stderr, usage, argv[0]); + fputs (" -h, --help\t\t\tPrint a summary of the options\n", stderr); + fputs (" -t, --traditional\t\tUse traditional greeting format\n", + + stderr); + fputs (" -v, --version\t\t\tPrint the version number\n", stderr); + exit (1); + } + /* Print greeting message and exit. */ ! if (z) ! puts ("Nothing happens here."); ! else ! { ! if (t) ! printf ("hello, world\n"); ! else ! puts ("Hello, world!"); ! } ! exit (0); } diff -rc2N hello-1.0/hello.texi hello-1.1/hello.texi *** hello-1.0/hello.texi Fri Jun 26 02:54:50 1992 --- hello-1.1/hello.texi Wed Jul 1 03:27:30 1992 *************** *** 8,12 **** @ifinfo ! This file documents the the GNU @code{hello} command for print a greeting message. --- 8,12 ---- @ifinfo ! This file documents the the GNU @code{hello} command for printing a greeting message. *************** *** 38,43 **** @title GNU Hello @subtitle The Greeting Printing Program ! @subtitle Edition 1.0, for Hello Version 1.0 ! @subtitle June 1992 @author by David MacKenzie and the GNU Hello Development Team --- 38,43 ---- @title GNU Hello @subtitle The Greeting Printing Program ! @subtitle Edition 1.01, for Hello Version 1.1 ! @subtitle 1 July 1992 @author by David MacKenzie and the GNU Hello Development Team *************** *** 69,72 **** --- 69,73 ---- @menu + * Instructions:: How to read this manual. * Copying:: How you can copy and share @code{hello}. * Overview:: Preliminary information. *************** *** 77,81 **** @end menu ! @node Copying, Overview, , Top @include gpl.texinfo --- 78,92 ---- @end menu ! @node Instructions, Copying, , Top ! @chapter How to Read This Manual ! ! To read this manual, begin at the beginning, reading from right to left ! and top to bottom, until you get to the end. Then stop. You may pause ! for a beer anywhere in the middle as well, if you wish. (Please note, ! however, that The King strongly advises against heavy use of ! prescription pharmaceuticals, based on his extensive personal and ! professional experience.) ! ! @node Copying, Overview, Instructions, Top @include gpl.texinfo *************** *** 90,95 **** GNU General Public License, users are free to share and change it. ! GNU @code{hello} was written by Mike Haertel, David MacKenzie, Jan ! Brittenson, Charles Hannum, Roland McGrath, and The King. @node Sample, Invoking hello, Overview, Top --- 101,106 ---- GNU General Public License, users are free to share and change it. ! GNU @code{hello} was written by Mike Haertel, David MacKenzie, @w{Jan ! Brittenson}, Charles Hannum, Roland McGrath, Noah Friedman, and @w{The King}. @node Sample, Invoking hello, Overview, Top *************** *** 97,101 **** @cindex sample ! Here are some realistic examples of running @code{hello}. This is the output of the command @samp{hello}: --- 108,112 ---- @cindex sample ! Here are some realistic examples of running GNU @code{hello}. This is the output of the command @samp{hello}: *************** *** 102,106 **** @example ! hello, world @end example --- 113,117 ---- @example ! Hello, world! @end example *************** *** 109,121 **** @example This is GNU Hello, THE greeting printing program. ! usage: hello [-hv] [--help] [--version] -h, --help Print a summary of the options -v, --version Print the version number @end example ! This is the output of the command @samp{hello --version}: @example ! GNU Hello, version 1.0 hello, world @end example --- 120,133 ---- @example This is GNU Hello, THE greeting printing program. ! usage: hello [-htv] [--help] [--traditional] [--version] -h, --help Print a summary of the options + -t, --traditional Use traditional greeting format -v, --version Print the version number @end example ! This is the output of the command @samp{hello --version --traditional}: @example ! GNU Hello, version 1.1 hello, world @end example *************** *** 142,145 **** --- 154,162 ---- @itemx -v Print the version number of @code{hello} on the standard error output. + + @item --traditional + @itemx -t + Use the traditional greeting message @samp{hello, world} rather + than the more modern @samp{Hello, world!}. @end table *************** *** 153,156 **** --- 170,178 ---- include in your message the output that the program produced and the output you expected.@refill + + If you have other questions, comments or suggestions about GNU + @code{hello}, contact The King via electronic mail to + @w{@samp{elvis@@graceland.gnu.ai.mit.edu}}. The King will try to help + you out, although he may not have time to fix your problems. @node Concept Index, , Problems, Top diff -rc2N hello-1.0/texinfo.tex hello-1.1/texinfo.tex *** hello-1.0/texinfo.tex Wed Jun 24 16:35:07 1992 --- hello-1.1/texinfo.tex Wed Sep 2 19:30:55 1992 *************** *** 1,5 **** %% TeX macros to handle texinfo files ! % Copyright (C) 1985, 1986, 1988, 1990, 1991 Free Software Foundation, Inc. %This texinfo.tex file is free software; you can redistribute it and/or --- 1,5 ---- %% TeX macros to handle texinfo files ! % Copyright (C) 1985, 86, 88, 90, 91, 92 Free Software Foundation, Inc. %This texinfo.tex file is free software; you can redistribute it and/or *************** *** 23,27 **** %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.73} \message{Loading texinfo package [Version \texinfoversion]:} \message{} --- 23,27 ---- %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.81} \message{Loading texinfo package [Version \texinfoversion]:} \message{} *************** *** 55,58 **** --- 55,62 ---- \newlinechar = `^^J + % Ignore a token. + % + \def\gobble#1{} + \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} *************** *** 161,186 **** {\hrule height\cornerlong depth\cornerthick width\cornerthick}} ! % Parse an argument, then pass it to #1. ! % The argument can be delimited with [...] or with "..." or braces ! % or it can be a whole line. ! % #1 should be a macro which expects ! % an ordinary undelimited TeX argument. ! ! \def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx} \def\parseargx{% ! \ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else% ! \aftergroup \parseargline % ! \fi \endgroup} {\obeyspaces % ! \gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}} \gdef\obeyedspace{\ } - \def\parseargline{\begingroup \obeylines \parsearglinex} {\obeylines % ! \gdef\parsearglinex #1^^M{\endgroup \next {#1}}} \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} --- 165,246 ---- {\hrule height\cornerlong depth\cornerthick width\cornerthick}} ! % Parse an argument, then pass it to #1. The argument is the rest of ! % the input line (except we remove a trailing comment). #1 should be a ! % macro which expects an ordinary undelimited TeX argument. ! % ! \def\parsearg#1{% ! \let\next = #1% ! \begingroup ! \obeylines ! \futurelet\temp\parseargx ! } + % If the next token is an obeyed space (from an @example environment or + % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% ! \ifx\obeyedspace\temp ! \expandafter\parseargdiscardspace ! \else ! \expandafter\parseargline ! \fi ! } + % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % ! \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} \gdef\obeyedspace{\ } {\obeylines % ! \gdef\parseargline#1^^M{% ! \endgroup % End of the group started in \parsearg. ! % ! % First remove any @c comment, then any @comment. ! % Result of each macro is put in \toks0. ! \argremovec #1\c\relax % ! \expandafter\argremovecomment \the\toks0 \comment\relax % ! % ! % Call the caller's macro, saved as \next in \parsearg. ! \expandafter\next\expandafter{\the\toks0}% ! }% ! } ! ! % Since all \c{,omment} does is throw away the argument, we can let TeX ! % do that for us. The \relax here is matched by the \relax in the call ! % in \parseargline; it could be more or less anything, its purpose is ! % just to delimit the argument to the \c. ! \def\argremovec#1\c#2\relax{\toks0 = {#1}} ! \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} ! ! % \argremovec{,omment} might leave us with trailing spaces, though; e.g., ! % @end itemize @c foo ! % will have two active spaces as part of the argument with the ! % `itemize'. Here we remove all active spaces from #1, and assign the ! % result to \toks0. ! % ! % This loses if there are any *other* active characters besides spaces ! % in the argument -- _ ^ +, for example -- since they get expanded. ! % Fortunately, Texinfo does not define any such commands. (If it ever ! % does, the catcode of the characters in questionwill have to be changed ! % here.) But this means we cannot call \removeactivespaces as part of ! % \argremovec{,omment}, since @c uses \parsearg, and thus the argument ! % that \parsearg gets might well have any character at all in it. ! % ! \def\removeactivespaces#1{% ! \begingroup ! \ignoreactivespaces ! \edef\temp{#1}% ! \global\toks0 = \expandafter{\temp}% ! \endgroup ! } ! ! % Change the active space to expand to nothing. ! % ! \begingroup ! \obeyspaces ! \gdef\ignoreactivespaces{\obeyspaces\let =\empty} ! \endgroup + \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} *************** *** 193,197 **** % @begin foo is the same as @foo, for now. ! \newhelp\EMsimple{Type to continue} \outer\def\begin{\parsearg\beginxxx} --- 253,257 ---- % @begin foo is the same as @foo, for now. ! \newhelp\EMsimple{Type to continue.} \outer\def\begin{\parsearg\beginxxx} *************** *** 202,218 **** \csname #1\endcsname\fi} ! %% @end foo executes the definition of \Efoo. ! %% foo can be delimited by doublequotes or brackets. ! \def\end{\parsearg\endxxx} - \def\endxxx #1{% ! \expandafter\ifx\csname E#1\endcsname\relax ! \expandafter\ifx\csname #1\endcsname\relax ! \errmessage{Undefined command @end #1}\else ! \errorE{#1}\fi\fi ! \csname E#1\endcsname} ! \def\errorE#1{ ! {\errhelp=\EMsimple \errmessage{@end #1 not within #1 environment}}} % Single-spacing is done by various environments. --- 262,288 ---- \csname #1\endcsname\fi} ! % @end foo executes the definition of \Efoo. ! % \def\end{\parsearg\endxxx} \def\endxxx #1{% ! \removeactivespaces{#1}% ! \edef\endthing{\the\toks0}% ! % ! \expandafter\ifx\csname E\endthing\endcsname\relax ! \expandafter\ifx\csname \endthing\endcsname\relax ! % There's no \foo, i.e., no ``environment'' foo. ! \errhelp = \EMsimple ! \errmessage{Undefined command `@end \endthing'}% ! \else ! % There is an environment foo, but it hasn't been started. ! \errhelp = \EMsimple ! \errmessage{This `@end \endthing' doesn't have a matching `@\endthing'}% ! \fi ! \else ! % Everything's ok; the right environment has been started. ! \csname E\endthing\endcsname ! \fi ! } ! % Single-spacing is done by various environments. *************** *** 270,275 **** \errmessage{@group invalid in context where filling is enabled}% \fi ! \def\Egroup{\egroup\endgroup}% \vtop\bgroup } % --- 340,363 ---- \errmessage{@group invalid in context where filling is enabled}% \fi ! % ! % If we don't do the \strut ... \nointerlineskip, we wind up with a ! % box with a large depth, and hence get (typically) \lineskip leading ! % (1pt), instead of the usual interline space (\baselineskip). See ! % p.82 of the TeXbook. ! \def\Egroup{% ! \strut % Put in the normal leading. ! \egroup % End the \vtop. ! \endgroup % End the \group. ! \nointerlineskip % We inserted our own leading. ! }% ! % \vtop\bgroup + % We do @comment here in case we are called inside an environment, + % such as @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment } % *************** *** 434,438 **** \def\ifsetxxx #1{\endgroup ! \expandafter\ifx\csname IF#1\endcsname\relax \let\temp=\ifsetfail \else \let\temp=\relax \fi \temp} --- 522,526 ---- \def\ifsetxxx #1{\endgroup ! \expandafter\ifx\csname SET#1\endcsname\relax \let\temp=\ifsetfail \else \let\temp=\relax \fi \temp} *************** *** 444,448 **** \def\ifclearxxx #1{\endgroup ! \expandafter\ifx\csname IF#1\endcsname\relax \let\temp=\relax \else \let\temp=\ifclearfail \fi \temp} --- 532,536 ---- \def\ifclearxxx #1{\endgroup ! \expandafter\ifx\csname SET#1\endcsname\relax \let\temp=\relax \else \let\temp=\ifclearfail \fi \temp} *************** *** 451,463 **** \long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces} ! % @set foo to set the flag named foo. % @clear foo to clear the flag named foo. \def\set{\parsearg\setxxx} - \def\setxxx #1{ - \expandafter\let\csname IF#1\endcsname=\set} \def\clear{\parsearg\clearxxx} \def\clearxxx #1{ ! \expandafter\let\csname IF#1\endcsname=\relax} % Some texinfo constructs that are trivial in tex --- 539,564 ---- \long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces} ! % @set foo ! % to set the flag named foo to a default value (empty) ! % @set foo REST-OF-LINE ! % to set the flag named foo to a text string REST-OF-LINE % @clear foo to clear the flag named foo. + % @value{foo} to set the text saved in foo + % + % @set command, work macro \setyyy + % + \def\setyyy#1 #2\endsetyyy{\expandafter\xdef\csname SET#1\endcsname{#2\unskip}} + % + \def\setxxx#1{\setyyy#1 \endsetyyy} \def\set{\parsearg\setxxx} \def\clear{\parsearg\clearxxx} \def\clearxxx #1{ ! \expandafter\let\csname SET#1\endcsname=\relax} ! ! \def\value#1{\expandafter ! \ifx\csname SET#1\endcsname\relax ! {\{No value for ``#1''\}} ! \else \csname SET#1\endcsname \fi} % Some texinfo constructs that are trivial in tex *************** *** 1523,1535 **** \parfillskip=0in \parskip=0in \parindent=0in % ! % \hangindent is only relevant when the page number and the entry text ! % don't fit on one line. In that case, bob suggests starting the dots ! % pretty far over on the line. ! % \hangafter is reset to 1 at the start of each paragraph. ! \hangindent=.75\hsize \noindent % ! % Don't break the text of the index entry. ! \hbox{#1}% % % If we must, put the page number on a line of its own, and fill out --- 1624,1650 ---- \parfillskip=0in \parskip=0in \parindent=0in % ! % Do not prefer a separate line ending with a hyphen to fewer lines. ! \finalhyphendemerits = 0 ! % ! % \hangindent is only relevant when the entry text and page number ! % don't both fit on one line. In that case, bob suggests starting the ! % dots pretty far over on the line. Unfortunately, a large ! % indentation looks wrong when the entry text itself is broken across ! % lines. So we use a small indentation and put up with long leaders. ! % ! % \hangafter is reset to 1 (which is the value we want) at the start ! % of each paragraph, so we need not do anything with that. ! \hangindent=2em ! % ! % When the entry text needs to be broken, just fill out the first line ! % with blank space. ! \rightskip = 0pt plus1fil ! % ! % Start a ``paragraph'' for the index entry so the line breaking ! % parameters we've set above will have an effect. \noindent % ! % Insert the text of the index entry. TeX will do line-breaking on it. ! #1% % % If we must, put the page number on a line of its own, and fill out *************** *** 1540,1544 **** % % The `\ ' here is removed by the implicit \unskip that TeX does as ! % part of (the primitive) \par. Without, a spurious underfull \hbox ensues. \ #2% The page number ends the paragraph. \par --- 1655,1660 ---- % % The `\ ' here is removed by the implicit \unskip that TeX does as ! % part of (the primitive) \par. Without it, a spurious underfull ! % \hbox ensues. \ #2% The page number ends the paragraph. \par *************** *** 1560,1564 **** %% Define two-column mode, which is used in indexes. ! %% Adapted from the TeXBook, page 416 \catcode `\@=11 --- 1676,1680 ---- %% Define two-column mode, which is used in indexes. ! %% Adapted from the TeXbook, page 416. \catcode `\@=11 *************** *** 1565,1577 **** \newbox\partialpage ! \newdimen\doublecolumnhsize \doublecolumnhsize = 3.11in ! \newdimen\doublecolumnvsize \doublecolumnvsize = 19.1in \newdimen\availdimen@ \def\begindoublecolumns{\begingroup ! \output={\global\setbox\partialpage= ! \vbox{\unvbox255\kern -\topskip \kern \baselineskip}}\eject \output={\doublecolumnout}% ! \hsize=\doublecolumnhsize \vsize=\doublecolumnvsize} \def\enddoublecolumns{\output={\balancecolumns}\eject \endgroup \pagegoal=\vsize} --- 1681,1722 ---- \newbox\partialpage ! \newdimen\doublecolumnhsize \newdimen\availdimen@ \def\begindoublecolumns{\begingroup ! % Grab any single-column material above us. ! \output = {\global\setbox\partialpage ! =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% ! \eject ! % ! % Now switch to the double-column output routine. \output={\doublecolumnout}% ! % ! % Change the page size parameters. We could do this once outside this ! % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 ! % format, but then we repeat the same computation. Repeating a couple ! % of assignments once per index is clearly meaningless for the ! % execution time, so we may as well do it once. ! % ! % First we halve the line length, less a little for the gutter between ! % the columns. We compute the gutter based on the line length, so it ! % changes automatically with the paper format. The magic constant ! % below is chosen so that the gutter has the same value (well, +- < ! % 1pt) as it did when we hard-coded it. ! % ! % We put the result in a separate register, \doublecolumhsize, so we ! % can restore it in \pagesofar, after \hsize itself has (potentially) ! % been clobbered. ! % ! \doublecolumnhsize = \hsize ! \advance\doublecolumnhsize by -.04154\hsize ! \divide\doublecolumnhsize by 2 ! \hsize = \doublecolumnhsize ! % ! % Double the \vsize as well. (We don't need a separate register here, ! % since nobody clobbers \vsize.) ! \vsize = 2\vsize ! } ! \def\enddoublecolumns{\output={\balancecolumns}\eject \endgroup \pagegoal=\vsize} *************** *** 2088,2094 **** \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\strut\raggedright ! {#2\labelspace #1}\dotfill\doshortpageno{#3}}% } \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{% --- 2233,2261 ---- \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\strut\raggedright ! {\shortchaplabel{#2}\labelspace #1}\dotfill\doshortpageno{#3}}% } + % Typeset the label for a chapter or appendix for the short contents. + % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. + % We could simplify the code here by writing out an \appendixentry + % command in the toc file for appendices, instead of using \chapentry + % for both, but it doesn't seem worth it. + \setbox0 = \hbox{\shortcontrm Appendix } + \newdimen\shortappendixwidth \shortappendixwidth = \wd0 + + \def\shortchaplabel#1{% + % We typeset #1 in a box of constant width, regardless of the text of + % #1, so the chapter titles will come out aligned. + \setbox0 = \hbox{#1}% + \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi + % + % This space should be plenty, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in in \shortchapentry above.) + \advance\dimen0 by 1.1em + \hbox to \dimen0{#1\hfil}% + } + \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{% *************** *** 2264,2274 **** \gdef\sepspaces{\def {\ }}} ! \newskip\aboveenvskipamount \aboveenvskipamount= 0pt ! \def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip ! \endgraf \ifdim\lastskip<\aboveenvskipamount ! \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}} ! \def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount ! \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi} % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. --- 2431,2443 ---- \gdef\sepspaces{\def {\ }}} ! % This space is always present above and below environments. ! \newskip\envskipamount \envskipamount = 0pt ! ! % Make spacing and below environment symmetrical. ! \def\aboveenvbreak{{\advance\envskipamount by \parskip ! \endgraf \ifdim\lastskip<\envskipamount ! \removelastskip \penalty-50 \vskip\envskipamount \fi}} ! \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. *************** *** 2357,2368 **** \parindent=0pt \obeyspaces \obeylines \tt \rawbackslash ! \def\next##1{}\next} ! ! ! \let\example=\lisp ! \def\Eexample{\Elisp} ! \let\smallexample=\lisp ! \def\Esmallexample{\Elisp} % Macro for 9 pt. examples, necessary to print with 5" lines. --- 2526,2540 ---- \parindent=0pt \obeyspaces \obeylines \tt \rawbackslash ! \gobble ! } ! % Define the \E... control sequence only if we are inside the ! % environment, so the error checking in \end will work. ! % ! % We must call \lisp last in the definition, since it reads the ! % return following the @example (or whatever) command. ! % ! \def\example{\begingroup \def\Eexample{\Elisp\endgroup}\lisp} ! \def\smallexample{\begingroup \def\Esmallexample{\Elisp\endgroup}\lisp} % Macro for 9 pt. examples, necessary to print with 5" lines. *************** *** 2503,2507 **** --- 2675,2690 ---- \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active} + + % Make control sequences which act like normal parenthesis chars. + \let\lparen = ( \let\rparen = ) + {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) + + % Be sure that we always have a definition for `(', etc. For example, + % if the fn name has parens in it, \boldbrax will not be in effect yet, + % so TeX would otherwise complain about undefined control sequence. + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} *************** *** 3081,3084 **** --- 3264,3269 ---- \catcode `\#=\other \catcode `\&=\other + % `\+ does not work, so use 43. + \catcode 43=\other % the aux file uses ' as the escape. % Turn off \ as an escape so we do not lose on *************** *** 3173,3176 **** --- 3358,3367 ---- % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) \def\smallbook{ + + % These values for secheadingskip and subsecheadingskip are + % experiments. RJC 7 Aug 1992 + \global\secheadingskip = 17pt plus 6pt minus 3pt + \global\subsecheadingskip = 14pt plus 6pt minus 3pt + \global\lispnarrowing = 0.3in \global\baselineskip 12pt *************** *** 3178,3182 **** \global\parskip 3pt plus 1pt \global\hsize = 5in - \global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in \global\vsize=7.5in \global\tolerance=700 --- 3369,3372 ---- *************** *** 3207,3216 **** \global\outervsize=\vsize \global\advance\outervsize by 0.6in - \global\doublecolumnhsize=\hsize - \global\divide\doublecolumnhsize by 2 - \global\advance\doublecolumnhsize by -0.1in - \global\doublecolumnvsize=\vsize - \global\multiply\doublecolumnvsize by 2 - \global\advance\doublecolumnvsize by 0.1in \global\pagewidth=\hsize --- 3397,3400 ---- diff -rc2N hello-1.0/version.c hello-1.1/version.c *** hello-1.0/version.c Thu Jun 25 23:56:46 1992 --- hello-1.1/version.c Wed Sep 16 20:20:42 1992 *************** *** 1 **** ! char version[] = "GNU Hello, version 1.0"; --- 1 ---- ! char version[] = "GNU Hello, version 1.1";