summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/.arch-inventory10
-rw-r--r--lib-src/ChangeLog56
-rw-r--r--lib-src/Makefile.in7
-rw-r--r--lib-src/b2m.c21
-rw-r--r--lib-src/cvtmail.c8
-rw-r--r--lib-src/ebrowse.c17
-rw-r--r--lib-src/emacsclient.c27
-rw-r--r--lib-src/etags.c29
-rw-r--r--lib-src/fakemail.c8
-rw-r--r--lib-src/hexl.c6
-rw-r--r--lib-src/make-docfile.c20
-rw-r--r--lib-src/makefile.nt417
-rw-r--r--lib-src/makefile.w32-in17
-rw-r--r--lib-src/movemail.c40
-rw-r--r--lib-src/profile.c8
-rwxr-xr-xlib-src/rcs2log49
-rw-r--r--lib-src/sorted-doc.c6
-rw-r--r--lib-src/test-distrib.c13
-rw-r--r--lib-src/update-game-score.c14
-rw-r--r--lib-src/yow.c10
20 files changed, 231 insertions, 552 deletions
diff --git a/lib-src/.arch-inventory b/lib-src/.arch-inventory
new file mode 100644
index 00000000000..0e0621a8dc3
--- /dev/null
+++ b/lib-src/.arch-inventory
@@ -0,0 +1,10 @@
+# Ignore binaries
+backup ^(test-distrib|make-docfile|profile|digest-doc|movemail|cvtmail|fakemail|yow|emacsserver|hexl|update-game-score|etags|ctags|emacsclient|b2m|ebrowse)$
+
+# Building actually makes a copy/link of the source file
+precious ^(ctags\.c)$
+
+# Windows generates this
+backup ^(DOC)$
+
+# arch-tag: da33b3d6-170d-4fe5-9eb8-ed2753bc9b4f
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 75b3be839e1..9f3fcc13371 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,59 @@
+2004-06-01 Juanma Barranquero <lektu@terra.es>
+
+ * makefile.w32-in (obj): Add image.c.
+
+2004-05-10 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * test-distrib.c (main): For failing cases, exit with
+ `EXIT_FAILURE'.
+
+2004-05-08 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.w32-in (lisp1, lisp2): Split lisp to avoid long
+ command-lines.
+
+2004-05-08 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * cvtmail.c: Throughout, replace 0 destined for `exit' arg
+ with `EXIT_SUCCESS'. Likewise, replace 1 with `EXIT_FAILURE'.
+ (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
+
+ * ebrowse.c, emacsclient.c, fakemail.c, hexl.c,
+ * make-docfile.c, movemail.c, profile.c, sorted-doc.c,
+ * test-distrib.c, update-game-score.c, yow.c: Likewise.
+
+2004-05-08 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * Makefile.in (emacsclient${EXEEXT}): Use makefile var `version'.
+
+2004-05-07 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * b2m.c (GOOD, BAD): Delete macros. Throughout,
+ replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively.
+ (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
+
+ * etags.c: Likewise.
+
+2004-05-03 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.nt: Remove.
+
+2004-04-26 Eli Zaretskii <eliz@gnu.org>
+
+ * make-docfile.c (IS_DIRECTORY_SEP): New macro.
+ (put_filename): Remove unused variable len. Use IS_DIRECTORY_SEP
+ instead of a literal '/'.
+
+2004-04-23 Juanma Barranquero <lektu@terra.es>
+
+ * makefile.w32-in: Add "-*- makefile -*-" mode tag.
+
+2004-04-17 Paul Eggert <eggert@gnu.org>
+
+ * rcs2log (Help): Clarify wording of the usage message.
+ Problem reported by Alan Mackenzie in
+ <http://mail.gnu.org/archive/html/bug-gnu-emacs/2004-04/msg00188.html>.
+
2004-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
* make-docfile.c (xmalloc): Fix return type.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 7868364148a..1d8c5e6c9ba 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for lib-src subdirectory in GNU Emacs.
-# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003
+# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -447,7 +447,7 @@ yow${EXEEXT}: ${srcdir}/yow.c ../src/epaths.h
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS)
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \
- -DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \
+ -DVERSION="\"${version}\"" \
$(LOADLIBES) -o emacsclient
hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h
@@ -478,6 +478,3 @@ xveterm${EXEEXT}: ${srcdir}/emacstool.c
$(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
-
-/* arch-tag: cc40144d-fbd2-436b-9a22-dcb5b5b6a2af
- (do not change this comment) */
diff --git a/lib-src/b2m.c b/lib-src/b2m.c
index 5a1f9e85473..5bebe560e2a 100644
--- a/lib-src/b2m.c
+++ b/lib-src/b2m.c
@@ -39,15 +39,6 @@
#undef FALSE
#define FALSE 0
-/* Exit codes for success and failure. */
-#ifdef VMS
-#define GOOD 1
-#define BAD 0
-#else
-#define GOOD 0
-#define BAD 1
-#endif
-
#define streq(s,t) (strcmp (s, t) == 0)
#define strneq(s,t,n) (strncmp (s, t, n) == 0)
@@ -124,18 +115,18 @@ main (argc, argv)
case 'V':
printf ("%s (GNU Emacs %s)\n", "b2m", VERSION);
puts ("b2m is in the public domain.");
- exit (GOOD);
+ exit (EXIT_SUCCESS);
case 'h':
fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
}
if (optind != argc)
{
fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
labels_saved = printing = header = FALSE;
@@ -191,7 +182,7 @@ main (argc, argv)
puts (data.buffer);
}
- return 0;
+ return EXIT_SUCCESS;
}
@@ -298,8 +289,10 @@ fatal (message)
char *message;
{
fprintf (stderr, "%s: %s\n", progname, message);
- exit (BAD);
+ exit (EXIT_FAILURE);
}
/* arch-tag: 5a3ad2af-a802-408f-83cc-e7cf5e98653e
(do not change this comment) */
+
+/* b2m.c ends here */
diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c
index 28a4ae4c703..8992b3f9e80 100644
--- a/lib-src/cvtmail.c
+++ b/lib-src/cvtmail.c
@@ -119,7 +119,7 @@ main (argc, argv)
}
fclose (mddf);
fclose (mfilef);
- return 0;
+ return EXIT_SUCCESS;
}
void
@@ -148,7 +148,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (1);
+ exit (EXIT_FAILURE);
}
void
@@ -157,7 +157,7 @@ sysfail (s)
{
fprintf (stderr, "cvtmail: ");
perror (s);
- exit (1);
+ exit (EXIT_FAILURE);
}
char *
@@ -183,3 +183,5 @@ xrealloc (ptr, size)
/* arch-tag: b93c25a9-9012-44f1-b78b-9cc7aed44a7a
(do not change this comment) */
+
+/* cvtmail.c ends here */
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index eeeb0eb3efd..4ad45d195f6 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -564,7 +564,7 @@ xmalloc (nbytes)
if (p == NULL)
{
yyerror ("out of memory", NULL);
- exit (1);
+ exit (EXIT_FAILURE);
}
return p;
}
@@ -581,7 +581,7 @@ xrealloc (p, sz)
if (p == NULL)
{
yyerror ("out of memory", NULL);
- exit (1);
+ exit (EXIT_FAILURE);
}
return p;
}
@@ -3671,7 +3671,7 @@ usage (error)
int error;
{
puts (USAGE);
- exit (error ? 1 : 0);
+ exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
}
@@ -3688,7 +3688,7 @@ version ()
printf ("ebrowse %s\n", VERSION);
puts ("Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc.");
puts ("This program is distributed under the same terms as Emacs.");
- exit (0);
+ exit (EXIT_SUCCESS);
}
@@ -3925,7 +3925,7 @@ main (argc, argv)
if (yyout == NULL)
{
yyerror ("cannot open output file `%s'", out_filename);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
@@ -3970,11 +3970,10 @@ main (argc, argv)
if (yyout != stdout)
fclose (yyout);
- return 0;
+ return EXIT_SUCCESS;
}
-
-/* ebrowse.c ends here. */
-
/* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8
(do not change this comment) */
+
+/* ebrowse.c ends here */
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index c8b2596198f..0698691bf13 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -44,9 +44,6 @@ Boston, MA 02111-1307, USA. */
char *getenv (), *getwd ();
char *getcwd ();
-/* This is defined with -D from the compilation command,
- which extracts it from ../lisp/version.el. */
-
#ifndef VERSION
#define VERSION "unspecified"
#endif
@@ -131,7 +128,7 @@ decode_options (argc, argv)
case 'V':
printf ("emacsclient %s\n", VERSION);
- exit (0);
+ exit (EXIT_SUCCESS);
break;
case 'H':
@@ -140,7 +137,7 @@ decode_options (argc, argv)
default:
fprintf (stderr, "Try `%s --help' for more information\n", progname);
- exit (1);
+ exit (EXIT_FAILURE);
break;
}
}
@@ -166,7 +163,7 @@ The following OPTIONS are accepted:\n\
Editor to fallback to if the server is not running\n\
\n\
Report bugs to bug-gnu-emacs@gnu.org.\n", progname);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* In NAME, insert a & before each &, each space, each newline, and
@@ -221,7 +218,7 @@ xmalloc (size)
if (result == NULL)
{
perror ("malloc");
- exit (1);
+ exit (EXIT_FAILURE);
}
return result;
}
@@ -243,7 +240,7 @@ fail (argc, argv)
}
else
{
- exit (1);
+ exit (EXIT_FAILURE);
}
}
@@ -314,7 +311,7 @@ main (argc, argv)
{
fprintf (stderr, "%s: file name or argument required\n", progname);
fprintf (stderr, "Try `%s --help' for more information\n", progname);
- exit (1);
+ exit (EXIT_FAILURE);
}
/*
@@ -356,7 +353,7 @@ main (argc, argv)
{
fprintf (stderr, "%s: socket-name %s too long",
argv[0], socket_name);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* See if the socket exists, and if it's owned by us. */
@@ -391,7 +388,7 @@ main (argc, argv)
{
fprintf (stderr, "%s: socket-name %s too long",
argv[0], socket_name);
- exit (1);
+ exit (EXIT_FAILURE);
}
sock_status = socket_status (server.sun_path);
@@ -522,13 +519,13 @@ To start the server in Emacs, type \"M-x server-start\".\n",
}
fprintf (out, " ");
}
-
+
fprintf (out, "\n");
fflush (out);
/* Maybe wait for an answer. */
if (nowait)
- return 0;
+ return EXIT_SUCCESS;
if (!eval)
{
@@ -550,7 +547,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
printf ("\n");
fflush (stdout);
- return 0;
+ return EXIT_SUCCESS;
}
#endif /* HAVE_SOCKETS */
@@ -572,3 +569,5 @@ strerror (errnum)
/* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7
(do not change this comment) */
+
+/* emacsclient.c ends here */
diff --git a/lib-src/etags.c b/lib-src/etags.c
index e9fab1be3ee..829fc97fbfd 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -177,15 +177,6 @@ If you want regular expression support, you should delete this notice and
# define CTAGS FALSE
#endif
-/* Exit codes for success and failure. */
-#ifdef VMS
-# define GOOD 1
-# define BAD 0
-#else
-# define GOOD 0
-# define BAD 1
-#endif
-
#define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t))
#define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t))
#define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))
@@ -830,7 +821,7 @@ print_version ()
puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold");
puts ("This program is distributed under the same terms as Emacs");
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
static void
@@ -849,7 +840,7 @@ print_help (argbuffer)
}
if (help_for_lang)
- exit (GOOD);
+ exit (EXIT_SUCCESS);
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
\n\
@@ -990,7 +981,7 @@ Relative ones are stored relative to the output file's directory.\n");
puts ("");
puts ("Report bugs to bug-gnu-emacs@gnu.org");
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
@@ -1413,7 +1404,7 @@ main (argc, argv)
if (fclose (tagf) == EOF)
pfatal (tagfile);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
if (update)
@@ -1432,7 +1423,7 @@ main (argc, argv)
sprintf (cmd,
"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",
tagfile, argbuffer[i].what, tagfile);
- if (system (cmd) != GOOD)
+ if (system (cmd) != EXIT_SUCCESS)
fatal ("failed to execute shell command", (char *)NULL);
}
append_to_tagfile = TRUE;
@@ -1453,7 +1444,7 @@ main (argc, argv)
sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
exit (system (cmd));
}
- return GOOD;
+ return EXIT_SUCCESS;
}
@@ -6470,7 +6461,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (BAD);
+ exit (EXIT_FAILURE);
}
static void
@@ -6478,7 +6469,7 @@ pfatal (s1)
char *s1;
{
perror (s1);
- exit (BAD);
+ exit (EXIT_FAILURE);
}
static void
@@ -6492,7 +6483,7 @@ fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
progname, "-h");
#endif
- exit (BAD);
+ exit (EXIT_FAILURE);
}
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
@@ -6788,3 +6779,5 @@ xrealloc (ptr, size)
/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
(do not change this comment) */
+
+/* etags.c ends here */
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c
index 944a728a28c..cee7eaa130e 100644
--- a/lib-src/fakemail.c
+++ b/lib-src/fakemail.c
@@ -169,7 +169,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* Like malloc but get fatal error if memory is exhausted. */
@@ -410,7 +410,7 @@ close_the_streams ()
no_problems = (no_problems &&
((*rem->action) (rem->handle) == 0));
the_streams = ((stream_list) NULL);
- return (no_problems ? 0 : 1);
+ return (no_problems ? EXIT_SUCCESS : EXIT_FAILURE);
}
void
@@ -667,7 +667,7 @@ read_header ()
if (next_line == ((line_list *) NULL))
{
/* Not a valid header */
- exit (1);
+ exit (EXIT_FAILURE);
}
*next_line = new_list ();
(*next_line)->string = alloc_string (length);
@@ -753,3 +753,5 @@ main (argc, argv)
/* arch-tag: acb0afa6-315a-4c5b-b9e3-def5725c8783
(do not change this comment) */
+
+/* fakemail.c ends here */
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
index 0cfb88445b3..5ca7c2a5b8a 100644
--- a/lib-src/hexl.c
+++ b/lib-src/hexl.c
@@ -270,15 +270,17 @@ main (argc, argv)
fclose (fp);
} while (*argv != NULL);
- return 0;
+ return EXIT_SUCCESS;
}
void
usage ()
{
fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa
(do not change this comment) */
+
+/* hexl.c ends here */
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index ba73f5800a7..802b4e09e67 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -60,6 +60,10 @@ Boston, MA 02111-1307, USA. */
#define READ_BINARY "r"
#endif /* not DOS_NT */
+#ifndef IS_DIRECTORY_SEP
+#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/')
+#endif
+
int scan_file ();
int scan_lisp_file ();
int scan_c_file ();
@@ -100,7 +104,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* Like malloc but get fatal error if memory is exhausted. */
@@ -183,11 +187,13 @@ void
put_filename (filename)
char *filename;
{
- char *tmp = filename;
- int len;
-
- while ((tmp = index (filename, '/')))
- filename = tmp + 1;
+ char *tmp;
+
+ for (tmp = filename; *tmp; tmp++)
+ {
+ if (IS_DIRECTORY_SEP(*tmp))
+ filename = tmp + 1;
+ }
putc (037, outfile);
putc ('S', outfile);
@@ -1204,3 +1210,5 @@ scan_lisp_file (filename, mode)
/* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894
(do not change this comment) */
+
+/* make-docfile.c ends here */
diff --git a/lib-src/makefile.nt b/lib-src/makefile.nt
deleted file mode 100644
index 29282eea45d..00000000000
--- a/lib-src/makefile.nt
+++ /dev/null
@@ -1,417 +0,0 @@
-# Makefile for GNU Emacs lib-src directory.
-# Geoff Voelker (voelker@cs.washington.edu)
-# Copyright (C) 1994 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 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.
-#
-
-#
-# Sets up the system dependent macros.
-#
-!include ..\nt\makefile.def
-
-LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
- -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I..\nt\inc -I..\src
-
-LINK_FLAGS = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
-
-ALL = $(BLD)\make-docfile.exe \
- $(BLD)\hexl.exe \
- $(BLD)\ctags.exe \
- $(BLD)\etags.exe \
- $(BLD)\ebrowse.exe \
- $(BLD)\movemail.exe
-
-
-# don't know what (if) to do with these yet...
-#
-# $(BLD)\sorted-doc.exe \
-# $(BLD)\env.exe \
-# $(BLD)\server.exe \
-# $(BLD)\emacstool.exe \
-# $(BLD)\leditcfns.exe \
-# $(BLD)\emacsclient.exe \
-# $(BLD)\cvtmail.exe \
-# $(BLD)\digest-doc.exe \
-# $(BLD)\test-distrib.exe \
-
-
-LIBS = $(BASE_LIBS)
-
-$(BLD)\make-docfile.exe: $(BLD)\make-docfile.obj $(BLD)\ntlib.obj
- $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
-$(BLD)\hexl.exe: $(BLD)\hexl.obj
-$(BLD)\fakemail.exe: $(BLD)\fakemail.obj $(BLD)\ntlib.obj
- $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
-
-make-docfile: $(BLD) $(BLD)\make-docfile.exe
-etags: $(BLD) $(BLD)\etags.exe
-ebrowse: $(BLD) $(BLD)\ebrowse.exe
-hexl: $(BLD) $(BLD)\hexl.exe
-movemail: $(BLD) $(BLD)\movemail.exe
-fakemail: $(BLD) $(BLD)\fakemail.exe
-
-GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
-GETOPTDEPS = $(GETOPTOBJS) getopt.h
-MOVEMAILOBJS = $(BLD)\movemail.obj \
- $(BLD)\pop.obj \
- $(BLD)\ntlib.obj \
- $(GETOPTOBJS)
-
-$(BLD)\movemail.exe: $(MOVEMAILOBJS) getopt.h
-# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
- $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
-
-ETAGSOBJ = $(BLD)\etags.obj \
- $(BLD)\getopt.obj \
- $(BLD)\getopt1.obj \
- $(BLD)\ntlib.obj \
- $(BLD)\regex.obj
-
-
-$(BLD)\etags.exe: $(ETAGSOBJ)
- $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
-
-
-$(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
- $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
- ../src/regex.c -Fo$@
-
-ETAGS_CFLAGS = -DETAGS_REGEXPS -DHAVE_GETCWD
-$(BLD)\etags.obj: etags.c
- $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
-
-CTAGSOBJ = $(BLD)\ctags.obj \
- $(BLD)\getopt.obj \
- $(BLD)\getopt1.obj \
- $(BLD)\ntlib.obj \
- $(BLD)\regex.obj
-
-$(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
- $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
-
-ctags.c: etags.c
- - $(DEL) ctags.c
- copy etags.c ctags.c
-
-CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
-$(BLD)\ctags.obj: ctags.c
- $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
-
-EBROWSE_OBJ = $(BLD)\ebrowse.obj \
- $(BLD)\getopt.obj \
- $(BLD)\getopt1.obj \
- $(BLD)\ntlib.obj
-
-$(BLD)\ebrowse.exe: $(EBROWSE_OBJ)
- $(LINK) -out:$@ $(LINK_FLAGS) $(EBROWSE_OBJ) $(LIBS)
-
-$(BLD)\ebrowse.obj: ebrowse.c ..\src\config.h
- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -Fo$@ ebrowse.c
-#
-# don't know what to do with these yet...
-#
-# $(BLD)\sorted-doc.exe: $(BLD)\sorted-doc.obj
-# $(BLD)\yow.exe: $(BLD)\yow.obj
-# $(BLD)\emacstool.exe: $(BLD)\emacstool.obj
-# $(BLD)\leditcfns.exe: $(BLD)\leditcfns.obj
-# $(BLD)\server.exe: $(BLD)\server.obj
-# $(BLD)\cvtmail.exe: $(BLD)\cvtmail.obj
-# $(BLD)\digest-doc.exe: $(BLD)\digest-doc.obj
-# $(BLD)\emacsclient.exe: $(BLD)\emacsclient.obj
-# $(BLD)\test-distrib.exe: $(BLD)\test-distrib.obj
-
-#
-# From ..\src\makefile.nt.
-#
-obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c cm.c cmds.c charset.c coding.c category.c ccl.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c fns.c fontset.c indent.c insdel.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c xfaces.c print.c process.c regex.c scroll.c search.c syntax.c sysdep.c term.c termcap.c tparam.c undo.c unexw32.c window.c xdisp.c casetab.c floatfns.c frame.c gmalloc.c intervals.c ralloc.c textprop.c vm-limit.c region-cache.c strftime.c w32.c w32console.c w32faces.c w32fns.c w32heap.c w32inevt.c w32proc.c w32reg.c w32menu.c w32select.c w32term.c w32xfns.c
-
-#
-# These are the lisp files that are loaded up in loadup.el
-#
-lispsource = ../lisp/
-
-FACE_SUPPORT = $(lispsource)facemenu.elc
-MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
-FLOAT_SUPPORT = $(lispsource)float-sup.elc
-WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
-
-lisp= \
- $(lispsource)abbrev.elc \
- $(lispsource)buff-menu.elc \
- $(lispsource)byte-run.elc \
- $(lispsource)cus-start.el \
- $(lispsource)custom.elc \
- $(lispsource)disp-table.elc \
- $(lispsource)faces.elc \
- $(lispsource)files.elc \
- $(lispsource)textmodes/fill.elc \
- $(lispsource)format.elc \
- $(FACE_SUPPORT) \
- $(MOUSE_SUPPORT) \
- $(FLOAT_SUPPORT) \
- $(lispsource)frame.elc\
- $(X_WINDOWS_SUPPORT) \
- $(lispsource)help.elc \
- $(lispsource)indent.elc \
- $(lispsource)isearch.elc \
- $(lispsource)emacs-lisp/lisp-mode.elc \
- $(lispsource)emacs-lisp/lisp.elc \
- $(lispsource)loadup.el \
- $(lispsource)loaddefs.el \
- $(lispsource)bindings.el \
- $(lispsource)map-ynp.elc \
- $(lispsource)menu-bar.elc \
- $(lispsource)international/mule.elc \
- $(lispsource)international/mule-conf.el \
- $(lispsource)international/mule-cmds.elc \
- $(lispsource)international/characters.elc \
- $(lispsource)international/ccl.elc \
- $(lispsource)international/codepage.elc \
- $(lispsource)international/utf-8.elc \
- $(lispsource)case-table.elc \
- $(lispsource)language/chinese.elc \
- $(lispsource)language/cyrillic.elc \
- $(lispsource)language/devanagari.elc \
- $(lispsource)language/english.elc \
- $(lispsource)language/ethiopic.elc \
- $(lispsource)language/european.elc \
- $(lispsource)language/czech.elc \
- $(lispsource)language/slovak.elc \
- $(lispsource)language/romanian.elc \
- $(lispsource)language/greek.elc \
- $(lispsource)language/hebrew.elc \
- $(lispsource)language/indian.elc \
- $(lispsource)language/japanese.elc \
- $(lispsource)language/korean.elc \
- $(lispsource)language/lao.elc \
- $(lispsource)language/thai.elc \
- $(lispsource)language/tibetan.elc \
- $(lispsource)language/vietnamese.elc \
- $(lispsource)language/misc-lang.elc \
- $(lispsource)textmodes/page.elc \
- $(lispsource)textmodes/paragraphs.elc \
- $(lispsource)paths.el \
- $(lispsource)register.elc \
- $(lispsource)replace.elc \
- $(lispsource)simple.elc \
- $(lispsource)startup.elc \
- $(lispsource)subr.elc \
- $(lispsource)term/tty-colors.elc \
- $(lispsource)textmodes/text-mode.elc \
- $(lispsource)vc-hooks.elc \
- $(lispsource)ediff-hook.elc \
- $(VMS_SUPPORT) \
- $(MSDOS_SUPPORT) \
- $(WINNT_SUPPORT) \
- $(lispsource)widget.elc \
- $(lispsource)window.elc \
- $(lispsource)version.el
-
-
-DOC = DOC
-$(DOC): $(BLD)\make-docfile.exe
- - $(DEL) $(DOC)
- $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
- $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
- $(CP) $(DOC) ..\etc\DOC-X
- - mkdir ..\src\$(OBJDIR)
- - mkdir ..\src\$(OBJDIR)\etc
- $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
-
-{$(BLD)}.obj{$(BLD)}.exe:
- $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
-
-#
-# Build the executables
-#
-all: $(BLD) $(ALL) $(DOC)
-
-#
-# Assuming INSTALL_DIR is defined, build and install emacs in it.
-#
-INSTALL_FILES = $(ALL)
-install: $(INSTALL_FILES)
- - mkdir $(INSTALL_DIR)\bin
- $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
- $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
- $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
- $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
- - mkdir $(INSTALL_DIR)\etc
- $(CP) $(DOC) $(INSTALL_DIR)\etc
-
-# Don't install fakemail by default, as it sends mail into a
-# blackhole if /bin/mail is not installed.
-# $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
-
-#
-# Maintenance
-#
-clean:; - $(DEL) *~ *.pdb DOC*
- - $(DEL) *.orig *.rej *.crlf ctags.c
- - $(DEL_TREE) deleted
- - $(DEL_TREE) obj
- - $(DEL_TREE) obj-spd
-
-#
-# Headers we would preprocess if we could.
-#
-..\src\config.h: ..\nt\$(CONFIG_H)
- $(CP) $** $@
-..\src\paths.h: ..\nt\paths.h
- $(CP) $** $@
-
-### DEPENDENCIES ###
-
-EMACS_ROOT = ..
-SRC = .
-
-$(BLD)\b2m.obj : \
- $(SRC)\b2m.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h
-
-$(BLD)\ctags.obj : \
- $(SRC)\ctags.c \
- $(EMACS_ROOT)\nt\inc\sys\param.h \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h \
- $(SRC)\ntlib.h \
- $(SRC)\getopt.h
-
-$(BLD)\cvtmail.obj : \
- $(SRC)\cvtmail.c
-
-$(BLD)\digest-doc.obj : \
- $(SRC)\digest-doc.c
-
-$(BLD)\emacsclient.obj : \
- $(SRC)\emacsclient.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h
-
-$(BLD)\emacstool.obj : \
- $(SRC)\emacstool.c \
- $(EMACS_ROOT)\nt\inc\sys\file.h
-
-$(BLD)\etags.obj : \
- $(SRC)\etags.c \
- $(EMACS_ROOT)\nt\inc\sys\param.h \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h \
- $(SRC)\ntlib.h \
- $(SRC)\getopt.h
-
-$(BLD)\fakemail.obj : \
- $(SRC)\fakemail.c \
- $(SRC)\ntlib.h \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h \
- $(EMACS_ROOT)\nt\inc\pwd.h
-
-$(BLD)\getdate.obj : \
- $(SRC)\getdate.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\src\config.h \
- $(MSTOOLS_SYS)\types.h
-
-$(BLD)\getopt.obj : \
- $(SRC)\getopt.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\src\config.h \
- $(SRC)\ntlib.h \
- $(SRC)\getopt.h
-
-$(BLD)\getopt1.obj : \
- $(SRC)\getopt1.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\src\config.h \
- $(SRC)\getopt.h
-
-$(BLD)\hexl.obj : \
- $(SRC)\hexl.c
-
-$(BLD)\leditcfns.obj : \
- $(SRC)\leditcfns.c
-
-$(BLD)\make-docfile.obj : \
- $(SRC)\make-docfile.c \
- $(EMACS_ROOT)\src\config.h
-
-$(BLD)\make-path.obj : \
- $(SRC)\make-path.c
-
-$(BLD)\movemail.obj : \
- $(SRC)\movemail.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h \
- $(EMACS_ROOT)\nt\inc\sys\file.h \
- $(EMACS_ROOT)\lib-src\..\src\syswait.h \
- $(EMACS_ROOT)\nt\inc\pwd.h \
- $(SRC)\ntlib.h
- $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
-
-$(BLD)\ntlib.obj : \
- $(SRC)\ntlib.c \
- $(SRC)\ntlib.h \
- $(EMACS_ROOT)\nt\inc\pwd.h
-
-$(BLD)\pop.obj : \
- $(SRC)\pop.c \
- $(SRC)\pop.h \
- $(SRC)\ntlib.h
-
-$(BLD)\profile.obj : \
- $(SRC)\profile.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h \
- $(EMACS_ROOT)\lib-src\..\src\systime.h
-
-$(BLD)\qsort.obj : \
- $(SRC)\qsort.c
-
-$(BLD)\sorted-doc.obj : \
- $(SRC)\sorted-doc.c
-
-$(BLD)\tcp.obj : \
- $(SRC)\tcp.c
-
-$(BLD)\test-distrib.obj : \
- $(SRC)\test-distrib.c
-
-$(BLD)\timer.obj : \
- $(SRC)\timer.c \
- $(EMACS_ROOT)\src\s\ms-w32.h \
- $(EMACS_ROOT)\src\m\intel386.h \
- $(EMACS_ROOT)\lib-src\..\src\config.h
-
-$(BLD)\yow.obj : \
- $(SRC)\yow.c \
- $(EMACS_ROOT)\lib-src\..\src\paths.h
-
-# arch-tag: 59e1b54b-4cc2-4086-bb0b-ecfad4b683e9
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index 20cf4727362..663d08e6f13 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -1,5 +1,5 @@
-# Makefile for GNU Emacs on the Microsoft W32 API.
-# Copyright (c) 2000-2001 Free Software Foundation, Inc.
+# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
+# Copyright (c) 2000-2001, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
@@ -126,7 +126,7 @@ $(BLD)/ctags.$(O): ctags.c
#
# From ..\src\makefile.nt.
#
-obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c casetab.c category.c ccl.c charset.c cm.c cmds.c coding.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c floatfns.c fns.c fontset.c frame.c fringe.c gmalloc.c indent.c insdel.c intervals.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c print.c process.c ralloc.c regex.c region-cache.c scroll.c search.c sound.c strftime.c syntax.c sysdep.c term.c termcap.c textprop.c tparam.c undo.c unexw32.c vm-limit.c w32.c w32console.c w32fns.c w32heap.c w32inevt.c w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c window.c xdisp.c xfaces.c xfaces.c
+obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c casetab.c category.c ccl.c charset.c cm.c cmds.c coding.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c floatfns.c fns.c fontset.c frame.c fringe.c gmalloc.c image.c indent.c insdel.c intervals.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c print.c process.c ralloc.c regex.c region-cache.c scroll.c search.c sound.c strftime.c syntax.c sysdep.c term.c termcap.c textprop.c tparam.c undo.c unexw32.c vm-limit.c w32.c w32console.c w32fns.c w32heap.c w32inevt.c w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c window.c xdisp.c xfaces.c xfaces.c
#
# These are the lisp files that are loaded up in loadup.el
#
@@ -139,7 +139,7 @@ WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsourc
MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
-lisp= \
+lisp1= \
$(lispsource)abbrev.elc \
$(lispsource)buff-menu.elc \
$(lispsource)button.elc \
@@ -178,7 +178,9 @@ lisp= \
$(lispsource)international/latin-5.el \
$(lispsource)international/latin-8.el \
$(lispsource)international/latin-9.el \
- $(lispsource)case-table.elc \
+ $(lispsource)case-table.elc
+
+lisp2 = \
$(lispsource)language/chinese.elc \
$(lispsource)language/cyrillic.elc \
$(lispsource)language/indian.elc \
@@ -228,7 +230,8 @@ DOC = DOC
$(DOC): make-docfile
- $(DEL) $(DOC)
"$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
- "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp)
+ "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
+ "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
$(CP) $(DOC) ../etc/DOC-X
- mkdir "../src/$(OBJDIR)"
- mkdir "../src/$(OBJDIR)/etc"
@@ -422,5 +425,3 @@ $(BLD)/timer.$(O) : \
$(BLD)/yow.$(O) : \
$(SRC)/yow.c \
$(EMACS_ROOT)/lib-src/../src/paths.h
-
-# arch-tag: c051bc02-a6de-474b-889a-27f7b2fbbcea
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 2d0cd9043fd..a634e2966d7 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -216,7 +216,7 @@ main (argc, argv)
preserve_mail++;
break;
default:
- exit(1);
+ exit (EXIT_FAILURE);
}
}
@@ -234,7 +234,7 @@ main (argc, argv)
#else
fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", "");
#endif
- exit (1);
+ exit (EXIT_FAILURE);
}
inname = argv[optind];
@@ -536,12 +536,12 @@ main (argc, argv)
if (spool_name)
mailunlock ();
#endif
- exit (0);
+ exit (EXIT_SUCCESS);
}
wait (&status);
if (!WIFEXITED (status))
- exit (1);
+ exit (EXIT_FAILURE);
else if (WRETCODE (status) != 0)
exit (WRETCODE (status));
@@ -554,7 +554,7 @@ main (argc, argv)
#endif /* ! DISABLE_DIRECT_ACCESS */
- return 0;
+ return EXIT_SUCCESS;
}
#ifdef MAIL_USE_MAILLOCK
@@ -607,7 +607,7 @@ fatal (s1, s2)
if (delete_lockname)
unlink (delete_lockname);
error (s1, s2, 0);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* Print error message. `s1' is printf control string, `s2' and `s3'
@@ -709,6 +709,8 @@ char Errmsg[200]; /* POP errors, at least, can exceed
* If the mailbox is in the form "po:username:hostname", then it is
* modified by this function -- the second colon is replaced by a
* null.
+ *
+ * Return a value suitable for passing to `exit'.
*/
int
@@ -736,19 +738,19 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
if (! server)
{
error ("Error connecting to POP server: %s", pop_error, 0);
- return (1);
+ return EXIT_FAILURE;
}
if (pop_stat (server, &nmsgs, &nbytes))
{
error ("Error getting message count from POP server: %s", pop_error, 0);
- return (1);
+ return EXIT_FAILURE;
}
if (!nmsgs)
{
pop_close (server);
- return (0);
+ return EXIT_SUCCESS;
}
mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
@@ -756,7 +758,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
{
pop_close (server);
error ("Error in open: %s, %s", strerror (errno), outfile);
- return (1);
+ return EXIT_FAILURE;
}
fchown (mbfi, getuid (), -1);
@@ -766,7 +768,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
error ("Error in fdopen: %s", strerror (errno), 0);
close (mbfi);
unlink (outfile);
- return (1);
+ return EXIT_FAILURE;
}
if (reverse_order)
@@ -789,7 +791,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
{
error (Errmsg, 0, 0);
close (mbfi);
- return (1);
+ return EXIT_FAILURE;
}
mbx_delimit_end (mbf);
fflush (mbf);
@@ -798,7 +800,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
error ("Error in fflush: %s", strerror (errno), 0);
pop_close (server);
close (mbfi);
- return (1);
+ return EXIT_FAILURE;
}
}
@@ -812,14 +814,14 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
if (fsync (mbfi) < 0)
{
error ("Error in fsync: %s", strerror (errno), 0);
- return (1);
+ return EXIT_FAILURE;
}
#endif
if (close (mbfi) == -1)
{
error ("Error in close: %s", strerror (errno), 0);
- return (1);
+ return EXIT_FAILURE;
}
if (! preserve)
@@ -829,17 +831,17 @@ popmail (mailbox, outfile, preserve, password, reverse_order)
{
error ("Error from POP server: %s", pop_error, 0);
pop_close (server);
- return (1);
+ return EXIT_FAILURE;
}
}
if (pop_quit (server))
{
error ("Error from POP server: %s", pop_error, 0);
- return (1);
+ return EXIT_FAILURE;
}
- return (0);
+ return EXIT_SUCCESS;
}
int
@@ -957,3 +959,5 @@ strerror (errnum)
/* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f
(do not change this comment) */
+
+/* movemail.c ends here */
diff --git a/lib-src/profile.c b/lib-src/profile.c
index ec77936f74d..8d924532b87 100644
--- a/lib-src/profile.c
+++ b/lib-src/profile.c
@@ -55,7 +55,7 @@ char *
get_time ()
{
if (watch_not_started)
- exit (1); /* call reset_watch first ! */
+ exit (EXIT_FAILURE); /* call reset_watch first ! */
EMACS_GET_TIME (TV2);
EMACS_SUB_TIME (TV2, TV2, TV1);
sprintf (time_string, "%lu.%06lu", (unsigned long)EMACS_SECS (TV2), (unsigned long)EMACS_USECS (TV2));
@@ -94,14 +94,16 @@ main ()
puts (get_time ());
break;
case 'q':
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* Anything remaining on the line is ignored. */
while (c != '\n' && c != EOF)
c = getchar ();
}
- exit (1);
+ exit (EXIT_FAILURE);
}
/* arch-tag: 8db68f7e-2322-4944-a315-dba349bdbf39
(do not change this comment) */
+
+/* profile.c ends here */
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
index b7466b6c134..42c92ff6187 100755
--- a/lib-src/rcs2log
+++ b/lib-src/rcs2log
@@ -2,34 +2,57 @@
# RCS to ChangeLog generator
-# Generate a change log prefix from RCS files (perhaps in the CVS repository)
-# and the ChangeLog (if any).
-# Output the new prefix to standard output.
-# You can edit this prefix by hand, and then prepend it to ChangeLog.
+Help='
+Generate ChangeLog entries from RCS files (perhaps in a CVS repository)
+and the ChangeLog file (if any). An RCS file typically has a name
+ending in ",v", and represents the entire history of a file that is
+under revision control. The ChangeLog file logs entries for changes,
+in reverse chronological order.
-# Ignore log entries that start with `#'.
-# Clump together log entries that start with `{topic} ',
-# where `topic' contains neither white space nor `}'.
+Generate entries for changes entered into RCS (or CVS) more recently
+than the newest existing entry in the ChangeLog file. You can then
+edit these entries by hand, and prepend them to the ChangeLog file.
+
+Output the resulting ChangeLog entries to standard output.
+Each entry looks something like this:
+
+2004-04-17 Paul Eggert <eggert@gnu.org>
+
+ * rcs2log (Help): Clarify wording of the usage message.
+ Problem reported by Alan Mackenzie in
+ <http://mail.gnu.org/archive/html/bug-gnu-emacs/2004-04/msg00188.html>.
+
+ChangeLog entries contain the current date, full name, email address
+including hostname, the name of the affected file, and commentary.
+RCS and CVS logs lack full names and email addresses, so they are
+inferred from login names using a heuristic that can be overridden
+via the -u option.
+
+Ignore log entries that start with "#".
+Clump together log entries that start with "{topic} ",
+where "topic" contains neither white space nor "}".
+
+If no FILE is specified, use all files under the working directory
+that are maintained under version control.
-Help='The default FILEs are the files registered under the working directory.
Options:
- -c CHANGELOG Output a change log prefix to CHANGELOG (default ChangeLog).
+ -c FILE Output ChangeLog entries for FILE (default ChangeLog).
-h HOSTNAME Use HOSTNAME in change log entries (default current host).
-i INDENT Indent change log lines by INDENT spaces (default 8).
-l LENGTH Try to limit log lines to LENGTH characters (default 79).
- -L FILE Use rlog-format FILE for source of logs.
+ -L FILE Use FILE (same format as "rlog") for source of logs.
-R If no FILEs are given and RCS is used, recurse through working directory.
- -r OPTION Pass OPTION to subsidiary log command.
+ -r OPTION Pass OPTION to subsidiary command (either "rlog" or "cvs -q log").
-t TABWIDTH Tab stops are every TABWIDTH characters (default 8).
- -u "LOGIN<tab>FULLNAME<tab>MAILADDR" Assume LOGIN has FULLNAME and MAILADDR.
+ -u "LOGIN<tab>FULLNAME<tab>EMAILADDR" LOGIN has FULLNAME and EMAILADDR.
-v Append RCS revision to file names in log lines.
--help Output help.
--version Output version number.
Report bugs to <bug-gnu-emacs@gnu.org>.'
-Id='$Id: rcs2log,v 1.52 2003/12/27 08:18:08 uid65632 Exp $'
+Id='$Id$'
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003,
# 2004 Free Software Foundation, Inc.
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c
index 05a3e69cc92..3af3276e811 100644
--- a/lib-src/sorted-doc.c
+++ b/lib-src/sorted-doc.c
@@ -75,7 +75,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (1);
+ exit (EXIT_FAILURE);
}
/* Like malloc but get fatal error if memory is exhausted. */
@@ -279,8 +279,10 @@ main ()
printf ("@bye\n");
}
- return 0;
+ return EXIT_SUCCESS;
}
/* arch-tag: ce28f204-1e70-4b34-8210-3d54a5662071
(do not change this comment) */
+
+/* sorted-doc.c ends here */
diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c
index f7b3a8b8004..0333bd7d710 100644
--- a/lib-src/test-distrib.c
+++ b/lib-src/test-distrib.c
@@ -80,13 +80,13 @@ main (argc, argv)
if (argc != 2)
{
fprintf (stderr, "Usage: %s testfile\n", argv[0]);
- exit (2);
+ exit (EXIT_FAILURE);
}
fd = open (argv[1], O_RDONLY);
if (fd < 0)
{
perror (argv[1]);
- exit (2);
+ exit (EXIT_FAILURE);
}
if (cool_read (fd, buf, sizeof string1) != sizeof string1 ||
strcmp (buf, string1) ||
@@ -97,14 +97,13 @@ main (argc, argv)
Most likely this means that many nonprinting characters\n\
have been corrupted in the files of Emacs, and it will not work.\n",
argv[1]);
- exit (2);
+ exit (EXIT_FAILURE);
}
close (fd);
-#ifdef VMS
- exit (1); /* On VMS, success is 1. */
-#endif
- return (0);
+ return EXIT_SUCCESS;
}
/* arch-tag: 3a89005d-df98-4c32-aa9f-33570e16a26a
(do not change this comment) */
+
+/* test-distrib.c ends here */
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 74fa2b06920..8f7c90cad55 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -111,7 +111,7 @@ lose (msg)
const char *msg;
{
fprintf (stderr, "%s\n", msg);
- exit (1);
+ exit (EXIT_FAILURE);
}
void lose_syserr P_ ((const char *msg)) NO_RETURN;
@@ -138,7 +138,7 @@ lose_syserr (msg)
const char *msg;
{
fprintf (stderr, "%s: %s\n", msg, strerror (errno));
- exit (1);
+ exit (EXIT_FAILURE);
}
char *
@@ -199,7 +199,7 @@ main (argc, argv)
switch (c)
{
case 'h':
- usage (0);
+ usage (EXIT_SUCCESS);
break;
case 'd':
user_prefix = optarg;
@@ -213,11 +213,11 @@ main (argc, argv)
max = MAX_SCORES;
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
if (optind+3 != argc)
- usage (1);
+ usage (EXIT_FAILURE);
running_suid = (getuid () != geteuid ());
@@ -266,7 +266,7 @@ main (argc, argv)
lose_syserr ("Failed to write scores file");
}
unlock_file (scorefile, lockstate);
- exit (0);
+ exit (EXIT_SUCCESS);
}
int
@@ -531,3 +531,5 @@ unlock_file (filename, state)
/* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b
(do not change this comment) */
+
+/* update-game-score.c ends here */
diff --git a/lib-src/yow.c b/lib-src/yow.c
index 10f0fad1ce7..9d58ce5aecb 100644
--- a/lib-src/yow.c
+++ b/lib-src/yow.c
@@ -73,7 +73,7 @@ main (argc, argv)
if ((fp = fopen(file, "r")) == NULL) {
fprintf(stderr, "yow: ");
perror(file);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* initialize random seed */
@@ -82,7 +82,7 @@ main (argc, argv)
setup_yow(fp);
yow(fp);
fclose(fp);
- return 0;
+ return EXIT_SUCCESS;
}
static long len = -1;
@@ -113,7 +113,7 @@ setup_yow(fp)
if (fseek(fp, 0L, 2) == -1) {
perror("yow");
- exit(1);
+ exit(EXIT_FAILURE);
}
len = ftell(fp) - header_len;
}
@@ -132,7 +132,7 @@ yow (fp)
offset = rand() % len + header_len;
if (fseek(fp, offset, 0) == -1) {
perror("yow");
- exit(1);
+ exit(EXIT_FAILURE);
}
/* Read until SEP, read next line, print it.
@@ -180,3 +180,5 @@ yow (fp)
/* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e
(do not change this comment) */
+
+/* yow.c ends here */