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/pop.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/pop.c')
-rw-r--r-- | lib-src/pop.c | 105 |
1 files changed, 26 insertions, 79 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c index 59ec84c627c..bbfdd3fc71f 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -166,11 +166,7 @@ int pop_debug = 0; * explanation of the error. */ popserver -pop_open (host, username, password, flags) - char *host; - char *username; - char *password; - int flags; +pop_open (char *host, char *username, char *password, int flags) { int sock; popserver server; @@ -337,10 +333,7 @@ pop_open (host, username, password, flags) * connection impossible. */ int -pop_stat (server, count, size) - popserver server; - int *count; - int *size; +pop_stat (popserver server, int *count, int *size) { char *fromserver; char *end_ptr; @@ -413,11 +406,7 @@ pop_stat (server, count, size) * connection impossible. */ int -pop_list (server, message, IDs, sizes) - popserver server; - int message; - int **IDs; - int **sizes; +pop_list (popserver server, int message, int **IDs, int **sizes) { int how_many, i; char *fromserver; @@ -559,11 +548,7 @@ pop_list (server, message, IDs, sizes) * Side effects: May kill connection on error. */ int -pop_retrieve (server, message, markfrom, msg_buf) - popserver server; - int message; - int markfrom; - char **msg_buf; +pop_retrieve (popserver server, int message, int markfrom, char **msg_buf) { int *IDs, *sizes, bufsize, fromcount = 0, cp = 0; char *ptr, *fromserver; @@ -637,10 +622,7 @@ pop_retrieve (server, message, markfrom, msg_buf) } int -pop_retrieve_first (server, message, response) - popserver server; - int message; - char **response; +pop_retrieve_first (popserver server, int message, char **response) { sprintf (pop_error, "RETR %d", message); return (pop_multi_first (server, pop_error, response)); @@ -655,25 +637,19 @@ pop_retrieve_first (server, message, response) */ int -pop_retrieve_next (server, line) - popserver server; - char **line; +pop_retrieve_next (popserver server, char **line) { return (pop_multi_next (server, line)); } int -pop_retrieve_flush (server) - popserver server; +pop_retrieve_flush (popserver server) { return (pop_multi_flush (server)); } int -pop_top_first (server, message, lines, response) - popserver server; - int message, lines; - char **response; +pop_top_first (popserver server, int message, int lines, char **response) { sprintf (pop_error, "TOP %d %d", message, lines); return (pop_multi_first (server, pop_error, response)); @@ -688,25 +664,19 @@ pop_top_first (server, message, lines, response) */ int -pop_top_next (server, line) - popserver server; - char **line; +pop_top_next (popserver server, char **line) { return (pop_multi_next (server, line)); } int -pop_top_flush (server) - popserver server; +pop_top_flush (popserver server) { return (pop_multi_flush (server)); } int -pop_multi_first (server, command, response) - popserver server; - char *command; - char **response; +pop_multi_first (popserver server, char *command, char **response) { if (server->in_multi) { @@ -749,9 +719,7 @@ pop_multi_first (server, command, response) 0, LINE is set to null. */ int -pop_multi_next (server, line) - popserver server; - char **line; +pop_multi_next (popserver server, char **line) { char *fromserver; int ret; @@ -789,8 +757,7 @@ pop_multi_next (server, line) } int -pop_multi_flush (server) - popserver server; +pop_multi_flush (popserver server) { char *line; int ret; @@ -821,9 +788,7 @@ pop_multi_flush (server) * otherwise. */ int -pop_delete (server, message) - popserver server; - int message; +pop_delete (popserver server, int message) { if (server->in_multi) { @@ -853,8 +818,7 @@ pop_delete (server, message) * Side effects: Closes connection on error. */ int -pop_noop (server) - popserver server; +pop_noop (popserver server) { if (server->in_multi) { @@ -883,8 +847,7 @@ pop_noop (server) * Side effects: Closes the connection on error. */ int -pop_last (server) - popserver server; +pop_last (popserver server) { char *fromserver; @@ -941,8 +904,7 @@ pop_last (server) * Side effects: Closes the connection on error. */ int -pop_reset (server) - popserver server; +pop_reset (popserver server) { if (pop_retrieve_flush (server)) { @@ -970,8 +932,7 @@ pop_reset (server) * function is called, even if an error occurs. */ int -pop_quit (server) - popserver server; +pop_quit (popserver server) { int ret = 0; @@ -1015,9 +976,7 @@ static int have_winsock = 0; * into pop_error. */ static int -socket_connection (host, flags) - char *host; - int flags; +socket_connection (char *host, int flags) { #ifdef HAVE_GETADDRINFO struct addrinfo *res, *it; @@ -1327,9 +1286,7 @@ socket_connection (host, flags) * THE RETURNED LINE MAY CONTAIN EMBEDDED NULLS! */ static int -pop_getline (server, line) - popserver server; - char **line; +pop_getline (popserver server, char **line) { #define GETLINE_ERROR "Error reading from server: " @@ -1459,9 +1416,7 @@ pop_getline (server, line) * Side effects: Closes the connection on error. */ static int -sendline (server, line) - popserver server; - char *line; +sendline (popserver server, char *line) { #define SENDLINE_ERROR "Error writing to POP server: " int ret; @@ -1508,10 +1463,7 @@ sendline (server, line) * Return value: Same as write. Pop_error is not set. */ static int -fullwrite (fd, buf, nbytes) - int fd; - char *buf; - int nbytes; +fullwrite (int fd, char *buf, int nbytes) { char *cp; int ret = 0; @@ -1541,8 +1493,7 @@ fullwrite (fd, buf, nbytes) * Side effects: On failure, may make the connection unusable. */ static int -getok (server) - popserver server; +getok (popserver server) { char *fromline; @@ -1613,8 +1564,7 @@ gettermination (server) * since the last pop_reset) may be lost. */ void -pop_close (server) - popserver server; +pop_close (popserver server) { pop_trash (server); free ((char *) server); @@ -1630,8 +1580,7 @@ pop_close (server) * pop_close or pop_quit after this function has been called. */ static void -pop_trash (server) - popserver server; +pop_trash (popserver server) { if (server->file >= 0) { @@ -1663,9 +1612,7 @@ pop_trash (server) null, or 0 if it does not contain one. */ static char * -find_crlf (in_string, len) - char *in_string; - int len; +find_crlf (char *in_string, int len) { while (len--) { |