summaryrefslogtreecommitdiff
path: root/procmail/procmail-getline.patch
blob: a62ed8abdd430d91875d5f10376304da9f50406c (plain)
    1 diff -Nru procmail-3.22.orig/src/fields.c procmail-3.22/src/fields.c
    2 --- procmail-3.22.orig/src/fields.c	2009-05-15 21:59:51.768416278 +0200
    3 +++ procmail-3.22/src/fields.c	2009-05-15 22:00:58.128416259 +0200
    4 @@ -110,16 +110,16 @@
    5  		    /* try and append one valid field to rdheader from stdin */
    6  int readhead P((void))
    7  { int idlen;
    8 -  getline();
    9 +  get_line();
   10    if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
   11       return 0;
   12    if(idlen==STRLEN(FROM)&&eqFrom_(buf))			/* it's a From_ line */
   13     { if(rdheader)
   14  	return 0;			       /* the From_ line was a fake! */
   15 -     for(;buflast=='>';getline());	    /* gather continued >From_ lines */
   16 +     for(;buflast=='>';get_line());	    /* gather continued >From_ lines */
   17     }
   18    else
   19 -     for(;;getline())		      /* get the rest of the continued field */
   20 +     for(;;get_line())		      /* get the rest of the continued field */
   21        { switch(buflast)			     /* will this line be continued? */
   22  	 { case ' ':case '\t':				  /* yep, it sure is */
   23  	      continue;
   24 diff -Nru procmail-3.22.orig/src/formail.c procmail-3.22/src/formail.c
   25 --- procmail-3.22.orig/src/formail.c	2009-05-15 21:59:51.768416278 +0200
   26 +++ procmail-3.22/src/formail.c	2009-05-15 22:01:23.778416754 +0200
   27 @@ -819,7 +819,7 @@
   28        { if(split)		       /* gobble up the next start separator */
   29  	 { buffilled=0;
   30  #ifdef sMAILBOX_SEPARATOR
   31 -	   getline();buffilled=0;		 /* but only if it's defined */
   32 +	   get_line();buffilled=0;		 /* but only if it's defined */
   33  #endif
   34  	   if(buflast!=EOF)					   /* if any */
   35  	      goto splitit;
   36 diff -Nru procmail-3.22.orig/src/formisc.c procmail-3.22/src/formisc.c
   37 --- procmail-3.22.orig/src/formisc.c	2009-05-15 21:59:51.768416278 +0200
   38 +++ procmail-3.22/src/formisc.c	2009-05-15 22:02:00.538416155 +0200
   39 @@ -115,7 +115,7 @@
   40    buf[buffilled++]=c;
   41  }
   42  
   43 -int getline P((void))			   /* read a newline-terminated line */
   44 +int get_line P((void))			   /* read a newline-terminated line */
   45  { if(buflast==EOF)			 /* at the end of our Latin already? */
   46     { loadchar('\n');					  /* fake empty line */
   47       return EOF;					  /* spread the word */
   48 diff -Nru procmail-3.22.orig/src/formisc.h procmail-3.22/src/formisc.h
   49 --- procmail-3.22.orig/src/formisc.h	2009-05-15 21:59:51.768416278 +0200
   50 +++ procmail-3.22/src/formisc.h	2009-05-15 22:02:12.028416164 +0200
   51 @@ -17,4 +17,4 @@
   52  char*
   53   skipwords P((char*start));
   54  int
   55 - getline P((void));
   56 + get_line P((void));

Generated by cgit