diff options
author | Jason Rumney <jasonr@gnu.org> | 2007-05-16 21:06:28 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2007-05-16 21:06:28 +0000 |
commit | 4b7b77f679e0af9badce49c08763a96eddf2fcc1 (patch) | |
tree | f38702945c602af9af2700e7c9f29c076721a8c7 /lib-src | |
parent | 105faa8427cdb6738c01c3c3b0f7274749f8f259 (diff) | |
download | emacs-4b7b77f679e0af9badce49c08763a96eddf2fcc1.tar.gz |
(emacs_socket): Rename from s.
Move definition below includes it depends on.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog.multi-tty | 5 | ||||
-rw-r--r-- | lib-src/emacsclient.c | 15 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lib-src/ChangeLog.multi-tty b/lib-src/ChangeLog.multi-tty index 21862e5ed32..0e50b7c61a8 100644 --- a/lib-src/ChangeLog.multi-tty +++ b/lib-src/ChangeLog.multi-tty @@ -1,3 +1,8 @@ +2007-05-16 Jason Rumney <jasonr@gnu.org> + + * emacsclient.c: (emacs_socket): Rename from s. + Move definition below includes it depends on. + 2007-05-16 Dan Nicolaescu <dann@ics.uci.edu> * emacsclient.c (s): Restore. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cf03430e9c5..a8d3257cde0 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -108,8 +108,8 @@ char *(getcwd) (); #define VERSION "unspecified" #endif -#define SEND_STRING(data) (send_to_emacs (s, (data))) -#define SEND_QUOTED(data) (quote_argument (s, (data))) +#define SEND_STRING(data) (send_to_emacs (emacs_socket, (data))) +#define SEND_QUOTED(data) (quote_argument (emacs_socket, (data))) #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 @@ -171,9 +171,6 @@ char *server_file = NULL; /* PID of the Emacs server process. */ int emacs_pid = 0; -/* Socket used to communicate with the Emacs server process. */ -HSOCKET s; - void print_help_and_exit () NO_RETURN; struct option longopts[] = @@ -567,6 +564,8 @@ extern int errno; /* Buffer to accumulate data to send in TCP connections. */ char send_buffer[SEND_BUFFER_SIZE + 1]; int sblen = 0; /* Fill pointer for the send buffer. */ +/* Socket used to communicate with the Emacs server process. */ +HSOCKET emacs_socket = 0; /* Let's send the data to Emacs when either - the data ends in "\n", or @@ -1281,7 +1280,7 @@ main (argc, argv) exit (EXIT_FAILURE); } - if ((s = set_socket ()) == INVALID_SOCKET) + if ((emacs_socket = set_socket ()) == INVALID_SOCKET) fail (); @@ -1453,7 +1452,7 @@ main (argc, argv) fsync (1); /* Now, wait for an answer and print any messages. */ - while ((rl = recv (s, string, BUFSIZ, 0)) > 0) + while ((rl = recv (emacs_socket, string, BUFSIZ, 0)) > 0) { char *p; string[rl] = '\0'; @@ -1523,7 +1522,7 @@ main (argc, argv) fflush (stdout); fsync (1); - CLOSE_SOCKET (s); + CLOSE_SOCKET (emacs_socket); return EXIT_SUCCESS; } |