diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-02 17:50:23 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-02 17:50:23 -0700 |
commit | 873fbd0b84997863af25e3ddae23b6c078a3e6f5 (patch) | |
tree | c128a27ee29666a3d1acb584bc5eab96a047e067 /lib-src/emacsclient.c | |
parent | a6ed0e289873ac982d7a9b0215d17a4626375b43 (diff) | |
download | emacs-873fbd0b84997863af25e3ddae23b6c078a3e6f5.tar.gz |
Convert function definitions to standard C.
* lib-src/update-game-score.c: Convert function definitions to standard C.
* lib-src/sorted-doc.c:
* lib-src/profile.c:
* lib-src/pop.c:
* lib-src/movemail.c:
* lib-src/make-docfile.c:
* lib-src/hexl.c:
* lib-src/fakemail.c:
* lib-src/etags.c:
* lib-src/ebrowse.c:
* lib-src/digest-doc.c:
* lib-src/b2m.c: Likewise.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r-- | lib-src/emacsclient.c | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 3172ebb8cd1..d96925d2a3c 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -81,7 +81,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <errno.h> -char *getenv (), *getwd (); +char *getenv (const char *), *getwd (char *); char *(getcwd) (); #ifdef WINDOWSNT @@ -157,7 +157,7 @@ char *server_file = NULL; /* PID of the Emacs server process. */ int emacs_pid = 0; -void print_help_and_exit () NO_RETURN; +void print_help_and_exit (void) NO_RETURN; struct option longopts[] = { @@ -184,8 +184,7 @@ struct option longopts[] = /* Like malloc but get fatal error if memory is exhausted. */ long * -xmalloc (size) - unsigned int size; +xmalloc (unsigned int size) { long *result = (long *) malloc (size); if (result == NULL) @@ -517,9 +516,7 @@ message (int is_error, char *message, ...) The global variable `optind' will say how many arguments we used up. */ void -decode_options (argc, argv) - int argc; - char **argv; +decode_options (int argc, char **argv) { alternate_editor = egetenv ("ALTERNATE_EDITOR"); @@ -645,7 +642,7 @@ an empty string"); void -print_help_and_exit () +print_help_and_exit (void) { /* Spaces and tabs are significant in this message; they're chosen so the message aligns properly both in a tty and in a Windows message box. @@ -732,7 +729,7 @@ main (argc, argv) #define AUTH_KEY_LENGTH 64 #define SEND_BUFFER_SIZE 4096 -extern char *strerror (); +extern char *strerror (int); /* Buffer to accumulate data to send in TCP connections. */ char send_buffer[SEND_BUFFER_SIZE + 1]; @@ -743,8 +740,7 @@ HSOCKET emacs_socket = 0; /* On Windows, the socket library was historically separate from the standard C library, so errors are handled differently. */ void -sock_err_message (function_name) - char *function_name; +sock_err_message (char *function_name) { #ifdef WINDOWSNT char* msg = NULL; @@ -768,9 +764,7 @@ sock_err_message (function_name) - the buffer is full (but this shouldn't happen) Otherwise, we just accumulate it. */ void -send_to_emacs (s, data) - HSOCKET s; - char *data; +send_to_emacs (int s, char *data) { while (data) { @@ -809,9 +803,7 @@ send_to_emacs (s, data) Does not change the string. Outputs the result to STREAM. */ void -quote_argument (s, str) - HSOCKET s; - char *str; +quote_argument (int s, char *str) { char *copy = (char *) xmalloc (strlen (str) * 2 + 1); char *p, *q; @@ -851,8 +843,7 @@ quote_argument (s, str) modifying the string in place. Returns STR. */ char * -unquote_argument (str) - char *str; +unquote_argument (char *str) { char *p, *q; @@ -883,8 +874,7 @@ unquote_argument (str) int -file_name_absolute_p (filename) - const unsigned char *filename; +file_name_absolute_p (const unsigned char *filename) { /* Sanity check, it shouldn't happen. */ if (! filename) return FALSE; @@ -938,9 +928,7 @@ initialize_sockets () * the Emacs server: host, port, pid and authentication string. */ int -get_server_config (server, authentication) - struct sockaddr_in *server; - char *authentication; +get_server_config (struct sockaddr_in *server, char *authentication) { char dotted[32]; char *port; @@ -1005,7 +993,7 @@ get_server_config (server, authentication) } HSOCKET -set_tcp_socket () +set_tcp_socket (void) { HSOCKET s; struct sockaddr_in server; @@ -1119,8 +1107,7 @@ find_tty (char **tty_type, char **tty_name, int noabort) 0 - success: none of the above */ static int -socket_status (socket_name) - char *socket_name; +socket_status (char *socket_name) { struct stat statbfr; @@ -1223,7 +1210,7 @@ init_signals (void) HSOCKET -set_local_socket () +set_local_socket (void) { HSOCKET s; struct sockaddr_un server; @@ -1526,9 +1513,7 @@ start_daemon_and_retry_set_socket (void) } int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int i, rl, needlf = 0; char *cwd, *str; |