comparison lib-src/movemail.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
148 static char *concat (char *, char *, char *); 148 static char *concat (char *, char *, char *);
149 static long *xmalloc (unsigned int); 149 static long *xmalloc (unsigned int);
150 #ifdef MAIL_USE_POP 150 #ifdef MAIL_USE_POP
151 static int popmail (char *, char *, char *); 151 static int popmail (char *, char *, char *);
152 static int pop_retr (popserver server, int msgno, 152 static int pop_retr (popserver server, int msgno,
153 int (*action)(char *, FILE *), void *arg); 153 int (*action)(char *, FILE *), FILE *arg);
154 static int mbx_write (char *, FILE *); 154 static int mbx_write (char *, FILE *);
155 static int mbx_delimit_begin (FILE *); 155 static int mbx_delimit_begin (FILE *);
156 static int mbx_delimit_end (FILE *); 156 static int mbx_delimit_end (FILE *);
157 static struct re_pattern_buffer* compile_regex (char* regexp_pattern); 157 static struct re_pattern_buffer* compile_regex (char* regexp_pattern);
158 static int pop_search_top (popserver server, int msgno, int lines, 158 static int pop_search_top (popserver server, int msgno, int lines,
769 pop_close (server); 769 pop_close (server);
770 error ("Error in open: %s, %s", strerror (errno), outfile); 770 error ("Error in open: %s, %s", strerror (errno), outfile);
771 return (1); 771 return (1);
772 } 772 }
773 #if !defined(__CYGWIN32__) && !defined(WINDOWSNT) 773 #if !defined(__CYGWIN32__) && !defined(WINDOWSNT)
774 fchown (mbfi, getuid (), -1); 774 fchown (mbfi, getuid (), (gid_t) -1);
775 #endif 775 #endif
776 776
777 if ((mbf = fdopen (mbfi, "wb")) == NULL) 777 if ((mbf = fdopen (mbfi, "wb")) == NULL)
778 { 778 {
779 pop_close (server); 779 pop_close (server);
861 861
862 return (0); 862 return (0);
863 } 863 }
864 864
865 static int 865 static int
866 pop_retr (popserver server, int msgno, int (*action)(char *, FILE *), void *arg) 866 pop_retr (popserver server, int msgno, int (*action)(char *, FILE *), FILE *arg)
867 { 867 {
868 char *line; 868 char *line;
869 int ret; 869 int ret;
870 870
871 if (pop_retrieve_first (server, msgno, &line)) 871 if (pop_retrieve_first (server, msgno, &line))