Commit c387606f by Joseph Myers Committed by Joseph Myers

* texinfo: Remove directory from GCC.

From-SVN: r38384
parent 051a55e0
2000-12-19 Joseph S. Myers <jsm28@cam.ac.uk>
* texinfo: Remove directory from GCC.
2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
* COPYING: Update to current
......
Richard Stallman, Brian Fox, Bob Chassell, Noah Friedman, Paul Rubin,
Karl Berry, and no doubt many others.
This source diff could not be displayed because it is too large. You can view the blob instead.
Note most of this information is out of date and superceded by the EGCS
install procedures. It is provided for historical reference only.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
Getting Started with Texinfo
============================
"Texinfo" is a documentation system that uses a single source file to
produce both on-line information and printed output. Using Texinfo,
you can create a printed document with the normal features of a book,
including chapters, sections, cross references, and indices. From the
same Texinfo source file, you can create a menu-driven, on-line Info
file with nodes, menus, cross references, and indices.
The name of the Texinfo source documentation file is `texinfo.txi'.
You can produce both on-line information and printed output from this
source file. The documentation describes Texinfo in detail, including
how to write Texinfo files, how to format them for both hard copy and
Info, and how to install Info files.
To get started, you need to create either a printed manual or an
on-line Info file from the `texinfo.txi' file. You do not need to
create both, although you will probably want both eventually.
To learn how to use Info, read the info documentation. You can do this in
one of two ways: using the standalone `info' program, or using Info mode in
GNU Emacs.
* If you want to use the `info' program, run
info -f info-stnd
* If you want to use Emacs, start up emacs and type `C-h i' [M-x info].
Follow the instructions to learn how to use Info.
After learning how to use Info, you can read the Texinfo documentation.
Using the standalone `info', type the following at the shell prompt:
info -f texinfo
To use read this manual in Emacs, you first need to edit the Info-directory
menu (the file `dir' in the system info directory) to contain the
appropriate node. To learn how to do this, see node: Add in the Info
documentation.
The Texinfo documentation describes Texinfo in detail; among other things,
it tells how to install Info files in the usual manner. (See node: Install
an Info File.)
The `info-stnd.info' file describes the standalone Info reader in detail. To
read this file, type
$ info -f info-stnd
If you are using GNU Emacs, you may want to install the Emacs Lisp files
permanently. Move them to a directory in the load-path for Emacs;
otherwise Emacs will not be able to load the autoloaded support files, such
as `texinfmt.el'.
The `texinfo.el' file contains the autoload commands; it is the only
file that needs to be loaded initially. If your Emacs does not
automatically load `texinfo.el', you can tell it to do so by placing
the following in `default.el' or in your `.emacs' file:
(load "texinfo")
To create a printed manual
==========================
You need:
* The `tex' program, which typesets the manual using TeX.
* The `texinfo.tex' definition file that tells TeX how to typeset
a Texinfo file.
* The `texindex' program, which sorts the unsorted index files
created by TeX.
* A printing program such as `lp' or `lpr',
* A printer.
This Texinfo distribution package contains `texinfo.tex', the C source
for `texindex', and the handy shell script `texi2dvi'. The `tex'
program is not part of this distribution, but is available separately.
(See `How to Obtain TeX' in the Texinfo documentation.)
* Install `tex'. (`texindex' is installed automagically by
`make install' in this distribution.)
* Move the `texinfo.tex' file to an appropriate directory; the current
directory will do. (`/usr/local/lib/tex/inputs' might be a good place.
See ``Preparing to Use TeX'' in the Texinfo manual, for more
information.)
After following those instructions, type the following to make the .dvi
files:
$ make texinfo.dvi
$ (cd info; make info.dvi info-stnd.dvi)
$ (cd makeinfo; make makeinfo.dvi)
You can then print the resulting .dvi files with the `lpr' command (on BSD
systems. On SysV systems the command is `lp'. Consult your man pages for
more information).
For example, the command to print the texinfo.dvi file might be:
$ lpr -d texinfo.dvi
The name of the printing command depends on the system; `lpr -d' is
common, and is illustrated here. You may use a different name for the
printing command.
Please report bugs to bug-texinfo@gnu.org.
Happy formatting.
## Makefile.am for texinfo.
## $Id: Makefile.am,v 1.5 1998/04/10 00:37:57 law Exp $
## Process this file with automake to produce Makefile.in in all directories.
# Be sure we're using the right version of Automake.
# 1.2f was the first version that supported .txi as a Texinfo suffix.
AUTOMAKE_OPTIONS = 1.2f
# Additional files to distribute.
EXTRA_DIST = INTRODUCTION dir-example
# All subdirectories.
# Do intl/ and lib/ first since the C programs depend on them.
# Do doc/ last so makeinfo will be built when we get there.
# Others are alphabetical.
SUBDIRS = intl lib info makeinfo po util doc
# ??? For EGCS, only build the stuff we actually need. This eliminates the
# need for xgettext that exists in the po subdirectory. We do need util in
# order to get install-info, which is used as part of the gcc build/install
# process.
SUBDIRS = intl lib makeinfo util
This is the README file for the GNU Texinfo distribution.
The primary distribution point is ftp://ftp.gnu.org/pub/gnu.
Please email bugs or suggestions to bug-texinfo@gnu.org. (If you wish,
you can join this list by sending a subscribe message to
bug-texinfo-request@gnu.org.) Patches are welcome; if possible, please
make them with diff -c and include ChangeLog entries.
Programs within this distribution have their own version numbers. When
you refer to a file, please mention its own version, as well as the
version number of the Texinfo distribution.
For generic installation instructions on compiling and installing this
Automake-based distribution, please read the file `INSTALL'.
Installation notes specific to Texinfo:
* The Info tree uses a file `dir' as its root node; the `dir-example'
file in this distribution is included for informative purposes.
Use it, modify it, or ignore it just as you like.
* You can create a file texinfo.cnf to be read by TeX when
processing Texinfo manuals. For example, it might contain the
command @afourpaper. See the `Preparing for TeX' node in
texinfo.texi for more details.
* If your info files are not in $prefix/info, you may wish to add a line
#define DEFAULT_INFOPATH "/mydir1:/mydir2:/etc"
to config.h after running configure.
This distribution includes (but is not limited to) the following files:
README This file.
INTRODUCTION Brief introduction to the system, and
how to create readable files from the
Texinfo source files in this distribution.
Texinfo source files (in ./doc):
texinfo.texi This manual describes the Texinfo language
and many of the associated tools. It
tells how to use Texinfo to write
documentation, how to use Texinfo mode
in GNU Emacs, TeX, makeinfo, and the
Emacs Lisp Texinfo formatting commands.
info.texi This manual tells you how to use
Info. This document comes as part of
GNU Emacs. If you do not have Emacs,
you can format this Texinfo source
file with makeinfo or TeX and then
read the resulting Info file with the
standalone Info reader that is part of
this distribution.
info-stnd.texi This manual tells you how to use
the standalone GNU Info reader that is
included in this distribution as C
source (./info).
Printing related files:
doc/texinfo.tex This TeX definitions file tells
the TeX program how to typeset a
Texinfo file into a DVI file ready for
printing.
util/texindex.c This file contains the source for
the `texindex' program that generates
sorted indices used by TeX when
typesetting a file for printing.
util/texi2dvi This is a shell script for
producing an indexed DVI file using
TeX and texindex. Must be used if the
source document uses Texinfo @macros.
Source files for standalone C programs (./lib, ./makeinfo, ./info):
makeinfo.c This file contains the source for
the `makeinfo' program that you can
use to create an Info file from a
Texinfo file.
info.c This file contains the source for
the `info' program that you can use to
view Info files on an ASCII terminal.
getopt.c Various support files
getopt1.c
getopt.h
Installation files:
configure This file creates a Makefile
which in turn creates an `info' or
`makeinfo' executable, or a C sources
distribution.
configure.in This is a template for creating
`configure' using Autoconf.
Makefile.in This is a template for `configure'
to use to make a Makefile. Created by
Automake.
Makefile.am This is a template for Automake
to use to make a Makefile.in.
Other files (util):
NEWS This contains a summary of new
features since the first edition
of Texinfo.
fixfonts This is a shell script to install the
`lcircle10' TeX fonts as an alias for
the `circle10' fonts. In some older
TeX distributions the names are
different.
tex3patch This handles a bug for version
3.0 of TeX that does not occur in
more recent versions.
Please report bugs in this alpha distribution to
texinfo-pretest@cs.umb.edu
rather than bug-texinfo@prep. Thanks.
You can get on texinfo-pretest, if you're not already,
by sending a message whose body is
subscribe you@your.preferred.email.address
to texinfo-pretest-request@cs.umb.edu.
And you can get off the list by sending an unsubscribe message.
(I use majordomo to maintain the list.)
Thanks to these contributors and many more ...
Dave Love
Donald Knuth
Erick Branderhorst
Karl Eichwalder
Laurent Bourbeau
Stephen Gildea
William Bader
If you are interested in working on any of these, email bug-texinfo@gnu.org.
* Makeinfo:
- HTML output is being actively worked on, and with luck will be in
the next release.
- A detexinfo program, like detex or delatex. This command would
strip all the texinfo commands out, and would be used as a filter on
the way to a speller. An option would be to NOT strip comments out.
makeinfo --no-headers comes close.
- If node name contains an @ command, complain explicitly.
- Better ASCII output: convert menus to single table of contents,
enumerate chapters and sections, convert cross-refs and indices to
chapter/section references. See:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/faq201s.zip
- Call Ghostscript to get ASCII output for the @image command.
* TeX:
- Use @ as the escape character, and Texinfo syntax generally, in the
table of contents, aux, and index files. Eliminate all the crazy
multiple redefinitions of every Texinfo command in different contexts.
- Handle @hsep and @vsep in @multitables.
* General:
- Better i18n support, including support for 8-bit input characters,
and 8-bit output in info. Perhaps have to use the ec fonts.
- Support compressed image files, automatic generation of .txt
or .jpg from .eps by Ghostscript.
- Repeat TeX run until cross-references stabilize, not just twice.
(Document this in manual and fix texi2dvi.)
- Handle reference card creation, perhaps by only paying attention to
sectioning and @def... commands.
- Allow : in node names for info files, for names like `class::method'.
- Get Info declared as a MIME Content-Type.
* Language:
- @figure:
@figure [xref-label]
@figureinclude <filename>, [<height>], [<width>]
@figurehsize <dimen>
@figurevsize <dimen>
@caption ... @end caption
<arbitrary Texinfo commands>
@end figure
- @flushboth to combine @flushleft and @flushright, for RFC's.
- @part sectioning command.
- Anchors a la HTML?
- Allow subitems and `see' and `see also' in indices.
- @exercise/@answer command for, e.g., gawk.
- Allow @hsep/@vsep at @item, instead of just in template.
- The dark corner symbol for the gawk manual.
- Change bars. This is difficult or impossible in TeX,
unfortunately. To do it right requires device driver support.
* Doc:
- Include a complete functional summary, as in a reference card, in
the manual.
- Improve the manuals for makeinfo, standalone info, etc.
- Page 39, need a new section on doing dedication pages. See gawk.texi
for an example of doing it in both the tex and info versions.
* Info:
- Search all nodes of dir file at startup, then can have
INFO-DIR-SEPARATE-GROUPS and other such.
- Better dir file merging.
- Steal interface ideas from Lynx: TAB for navigating to next link
within a page, number links, etc.
- q within help should quit help like C-x 0.
- Full-text search on all available info files.
- Incorporate an X-based viewer, perhaps tkinfo:
http://www.math.ucsb.edu/~boldt/tkinfo/.
- Perhaps process Texinfo files directly instead of converting to Info:
ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/tkman.tar.Z
+ ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/rman.tar.Z
+ Tcl/Tk 8.0 from ftp.smli.com in the /pub/tcl directory.
From: phelps@ecstasy.CS.Berkeley.EDU (Tom Phelps)
* Install-info:
- be able to copy the info file to compile-time $(infodir), to
simplify by-hand installation.
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */
@TOP@
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define to the name of the distribution. */
#undef PACKAGE
/* Define to the version of the distribution. */
#undef VERSION
@BOTTOM@
/* For gettext (NLS) */
#define _(String) gettext (String)
#define N_(String) (String)
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). */
#!/bin/sh
# Use the top-level config.guess so that we don't have two of them.
guesssys=`echo $0 | sed 's|config.guess|../config.guess|'`
exec ${guesssys} "$@"
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if on MINIX. */
#undef _MINIX
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define to the name of the distribution. */
#undef PACKAGE
/* Define to the version of the distribution. */
#undef VERSION
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the bzero function. */
#undef HAVE_BZERO
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
/* Define if you have the memset function. */
#undef HAVE_MEMSET
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the setvbuf function. */
#undef HAVE_SETVBUF
/* Define if you have the sigprocmask function. */
#undef HAVE_SIGPROCMASK
/* Define if you have the sigsetmask function. */
#undef HAVE_SIGSETMASK
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <ncurses/termcap.h> header file. */
#undef HAVE_NCURSES_TERMCAP_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/fcntl.h> header file. */
#undef HAVE_SYS_FCNTL_H
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/ptem.h> header file. */
#undef HAVE_SYS_PTEM_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/ttold.h> header file. */
#undef HAVE_SYS_TTOLD_H
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the bsd library (-lbsd). */
#undef HAVE_LIBBSD
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Define if you have the z library (-lz). */
#undef HAVE_LIBZ
/* For gettext (NLS) */
#include <libintl.h>
#define _(String) gettext (String)
#define N_(String) (String)
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). */
#!/bin/sh
# Use the top-level config.sub so that we don't have two of them.
subsys=`echo $0 | sed 's|config.sub|../config.sub|'`
exec ${subsys} "$@"
This source diff could not be displayed because it is too large. You can view the blob instead.
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.7 1998/03/26 10:30:41 law Exp $
dnl
AC_INIT(makeinfo/makeinfo.c)
AC_PREREQ(2.12)dnl Minimum Autoconf version required.
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([texinfo], [3.12])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
EGCS_PROG_INSTALL
AC_PROG_RANLIB
# We do this for the sake of a more helpful warning in doc/Makefile.
TEXMF='$(datadir)/texmf'
AC_CHECK_PROG(TEXCONFIG, texconfig, true, false)
$TEXCONFIG && eval `texconfig conf </dev/null | grep '^TEXMF='`
AC_SUBST(TEXMF)
AC_ISC_POSIX
AC_MINIX
dnl CYGNUS LOCAL: Add AM_MAINTAINER_MODE and AM_EXEEXT
AM_MAINTAINER_MODE
AM_EXEEXT
dnl Checks for libraries.
AC_CHECK_HEADERS(zlib.h, [AC_CHECK_LIB(z, gzdopen)])
# Needed on sysV68 for sigblock, sigsetmask. But check for it in libc first.
AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))
# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
# rather ncurses. So we check for it.
TERMLIBS=
for termlib in ncurses curses termcap terminfo termlib ; do
AC_CHECK_LIB(${termlib}, tputs,
[TERMLIBS="${TERMLIBS} -l${termlib}"; break])
done
AC_SUBST(TERMLIBS)
dnl Checks for header files.
dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses.
if test "x$termlib" = xncurses; then
dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined.
AC_CHECK_HEADERS(ncurses/termcap.h)
fi
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h pwd.h string.h strings.h termcap.h termio.h \
termios.h unistd.h \
sys/fcntl.h sys/file.h sys/ptem.h sys/time.h sys/ttold.h sys/wait.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_OFF_T
AC_TYPE_SIGNAL
AC_C_CONST
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
if test "$ac_cv_c_cross" = no; then
AC_FUNC_SETVBUF_REVERSED
fi
AC_CHECK_FUNCS(setvbuf getcwd memset bzero strchr strcasecmp \
sigprocmask sigsetmask)
dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added.
AC_REPLACE_FUNCS(memcpy memmove strdup strerror)
dnl Set of available languages and i18n macros.
ALL_LINGUAS="de fr"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_OUTPUT([Makefile \
doc/Makefile \
info/Makefile \
intl/Makefile \
lib/Makefile \
makeinfo/Makefile \
po/Makefile.in \
util/Makefile \
],
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in >po/Makefile])
# Makefile for Cygnus overrides to Texinfo distribution. -*- Indented-Text -*-
# Copyright (C) 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
LN = ln
RM = rm -f
SHELL = /bin/sh
# We do not use texi2dvi because (a) we need no index, and
# (b) texi2dvi monkeys with TEXINPUTS
TEX = tex
#### End of system configuration section. ####
all: dvi
sub-all:
check:
installcheck:
info:
install-info:
TAGS:
dvi: license.dvi lgpl.dvi
install:
uninstall:
Makefile: Makefile.in ../config.status
cd ..; $(SHELL) ./config.status
clean mostlyclean:
$(RM) license.?? license.??? liblic.?? liblic.??? lgpl.?? lgpl.???
distclean realclean: clean
$(RM) Makefile config.status fsf-texi.tex
license.dvi: texiplus.tex texinfo.tex $(srcdir)/../license.texi $(srcdir)/../gpl.texinfo fsf-texi.tex
TEXINPUTS=$(srcdir):.:$(srcdir)/.. $(TEX) $(srcdir)/../license.texi
lgpl.dvi: texiplus.tex texinfo.tex $(srcdir)/../liblic.texi $(srcdir)/../lgpl.texinfo fsf-texi.tex
TEXINPUTS=$(srcdir):.:$(srcdir)/.. $(TEX) $(srcdir)/../liblic.texi
mv liblic.dvi lgpl.dvi
fsf-texi.tex: $(srcdir)/../texinfo.tex
cp $(srcdir)/../texinfo.tex fsf-texi.tex
force:
%$Id: texinfo.tex,v 1.1.1.1 1998/03/23 04:42:12 law Exp $
% Cover file to permit easy management of FSF texinfo.tex and use of
% Cygnus local revisions.
% First we get the official FSF one:
\input fsf-texi.tex
@c Now we get the Cygnus mods to override things we like to do differently:
@input texiplus.tex
#!/bin/sh
# tocfix - move a DVI file table of contents to its proper position
# TeX puts the table of contents at the end of the DVI file.
# If you're printing multiple pages per sheet, you can't fix it
# on the printout. This program moves the TOC to be right after
# the titlepage and copyright page.
# It's a safe no-op to run this program on a DVI file more than once.
# Some explanation: the TOC has negative page numbers, represented
# to dviselect by an underscore. The titlepage and copyright page
# have TeX page numbers 1 and 2, but so do the first two pages of the
# first chapter. So we have to use absolute, as opposed to TeX,
# page numbers to get them right, represented to dviselect by an
# equals sign.
# This program assumes that the DVI file has the standard Texinfo
# format -- a titlepage, a copyright page, then the real text.
# djm@cygnus.com (David MacKenzie)
trap 'rm -f new-*.dvi title.dvi toc.dvi body_plus_toc.dvi body.dvi; exit 1' 1 3 15
if [ $# -eq 0 ]; then
echo "Usage; tocfix dvifile..." >&2; exit 1
fi
for dvi
do
dviselect -i $dvi -o title.dvi =1:2
dviselect -i $dvi -o toc.dvi :_1
dviselect -i $dvi -o body_plus_toc.dvi =3:
dviselect -i body_plus_toc.dvi -o body.dvi 1:
dviconcat -o new-$dvi title.dvi toc.dvi body.dvi
mv new-$dvi $dvi
rm -f title.dvi toc.dvi body_plus_toc.dvi body.dvi
done
$Id: dir,v 1.2 1998/03/24 17:58:17 law Exp $
This is the file .../info/dir, which contains the topmost node of the
Info hierarchy. The first time you invoke Info you start off
looking at that node, which is (dir)Top.

File: dir Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs topic, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
info
--
intro
send-pr
README
COPYING
COPYING.LIB
--
gcc
g++
reno-1
cpp
--
gdb
gdbint
stabs
--
binutils
ld
as
--
dejagnu
--
make
flex
bison
byacc
gperf
gprof
--
libc
libg++
iostream
libm
--
bfd
readline
libiberty
regex
termcap
--
emacs
elisp
ange-ftp
calc
calendar
cl
forms
gnus
vip
vm
--
ispell
diff
patch
wdiff
m4
--
texinfo
makeinfo
--
autoconf
configure
cfg-paper
--
standards
## Makefile.am for texinfo/emacs.
## $Id: Makefile.am,v 1.1.1.2 1998/03/24 18:20:38 law Exp $
## Run automake in .. to produce Makefile.in from this.
info_TEXINFOS = info-stnd.texi info.texi texinfo.txi
# Use the programs built in our distribution.
MAKEINFO = ../makeinfo/makeinfo
INSTALL_INFO = ../util/install-info
# Include our texinfo.tex, not Automake's.
EXTRA_DIST = macro.texi userdoc.texi epsf.tex texinfo.tex
# We try to discover this via configure just to give a better help message.
TEXMF = @TEXMF@
install-data-local:
@echo "WARNING: You must install texinfo.tex and epsf.tex manually,"
@echo "WARNING: perhaps in $(TEXMF)/tex/texinfo/"
@echo "WARNING: and $(TEXMF)/tex/generic/dvips/ respectively."
@echo "WARNING: See doc/README for some considerations."
# Do not create info files for distribution.
dist-info:
# Do not try to build the info files in $(srcdir),
# since we don't distribute them.
.texi.info:
$(MAKEINFO) -I$(srcdir) `echo $< | sed 's,.*/,,'`
texinfo: $(srcdir)/texinfo.txi
$(MAKEINFO) -I$(srcdir) texinfo.txi
# Similarly, Do not try to install the info files from $(srcdir).
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(infodir)
@for file in $(INFO_DEPS); do \
d=.; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c '$(INSTALL_INFO) --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
echo " $(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/$$file";\
$(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/$$file || :;\
done; \
else : ; fi
# Remove the info files at make distclean.
distclean-aminfo:
rm -f texinfo texinfo-* info*.info*
# Makefile.in generated automatically by automake 1.3 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DISTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
DATADIRNAME = @DATADIRNAME@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
MAINT = @MAINT@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
TERMLIBS = @TERMLIBS@
TEXCONFIG = @TEXCONFIG@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
info_TEXINFOS = info-stnd.texi info.texi texinfo.txi
# Use the programs built in our distribution.
MAKEINFO = ../makeinfo/makeinfo
INSTALL_INFO = ../util/install-info
# Include our texinfo.tex, not Automake's.
EXTRA_DIST = macro.texi userdoc.texi epsf.tex texinfo.tex
# We try to discover this via configure just to give a better help message.
TEXMF = @TEXMF@
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
TEXI2DVI = texi2dvi
TEXINFO_TEX = $(top_srcdir)/../texinfo.tex
INFO_DEPS = info-stnd.info info.info texinfo
DVIS = info-stnd.dvi info.dvi texinfo.dvi
TEXINFOS = info-stnd.texi info.texi texinfo.txi
DIST_COMMON = README $(info_TEXINFOS) Makefile.am Makefile.in \
texinfo.tex
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
all: Makefile $(INFO_DEPS)
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
info-stnd.info: info-stnd.texi
info-stnd.dvi: info-stnd.texi
info.info: info.texi $(info_TEXINFOS)
info.dvi: info.texi $(info_TEXINFOS)
texinfo: texinfo.txi
texinfo.dvi: texinfo.txi
DVIPS = dvips
.texi.dvi:
TEXINPUTS=$(top_srcdir)/..:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo.dvi:
TEXINPUTS=$(top_srcdir)/..:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.txi.dvi:
TEXINPUTS=$(top_srcdir)/..:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.dvi.ps:
$(DVIPS) $< -o $@
uninstall-info:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
for file in $(INFO_DEPS); do \
test -z "$ii" \
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
@$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do \
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
mostlyclean-aminfo:
-rm -f info-stnd.aux info-stnd.cp info-stnd.cps info-stnd.dvi \
info-stnd.fn info-stnd.fns info-stnd.ky info-stnd.kys \
info-stnd.ps info-stnd.log info-stnd.pg info-stnd.toc \
info-stnd.tp info-stnd.tps info-stnd.vr info-stnd.vrs \
info-stnd.op info-stnd.tr info-stnd.cv info-stnd.cn info.aux \
info.cp info.cps info.dvi info.fn info.fns info.ky info.kys \
info.ps info.log info.pg info.toc info.tp info.tps info.vr \
info.vrs info.op info.tr info.cv info.cn texinfo.aux \
texinfo.cp texinfo.cps texinfo.dvi texinfo.fn texinfo.fns \
texinfo.ky texinfo.kys texinfo.ps texinfo.log texinfo.pg \
texinfo.toc texinfo.tp texinfo.tps texinfo.vr texinfo.vrs \
texinfo.op texinfo.tr texinfo.cv texinfo.cn
clean-aminfo:
distclean-aminfo:
maintainer-clean-aminfo:
for i in $(INFO_DEPS); do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
fi; \
done
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info: $(INFO_DEPS)
dvi: $(DVIS)
check: all
$(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
install-data: install-info-am install-data-local
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall: uninstall-info
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(infodir)
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-aminfo mostlyclean-generic
clean: clean-aminfo clean-generic mostlyclean
distclean: distclean-aminfo distclean-generic clean
-rm -f config.status
maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
dvi installcheck install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-data-local:
@echo "WARNING: You must install texinfo.tex and epsf.tex manually,"
@echo "WARNING: perhaps in $(TEXMF)/tex/texinfo/"
@echo "WARNING: and $(TEXMF)/tex/generic/dvips/ respectively."
@echo "WARNING: See doc/README for some considerations."
# Do not create info files for distribution.
dist-info:
# Do not try to build the info files in $(srcdir),
# since we don't distribute them.
.texi.info:
$(MAKEINFO) -I$(srcdir) `echo $< | sed 's,.*/,,'`
texinfo: $(srcdir)/texinfo.txi
$(MAKEINFO) -I$(srcdir) texinfo.txi
# Similarly, Do not try to install the info files from $(srcdir).
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(infodir)
@for file in $(INFO_DEPS); do \
d=.; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c '$(INSTALL_INFO) --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
echo " $(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/$$file";\
$(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/$$file || :;\
done; \
else : ; fi
# Remove the info files at make distclean.
distclean-aminfo:
rm -f texinfo texinfo-* info*.info*
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This directory contains documentation on the Texinfo system and the TeX
sources needed to process Texinfo sources. (Use texi2dvi to run a
Texinfo manual through TeX to produce a DVI file.)
The .tex files are not installed automatically because TeX installations
vary so widely. Installing them in the wrong place would give a false
sense of security. So, you should simply cp *.tex to the appropriate
place. If your installation follows the TeX Directory Structure
standard (http://www.tug.org/tds/), this will be the directory
<texmf>/tex/texinfo/ for texinfo.tex and <texmf>/tex/plain/dvips/ for
epsf.tex. If you use the default installation paths, <texmf> will be
/usr/local/share/texmf. If you have teTeX, you can find <texmf> by
running:
texconfig confall | grep \^TEXMF=
(The configure script tries to do this for you.)
You can get the latest texinfo.tex from
ftp://ftp.tug.org/tex/texinfo.tex
ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex
or on the FSF machines in /home/gd/gnu/doc/texinfo.tex.
If you have problems with the version in this distribution, please check
for a newer version.
epsf.tex comes with dvips distributions, and you may already have it
installed. The version here is functionally identical but slightly
nicer than the one in dvips574. The changes have been sent to the
epsf.tex maintainer.
@c This file is included in makeinfo.texi.
@c
@ifinfo
@comment Here are some useful examples of the macro facility.
@c Simply insert the right version of the texinfo name.
@macro texinfo{}
TeXinfo
@end macro
@macro dfn{text}
@dfn{\text\}
@cpindex \text\
@end macro
@c Define a macro which expands to a pretty version of the name of the
@c Makeinfo program.
@macro makeinfo{}
@code{Makeinfo}
@end macro
@c Define a macro which is used to define other macros. This one makes
@c a macro which creates a node and gives it a sectioning command. Note
@c that the created macro uses the original definition within the
@c expansion text. This takes advantage of the non-recursion feature of
@c macro execution.
@macro node_define{orig-name}
@macro \orig-name\{title}
@node \title\
@\orig-name\ \title\
@end macro
@end macro
@c Now actually define a new set of sectioning commands.
@node_define {chapter}
@node_define {section}
@node_define {subsection}
@end ifinfo
@chapter The Macro Facility
This chapter describes the new macro facility.
A @dfn{macro} is a command that you define in terms of other commands.
It doesn't exist as a @texinfo{} command until you define it as part of
the input file to @makeinfo{}. Once the command exists, it behaves much
as any other @texinfo{} command. Macros are a useful way to ease the
details and tedium of writing a `correct' info file. The following
sections explain how to write and invoke macros.
@menu
* How to Use Macros in @texinfo{}::
How to use the macro facility.
* Using Macros Recursively::
How to write a macro which does (or doesn't) recurse.
* Using @texinfo{} Macros As Arguments::
Passing a macro as an argument.
@end menu
@section How to Use Macros in @texinfo{}
Using macros in @texinfo{} is easy. First you define the macro. After
that, the macro command is available as a normal @texinfo{} command.
Here is what a definition looks like:
@example
@@macro @var{name}@{@var{arg1}, @var{@dots{}} @var{argn}@}
@var{@texinfo{} commands@dots{}}
@@end macro
@end example
The arguments that you specify that the macro takes are expanded with
the actual parameters used when calling the macro if they are seen
surrounded by backslashes. For example, here is a definition of
@code{@@codeitem}, a macro which can be used wherever @code{@@item} can
be used, but which surrounds its argument with @code{@@code@{@dots{}@}}.
@example
@@macro codeitem@{item@}
@@item @@code@{\item\@}
@@end macro
@end example
When the macro is expanded, all of the text between the @code{@@macro}
and @code{@@end macro} is inserted into the document at the expansion
point, with the actual parameters substituted for the named parameters.
So, a call to the above macro might look like:
@example
@@codeitem@{Foo@}
@end example
and @makeinfo{} would execute the following code:
@example
@@item @@code@{Foo@}
@end example
A special case is made for macros which only take a single argument, and
which are invoked without any brace characters (i.e.,
@samp{@{}@dots{}@samp{@}}) surrounding an argument; the rest of the line
is supplied as is as the sole argument to the macro. This special case
allows one to redefine some standard @texinfo{} commands without
modifying the input file. Along with the non-recursive action of macro
invocation, one can easily redefine the sectioning commands to also
provide index entries:
@example
@@macro chapter@{name@}
@@chapter \name\
@@findex \name\
@@end macro
@end example
Thus, the text:
@example
@@chapter strlen
@end example
will expand to:
@example
@@chapter strlen
@@findex strlen
@end example
@section Using Macros Recursively
Normally, while a particular macro is executing, any call to that macro
will be seen as a call to a builtin @texinfo{} command. This allows one
to redefine a builtin @texinfo{} command as a macro, and then use that
command within the definition of the macro itself. For example, one
might wish to make sure that whereever a term was defined with
@code{@@dfn@{@dots{}@}}, the location of the definition would appear
in the concept index for the manual. Here is a macro which redefines
@code{@@dfn} to do just that:
@example
@@macro dfn@{text@}
@@dfn@{\text\@}
@@cpindex \text\
@@end macro
@end example
Note that we used the builtin @texinfo{} command @code{@@dfn} within our
overriding macro definition.
This behaviour itself can be overridden for macro execution by writing a
special @dfn{macro control command} in the definition of the macro. The
command is considered special because it doesn't affect the output text
directly, rather, it affects the way in which the macro is defined. One
such special command is @code{@@allow-recursion}.
@example
@@macro silly@{arg@}
@@allow-recursion
\arg\
@@end macro
@end example
Now @code{@@silly} is a macro that can be used within a call to itself:
@example
This text @@silly@{@@silly@{some text@}@} is ``some text''.
@end example
@section Using @texinfo{} Macros As Arguments
@printindex cp
How to use @texinfo{} macros as arguments to other @texinfo{} macros.
@bye
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
## Makefile.am for texinfo/emacs.
## $Id: Makefile.am,v 1.1.1.1 1998/03/23 04:42:12 law Exp $
## Run automake in .. to produce Makefile.in from this.
# Do not byte compile our Elisp files by default.
ELCFILES =
# Do not install our Elisp files by default, either.
noinst_LISP = info.el informat.el makeinfo.el \
texinfmt.el texinfo.el texnfo-upd.el
EXTRA_DIST = README elisp-comp new-useful-setqs $(noinst_LISP)
install-data-local:
@echo "WARNING: You must (compile and) install the Emacs Lisp files"
@echo "WARNING: manually. See ./emacs/README for some considerations."
# For some reason these do not get defined.
distclean-lisp:
clean-lisp:
mostlyclean-lisp:
# Makefile.in generated automatically by automake 1.2 from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Do not byte compile our Elisp files by default.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
DATADIRNAME = @DATADIRNAME@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
TERMLIBS = @TERMLIBS@
TEXCONFIG = @TEXCONFIG@
TEXMF = @TEXMF@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
ELCFILES =
# Do not install our Elisp files by default, either.
noinst_LISP = info.el informat.el makeinfo.el \
texinfmt.el texinfo.el texnfo-upd.el
EXTRA_DIST = README elisp-comp new-useful-setqs $(noinst_LISP)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LISP = $(noinst_LISP)
lispdir = @lispdir@
EMACS = @EMACS@
DIST_COMMON = README Makefile.am Makefile.in elisp-comp
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
default: all
.SUFFIXES:
.SUFFIXES: .el .elc
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus emacs/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
.el.elc:
@echo 'WARNING: Warnings can be ignored. :-)'
if test $(EMACS) != no; then \
EMACS=$(EMACS) $(SHELL) $(srcdir)/elisp-comp $<; \
fi
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = emacs
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
info:
dvi:
check: all
$(MAKE)
installcheck:
install-info:
install-exec:
@$(NORMAL_INSTALL)
install-data: install-data-local
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall:
all: Makefile $(LISP) $(ELCFILES)
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
mostlyclean-generic:
test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)
rm -f config.cache config.log stamp-h stamp-h[0-9]*
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-lisp mostlyclean-generic
clean: clean-lisp clean-generic mostlyclean
distclean: distclean-lisp distclean-generic clean
rm -f config.status
maintainer-clean: maintainer-clean-lisp maintainer-clean-generic \
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
.PHONY: default mostlyclean-lisp distclean-lisp clean-lisp \
maintainer-clean-lisp tags distdir info dvi installcheck install-info \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-data-local:
@echo "WARNING: You must (compile and) install the Emacs Lisp files"
@echo "WARNING: manually. See ./emacs/README for some considerations."
# For some reason these do not get defined.
distclean-lisp:
clean-lisp:
mostlyclean-lisp:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This directory contains Emacs Lisp sources related to Texinfo.
M-x texinfo-format-buffer is no longer the standard way to make .info
files, and may or may not work. Use makeinfo instead. See the
`makeinfo advantages' in the manual for why.
The files here may or may not be newer than the versions in the latest
Emacs distribution -- there is only one master source, so it simply
depends on what was released later. Use whatever works better for you.
They are not compiled or installed by default, because of the above, and
also due to the wide variations in sites' Emacs installations.
Even if you do install them, you may not want to compile them if your
site is running multiple versions of Emacs, since .elc files are not
portable between all Emacs releases. If you do want to compile them,
just run the ./elisp-comp shell script.
;;; Here is a handy keybinding:
(global-set-key "\C-x\\" 'detexinfo)
;;;;;;;;;;;;;;;; detexinfo.el ;;;;;;;;;;;;;;;;
;;;
;;; Remove Texinfo commands from a Texinfo source file.
;;;
;;; Copyright (C) 1991, 1992 Free Software Foundation
;;; Robert J. Chassell
;;; bugs to bug-texinfo@prep.ai.mit.edu
;;;
;;; ==> test version <==
;;; Fails if Texinfo source file contains formatting errors.
;;;
;;; Version 0.05 - 3 Jun 1992
;;; Add to list of removed commands. Improve messages.
;;;
;;; Version 0.04 - 27 Jan 1992
;;; Rewrite to insert detexinfo'd text into a temporary buffer.
;;;
;;; Version 0.03 - 27 Dec 1991
;;; Improved messages.
;;;
;;; Version 0.02 - 13 Nov 1991
;;; detexinfo-remove-inline-cmd, detexinfo-syntax-table: Handle
;;; nested commands.
;;; detexinfo: Handle nested @'s, eg @samp{@}} and @samp{@@};
;;; replace @TeX{} with TeX.
;;;
;;; Version 0.01 - 13 Nov 1991
;;;
;;; Based on detex.el, by Bengt Martensson, 4 Oct 1987
;;;
;;;;;;;;;;;;;;;;
(defvar detexinfo-buffer-name "*detexinfo*"
"*Name of the temporary buffer used by \\[detexinfo].")
(defvar detexinfo-syntax-table nil)
(if detexinfo-syntax-table
nil
(setq detexinfo-syntax-table (make-syntax-table))
(modify-syntax-entry ?\[ "." detexinfo-syntax-table)
(modify-syntax-entry ?\] "." detexinfo-syntax-table)
(modify-syntax-entry ?\" "." detexinfo-syntax-table)
(modify-syntax-entry ?\\ "." detexinfo-syntax-table)
(modify-syntax-entry ?\( "." detexinfo-syntax-table)
(modify-syntax-entry ?\) "." detexinfo-syntax-table)
(modify-syntax-entry ?{ "(}" detexinfo-syntax-table)
(modify-syntax-entry ?} "){" detexinfo-syntax-table))
(defun detexinfo ()
"Remove Texinfo commands from current buffer, copying result to new buffer.
BUG: Fails if Texinfo source file contains formatting errors."
(interactive)
(let ((input-buffer (current-buffer)))
;; Find a buffer to use.
(switch-to-buffer (get-buffer-create detexinfo-buffer-name))
(setq major-mode 'detexinfo-mode)
(set-syntax-table detexinfo-syntax-table)
(erase-buffer)
(insert-buffer-substring input-buffer)
;; Replace @{ and @} with %#* and *#% temporarily, so @samp{@{} works.
;; What is a better way of doing this??
(goto-char (point-min))
(while (search-forward "@{" nil t) ; e.g., @samp{@{}
(replace-match "%#*"))
(goto-char (point-min))
(while (search-forward "@}" nil t)
(forward-char -3) ; e.g., @samp{@@}
(if (looking-at "@") ; Two @@ in a row
(progn
(delete-char 2)
(insert "%&%#"))
(forward-char 1)
(delete-char 2)
(insert "*#%")))
(goto-char (point-min))
;; Remove @refill, the only inline command without braces.
(while (search-forward "@refill" nil t)
(replace-match ""))
;; Replace @TeX{} with TeX
(goto-char (point-min))
(while (search-forward "@TeX{}" nil t) (replace-match "TeX" t t))
(detexinfo-remove-line-cmds-without-arg)
(detexinfo-remove-inline-cmds-without-arg)
(detexinfo-remove-inline-cmds-keep-arg)
(detexinfo-remove-line-cmds-deletable-arg)
(detexinfo-remove-line-cmds-maybe-delete-arg)
(detexinfo-remove-line-cmds-keep-arg)
;; Now replace %#*, *#%, and %&%# with {, }, and @@.
(goto-char (point-min))
(while (search-forward "%#*" nil t)
(replace-match "{"))
(goto-char (point-min))
(while (search-forward "*#%" nil t)
(replace-match "}"))
(goto-char (point-min))
(while (search-forward "%&%#" nil t)
(replace-match "@@"))
;; Scan for remaining two character @-commands
(goto-char (point-min))
(while (search-forward "@" nil t)
(cond ((looking-at "[*:]")
(delete-region (1- (point)) (1+ (point))))
((looking-at "[{}^@.'`]\"?!")
(delete-region (1- (point)) (point)))))
(goto-char (point-min))
(message "Done...removed Texinfo commands from buffer. You may save it.")))
(defun detexinfo-remove-whole-line (cmd)
"Delete Texinfo line command CMD at beginning of line and rest of line."
(goto-char (point-min))
(while
(re-search-forward
(concat "^@" cmd "[ \n]+") (point-max) t)
(goto-char (match-beginning 0))
(delete-region
(point) (save-excursion (end-of-line) (1+ (point))))))
(defun detexinfo-remove-inline-cmd (cmd)
"Delete Texinfo inline command CMD, eg. @point, @code."
(goto-char (point-min))
(while
(re-search-forward (concat "@" cmd "{") (point-max) t)
(save-excursion
(forward-char -1)
(forward-sexp 1)
(delete-char -1)) ; delete right brace
(delete-region (point) (match-beginning 0))))
;;;;;;;;;;;;;;;;
;;; 1. @setfilename and other line commands with args to delete
(defvar detexinfo-line-cmds-deletable-arg
'("enumerate" "ftable" "vtable" "itemize" "table"
"setfilename" "settitle" "setchapternewpage"
"footnotestyle" "paragraphindent"
"include" "need" "sp"
"clear" "ifclear" "ifset" "set"
"defcodeindex" "defindex" "syncodeindex" "synindex")
"List of Texinfo commands whose arguments should be deleted.")
(defun detexinfo-remove-line-cmds-deletable-arg ()
"Delete Texinfo line commands together with their args, eg @setfilename."
(message "Removing commands such as @enumerate...with their arguments...")
(mapcar 'detexinfo-remove-whole-line
detexinfo-line-cmds-deletable-arg))
;;; 2. @cindex and other cmds with args that may be deleted
;;; This list is here just to make it easier to revise the
;;; categories. In particular, you might want to keep the index entries.
(defvar detexinfo-line-cmds-maybe-delete-arg
'("cindex" "findex" "kindex" "pindex" "tindex" "vindex" "node"
"c" "comment" "end" "headings" "printindex" "vskip"
"evenfooting" "evenheading" "everyfooting" "everyheading"
"oddfooting" "oddheading")
"List of Texinfo commands whose arguments may possibly be deleted.")
(defun detexinfo-remove-line-cmds-maybe-delete-arg ()
"Delete Texinfo line commands together with their arguments, eg, @cindex."
(message "Removing commands such as @cindex...with their arguments...")
(mapcar 'detexinfo-remove-whole-line
detexinfo-line-cmds-maybe-delete-arg))
;;; 3. @chapter and other line cmds with args to keep.
(defvar detexinfo-line-cmds-keep-arg
'("top" "chapter" "section" "subsection" "subsubsection"
"unnumbered" "unnumberedsec" "unnumberedsubsec" "unnumberedsubsubsec"
"majorheading" "chapheading" "heading" "subheading" "subsubheading"
"appendix" "appendixsec" "appendixsubsec" "appendixsubsubsec"
"item" "itemx"
"title" "subtitle" "center" "author" "exdent"
"defcv" "deffn" "defivar" "defmac" "defmethod" "defop" "defopt"
"defspec" "deftp" "deftypefn" "deftypefun" "deftypvr"
"deftypevar" "defun" "defvar" "defvr")
"List of Texinfo line commands whose arguments should be kept.")
(defun detexinfo-remove-line-cmds-keep-arg ()
"Delete Texinfo line commands but keep their arguments, eg @chapter."
(message "Removing commands such as @chapter...but not their arguments...")
(mapcar 'detexinfo-remove-line-cmd-keep-arg
detexinfo-line-cmds-keep-arg))
(defun detexinfo-remove-line-cmd-keep-arg (cmd)
"Delete Texinfo line command CMD but keep its argument, eg @chapter."
(goto-char (point-min))
(while
(re-search-forward
(concat "^@" cmd "[ \n]+") (point-max) t)
(delete-region (match-beginning 0) (match-end 0))))
;;; 4. @bye and other line commands without args.
(defvar detexinfo-line-cmds-without-arg
'("bye" "contents" "display" "example" "finalout"
"flushleft" "flushright" "format" "group" "ifhtml" "ifinfo" "iftex"
"ignore" "lisp" "menu" "noindent" "page" "quotation"
"shortcontents" "smallbook" "smallexample" "smalllisp"
"summarycontents" "tex" "thischapter" "thischaptername"
"thisfile" "thispage" "thissection" "thistitle" "titlepage")
"List of Texinfo commands without arguments that should be deleted.")
(defun detexinfo-remove-line-cmds-without-arg ()
"Delete line Texinfo commands that lack args, eg. @example."
(message "Removing commands such as @example...that lack arguments...")
(mapcar 'detexinfo-remove-whole-line
detexinfo-line-cmds-without-arg))
;;; 5. @equiv and other inline cmds without args.
(defvar detexinfo-inline-cmds-without-arg
'("equiv" "error" "expansion" "point" "print" "result"
"asis" "br" "bullet" "dots" "minus" "today")
"List of Texinfo inline commands without arguments that should be deleted.")
(defun detexinfo-remove-inline-cmds-without-arg ()
"Delete Texinfo inline commands in that lack arguments."
(message "Removing within line commands such as @result...")
(mapcar 'detexinfo-remove-inline-cmd
detexinfo-inline-cmds-without-arg))
;;; 6. @code and other inline cmds with args to keep
(defvar detexinfo-inline-cmds-keep-arg
'("b" "cartouche" "cite" "code" "copyright" "ctrl" "dfn" "dmn"
"emph" "file" "footnote" "i" "inforef"
"kbd" "key" "pxref" "r" "ref" "samp" "sc" "titlefont"
"strong" "t" "var" "w" "xref")
"List of Texinfo inline commands with arguments that should be kept.")
(defun detexinfo-remove-inline-cmds-keep-arg ()
"Delete Texinfo inline commands but keep its arg, eg. @code."
(message
"Removing within line commands such as @code...but not their arguments...")
(mapcar 'detexinfo-remove-inline-cmd
detexinfo-inline-cmds-keep-arg))
;;;;;;;;;;;;;;;; end detexinfo.el ;;;;;;;;;;;;;;;;
#!/bin/sh
# $Id: elisp-comp,v 1.1.1.1 1997/08/21 22:57:57 jason Exp $
# Trivial script to compile the Elisp files.
setpath=${TMPDIR-/tmp}/elc.$$
echo "(setq load-path (cons nil load-path))" > $setpath
emacs -batch -l $setpath -f batch-byte-compile "$@"
rm -f $setpath
;;; makeinfo.el --- run makeinfo conveniently
;; Copyright (C) 1991, 1993 Free Software Foundation, Inc.
;; Author: Robert J. Chassell
;; Maintainer: FSF
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;; The Texinfo mode `makeinfo' related commands are:
;; makeinfo-region to run makeinfo on the current region.
;; makeinfo-buffer to run makeinfo on the current buffer, or
;; with optional prefix arg, on current region
;; kill-compilation to kill currently running makeinfo job
;; makeinfo-recenter-makeinfo-buffer to redisplay *compilation* buffer
;;; Keybindings (defined in `texinfo.el')
;; makeinfo bindings
; (define-key texinfo-mode-map "\C-c\C-m\C-r" 'makeinfo-region)
; (define-key texinfo-mode-map "\C-c\C-m\C-b" 'makeinfo-buffer)
; (define-key texinfo-mode-map "\C-c\C-m\C-k" 'kill-compilation)
; (define-key texinfo-mode-map "\C-c\C-m\C-l"
; 'makeinfo-recenter-compilation-buffer)
;;; Code:
;;; Variables used by `makeinfo'
(require 'compile)
(defgroup makeinfo nil
"Run makeinfo conveniently"
:group 'docs)
(defcustom makeinfo-run-command "makeinfo"
"*Command used to run `makeinfo' subjob.
The name of the file is appended to this string, separated by a space."
:type 'string
:group 'makeinfo)
(defcustom makeinfo-options "--fill-column=70"
"*String containing options for running `makeinfo'.
Do not include `--footnote-style' or `--paragraph-indent';
the proper way to specify those is with the Texinfo commands
`@footnotestyle` and `@paragraphindent'."
:type 'string
:group 'makeinfo)
(require 'texinfo)
(defvar makeinfo-compilation-process nil
"Process that runs `makeinfo'. Should start out nil.")
(defvar makeinfo-temp-file nil
"Temporary file name used for text being sent as input to `makeinfo'.")
(defvar makeinfo-output-file-name nil
"Info file name used for text output by `makeinfo'.")
;;; The `makeinfo' function definitions
(defun makeinfo-region (region-beginning region-end)
"Make Info file from region of current Texinfo file, and switch to it.
This command does not offer the `next-error' feature since it would
apply to a temporary file, not the original; use the `makeinfo-buffer'
command to gain use of `next-error'."
(interactive "r")
(let (filename-or-header
filename-or-header-beginning
filename-or-header-end)
;; Cannot use `let' for makeinfo-temp-file or
;; makeinfo-output-file-name since `makeinfo-compilation-sentinel'
;; needs them.
(setq makeinfo-temp-file
(concat
(make-temp-name
(substring (buffer-file-name)
0
(or (string-match "\\.tex" (buffer-file-name))
(length (buffer-file-name)))))
".texinfo"))
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(let ((search-end (save-excursion (forward-line 100) (point))))
;; Find and record the Info filename,
;; or else explain that a filename is needed.
(if (re-search-forward
"^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*"
search-end t)
(setq makeinfo-output-file-name
(buffer-substring (match-beginning 1) (match-end 1)))
(error
"The texinfo file needs a line saying: @setfilename <name>"))
;; Find header and specify its beginning and end.
(goto-char (point-min))
(if (and
(prog1
(search-forward tex-start-of-header search-end t)
(beginning-of-line)
;; Mark beginning of header.
(setq filename-or-header-beginning (point)))
(prog1
(search-forward tex-end-of-header nil t)
(beginning-of-line)
;; Mark end of header
(setq filename-or-header-end (point))))
;; Insert the header into the temporary file.
(write-region
(min filename-or-header-beginning region-beginning)
filename-or-header-end
makeinfo-temp-file nil nil)
;; Else no header; insert @filename line into temporary file.
(goto-char (point-min))
(search-forward "@setfilename" search-end t)
(beginning-of-line)
(setq filename-or-header-beginning (point))
(forward-line 1)
(setq filename-or-header-end (point))
(write-region
(min filename-or-header-beginning region-beginning)
filename-or-header-end
makeinfo-temp-file nil nil))
;; Insert the region into the file.
(write-region
(max region-beginning filename-or-header-end)
region-end
makeinfo-temp-file t nil)
;; Run the `makeinfo-compile' command in the *compilation* buffer
(save-excursion
(makeinfo-compile
(concat makeinfo-run-command
" "
makeinfo-options
" "
makeinfo-temp-file)
"Use `makeinfo-buffer' to gain use of the `next-error' command"
nil)))))))
;;; Actually run makeinfo. COMMAND is the command to run.
;;; ERROR-MESSAGE is what to say when next-error can't find another error.
;;; If PARSE-ERRORS is non-nil, do try to parse error messages.
(defun makeinfo-compile (command error-message parse-errors)
(let ((buffer
(compile-internal command error-message nil
(and (not parse-errors)
;; If we do want to parse errors, pass nil.
;; Otherwise, use this function, which won't
;; ever find any errors.
'(lambda (&rest ignore)
(setq compilation-error-list nil))))))
(set-process-sentinel (get-buffer-process buffer)
'makeinfo-compilation-sentinel)))
;; Delete makeinfo-temp-file after processing is finished,
;; and visit Info file.
;; This function is called when the compilation process changes state.
;; Based on `compilation-sentinel' in compile.el
(defun makeinfo-compilation-sentinel (proc msg)
(compilation-sentinel proc msg)
(if (and makeinfo-temp-file (file-exists-p makeinfo-temp-file))
(delete-file makeinfo-temp-file))
;; Always use the version on disk.
(if (get-file-buffer makeinfo-output-file-name)
(progn (set-buffer makeinfo-output-file-name)
(revert-buffer t t))
(find-file makeinfo-output-file-name))
(goto-char (point-min)))
(defun makeinfo-buffer ()
"Make Info file from current buffer.
Use the \\[next-error] command to move to the next error
\(if there are errors\)."
(interactive)
(cond ((null buffer-file-name)
(error "Buffer not visiting any file"))
((buffer-modified-p)
(if (y-or-n-p "Buffer modified; do you want to save it? ")
(save-buffer))))
;; Find and record the Info filename,
;; or else explain that a filename is needed.
(save-excursion
(goto-char (point-min))
(let ((search-end (save-excursion (forward-line 100) (point))))
(if (re-search-forward
"^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*"
search-end t)
(setq makeinfo-output-file-name
(buffer-substring (match-beginning 1) (match-end 1)))
(error
"The texinfo file needs a line saying: @setfilename <name>"))))
(save-excursion
(makeinfo-compile
(concat makeinfo-run-command " " makeinfo-options
" " buffer-file-name)
"No more errors."
t)))
(defun makeinfo-recenter-compilation-buffer (linenum)
"Redisplay `*compilation*' buffer so most recent output can be seen.
The last line of the buffer is displayed on
line LINE of the window, or centered if LINE is nil."
(interactive "P")
(let ((makeinfo-buffer (get-buffer "*compilation*"))
(old-buffer (current-buffer)))
(if (null makeinfo-buffer)
(message "No *compilation* buffer")
(pop-to-buffer makeinfo-buffer)
(bury-buffer makeinfo-buffer)
(goto-char (point-max))
(recenter (if linenum
(prefix-numeric-value linenum)
(/ (window-height) 2)))
(pop-to-buffer old-buffer)
)))
;;; Place `provide' at end of file.
(provide 'makeinfo)
;;; makeinfo.el ends here
;; -*- Mode: Emacs-Lisp -*-
;; This is the `new-useful-setqs' file
;; This overrides old defvars since they were revised.
(setq texinfmt-version "2.35 of 10 September 1996")
(setq texinfo-master-menu-header
"\n@detailmenu\n --- The Detailed Node Listing ---\n")
(setq texinfo-environment-regexp
(concat
"^@"
"\\("
"cartouche\\|"
"display\\|"
"end\\|"
"enumerate\\|"
"example\\|"
"f?table\\|"
"flushleft\\|"
"flushright\\|"
"format\\|"
"group\\|"
"ifhtml\\|"
"ifinfo\\|"
"iftex\\|"
"ignore\\|"
"itemize\\|"
"lisp\\|"
"macro\\|"
"multitable\\|"
"quotation\\|"
"smallexample\\|"
"smalllisp\\|"
"tex"
"\\)")
)
(setq texinfo-no-refill-regexp
(concat
"^@"
"\\("
"example\\|"
"smallexample\\|"
"lisp\\|"
"smalllisp\\|"
"display\\|"
"format\\|"
"flushleft\\|"
"flushright\\|"
"menu\\|"
"multitable\\|"
"titlepage\\|"
"iftex\\|"
"ifhtml\\|"
"tex\\|"
"html"
"\\)"))
(setq texinfo-accent-commands
(concat
"@OE\\|"
"@oe\\|"
"@AA\\|"
"@aa\\|"
"@AE\\|"
"@ae\\|"
"@ss\\|"
"@^\\|"
"@`\\|"
"@'\\|"
"@\"\\|"
"@,\\|"
"@=\\|"
"@~\\|"
"@questiondown{\\|"
"@exclamdown{\\|"
"@L{\\|"
"@l{\\|"
"@O{\\|"
"@o{\\|"
"@dotaccent{\\|"
"@ubaraccent{\\|"
"@d{\\|"
"@H{\\|"
"@ringaccent{\\|"
"@tieaccent{\\|"
"@u{\\|"
"@v{\\|"
"@dotless{"
))
(setq texinfo-part-of-para-regexp
(concat
"^@"
"\\("
"b{\\|"
"bullet{\\|"
"cite{\\|"
"code{\\|"
"emph{\\|"
"equiv{\\|"
"error{\\|"
"expansion{\\|"
"file{\\|"
"i{\\|"
"inforef{\\|"
"kbd{\\|"
"key{\\|"
"lisp{\\|"
"email{\\|"
"minus{\\|"
"point{\\|"
"print{\\|"
"pxref{\\|"
"r{\\|"
"ref{\\|"
"result{\\|"
"samp{\\|"
"sc{\\|"
"t{\\|"
"TeX{\\|"
"today{\\|"
"url{\\|"
"var{\\|"
"w{\\|"
"xref{\\|"
"@-\\|" ; @- is a descretionary hyphen (not an accent) (a noop).
texinfo-accent-commands
"\\)"
))
(setq texinfo-raisesections-alist
'((@chapter . @chapter) ; Cannot go higher
(@unnumbered . @unnumbered)
(@centerchap . @unnumbered)
(@majorheading . @majorheading)
(@chapheading . @chapheading)
(@appendix . @appendix)
(@section . @chapter)
(@unnumberedsec . @unnumbered)
(@heading . @chapheading)
(@appendixsec . @appendix)
(@subsection . @section)
(@unnumberedsubsec . @unnumberedsec)
(@subheading . @heading)
(@appendixsubsec . @appendixsec)
(@subsubsection . @subsection)
(@unnumberedsubsubsec . @unnumberedsubsec)
(@subsubheading . @subheading)
(@appendixsubsubsec . @appendixsubsec)))
(setq texinfo-lowersections-alist
'((@chapter . @section)
(@unnumbered . @unnumberedsec)
(@centerchap . @unnumberedsec)
(@majorheading . @heading)
(@chapheading . @heading)
(@appendix . @appendixsec)
(@section . @subsection)
(@unnumberedsec . @unnumberedsubsec)
(@heading . @subheading)
(@appendixsec . @appendixsubsec)
(@subsection . @subsubsection)
(@unnumberedsubsec . @unnumberedsubsubsec)
(@subheading . @subsubheading)
(@appendixsubsec . @appendixsubsubsec)
(@subsubsection . @subsubsection) ; Cannot go lower.
(@unnumberedsubsubsec . @unnumberedsubsubsec)
(@subsubheading . @subsubheading)
(@appendixsubsubsec . @appendixsubsubsec)))
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/sh
#
# generate an Info directory, given a directory of Info files and a
# list of entries. The output will be suitable for a dir.info file,
# in the order given in the skeleton file
INFODIR=$1
if [ $# = 2 ] ; then
SKELETON=$2
else
SKELETON=/dev/null
fi
skip=
if [ $# -gt 2 ] ; then
echo usage: $0 info-directory [ skeleton-file ] 1>&2
exit 1
else
true
fi
if [ ! -d ${INFODIR} ] ; then
echo "$0: first argument must specify a directory"
exit 1
fi
infofiles=`(cd ${INFODIR}; ls *.info | sort | sed "s/dir\.info//")`
template=`cat ${SKELETON}`
### output the dir.info header
echo "-*- Text -*-"
echo "This file was generated automatically by the gen-info-dir script."
echo "This version was generated on `date`"
echo "by `whoami`@`hostname` for `(cd ${INFODIR}; pwd)`"
cat << moobler
This is the file .../info/dir, which contains the topmost node of the
Info hierarchy. The first time you invoke Info you start off
looking at that node, which is (dir)Top.

File: dir Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h"
gives a primer for first-timers, "mTexinfo<Return>" visits Texinfo topic,
etc.
--- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---
* Menu: The list of major topics begins on the next line.
moobler
### go through the list of files in the template. If an info file
### exists, grab the ENTRY information from it. If there is no entry
### info, then create a minimal dir entry, otherwise use the given info.
###
### Then remove that file from the list of existing files. If any
### additional files remain (ones that don't have a template entry),
### then generate entries for those in the same way, putting the info for
### those at the very end....
for file in ${template} ; do
if [ "${file}" = "--" ] ; then
skip=1
else
if [ -f ${INFODIR}/${file}.info ] ; then
entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/${file}.info`
if [ ! -z "${skip}" ] ; then
echo
skip=
fi
if [ ! -z "${entry}" ] ; then
echo "${entry}"
else
echo "* ${file}: (${file})."
fi
infofiles=`echo ${infofiles} | sed -e "s/${file}\.info//"`
fi
fi
done
if [ -z "${infofiles}" ] ; then
exit 0
else
echo
fi
for file in ${infofiles}; do
entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/${file}`
if [ ! -z "${entry}" ] ; then
echo "${entry}"
else
echo "* ${file}: (${file})."
fi
done
## Makefile.am for texinfo/info.
## $Id: Makefile.am,v 1.1.1.2 1998/03/24 18:20:06 law Exp $
## Run automake in .. to produce Makefile.in from this.
noinst_PROGRAMS = makedoc
# Use `ginfo' for building to avoid confusion with the standard `info'
# target. The install rule removes the `g' before applying any
# user-specified name transformations.
bin_PROGRAMS = ginfo
transform = s/ginfo/info/; @program_transform_name@
localedir = $(datadir)/locale
# -I. for funs.h.
# Automake puts -I.. and -I$(srcdir) into DEFS by default, but
# we need to override it, so include them ourselves.
INCLUDES = -I. -I$(top_srcdir)/lib -I../intl -I.. -I$(srcdir)
DEFS = -DINFODIR=\"$(infodir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
LDADD = ../lib/libtxi.a @TERMLIBS@ @INTLLIBS@
makedoc_SOURCES = makedoc.c
ginfo_SOURCES = dir.c display.c display.h doc.c doc.h dribble.c dribble.h \
echo-area.c echo-area.h \
filesys.c filesys.h footnotes.c footnotes.h funs.h gc.c gc.h \
indices.c indices.h info-utils.c info-utils.h info.c info.h infodoc.c \
infomap.c infomap.h m-x.c man.c man.h nodemenu.c nodes.c nodes.h \
search.c search.h session.c session.h signals.c signals.h \
termdep.h terminal.c terminal.h tilde.c tilde.h \
variables.c variables.h window.c window.h
EXTRA_DIST = README
# The files `doc.c' and `funs.h' are created by ./makedoc run over the source
# files which contain DECLARE_INFO_COMMAND. `funs.h' is a header file
# listing the functions found. `doc.c' is a structure containing pointers
# to those functions along with completable names and documentation strings.
BUILT_SOURCES = doc.c funs.h
cmd_sources = $(srcdir)/session.c $(srcdir)/echo-area.c $(srcdir)/infodoc.c \
$(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \
$(srcdir)/footnotes.c $(srcdir)/variables.c
$(BUILT_SOURCES): makedoc $(cmd_sources)
./makedoc $(cmd_sources)
This release of Info is version 2.11. Please read the file README.
Version 2.11, Sat Apr 1 09:15:21 1995
Changes since 2.7 beta:
Although the basic code remains the same, there are numerous nits
fixed, including some display bugs, and a memory leak. Some changes
that have taken place with larger impact include the way in which the
(dir) node is built; I have added in support for "localdir"
directories among other things. Info files may be stored in
compressed formats, and in their own subdirectories; menu items which
do not explicitly name the node to which they are attached have the
menu item name looked up as an Info file if it is not found within the
current document. This means that the menu item:
* Info:: The Info documentation reader.
in (dir) refers to the info node "(info)Top".
Please see the ChangeLog and documentation for details on other
changes.
Version 2.7 beta, Wed Dec 30 02:02:38 1992
Version 2.6 beta, Tue Dec 22 03:58:07 1992
Version 2.5 beta, Tue Dec 8 14:50:35 1992
Version 2.4 beta, Sat Nov 28 14:34:02 1992
Version 2.3 beta, Fri Nov 27 01:04:13 1992
Version 2.2 beta, Tue Nov 24 09:36:08 1992
Version 2.1 beta, Tue Nov 17 23:29:36 1992
Changes since 2.5 beta:
Note that versions 2.6 and 2.7 Beta were only released to a select group.
* "info-" removed from the front of M-x commands.
* Automatic footnote display. When you enter a node which contains
footnotes, and the variable "automatic-footnotes" is "On", Info pops
up a window containing the footnotes. Likewise, when you leave that
node, the window containing the footnotes goes away.
* Cleaner built in documentation, and documentation functions.
Use:
o `M-x describe-variable' to read a variable's documenation
o `M-x describe-key' to find out what a particular keystroke does.
o `M-x describe-function' to read a function's documentation.
o `M-x where-is' to find out what keys invoke a particular function.
* Info can "tile" the displayed windows (via "M-x tile-windows"). If
the variable "automatic-tiling" is "On", then splitting a window or
deleting a window causes the remaining windows to be retiled.
* You can save every keystroke you type in a "dribble file" by using the
`--dribble FILENAME' option. You can initially read keystrokes from an
alternate input stream with `--restore FILENAME', or by redirecting
input on the command line `info < old-dribble'.
* New behaviour of menu items. If the label is the same as the
target node name, and the node couldn't be found in the current file,
treat the label as a file name. For example, a menu entry in "DIR"
might contain:
* Emacs:: Cool text-editor.
Info would not find the node "(dir)Emacs", so just plain "(emacs)"
would be tried.
* New variable "ISO-Latin" allows you to use European machines with
8-bit character sets.
* Cleanups in echo area reading, and redisplay. Cleanups in handling the
window which shows possible completions.
* Info can now read files that have been compressed. An array in filesys.c
maps extensions to programs that can decompress stdin, and write the results
to stdout. Currently, ".Z"/uncompress, ".z"/gunzip, and ".Y"/unyabba are
supported. The modeline for a compressed file shows "zz" in it.
* There is a new variable "gc-compressed-files" which, if non-zero, says
it is okay to reclaim the file buffer space allocated to a file which
was compressed, if, and only if, that file's contents do not appear in
any history node.
* New file `nodemenu.c' implements a few functions for manipulating
previously visited nodes. `C-x C-b' (list-visited-nodes) produces a
menu of the nodes that could be reached by info-history-node in some
window. `C-x b' (select-visited-node) is similar, but reads one of
the node names with completion.
* Keystroke `M-r' (move_to_screen_line) allows the user to place the cursor at
the start of a specific screen line. Without a numeric argument, place the
cursor on the center line; with an arg, place the cursor on that line.
* Interruptible display implemented. Basic display speedups and hacks.
* The message "*** Tags Out of Date ***" now means what it says.
* Index searching with `,' (info-index-next) has been improved.
* When scrolling with C-v, C-M-v, or M-v, only "Page Only" scrolling
will happen.
* Continous scrolling (along with `]' (info-global-next) and `['
(info-global-prev) works better. `]' and `[' accept numeric
arguments, moving that many nodes in that case.
* `C-x w' (info-toggle-wrap) controls how lines wider than the width
of the screen are displayed. If a line is too long, a `$' is
displayed in the rightmost column of the window.
* There are some new variables for controlling the behaviour of Info
interactively. The current list of variables is as follows:
Variable Name Default Value Description
------------- ------------- -----------
`automatic-footnotes' On When "On", footnotes appear and
disappear automatically.
`automatic-tiling' Off When "On", creating of deleting a
window resizes other windows.
`visible-bell' Off If non-zero, try to use a visible bell.
`errors-ring-bell' On If non-zero, errors cause a ring.
`show-index-match' On If non-zero, the portion of the string
matched is highlighted by changing its
case.
`scroll-behaviour' Continuous One of "Continuous", "Next Only", or
"Page Only". "Page Only" prevents you from
scrolling past the bottom or top of a node.
"Next Only" causes the Next or Prev node to
be selected when you scroll past the bottom
or top of a node. "Continous" moves
linearly through the files hierchichal
structure.
`scroll-step' 0 Controls how scrolling is done for you when
the cursor moves out of the current window.
Non-zero means it is the number of lines
you would like the screen to shift. A
value of 0 means to center the line
containing the cursor in the window.
`gc-compressed-files' Off If non-zero means it is okay to reclaim the
file buffer space allocated to a file which
was compressed, if, and only if, that
file's contents do not appear in the node
list of any window.
`ISO-Latin' Off Non-zero means that you are using an ISO
Latin character set. By default, standard
ASCII characters are assumed.
________________________________________
This release of Info is version 2.5 beta.
Changes since 2.4 beta:
* Index (i) and (,) commands fully implemented.
* "configure" script now shipped with Info.
* New function "set-variable" allows users to set various variables.
* User-settable behaviour on end or beginning of node scrolling. This
supercedes the SPC and DEL changes in 2.3 beta.
________________________________________
This release of Info is version 2.4 beta.
Changes since 2.3 beta:
* info-last-node now means move to the last node of this info file.
* info-history-node means move backwards through this window's node history.
* info-first-node moves to the first node in the Info file. This node is
not necessarily "Top"!
* SPC and DEL can select the Next or Prev node after printing an informative
message when pressed at the end/beg of a node.
----------------------------------------
This release of Info is version 2.3 beta.
Changes since 2.2 beta:
* M-x command lines if NAMED_COMMANDS is #defined. Variable in Makefile.
* Screen height changes made quite robust.
* Interactive function "set-screen-height" implements user height changes.
* Scrolling on some terminals is faster now.
* C-l with numeric arguement is fixed.
----------------------------------------
This release of Info is version 2.2 beta.
Changes since 2.0:
* C-g can now interrupt multi-file searches.
* Incremental search is fully implemented.
* Loading large tag tables is much faster now.
* makedoc.c replaces shell script, speeding incremental builds.
* Scrolling in redisplay is implemented.
* Recursive uses of the echo area made more robust.
* Garbage collection of unreferenced nodes.
Info 2.0 is a complete rewrite of the original standalone Info I wrote in
1987, the first program I wrote for rms. That program was something like
my second Unix program ever, and my die-hard machine language coding habits
tended to show through. I found the original Info hard to read and
maintain, and thus decided to write this one.
The rewrite consists of about 12,000 lines of code written in about 12
days. I believe this version of Info to be in much better shape than the
original Info.
Info 2.0 is substantially different from its original standalone
predecessor. It appears almost identical to the GNU Emacs version, but has
the advantages of smaller size, ease of portability, and a built in library
which can be used in other programs (to get or display documentation from
Info files, for example).
I eagerly await responses to this newer version of Info; comments on its
portability, ease of use and user interface, code quality, and general
usefulness are all of interest to me, and I will appreciate any comments
that you would care to make.
A full listing of the commands available in Info can be gotten by typing
`?' while within an Info window. This produces a node in a window which
can be viewed just like any Info node.
--Brian Fox <bfox@gnu.org>
/* clib.c: Functions which we normally expect to find in the C library.
$Id: clib.c,v 1.1.1.1 1997/08/21 22:57:59 jason Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#include <stdio.h>
#if defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif
#if defined (HAVE_STDLIB_H)
#include <stdlib.h>
#endif
#if defined (HAVE_STRING_H)
#include <string.h>
#endif
#include <sys/errno.h>
extern void *xmalloc (), *xrealloc ();
#include "general.h"
#if !defined (errno)
extern int errno;
#endif
#if !defined (HAVE_STRERROR)
extern char *sys_errlist[];
extern int sys_nerr;
char *
strerror (num)
int num;
{
if (num >= sys_nerr)
return ("");
else
return (sys_errlist[num]);
}
#endif /* !HAVE_STRERROR */
#if !defined (HAVE_STRCASECMP)
/* This Unix doesn't have the strcasecmp () function. */
int
strcasecmp (string1, string2)
char *string1, *string2;
{
char ch1, ch2;
for (;;)
{
ch1 = *string1++;
ch2 = *string2++;
if (!(ch1 | ch2))
return (0);
ch1 = info_toupper (ch1);
ch2 = info_toupper (ch2);
if (ch1 != ch2)
return (ch1 - ch2);
}
}
/* Compare at most COUNT characters from string1 to string2. Case
doesn't matter. */
int
strncasecmp (string1, string2, count)
char *string1, *string2;
int count;
{
register char ch1, ch2;
while (count)
{
ch1 = *string1++;
ch2 = *string2++;
ch1 = info_toupper (ch1);
ch2 = info_toupper (ch2);
if (ch1 == ch2)
count--;
else
break;
}
return (count);
}
#endif /* !STRCASECMP */
/* clib.h: Declarations of functions which appear in clib.c (or libc.a). */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#if !defined (_CLIB_H_)
#define _CLIB_H_
#if !defined (HAVE_STRDUP)
extern char *strdup ();
#endif
#if !defined (HAVE_STRERROR)
extern char *strerror ();
#endif
#if !defined (HAVE_STRCASECMP)
extern int strcasecmp ();
extern int strncasecmp ();
#endif
#endif /* !_CLIB_H_ */
/* dir.c -- How to build a special "dir" node from "localdir" files.
$Id: dir.c,v 1.1.1.2 1998/03/22 20:42:22 law Exp $
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "info-utils.h"
#include "filesys.h"
#include "tilde.h"
/* The "dir" node can be built from the contents of a file called "dir",
with the addition of the menus of every file named in the array
dirs_to_add which are found in INFOPATH. */
static void add_menu_to_file_buffer (), insert_text_into_fb_at_binding ();
static char *dirs_to_add[] = {
"dir", "localdir", (char *)NULL
};
/* Return zero if the file represented in the stat structure TEST has
already been seen, nonzero else. */
typedef struct
{
unsigned long device;
unsigned long inode;
} dir_file_list_entry_type;
static int
new_dir_file_p (test)
struct stat *test;
{
static unsigned dir_file_list_len = 0;
static dir_file_list_entry_type *dir_file_list = NULL;
unsigned i;
for (i = 0; i < dir_file_list_len; i++)
{
dir_file_list_entry_type entry;
entry = dir_file_list[i];
if (entry.device == test->st_dev && entry.inode == test->st_ino)
return 0;
}
dir_file_list_len++;
dir_file_list = xrealloc (dir_file_list,
dir_file_list_len * sizeof (dir_file_list_entry_type));
dir_file_list[dir_file_list_len - 1].device = test->st_dev;
dir_file_list[dir_file_list_len - 1].inode = test->st_ino;
return 1;
}
void
maybe_build_dir_node (dirname)
char *dirname;
{
int path_index, update_tags;
char *this_dir;
FILE_BUFFER *dir_buffer = info_find_file (dirname);
/* If there is no "dir" in the current info path, we cannot build one
from nothing. */
if (!dir_buffer)
return;
/* If this directory has already been built, return now. */
if (dir_buffer->flags & N_CannotGC)
return;
/* Initialize the list we use to avoid reading the same dir file twice
with the dir file just found. */
new_dir_file_p (&dir_buffer->finfo);
path_index = update_tags = 0;
/* Using each element of the path, check for one of the files in
DIRS_TO_ADD. Do not check for "localdir.info.Z" or anything else.
Only files explictly named are eligible. This is a design decision.
There can be an info file name "localdir.info" which contains
information on the setting up of "localdir" files. */
while ((this_dir = extract_colon_unit (infopath, &path_index)))
{
register int da_index;
char *from_file;
/* Expand a leading tilde if one is present. */
if (*this_dir == '~')
{
char *tilde_expanded_dirname;
tilde_expanded_dirname = tilde_expand_word (this_dir);
if (tilde_expanded_dirname != this_dir)
{
free (this_dir);
this_dir = tilde_expanded_dirname;
}
}
/* For every different file named in DIRS_TO_ADD found in the
search path, add that file's menu to our "dir" node. */
for (da_index = 0; (from_file = dirs_to_add[da_index]); da_index++)
{
struct stat finfo;
int statable;
int namelen = strlen (from_file);
char *fullpath = xmalloc (3 + strlen (this_dir) + namelen);
strcpy (fullpath, this_dir);
if (fullpath[strlen (fullpath) - 1] != '/')
strcat (fullpath, "/");
strcat (fullpath, from_file);
statable = (stat (fullpath, &finfo) == 0);
/* Only add this file if we have not seen it before. */
if (statable && S_ISREG (finfo.st_mode) && new_dir_file_p (&finfo))
{
long filesize;
char *contents = filesys_read_info_file (fullpath, &filesize,
&finfo);
if (contents)
{
update_tags++;
add_menu_to_file_buffer (contents, filesize, dir_buffer);
free (contents);
}
}
free (fullpath);
}
free (this_dir);
}
if (update_tags)
build_tags_and_nodes (dir_buffer);
/* Flag that the dir buffer has been built. */
dir_buffer->flags |= N_CannotGC;
}
/* Given CONTENTS and FB (a file buffer), add the menu found in CONTENTS
to the menu found in FB->contents. Second argument SIZE is the total
size of CONTENTS. */
static void
add_menu_to_file_buffer (contents, size, fb)
char *contents;
long size;
FILE_BUFFER *fb;
{
SEARCH_BINDING contents_binding, fb_binding;
long contents_offset, fb_offset;
contents_binding.buffer = contents;
contents_binding.start = 0;
contents_binding.end = size;
contents_binding.flags = S_FoldCase | S_SkipDest;
fb_binding.buffer = fb->contents;
fb_binding.start = 0;
fb_binding.end = fb->filesize;
fb_binding.flags = S_FoldCase | S_SkipDest;
/* Move to the start of the menus in CONTENTS and FB. */
contents_offset = search_forward (INFO_MENU_LABEL, &contents_binding);
fb_offset = search_forward (INFO_MENU_LABEL, &fb_binding);
/* If there is no menu in CONTENTS, quit now. */
if (contents_offset == -1)
return;
/* There is a menu in CONTENTS, and contents_offset points to the first
character following the menu starter string. Skip all whitespace
and newline characters. */
contents_offset += skip_whitespace_and_newlines (contents + contents_offset);
/* If there is no menu in FB, make one. */
if (fb_offset == -1)
{
/* Find the start of the second node in this file buffer. If there
is only one node, we will be adding the contents to the end of
this node. */
fb_offset = find_node_separator (&fb_binding);
/* If not even a single node separator, give up. */
if (fb_offset == -1)
return;
fb_binding.start = fb_offset;
fb_binding.start +=
skip_node_separator (fb_binding.buffer + fb_binding.start);
/* Try to find the next node separator. */
fb_offset = find_node_separator (&fb_binding);
/* If found one, consider that the start of the menu. Otherwise, the
start of this menu is the end of the file buffer (i.e., fb->size). */
if (fb_offset != -1)
fb_binding.start = fb_offset;
else
fb_binding.start = fb_binding.end;
insert_text_into_fb_at_binding
(fb, &fb_binding, INFO_MENU_LABEL, strlen (INFO_MENU_LABEL));
fb_binding.buffer = fb->contents;
fb_binding.start = 0;
fb_binding.end = fb->filesize;
fb_offset = search_forward (INFO_MENU_LABEL, &fb_binding);
if (fb_offset == -1)
abort ();
}
/* CONTENTS_OFFSET and FB_OFFSET point to the starts of the menus that
appear in their respective buffers. Add the remainder of CONTENTS
to the end of FB's menu. */
fb_binding.start = fb_offset;
fb_offset = find_node_separator (&fb_binding);
if (fb_offset != -1)
fb_binding.start = fb_offset;
else
fb_binding.start = fb_binding.end;
/* Leave exactly one blank line between directory entries. */
{
int num_found = 0;
while ((fb_binding.start > 0) &&
(whitespace_or_newline (fb_binding.buffer[fb_binding.start - 1])))
{
num_found++;
fb_binding.start--;
}
/* Optimize if possible. */
if (num_found >= 2)
{
fb_binding.buffer[fb_binding.start++] = '\n';
fb_binding.buffer[fb_binding.start++] = '\n';
}
else
{
/* Do it the hard way. */
insert_text_into_fb_at_binding (fb, &fb_binding, "\n\n", 2);
fb_binding.start += 2;
}
}
/* Insert the new menu. */
insert_text_into_fb_at_binding
(fb, &fb_binding, contents + contents_offset, size - contents_offset);
}
static void
insert_text_into_fb_at_binding (fb, binding, text, textlen)
FILE_BUFFER *fb;
SEARCH_BINDING *binding;
char *text;
int textlen;
{
char *contents;
long start, end;
start = binding->start;
end = fb->filesize;
contents = (char *)xmalloc (fb->filesize + textlen + 1);
memcpy (contents, fb->contents, start);
memcpy (contents + start, text, textlen);
memcpy (contents + start + textlen, fb->contents + start, end - start);
free (fb->contents);
fb->contents = contents;
fb->filesize += textlen;
fb->finfo.st_size = fb->filesize;
}
/* display.h -- How the display in Info is done.
$Id: display.h,v 1.1.1.2 1998/03/22 20:42:24 law Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#ifndef INFO_DISPLAY_H
#define INFO_DISPLAY_H
#include "info-utils.h"
#include "terminal.h"
typedef struct {
char *text; /* Text of the line as it appears. */
int textlen; /* Printable Length of TEXT. */
int inverse; /* Non-zero means this line is inverse. */
} DISPLAY_LINE;
/* An array of display lines which tell us what is currently visible on
the display. */
extern DISPLAY_LINE **the_display;
/* Non-zero means do no output. */
extern int display_inhibited;
/* Non-zero if we didn't completely redisplay a window. */
extern int display_was_interrupted_p;
/* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
extern void display_initialize_display ();
/* Clear all of the lines in DISPLAY making the screen blank. */
extern void display_clear_display ();
/* Update the windows pointed to by WINDOWS in THE_DISPLAY. This actually
writes the text on the screen. */
extern void display_update_display ();
/* Display WIN on THE_DISPLAY. Unlike display_update_display (), this
function only does one window. */
extern void display_update_one_window ();
/* Move the screen cursor to directly over the current character in WINDOW. */
extern void display_cursor_at_point ();
/* Scroll the region of the_display starting at START, ending at END, and
moving the lines AMOUNT lines. If AMOUNT is less than zero, the lines
are moved up in the screen, otherwise down. Actually, it is possible
for no scrolling to take place in the case that the terminal doesn't
support it. This doesn't matter to us. */
extern void display_scroll_display ();
/* Try to scroll lines in WINDOW. OLD_PAGETOP is the pagetop of WINDOW before
having had its line starts recalculated. OLD_STARTS is the list of line
starts that used to appear in this window. OLD_COUNT is the number of lines
that appear in the OLD_STARTS array. */
extern void display_scroll_line_starts ();
#endif /* not INFO_DISPLAY_H */
/* doc.c -- Generated structure containing function names and doc strings.
This file was automatically made from various source files with the
command "./makedoc". DO NOT EDIT THIS FILE, only "./makedoc.c".
Source files groveled to make this file include:
./session.c
./echo-area.c
./infodoc.c
./m-x.c
./indices.c
./nodemenu.c
./footnotes.c
./variables.c
An entry in the array FUNCTION_DOC_ARRAY is made for each command
found in the above files; each entry consists of a function pointer,
a string which is the user-visible name of the function,
and a string which documents its purpose. */
#include "doc.h"
#include "funs.h"
FUNCTION_DOC function_doc_array[] = {
/* Commands found in "./session.c". */
{ info_next_line, "next-line", "Move down to the next line" },
{ info_prev_line, "prev-line", "Move up to the previous line" },
{ info_end_of_line, "end-of-line", "Move to the end of the line" },
{ info_beginning_of_line, "beginning-of-line", "Move to the start of the line" },
{ info_forward_char, "forward-char", "Move forward a character" },
{ info_backward_char, "backward-char", "Move backward a character" },
{ info_forward_word, "forward-word", "Move forward a word" },
{ info_backward_word, "backward-word", "Move backward a word" },
{ info_global_next_node, "global-next-node", "Move forwards or down through node structure" },
{ info_global_prev_node, "global-prev-node", "Move backwards or up through node structure" },
{ info_scroll_forward, "scroll-forward", "Scroll forward in this window" },
{ info_scroll_backward, "scroll-backward", "Scroll backward in this window" },
{ info_beginning_of_node, "beginning-of-node", "Move to the start of this node" },
{ info_end_of_node, "end-of-node", "Move to the end of this node" },
{ info_next_window, "next-window", "Select the next window" },
{ info_prev_window, "prev-window", "Select the previous window" },
{ info_split_window, "split-window", "Split the current window" },
{ info_delete_window, "delete-window", "Delete the current window" },
{ info_keep_one_window, "keep-one-window", "Delete all other windows" },
{ info_scroll_other_window, "scroll-other-window", "Scroll the other window" },
{ info_grow_window, "grow-window", "Grow (or shrink) this window" },
{ info_tile_windows, "tile-windows", "Divide the available screen space among the visible windows" },
{ info_toggle_wrap, "toggle-wrap", "Toggle the state of line wrapping in the current window" },
{ info_next_node, "next-node", "Select the `Next' node" },
{ info_prev_node, "prev-node", "Select the `Prev' node" },
{ info_up_node, "up-node", "Select the `Up' node" },
{ info_last_node, "last-node", "Select the last node in this file" },
{ info_first_node, "first-node", "Select the first node in this file" },
{ info_last_menu_item, "last-menu-item", "Select the last item in this node's menu" },
{ info_menu_digit, "menu-digit", "Select this menu item" },
{ info_menu_item, "menu-item", "Read a menu item and select its node" },
{ info_xref_item, "xref-item", "Read a footnote or cross reference and select its node" },
{ info_find_menu, "find-menu", "Move to the start of this node's menu" },
{ info_visit_menu, "visit-menu", "Visit as many menu items at once as possible" },
{ info_goto_node, "goto-node", "Read a node name and select it" },
{ info_man, "man", "Read a manpage reference and select it" },
{ info_top_node, "top-node", "Select the node `Top' in this file" },
{ info_dir_node, "dir-node", "Select the node `(dir)'" },
{ info_history_node, "history-node", "Select the most recently selected node" },
{ info_kill_node, "kill-node", "Kill this node" },
{ info_view_file, "view-file", "Read the name of a file and select it" },
{ info_print_node, "print-node", "Pipe the contents of this node through INFO_PRINT_COMMAND" },
{ info_search, "search", "Read a string and search for it" },
{ isearch_forward, "isearch-forward", "Search interactively for a string as you type it" },
{ isearch_backward, "isearch-backward", "Search interactively for a string as you type it" },
{ info_move_to_prev_xref, "move-to-prev-xref", "Move to the previous cross reference" },
{ info_move_to_next_xref, "move-to-next-xref", "Move to the next cross reference" },
{ info_select_reference_this_line, "select-reference-this-line", "Select reference or menu item appearing on this line" },
{ info_abort_key, "abort-key", "Cancel current operation" },
{ info_move_to_window_line, "move-to-window-line", "Move to the cursor to a specific line of the window" },
{ info_redraw_display, "redraw-display", "Redraw the display" },
{ info_quit, "quit", "Quit using Info" },
{ info_do_lowercase_version, "do-lowercase-version", "" },
{ info_add_digit_to_numeric_arg, "add-digit-to-numeric-arg", "Add this digit to the current numeric argument" },
{ info_universal_argument, "universal-argument", "Start (or multiply by 4) the current numeric argument" },
{ info_numeric_arg_digit_loop, "numeric-arg-digit-loop", "Internally used by \\[universal-argument]" },
/* Commands found in "./echo-area.c". */
{ ea_forward, "echo-area-forward", "Move forward a character" },
{ ea_backward, "echo-area-backward", "Move backward a character" },
{ ea_beg_of_line, "echo-area-beg-of-line", "Move to the start of this line" },
{ ea_end_of_line, "echo-area-end-of-line", "Move to the end of this line" },
{ ea_forward_word, "echo-area-forward-word", "Move forward a word" },
{ ea_backward_word, "echo-area-backward-word", "Move backward a word" },
{ ea_delete, "echo-area-delete", "Delete the character under the cursor" },
{ ea_rubout, "echo-area-rubout", "Delete the character behind the cursor" },
{ ea_abort, "echo-area-abort", "Cancel or quit operation" },
{ ea_newline, "echo-area-newline", "Accept (or force completion of) this line" },
{ ea_quoted_insert, "echo-area-quoted-insert", "Insert next character verbatim" },
{ ea_insert, "echo-area-insert", "Insert this character" },
{ ea_tab_insert, "echo-area-tab-insert", "Insert a TAB character" },
{ ea_transpose_chars, "echo-area-transpose-chars", "Transpose characters at point" },
{ ea_yank, "echo-area-yank", "Yank back the contents of the last kill" },
{ ea_yank_pop, "echo-area-yank-pop", "Yank back a previous kill" },
{ ea_kill_line, "echo-area-kill-line", "Kill to the end of the line" },
{ ea_backward_kill_line, "echo-area-backward-kill-line", "Kill to the beginning of the line" },
{ ea_kill_word, "echo-area-kill-word", "Kill the word following the cursor" },
{ ea_backward_kill_word, "echo-area-backward-kill-word", "Kill the word preceding the cursor" },
{ ea_possible_completions, "echo-area-possible-completions", "List possible completions" },
{ ea_complete, "echo-area-complete", "Insert completion" },
{ ea_scroll_completions_window, "echo-area-scroll-completions-window", "Scroll the completions window" },
/* Commands found in "./infodoc.c". */
{ info_get_help_window, "get-help-window", "Display help message" },
{ info_get_info_help_node, "get-info-help-node", "Visit Info node `(info)Help'" },
{ describe_key, "describe-key", "Print documentation for KEY" },
{ info_where_is, "where-is", "Show what to type to execute a given command" },
/* Commands found in "./m-x.c". */
{ describe_command, "describe-command", "Read the name of an Info command and describe it" },
{ info_execute_command, "execute-command", "Read a command name in the echo area and execute it" },
{ set_screen_height, "set-screen-height", "Set the height of the displayed window" },
/* Commands found in "./indices.c". */
{ info_index_search, "index-search", "Look up a string in the index for this file" },
{ info_next_index_match, "next-index-match", "Go to the next matching index item from the last `\\[index-search]' command" },
{ info_index_apropos, "index-apropos", "Grovel all known info file's indices for a string and build a menu" },
/* Commands found in "./nodemenu.c". */
{ list_visited_nodes, "list-visited-nodes", "Make a window containing a menu of all of the currently visited nodes" },
{ select_visited_node, "select-visited-node", "Select a node which has been previously visited in a visible window" },
/* Commands found in "./footnotes.c". */
{ info_show_footnotes, "show-footnotes", "Show the footnotes associated with this node in another window" },
/* Commands found in "./variables.c". */
{ describe_variable, "describe-variable", "Explain the use of a variable" },
{ set_variable, "set-variable", "Set the value of an Info variable" },
{ (VFunction *)NULL, (char *)NULL, (char *)NULL }
};
/* doc.h -- Structure associating function pointers with documentation. */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#if !defined (DOC_H)
#define DOC_H
#include "info.h" /* for NAMED_FUNCTIONS, VFunction, etc. */
typedef struct {
VFunction *func;
#if defined (NAMED_FUNCTIONS)
char *func_name;
#endif /* NAMED_FUNCTIONS */
char *doc;
} FUNCTION_DOC;
extern FUNCTION_DOC function_doc_array[];
extern char *function_documentation ();
extern char *key_documentation ();
extern char *pretty_keyname ();
extern char *replace_in_documentation ();
extern void info_document_key ();
extern void dump_map_to_message_buffer ();
#if defined (NAMED_FUNCTIONS)
extern char *function_name ();
extern VFunction *named_function ();
#endif /* NAMED_FUNCTIONS */
#endif /* !DOC_H */
/* dribble.c -- Dribble files for Info. */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "dribble.h"
/* When non-zero, it is a stream to write all input characters to for the
duration of this info session. */
FILE *info_dribble_file = (FILE *)NULL;
/* Open a dribble file named NAME, perhaps closing an already open one.
This sets the global variable INFO_DRIBBLE_FILE to the open stream. */
void
open_dribble_file (name)
char *name;
{
/* Perhaps close existing dribble file. */
close_dribble_file ();
info_dribble_file = fopen (name, "w");
#if defined (HAVE_SETVBUF)
if (info_dribble_file)
# if defined (SETVBUF_REVERSED)
setvbuf (info_dribble_file, _IONBF, (char *)NULL, 1);
# else
setvbuf (info_dribble_file, (char *)NULL, _IONBF, 1);
# endif /* !SETVBUF_REVERSED */
#endif /* HAVE_SETVBUF */
}
/* If there is a dribble file already open, close it. */
void
close_dribble_file ()
{
if (info_dribble_file)
{
fflush (info_dribble_file);
fclose (info_dribble_file);
info_dribble_file = (FILE *)NULL;
}
}
/* Write some output to our existing dribble file. */
void
dribble (byte)
unsigned char byte;
{
if (info_dribble_file)
fwrite (&byte, sizeof (unsigned char), 1, info_dribble_file);
}
/* dribble.h -- Functions and vars declared in dribble.c. */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#if !defined (_DRIBBLE_H_)
#define _DRIBBLE_H_
/* When non-zero, it is a stream to write all input characters to for the
duration of this info session. */
extern FILE *info_dribble_file;
/* Open a dribble file named NAME, perhaps closing an already open one.
This sets the global variable INFO_DRIBBLE_FILE to the open stream. */
extern void open_dribble_file ();
/* If there is a dribble file already open, close it. */
extern void close_dribble_file ();
/* Write some output to our existing dribble file. */
extern void dribble ();
#endif /* !_DRIBBLE_H_ */
/* echo-area.h -- Functions used in reading information from the echo area.
$Id: echo-area.h,v 1.1.1.2 1998/03/24 18:20:09 law Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#ifndef INFO_ECHO_AREA_H
#define INFO_ECHO_AREA_H
#define EA_MAX_INPUT 256
extern int echo_area_is_active, info_aborted_echo_area;
/* Non-zero means that the last command executed while reading input
killed some text. */
extern int echo_area_last_command_was_kill;
extern void inform_in_echo_area (), echo_area_inform_of_deleted_window ();
extern void echo_area_prep_read ();
extern VFunction *ea_last_executed_command;
/* Read a line of text in the echo area. Return a malloc ()'ed string,
or NULL if the user aborted out of this read. WINDOW is the currently
active window, so that we can restore it when we need to. PROMPT, if
non-null, is a prompt to print before reading the line. */
extern char *info_read_in_echo_area ();
/* Read a line in the echo area with completion over COMPLETIONS.
Takes arguments of WINDOW, PROMPT, and COMPLETIONS, a REFERENCE **. */
char *info_read_completing_in_echo_area ();
/* Read a line in the echo area allowing completion over COMPLETIONS, but
not requiring it. Takes arguments of WINDOW, PROMPT, and COMPLETIONS,
a REFERENCE **. */
extern char *info_read_maybe_completing ();
extern void ea_insert (), ea_quoted_insert ();
extern void ea_beg_of_line (), ea_backward (), ea_delete (), ea_end_of_line ();
extern void ea_forward (), ea_abort (), ea_rubout (), ea_complete ();
extern void ea_newline (), ea_kill_line (), ea_transpose_chars ();
extern void ea_yank (), ea_tab_insert (), ea_possible_completions ();
extern void ea_backward_word (), ea_kill_word (), ea_forward_word ();
extern void ea_yank_pop (), ea_backward_kill_word ();
extern void ea_scroll_completions_window ();
#endif /* not INFO_ECHO_AREA_H */
/* echo_area.h -- Functions used in reading information from the echo area. */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#if !defined (_ECHO_AREA_H_)
#define _ECHO_AREA_H_
#define EA_MAX_INPUT 256
extern int echo_area_is_active, info_aborted_echo_area;
/* Non-zero means that the last command executed while reading input
killed some text. */
extern int echo_area_last_command_was_kill;
extern void inform_in_echo_area (), echo_area_inform_of_deleted_window ();
extern void echo_area_prep_read ();
extern VFunction *ea_last_executed_command;
/* Read a line of text in the echo area. Return a malloc ()'ed string,
or NULL if the user aborted out of this read. WINDOW is the currently
active window, so that we can restore it when we need to. PROMPT, if
non-null, is a prompt to print before reading the line. */
extern char *info_read_in_echo_area ();
/* Read a line in the echo area with completion over COMPLETIONS.
Takes arguments of WINDOW, PROMPT, and COMPLETIONS, a REFERENCE **. */
char *info_read_completing_in_echo_area ();
/* Read a line in the echo area allowing completion over COMPLETIONS, but
not requiring it. Takes arguments of WINDOW, PROMPT, and COMPLETIONS,
a REFERENCE **. */
extern char *info_read_maybe_completing ();
extern void ea_insert (), ea_quoted_insert ();
extern void ea_beg_of_line (), ea_backward (), ea_delete (), ea_end_of_line ();
extern void ea_forward (), ea_abort (), ea_rubout (), ea_complete ();
extern void ea_newline (), ea_kill_line (), ea_transpose_chars ();
extern void ea_yank (), ea_tab_insert (), ea_possible_completions ();
extern void ea_backward_word (), ea_kill_word (), ea_forward_word ();
extern void ea_yank_pop (), ea_backward_kill_word ();
extern void ea_scroll_completions_window ();
#endif /* _ECHO_AREA_H_ */
/* filesys.h -- External declarations of functions and vars in filesys.c.
$Id: filesys.h,v 1.1.1.2 1998/03/22 20:42:28 law Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#ifndef INFO_FILESYS_H
#define INFO_FILESYS_H
/* The path on which we look for info files. You can initialize this
from the environment variable INFOPATH if there is one, or you can
call info_add_path () to add paths to the beginning or end of it. */
extern char *infopath;
/* Make INFOPATH have absolutely nothing in it. */
extern void zap_infopath ();
/* Add PATH to the list of paths found in INFOPATH. 2nd argument says
whether to put PATH at the front or end of INFOPATH. */
extern void info_add_path ();
/* Defines that are passed along with the pathname to info_add_path (). */
#define INFOPATH_PREPEND 0
#define INFOPATH_APPEND 1
/* Expand the filename in PARTIAL to make a real name for this operating
system. This looks in INFO_PATHS in order to find the correct file.
If it can't find the file, it returns NULL. */
extern char *info_find_fullpath ();
/* Read the contents of PATHNAME, returning a buffer with the contents of
that file in it, and returning the size of that buffer in FILESIZE.
FINFO is a stat struct which has already been filled in by the caller.
If the file cannot be read, return a NULL pointer. */
extern char *filesys_read_info_file ();
extern char *filesys_read_compressed ();
/* Return the command string that would be used to decompress FILENAME. */
extern char *filesys_decompressor_for_file ();
extern int compressed_filename_p ();
/* A function which returns a pointer to a static buffer containing
an error message for FILENAME and ERROR_NUM. */
extern char *filesys_error_string ();
/* The number of the most recent file system error. */
extern int filesys_error_number;
/* Given a string containing units of information separated by colons,
return the next one pointed to by IDX, or NULL if there are no more.
Advance IDX to the character after the colon. */
extern char *extract_colon_unit ();
/* The default value of INFOPATH. */
#if !defined (DEFAULT_INFOPATH)
# define DEFAULT_INFOPATH "/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info:."
#endif /* !DEFAULT_INFOPATH */
#if !defined (S_ISREG) && defined (S_IFREG)
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif /* !S_ISREG && S_IFREG */
#if !defined (S_ISDIR) && defined (S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif /* !S_ISDIR && S_IFDIR */
#endif /* not INFO_FILESYS_H */
/* footnotes.c -- Some functions for manipulating footnotes.
$Id: footnotes.c,v 1.1.1.2 1998/03/22 20:42:29 law Exp $
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
/* Non-zero means attempt to show footnotes when displaying a new window. */
int auto_footnotes_p = 1;
static char *footnote_nodename = "*Footnotes*";
#define FOOTNOTE_HEADER_FORMAT \
"*** Footnotes appearing in the node \"%s\" ***\n"
/* Find the window currently showing footnotes. */
static WINDOW *
find_footnotes_window ()
{
WINDOW *win;
/* Try to find an existing window first. */
for (win = windows; win; win = win->next)
if (internal_info_node_p (win->node) &&
(strcmp (win->node->nodename, footnote_nodename) == 0))
break;
return (win);
}
/* Manufacture a node containing the footnotes of this node, and
return the manufactured node. If NODE has no footnotes, return a
NULL pointer. */
NODE *
make_footnotes_node (node)
NODE *node;
{
NODE *fn_node, *result = (NODE *)NULL;
long fn_start;
/* Make the initial assumption that the footnotes appear as simple
text within this windows node. */
fn_node = node;
/* See if this node contains the magic footnote label. */
fn_start =
info_search_in_node (FOOTNOTE_LABEL, node, 0, (WINDOW *)NULL, 1);
/* If it doesn't, check to see if it has an associated footnotes node. */
if (fn_start == -1)
{
REFERENCE **refs;
refs = info_xrefs_of_node (node);
if (refs)
{
register int i;
char *refname;
refname = (char *)xmalloc
(1 + strlen ("-Footnotes") + strlen (node->nodename));
strcpy (refname, node->nodename);
strcat (refname, "-Footnotes");
for (i = 0; refs[i]; i++)
if ((refs[i]->nodename != (char *)NULL) &&
(strcmp (refs[i]->nodename, refname) == 0))
{
char *filename;
filename = node->parent;
if (!filename)
filename = node->filename;
fn_node = info_get_node (filename, refname);
if (fn_node)
fn_start = 0;
break;
}
free (refname);
info_free_references (refs);
}
}
/* If we never found the start of a footnotes area, quit now. */
if (fn_start == -1)
return ((NODE *)NULL);
/* Make the new node. */
result = (NODE *)xmalloc (sizeof (NODE));
result->flags = 0;
/* Get the size of the footnotes appearing within this node. */
{
char *header;
long text_start = fn_start;
header = (char *)xmalloc
(1 + strlen (node->nodename) + strlen (FOOTNOTE_HEADER_FORMAT));
sprintf (header, FOOTNOTE_HEADER_FORMAT, node->nodename);
/* Move the start of the displayed text to right after the first line.
This effectively skips either "---- footno...", or "File: foo...". */
while (text_start < fn_node->nodelen)
if (fn_node->contents[text_start++] == '\n')
break;
result->nodelen = strlen (header) + fn_node->nodelen - text_start;
/* Set the contents of this node. */
result->contents = (char *)xmalloc (1 + result->nodelen);
sprintf (result->contents, "%s", header);
memcpy (result->contents + strlen (header),
fn_node->contents + text_start, fn_node->nodelen - text_start);
name_internal_node (result, footnote_nodename);
free (header);
}
#if defined (NOTDEF)
/* If the footnotes were gleaned from the node that we were called with,
shorten the calling node's display length. */
if (fn_node == node)
narrow_node (node, 0, fn_start);
#endif /* NOTDEF */
return (result);
}
/* Create or delete the footnotes window depending on whether footnotes
exist in WINDOW's node or not. Returns FN_FOUND if footnotes were found
and displayed. Returns FN_UNFOUND if there were no footnotes found
in WINDOW's node. Returns FN_UNABLE if there were footnotes, but the
window to show them couldn't be made. */
int
info_get_or_remove_footnotes (window)
WINDOW *window;
{
WINDOW *fn_win;
NODE *new_footnotes;
fn_win = find_footnotes_window ();
/* If we are in the footnotes window, change nothing. */
if (fn_win == window)
return (FN_FOUND);
/* Try to find footnotes for this window's node. */
new_footnotes = make_footnotes_node (window->node);
/* If there was a window showing footnotes, and there are no footnotes
for the current window, delete the old footnote window. */
if (fn_win && !new_footnotes)
{
if (windows->next)
info_delete_window_internal (fn_win);
}
/* If there are footnotes for this window's node, but no window around
showing footnotes, try to make a new window. */
if (new_footnotes && !fn_win)
{
WINDOW *old_active;
WINDOW *last, *win;
/* Always make this window be the last one appearing in the list. Find
the last window in the chain. */
for (win = windows, last = windows; win; last = win, win = win->next);
/* Try to split this window, and make the split window the one to
contain the footnotes. */
old_active = active_window;
active_window = last;
fn_win = window_make_window (new_footnotes);
active_window = old_active;
if (!fn_win)
{
free (new_footnotes->contents);
free (new_footnotes);
/* If we are hacking automatic footnotes, and there are footnotes
but we couldn't display them, print a message to that effect. */
if (auto_footnotes_p)
inform_in_echo_area (_("Footnotes could not be displayed"));
return (FN_UNABLE);
}
}
/* If there are footnotes, and there is a window to display them,
make that window be the number of lines appearing in the footnotes. */
if (new_footnotes && fn_win)
{
window_set_node_of_window (fn_win, new_footnotes);
window_change_window_height
(fn_win, fn_win->line_count - fn_win->height);
remember_window_and_node (fn_win, new_footnotes);
add_gcable_pointer (new_footnotes->contents);
}
if (!new_footnotes)
return (FN_UNFOUND);
else
return (FN_FOUND);
}
/* Show the footnotes associated with this node in another window. */
DECLARE_INFO_COMMAND (info_show_footnotes,
_("Show the footnotes associated with this node in another window"))
{
/* A negative argument means just make the window go away. */
if (count < 0)
{
WINDOW *fn_win = find_footnotes_window ();
/* If there is an old footnotes window, and it isn't the only window
on the screen, delete it. */
if (fn_win && windows->next)
info_delete_window_internal (fn_win);
}
else
{
int result;
result = info_get_or_remove_footnotes (window);
switch (result)
{
case FN_UNFOUND:
info_error (NO_FOOT_NODE);
break;
case FN_UNABLE:
info_error (WIN_TOO_SMALL);
break;
}
}
}
/* footnotes.h -- Some functions for manipulating footnotes.
$Id: footnotes.h,v 1.1.1.2 1998/03/22 20:42:30 law Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993, 97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#ifndef INFO_FOOTNOTES_H
#define INFO_FOOTNOTES_H
/* Magic string which indicates following text is footnotes. */
#define FOOTNOTE_LABEL _("---------- Footnotes ----------")
#define FN_FOUND 0
#define FN_UNFOUND 1
#define FN_UNABLE 2
/* Create or delete the footnotes window depending on whether footnotes
exist in WINDOW's node or not. Returns FN_FOUND if footnotes were found
and displayed. Returns FN_UNFOUND if there were no footnotes found
in WINDOW's node. Returns FN_UNABLE if there were footnotes, but the
window to show them couldn't be made. */
extern int info_get_or_remove_footnotes ();
/* Non-zero means attempt to show footnotes when displaying a new window. */
extern int auto_footnotes_p;
#endif /* not INFO_FOOTNOTES_H */
/* funs.h -- Generated declarations for Info commands. */
/* Functions declared in "./session.c". */
extern void info_next_line ();
extern void info_prev_line ();
extern void info_end_of_line ();
extern void info_beginning_of_line ();
extern void info_forward_char ();
extern void info_backward_char ();
extern void info_forward_word ();
extern void info_backward_word ();
extern void info_global_next_node ();
extern void info_global_prev_node ();
extern void info_scroll_forward ();
extern void info_scroll_backward ();
extern void info_beginning_of_node ();
extern void info_end_of_node ();
extern void info_next_window ();
extern void info_prev_window ();
extern void info_split_window ();
extern void info_delete_window ();
extern void info_keep_one_window ();
extern void info_scroll_other_window ();
extern void info_grow_window ();
extern void info_tile_windows ();
extern void info_toggle_wrap ();
extern void info_next_node ();
extern void info_prev_node ();
extern void info_up_node ();
extern void info_last_node ();
extern void info_first_node ();
extern void info_last_menu_item ();
extern void info_menu_digit ();
extern void info_menu_item ();
extern void info_xref_item ();
extern void info_find_menu ();
extern void info_visit_menu ();
extern void info_goto_node ();
extern void info_man ();
extern void info_top_node ();
extern void info_dir_node ();
extern void info_history_node ();
extern void info_kill_node ();
extern void info_view_file ();
extern void info_print_node ();
extern void info_search ();
extern void isearch_forward ();
extern void isearch_backward ();
extern void info_move_to_prev_xref ();
extern void info_move_to_next_xref ();
extern void info_select_reference_this_line ();
extern void info_abort_key ();
extern void info_move_to_window_line ();
extern void info_redraw_display ();
extern void info_quit ();
extern void info_do_lowercase_version ();
extern void info_add_digit_to_numeric_arg ();
extern void info_universal_argument ();
extern void info_numeric_arg_digit_loop ();
/* Functions declared in "./echo-area.c". */
extern void ea_forward ();
extern void ea_backward ();
extern void ea_beg_of_line ();
extern void ea_end_of_line ();
extern void ea_forward_word ();
extern void ea_backward_word ();
extern void ea_delete ();
extern void ea_rubout ();
extern void ea_abort ();
extern void ea_newline ();
extern void ea_quoted_insert ();
extern void ea_insert ();
extern void ea_tab_insert ();
extern void ea_transpose_chars ();
extern void ea_yank ();
extern void ea_yank_pop ();
extern void ea_kill_line ();
extern void ea_backward_kill_line ();
extern void ea_kill_word ();
extern void ea_backward_kill_word ();
extern void ea_possible_completions ();
extern void ea_complete ();
extern void ea_scroll_completions_window ();
/* Functions declared in "./infodoc.c". */
extern void info_get_help_window ();
extern void info_get_info_help_node ();
extern void describe_key ();
extern void info_where_is ();
/* Functions declared in "./m-x.c". */
extern void describe_command ();
extern void info_execute_command ();
extern void set_screen_height ();
/* Functions declared in "./indices.c". */
extern void info_index_search ();
extern void info_next_index_match ();
extern void info_index_apropos ();
/* Functions declared in "./nodemenu.c". */
extern void list_visited_nodes ();
extern void select_visited_node ();
/* Functions declared in "./footnotes.c". */
extern void info_show_footnotes ();
/* Functions declared in "./variables.c". */
extern void describe_variable ();
extern void set_variable ();
/* gc.c -- Functions to remember and garbage collect unused node contents. */
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
Copyright (C) 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
/* Array of pointers to the contents of gc-able nodes. A pointer on this
list can be garbage collected when no info window contains a node whose
contents member match the pointer. */
static char **gcable_pointers = (char **)NULL;
static int gcable_pointers_index = 0;
static int gcable_pointers_slots = 0;
/* Add POINTER to the list of garbage collectible pointers. A pointer
is not actually garbage collected until no info window contains a node
whose contents member is equal to the pointer. */
void
add_gcable_pointer (pointer)
char *pointer;
{
gc_pointers ();
add_pointer_to_array (pointer, gcable_pointers_index, gcable_pointers,
gcable_pointers_slots, 10, char *);
}
/* Grovel the list of info windows and gc-able pointers finding those
node->contents which are collectible, and free them. */
void
gc_pointers ()
{
register int i, j, k;
INFO_WINDOW *iw;
char **new = (char **)NULL;
int new_index = 0;
int new_slots = 0;
if (!info_windows || !gcable_pointers_index)
return;
for (i = 0; (iw = info_windows[i]); i++)
{
for (j = 0; j < iw->nodes_index; j++)
{
NODE *node = iw->nodes[j];
/* If this node->contents appears in our list of gcable_pointers,
it is not gc-able, so save it. */
for (k = 0; k < gcable_pointers_index; k++)
if (gcable_pointers[k] == node->contents)
{
add_pointer_to_array
(node->contents, new_index, new, new_slots, 10, char *);
break;
}
}
}
/* We have gathered all of the pointers which need to be saved. Free any
of the original pointers which do not appear in the new list. */
for (i = 0; i < gcable_pointers_index; i++)
{
for (j = 0; j < new_index; j++)
if (gcable_pointers[i] == new[j])
break;
/* If we got all the way through the new list, then the old pointer
can be garbage collected. */
if (new && !new[j])
free (gcable_pointers[i]);
}
free (gcable_pointers);
gcable_pointers = new;
gcable_pointers_slots = new_slots;
gcable_pointers_index = new_index;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment