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-2006 University of Cambridge |
Copyright (c) 1997-2007 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 |
2308 |
{ |
{ |
2309 |
while (current_subject <= end_subject && !WAS_NEWLINE(current_subject)) |
while (current_subject <= end_subject && !WAS_NEWLINE(current_subject)) |
2310 |
current_subject++; |
current_subject++; |
2311 |
|
|
2312 |
|
/* If we have just passed a CR and the newline option is ANY, and we |
2313 |
|
are now at a LF, advance the match position by one more character. */ |
2314 |
|
|
2315 |
|
if (current_subject[-1] == '\r' && |
2316 |
|
md->nltype == NLTYPE_ANY && |
2317 |
|
current_subject < end_subject && |
2318 |
|
*current_subject == '\n') |
2319 |
|
current_subject++; |
2320 |
} |
} |
2321 |
} |
} |
2322 |
|
|