From 0d7fdc0ef49f92c2ae20e13b172fc5ccc81f36f7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Feb 2011 10:37:35 -0800 Subject: [PATCH] * movemail.c: (DIRECTORY_SEP, IS_DIRECTORY_SEP, DONE, IS_FROM_LINE): Remove unused macros. * pop.c (index): Remove unused macro. (KPOP_PORT): Define only if KERBEROS is defined. --- lib-src/ChangeLog | 4 ++++ lib-src/movemail.c | 15 --------------- lib-src/pop.c | 3 +-- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f2f2c0af1c..53983a9dec 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -2,6 +2,10 @@ * movemail.c (main, pop_retr): Rename locals to avoid shadowing. (progname, sfi, sfo, ibuffer, obuffer): Remove unused vars. + (DIRECTORY_SEP, IS_DIRECTORY_SEP, DONE, IS_FROM_LINE): + Remove unused macros. + * pop.c (index): Remove unused macro. + (KPOP_PORT): Define only if KERBEROS is defined. Declare file-scope functions and variables static if not exported. This is more consistent, and is nicer with gcc -Wstrict-prototypes. diff --git a/lib-src/movemail.c b/lib-src/movemail.c index bb93d84d89..a5084f27f2 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -80,13 +80,6 @@ along with GNU Emacs. If not, see . */ #undef access #endif /* MSDOS */ -#ifndef DIRECTORY_SEP -#define DIRECTORY_SEP '/' -#endif -#ifndef IS_DIRECTORY_SEP -#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) -#endif - #ifdef WINDOWSNT #include "ntlib.h" #undef access @@ -670,7 +663,6 @@ xmalloc (unsigned int size) #define NOTOK (-1) #define OK 0 -#define DONE 1 static char Errmsg[200]; /* POP errors, at least, can exceed the original length of 80. */ @@ -855,13 +847,6 @@ pop_retr (popserver server, int msgno, FILE *arg) return (OK); } -/* Do this as a macro instead of using strcmp to save on execution time. */ -#define IS_FROM_LINE(a) ((a[0] == 'F') \ - && (a[1] == 'r') \ - && (a[2] == 'o') \ - && (a[3] == 'm') \ - && (a[4] == ' ')) - static int mbx_write (char *line, int len, FILE *mbf) { diff --git a/lib-src/pop.c b/lib-src/pop.c index a3fda09d44..159926e97b 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -67,7 +67,6 @@ extern struct servent *hes_getservbyname (/* char *, char * */); #include #ifdef STDC_HEADERS #include -#define index strchr #endif #include @@ -122,9 +121,9 @@ static char *find_crlf (char *, int); to be bigger than the original value of 80 */ #define POP_PORT 110 -#define KPOP_PORT 1109 #define POP_SERVICE "pop3" /* we don't want the POP2 port! */ #ifdef KERBEROS +#define KPOP_PORT 1109 #define KPOP_SERVICE "kpop" /* never used: look for 20060515 to see why */ #endif -- 2.20.1