comparison lib-src/movemail.c @ 331:c9ae480b1fff r21-0-63

Import from CVS: tag r21-0-63
author cvs
date Mon, 13 Aug 2007 10:49:07 +0200
parents 19dcec799385
children cc15677e0335
comparison
equal deleted inserted replaced
330:a33651c9de0e 331:c9ae480b1fff
66 #include <stdlib.h> 66 #include <stdlib.h>
67 #include <string.h> 67 #include <string.h>
68 #include "getopt.h" 68 #include "getopt.h"
69 #ifdef MAIL_USE_POP 69 #ifdef MAIL_USE_POP
70 #include "pop.h" 70 #include "pop.h"
71 #include <regex.h> 71 #include "../src/regex.h"
72 #endif 72 #endif
73 73
74 extern char *optarg; 74 extern char *optarg;
75 extern int optind, opterr; 75 extern int optind, opterr;
76 76
77 #ifndef HAVE_STRERROR 77 #ifndef HAVE_STRERROR
78 static char * strerror (int errnum); 78 char * strerror (int errnum);
79 #endif /* HAVE_STRERROR */ 79 #endif /* HAVE_STRERROR */
80 80
81 #ifdef MSDOS 81 #ifdef MSDOS
82 #undef access 82 #undef access
83 #endif /* MSDOS */ 83 #endif /* MSDOS */
845 } 845 }
846 846
847 /* Turn a name, which is an ed-style (but Emacs syntax) regular 847 /* Turn a name, which is an ed-style (but Emacs syntax) regular
848 expression, into a real regular expression by compiling it. */ 848 expression, into a real regular expression by compiling it. */
849 static struct re_pattern_buffer* 849 static struct re_pattern_buffer*
850 compile_regex (char* regexp_pattern) 850 compile_regex (char* pattern)
851 { 851 {
852 char *err; 852 char *err;
853 struct re_pattern_buffer *patbuf=0; 853 struct re_pattern_buffer *patbuf=0;
854 854
855 patbuf = (struct re_pattern_buffer*) xmalloc (sizeof (struct re_pattern_buffer)); 855 patbuf = (struct re_pattern_buffer*) xmalloc (sizeof (struct re_pattern_buffer));
856 patbuf->translate = NULL; 856 patbuf->translate = NULL;
857 patbuf->fastmap = NULL; 857 patbuf->fastmap = NULL;
858 patbuf->buffer = NULL; 858 patbuf->buffer = NULL;
859 patbuf->allocated = 0; 859 patbuf->allocated = 0;
860 860
861 err = (char*) re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf); 861 err = (char*) re_compile_pattern (pattern, strlen (pattern), patbuf);
862 if (err != NULL) 862 if (err != NULL)
863 { 863 {
864 error ("%s while compiling pattern", err, NULL); 864 error ("%s while compiling pattern", err, NULL);
865 return 0; 865 return 0;
866 } 866 }
871 871
872 872
873 #endif /* MAIL_USE_POP */ 873 #endif /* MAIL_USE_POP */
874 874
875 #ifndef HAVE_STRERROR 875 #ifndef HAVE_STRERROR
876 static char * 876 char *
877 strerror (int errnum) 877 strerror (int errnum)
878 { 878 {
879 extern char *sys_errlist[]; 879 extern char *sys_errlist[];
880 extern int sys_nerr; 880 extern int sys_nerr;
881 881