summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2004-05-08 15:26:33 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2004-05-08 15:26:33 +0000
commit65396510c3ff5e5386560d586cb117f6a9d06c27 (patch)
treee1240e2d08ba9f72fe44e62318c67c3065913d1c /lib-src/emacsclient.c
parent28712a21247d1a503e7620e47c128c0fc33b3bb3 (diff)
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.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index c8b2596198..0698691bf1 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 */