aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-19 09:31:16 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-19 09:31:16 +0000
commitf4a4a70d43a3c99915190447356c1080feb8867b (patch)
tree1ea54452a0fe83354eb94db4f40875facb0414a1
parentcc8a80bf848d6cb7d1f78ce8d534df4aa4df32e3 (diff)
downloadlibmicrohttpd-f4a4a70d43a3c99915190447356c1080feb8867b.tar.gz
libmicrohttpd-f4a4a70d43a3c99915190447356c1080feb8867b.zip
-remove generated files
-rw-r--r--INSTALL370
-rw-r--r--config.sub1773
-rw-r--r--doc/texinfo.tex9913
3 files changed, 0 insertions, 12056 deletions
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index a1e89e18..00000000
--- a/INSTALL
+++ /dev/null
@@ -1,370 +0,0 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5Inc.
6
7 Copying and distribution of this file, with or without modification,
8are permitted in any medium without royalty provided the copyright
9notice and this notice are preserved. This file is offered as-is,
10without warranty of any kind.
11
12Basic Installation
13==================
14
15 Briefly, the shell commands `./configure; make; make install' should
16configure, build, and install this package. The following
17more-detailed instructions are generic; see the `README' file for
18instructions specific to this package. Some packages provide this
19`INSTALL' file but do not implement all of the features documented
20below. The lack of an optional feature in a given package is not
21necessarily a bug. More recommendations for GNU packages can be found
22in *note Makefile Conventions: (standards)Makefile Conventions.
23
24 The `configure' shell script attempts to guess correct values for
25various system-dependent variables used during compilation. It uses
26those values to create a `Makefile' in each directory of the package.
27It may also create one or more `.h' files containing system-dependent
28definitions. Finally, it creates a shell script `config.status' that
29you can run in the future to recreate the current configuration, and a
30file `config.log' containing compiler output (useful mainly for
31debugging `configure').
32
33 It can also use an optional file (typically called `config.cache'
34and enabled with `--cache-file=config.cache' or simply `-C') that saves
35the results of its tests to speed up reconfiguring. Caching is
36disabled by default to prevent problems with accidental use of stale
37cache files.
38
39 If you need to do unusual things to compile the package, please try
40to figure out how `configure' could check whether to do them, and mail
41diffs or instructions to the address given in the `README' so they can
42be considered for the next release. If you are using the cache, and at
43some point `config.cache' contains results you don't want to keep, you
44may remove or edit it.
45
46 The file `configure.ac' (or `configure.in') is used to create
47`configure' by a program called `autoconf'. You need `configure.ac' if
48you want to change it or regenerate `configure' using a newer version
49of `autoconf'.
50
51 The simplest way to compile this package is:
52
53 1. `cd' to the directory containing the package's source code and type
54 `./configure' to configure the package for your system.
55
56 Running `configure' might take a while. While running, it prints
57 some messages telling which features it is checking for.
58
59 2. Type `make' to compile the package.
60
61 3. Optionally, type `make check' to run any self-tests that come with
62 the package, generally using the just-built uninstalled binaries.
63
64 4. Type `make install' to install the programs and any data files and
65 documentation. When installing into a prefix owned by root, it is
66 recommended that the package be configured and built as a regular
67 user, and only the `make install' phase executed with root
68 privileges.
69
70 5. Optionally, type `make installcheck' to repeat any self-tests, but
71 this time using the binaries in their final installed location.
72 This target does not install anything. Running this target as a
73 regular user, particularly if the prior `make install' required
74 root privileges, verifies that the installation completed
75 correctly.
76
77 6. You can remove the program binaries and object files from the
78 source code directory by typing `make clean'. To also remove the
79 files that `configure' created (so you can compile the package for
80 a different kind of computer), type `make distclean'. There is
81 also a `make maintainer-clean' target, but that is intended mainly
82 for the package's developers. If you use it, you may have to get
83 all sorts of other programs in order to regenerate files that came
84 with the distribution.
85
86 7. Often, you can also type `make uninstall' to remove the installed
87 files again. In practice, not all packages have tested that
88 uninstallation works correctly, even though it is required by the
89 GNU Coding Standards.
90
91 8. Some packages, particularly those that use Automake, provide `make
92 distcheck', which can by used by developers to test that all other
93 targets like `make install' and `make uninstall' work correctly.
94 This target is generally not run by end users.
95
96Compilers and Options
97=====================
98
99 Some systems require unusual options for compilation or linking that
100the `configure' script does not know about. Run `./configure --help'
101for details on some of the pertinent environment variables.
102
103 You can give `configure' initial values for configuration parameters
104by setting variables in the command line or in the environment. Here
105is an example:
106
107 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108
109 *Note Defining Variables::, for more details.
110
111Compiling For Multiple Architectures
112====================================
113
114 You can compile the package for more than one kind of computer at the
115same time, by placing the object files for each architecture in their
116own directory. To do this, you can use GNU `make'. `cd' to the
117directory where you want the object files and executables to go and run
118the `configure' script. `configure' automatically checks for the
119source code in the directory that `configure' is in and in `..'. This
120is known as a "VPATH" build.
121
122 With a non-GNU `make', it is safer to compile the package for one
123architecture at a time in the source code directory. After you have
124installed the package for one architecture, use `make distclean' before
125reconfiguring for another architecture.
126
127 On MacOS X 10.5 and later systems, you can create libraries and
128executables that work on multiple system types--known as "fat" or
129"universal" binaries--by specifying multiple `-arch' options to the
130compiler but only a single `-arch' option to the preprocessor. Like
131this:
132
133 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135 CPP="gcc -E" CXXCPP="g++ -E"
136
137 This is not guaranteed to produce working output in all cases, you
138may have to build one architecture at a time and combine the results
139using the `lipo' tool if you have problems.
140
141Installation Names
142==================
143
144 By default, `make install' installs the package's commands under
145`/usr/local/bin', include files under `/usr/local/include', etc. You
146can specify an installation prefix other than `/usr/local' by giving
147`configure' the option `--prefix=PREFIX', where PREFIX must be an
148absolute file name.
149
150 You can specify separate installation prefixes for
151architecture-specific files and architecture-independent files. If you
152pass the option `--exec-prefix=PREFIX' to `configure', the package uses
153PREFIX as the prefix for installing programs and libraries.
154Documentation and other data files still use the regular prefix.
155
156 In addition, if you use an unusual directory layout you can give
157options like `--bindir=DIR' to specify different values for particular
158kinds of files. Run `configure --help' for a list of the directories
159you can set and what kinds of files go in them. In general, the
160default for these options is expressed in terms of `${prefix}', so that
161specifying just `--prefix' will affect all of the other directory
162specifications that were not explicitly provided.
163
164 The most portable way to affect installation locations is to pass the
165correct locations to `configure'; however, many packages provide one or
166both of the following shortcuts of passing variable assignments to the
167`make install' command line to change installation locations without
168having to reconfigure or recompile.
169
170 The first method involves providing an override variable for each
171affected directory. For example, `make install
172prefix=/alternate/directory' will choose an alternate location for all
173directory configuration variables that were expressed in terms of
174`${prefix}'. Any directories that were specified during `configure',
175but not in terms of `${prefix}', must each be overridden at install
176time for the entire installation to be relocated. The approach of
177makefile variable overrides for each directory variable is required by
178the GNU Coding Standards, and ideally causes no recompilation.
179However, some platforms have known limitations with the semantics of
180shared libraries that end up requiring recompilation when using this
181method, particularly noticeable in packages that use GNU Libtool.
182
183 The second method involves providing the `DESTDIR' variable. For
184example, `make install DESTDIR=/alternate/directory' will prepend
185`/alternate/directory' before all installation names. The approach of
186`DESTDIR' overrides is not required by the GNU Coding Standards, and
187does not work on platforms that have drive letters. On the other hand,
188it does better at avoiding recompilation issues, and works well even
189when some directory options were not specified in terms of `${prefix}'
190at `configure' time.
191
192Optional Features
193=================
194
195 If the package supports it, you can cause programs to be installed
196with an extra prefix or suffix on their names by giving `configure' the
197option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198
199 Some packages pay attention to `--enable-FEATURE' options to
200`configure', where FEATURE indicates an optional part of the package.
201They may also pay attention to `--with-PACKAGE' options, where PACKAGE
202is something like `gnu-as' or `x' (for the X Window System). The
203`README' should mention any `--enable-' and `--with-' options that the
204package recognizes.
205
206 For packages that use the X Window System, `configure' can usually
207find the X include and library files automatically, but if it doesn't,
208you can use the `configure' options `--x-includes=DIR' and
209`--x-libraries=DIR' to specify their locations.
210
211 Some packages offer the ability to configure how verbose the
212execution of `make' will be. For these packages, running `./configure
213--enable-silent-rules' sets the default to minimal output, which can be
214overridden with `make V=1'; while running `./configure
215--disable-silent-rules' sets the default to verbose, which can be
216overridden with `make V=0'.
217
218Particular systems
219==================
220
221 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
222CC is not installed, it is recommended to use the following options in
223order to use an ANSI C compiler:
224
225 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226
227and if that doesn't work, install pre-built binaries of GCC for HP-UX.
228
229 HP-UX `make' updates targets which have the same time stamps as
230their prerequisites, which makes it generally unusable when shipped
231generated files such as `configure' are involved. Use GNU `make'
232instead.
233
234 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235parse its `<wchar.h>' header file. The option `-nodtk' can be used as
236a workaround. If GNU CC is not installed, it is therefore recommended
237to try
238
239 ./configure CC="cc"
240
241and if that doesn't work, try
242
243 ./configure CC="cc -nodtk"
244
245 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
246directory contains several dysfunctional programs; working variants of
247these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
248in your `PATH', put it _after_ `/usr/bin'.
249
250 On Haiku, software installed for all users goes in `/boot/common',
251not `/usr/local'. It is recommended to use the following options:
252
253 ./configure --prefix=/boot/common
254
255Specifying the System Type
256==========================
257
258 There may be some features `configure' cannot figure out
259automatically, but needs to determine by the type of machine the package
260will run on. Usually, assuming the package is built to be run on the
261_same_ architectures, `configure' can figure that out, but if it prints
262a message saying it cannot guess the machine type, give it the
263`--build=TYPE' option. TYPE can either be a short name for the system
264type, such as `sun4', or a canonical name which has the form:
265
266 CPU-COMPANY-SYSTEM
267
268where SYSTEM can have one of these forms:
269
270 OS
271 KERNEL-OS
272
273 See the file `config.sub' for the possible values of each field. If
274`config.sub' isn't included in this package, then this package doesn't
275need to know the machine type.
276
277 If you are _building_ compiler tools for cross-compiling, you should
278use the option `--target=TYPE' to select the type of system they will
279produce code for.
280
281 If you want to _use_ a cross compiler, that generates code for a
282platform different from the build platform, you should specify the
283"host" platform (i.e., that on which the generated programs will
284eventually be run) with `--host=TYPE'.
285
286Sharing Defaults
287================
288
289 If you want to set default values for `configure' scripts to share,
290you can create a site shell script called `config.site' that gives
291default values for variables like `CC', `cache_file', and `prefix'.
292`configure' looks for `PREFIX/share/config.site' if it exists, then
293`PREFIX/etc/config.site' if it exists. Or, you can set the
294`CONFIG_SITE' environment variable to the location of the site script.
295A warning: not all `configure' scripts look for a site script.
296
297Defining Variables
298==================
299
300 Variables not defined in a site shell script can be set in the
301environment passed to `configure'. However, some packages may run
302configure again during the build, and the customized values of these
303variables may be lost. In order to avoid this problem, you should set
304them in the `configure' command line, using `VAR=value'. For example:
305
306 ./configure CC=/usr/local2/bin/gcc
307
308causes the specified `gcc' to be used as the C compiler (unless it is
309overridden in the site shell script).
310
311Unfortunately, this technique does not work for `CONFIG_SHELL' due to
312an Autoconf bug. Until the bug is fixed you can use this workaround:
313
314 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315
316`configure' Invocation
317======================
318
319 `configure' recognizes the following options to control how it
320operates.
321
322`--help'
323`-h'
324 Print a summary of all of the options to `configure', and exit.
325
326`--help=short'
327`--help=recursive'
328 Print a summary of the options unique to this package's
329 `configure', and exit. The `short' variant lists options used
330 only in the top level, while the `recursive' variant lists options
331 also present in any nested packages.
332
333`--version'
334`-V'
335 Print the version of Autoconf used to generate the `configure'
336 script, and exit.
337
338`--cache-file=FILE'
339 Enable the cache: use and save the results of the tests in FILE,
340 traditionally `config.cache'. FILE defaults to `/dev/null' to
341 disable caching.
342
343`--config-cache'
344`-C'
345 Alias for `--cache-file=config.cache'.
346
347`--quiet'
348`--silent'
349`-q'
350 Do not print messages saying which checks are being made. To
351 suppress all normal output, redirect it to `/dev/null' (any error
352 messages will still be shown).
353
354`--srcdir=DIR'
355 Look for the package's source code in directory DIR. Usually
356 `configure' can determine that directory automatically.
357
358`--prefix=DIR'
359 Use DIR as the installation prefix. *note Installation Names::
360 for more details, including other options available for fine-tuning
361 the installation locations.
362
363`--no-create'
364`-n'
365 Run the configure checks, but stop before creating any output
366 files.
367
368`configure' also accepts some other, not widely useful, options. Run
369`configure --help' for more details.
370
diff --git a/config.sub b/config.sub
deleted file mode 100644
index c894da45..00000000
--- a/config.sub
+++ /dev/null
@@ -1,1773 +0,0 @@
1#! /bin/sh
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011, 2012 Free Software Foundation, Inc.
6
7timestamp='2012-02-10'
8
9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software
11# can handle that machine. It does not imply ALL GNU software can.
12#
13# This file is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, see <http://www.gnu.org/licenses/>.
25#
26# As a special exception to the GNU General Public License, if you
27# distribute this file as part of a program that contains a
28# configuration script generated by Autoconf, you may include it under
29# the same distribution terms that you use for the rest of that program.
30
31
32# Please send patches to <config-patches@gnu.org>. Submit a context
33# diff and a properly formatted GNU ChangeLog entry.
34#
35# Configuration subroutine to validate and canonicalize a configuration type.
36# Supply the specified configuration type as an argument.
37# If it is invalid, we print an error message on stderr and exit with code 1.
38# Otherwise, we print the canonical config type on stdout and succeed.
39
40# You can get the latest version of this script from:
41# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
42
43# This file is supposed to be the same for all GNU packages
44# and recognize all the CPU types, system types and aliases
45# that are meaningful with *any* GNU software.
46# Each package is responsible for reporting which valid configurations
47# it does not support. The user should be able to distinguish
48# a failure to support a valid configuration from a meaningless
49# configuration.
50
51# The goal of this file is to map all the various variations of a given
52# machine specification into a single specification in the form:
53# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
54# or in some cases, the newer four-part form:
55# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
56# It is wrong to echo any other type of specification.
57
58me=`echo "$0" | sed -e 's,.*/,,'`
59
60usage="\
61Usage: $0 [OPTION] CPU-MFR-OPSYS
62 $0 [OPTION] ALIAS
63
64Canonicalize a configuration name.
65
66Operation modes:
67 -h, --help print this help, then exit
68 -t, --time-stamp print date of last modification, then exit
69 -v, --version print version number, then exit
70
71Report bugs and patches to <config-patches@gnu.org>."
72
73version="\
74GNU config.sub ($timestamp)
75
76Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
772001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
78Free Software Foundation, Inc.
79
80This is free software; see the source for copying conditions. There is NO
81warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
82
83help="
84Try \`$me --help' for more information."
85
86# Parse command line
87while test $# -gt 0 ; do
88 case $1 in
89 --time-stamp | --time* | -t )
90 echo "$timestamp" ; exit ;;
91 --version | -v )
92 echo "$version" ; exit ;;
93 --help | --h* | -h )
94 echo "$usage"; exit ;;
95 -- ) # Stop option processing
96 shift; break ;;
97 - ) # Use stdin as input.
98 break ;;
99 -* )
100 echo "$me: invalid option $1$help"
101 exit 1 ;;
102
103 *local*)
104 # First pass through any local machine types.
105 echo $1
106 exit ;;
107
108 * )
109 break ;;
110 esac
111done
112
113case $# in
114 0) echo "$me: missing argument$help" >&2
115 exit 1;;
116 1) ;;
117 *) echo "$me: too many arguments$help" >&2
118 exit 1;;
119esac
120
121# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
122# Here we must recognize all the valid KERNEL-OS combinations.
123maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124case $maybe_os in
125 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127 knetbsd*-gnu* | netbsd*-gnu* | \
128 kopensolaris*-gnu* | \
129 storm-chaos* | os2-emx* | rtmk-nova*)
130 os=-$maybe_os
131 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
132 ;;
133 android-linux)
134 os=-linux-android
135 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
136 ;;
137 *)
138 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
139 if [ $basic_machine != $1 ]
140 then os=`echo $1 | sed 's/.*-/-/'`
141 else os=; fi
142 ;;
143esac
144
145### Let's recognize common machines as not being operating systems so
146### that things like config.sub decstation-3100 work. We also
147### recognize some manufacturers as not being operating systems, so we
148### can provide default operating systems below.
149case $os in
150 -sun*os*)
151 # Prevent following clause from handling this invalid input.
152 ;;
153 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
154 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
155 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
156 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
157 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
158 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
159 -apple | -axis | -knuth | -cray | -microblaze)
160 os=
161 basic_machine=$1
162 ;;
163 -bluegene*)
164 os=-cnk
165 ;;
166 -sim | -cisco | -oki | -wec | -winbond)
167 os=
168 basic_machine=$1
169 ;;
170 -scout)
171 ;;
172 -wrs)
173 os=-vxworks
174 basic_machine=$1
175 ;;
176 -chorusos*)
177 os=-chorusos
178 basic_machine=$1
179 ;;
180 -chorusrdb)
181 os=-chorusrdb
182 basic_machine=$1
183 ;;
184 -hiux*)
185 os=-hiuxwe2
186 ;;
187 -sco6)
188 os=-sco5v6
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco5)
192 os=-sco3.2v5
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco4)
196 os=-sco3.2v4
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco3.2.[4-9]*)
200 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco3.2v[4-9]*)
204 # Don't forget version if it is 3.2v4 or newer.
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -sco5v6*)
208 # Don't forget version if it is 3.2v4 or newer.
209 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 ;;
211 -sco*)
212 os=-sco3.2v2
213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 ;;
215 -udk*)
216 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 ;;
218 -isc)
219 os=-isc2.2
220 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
221 ;;
222 -clix*)
223 basic_machine=clipper-intergraph
224 ;;
225 -isc*)
226 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
227 ;;
228 -lynx*)
229 os=-lynxos
230 ;;
231 -ptx*)
232 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
233 ;;
234 -windowsnt*)
235 os=`echo $os | sed -e 's/windowsnt/winnt/'`
236 ;;
237 -psos*)
238 os=-psos
239 ;;
240 -mint | -mint[0-9]*)
241 basic_machine=m68k-atari
242 os=-mint
243 ;;
244esac
245
246# Decode aliases for certain CPU-COMPANY combinations.
247case $basic_machine in
248 # Recognize the basic CPU types without company name.
249 # Some are omitted here because they have special meanings below.
250 1750a | 580 \
251 | a29k \
252 | aarch64 | aarch64_be \
253 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
254 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
255 | am33_2.0 \
256 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
257 | be32 | be64 \
258 | bfin \
259 | c4x | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | le32 | le64 \
268 | lm32 \
269 | m32c | m32r | m32rle | m68000 | m68k | m88k \
270 | maxq | mb | microblaze | mcore | mep | metag \
271 | mips | mipsbe | mipseb | mipsel | mipsle \
272 | mips16 \
273 | mips64 | mips64el \
274 | mips64octeon | mips64octeonel \
275 | mips64orion | mips64orionel \
276 | mips64r5900 | mips64r5900el \
277 | mips64vr | mips64vrel \
278 | mips64vr4100 | mips64vr4100el \
279 | mips64vr4300 | mips64vr4300el \
280 | mips64vr5000 | mips64vr5000el \
281 | mips64vr5900 | mips64vr5900el \
282 | mipsisa32 | mipsisa32el \
283 | mipsisa32r2 | mipsisa32r2el \
284 | mipsisa64 | mipsisa64el \
285 | mipsisa64r2 | mipsisa64r2el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipstx39 | mipstx39el \
289 | mn10200 | mn10300 \
290 | moxie \
291 | mt \
292 | msp430 \
293 | nds32 | nds32le | nds32be \
294 | nios | nios2 \
295 | ns16k | ns32k \
296 | open8 \
297 | or32 \
298 | pdp10 | pdp11 | pj | pjl \
299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pyramid \
301 | rl78 | rx \
302 | score \
303 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
304 | sh64 | sh64le \
305 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
306 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
307 | spu \
308 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
309 | ubicom32 \
310 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
311 | we32k \
312 | x86 | xc16x | xstormy16 | xtensa \
313 | z8k | z80)
314 basic_machine=$basic_machine-unknown
315 ;;
316 c54x)
317 basic_machine=tic54x-unknown
318 ;;
319 c55x)
320 basic_machine=tic55x-unknown
321 ;;
322 c6x)
323 basic_machine=tic6x-unknown
324 ;;
325 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
326 basic_machine=$basic_machine-unknown
327 os=-none
328 ;;
329 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
330 ;;
331 ms1)
332 basic_machine=mt-unknown
333 ;;
334
335 strongarm | thumb | xscale)
336 basic_machine=arm-unknown
337 ;;
338 xgate)
339 basic_machine=$basic_machine-unknown
340 os=-none
341 ;;
342 xscaleeb)
343 basic_machine=armeb-unknown
344 ;;
345
346 xscaleel)
347 basic_machine=armel-unknown
348 ;;
349
350 # We use `pc' rather than `unknown'
351 # because (1) that's what they normally are, and
352 # (2) the word "unknown" tends to confuse beginning users.
353 i*86 | x86_64)
354 basic_machine=$basic_machine-pc
355 ;;
356 # Object if more than one company name word.
357 *-*-*)
358 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
359 exit 1
360 ;;
361 # Recognize the basic CPU types with company name.
362 580-* \
363 | a29k-* \
364 | aarch64-* | aarch64_be-* \
365 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
366 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
367 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
368 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
369 | avr-* | avr32-* \
370 | be32-* | be64-* \
371 | bfin-* | bs2000-* \
372 | c[123]* | c30-* | [cjt]90-* | c4x-* \
373 | clipper-* | craynv-* | cydra-* \
374 | d10v-* | d30v-* | dlx-* \
375 | elxsi-* \
376 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
377 | h8300-* | h8500-* \
378 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
379 | hexagon-* \
380 | i*86-* | i860-* | i960-* | ia64-* \
381 | ip2k-* | iq2000-* \
382 | le32-* | le64-* \
383 | lm32-* \
384 | m32c-* | m32r-* | m32rle-* \
385 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
386 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
387 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
388 | mips16-* \
389 | mips64-* | mips64el-* \
390 | mips64octeon-* | mips64octeonel-* \
391 | mips64orion-* | mips64orionel-* \
392 | mips64r5900-* | mips64r5900el-* \
393 | mips64vr-* | mips64vrel-* \
394 | mips64vr4100-* | mips64vr4100el-* \
395 | mips64vr4300-* | mips64vr4300el-* \
396 | mips64vr5000-* | mips64vr5000el-* \
397 | mips64vr5900-* | mips64vr5900el-* \
398 | mipsisa32-* | mipsisa32el-* \
399 | mipsisa32r2-* | mipsisa32r2el-* \
400 | mipsisa64-* | mipsisa64el-* \
401 | mipsisa64r2-* | mipsisa64r2el-* \
402 | mipsisa64sb1-* | mipsisa64sb1el-* \
403 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
404 | mipstx39-* | mipstx39el-* \
405 | mmix-* \
406 | mt-* \
407 | msp430-* \
408 | nds32-* | nds32le-* | nds32be-* \
409 | nios-* | nios2-* \
410 | none-* | np1-* | ns16k-* | ns32k-* \
411 | open8-* \
412 | orion-* \
413 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
414 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
415 | pyramid-* \
416 | rl78-* | romp-* | rs6000-* | rx-* \
417 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
418 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
419 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
420 | sparclite-* \
421 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
422 | tahoe-* \
423 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
424 | tile*-* \
425 | tron-* \
426 | ubicom32-* \
427 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
428 | vax-* \
429 | we32k-* \
430 | x86-* | x86_64-* | xc16x-* | xps100-* \
431 | xstormy16-* | xtensa*-* \
432 | ymp-* \
433 | z8k-* | z80-*)
434 ;;
435 # Recognize the basic CPU types without company name, with glob match.
436 xtensa*)
437 basic_machine=$basic_machine-unknown
438 ;;
439 # Recognize the various machine names and aliases which stand
440 # for a CPU type and a company and sometimes even an OS.
441 386bsd)
442 basic_machine=i386-unknown
443 os=-bsd
444 ;;
445 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
446 basic_machine=m68000-att
447 ;;
448 3b*)
449 basic_machine=we32k-att
450 ;;
451 a29khif)
452 basic_machine=a29k-amd
453 os=-udi
454 ;;
455 abacus)
456 basic_machine=abacus-unknown
457 ;;
458 adobe68k)
459 basic_machine=m68010-adobe
460 os=-scout
461 ;;
462 alliant | fx80)
463 basic_machine=fx80-alliant
464 ;;
465 altos | altos3068)
466 basic_machine=m68k-altos
467 ;;
468 am29k)
469 basic_machine=a29k-none
470 os=-bsd
471 ;;
472 amd64)
473 basic_machine=x86_64-pc
474 ;;
475 amd64-*)
476 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
477 ;;
478 amdahl)
479 basic_machine=580-amdahl
480 os=-sysv
481 ;;
482 amiga | amiga-*)
483 basic_machine=m68k-unknown
484 ;;
485 amigaos | amigados)
486 basic_machine=m68k-unknown
487 os=-amigaos
488 ;;
489 amigaunix | amix)
490 basic_machine=m68k-unknown
491 os=-sysv4
492 ;;
493 apollo68)
494 basic_machine=m68k-apollo
495 os=-sysv
496 ;;
497 apollo68bsd)
498 basic_machine=m68k-apollo
499 os=-bsd
500 ;;
501 aros)
502 basic_machine=i386-pc
503 os=-aros
504 ;;
505 aux)
506 basic_machine=m68k-apple
507 os=-aux
508 ;;
509 balance)
510 basic_machine=ns32k-sequent
511 os=-dynix
512 ;;
513 blackfin)
514 basic_machine=bfin-unknown
515 os=-linux
516 ;;
517 blackfin-*)
518 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
519 os=-linux
520 ;;
521 bluegene*)
522 basic_machine=powerpc-ibm
523 os=-cnk
524 ;;
525 c54x-*)
526 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
527 ;;
528 c55x-*)
529 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
530 ;;
531 c6x-*)
532 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
533 ;;
534 c90)
535 basic_machine=c90-cray
536 os=-unicos
537 ;;
538 cegcc)
539 basic_machine=arm-unknown
540 os=-cegcc
541 ;;
542 convex-c1)
543 basic_machine=c1-convex
544 os=-bsd
545 ;;
546 convex-c2)
547 basic_machine=c2-convex
548 os=-bsd
549 ;;
550 convex-c32)
551 basic_machine=c32-convex
552 os=-bsd
553 ;;
554 convex-c34)
555 basic_machine=c34-convex
556 os=-bsd
557 ;;
558 convex-c38)
559 basic_machine=c38-convex
560 os=-bsd
561 ;;
562 cray | j90)
563 basic_machine=j90-cray
564 os=-unicos
565 ;;
566 craynv)
567 basic_machine=craynv-cray
568 os=-unicosmp
569 ;;
570 cr16 | cr16-*)
571 basic_machine=cr16-unknown
572 os=-elf
573 ;;
574 crds | unos)
575 basic_machine=m68k-crds
576 ;;
577 crisv32 | crisv32-* | etraxfs*)
578 basic_machine=crisv32-axis
579 ;;
580 cris | cris-* | etrax*)
581 basic_machine=cris-axis
582 ;;
583 crx)
584 basic_machine=crx-unknown
585 os=-elf
586 ;;
587 da30 | da30-*)
588 basic_machine=m68k-da30
589 ;;
590 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
591 basic_machine=mips-dec
592 ;;
593 decsystem10* | dec10*)
594 basic_machine=pdp10-dec
595 os=-tops10
596 ;;
597 decsystem20* | dec20*)
598 basic_machine=pdp10-dec
599 os=-tops20
600 ;;
601 delta | 3300 | motorola-3300 | motorola-delta \
602 | 3300-motorola | delta-motorola)
603 basic_machine=m68k-motorola
604 ;;
605 delta88)
606 basic_machine=m88k-motorola
607 os=-sysv3
608 ;;
609 dicos)
610 basic_machine=i686-pc
611 os=-dicos
612 ;;
613 djgpp)
614 basic_machine=i586-pc
615 os=-msdosdjgpp
616 ;;
617 dpx20 | dpx20-*)
618 basic_machine=rs6000-bull
619 os=-bosx
620 ;;
621 dpx2* | dpx2*-bull)
622 basic_machine=m68k-bull
623 os=-sysv3
624 ;;
625 ebmon29k)
626 basic_machine=a29k-amd
627 os=-ebmon
628 ;;
629 elxsi)
630 basic_machine=elxsi-elxsi
631 os=-bsd
632 ;;
633 encore | umax | mmax)
634 basic_machine=ns32k-encore
635 ;;
636 es1800 | OSE68k | ose68k | ose | OSE)
637 basic_machine=m68k-ericsson
638 os=-ose
639 ;;
640 fx2800)
641 basic_machine=i860-alliant
642 ;;
643 genix)
644 basic_machine=ns32k-ns
645 ;;
646 gmicro)
647 basic_machine=tron-gmicro
648 os=-sysv
649 ;;
650 go32)
651 basic_machine=i386-pc
652 os=-go32
653 ;;
654 h3050r* | hiux*)
655 basic_machine=hppa1.1-hitachi
656 os=-hiuxwe2
657 ;;
658 h8300hms)
659 basic_machine=h8300-hitachi
660 os=-hms
661 ;;
662 h8300xray)
663 basic_machine=h8300-hitachi
664 os=-xray
665 ;;
666 h8500hms)
667 basic_machine=h8500-hitachi
668 os=-hms
669 ;;
670 harris)
671 basic_machine=m88k-harris
672 os=-sysv3
673 ;;
674 hp300-*)
675 basic_machine=m68k-hp
676 ;;
677 hp300bsd)
678 basic_machine=m68k-hp
679 os=-bsd
680 ;;
681 hp300hpux)
682 basic_machine=m68k-hp
683 os=-hpux
684 ;;
685 hp3k9[0-9][0-9] | hp9[0-9][0-9])
686 basic_machine=hppa1.0-hp
687 ;;
688 hp9k2[0-9][0-9] | hp9k31[0-9])
689 basic_machine=m68000-hp
690 ;;
691 hp9k3[2-9][0-9])
692 basic_machine=m68k-hp
693 ;;
694 hp9k6[0-9][0-9] | hp6[0-9][0-9])
695 basic_machine=hppa1.0-hp
696 ;;
697 hp9k7[0-79][0-9] | hp7[0-79][0-9])
698 basic_machine=hppa1.1-hp
699 ;;
700 hp9k78[0-9] | hp78[0-9])
701 # FIXME: really hppa2.0-hp
702 basic_machine=hppa1.1-hp
703 ;;
704 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
705 # FIXME: really hppa2.0-hp
706 basic_machine=hppa1.1-hp
707 ;;
708 hp9k8[0-9][13679] | hp8[0-9][13679])
709 basic_machine=hppa1.1-hp
710 ;;
711 hp9k8[0-9][0-9] | hp8[0-9][0-9])
712 basic_machine=hppa1.0-hp
713 ;;
714 hppa-next)
715 os=-nextstep3
716 ;;
717 hppaosf)
718 basic_machine=hppa1.1-hp
719 os=-osf
720 ;;
721 hppro)
722 basic_machine=hppa1.1-hp
723 os=-proelf
724 ;;
725 i370-ibm* | ibm*)
726 basic_machine=i370-ibm
727 ;;
728 i*86v32)
729 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
730 os=-sysv32
731 ;;
732 i*86v4*)
733 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
734 os=-sysv4
735 ;;
736 i*86v)
737 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
738 os=-sysv
739 ;;
740 i*86sol2)
741 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
742 os=-solaris2
743 ;;
744 i386mach)
745 basic_machine=i386-mach
746 os=-mach
747 ;;
748 i386-vsta | vsta)
749 basic_machine=i386-unknown
750 os=-vsta
751 ;;
752 iris | iris4d)
753 basic_machine=mips-sgi
754 case $os in
755 -irix*)
756 ;;
757 *)
758 os=-irix4
759 ;;
760 esac
761 ;;
762 isi68 | isi)
763 basic_machine=m68k-isi
764 os=-sysv
765 ;;
766 m68knommu)
767 basic_machine=m68k-unknown
768 os=-linux
769 ;;
770 m68knommu-*)
771 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
772 os=-linux
773 ;;
774 m88k-omron*)
775 basic_machine=m88k-omron
776 ;;
777 magnum | m3230)
778 basic_machine=mips-mips
779 os=-sysv
780 ;;
781 merlin)
782 basic_machine=ns32k-utek
783 os=-sysv
784 ;;
785 microblaze)
786 basic_machine=microblaze-xilinx
787 ;;
788 mingw32)
789 basic_machine=i386-pc
790 os=-mingw32
791 ;;
792 mingw32ce)
793 basic_machine=arm-unknown
794 os=-mingw32ce
795 ;;
796 miniframe)
797 basic_machine=m68000-convergent
798 ;;
799 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
800 basic_machine=m68k-atari
801 os=-mint
802 ;;
803 mips3*-*)
804 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
805 ;;
806 mips3*)
807 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
808 ;;
809 monitor)
810 basic_machine=m68k-rom68k
811 os=-coff
812 ;;
813 morphos)
814 basic_machine=powerpc-unknown
815 os=-morphos
816 ;;
817 msdos)
818 basic_machine=i386-pc
819 os=-msdos
820 ;;
821 ms1-*)
822 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
823 ;;
824 msys)
825 basic_machine=i386-pc
826 os=-msys
827 ;;
828 mvs)
829 basic_machine=i370-ibm
830 os=-mvs
831 ;;
832 nacl)
833 basic_machine=le32-unknown
834 os=-nacl
835 ;;
836 ncr3000)
837 basic_machine=i486-ncr
838 os=-sysv4
839 ;;
840 netbsd386)
841 basic_machine=i386-unknown
842 os=-netbsd
843 ;;
844 netwinder)
845 basic_machine=armv4l-rebel
846 os=-linux
847 ;;
848 news | news700 | news800 | news900)
849 basic_machine=m68k-sony
850 os=-newsos
851 ;;
852 news1000)
853 basic_machine=m68030-sony
854 os=-newsos
855 ;;
856 news-3600 | risc-news)
857 basic_machine=mips-sony
858 os=-newsos
859 ;;
860 necv70)
861 basic_machine=v70-nec
862 os=-sysv
863 ;;
864 next | m*-next )
865 basic_machine=m68k-next
866 case $os in
867 -nextstep* )
868 ;;
869 -ns2*)
870 os=-nextstep2
871 ;;
872 *)
873 os=-nextstep3
874 ;;
875 esac
876 ;;
877 nh3000)
878 basic_machine=m68k-harris
879 os=-cxux
880 ;;
881 nh[45]000)
882 basic_machine=m88k-harris
883 os=-cxux
884 ;;
885 nindy960)
886 basic_machine=i960-intel
887 os=-nindy
888 ;;
889 mon960)
890 basic_machine=i960-intel
891 os=-mon960
892 ;;
893 nonstopux)
894 basic_machine=mips-compaq
895 os=-nonstopux
896 ;;
897 np1)
898 basic_machine=np1-gould
899 ;;
900 neo-tandem)
901 basic_machine=neo-tandem
902 ;;
903 nse-tandem)
904 basic_machine=nse-tandem
905 ;;
906 nsr-tandem)
907 basic_machine=nsr-tandem
908 ;;
909 op50n-* | op60c-*)
910 basic_machine=hppa1.1-oki
911 os=-proelf
912 ;;
913 openrisc | openrisc-*)
914 basic_machine=or32-unknown
915 ;;
916 os400)
917 basic_machine=powerpc-ibm
918 os=-os400
919 ;;
920 OSE68000 | ose68000)
921 basic_machine=m68000-ericsson
922 os=-ose
923 ;;
924 os68k)
925 basic_machine=m68k-none
926 os=-os68k
927 ;;
928 pa-hitachi)
929 basic_machine=hppa1.1-hitachi
930 os=-hiuxwe2
931 ;;
932 paragon)
933 basic_machine=i860-intel
934 os=-osf
935 ;;
936 parisc)
937 basic_machine=hppa-unknown
938 os=-linux
939 ;;
940 parisc-*)
941 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
942 os=-linux
943 ;;
944 pbd)
945 basic_machine=sparc-tti
946 ;;
947 pbb)
948 basic_machine=m68k-tti
949 ;;
950 pc532 | pc532-*)
951 basic_machine=ns32k-pc532
952 ;;
953 pc98)
954 basic_machine=i386-pc
955 ;;
956 pc98-*)
957 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
958 ;;
959 pentium | p5 | k5 | k6 | nexgen | viac3)
960 basic_machine=i586-pc
961 ;;
962 pentiumpro | p6 | 6x86 | athlon | athlon_*)
963 basic_machine=i686-pc
964 ;;
965 pentiumii | pentium2 | pentiumiii | pentium3)
966 basic_machine=i686-pc
967 ;;
968 pentium4)
969 basic_machine=i786-pc
970 ;;
971 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
972 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
973 ;;
974 pentiumpro-* | p6-* | 6x86-* | athlon-*)
975 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
976 ;;
977 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
978 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
979 ;;
980 pentium4-*)
981 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
982 ;;
983 pn)
984 basic_machine=pn-gould
985 ;;
986 power) basic_machine=power-ibm
987 ;;
988 ppc | ppcbe) basic_machine=powerpc-unknown
989 ;;
990 ppc-* | ppcbe-*)
991 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
992 ;;
993 ppcle | powerpclittle | ppc-le | powerpc-little)
994 basic_machine=powerpcle-unknown
995 ;;
996 ppcle-* | powerpclittle-*)
997 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
998 ;;
999 ppc64) basic_machine=powerpc64-unknown
1000 ;;
1001 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1002 ;;
1003 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1004 basic_machine=powerpc64le-unknown
1005 ;;
1006 ppc64le-* | powerpc64little-*)
1007 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1008 ;;
1009 ps2)
1010 basic_machine=i386-ibm
1011 ;;
1012 pw32)
1013 basic_machine=i586-unknown
1014 os=-pw32
1015 ;;
1016 rdos)
1017 basic_machine=i386-pc
1018 os=-rdos
1019 ;;
1020 rom68k)
1021 basic_machine=m68k-rom68k
1022 os=-coff
1023 ;;
1024 rm[46]00)
1025 basic_machine=mips-siemens
1026 ;;
1027 rtpc | rtpc-*)
1028 basic_machine=romp-ibm
1029 ;;
1030 s390 | s390-*)
1031 basic_machine=s390-ibm
1032 ;;
1033 s390x | s390x-*)
1034 basic_machine=s390x-ibm
1035 ;;
1036 sa29200)
1037 basic_machine=a29k-amd
1038 os=-udi
1039 ;;
1040 sb1)
1041 basic_machine=mipsisa64sb1-unknown
1042 ;;
1043 sb1el)
1044 basic_machine=mipsisa64sb1el-unknown
1045 ;;
1046 sde)
1047 basic_machine=mipsisa32-sde
1048 os=-elf
1049 ;;
1050 sei)
1051 basic_machine=mips-sei
1052 os=-seiux
1053 ;;
1054 sequent)
1055 basic_machine=i386-sequent
1056 ;;
1057 sh)
1058 basic_machine=sh-hitachi
1059 os=-hms
1060 ;;
1061 sh5el)
1062 basic_machine=sh5le-unknown
1063 ;;
1064 sh64)
1065 basic_machine=sh64-unknown
1066 ;;
1067 sparclite-wrs | simso-wrs)
1068 basic_machine=sparclite-wrs
1069 os=-vxworks
1070 ;;
1071 sps7)
1072 basic_machine=m68k-bull
1073 os=-sysv2
1074 ;;
1075 spur)
1076 basic_machine=spur-unknown
1077 ;;
1078 st2000)
1079 basic_machine=m68k-tandem
1080 ;;
1081 stratus)
1082 basic_machine=i860-stratus
1083 os=-sysv4
1084 ;;
1085 strongarm-* | thumb-*)
1086 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1087 ;;
1088 sun2)
1089 basic_machine=m68000-sun
1090 ;;
1091 sun2os3)
1092 basic_machine=m68000-sun
1093 os=-sunos3
1094 ;;
1095 sun2os4)
1096 basic_machine=m68000-sun
1097 os=-sunos4
1098 ;;
1099 sun3os3)
1100 basic_machine=m68k-sun
1101 os=-sunos3
1102 ;;
1103 sun3os4)
1104 basic_machine=m68k-sun
1105 os=-sunos4
1106 ;;
1107 sun4os3)
1108 basic_machine=sparc-sun
1109 os=-sunos3
1110 ;;
1111 sun4os4)
1112 basic_machine=sparc-sun
1113 os=-sunos4
1114 ;;
1115 sun4sol2)
1116 basic_machine=sparc-sun
1117 os=-solaris2
1118 ;;
1119 sun3 | sun3-*)
1120 basic_machine=m68k-sun
1121 ;;
1122 sun4)
1123 basic_machine=sparc-sun
1124 ;;
1125 sun386 | sun386i | roadrunner)
1126 basic_machine=i386-sun
1127 ;;
1128 sv1)
1129 basic_machine=sv1-cray
1130 os=-unicos
1131 ;;
1132 symmetry)
1133 basic_machine=i386-sequent
1134 os=-dynix
1135 ;;
1136 t3e)
1137 basic_machine=alphaev5-cray
1138 os=-unicos
1139 ;;
1140 t90)
1141 basic_machine=t90-cray
1142 os=-unicos
1143 ;;
1144 tile*)
1145 basic_machine=$basic_machine-unknown
1146 os=-linux-gnu
1147 ;;
1148 tx39)
1149 basic_machine=mipstx39-unknown
1150 ;;
1151 tx39el)
1152 basic_machine=mipstx39el-unknown
1153 ;;
1154 toad1)
1155 basic_machine=pdp10-xkl
1156 os=-tops20
1157 ;;
1158 tower | tower-32)
1159 basic_machine=m68k-ncr
1160 ;;
1161 tpf)
1162 basic_machine=s390x-ibm
1163 os=-tpf
1164 ;;
1165 udi29k)
1166 basic_machine=a29k-amd
1167 os=-udi
1168 ;;
1169 ultra3)
1170 basic_machine=a29k-nyu
1171 os=-sym1
1172 ;;
1173 v810 | necv810)
1174 basic_machine=v810-nec
1175 os=-none
1176 ;;
1177 vaxv)
1178 basic_machine=vax-dec
1179 os=-sysv
1180 ;;
1181 vms)
1182 basic_machine=vax-dec
1183 os=-vms
1184 ;;
1185 vpp*|vx|vx-*)
1186 basic_machine=f301-fujitsu
1187 ;;
1188 vxworks960)
1189 basic_machine=i960-wrs
1190 os=-vxworks
1191 ;;
1192 vxworks68)
1193 basic_machine=m68k-wrs
1194 os=-vxworks
1195 ;;
1196 vxworks29k)
1197 basic_machine=a29k-wrs
1198 os=-vxworks
1199 ;;
1200 w65*)
1201 basic_machine=w65-wdc
1202 os=-none
1203 ;;
1204 w89k-*)
1205 basic_machine=hppa1.1-winbond
1206 os=-proelf
1207 ;;
1208 xbox)
1209 basic_machine=i686-pc
1210 os=-mingw32
1211 ;;
1212 xps | xps100)
1213 basic_machine=xps100-honeywell
1214 ;;
1215 xscale-* | xscalee[bl]-*)
1216 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1217 ;;
1218 ymp)
1219 basic_machine=ymp-cray
1220 os=-unicos
1221 ;;
1222 z8k-*-coff)
1223 basic_machine=z8k-unknown
1224 os=-sim
1225 ;;
1226 z80-*-coff)
1227 basic_machine=z80-unknown
1228 os=-sim
1229 ;;
1230 none)
1231 basic_machine=none-none
1232 os=-none
1233 ;;
1234
1235# Here we handle the default manufacturer of certain CPU types. It is in
1236# some cases the only manufacturer, in others, it is the most popular.
1237 w89k)
1238 basic_machine=hppa1.1-winbond
1239 ;;
1240 op50n)
1241 basic_machine=hppa1.1-oki
1242 ;;
1243 op60c)
1244 basic_machine=hppa1.1-oki
1245 ;;
1246 romp)
1247 basic_machine=romp-ibm
1248 ;;
1249 mmix)
1250 basic_machine=mmix-knuth
1251 ;;
1252 rs6000)
1253 basic_machine=rs6000-ibm
1254 ;;
1255 vax)
1256 basic_machine=vax-dec
1257 ;;
1258 pdp10)
1259 # there are many clones, so DEC is not a safe bet
1260 basic_machine=pdp10-unknown
1261 ;;
1262 pdp11)
1263 basic_machine=pdp11-dec
1264 ;;
1265 we32k)
1266 basic_machine=we32k-att
1267 ;;
1268 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1269 basic_machine=sh-unknown
1270 ;;
1271 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1272 basic_machine=sparc-sun
1273 ;;
1274 cydra)
1275 basic_machine=cydra-cydrome
1276 ;;
1277 orion)
1278 basic_machine=orion-highlevel
1279 ;;
1280 orion105)
1281 basic_machine=clipper-highlevel
1282 ;;
1283 mac | mpw | mac-mpw)
1284 basic_machine=m68k-apple
1285 ;;
1286 pmac | pmac-mpw)
1287 basic_machine=powerpc-apple
1288 ;;
1289 *-unknown)
1290 # Make sure to match an already-canonicalized machine name.
1291 ;;
1292 *)
1293 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1294 exit 1
1295 ;;
1296esac
1297
1298# Here we canonicalize certain aliases for manufacturers.
1299case $basic_machine in
1300 *-digital*)
1301 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1302 ;;
1303 *-commodore*)
1304 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1305 ;;
1306 *)
1307 ;;
1308esac
1309
1310# Decode manufacturer-specific aliases for certain operating systems.
1311
1312if [ x"$os" != x"" ]
1313then
1314case $os in
1315 # First match some system type aliases
1316 # that might get confused with valid system types.
1317 # -solaris* is a basic system type, with this one exception.
1318 -auroraux)
1319 os=-auroraux
1320 ;;
1321 -solaris1 | -solaris1.*)
1322 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1323 ;;
1324 -solaris)
1325 os=-solaris2
1326 ;;
1327 -svr4*)
1328 os=-sysv4
1329 ;;
1330 -unixware*)
1331 os=-sysv4.2uw
1332 ;;
1333 -gnu/linux*)
1334 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1335 ;;
1336 # First accept the basic system types.
1337 # The portable systems comes first.
1338 # Each alternative MUST END IN A *, to match a version number.
1339 # -sysv* is not here because it comes later, after sysvr4.
1340 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1341 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1342 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1343 | -sym* | -kopensolaris* \
1344 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1345 | -aos* | -aros* \
1346 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1347 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1348 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1349 | -openbsd* | -solidbsd* \
1350 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1351 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1352 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1353 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1354 | -chorusos* | -chorusrdb* | -cegcc* \
1355 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1356 | -mingw32* | -linux-gnu* | -linux-android* \
1357 | -linux-newlib* | -linux-uclibc* \
1358 | -uxpv* | -beos* | -mpeix* | -udk* \
1359 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1360 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1361 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1362 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1363 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1364 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1365 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1366 # Remember, each alternative MUST END IN *, to match a version number.
1367 ;;
1368 -qnx*)
1369 case $basic_machine in
1370 x86-* | i*86-*)
1371 ;;
1372 *)
1373 os=-nto$os
1374 ;;
1375 esac
1376 ;;
1377 -nto-qnx*)
1378 ;;
1379 -nto*)
1380 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1381 ;;
1382 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1383 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1384 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1385 ;;
1386 -mac*)
1387 os=`echo $os | sed -e 's|mac|macos|'`
1388 ;;
1389 -linux-dietlibc)
1390 os=-linux-dietlibc
1391 ;;
1392 -linux*)
1393 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1394 ;;
1395 -sunos5*)
1396 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1397 ;;
1398 -sunos6*)
1399 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1400 ;;
1401 -opened*)
1402 os=-openedition
1403 ;;
1404 -os400*)
1405 os=-os400
1406 ;;
1407 -wince*)
1408 os=-wince
1409 ;;
1410 -osfrose*)
1411 os=-osfrose
1412 ;;
1413 -osf*)
1414 os=-osf
1415 ;;
1416 -utek*)
1417 os=-bsd
1418 ;;
1419 -dynix*)
1420 os=-bsd
1421 ;;
1422 -acis*)
1423 os=-aos
1424 ;;
1425 -atheos*)
1426 os=-atheos
1427 ;;
1428 -syllable*)
1429 os=-syllable
1430 ;;
1431 -386bsd)
1432 os=-bsd
1433 ;;
1434 -ctix* | -uts*)
1435 os=-sysv
1436 ;;
1437 -nova*)
1438 os=-rtmk-nova
1439 ;;
1440 -ns2 )
1441 os=-nextstep2
1442 ;;
1443 -nsk*)
1444 os=-nsk
1445 ;;
1446 # Preserve the version number of sinix5.
1447 -sinix5.*)
1448 os=`echo $os | sed -e 's|sinix|sysv|'`
1449 ;;
1450 -sinix*)
1451 os=-sysv4
1452 ;;
1453 -tpf*)
1454 os=-tpf
1455 ;;
1456 -triton*)
1457 os=-sysv3
1458 ;;
1459 -oss*)
1460 os=-sysv3
1461 ;;
1462 -svr4)
1463 os=-sysv4
1464 ;;
1465 -svr3)
1466 os=-sysv3
1467 ;;
1468 -sysvr4)
1469 os=-sysv4
1470 ;;
1471 # This must come after -sysvr4.
1472 -sysv*)
1473 ;;
1474 -ose*)
1475 os=-ose
1476 ;;
1477 -es1800*)
1478 os=-ose
1479 ;;
1480 -xenix)
1481 os=-xenix
1482 ;;
1483 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1484 os=-mint
1485 ;;
1486 -aros*)
1487 os=-aros
1488 ;;
1489 -kaos*)
1490 os=-kaos
1491 ;;
1492 -zvmoe)
1493 os=-zvmoe
1494 ;;
1495 -dicos*)
1496 os=-dicos
1497 ;;
1498 -nacl*)
1499 ;;
1500 -none)
1501 ;;
1502 *)
1503 # Get rid of the `-' at the beginning of $os.
1504 os=`echo $os | sed 's/[^-]*-//'`
1505 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1506 exit 1
1507 ;;
1508esac
1509else
1510
1511# Here we handle the default operating systems that come with various machines.
1512# The value should be what the vendor currently ships out the door with their
1513# machine or put another way, the most popular os provided with the machine.
1514
1515# Note that if you're going to try to match "-MANUFACTURER" here (say,
1516# "-sun"), then you have to tell the case statement up towards the top
1517# that MANUFACTURER isn't an operating system. Otherwise, code above
1518# will signal an error saying that MANUFACTURER isn't an operating
1519# system, and we'll never get to this point.
1520
1521case $basic_machine in
1522 score-*)
1523 os=-elf
1524 ;;
1525 spu-*)
1526 os=-elf
1527 ;;
1528 *-acorn)
1529 os=-riscix1.2
1530 ;;
1531 arm*-rebel)
1532 os=-linux
1533 ;;
1534 arm*-semi)
1535 os=-aout
1536 ;;
1537 c4x-* | tic4x-*)
1538 os=-coff
1539 ;;
1540 tic54x-*)
1541 os=-coff
1542 ;;
1543 tic55x-*)
1544 os=-coff
1545 ;;
1546 tic6x-*)
1547 os=-coff
1548 ;;
1549 # This must come before the *-dec entry.
1550 pdp10-*)
1551 os=-tops20
1552 ;;
1553 pdp11-*)
1554 os=-none
1555 ;;
1556 *-dec | vax-*)
1557 os=-ultrix4.2
1558 ;;
1559 m68*-apollo)
1560 os=-domain
1561 ;;
1562 i386-sun)
1563 os=-sunos4.0.2
1564 ;;
1565 m68000-sun)
1566 os=-sunos3
1567 ;;
1568 m68*-cisco)
1569 os=-aout
1570 ;;
1571 mep-*)
1572 os=-elf
1573 ;;
1574 mips*-cisco)
1575 os=-elf
1576 ;;
1577 mips*-*)
1578 os=-elf
1579 ;;
1580 or32-*)
1581 os=-coff
1582 ;;
1583 *-tti) # must be before sparc entry or we get the wrong os.
1584 os=-sysv3
1585 ;;
1586 sparc-* | *-sun)
1587 os=-sunos4.1.1
1588 ;;
1589 *-be)
1590 os=-beos
1591 ;;
1592 *-haiku)
1593 os=-haiku
1594 ;;
1595 *-ibm)
1596 os=-aix
1597 ;;
1598 *-knuth)
1599 os=-mmixware
1600 ;;
1601 *-wec)
1602 os=-proelf
1603 ;;
1604 *-winbond)
1605 os=-proelf
1606 ;;
1607 *-oki)
1608 os=-proelf
1609 ;;
1610 *-hp)
1611 os=-hpux
1612 ;;
1613 *-hitachi)
1614 os=-hiux
1615 ;;
1616 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1617 os=-sysv
1618 ;;
1619 *-cbm)
1620 os=-amigaos
1621 ;;
1622 *-dg)
1623 os=-dgux
1624 ;;
1625 *-dolphin)
1626 os=-sysv3
1627 ;;
1628 m68k-ccur)
1629 os=-rtu
1630 ;;
1631 m88k-omron*)
1632 os=-luna
1633 ;;
1634 *-next )
1635 os=-nextstep
1636 ;;
1637 *-sequent)
1638 os=-ptx
1639 ;;
1640 *-crds)
1641 os=-unos
1642 ;;
1643 *-ns)
1644 os=-genix
1645 ;;
1646 i370-*)
1647 os=-mvs
1648 ;;
1649 *-next)
1650 os=-nextstep3
1651 ;;
1652 *-gould)
1653 os=-sysv
1654 ;;
1655 *-highlevel)
1656 os=-bsd
1657 ;;
1658 *-encore)
1659 os=-bsd
1660 ;;
1661 *-sgi)
1662 os=-irix
1663 ;;
1664 *-siemens)
1665 os=-sysv4
1666 ;;
1667 *-masscomp)
1668 os=-rtu
1669 ;;
1670 f30[01]-fujitsu | f700-fujitsu)
1671 os=-uxpv
1672 ;;
1673 *-rom68k)
1674 os=-coff
1675 ;;
1676 *-*bug)
1677 os=-coff
1678 ;;
1679 *-apple)
1680 os=-macos
1681 ;;
1682 *-atari*)
1683 os=-mint
1684 ;;
1685 *)
1686 os=-none
1687 ;;
1688esac
1689fi
1690
1691# Here we handle the case where we know the os, and the CPU type, but not the
1692# manufacturer. We pick the logical manufacturer.
1693vendor=unknown
1694case $basic_machine in
1695 *-unknown)
1696 case $os in
1697 -riscix*)
1698 vendor=acorn
1699 ;;
1700 -sunos*)
1701 vendor=sun
1702 ;;
1703 -cnk*|-aix*)
1704 vendor=ibm
1705 ;;
1706 -beos*)
1707 vendor=be
1708 ;;
1709 -hpux*)
1710 vendor=hp
1711 ;;
1712 -mpeix*)
1713 vendor=hp
1714 ;;
1715 -hiux*)
1716 vendor=hitachi
1717 ;;
1718 -unos*)
1719 vendor=crds
1720 ;;
1721 -dgux*)
1722 vendor=dg
1723 ;;
1724 -luna*)
1725 vendor=omron
1726 ;;
1727 -genix*)
1728 vendor=ns
1729 ;;
1730 -mvs* | -opened*)
1731 vendor=ibm
1732 ;;
1733 -os400*)
1734 vendor=ibm
1735 ;;
1736 -ptx*)
1737 vendor=sequent
1738 ;;
1739 -tpf*)
1740 vendor=ibm
1741 ;;
1742 -vxsim* | -vxworks* | -windiss*)
1743 vendor=wrs
1744 ;;
1745 -aux*)
1746 vendor=apple
1747 ;;
1748 -hms*)
1749 vendor=hitachi
1750 ;;
1751 -mpw* | -macos*)
1752 vendor=apple
1753 ;;
1754 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1755 vendor=atari
1756 ;;
1757 -vos*)
1758 vendor=stratus
1759 ;;
1760 esac
1761 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1762 ;;
1763esac
1764
1765echo $basic_machine$os
1766exit
1767
1768# Local variables:
1769# eval: (add-hook 'write-file-hooks 'time-stamp)
1770# time-stamp-start: "timestamp='"
1771# time-stamp-format: "%:y-%02m-%02d"
1772# time-stamp-end: "'"
1773# End:
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
deleted file mode 100644
index 2abda0f3..00000000
--- a/doc/texinfo.tex
+++ /dev/null
@@ -1,9913 +0,0 @@
1% texinfo.tex -- TeX macros to handle Texinfo files.
2%
3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5%
6\def\texinfoversion{2012-01-03.09}
7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
10% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
11%
12% This texinfo.tex file is free software: you can redistribute it and/or
13% modify it under the terms of the GNU General Public License as
14% published by the Free Software Foundation, either version 3 of the
15% License, or (at your option) any later version.
16%
17% This texinfo.tex file is distributed in the hope that it will be
18% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
19% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20% General Public License for more details.
21%
22% You should have received a copy of the GNU General Public License
23% along with this program. If not, see <http://www.gnu.org/licenses/>.
24%
25% As a special exception, when this file is read by TeX when processing
26% a Texinfo source document, you may use the result without
27% restriction. (This has been our intent since Texinfo was invented.)
28%
29% Please try the latest version of texinfo.tex before submitting bug
30% reports; you can get the latest version from:
31% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
32% ftp://tug.org/tex/texinfo.tex
33% (and all CTAN mirrors, see http://www.ctan.org).
34% The texinfo.tex in any given distribution could well be out
35% of date, so if that's what you're using, please check.
36%
37% Send bug reports to bug-texinfo@gnu.org. Please include including a
38% complete document in each bug report with which we can reproduce the
39% problem. Patches are, of course, greatly appreciated.
40%
41% To process a Texinfo manual with TeX, it's most reliable to use the
42% texi2dvi shell script that comes with the distribution. For a simple
43% manual foo.texi, however, you can get away with this:
44% tex foo.texi
45% texindex foo.??
46% tex foo.texi
47% tex foo.texi
48% dvips foo.dvi -o # or whatever; this makes foo.ps.
49% The extra TeX runs get the cross-reference information correct.
50% Sometimes one run after texindex suffices, and sometimes you need more
51% than two; texi2dvi does it as many times as necessary.
52%
53% It is possible to adapt texinfo.tex for other languages, to some
54% extent. You can get the existing language-specific files from the
55% full Texinfo distribution.
56%
57% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
58
59
60\message{Loading texinfo [version \texinfoversion]:}
61
62% If in a .fmt file, print the version number
63% and turn on active characters that we couldn't do earlier because
64% they might have appeared in the input file name.
65\everyjob{\message{[Texinfo version \texinfoversion]}%
66 \catcode`+=\active \catcode`\_=\active}
67
68\chardef\other=12
69
70% We never want plain's \outer definition of \+ in Texinfo.
71% For @tex, we can use \tabalign.
72\let\+ = \relax
73
74% Save some plain tex macros whose names we will redefine.
75\let\ptexb=\b
76\let\ptexbullet=\bullet
77\let\ptexc=\c
78\let\ptexcomma=\,
79\let\ptexdot=\.
80\let\ptexdots=\dots
81\let\ptexend=\end
82\let\ptexequiv=\equiv
83\let\ptexexclam=\!
84\let\ptexfootnote=\footnote
85\let\ptexgtr=>
86\let\ptexhat=^
87\let\ptexi=\i
88\let\ptexindent=\indent
89\let\ptexinsert=\insert
90\let\ptexlbrace=\{
91\let\ptexless=<
92\let\ptexnewwrite\newwrite
93\let\ptexnoindent=\noindent
94\let\ptexplus=+
95\let\ptexraggedright=\raggedright
96\let\ptexrbrace=\}
97\let\ptexslash=\/
98\let\ptexstar=\*
99\let\ptext=\t
100\let\ptextop=\top
101{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
102
103% If this character appears in an error message or help string, it
104% starts a new line in the output.
105\newlinechar = `^^J
106
107% Use TeX 3.0's \inputlineno to get the line number, for better error
108% messages, but if we're using an old version of TeX, don't do anything.
109%
110\ifx\inputlineno\thisisundefined
111 \let\linenumber = \empty % Pre-3.0.
112\else
113 \def\linenumber{l.\the\inputlineno:\space}
114\fi
115
116% Set up fixed words for English if not already set.
117\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
118\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
119\ifx\putworderror\undefined \gdef\putworderror{error}\fi
120\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
121\ifx\putwordin\undefined \gdef\putwordin{in}\fi
122\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
123\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
124\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
125\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
126\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
127\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
128\ifx\putwordof\undefined \gdef\putwordof{of}\fi
129\ifx\putwordon\undefined \gdef\putwordon{on}\fi
130\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
131\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
132\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
133\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
134\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
135\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
136\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
137%
138\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
139\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
140\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
141\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
142\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
143\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
144\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
145\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
146\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
147\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
148\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
149\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
150%
151\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
152\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
153\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
154\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
155\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
156
157% Since the category of space is not known, we have to be careful.
158\chardef\spacecat = 10
159\def\spaceisspace{\catcode`\ =\spacecat}
160
161% sometimes characters are active, so we need control sequences.
162\chardef\ampChar = `\&
163\chardef\colonChar = `\:
164\chardef\commaChar = `\,
165\chardef\dashChar = `\-
166\chardef\dotChar = `\.
167\chardef\exclamChar= `\!
168\chardef\hashChar = `\#
169\chardef\lquoteChar= `\`
170\chardef\questChar = `\?
171\chardef\rquoteChar= `\'
172\chardef\semiChar = `\;
173\chardef\slashChar = `\/
174\chardef\underChar = `\_
175
176% Ignore a token.
177%
178\def\gobble#1{}
179
180% The following is used inside several \edef's.
181\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
182
183% Hyphenation fixes.
184\hyphenation{
185 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
186 ap-pen-dix bit-map bit-maps
187 data-base data-bases eshell fall-ing half-way long-est man-u-script
188 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
189 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
190 spell-ing spell-ings
191 stand-alone strong-est time-stamp time-stamps which-ever white-space
192 wide-spread wrap-around
193}
194
195% Margin to add to right of even pages, to left of odd pages.
196\newdimen\bindingoffset
197\newdimen\normaloffset
198\newdimen\pagewidth \newdimen\pageheight
199
200% For a final copy, take out the rectangles
201% that mark overfull boxes (in case you have decided
202% that the text looks ok even though it passes the margin).
203%
204\def\finalout{\overfullrule=0pt }
205
206% Sometimes it is convenient to have everything in the transcript file
207% and nothing on the terminal. We don't just call \tracingall here,
208% since that produces some useless output on the terminal. We also make
209% some effort to order the tracing commands to reduce output in the log
210% file; cf. trace.sty in LaTeX.
211%
212\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
213\def\loggingall{%
214 \tracingstats2
215 \tracingpages1
216 \tracinglostchars2 % 2 gives us more in etex
217 \tracingparagraphs1
218 \tracingoutput1
219 \tracingmacros2
220 \tracingrestores1
221 \showboxbreadth\maxdimen \showboxdepth\maxdimen
222 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
223 \tracingscantokens1
224 \tracingifs1
225 \tracinggroups1
226 \tracingnesting2
227 \tracingassigns1
228 \fi
229 \tracingcommands3 % 3 gives us more in etex
230 \errorcontextlines16
231}%
232
233% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
234% aren't perfect, it's not the end of the world, being an error message,
235% after all.
236%
237\def\errormsg{\begingroup \indexnofonts \doerrormsg}
238\def\doerrormsg#1{\errmessage{#1}}
239
240% add check for \lastpenalty to plain's definitions. If the last thing
241% we did was a \nobreak, we don't want to insert more space.
242%
243\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
244 \removelastskip\penalty-50\smallskip\fi\fi}
245\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
246 \removelastskip\penalty-100\medskip\fi\fi}
247\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
248 \removelastskip\penalty-200\bigskip\fi\fi}
249
250% Do @cropmarks to get crop marks.
251%
252\newif\ifcropmarks
253\let\cropmarks = \cropmarkstrue
254%
255% Dimensions to add cropmarks at corners.
256% Added by P. A. MacKay, 12 Nov. 1986
257%
258\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
259\newdimen\cornerlong \cornerlong=1pc
260\newdimen\cornerthick \cornerthick=.3pt
261\newdimen\topandbottommargin \topandbottommargin=.75in
262
263% Output a mark which sets \thischapter, \thissection and \thiscolor.
264% We dump everything together because we only have one kind of mark.
265% This works because we only use \botmark / \topmark, not \firstmark.
266%
267% A mark contains a subexpression of the \ifcase ... \fi construct.
268% \get*marks macros below extract the needed part using \ifcase.
269%
270% Another complication is to let the user choose whether \thischapter
271% (\thissection) refers to the chapter (section) in effect at the top
272% of a page, or that at the bottom of a page. The solution is
273% described on page 260 of The TeXbook. It involves outputting two
274% marks for the sectioning macros, one before the section break, and
275% one after. I won't pretend I can describe this better than DEK...
276\def\domark{%
277 \toks0=\expandafter{\lastchapterdefs}%
278 \toks2=\expandafter{\lastsectiondefs}%
279 \toks4=\expandafter{\prevchapterdefs}%
280 \toks6=\expandafter{\prevsectiondefs}%
281 \toks8=\expandafter{\lastcolordefs}%
282 \mark{%
283 \the\toks0 \the\toks2
284 \noexpand\or \the\toks4 \the\toks6
285 \noexpand\else \the\toks8
286 }%
287}
288% \topmark doesn't work for the very first chapter (after the title
289% page or the contents), so we use \firstmark there -- this gets us
290% the mark with the chapter defs, unless the user sneaks in, e.g.,
291% @setcolor (or @url, or @link, etc.) between @contents and the very
292% first @chapter.
293\def\gettopheadingmarks{%
294 \ifcase0\topmark\fi
295 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
296}
297\def\getbottomheadingmarks{\ifcase1\botmark\fi}
298\def\getcolormarks{\ifcase2\topmark\fi}
299
300% Avoid "undefined control sequence" errors.
301\def\lastchapterdefs{}
302\def\lastsectiondefs{}
303\def\prevchapterdefs{}
304\def\prevsectiondefs{}
305\def\lastcolordefs{}
306
307% Main output routine.
308\chardef\PAGE = 255
309\output = {\onepageout{\pagecontents\PAGE}}
310
311\newbox\headlinebox
312\newbox\footlinebox
313
314% \onepageout takes a vbox as an argument. Note that \pagecontents
315% does insertions, but you have to call it yourself.
316\def\onepageout#1{%
317 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
318 %
319 \ifodd\pageno \advance\hoffset by \bindingoffset
320 \else \advance\hoffset by -\bindingoffset\fi
321 %
322 % Do this outside of the \shipout so @code etc. will be expanded in
323 % the headline as they should be, not taken literally (outputting ''code).
324 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
325 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
326 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
327 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
328 %
329 {%
330 % Have to do this stuff outside the \shipout because we want it to
331 % take effect in \write's, yet the group defined by the \vbox ends
332 % before the \shipout runs.
333 %
334 \indexdummies % don't expand commands in the output.
335 \normalturnoffactive % \ in index entries must not stay \, e.g., if
336 % the page break happens to be in the middle of an example.
337 % We don't want .vr (or whatever) entries like this:
338 % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
339 % "\acronym" won't work when it's read back in;
340 % it needs to be
341 % {\code {{\tt \backslashcurfont }acronym}
342 \shipout\vbox{%
343 % Do this early so pdf references go to the beginning of the page.
344 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
345 %
346 \ifcropmarks \vbox to \outervsize\bgroup
347 \hsize = \outerhsize
348 \vskip-\topandbottommargin
349 \vtop to0pt{%
350 \line{\ewtop\hfil\ewtop}%
351 \nointerlineskip
352 \line{%
353 \vbox{\moveleft\cornerthick\nstop}%
354 \hfill
355 \vbox{\moveright\cornerthick\nstop}%
356 }%
357 \vss}%
358 \vskip\topandbottommargin
359 \line\bgroup
360 \hfil % center the page within the outer (page) hsize.
361 \ifodd\pageno\hskip\bindingoffset\fi
362 \vbox\bgroup
363 \fi
364 %
365 \unvbox\headlinebox
366 \pagebody{#1}%
367 \ifdim\ht\footlinebox > 0pt
368 % Only leave this space if the footline is nonempty.
369 % (We lessened \vsize for it in \oddfootingyyy.)
370 % The \baselineskip=24pt in plain's \makefootline has no effect.
371 \vskip 24pt
372 \unvbox\footlinebox
373 \fi
374 %
375 \ifcropmarks
376 \egroup % end of \vbox\bgroup
377 \hfil\egroup % end of (centering) \line\bgroup
378 \vskip\topandbottommargin plus1fill minus1fill
379 \boxmaxdepth = \cornerthick
380 \vbox to0pt{\vss
381 \line{%
382 \vbox{\moveleft\cornerthick\nsbot}%
383 \hfill
384 \vbox{\moveright\cornerthick\nsbot}%
385 }%
386 \nointerlineskip
387 \line{\ewbot\hfil\ewbot}%
388 }%
389 \egroup % \vbox from first cropmarks clause
390 \fi
391 }% end of \shipout\vbox
392 }% end of group with \indexdummies
393 \advancepageno
394 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
395}
396
397\newinsert\margin \dimen\margin=\maxdimen
398
399\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
400{\catcode`\@ =11
401\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
402% marginal hacks, juha@viisa.uucp (Juha Takala)
403\ifvoid\margin\else % marginal info is present
404 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
405\dimen@=\dp#1\relax \unvbox#1\relax
406\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
407\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
408}
409
410% Here are the rules for the cropmarks. Note that they are
411% offset so that the space between them is truly \outerhsize or \outervsize
412% (P. A. MacKay, 12 November, 1986)
413%
414\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
415\def\nstop{\vbox
416 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
417\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
418\def\nsbot{\vbox
419 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
420
421% Parse an argument, then pass it to #1. The argument is the rest of
422% the input line (except we remove a trailing comment). #1 should be a
423% macro which expects an ordinary undelimited TeX argument.
424%
425\def\parsearg{\parseargusing{}}
426\def\parseargusing#1#2{%
427 \def\argtorun{#2}%
428 \begingroup
429 \obeylines
430 \spaceisspace
431 #1%
432 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
433}
434
435{\obeylines %
436 \gdef\parseargline#1^^M{%
437 \endgroup % End of the group started in \parsearg.
438 \argremovecomment #1\comment\ArgTerm%
439 }%
440}
441
442% First remove any @comment, then any @c comment.
443\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
444\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
445
446% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
447%
448% \argremovec might leave us with trailing space, e.g.,
449% @end itemize @c foo
450% This space token undergoes the same procedure and is eventually removed
451% by \finishparsearg.
452%
453\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
454\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
455\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
456 \def\temp{#3}%
457 \ifx\temp\empty
458 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
459 \let\temp\finishparsearg
460 \else
461 \let\temp\argcheckspaces
462 \fi
463 % Put the space token in:
464 \temp#1 #3\ArgTerm
465}
466
467% If a _delimited_ argument is enclosed in braces, they get stripped; so
468% to get _exactly_ the rest of the line, we had to prevent such situation.
469% We prepended an \empty token at the very beginning and we expand it now,
470% just before passing the control to \argtorun.
471% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
472% either the null string, or it ends with \^^M---thus there is no danger
473% that a pair of braces would be stripped.
474%
475% But first, we have to remove the trailing space token.
476%
477\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
478
479% \parseargdef\foo{...}
480% is roughly equivalent to
481% \def\foo{\parsearg\Xfoo}
482% \def\Xfoo#1{...}
483%
484% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
485% favourite TeX trick. --kasal, 16nov03
486
487\def\parseargdef#1{%
488 \expandafter \doparseargdef \csname\string#1\endcsname #1%
489}
490\def\doparseargdef#1#2{%
491 \def#2{\parsearg#1}%
492 \def#1##1%
493}
494
495% Several utility definitions with active space:
496{
497 \obeyspaces
498 \gdef\obeyedspace{ }
499
500 % Make each space character in the input produce a normal interword
501 % space in the output. Don't allow a line break at this space, as this
502 % is used only in environments like @example, where each line of input
503 % should produce a line of output anyway.
504 %
505 \gdef\sepspaces{\obeyspaces\let =\tie}
506
507 % If an index command is used in an @example environment, any spaces
508 % therein should become regular spaces in the raw index file, not the
509 % expansion of \tie (\leavevmode \penalty \@M \ ).
510 \gdef\unsepspaces{\let =\space}
511}
512
513
514\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
515
516% Define the framework for environments in texinfo.tex. It's used like this:
517%
518% \envdef\foo{...}
519% \def\Efoo{...}
520%
521% It's the responsibility of \envdef to insert \begingroup before the
522% actual body; @end closes the group after calling \Efoo. \envdef also
523% defines \thisenv, so the current environment is known; @end checks
524% whether the environment name matches. The \checkenv macro can also be
525% used to check whether the current environment is the one expected.
526%
527% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
528% are not treated as environments; they don't open a group. (The
529% implementation of @end takes care not to call \endgroup in this
530% special case.)
531
532
533% At run-time, environments start with this:
534\def\startenvironment#1{\begingroup\def\thisenv{#1}}
535% initialize
536\let\thisenv\empty
537
538% ... but they get defined via ``\envdef\foo{...}'':
539\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
540\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
541
542% Check whether we're in the right environment:
543\def\checkenv#1{%
544 \def\temp{#1}%
545 \ifx\thisenv\temp
546 \else
547 \badenverr
548 \fi
549}
550
551% Environment mismatch, #1 expected:
552\def\badenverr{%
553 \errhelp = \EMsimple
554 \errmessage{This command can appear only \inenvironment\temp,
555 not \inenvironment\thisenv}%
556}
557\def\inenvironment#1{%
558 \ifx#1\empty
559 outside of any environment%
560 \else
561 in environment \expandafter\string#1%
562 \fi
563}
564
565% @end foo executes the definition of \Efoo.
566% But first, it executes a specialized version of \checkenv
567%
568\parseargdef\end{%
569 \if 1\csname iscond.#1\endcsname
570 \else
571 % The general wording of \badenverr may not be ideal.
572 \expandafter\checkenv\csname#1\endcsname
573 \csname E#1\endcsname
574 \endgroup
575 \fi
576}
577
578\newhelp\EMsimple{Press RETURN to continue.}
579
580
581% Be sure we're in horizontal mode when doing a tie, since we make space
582% equivalent to this in @example-like environments. Otherwise, a space
583% at the beginning of a line will start with \penalty -- and
584% since \penalty is valid in vertical mode, we'd end up putting the
585% penalty on the vertical list instead of in the new paragraph.
586{\catcode`@ = 11
587 % Avoid using \@M directly, because that causes trouble
588 % if the definition is written into an index file.
589 \global\let\tiepenalty = \@M
590 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
591}
592
593% @: forces normal size whitespace following.
594\def\:{\spacefactor=1000 }
595
596% @* forces a line break.
597\def\*{\hfil\break\hbox{}\ignorespaces}
598
599% @/ allows a line break.
600\let\/=\allowbreak
601
602% @. is an end-of-sentence period.
603\def\.{.\spacefactor=\endofsentencespacefactor\space}
604
605% @! is an end-of-sentence bang.
606\def\!{!\spacefactor=\endofsentencespacefactor\space}
607
608% @? is an end-of-sentence query.
609\def\?{?\spacefactor=\endofsentencespacefactor\space}
610
611% @frenchspacing on|off says whether to put extra space after punctuation.
612%
613\def\onword{on}
614\def\offword{off}
615%
616\parseargdef\frenchspacing{%
617 \def\temp{#1}%
618 \ifx\temp\onword \plainfrenchspacing
619 \else\ifx\temp\offword \plainnonfrenchspacing
620 \else
621 \errhelp = \EMsimple
622 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
623 \fi\fi
624}
625
626% @w prevents a word break. Without the \leavevmode, @w at the
627% beginning of a paragraph, when TeX is still in vertical mode, would
628% produce a whole line of output instead of starting the paragraph.
629\def\w#1{\leavevmode\hbox{#1}}
630
631% @group ... @end group forces ... to be all on one page, by enclosing
632% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
633% to keep its height that of a normal line. According to the rules for
634% \topskip (p.114 of the TeXbook), the glue inserted is
635% max (\topskip - \ht (first item), 0). If that height is large,
636% therefore, no glue is inserted, and the space between the headline and
637% the text is small, which looks bad.
638%
639% Another complication is that the group might be very large. This can
640% cause the glue on the previous page to be unduly stretched, because it
641% does not have much material. In this case, it's better to add an
642% explicit \vfill so that the extra space is at the bottom. The
643% threshold for doing this is if the group is more than \vfilllimit
644% percent of a page (\vfilllimit can be changed inside of @tex).
645%
646\newbox\groupbox
647\def\vfilllimit{0.7}
648%
649\envdef\group{%
650 \ifnum\catcode`\^^M=\active \else
651 \errhelp = \groupinvalidhelp
652 \errmessage{@group invalid in context where filling is enabled}%
653 \fi
654 \startsavinginserts
655 %
656 \setbox\groupbox = \vtop\bgroup
657 % Do @comment since we are called inside an environment such as
658 % @example, where each end-of-line in the input causes an
659 % end-of-line in the output. We don't want the end-of-line after
660 % the `@group' to put extra space in the output. Since @group
661 % should appear on a line by itself (according to the Texinfo
662 % manual), we don't worry about eating any user text.
663 \comment
664}
665%
666% The \vtop produces a box with normal height and large depth; thus, TeX puts
667% \baselineskip glue before it, and (when the next line of text is done)
668% \lineskip glue after it. Thus, space below is not quite equal to space
669% above. But it's pretty close.
670\def\Egroup{%
671 % To get correct interline space between the last line of the group
672 % and the first line afterwards, we have to propagate \prevdepth.
673 \endgraf % Not \par, as it may have been set to \lisppar.
674 \global\dimen1 = \prevdepth
675 \egroup % End the \vtop.
676 % \dimen0 is the vertical size of the group's box.
677 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
678 % \dimen2 is how much space is left on the page (more or less).
679 \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
680 % if the group doesn't fit on the current page, and it's a big big
681 % group, force a page break.
682 \ifdim \dimen0 > \dimen2
683 \ifdim \pagetotal < \vfilllimit\pageheight
684 \page
685 \fi
686 \fi
687 \box\groupbox
688 \prevdepth = \dimen1
689 \checkinserts
690}
691%
692% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
693% message, so this ends up printing `@group can only ...'.
694%
695\newhelp\groupinvalidhelp{%
696group can only be used in environments such as @example,^^J%
697where each line of input produces a line of output.}
698
699% @need space-in-mils
700% forces a page break if there is not space-in-mils remaining.
701
702\newdimen\mil \mil=0.001in
703
704\parseargdef\need{%
705 % Ensure vertical mode, so we don't make a big box in the middle of a
706 % paragraph.
707 \par
708 %
709 % If the @need value is less than one line space, it's useless.
710 \dimen0 = #1\mil
711 \dimen2 = \ht\strutbox
712 \advance\dimen2 by \dp\strutbox
713 \ifdim\dimen0 > \dimen2
714 %
715 % Do a \strut just to make the height of this box be normal, so the
716 % normal leading is inserted relative to the preceding line.
717 % And a page break here is fine.
718 \vtop to #1\mil{\strut\vfil}%
719 %
720 % TeX does not even consider page breaks if a penalty added to the
721 % main vertical list is 10000 or more. But in order to see if the
722 % empty box we just added fits on the page, we must make it consider
723 % page breaks. On the other hand, we don't want to actually break the
724 % page after the empty box. So we use a penalty of 9999.
725 %
726 % There is an extremely small chance that TeX will actually break the
727 % page at this \penalty, if there are no other feasible breakpoints in
728 % sight. (If the user is using lots of big @group commands, which
729 % almost-but-not-quite fill up a page, TeX will have a hard time doing
730 % good page breaking, for example.) However, I could not construct an
731 % example where a page broke at this \penalty; if it happens in a real
732 % document, then we can reconsider our strategy.
733 \penalty9999
734 %
735 % Back up by the size of the box, whether we did a page break or not.
736 \kern -#1\mil
737 %
738 % Do not allow a page break right after this kern.
739 \nobreak
740 \fi
741}
742
743% @br forces paragraph break (and is undocumented).
744
745\let\br = \par
746
747% @page forces the start of a new page.
748%
749\def\page{\par\vfill\supereject}
750
751% @exdent text....
752% outputs text on separate line in roman font, starting at standard page margin
753
754% This records the amount of indent in the innermost environment.
755% That's how much \exdent should take out.
756\newskip\exdentamount
757
758% This defn is used inside fill environments such as @defun.
759\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
760
761% This defn is used inside nofill environments such as @example.
762\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
763 \leftline{\hskip\leftskip{\rm#1}}}}
764
765% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
766% paragraph. For more general purposes, use the \margin insertion
767% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
768%
769\newskip\inmarginspacing \inmarginspacing=1cm
770\def\strutdepth{\dp\strutbox}
771%
772\def\doinmargin#1#2{\strut\vadjust{%
773 \nobreak
774 \kern-\strutdepth
775 \vtop to \strutdepth{%
776 \baselineskip=\strutdepth
777 \vss
778 % if you have multiple lines of stuff to put here, you'll need to
779 % make the vbox yourself of the appropriate size.
780 \ifx#1l%
781 \llap{\ignorespaces #2\hskip\inmarginspacing}%
782 \else
783 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
784 \fi
785 \null
786 }%
787}}
788\def\inleftmargin{\doinmargin l}
789\def\inrightmargin{\doinmargin r}
790%
791% @inmargin{TEXT [, RIGHT-TEXT]}
792% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
793% else use TEXT for both).
794%
795\def\inmargin#1{\parseinmargin #1,,\finish}
796\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
797 \setbox0 = \hbox{\ignorespaces #2}%
798 \ifdim\wd0 > 0pt
799 \def\lefttext{#1}% have both texts
800 \def\righttext{#2}%
801 \else
802 \def\lefttext{#1}% have only one text
803 \def\righttext{#1}%
804 \fi
805 %
806 \ifodd\pageno
807 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
808 \else
809 \def\temp{\inleftmargin\lefttext}%
810 \fi
811 \temp
812}
813
814% @| inserts a changebar to the left of the current line. It should
815% surround any changed text. This approach does *not* work if the
816% change spans more than two lines of output. To handle that, we would
817% have adopt a much more difficult approach (putting marks into the main
818% vertical list for the beginning and end of each change). This command
819% is not documented, not supported, and doesn't work.
820%
821\def\|{%
822 % \vadjust can only be used in horizontal mode.
823 \leavevmode
824 %
825 % Append this vertical mode material after the current line in the output.
826 \vadjust{%
827 % We want to insert a rule with the height and depth of the current
828 % leading; that is exactly what \strutbox is supposed to record.
829 \vskip-\baselineskip
830 %
831 % \vadjust-items are inserted at the left edge of the type. So
832 % the \llap here moves out into the left-hand margin.
833 \llap{%
834 %
835 % For a thicker or thinner bar, change the `1pt'.
836 \vrule height\baselineskip width1pt
837 %
838 % This is the space between the bar and the text.
839 \hskip 12pt
840 }%
841 }%
842}
843
844% @include FILE -- \input text of FILE.
845%
846\def\include{\parseargusing\filenamecatcodes\includezzz}
847\def\includezzz#1{%
848 \pushthisfilestack
849 \def\thisfile{#1}%
850 {%
851 \makevalueexpandable % we want to expand any @value in FILE.
852 \turnoffactive % and allow special characters in the expansion
853 \indexnofonts % Allow `@@' and other weird things in file names.
854 \wlog{texinfo.tex: doing @include of #1^^J}%
855 \edef\temp{\noexpand\input #1 }%
856 %
857 % This trickery is to read FILE outside of a group, in case it makes
858 % definitions, etc.
859 \expandafter
860 }\temp
861 \popthisfilestack
862}
863\def\filenamecatcodes{%
864 \catcode`\\=\other
865 \catcode`~=\other
866 \catcode`^=\other
867 \catcode`_=\other
868 \catcode`|=\other
869 \catcode`<=\other
870 \catcode`>=\other
871 \catcode`+=\other
872 \catcode`-=\other
873 \catcode`\`=\other
874 \catcode`\'=\other
875}
876
877\def\pushthisfilestack{%
878 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
879}
880\def\pushthisfilestackX{%
881 \expandafter\pushthisfilestackY\thisfile\StackTerm
882}
883\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
884 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
885}
886
887\def\popthisfilestack{\errthisfilestackempty}
888\def\errthisfilestackempty{\errmessage{Internal error:
889 the stack of filenames is empty.}}
890
891\def\thisfile{}
892
893% @center line
894% outputs that line, centered.
895%
896\parseargdef\center{%
897 \ifhmode
898 \let\next\centerH
899 \else
900 \let\next\centerV
901 \fi
902 \next{\hfil \ignorespaces#1\unskip \hfil}%
903}
904\def\centerH#1{%
905 {%
906 \hfil\break
907 \advance\hsize by -\leftskip
908 \advance\hsize by -\rightskip
909 \line{#1}%
910 \break
911 }%
912}
913\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
914
915% @sp n outputs n lines of vertical space
916
917\parseargdef\sp{\vskip #1\baselineskip}
918
919% @comment ...line which is ignored...
920% @c is the same as @comment
921% @ignore ... @end ignore is another way to write a comment
922
923\def\comment{\begingroup \catcode`\^^M=\other%
924\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
925\commentxxx}
926{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
927
928\let\c=\comment
929
930% @paragraphindent NCHARS
931% We'll use ems for NCHARS, close enough.
932% NCHARS can also be the word `asis' or `none'.
933% We cannot feasibly implement @paragraphindent asis, though.
934%
935\def\asisword{asis} % no translation, these are keywords
936\def\noneword{none}
937%
938\parseargdef\paragraphindent{%
939 \def\temp{#1}%
940 \ifx\temp\asisword
941 \else
942 \ifx\temp\noneword
943 \defaultparindent = 0pt
944 \else
945 \defaultparindent = #1em
946 \fi
947 \fi
948 \parindent = \defaultparindent
949}
950
951% @exampleindent NCHARS
952% We'll use ems for NCHARS like @paragraphindent.
953% It seems @exampleindent asis isn't necessary, but
954% I preserve it to make it similar to @paragraphindent.
955\parseargdef\exampleindent{%
956 \def\temp{#1}%
957 \ifx\temp\asisword
958 \else
959 \ifx\temp\noneword
960 \lispnarrowing = 0pt
961 \else
962 \lispnarrowing = #1em
963 \fi
964 \fi
965}
966
967% @firstparagraphindent WORD
968% If WORD is `none', then suppress indentation of the first paragraph
969% after a section heading. If WORD is `insert', then do indent at such
970% paragraphs.
971%
972% The paragraph indentation is suppressed or not by calling
973% \suppressfirstparagraphindent, which the sectioning commands do.
974% We switch the definition of this back and forth according to WORD.
975% By default, we suppress indentation.
976%
977\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
978\def\insertword{insert}
979%
980\parseargdef\firstparagraphindent{%
981 \def\temp{#1}%
982 \ifx\temp\noneword
983 \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
984 \else\ifx\temp\insertword
985 \let\suppressfirstparagraphindent = \relax
986 \else
987 \errhelp = \EMsimple
988 \errmessage{Unknown @firstparagraphindent option `\temp'}%
989 \fi\fi
990}
991
992% Here is how we actually suppress indentation. Redefine \everypar to
993% \kern backwards by \parindent, and then reset itself to empty.
994%
995% We also make \indent itself not actually do anything until the next
996% paragraph.
997%
998\gdef\dosuppressfirstparagraphindent{%
999 \gdef\indent{%
1000 \restorefirstparagraphindent
1001 \indent
1002 }%
1003 \gdef\noindent{%
1004 \restorefirstparagraphindent
1005 \noindent
1006 }%
1007 \global\everypar = {%
1008 \kern -\parindent
1009 \restorefirstparagraphindent
1010 }%
1011}
1012
1013\gdef\restorefirstparagraphindent{%
1014 \global \let \indent = \ptexindent
1015 \global \let \noindent = \ptexnoindent
1016 \global \everypar = {}%
1017}
1018
1019
1020% @refill is a no-op.
1021\let\refill=\relax
1022
1023% If working on a large document in chapters, it is convenient to
1024% be able to disable indexing, cross-referencing, and contents, for test runs.
1025% This is done with @novalidate (before @setfilename).
1026%
1027\newif\iflinks \linkstrue % by default we want the aux files.
1028\let\novalidate = \linksfalse
1029
1030% @setfilename is done at the beginning of every texinfo file.
1031% So open here the files we need to have open while reading the input.
1032% This makes it possible to make a .fmt file for texinfo.
1033\def\setfilename{%
1034 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1035 \iflinks
1036 \tryauxfile
1037 % Open the new aux file. TeX will close it automatically at exit.
1038 \immediate\openout\auxfile=\jobname.aux
1039 \fi % \openindices needs to do some work in any case.
1040 \openindices
1041 \let\setfilename=\comment % Ignore extra @setfilename cmds.
1042 %
1043 % If texinfo.cnf is present on the system, read it.
1044 % Useful for site-wide @afourpaper, etc.
1045 \openin 1 texinfo.cnf
1046 \ifeof 1 \else \input texinfo.cnf \fi
1047 \closein 1
1048 %
1049 \comment % Ignore the actual filename.
1050}
1051
1052% Called from \setfilename.
1053%
1054\def\openindices{%
1055 \newindex{cp}%
1056 \newcodeindex{fn}%
1057 \newcodeindex{vr}%
1058 \newcodeindex{tp}%
1059 \newcodeindex{ky}%
1060 \newcodeindex{pg}%
1061}
1062
1063% @bye.
1064\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1065
1066
1067\message{pdf,}
1068% adobe `portable' document format
1069\newcount\tempnum
1070\newcount\lnkcount
1071\newtoks\filename
1072\newcount\filenamelength
1073\newcount\pgn
1074\newtoks\toksA
1075\newtoks\toksB
1076\newtoks\toksC
1077\newtoks\toksD
1078\newbox\boxA
1079\newcount\countA
1080\newif\ifpdf
1081\newif\ifpdfmakepagedest
1082
1083% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1084% can be set). So we test for \relax and 0 as well as being undefined.
1085\ifx\pdfoutput\thisisundefined
1086\else
1087 \ifx\pdfoutput\relax
1088 \else
1089 \ifcase\pdfoutput
1090 \else
1091 \pdftrue
1092 \fi
1093 \fi
1094\fi
1095
1096% PDF uses PostScript string constants for the names of xref targets,
1097% for display in the outlines, and in other places. Thus, we have to
1098% double any backslashes. Otherwise, a name like "\node" will be
1099% interpreted as a newline (\n), followed by o, d, e. Not good.
1100%
1101% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1102% related messages. The final outcome is that it is up to the TeX user
1103% to double the backslashes and otherwise make the string valid, so
1104% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1105% do this reliably, so we use it.
1106
1107% #1 is a control sequence in which to do the replacements,
1108% which we \xdef.
1109\def\txiescapepdf#1{%
1110 \ifx\pdfescapestring\relax
1111 % No primitive available; should we give a warning or log?
1112 % Many times it won't matter.
1113 \else
1114 % The expandable \pdfescapestring primitive escapes parentheses,
1115 % backslashes, and other special chars.
1116 \xdef#1{\pdfescapestring{#1}}%
1117 \fi
1118}
1119
1120\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1121with PDF output, and none of those formats could be found. (.eps cannot
1122be supported due to the design of the PDF format; use regular TeX (DVI
1123output) for that.)}
1124
1125\ifpdf
1126 %
1127 % Color manipulation macros based on pdfcolor.tex,
1128 % except using rgb instead of cmyk; the latter is said to render as a
1129 % very dark gray on-screen and a very dark halftone in print, instead
1130 % of actual black.
1131 \def\rgbDarkRed{0.50 0.09 0.12}
1132 \def\rgbBlack{0 0 0}
1133 %
1134 % k sets the color for filling (usual text, etc.);
1135 % K sets the color for stroking (thin rules, e.g., normal _'s).
1136 \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
1137 %
1138 % Set color, and create a mark which defines \thiscolor accordingly,
1139 % so that \makeheadline knows which color to restore.
1140 \def\setcolor#1{%
1141 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1142 \domark
1143 \pdfsetcolor{#1}%
1144 }
1145 %
1146 \def\maincolor{\rgbBlack}
1147 \pdfsetcolor{\maincolor}
1148 \edef\thiscolor{\maincolor}
1149 \def\lastcolordefs{}
1150 %
1151 \def\makefootline{%
1152 \baselineskip24pt
1153 \line{\pdfsetcolor{\maincolor}\the\footline}%
1154 }
1155 %
1156 \def\makeheadline{%
1157 \vbox to 0pt{%
1158 \vskip-22.5pt
1159 \line{%
1160 \vbox to8.5pt{}%
1161 % Extract \thiscolor definition from the marks.
1162 \getcolormarks
1163 % Typeset the headline with \maincolor, then restore the color.
1164 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1165 }%
1166 \vss
1167 }%
1168 \nointerlineskip
1169 }
1170 %
1171 %
1172 \pdfcatalog{/PageMode /UseOutlines}
1173 %
1174 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1175 \def\dopdfimage#1#2#3{%
1176 \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1177 \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1178 %
1179 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1180 % others). Let's try in that order, PDF first since if
1181 % someone has a scalable image, presumably better to use that than a
1182 % bitmap.
1183 \let\pdfimgext=\empty
1184 \begingroup
1185 \openin 1 #1.pdf \ifeof 1
1186 \openin 1 #1.PDF \ifeof 1
1187 \openin 1 #1.png \ifeof 1
1188 \openin 1 #1.jpg \ifeof 1
1189 \openin 1 #1.jpeg \ifeof 1
1190 \openin 1 #1.JPG \ifeof 1
1191 \errhelp = \nopdfimagehelp
1192 \errmessage{Could not find image file #1 for pdf}%
1193 \else \gdef\pdfimgext{JPG}%
1194 \fi
1195 \else \gdef\pdfimgext{jpeg}%
1196 \fi
1197 \else \gdef\pdfimgext{jpg}%
1198 \fi
1199 \else \gdef\pdfimgext{png}%
1200 \fi
1201 \else \gdef\pdfimgext{PDF}%
1202 \fi
1203 \else \gdef\pdfimgext{pdf}%
1204 \fi
1205 \closein 1
1206 \endgroup
1207 %
1208 % without \immediate, ancient pdftex seg faults when the same image is
1209 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1210 \ifnum\pdftexversion < 14
1211 \immediate\pdfimage
1212 \else
1213 \immediate\pdfximage
1214 \fi
1215 \ifdim \wd0 >0pt width \imagewidth \fi
1216 \ifdim \wd2 >0pt height \imageheight \fi
1217 \ifnum\pdftexversion<13
1218 #1.\pdfimgext
1219 \else
1220 {#1.\pdfimgext}%
1221 \fi
1222 \ifnum\pdftexversion < 14 \else
1223 \pdfrefximage \pdflastximage
1224 \fi}
1225 %
1226 \def\pdfmkdest#1{{%
1227 % We have to set dummies so commands such as @code, and characters
1228 % such as \, aren't expanded when present in a section title.
1229 \indexnofonts
1230 \turnoffactive
1231 \makevalueexpandable
1232 \def\pdfdestname{#1}%
1233 \txiescapepdf\pdfdestname
1234 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1235 }}
1236 %
1237 % used to mark target names; must be expandable.
1238 \def\pdfmkpgn#1{#1}
1239 %
1240 % by default, use a color that is dark enough to print on paper as
1241 % nearly black, but still distinguishable for online viewing.
1242 \def\urlcolor{\rgbDarkRed}
1243 \def\linkcolor{\rgbDarkRed}
1244 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1245 %
1246 % Adding outlines to PDF; macros for calculating structure of outlines
1247 % come from Petr Olsak
1248 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1249 \else \csname#1\endcsname \fi}
1250 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
1251 \advance\tempnum by 1
1252 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1253 %
1254 % #1 is the section text, which is what will be displayed in the
1255 % outline by the pdf viewer. #2 is the pdf expression for the number
1256 % of subentries (or empty, for subsubsections). #3 is the node text,
1257 % which might be empty if this toc entry had no corresponding node.
1258 % #4 is the page number
1259 %
1260 \def\dopdfoutline#1#2#3#4{%
1261 % Generate a link to the node text if that exists; else, use the
1262 % page number. We could generate a destination for the section
1263 % text in the case where a section has no node, but it doesn't
1264 % seem worth the trouble, since most documents are normally structured.
1265 \edef\pdfoutlinedest{#3}%
1266 \ifx\pdfoutlinedest\empty
1267 \def\pdfoutlinedest{#4}%
1268 \else
1269 \txiescapepdf\pdfoutlinedest
1270 \fi
1271 %
1272 % Also escape PDF chars in the display string.
1273 \edef\pdfoutlinetext{#1}%
1274 \txiescapepdf\pdfoutlinetext
1275 %
1276 \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1277 }
1278 %
1279 \def\pdfmakeoutlines{%
1280 \begingroup
1281 % Read toc silently, to get counts of subentries for \pdfoutline.
1282 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1283 \def\numchapentry##1##2##3##4{%
1284 \def\thischapnum{##2}%
1285 \def\thissecnum{0}%
1286 \def\thissubsecnum{0}%
1287 }%
1288 \def\numsecentry##1##2##3##4{%
1289 \advancenumber{chap\thischapnum}%
1290 \def\thissecnum{##2}%
1291 \def\thissubsecnum{0}%
1292 }%
1293 \def\numsubsecentry##1##2##3##4{%
1294 \advancenumber{sec\thissecnum}%
1295 \def\thissubsecnum{##2}%
1296 }%
1297 \def\numsubsubsecentry##1##2##3##4{%
1298 \advancenumber{subsec\thissubsecnum}%
1299 }%
1300 \def\thischapnum{0}%
1301 \def\thissecnum{0}%
1302 \def\thissubsecnum{0}%
1303 %
1304 % use \def rather than \let here because we redefine \chapentry et
1305 % al. a second time, below.
1306 \def\appentry{\numchapentry}%
1307 \def\appsecentry{\numsecentry}%
1308 \def\appsubsecentry{\numsubsecentry}%
1309 \def\appsubsubsecentry{\numsubsubsecentry}%
1310 \def\unnchapentry{\numchapentry}%
1311 \def\unnsecentry{\numsecentry}%
1312 \def\unnsubsecentry{\numsubsecentry}%
1313 \def\unnsubsubsecentry{\numsubsubsecentry}%
1314 \readdatafile{toc}%
1315 %
1316 % Read toc second time, this time actually producing the outlines.
1317 % The `-' means take the \expnumber as the absolute number of
1318 % subentries, which we calculated on our first read of the .toc above.
1319 %
1320 % We use the node names as the destinations.
1321 \def\numchapentry##1##2##3##4{%
1322 \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1323 \def\numsecentry##1##2##3##4{%
1324 \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
1325 \def\numsubsecentry##1##2##3##4{%
1326 \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
1327 \def\numsubsubsecentry##1##2##3##4{% count is always zero
1328 \dopdfoutline{##1}{}{##3}{##4}}%
1329 %
1330 % PDF outlines are displayed using system fonts, instead of
1331 % document fonts. Therefore we cannot use special characters,
1332 % since the encoding is unknown. For example, the eogonek from
1333 % Latin 2 (0xea) gets translated to a | character. Info from
1334 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1335 %
1336 % TODO this right, we have to translate 8-bit characters to
1337 % their "best" equivalent, based on the @documentencoding. Too
1338 % much work for too little return. Just use the ASCII equivalents
1339 % we use for the index sort strings.
1340 %
1341 \indexnofonts
1342 \setupdatafile
1343 % We can have normal brace characters in the PDF outlines, unlike
1344 % Texinfo index files. So set that up.
1345 \def\{{\lbracecharliteral}%
1346 \def\}{\rbracecharliteral}%
1347 \catcode`\\=\active \otherbackslash
1348 \input \tocreadfilename
1349 \endgroup
1350 }
1351 {\catcode`[=1 \catcode`]=2
1352 \catcode`{=\other \catcode`}=\other
1353 \gdef\lbracecharliteral[{]%
1354 \gdef\rbracecharliteral[}]%
1355 ]
1356 %
1357 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1358 \ifx\PP\D\let\nextsp\relax
1359 \else\let\nextsp\skipspaces
1360 \ifx\p\space\else\addtokens{\filename}{\PP}%
1361 \advance\filenamelength by 1
1362 \fi
1363 \fi
1364 \nextsp}
1365 \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
1366 \ifnum\pdftexversion < 14
1367 \let \startlink \pdfannotlink
1368 \else
1369 \let \startlink \pdfstartlink
1370 \fi
1371 % make a live url in pdf output.
1372 \def\pdfurl#1{%
1373 \begingroup
1374 % it seems we really need yet another set of dummies; have not
1375 % tried to figure out what each command should do in the context
1376 % of @url. for now, just make @/ a no-op, that's the only one
1377 % people have actually reported a problem with.
1378 %
1379 \normalturnoffactive
1380 \def\@{@}%
1381 \let\/=\empty
1382 \makevalueexpandable
1383 % do we want to go so far as to use \indexnofonts instead of just
1384 % special-casing \var here?
1385 \def\var##1{##1}%
1386 %
1387 \leavevmode\setcolor{\urlcolor}%
1388 \startlink attr{/Border [0 0 0]}%
1389 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1390 \endgroup}
1391 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1392 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1393 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1394 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1395 \def\maketoks{%
1396 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1397 \ifx\first0\adn0
1398 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1399 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1400 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1401 \else
1402 \ifnum0=\countA\else\makelink\fi
1403 \ifx\first.\let\next=\done\else
1404 \let\next=\maketoks
1405 \addtokens{\toksB}{\the\toksD}
1406 \ifx\first,\addtokens{\toksB}{\space}\fi
1407 \fi
1408 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1409 \next}
1410 \def\makelink{\addtokens{\toksB}%
1411 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1412 \def\pdflink#1{%
1413 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1414 \setcolor{\linkcolor}#1\endlink}
1415 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1416\else
1417 % non-pdf mode
1418 \let\pdfmkdest = \gobble
1419 \let\pdfurl = \gobble
1420 \let\endlink = \relax
1421 \let\setcolor = \gobble
1422 \let\pdfsetcolor = \gobble
1423 \let\pdfmakeoutlines = \relax
1424\fi % \ifx\pdfoutput
1425
1426
1427\message{fonts,}
1428
1429% Change the current font style to #1, remembering it in \curfontstyle.
1430% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
1431% italics, not bold italics.
1432%
1433\def\setfontstyle#1{%
1434 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
1435 \csname ten#1\endcsname % change the current font
1436}
1437
1438% Select #1 fonts with the current style.
1439%
1440\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
1441
1442\def\rm{\fam=0 \setfontstyle{rm}}
1443\def\it{\fam=\itfam \setfontstyle{it}}
1444\def\sl{\fam=\slfam \setfontstyle{sl}}
1445\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
1446\def\tt{\fam=\ttfam \setfontstyle{tt}}
1447
1448% Unfortunately, we have to override this for titles and the like, since
1449% in those cases "rm" is bold. Sigh.
1450\def\rmisbold{\rm\def\curfontstyle{bf}}
1451
1452% Texinfo sort of supports the sans serif font style, which plain TeX does not.
1453% So we set up a \sf.
1454\newfam\sffam
1455\def\sf{\fam=\sffam \setfontstyle{sf}}
1456\let\li = \sf % Sometimes we call it \li, not \sf.
1457
1458% We don't need math for this font style.
1459\def\ttsl{\setfontstyle{ttsl}}
1460
1461
1462% Default leading.
1463\newdimen\textleading \textleading = 13.2pt
1464
1465% Set the baselineskip to #1, and the lineskip and strut size
1466% correspondingly. There is no deep meaning behind these magic numbers
1467% used as factors; they just match (closely enough) what Knuth defined.
1468%
1469\def\lineskipfactor{.08333}
1470\def\strutheightpercent{.70833}
1471\def\strutdepthpercent {.29167}
1472%
1473% can get a sort of poor man's double spacing by redefining this.
1474\def\baselinefactor{1}
1475%
1476\def\setleading#1{%
1477 \dimen0 = #1\relax
1478 \normalbaselineskip = \baselinefactor\dimen0
1479 \normallineskip = \lineskipfactor\normalbaselineskip
1480 \normalbaselines
1481 \setbox\strutbox =\hbox{%
1482 \vrule width0pt height\strutheightpercent\baselineskip
1483 depth \strutdepthpercent \baselineskip
1484 }%
1485}
1486
1487% PDF CMaps. See also LaTeX's t1.cmap.
1488%
1489% do nothing with this by default.
1490\expandafter\let\csname cmapOT1\endcsname\gobble
1491\expandafter\let\csname cmapOT1IT\endcsname\gobble
1492\expandafter\let\csname cmapOT1TT\endcsname\gobble
1493
1494% if we are producing pdf, and we have \pdffontattr, then define cmaps.
1495% (\pdffontattr was introduced many years ago, but people still run
1496% older pdftex's; it's easy to conditionalize, so we do.)
1497\ifpdf \ifx\pdffontattr\thisisundefined \else
1498 \begingroup
1499 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1500 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1501%%DocumentNeededResources: ProcSet (CIDInit)
1502%%IncludeResource: ProcSet (CIDInit)
1503%%BeginResource: CMap (TeX-OT1-0)
1504%%Title: (TeX-OT1-0 TeX OT1 0)
1505%%Version: 1.000
1506%%EndComments
1507/CIDInit /ProcSet findresource begin
150812 dict begin
1509begincmap
1510/CIDSystemInfo
1511<< /Registry (TeX)
1512/Ordering (OT1)
1513/Supplement 0
1514>> def
1515/CMapName /TeX-OT1-0 def
1516/CMapType 2 def
15171 begincodespacerange
1518<00> <7F>
1519endcodespacerange
15208 beginbfrange
1521<00> <01> <0393>
1522<09> <0A> <03A8>
1523<23> <26> <0023>
1524<28> <3B> <0028>
1525<3F> <5B> <003F>
1526<5D> <5E> <005D>
1527<61> <7A> <0061>
1528<7B> <7C> <2013>
1529endbfrange
153040 beginbfchar
1531<02> <0398>
1532<03> <039B>
1533<04> <039E>
1534<05> <03A0>
1535<06> <03A3>
1536<07> <03D2>
1537<08> <03A6>
1538<0B> <00660066>
1539<0C> <00660069>
1540<0D> <0066006C>
1541<0E> <006600660069>
1542<0F> <00660066006C>
1543<10> <0131>
1544<11> <0237>
1545<12> <0060>
1546<13> <00B4>
1547<14> <02C7>
1548<15> <02D8>
1549<16> <00AF>
1550<17> <02DA>
1551<18> <00B8>
1552<19> <00DF>
1553<1A> <00E6>
1554<1B> <0153>
1555<1C> <00F8>
1556<1D> <00C6>
1557<1E> <0152>
1558<1F> <00D8>
1559<21> <0021>
1560<22> <201D>
1561<27> <2019>
1562<3C> <00A1>
1563<3D> <003D>
1564<3E> <00BF>
1565<5C> <201C>
1566<5F> <02D9>
1567<60> <2018>
1568<7D> <02DD>
1569<7E> <007E>
1570<7F> <00A8>
1571endbfchar
1572endcmap
1573CMapName currentdict /CMap defineresource pop
1574end
1575end
1576%%EndResource
1577%%EOF
1578 }\endgroup
1579 \expandafter\edef\csname cmapOT1\endcsname#1{%
1580 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1581 }%
1582%
1583% \cmapOT1IT
1584 \begingroup
1585 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1586 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1587%%DocumentNeededResources: ProcSet (CIDInit)
1588%%IncludeResource: ProcSet (CIDInit)
1589%%BeginResource: CMap (TeX-OT1IT-0)
1590%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1591%%Version: 1.000
1592%%EndComments
1593/CIDInit /ProcSet findresource begin
159412 dict begin
1595begincmap
1596/CIDSystemInfo
1597<< /Registry (TeX)
1598/Ordering (OT1IT)
1599/Supplement 0
1600>> def
1601/CMapName /TeX-OT1IT-0 def
1602/CMapType 2 def
16031 begincodespacerange
1604<00> <7F>
1605endcodespacerange
16068 beginbfrange
1607<00> <01> <0393>
1608<09> <0A> <03A8>
1609<25> <26> <0025>
1610<28> <3B> <0028>
1611<3F> <5B> <003F>
1612<5D> <5E> <005D>
1613<61> <7A> <0061>
1614<7B> <7C> <2013>
1615endbfrange
161642 beginbfchar
1617<02> <0398>
1618<03> <039B>
1619<04> <039E>
1620<05> <03A0>
1621<06> <03A3>
1622<07> <03D2>
1623<08> <03A6>
1624<0B> <00660066>
1625<0C> <00660069>
1626<0D> <0066006C>
1627<0E> <006600660069>
1628<0F> <00660066006C>
1629<10> <0131>
1630<11> <0237>
1631<12> <0060>
1632<13> <00B4>
1633<14> <02C7>
1634<15> <02D8>
1635<16> <00AF>
1636<17> <02DA>
1637<18> <00B8>
1638<19> <00DF>
1639<1A> <00E6>
1640<1B> <0153>
1641<1C> <00F8>
1642<1D> <00C6>
1643<1E> <0152>
1644<1F> <00D8>
1645<21> <0021>
1646<22> <201D>
1647<23> <0023>
1648<24> <00A3>
1649<27> <2019>
1650<3C> <00A1>
1651<3D> <003D>
1652<3E> <00BF>
1653<5C> <201C>
1654<5F> <02D9>
1655<60> <2018>
1656<7D> <02DD>
1657<7E> <007E>
1658<7F> <00A8>
1659endbfchar
1660endcmap
1661CMapName currentdict /CMap defineresource pop
1662end
1663end
1664%%EndResource
1665%%EOF
1666 }\endgroup
1667 \expandafter\edef\csname cmapOT1IT\endcsname#1{%
1668 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1669 }%
1670%
1671% \cmapOT1TT
1672 \begingroup
1673 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1674 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1675%%DocumentNeededResources: ProcSet (CIDInit)
1676%%IncludeResource: ProcSet (CIDInit)
1677%%BeginResource: CMap (TeX-OT1TT-0)
1678%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
1679%%Version: 1.000
1680%%EndComments
1681/CIDInit /ProcSet findresource begin
168212 dict begin
1683begincmap
1684/CIDSystemInfo
1685<< /Registry (TeX)
1686/Ordering (OT1TT)
1687/Supplement 0
1688>> def
1689/CMapName /TeX-OT1TT-0 def
1690/CMapType 2 def
16911 begincodespacerange
1692<00> <7F>
1693endcodespacerange
16945 beginbfrange
1695<00> <01> <0393>
1696<09> <0A> <03A8>
1697<21> <26> <0021>
1698<28> <5F> <0028>
1699<61> <7E> <0061>
1700endbfrange
170132 beginbfchar
1702<02> <0398>
1703<03> <039B>
1704<04> <039E>
1705<05> <03A0>
1706<06> <03A3>
1707<07> <03D2>
1708<08> <03A6>
1709<0B> <2191>
1710<0C> <2193>
1711<0D> <0027>
1712<0E> <00A1>
1713<0F> <00BF>
1714<10> <0131>
1715<11> <0237>
1716<12> <0060>
1717<13> <00B4>
1718<14> <02C7>
1719<15> <02D8>
1720<16> <00AF>
1721<17> <02DA>
1722<18> <00B8>
1723<19> <00DF>
1724<1A> <00E6>
1725<1B> <0153>
1726<1C> <00F8>
1727<1D> <00C6>
1728<1E> <0152>
1729<1F> <00D8>
1730<20> <2423>
1731<27> <2019>
1732<60> <2018>
1733<7F> <00A8>
1734endbfchar
1735endcmap
1736CMapName currentdict /CMap defineresource pop
1737end
1738end
1739%%EndResource
1740%%EOF
1741 }\endgroup
1742 \expandafter\edef\csname cmapOT1TT\endcsname#1{%
1743 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1744 }%
1745\fi\fi
1746
1747
1748% Set the font macro #1 to the font named #2, adding on the
1749% specified font prefix (normally `cm').
1750% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
1751% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
1752% empty to omit).
1753\def\setfont#1#2#3#4#5{%
1754 \font#1=\fontprefix#2#3 scaled #4
1755 \csname cmap#5\endcsname#1%
1756}
1757% This is what gets called when #5 of \setfont is empty.
1758\let\cmap\gobble
1759% emacs-page end of cmaps
1760
1761% Use cm as the default font prefix.
1762% To specify the font prefix, you must define \fontprefix
1763% before you read in texinfo.tex.
1764\ifx\fontprefix\thisisundefined
1765\def\fontprefix{cm}
1766\fi
1767% Support font families that don't use the same naming scheme as CM.
1768\def\rmshape{r}
1769\def\rmbshape{bx} %where the normal face is bold
1770\def\bfshape{b}
1771\def\bxshape{bx}
1772\def\ttshape{tt}
1773\def\ttbshape{tt}
1774\def\ttslshape{sltt}
1775\def\itshape{ti}
1776\def\itbshape{bxti}
1777\def\slshape{sl}
1778\def\slbshape{bxsl}
1779\def\sfshape{ss}
1780\def\sfbshape{ss}
1781\def\scshape{csc}
1782\def\scbshape{csc}
1783
1784% Definitions for a main text size of 11pt. This is the default in
1785% Texinfo.
1786%
1787\def\definetextfontsizexi{%
1788% Text fonts (11.2pt, magstep1).
1789\def\textnominalsize{11pt}
1790\edef\mainmagstep{\magstephalf}
1791\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1792\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1793\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1794\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1795\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1796\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1797\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1798\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1799\font\texti=cmmi10 scaled \mainmagstep
1800\font\textsy=cmsy10 scaled \mainmagstep
1801\def\textecsize{1095}
1802
1803% A few fonts for @defun names and args.
1804\setfont\defbf\bfshape{10}{\magstep1}{OT1}
1805\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
1806\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
1807\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1808
1809% Fonts for indices, footnotes, small examples (9pt).
1810\def\smallnominalsize{9pt}
1811\setfont\smallrm\rmshape{9}{1000}{OT1}
1812\setfont\smalltt\ttshape{9}{1000}{OT1TT}
1813\setfont\smallbf\bfshape{10}{900}{OT1}
1814\setfont\smallit\itshape{9}{1000}{OT1IT}
1815\setfont\smallsl\slshape{9}{1000}{OT1}
1816\setfont\smallsf\sfshape{9}{1000}{OT1}
1817\setfont\smallsc\scshape{10}{900}{OT1}
1818\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1819\font\smalli=cmmi9
1820\font\smallsy=cmsy9
1821\def\smallecsize{0900}
1822
1823% Fonts for small examples (8pt).
1824\def\smallernominalsize{8pt}
1825\setfont\smallerrm\rmshape{8}{1000}{OT1}
1826\setfont\smallertt\ttshape{8}{1000}{OT1TT}
1827\setfont\smallerbf\bfshape{10}{800}{OT1}
1828\setfont\smallerit\itshape{8}{1000}{OT1IT}
1829\setfont\smallersl\slshape{8}{1000}{OT1}
1830\setfont\smallersf\sfshape{8}{1000}{OT1}
1831\setfont\smallersc\scshape{10}{800}{OT1}
1832\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1833\font\smalleri=cmmi8
1834\font\smallersy=cmsy8
1835\def\smallerecsize{0800}
1836
1837% Fonts for title page (20.4pt):
1838\def\titlenominalsize{20pt}
1839\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1840\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1841\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1842\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1843\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1844\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1845\let\titlebf=\titlerm
1846\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1847\font\titlei=cmmi12 scaled \magstep3
1848\font\titlesy=cmsy10 scaled \magstep4
1849\def\titleecsize{2074}
1850
1851% Chapter (and unnumbered) fonts (17.28pt).
1852\def\chapnominalsize{17pt}
1853\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
1854\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
1855\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
1856\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
1857\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
1858\setfont\chapsf\sfbshape{17}{1000}{OT1}
1859\let\chapbf=\chaprm
1860\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
1861\font\chapi=cmmi12 scaled \magstep2
1862\font\chapsy=cmsy10 scaled \magstep3
1863\def\chapecsize{1728}
1864
1865% Section fonts (14.4pt).
1866\def\secnominalsize{14pt}
1867\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
1868\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
1869\setfont\secsl\slbshape{10}{\magstep2}{OT1}
1870\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
1871\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
1872\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
1873\let\secbf\secrm
1874\setfont\secsc\scbshape{10}{\magstep2}{OT1}
1875\font\seci=cmmi12 scaled \magstep1
1876\font\secsy=cmsy10 scaled \magstep2
1877\def\sececsize{1440}
1878
1879% Subsection fonts (13.15pt).
1880\def\ssecnominalsize{13pt}
1881\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
1882\setfont\ssecit\itbshape{10}{1315}{OT1IT}
1883\setfont\ssecsl\slbshape{10}{1315}{OT1}
1884\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
1885\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
1886\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
1887\let\ssecbf\ssecrm
1888\setfont\ssecsc\scbshape{10}{1315}{OT1}
1889\font\sseci=cmmi12 scaled \magstephalf
1890\font\ssecsy=cmsy10 scaled 1315
1891\def\ssececsize{1200}
1892
1893% Reduced fonts for @acro in text (10pt).
1894\def\reducednominalsize{10pt}
1895\setfont\reducedrm\rmshape{10}{1000}{OT1}
1896\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
1897\setfont\reducedbf\bfshape{10}{1000}{OT1}
1898\setfont\reducedit\itshape{10}{1000}{OT1IT}
1899\setfont\reducedsl\slshape{10}{1000}{OT1}
1900\setfont\reducedsf\sfshape{10}{1000}{OT1}
1901\setfont\reducedsc\scshape{10}{1000}{OT1}
1902\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
1903\font\reducedi=cmmi10
1904\font\reducedsy=cmsy10
1905\def\reducedecsize{1000}
1906
1907\textleading = 13.2pt % line spacing for 11pt CM
1908\textfonts % reset the current fonts
1909\rm
1910} % end of 11pt text font size definitions
1911
1912
1913% Definitions to make the main text be 10pt Computer Modern, with
1914% section, chapter, etc., sizes following suit. This is for the GNU
1915% Press printing of the Emacs 22 manual. Maybe other manuals in the
1916% future. Used with @smallbook, which sets the leading to 12pt.
1917%
1918\def\definetextfontsizex{%
1919% Text fonts (10pt).
1920\def\textnominalsize{10pt}
1921\edef\mainmagstep{1000}
1922\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1923\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1924\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1925\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1926\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1927\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1928\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1929\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1930\font\texti=cmmi10 scaled \mainmagstep
1931\font\textsy=cmsy10 scaled \mainmagstep
1932\def\textecsize{1000}
1933
1934% A few fonts for @defun names and args.
1935\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
1936\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
1937\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
1938\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1939
1940% Fonts for indices, footnotes, small examples (9pt).
1941\def\smallnominalsize{9pt}
1942\setfont\smallrm\rmshape{9}{1000}{OT1}
1943\setfont\smalltt\ttshape{9}{1000}{OT1TT}
1944\setfont\smallbf\bfshape{10}{900}{OT1}
1945\setfont\smallit\itshape{9}{1000}{OT1IT}
1946\setfont\smallsl\slshape{9}{1000}{OT1}
1947\setfont\smallsf\sfshape{9}{1000}{OT1}
1948\setfont\smallsc\scshape{10}{900}{OT1}
1949\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1950\font\smalli=cmmi9
1951\font\smallsy=cmsy9
1952\def\smallecsize{0900}
1953
1954% Fonts for small examples (8pt).
1955\def\smallernominalsize{8pt}
1956\setfont\smallerrm\rmshape{8}{1000}{OT1}
1957\setfont\smallertt\ttshape{8}{1000}{OT1TT}
1958\setfont\smallerbf\bfshape{10}{800}{OT1}
1959\setfont\smallerit\itshape{8}{1000}{OT1IT}
1960\setfont\smallersl\slshape{8}{1000}{OT1}
1961\setfont\smallersf\sfshape{8}{1000}{OT1}
1962\setfont\smallersc\scshape{10}{800}{OT1}
1963\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1964\font\smalleri=cmmi8
1965\font\smallersy=cmsy8
1966\def\smallerecsize{0800}
1967
1968% Fonts for title page (20.4pt):
1969\def\titlenominalsize{20pt}
1970\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1971\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1972\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1973\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1974\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1975\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1976\let\titlebf=\titlerm
1977\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1978\font\titlei=cmmi12 scaled \magstep3
1979\font\titlesy=cmsy10 scaled \magstep4
1980\def\titleecsize{2074}
1981
1982% Chapter fonts (14.4pt).
1983\def\chapnominalsize{14pt}
1984\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
1985\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
1986\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
1987\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
1988\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
1989\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
1990\let\chapbf\chaprm
1991\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
1992\font\chapi=cmmi12 scaled \magstep1
1993\font\chapsy=cmsy10 scaled \magstep2
1994\def\chapecsize{1440}
1995
1996% Section fonts (12pt).
1997\def\secnominalsize{12pt}
1998\setfont\secrm\rmbshape{12}{1000}{OT1}
1999\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
2000\setfont\secsl\slbshape{10}{\magstep1}{OT1}
2001\setfont\sectt\ttbshape{12}{1000}{OT1TT}
2002\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
2003\setfont\secsf\sfbshape{12}{1000}{OT1}
2004\let\secbf\secrm
2005\setfont\secsc\scbshape{10}{\magstep1}{OT1}
2006\font\seci=cmmi12
2007\font\secsy=cmsy10 scaled \magstep1
2008\def\sececsize{1200}
2009
2010% Subsection fonts (10pt).
2011\def\ssecnominalsize{10pt}
2012\setfont\ssecrm\rmbshape{10}{1000}{OT1}
2013\setfont\ssecit\itbshape{10}{1000}{OT1IT}
2014\setfont\ssecsl\slbshape{10}{1000}{OT1}
2015\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
2016\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
2017\setfont\ssecsf\sfbshape{10}{1000}{OT1}
2018\let\ssecbf\ssecrm
2019\setfont\ssecsc\scbshape{10}{1000}{OT1}
2020\font\sseci=cmmi10
2021\font\ssecsy=cmsy10
2022\def\ssececsize{1000}
2023
2024% Reduced fonts for @acro in text (9pt).
2025\def\reducednominalsize{9pt}
2026\setfont\reducedrm\rmshape{9}{1000}{OT1}
2027\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
2028\setfont\reducedbf\bfshape{10}{900}{OT1}
2029\setfont\reducedit\itshape{9}{1000}{OT1IT}
2030\setfont\reducedsl\slshape{9}{1000}{OT1}
2031\setfont\reducedsf\sfshape{9}{1000}{OT1}
2032\setfont\reducedsc\scshape{10}{900}{OT1}
2033\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
2034\font\reducedi=cmmi9
2035\font\reducedsy=cmsy9
2036\def\reducedecsize{0900}
2037
2038\divide\parskip by 2 % reduce space between paragraphs
2039\textleading = 12pt % line spacing for 10pt CM
2040\textfonts % reset the current fonts
2041\rm
2042} % end of 10pt text font size definitions
2043
2044
2045% We provide the user-level command
2046% @fonttextsize 10
2047% (or 11) to redefine the text font size. pt is assumed.
2048%
2049\def\xiword{11}
2050\def\xword{10}
2051\def\xwordpt{10pt}
2052%
2053\parseargdef\fonttextsize{%
2054 \def\textsizearg{#1}%
2055 %\wlog{doing @fonttextsize \textsizearg}%
2056 %
2057 % Set \globaldefs so that documents can use this inside @tex, since
2058 % makeinfo 4.8 does not support it, but we need it nonetheless.
2059 %
2060 \begingroup \globaldefs=1
2061 \ifx\textsizearg\xword \definetextfontsizex
2062 \else \ifx\textsizearg\xiword \definetextfontsizexi
2063 \else
2064 \errhelp=\EMsimple
2065 \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
2066 \fi\fi
2067 \endgroup
2068}
2069
2070
2071% In order for the font changes to affect most math symbols and letters,
2072% we have to define the \textfont of the standard families. Since
2073% texinfo doesn't allow for producing subscripts and superscripts except
2074% in the main text, we don't bother to reset \scriptfont and
2075% \scriptscriptfont (which would also require loading a lot more fonts).
2076%
2077\def\resetmathfonts{%
2078 \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
2079 \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
2080 \textfont\ttfam=\tentt \textfont\sffam=\tensf
2081}
2082
2083% The font-changing commands redefine the meanings of \tenSTYLE, instead
2084% of just \STYLE. We do this because \STYLE needs to also set the
2085% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
2086% \tenSTYLE to set the current font.
2087%
2088% Each font-changing command also sets the names \lsize (one size lower)
2089% and \lllsize (three sizes lower). These relative commands are used in
2090% the LaTeX logo and acronyms.
2091%
2092% This all needs generalizing, badly.
2093%
2094\def\textfonts{%
2095 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
2096 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
2097 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
2098 \let\tenttsl=\textttsl
2099 \def\curfontsize{text}%
2100 \def\lsize{reduced}\def\lllsize{smaller}%
2101 \resetmathfonts \setleading{\textleading}}
2102\def\titlefonts{%
2103 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
2104 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
2105 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
2106 \let\tenttsl=\titlettsl
2107 \def\curfontsize{title}%
2108 \def\lsize{chap}\def\lllsize{subsec}%
2109 \resetmathfonts \setleading{27pt}}
2110\def\titlefont#1{{\titlefonts\rmisbold #1}}
2111\def\chapfonts{%
2112 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
2113 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
2114 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
2115 \let\tenttsl=\chapttsl
2116 \def\curfontsize{chap}%
2117 \def\lsize{sec}\def\lllsize{text}%
2118 \resetmathfonts \setleading{19pt}}
2119\def\secfonts{%
2120 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
2121 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
2122 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
2123 \let\tenttsl=\secttsl
2124 \def\curfontsize{sec}%
2125 \def\lsize{subsec}\def\lllsize{reduced}%
2126 \resetmathfonts \setleading{16pt}}
2127\def\subsecfonts{%
2128 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
2129 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
2130 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
2131 \let\tenttsl=\ssecttsl
2132 \def\curfontsize{ssec}%
2133 \def\lsize{text}\def\lllsize{small}%
2134 \resetmathfonts \setleading{15pt}}
2135\let\subsubsecfonts = \subsecfonts
2136\def\reducedfonts{%
2137 \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
2138 \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
2139 \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
2140 \let\tenttsl=\reducedttsl
2141 \def\curfontsize{reduced}%
2142 \def\lsize{small}\def\lllsize{smaller}%
2143 \resetmathfonts \setleading{10.5pt}}
2144\def\smallfonts{%
2145 \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
2146 \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
2147 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
2148 \let\tenttsl=\smallttsl
2149 \def\curfontsize{small}%
2150 \def\lsize{smaller}\def\lllsize{smaller}%
2151 \resetmathfonts \setleading{10.5pt}}
2152\def\smallerfonts{%
2153 \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
2154 \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
2155 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
2156 \let\tenttsl=\smalle