From 254107e49743f3900782aebb2e42e0e72303b4c2 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Fri, 12 Sep 2003 00:48:03 +0000 Subject: (socket_name): New variable. (longopts, decode_options, print_help_and_exit): Handle --socket-name argument. (main): Use socket_name. --- lib-src/emacsclient.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 2a53b162693..820d172a9a1 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -67,6 +67,9 @@ char *display = NULL; is not running. --alternate-editor. */ const char * alternate_editor = NULL; +/* If non-NULL, thefilename of the UNIX socket */ +char *socket_name = NULL; + void print_help_and_exit (); struct option longopts[] = @@ -76,6 +79,7 @@ struct option longopts[] = { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, { "alternate-editor", required_argument, NULL, 'a' }, + { "socket-name", required_argument, NULL, 's' }, { "display", required_argument, NULL, 'd' }, { 0, 0, 0, 0 } }; @@ -91,7 +95,7 @@ decode_options (argc, argv) while (1) { int opt = getopt_long (argc, argv, - "VHnea:d:", longopts, 0); + "VHnea:s:d:", longopts, 0); if (opt == EOF) break; @@ -109,6 +113,10 @@ decode_options (argc, argv) alternate_editor = optarg; break; + case 's': + socket_name = optarg; + break; + case 'd': display = optarg; break; @@ -152,6 +160,8 @@ The following OPTIONS are accepted:\n\ -n, --no-wait Don't wait for the server to return\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -d, --display=DISPLAY Visit the file in the given display\n\ +-s, --socket-name=FILENAME\n\ + Set the filename of the UNIX socket for communication\n\ -a, --alternate-editor=EDITOR\n\ Editor to fallback to if the server is not running\n\ \n\ @@ -347,7 +357,18 @@ main (argc, argv) { int sock_status = 0; - sprintf (server.sun_path, "/tmp/emacs%d-%s/server", (int) geteuid (), system_name); + if (! socket_name) + { + socket_name = alloca (system_name_length + 100); + sprintf (socket_name, "/tmp/emacs%d-%s/server", + (int) geteuid (), system_name); + } + + if (strlen (socket_name) < sizeof (server.sun_path)) + strcpy (server.sun_path, socket_name); + else + fprintf (stderr, "%s: socket-name %s too long", + argv[0], socket_name); /* See if the socket exists, and if it's owned by us. */ sock_status = socket_status (server.sun_path); -- cgit v1.2.1 From f387bdeaaed93f4ca2189a752d8c0bde64ff22d8 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Fri, 12 Sep 2003 01:09:43 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 8ffc797a681..4e8da57491c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,13 @@ +2003-09-10 Richard M. Stallman + + * emacsclient.c (main): Use socket_name. + +2003-09-10 Andreas_B,A|(Bsching (tiny change) + + * emacsclient.c (socket_name): New variable. + (longopts, decode_options, print_help_and_exit): + Handle --socket-name argument. + 2003-08-25 Takaaki Ota (tiny change) * etags.c (consider_token): check C++ `operator' only when the -- cgit v1.2.1 From 3db926bedade9bcec4195f253da5aa16dd434d45 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Fri, 19 Sep 2003 14:27:47 +0000 Subject: Comment change. --- lib-src/emacsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 820d172a9a1..f0090752fab 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -67,7 +67,7 @@ char *display = NULL; is not running. --alternate-editor. */ const char * alternate_editor = NULL; -/* If non-NULL, thefilename of the UNIX socket */ +/* If non-NULL, the filename of the UNIX socket. */ char *socket_name = NULL; void print_help_and_exit (); -- cgit v1.2.1 From 872093579a7ca35aa65a89d4050204868b82d5ce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Sep 2003 08:24:56 +0000 Subject: (quote_file_name): Print the result instead of returning it. Fix the return type accordingly. (main): Under --eval, don't fail if left with additional arguments after decoding options. Quote file names. --- lib-src/emacsclient.c | 62 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 18 deletions(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index f0090752fab..dbdde16db02 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -169,14 +169,15 @@ Report bugs to bug-gnu-emacs@gnu.org.\n", progname); exit (0); } -/* Return a copy of NAME, inserting a & +/* Inserting a & before each &, each space, each newline, and any initial -. Change spaces to underscores, too, so that the return value never contains a space. */ -char * -quote_file_name (name) +void +quote_file_name (name, stream) char *name; + FILE *stream; { char *copy = (char *) malloc (strlen (name) * 2 + 1); char *p, *q; @@ -206,7 +207,9 @@ quote_file_name (name) } *q++ = 0; - return copy; + fprintf (stream, copy); + + free (copy); } /* Like malloc but get fatal error if memory is exhausted. */ @@ -310,7 +313,7 @@ main (argc, argv) /* Process options. */ decode_options (argc, argv); - if (argc - optind < 1) + if ((argc - optind < 1) && !eval) { fprintf (stderr, "%s: file name or argument required\n", progname); fprintf (stderr, "Try `%s --help' for more information\n", progname); @@ -476,24 +479,47 @@ To start the server in Emacs, type \"M-x server-start\".\n", fprintf (out, "-eval "); if (display) - fprintf (out, "-display %s ", quote_file_name (display)); + { + fprintf (out, "-display "); + quote_file_name (display, out); + fprintf (out, " "); + } - for (i = optind; i < argc; i++) + if ((argc - optind > 0)) { - if (eval) - ; /* Don't prepend any cwd or anything like that. */ - else if (*argv[i] == '+') + for (i = optind; i < argc; i++) { - char *p = argv[i] + 1; - while (isdigit ((unsigned char) *p) || *p == ':') p++; - if (*p != 0) - fprintf (out, "%s/", quote_file_name (cwd)); + if (eval) + ; /* Don't prepend any cwd or anything like that. */ + else if (*argv[i] == '+') + { + char *p = argv[i] + 1; + while (isdigit ((unsigned char) *p) || *p == ':') p++; + if (*p != 0) + { + quote_file_name (cwd, out); + fprintf (out, "/"); + } + } + else if (*argv[i] != '/') + { + quote_file_name (cwd, out); + fprintf (out, "/"); + } + + quote_file_name (argv[i], out); + fprintf (out, " "); } - else if (*argv[i] != '/') - fprintf (out, "%s/", quote_file_name (cwd)); - - fprintf (out, "%s ", quote_file_name (argv[i])); } + else + { + while ((str = fgets (string, BUFSIZ, stdin))) + { + quote_file_name (str, out); + } + fprintf (out, " "); + } + fprintf (out, "\n"); fflush (out); -- cgit v1.2.1 From 14ef72889c1436e618329426a588fc0d828a1195 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Sep 2003 09:19:38 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4e8da57491c..cb807106836 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,8 +1,15 @@ +2003-09-28 Andreas B,A|(Bsching (tiny change) + + * emacsclient.c (quote_file_name): Print the result instead of + returning it. Fix the return type accordingly. + (main): Under --eval, don't fail if left with additional + arguments after decoding options. Quote file names. + 2003-09-10 Richard M. Stallman * emacsclient.c (main): Use socket_name. -2003-09-10 Andreas_B,A|(Bsching (tiny change) +2003-09-10 Andreas B,A|(Bsching (tiny change) * emacsclient.c (socket_name): New variable. (longopts, decode_options, print_help_and_exit): -- cgit v1.2.1 From c51b37fde97bbe92d350e4f204cefa984a38704e Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 6 Oct 2003 16:36:56 +0000 Subject: *** empty log message *** --- lib-src/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/README b/lib-src/README index fa3074e518b..4d29931a6e9 100644 --- a/lib-src/README +++ b/lib-src/README @@ -1,3 +1,3 @@ This directory contains the source code for the architecture-dependent -files that go in ../arch-lib. At present, these are mostly utility +files that go in ${archlibdir}. At present, these are mostly utility programs used by Emacs. -- cgit v1.2.1 From a4cf2096d77c7d2b3563777ce5f93da255ebd3f4 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 13 Oct 2003 19:41:26 +0000 Subject: Comment change. --- lib-src/emacsclient.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index dbdde16db02..aafc531ac5b 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -169,9 +169,8 @@ Report bugs to bug-gnu-emacs@gnu.org.\n", progname); exit (0); } -/* Inserting a & - before each &, each space, each newline, and any initial -. - Change spaces to underscores, too, so that the +/* In NAME, insert a & before each &, each space, each newline, and + any initial -. Change spaces to underscores, too, so that the return value never contains a space. */ void -- cgit v1.2.1 From 1ae7cf5ee87d39b602b88817127123ed23ad03de Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 20 Oct 2003 23:46:31 +0000 Subject: (edebug-display-freq-count): Doc fix. --- lib-src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index cb807106836..3e2350c7842 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -2,8 +2,8 @@ * emacsclient.c (quote_file_name): Print the result instead of returning it. Fix the return type accordingly. - (main): Under --eval, don't fail if left with additional - arguments after decoding options. Quote file names. + (main): With --eval, if no file name, read from stdin. + Quote file names. 2003-09-10 Richard M. Stallman -- cgit v1.2.1 From 08a39b830496f07d491f94d205da822ba7c05a1f Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 24 Dec 2003 06:49:23 +0000 Subject: (main): For return code, no longer special-case VMS. Instead, use `EXIT_SUCCESS' and `EXIT_FAILURE' from stdlib.h. --- lib-src/make-docfile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib-src') diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 7330b821768..4210320b591 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ of GNU Emacs. .elc and .el and .c files are allowed. A .o file can also be specified; the .c file it was made from is used. This helps the makefile pass the correct list of files. + Option -d DIR means change to DIR before looking for files. The results, which go to standard output or to a file specified with -a or -o (-a to append, -o to start from nothing), @@ -174,10 +175,7 @@ main (argc, argv) if (j == i) err_count += scan_file (argv[i]); } -#ifndef VMS - exit (err_count > 0); -#endif /* VMS */ - return err_count > 0; + return (err_count > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } /* Read file FILENAME and output its doc strings to outfile. */ -- cgit v1.2.1 From 8babaa59603bad912ca7fdefe1d83ede41c01fd2 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 24 Dec 2003 07:32:41 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3e2350c7842..1a0774e7e57 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2003-12-24 Thien-Thi Nguyen + + * make-docfile.c (main): For return code, no longer special-case VMS. + Instead, use `EXIT_SUCCESS' and `EXIT_FAILURE' from stdlib.h. + 2003-09-28 Andreas B,A|(Bsching (tiny change) * emacsclient.c (quote_file_name): Print the result instead of -- cgit v1.2.1 From c91406620cbf11dd9293ac52d6ee55f3dcf2a5fd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 27 Dec 2003 08:18:42 +0000 Subject: (rlog_options): Append -rbranchtag if CVS/Tag indicates a tag, and if the user has not specified an rlog option. Adapted from a suggestion by Martin Stjernholm in . (Copyright): Update to 2003. --- lib-src/ChangeLog | 10 +++++++++- lib-src/rcs2log | 26 +++++++++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 1a0774e7e57..542761fda2f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,11 @@ +2003-12-27 Paul Eggert + + * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates + a tag, and if the user has not specified an rlog option. + Adapted from a suggestion by Martin Stjernholm in + . + (Copyright): Update to 2003. + 2003-12-24 Thien-Thi Nguyen * make-docfile.c (main): For return code, no longer special-case VMS. @@ -5461,7 +5469,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker ;; coding: iso-2022-7bit ;; End: - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 86a3f6722cd..9528e6b1d9c 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -29,9 +29,9 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.50 2002/02/03 17:31:31 eggert Exp $' +Id='$Id: rcs2log,v 1.51 2003/09/01 15:45:03 miles Exp $' -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -49,7 +49,7 @@ Id='$Id: rcs2log,v 1.50 2002/02/03 17:31:31 eggert Exp $' # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -Copyright='Copyright (C) 2002 Free Software Foundation, Inc. +Copyright='Copyright (C) 2003 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. @@ -195,8 +195,9 @@ case $rlogfile in # If no rlog options are given, # log the revisions checked in since the first ChangeLog entry. - # Since ChangeLog is only by date, some of these revisions may be duplicates of - # what's already in ChangeLog; it's the user's responsibility to remove them. + # Since ChangeLog is only by date, some of these revisions may be + # duplicates of what's already in ChangeLog; it's the user's + # responsibility to remove them. case $rlog_options in '') if test -s "$changelog" @@ -281,6 +282,21 @@ case $rlogfile in esac done + # If no rlog options are given, and if we are in a tagged CVS branch, + # log only the changes in that branch. + case $rlog_options in + '') + if test -f CVS/Tag + then + CVSTAG=`cat &2 "$0: invalid CVS/Tag"; exit 1;; + esac + fi;; + esac fi # Use $rlog's -zLT option, if $rlog supports it. -- cgit v1.2.1 From e822882420396cb0fd14cf3e33b8035306dac726 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 4 Jan 2004 16:42:06 +0000 Subject: (main): Fix socket name when using another user. --- lib-src/ChangeLog | 4 ++++ lib-src/emacsclient.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 542761fda2f..0e6a568db49 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-01-04 Andreas Schwab + + * emacsclient.c (main): Fix socket name when using another user. + 2003-12-27 Paul Eggert * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index aafc531ac5b..8ac1902929e 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -391,7 +391,7 @@ main (argc, argv) if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ - sprintf (server.sun_path, "/tmp/esrv%d-%s", + sprintf (server.sun_path, "/tmp/emacs%d-%s/server", (int) pw->pw_uid, system_name); sock_status = socket_status (server.sun_path); } -- cgit v1.2.1 From 152b6e830f5213943afbb70be0e91a022f63556f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 8 Jan 2004 12:20:43 +0000 Subject: (main): Save errno from socket_status. --- lib-src/ChangeLog | 4 ++++ lib-src/emacsclient.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0e6a568db49..6aa96d2cc91 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-01-08 Andreas Schwab + + * emacsclient.c (main): Save errno from socket_status. + 2004-01-04 Andreas Schwab * emacsclient.c (main): Fix socket name when using another user. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 8ac1902929e..9f8eb04011a 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -358,6 +358,7 @@ main (argc, argv) { int sock_status = 0; + int saved_errno; if (! socket_name) { @@ -374,6 +375,7 @@ main (argc, argv) /* See if the socket exists, and if it's owned by us. */ sock_status = socket_status (server.sun_path); + saved_errno = errno; if (sock_status) { /* Failing that, see if LOGNAME or USER exist and differ from @@ -394,6 +396,7 @@ main (argc, argv) sprintf (server.sun_path, "/tmp/emacs%d-%s/server", (int) pw->pw_uid, system_name); sock_status = socket_status (server.sun_path); + saved_errno = errno; } } } @@ -412,14 +415,14 @@ main (argc, argv) case 2: /* `stat' failed */ - if (errno == ENOENT) + if (saved_errno == ENOENT) fprintf (stderr, "%s: can't find socket; have you started the server?\n\ To start the server in Emacs, type \"M-x server-start\".\n", argv[0]); else fprintf (stderr, "%s: can't stat %s: %s\n", - argv[0], server.sun_path, strerror (errno)); + argv[0], server.sun_path, strerror (saved_errno)); fail (argc, argv); break; } -- cgit v1.2.1 From 5c9659d3f6a8d29925bec34376f3e21f4a2deade Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 20 Jan 2004 23:25:33 +0000 Subject: (main): Stop if socket name too long. Only try su-fallback if the socket name was not explicit. Check socket name length in su-fallback case as well. --- lib-src/emacsclient.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 9f8eb04011a..49ebada768f 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1,5 +1,5 @@ /* Client process that communicates with GNU Emacs acting as server. - Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003 + Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -358,9 +358,10 @@ main (argc, argv) { int sock_status = 0; + int default_sock = !socket_name; int saved_errno; - if (! socket_name) + if (default_sock) { socket_name = alloca (system_name_length + 100); sprintf (socket_name, "/tmp/emacs%d-%s/server", @@ -370,13 +371,16 @@ main (argc, argv) if (strlen (socket_name) < sizeof (server.sun_path)) strcpy (server.sun_path, socket_name); else - fprintf (stderr, "%s: socket-name %s too long", - argv[0], socket_name); + { + fprintf (stderr, "%s: socket-name %s too long", + argv[0], socket_name); + exit (1); + } /* See if the socket exists, and if it's owned by us. */ sock_status = socket_status (server.sun_path); saved_errno = errno; - if (sock_status) + if (sock_status && default_sock) { /* Failing that, see if LOGNAME or USER exist and differ from our euid. If so, look for a socket based on the UID @@ -393,8 +397,18 @@ main (argc, argv) if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ - sprintf (server.sun_path, "/tmp/emacs%d-%s/server", + sprintf (socket_name, "/tmp/emacs%d-%s/server", (int) pw->pw_uid, system_name); + + if (strlen (socket_name) < sizeof (server.sun_path)) + strcpy (server.sun_path, socket_name); + else + { + fprintf (stderr, "%s: socket-name %s too long", + argv[0], socket_name); + exit (1); + } + sock_status = socket_status (server.sun_path); saved_errno = errno; } -- cgit v1.2.1 From 293f9f2a993099a5661e3f56ddbd55561d41454a Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 24 Jan 2004 21:57:57 +0000 Subject: (main): Restore errno from saved_errno, so the error message comes from socket_status. --- lib-src/emacsclient.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 49ebada768f..3ae33f72a18 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -388,12 +388,14 @@ main (argc, argv) that init_editfns uses to set the global Vuser_full_name. */ char *user_name = (char *) getenv ("LOGNAME"); + if (!user_name) user_name = (char *) getenv ("USER"); if (user_name) { struct passwd *pw = getpwnam (user_name); + if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ @@ -412,6 +414,8 @@ main (argc, argv) sock_status = socket_status (server.sun_path); saved_errno = errno; } + else + errno = saved_errno; } } -- cgit v1.2.1 From 2a6fc2d92eba660079107fcfe245b9d5d32ea4f5 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 24 Jan 2004 21:58:19 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6aa96d2cc91..3e66cba3563 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2004-01-24 Richard M. Stallman + + * emacsclient.c (main): Restore errno from saved_errno, + so the error message comes from socket_status. + 2004-01-08 Andreas Schwab * emacsclient.c (main): Save errno from socket_status. -- cgit v1.2.1 From 0734b0d08d1d8d7fb50654261517624fdd3efd0e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 27 Jan 2004 23:07:13 +0000 Subject: (main): Don't use the hostname in the socket name. Look for relative socket names in the /tmp dir rather than in cwd. --- lib-src/ChangeLog | 11 +++++++++++ lib-src/emacsclient.c | 45 ++++++++++++++------------------------------- 2 files changed, 25 insertions(+), 31 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3e66cba3563..6ea0e8be97a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,8 +1,19 @@ +2004-01-27 Stefan Monnier + + * emacsclient.c (main): Don't use the hostname in the socket name. + Look for relative socket names in the /tmp dir rather than in cwd. + 2004-01-24 Richard M. Stallman * emacsclient.c (main): Restore errno from saved_errno, so the error message comes from socket_status. +2004-01-20 Stefan Monnier + + * emacsclient.c (main): Stop if socket name too long. + Only try su-fallback if the socket name was not explicit. + Check socket name length in su-fallback case as well. + 2004-01-08 Andreas Schwab * emacsclient.c (main): Save errno from socket_status. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 3ae33f72a18..a3a73d9e067 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -299,8 +299,6 @@ main (argc, argv) int argc; char **argv; { - char *system_name; - int system_name_length; int s, i, needlf = 0; FILE *out, *in; struct sockaddr_un server; @@ -332,40 +330,24 @@ main (argc, argv) server.sun_family = AF_UNIX; - { - char *dot; - system_name_length = 32; - - while (1) - { - system_name = (char *) xmalloc (system_name_length + 1); - - /* system_name must be null-terminated string. */ - system_name[system_name_length] = '\0'; - - if (gethostname (system_name, system_name_length) == 0) - break; - - free (system_name); - system_name_length *= 2; - } - - /* We always use the non-dotted host name, for simplicity. */ - dot = index (system_name, '.'); - if (dot) - *dot = '\0'; - } - { int sock_status = 0; int default_sock = !socket_name; int saved_errno; + char *server_name = "server"; + + if (socket_name && !index (socket_name, '/') && !index (socket_name, '\\')) + { /* socket_name is a file name component. */ + server_name = socket_name; + socket_name = NULL; + default_sock = 1; /* Try both UIDs. */ + } if (default_sock) { - socket_name = alloca (system_name_length + 100); - sprintf (socket_name, "/tmp/emacs%d-%s/server", - (int) geteuid (), system_name); + socket_name = alloca (100 + strlen (server_name)); + sprintf (socket_name, "/tmp/emacs%d/%s", + (int) geteuid (), server_name); } if (strlen (socket_name) < sizeof (server.sun_path)) @@ -399,8 +381,9 @@ main (argc, argv) if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ - sprintf (socket_name, "/tmp/emacs%d-%s/server", - (int) pw->pw_uid, system_name); + socket_name = alloca (100 + strlen (server_name)); + sprintf (socket_name, "/tmp/emacs%d/%s", + (int) pw->pw_uid, server_name); if (strlen (socket_name) < sizeof (server.sun_path)) strcpy (server.sun_path, socket_name); -- cgit v1.2.1 From b6b6d6d201c5203279a8267e49f9fce97e7a70e9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 5 Feb 2004 00:02:04 +0000 Subject: (decode_options): Fix handling of alternate editor. --- lib-src/emacsclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index a3a73d9e067..c8b2596198f 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -92,6 +92,8 @@ decode_options (argc, argv) int argc; char **argv; { + alternate_editor = getenv ("ALTERNATE_EDITOR"); + while (1) { int opt = getopt_long (argc, argv, @@ -100,8 +102,6 @@ decode_options (argc, argv) if (opt == EOF) break; - alternate_editor = getenv ("ALTERNATE_EDITOR"); - switch (opt) { case 0: -- cgit v1.2.1 From 98c6e531edf6d405da2aa758f198838dee3d4402 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 6 Feb 2004 22:36:10 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6ea0e8be97a..6378f0e99a7 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-02-04 J,bi(Br,bt(Bme Marant (tiny) + + * emacsclient.c (decode_options): Fix handling of alternate editor. + 2004-01-27 Stefan Monnier * emacsclient.c (main): Don't use the hostname in the socket name. -- cgit v1.2.1 From 83d48514ec1b20443fb6be1160113c0d0624a55b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 15 Feb 2004 07:41:58 +0000 Subject: Work correctly if CVSROOT specifies :fork: or :local: methods, or omits the colon between the hostname and the path. Allow :/ in repository path, since CVS does. Fix typo: "pository" should be set from $CVSROOT, not $repository. This fixes a bug reported by Wolfgang Scherer in , along with some related bugs I discovered by inspecting how CVS itself parses $CVSROOT. --- lib-src/rcs2log | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'lib-src') diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 9528e6b1d9c..b7466b6c134 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -29,10 +29,10 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.51 2003/09/01 15:45:03 miles Exp $' +Id='$Id: rcs2log,v 1.52 2003/12/27 08:18:08 uid65632 Exp $' -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, +# 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ Id='$Id: rcs2log,v 1.51 2003/09/01 15:45:03 miles Exp $' # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -Copyright='Copyright (C) 2003 Free Software Foundation, Inc. +Copyright='Copyright (C) 2004 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. @@ -251,18 +251,24 @@ case $rlogfile in rlog='cvs -q log' repository=`sed 1q &2 "$0: $CVSROOT: CVSROOT has multiple ':/'s" - exit 1;; - *:/*) + /* | :fork:* | :local:*) ;; + */*) # remote repository - pository=`expr "X$repository" : '.*:\(/.*\)'`;; - *) + pository=`expr "X$CVSROOT" : '[^/]*\(.*\)'`;; + esac + case $pository in + '') # local repository case $repository in /*) ;; - *) repository=${CVSROOT?}/$repository;; + *) + repository=${CVSROOT?}/$repository + case $repository in + :fork:* | :local:*) + repository=`expr "$repository" : ':[^:]*:\(.*\)'`;; + esac;; esac if test ! -d "$repository" then -- cgit v1.2.1 From 9766d41b5173e4cf907793fb189ed451938741d4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 15 Feb 2004 07:47:45 +0000 Subject: rcs2log fixes for CVSROOT var. Update Copyright dates to include 2004, and 1988 through 1992. --- lib-src/ChangeLog | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6378f0e99a7..b2820eff2f3 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,14 @@ +2004-02-14 Paul Eggert + + * rcs2log: Work correctly if CVSROOT specifies :fork: or + :local: methods, or omits the colon between the hostname + and the path. Allow :/ in repository path, since CVS does. + Fix typo: "pository" should be set from $CVSROOT, not $repository. + This fixes a bug reported by Wolfgang Scherer in + , + along with some related bugs I discovered by inspecting how + CVS itself parses $CVSROOT. + 2004-02-04 J,bi(Br,bt(Bme Marant (tiny) * emacsclient.c (decode_options): Fix handling of alternate editor. @@ -5497,7 +5508,8 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker ;; coding: iso-2022-7bit ;; End: - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 + Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. -- cgit v1.2.1 From 783bcffa10c4e226086063f15d45cb2de7038421 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 16 Feb 2004 03:18:25 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index b2820eff2f3..5758a6d0b89 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -29,6 +29,12 @@ Only try su-fallback if the socket name was not explicit. Check socket name length in su-fallback case as well. +2004-01-20 Stefan Monnier + + * emacsclient.c (main): Stop if socket name too long. + Only try su-fallback if the socket name was not explicit. + Check socket name length in su-fallback case as well. + 2004-01-08 Andreas Schwab * emacsclient.c (main): Save errno from socket_status. @@ -69,7 +75,7 @@ 2003-08-25 Takaaki Ota (tiny change) - * etags.c (consider_token): check C++ `operator' only when the + * etags.c (consider_token): Check C++ `operator' only when the token len is long enough. 2003-08-20 Dave Love -- cgit v1.2.1 From 7690c76af06a287856c9edf4cb76d9409e1c9b64 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 1 Mar 2004 18:41:41 +0000 Subject: (obj): Add fringe.c. --- lib-src/makefile.w32-in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 6f92bd76ee8..20cf4727362 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -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 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 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 # -- cgit v1.2.1 From a64387eecc3775b638dd0d65a3942d872e7c8bcc Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 1 Mar 2004 18:49:17 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5758a6d0b89..9876b0b041a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-03-01 Juanma Barranquero + + * makefile.w32-in (obj): Add fringe.c. + 2004-02-14 Paul Eggert * rcs2log: Work correctly if CVSROOT specifies :fork: or @@ -9,7 +13,7 @@ along with some related bugs I discovered by inspecting how CVS itself parses $CVSROOT. -2004-02-04 J,bi(Br,bt(Bme Marant (tiny) +2004-02-04 J,bi(Br,bt(Bme Marant (tiny change) * emacsclient.c (decode_options): Fix handling of alternate editor. @@ -1638,7 +1642,7 @@ Now used as element of a linked list. (patterns, num_patterns): Global variables deleted. (p_head): New global variable. - (forced_lang): New global variable (replaces lang_func). + (forced_lang): New global variable (replaces lang_func). (get_language_from_name, get_language_from_interpreter) (get_language_from_suffix): Semantics changed. All callers changed. (last_node): New global variable. @@ -2902,7 +2906,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker * etags.c (lowcase): Use the standard tolower function. (substitute): Remove some wrong and some useless code related with - escape `\` character in regexp replacement string. + escape '\' character in regexp replacement string. (TEX_defenv): Added part, appendix, entry, index. Removed typeout. (lang_suffixes): New suffixes: .hpp for C++; .f90 for Fortran; .bib, .ltx, .TeX for TeX (.bbl, .dtx removed); .ml for Lisp; @@ -3923,7 +3927,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1994-02-17 Francesco Potorti` (pot@cnuce.cnr.it) - * etags.c (--absolute-pathnames): option removed. + * etags.c (--absolute-pathnames): Option removed. 1994-02-16 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4384,8 +4388,8 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1993-05-30 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) - * Makefile.in: (${archlibdir}): Use `(cd foo && pwd)` instead of - `(cd foo ; pwd)` to get the canonical name of a directory; cd + * Makefile.in: (${archlibdir}): Use `(cd foo && pwd)' instead of + `(cd foo ; pwd)' to get the canonical name of a directory; cd might fail, and have pwd print out the current directory. * movemail.c [MAIL_USE_POP] (main): Don't use non-portable @@ -5070,7 +5074,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker * etags.c (C_entries): Process token before handling end of line. When inner loops reach end of line, just back up. Let the real end of line processing happen in just one place. - (consider_token): Likewise. + (consider_token): Likewise. 1991-04-11 Jim Blandy (jimb@geech.gnu.ai.mit.edu) @@ -5183,7 +5187,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1990-03-14 Joseph Arceneaux (jla@churchy.ai.mit.edu) - * etags.c (getit): Recognize '$' as beginning identifiers. + * etags.c (getit): Recognize '$' as beginning identifiers. 1990-02-22 David Lawrence (tale@pogo.ai.mit.edu) -- cgit v1.2.1 From bdfd0369ce065c4ed22cf74c6f32c6a081eca56f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 9 Mar 2004 22:47:27 +0000 Subject: Changes to support ChangeLog.10+. (main): Tidy up usage string. Fix "Use of uninitialized value" warning. Set version to 0.2. Parse the directory listing to get any ChangeLog.n file, not just 1..9. (header_match_p, entry_match_p, print_log, parse_changelog): Remove Perl prototypes (their purpose is to help the parser, which isn't needed here, not declare arguments). (parse_changelog): Make --reverse faster on big batches by not modifying the entries list. --- lib-src/ChangeLog | 12 ++++++++++ lib-src/grep-changelog | 62 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 49 insertions(+), 25 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 9876b0b041a..4e995ff185a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,15 @@ +2004-03-09 Juanma Barranquero + + * grep-changelog: Changes to support ChangeLog.10+. + (main): Tidy up usage string. Fix "Use of uninitialized value" + warning. Set version to 0.2. Parse the directory listing to get + any ChangeLog.n file, not just 1..9. + (header_match_p, entry_match_p, print_log, parse_changelog): + Remove Perl prototypes (their purpose is to help the parser, which + isn't needed here, not declare arguments). + (parse_changelog): Make --reverse faster on big batches by not + modifying the entries list. + 2004-03-01 Juanma Barranquero * makefile.w32-in (obj): Add fringe.c. diff --git a/lib-src/grep-changelog b/lib-src/grep-changelog index 9baf0213db7..38fce879c7a 100755 --- a/lib-src/grep-changelog +++ b/lib-src/grep-changelog @@ -1,6 +1,6 @@ #! /usr/bin/perl -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -56,34 +56,36 @@ $result = 0 if $to_date && $to_date !~ /^\d\d\d\d-\d\d-\d\d$/; if ($result == 0 || $help) { print < 0) { - @ARGV = ("ChangeLog", map {"ChangeLog.$_"} reverse 1..9); + @ARGV = ("ChangeLog"); + + push @ARGV, + map {"ChangeLog.$_"} + sort {$b <=> $a} + map {/\.(\d+)$/; $1} + do { + opendir D, '.'; + grep /^ChangeLog\.\d+$/, readdir D; + }; + @ARGV = reverse @ARGV if $reverse; } -- cgit v1.2.1 From d08c4c28577fceae903a3304258654b4d491b8cf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Mar 2004 15:38:14 +0000 Subject: Fix copyright. --- lib-src/ChangeLog | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4e995ff185a..819b4db4a1d 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -45,12 +45,6 @@ Only try su-fallback if the socket name was not explicit. Check socket name length in su-fallback case as well. -2004-01-20 Stefan Monnier - - * emacsclient.c (main): Stop if socket name too long. - Only try su-fallback if the socket name was not explicit. - Check socket name length in su-fallback case as well. - 2004-01-08 Andreas Schwab * emacsclient.c (main): Save errno from socket_status. -- cgit v1.2.1 From d5d66b7edaf3ee8b3c5e87ee9147f63efa8c1439 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 7 Apr 2004 19:18:42 +0000 Subject: (xmalloc): Fix return type. (put_filename): New fun. (scan_file): Use it. --- lib-src/ChangeLog | 6 ++++++ lib-src/make-docfile.c | 24 +++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 819b4db4a1d..75b3be839e1 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2004-04-07 Stefan Monnier + + * make-docfile.c (xmalloc): Fix return type. + (put_filename): New fun. + (scan_file): Use it. + 2004-03-09 Juanma Barranquero * grep-changelog: Changes to support ChangeLog.10+. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 4210320b591..ba73f5800a7 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -1,5 +1,5 @@ /* Generate doc-string file for GNU Emacs from source files. - Copyright (C) 1985, 86, 92, 93, 94, 97, 1999, 2000, 2001 + Copyright (C) 1985, 86, 92, 93, 94, 97, 1999, 2000, 01, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -105,11 +105,11 @@ fatal (s1, s2) /* Like malloc but get fatal error if memory is exhausted. */ -long * +void * xmalloc (size) unsigned int size; { - long *result = (long *) malloc (size); + void *result = (void *) malloc (size); if (result == NULL) fatal ("virtual memory exhausted", 0); return result; @@ -178,6 +178,22 @@ main (argc, argv) return (err_count > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } +/* Add a source file name boundary marker in the output file. */ +void +put_filename (filename) + char *filename; +{ + char *tmp = filename; + int len; + + while ((tmp = index (filename, '/'))) + filename = tmp + 1; + + putc (037, outfile); + putc ('S', outfile); + fprintf (outfile, "%s\n", filename); +} + /* Read file FILENAME and output its doc strings to outfile. */ /* Return 1 if file is not found, 0 if it is found. */ @@ -186,6 +202,8 @@ scan_file (filename) char *filename; { int len = strlen (filename); + + put_filename (filename); if (len > 4 && !strcmp (filename + len - 4, ".elc")) return scan_lisp_file (filename, READ_BINARY); else if (len > 3 && !strcmp (filename + len - 3, ".el")) -- cgit v1.2.1 From a2de0c3b755f982b426e915e3d1064a10f6206bb Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 13 Apr 2004 09:47:51 +0000 Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-210 More RCS keyword removal --- lib-src/vcdiff | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/vcdiff b/lib-src/vcdiff index 32c4e5ba89e..9c513ac8200 100755 --- a/lib-src/vcdiff +++ b/lib-src/vcdiff @@ -3,7 +3,7 @@ # Enhanced sccs diff utility for use with vc mode. # This version is more compatible with rcsdiff(1). # -# Copyright (C) 1992, 1993, 1995, 1997, 2001 +# Copyright (C) 1992, 1993, 1995, 1997, 2001, 2004 # Free Software Foundation, Inc. # # This file is part of GNU Emacs. @@ -23,8 +23,6 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # -# $Id: vcdiff,v 1.7 2001/02/20 12:36:28 gerd Exp $ -# DIFF="diff" usage="$0: Usage: vcdiff [--brief] [-q] [-r] [-r] [diffopts] sccsfile..." -- cgit v1.2.1 From 442a2160f474251e680b204693f61f28a722de60 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 18 Apr 2004 06:02:16 +0000 Subject: * rcs2log (Help): Clarify wording of the usage message. --- lib-src/ChangeLog | 6 ++++++ lib-src/rcs2log | 49 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 13 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 75b3be839e1..7355a29348a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2004-04-17 Paul Eggert + + * rcs2log (Help): Clarify wording of the usage message. + Problem reported by Alan Mackenzie in + . + 2004-04-07 Stefan Monnier * make-docfile.c (xmalloc): Fix return type. diff --git a/lib-src/rcs2log b/lib-src/rcs2log index b7466b6c134..19f5a2b26b4 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 + + * rcs2log (Help): Clarify wording of the usage message. + Problem reported by Alan Mackenzie in + . + +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 "LOGINFULLNAMEMAILADDR" Assume LOGIN has FULLNAME and MAILADDR. + -u "LOGINFULLNAMEEMAILADDR" 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 .' -Id='$Id: rcs2log,v 1.52 2003/12/27 08:18:08 uid65632 Exp $' +Id='$Id: rcs2log,v 1.53 2004/02/15 07:41:58 uid65632 Exp $' # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, # 2004 Free Software Foundation, Inc. -- cgit v1.2.1 From bd6766d34dc21e2c57917a6bf172421a198d2839 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Apr 2004 00:24:35 +0000 Subject: Add "-*- makefile -*-" mode tag. --- lib-src/makefile.w32-in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 20cf4727362..c4c2604d113 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -1,4 +1,4 @@ -# Makefile for GNU Emacs on the Microsoft W32 API. +# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. # Copyright (c) 2000-2001 Free Software Foundation, Inc. # # This file is part of GNU Emacs. -- cgit v1.2.1 From d814862aa67a502a014d15c965f353f97500365a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Apr 2004 00:25:28 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 7355a29348a..eaf07239901 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-04-23 Juanma Barranquero + + * makefile.w32-in: Add "-*- makefile -*-" mode tag. + 2004-04-17 Paul Eggert * rcs2log (Help): Clarify wording of the usage message. -- cgit v1.2.1 From b09c560845ae108ac90675000eeacc2add6eb2b5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 26 Apr 2004 10:49:11 +0000 Subject: (IS_DIRECTORY_SEP): New macro. (put_filename): Remove unused variable len. Use IS_DIRECTORY_SEP instead of a literal '/'. --- lib-src/ChangeLog | 6 ++++++ lib-src/make-docfile.c | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index eaf07239901..e2fcc6cc939 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2004-04-26 Eli Zaretskii + + * 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 * makefile.w32-in: Add "-*- makefile -*-" mode tag. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index ba73f5800a7..1c0bc559225 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 (); @@ -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); -- cgit v1.2.1 From 238add5e586e100ea2f7fd243d3ce57f98449b45 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 3 May 2004 14:19:40 +0000 Subject: Remove files related to old msvc only windows build. --- lib-src/ChangeLog | 4 + lib-src/makefile.nt | 417 ---------------------------------------------------- 2 files changed, 4 insertions(+), 417 deletions(-) delete mode 100644 lib-src/makefile.nt (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e2fcc6cc939..b280abc4111 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-05-03 Jason Rumney + + * makefile.nt: Remove. + 2004-04-26 Eli Zaretskii * make-docfile.c (IS_DIRECTORY_SEP): New macro. 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 -- cgit v1.2.1 From 3f0656ff20abbcd328175e055ae0ecd77acd6ce6 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 7 May 2004 15:31:07 +0000 Subject: (GOOD, BAD): Delete macros. Throughout, replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value. --- lib-src/ChangeLog | 8 ++++++++ lib-src/b2m.c | 21 +++++++-------------- lib-src/etags.c | 29 +++++++++++------------------ 3 files changed, 26 insertions(+), 32 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index b280abc4111..75d5f964201 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,11 @@ +2004-05-07 Thien-Thi Nguyen + + * 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 * makefile.nt: Remove. 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 unixmailbox\n", progname); - exit (GOOD); + exit (EXIT_SUCCESS); } } if (optind != argc) { fprintf (stderr, "Usage: %s 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/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 */ -- cgit v1.2.1 From c2bcfb19fbc92c81876abb290f764758c59feca9 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 8 May 2004 14:42:41 +0000 Subject: (emacsclient${EXEEXT}): Use makefile var `version'. --- lib-src/ChangeLog | 4 ++++ lib-src/Makefile.in | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 75d5f964201..28a1fb8fcc0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-05-08 Thien-Thi Nguyen + + * Makefile.in (emacsclient${EXEEXT}): Use makefile var `version'. + 2004-05-07 Thien-Thi Nguyen * b2m.c (GOOD, BAD): Delete macros. Throughout, diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 7868364148a..1da04d88b82 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 -- cgit v1.2.1 From 65396510c3ff5e5386560d586cb117f6a9d06c27 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 8 May 2004 15:26:33 +0000 Subject: 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. --- lib-src/ChangeLog | 10 ++++++++++ lib-src/cvtmail.c | 8 +++++--- lib-src/ebrowse.c | 17 ++++++++--------- lib-src/emacsclient.c | 27 +++++++++++++-------------- lib-src/fakemail.c | 8 +++++--- lib-src/hexl.c | 6 ++++-- lib-src/make-docfile.c | 4 +++- lib-src/movemail.c | 40 ++++++++++++++++++++++------------------ lib-src/profile.c | 8 +++++--- lib-src/sorted-doc.c | 6 ++++-- lib-src/test-distrib.c | 7 +++---- lib-src/update-game-score.c | 14 ++++++++------ lib-src/yow.c | 10 ++++++---- 13 files changed, 96 insertions(+), 69 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 28a1fb8fcc0..8c641f45ae7 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,13 @@ +2004-05-08 Thien-Thi Nguyen + + * 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 * Makefile.in (emacsclient${EXEEXT}): Use makefile var `version'. 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/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 1c0bc559225..802b4e09e67 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -104,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. */ @@ -1210,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/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/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..97e87695c7c 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c @@ -100,11 +100,10 @@ have been corrupted in the files of Emacs, and it will not work.\n", exit (2); } 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 */ -- cgit v1.2.1 From 83a9c0b2c302747a170f978284e749e96977d416 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 8 May 2004 19:27:28 +0000 Subject: (lisp1, lisp2): Split lisp to avoid long command-lines. --- lib-src/makefile.w32-in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index c4c2604d113..a997d324a5b 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -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" -- cgit v1.2.1 From e6662c8bbbdc84837e5bb6773b9335f79ffb4b5d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 8 May 2004 19:51:35 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 8c641f45ae7..c841df23097 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2004-05-08 Jason Rumney + + * makefile.w32-in (lisp1, lisp2): Split lisp to avoid long + command-lines. + 2004-05-08 Thien-Thi Nguyen * cvtmail.c: Throughout, replace 0 destined for `exit' arg -- cgit v1.2.1 From 80e26b667a4386fb1422434f621d7aabae3e9769 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 10 May 2004 17:32:13 +0000 Subject: (main): For failing cases, exit with `EXIT_FAILURE'. --- lib-src/ChangeLog | 4 ++++ lib-src/test-distrib.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index c841df23097..ac789eb3181 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2004-05-10 Thien-Thi Nguyen + + * test-distrib.c (main): For failing cases, exit with `EXIT_FAILURE'. + 2004-05-08 Jason Rumney * makefile.w32-in (lisp1, lisp2): Split lisp to avoid long diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index 97e87695c7c..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,7 +97,7 @@ 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); return EXIT_SUCCESS; -- cgit v1.2.1 From 2997712d3057f577f33635277403ee6552664dbf Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 2 Jun 2004 00:29:10 +0000 Subject: (obj): Add image.c. --- lib-src/makefile.w32-in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index a997d324a5b..3b53a29889b 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -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 # -- cgit v1.2.1 From 86d373e6b2e271fd2a5c98cee8a9710c23c5fda8 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 2 Jun 2004 00:53:13 +0000 Subject: *** empty log message *** --- lib-src/ChangeLog | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index ac789eb3181..9f3fcc13371 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,6 +1,11 @@ +2004-06-01 Juanma Barranquero + + * makefile.w32-in (obj): Add image.c. + 2004-05-10 Thien-Thi Nguyen - * test-distrib.c (main): For failing cases, exit with `EXIT_FAILURE'. + * test-distrib.c (main): For failing cases, exit with + `EXIT_FAILURE'. 2004-05-08 Jason Rumney @@ -14,8 +19,8 @@ (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. + * 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 -- cgit v1.2.1 From 48d67035ea6651694878200f2284d329dfb2f3ad Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 11 Jun 2004 02:39:51 +0000 Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396 Tweak arch tagging to make build/install-in-place less annoying Previously, autoconf-created Makefiles and the like would contain duplicate taglines (unfortunately, autoconf doesn't seem to have a `strip in generated file' comment mechanism) leading to conflicts, and installing in place would create unknown directories and copies of source directories (leading to conflicts with the source directories). This changeset makes all autoconf-processed files use explicit id-tags and adds .arch-inventory entries to ignore installation directories. --- lib-src/Makefile.in | 3 --- lib-src/makefile.w32-in | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'lib-src') diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 1da04d88b82..1d8c5e6c9ba 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -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/makefile.w32-in b/lib-src/makefile.w32-in index 3b53a29889b..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. +# Copyright (c) 2000-2001, 2004 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -425,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 -- cgit v1.2.1 From 92aed8bec9cd9392e44de21719a82a516826ad6e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 12 Jun 2004 04:51:11 +0000 Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401 More build-in-place tweaking of arch tagging --- lib-src/.arch-inventory | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib-src/.arch-inventory (limited to 'lib-src') diff --git a/lib-src/.arch-inventory b/lib-src/.arch-inventory new file mode 100644 index 00000000000..377335989bf --- /dev/null +++ b/lib-src/.arch-inventory @@ -0,0 +1,7 @@ +# 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)$ + +# arch-tag: da33b3d6-170d-4fe5-9eb8-ed2753bc9b4f -- cgit v1.2.1 From e9b95bbf8a5106747ca93fcb901e46e9c4aac614 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 12 Jun 2004 13:13:44 +0000 Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403 Yet more build-in-place tweaking of arch tagging --- lib-src/.arch-inventory | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib-src') diff --git a/lib-src/.arch-inventory b/lib-src/.arch-inventory index 377335989bf..0e0621a8dc3 100644 --- a/lib-src/.arch-inventory +++ b/lib-src/.arch-inventory @@ -4,4 +4,7 @@ backup ^(test-distrib|make-docfile|profile|digest-doc|movemail|cvtmail|fakemail| # 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 -- cgit v1.2.1