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
case 'V':
printf ("emacsclient %s\n", VERSION);
- exit (0);
+ exit (EXIT_SUCCESS);
break;
case 't':
default:
fprintf (stderr, "Try `%s --help' for more information\n", progname);
- exit (1);
+ exit (EXIT_FAILURE);
break;
}
}
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);
}
/* Like malloc but get fatal error if memory is exhausted. */
if (result == NULL)
{
perror ("malloc");
- exit (1);
+ exit (EXIT_FAILURE);
}
return result;
}
if (result == NULL)
{
perror ("strdup");
- exit (1);
+ exit (EXIT_FAILURE);
}
return result;
}
}
else
{
- exit (1);
+ exit (EXIT_FAILURE);
}
}
{
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);
}
/*
{
fprintf (stderr, "%s: socket-name %s too long",
argv[0], socket_name);
- exit (1);
+ exit (EXIT_FAILURE);
}
sock_status = socket_status (server.sun_path);
fflush (out);
fsync (fileno (out));
- /* Maybe wait for an answer. */
- if (nowait)
- {
- return 0;
- }
-
- if (!eval && !tty)
+ /* Wait for an answer. */
+ if (!eval && !tty && !nowait)
{
printf ("Waiting for Emacs...");
needlf = 2;
fflush (stdout);
fsync (1);
- return 0;
+ return EXIT_SUCCESS;
}
#endif /* HAVE_SOCKETS */
/* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7
(do not change this comment) */
+
+/* emacsclient.c ends here */