/* PID of the Emacs server process. */
int emacs_pid = 0;
-void print_help_and_exit (void) NO_RETURN;
-void fail (void) NO_RETURN;
+static void print_help_and_exit (void) NO_RETURN;
+static void fail (void) NO_RETURN;
struct option longopts[] =
\f
/* Like malloc but get fatal error if memory is exhausted. */
-long *
+static long *
xmalloc (unsigned int size)
{
long *result = (long *) malloc (size);
/* Like strdup but get a fatal error if memory is exhausted. */
-char *
+static char *
xstrdup (const char *s)
{
char *result = strdup (s);
/* Display a normal or error message.
On Windows, use a message box if compiled as a Windows app. */
-void
+static void
message (int is_error, const char *message, ...)
{
char msg[2048];
/* Decode the options from argv and argc.
The global variable `optind' will say how many arguments we used up. */
-void
+static void
decode_options (int argc, char **argv)
{
alternate_editor = egetenv ("ALTERNATE_EDITOR");
}
\f
-void
+static void
print_help_and_exit (void)
{
/* Spaces and tabs are significant in this message; they're chosen so the
defined-- exit with an errorcode.
Uses argv, but gets it from the global variable main_argv.
*/
-void
+static void
fail (void)
{
if (alternate_editor)
/* On Windows, the socket library was historically separate from the standard
C library, so errors are handled differently. */
-void
+static void
sock_err_message (const char *function_name)
{
#ifdef WINDOWSNT
- the data ends in "\n", or
- the buffer is full (but this shouldn't happen)
Otherwise, we just accumulate it. */
-void
+static void
send_to_emacs (HSOCKET s, const char *data)
{
while (data)
return value never contains a space.
Does not change the string. Outputs the result to S. */
-void
+static void
quote_argument (HSOCKET s, const char *str)
{
char *copy = (char *) xmalloc (strlen (str) * 2 + 1);
/* The inverse of quote_argument. Removes quoting in string STR by
modifying the string in place. Returns STR. */
-char *
+static char *
unquote_argument (char *str)
{
char *p, *q;
}
\f
-int
+static int
file_name_absolute_p (const char *filename)
{
/* Sanity check, it shouldn't happen. */
* Read the information needed to set up a TCP comm channel with
* the Emacs server: host, port, and authentication string.
*/
-int
+static int
get_server_config (struct sockaddr_in *server, char *authentication)
{
char dotted[32];
return TRUE;
}
-HSOCKET
+static HSOCKET
set_tcp_socket (void)
{
HSOCKET s;
and the name in TTY_NAME, and return 1. Otherwise, fail if NOABORT
is zero, or return 0 if NOABORT is non-zero. */
-int
+static int
find_tty (char **tty_type, char **tty_name, int noabort)
{
char *type = egetenv ("TERM");
/* A signal handler that passes the signal to the Emacs process.
Useful for SIGWINCH. */
-SIGTYPE
+static SIGTYPE
pass_signal_to_emacs (int signalnum)
{
int old_errno = errno;
/* Signal handler for SIGCONT; notify the Emacs process that it can
now resume our tty frame. */
-SIGTYPE
+static SIGTYPE
handle_sigcont (int signalnum)
{
int old_errno = errno;
reality, we may get a SIGTSTP on C-z. Handling this signal and
notifying Emacs about it should get things under control again. */
-SIGTYPE
+static SIGTYPE
handle_sigtstp (int signalnum)
{
int old_errno = errno;
/* Set up signal handlers before opening a frame on the current tty. */
-void
+static void
init_signals (void)
{
/* Set up signal handlers. */
}
-HSOCKET
+static HSOCKET
set_local_socket (void)
{
HSOCKET s;
}
#endif /* ! NO_SOCKETS_IN_FILE_SYSTEM */
-HSOCKET
+static HSOCKET
set_socket (int no_exit_if_error)
{
HSOCKET s;
/* Start the emacs daemon and try to connect to it. */
-void
+static void
start_daemon_and_retry_set_socket (void)
{
#ifndef WINDOWSNT
if (rl <= 0)
break;
-
+
string[rl] = '\0';
p = string + strlen (string) - 1;