diff --git a/gcl-2.6.8-alloca.patch b/gcl-2.6.8-alloca.patch index d589503..d75e3f4 100644 --- a/gcl-2.6.8-alloca.patch +++ b/gcl-2.6.8-alloca.patch @@ -1,6 +1,6 @@ ---- ./configure.in.orig 2012-03-28 09:53:39.622413068 -0600 -+++ ./configure.in 2012-03-28 09:55:40.957561557 -0600 -@@ -1923,33 +1923,7 @@ +--- ./configure.in.orig 2012-07-26 09:38:23.701365523 -0600 ++++ ./configure.in 2012-07-26 09:46:52.534571240 -0600 +@@ -1926,33 +1926,7 @@ AC_SUBST(NOTIFY) # alloca @@ -35,9 +35,9 @@ # dlopen etc # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) ---- ./configure.orig 2012-03-28 09:53:39.628412580 -0600 -+++ ./configure 2012-03-28 09:55:40.964560988 -0600 -@@ -609,6 +609,7 @@ +--- ./configure.orig 2012-07-26 09:41:54.001037163 -0600 ++++ ./configure 2012-07-26 09:47:26.043518943 -0600 +@@ -609,6 +609,7 @@ O3FLAGS NIFLAGS FINAL_CFLAGS BROKEN_O4_OPT @@ -45,7 +45,7 @@ NOTIFY TCL_LIBS TCL_DL_LIBS -@@ -2045,6 +2046,60 @@ +@@ -2045,6 +2046,60 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -106,7 +106,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -@@ -7963,81 +8018,205 @@ +@@ -7966,81 +8021,205 @@ NOTIFY=$enable_notify # alloca @@ -347,8 +347,8 @@ # dlopen etc --- ./h/gclincl.h.in.orig 2012-01-16 13:08:04.000000000 -0700 -+++ ./h/gclincl.h.in 2012-03-28 09:55:40.955561719 -0600 -@@ -54,11 +54,10 @@ ++++ ./h/gclincl.h.in 2012-07-26 09:46:52.541571229 -0600 +@@ -54,11 +54,10 @@ SGC is enabled. */ #undef HAVE_ALLOCA #endif @@ -362,7 +362,7 @@ #include #endif -@@ -261,6 +260,21 @@ +@@ -261,6 +260,21 @@ SGC is enabled. */ #undef HAVE_OUTPUT_BFD #undef HAVE_BUILTIN_CLEAR_CACHE @@ -384,7 +384,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASM_SIGCONTEXT_H -@@ -366,8 +380,19 @@ +@@ -366,8 +380,19 @@ SGC is enabled. */ /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG @@ -405,8 +405,8 @@ +/* Define to `unsigned int' if does not define. */ +#undef size_t --- ./acconfig.h.orig 2012-01-16 13:07:59.000000000 -0700 -+++ ./acconfig.h 2012-03-28 09:55:40.953561881 -0600 -@@ -53,11 +53,10 @@ ++++ ./acconfig.h 2012-07-26 09:46:52.541571229 -0600 +@@ -53,11 +53,10 @@ SGC is enabled. */ #undef HAVE_ALLOCA #endif diff --git a/gcl-2.6.8-asm-signal-h.patch b/gcl-2.6.8-asm-signal-h.patch index 0827fc7..83f3161 100644 --- a/gcl-2.6.8-asm-signal-h.patch +++ b/gcl-2.6.8-asm-signal-h.patch @@ -1,6 +1,6 @@ ---- ./configure.in.orig 2012-03-28 09:57:37.877068843 -0600 -+++ ./configure.in 2012-03-28 09:58:08.359593977 -0600 -@@ -1641,7 +1641,7 @@ +--- ./configure.in.orig 2012-07-26 09:52:37.218033294 -0600 ++++ ./configure.in 2012-07-26 09:56:25.786676566 -0600 +@@ -1644,7 +1644,7 @@ AC_MSG_RESULT(no)) #if test $use = "386-linux" ; then AC_CHECK_HEADERS(asm/sigcontext.h) @@ -9,7 +9,7 @@ AC_MSG_CHECKING([for sigcontext]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -@@ -1666,6 +1666,7 @@ +@@ -1669,6 +1669,7 @@ AC_MSG_RESULT(no)) #include #endif #ifdef HAVE_ASM_SIGNAL_H @@ -17,9 +17,9 @@ #include #endif ]], ---- ./configure.orig 2012-03-28 09:57:37.885068193 -0600 -+++ ./configure 2012-03-28 09:58:08.366593408 -0600 -@@ -8311,7 +8311,8 @@ +--- ./configure.orig 2012-07-26 09:52:50.676012289 -0600 ++++ ./configure 2012-07-26 09:56:29.994669997 -0600 +@@ -8314,7 +8314,8 @@ done for ac_header in asm/signal.h do : @@ -29,7 +29,7 @@ if test "x$ac_cv_header_asm_signal_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ASM_SIGNAL_H 1 -@@ -8364,6 +8365,7 @@ +@@ -8367,6 +8368,7 @@ $as_echo_n "checking for sigcontext... " #include #endif #ifdef HAVE_ASM_SIGNAL_H diff --git a/gcl-2.6.8-extension.patch b/gcl-2.6.8-extension.patch index 9bc8748..c0b9864 100644 --- a/gcl-2.6.8-extension.patch +++ b/gcl-2.6.8-extension.patch @@ -1,6 +1,6 @@ ---- ./configure.in.orig 2012-03-28 09:55:40.957561557 -0600 -+++ ./configure.in 2012-03-28 09:56:09.658231276 -0600 -@@ -421,6 +421,7 @@ +--- ./configure.in.orig 2012-07-26 09:46:52.534571240 -0600 ++++ ./configure.in 2012-07-26 09:50:25.715238529 -0600 +@@ -421,6 +421,7 @@ if test "$LDFLAGS" = "" ; then LDFLAGS=" " fi @@ -8,7 +8,7 @@ AC_PROG_CC AC_PROG_CPP AC_SUBST(CC) -@@ -1431,7 +1432,6 @@ +@@ -1434,7 +1435,6 @@ AC_CHECK_HEADERS(float.h,AC_DEFINE(HAVE_ # AC_MSG_CHECKING([for isnormal]) AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -16,7 +16,7 @@ #include ]],[[ float f; -@@ -1449,7 +1449,6 @@ +@@ -1452,7 +1452,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_CHECKING([for isfinite]) AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -24,9 +24,9 @@ #include ]],[[ float f; ---- ./configure.orig 2012-03-28 09:55:40.964560988 -0600 -+++ ./configure 2012-03-28 09:56:09.667230545 -0600 -@@ -654,9 +654,9 @@ +--- ./configure.orig 2012-07-26 09:47:26.043518943 -0600 ++++ ./configure 2012-07-26 09:50:32.725227589 -0600 +@@ -654,9 +654,9 @@ GMPDIR GMP MAKEINFO HAVE_MALLOC_ZONE_MEMALIGN @@ -37,7 +37,7 @@ CPP OBJEXT EXEEXT -@@ -1585,48 +1585,6 @@ +@@ -1585,48 +1585,6 @@ fi } # ac_fn_c_try_cpp @@ -86,7 +86,7 @@ # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using -@@ -1714,6 +1672,48 @@ +@@ -1714,6 +1672,48 @@ fi } # ac_fn_c_check_header_mongrel @@ -135,7 +135,7 @@ # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in -@@ -3909,6 +3909,1005 @@ +@@ -3909,6 +3909,1005 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1141,7 +1141,7 @@ ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -4069,8 +5068,7 @@ +@@ -4069,8 +5068,7 @@ if test "$GCC" = "yes" ; then $as_echo_n "checking for CFLAG $TMPF... " >&6; } CFLAGS_ORI=$CFLAGS CFLAGS="$CFLAGS $TMPF" @@ -1151,7 +1151,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -@@ -4356,267 +5354,7 @@ +@@ -4356,267 +5354,7 @@ fi case $use in *macosx) @@ -1420,7 +1420,7 @@ if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : else -@@ -6941,7 +7679,6 @@ +@@ -6944,7 +7682,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1428,7 +1428,7 @@ #include int -@@ -7015,7 +7752,6 @@ +@@ -7018,7 +7755,6 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1436,8 +1436,8 @@ #include int ---- ./h/gclincl.h.in.orig 2012-03-28 09:55:40.955561719 -0600 -+++ ./h/gclincl.h.in 2012-03-28 09:56:09.657231357 -0600 +--- ./h/gclincl.h.in.orig 2012-07-26 09:46:52.541571229 -0600 ++++ ./h/gclincl.h.in 2012-07-26 09:50:25.736238496 -0600 @@ -1,4 +1,7 @@ /* h/gclincl.h.in. Generated from configure.in by autoheader. */ +/* Whether compiling on a glibc-based system */ @@ -1446,7 +1446,7 @@ /* define where the heap could begin. Normally should be the smallest value returned by sbrk(). Underestimating by 10-20 megabytes is not a problem. */ -@@ -158,7 +161,6 @@ +@@ -158,7 +161,6 @@ SGC is enabled. */ #ifdef IN_NUM_CO #ifdef HAVE_ISNORMAL @@ -1454,7 +1454,7 @@ #include #define ISNORMAL(a) isnormal(a) #else -@@ -179,7 +181,6 @@ +@@ -179,7 +181,6 @@ SGC is enabled. */ #ifdef NEED_ISFINITE #ifdef HAVE_ISFINITE @@ -1462,7 +1462,7 @@ #include #define ISFINITE(a) isfinite(a) #else -@@ -394,5 +395,37 @@ +@@ -394,5 +395,37 @@ SGC is enabled. */ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -1500,8 +1500,8 @@ + /* Define to `unsigned int' if does not define. */ #undef size_t ---- ./acconfig.h.orig 2012-03-28 09:55:40.953561881 -0600 -+++ ./acconfig.h 2012-03-28 09:56:09.656231438 -0600 +--- ./acconfig.h.orig 2012-07-26 09:46:52.541571229 -0600 ++++ ./acconfig.h 2012-07-26 09:50:25.737238495 -0600 @@ -1,3 +1,6 @@ +/* Whether compiling on a glibc-based system */ +#undef _GNU_SOURCE @@ -1509,7 +1509,7 @@ /* define where the heap could begin. Normally should be the smallest value returned by sbrk(). Underestimating by 10-20 megabytes is not a problem. */ -@@ -157,7 +160,6 @@ +@@ -157,7 +160,6 @@ SGC is enabled. */ #ifdef IN_NUM_CO #ifdef HAVE_ISNORMAL @@ -1517,7 +1517,7 @@ #include #define ISNORMAL(a) isnormal(a) #else -@@ -178,7 +180,6 @@ +@@ -178,7 +180,6 @@ SGC is enabled. */ #ifdef NEED_ISFINITE #ifdef HAVE_ISFINITE diff --git a/gcl-2.6.8-infrastructure.patch b/gcl-2.6.8-infrastructure.patch index 1668762..d00bea1 100644 --- a/gcl-2.6.8-infrastructure.patch +++ b/gcl-2.6.8-infrastructure.patch @@ -1,12 +1,12 @@ ---- ./configure.in.orig 2012-01-18 07:52:07.000000000 -0700 -+++ ./configure.in 2012-03-28 09:53:39.622413068 -0600 +--- ./configure.in.orig 2012-05-05 13:52:46.000000000 -0600 ++++ ./configure.in 2012-07-26 10:03:54.941975570 -0600 @@ -1,4 +1,4 @@ -AC_INIT() +AC_INIT AC_PREREQ([2.61]) AC_CONFIG_HEADER(h/gclincl.h) -@@ -445,7 +445,7 @@ +@@ -445,7 +445,7 @@ if test "$GCC" = "yes" ; then AC_MSG_CHECKING([for CFLAG $TMPF]) CFLAGS_ORI=$CFLAGS CFLAGS="$CFLAGS $TMPF" @@ -15,7 +15,7 @@ CFLAGS=$CFLAGS_ORI else -@@ -629,9 +629,6 @@ +@@ -629,9 +629,6 @@ fi AC_MSG_CHECKING([system version (for dynamic loading)]) if machine=`uname -m` ; then true; else machine=unknown ; fi @@ -25,7 +25,7 @@ if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version` else -@@ -672,21 +669,24 @@ +@@ -672,21 +669,24 @@ esac AC_CHECK_HEADER(unistd.h, AC_CHECK_LIB(c,sysconf, @@ -55,7 +55,7 @@ #MY_SUBDIRS= -@@ -703,17 +703,19 @@ +@@ -703,17 +703,19 @@ if test $use_gmp = yes ; then if test "$enable_dynsysgmp" = "yes" ; then AC_CHECK_HEADER(gmp.h, AC_CHECK_LIB(gmp,__gmpz_init, @@ -79,7 +79,7 @@ MPFILES= PATCHED_SYMBOLS= # if test "$use" = "m68k-linux" ; then -@@ -725,7 +727,8 @@ +@@ -725,7 +727,8 @@ if test $use_gmp = yes ; then echo "int main() {return 0;}" >>foo.c MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` rm -f foo.c, @@ -89,7 +89,7 @@ echo "Cannot use dynamic gmp lib" ,), echo "Cannot use dynamic gmp lib" ,) fi -@@ -772,7 +775,7 @@ +@@ -772,7 +775,7 @@ if test "$NEED_LOCAL_GMP" != "" ; then fi @@ -98,7 +98,7 @@ cat>foo.c < #include -@@ -782,60 +785,62 @@ +@@ -782,60 +785,62 @@ $CC -c foo.c -o foo.o if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then LEADING_UNDERSCORE=1 AC_DEFINE(LEADING_UNDERSCORE) @@ -180,7 +180,7 @@ GMP=1 AC_DEFINE(GMP) -@@ -891,10 +896,9 @@ +@@ -891,10 +896,9 @@ if test "$enable_dlopen" = "yes" ; then AC_CHECK_LIB(dl,dlopen,have_dl=1,have_dl=0) if test "$have_dl" = "0" ; then @@ -193,7 +193,7 @@ dnl LIBS and TLIBS - why not merged from the beginning? TLIBS="$TLIBS -ldl -rdynamic" -@@ -908,15 +912,17 @@ +@@ -908,15 +912,17 @@ if test "$enable_statsysbfd" = "yes" || # # Old binutils appear to need CONST defined to const # @@ -216,7 +216,7 @@ AC_MSG_RESULT(yes) AC_DEFINE(NEED_CONST), AC_MSG_ERROR([cannot use bfd]), -@@ -930,11 +936,12 @@ +@@ -930,11 +936,12 @@ if test "$enable_statsysbfd" = "yes" || # BFD boolean syntax # @@ -232,7 +232,7 @@ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_BFD_BOOLEAN), AC_MSG_RESULT(no), -@@ -945,10 +952,11 @@ +@@ -945,10 +952,11 @@ if test "$enable_statsysbfd" = "yes" || # bfd_link_info.output_bfd minimal configure change check # @@ -247,7 +247,22 @@ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_OUTPUT_BFD), AC_MSG_RESULT(no), -@@ -1073,45 +1081,47 @@ +@@ -1061,10 +1069,10 @@ case $use in + ia64*) ;; #FIXME + *) + AC_MSG_CHECKING(__builtin___clear_cache) +- AC_TRY_COMPILE([], +- [void *v,*ve; +- __builtin___clear_cache(v,ve); +- ], ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], ++ [[void *v,*ve; ++ __builtin___clear_cache(v,ve); ++ ]])], + [AC_DEFINE(HAVE_BUILTIN_CLEAR_CACHE) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no));; +@@ -1076,45 +1084,47 @@ esac # mechanism, in the PAGE macro. This offset is subtracted from # addresses, in calculating a page for an address in the heap. @@ -308,7 +323,7 @@ /* Are we little or big endian? Adapted from Harbison&Steele. */ union { -@@ -1120,7 +1130,7 @@ +@@ -1123,7 +1133,7 @@ AC_TRY_RUN([int main () { } u; u.d = 1.0; return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; @@ -317,7 +332,7 @@ AC_DEFINE(LITTLE_END), AC_MSG_RESULT(big), AC_MSG_RESULT([WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!!] -@@ -1133,15 +1143,16 @@ +@@ -1136,15 +1146,16 @@ AC_SUBST(LITTLE_END) AC_MSG_CHECKING([for sbrk]) HAVE_SBRK="" @@ -338,7 +353,7 @@ HAVE_SBRK=1 AC_MSG_RESULT(yes), AC_MSG_RESULT([no: WARNING you must be able to emulate sbrk: as on mingw or macosx]), -@@ -1153,14 +1164,15 @@ +@@ -1156,14 +1167,15 @@ if test "$HAVE_SBRK" = "1" ; then # AC_MSG_RESULT(sys/personality.h not found)) AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant]) @@ -358,7 +373,7 @@ ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0) if test "$ADDR_NO_RANDOMIZE" = "0" ; then AC_MSG_RESULT([no, assuming 0x40000]) -@@ -1170,10 +1182,11 @@ +@@ -1173,10 +1185,11 @@ if test "$HAVE_SBRK" = "1" ; then fi AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support]) @@ -372,7 +387,7 @@ if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then AC_MSG_RESULT(yes) -@@ -1183,8 +1196,9 @@ +@@ -1186,8 +1199,9 @@ if test "$HAVE_SBRK" = "1" ; then fi AC_MSG_CHECKING([that sbrk is (now) non-random]) @@ -384,7 +399,7 @@ int main(int argc,char * argv[],char * envp[]) { FILE *f; #ifdef CAN_UNRANDOMIZE_SBRK -@@ -1192,13 +1206,13 @@ +@@ -1195,13 +1209,13 @@ if test "$HAVE_SBRK" = "1" ; then #endif if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); @@ -403,7 +418,7 @@ int main(int argc,char * argv[],char * envp[]) { FILE *f; #ifdef CAN_UNRANDOMIZE_SBRK -@@ -1206,10 +1220,9 @@ +@@ -1209,10 +1223,9 @@ if test "$HAVE_SBRK" = "1" ; then #endif if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); @@ -416,7 +431,7 @@ fi if test "$SBRK" = "$SBRK1" ; then AC_MSG_RESULT(yes) -@@ -1224,15 +1237,17 @@ +@@ -1227,15 +1240,17 @@ if test "$HAVE_SBRK" = "1" ; then fi # pagewidth @@ -438,7 +453,7 @@ AC_MSG_RESULT($PAGEWIDTH) AC_DEFINE_UNQUOTED(PAGEWIDTH,$PAGEWIDTH) AC_SUBST(PAGEWIDTH) -@@ -1240,11 +1255,12 @@ +@@ -1243,11 +1258,12 @@ AC_SUBST(PAGEWIDTH) old_LDFLAGS="$LDFLAGS" LDFLAGS="$TLDFLAGS" @@ -455,7 +470,7 @@ int main(int argc,char * argv[],char *envp[]) { -@@ -1269,36 +1285,35 @@ +@@ -1272,36 +1288,35 @@ main(int argc,char * argv[],char *envp[] #endif fclose(fp); return 0; @@ -503,7 +518,7 @@ AC_MSG_RESULT(yes)], AC_MSG_RESULT(no), AC_MSG_RESULT(no) -@@ -1467,7 +1482,6 @@ +@@ -1470,7 +1485,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- @@ -511,7 +526,7 @@ tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then -@@ -1504,8 +1518,8 @@ +@@ -1507,8 +1521,8 @@ fi AC_SUBST(RL_OBJS) AC_SUBST(RL_LIB) @@ -522,7 +537,7 @@ #include #include #include -@@ -1522,24 +1536,25 @@ +@@ -1525,24 +1539,25 @@ AC_TRY_LINK([ #include /* struct in_addr, struct sockaddr_in */ #include /* inet_ntoa() */ #include /* gethostbyname() */ @@ -555,7 +570,7 @@ [AC_DEFINE(LISTEN_USE_FCNTL) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) -@@ -1560,7 +1575,7 @@ +@@ -1563,7 +1578,7 @@ AC_CHECK_FUNC(_cleanup, [AC_DEFINE(USE_C AC_SUBST(USE_CLEANUP) gcl_ok=no @@ -564,7 +579,7 @@ if test $gcl_ok = yes ; then AC_DEFINE(ENDIAN_ALREADY_DEFINED) fi -@@ -1592,32 +1607,32 @@ +@@ -1595,32 +1610,32 @@ case $system in esac @@ -612,7 +627,7 @@ [AC_DEFINE(HAVE_SIGEMT) AC_SUBST(HAVE_SIGEMT) AC_MSG_RESULT(yes)], -@@ -1629,12 +1644,13 @@ +@@ -1632,12 +1647,13 @@ AC_MSG_RESULT(no)) #if test $use = "386-linux" ; then AC_CHECK_HEADERS(asm/sigcontext.h) AC_CHECK_HEADERS(asm/signal.h) @@ -631,7 +646,7 @@ [ sigcontext_works=1; AC_DEFINE(SIGNAL_H_HAS_SIGCONTEXT) -@@ -1645,18 +1661,19 @@ +@@ -1648,18 +1664,19 @@ AC_MSG_RESULT(no)) AC_MSG_RESULT(sigcontext NOT in signal.h)] ) if test "$sigcontext_works" = 0 ; then @@ -656,7 +671,7 @@ [ AC_DEFINE(HAVE_SIGCONTEXT) AC_MSG_RESULT(sigcontext in asm files) -@@ -1766,6 +1783,8 @@ +@@ -1769,6 +1786,8 @@ AC_SUBST(INFO_DIR) if test "$enable_tcltk" = "yes" ; then @@ -665,7 +680,7 @@ AC_MSG_CHECKING([for tcl/tk]) -@@ -1786,9 +1805,6 @@ +@@ -1789,9 +1808,6 @@ if { [file exists [file join [set dir] t EOF #cp conftest.tcl foo.tcl @@ -675,7 +690,7 @@ if test "${TCLSH}" = "" ; then true ; else TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` fi -@@ -1862,7 +1878,6 @@ +@@ -1865,7 +1881,6 @@ fi fi @@ -683,7 +698,7 @@ if test "$have_ieee" = "0" ; then TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` fi -@@ -1906,15 +1921,18 @@ +@@ -1909,15 +1924,18 @@ AC_SUBST(NOTIFY) # the time handling for unixtime, add timezone @@ -706,7 +721,7 @@ ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) if test $gcl_ok = yes ; then AC_MSG_RESULT(yes) -@@ -1933,8 +1951,6 @@ +@@ -1936,8 +1954,6 @@ if test $gcl_ok = no ; then AC_MSG_R @@ -715,7 +730,7 @@ # dlopen etc # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) # then dlload("foo.o") a lisp file can refer to things in libX.so -@@ -1958,7 +1974,7 @@ +@@ -1961,7 +1977,7 @@ if test $gcl_ok = no ; then AC_MSG_R # redhat/cygnus released for some reason a buggy version of gcc, # which no one else released. Catch that here. @@ -724,7 +739,7 @@ if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null then BROKEN_O4_OPT=1 -@@ -1993,7 +2009,8 @@ +@@ -1996,7 +2012,8 @@ AC_SUBST(GNU_LD) if test -f h/$use.defs ; then AC_SUBST(use) @@ -734,9 +749,9 @@ echo makedefc cat makedefc ---- ./configure.orig 2012-01-18 07:52:04.000000000 -0700 -+++ ./configure 2012-03-28 09:53:39.628412580 -0600 -@@ -651,10 +651,10 @@ +--- ./configure.orig 2012-05-05 13:52:44.000000000 -0600 ++++ ./configure 2012-07-26 10:04:09.613952671 -0600 +@@ -651,10 +651,10 @@ X_LIBS XMKMF GMPDIR GMP @@ -748,7 +763,7 @@ AWK CPP OBJEXT -@@ -4023,7 +4023,14 @@ +@@ -4023,7 +4023,14 @@ See \`config.log' for more details" "$LI else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -764,7 +779,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : TCFLAGS="$TCFLAGS $TMPF";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -4269,51 +4276,6 @@ +@@ -4269,51 +4276,6 @@ fi $as_echo_n "checking system version (for dynamic loading)... " >&6; } if machine=`uname -m` ; then true; else machine=unknown ; fi @@ -816,7 +831,7 @@ if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version` else -@@ -4711,22 +4673,29 @@ +@@ -4711,22 +4673,29 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sysconf" >&5 $as_echo "$ac_cv_lib_c_sysconf" >&6; } if test "x$ac_cv_lib_c_sysconf" = xyes; then : @@ -852,7 +867,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : hz=`cat conftest1` -@@ -4750,6 +4719,117 @@ +@@ -4750,6 +4719,117 @@ fi @@ -970,7 +985,7 @@ #MY_SUBDIRS= -@@ -4803,25 +4883,36 @@ +@@ -4803,25 +4883,36 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then : @@ -1013,7 +1028,7 @@ MPFILES= PATCHED_SYMBOLS= # if test "$use" = "m68k-linux" ; then -@@ -4834,7 +4925,8 @@ +@@ -4834,7 +4925,8 @@ if ac_fn_c_try_run "$LINENO"; then : MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` rm -f foo.c else @@ -1023,7 +1038,7 @@ fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext -@@ -4894,8 +4986,8 @@ +@@ -4894,8 +4986,8 @@ $as_echo_n "checking use_gmp=yes, doing fi @@ -1034,7 +1049,7 @@ cat>foo.c < #include -@@ -4906,45 +4998,53 @@ +@@ -4906,45 +4998,53 @@ if nm foo.o |grep " U " | grep "_cos" >/ LEADING_UNDERSCORE=1 $as_echo "#define LEADING_UNDERSCORE 1" >>confdefs.h @@ -1103,7 +1118,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : mpsize=`cat conftest1` -@@ -4956,8 +5056,7 @@ +@@ -4956,8 +5056,7 @@ rm -f core *.core core.conftest.* gmon.o fi if test "$mpsize" = "0" ; then @@ -1113,7 +1128,7 @@ fi cat >>confdefs.h <<_ACEOF #define MP_LIMB_BYTES $mpsize -@@ -4966,23 +5065,31 @@ +@@ -4966,23 +5065,31 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpsize" >&5 $as_echo "$mpsize" >&6; } @@ -1150,7 +1165,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define __SHORT_LIMB 1" >>confdefs.h -@@ -4996,23 +5103,31 @@ +@@ -4996,23 +5103,31 @@ rm -f core *.core core.conftest.* gmon.o conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -1187,7 +1202,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define __LONG_LONG_LIMB 1" >>confdefs.h -@@ -5351,8 +5466,7 @@ +@@ -5351,8 +5466,7 @@ else fi if test "$have_dl" = "0" ; then @@ -1197,7 +1212,7 @@ fi TLIBS="$TLIBS -ldl -rdynamic" -@@ -5410,9 +5524,17 @@ +@@ -5410,9 +5524,17 @@ $as_echo_n "checking if need to define C else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1217,7 +1232,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -@@ -5423,10 +5545,18 @@ +@@ -5423,10 +5545,18 @@ else else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1238,7 +1253,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -5459,18 +5589,26 @@ +@@ -5459,18 +5589,26 @@ fi # BFD boolean syntax # @@ -1269,7 +1284,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -5499,9 +5637,17 @@ +@@ -5499,9 +5637,17 @@ $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1289,7 +1304,24 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -5899,26 +6045,34 @@ +@@ -5832,14 +5978,14 @@ case $use in + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __builtin___clear_cache" >&5 + $as_echo_n "checking __builtin___clear_cache... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int + main () + { + void *v,*ve; +- __builtin___clear_cache(v,ve); ++ __builtin___clear_cache(v,ve); + + ; + return 0; +@@ -5902,26 +6048,34 @@ $as_echo_n "checking sizeof struct contb # work around MSYS pwd result incompatibility if test "$use" = "mingw" ; then if test "$cross_compiling" = yes; then : @@ -1329,7 +1361,7 @@ fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext -@@ -5926,26 +6080,34 @@ +@@ -5929,26 +6083,34 @@ fi else if test "$cross_compiling" = yes; then : @@ -1369,7 +1401,7 @@ fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext -@@ -5972,7 +6134,11 @@ +@@ -5975,7 +6137,11 @@ $as_echo "WARNING: ASSUMING LITTLE ENDIA else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1382,7 +1414,7 @@ /* Are we little or big endian? Adapted from Harbison&Steele. */ union { -@@ -5981,6 +6147,9 @@ +@@ -5984,6 +6150,9 @@ int main () { } u; u.d = 1.0; return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; @@ -1392,7 +1424,7 @@ } _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -6011,15 +6180,23 @@ +@@ -6014,15 +6183,23 @@ $as_echo "no: WARNING you must be able t else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1420,7 +1452,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : HAVE_SBRK=1 -@@ -6046,14 +6223,22 @@ +@@ -6049,14 +6226,22 @@ $as_echo_n "checking for ADDR_NO_RANDOMI else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1447,7 +1479,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : ADDR_NO_RANDOMIZE=`cat conftest1` -@@ -6083,7 +6268,8 @@ +@@ -6086,7 +6271,8 @@ $as_echo_n "checking for personality(ADD else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1457,7 +1489,7 @@ int main(int argc,char *argv[],char *envp[]) { #include "h/unrandomize.h" return 0;} -@@ -6115,8 +6301,9 @@ +@@ -6118,8 +6304,9 @@ $as_echo_n "checking that sbrk is (now) else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1469,7 +1501,7 @@ int main(int argc,char * argv[],char * envp[]) { FILE *f; #ifdef CAN_UNRANDOMIZE_SBRK -@@ -6136,17 +6323,16 @@ +@@ -6139,17 +6326,16 @@ rm -f core *.core core.conftest.* gmon.o fi if test "$SBRK" = "0" ; then @@ -1491,7 +1523,7 @@ int main(int argc,char * argv[],char * envp[]) { FILE *f; #ifdef CAN_UNRANDOMIZE_SBRK -@@ -6166,9 +6352,7 @@ +@@ -6169,9 +6355,7 @@ rm -f core *.core core.conftest.* gmon.o fi if test "$SBRK1" = "0" ; then @@ -1502,7 +1534,7 @@ fi if test "$SBRK" = "$SBRK1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -6192,14 +6376,23 @@ +@@ -6195,14 +6379,23 @@ if test "$cross_compiling" = yes; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1529,7 +1561,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : PAGEWIDTH=`cat conftest1` -@@ -6221,17 +6414,18 @@ +@@ -6224,17 +6417,18 @@ _ACEOF old_LDFLAGS="$LDFLAGS" LDFLAGS="$TLDFLAGS" @@ -1552,7 +1584,7 @@ int main(int argc,char * argv[],char *envp[]) { -@@ -6276,21 +6470,28 @@ +@@ -6279,21 +6473,28 @@ $as_echo "got $dbegin" >&6; } LDFLAGS="$old_LDFLAGS" @@ -1584,7 +1616,7 @@ } _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -6312,8 +6513,8 @@ +@@ -6315,8 +6516,8 @@ $as_echo "got $cstack_address" >&6; } @@ -1595,7 +1627,7 @@ if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -@@ -6321,13 +6522,19 @@ +@@ -6324,13 +6525,19 @@ $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1617,7 +1649,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h -@@ -6833,8 +7040,6 @@ +@@ -6836,8 +7043,6 @@ fi # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- @@ -1626,7 +1658,7 @@ tcl_checkBoth=0 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : -@@ -7046,8 +7251,8 @@ +@@ -7049,8 +7254,8 @@ fi @@ -1637,7 +1669,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -7071,7 +7276,7 @@ +@@ -7074,7 +7279,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ int main () { @@ -1646,7 +1678,7 @@ gethostbyname("jil"); socket(AF_INET, SOCK_STREAM, 0); -@@ -7092,10 +7297,11 @@ +@@ -7095,10 +7300,11 @@ rm -f core conftest.err conftest.$ac_obj conftest$ac_exeext conftest.$ac_ext @@ -1660,7 +1692,7 @@ #include #include -@@ -7171,7 +7377,7 @@ +@@ -7174,7 +7380,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& $EGREP "LITTLE_ENDIAN" >/dev/null 2>&1; then : gcl_ok=yes else @@ -1669,7 +1701,7 @@ fi rm -f conftest* -@@ -7215,17 +7421,17 @@ +@@ -7218,17 +7424,17 @@ $as_echo "O_NONBLOCK" >&6; } esac @@ -1691,7 +1723,7 @@ ; return 0; } -@@ -7242,17 +7448,17 @@ +@@ -7245,17 +7451,17 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -1713,7 +1745,7 @@ ; return 0; } -@@ -7270,17 +7476,17 @@ +@@ -7273,17 +7479,17 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -1735,7 +1767,7 @@ ; return 0; } -@@ -7325,11 +7531,12 @@ +@@ -7328,11 +7534,12 @@ fi done @@ -1752,7 +1784,7 @@ int main () -@@ -7357,11 +7564,12 @@ +@@ -7360,11 +7567,12 @@ $as_echo "sigcontext NOT in signal.h" >& fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$sigcontext_works" = 0 ; then @@ -1768,7 +1800,7 @@ #ifdef HAVE_ASM_SIGCONTEXT_H #include #endif -@@ -7540,26 +7748,41 @@ +@@ -7543,26 +7751,41 @@ $as_echo "$INFO_DIR" >&6; } if test "$enable_tcltk" = "yes" ; then @@ -1828,7 +1860,7 @@ # Extract the first word of "tclsh", so it can be a program name with args. set dummy tclsh; ac_word=$2 -@@ -7599,7 +7822,26 @@ +@@ -7602,7 +7825,26 @@ $as_echo "no" >&6; } fi @@ -1856,7 +1888,7 @@ if test "${TCLSH}" = "" ; then true ; else TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` -@@ -7674,42 +7916,6 @@ +@@ -7677,42 +7919,6 @@ fi fi @@ -1899,7 +1931,7 @@ if test "$have_ieee" = "0" ; then TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` fi -@@ -7755,14 +7961,23 @@ +@@ -7758,14 +7964,23 @@ NOTIFY=$enable_notify # the time handling for unixtime, add timezone @@ -1926,7 +1958,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -7784,8 +7999,16 @@ +@@ -7787,8 +8002,16 @@ else else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -1945,7 +1977,7 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -7817,8 +8040,6 @@ +@@ -7820,8 +8043,6 @@ $as_echo "no" >&6; } ; fi @@ -1954,7 +1986,7 @@ # dlopen etc # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) # then dlload("foo.o") a lisp file can refer to things in libX.so -@@ -7842,8 +8063,8 @@ +@@ -7845,8 +8066,8 @@ $as_echo "no" >&6; } ; fi # redhat/cygnus released for some reason a buggy version of gcc, # which no one else released. Catch that here. @@ -1965,7 +1997,7 @@ if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null then BROKEN_O4_OPT=1 -@@ -7883,7 +8104,7 @@ +@@ -7886,7 +8107,7 @@ if test -f h/$use.defs ; then ac_config_files="$ac_config_files makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp" @@ -1975,7 +2007,7 @@ # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. --- ./install.sh.orig 1999-12-06 15:43:54.000000000 -0700 -+++ ./install.sh 2012-01-09 20:36:31.000000000 -0700 ++++ ./install.sh 2012-07-26 09:59:36.960378201 -0600 @@ -1,19 +1,38 @@ -#! /bin/sh -# @@ -1983,7 +2015,7 @@ # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + -+scriptversion=2009-04-28.21; # UTC ++scriptversion=2011-01-19.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the @@ -2028,7 +2060,7 @@ # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it -@@ -21,230 +40,481 @@ +@@ -21,230 +40,488 @@ # # This script is compatible with the BSD install script, but was written # from scratch. @@ -2210,6 +2242,10 @@ + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 ++ # Protect names problematic for `test' and other utilities. ++ case $dst_arg in ++ -* | [=\(\)!]) dst_arg=./$dst_arg;; ++ esac + shift;; + + -T) no_target_directory=true;; @@ -2246,6 +2282,10 @@ + fi + shift # arg + dst_arg=$arg ++ # Protect names problematic for `test' and other utilities. ++ case $dst_arg in ++ -* | [=\(\)!]) dst_arg=./$dst_arg;; ++ esac + done fi @@ -2289,7 +2329,11 @@ - true - fi +if test -z "$dir_arg"; then -+ trap '(exit $?); exit' 1 2 13 15 ++ do_exit='(exit $ret); exit $ret' ++ trap "ret=129; $do_exit" 1 ++ trap "ret=130; $do_exit" 2 ++ trap "ret=141; $do_exit" 13 ++ trap "ret=143; $do_exit" 15 -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic @@ -2327,9 +2371,9 @@ -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +for src +do -+ # Protect names starting with `-'. ++ # Protect names problematic for `test' and other utilities. + case $src in -+ -*) src=./$src;; ++ -* | [=\(\)!]) src=./$src;; + esac -# Make sure that the destination directory exists. @@ -2363,17 +2407,9 @@ + echo "$0: no destination specified." >&2 + exit 1 + fi - --pathcomp='' + dst=$dst_arg -+ # Protect names starting with `-'. -+ case $dst in -+ -*) dst=./$dst;; -+ esac --while [ $# -ne 0 ] ; do -- pathcomp="${pathcomp}${1}" -- shift +-pathcomp='' + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then @@ -2412,14 +2448,17 @@ + s/.*/./; q' + ` -- if [ ! -d "${pathcomp}" ] ; -- then -- $mkdirprog "${pathcomp}" +-while [ $# -ne 0 ] ; do +- pathcomp="${pathcomp}${1}" +- shift + test -d "$dstdir" + dstdir_status=$? + fi + fi -+ + +- if [ ! -d "${pathcomp}" ] ; +- then +- $mkdirprog "${pathcomp}" + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then @@ -2523,7 +2562,7 @@ - fi + case $dstdir in + /*) prefix='/';; -+ -*) prefix='./';; ++ [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac @@ -2545,7 +2584,7 @@ + + for d + do -+ test -z "$d" && continue ++ test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then @@ -2680,19 +2719,22 @@ +# time-stamp-end: "; # UTC" +# End: --- ./info/texinfo.tex.orig 2002-10-26 09:14:15.000000000 -0600 -+++ ./info/texinfo.tex 2012-01-09 20:36:31.000000000 -0700 -@@ -3,15 +3,16 @@ ++++ ./info/texinfo.tex 2012-07-26 09:59:36.968378189 -0600 +@@ -1,17 +1,18 @@ + % texinfo.tex -- TeX macros to handle Texinfo files. +-% ++% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{1999-09-25.10} -+\def\texinfoversion{2008-04-18.10} ++\def\texinfoversion{2012-01-03.09} % -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 -% Free Software Foundation, Inc. -+% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, ++% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -+% 2007, 2008 Free Software Foundation, Inc. ++% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. % -% This texinfo.tex file is free software; you can redistribute it and/or +% This texinfo.tex file is free software: you can redistribute it and/or @@ -2760,12 +2802,11 @@ \message{Loading texinfo [version \texinfoversion]:} -@@ -66,7 +65,14 @@ +@@ -66,7 +65,13 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} -% Save some parts of plain tex whose names we will redefine. -+ +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. @@ -2776,7 +2817,7 @@ \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c -@@ -76,23 +82,36 @@ +@@ -76,30 +81,46 @@ \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! @@ -2791,6 +2832,7 @@ +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ ++\let\ptexraggedright=\raggedright \let\ptexrbrace=\} +\let\ptexslash=\/ \let\ptexstar=\* @@ -2803,6 +2845,7 @@ -\message{Basics,} -\chardef\other=12 +\let\ptextop=\top ++{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. @@ -2820,7 +2863,17 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi -@@ -131,44 +150,119 @@ ++\ifx\putworderror\undefined \gdef\putworderror{error}\fi + \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi + \ifx\putwordin\undefined \gdef\putwordin{in}\fi +-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi ++\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi ++\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi + \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi + \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi + \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +@@ -131,46 +152,101 @@ \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi @@ -2833,15 +2886,18 @@ +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. ++\chardef\ampChar = `\& +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! ++\chardef\hashChar = `\# +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; ++\chardef\slashChar = `\/ +\chardef\underChar = `\_ % Ignore a token. @@ -2878,36 +2934,7 @@ +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% -+\def\finalout{\overfullrule=0pt} -+ -+% @| inserts a changebar to the left of the current line. It should -+% surround any changed text. This approach does *not* work if the -+% change spans more than two lines of output. To handle that, we would -+% have adopt a much more difficult approach (putting marks into the main -+% vertical list for the beginning and end of each change). -+% -+\def\|{% -+ % \vadjust can only be used in horizontal mode. -+ \leavevmode -+ % -+ % Append this vertical mode material after the current line in the output. -+ \vadjust{% -+ % We want to insert a rule with the height and depth of the current -+ % leading; that is exactly what \strutbox is supposed to record. -+ \vskip-\baselineskip -+ % -+ % \vadjust-items are inserted at the left edge of the type. So -+ % the \llap here moves out into the left-hand margin. -+ \llap{% -+ % -+ % For a thicker or thinner bar, change the `1pt'. -+ \vrule height\baselineskip width1pt -+ % -+ % This is the space between the bar and the text. -+ \hskip 12pt -+ }% -+ }% -+} ++\def\finalout{\overfullrule=0pt } + % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, @@ -2939,7 +2966,7 @@ + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen -+ \ifx\eTeXversion\undefined\else % etex gives us more logging ++ \ifx\eTeXversion\thisisundefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 @@ -2950,6 +2977,14 @@ + \errorcontextlines16 }% -\fi + +-% For @cropmarks command. ++% @errormsg{MSG}. Do the index-like expansions on MSG, but if things ++% aren't perfect, it's not the end of the world, being an error message, ++% after all. ++% ++\def\errormsg{\begingroup \indexnofonts \doerrormsg} ++\def\doerrormsg#1{\errmessage{#1}} + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. @@ -2960,10 +2995,11 @@ + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} - - % For @cropmarks command. ++ % Do @cropmarks to get crop marks. -@@ -184,6 +278,50 @@ + % + \newif\ifcropmarks +@@ -184,6 +260,50 @@ \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in @@ -3014,7 +3050,7 @@ % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} -@@ -201,7 +339,9 @@ +@@ -201,7 +321,9 @@ % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). @@ -3024,7 +3060,7 @@ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% -@@ -209,11 +349,18 @@ +@@ -209,11 +331,18 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % @@ -3036,7 +3072,7 @@ + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; -+ % it needs to be ++ % it needs to be + % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. @@ -3045,7 +3081,7 @@ \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin -@@ -237,14 +384,12 @@ +@@ -237,14 +366,12 @@ \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. @@ -3062,7 +3098,7 @@ \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup -@@ -262,7 +407,7 @@ +@@ -262,7 +389,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox @@ -3071,7 +3107,7 @@ \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } -@@ -275,7 +420,7 @@ +@@ -275,7 +402,7 @@ % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi @@ -3080,7 +3116,7 @@ \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } -@@ -295,143 +440,161 @@ +@@ -295,195 +422,161 @@ % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % @@ -3303,33 +3339,21 @@ - \errmessage{This `@end #1' doesn't have a matching `@#1'}% + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% -+} -+\def\inenvironment#1{% -+ \ifx#1\empty -+ out of any environment% -+ \else -+ in environment \expandafter\string#1% -+ \fi } - +- -% Define the control sequence \E#1 to give an unmatched @end error. -+% @end foo executes the definition of \Efoo. -+% But first, it executes a specialized version of \checkenv - % +-% -\def\defineunmatchedend#1{% - \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% -+\parseargdef\end{% -+ \if 1\csname iscond.#1\endcsname ++\def\inenvironment#1{% ++ \ifx#1\empty ++ outside of any environment% + \else -+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 -+ \expandafter\checkenv\csname#1\endcsname -+ \csname E#1\endcsname -+ \endgroup ++ in environment \expandafter\string#1% + \fi } -+\newhelp\EMsimple{Press RETURN to continue.} - +- -% Single-spacing is done by various environments (specifically, in -% \nonfillstart and \quotations). -\newskip\singlespaceskip \singlespaceskip = 12.5pt @@ -3339,89 +3363,75 @@ - %{\advance \baselineskip by -\singlespaceskip - %\kern \baselineskip}% - \setleading \singlespaceskip --} - - %% Simple single-character @ commands ++% @end foo executes the definition of \Efoo. ++% But first, it executes a specialized version of \checkenv ++% ++\parseargdef\end{% ++ \if 1\csname iscond.#1\endcsname ++ \else ++ % The general wording of \badenverr may not be ideal. ++ \expandafter\checkenv\csname#1\endcsname ++ \csname E#1\endcsname ++ \endgroup ++ \fi + } -@@ -452,16 +615,22 @@ - \let\{=\mylbrace - \let\}=\myrbrace - \begingroup +-%% Simple single-character @ commands +- +-% @@ prints an @ +-% Kludge this until the fonts are right (grr). +-\def\@{{\tt\char64}} +- +-% This is turned off because it was never documented +-% and you can use @w{...} around a quote to suppress ligatures. +-%% Define @` and @' to be the same as ` and ' +-%% but suppressing ligatures. +-%\def\`{{`}} +-%\def\'{{'}} +- +-% Used to generate quoted braces. +-\def\mylbrace {{\tt\char123}} +-\def\myrbrace {{\tt\char125}} +-\let\{=\mylbrace +-\let\}=\myrbrace +-\begingroup - % Definitions to produce actual \{ & \} command in an index. - \catcode`\{ = 12 \catcode`\} = 12 -+ % Definitions to produce \{ and \} commands for indices, -+ % and @{ and @} for the aux/toc files. -+ \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 +- \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\@ = 0 \catcode`\\ = 12 - @gdef@lbracecmd[\{]% - @gdef@rbracecmd[\}]% -@endgroup -+ \catcode`\! = 0 \catcode`\\ = \other -+ !gdef!lbracecmd[\{]% -+ !gdef!rbracecmd[\}]% -+ !gdef!lbraceatcmd[@{]% -+ !gdef!rbraceatcmd[@}]% -+!endgroup -+ -+% @comma{} to avoid , parsing problems. -+\let\comma = , - - % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +- +-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. -+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. - \let\, = \c - \let\dotaccent = \. - \def\ringaccent#1{{\accent23 #1}} -@@ -469,22 +638,43 @@ - \let\ubaraccent = \b - \let\udotaccent = \d +-\let\, = \c +-\let\dotaccent = \. +-\def\ringaccent#1{{\accent23 #1}} +-\let\tieaccent = \t +-\let\ubaraccent = \b +-\let\udotaccent = \d ++\newhelp\EMsimple{Press RETURN to continue.} -% Other special characters: @questiondown @exclamdown -% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. -+% Other special characters: @questiondown @exclamdown @ordf @ordm -+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. - \def\questiondown{?`} - \def\exclamdown{!`} -+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - - % Dotless i and dotless j, used for accents. - \def\imacro{i} - \def\jmacro{j} - \def\dotless#1{% - \def\temp{#1}% +-\def\questiondown{?`} +-\def\exclamdown{!`} +- +-% Dotless i and dotless j, used for accents. +-\def\imacro{i} +-\def\jmacro{j} +-\def\dotless#1{% +- \def\temp{#1}% - \ifx\temp\imacro \ptexi - \else\ifx\temp\jmacro \j -+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi -+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi - } +- \else \errmessage{@dotless can be used only with i or j}% +- \fi\fi +-} -+% The \TeX{} logo, as in plain, but resetting the spacing so that a -+% period following counts as ending a sentence. (Idea found in latex.) -+% -+\edef\TeX{\TeX \spacefactor=1000 } -+ -+% @LaTeX{} logo. Not quite the same results as the definition in -+% latex.ltx, since we use a different font for the raised A; it's most -+% convenient for us to use an explicitly smaller font, rather than using -+% the \scriptstyle font (since we don't reset \scriptstyle and -+% \scriptscriptstyle). -+% -+\def\LaTeX{% -+ L\kern-.36em -+ {\setbox0=\hbox{T}% -+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% -+ \kern-.15em -+ \TeX -+} -+ % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space - % at the beginning of a line will start with \penalty -- and -@@ -503,14 +693,32 @@ +@@ -503,14 +596,32 @@ % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} @@ -3441,7 +3451,7 @@ +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. -+% ++% +\def\onword{on} +\def\offword{off} +% @@ -3451,13 +3461,13 @@ + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple -+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% ++ \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would -@@ -525,47 +733,24 @@ +@@ -525,47 +636,24 @@ % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % @@ -3519,7 +3529,7 @@ % Do @comment since 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 -@@ -575,6 +760,32 @@ +@@ -575,6 +663,32 @@ \comment } % @@ -3552,28 +3562,27 @@ % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % -@@ -587,10 +798,8 @@ +@@ -587,18 +701,7 @@ where each line of input produces a line \newdimen\mil \mil=0.001in -\def\need{\parsearg\needx} - - % Old definition--didn't work. +-% Old definition--didn't work. -%\def\needx #1{\par % -+%\parseargdef\need{\par % - %% This method tries to make TeX break the page naturally - %% if the depth of the box does not fit. - %{\baselineskip=0pt% -@@ -598,7 +807,7 @@ - %\prevdepth=-1000pt - %}} - +-%% This method tries to make TeX break the page naturally +-%% if the depth of the box does not fit. +-%{\baselineskip=0pt% +-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak +-%\prevdepth=-1000pt +-%}} +- -\def\needx#1{% +\parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par -@@ -637,37 +846,11 @@ +@@ -637,37 +740,11 @@ where each line of input produces a line \fi } @@ -3613,7 +3622,7 @@ % \def\page{\par\vfill\supereject} -@@ -679,57 +862,131 @@ +@@ -679,57 +756,165 @@ where each line of input produces a line \newskip\exdentamount % This defn is used inside fill environments such as @defun. @@ -3636,7 +3645,7 @@ - \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion -+% class. WHICH is `l' or `r'. ++% class. WHICH is `l' or `r'. Not documented, written for gawk manual. +% \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} @@ -3684,7 +3693,36 @@ +} -%\hbox{{\rm#1}}\hfil\break}} -- ++% @| inserts a changebar to the left of the current line. It should ++% surround any changed text. This approach does *not* work if the ++% change spans more than two lines of output. To handle that, we would ++% have adopt a much more difficult approach (putting marks into the main ++% vertical list for the beginning and end of each change). This command ++% is not documented, not supported, and doesn't work. ++% ++\def\|{% ++ % \vadjust can only be used in horizontal mode. ++ \leavevmode ++ % ++ % Append this vertical mode material after the current line in the output. ++ \vadjust{% ++ % We want to insert a rule with the height and depth of the current ++ % leading; that is exactly what \strutbox is supposed to record. ++ \vskip-\baselineskip ++ % ++ % \vadjust-items are inserted at the left edge of the type. So ++ % the \llap here moves out into the left-hand margin. ++ \llap{% ++ % ++ % For a thicker or thinner bar, change the `1pt'. ++ \vrule height\baselineskip width1pt ++ % ++ % This is the space between the bar and the text. ++ \hskip 12pt ++ }% ++ }% ++} + -% @include file insert text of that file as input. -% Allow normal characters that we make active in the argument (a file name). -\def\include{\begingroup @@ -3711,6 +3749,8 @@ + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion ++ \indexnofonts % Allow `@@' and other weird things in file names. ++ \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes @@ -3729,6 +3769,8 @@ + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other ++ \catcode`\`=\other ++ \catcode`\'=\other +} -\def\thisfile{} @@ -3783,7 +3825,7 @@ % @comment ...line which is ignored... % @c is the same as @comment -@@ -744,13 +1001,13 @@ +@@ -744,13 +929,13 @@ where each line of input produces a line % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. @@ -3801,7 +3843,7 @@ \def\temp{#1}% \ifx\temp\asisword \else -@@ -767,8 +1024,7 @@ +@@ -767,8 +952,7 @@ where each line of input produces a line % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. @@ -3811,15 +3853,17 @@ \def\temp{#1}% \ifx\temp\asisword \else -@@ -780,26 +1036,159 @@ +@@ -780,26 +964,58 @@ where each line of input produces a line \fi } +-% @asis just yields its argument. Used with @table, for example. +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. -+% + % +-\def\asis#1{#1} +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. @@ -3839,13 +3883,23 @@ + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} -+ + +-% @math means output in math mode. +-% We don't use $'s directly in the definition of \math because control +-% sequences like \math are expanded when the toc file is written. Then, +-% we read the toc file back, the $'s will be normal characters (as they +-% should be, according to the definition of Texinfo). So we must use a +-% control sequence to switch into and out of math mode. +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. -+% + % +-% This isn't quite enough for @math to work properly in indices, but it +-% seems unlikely it will ever be needed there. +% We also make \indent itself not actually do anything until the next +% paragraph. -+% + % +-\let\implicitmath = $ +-\def\math#1{\implicitmath #1\implicitmath} +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent @@ -3866,125 +3920,14 @@ + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} -+ -+ - % @asis just yields its argument. Used with @table, for example. - % - \def\asis#1{#1} - --% @math means output in math mode. --% We don't use $'s directly in the definition of \math because control --% sequences like \math are expanded when the toc file is written. Then, --% we read the toc file back, the $'s will be normal characters (as they --% should be, according to the definition of Texinfo). So we must use a --% control sequence to switch into and out of math mode. -+% @math outputs its argument in math mode. - % --% This isn't quite enough for @math to work properly in indices, but it --% seems unlikely it will ever be needed there. -+% One complication: _ usually means subscripts, but it could also mean -+% an actual _ character, as in @math{@var{some_variable} + 1}. So make -+% _ active, and distinguish by seeing if the current family is \slfam, -+% which is what @var uses. -+{ -+ \catcode`\_ = \active -+ \gdef\mathunderscore{% -+ \catcode`\_=\active -+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}% -+ } -+} -+% Another complication: we want \\ (and @\) to output a \ character. -+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -+% this is not advertised and we don't care. Texinfo does not -+% otherwise define @\. - % --\let\implicitmath = $ --\def\math#1{\implicitmath #1\implicitmath} -+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -+% -+\def\math{% -+ \tex -+ \mathunderscore -+ \let\\ = \mathbackslash -+ \mathactive -+ % make the texinfo accent commands work in math mode -+ \let\"=\ddot -+ \let\'=\acute -+ \let\==\bar -+ \let\^=\hat -+ \let\`=\grave -+ \let\u=\breve -+ \let\v=\check -+ \let\~=\tilde -+ \let\dotaccent=\dot -+ $\finishmath -+} -+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. -% @bullet and @minus need the same treatment as @math, just above. -\def\bullet{\implicitmath\ptexbullet\implicitmath} -\def\minus{\implicitmath-\implicitmath} -+% Some active characters (such as <) are spaced differently in math. -+% We have to reset their definitions in case the @math was an argument -+% to a command which sets the catcodes (such as @item or @section). -+% -+{ -+ \catcode`^ = \active -+ \catcode`< = \active -+ \catcode`> = \active -+ \catcode`+ = \active -+ \gdef\mathactive{% -+ \let^ = \ptexhat -+ \let< = \ptexless -+ \let> = \ptexgtr -+ \let+ = \ptexplus -+ } -+} -+ -+% Some math mode symbols. -+\def\bullet{$\ptexbullet$} -+\def\geq{\ifmmode \ge\else $\ge$\fi} -+\def\leq{\ifmmode \le\else $\le$\fi} -+\def\minus{\ifmmode -\else $-$\fi} -+ -+% @dots{} outputs an ellipsis using the current font. -+% We do .5em per period so that it has the same spacing in the cm -+% typewriter fonts as three actual period characters; on the other hand, -+% in other typewriter fonts three periods are wider than 1.5em. So do -+% whichever is larger. -+% -+\def\dots{% -+ \leavevmode -+ \setbox0=\hbox{...}% get width of three periods -+ \ifdim\wd0 > 1.5em -+ \dimen0 = \wd0 -+ \else -+ \dimen0 = 1.5em -+ \fi -+ \hbox to \dimen0{% -+ \hskip 0pt plus.25fil -+ .\hskip 0pt plus1fil -+ .\hskip 0pt plus1fil -+ .\hskip 0pt plus.5fil -+ }% -+} -+ -+% @enddots{} is an end-of-sentence ellipsis. -+% -+\def\enddots{% -+ \dots -+ \spacefactor=\endofsentencespacefactor -+} -+ -+% @comma{} is so commas can be inserted into text without messing up -+% Texinfo's parsing. -+% -+\let\comma = , % @refill is a no-op. \let\refill=\relax -@@ -815,20 +1204,20 @@ +@@ -815,20 +1031,20 @@ where each line of input produces a line % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% @@ -4012,20 +3955,20 @@ % \comment % Ignore the actual filename. } -@@ -864,111 +1253,294 @@ +@@ -864,111 +1080,280 @@ where each line of input produces a line \newif\ifpdf \newif\ifpdfmakepagedest -+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -+% can be set). So we test for \relax and 0 as well as \undefined, -+% borrowed from ifpdf.sty. - \ifx\pdfoutput\undefined +-\ifx\pdfoutput\undefined - \pdffalse - \let\pdfmkdest = \gobble - \let\pdfurl = \gobble - \let\endlink = \relax - \let\linkcolor = \relax - \let\pdfmakeoutlines = \relax ++% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 ++% can be set). So we test for \relax and 0 as well as being undefined. ++\ifx\pdfoutput\thisisundefined \else - \pdftrue - \pdfoutput = 1 @@ -4043,50 +3986,24 @@ +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. -+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -+% (and related messages, the final outcome is that it is up to the TeX -+% user to double the backslashes and otherwise make the string valid, so -+% that's what we do). -+ -+% double active backslashes. -+% -+{\catcode`\@=0 \catcode`\\=\active -+ @gdef@activebackslashdouble{% -+ @catcode`@\=@active -+ @let\=@doublebackslash} -+} -+ -+% To handle parens, we must adopt a different approach, since parens are -+% not active characters. hyperref.dtx (which has the same problem as -+% us) handles it with this amazing macro to replace tokens, with minor -+% changes for Texinfo. It is included here under the GPL by permission -+% from the author, Heiko Oberdiek. +% -+% #1 is the tokens to replace. -+% #2 is the replacement. -+% #3 is the control sequence with the string. -+% -+\def\HyPsdSubst#1#2#3{% -+ \def\HyPsdReplace##1#1##2\END{% -+ ##1% -+ \ifx\\##2\\% -+ \else -+ #2% -+ \HyReturnAfterFi{% -+ \HyPsdReplace##2\END -+ }% -+ \fi -+ }% -+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -+} -+\long\def\HyReturnAfterFi#1\fi{\fi#1} -+ -+% #1 is a control sequence in which to do the replacements. -+\def\backslashparens#1{% -+ \xdef#1{#1}% redefine it as its expansion; the definition is simply -+ % \lastnode when called from \setref -> \pdfmkdest. -+ \HyPsdSubst{(}{\realbackslash(}{#1}% -+ \HyPsdSubst{)}{\realbackslash)}{#1}% ++% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and ++% related messages. The final outcome is that it is up to the TeX user ++% to double the backslashes and otherwise make the string valid, so ++% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to ++% do this reliably, so we use it. ++ ++% #1 is a control sequence in which to do the replacements, ++% which we \xdef. ++\def\txiescapepdf#1{% ++ \ifx\pdfescapestring\relax ++ % No primitive available; should we give a warning or log? ++ % Many times it won't matter. ++ \else ++ % The expandable \pdfescapestring primitive escapes parentheses, ++ % backslashes, and other special chars. ++ \xdef#1{\pdfescapestring{#1}}% ++ \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images @@ -4096,11 +4013,17 @@ + +\ifpdf + % -+ % Color manipulation macros based on pdfcolor.tex. -+ \def\cmykDarkRed{0.28 1 1 0.35} -+ \def\cmykBlack{0 0 0 1} ++ % Color manipulation macros based on pdfcolor.tex, ++ % except using rgb instead of cmyk; the latter is said to render as a ++ % very dark gray on-screen and a very dark halftone in print, instead ++ % of actual black. ++ \def\rgbDarkRed{0.50 0.09 0.12} ++ \def\rgbBlack{0 0 0} ++ % ++ % k sets the color for filling (usual text, etc.); ++ % K sets the color for stroking (thin rules, e.g., normal _'s). ++ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % -+ \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% @@ -4109,7 +4032,7 @@ + \pdfsetcolor{#1}% + } + % -+ \def\maincolor{\cmykBlack} ++ \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} @@ -4144,29 +4067,31 @@ + \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % -+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among -+ % others). Let's try in that order. ++ % pdftex (and the PDF format) support .pdf, .png, .jpg (among ++ % others). Let's try in that order, PDF first since if ++ % someone has a scalable image, presumably better to use that than a ++ % bitmap. + \let\pdfimgext=\empty + \begingroup -+ \openin 1 #1.png \ifeof 1 -+ \openin 1 #1.jpg \ifeof 1 -+ \openin 1 #1.jpeg \ifeof 1 -+ \openin 1 #1.JPG \ifeof 1 -+ \openin 1 #1.pdf \ifeof 1 -+ \openin 1 #1.PDF \ifeof 1 ++ \openin 1 #1.pdf \ifeof 1 ++ \openin 1 #1.PDF \ifeof 1 ++ \openin 1 #1.png \ifeof 1 ++ \openin 1 #1.jpg \ifeof 1 ++ \openin 1 #1.jpeg \ifeof 1 ++ \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% -+ \else \gdef\pdfimgext{PDF}% ++ \else \gdef\pdfimgext{JPG}% + \fi -+ \else \gdef\pdfimgext{pdf}% ++ \else \gdef\pdfimgext{jpeg}% + \fi -+ \else \gdef\pdfimgext{JPG}% ++ \else \gdef\pdfimgext{jpg}% + \fi -+ \else \gdef\pdfimgext{jpeg}% ++ \else \gdef\pdfimgext{png}% + \fi -+ \else \gdef\pdfimgext{jpg}% ++ \else \gdef\pdfimgext{PDF}% + \fi -+ \else \gdef\pdfimgext{png}% ++ \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup @@ -4203,10 +4128,9 @@ + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive -+ \activebackslashdouble + \makevalueexpandable + \def\pdfdestname{#1}% -+ \backslashparens\pdfdestname ++ \txiescapepdf\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % @@ -4215,8 +4139,8 @@ + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. -+ \def\urlcolor{\cmykDarkRed} -+ \def\linkcolor{\cmykDarkRed} ++ \def\urlcolor{\rgbDarkRed} ++ \def\linkcolor{\rgbDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % % Adding outlines to PDF; macros for calculating structure of outlines @@ -4281,7 +4205,7 @@ + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. -+ \def\pdfoutlinedest{#3}% ++ \edef\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% \else @@ -4293,15 +4217,13 @@ - \linkcolor #1% - \advance\lnkcount by 1% - \endlink -+ % Doubled backslashes in the name. -+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}% -+ \backslashparens\pdfoutlinedest}% ++ \txiescapepdf\pdfoutlinedest \fi - \nextmakelinks + % -+ % Also double the backslashes in the display string. -+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}% -+ \backslashparens\pdfoutlinetext}% ++ % Also escape PDF chars in the display string. ++ \edef\pdfoutlinetext{#1}% ++ \txiescapepdf\pdfoutlinetext + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } @@ -4318,11 +4240,8 @@ + % + \def\pdfmakeoutlines{% + \begingroup -+ % Thanh's hack / proper braces in bookmarks -+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace -+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace -+ % + % Read toc silently, to get counts of subentries for \pdfoutline. ++ \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% @@ -4376,11 +4295,17 @@ + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % -+ % xx to do this right, we have to translate 8-bit characters to -+ % their "best" equivalent, based on the @documentencoding. Right -+ % now, I guess we'll just let the pdf reader have its way. ++ % TODO this right, we have to translate 8-bit characters to ++ % their "best" equivalent, based on the @documentencoding. Too ++ % much work for too little return. Just use the ASCII equivalents ++ % we use for the index sort strings. ++ % + \indexnofonts + \setupdatafile ++ % We can have normal brace characters in the PDF outlines, unlike ++ % Texinfo index files. So set that up. ++ \def\{{\lbracecharliteral}% ++ \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup @@ -4389,11 +4314,16 @@ - \def\ppnn{\pgn=\first} - \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} - \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} ++ {\catcode`[=1 \catcode`]=2 ++ \catcode`{=\other \catcode`}=\other ++ \gdef\lbracecharliteral[{]% ++ \gdef\rbracecharliteral[}]% ++ ] + % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces -@@ -983,24 +1555,32 @@ +@@ -983,24 +1368,36 @@ where each line of input produces a line \else \let \startlink \pdfstartlink \fi @@ -4406,11 +4336,15 @@ + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. -+ % ++ % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable ++ % do we want to go so far as to use \indexnofonts instead of just ++ % special-casing \var here? ++ \def\var##1{##1}% ++ % + \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% @@ -4431,7 +4365,7 @@ \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else -@@ -1013,33 +1593,348 @@ +@@ -1013,38 +1410,358 @@ where each line of input produces a line \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% @@ -4443,6 +4377,7 @@ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -\fi % \ifx\pdfoutput +\else ++ % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax @@ -4473,6 +4408,10 @@ +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} ++ ++% Unfortunately, we have to override this for titles and the like, since ++% in those cases "rm" is bold. Sigh. ++\def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. -% So we set up a \sf analogous to plain's \rm, etc. @@ -4523,7 +4462,7 @@ +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) -+\ifpdf \ifx\pdffontattr\undefined \else ++\ifpdf \ifx\pdffontattr\thisisundefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap @@ -4794,7 +4733,13 @@ % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix -@@ -1064,165 +1959,409 @@ + % before you read in texinfo.tex. +-\ifx\fontprefix\undefined ++\ifx\fontprefix\thisisundefined + \def\fontprefix{cm} + \fi + % Support font families that don't use the same naming scheme as CM. +@@ -1064,196 +1781,621 @@ where each line of input produces a line \def\scshape{csc} \def\scbshape{csc} @@ -4817,7 +4762,7 @@ -\setfont\textttsl\ttslshape{10}{\mainmagstep} +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. -+% ++% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} @@ -4900,8 +4845,7 @@ +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 - \def\authorrm{\secrm} -+\def\authortt{\sectt} +-\def\authorrm{\secrm} +\def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). @@ -4997,8 +4941,8 @@ +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + -+% reset the current fonts -+\textfonts ++\textleading = 13.2pt % line spacing for 11pt CM ++\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions + @@ -5007,7 +4951,7 @@ +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. -+% ++% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} @@ -5070,8 +5014,6 @@ +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 -+\def\authorrm{\secrm} -+\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). @@ -5098,7 +5040,7 @@ +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} -+\font\seci=cmmi12 ++\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + @@ -5130,11 +5072,9 @@ +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + -+% reduce space between paragraphs -+\divide\parskip by 2 -+ -+% reset the current fonts -+\textfonts ++\divide\parskip by 2 % reduce space between paragraphs ++\textleading = 12pt % line spacing for 10pt CM ++\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions + @@ -5142,17 +5082,18 @@ +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. -+% -+\def\xword{10} ++% +\def\xiword{11} ++\def\xword{10} ++\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% -+ \wlog{doing @fonttextsize \textsizearg}% ++ %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. -+ % ++ % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -5214,10 +5155,12 @@ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl +- \resetmathfonts \setleading{25pt}} +-\def\titlefont#1{{\titlefonts\rm #1}} + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} - \def\titlefont#1{{\titlefonts\rm #1}} ++ \resetmathfonts \setleading{27pt}} ++\def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc @@ -5272,7 +5215,21 @@ + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} -+ + +-% Set up the default fonts, so we can use them for creating boxes. +-% +-\textfonts ++% Fonts for short table of contents. ++\setfont\shortcontrm\rmshape{12}{1000}{OT1} ++\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 ++\setfont\shortcontsl\slshape{12}{1000}{OT1} ++\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +-% Define these so they can be easily changed for other fonts. ++% Define these just so they can be easily changed for other fonts. + \def\angleleft{$\langle$} + \def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + @@ -5286,59 +5243,228 @@ +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 -+% -+% I wish the USA used A4 paper. +% --karl, 24jan03. + - - % Set up the default fonts, so we can use them for creating boxes. - % --\textfonts ++% Set up the default fonts, so we can use them for creating boxes. ++% +\definetextfontsizexi - - % Define these so they can be easily changed for other fonts. - \def\angleleft{$\langle$} -@@ -1232,28 +2371,42 @@ ++ ++ ++\message{markup,} ++ ++% Check if we are currently using a typewriter font. Since all the ++% Computer Modern typewriter fonts have zero interword stretch (and ++% shrink), and it is reasonable to expect all typewriter fonts to have ++% this property, we can check that font parameter. ++% ++\def\ifmonospace{\ifdim\fontdimen3\font=0pt } ++ ++% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will ++% define and register \INITMACRO to be called on markup style changes. ++% \INITMACRO can check \currentmarkupstyle for the innermost ++% style and the set of \ifmarkupSTYLE switches for all styles ++% currently in effect. ++\newif\ifmarkupvar ++\newif\ifmarkupsamp ++\newif\ifmarkupkey ++%\newif\ifmarkupfile % @file == @samp. ++%\newif\ifmarkupoption % @option == @samp. ++\newif\ifmarkupcode ++\newif\ifmarkupkbd ++%\newif\ifmarkupenv % @env == @code. ++%\newif\ifmarkupcommand % @command == @code. ++\newif\ifmarkuptex % @tex (and part of @math, for now). ++\newif\ifmarkupexample ++\newif\ifmarkupverb ++\newif\ifmarkupverbatim ++ ++\let\currentmarkupstyle\empty ++ ++\def\setupmarkupstyle#1{% ++ \csname markup#1true\endcsname ++ \def\currentmarkupstyle{#1}% ++ \markupstylesetup ++} ++ ++\let\markupstylesetup\empty ++ ++\def\defmarkupstylesetup#1{% ++ \expandafter\def\expandafter\markupstylesetup ++ \expandafter{\markupstylesetup #1}% ++ \def#1% ++} ++ ++% Markup style setup for left and right quotes. ++\defmarkupstylesetup\markupsetuplq{% ++ \expandafter\let\expandafter \temp ++ \csname markupsetuplq\currentmarkupstyle\endcsname ++ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi ++} ++ ++\defmarkupstylesetup\markupsetuprq{% ++ \expandafter\let\expandafter \temp ++ \csname markupsetuprq\currentmarkupstyle\endcsname ++ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi ++} ++ ++{ ++\catcode`\'=\active ++\catcode`\`=\active ++ ++\gdef\markupsetuplqdefault{\let`\lq} ++\gdef\markupsetuprqdefault{\let'\rq} ++ ++\gdef\markupsetcodequoteleft{\let`\codequoteleft} ++\gdef\markupsetcodequoteright{\let'\codequoteright} ++ ++\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} ++} ++ ++\let\markupsetuplqcode \markupsetcodequoteleft ++\let\markupsetuprqcode \markupsetcodequoteright ++% ++\let\markupsetuplqexample \markupsetcodequoteleft ++\let\markupsetuprqexample \markupsetcodequoteright ++% ++\let\markupsetuplqsamp \markupsetcodequoteleft ++\let\markupsetuprqsamp \markupsetcodequoteright ++% ++\let\markupsetuplqverb \markupsetcodequoteleft ++\let\markupsetuprqverb \markupsetcodequoteright ++% ++\let\markupsetuplqverbatim \markupsetcodequoteleft ++\let\markupsetuprqverbatim \markupsetcodequoteright ++ ++\let\markupsetuplqkbd \markupsetnoligaturesquoteleft ++ ++% Allow an option to not use regular directed right quote/apostrophe ++% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). ++% The undirected quote is ugly, so don't make it the default, but it ++% works for pasting with more pdf viewers (at least evince), the ++% lilypond developers report. xpdf does work with the regular 0x27. ++% ++\def\codequoteright{% ++ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax ++ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax ++ '% ++ \else \char'15 \fi ++ \else \char'15 \fi ++} ++% ++% and a similar option for the left quote char vs. a grave accent. ++% Modern fonts display ASCII 0x60 as a grave accent, so some people like ++% the code environments to do likewise. ++% ++\def\codequoteleft{% ++ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax ++ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax ++ % [Knuth] pp. 380,381,391 ++ % \relax disables Spanish ligatures ?` and !` of \tt font. ++ \relax`% ++ \else \char'22 \fi ++ \else \char'22 \fi ++} ++ ++% Commands to set the quote options. ++% ++\parseargdef\codequoteundirected{% ++ \def\temp{#1}% ++ \ifx\temp\onword ++ \expandafter\let\csname SETtxicodequoteundirected\endcsname ++ = t% ++ \else\ifx\temp\offword ++ \expandafter\let\csname SETtxicodequoteundirected\endcsname ++ = \relax ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% ++ \fi\fi ++} ++% ++\parseargdef\codequotebacktick{% ++ \def\temp{#1}% ++ \ifx\temp\onword ++ \expandafter\let\csname SETtxicodequotebacktick\endcsname ++ = t% ++ \else\ifx\temp\offword ++ \expandafter\let\csname SETtxicodequotebacktick\endcsname ++ = \relax ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% ++ \fi\fi ++} ++ ++% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. ++\def\noligaturesquoteleft{\relax\lq} ++ + % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 - % Fonts for short table of contents. +-% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bxshape{12}{1000} -\setfont\shortcontsl\slshape{12}{1000} -+\setfont\shortcontrm\rmshape{12}{1000}{OT1} -+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -+\setfont\shortcontsl\slshape{12}{1000}{OT1} -+\setfont\shortconttt\ttshape{12}{1000}{OT1TT} - - %% Add scribe-like font environments, plus @l for inline lisp (usually sans - %% serif) and @ii for TeX italic ++% Font commands. + +-%% Add scribe-like font environments, plus @l for inline lisp (usually sans +-%% serif) and @ii for TeX italic ++% #1 is the font command (\sl or \it), #2 is the text to slant. ++% If we are in a monospaced environment, however, 1) always use \ttsl, ++% and 2) do not add an italic correction. ++\def\dosmartslant#1#2{% ++ \ifusingtt ++ {{\ttsl #2}\let\next=\relax}% ++ {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% ++ \next ++} ++\def\smartslanted{\dosmartslant\sl} ++\def\smartitalic{\dosmartslant\it} - % \smartitalic{ARG} outputs arg in italics, followed by an italic correction - % unless the following character is such as not to need one. +-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction +-% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} -\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} -+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else -+ \ptexslash\fi\fi\fi} -+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} ++% Output an italic correction unless \next (presumed to be the following ++% character) is such as not to need one. ++\def\smartitaliccorrection{% ++ \ifx\next,% ++ \else\ifx\next-% ++ \else\ifx\next.% ++ \else\ptexslash ++ \fi\fi\fi ++ \aftersmartic ++} + -+% like \smartslanted except unconditionally uses \ttsl. ++% like \smartslanted except unconditionally uses \ttsl, and no ic. +% @var is set to this for defun arguments. -+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} ++\def\ttslanted#1{{\ttsl #1}} + -+% like \smartslanted except unconditionally use \sl. We never want ++% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? -+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} ++\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} ++ ++\def\aftersmartic{} ++\def\var#1{% ++ \let\saveaftersmartic = \aftersmartic ++ \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% ++ \smartslanted{#1}% ++} \let\i=\smartitalic +-\let\var=\smartslanted +\let\slanted=\smartslanted - \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic -\let\cite=\smartslanted -+% @b, explicit bold. ++% Explicit font changes: @r, @sc, undocumented @ii. ++\def\r#1{{\rm #1}} % roman font ++\def\sc#1{{\smallcaps#1}} % smallcaps font ++\def\ii#1{{\it #1}} % italic font ++ ++% @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b @@ -5348,7 +5474,7 @@ % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. -@@ -1261,13 +2414,30 @@ +@@ -1261,22 +2403,53 @@ where each line of input produces a line \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } @@ -5370,27 +5496,52 @@ +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + ++% @t, explicit typewriter. \def\t#1{% - {\tt \rawbackslash \frenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\let\ttfont=\t - \def\samp#1{`\tclose{#1}'\null} +-\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} -+\setfont\keyrm\rmshape{8}{1000}{OT1} - \font\keysy=cmsy9 - \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% - \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% -@@ -1275,6 +2445,7 @@ - \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% - \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{\angleright}}}} -+\def\key #1{{\nohyphenation \uppercase{#1}}\null} - % The old definition, with no lozenge: - %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} +-\font\keysy=cmsy9 +-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +- \vbox{\hrule\kern-0.4pt +- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +- \kern-0.4pt\hrule}% +- \kern-.06em\raise0.4pt\hbox{\angleright}}}} +-% The old definition, with no lozenge: +-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} ++ ++% @samp. ++\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} ++ ++% definition of @key that produces a lozenge. Doesn't adjust to text size. ++%\setfont\keyrm\rmshape{8}{1000}{OT1} ++%\font\keysy=cmsy9 ++%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% ++% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% ++% \vbox{\hrule\kern-0.4pt ++% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% ++% \kern-0.4pt\hrule}% ++% \kern-.06em\raise0.4pt\hbox{\angleright}}}} ++ ++% definition of @key with no lozenge. If the current font is already ++% monospace, don't change it; that way, we respect @kbdinputstyle. But ++% if it isn't monospace, then use \tt. ++% ++\def\key#1{{\setupmarkupstyle{key}% ++ \nohyphenation ++ \ifmonospace\else\tt\fi ++ #1}\null} ++ ++% ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} -@@ -1300,13 +2471,13 @@ + + % @file, @option are the same as @samp. +@@ -1300,13 +2473,13 @@ where each line of input produces a line \nohyphenation % \rawbackslash @@ -5398,7 +5549,8 @@ + \plainfrenchspacing #1% }% - \null +- \null ++ \null % reset spacefactor to 1000 } -% We *must* turn on hyphenation at `-' and `_' in \code. @@ -5406,7 +5558,7 @@ % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. -@@ -1316,26 +2487,61 @@ +@@ -1316,71 +2489,71 @@ where each line of input produces a line % and arrange explicitly to hyphenate at a dash. % -- rms. { @@ -5414,13 +5566,13 @@ - \catcode`\_=\active + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active ++ \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup - \catcode`\-=\active \let-\codedash - \catcode`\_=\active \let_\codeunder -+ \catcode\rquoteChar=\active \catcode\lquoteChar=\active -+ \let'\codequoteright \let`\codequoteleft -+ % ++ \setupmarkupstyle{code}% ++ % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash @@ -5437,9 +5589,31 @@ - \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } - \def\realdash{-} - \def\codedash{-\discretionary{}{}{}} +-\def\realdash{-} +-\def\codedash{-\discretionary{}{}{}} -\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} + \def\codex #1{\tclose{#1}\endgroup} + +-%\let\exp=\tclose %Was temporary +- +-% @kbd is like @code, except that if the argument is just one @key command, +-% then @kbd has no effect. +- +-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +-% `example' (@kbd uses ttsl only inside of @example and friends), +-% or `code' (@kbd uses normal tty font always). +-\def\kbdinputstyle{\parsearg\kbdinputstylexxx} +-\def\kbdinputstylexxx#1{% +- \def\arg{#1}% +- \ifx\arg\worddistinct +- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% +- \else\ifx\arg\wordexample +- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% +- \else\ifx\arg\wordcode +- \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% +- \fi\fi\fi ++\def\realdash{-} ++\def\codedash{-\discretionary{}{}{}} +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) @@ -5450,20 +5624,33 @@ + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% -+} - \def\codex #1{\tclose{#1}\endgroup} + } +-\def\worddistinct{distinct} +-\def\wordexample{example} +-\def\wordcode{code} --%\let\exp=\tclose %Was temporary +-% Default is kbdinputdistinct. (Too much of a hassle to call the macro, +-% the catcodes are wrong for parsearg to work.) +-\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. -+% ++% +\newif\ifallowcodebreaks \allowcodebreakstrue -+ + +-\def\xkey{\key} +-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% +-\ifx\one\xkey\ifx\threex\three \key{#2}% +-\else{\tclose{\kbdfont\look}}\fi +-\else{\tclose{\kbdfont\look}}\fi} +\def\keywordtrue{true} +\def\keywordfalse{false} -+ + +-% For @url, @env, @command quotes seem unnecessary, so use \code. +-\let\url=\code +-\let\env=\code +-\let\command=\code +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue @@ -5472,93 +5659,213 @@ + \allowcodebreaksfalse + \else + \errhelp = \EMsimple -+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}% ++ \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi +} - % @kbd is like @code, except that if the argument is just one @key command, - % then @kbd has no effect. -@@ -1343,24 +2549,25 @@ - % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), - % `example' (@kbd uses ttsl only inside of @example and friends), - % or `code' (@kbd uses normal tty font always). --\def\kbdinputstyle{\parsearg\kbdinputstylexxx} --\def\kbdinputstylexxx#1{% -- \def\arg{#1}% -- \ifx\arg\worddistinct -+\parseargdef\kbdinputstyle{% -+ \def\txiarg{#1}% -+ \ifx\txiarg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% -- \else\ifx\arg\wordexample -+ \else\ifx\txiarg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% -- \else\ifx\arg\wordcode -+ \else\ifx\txiarg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}% - \fi\fi\fi - } - \def\worddistinct{distinct} - \def\wordexample{example} - \def\wordcode{code} - --% Default is kbdinputdistinct. (Too much of a hassle to call the macro, --% the catcodes are wrong for parsearg to work.) --\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} -+% Default is `distinct.' -+\kbdinputstyle distinct - - \def\xkey{\key} - \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -@@ -1368,11 +2575,18 @@ - \else{\tclose{\kbdfont\look}}\fi - \else{\tclose{\kbdfont\look}}\fi} - --% For @url, @env, @command quotes seem unnecessary, so use \code. --\let\url=\code -+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -+\let\indicateurl=\code - \let\env=\code - \let\command=\code - -+% @clicksequence{File @click{} Open ...} -+\def\clicksequence#1{\begingroup #1\endgroup} -+ -+% @clickstyle @arrow (by default) -+\parseargdef\clickstyle{\def\click{#1}} -+\def\click{\arrow} -+ % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url -@@ -1401,9 +2615,13 @@ +-% itself. First (mandatory) arg is the url. Perhaps eventually put in +-% a hypertex \special here. +-% +-\def\uref#1{\douref #1,,,\finish} +-\def\douref#1,#2,#3,#4\finish{\begingroup ++% itself. First (mandatory) arg is the url. ++% (This \urefnobreak definition isn't used now, leaving it for a while ++% for comparison.) ++\def\urefnobreak#1{\dourefnobreak #1,,,\finish} ++\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% +@@ -1401,9 +2574,110 @@ where each line of input produces a line \endlink \endgroup} -+% @url synonym for @uref, since that's how everyone uses it. -+% -+\let\url=\uref ++% This \urefbreak definition is the active one. ++\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} ++\let\uref=\urefbreak ++\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} ++\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example ++ \unsepspaces ++ \pdfurl{#1}% ++ \setbox0 = \hbox{\ignorespaces #3}% ++ \ifdim\wd0 > 0pt ++ \unhbox0 % third arg given, show only that ++ \else ++ \setbox0 = \hbox{\ignorespaces #2}% ++ \ifdim\wd0 > 0pt ++ \ifpdf ++ \unhbox0 % PDF: 2nd arg given, show only it ++ \else ++ \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url ++ \fi ++ \else ++ \urefcode{#1}% only url given, so show it ++ \fi ++ \fi ++ \endlink ++\endgroup} + - % rms does not like angle brackets --karl, 17may97. - % So now @email is just like @uref, unless we are pdf. --% -+% - %\def\email#1{\angleleft{\tt #1}\angleright} - \ifpdf ++% Allow line breaks around only a few characters (only). ++\def\urefcatcodes{% ++ \catcode\ampChar=\active \catcode\dotChar=\active ++ \catcode\hashChar=\active \catcode\questChar=\active ++ \catcode\slashChar=\active ++} ++{ ++ \urefcatcodes ++ % ++ \global\def\urefcode{\begingroup ++ \setupmarkupstyle{code}% ++ \urefcatcodes ++ \let&\urefcodeamp ++ \let.\urefcodedot ++ \let#\urefcodehash ++ \let?\urefcodequest ++ \let/\urefcodeslash ++ \codex ++ } ++ % ++ % By default, they are just regular characters. ++ \global\def&{\normalamp} ++ \global\def.{\normaldot} ++ \global\def#{\normalhash} ++ \global\def?{\normalquest} ++ \global\def/{\normalslash} ++} ++ ++% we put a little stretch before and after the breakable chars, to help ++% line breaking of long url's. The unequal skips make look better in ++% cmtt at least, especially for dots. ++\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } ++\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } ++% ++\def\urefcodeamp{\urefprestretch \&\urefpoststretch} ++\def\urefcodedot{\urefprestretch .\urefpoststretch} ++\def\urefcodehash{\urefprestretch \#\urefpoststretch} ++\def\urefcodequest{\urefprestretch ?\urefpoststretch} ++\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} ++{ ++ \catcode`\/=\active ++ \global\def\urefcodeslashfinish{% ++ \urefprestretch \slashChar ++ % Allow line break only after the final / in a sequence of ++ % slashes, to avoid line break between the slashes in http://. ++ \ifx\next/\else \urefpoststretch \fi ++ } ++} ++ ++% One more complication: by default we'll break after the special ++% characters, but some people like to break before the special chars, so ++% allow that. Also allow no breaking at all, for manual control. ++% ++\parseargdef\urefbreakstyle{% ++ \def\txiarg{#1}% ++ \ifx\txiarg\wordnone ++ \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} ++ \else\ifx\txiarg\wordbefore ++ \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} ++ \else\ifx\txiarg\wordafter ++ \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% ++ \fi\fi\fi ++} ++\def\wordafter{after} ++\def\wordbefore{before} ++\def\wordnone{none} ++ ++\urefbreakstyle after ++ ++% @url synonym for @uref, since that's how everyone uses it. ++% ++\let\url=\uref ++ + % rms does not like angle brackets --karl, 17may97. + % So now @email is just like @uref, unless we are pdf. +-% ++% + %\def\email#1{\angleleft{\tt #1}\angleright} + \ifpdf \def\email#1{\doemail#1,,\finish} -@@ -1442,12 +2660,140 @@ - \def\sc#1{{\smallcaps#1}} % smallcaps font - \def\ii#1{{\it #1}} % italic font +@@ -1418,36 +2692,478 @@ where each line of input produces a line + \let\email=\uref + \fi --% @acronym downcases the argument and prints in smallcaps. --\def\acronym#1{{\smallcaps \lowercase{#1}}} +-% Check if we are currently using a typewriter font. Since all the +-% Computer Modern typewriter fonts have zero interword stretch (and +-% shrink), and it is reasonable to expect all typewriter fonts to have +-% this property, we can check that font parameter. +-% +-\def\ifmonospace{\ifdim\fontdimen3\font=0pt } ++% @kbd is like @code, except that if the argument is just one @key command, ++% then @kbd has no effect. ++\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} ++ ++% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), ++% `example' (@kbd uses ttsl only inside of @example and friends), ++% or `code' (@kbd uses normal tty font always). ++\parseargdef\kbdinputstyle{% ++ \def\txiarg{#1}% ++ \ifx\txiarg\worddistinct ++ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% ++ \else\ifx\txiarg\wordexample ++ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% ++ \else\ifx\txiarg\wordcode ++ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% ++ \fi\fi\fi ++} ++\def\worddistinct{distinct} ++\def\wordexample{example} ++\def\wordcode{code} ++ ++% Default is `distinct'. ++\kbdinputstyle distinct ++ ++\def\xkey{\key} ++\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% ++\ifx\one\xkey\ifx\threex\three \key{#2}% ++\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi ++\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} ++ ++% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. ++\let\indicateurl=\code ++\let\env=\code ++\let\command=\code ++ ++% @clicksequence{File @click{} Open ...} ++\def\clicksequence#1{\begingroup #1\endgroup} ++ ++% @clickstyle @arrow (by default) ++\parseargdef\clickstyle{\def\click{#1}} ++\def\click{\arrow} + + % Typeset a dimension, e.g., `in' or `pt'. The only reason for the + % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. + % + \def\dmn#1{\thinspace #1} + +-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} +- + % @l was never documented to mean ``switch to the Lisp font'', + % and it is not used as such in any manual I can find. We need it for + % Polish suppressed-l. --karl, 22sep96. + %\def\l#1{{\li #1}\null} + +-% Explicit font changes: @r, @sc, undocumented @ii. +-\def\r#1{{\rm #1}} % roman font +-\def\sc#1{{\smallcaps#1}} % smallcaps font +-\def\ii#1{{\it #1}} % italic font +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. -+% ++% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% @@ -5566,12 +5873,14 @@ + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi ++ \null % reset \spacefactor=1000 +} --% @pounds{} is a sterling sign. +-% @acronym downcases the argument and prints in smallcaps. +-\def\acronym#1{{\smallcaps \lowercase{#1}}} +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. -+% ++% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% @@ -5579,8 +5888,256 @@ + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi ++ \null % reset \spacefactor=1000 ++} + +-% @pounds{} is a sterling sign. ++% @asis just yields its argument. Used with @table, for example. ++% ++\def\asis#1{#1} ++ ++% @math outputs its argument in math mode. ++% ++% One complication: _ usually means subscripts, but it could also mean ++% an actual _ character, as in @math{@var{some_variable} + 1}. So make ++% _ active, and distinguish by seeing if the current family is \slfam, ++% which is what @var uses. ++{ ++ \catcode`\_ = \active ++ \gdef\mathunderscore{% ++ \catcode`\_=\active ++ \def_{\ifnum\fam=\slfam \_\else\sb\fi}% ++ } ++} ++% Another complication: we want \\ (and @\) to output a math (or tt) \. ++% FYI, plain.tex uses \\ as a temporary control sequence (for no ++% particular reason), but this is not advertised and we don't care. ++% ++% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. ++\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} ++% ++\def\math{% ++ \tex ++ \mathunderscore ++ \let\\ = \mathbackslash ++ \mathactive ++ % make the texinfo accent commands work in math mode ++ \let\"=\ddot ++ \let\'=\acute ++ \let\==\bar ++ \let\^=\hat ++ \let\`=\grave ++ \let\u=\breve ++ \let\v=\check ++ \let\~=\tilde ++ \let\dotaccent=\dot ++ $\finishmath ++} ++\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. ++ ++% Some active characters (such as <) are spaced differently in math. ++% We have to reset their definitions in case the @math was an argument ++% to a command which sets the catcodes (such as @item or @section). ++% ++{ ++ \catcode`^ = \active ++ \catcode`< = \active ++ \catcode`> = \active ++ \catcode`+ = \active ++ \catcode`' = \active ++ \gdef\mathactive{% ++ \let^ = \ptexhat ++ \let< = \ptexless ++ \let> = \ptexgtr ++ \let+ = \ptexplus ++ \let' = \ptexquoteright ++ } ++} ++ ++% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. ++% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, ++% except specified as a normal braced arg, so no newlines to worry about. ++% ++\def\outfmtnametex{tex} ++% ++\def\inlinefmt#1{\doinlinefmt #1,\finish} ++\def\doinlinefmt#1,#2,\finish{% ++ \def\inlinefmtname{#1}% ++ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi ++} ++% For raw, must switch into @tex before parsing the argument, to avoid ++% setting catcodes prematurely. Doing it this way means that, for ++% example, @inlineraw{html, foo{bar} gets a parse error instead of being ++% ignored. But this isn't important because if people want a literal ++% *right* brace they would have to use a command anyway, so they may as ++% well use a command to get a left brace too. We could re-use the ++% delimiter character idea from \verb, but it seems like overkill. ++% ++\def\inlineraw{\tex \doinlineraw} ++\def\doinlineraw#1{\doinlinerawtwo #1,\finish} ++\def\doinlinerawtwo#1,#2,\finish{% ++ \def\inlinerawname{#1}% ++ \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi ++ \endgroup % close group opened by \tex. ++} ++ ++ ++\message{glyphs,} ++% and logos. ++ ++% @@ prints an @, as does @atchar{}. ++\def\@{\char64 } ++\let\atchar=\@ ++ ++% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. ++% Unless we're in typewriter, use \ecfont because the CM text fonts do ++% not have braces, and we don't want to switch into math. ++\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} ++\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} ++\let\{=\mylbrace \let\lbracechar=\{ ++\let\}=\myrbrace \let\rbracechar=\} ++\begingroup ++ % Definitions to produce \{ and \} commands for indices, ++ % and @{ and @} for the aux/toc files. ++ \catcode`\{ = \other \catcode`\} = \other ++ \catcode`\[ = 1 \catcode`\] = 2 ++ \catcode`\! = 0 \catcode`\\ = \other ++ !gdef!lbracecmd[\{]% ++ !gdef!rbracecmd[\}]% ++ !gdef!lbraceatcmd[@{]% ++ !gdef!rbraceatcmd[@}]% ++!endgroup ++ ++% @comma{} to avoid , parsing problems. ++\let\comma = , ++ ++% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent ++% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. ++\let\, = \ptexc ++\let\dotaccent = \ptexdot ++\def\ringaccent#1{{\accent23 #1}} ++\let\tieaccent = \ptext ++\let\ubaraccent = \ptexb ++\let\udotaccent = \d ++ ++% Other special characters: @questiondown @exclamdown @ordf @ordm ++% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. ++\def\questiondown{?`} ++\def\exclamdown{!`} ++\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} ++\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} ++ ++% Dotless i and dotless j, used for accents. ++\def\imacro{i} ++\def\jmacro{j} ++\def\dotless#1{% ++ \def\temp{#1}% ++ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi ++ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi ++ \else \errmessage{@dotless can be used only with i or j}% ++ \fi\fi ++} ++ ++% The \TeX{} logo, as in plain, but resetting the spacing so that a ++% period following counts as ending a sentence. (Idea found in latex.) ++% ++\edef\TeX{\TeX \spacefactor=1000 } ++ ++% @LaTeX{} logo. Not quite the same results as the definition in ++% latex.ltx, since we use a different font for the raised A; it's most ++% convenient for us to use an explicitly smaller font, rather than using ++% the \scriptstyle font (since we don't reset \scriptstyle and ++% \scriptscriptstyle). ++% ++\def\LaTeX{% ++ L\kern-.36em ++ {\setbox0=\hbox{T}% ++ \vbox to \ht0{\hbox{% ++ \ifx\textnominalsize\xwordpt ++ % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. ++ % Revert to plain's \scriptsize, which is 7pt. ++ \count255=\the\fam $\fam\count255 \scriptstyle A$% ++ \else ++ % For 11pt, we can use our lllsize. ++ \selectfonts\lllsize A% ++ \fi ++ }% ++ \vss ++ }}% ++ \kern-.15em ++ \TeX ++} ++ ++% Some math mode symbols. ++\def\bullet{$\ptexbullet$} ++\def\geq{\ifmmode \ge\else $\ge$\fi} ++\def\leq{\ifmmode \le\else $\le$\fi} ++\def\minus{\ifmmode -\else $-$\fi} ++ ++% @dots{} outputs an ellipsis using the current font. ++% We do .5em per period so that it has the same spacing in the cm ++% typewriter fonts as three actual period characters; on the other hand, ++% in other typewriter fonts three periods are wider than 1.5em. So do ++% whichever is larger. ++% ++\def\dots{% ++ \leavevmode ++ \setbox0=\hbox{...}% get width of three periods ++ \ifdim\wd0 > 1.5em ++ \dimen0 = \wd0 ++ \else ++ \dimen0 = 1.5em ++ \fi ++ \hbox to \dimen0{% ++ \hskip 0pt plus.25fil ++ .\hskip 0pt plus1fil ++ .\hskip 0pt plus1fil ++ .\hskip 0pt plus.5fil ++ }% +} + ++% @enddots{} is an end-of-sentence ellipsis. ++% ++\def\enddots{% ++ \dots ++ \spacefactor=\endofsentencespacefactor ++} ++ ++% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. ++% ++% Since these characters are used in examples, they should be an even number of ++% \tt widths. Each \tt character is 1en, so two makes it 1em. ++% ++\def\point{$\star$} ++\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} ++\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} ++\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} ++\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} ++\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} ++ ++% The @error{} command. ++% Adapted from the TeXbook's \boxit. ++% ++\newbox\errorbox ++% ++{\tentt \global\dimen0 = 3em}% Width of the box. ++\dimen2 = .55pt % Thickness of rules ++% The text. (`r' is open on the right, `e' somewhat less so on the left.) ++\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} ++% ++\setbox\errorbox=\hbox to \dimen0{\hfil ++ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. ++ \advance\hsize by -2\dimen2 % Rules. ++ \vbox{% ++ \hrule height\dimen2 ++ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. ++ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. ++ \kern3pt\vrule width\dimen2}% Space to right. ++ \hrule height\dimen2} ++ \hfil} ++% ++\def\error{\leavevmode\lower.7ex\copy\errorbox} ++ +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% \def\pounds{{\it\$}} @@ -5590,52 +6147,59 @@ +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -+% ++% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. -+% ++% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted -+% ++% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. -+% ++% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. -+% -+% ++% ++% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. -+ % ++ % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. -+ % ++ % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. -+ % ++ % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % -+ \ifx\curfontstyle\bfstylename ++ \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize -+ \else ++ \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + -+% Hacks for glyphs from the EC fonts similar to \euro. We don't -+% use \let for the aliases, because sometimes we redefine the original -+% macro, and the alias should reflect the redefinition. ++% Glyphs from the EC fonts. We don't use \let for the aliases, because ++% sometimes we redefine the original macro, and the alias should reflect ++% the redefinition. ++% ++% Use LaTeX names for the Icelandic letters. ++\def\DH{{\ecfont \char"D0}} % Eth ++\def\dh{{\ecfont \char"F0}} % eth ++\def\TH{{\ecfont \char"DE}} % Thorn ++\def\th{{\ecfont \char"FE}} % thorn ++% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} @@ -5645,8 +6209,36 @@ +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% ++% This positioning is not perfect (see the ogonek LaTeX package), but ++% we have the precomposed glyphs for the most common cases. We put the ++% tests to use those glyphs in the single \ogonek macro so we have fewer ++% dummy definitions to worry about for index entries, etc. ++% ++% ogonek is also used with other letters in Lithuanian (IOU), but using ++% the precomposed glyphs for those is not so easy since they aren't in ++% the same EC font. ++\def\ogonek#1{{% ++ \def\temp{#1}% ++ \ifx\temp\macrocharA\Aogonek ++ \else\ifx\temp\macrochara\aogonek ++ \else\ifx\temp\macrocharE\Eogonek ++ \else\ifx\temp\macrochare\eogonek ++ \else ++ \ecfont \setbox0=\hbox{#1}% ++ \ifdim\ht0=1ex\accent"0C #1% ++ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% ++ \fi ++ \fi\fi\fi\fi ++ }% ++} ++\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} ++\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} ++\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} ++\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} ++% ++% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. +\def\ecfont{% -+ % We can't distinguish serif/sanserif and italic/slanted, but this ++ % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. @@ -5679,8 +6271,8 @@ +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. -+% -+\ifx\Orb\undefined ++% ++\ifx\Orb\thisisundefined +\def\Orb{\mathhexbox20D} +\fi + @@ -5693,14 +6285,16 @@ \message{page headings,} -@@ -1466,86 +2812,103 @@ +@@ -1466,87 +3182,102 @@ where each line of input produces a line \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\def\shorttitlepage{\parsearg\shorttitlepagezzz} -\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% -+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +- \endgroup\page\hbox{}\page} ++\parseargdef\shorttitlepage{% ++ \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% ++ \endgroup\page\hbox{}\page} -\def\titlepage{\begingroup \parindent=0pt \textfonts - \let\subtitlerm=\tenrm @@ -5825,17 +6419,15 @@ + \finishedtitlepagetrue } -+%%% Macros to be used within @titlepage: +-%%% Set up page headings and footings. ++% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + -+\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines -+ \let\tt=\authortt} -+ +\parseargdef\title{% + \checkenv\titlepage -+ \leftline{\titlefonts\rm #1} ++ \leftline{\titlefonts\rmisbold #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -5856,15 +6448,16 @@ + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi -+ {\authorfont \leftline{#1}}% ++ {\secfonts\rmisbold \leftline{#1}}% + \fi +} + + - %%% Set up page headings and footings. ++% Set up page headings and footings. \let\thispage=\folio -@@ -1555,7 +2918,7 @@ + +@@ -1555,7 +3286,7 @@ where each line of input produces a line \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages @@ -5873,7 +6466,7 @@ \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline -@@ -1569,43 +2932,64 @@ +@@ -1569,43 +3300,64 @@ where each line of input produces a line % @evenfooting @thisfile|| % @oddfooting ||@thisfile @@ -5960,16 +6553,24 @@ % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. -@@ -1619,7 +3003,7 @@ +@@ -1619,16 +3371,20 @@ where each line of input produces a line \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{ -+\def\HEADINGSoff{% - \global\evenheadline={\hfil} \global\evenfootline={\hfil} - \global\oddheadline={\hfil} \global\oddfootline={\hfil}} - \HEADINGSoff -@@ -1628,7 +3012,7 @@ +-\global\evenheadline={\hfil} \global\evenfootline={\hfil} +-\global\oddheadline={\hfil} \global\oddfootline={\hfil}} +-\HEADINGSoff ++\def\headingsoff{% non-global headings elimination ++ \evenheadline={\hfil}\evenfootline={\hfil}% ++ \oddheadline={\hfil}\oddfootline={\hfil}% ++} ++ ++\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting ++\HEADINGSoff % it's the default ++ + % When we turn headings on, set the page number to 1. + % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. @@ -5978,7 +6579,7 @@ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -@@ -1640,7 +3024,7 @@ +@@ -1640,7 +3396,7 @@ where each line of input produces a line % For single-sided printing, chapter title goes across top left of page, % page number on top right. @@ -5987,7 +6588,7 @@ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -@@ -1670,7 +3054,10 @@ +@@ -1670,7 +3426,10 @@ where each line of input produces a line } % Subroutines used in generating headings @@ -5995,11 +6596,11 @@ +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). -+\ifx\today\undefined ++\ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month -@@ -1679,16 +3066,16 @@ +@@ -1679,16 +3438,16 @@ where each line of input produces a line \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} @@ -6019,7 +6620,7 @@ % default indentation of table text \newdimen\tableindent \tableindent=.8in -@@ -1700,7 +3087,7 @@ +@@ -1700,7 +3459,7 @@ where each line of input produces a line % used internally for \itemindent minus \itemmargin \newdimen\itemmax @@ -6028,7 +6629,7 @@ % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). -@@ -1712,22 +3099,10 @@ +@@ -1712,22 +3471,10 @@ where each line of input produces a line \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} @@ -6052,7 +6653,16 @@ \itemindex{#1}% \nobreak % This prevents a break before @itemx. % -@@ -1751,10 +3126,14 @@ +@@ -1743,7 +3490,7 @@ where each line of input produces a line + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent +- \advance\rightskip by0pt plus1fil ++ \advance\rightskip by0pt plus1fil\relax + \leavevmode\unhbox0\par + \endgroup + % +@@ -1751,10 +3498,14 @@ where each line of input produces a line % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % @@ -6066,12 +6676,12 @@ + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. -+ % ++ % + \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else -@@ -1773,97 +3152,106 @@ +@@ -1773,97 +3524,116 @@ where each line of input produces a line \fi } @@ -6212,9 +6822,18 @@ + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi ++ % ++ % Try typesetting the item mark that if the document erroneously says ++ % something like @itemize @samp (intending @table), there's an error ++ % right away at the @itemize. It's not the best error message in the ++ % world, but it's better than leaving it to the @item. This means if ++ % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% ++ \setbox0 = \hbox{\itemcontents}% ++ % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi ++ % + \let\item=\itemizeitem } @@ -6252,13 +6871,14 @@ + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% ++ % + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. -@@ -1874,11 +3262,8 @@ +@@ -1874,11 +3644,8 @@ where each line of input produces a line % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % @@ -6271,7 +6891,7 @@ % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi -@@ -1949,13 +3334,13 @@ +@@ -1949,13 +3716,13 @@ where each line of input produces a line }% } @@ -6287,7 +6907,7 @@ } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg -@@ -1966,16 +3351,6 @@ +@@ -1966,16 +3733,6 @@ where each line of input produces a line \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} @@ -6304,7 +6924,7 @@ % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 -@@ -2002,24 +3377,14 @@ +@@ -2002,24 +3759,14 @@ where each line of input produces a line % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. @@ -6331,7 +6951,7 @@ % Sample multitable: -@@ -2063,13 +3428,12 @@ +@@ -2063,13 +3810,12 @@ where each line of input produces a line \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent @@ -6350,7 +6970,7 @@ \setuptable } -@@ -2086,8 +3450,8 @@ +@@ -2086,8 +3832,8 @@ where each line of input produces a line \let\go\pickupwholefraction \else \global\advance\colcount by 1 @@ -6361,7 +6981,7 @@ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi -@@ -2102,18 +3466,33 @@ +@@ -2102,18 +3848,40 @@ where each line of input produces a line \go } @@ -6374,12 +6994,19 @@ +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group -+% of an alignment entry. Note that \everycr resets \everytab. -+\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% ++% of an alignment entry. \everycr resets \everytab so we don't have to ++% undo it ourselves. ++\def\headitemfont{\b}% for people to use in the template row; not changeable ++\def\headitem{% ++ \checkenv\multitable ++ \crcr ++ \global\everytab={\bf}% can't use \headitemfont since the parsing differs ++ \the\everytab % for the first item ++}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until -+% we encounter the problem it was intended to solve again. ++% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% @@ -6403,7 +7030,7 @@ \tolerance=9500 \hbadness=9500 \setmultitablespacing -@@ -2121,81 +3500,93 @@ +@@ -2121,373 +3889,281 @@ where each line of input produces a line \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 @@ -6555,11 +7182,27 @@ -%% FIXME: what is \box0 supposed to be? -\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 -width0pt\relax} \fi +-%% Test to see if parskip is larger than space between lines of +-%% table. If not, do nothing. +-%% If so, set to same dimension as multitablelinespace. +\fi - %% Test to see if parskip is larger than space between lines of - %% table. If not, do nothing. - %% If so, set to same dimension as multitablelinespace. -@@ -2212,282 +3603,178 @@ ++% Test to see if parskip is larger than space between lines of ++% table. If not, do nothing. ++% If so, set to same dimension as multitablelinespace. + \ifdim\multitableparskip>\multitablelinespace + \global\multitableparskip=\multitablelinespace +-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller +- %% than skip between lines in the table. ++\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller ++ % than skip between lines in the table. + \fi% + \ifdim\multitableparskip=0pt + \global\multitableparskip=\multitablelinespace +-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller +- %% than skip between lines in the table. ++\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller ++ % than skip between lines in the table. + \fi} \message{conditionals,} @@ -6834,8 +7477,8 @@ + % And now expand that command. + \doignoretext ^^M% + }% -+} -+ + } + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. @@ -6858,8 +7501,8 @@ + \let\next\doignoretext % Look for the next @end. + \fi + \next - } - ++} ++ +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim @@ -6968,7 +7611,7 @@ \else \csname SET#1\endcsname \fi -@@ -2496,66 +3783,36 @@ +@@ -2496,66 +4172,36 @@ width0pt\relax} \fi % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % @@ -7058,7 +7701,7 @@ % @defininfoenclose. \let\definfoenclose=\comment -@@ -2565,9 +3822,8 @@ +@@ -2565,9 +4211,8 @@ width0pt\relax} \fi % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite @@ -7070,7 +7713,7 @@ % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that -@@ -2587,42 +3843,48 @@ +@@ -2587,42 +4232,48 @@ width0pt\relax} \fi } % @defindex foo == \newindex{foo} @@ -7125,11 +7768,11 @@ +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. -+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined ++ \expandafter \ifx\csname donesynindex#2\endcsname \relax + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname -+ \expandafter\let\csname\donesynindex#2\endcsname = 1 ++ \expandafter\let\csname donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname @@ -7139,7 +7782,7 @@ } % Define \doindex, the driver for all \fooindex macros. -@@ -2642,265 +3904,445 @@ +@@ -2642,265 +4293,486 @@ width0pt\relax} \fi \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} @@ -7234,11 +7877,14 @@ + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % -+ % Need these in case \tex is in effect and \{ is a \delimiter again. -+ % But can't use \lbracecmd and \rbracecmd because texindex assumes -+ % braces and backslashes are used only as delimiters. -+ \let\{ = \mylbrace -+ \let\} = \myrbrace ++ % Need these unexpandable (because we define \tt as a dummy) ++ % definitions when @{ or @} appear in index entry text. Also, more ++ % complicated, when \tex is in effect and \{ is a \delimiter again. ++ % We can't use \lbracecmd and \rbracecmd because texindex assumes ++ % braces and backslashes are used only as delimiters. Perhaps we ++ % should define @lbrace and @rbrace commands a la @comma. ++ \def\{{{\tt\char123}}% ++ \def\}{{\tt\char125}}% + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts @@ -7249,7 +7895,7 @@ + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. -+ % ++ % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} @@ -7257,12 +7903,12 @@ + % @end macro + % ... + % @funindex commtest -+ % ++ % + % The above is not enough to reproduce the bug, but it gives the flavor. -+ % ++ % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} -+ % ++ % + % So: + \let\endinput = \empty + % @@ -7299,7 +7945,7 @@ +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively -+ % preventing its expansion. This is used only for control% words, ++ % preventing its expansion. This is used only for control words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. @@ -7318,23 +7964,28 @@ + \commondummiesnofonts + % + \definedummyletter\_% ++ \definedummyletter\-% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE ++ \definedummyword\DH + \definedummyword\L -+ \definedummyword\OE + \definedummyword\O ++ \definedummyword\OE ++ \definedummyword\TH + \definedummyword\aa + \definedummyword\ae ++ \definedummyword\dh ++ \definedummyword\exclamdown + \definedummyword\l -+ \definedummyword\oe + \definedummyword\o -+ \definedummyword\ss -+ \definedummyword\exclamdown -+ \definedummyword\questiondown ++ \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm ++ \definedummyword\questiondown ++ \definedummyword\ss ++ \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf @@ -7350,21 +8001,26 @@ + \definedummyword\TeX + % + % Assorted special characters. ++ \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots ++ \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro ++ \definedummyword\expansion ++ \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright -+ \definedummyword\expansion ++ \definedummyword\leq + \definedummyword\minus ++ \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print @@ -7413,6 +8069,7 @@ + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent ++ \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent @@ -7423,18 +8080,24 @@ + \definedummyword\b + \definedummyword\i + \definedummyword\r ++ \definedummyword\sansserif + \definedummyword\sc ++ \definedummyword\slanted + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\acronym ++ \definedummyword\anchor + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn ++ \definedummyword\dmn ++ \definedummyword\email + \definedummyword\emph + \definedummyword\env + \definedummyword\file ++ \definedummyword\indicateurl + \definedummyword\kbd + \definedummyword\key + \definedummyword\math @@ -7517,7 +8180,7 @@ + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% -+ % Hopefully, all control words can become @asis. ++ % All control words become @asis by default; overrides below. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts @@ -7529,48 +8192,60 @@ + % + \def\ { }% + \def\@{@}% -+ % how to handle braces? + \def\_{\normalunderscore}% ++ \def\-{}% @- shouldn't affect sorting ++ % ++ % Unfortunately, texindex is not prepared to handle braces in the ++ % content at all. So for index sorting, we map @{ and @} to strings ++ % starting with |, since that ASCII character is between ASCII { and }. ++ \def\{{|a}% ++ \def\}{|b}% + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% ++ \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% ++ \def\TH{ZZZ}% + \def\aa{aa}% + \def\ae{ae}% ++ \def\dh{dzz}% ++ \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% -+ \def\o{o}% -+ \def\ss{ss}% -+ \def\exclamdown{!}% -+ \def\questiondown{?}% + \def\ordf{a}% + \def\ordm{o}% ++ \def\o{o}% ++ \def\questiondown{?}% ++ \def\ss{ss}% ++ \def\th{zzz}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) ++ \def\arrow{->}% + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% -+ \def\registeredsymbol{R}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% ++ \def\expansion{==>}% ++ \def\geq{>=}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% -+ \def\expansion{==>}% ++ \def\leq{<=}% + \def\minus{-}% -+ \def\pounds{pounds}% + \def\point{.}% ++ \def\pounds{pounds}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% @@ -7578,19 +8253,23 @@ + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% ++ \def\registeredsymbol{R}% + \def\result{=>}% -+ \def\textdegree{degrees}% ++ \def\textdegree{o}% ++ % ++ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax ++ \else \indexlquoteignore \fi + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. -+ % ++ % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. -+ % ++ % + \macrolist } @@ -7600,7 +8279,11 @@ - -{\catcode`\@=0 \catcode`\\=\other - @gdef@realbackslash{\}} -- ++% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us ++% ignore left quotes in the sort term. ++{\catcode`\`=\active ++ \gdef\indexlquoteignore{\let`=\empty}} + \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -7805,7 +8488,7 @@ + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: -+ % ++ % + % @deffn deffn-whatever + % @vindex index-whatever + % Description. @@ -7822,7 +8505,7 @@ } % The index entry written in the file actually looks like -@@ -2938,13 +4380,13 @@ +@@ -2938,13 +4810,13 @@ width0pt\relax} \fi % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % @@ -7839,7 +8522,7 @@ % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains -@@ -2971,7 +4413,7 @@ +@@ -2971,7 +4843,7 @@ width0pt\relax} \fi % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. @@ -7848,7 +8531,7 @@ \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns -@@ -2993,7 +4435,10 @@ +@@ -2993,7 +4865,10 @@ width0pt\relax} \fi \removelastskip % % We like breaks before the index initials, so insert a bonus. @@ -7860,7 +8543,7 @@ % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column -@@ -3003,93 +4448,117 @@ +@@ -3003,93 +4878,123 @@ width0pt\relax} \fi % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% @@ -7929,7 +8612,6 @@ +% But this freezes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. -+% +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% @@ -7976,10 +8658,17 @@ + % columns. + \vskip 0pt plus1pt + % ++ % When reading the text of entry, convert explicit line breaks ++ % from @* into spaces. The user might give these in long section ++ % titles, for instance. ++ \def\*{\unskip\space\ignorespaces}% ++ \def\entrybreak{\hfil\break}% ++ % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} ++\def\entrybreak{\unskip\space\ignorespaces}% +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent @@ -8050,7 +8739,7 @@ }} % Define two-column mode, which we use to typeset indexes. -@@ -3149,7 +4618,6 @@ +@@ -3149,7 +5054,6 @@ width0pt\relax} \fi % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) @@ -8058,7 +8747,7 @@ \vsize = 2\vsize } -@@ -3163,6 +4631,7 @@ +@@ -3163,6 +5067,7 @@ width0pt\relax} \fi % previous page. \dimen@ = \vsize \divide\dimen@ by 2 @@ -8066,7 +8755,7 @@ % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ -@@ -3170,16 +4639,47 @@ +@@ -3170,16 +5075,47 @@ width0pt\relax} \fi \unvbox255 \penalty\outputpenalty } @@ -8116,7 +8805,7 @@ \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. -@@ -3203,8 +4703,9 @@ +@@ -3203,8 +5139,9 @@ width0pt\relax} \fi % \endgroup where \vsize got restored). \pagegoal = \vsize } @@ -8127,11 +8816,26 @@ \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip -@@ -3234,6 +4735,12 @@ +@@ -3234,6 +5171,27 @@ width0pt\relax} \fi \message{sectioning,} % Chapters, sections, etc. -+% \unnumberedno is an oxymoron, of course. But we count the unnumbered ++% Let's start with @part. ++\outer\parseargdef\part{\partzzz{#1}} ++\def\partzzz#1{% ++ \chapoddpage ++ \null ++ \vskip.3\vsize % move it down on the page a bit ++ \begingroup ++ \noindent \titlefonts\rmisbold #1\par % the text ++ \let\lastnode=\empty % no node to associate with ++ \writetocentry{part}{#1}{}% but put it in the toc ++ \headingsoff % no headline or footline on the part page ++ \chapoddpage ++ \endgroup ++} ++ ++% \unnumberedno is an oxymoron. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 @@ -8140,7 +8844,7 @@ \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 -@@ -3241,9 +4748,12 @@ +@@ -3241,9 +5199,12 @@ width0pt\relax} \fi % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ @@ -8154,7 +8858,7 @@ \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% -@@ -3279,13 +4789,18 @@ +@@ -3279,13 +5240,18 @@ width0pt\relax} \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} @@ -8176,7 +8880,7 @@ % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} -@@ -3295,287 +4810,246 @@ +@@ -3295,287 +5261,262 @@ width0pt\relax} \fi \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name @@ -8199,8 +8903,8 @@ +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. -+% To achive this, remember the "biggest" unnum. sec. we are currently in: -+\chardef\unmlevel = \maxseclevel ++% To achieve this, remember the "biggest" unnum. sec. we are currently in: ++\chardef\unnlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. @@ -8242,8 +8946,8 @@ + % The heading type: + \def\headtype{#1}% + \if \headtype U% -+ \ifnum \absseclevel < \unmlevel -+ \chardef\unmlevel = \absseclevel ++ \ifnum \absseclevel < \unnlevel ++ \chardef\unnlevel = \absseclevel + \fi \else - \appendixsubsubseczzz{#2} @@ -8256,10 +8960,10 @@ + \fi\fi + \fi + % Check for numbered within unnumbered: -+ \ifnum \absseclevel > \unmlevel ++ \ifnum \absseclevel > \unnlevel + \def\headtype{U}% + \else -+ \chardef\unmlevel = 3 ++ \chardef\unnlevel = 3 + \fi \fi -\fi @@ -8352,7 +9056,9 @@ + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % -+ \message{\putwordChapter\space \the\chapno}% ++ % \putwordChapter can contain complex things in translations. ++ \toks0=\expandafter{\putwordChapter}% ++ \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -8381,15 +9087,17 @@ -\global\let\section = \appendixsec -\global\let\subsection = \appendixsubsec -\global\let\subsubsection = \appendixsubsubsec -+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz ++\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz ++% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % -+ \def\appendixnum{\putwordAppendix\space \appendixletter}% -+ \message{\appendixnum}% ++ % \putwordAppendix can contain complex things in translations. ++ \toks0=\expandafter{\putwordAppendix}% ++ \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % @@ -8398,7 +9106,8 @@ + \global\let\subsubsection = \appendixsubsubsec +} + -+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz ++% normally unnmhead0 calls unnumberedzzz: ++\outer\parseargdef\unnumbered{\unnmhead0{#1}} +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 @@ -8485,6 +9194,7 @@ -\temp -\donoderef -\nobreak ++% +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 @@ -8503,7 +9213,8 @@ -\temp -\appendixnoderef -\nobreak -+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz ++% normally calls appendixsectionzzz: ++\outer\parseargdef\appendixsection{\apphead1{#1}} +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% @@ -8519,7 +9230,8 @@ -\temp -\unnumbnoderef -\nobreak -+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz ++% normally calls unnumberedseczzz: ++\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% @@ -8537,7 +9249,9 @@ -\temp -\donoderef -\nobreak -+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz ++% ++% normally calls numberedsubseczzz: ++\outer\parseargdef\numberedsubsec{\numhead2{#1}} +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% @@ -8554,7 +9268,8 @@ -\temp -\appendixnoderef -\nobreak -+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz ++% normally calls appendixsubseczzz: ++\outer\parseargdef\appendixsubsec{\apphead2{#1}} +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% @@ -8571,7 +9286,8 @@ -\temp -\unnumbnoderef -\nobreak -+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz ++% normally calls unnumberedsubseczzz: ++\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% @@ -8591,7 +9307,9 @@ -\temp -\donoderef -\nobreak -+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz ++% ++% normally numberedsubsubseczzz: ++\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% @@ -8610,7 +9328,8 @@ -\temp -\appendixnoderef -\nobreak -+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz ++% normally appendixsubsubseczzz: ++\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% @@ -8627,7 +9346,8 @@ -\temp -\unnumbnoderef -\nobreak -+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz ++% normally unnumberedsubsubseczzz: ++\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% @@ -8664,9 +9384,14 @@ % Define @majorheading, @heading and @subheading -@@ -3588,23 +5062,27 @@ +@@ -3587,42 +5528,54 @@ width0pt\relax} \fi + % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. ++\def\majorheading{% ++ {\advance\chapheadingskip by 10pt \chapbreak }% ++ \parsearg\chapheadingzzz ++} -\def\majorheading{\parsearg\majorheadingzzz} -\def\majorheadingzzz #1{% @@ -8674,11 +9399,7 @@ -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} -+\def\majorheading{% -+ {\advance\chapheadingskip by 10pt \chapbreak }% -+ \parsearg\chapheadingzzz -+} - +- -\def\chapheading{\parsearg\chapheadingzzz} -\def\chapheadingzzz #1{\chapbreak % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 @@ -8687,8 +9408,8 @@ +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -+ \parindent=0pt\raggedright -+ \rm #1\hfill}}% ++ \parindent=0pt\ptexraggedright ++ \rmisbold #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} @@ -8706,17 +9427,20 @@ % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), -@@ -3613,8 +5091,6 @@ - %%% Args are the skip and penalty (usually negative) + % given all the information in convenient, parsed form. + +-%%% Args are the skip and penalty (usually negative) ++% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} -\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} - - %%% Define plain chapter starts, and page on/off switching for it +-%%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) +- + \newskip\chapheadingskip -@@ -3622,7 +5098,20 @@ - ++% Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} @@ -8727,9 +9451,8 @@ + \chappager + \ifodd\pageno \else + \begingroup -+ \evenheadline={\hfil}\evenfootline={\hfil}% -+ \oddheadline={\hfil}\oddfootline={\hfil}% -+ \hbox to 0pt{}% ++ \headingsoff ++ \null + \chappager + \endgroup + \fi @@ -8737,7 +9460,7 @@ \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} -@@ -3637,7 +5126,7 @@ +@@ -3637,7 +5590,7 @@ width0pt\relax} \fi \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} @@ -8746,7 +9469,7 @@ \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage -@@ -3645,107 +5134,275 @@ +@@ -3645,107 +5598,293 @@ width0pt\relax} \fi \CHAPPAGon @@ -8787,7 +9510,10 @@ + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% -+ \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: ++ % \noexpand\putwordAppendix avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} ++ \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else @@ -8795,7 +9521,10 @@ + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% -+ \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: ++ % \noexpand\putwordChapter avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thischapter{\noexpand\putwordChapter{} ++ \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi @@ -8814,9 +9543,12 @@ + \domark + % {% - \chapfonts \rm +- \chapfonts \rm - \def\chapnum{#2}% - \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% +- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 \centerparametersmaybe ++ \chapfonts \rmisbold + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called @@ -8853,8 +9585,7 @@ + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright -- \hangindent = \wd0 \centerparametersmaybe ++ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% @@ -8890,8 +9621,10 @@ +% \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak +- \parindent=0pt\raggedright +- \rm #1\hfill}}\bigskip \par\nobreak ++ \parindent=0pt\ptexraggedright ++ \rmisbold #1\hfill}}\bigskip \par\nobreak } - \def\chfopen #1#2{\chapoddpage {\chapfonts @@ -8902,7 +9635,8 @@ \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak +- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak ++ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } - -\def\CHAPFopen{ @@ -8959,16 +9693,21 @@ +% +\def\sectionheading#1#2#3#4{% {% ++ \checkenv{}% should not be in an environment. ++ % % Switch to the right set of fonts. - \csname #1fonts\endcsname \rm -+ \csname #2fonts\endcsname \rm ++ \csname #2fonts\endcsname \rmisbold % - % Only insert the separating space if we have a section number. - \def\secnum{#2}% - \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% + \def\sectionlevel{#2}% + \def\temptype{#3}% -+ % + % +- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 % zero if no section number +- \unhbox0 #3}% + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword @@ -8984,7 +9723,10 @@ + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% -+ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: ++ % \noexpand\putwordSection avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thissection{\noexpand\putwordSection{} ++ \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi @@ -8994,12 +9736,20 @@ + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% -+ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: ++ % \noexpand\putwordSection avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thissection{\noexpand\putwordSection{} ++ \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % ++ % Go into vertical mode. Usually we'll already be there, but we ++ % don't want the following whatsit to end up in a preceding paragraph ++ % if the document didn't happen to have a blank line. ++ \par ++ % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark @@ -9047,11 +9797,9 @@ + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak - % ++ % + % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright -- \hangindent = \wd0 % zero if no section number -- \unhbox0 #3}% ++ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% }% @@ -9068,18 +9816,17 @@ + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) + \vskip-\parskip -+ % ++ % + % This is purely so the last item on the list is a known \penalty > + % 10000. This is so \startdefun can avoid allowing breakpoints after + % section headings. Otherwise, it would insert a valid breakpoint between: -+ % + % @section sec-whatever + % @deffn def-whatever + \penalty 10001 } -@@ -3754,161 +5411,224 @@ +@@ -3754,161 +5893,238 @@ width0pt\relax} \fi \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. @@ -9138,7 +9885,7 @@ +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. -+% ++% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active @@ -9211,7 +9958,7 @@ +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. -+% ++% +\def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -9275,6 +10022,7 @@ - \pageno = \savepageno + \startcontents{\putwordShortTOC}% + % ++ \let\partentry = \shortpartentry + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry @@ -9335,7 +10083,19 @@ -% Chapter-level things, for both the long and short contents. -\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} -- ++% Parts, in the main contents. Replace the part number, which doesn't ++% exist, with an empty box. Let's hope all the numbers have the same width. ++% Also ignore the page number, which is conventionally not printed. ++\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} ++\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} ++% ++% Parts, in the short toc. ++\def\shortpartentry#1#2#3#4{% ++ \penalty-300 ++ \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip ++ \shortchapentry{{\bf #1}}{\numeralbox}{}{}% ++} + -% See comments in \dochapentry re vbox and related settings -\def\shortchapentry#1#2#3{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% @@ -9416,7 +10176,7 @@ % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. -@@ -3939,17 +5659,8 @@ +@@ -3939,17 +6155,8 @@ width0pt\relax} \fi \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} @@ -9436,7 +10196,7 @@ % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} -@@ -3959,72 +5670,62 @@ +@@ -3959,74 +6166,36 @@ width0pt\relax} \fi \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} @@ -9466,56 +10226,42 @@ -% depth .1ex\hfil} -%} - - % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -+% -+% Since these characters are used in examples, they should be an even number of -+% \tt widths. Each \tt character is 1en, so two makes it 1em. -+% - \def\point{$\star$} +-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +-\def\point{$\star$} -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} -+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} - \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} -+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -+% The @error{} command. - % Adapted from the TeXbook's \boxit. -+% -+\newbox\errorbox -+% - {\tentt \global\dimen0 = 3em}% Width of the box. - \dimen2 = .55pt % Thickness of rules - % The text. (`r' is open on the right, `e' somewhat less so on the left.) +- +-% Adapted from the TeXbook's \boxit. +-{\tentt \global\dimen0 = 3em}% Width of the box. +-\dimen2 = .55pt % Thickness of rules +-% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} - -\global\setbox\errorbox=\hbox to \dimen0{\hfil -+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} -+% -+\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. +- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. +- \advance\hsize by -2\dimen2 % Rules. - \vbox{ -+ \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} +- \hrule height\dimen2 +- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. +- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. +- \kern3pt\vrule width\dimen2}% Space to right. +- \hrule height\dimen2} +- \hfil} - -% The @error{} command. -+% - \def\error{\leavevmode\lower.7ex\copy\errorbox} - - % @tex ... @end tex escapes into raw Tex temporarily. +-\def\error{\leavevmode\lower.7ex\copy\errorbox} +- +-% @tex ... @end tex escapes into raw Tex temporarily. ++% @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. - % But \@ or @@ will get a plain tex @ character. +-% But \@ or @@ will get a plain tex @ character. ++% But \@ or @@ will get a plain @ character. -\def\tex{\begingroup +\envdef\tex{% ++ \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie @@ -9532,10 +10278,18 @@ + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other ++ \catcode`\`=\other ++ \catcode`\'=\other \escapechar=`\\ % ++ % ' is active in math mode (mathcode"8000). So reset it, and all our ++ % other math active characters (just in case), to plain's definitions. ++ \mathactive ++ % \let\b=\ptexb -@@ -4036,20 +5737,26 @@ + \let\bullet=\ptexbullet + \let\c=\ptexc +@@ -4036,20 +6205,26 @@ width0pt\relax} \fi \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi @@ -9566,7 +10320,7 @@ % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in -@@ -4059,34 +5766,34 @@ +@@ -4059,34 +6234,34 @@ width0pt\relax} \fi % have any width. \def\lisppar{\null\endgraf} @@ -9619,7 +10373,7 @@ \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around -@@ -4110,738 +5817,733 @@ +@@ -4110,738 +6285,821 @@ width0pt\relax} \fi % \newskip\lskip\newskip\rskip @@ -9664,6 +10418,12 @@ + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing = t% ++ % ++ % If this cartouche directly follows a sectioning command, we need the ++ % \parskip glue (backspaced over by default) or the cartouche can ++ % collide with the section heading. ++ \ifnum\lastpenalty>10000 \vskip\parskip \fi ++ % + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop @@ -9677,7 +10437,7 @@ + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip -+ \comment % For explanation, see the end of \def\group. ++ \comment % For explanation, see the end of def\group. +} \def\Ecartouche{% - \endgroup @@ -9704,6 +10464,7 @@ % This macro is called at the beginning of all the @example variants, % inside a group. ++\newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak - \inENV % This group ends at the end of the body @@ -9713,7 +10474,12 @@ \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt ++ % Turn off paragraph indentation but redefine \indent to emulate ++ % the normal \indent. ++ \nonfillparindent=\parindent \parindent = 0pt ++ \let\indent\nonfillindent ++ % \emergencystretch = 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. @@ -9736,12 +10502,38 @@ -% the zero \parskip that the environments set -- \parskip glue will be -% inserted at the beginning of the next paragraph in the document, after -% the environment. +-% +-\def\nonfillfinish{\afterenvbreak\endgroup} ++\begingroup ++\obeyspaces ++% We want to swallow spaces (but not other tokens) after the fake ++% @indent in our nonfill-environments, where spaces are normally ++% active and set to @tie, resulting in them not being ignored after ++% @indent. ++\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% ++\gdef\nonfillindentcheck{% ++\ifx\temp % ++\expandafter\nonfillindentgobble% ++\else% ++\leavevmode\nonfillindentbox% ++\fi% ++}% ++\endgroup ++\def\nonfillindentgobble#1{\nonfillindent} ++\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + +-% @lisp: indented, narrowed, typewriter font. +-\def\lisp{\begingroup +- \nonfillstart +- \let\Elisp = \nonfillfinish +- \tt +- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. +- \gobble % eat return +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp - % --\def\nonfillfinish{\afterenvbreak\endgroup} ++% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax @@ -9761,40 +10553,33 @@ + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi -+} - --% @lisp: indented, narrowed, typewriter font. --\def\lisp{\begingroup -- \nonfillstart -- \let\Elisp = \nonfillfinish -- \tt -- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. -- \gobble % eat return -+% We often define two environments, @foo and @smallfoo. -+% Let's do it by one command: -+\def\makedispenv #1#2{ -+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} -+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} -+ \expandafter\let\csname E#1\endcsname \afterenvbreak -+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% @example: Same as @lisp. -\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -+% Define two synonyms: -+\def\maketwodispenvs #1#2#3{ -+ \makedispenv{#1}{#3} -+ \makedispenv{#2}{#3} ++% We often define two environments, @foo and @smallfoo. ++% Let's do it in one command. #1 is the env name, #2 the definition. ++\def\makedispenvdef#1#2{% ++ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% ++ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% ++ \expandafter\let\csname E#1\endcsname \afterenvbreak ++ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} -% @small... is usually equivalent to the non-small (@smallbook -% redefines). We must call \example (or whatever) last in the -% definition, since it reads the return following the @example (or -% whatever) command. --% ++% Define two environment synonyms (#1 and #2) for an environment. ++\def\maketwodispenvdef#1#2#3{% ++ \makedispenvdef{#1}{#3}% ++ \makedispenvdef{#2}{#3}% ++} + % -% This actually allows (for example) @end display inside an -% @smalldisplay. Too bad, but makeinfo will catch the error anyway. -+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. ++% @lisp: indented, narrowed, typewriter font; ++% @example: same as @lisp. % -\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} -\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} @@ -9814,13 +10599,13 @@ -% @display: same as @lisp except keep current font. % -\def\display{\begingroup -+\maketwodispenvs {lisp}{example}{% ++\maketwodispenvdef{lisp}{example}{% \nonfillstart - \let\Edisplay = \nonfillfinish - \gobble -+ \tt\quoteexpand ++ \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. -+ \gobble % eat return ++ \gobble % eat return } - -% @smalldisplay (when @smallbook): @display plus smaller fonts. @@ -9830,7 +10615,7 @@ - \def\Esmalldisplay{\nonfillfinish\endgroup}% - \smallfonts \rm - \display -+\makedispenv {display}{% ++\makedispenvdef{display}{% + \nonfillstart + \gobble } @@ -9840,7 +10625,7 @@ % -\def\format{\begingroup - \let\nonarrowing = t -+\makedispenv{format}{% ++\makedispenvdef{format}{% + \let\nonarrowing = t% \nonfillstart - \let\Eformat = \nonfillfinish @@ -9873,11 +10658,36 @@ + \let\nonarrowing = t% \nonfillstart - \let\Eflushright = \nonfillfinish - \advance\leftskip by 0pt plus 1fill +- \advance\leftskip by 0pt plus 1fill ++ \advance\leftskip by 0pt plus 1fill\relax \gobble } +\let\Eflushright = \afterenvbreak + ++ ++% @raggedright does more-or-less normal line breaking but no right ++% justification. From plain.tex. ++\envdef\raggedright{% ++ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax ++} ++\let\Eraggedright\par ++ ++\envdef\raggedleft{% ++ \parindent=0pt \leftskip0pt plus2em ++ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt ++ \hbadness=10000 % Last line will usually be underfull, so turn off ++ % badness reporting. ++} ++\let\Eraggedleft\par ++ ++\envdef\raggedcenter{% ++ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em ++ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt ++ \hbadness=10000 % Last line will usually be underfull, so turn off ++ % badness reporting. ++} ++\let\Eraggedcenter\par ++ % @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. @@ -9887,7 +10697,9 @@ % -\def\quotation{% - \begingroup\inENV %This group ends at the end of the @quotation body -+\envdef\quotation{% ++\makedispenvdef{quotation}{\quotationstart} ++% ++\def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \singlespace \parindent=0pt @@ -9911,12 +10723,13 @@ +% +\def\Equotation{% + \par -+ \ifx\quotationauthor\undefined\else ++ \ifx\quotationauthor\thisisundefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} ++\def\Esmallquotation{\Equotation} -\message{defuns,} -% @defun etc. @@ -9978,6 +10791,10 @@ + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% ++ % Don't do the quotes -- if we do, @set txicodequoteundirected and ++ % @set txicodequotebacktick will not have effect on @verb and ++ % @verbatim, and ?` and !` ligatures won't get disabled. ++ %\do\`\do\'% } % -% This is the definition of ( when already inside a level of parens. @@ -9992,11 +10809,7 @@ - \global\advance \parencount by -1 } -% If we encounter &foo, then turn on ()-hacking afterwards -\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } -+% [Knuth] pp. 380,381,391 -+% Disable Spanish ligatures ?` and !` of \tt font -+\begingroup -+ \catcode`\`=\active\gdef`{\relax\lq} -+\endgroup ++% Setup for the @verb command. % -\gdef\normalparens{\boldbrax\let&=\ampnr} -} % End of definition inside \activeparens @@ -10012,8 +10825,6 @@ -{ - \catcode`& = 13 - \global\let& = \ampnr -+% Setup for the @verb command. -+% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active @@ -10023,7 +10834,7 @@ +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% -+ \catcode`\`=\active ++ \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and @@ -10037,10 +10848,31 @@ -% #2 should be the type of definition, such as "Function". +% Setup for the @verbatim environment +% -+% Real tab expansion ++% Real tab expansion. +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% -+\def\starttabbox{\setbox0=\hbox\bgroup} ++% We typeset each line of the verbatim in an \hbox, so we can handle ++% tabs. The \global is in case the verbatim line starts with an accent, ++% or some other command that starts with a begin-group. Otherwise, the ++% entire \verbbox would disappear at the corresponding end-group, before ++% it is typeset. Meanwhile, we can't have nested verbatim commands ++% (can we?), so the \global won't be overwriting itself. ++\newbox\verbbox ++\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} ++% ++\begingroup ++ \catcode`\^^I=\active ++ \gdef\tabexpand{% ++ \catcode`\^^I=\active ++ \def^^I{\leavevmode\egroup ++ \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab ++ \divide\dimen\verbbox by\tabw ++ \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw ++ \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw ++ \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox ++ }% ++ } ++\endgroup -\def\defname #1#2{% -% Get the values of \leftskip and \rightskip as they were @@ -10064,108 +10896,33 @@ -\advance\leftskip by -\defbodyindent -\exdentamount=\defbodyindent -{\df #1}\enskip % Generate function name -+% Allow an option to not replace quotes with a regular directed right -+% quote/apostrophe (char 0x27), but instead use the undirected quote -+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -+% the default, but it works for pasting with more pdf viewers (at least -+% evince), the lilypond developers report. xpdf does work with the -+% regular 0x27. -+% -+\def\codequoteright{% -+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax -+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax -+ '% -+ \else \char'15 \fi -+ \else \char'15 \fi - } -+% -+% and a similar option for the left quote char vs. a grave accent. -+% Modern fonts display ASCII 0x60 as a grave accent, so some people like -+% the code environments to do likewise. -+% -+\def\codequoteleft{% -+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax -+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax -+ `% -+ \else \char'22 \fi -+ \else \char'22 \fi -+} -+% -+\begingroup -+ \catcode`\^^I=\active -+ \gdef\tabexpand{% -+ \catcode`\^^I=\active -+ \def^^I{\leavevmode\egroup -+ \dimen0=\wd0 % the width so far, or since the previous tab -+ \divide\dimen0 by\tabw -+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw -+ \advance\dimen0 by\tabw % advance to next multiple of \tabw -+ \wd0=\dimen0 \box0 \starttabbox -+ }% -+ } -+ \catcode`\'=\active -+ \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% -+ % -+ \catcode`\`=\active -+ \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% -+ % -+ \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% -+\endgroup - --% Actually process the body of a definition --% #1 should be the terminating control sequence, such as \Edefun. --% #2 should be the "another name" control sequence, such as \defunx. --% #3 should be the control sequence that actually processes the header, --% such as \defunheader. -- --\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody --\medbreak % --% Define the end token that this defining construct specifies --% so that it will exit this group. --\def#1{\endgraf\endgroup\medbreak}% --\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup % --\catcode 61=\active % 61 is `=' --\obeylines\activeparens\spacesplit#3} +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart -+ % Easiest (and conventionally used) font for verbatim -+ \tt -+ \def\par{\leavevmode\egroup\box0\endgraf}% -+ \catcode`\`=\active ++ \tt % easiest (and conventionally used) font for verbatim ++ % The \leavevmode here is for blank lines. Otherwise, we would ++ % never \starttabox and the \egroup would end verbatim mode. ++ \def\par{\leavevmode\egroup\box\verbbox\endgraf}% + \tabexpand -+ \quoteexpand ++ \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and -+ % make each space count -+ % must do in this order: ++ % make each space count. ++ % Must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% -+} + } --% #1 is the \E... control sequence to end the definition (which we define). --% #2 is the \...x control sequence for consecutive fns (which we define). --% #3 is the control sequence to call to resume processing. --% #4, delimited by the space, is the class name. +-% Actually process the body of a definition +-% #1 should be the terminating control sequence, such as \Edefun. +-% #2 should be the "another name" control sequence, such as \defunx. +-% #3 should be the control sequence that actually processes the header, +-% such as \defunheader. +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: - % --\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % --\medbreak % --% Define the end token that this defining construct specifies --% so that it will exit this group. --\def#1{\endgraf\endgroup\medbreak}% --\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} ++% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} @@ -10204,14 +10961,43 @@ +} +\let\Everbatim = \afterenvbreak +-\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody +-\medbreak % +-% Define the end token that this defining construct specifies +-% so that it will exit this group. +-\def#1{\endgraf\endgroup\medbreak}% +-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup % +-\catcode 61=\active % 61 is `=' +-\obeylines\activeparens\spacesplit#3} + +-% #1 is the \E... control sequence to end the definition (which we define). +-% #2 is the \...x control sequence for consecutive fns (which we define). +-% #3 is the control sequence to call to resume processing. +-% #4, delimited by the space, is the class name. ++% @verbatiminclude FILE - insert text of file in verbatim environment. + % +-\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % +-\medbreak % +-% Define the end token that this defining construct specifies +-% so that it will exit this group. +-\def#1{\endgraf\endgroup\medbreak}% +-\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} +- -% Used for @deftypemethod and @deftypeivar. -% #1 is the \E... control sequence to end the definition (which we define). -% #2 is the \...x control sequence for consecutive fns (which we define). -% #3 is the control sequence to call to resume processing. -% #4, delimited by a space, is the class name. -% #5 is the method's return type. -+ -+% @verbatiminclude FILE - insert text of file in verbatim environment. ++\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % -\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV - \medbreak @@ -10221,12 +11007,12 @@ - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} -+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} -+% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim ++ \indexnofonts % Allow `@@' and other weird things in file names. ++ \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 + \afterenvbreak + }% @@ -10329,7 +11115,7 @@ + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % -+ % As a minor refinement, we avoid "club" headers by signalling ++ % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. @@ -10381,7 +11167,7 @@ + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 -+ \advance\rightskip by 0pt plus 1fil ++ \advance\rightskip by 0pt plus 1fil\relax + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx @@ -10393,20 +11179,40 @@ -% Fine, but then we have to eventually remove the \empty *and* the -% braces (if any). That's what this does. --% --\def\removeemptybraces\empty#1\relax{#1} +\def\Edefun{\endgraf\medbreak} ++ ++% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; ++% the only thing remaining is to define \deffnheader. + % +-\def\removeemptybraces\empty#1\relax{#1} ++\def\makedefun#1{% ++ \expandafter\let\csname E#1\endcsname = \Edefun ++ \edef\temp{\noexpand\domakedefun ++ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% ++ \temp ++} -% After \spacesplit has done its work, this is called -- #1 is the final -% thing to call, #2 the type name (which starts with \empty), and #3 -% (which might be empty) the arguments. -+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -+% the only thing remaining is to define \deffnheader. ++% \domakedefun \deffn \deffnx \deffnheader % -\def\parsetpheaderline#1#2#3{% - #1{\removeemptybraces#2\relax}{#3}% -}% -- ++% Define \deffn and \deffnx, without parameters. ++% \deffnheader has to be defined explicitly. ++% ++\def\domakedefun#1#2#3{% ++ \envdef#1{% ++ \startdefun ++ \doingtypefnfalse % distinguish typed functions from all else ++ \parseargusing\activeparens{\printdefunline#3}% ++ }% ++ \def#2{\dodefunx#1}% ++ \def#3% ++} + -\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies @@ -10418,12 +11224,8 @@ -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\spacesplit{#3{#5}}} -+\def\makedefun#1{% -+ \expandafter\let\csname E#1\endcsname = \Edefun -+ \edef\temp{\noexpand\domakedefun -+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% -+ \temp -+} ++\newif\ifdoingtypefn % doing typed function? ++\newif\ifrettypeownline % typeset return type on its own line? -% Split up #2 at the first space token. -% call #1 with two arguments: @@ -10431,18 +11233,23 @@ -% the second is all of #2 after that space token. -% If #2 contains no space token, all of it is passed as the first arg -% and the second is passed as empty. -+% \domakedefun \deffn \deffnx \deffnheader -+% -+% Define \deffn and \deffnx, without parameters. -+% \deffnheader has to be defined explicitly. -+% -+\def\domakedefun#1#2#3{% -+ \envdef#1{% -+ \startdefun -+ \parseargusing\activeparens{\printdefunline#3}% -+ }% -+ \def#2{\dodefunx#1}% -+ \def#3% ++% @deftypefnnewline on|off says whether the return type of typed functions ++% are printed on their own line. This affects @deftypefn, @deftypefun, ++% @deftypeop, and @deftypemethod. ++% ++\parseargdef\deftypefnnewline{% ++ \def\temp{#1}% ++ \ifx\temp\onword ++ \expandafter\let\csname SETtxideftypefnnl\endcsname ++ = \empty ++ \else\ifx\temp\offword ++ \expandafter\let\csname SETtxideftypefnnl\endcsname ++ = \relax ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @txideftypefnnl value `\temp', ++ must be on|off}% ++ \fi\fi +} -{\obeylines @@ -10450,7 +11257,7 @@ -\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% -\ifx\relax #3% -#1{#2}{}\else #1{#2}{#3#4}\fi}} -+%%% Untyped functions: ++% Untyped functions: -% So much for the things common to all kinds of definitions. +% @deffn category name args @@ -10494,7 +11301,7 @@ -\advance\rightskip by 0pt plus 1fil -\endgraf\nobreak\vskip -\parskip\nobreak -} -+%%% Typed functions: ++% Typed functions: -% Do complete processing of one @defun or @defunx line already parsed. +% @deftypefn category type name args @@ -10515,13 +11322,14 @@ +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% ++ \doingtypefntrue + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -% @defun == @deffn Function - -\def\defun{\defparsebody\Edefun\defunx\defunheader} -+%%% Typed variables: ++% Typed variables: -\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{\putwordDeffunc}% @@ -10557,11 +11365,13 @@ -% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) - -\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} -- ++% Untyped variables: + -% \defheaderxcond#1\relax$$$ -% puts #1 in @code, followed by a space, but does nothing if #1 is null. -\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} -+%%% Untyped variables: ++% @defvr category var args ++\makedefun{defvr}#1 {\deftypevrheader{#1} {} } -% #1 is the classification. #2 is the data type. #3 is the name and args. -\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} @@ -10575,22 +11385,20 @@ -\deftypefunargs {#4}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} -+% @defvr category var args -+\makedefun{defvr}#1 {\deftypevrheader{#1} {} } - --% @defmac == @deffn Macro +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} --\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} +-% @defmac == @deffn Macro +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } +-\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} ++% Types: + -\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{\putwordDefmac}% -\defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -+%%% Type: +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% @@ -10634,25 +11442,49 @@ -\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% -\defunargs {#3}\endgroup % +\def\defname#1#2#3{% ++ \par + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % -+ % How we'll format the type name. Putting it in brackets helps ++ % Determine if we are typesetting the return type of a typed function ++ % on a line by itself. ++ \rettypeownlinefalse ++ \ifdoingtypefn % doing a typed function specifically? ++ % then check user option for putting return type on its own line: ++ \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else ++ \rettypeownlinetrue ++ \fi ++ \fi ++ % ++ % How we'll format the category name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % -+ % Figure out line sizes for the paragraph shape. ++ % Figure out line sizes for the paragraph shape. We'll always have at ++ % least two. ++ \tempnum = 2 ++ % + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip ++ % ++ % If doing a return type on its own line, we'll have another line. ++ \ifrettypeownline ++ \advance\tempnum by 1 ++ \def\maybeshapeline{0in \hsize}% ++ \else ++ \def\maybeshapeline{}% ++ \fi ++ % + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent -+ % (plain.tex says that \dimen1 should be used only as global.) -+ \parshape 2 0in \dimen0 \defargsindent \dimen2 + % -+ % Put the type name to the right margin. ++ % The final paragraph shape: ++ \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 ++ % ++ % Put the category name at the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize @@ -10674,8 +11506,16 @@ + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt -+ \def\temp{#2}% return value type -+ \ifx\temp\empty\else \tclose{\temp} \fi ++ \def\temp{#2}% text of the return type ++ \ifx\temp\empty\else ++ \tclose{\temp}% typeset the return type ++ \ifrettypeownline ++ % put return type on its own line; prohibit line break following: ++ \hfil\vadjust{\nobreak}\break ++ \else ++ \space % type on same line, so just followed by a space ++ \fi ++ \fi % no return type + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm @@ -10709,7 +11549,7 @@ + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. -+ \let\var=\ttslanted ++ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 } @@ -10942,10 +11782,11 @@ \message{macros,} -@@ -4850,42 +6552,68 @@ +@@ -4849,43 +7107,74 @@ width0pt\relax} \fi + % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. - \ifx\eTeXversion\undefined +-\ifx\eTeXversion\undefined - \newwrite\macscribble - \def\scanmacro#1{% - \begingroup \newlinechar`\^^M @@ -10966,6 +11807,7 @@ -% Undo catcode changes of \startcontents and \doprintindex -\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ -\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} ++\ifx\eTeXversion\thisisundefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% @@ -10976,25 +11818,30 @@ + } \fi -+\def\scanmacro#1{% -+ \begingroup -+ \newlinechar`\^^M -+ \let\xeatspaces\eatspaces -+ % Undo catcode changes of \startcontents and \doprintindex -+ % When called from @insertcopying or (short)caption, we need active -+ % backslash to get it printed correctly. Previously, we had -+ % \catcode`\\=\other instead. We'll see whether a problem appears -+ % with macro expansion. --kasal, 19aug04 -+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ -+ % ... and \example -+ \spaceisspace -+ % -+ % Append \endinput to make sure that TeX does not see the ending newline. -+ % I've verified that it is necessary both for e-TeX and for ordinary TeX -+ % --kasal, 29nov03 -+ \scantokens{#1\endinput}% -+ \endgroup -+} ++\def\scanmacro#1{\begingroup ++ \newlinechar`\^^M ++ \let\xeatspaces\eatspaces ++ % ++ % Undo catcode changes of \startcontents and \doprintindex ++ % When called from @insertcopying or (short)caption, we need active ++ % backslash to get it printed correctly. Previously, we had ++ % \catcode`\\=\other instead. We'll see whether a problem appears ++ % with macro expansion. --kasal, 19aug04 ++ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ ++ % ++ % ... and for \example: ++ \spaceisspace ++ % ++ % The \empty here causes a following catcode 5 newline to be eaten as ++ % part of reading whitespace after a control sequence. It does not ++ % eat a catcode 13 newline. There's no good way to handle the two ++ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX ++ % would then have different behavior). See the Macro Details node in ++ % the manual for the workaround we recommend for macros and ++ % line-oriented commands. ++ % ++ \scantokens{#1\empty}% ++\endgroup} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% @@ -11025,7 +11872,7 @@ +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). -+% ++% \def\cslet#1#2{% -\expandafter\expandafter -\expandafter\let @@ -11039,7 +11886,7 @@ % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). -@@ -4898,7 +6626,7 @@ +@@ -4898,7 +7187,7 @@ width0pt\relax} \fi } % Trim a single trailing ^^M off a string. @@ -11048,19 +11895,25 @@ \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% -@@ -4908,34 +6636,45 @@ - % all characters are catcode 10, 11 or 12, except \ which is active - % (as in normal texinfo). It is necessary to change the definition of \. +@@ -4906,147 +7195,403 @@ width0pt\relax} \fi + % Macro bodies are absorbed as an argument in a context where + % all characters are catcode 10, 11 or 12, except \ which is active +-% (as in normal texinfo). It is necessary to change the definition of \. +- ++% (as in normal texinfo). It is necessary to change the definition of \ ++% to recognize macro arguments; this is the job of \mbodybackslash. ++% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. -+ ++% % It's necessary to have hard CRs when the macro is executed. This is - % done by making ^^M (\endlinechar) catcode 12 when reading the macro +-% done by making ^^M (\endlinechar) catcode 12 when reading the macro ++% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -+\def\scanctxt{% ++% ++\def\scanctxt{% used as subroutine + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other @@ -11072,14 +11925,8 @@ + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} -+ -+\def\scanargctxt{% -+ \scanctxt -+ \catcode`\\=\other -+ \catcode`\^^M=\other -+} -+ - \def\macrobodyctxt{% + +-\def\macrobodyctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 @@ -11092,14 +11939,41 @@ - \catcode`\@=12 - \catcode`\^^M=12 - \usembodybackslash} ++\def\scanargctxt{% used for copying and captions, not macros. ++ \scanctxt ++ \catcode`\\=\other ++ \catcode`\^^M=\other ++} ++ ++\def\macrobodyctxt{% used for @macro definitions + \scanctxt + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} ++ ++\def\macroargctxt{% used when scanning invocations ++ \scanctxt ++ \catcode`\\=0 ++} ++% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" ++% for the single characters \ { }. Thus, we end up with the "commands" ++% that would be written @\ @{ @} in a Texinfo document. ++% ++% We already have @{ and @}. For @\, we define it here, and only for ++% this purpose, to produce a typewriter backslash (so, the @\ that we ++% define for @math can't be used with @macro calls): ++% ++\def\\{\normalbackslash}% ++% ++% We would like to do this for \, too, since that is what makeinfo does. ++% But it is not possible, because Texinfo already has a command @, for a ++% cedilla accent. Documents must use @comma{} instead. ++% ++% \anythingelse will almost certainly be an error of some kind. - \def\macroargctxt{% +-\def\macroargctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 @@ -11109,13 +11983,41 @@ - \catcode`\+=12 - \catcode`\@=12 - \catcode`\\=12} -+ \scanctxt -+ \catcode`\\=\other -+} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N -@@ -4963,45 +6702,42 @@ + % where N is the macro parameter number. + % We define \csname macarg.\endcsname to be \realbackslash, so + % \\ in macro replacement text gets you a backslash. +- ++% + {\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} + } + \expandafter\def\csname macarg.\endcsname{\realbackslash} + ++\def\margbackslash#1{\char`\#1 } ++ + \def\macro{\recursivefalse\parsearg\macroxxx} + \def\rmacro{\recursivetrue\parsearg\macroxxx} + + \def\macroxxx#1{% +- \getargs{#1}% now \macname is the macname and \argl the arglist ++ \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments +- \paramno=0% ++ \paramno=0\relax + \else + \expandafter\parsemargdef \argl;% ++ \if\paramno>256\relax ++ \ifx\eTeXversion\thisisundefined ++ \errhelp = \EMsimple ++ \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} ++ \fi ++ \fi + \fi + \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax @@ -11179,11 +12081,376 @@ % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. -@@ -5111,34 +6847,31 @@ + \def\getargs#1{\getargsxxx#1{}} + \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +-\def\getmacname #1 #2\relax{\macname={#1}} ++\def\getmacname#1 #2\relax{\macname={#1}} + \def\getmacargs#1{\def\argl{#1}} + ++% For macro processing make @ a letter so that we can make Texinfo private macro names. ++\edef\texiatcatcode{\the\catcode`\@} ++\catcode `@=11\relax ++ + % Parse the optional {params} list. Set up \paramno and \paramlist +-% so \defmacro knows what to do. Define \macarg.blah for each blah +-% in the params list, to be ##N where N is the position in that list. ++% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH ++% in the params list to some hook where the argument si to be expanded. If ++% there are less than 10 arguments that hook is to be replaced by ##N where N ++% is the position in that list, that is to say the macro arguments are to be ++% defined `a la TeX in the macro body. ++% + % That gets used by \mbodybackslash (above). +- ++% + % We need to get `macro parameter char #' into several definitions. +-% The technique used is stolen from LaTeX: let \hash be something ++% The technique used is stolen from LaTeX: let \hash be something + % unexpandable, insert that wherever you need a #, and then redefine + % it to # just before using the token list produced. + % + % The same technique is used to protect \eatspaces till just before + % the macro is used. +- +-\def\parsemargdef#1;{\paramno=0\def\paramlist{}% +- \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} ++% ++% If there are 10 or more arguments, a different technique is used, where the ++% hook remains in the body, and when macro is to be expanded the body is ++% processed again to replace the arguments. ++% ++% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the ++% argument N value and then \edef the body (nothing else will expand because of ++% the catcode regime underwhich the body was input). ++% ++% If you compile with TeX (not eTeX), and you have macros with 10 or more ++% arguments, you need that no macro has more than 256 arguments, otherwise an ++% error is produced. ++\def\parsemargdef#1;{% ++ \paramno=0\def\paramlist{}% ++ \let\hash\relax ++ \let\xeatspaces\relax ++ \parsemargdefxxx#1,;,% ++ % In case that there are 10 or more arguments we parse again the arguments ++ % list to set new definitions for the \macarg.BLAH macros corresponding to ++ % each BLAH argument. It was anyhow needed to parse already once this list ++ % in order to count the arguments, and as macros with at most 9 arguments ++ % are by far more frequent than macro with 10 or more arguments, defining ++ % twice the \macarg.BLAH macros does not cost too much processing power. ++ \ifnum\paramno<10\relax\else ++ \paramno0\relax ++ \parsemmanyargdef@@#1,;,% 10 or more arguments ++ \fi ++} + \def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx +- \advance\paramno by 1% ++ \advance\paramno by 1 + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + ++\def\parsemmanyargdef@@#1,{% ++ \if#1;\let\next=\relax ++ \else ++ \let\next=\parsemmanyargdef@@ ++ \edef\tempb{\eatspaces{#1}}% ++ \expandafter\def\expandafter\tempa ++ \expandafter{\csname macarg.\tempb\endcsname}% ++ % Note that we need some extra \noexpand\noexpand, this is because we ++ % don't want \the to be expanded in the \parsermacbody as it uses an ++ % \xdef . ++ \expandafter\edef\tempa ++ {\noexpand\noexpand\noexpand\the\toks\the\paramno}% ++ \advance\paramno by 1\relax ++ \fi\next} ++ + % These two commands read recursive and nonrecursive macro bodies. + % (They're different since rec and nonrec macros end differently.) ++% + ++\catcode `\@\texiatcatcode + \long\def\parsemacbody#1@end macro% + {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% + \long\def\parsermacbody#1@end rmacro% + {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% ++\catcode `\@=11\relax + +-% This defines the macro itself. There are six cases: recursive and +-% nonrecursive macros of zero, one, and many arguments. ++\let\endargs@\relax ++\let\nil@\relax ++\def\nilm@{\nil@}% ++\long\def\nillm@{\nil@}% ++ ++% This macro is expanded during the Texinfo macro expansion, not during its ++% definition. It gets all the arguments values and assigns them to macros ++% macarg.ARGNAME ++% ++% #1 is the macro name ++% #2 is the list of argument names ++% #3 is the list of argument values ++\def\getargvals@#1#2#3{% ++ \def\macargdeflist@{}% ++ \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. ++ \def\paramlist{#2,\nil@}% ++ \def\macroname{#1}% ++ \begingroup ++ \macroargctxt ++ \def\argvaluelist{#3,\nil@}% ++ \def\@tempa{#3}% ++ \ifx\@tempa\empty ++ \setemptyargvalues@ ++ \else ++ \getargvals@@ ++ \fi ++} ++ ++% ++\def\getargvals@@{% ++ \ifx\paramlist\nilm@ ++ % Some sanity check needed here that \argvaluelist is also empty. ++ \ifx\argvaluelist\nillm@ ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Too many arguments in macro `\macroname'!}% ++ \fi ++ \let\next\macargexpandinbody@ ++ \else ++ \ifx\argvaluelist\nillm@ ++ % No more arguments values passed to macro. Set remaining named-arg ++ % macros to empty. ++ \let\next\setemptyargvalues@ ++ \else ++ % pop current arg name into \@tempb ++ \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% ++ \expandafter\@tempa\expandafter{\paramlist}% ++ % pop current argument value into \@tempc ++ \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% ++ \expandafter\@tempa\expandafter{\argvaluelist}% ++ % Here \@tempb is the current arg name and \@tempc is the current arg value. ++ % First place the new argument macro definition into \@tempd ++ \expandafter\macname\expandafter{\@tempc}% ++ \expandafter\let\csname macarg.\@tempb\endcsname\relax ++ \expandafter\def\expandafter\@tempe\expandafter{% ++ \csname macarg.\@tempb\endcsname}% ++ \edef\@tempd{\long\def\@tempe{\the\macname}}% ++ \push@\@tempd\macargdeflist@ ++ \let\next\getargvals@@ ++ \fi ++ \fi ++ \next ++} ++ ++\def\push@#1#2{% ++ \expandafter\expandafter\expandafter\def ++ \expandafter\expandafter\expandafter#2% ++ \expandafter\expandafter\expandafter{% ++ \expandafter#1#2}% ++} ++ ++% Replace arguments by their values in the macro body, and place the result ++% in macro \@tempa ++\def\macvalstoargs@{% ++ % To do this we use the property that token registers that are \the'ed ++ % within an \edef expand only once. So we are going to place all argument ++ % values into respective token registers. ++ % ++ % First we save the token context, and initialize argument numbering. ++ \begingroup ++ \paramno0\relax ++ % Then, for each argument number #N, we place the corresponding argument ++ % value into a new token list register \toks#N ++ \expandafter\putargsintokens@\saveparamlist@,;,% ++ % Then, we expand the body so that argument are replaced by their ++ % values. The trick for values not to be expanded themselves is that they ++ % are within tokens and that tokens expand only once in an \edef . ++ \edef\@tempc{\csname mac.\macroname .body\endcsname}% ++ % Now we restore the token stack pointer to free the token list registers ++ % which we have used, but we make sure that expanded body is saved after ++ % group. ++ \expandafter ++ \endgroup ++ \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% ++ } ++ ++\def\macargexpandinbody@{% ++ %% Define the named-macro outside of this group and then close this group. ++ \expandafter ++ \endgroup ++ \macargdeflist@ ++ % First the replace in body the macro arguments by their values, the result ++ % is in \@tempa . ++ \macvalstoargs@ ++ % Then we point at the \norecurse or \gobble (for recursive) macro value ++ % with \@tempb . ++ \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname ++ % Depending on whether it is recursive or not, we need some tailing ++ % \egroup . ++ \ifx\@tempb\gobble ++ \let\@tempc\relax ++ \else ++ \let\@tempc\egroup ++ \fi ++ % And now we do the real job: ++ \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% ++ \@tempd ++} ++ ++\def\putargsintokens@#1,{% ++ \if#1;\let\next\relax ++ \else ++ \let\next\putargsintokens@ ++ % First we allocate the new token list register, and give it a temporary ++ % alias \@tempb . ++ \toksdef\@tempb\the\paramno ++ % Then we place the argument value into that token list register. ++ \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname ++ \expandafter\@tempb\expandafter{\@tempa}% ++ \advance\paramno by 1\relax ++ \fi ++ \next ++} ++ ++% Save the token stack pointer into macro #1 ++\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} ++% Restore the token stack pointer from number in macro #1 ++\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} ++% newtoks that can be used non \outer . ++\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} ++ ++% Tailing missing arguments are set to empty ++\def\setemptyargvalues@{% ++ \ifx\paramlist\nilm@ ++ \let\next\macargexpandinbody@ ++ \else ++ \expandafter\setemptyargvaluesparser@\paramlist\endargs@ ++ \let\next\setemptyargvalues@ ++ \fi ++ \next ++} ++ ++\def\setemptyargvaluesparser@#1,#2\endargs@{% ++ \expandafter\def\expandafter\@tempa\expandafter{% ++ \expandafter\def\csname macarg.#1\endcsname{}}% ++ \push@\@tempa\macargdeflist@ ++ \def\paramlist{#2}% ++} ++ ++% #1 is the element target macro ++% #2 is the list macro ++% #3,#4\endargs@ is the list value ++\def\pop@#1#2#3,#4\endargs@{% ++ \def#1{#3}% ++ \def#2{#4}% ++} ++\long\def\longpop@#1#2#3,#4\endargs@{% ++ \long\def#1{#3}% ++ \long\def#2{#4}% ++} ++ ++% This defines a Texinfo @macro. There are eight cases: recursive and ++% nonrecursive macros of zero, one, up to nine, and many arguments. + % Much magic with \expandafter here. + % \xdef is used so that macro definitions will survive the file + % they're defined in; @include reads the file inside a group. ++% + \def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive +@@ -5061,17 +7606,25 @@ width0pt\relax} \fi + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% +- \else % many +- \expandafter\xdef\csname\the\macname\endcsname{% +- \bgroup\noexpand\macroargctxt +- \noexpand\csname\the\macname xx\endcsname}% +- \expandafter\xdef\csname\the\macname xx\endcsname##1{% +- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% +- \expandafter\expandafter +- \expandafter\xdef +- \expandafter\expandafter +- \csname\the\macname xxx\endcsname +- \paramlist{\egroup\noexpand\scanmacro{\temp}}% ++ \else ++ \ifnum\paramno<10\relax % at most 9 ++ \expandafter\xdef\csname\the\macname\endcsname{% ++ \bgroup\noexpand\macroargctxt ++ \noexpand\csname\the\macname xx\endcsname}% ++ \expandafter\xdef\csname\the\macname xx\endcsname##1{% ++ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% ++ \expandafter\expandafter ++ \expandafter\xdef ++ \expandafter\expandafter ++ \csname\the\macname xxx\endcsname ++ \paramlist{\egroup\noexpand\scanmacro{\temp}}% ++ \else % 10 or more ++ \expandafter\xdef\csname\the\macname\endcsname{% ++ \noexpand\getargvals@{\the\macname}{\argl}% ++ }% ++ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp ++ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble ++ \fi + \fi + \else + \ifcase\paramno +@@ -5088,115 +7641,158 @@ width0pt\relax} \fi + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% +- \else % many +- \expandafter\xdef\csname\the\macname\endcsname{% +- \bgroup\noexpand\macroargctxt +- \expandafter\noexpand\csname\the\macname xx\endcsname}% +- \expandafter\xdef\csname\the\macname xx\endcsname##1{% +- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% +- \expandafter\expandafter +- \expandafter\xdef +- \expandafter\expandafter +- \csname\the\macname xxx\endcsname +- \paramlist{% +- \egroup +- \noexpand\norecurse{\the\macname}% +- \noexpand\scanmacro{\temp}\egroup}% ++ \else % at most 9 ++ \ifnum\paramno<10\relax ++ \expandafter\xdef\csname\the\macname\endcsname{% ++ \bgroup\noexpand\macroargctxt ++ \expandafter\noexpand\csname\the\macname xx\endcsname}% ++ \expandafter\xdef\csname\the\macname xx\endcsname##1{% ++ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% ++ \expandafter\expandafter ++ \expandafter\xdef ++ \expandafter\expandafter ++ \csname\the\macname xxx\endcsname ++ \paramlist{% ++ \egroup ++ \noexpand\norecurse{\the\macname}% ++ \noexpand\scanmacro{\temp}\egroup}% ++ \else % 10 or more: ++ \expandafter\xdef\csname\the\macname\endcsname{% ++ \noexpand\getargvals@{\the\macname}{\argl}% ++ }% ++ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp ++ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse ++ \fi + \fi + \fi} + ++\catcode `\@\texiatcatcode\relax ++ + \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + + % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence - % as an argument (by \parsebrace or \parsearg) +-% as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} ++% as an argument (by \parsebrace or \parsearg). ++% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else @@ -11199,8 +12466,10 @@ % @alias. % We need some trickery to remove the optional spaces around the equal - % sign. Just make them active and then expand them all to nothing. +-% sign. Just make them active and then expand them all to nothing. -\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} ++% sign. Make them active and then expand them all to nothing. ++% +\def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} -\def\aliasyyy #1=#2\relax{\ignoreactivespaces @@ -11225,8 +12494,11 @@ \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. -@@ -5147,56 +6880,68 @@ - \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + % @inforef is relatively simple. + \def\inforef #1{\inforefzzz #1,,,,**} +-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, ++\def\inforefzzz #1,#2,#3,#4**{% ++ \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} -% @node's job is to define \lastnode. @@ -11326,14 +12598,35 @@ + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. -+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout ++ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout + }% + \fi +} ++ ++% @xrefautosectiontitle on|off says whether @section(ing) names are used ++% automatically in xrefs, if the third arg is not explicitly specified. ++% This was provided as a "secret" @set xref-automatic-section-title ++% variable, now it's official. ++% ++\parseargdef\xrefautomaticsectiontitle{% ++ \def\temp{#1}% ++ \ifx\temp\onword ++ \expandafter\let\csname SETxref-automatic-section-title\endcsname ++ = \empty ++ \else\ifx\temp\offword ++ \expandafter\let\csname SETxref-automatic-section-title\endcsname ++ = \relax ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', ++ must be on|off}% ++ \fi\fi ++} ++ % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed -@@ -5209,135 +6954,162 @@ +@@ -5209,140 +7805,167 @@ width0pt\relax} \fi \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% @@ -11345,7 +12638,8 @@ + \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax +- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax ++ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Use the node name inside the square brackets. - \def\printednodename{\ignorespaces #1}% + \def\printedrefname{\ignorespaces #1}% @@ -11394,9 +12688,8 @@ + % etc. don't get their TeX definitions. + \getfilename{#4}% + % -+ % See comments at \activebackslashdouble. -+ {\activebackslashdouble \xdef\pdfxrefdest{#1}% -+ \backslashparens\pdfxrefdest}% ++ \edef\pdfxrefdest{#1}% ++ \txiescapepdf\pdfxrefdest + % + \leavevmode + \startlink attr{/Border [0 0 0]}% @@ -11592,7 +12885,14 @@ % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks -@@ -5352,22 +7124,59 @@ + \ifhavexrefs +- \message{\linenumber Undefined cross reference `#1'.}% ++ {\toks0 = {#1}% avoid expansion of possibly-complex value ++ \message{\linenumber Undefined cross reference `\the\toks0'.}}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue +@@ -5352,22 +7975,59 @@ width0pt\relax} \fi \fi \else % It's defined, so just use it. @@ -11660,7 +12960,7 @@ \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other -@@ -5395,9 +7204,7 @@ +@@ -5395,9 +8055,7 @@ width0pt\relax} \fi \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other @@ -11671,7 +12971,7 @@ % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ -@@ -5410,6 +7217,9 @@ +@@ -5410,6 +8068,9 @@ width0pt\relax} \fi % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % @@ -11681,7 +12981,7 @@ \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other -@@ -5421,41 +7231,43 @@ +@@ -5421,41 +8082,43 @@ width0pt\relax} \fi \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other @@ -11750,8 +13050,12 @@ \newcount \footnoteno -@@ -5469,37 +7281,39 @@ - % @footnotestyle is meaningful for info output only. +@@ -5466,40 +8129,42 @@ width0pt\relax} \fi + % space to prevent strange expansion errors.) + \def\supereject{\par\penalty -20000\footnoteno =0 } + +-% @footnotestyle is meaningful for info output only. ++% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment -\let\ptexfootnote=\footnote @@ -11797,7 +13101,7 @@ \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox -@@ -5512,8 +7326,15 @@ +@@ -5512,76 +8177,87 @@ width0pt\relax} \fi % \smallfonts \rm % @@ -11815,8 +13119,11 @@ \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this -@@ -5522,66 +7343,68 @@ + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. \footstrut ++ % ++ % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } -\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t @@ -11936,7 +13243,7 @@ % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. -@@ -5591,12 +7414,12 @@ +@@ -5591,12 +8267,12 @@ width0pt\relax} \fi % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else @@ -11952,7 +13259,15 @@ % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf -@@ -5612,77 +7435,1180 @@ +@@ -5605,84 +8281,1225 @@ width0pt\relax} \fi + it from ftp://tug.org/tex/epsf.tex.} + % + \def\image#1{% +- \ifx\epsfbox\undefined ++ \ifx\epsfbox\thisiundefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else @@ -11968,7 +13283,7 @@ -\def\imagexxx#1,#2,#3,#4\finish{% +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. -+% #6 is just the usual extra ignored arg for parsing this stuff. ++% #6 is just the usual extra ignored arg for parsing stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example @@ -12288,12 +13603,13 @@ \message{localization,} -% and i18n. - % @documentlanguage is usually given very early, just after - % @setfilename. If done too late, it may not override everything +-% @documentlanguage is usually given very early, just after +-% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. -+% properly. Single argument is the language (de) or locale (de_DE) -+% abbreviation. It would be nice if we could set up a hyphenation file. ++% For single-language documents, @documentlanguage is usually given very ++% early, just after @documentencoding. Single argument is the language ++% (de) or locale (de_DE) abbreviation. % -\def\documentlanguage{\parsearg\dodocumentlanguage} -\def\dodocumentlanguage#1{% @@ -12309,17 +13625,17 @@ + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else ++ \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 -+ \endgroup ++ \endgroup % end raw TeX +\endgroup} -+} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. -+% -+\def\documentlanguagetrywithoutunderscore#1_#2\finish{% ++% ++\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex - \ifeof1 + \ifeof 1 @@ -12328,17 +13644,51 @@ - \let\temp = \relax \else - \def\temp{\input txi-#1.tex }% ++ \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex \fi - \temp - \endgroup + \closein 1 } ++}% end of special _ catcode +% \newhelp\nolanghelp{The given language definition file cannot be found or - is empty. Maybe you need to install it? In the current directory - should work if nowhere else does.} +-is empty. Maybe you need to install it? In the current directory +-should work if nowhere else does.} ++is empty. Maybe you need to install it? Putting it in the current ++directory should work if nowhere else does.} + ++% This macro is called from txi-??.tex files; the first argument is the ++% \language name to set (without the "\lang@" prefix), the second and ++% third args are \{left,right}hyphenmin. ++% ++% The language names to pass are determined when the format is built. ++% See the etex.log file created at that time, e.g., ++% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. ++% ++% With TeX Live 2008, etex now includes hyphenation patterns for all ++% available languages. This means we can support hyphenation in ++% Texinfo, at least to some extent. (This still doesn't solve the ++% accented characters problem.) ++% ++\catcode`@=11 ++\def\txisetlanguage#1#2#3{% ++ % do not set the language if the name is undefined in the current TeX. ++ \expandafter\ifx\csname lang@#1\endcsname \relax ++ \message{no patterns for #1}% ++ \else ++ \global\language = \csname lang@#1\endcsname ++ \fi ++ % but there is no harm in adjusting the hyphenmin values regardless. ++ \global\lefthyphenmin = #2\relax ++ \global\righthyphenmin = #3\relax ++} +-% @documentencoding should change something in TeX eventually, most +-% likely, but for now just recognize it. +-\let\documentencoding = \comment ++% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% @@ -12349,9 +13699,6 @@ + \repeat +} --% @documentencoding should change something in TeX eventually, most --% likely, but for now just recognize it. --\let\documentencoding = \comment +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 @@ -12359,7 +13706,8 @@ + \advance\count255 by 1 + \repeat +} -+ + +-% Page size parameters. +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% @@ -12382,7 +13730,7 @@ + \setnonasciicharscatcode\active + \lattwochardefs + % -+ \else \ifx \declaredencoding \latone ++ \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % @@ -12394,7 +13742,7 @@ + \setnonasciicharscatcode\active + \utfeightchardefs + % -+ \else ++ \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight @@ -12403,13 +13751,12 @@ + \fi % lattwo + \fi % ascii +} - ++ +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). -+% ++% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} - --% Page size parameters. ++ +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + @@ -12417,24 +13764,24 @@ +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active - % ++% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% -+ \gdef^^a0{~} ++ \gdef^^a0{\tie} + \gdef^^a1{\exclamdown} -+ \gdef^^a2{\missingcharmsg{CENT SIGN}} ++ \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} -+ \gdef^^a6{\missingcharmsg{BROKEN BAR}} ++ \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} -+ \gdef^^a8{\"{}} -+ \gdef^^a9{\copyright} ++ \gdef^^a8{\"{}} ++ \gdef^^a9{\copyright} + \gdef^^aa{\ordf} -+ \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^ab{\guillemetleft} + \gdef^^ac{$\lnot$} -+ \gdef^^ad{\-} -+ \gdef^^ae{\registeredsymbol} ++ \gdef^^ad{\-} ++ \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} @@ -12450,7 +13797,7 @@ + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % -+ \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^bb{\guillemetright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} @@ -12461,7 +13808,7 @@ + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} -+ \gdef^^c5{\ringaccent A} ++ \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} @@ -12473,7 +13820,7 @@ + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % -+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} ++ \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} @@ -12487,7 +13834,7 @@ + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} -+ \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} ++ \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} @@ -12507,7 +13854,7 @@ + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % -+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} ++ \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} @@ -12521,7 +13868,7 @@ + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} -+ \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} ++ \gdef^^fe{\th} + \gdef^^ff{\"y} +} + @@ -12542,8 +13889,8 @@ + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% -+ \gdef^^a0{~} -+ \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} ++ \gdef^^a0{\tie} ++ \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} @@ -12560,8 +13907,8 @@ + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} -+ \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} -+ \gdef^^b2{\missingcharmsg{OGONEK}} ++ \gdef^^b1{\ogonek{a}} ++ \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} @@ -12586,14 +13933,14 @@ + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} -+ \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} ++ \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % -+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} ++ \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} @@ -12602,7 +13949,7 @@ + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} -+ \gdef^^d9{\ringaccent U} ++ \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} @@ -12620,14 +13967,14 @@ + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} -+ \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} ++ \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} -+ \gdef^^ed{\'\i} -+ \gdef^^ee{\^\i} ++ \gdef^^ed{\'{\dotless{i}}} ++ \gdef^^ee{\^{\dotless{i}}} + \gdef^^ef{\v d} + % -+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} ++ \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} @@ -12646,11 +13993,11 @@ +} + +% UTF-8 character definitions. -+% ++% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. -+% ++% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz @@ -12660,7 +14007,7 @@ +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} -+% + % +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + @@ -12715,7 +14062,7 @@ + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax -+ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% ++ %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% @@ -12800,6 +14147,7 @@ + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + ++ \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} @@ -12812,6 +14160,7 @@ + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} ++ \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} @@ -12831,6 +14180,7 @@ + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + ++ \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} @@ -12843,16 +14193,21 @@ + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} ++ \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} ++ \DeclareUnicodeCharacter{0104}{\ogonek{A}} ++ \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} ++ \DeclareUnicodeCharacter{0118}{\ogonek{E}} ++ \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} @@ -13000,6 +14355,8 @@ + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + ++ \DeclareUnicodeCharacter{02DB}{\ogonek{ }} ++ + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -13167,16 +14524,21 @@ \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt -@@ -5695,7 +8621,7 @@ - % Don't be so finicky about underfull hboxes, either. - \hbadness = 2000 +@@ -5692,10 +9509,10 @@ should work if nowhere else does.} + % Prevent underfull vbox error messages. + \vbadness = 10000 + +-% Don't be so finicky about underfull hboxes, either. +-\hbadness = 2000 ++% Don't be very finicky about underfull hboxes, either. ++\hbadness = 6666 -% Following George Bush, just get rid of widows and orphans. +% Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 -@@ -5713,11 +8639,14 @@ +@@ -5713,11 +9530,14 @@ should work if nowhere else does.} \fi } @@ -13195,7 +14557,7 @@ \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip -@@ -5736,6 +8665,17 @@ +@@ -5736,6 +9556,17 @@ should work if nowhere else does.} \normaloffset = #4\relax \bindingoffset = #5\relax % @@ -13213,7 +14575,7 @@ \parindent = \defaultparindent \setemergencystretch } -@@ -5743,76 +8683,140 @@ +@@ -5743,76 +9574,140 @@ should work if nowhere else does.} % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt @@ -13309,12 +14671,12 @@ +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt - % ++ % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% -+ % + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt @@ -13380,12 +14742,43 @@ }} % Set default to letter. -@@ -5840,10 +8844,10 @@ - \def\normalless{<} - \def\normalgreater{>} - \def\normalplus{+} +@@ -5822,28 +9717,24 @@ should work if nowhere else does.} + + \message{and turning on texinfo input format.} + ++\def^^L{\par} % remove \outer, so ^L can appear in an @comment ++ ++% DEL is a comment character, in case @c does not suffice. ++\catcode`\^^? = 14 ++ + % Define macros to output various characters with catcode for normal text. +-\catcode`\"=\other +-\catcode`\~=\other +-\catcode`\^=\other +-\catcode`\_=\other +-\catcode`\|=\other +-\catcode`\<=\other +-\catcode`\>=\other +-\catcode`\+=\other +-\catcode`\$=\other +-\def\normaldoublequote{"} +-\def\normaltilde{~} +-\def\normalcaret{^} +-\def\normalunderscore{_} +-\def\normalverticalbar{|} +-\def\normalless{<} +-\def\normalgreater{>} +-\def\normalplus{+} -\def\normaldollar{$} -+\def\normaldollar{$}%$ font-lock fix ++\catcode`\"=\other \def\normaldoublequote{"} ++\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix ++\catcode`\+=\other \def\normalplus{+} ++\catcode`\<=\other \def\normalless{<} ++\catcode`\>=\other \def\normalgreater{>} ++\catcode`\^=\other \def\normalcaret{^} ++\catcode`\_=\other \def\normalunderscore{_} ++\catcode`\|=\other \def\normalverticalbar{|} ++\catcode`\~=\other \def\normaltilde{~} -% This macro is used to make a character print one way in ttfont -% where it can probably just be output, and another way in other fonts, @@ -13394,7 +14787,7 @@ % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print -@@ -5875,8 +8879,9 @@ +@@ -5875,8 +9766,9 @@ should work if nowhere else does.} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} @@ -13405,7 +14798,7 @@ \catcode`\|=\active \def|{{\tt\char124}} -@@ -5889,16 +8894,7 @@ +@@ -5889,16 +9781,7 @@ should work if nowhere else does.} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active @@ -13423,45 +14816,53 @@ % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. -@@ -5906,46 +8902,53 @@ +@@ -5906,46 +9789,65 @@ should work if nowhere else does.} % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} --\catcode`\@=0 +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} ++ + \catcode`\@=0 -% \rawbackslashxx output one backslash character in current font -\global\chardef\rawbackslashxx=`\\ -%{\catcode`\\=\other -%@gdef@rawbackslashxx{\}} -+\catcode`\@=0 - --% \rawbackslash redefines \ as input to do \rawbackslashxx. --{\catcode`\\=\active --@gdef@rawbackslash{@let\=@rawbackslashxx }} +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work --% \normalbackslash outputs one backslash in fixed width font. --\def\normalbackslash{{\tt\rawbackslashxx}} +-% \rawbackslash redefines \ as input to do \rawbackslashxx. +-{\catcode`\\=\active +-@gdef@rawbackslash{@let\=@rawbackslashxx }} +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} --% \catcode 17=0 % Define control-q +-% \normalbackslash outputs one backslash in fixed width font. +-\def\normalbackslash{{\tt\rawbackslashxx}} +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. - \catcode`\\=\active -+@def@normalbackslash{{@tt@backslashcurfont}} -+% On startup, @fixbackslash assigns: -+% @let \ = @normalbackslash ++\catcode`\\=\active % @ for escape char from now on. + +-% \catcode 17=0 % Define control-q +-\catcode`\\=\active ++% The story here is that in math mode, the \char of \backslashcurfont ++% ends up printing the roman \ from the math symbol font (because \char ++% in math mode uses the \mathcode, and plain.tex sets ++% \mathcode`\\="026E). It seems better for @backslashchar{} to always ++% print a typewriter backslash, hence we use an explicit \mathchar, ++% which is the decimal equivalent of "715c (class 7, e.g., use \fam; ++% ignored family value; char position "5C). We can't use " for the ++% usual hex value because it has already been made active. ++@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} ++@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. @@ -13475,9 +14876,11 @@ -@let>=@normalgreater -@let+=@normalplus -@let$=@normaldollar} ++% On startup, @fixbackslash assigns: ++% @let \ = @normalbackslash +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with -+% catcode other. ++% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} @@ -13493,24 +14896,26 @@ -@let$=@normaldollar} +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. -+% ++% +@def@normalturnoffactive{% -+ @let\=@normalbackslash + @let"=@normaldoublequote -+ @let~=@normaltilde ++ @let$=@normaldollar %$ font-lock fix ++ @let+=@normalplus ++ @let<=@normalless ++ @let>=@normalgreater ++ @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar -+ @let<=@normalless -+ @let>=@normalgreater -+ @let+=@normalplus -+ @let$=@normaldollar %$ font-lock fix ++ @let~=@normaltilde ++ @markupsetuplqdefault ++ @markupsetuprqdefault + @unsepspaces +} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. -@@ -5959,9 +8962,9 @@ +@@ -5959,9 +9861,9 @@ should work if nowhere else does.} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then @@ -13522,24 +14927,43 @@ % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% -@@ -5973,15 +8976,11 @@ +@@ -5973,15 +9875,28 @@ should work if nowhere else does.} % Say @foo, not \foo, in error messages. @escapechar = `@@ -% These look ok in all fonts, so just make them not special. -+% These look ok in all fonts, so just make them not special. - @catcode`@& = @other - @catcode`@# = @other - @catcode`@% = @other +-@catcode`@& = @other +-@catcode`@# = @other +-@catcode`@% = @other ++% These (along with & and #) are made active for url-breaking, so need ++% active definitions as the normal characters. ++@def@normaldot{.} ++@def@normalquest{?} ++@def@normalslash{/} -@c Set initial fonts. -@textfonts -@rm -- ++% These look ok in all fonts, so just make them not special. ++% @hashchar{} gets its own user-level command, because of #line. ++@catcode`@& = @other @def@normalamp{&} ++@catcode`@# = @other @def@normalhash{#} ++@catcode`@% = @other @def@normalpercent{%} ++ ++@let @hashchar = @normalhash + ++@c Finally, make ` and ' active, so that txicodequoteundirected and ++@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we ++@c don't make ` and ' active, @code will not get them as active chars. ++@c Do this last of all since we use ` in the previous @catcode assignments. ++@catcode`@'=@active ++@catcode`@`=@active ++@markupsetuplqdefault ++@markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@@ -5990,3 +8989,9 @@ +@@ -5990,3 +9905,9 @@ should work if nowhere else does.} @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @@ -13550,8 +14974,8 @@ + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore --- ./ltmain.sh.orig 2002-08-08 23:49:32.000000000 -0600 -+++ ./ltmain.sh 2012-01-09 20:36:31.000000000 -0700 -@@ -1,199 +1,928 @@ ++++ ./ltmain.sh 2012-07-26 09:59:36.977378175 -0600 +@@ -1,199 +1,924 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# @@ -13561,11 +14985,11 @@ -# -# This program is free software; you can redistribute it and/or modify + -+# libtool (GNU libtool) 2.4 ++# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ++# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + @@ -13610,6 +15034,7 @@ +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) ++# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages @@ -13638,7 +15063,7 @@ +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) -+# $progname: (GNU libtool) 2.4 ++# $progname: (GNU libtool) 2.4.2 +# automake: $automake_version +# autoconf: $autoconf_version +# @@ -13658,9 +15083,9 @@ - : +PROGRAM=libtool +PACKAGE=libtool -+VERSION=2.4 ++VERSION=2.4.2 +TIMESTAMP="" -+package_revision=1.3293 ++package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -13766,15 +15191,10 @@ -fi +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -+: ${EGREP="/bin/grep -E"} -+: ${FGREP="/bin/grep -F"} -+: ${GREP="/bin/grep"} -+: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} -+: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} @@ -14080,7 +15500,7 @@ + ;; + *) + save_IFS="$IFS" -+ IFS=: ++ IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break @@ -14464,8 +15884,8 @@ + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ -+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ -+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ ++ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ ++ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } @@ -14633,7 +16053,7 @@ echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" -@@ -205,349 +934,1184 @@ +@@ -205,349 +930,1189 @@ do else echo "disable static libraries" fi @@ -14766,6 +16186,7 @@ +opt_help=false +opt_help_all=false +opt_silent=: ++opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false @@ -14840,6 +16261,10 @@ + opt_silent=false +func_append preserve_args " $opt" + ;; ++ --no-warning|--no-warn) ++ opt_warning=false ++func_append preserve_args " $opt" ++ ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" @@ -15979,7 +17404,7 @@ + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ -+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) ++ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; @@ -16093,7 +17518,7 @@ # Delete any leftover library objects. if test "$build_old_libs" = yes; then -@@ -556,16 +2120,13 @@ +@@ -556,16 +2121,13 @@ if test -z "$show_help"; then removelist="$lobj $libobj ${libobj}T" fi @@ -16112,7 +17537,7 @@ # non-PIC code in shared libraries is not supported pic_mode=default fi -@@ -573,10 +2134,8 @@ +@@ -573,10 +2135,8 @@ if test -z "$show_help"; then # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then @@ -16124,7 +17549,7 @@ else output_obj= need_locks=no -@@ -586,13 +2145,13 @@ +@@ -586,13 +2146,13 @@ if test -z "$show_help"; then # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then @@ -16141,7 +17566,7 @@ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` -@@ -603,29 +2162,21 @@ +@@ -603,29 +2163,21 @@ repeat this compilation, it may succeed, avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -16182,7 +17607,7 @@ # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then -@@ -633,38 +2184,25 @@ +@@ -633,38 +2185,25 @@ EOF fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then @@ -16230,7 +17655,7 @@ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` -@@ -678,63 +2216,42 @@ +@@ -678,63 +2217,42 @@ repeat this compilation, it may succeed, avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -16310,7 +17735,7 @@ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` -@@ -748,57 +2265,2828 @@ +@@ -748,57 +2266,2839 @@ repeat this compilation, it may succeed, avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -17275,11 +18700,13 @@ + + # Set up the ranlib parameters. + oldlib="$destdir/$name" ++ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 ++ tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then -+ func_show_eval "$old_striplib $oldlib" 'exit $?' ++ func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. @@ -17544,7 +18971,7 @@ + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. -+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) ++ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; @@ -17618,7 +19045,7 @@ + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" -+ ;; + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | @@ -17648,7 +19075,7 @@ + win32_libid_type="x86 DLL" + ;; + esac - ;; ++ ;; + esac + $ECHO "$win32_libid_type" +} @@ -18059,14 +19486,17 @@ +# launches target application with the remaining arguments. +func_exec_program () +{ -+ for lt_wr_arg -+ do -+ case \$lt_wr_arg in -+ --lt-*) ;; -+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; -+ esac -+ shift -+ done ++ case \" \$* \" in ++ *\\ --lt-*) ++ for lt_wr_arg ++ do ++ case \$lt_wr_arg in ++ --lt-*) ;; ++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; ++ esac ++ shift ++ done ;; ++ esac + func_exec_program_core \${1+\"\$@\"} +} + @@ -19134,9 +20564,15 @@ +{ +EOF + func_emit_wrapper yes | -+ $SED -e 's/\([\\"]\)/\\\1/g' \ -+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' -+ ++ $SED -n -e ' ++s/^\(.\{79\}\)\(..*\)/\1\ ++\2/ ++h ++s/\([\\"]\)/\\\1/g ++s/$/\\n/ ++s/\([^\n]*\).*/ fputs ("\1", f);/p ++g ++D' + cat <<"EOF" +} +EOF @@ -19169,7 +20605,7 @@ # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying -@@ -812,10 +5100,10 @@ +@@ -812,10 +5112,10 @@ EOF allow_undefined=yes ;; esac @@ -19184,7 +20620,7 @@ compile_rpath= finalize_rpath= -@@ -829,8 +5117,11 @@ +@@ -829,8 +5129,11 @@ EOF linker_flags= dllsearchpath= lib_search_path=`pwd` @@ -19196,7 +20632,7 @@ dlfiles= dlprefiles= dlself=no -@@ -844,6 +5135,7 @@ +@@ -844,6 +5147,7 @@ EOF no_install=no objs= non_pic_objects= @@ -19204,7 +20640,7 @@ prefer_static_libs=no preload=no prev= -@@ -855,27 +5147,47 @@ +@@ -855,27 +5159,47 @@ EOF temp_rpath= thread_safe=no vinfo= @@ -19258,7 +20694,7 @@ break ;; esac -@@ -885,33 +5197,33 @@ +@@ -885,33 +5209,33 @@ EOF test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. @@ -19305,7 +20741,7 @@ preload=yes fi case $arg in -@@ -938,9 +5250,9 @@ +@@ -938,9 +5262,9 @@ EOF ;; *) if test "$prev" = dlfiles; then @@ -19317,7 +20753,7 @@ fi prev= continue -@@ -949,10 +5261,8 @@ +@@ -949,10 +5273,8 @@ EOF ;; expsyms) export_symbols="$arg" @@ -19330,7 +20766,7 @@ prev= continue ;; -@@ -961,115 +5271,127 @@ +@@ -961,115 +5283,127 @@ EOF prev= continue ;; @@ -19544,7 +20980,7 @@ prev= continue ;; -@@ -1078,37 +5400,54 @@ +@@ -1078,37 +5412,54 @@ EOF case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) @@ -19610,7 +21046,7 @@ continue ;; *) -@@ -1117,23 +5456,23 @@ +@@ -1117,23 +5468,23 @@ EOF continue ;; esac @@ -19639,7 +21075,7 @@ ;; -avoid-version) -@@ -1141,6 +5480,11 @@ +@@ -1141,6 +5492,11 @@ EOF continue ;; @@ -19651,7 +21087,7 @@ -dlopen) prev=dlfiles continue -@@ -1158,8 +5502,7 @@ +@@ -1158,8 +5514,7 @@ EOF -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then @@ -19661,7 +21097,7 @@ fi if test "X$arg" = "X-export-symbols"; then prev=expsyms -@@ -1169,44 +5512,74 @@ +@@ -1169,44 +5524,74 @@ EOF continue ;; @@ -19749,7 +21185,7 @@ esac ;; esac -@@ -1216,17 +5589,41 @@ +@@ -1216,17 +5601,41 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in @@ -19794,7 +21230,7 @@ continue ;; -@@ -1235,6 +5632,33 @@ +@@ -1235,6 +5644,34 @@ EOF continue ;; @@ -19809,7 +21245,8 @@ + continue + ;; + -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) ++ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ ++ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" @@ -19828,7 +21265,7 @@ -no-fast-install) fast_install=no continue -@@ -1242,11 +5666,11 @@ +@@ -1242,11 +5679,11 @@ EOF -no-install) case $host in @@ -19844,7 +21281,7 @@ fast_install=no ;; *) no_install=yes ;; -@@ -1266,6 +5690,11 @@ +@@ -1266,6 +5703,11 @@ EOF -o) prev=output ;; @@ -19856,7 +21293,7 @@ -release) prev=release continue -@@ -1282,23 +5711,37 @@ +@@ -1282,23 +5724,37 @@ EOF ;; -R*) @@ -19899,7 +21336,7 @@ # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects -@@ -1317,41 +5760,48 @@ +@@ -1317,41 +5773,48 @@ EOF continue ;; @@ -19969,7 +21406,7 @@ ;; -Xcompiler) -@@ -1364,136 +5814,156 @@ +@@ -1364,136 +5827,156 @@ EOF continue ;; @@ -20203,7 +21640,7 @@ fi continue ;; -@@ -1502,113 +5972,53 @@ +@@ -1502,113 +5985,53 @@ EOF *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -20335,7 +21772,7 @@ ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; -@@ -1617,29 +6027,34 @@ +@@ -1617,29 +6040,34 @@ EOF esac specialdeplibs= @@ -20381,7 +21818,7 @@ pre_post_deps= fi -@@ -1649,15 +6064,15 @@ +@@ -1649,15 +6077,15 @@ EOF need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries @@ -20400,7 +21837,7 @@ ;; esac done -@@ -1673,40 +6088,105 @@ +@@ -1673,40 +6101,106 @@ EOF *) passes="conv" ;; esac @@ -20470,7 +21907,8 @@ lib= found=no case $deplib in -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) ++ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ ++ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" @@ -20526,7 +21964,7 @@ done if test "$found" != yes; then # deplib doesn't seem to be a libtool library -@@ -1715,74 +6195,153 @@ +@@ -1715,74 +6209,153 @@ EOF finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" @@ -20705,7 +22143,7 @@ deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" -@@ -1793,14 +6352,18 @@ +@@ -1793,14 +6366,18 @@ EOF esac # linkmode ;; # *.$libext *.lo | *.$objext) @@ -20732,7 +22170,7 @@ fi continue ;; -@@ -1809,21 +6372,18 @@ +@@ -1809,21 +6386,18 @@ EOF continue ;; esac # case $deplib @@ -20761,7 +22199,7 @@ dlname= dlopen= -@@ -1831,72 +6391,92 @@ +@@ -1831,72 +6405,92 @@ EOF libdir= library_names= old_library= @@ -20890,7 +22328,7 @@ fi continue fi # $pass = dlopen -@@ -1907,66 +6487,106 @@ +@@ -1907,66 +6501,106 @@ EOF *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then @@ -21027,7 +22465,7 @@ deplibs="$lib $deplibs" linkalldeplibs=no -@@ -1978,31 +6598,43 @@ +@@ -1978,31 +6612,43 @@ EOF tmp_libs= for deplib in $dependency_libs; do case $deplib in @@ -21083,7 +22521,7 @@ # Hardcode the library path. # Skip directories that are in the system default run-time # search path. -@@ -2011,7 +6643,7 @@ +@@ -2011,7 +6657,7 @@ EOF *) case "$compile_rpath " in *" $absdir "*) ;; @@ -21092,7 +22530,7 @@ esac ;; esac -@@ -2020,21 +6652,10 @@ +@@ -2020,21 +6666,10 @@ EOF *) case "$finalize_rpath " in *" $libdir "*) ;; @@ -21115,7 +22553,7 @@ fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && -@@ -2044,26 +6665,89 @@ +@@ -2044,26 +6679,89 @@ EOF # We only need to search for static libraries continue fi @@ -21213,7 +22651,7 @@ versuffix="-$major" ;; esac -@@ -2074,41 +6758,29 @@ +@@ -2074,41 +6772,29 @@ EOF # Make a new name for the extract_expsyms_cmds to use soroot="$soname" @@ -21265,7 +22703,7 @@ add_shlibpath= add_dir= add= -@@ -2117,6 +6789,30 @@ +@@ -2117,6 +6803,30 @@ EOF immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" @@ -21296,7 +22734,7 @@ elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; -@@ -2131,10 +6827,19 @@ +@@ -2131,10 +6841,19 @@ EOF fi ;; relink) @@ -21305,7 +22743,8 @@ + test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" +- add_dir="-L$dir" ++ add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in @@ -21317,7 +22756,7 @@ add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" -@@ -2147,39 +6852,39 @@ +@@ -2147,39 +6866,39 @@ EOF esac if test "$lib_linked" != yes; then @@ -21366,7 +22805,7 @@ add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" -@@ -2187,16 +6892,31 @@ +@@ -2187,16 +6906,31 @@ EOF elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; @@ -21400,7 +22839,7 @@ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else -@@ -2204,16 +6924,7 @@ +@@ -2204,16 +6938,7 @@ EOF test -n "$add" && deplibs="$add $deplibs" fi fi @@ -21418,7 +22857,7 @@ # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. -@@ -2234,101 +6945,133 @@ +@@ -2234,101 +6959,133 @@ EOF # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo @@ -21590,7 +23029,7 @@ esac case " $deplibs " in *" $path "*) ;; -@@ -2338,21 +7081,29 @@ +@@ -2338,21 +7095,29 @@ EOF fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs @@ -21625,7 +23064,7 @@ esac done newlib_search_path= -@@ -2368,9 +7119,30 @@ +@@ -2368,9 +7133,30 @@ EOF eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do @@ -21656,7 +23095,7 @@ case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) -@@ -2389,171 +7161,216 @@ +@@ -2389,171 +7175,217 @@ EOF -L*) case " $tmp_libs " in *" $deplib "*) ;; @@ -21877,6 +23316,7 @@ + # which has an extra 1 added just for fun + # + case $version_type in ++ # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result @@ -21951,7 +23391,7 @@ fi # Calculate the version variables. -@@ -2566,10 +7383,13 @@ +@@ -2566,10 +7398,13 @@ EOF darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header @@ -21967,7 +23407,7 @@ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; -@@ -2580,19 +7400,31 @@ +@@ -2580,19 +7415,31 @@ EOF freebsd-elf) major=".$current" @@ -22007,11 +23447,13 @@ done # Before this point, $major must not contain `.'. -@@ -2601,25 +7433,34 @@ +@@ -2600,26 +7447,35 @@ EOF + versuffix="$major.$revision" ;; - linux) +- linux) - major=.`expr $current - $age` ++ linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result versuffix="$major.$age.$revision" @@ -22048,7 +23490,7 @@ ;; sunos) -@@ -2630,21 +7471,29 @@ +@@ -2630,21 +7486,29 @@ EOF windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. @@ -22083,7 +23525,7 @@ if test "$need_version" = no; then versuffix= else -@@ -2662,7 +7511,7 @@ +@@ -2662,7 +7526,7 @@ EOF # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then @@ -22092,7 +23534,7 @@ build_libtool_libs=no build_old_libs=yes fi -@@ -2670,55 +7519,65 @@ +@@ -2670,55 +7534,65 @@ EOF # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi @@ -22185,7 +23627,7 @@ dependency_libs="$temp_xrpath $dependency_libs" fi fi -@@ -2729,7 +7588,7 @@ +@@ -2729,7 +7603,7 @@ EOF for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; @@ -22194,7 +23636,7 @@ esac done -@@ -2739,27 +7598,36 @@ +@@ -2739,27 +7613,36 @@ EOF for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; @@ -22236,7 +23678,7 @@ fi ;; esac -@@ -2785,7 +7653,7 @@ +@@ -2785,7 +7668,7 @@ EOF # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just @@ -22245,7 +23687,7 @@ newdeplibs=$deplibs ;; test_compile) -@@ -2793,90 +7661,139 @@ +@@ -2793,90 +7676,139 @@ EOF # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. @@ -22444,7 +23886,7 @@ continue fi # The statement above tries to avoid entering an -@@ -2886,81 +7803,110 @@ +@@ -2886,81 +7818,110 @@ EOF # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do @@ -22600,7 +24042,7 @@ echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." -@@ -2969,7 +7915,8 @@ +@@ -2969,7 +7930,8 @@ EOF fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes @@ -22610,7 +24052,7 @@ ;; esac versuffix=$versuffix_save -@@ -2980,8 +7927,8 @@ +@@ -2980,8 +7942,8 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -22621,7 +24063,7 @@ ;; esac -@@ -2989,7 +7936,7 @@ +@@ -2989,7 +7951,7 @@ EOF if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" @@ -22630,7 +24072,7 @@ echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then -@@ -3011,7 +7958,7 @@ +@@ -3011,7 +7973,7 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." @@ -22639,7 +24081,7 @@ echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" -@@ -3030,6 +7977,41 @@ +@@ -3030,6 +7992,41 @@ EOF # Done checking deplibs! deplibs=$newdeplibs fi @@ -22681,11 +24123,16 @@ # All the library-specific variables (install_libdir is set above). library_names= -@@ -3038,15 +8020,17 @@ +@@ -3038,15 +8035,22 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then - if test $hardcode_into_libs = yes; then ++ # Remove ${wl} instances when linking with ld. ++ # FIXME: should test the right _cmds variable. ++ case $archive_cmds in ++ *\$LD\ *) wl= ;; ++ esac + if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -22701,7 +24148,7 @@ if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else -@@ -3055,18 +8039,18 @@ +@@ -3055,18 +8059,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) @@ -22723,16 +24170,12 @@ esac fi done -@@ -3074,13 +8058,17 @@ +@@ -3074,13 +8078,13 @@ EOF if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - eval dep_rpath=\"$hardcode_libdir_flag_spec\" -+ if test -n "$hardcode_libdir_flag_spec_ld"; then -+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" -+ else -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" -+ fi ++ eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -22743,7 +24186,7 @@ done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi -@@ -3088,140 +8076,222 @@ +@@ -3088,140 +8092,222 @@ EOF fi shlibpath="$finalize_shlibpath" @@ -23045,7 +24488,7 @@ # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we -@@ -3234,109 +8304,255 @@ +@@ -3234,109 +8320,255 @@ EOF if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi @@ -23380,7 +24823,7 @@ fi done -@@ -3349,38 +8565,35 @@ +@@ -3349,38 +8581,35 @@ EOF ;; obj) @@ -23439,7 +24882,7 @@ ;; *) libobj= -@@ -3389,7 +8602,7 @@ +@@ -3389,7 +8618,7 @@ EOF esac # Delete the old objects. @@ -23448,7 +24891,7 @@ # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create -@@ -3398,150 +8611,141 @@ +@@ -3398,150 +8627,141 @@ EOF reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of @@ -23681,7 +25124,7 @@ if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. -@@ -3549,7 +8753,7 @@ +@@ -3549,7 +8769,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; @@ -23690,7 +25133,7 @@ esac done fi -@@ -3568,25 +8772,32 @@ +@@ -3568,25 +8788,32 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) @@ -23728,7 +25171,7 @@ esac ;; esac -@@ -3612,18 +8823,18 @@ +@@ -3612,18 +8839,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) @@ -23750,7 +25193,7 @@ esac fi done -@@ -3635,227 +8846,57 @@ +@@ -3635,227 +8862,57 @@ EOF fi finalize_rpath="$rpath" @@ -24016,7 +25459,7 @@ fi if test -n "$compile_shlibpath$finalize_shlibpath"; then -@@ -3872,7 +8913,7 @@ +@@ -3872,7 +8929,7 @@ static const void *lt_preloaded_setup() # We should set the runpath_var. rpath= for dir in $perm_rpath; do @@ -24025,7 +25468,7 @@ done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi -@@ -3880,7 +8921,7 @@ +@@ -3880,7 +8937,7 @@ static const void *lt_preloaded_setup() # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do @@ -24034,7 +25477,7 @@ done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi -@@ -3890,13 +8931,19 @@ +@@ -3890,13 +8947,19 @@ static const void *lt_preloaded_setup() # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. @@ -24059,7 +25502,7 @@ fi if test "$hardcode_action" = relink; then -@@ -3904,13 +8951,13 @@ +@@ -3904,13 +8967,13 @@ static const void *lt_preloaded_setup() link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" @@ -24076,7 +25519,7 @@ else # fast_install is set to needless relink_command= -@@ -3922,246 +8969,99 @@ +@@ -3922,246 +8985,99 @@ static const void *lt_preloaded_setup() fi # Replace the output file specification. @@ -24383,7 +25826,7 @@ ;; esac -@@ -4169,7 +9069,7 @@ +@@ -4169,7 +9085,7 @@ fi\ for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then @@ -24392,7 +25835,7 @@ addlibs="$convenience" build_libtool_libs=no else -@@ -4177,146 +9077,177 @@ +@@ -4177,146 +9093,179 @@ fi\ oldobjs="$libobjs_save" build_libtool_libs=no else @@ -24529,6 +25972,8 @@ + esac + done + fi ++ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 ++ tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" @@ -24671,7 +26116,7 @@ for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then -@@ -4328,50 +9259,108 @@ +@@ -4328,50 +9277,109 @@ fi\ for deplib in $dependency_libs; do case $deplib in *.la) @@ -24684,7 +26129,8 @@ - newdependency_libs="$newdependency_libs $libdir/$name" + func_basename "$deplib" + name="$func_basename_result" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ func_resolve_sysroot "$deplib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" @@ -24806,7 +26252,7 @@ # # Please DO NOT delete this file! # It is necessary for linking the library. -@@ -4385,9 +9374,15 @@ +@@ -4385,9 +9393,15 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' @@ -24822,7 +26268,7 @@ # Version information for $libname. current=$current age=$age -@@ -4396,692 +9391,39 @@ +@@ -4396,692 +9410,39 @@ revision=$revision # Is this an already installed library? installed=$installed @@ -25495,7 +26941,9 @@ - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi -- ++{ test "$opt_mode" = link || test "$opt_mode" = relink; } && ++ func_mode_link ${1+"$@"} + - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL @@ -25503,8 +26951,6 @@ - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi -+{ test "$opt_mode" = link || test "$opt_mode" = relink; } && -+ func_mode_link ${1+"$@"} - # Now prepare to actually exec the command. - exec_cmd='"$cmd"$args' @@ -25518,7 +26964,7 @@ - exit 0 - fi - ;; - +- - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" @@ -25531,7 +26977,7 @@ files= rmforce= exit_status=0 -@@ -5093,49 +9435,47 @@ +@@ -5093,49 +9454,47 @@ relink_command=\"$relink_command\"" for arg do case $arg in @@ -25604,7 +27050,7 @@ fi rmfiles="$file" -@@ -5143,312 +9483,130 @@ +@@ -5143,312 +9502,130 @@ relink_command=\"$relink_command\"" case $name in *.la) # Possibly a libtool archive, so verify it. @@ -25993,7 +27439,7 @@ # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting -@@ -5461,16 +9619,18 @@ +@@ -5461,16 +9638,18 @@ exit 0 # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. diff --git a/gcl-2.6.8-unrandomize.patch b/gcl-2.6.8-unrandomize.patch index 84efa59..55785f8 100644 --- a/gcl-2.6.8-unrandomize.patch +++ b/gcl-2.6.8-unrandomize.patch @@ -1,6 +1,6 @@ ---- ./configure.in.orig 2012-03-28 09:56:09.658231276 -0600 -+++ ./configure.in 2012-03-28 09:57:37.877068843 -0600 -@@ -1184,9 +1184,11 @@ +--- ./configure.in.orig 2012-07-26 09:50:25.715238529 -0600 ++++ ./configure.in 2012-07-26 09:52:37.218033294 -0600 +@@ -1187,9 +1187,11 @@ if test "$HAVE_SBRK" = "1" ; then AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -13,7 +13,7 @@ return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then -@@ -1199,12 +1201,11 @@ +@@ -1202,12 +1204,11 @@ if test "$HAVE_SBRK" = "1" ; then AC_MSG_CHECKING([that sbrk is (now) non-random]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -28,7 +28,7 @@ if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0) -@@ -1213,12 +1214,11 @@ +@@ -1216,12 +1217,11 @@ if test "$HAVE_SBRK" = "1" ; then fi AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -43,7 +43,7 @@ if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) -@@ -1260,6 +1260,7 @@ +@@ -1263,6 +1263,7 @@ AC_MSG_CHECKING([finding DBEGIN]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -51,7 +51,7 @@ void gprof_cleanup() {} int -@@ -1268,9 +1269,7 @@ +@@ -1271,9 +1272,7 @@ main(int argc,char * argv[],char *envp[] char *b,*b1; FILE *fp; @@ -62,9 +62,9 @@ b = (void *) malloc(1000); fp = fopen("conftest1","w"); ---- ./configure.orig 2012-03-28 09:56:09.667230545 -0600 -+++ ./configure 2012-03-28 09:57:37.885068193 -0600 -@@ -7062,9 +7062,11 @@ +--- ./configure.orig 2012-07-26 09:50:32.725227589 -0600 ++++ ./configure 2012-07-26 09:52:50.676012289 -0600 +@@ -7065,9 +7065,11 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -77,7 +77,7 @@ return 0;} _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -7096,12 +7098,11 @@ +@@ -7099,12 +7101,11 @@ else /* end confdefs.h. */ #include @@ -92,7 +92,7 @@ if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;} -@@ -7125,12 +7126,11 @@ +@@ -7128,12 +7129,11 @@ else /* end confdefs.h. */ #include @@ -107,7 +107,7 @@ if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;} -@@ -7217,6 +7217,7 @@ +@@ -7220,6 +7220,7 @@ else #include #include @@ -115,7 +115,7 @@ void gprof_cleanup() {} int -@@ -7225,9 +7226,7 @@ +@@ -7228,9 +7229,7 @@ main(int argc,char * argv[],char *envp[] char *b,*b1; FILE *fp; @@ -127,8 +127,8 @@ fp = fopen("conftest1","w"); --- ./o/main.c.orig 2010-11-02 15:56:45.000000000 -0600 -+++ ./o/main.c 2012-01-09 20:51:43.000000000 -0700 -@@ -51,6 +51,7 @@ ++++ ./o/main.c 2012-07-26 09:52:37.251033241 -0600 +@@ -51,6 +51,7 @@ void initialize_process(); #include #endif #include "page.h" @@ -136,7 +136,7 @@ bool saving_system ; -@@ -146,11 +147,7 @@ +@@ -146,11 +147,7 @@ main(int argc, char **argv, char **envp) #endif *argv=kcl_self; @@ -150,7 +150,7 @@ #ifdef LD_BIND_NOW #include --- ./h/unrandomize.h.orig 2010-01-12 07:19:15.000000000 -0700 -+++ ./h/unrandomize.h 2012-01-09 20:51:43.000000000 -0700 ++++ ./h/unrandomize.h 2012-07-26 09:52:37.274033201 -0600 @@ -1,39 +1,45 @@ +#include +#include diff --git a/gcl.spec b/gcl.spec index edb1912..4a5bb15 100644 --- a/gcl.spec +++ b/gcl.spec @@ -3,7 +3,7 @@ %global __global_cflags %(printf %%s '%__global_cflags' | sed 's/-fstack-protector --param=ssp-buffer-size=4//') # Prerelease of 2.6.8 -%global alphatag 20120323cvs +%global alphatag 20120705cvs Name: gcl Version: 2.6.8 @@ -16,7 +16,7 @@ URL: http://www.gnu.org/software/gcl/ # The source for this package was pulled from upstream's CVS repository. Use # the following commands to generate the tarball: # cvs -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/gcl export \ -# -r Version_2_6_8pre -D 2012-03-24 -d gcl-2.6.8 gcl +# -r Version_2_6_8pre -D 2012-07-06 -d gcl-2.6.8 gcl # tar cvJf gcl-2.6.8.tar gcl-2.6.8 Source0: gcl-%{version}.tar.xz Source1: gcl.el @@ -97,7 +97,7 @@ BuildRequires: texinfo BuildRequires: emacs BuildRequires: xemacs BuildRequires: xemacs-packages-extra -BuildRequires: selinux-policy-doc +BuildRequires: selinux-policy-devel Requires: gcl-selinux%{?_isa} = %{version}-%{release} Requires(post): info Requires(postun): info @@ -332,6 +332,10 @@ fi %changelog +* Thu Jul 26 2012 Jerry James - 2.6.8-0.11.20120705cvs +- Update to 20120705 snapshot +- Change SELinux BR to match recent changes in Rawhide + * Thu Jul 19 2012 Fedora Release Engineering - 2.6.8-0.11.20120323cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index 037c66f..1a175fc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -b796703820bc3f7f539a37b35a2097d0 gcl-2.6.8.tar.xz +4a53090cc59f4b33a0c77526b292246a gcl-2.6.8.tar.xz b965d4ea561a9c3e019c65be69fcfb1e gcl-2.6.8-info.tar.xz