comparison lib-src/movemail.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents d883f39b8495
children bbff43aa5eb7
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
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
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 }