Mercurial > emacs
diff lib-src/pop.c @ 109111:52b76722152a
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.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 02 Jul 2010 17:50:23 -0700 |
parents | 1dc371b29285 |
children | 750db9f3e6d8 |
line wrap: on
line diff
--- a/lib-src/pop.c Sat Jul 03 01:35:09 2010 +0300 +++ b/lib-src/pop.c Fri Jul 02 17:50:23 2010 -0700 @@ -166,11 +166,7 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ } 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 @@ */ 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 @@ */ 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 @@ 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 @@ } int -pop_multi_flush (server) - popserver server; +pop_multi_flush (popserver server) { char *line; int ret; @@ -821,9 +788,7 @@ * otherwise. */ int -pop_delete (server, message) - popserver server; - int message; +pop_delete (popserver server, int message) { if (server->in_multi) { @@ -853,8 +818,7 @@ * Side effects: Closes connection on error. */ int -pop_noop (server) - popserver server; +pop_noop (popserver server) { if (server->in_multi) { @@ -883,8 +847,7 @@ * Side effects: Closes the connection on error. */ int -pop_last (server) - popserver server; +pop_last (popserver server) { char *fromserver; @@ -941,8 +904,7 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * Side effects: On failure, may make the connection unusable. */ static int -getok (server) - popserver server; +getok (popserver server) { char *fromline; @@ -1613,8 +1564,7 @@ * 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 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 @@ 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--) {