/[pcre]/code/trunk/pcregrep.c
ViewVC logotype

Diff of /code/trunk/pcregrep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 149 by ph10, Mon Apr 16 15:28:08 2007 UTC revision 150 by ph10, Tue Apr 17 08:22:40 2007 UTC
# Line 580  switch(endlinetype) Line 580  switch(endlinetype)
580          }          }
581        else *lenptr = 1;        else *lenptr = 1;
582        return p;        return p;
583    
584        default:        default:
585        break;        break;
586        }        }
587      }   /* End of loop for ANYCRLF case */      }   /* End of loop for ANYCRLF case */
588    
589    *lenptr = 0;  /* Must have hit the end */    *lenptr = 0;  /* Must have hit the end */
590    return endptr;    return endptr;
591    
# Line 687  switch(endlinetype) Line 687  switch(endlinetype)
687    return p;   /* But control should never get here */    return p;   /* But control should never get here */
688    
689    case EL_ANY:    case EL_ANY:
690    case EL_ANYCRLF:    case EL_ANYCRLF:
691    if (*(--p) == '\n' && p > startptr && p[-1] == '\r') p--;    if (*(--p) == '\n' && p > startptr && p[-1] == '\r') p--;
692    if (utf8) while ((*p & 0xc0) == 0x80) p--;    if (utf8) while ((*p & 0xc0) == 0x80) p--;
693    
# Line 721  switch(endlinetype) Line 721  switch(endlinetype)
721        case 0x0a:    /* LF */        case 0x0a:    /* LF */
722        case 0x0d:    /* CR */        case 0x0d:    /* CR */
723        return p;        return p;
724    
725        default:        default:
726        break;        break;
727        }        }
728    
729      else switch (c)      else switch (c)
730        {        {
# Line 1567  switch(i) Line 1567  switch(i)
1567    case '\r':               newline = (char *)"cr"; break;    case '\r':               newline = (char *)"cr"; break;
1568    case ('\r' << 8) | '\n': newline = (char *)"crlf"; break;    case ('\r' << 8) | '\n': newline = (char *)"crlf"; break;
1569    case -1:                 newline = (char *)"any"; break;    case -1:                 newline = (char *)"any"; break;
1570    case -2:                 newline = (char *)"anycrlf"; break;    case -2:                 newline = (char *)"anycrlf"; break;
1571    }    }
1572    
1573  /* Process the options */  /* Process the options */

Legend:
Removed from v.149  
changed lines
  Added in v.150

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12