components/procmail/patches/procmail-3.22-getline.patch
changeset 1069 415af38929a1
parent 1068 0b7caaf07429
child 1070 4d3fe3655339
equal deleted inserted replaced
1068:0b7caaf07429 1069:415af38929a1
     1 diff -up procmail-3.22/src/fields.c.getline procmail-3.22/src/fields.c
       
     2 --- procmail-3.22/src/fields.c.getline	2001-09-11 06:57:08.000000000 +0200
       
     3 +++ procmail-3.22/src/fields.c	2009-06-30 16:10:36.000000000 +0200
       
     4 @@ -110,16 +110,16 @@ void dispfield(p)register const struct f
       
     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 -up procmail-3.22/src/formail.c.getline procmail-3.22/src/formail.c
       
    25 --- procmail-3.22/src/formail.c.getline	2009-06-30 16:00:40.000000000 +0200
       
    26 +++ procmail-3.22/src/formail.c	2009-06-30 16:10:49.000000000 +0200
       
    27 @@ -819,7 +819,7 @@ splitit:       { if(!lnl)   /* did the p
       
    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 -up procmail-3.22/src/formisc.c.getline procmail-3.22/src/formisc.c
       
    37 --- procmail-3.22/src/formisc.c.getline	2001-06-29 04:20:45.000000000 +0200
       
    38 +++ procmail-3.22/src/formisc.c	2009-06-30 16:12:20.000000000 +0200
       
    39 @@ -115,7 +115,7 @@ void loadchar(c)const int c;		      /* a
       
    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 -up procmail-3.22/src/formisc.h.getline procmail-3.22/src/formisc.h
       
    49 --- procmail-3.22/src/formisc.h.getline	1999-04-19 08:42:15.000000000 +0200
       
    50 +++ procmail-3.22/src/formisc.h	2009-06-30 16:10:02.000000000 +0200
       
    51 @@ -17,4 +17,4 @@ void
       
    52  char*
       
    53   skipwords P((char*start));
       
    54  int
       
    55 - getline P((void));
       
    56 + get_line P((void));