*** empty log message ***

This commit is contained in:
Jim Blandy 1992-04-24 08:11:54 +00:00
parent d4327fecc1
commit 4746118aca
29 changed files with 707 additions and 404 deletions

View file

@ -14,6 +14,9 @@
# This is a very dangerous thing to do!
# make clean
# This is a little less dangerous.
# make dist
# This produces a tar file from the current source tree suitable
# for redistribution.
SHELL = /bin/sh
@ -28,65 +31,65 @@ prefix=/usr/local
# Where to install Emacs and other binaries that people will want to
# run directly (like etags).
bindir=$(prefix)/bin
bindir=${prefix}/bin
# A directory under which we will install many of Emacs's files. The
# default values for many of the variables below are expressed in
# terms of this one, so you may not need to change them.
emacsdir=$(prefix)/emacs-19.0
emacsdir=${prefix}/emacs-19.0
# Where to install and expect the architecture-independent data files
# (like the tutorial and the Zippy database).
datadir=$(emacsdir)/etc
datadir=${emacsdir}/etc
# Where to install the elisp files distributed with Emacs. Strictly
# speaking, all the elisp files should go under datadir (above), since
# both elisp source and compiled elisp are completely portable, but
# it's traditional to give the lisp files their own subdirectory.
lispdir=$(emacsdir)/lisp
lispdir=${emacsdir}/lisp
# Directories Emacs should search for elisp files specific to this
# site (i.e. customizations), before consulting $(lispdir). This
# site (i.e. customizations), before consulting ${lispdir}. This
# should be a colon-separated list of directories.
locallisppath=$(emacsdir)/local-lisp
locallisppath=${emacsdir}/local-lisp
# Where Emacs will search to find its elisp files. Before changing
# this, check to see if your purpose wouldn't better be served by
# changing locallisppath. This should be a colon-separated list of
# directories.
lisppath=$(locallisppath):$(lispdir)
lisppath=${locallisppath}:${lispdir}
# Where Emacs will search for its elisp files before dumping. This is
# Where Emacs will search for its elisp files while building. This is
# only used during the process of compiling Emacs, to help Emacs find
# its lisp files before they've been installed in their final
# location. It's usually identical to lisppath, except that the entry
# for the directory containing the installed lisp files has been
# replaced with ../lisp. This should be a colon-separated list of
# directories.
dumplisppath=$(locallisppath):../lisp
buildlisppath=../lisp
# Where to install and expect the files that Emacs modifies as it
# runs. These files are all architecture-independent. Right now,
# the only such data is the locking directory.
statedir=$(emacsdir)
statedir=${emacsdir}
# Where to create and expect the locking directory, where the Emacs
# locking code keeps track of which files are currently being edited.
lockdir=$(statedir)/lock
lockdir=${statedir}/lock
# Where to install and expect executable files to be run by Emacs
# rather than directly by users, and other architecture-dependent
# data.
libdir=$(emacsdir)/arch-lib
libdir=${emacsdir}/arch-lib
# Where to install Emacs's man pages.
mandir=/usr/man/man1
# Where to install and expect the info files describing Emacs. In the
# past, this defaulted to a subdirectory of $(prefix)/lib/emacs, but
# past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
# since there are now many packages documented with the texinfo
# system, it is inappropriate to imply that it is part of Emacs.
infodir=$(prefix)/info
infodir=${prefix}/info
# ==================== Utility Programs for the Build ====================
@ -110,22 +113,22 @@ SUBDIR = lib-src src
# Subdirectories to install, and where they'll go.
COPYDIR = arch-lib etc info lisp
COPYDESTS = $(libdir) $(datadir) $(infodir) $(lispdir)
COPYDESTS = ${libdir} ${datadir} ${infodir} ${lispdir}
all: src/paths.h ${SUBDIR}
removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/'
src/paths.h: Makefile src/paths.h.in
lisppath=`echo $(lisppath) | $(removenullpaths)` ; \
dumplisppath=`echo $(dumplisppath) | $(removenullpaths)` ; \
/bin/sed < src/paths.h.in > src/paths.h \
lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
/bin/sed < src/paths.h.in > src/paths.h \
-e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${dumplisppath}'";' \
-e 's;\(#.*PATH_EXEC\).*$$;\1 "$(libdir)";' \
-e 's;\(#.*PATH_DATA\).*$$;\1 "$(datadir)";' \
-e 's;\(#.*PATH_LOCK\).*$$;\1 "$(lockdir)/";' \
-e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "$(lockdir)/!!!SuperLock!!!";'
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
-e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
-e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
-e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";' \
-e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "${lockdir}/!!!SuperLock!!!";'
src: lib-src
@ -274,3 +277,6 @@ TAGS tags: lib-src
check:
@echo "We don't have any tests for GNU Emacs yet."
dist:
make-dist

View file

@ -18,21 +18,37 @@ bindir=${prefix}/bin
# A directory under which we will install many of Emacs's files. The
# default values for many of the variables below are expressed in
# terms of this one, so you may not need to change them.
emacsdir=${prefix}/lib/emacs-19.0
emacsdir=${prefix}/emacs-19.0
# Where to install and expect the architecture-independent data files
# (like the tutorial and the zippy database).
# (like the tutorial and the Zippy database).
datadir=${emacsdir}/etc
# Where to install the elisp files distributed with Emacs.
# Where to install the elisp files distributed with Emacs. Strictly
# speaking, all the elisp files should go under datadir (above), since
# both elisp source and compiled elisp are completely portable, but
# it's traditional to give the lisp files their own subdirectory.
lispdir=${emacsdir}/lisp
# Where Emacs will search to find its elisp files. This should be a
# colon-separated list of directories. Strictly speaking, all the
# elisp files should go under datadir (above), since both elisp source
# and compiled elisp are completely portable, but it's traditional to
# give the lisp files their own subdirectory.
lisppath=${emacsdir}/local-lisp:${lispdir}
# Directories Emacs should search for elisp files specific to this
# site (i.e. customizations), before consulting ${lispdir}. This
# should be a colon-separated list of directories.
locallisppath=${emacsdir}/local-lisp
# Where Emacs will search to find its elisp files. Before changing
# this, check to see if your purpose wouldn't better be served by
# changing locallisppath. This should be a colon-separated list of
# directories.
lisppath=${locallisppath}:${lispdir}
# Where Emacs will search for its elisp files before dumping. This is
# only used during the process of compiling Emacs, to help Emacs find
# its lisp files before they've been installed in their final
# location. It's usually identical to lisppath, except that the entry
# for the directory containing the installed lisp files has been
# replaced with ../lisp. This should be a colon-separated list of
# directories.
dumplisppath=../lisp
# Where to install and expect the files that Emacs modifies as it
# runs. These files are all architecture-independent. Right now,
@ -57,46 +73,17 @@ mandir=/usr/man/man1
# system, it is inappropriate to imply that it is part of Emacs.
infodir=${prefix}/info
scum
removenullpaths="sed -e 's/^://' -e 's/:"'$'"//' -e 's/::/:/'"
# Where to install all of Emacs's data files - the lisp code,
# documentation tree, and the architecture-dependent and -independent
# libaries. The default definitions for the variables below are
# expressed in terms of this one, so you may not need to change them.
# set LIBROOT=/usr/local/lib/emacs-19.0
emacsdir=/u/src/emacs/19.0
# Emacs will search this path to find its elisp files. This should be
# a colon-separated list of directories. Strictly speaking, all the
# elisp files should go under DATADIR (below), since both elisp source
# and compiled elisp are completely portable, but it's traditional to
# give the lisp files their own subdirectory.
LISPPATH=/u/src/emacs/19.0/local-lisp:/u/src/emacs/19.0/lisp
# Emacs will look here for its architecture-independent files (like
# the tutorial and the zippy database).
DATADIR=/u/src/emacs/19.0/etc
# Emacs will look here for its architecture-dependent files, like
# executables for its utilities.
LIBDIR=/u/src/emacs/19.0/arch-lib
# The locking directory, where the Emacs locking code keeps track of
# which files are currently being edited.
# set LOCKDIR=${LIBROOT}/lock
LOCKDIR=/u/src/emacs/19.0/lock
# This is where build-install should place the binaries people will
# want to run directly (like etags and Emacs itself).
BINDIR=/usr/local/bin
/bin/sed < src/paths.h.in > src/paths.h \
-e 's;\(#.*PATH_LOADSEARCH\).*$;\1 "${lisppath}";' \
-e 's;\(#.*PATH_EXEC\).*$;\1 "${libdir}";' \
-e 's;\(#.*PATH_DATA\).*$;\1 "${datadir}";' \
-e 's;\(#.*PATH_LOCK\).*$;\1 "${lockdir}/";' \
-e 's;\(#.*PATH_SUPERLOCK\).*$;\1 "${lockdir}/!!!SuperLock!!!";'
lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
dumplisppath=`echo ${dumplisppath} | ${removenullpaths}` ; \
/bin/sed < src/paths.h.in > src/paths.h \
-e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${dumplisppath}'";' \
-e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
-e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
-e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";' \
-e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "${lockdir}/!!!SuperLock!!!";'
(cd lib-src; make) || exit 1
(cd src; make) || exit 1

View file

@ -33,11 +33,14 @@ progname=$0
short_usage="Type \`${progname} -usage' for more information about options."
usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...]
This message needs to be updated.
Set compilation and installation parameters for GNU Emacs, and report.
MACHINENAME is the machine to build for. See \`etc/MACHINES'.
Options are:
-opsystem=SYSTEM - operating system to build for; see \`etc/MACHINES'.
-libroot=DIR - where to install Emacs's library files
-prefix=DIR - where to install Emacs's library files
These options have reasonable defaults (in []s), and may not be needed:
-g, -O - Passed to the compiler. If omitted, use -O only.
-cc=COMPILER - Which compiler to use. Defaults to gcc if available.
@ -65,7 +68,8 @@ options=":\
usage:help:\
machine:opsystem:\
g:O:cc:\
libroot:datadir:libdir:bindir:lisppath:lockdir:\
prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\
lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\
gnu_malloc:rel_alloc:highpri:lisp_float_type:\
window_system:have_x_menu:\
"
@ -81,7 +85,7 @@ have_x_windows:have_x11:have_x_menu:\
c_switch_site:sigtype:\
"
libroot=
prefix=
bindir=/usr/local/bin
gnu_malloc=yes
lisp_float_type=yes
@ -96,7 +100,8 @@ window_system=""
have_x_menu=""
echo "Examining options."
for arg in $*; do
while [ $# != 0 ]; do
arg="$1"
case "${arg}" in
-*)
# Separate the switch name from the value it's being given.
@ -107,7 +112,9 @@ for arg in $*; do
valomitted=no
;;
-* )
# If FOO is a boolean argument, -FOO is equivalent to -FOO=yes.
# If FOO is a boolean argument, -FOO is equivalent to
# -FOO=yes. Otherwise, the value comes from the next
# argument - see below.
opt=`echo ${arg} | sed 's:^-\(.*\)$:\1:'`
val="yes"
valomitted=yes
@ -159,10 +166,13 @@ for arg in $*; do
;;
*)
if [ "${valomitted}" = "yes" ]; then
(echo "${progname}: You must give a value for the \`-${opt}' option, as in
\`-${opt}=FOO'."
echo "${short_usage}") | more
exit 1
if [ $# = 1 ]; then
(echo "${progname}: You must give a value for the \`-${opt}' option, as in
\`-${opt}=FOO'."
echo "${short_usage}") | more
exit 1
fi
shift; val="$1"
fi
;;
esac
@ -173,6 +183,7 @@ for arg in $*; do
machine=${arg}
;;
esac
shift
done
if [ "${machine}" = "" ]; then
@ -241,9 +252,52 @@ systems that Emacs has been ported to." 1>&2
fi
fi
if [ "${libroot}" = "" ]; then
echo "Guessing library directory."
libroot=`/bin/pwd`
if [ ! "${prefix}" ]; then
prefix="/usr/local"
fi
if [ ! "${emacsdir}" ]; then
emacsdir="${prefix}/emacs-19.0"
fi
if [ ! "${datadir}" ]; then
datadir="${emacsdir}/etc"
fi
if [ ! "${lispdir}" ]; then
lispdir="${emacsdir}/lisp"
fi
if [ ! "${locallisppath}" ]; then
locallisppath="${emacsdir}/local-lisp"
fi
if [ ! "${lisppath}" ]; then
lisppath="${locallisppath}:${lispdir}"
fi
if [ ! "${buildlisppath}" ]; then
buildlisppath=../lisp
fi
if [ ! "${statedir}" ]; then
statedir="${emacsdir}"
fi
if [ ! "${lockdir}" ]; then
lockdir="${statedir}/lock"
fi
if [ "${libdir}" = "" ]; then
libdir="${emacsdir}/arch-lib"
fi
if [ ! "${mandir}" ]; then
mandir="/usr/man/man1"
fi
if [ ! "${infodir}" ]; then
infodir="${prefix}/info"
fi
echo "Checking window system."
@ -279,39 +333,10 @@ case "${window_system}" in
;;
esac
# What is the return type of a signal handler? We grep
# /usr/include/signal.h for the declaration of the signal function.
# Yuck.
echo "Looking for return type of signal handler functions."
if [ -r /usr/include/signal.h ]; then
sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
sigtype=void
if grep -s "int${sigpattern}" /usr/include/signal.h; then
sigtype=int
fi
fi
if [ "${have_x_menu}" = "" ]; then
have_x_menu=no
fi
if [ "${lisppath}" = "" ]; then
lisppath='$(locallisppath):$(lispdir)'
fi
if [ "${datadir}" = "" ]; then
datadir='$(emacsdir)/etc'
fi
if [ "${libdir}" = "" ]; then
libdir='$(emacsdir)/arch-lib'
fi
if [ "${lockdir}" = "" ]; then
lockdir='$(statedir)/lock'
fi
echo "Checking for GCC."
case "${cc}" in
"" )
@ -328,11 +353,53 @@ case "${cc}" in
;;
esac
case "${O},${g},${cc}" in
,,gcc ) O=yes; g=yes ;;
,,* ) O=yes; g=no ;;
case "${cc}" in
"gcc" )
# With GCC, both O and g should default to yes, no matter what
# the other is.
case "${O},${g}" in
, ) O=yes; g=yes ;;
,* ) O=yes; ;;
*, ) g=yes ;;
esac
;;
"*" )
# With other compilers, treat them as mutually exclusive,
# defaulting to debug.
case "${O},${g}" in
, ) O=no ; g=yes ;;
,no ) O=yes; ;;
,yes ) O=no ; ;;
no, ) g=yes ;;
yes, ) g=no ;;
esac
;;
esac
# What is the return type of a signal handler? We run
# /usr/include/signal.h through cpp and grep for the declaration of
# the signal function. Yuck.
echo "Looking for return type of signal handler functions."
signal_h_file=''
if [ -r /usr/include/signal.h ]; then
signal_h_file=/usr/include/signal.h
elif [ -r /usr/include/sys/signal.h ]; then
signal_h_file=/usr/include/sys/signal.h
fi
sigtype=void
if [ "${signal_h_file}" ]; then
sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
# We make a symbolic link whose name ends in .c, so the compiler
# won't complain about having only been given a .h file.
tempcname="configure.tmp.$$.c"
ln -s ${signal_h_file} ${tempcname}
if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
sigtype=int
fi
rm ${tempcname}
fi
echo "Examining the machine- and system-dependent files to find out"
echo " - which libraries the lib-src programs will want, and"
echo " - whether the GNU malloc routines are usable."
@ -345,14 +412,16 @@ echo '#include "src/'${machfile}'"
#ifndef LIBS_SYSTEM
#define LIBS_SYSTEM
#endif
libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
@configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
#ifdef SYSTEM_MALLOC
system_malloc=yes
@configure@ system_malloc=yes
#else
system_malloc=no
@configure@ system_malloc=no
#endif
' > ${tempcname}
eval `${cc} -E ${tempcname} | grep -v '^#' | grep -v '^[ ]*$'`
eval `${cc} -E ${tempcname} \
| grep '@configure@' \
| sed -e 's/^@configure@//'`
rm ${tempcname}
# Do the opsystem or machine files prohibit the use of the GNU malloc?
@ -383,7 +452,8 @@ esac
sed_flags="-e 's:@machine@:${machfile}:'"
sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'"
for flag in `echo ${config_h_opts} | tr ':' ' '`; do
cflagname=`echo ${flag} | tr a-z A-Z`
cflagname=`echo ${flag} \
| tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
val=`eval echo '$'${flag}`
case ${val} in
no | "")
@ -411,12 +481,20 @@ rm -f ./Makefile
# editing \`./Makefile.in' itself, or running \`${progname}' instead."
/bin/sed < Makefile.in \
-e '/^# DIST: /d' \
-e 's;^\(emacsdir=\).*$;\1'"${libroot};" \
-e 's;^\(prefix=\).*$;\1'"${prefix};" \
-e 's;^\(bindir=\).*$;\1'"${bindir};" \
-e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
-e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \
-e 's;^\(datadir=\).*$;\1'"${datadir};" \
-e 's;^\(lispdir=\).*$;\1'"${lispdir};" \
-e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \
-e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
-e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \
-e 's;^\(statedir=\).*$;\1'"${statedir};" \
-e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
-e 's;^\(libdir=\).*$;\1'"${libdir};") > ./Makefile
-e 's;^\(libdir=\).*$;\1'"${libdir};" \
-e 's;^\(mandir=\).*$;\1'"${mandir};" \
-e 's;^\(infodir=\).*$;\1'"${infodir};" \
) > ./Makefile
# Remind people not to edit this.
chmod -w ./Makefile
@ -427,12 +505,12 @@ rm -f ./build-install
# If you are thinking about editing it, you should seriously consider
# editing \`./build-install.in' itself, or running \`${progname}' instead."
/bin/sed < build-install.in \
-e 's;^\(LIBROOT=\).*$;\1'"${libroot};" \
-e 's;^\(BINDIR=\).*$;\1'"${bindir};" \
-e 's;^\(LISPPATH=\).*$;\1'"${lisppath};" \
-e 's;^\(DATADIR=\).*$;\1'"${datadir};" \
-e 's;^\(LOCKDIR=\).*$;\1'"${lockdir};" \
-e 's;^\(LIBDIR=\).*$;\1'"${libdir};") > ./build-install
-e 's;^\(prefix=\).*$;\1'"${prefix};" \
-e 's;^\(bindir=\).*$;\1'"${bindir};" \
-e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
-e 's;^\(datadir=\).*$;\1'"${datadir};" \
-e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
-e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install
# Remind people not to edit this.
chmod -w build-install
chmod +x build-install
@ -463,6 +541,11 @@ chmod -w lib-src/Makefile
# Create a verbal description of what we have done.
if [ "${highpri}" ]; then
desc_highpri="${highpri}"
else
desc_highpri="none"
fi
message="# Configured for machine \`${machine}' running \`${opsystem}'.
# The following values have been set in ./Makefile and ./build-install:
# Executables will be placed in
@ -477,7 +560,7 @@ message="# Configured for machine \`${machine}' running \`${opsystem}'.
# Emacs will keep track of file-locking in
# ${lockdir}.
# The following values have been set in src/config.h:
# At how much higher than normal priority should Emacs run? ${highpri-none}
# At how much higher than normal priority should Emacs run? ${desc_highpri}
# Should Emacs use the GNU version of malloc? ${gnu_malloc}${gnu_malloc_reason}
# Should Emacs use the relocating allocator for buffers? ${rel_alloc}
# Should Emacs support a floating point Elisp type? ${lisp_float_type}
@ -511,7 +594,8 @@ echo "'${progname}' \\
-gnu_malloc='${gnu_malloc}' \\
-rel_alloc='${rel_alloc}' \\
-highpri='${highpri}' \\
-lisp_float_type='${lisp_float_type}'" >> config.status
-lisp_float_type='${lisp_float_type}' \\
$@" >> config.status
# Remind people not to edit this.
chmod -w config.status
chmod +x config.status

View file

@ -82,12 +82,12 @@ System V rel 4 (-opsystem=usg5-4)
The standard C preprocessor generate xmakefile incorrectly. However,
/lib/cpp will work, so use `make CPP=/lib/cpp'.
Versions 3 and earlier of V.4, on the Intel 386 and 860, had problems
in the X11 libraries. These prevent Emacs from working with X.
You can use Emacs with X provided your copy of X is based on X11
release 4 or newer. Unfortunately, the only way you can tell whether
your X11 library is new enough is to try compiling Emacs to use X.
If xemacs runs, your X11 library is new enough.
Versions 3 and earlier of V.4, on the Intel 386 and 860, had
problems in the X11 libraries. These prevent Emacs from working
with X. You can use Emacs with X provided your copy of X is based
on X11 release 4 or newer. Unfortunately, the only way you can tell
whether your X11 library is new enough is to try compiling Emacs to
use X. If xemacs runs, your X11 library is new enough.
In this context, GSV4 and GSV4i are alternate names for X11R4.
OL2.* is X11R3 based. OL3 is in between X11R3 and X11R4, and may or

View file

@ -1,5 +1,5 @@
/* Tags file maker to go with GNU Emacs
Copyright (C) 1984, 1987, 1988, 1989 Free Software Foundation, Inc. and Ken Arnold
Copyright (C) 1984, 1987, 1988, 1989, 1992 Free Software Foundation, Inc. and Ken Arnold
This file is part of GNU Emacs.
@ -31,6 +31,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <sys/stat.h>
#include "getopt.h"
#ifdef __GNUC__
#define alloca __builtin_alloca
#else
@ -410,6 +412,12 @@ DEFINEST definedef;
#define LEVEL_OK_FOR_FUNCDEF() \
(level==0 || c_ext && level==1 && structdef==sinbody)
/*
* next_token_is_func
* set this to TRUE, and the next token considered is called a function.
*/
logical next_token_is_func;
/* C extensions. Currently all listed extensions are C++ dialects, so
* `c_ext' is used as an abbreviation for `c_ext&C_PLPL'. If a non-C++
* dialect is added, this must change.
@ -436,7 +444,6 @@ char *curfile, /* current input file name */
*intk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789", /* valid in-token chars */
*notgd = ",;"; /* non-valid after-function chars */
int file_num; /* current file number */
int append_to_tagfile; /* -a: append to tags */
int emacs_tags_format; /* emacs style output (no -e option any more) */
/* The following three default to 1 for etags, but to 0 for ctags. */
@ -458,6 +465,27 @@ int noindentypedefs; /* -S: ignore indentation in C */
/* Name this program was invoked with. */
char *progname;
struct option longopts[] = {
{ "append", no_argument, NULL, 'a' },
{ "backward-search", no_argument, NULL, 'B' },
{ "c++", no_argument, NULL, 'C' },
{ "cxref", no_argument, NULL, 'x' },
{ "defines", no_argument, NULL, 'd' },
{ "forward-search", no_argument, NULL, 'F' },
{ "help", no_argument, NULL, 'H' },
{ "ignore-indentation", no_argument, NULL, 'S' },
{ "include", required_argument, NULL, 'i' },
{ "no-defines", no_argument, NULL, 'D' },
{ "no-warn", no_argument, NULL, 'w' },
{ "output", required_argument, NULL, 'o' },
{ "typedefs", no_argument, NULL, 't' },
{ "typedefs-and-c++", no_argument, NULL, 'T' },
{ "update", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' },
{ "vgrind", no_argument, NULL, 'v' },
{ 0 }
};
FILE *inf, /* ioptr for current input file */
*outf; /* ioptr for tags file */
@ -480,6 +508,112 @@ struct linebuffer lb1; /* sometimes, a previous line in which a token lies */
struct linebuffer filename_lb; /* used to read in filenames */
void
print_version ()
{
#ifdef CTAGS
printf ("CTAGS ");
#ifdef ETAGS
printf ("and ");
#endif
#endif
#ifdef ETAGS
printf ("ETAGS ");
#endif
printf ("for Emacs version 19.0.\n");
exit (0);
}
void
print_help ()
{
printf ("These are the options accepted by %s. You may use unambiguous\n\
abbreviations for the long option names.\n\n", progname);
fputs ("\
-a, --append\n\
Append tag entries to existing tags file.\n\
-C, --c++\n\
Treat files with `.c' and `.h' extensions as C++ code, not C\n\
code. Files with `.C', `.H', `.cxx', `.hxx', or `.cc'\n\
extensions are always assumed to be C++ code.\n\
-d, --defines\n\
Create tag entries for #defines, too.", stdout);
#ifdef ETAGS
fputs (" This is the default\n\
behavior.", stdout);
#endif
fputs ("\n\
-D, --no-defines\n\
Don't create tag entries for #defines.", stdout);
#ifdef CTAGS
fputs (" This is the default\n\
behavior.", stdout);
#endif
puts ("\n\
-o FILE, --output=FILE\n\
Write the tags to FILE.\n\
-S, --ignore-indentation\n\
Don't rely on indentation quite as much as normal. Currently,\n\
this means not to assume that a closing brace in the first\n\
column is the final brace of a function or structure\n\
definition.\n\
-t, --typedefs\n\
Generate tag entries for typedefs. This is the default\n\
behavior.\n\
-T, --typedefs-and-c++\n\
Generate tag entries for typedefs, struct/enum/union tags, and\n\
C++ member functions.");
#ifdef ETAGS
puts ("-i FILE, --include=FILE\n\
Include a note in tag file indicating that, when searching for\n\
a tag, one should also consult the tags file FILE after\n\
checking the current file.");
#endif
#ifdef CTAGS
puts ("-B, --backward-search\n\
Write the search commands for the tag entries using '?', the\n\
backward-search command.\n\
-F, --forward-search\n\
Write the search commands for the tag entries using '/', the\n\
forward-search command.\n\
-u, --update\n\
Update the tag entries for the given files, leaving tag\n\
entries for other files in place. Currently, this is\n\
implemented by deleting the existing entries for the given\n\
files and then rewriting the new entries at the end of the\n\
tags file. It is often faster to simply rebuild the entire\n\
tag file than to use this.\n\
-v, --vgrind\n\
Generates an index of items intended for human consumption,\n\
similar to the output of vgrind. The index is sorted, and\n\
gives the page number of each item.\n\
-x, --cxref\n\
Like --vgrind, but in the style of cxref, rather than vgrind.\n\
The output uses line numbers instead of page numbers, but\n\
beyond that the differences are cosmetic; try both to see\n\
which you like.\n\
-w, --no-warn\n\
Suppress warning messages about entries defined in multiple\n\
files.");
#endif
puts ("-V, --version\n\
Print the version of the program.\n\
-H, --help\n\
Print this help message.");
exit (0);
}
void
main (argc, argv)
int argc;
@ -487,7 +621,6 @@ main (argc, argv)
{
char cmd[100];
int i;
int outfflag = 0;
unsigned int nincluded_files = 0;
char **included_files = (char **) alloca (argc * sizeof (char *));
char *this_file;
@ -513,116 +646,109 @@ main (argc, argv)
if (emacs_tags_format)
typedefs = typedefs_and_cplusplus = constantypedefs = 1;
for (; argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0'; argc--, argv++)
for (;;)
{
for (i = 1; argv[1][i]; i++)
int opt;
opt = getopt_long (argc, argv, "aCdDo:StTi:BFuvxwVH", longopts, 0);
if (opt == EOF)
break;
switch (opt)
{
switch (argv[1][i])
case '\0':
/* If getopt returns '\0', then it has already processed a
long-named option. We should do nothing. */
break;
/* Common options. */
case 'a':
append_to_tagfile++;
break;
case 'C':
cplusplus = 1;
break;
case 'd':
constantypedefs = 1;
break;
case 'D':
constantypedefs = 0;
break;
case 'o':
if (outfile)
{
/* Common options. */
case 'a':
append_to_tagfile++;
break;
case 'C':
cplusplus = 1;
break;
case 'd':
constantypedefs = 1;
break;
case 'D':
constantypedefs = 0;
break;
case 'o':
if (outfflag)
{
fprintf (stderr,
"%s: -o flag may only be given once\n", progname);
goto usage;
}
outfflag++, argc--;
argv++;
if (argc <= 1 || argv[1][0] == '\0')
{
fprintf (stderr,
"%s: -o flag must be followed by a filename\n",
progname);
goto usage;
}
outfile = argv[1];
goto next_arg;
case 'S':
noindentypedefs++;
break;
case 't':
typedefs++;
break;
case 'T':
typedefs++;
typedefs_and_cplusplus++;
break;
/* Etags options */
case 'i':
if (!emacs_tags_format)
goto usage;
--argc;
++argv;
if (argc <= 1 || argv[1][0] == '\0')
{
fprintf (stderr,
"%s: -i flag must be followed by a filename\n",
progname);
goto usage;
}
included_files[nincluded_files++] = argv[1];
goto next_arg;
/* Ctags options. */
case 'B':
searchar = '?';
if (emacs_tags_format)
goto usage;
break;
case 'F':
searchar = '/';
if (emacs_tags_format)
goto usage;
break;
case 'u':
update++;
if (emacs_tags_format)
goto usage;
break;
case 'v':
vgrind_style++;
/*FALLTHRU*/
case 'x':
cxref_style++;
if (emacs_tags_format)
goto usage;
break;
case 'w':
no_warnings++;
if (emacs_tags_format)
goto usage;
break;
default:
fprintf (stderr,
"%s: -o flag may only be given once\n", progname);
goto usage;
}
outfile = optarg;
break;
case 'S':
noindentypedefs++;
break;
case 't':
typedefs++;
break;
case 'T':
typedefs++;
typedefs_and_cplusplus++;
break;
case 'V':
print_version ();
break;
case 'H':
print_help ();
break;
/* Etags options */
case 'i':
if (!emacs_tags_format)
goto usage;
included_files[nincluded_files++] = optarg;
break;
/* Ctags options. */
case 'B':
searchar = '?';
if (emacs_tags_format)
goto usage;
break;
case 'F':
searchar = '/';
if (emacs_tags_format)
goto usage;
break;
case 'u':
update++;
if (emacs_tags_format)
goto usage;
break;
case 'v':
vgrind_style++;
/*FALLTHRU*/
case 'x':
cxref_style++;
if (emacs_tags_format)
goto usage;
break;
case 'w':
no_warnings++;
if (emacs_tags_format)
goto usage;
break;
default:
goto usage;
}
next_arg:;
}
if (argc <= 1)
if (optind == argc)
{
fprintf (stderr, "%s: No input files specified.\n", progname);
usage:
fprintf (stderr, "Usage:\n");
#ifndef CTAGS
fprintf (stderr, "\tetags [-aDiS] [-o tagsfile] file ...\n");
#else
fprintf (stderr, "\tctags [-aBdeFTStuwvx] [-o tagsfile] file ...\n");
#endif
fprintf (stderr, "%s: Try '%s --help' for a complete list of options.\n",
progname, progname);
exit (BAD);
}
@ -652,10 +778,10 @@ main (argc, argv)
}
}
file_num = 1;
#ifdef VMS
for (argc--, argv++;
(this_file = gfnames (&argc, &argv, &got_err)) != NULL; file_num++)
argc -= optind;
argv += optind;
while (gfnames (&argc, &argv, &got_err) != NULL)
{
if (got_err)
{
@ -670,9 +796,9 @@ main (argc, argv)
} /* solely to balance out the ifdef'd parens above */
#endif
#else
for (; file_num < argc; file_num++)
for (; optind < argc; optind++)
{
this_file = argv[file_num];
this_file = argv[optind];
if (1)
{
#endif
@ -706,9 +832,11 @@ main (argc, argv)
put_entries (head);
exit (GOOD);
}
if (update) /* update cannot be set under VMS */
if (update)
{
for (i = 1; i < argc; i++)
/* update cannot be set under VMS, so we may assume that argc
and argv have not been munged. */
for (i = optind; i < argc; i++)
{
sprintf (cmd,
"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",
@ -905,7 +1033,9 @@ find_entries (file)
goto close_and_return;
}
/* if not a .c or .h or .y file, try fortran */
else if (cp && ((cp[1] != 'c' && cp[1] != 'h' && cp[1] != 'y')
else if (cp && ((cp[1] != 'c'
&& cp[1] != 'h'
&& cp[1] != 'y')
|| (cp[1] != 0 && cp[2] != 0)))
{
if (PF_funcs (inf) != 0)
@ -1308,6 +1438,8 @@ C_entries (c_ext)
definedef = dnone;
gotone = midtoken = inquote = inchar = incomm = FALSE;
level = 0;
tydef = none;
next_token_is_func = 0;
C_create_stabs ();
@ -1316,6 +1448,9 @@ C_entries (c_ext)
c = *lp++;
if (c == '\\')
{
/* If we're at the end of the line, the next character is a
'\0'; don't skip it, because it's the thing that tells us
to read the next line. */
if (*lp == 0)
continue;
lp++;
@ -1331,10 +1466,6 @@ C_entries (c_ext)
}
else if (inquote)
{
/*
* Too dumb to know about \" not being magic, but
* they usually occur in pairs anyway.
*/
if (c == '"')
inquote = FALSE;
continue;
@ -1569,11 +1700,6 @@ consider_token (c, lpp, tokp, is_func, c_ext, level)
int level; /* IN */
{
reg char *lp = *lpp;
/*
* next_token_is_func
* set this to TRUE, and the next token considered is called a function.
*/
static logical next_token_is_func;
logical firsttok; /* TRUE if have seen first token in ()'s */
Stab_entry *tokse = stab_find (get_C_stab (c_ext), tokp->p, tokp->len);
enum sym_type toktype = stab_type (tokse);
@ -1758,10 +1884,18 @@ consider_token (c, lpp, tokp, is_func, c_ext, level)
goto goodone;
}
/* Detect GNUmacs's function-defining macros. */
if (definedef == dnone && strneq (tokp->p, "DEF", 3))
if (definedef == dnone)
{
next_token_is_func = TRUE;
goto badone;
if (strneq (tokp->p, "DEF", 3))
{
next_token_is_func = TRUE;
goto badone;
}
else if (strneq (tokp->p, "EXFUN", 5))
{
next_token_is_func = FALSE;
goto badone;
}
}
if (next_token_is_func)
{

View file

@ -105,7 +105,7 @@ void
getevent()
{
extern char *memcpy(), *fgets();
extern char *fgets();
struct event *ep;
char buf[256];
@ -127,7 +127,7 @@ getevent()
free((char *)events[slot]), events[slot] = 0;
else {
(void)memcpy((char *)events[slot],(char *)ep,sizeof(struct event));
memcpy((char *)events[slot],(char *)ep,sizeof(struct event));
if (slot == mevent) mevent++;
} /* schedule */
} /* malloc */

View file

@ -99,10 +99,12 @@ Called with region narrowed to unformatted header.")
(defvar rmail-last-file nil)
(defvar rmail-last-rmail-file nil)
;;; Regexp matching the delimiter of messages in UNIX mail format
;;; (UNIX From lines), minus the initial ^. Note that if you change
;;; this expression, you must change the code in rmail-nuke-pinhead-header
;;; that knows the exact ordering of the \\( \\) subexpressions.
(defvar rmail-unix-mail-delimiter
"From \\([^ \n]*\\(\\|\".*\"[^ \n]*\\)\\) ?\\([^ \n]*\\) \\([^ ]*\\) *\\([0-9]*\\) \\([0-9:]*\\)\\( ?[A-Z]?[A-Z][A-Z]T\\( DST\\)?\\| ?[-+]?[0-9][0-9][0-9][0-9]\\|\\) [0-9][0-9]\\([0-9]*\\) *\\(remote from [^\n]*\\)?\n"
"Regexp matching the delimiter of messages in UNIX mail format (UNIX From lines), minus the
initial ^. ")
"From \\([^ \n]*\\(\\|\".*\"[^ \n]*\\)\\) ?\\([^ \n]*\\) \\([^ ]*\\) *\\([0-9]*\\) \\([0-9:]*\\)\\( ?[A-Z]?[A-Z][A-Z]T\\( DST\\)?\\| ?[-+]?[0-9][0-9][0-9][0-9]\\|\\) [0-9][0-9]\\([0-9]*\\) *\\(remote from [^\n]*\\)?\n" nil)
;;;; *** Rmail Mode ***

View file

@ -1319,7 +1319,7 @@ element pair in RLIST."
TYPE is number of words preceding KEY to start looking for subject.
MEM is t if results are to be put on Doctor's memory stack.
Return in the global variables SUBJ, VERB and OBJECT."
(let ((foo (doctor-subjsearch sent key type) sent))
(let ((foo (doctor-subjsearch sent key type)))
(or foo
(setq foo sent
mem nil))

View file

@ -19,8 +19,6 @@
;; file named COPYING. Among other things, the copyright notice
;; and this notice must be preserved on all copies.
(provide 'compile)
;;;###autoload
(defvar compilation-mode-hook nil
"*List of hook functions run by compilation-mode (see `run-hooks').")
@ -437,18 +435,30 @@ other kinds of prefix arguments are ignored."
;; If compilation-last-buffer is set to a live buffer, use that.
;; Otherwise, look for a compilation buffer and signal an error
;; if there are none.
(defun compilation-find-buffer ()
(if (compilation-buffer-p (current-buffer))
(defun compilation-find-buffer (&optional other-buffer)
(if (and (not other-buffer)
(compilation-buffer-p (current-buffer)))
;; The current buffer is a compilation buffer.
(current-buffer)
(if (and compilation-last-buffer (buffer-name compilation-last-buffer))
(if (and compilation-last-buffer (buffer-name compilation-last-buffer)
(or (not other-buffer) (not (eq compilation-last-buffer
(current-buffer)))))
compilation-last-buffer
(let ((buffers (buffer-list)))
(while (and buffers (not (compilation-buffer-p (car buffers))))
(while (and buffers (or (not (compilation-buffer-p (car buffers)))
(and other-buffer
(eq (car buffers) (current-buffer)))))
(setq buffers (cdr buffers)))
(if buffers
(car buffers)
(error "No compilation started!"))))))
(or (and other-buffer
(compilation-buffer-p (current-buffer))
;; The current buffer is a compilation buffer.
(progn
(if other-buffer
(message "This is the only compilation buffer."))
(current-buffer)))
(error "No compilation started!")))))))
;;;###autoload
(defun next-error (&optional argp)
@ -792,3 +802,5 @@ See variable `compilation-parse-errors-function' for the interface it uses."
(setq compilation-error-list (nreverse compilation-error-list)))
(define-key ctl-x-map "`" 'next-error)
(provide 'compile)

View file

@ -1,11 +1,11 @@
;; Process Emacs shell arguments
;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc.
;; 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 1, or (at your option)
;; 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,
@ -116,7 +116,9 @@ directory name of the directory where the `.emacs' file was looked for.")
(setq command-line-processed t)
;; In presence of symlinks, switch to cleaner form of default directory.
(if (and (not (eq system-type 'vax-vms))
(getenv "PWD"))
(getenv "PWD")
(equal (nthcdr 10 (file-attributes default-directory))
(nthcdr 10 (file-attributes (getenv "PWD")))))
(setq default-directory (file-name-as-directory (getenv "PWD"))))
(let ((tail directory-abbrev-alist))
(while tail

View file

@ -14,12 +14,17 @@ set -e
# Print out each line we read, for debugging's sake.
# set -v
cleanup=yes
clean_up=yes
make_tar=yes
while [ $# -gt 0 ]; do
case "$1" in
"--no-cleanup" )
cleanup=no
"--no-clean_up" )
clean_up=no
;;
"--no-tar" )
make_tar=no
clean_up=no
;;
* )
echo "${progname}: Unrecognized argument: $1" >&2
@ -65,9 +70,10 @@ mkdir ${tempdir}
# We copy in the top-level files before creating the subdirectories in
# hopes that this will make the top-level files appear first in the
# tar file.
# tar file; this means that people can start reading the INSTALL and
# README while the rest of the tar file is still unpacking. Whoopee.
echo "Copying top-level files."
ln INSTALL PROBLEMS README ${tempdir}
ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README ${tempdir}
ln ChangeLog Makefile.in build-install.in configure make-dist ${tempdir}
echo "Creating subdirectories."
@ -174,10 +180,12 @@ for subdir in lisp src lib-src info shortnames; do
ln -s ../etc/COPYING ${tempdir}/${subdir}
done
echo "Creating tar file."
(cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
if [ "${make_tar}" = yes ]; then
echo "Creating tar file."
(cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
fi
if [ "${cleanup}" = yes ]; then
if [ "${clean_up}" = yes ]; then
echo "Cleaning up the staging directory."
rm -rf ${tempparent}
fi

View file

@ -1,11 +1,11 @@
/* Execution of byte code produced by bytecomp.el.
Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -1077,8 +1077,7 @@ If the third argument is incorrect, Emacs may crash.")
break;
case Bnumberp:
TOP = (XTYPE (TOP) == Lisp_Int || XTYPE (TOP) == Lisp_Float
? Qt : Qnil);
TOP = (NUMBERP (TOP) ? Qt : Qnil);
break;
case Bintegerp:

View file

@ -408,12 +408,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
case 'n': /* Read number from minibuffer. */
do
args[i] = Fread_minibuffer (build_string (prompt), Qnil);
#ifdef LISP_FLOAT_TYPE
while (XTYPE (args[i]) != Lisp_Int
&& XTYPE (args[i]) != Lisp_Float);
#else
while (XTYPE (args[i]) != Lisp_Int);
#endif
while (! NUMBERP (args[i]));
visargs[i] = last_minibuf_string;
break;

View file

@ -200,7 +200,7 @@ If you quit, the process is killed with SIGKILL.")
env = environ;
#if 0 /* Some systems don't have sigblock. */
mask = sigblock (sigmask (SIGCHLD));
EMACS_SIGBLOCK (sigmask (SIGCHLD), mask);
#endif
/* Record that we're about to create a synchronous process. */
@ -511,6 +511,7 @@ This function consults the variable ``process-environment'' for its value.")
callable from C. */
char *
egetenv (var)
char *var;
{
char *value;
int valuelen;

View file

@ -1094,20 +1094,24 @@ Use %% to put a single % into the output.")
/* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */
else if (XTYPE (args[n]) == Lisp_Int && *format != 's')
{
#ifdef LISP_FLOAT_TYPE
/* The following loop issumes the Lisp type indicates
the proper way to pass the argument.
So make sure we have a flonum if the argument should
be a double. */
if (*format == 'e' || *format == 'f' || *format == 'g')
args[n] = Ffloat (args[n]);
#endif
total += 10;
}
#ifdef LISP_FLOAT_TYPE
else if (XTYPE (args[n]) == Lisp_Float && *format != 's')
{
if (! (*format == 'e' || *format == 'f' || *format == 'g'))
args[n] = Ftruncate (args[n]);
total += 20;
}
#endif
else
{
/* Anything but a string, convert to a string using princ. */
@ -1131,6 +1135,7 @@ Use %% to put a single % into the output.")
/* We checked above that the corresponding format effector
isn't %s, which would cause MPV. */
strings[n] = (unsigned char *) XINT (args[n]);
#ifdef LISP_FLOAT_TYPE
else if (XTYPE (args[n]) == Lisp_Float)
{
union { double d; int half[2]; } u;
@ -1139,6 +1144,7 @@ Use %% to put a single % into the output.")
strings[n++] = (unsigned char *) u.half[0];
strings[n] = (unsigned char *) u.half[1];
}
#endif
else
strings[n] = XSTRING (args[n])->data;
}

View file

@ -1,11 +1,11 @@
/* File IO for GNU Emacs.
Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -411,7 +411,7 @@ directory_file_name (src, dst)
/* Process as Unix format: just remove any final slash.
But leave "/" unchanged; do not change it to "". */
strcpy (dst, src);
if (dst[slen - 1] == '/' && slen > 1)
if (slen > 1 && dst[slen - 1] == '/')
dst[slen - 1] = 0;
return 1;
}
@ -2478,7 +2478,7 @@ Auto-saving writes the buffer into a file\n\
so that your editing is not lost if the system crashes.\n\
This file is not the file you visited; that changes only when you save.\n\n\
Non-nil first argument means do not print any message if successful.\n\
Non-nil second argumet means save only current buffer.")
Non-nil second argument means save only current buffer.")
(nomsg)
Lisp_Object nomsg;
{

View file

@ -1,11 +1,11 @@
/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
Copyright (C) 1988 Free Software Foundation, Inc.
Copyright (C) 1988, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -42,7 +42,7 @@ extern int errno;
#define sinh(x) ((exp(x)-exp(-x))*0.5)
#endif /* VMS */
static float_error ();
static SIGTYPE float_error ();
/* Nonzero while executing in floating point.
This tells float_error what to do. */
@ -60,8 +60,8 @@ static Lisp_Object float_error_arg;
Handle errors which may result in signals or may set errno. */
#define IN_FLOAT(D, NUM) \
(in_float = 1, errno = 0, float_error_arg = NUM, (D), \
(errno == ERANGE || errno == EDOM ? float_error () : 0), \
(in_float = 1, errno = 0, float_error_arg = NUM, (D), \
(errno == ERANGE || errno == EDOM ? float_error () : (SIGTYPE) 0), \
in_float = 0)
/* Extract a Lisp number as a `double', or signal an error. */
@ -498,7 +498,7 @@ Rounds the value toward zero.")
return num;
}
static
static SIGTYPE
float_error (signo)
int signo;
{

View file

@ -1,11 +1,11 @@
/* Fundamental definitions for GNU Emacs Lisp interpreter.
Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -506,15 +506,19 @@ typedef unsigned char UCHAR;
/* Data type checking */
#ifdef NULL
#undef NULL
#endif
#define NILP(x) (XFASTINT (x) == XFASTINT (Qnil))
#ifdef LISP_FLOAT_TYPE
#define NUMBERP(x) (XTYPE (x) == Lisp_Int || XTYPE (x) == Lisp_Float)
#else
#define NUMBERP(x) (XTYPE (x) == Lisp_Int)
#endif
/* #define LISTP(x) (XTYPE ((x)) == Lisp_Cons)*/
#define CONSP(x) (XTYPE ((x)) == Lisp_Cons)
#define EQ(x, y) (XFASTINT (x) == XFASTINT (y))
#define CHECK_LIST(x, i) \
{ if ((XTYPE ((x)) != Lisp_Cons) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); }

View file

@ -1448,14 +1448,15 @@ init_lread ()
uses ../lisp, instead of the path of the installed elisp
libraries. However, if it appears that Vload_path was changed
from the default before dumping, don't override that value. */
{
Lisp_Object normal_path;
if (initialized)
{
Lisp_Object dump_path;
normal_path = decode_env_path ("", normal);
if (
if (initialized
|| EQ (Vload_path, initial_path))
dump_path = decode_env_path ("", PATH_DUMPLOADSEARCH);
if (! NILP (Fequal (dump_path, Vload_path)))
Vload_path = decode_env_path ("", normal);
}
else
Vload_path = decode_env_path ("", normal);
#endif
@ -1487,11 +1488,6 @@ init_lread ()
Vvalues = Qnil;
if (initialized)
initial_path = Qnil;
else
initial_path = Vload_path;
load_in_progress = 0;
}

View file

@ -1,11 +1,11 @@
/* Lisp object printing and output streams.
Copyright (C) 1985, 1986, 1988 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1988, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -566,12 +566,12 @@ Output stream is STREAM, or value of `standard-output' (which see).")
for the convenience of the debugger. */
Lisp_Object Qexternal_debugging_output;
DEFUN ("external-debugging-output",
Fexternal_debugging_output, Sexternal_debugging_output,
1, 1, 0, "Write CHARACTER to stderr.\n\
DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0,
"Write CHARACTER to stderr.\n\
You can call print while debugging emacs, and pass it this function\n\
to make it write to the debugging output.\n")
(Lisp_Object character)
(character)
Lisp_Object character;
{
CHECK_NUMBER (character, 0);
putc (XINT (character), stderr);

View file

@ -403,7 +403,7 @@ status_message (status)
}
#ifdef HAVE_PTYS
static pty_process;
static int pty_process;
/* Open an available pty, returning a file descriptor.
Return -1 on failure.
@ -1803,6 +1803,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
if (read_kbd && detect_input_pending ())
break;
#ifdef SIGIO
/* If we think we have keyboard input waiting, but didn't get SIGIO
go read it. This can happen with X on BSD after logging out.
In that case, there really is no input and no SIGIO,
@ -1813,6 +1814,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
*/
if (read_kbd && interrupt_input && (FD_ISSET (fileno (stdin), &Available)))
kill (0, SIGIO);
#endif
#ifdef vipc
/* Check for connection from other process */
@ -2106,12 +2108,14 @@ send_process (proc, buf, len)
while (len > 0)
{
int this = len;
SIGTYPE (*old_sigpipe)();
/* Don't send more than 500 bytes at a time. */
if (this > 500)
this = 500;
signal (SIGPIPE, send_process_trap);
old_sigpipe = signal (SIGPIPE, send_process_trap);
rv = write (XFASTINT (XPROCESS (proc)->outfd), buf, this);
signal (SIGPIPE, SIG_DFL);
signal (SIGPIPE, old_sigpipe);
if (rv < 0)
{
if (0

View file

@ -27,6 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "lisp.h" /* Needed for VALBITS. */
#undef NULL
#include "mem_limits.h"
#include "getpagesize.h"
#define NIL ((POINTER) 0)

View file

@ -228,6 +228,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define HAVE_GETTIMEOFDAY
#define HAVE_VFORK
#define HAVE_PERROR /* Delete this line for version 6. */
#define HAVE_RENAME
/* The following maps shared exec file to demand loaded exec.
Don't do this as demand loaded exec is broken in hpux. */
@ -253,8 +254,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This is how to get the device name of the tty end of a pty. */
#define PTY_TTY_NAME_SPRINTF \
sprintf (ptyname, "/dev/pty/tty%c%x", c, i);
sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
/* This is how to get the device name of the control end of a pty. */
#define PTY_NAME_SPRINTF \
sprintf (ptyname, "/dev/ptym/pty%c%x", c, i);
sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);

View file

@ -23,6 +23,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "syntax.h"
#include "buffer.h"
#include "commands.h"
#include <sys/types.h>
#include "regex.h"
@ -39,9 +40,14 @@ char search_fastmap[0400];
Lisp_Object last_regexp;
/* Every call to re_match, etc., must pass &search_regs as the regs argument
unless you can show it is unnecessary (i.e., if re_match is certainly going
to be called again before region-around-match can be called). */
/* Every call to re_match, etc., must pass &search_regs as the regs
argument unless you can show it is unnecessary (i.e., if re_match
is certainly going to be called again before region-around-match
can be called).
Since the registers are now dynamically allocated, we need to make
sure not to refer to the Nth register before checking that it has
been allocated. */
static struct re_registers search_regs;
@ -147,7 +153,7 @@ DEFUN ("looking-at", Flooking_at, Slooking_at, 1, 1, 0,
matcher_overflow ();
val = (0 <= i ? Qt : Qnil);
for (i = 0; i < RE_NREGS; i++)
for (i = 0; i < search_regs.num_regs; i++)
if (search_regs.start[i] >= 0)
{
search_regs.start[i] += BEGV;
@ -489,7 +495,7 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
/* generality of an RE search is */
/* really needed. */
/* first item is "exact match" */
&& *(searchbuf.buffer) == RE_EXACTN_VALUE
&& *(searchbuf.buffer) == (char) RE_EXACTN_VALUE
&& searchbuf.buffer[1] + 2 == searchbuf.used) /*first is ONLY item */
{
RE = 0; /* can do straight (non RE) search */
@ -542,7 +548,7 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
if (val >= 0)
{
j = BEGV;
for (i = 0; i < RE_NREGS; i++)
for (i = 0; i < search_regs.num_regs; i++)
if (search_regs.start[i] >= 0)
{
search_regs.start[i] += j;
@ -569,7 +575,7 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
if (val >= 0)
{
j = BEGV;
for (i = 0; i < RE_NREGS; i++)
for (i = 0; i < search_regs.num_regs; i++)
if (search_regs.start[i] >= 0)
{
search_regs.start[i] += j;
@ -996,6 +1002,10 @@ Leaves point at end of replacement text.")
case_action = nochange; /* We tried an initialization */
/* but some C compilers blew it */
if (search_regs.num_regs <= 0)
error ("replace-match called before any match found");
if (search_regs.start[0] < BEGV
|| search_regs.start[0] > search_regs.end[0]
|| search_regs.end[0] > ZV)
@ -1068,7 +1078,7 @@ Leaves point at end of replacement text.")
Finsert_buffer_substring (Fcurrent_buffer (),
make_number (search_regs.start[0]),
make_number (search_regs.end[0]));
else if (c >= '1' && c <= RE_NREGS + '0')
else if (c >= '1' && c <= search_regs.num_regs + '0')
{
if (search_regs.start[c - '0'] >= 1)
Finsert_buffer_substring (Fcurrent_buffer (),
@ -1103,9 +1113,10 @@ match_limit (num, beginningp)
CHECK_NUMBER (num, 0);
n = XINT (num);
if (n < 0 || n >= RE_NREGS)
args_out_of_range (num, make_number (RE_NREGS));
if (search_regs.start[n] < 0)
if (n < 0 || n >= search_regs.num_regs)
args_out_of_range (num, make_number (search_regs.num_regs));
if (search_regs.num_regs <= 0
|| search_regs.start[n] < 0)
return Qnil;
return (make_number ((beginningp) ? search_regs.start[n]
: search_regs.end[n]));
@ -1141,11 +1152,14 @@ if the last match was on a buffer; integers or nil if a string was matched.\n\
Use `store-match-data' to reinstate the data in this list.")
()
{
Lisp_Object data[2 * RE_NREGS];
Lisp_Object *data;
int i, len;
data = (Lisp_Object *) alloca ((2 * search_regs.num_regs)
* sizeof (Lisp_Object));
len = -1;
for (i = 0; i < RE_NREGS; i++)
for (i = 0; i < search_regs.num_regs; i++)
{
int start = search_regs.start[i];
if (start >= 0)
@ -1184,7 +1198,30 @@ LIST should have been created by calling `match-data' previously.")
if (!CONSP (list) && !NILP (list))
list = wrong_type_argument (Qconsp, list, 0);
for (i = 0; i < RE_NREGS; i++)
/* Allocate registers if they don't already exist. */
{
int length = Flength (list) / 2;
if (length > search_regs.num_regs)
{
if (search_regs.start)
search_regs.start =
(regoff_t *) realloc (search_regs.start,
length * sizeof (regoff_t));
else
search_regs.start = (regoff_t *) malloc (length * sizeof (regoff_t));
if (search_regs.end)
search_regs.end =
(regoff_t *) realloc (search_regs.end,
length * sizeof (regoff_t));
else
search_regs.end = (regoff_t *) malloc (length * sizeof (regoff_t));
search_regs.num_regs = length;
}
}
for (i = 0; i < search_regs.num_regs; i++)
{
marker = Fcar (list);
if (NILP (marker))

View file

@ -110,19 +110,6 @@ extern char *sys_errlist[];
#endif /* not 4.1 */
#endif /* BSD */
#ifdef AIX
/* Get files for keyboard remapping */
#define HFNKEYS 2
#include <sys/hft.h>
#include <sys/devinfo.h>
#endif
/* Get rid of LLITOUT in 4.1, since it is said to stimulate kernel bugs. */
#ifdef BSD4_1
#undef LLITOUT
#define LLITOUT 0
#endif /* 4.1 */
#ifdef BROKEN_TIOCGWINSZ
#undef TIOCGWINSZ
#endif
@ -144,31 +131,6 @@ extern char *sys_errlist[];
#endif /* TIOCGWINSZ */
#endif /* USG */
#ifdef NEED_BSDTTY
#include <sys/bsdtty.h>
#endif
#if defined (HPUX) && defined (HAVE_PTYS)
#include <sys/ptyio.h>
#endif
#ifdef AIX
#include <sys/pty.h>
#include <unistd.h>
#endif /* AIX */
#ifdef SYSV_PTYS
#include <sys/tty.h>
#include <sys/pty.h>
#endif
/* saka@pfu.fujitsu.co.JP writes:
FASYNC defined in this file. But, FASYNC don't working.
so no problem, because unrequest_sigio only need. */
#if defined (pfa)
#include <sys/file.h>
#endif
extern int quit_char;
#include "screen.h"
@ -2348,6 +2310,8 @@ getwd (pathname)
* that files be of same type (regular->regular, dir->dir, etc).
*/
#ifndef HAVE_RENAME
rename (from, to)
char *from;
char *to;
@ -2362,9 +2326,11 @@ rename (from, to)
return (-1);
}
#endif
/* Set priority value to PRIO. */
void
int
setpriority (which, who, prio)
int which, who, prio;
{

View file

@ -33,6 +33,44 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif /* not HAVE_TERMIOS */
#endif /* not HAVE_TERMIO */
#ifdef AIX
/* Get files for keyboard remapping */
#define HFNKEYS 2
#include <sys/hft.h>
#include <sys/devinfo.h>
#endif
/* Get rid of LLITOUT in 4.1, since it is said to stimulate kernel bugs. */
#ifdef BSD4_1
#undef LLITOUT
#define LLITOUT 0
#endif /* 4.1 */
#ifdef NEED_BSDTTY
#include <sys/bsdtty.h>
#endif
#if defined (HPUX) && defined (HAVE_PTYS)
#include <sys/ptyio.h>
#endif
#ifdef AIX
#include <sys/pty.h>
#include <unistd.h>
#endif /* AIX */
#ifdef SYSV_PTYS
#include <sys/tty.h>
#include <sys/pty.h>
#endif
/* saka@pfu.fujitsu.co.JP writes:
FASYNC defined in this file. But, FASYNC don't working.
so no problem, because unrequest_sigio only need. */
#if defined (pfa)
#include <sys/file.h>
#endif
/* Special cases - inhibiting the use of certain features. */
@ -183,6 +221,13 @@ struct emacs_tty {
#define EMACS_SET_TTY_1(fd, p, waitp) \
(tcsetattr ((fd), (waitp) ? TCSAFLUSH : TCSADRAIN, &(p)->main) != -1)
#else
#ifdef HAVE_TERMIO
#define EMACS_GET_TTY_1(fd, p) (ioctl ((fd), TCGETA, &(p)->main) != -1)
#define EMACS_SET_TTY_1(fd, p, waitp) \
(ioctl ((fd), (waitp) ? TCSETAW : TCSETAF, &(p)->main) != -1)
#else
#ifdef VMS
@ -203,6 +248,7 @@ struct emacs_tty {
#endif
#endif
#endif
#ifdef TIOCGLTC
struct ltchars ltchars;

View file

@ -1,11 +1,11 @@
/* terminal control module for terminals described by TERMCAP
Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -465,6 +465,7 @@ change_line_highlight (new_highlight, vpos, first_unused_hpos)
/* Move to absolute position, specified origin 0 */
cursor_to (row, col)
int row, col;
{
if (! SCREEN_IS_TERMCAP ((updating_screen
? updating_screen
@ -488,6 +489,7 @@ cursor_to (row, col)
/* Similar but don't take any account of the wasted characters. */
raw_cursor_to (row, col)
int row, col;
{
if (! SCREEN_IS_TERMCAP ((updating_screen ? updating_screen : selected_screen)))
{
@ -1393,6 +1395,7 @@ It may be necessary to do `unsetenv TERMCAP' as well.\n",
/* VARARGS 1 */
fatal (str, arg1, arg2)
char *str, *arg1, *arg2;
{
fprintf (stderr, "emacs: ");
fprintf (stderr, str, arg1, arg2);

View file

@ -1,11 +1,11 @@
/* Functions for the X window system.
Copyright (C) 1989 Free Software Foundation.
Copyright (C) 1989, 1992 Free Software Foundation.
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 1, or (at your option)
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,
@ -3950,7 +3950,8 @@ also be depressed for NEWSTRING to appear.")
register Lisp_Object newstring;
{
char *rawstring;
register KeySym keysym, modifier_list[16];
register KeySym keysym;
KeySym modifier_list[16];
CHECK_STRING (x_keysym, 1);
CHECK_STRING (newstring, 3);

View file

@ -1,11 +1,11 @@
/* X Communication module for terminals which understand the X protocol.
Copyright (C) 1989 Free Software Foundation, Inc.
Copyright (C) 1989, 1992 Free Software Foundation, Inc.
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 1, or (at your option)
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,
@ -258,8 +258,8 @@ static void dumpqueue ();
#endif
void dumpborder ();
static XTcursor_to ();
static XTclear_end_of_line ();
static int XTcursor_to ();
static int XTclear_end_of_line ();
/* These hooks are called by update_screen at the beginning and end
of a screen update. We record in `updating_screen' the identity
@ -361,7 +361,7 @@ XTreset_terminal_modes ()
where display update commands will take effect.
This does not affect the place where the cursor-box is displayed. */
static
static int
XTcursor_to (row, col)
register int row, col;
{
@ -582,7 +582,7 @@ XTwrite_glyphs (start, len)
to column FIRST_UNUSED (exclusive). The idea is that everything
from FIRST_UNUSED onward is already erased. */
static
static int
XTclear_end_of_line (first_unused)
register int first_unused;
{
@ -2775,6 +2775,19 @@ x_text_icon (s, icon_name)
return 0;
}
/* Handling X errors. */
/* A handler for SIGPIPE, when it occurs on the X server's connection.
This basically does an orderly shutdown of Emacs. */
static SIGTYPE
x_death_handler ()
{
if (_Xdebug)
abort ();
else
Fkill_emacs (make_number (70));
}
static char *x_proto_requests[] =
{
"CreateWindow",
@ -2961,14 +2974,9 @@ x_error_handler (disp, event)
}
UNBLOCK_INPUT;
if (_Xdebug)
abort ();
else
Fkill_emacs (make_number (70));
x_death_handler ();
}
/* Initialize communication with the X window server. */
#if 0
static unsigned int x_wire_count;
x_trace_wire ()
@ -3740,7 +3748,7 @@ x_term_init (display_name)
signal (SIGWINCH, SIG_DFL);
#endif /* SIGWINCH */
signal (SIGPIPE, x_error_handler);
signal (SIGPIPE, x_death_handler);
}
void