/* Client process that communicates with GNU Emacs acting as server.
- Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
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. */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
#define NO_SHORTNAMES
#endif /* not VMS */
char *getenv (), *getwd ();
-char *getcwd ();
-
-/* This is defined with -D from the compilation command,
- which extracts it from ../lisp/version.el. */
+char *(getcwd) ();
#ifndef VERSION
#define VERSION "unspecified"
case 'V':
printf ("emacsclient %s\n", VERSION);
- exit (0);
+ exit (EXIT_SUCCESS);
break;
case 'H':
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);
}
/* In NAME, insert a & before each &, each space, each newline, and
}
*q++ = 0;
- fprintf (stream, copy);
+ fprintf (stream, "%s", copy);
free (copy);
}
if (result == NULL)
{
perror ("malloc");
- 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);
}
/* See if the socket exists, and if it's owned by us. */
{
fprintf (stderr, "%s: socket-name %s too long",
argv[0], socket_name);
- exit (1);
+ exit (EXIT_FAILURE);
}
sock_status = socket_status (server.sun_path);
}
fprintf (out, " ");
}
-
+
fprintf (out, "\n");
fflush (out);
/* Maybe wait for an answer. */
if (nowait)
- return 0;
+ return EXIT_SUCCESS;
if (!eval)
{
printf ("\n");
fflush (stdout);
- return 0;
+ return EXIT_SUCCESS;
}
#endif /* HAVE_SOCKETS */
/* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7
(do not change this comment) */
+
+/* emacsclient.c ends here */