Commit a4a9692d authored by Dave Love's avatar Dave Love

#

parent d7f3b202
This diff is collapsed.
If you think you may have found a bug in GNU Emacs, please
read the Bugs section of the Emacs manual for advice on
(1) how to tell when to report a bug, and
(2) how to write a useful bug report and what information
it needs to have.
There are three ways to read the Bugs section.
(1) In a printed copy of the Emacs manual.
You can order one from the Free Software Foundation;
see the file etc/ORDERS. But if you don't have a copy on
hand and you think you have found a bug, you shouldn't wait
to get a printed manual; you should read the section right away
as described below.
(2) With Info. Start Emacs, do C-h i to enter Info,
then m Emacs RET to get to the Emacs manual, then m Bugs RET
to get to the section on bugs. Or use standalone Info in
a like manner. (Standalone Info is part of the Texinfo distribution,
not part of the Emacs distribution.)
(3) By hand. Do
cat info/emacs* | more "+/^File: emacs, Node: Bugs,"
This source diff could not be displayed because it is too large. You can view the blob instead.
This directory tree holds version 20.0 of GNU Emacs, the extensible,
customizable, self-documenting real-time display editor.
You may encounter bugs in this release. If you do, please report
them; your bug reports are valuable contributions to the FSF, since
they allow us to notice and fix problems on machines we don't have, or
in code we don't use often. See the file BUGS for more information on
how to report bugs.
See the files `etc/NEWS' and `etc/news.texi' for information on new
features and other user-visible changes since the last version of
Emacs.
The file INSTALL in this directory says how to bring up GNU Emacs on
Unix, once you have loaded the entire subtree of this directory.
The file etc/PROBLEMS contains information on many common problems that
occur in building, installing and running Emacs.
Reports of bugs in Emacs should be sent to the mailing list
bug-gnu-emacs@gnu.org. See the "Bugs" section of the Emacs
manual for more information on how to report bugs. (The file `BUGS'
in this directory explains how you can find and read that section
using the Info files that come with Emacs.) See `etc/MAILINGLISTS'
for more information on mailing lists relating to GNU packages.
The `etc' subdirectory contains several other files, named in
capital letters, which you should look at when installing GNU Emacs.
The file `configure' is a shell script to acclimate Emacs to the
oddities of your processor and operating system. It creates the file
`Makefile' (a script for the `make' program), which automates the
process of building and installing Emacs. See INSTALL for more
detailed information.
The file `configure.in' is the input used by the autoconf program to
construct the `configure' script. Since Emacs has configuration
requirements that autoconf can't meet, `configure.in' uses an unholy
marriage of custom-baked configuration code and autoconf macros; it
may be wise to avoid rebuilding `configure' from `configure.in' when
possible.
The file `Makefile.in' is a template used by `configure' to create
`Makefile'.
The file `make-dist' is a shell script to build a distribution tar
file from the current Emacs tree, containing only those files
appropriate for distribution. If you make extensive changes to Emacs,
this script will help you distribute your version to others.
There are several subdirectories:
`src' holds the C code for Emacs (the Emacs Lisp interpreter and its
primitives, the redisplay code, and some basic editing functions).
`lisp' holds the Emacs Lisp code for Emacs (most everything else).
`lib-src' holds the source code for some utility programs for use by
or with Emacs, like movemail and etags.
`etc' holds miscellaneous architecture-independent data files
Emacs uses, like the tutorial text and the Zippy the Pinhead quote
database. The contents of the `lisp', `info' and `man'
subdirectories are architecture-independent too.
`info' holds the Info documentation tree for Emacs.
`man' holds the source code for the Emacs manual.
Note that the Emacs Lisp manual sources are distributed separately.
(They are twice as large as the Emacs manual in the man subdirectory.)
`msdos' holds configuration files for compiling Emacs under MSDOG.
`vms' holds instructions and useful files for running Emacs under VMS.
`nt' holds various command files and documentation files that pertain
to running Emacs on Windows NT.
#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
/* IS_EXEC.C
*
* Given a filename or a file handle, and the extension of the file,
* determine if the file is executable.
* First, the file extension is checked in case it uniquely identifies
* the file as either an executable or not. Failing this, the first
* two bytes of the file are tested for known signatures of executable
* files.
*
* Copyright (c) 1994 Eli Zaretskii <eliz@is.elta.co.il>
*
* This software may be used freely so long as this copyright notice is
* left intact. There is no warranty on this software.
*
*/
#include <libc/stubs.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <dpmi.h>
#include <go32.h>
#include <io.h>
#include <libc/farptrgs.h>
#include <libc/dosio.h>
extern unsigned short _djstat_flags;
unsigned short _get_magic(const char *, int);
int _is_executable(const char *, int, const char *);
/*
* Read a MAGIC NUMBER from a given file. These are the first
* two bytes of the file, if we look at them as an unsigned short. */
#define _STAT_EXEC_EXT 2 /* get execute bits from file extension? */
#define _STAT_EXEC_MAGIC 4 /* get execute bits from magic signature? */
unsigned short
_get_magic(const char *s, int fh)
{
__dpmi_regs regs;
unsigned short retval;
unsigned short fpos_high = 0, fpos_low = 0;
int read_fail = 0;
/* If given a pathname, open the file. */
if (s)
{
int handle;
if((handle = _open(s,0)) == -1)
return 0;
regs.x.bx = handle;
}
/* Else file already open. Remember its current file position
and move to beginning of file. */
else
{
regs.x.ax = 0x4201; /* set pointer from current position */
regs.x.bx = fh;
regs.x.cx = regs.x.dx = 0; /* move 0 bytes (i.e., stay put) */
__dpmi_int(0x21, &regs);
if (regs.x.flags & 1)
{
errno = __doserr_to_errno(regs.x.ax);
return 0;
}
fpos_high = regs.x.dx; /* got current position */
fpos_low = regs.x.ax;
regs.x.ax = 0x4200; /* set pointer from the beginning of file */
regs.x.cx = regs.x.dx = 0; /* move to beginning of file */
__dpmi_int(0x21, &regs);
if (regs.x.flags & 1)
{
errno = __doserr_to_errno(regs.x.ax);
return 0;
}
}
regs.x.ds = __tb_segment;
regs.x.dx = __tb_offset;
/* Read 2 bytes from the file. */
regs.x.ax = 0x3f00;
regs.x.cx = 2;
__dpmi_int(0x21, &regs);
/* We can either (1) succeed, (2) read less than 2 bytes,
or (3) fail to read at all. */
if (regs.x.ax != 2)
read_fail = (regs.x.flags & 1) ? regs.x.ax : -1;
/* If called with filename, close the file. */
if (s)
{
regs.x.ax = 0x3e00;
__dpmi_int(0x21, &regs);
if (regs.x.flags & 1)
errno = __doserr_to_errno(regs.x.ax);
}
/* Else leave file pointer where we found it. */
else
{
regs.x.ax = 0x4200; /* set pointer from the beginning of file */
regs.x.bx = fh;
regs.x.cx = fpos_high;
regs.x.dx = fpos_low;
__dpmi_int(0x21, &regs);
if (regs.x.flags & 1)
{
errno = __doserr_to_errno(regs.x.ax);
return 0;
}
}
if (read_fail == 0)
retval = _farpeekw(_dos_ds, __tb);
else
{
/* The file couldn't be read: assume non-executable. If the file
*is* executable, but was passed as a file-handle, and the user
opened it in write-only mode, they lose... */
retval = 0;
if (read_fail != -1)
errno = __doserr_to_errno(read_fail);
}
return retval;
}
/* A list of extensions which designate executable files. These
are NOT tested for the magic number. */
static char executables[] = "|EXE|COM|BAT|BTM|DLL|VXD|";
/* A list of extensions which belong to files known to NEVER be
executables. These exist to minimize read()'ing files while
detecting executables by magic number. You are welcome to
add to this list, but remember: only extensions which could
NEVER be present in executables should go here. */
static char non_executables[] = "\
|A|A01|A02|A03|A04|A05|ADL|ARC|ARJ|ASC|ASM|AUX|AWK\
|BAS|BIB|BGI|BMP\
|C|CC|CFG|CGZ|CH3|CHR|CI|CLP|CMF|CPI|CPP|CXX\
|DAT|DBF|DIZ|DOC|DVI\
|E|EL|ELC\
|F77|FN3\
|GIF|GZ\
|H|HLP|HPP|HXX\
|ICO|IN|INC|INF|INI\
|JPG\
|L|LEX|LF|LIB|LOG|LST|LZH\
|M|MAK|MAP|MF|MID|MPG\
|O|OBJ\
|PAK|PAS|PBM|PCD|PCX|PDS|PIC|PIF|PN3|PRJ|PS\
|RAS|RGB|RLE\
|S|SND|SY3\
|TAR|TAZ|TEX|TGA|TGZ|TIF|TXH|TXI|TXT\
|VOC\
|WAV|WK1|WK3|WKB|WQ1|WQ3|WQ4|WQ5|WQ6|WQ!\
|XBM\
|Y\
|ZIP|ZOO|";
int
_is_executable(const char *filename, int fhandle, const char *extension)
{
if (!extension && filename)
{
const char *cp, *ep=0;
for (cp=filename; *cp; cp++)
{
if (*cp == '.')
ep = cp;
if (*cp == '/' || *cp == '\\' || *cp == ':')
ep = 0;
}
extension = ep;
}
if ((_djstat_flags & _STAT_EXEC_EXT) == 0
&& extension
&& *extension
&& strlen(extension) <= ((extension[0]=='.') ? 4 : 3))
{
/* Search the list of extensions in executables[]. */
char tmp_buf[6], *tp = tmp_buf;
*tp++ = '|';
if (*extension == '.')
extension++;
while (*extension)
*tp++ = toupper (*extension++);
*tp++ = '|';
*tp = '\0';
if (strstr(non_executables, tmp_buf))
return 0;
else if (strstr(executables, tmp_buf))
return 1;
}
/* No extension, or extension doesn't define execute
bits unambiguously. We are in for some dirty work.
Read the first two bytes of the file and see if they
are any of the known magic numbers which designate
executable files.
Unix-like shells, which have executable shell scripts
without extensions and DON'T have "#!" as their FIRST
TWO CHARACTERS, lose here. Sorry, folks. */
if ( (_djstat_flags & _STAT_EXEC_MAGIC) == 0 )
{
switch (_get_magic(filename, fhandle))
{
case 0x5a4d: /* "MZ" */
case 0x010b:
case 0x014c:
case 0x2123: /* "#!" */
return 1;
}
}
return 0;
}
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <signal.h>
#include <errno.h>
int
sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
{
int retval = 0;
if (_oact)
{
void (*installed_sig)(int) = signal (_sig, SIG_IGN);
/* FIXME */
if (installed_sig == SIG_ERR)
{
retval = -1;
errno = EINVAL;
}
else
signal (_sig, installed_sig);
_oact->sa_handler = installed_sig;
retval = sigemptyset (&_oact->sa_mask);
_oact->sa_flags = 0;
}
if (_act)
{
if (signal (_sig, _act->sa_handler) == SIG_ERR)
{
retval = -1;
errno = EINVAL;
}
}
return 0;
}
This diff is collapsed.
Building and Installing Emacs
on Windows NT and Windows 95
You need a compiler package to build and install Emacs on NT or Win95.
If you don't have one, precompiled versions are available in
ftp://ftp.cs.washington.edu/pub/ntemacs/<version>.
Configuring:
(1) In previous versions, you needed to edit makefile.def
to reflect the compiler package that you are using. You should no
longer have to do this if you have defined the INCLUDE and LIB
environment variables, as is customary for use with Windows compilers.
(Unless you are using MSVCNT 1.1, in which case you will need
to set MSVCNT11 to be a non-zero value at the top of makefile.def.)
(2) Choose the directory into which Emacs will be installed, and
edit makefile.def to define INSTALL_DIR to be this directory.
(Alternatively, if you have INSTALL_DIR set as an environment
variable, the build process will ignore the value in makefile.def
and use the value of the environment variable instead.) Note
that if it is not installed in the directory in which it is built,
the ~16 MB of lisp files will be copied into the installation directory.
Also, makefile.def is sometimes unpacked read-only; use
> attrib -r makefile.def
to make it writable.
(3) You may need to edit nt/paths.h to specify some other device
instead of `C:'.
Building:
(4) The target to compile the sources is "all", and is recursive starting
one directory up. The makefiles for the NT port are in files named
"makefile.nt". To get things started, type in this directory:
> nmake -f makefile.nt all
or use the ebuild.bat file.
When the files are compiled, you will see some warning messages declaring
that some functions don't return a value, or that some data conversions
will be lossy, etc. You can safely ignore these messages. The warnings
may be fixed in the main FSF source at some point, but until then we
will just live with them.
NOTE: You should not have to edit src\paths.h to get Emacs to run
correctly. All of the variables in src\paths.h are configured
during start up using the nt\emacs.bat file (which gets installed
as bin\emacs.bat -- see below).
Installing:
(5) Currently, Emacs requires a number of environment variables to be set
for it to run correctly. A batch file, emacs.bat, is provided that
sets these variables appropriately and then runs the executable
(emacs.bat is generated using the definition of INSTALL_DIR in
nt\makefile.def and the contents of nt\emacs.bat.in).
(6) The install process will install the files necessary to run Emacs in
INSTALL_DIR (which may be the directory in which it was built),
and create a program manager/folder icon in a folder called GNU Emacs.
From this directory, type:
> nmake -f makefile.nt install
or use the install.bat file.
(7) Create the Emacs startup file. This file can be named either .emacs,
as on Unix, or _emacs. Note that Emacs requires the environment
variable HOME to be set in order for it to locate the startup file.
HOME could be set, for example, in the System panel of the Control
Panel on NT, or in autoexec.bat on Win95.
(8) Start up Emacs.
The installation process should have run the addpm.exe program, which
does two things. First, it will create a set of registry keys that
tell Emacs where to find its support files (lisp, info, etc.).
Second, it will create a folder containing an icon linked to
runemacs.exe (a wrapper program for invoking Emacs). You can
also invoke addpm.exe by hand, giving the absolute directory name
of the installation directory as the first argument:
addpm.exe %INSTALL_DIR%
Now, to run Emacs, simply click on the icon in the newly created
folder or invoke runemacs.exe from a command prompt.
Another alternative for running Emacs is to use the emacs.bat batch
file in the bin directory (this was the traditional method of invoking
Emacs). Edit the emacs.bat file to change the emacs_dir environment
variable to point to the Emacs installation directory and invoke the
emacs.bat file to run Emacs.
Note that, on Win95, you are likely to get "Out of environment space"
messages when invoking the emacs.bat batch file. The problem is that
the console process in which the script is executed runs out of memory
in which to set the Emacs environment variables. To get around this
problem, create a shortcut icon to the emacs.bat script. Then right
click on the icon and select Properties. In the dialog box that pops
up, select the Memory tab and then change the Environment memory
allocation from "Auto" to "1024". Close the dialog box and then
double click on the icon to start Emacs.
Debugging:
(9) You should be able to debug Emacs using the MSVC debugger as you would
any other program. To ensure that Emacs uses the lisp files associated
with the source distribution that you are debugging, it is useful
to set the Emacs environment variables to point Emacs to the
source distribution. You can use the debug.bat batch file in this
directory to setup the environment and invoke msdev on the
emacs.exe executable.
Emacs functions implemented in C use a naming convention that
reflects their names in lisp. The names of the C routines are
the lisp names prefixed with 'F', and with dashes converted to
underscores. For example, the function call-process is implemented
in C by Fcall_process. Similarly, lisp variables are prefixed
with 'V', again with dashes converted to underscores. These
conventions enable you to easily set breakpoints or examine familiar
lisp variables by name.
Since Emacs data is often in the form of a lisp object, and the
Lisp_Object type is difficult to examine manually in the debugger,
Emacs provides a helper routine called debug_print that prints out
a readable representation of a Lisp_Object. The output from
debug_print is sent to stderr, and to the debugger via the
OutputDebugString routine. The output sent to stderr should be
displayed in the console window that was opened when the emacs.exe
executable was started. The output sent to the debugger should be
displayed in its "Debug" output window.
When you are in the process of debugging Emacs and you would like
to examine the contents of a Lisp_Object variable, popup the
QuickWatch window (QuickWatch has an eyeglass symbol on its button
in the toolbar). In the text field at the top of the window, enter
debug_print(<variable>) and hit return. For example, start
and run Emacs in the debugger until it is waiting for user input.
Then click on the Break button in the debugger to halt execution.
Emacs should halt in ZwUserGetMessage waiting for an input event.
Use the Call Stack window to select the procedure w32_msp_pump
up the call stack (see below for why you have to do this). Open
the QuickWatch window and enter debug_print(Vexec_path). Evaluating
this expression will then print out the contents of the lisp
variable exec-path.
If QuickWatch reports that the symbol is unknown, then check the
call stack in the Call Stack window. If the selected frame in the
call stack is not an Emacs procedure, then the debugger won't
recognize Emacs symbols. Instead, select a frame that is inside
an Emacs procedure and try using debug_print again.
If QuickWatch invokes debug_print but nothing happens, then check
the thread that is selected in the debugger. If the selected
thread is not the last thread to run (the "current" thread), then
it cannot be used to execute debug_print. Use the Debug menu
to select the current thread and try using debug_print again.
Note that the debugger halts execution (e.g., due to a breakpoint)
in the context of the current thread, so this should only be a problem
if you've explicitly switched threads.
Emacs for Windows NT and Windows 95
This directory contains support for compiling and running GNU Emacs on
Windows NT and Windows 95. This port supports all of the major
functionality of the Unix version, including subprocesses, windowing
features (fonts, colors, scroll bars, multiple frames, etc.), and
networking support.
Precompiled distributions are also available; ftp to
ftp://ftp.cs.washington.edu/pub/ntemacs/latest
for the latest precompiled distributions.
* Preliminaries
To compile Emacs, you will need a Microsoft C compiler package. For
NT, this can be any of the SDK compilers from NT 3.1 and up, Microsoft
Visual C++ for NT (versions 1.0 and up), or Microsoft Visual C++
(versions 2.0 and up). For Windows 95, this can be Microsoft Visual
C++ versions 2.0 and up.
* Building and installing
See the INSTALL file in this directory for detailed instructions on
building and installing Emacs on your system.
* Further information
If you have access to the World Wide Web, I would recommend pointing
your favorite web browser to the document (if you haven't already):
http://www.cs.washington.edu/homes/voelker/ntemacs.html
This web document serves as a FAQ and a source for further information
about the port and related software packages.
There is also a mailing list for discussing issues related to this
port of Emacs. For information about the list, send a message to
ntemacs-users-request@cs.washington.edu with the word "info" in the
*body* of the message. To subscribe to the list, send a message to
the same address with the word "subscribe" in the body of the message;
similarly, to unsubscribe from the list, send a message with the word
"unsubscribe" in the message body.
You are also always welcome to send me mail directly. If you don't
hear from me immediately, however, don't worry; it sometimes takes me
a few days (or longer) to get to all of my mail regarding Emacs.
* Reporting bugs
If you encounter bugs in this port of Emacs, first check the FAQ on
the web page above to see if the bug is already known and if there are
any workarounds. If not, then I would like to hear about it; either
send a bug report to the mailing list, or to me directly (I would
recommend sending to the list first).
Enjoy.
-geoff
(voelker@cs.washington.edu)
This is a list of known problems to date with the Windows NT/95 port of
GNU Emacs.
* Handle wildcards in ls-lisp (e.g., C-x d *.c).
* Interactive subprocess output is buffered in jerky
* Presently, C:\foo\bar and C:/foo/bar bring up two buffers on the same file.
Solve this by adding a switch that canonicalizes path separators
(e.g., make them all / or all \)?
* call-process-region: Another tricky situation with binary and text modes.
An example by dsrosing@reston.ingr.com: use crypt++ to load compressed
data into a buffer, edit the buffer, save the data back out. (Also
need to propagate the "/C" switch change sent the shell in crypt++.el
back to the author.)
* Dired uses ls-lisp, which reports all files as being owned by the
current user. Need to dig through the security descriptor to extract
the owner of the file (and the group?) using LookupAccountSid.
* Integrate the build for NT into the GNU config process once
a decent shell becomes freely available
* Integrate networking.
* Fix Win95 subprocesses.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
#!/bin/sh
# Write into $1/subdirs.el a list of subdirs of directory $1.
cd $1
for file in *; do
case $file in
*.elc | *.el | term | RCS | Old | . | .. | =* | *~ | *.orig | *.rej)
;;
*)
if [ -d $file ]; then
subdirs="\"$file\" $subdirs"