/[pcre]/code/tags/pcre-8.01/pcre_newline.c
ViewVC logotype

Diff of /code/tags/pcre-8.01/pcre_newline.c

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

revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC revision 409 by ph10, Sat Mar 28 17:10:56 2009 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2007 University of Cambridge             Copyright (c) 1997-2009 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 48  http://unicode.org/unicode/reports/tr18/ Line 48  http://unicode.org/unicode/reports/tr18/
48    
49    
50  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
51  #include <config.h>  #include "config.h"
52  #endif  #endif
53    
54  #include "pcre_internal.h"  #include "pcre_internal.h"
# Line 73  Returns: TRUE or FALSE Line 73  Returns: TRUE or FALSE
73  */  */
74    
75  BOOL  BOOL
76  _pcre_is_newline(const uschar *ptr, int type, const uschar *endptr,  _pcre_is_newline(USPTR ptr, int type, USPTR endptr, int *lenptr, BOOL utf8)
   int *lenptr, BOOL utf8)  
77  {  {
78  int c;  int c;
79  if (utf8) { GETCHAR(c, ptr); } else c = *ptr;  if (utf8) { GETCHAR(c, ptr); } else c = *ptr;
# Line 123  Returns: TRUE or FALSE Line 122  Returns: TRUE or FALSE
122  */  */
123    
124  BOOL  BOOL
125  _pcre_was_newline(const uschar *ptr, int type, const uschar *startptr,  _pcre_was_newline(USPTR ptr, int type, USPTR startptr, int *lenptr, BOOL utf8)
   int *lenptr, BOOL utf8)  
126  {  {
127  int c;  int c;
128  ptr--;  ptr--;
129    #ifdef SUPPORT_UTF8
130  if (utf8)  if (utf8)
131    {    {
132    BACKCHAR(ptr);    BACKCHAR(ptr);
133    GETCHAR(c, ptr);    GETCHAR(c, ptr);
134    }    }
135  else c = *ptr;  else c = *ptr;
136    #else   /* no UTF-8 support */
137    c = *ptr;
138    #endif  /* SUPPORT_UTF8 */
139    
140  if (type == NLTYPE_ANYCRLF) switch(c)  if (type == NLTYPE_ANYCRLF) switch(c)
141    {    {

Legend:
Removed from v.200  
changed lines
  Added in v.409

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12