Mercurial > hg > xemacs-beta
comparison src/regex.c @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | a4f53d9b3154 |
children | 6240c7796c7a |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
4855 { | 4855 { |
4856 lowest_active_reg = NO_LOWEST_ACTIVE_REG; | 4856 lowest_active_reg = NO_LOWEST_ACTIVE_REG; |
4857 highest_active_reg = NO_HIGHEST_ACTIVE_REG; | 4857 highest_active_reg = NO_HIGHEST_ACTIVE_REG; |
4858 } | 4858 } |
4859 else | 4859 else |
4860 { | 4860 highest_active_reg = r; |
4861 highest_active_reg = r; | 4861 } |
4862 | |
4863 /* 98/9/21 jhod: We've also gotta set lowest_active_reg, don't we? */ | |
4864 r = 1; | |
4865 while (r < highest_active_reg && !IS_ACTIVE(reg_info[r])) | |
4866 r++; | |
4867 lowest_active_reg = r; | |
4868 } | |
4869 } | |
4870 | 4862 |
4871 /* If just failed to match something this time around with a | 4863 /* If just failed to match something this time around with a |
4872 group that's operated on by a repetition operator, try to | 4864 group that's operated on by a repetition operator, try to |
4873 force exit from the ``loop'', and restore the register | 4865 force exit from the ``loop'', and restore the register |
4874 information for this group that we had before trying this | 4866 information for this group that we had before trying this |
5497 } | 5489 } |
5498 | 5490 |
5499 #ifdef emacs | 5491 #ifdef emacs |
5500 case before_dot: | 5492 case before_dot: |
5501 DEBUG_PRINT1 ("EXECUTING before_dot.\n"); | 5493 DEBUG_PRINT1 ("EXECUTING before_dot.\n"); |
5502 if (!regex_emacs_buffer_p | 5494 if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) >= |
5503 || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) | 5495 BUF_PT (regex_emacs_buffer)) |
5504 >= BUF_PT (regex_emacs_buffer))) | |
5505 goto fail; | 5496 goto fail; |
5506 break; | 5497 break; |
5507 | 5498 |
5508 case at_dot: | 5499 case at_dot: |
5509 DEBUG_PRINT1 ("EXECUTING at_dot.\n"); | 5500 DEBUG_PRINT1 ("EXECUTING at_dot.\n"); |
5510 if (!regex_emacs_buffer_p | 5501 if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) |
5511 || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) | 5502 != BUF_PT (regex_emacs_buffer)) |
5512 != BUF_PT (regex_emacs_buffer))) | |
5513 goto fail; | 5503 goto fail; |
5514 break; | 5504 break; |
5515 | 5505 |
5516 case after_dot: | 5506 case after_dot: |
5517 DEBUG_PRINT1 ("EXECUTING after_dot.\n"); | 5507 DEBUG_PRINT1 ("EXECUTING after_dot.\n"); |
5518 if (!regex_emacs_buffer_p | 5508 if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) |
5519 || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) | 5509 <= BUF_PT (regex_emacs_buffer)) |
5520 <= BUF_PT (regex_emacs_buffer))) | |
5521 goto fail; | 5510 goto fail; |
5522 break; | 5511 break; |
5523 #if 0 /* not emacs19 */ | 5512 #if 0 /* not emacs19 */ |
5524 case at_dot: | 5513 case at_dot: |
5525 DEBUG_PRINT1 ("EXECUTING at_dot.\n"); | 5514 DEBUG_PRINT1 ("EXECUTING at_dot.\n"); |