comparison src/regex.c @ 5934:e2fae7783046 cygwin

lots of use of EMACS_INT, a few others, to eliminate all pointer truncation warnings
author Henry Thompson <ht@markup.co.uk>
date Sat, 12 Dec 2015 19:08:46 +0000
parents 8a2ac78cb97d
children 574f0cded429
comparison
equal deleted inserted replaced
5933:c1e8f3294298 5934:e2fae7783046
818 } 818 }
819 819
820 /* Loop over pattern commands. */ 820 /* Loop over pattern commands. */
821 while (p < pend) 821 while (p < pend)
822 { 822 {
823 printf ("%ld:\t", (long)(p - start)); 823 printf ("%Id:\t", (EMACS_INT)(p - start));
824 824
825 switch ((re_opcode_t) *p++) 825 switch ((re_opcode_t) *p++)
826 { 826 {
827 case no_op: 827 case no_op:
828 printf ("/no_op"); 828 printf ("/no_op");
917 unified_range_table_get_range (p, i, &first, &last, 917 unified_range_table_get_range (p, i, &first, &last,
918 &dummy_val); 918 &dummy_val);
919 if (first < 0x80) 919 if (first < 0x80)
920 putchar (first); 920 putchar (first);
921 else 921 else
922 printf ("(0x%lx)", (long)first); 922 printf ("(0x%Ix)", (EMACS_INT)first);
923 if (first != last) 923 if (first != last)
924 { 924 {
925 putchar ('-'); 925 putchar ('-');
926 if (last < 0x80) 926 if (last < 0x80)
927 putchar (last); 927 putchar (last);
928 else 928 else
929 printf ("(0x%lx)", (long)last); 929 printf ("(0x%Ix)", (EMACS_INT)last);
930 } 930 }
931 } 931 }
932 putchar (']'); 932 putchar (']');
933 p += unified_range_table_bytes_used (p); 933 p += unified_range_table_bytes_used (p);
934 } 934 }
943 printf ("/endline"); 943 printf ("/endline");
944 break; 944 break;
945 945
946 case on_failure_jump: 946 case on_failure_jump:
947 extract_number_and_incr (&mcnt, &p); 947 extract_number_and_incr (&mcnt, &p);
948 printf ("/on_failure_jump to %ld", (long)(p + mcnt - start)); 948 printf ("/on_failure_jump to %Id", (EMACS_INT)(p + mcnt - start));
949 break; 949 break;
950 950
951 case on_failure_keep_string_jump: 951 case on_failure_keep_string_jump:
952 extract_number_and_incr (&mcnt, &p); 952 extract_number_and_incr (&mcnt, &p);
953 printf ("/on_failure_keep_string_jump to %ld", (long)(p + mcnt - start)); 953 printf ("/on_failure_keep_string_jump to %Id", (EMACS_INT)(p + mcnt - start));
954 break; 954 break;
955 955
956 case dummy_failure_jump: 956 case dummy_failure_jump:
957 extract_number_and_incr (&mcnt, &p); 957 extract_number_and_incr (&mcnt, &p);
958 printf ("/dummy_failure_jump to %ld", (long)(p + mcnt - start)); 958 printf ("/dummy_failure_jump to %Id", (EMACS_INT)(p + mcnt - start));
959 break; 959 break;
960 960
961 case push_dummy_failure: 961 case push_dummy_failure:
962 printf ("/push_dummy_failure"); 962 printf ("/push_dummy_failure");
963 break; 963 break;
964 964
965 case maybe_pop_jump: 965 case maybe_pop_jump:
966 extract_number_and_incr (&mcnt, &p); 966 extract_number_and_incr (&mcnt, &p);
967 printf ("/maybe_pop_jump to %ld", (long)(p + mcnt - start)); 967 printf ("/maybe_pop_jump to %Id", (EMACS_INT)(p + mcnt - start));
968 break; 968 break;
969 969
970 case pop_failure_jump: 970 case pop_failure_jump:
971 extract_number_and_incr (&mcnt, &p); 971 extract_number_and_incr (&mcnt, &p);
972 printf ("/pop_failure_jump to %ld", (long)(p + mcnt - start)); 972 printf ("/pop_failure_jump to %Id", (EMACS_INT)(p + mcnt - start));
973 break; 973 break;
974 974
975 case jump_past_alt: 975 case jump_past_alt:
976 extract_number_and_incr (&mcnt, &p); 976 extract_number_and_incr (&mcnt, &p);
977 printf ("/jump_past_alt to %ld", (long)(p + mcnt - start)); 977 printf ("/jump_past_alt to %Id", (EMACS_INT)(p + mcnt - start));
978 break; 978 break;
979 979
980 case jump: 980 case jump:
981 extract_number_and_incr (&mcnt, &p); 981 extract_number_and_incr (&mcnt, &p);
982 printf ("/jump to %ld", (long)(p + mcnt - start)); 982 printf ("/jump to %Id", (EMACS_INT)(p + mcnt - start));
983 break; 983 break;
984 984
985 case succeed_n: 985 case succeed_n:
986 extract_number_and_incr (&mcnt, &p); 986 extract_number_and_incr (&mcnt, &p);
987 extract_number_and_incr (&mcnt2, &p); 987 extract_number_and_incr (&mcnt2, &p);
988 printf ("/succeed_n to %ld, %d times", (long)(p + mcnt - start), mcnt2); 988 printf ("/succeed_n to %Id, %d times", (EMACS_INT)(p + mcnt - start), mcnt2);
989 break; 989 break;
990 990
991 case jump_n: 991 case jump_n:
992 extract_number_and_incr (&mcnt, &p); 992 extract_number_and_incr (&mcnt, &p);
993 extract_number_and_incr (&mcnt2, &p); 993 extract_number_and_incr (&mcnt2, &p);
994 printf ("/jump_n to %ld, %d times", (long)(p + mcnt - start), mcnt2); 994 printf ("/jump_n to %Id, %d times", (EMACS_INT)(p + mcnt - start), mcnt2);
995 break; 995 break;
996 996
997 case set_number_at: 997 case set_number_at:
998 extract_number_and_incr (&mcnt, &p); 998 extract_number_and_incr (&mcnt, &p);
999 extract_number_and_incr (&mcnt2, &p); 999 extract_number_and_incr (&mcnt2, &p);
1000 printf ("/set_number_at location %ld to %d", (long)(p + mcnt - start), mcnt2); 1000 printf ("/set_number_at location %Id to %d", (EMACS_INT)(p + mcnt - start), mcnt2);
1001 break; 1001 break;
1002 1002
1003 case wordbound: 1003 case wordbound:
1004 printf ("/wordbound"); 1004 printf ("/wordbound");
1005 break; 1005 break;
1078 } 1078 }
1079 1079
1080 putchar ('\n'); 1080 putchar ('\n');
1081 } 1081 }
1082 1082
1083 printf ("%ld:\tend of pattern.\n", (long)(p - start)); 1083 printf ("%Id:\tend of pattern.\n", (EMACS_INT)(p - start));
1084 } 1084 }
1085 1085
1086 1086
1087 static void 1087 static void
1088 print_compiled_pattern (struct re_pattern_buffer *bufp) 1088 print_compiled_pattern (struct re_pattern_buffer *bufp)
1097 { 1097 {
1098 printf ("fastmap: "); 1098 printf ("fastmap: ");
1099 print_fastmap (bufp->fastmap); 1099 print_fastmap (bufp->fastmap);
1100 } 1100 }
1101 1101
1102 printf ("re_nsub: %ld\t", (long)bufp->re_nsub); 1102 printf ("re_nsub: %Id\t", (EMACS_INT)bufp->re_nsub);
1103 printf ("re_ngroups: %ld\t", (long)bufp->re_ngroups); 1103 printf ("re_ngroups: %Id\t", (EMACS_INT)bufp->re_ngroups);
1104 printf ("regs_alloc: %d\t", bufp->regs_allocated); 1104 printf ("regs_alloc: %d\t", bufp->regs_allocated);
1105 printf ("can_be_null: %d\t", bufp->can_be_null); 1105 printf ("can_be_null: %d\t", bufp->can_be_null);
1106 printf ("newline_anchor: %d\n", bufp->newline_anchor); 1106 printf ("newline_anchor: %d\n", bufp->newline_anchor);
1107 printf ("no_sub: %d\t", bufp->no_sub); 1107 printf ("no_sub: %d\t", bufp->no_sub);
1108 printf ("not_bol: %d\t", bufp->not_bol); 1108 printf ("not_bol: %d\t", bufp->not_bol);
1562 int this_reg; \ 1562 int this_reg; \
1563 \ 1563 \
1564 DEBUG_STATEMENT (failure_id++); \ 1564 DEBUG_STATEMENT (failure_id++); \
1565 DEBUG_STATEMENT (nfailure_points_pushed++); \ 1565 DEBUG_STATEMENT (nfailure_points_pushed++); \
1566 DEBUG_FAIL_PRINT2 ("\nPUSH_FAILURE_POINT #%d:\n", failure_id); \ 1566 DEBUG_FAIL_PRINT2 ("\nPUSH_FAILURE_POINT #%d:\n", failure_id); \
1567 DEBUG_FAIL_PRINT2 (" Before push, next avail: %ld\n", \ 1567 DEBUG_FAIL_PRINT2 (" Before push, next avail: %Id\n", \
1568 (long) (fail_stack).avail); \ 1568 (EMACS_INT) (fail_stack).avail); \
1569 DEBUG_FAIL_PRINT2 (" size: %ld\n", \ 1569 DEBUG_FAIL_PRINT2 (" size: %Id\n", \
1570 (long) (fail_stack).size); \ 1570 (EMACS_INT) (fail_stack).size); \
1571 \ 1571 \
1572 DEBUG_FAIL_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \ 1572 DEBUG_FAIL_PRINT2 (" slots needed: %d\n", NUM_FAILURE_ITEMS); \
1573 DEBUG_FAIL_PRINT2 (" available: %ld\n", \ 1573 DEBUG_FAIL_PRINT2 (" available: %Id\n", \
1574 (long) REMAINING_AVAIL_SLOTS); \ 1574 (EMACS_INT) REMAINING_AVAIL_SLOTS); \
1575 \ 1575 \
1576 /* Ensure we have enough space allocated for what we will push. */ \ 1576 /* Ensure we have enough space allocated for what we will push. */ \
1577 while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ 1577 while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
1578 { \ 1578 { \
1579 BEGIN_REGEX_MALLOC_OK (); \ 1579 BEGIN_REGEX_MALLOC_OK (); \
1582 END_REGEX_MALLOC_OK (); \ 1582 END_REGEX_MALLOC_OK (); \
1583 UNBIND_REGEX_MALLOC_CHECK (); \ 1583 UNBIND_REGEX_MALLOC_CHECK (); \
1584 return failure_code; \ 1584 return failure_code; \
1585 } \ 1585 } \
1586 END_REGEX_MALLOC_OK (); \ 1586 END_REGEX_MALLOC_OK (); \
1587 DEBUG_FAIL_PRINT2 ("\n Doubled stack; size now: %ld\n", \ 1587 DEBUG_FAIL_PRINT2 ("\n Doubled stack; size now: %Id\n", \
1588 (long) (fail_stack).size); \ 1588 (EMACS_INT) (fail_stack).size); \
1589 DEBUG_FAIL_PRINT2 (" slots available: %ld\n", \ 1589 DEBUG_FAIL_PRINT2 (" slots available: %Id\n", \
1590 (long) REMAINING_AVAIL_SLOTS); \ 1590 (EMACS_INT) REMAINING_AVAIL_SLOTS); \
1591 \ 1591 \
1592 RE_MATCH_RELOCATE_MOVEABLE_DATA_POINTERS (); \ 1592 RE_MATCH_RELOCATE_MOVEABLE_DATA_POINTERS (); \
1593 } \ 1593 } \
1594 \ 1594 \
1595 /* Push the info, starting with the registers. */ \ 1595 /* Push the info, starting with the registers. */ \
1599 this_reg++) \ 1599 this_reg++) \
1600 { \ 1600 { \
1601 DEBUG_FAIL_PRINT2 (" Pushing reg: %d\n", this_reg); \ 1601 DEBUG_FAIL_PRINT2 (" Pushing reg: %d\n", this_reg); \
1602 DEBUG_STATEMENT (num_regs_pushed++); \ 1602 DEBUG_STATEMENT (num_regs_pushed++); \
1603 \ 1603 \
1604 DEBUG_FAIL_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ 1604 DEBUG_FAIL_PRINT2 (" start: 0x%Ix\n", (EMACS_INT) regstart[this_reg]); \
1605 PUSH_FAILURE_POINTER (regstart[this_reg]); \ 1605 PUSH_FAILURE_POINTER (regstart[this_reg]); \
1606 \ 1606 \
1607 DEBUG_FAIL_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ 1607 DEBUG_FAIL_PRINT2 (" end: 0x%Ix\n", (EMACS_INT) regend[this_reg]); \
1608 PUSH_FAILURE_POINTER (regend[this_reg]); \ 1608 PUSH_FAILURE_POINTER (regend[this_reg]); \
1609 \ 1609 \
1610 DEBUG_FAIL_PRINT2 (" info: 0x%lx\n ", \ 1610 DEBUG_FAIL_PRINT2 (" info: 0x%lx\n ", \
1611 * (long *) (&reg_info[this_reg])); \ 1611 * (long *) (&reg_info[this_reg])); \
1612 DEBUG_FAIL_PRINT2 (" match_null=%d", \ 1612 DEBUG_FAIL_PRINT2 (" match_null=%d", \
1624 PUSH_FAILURE_INT (lowest_active_reg); \ 1624 PUSH_FAILURE_INT (lowest_active_reg); \
1625 \ 1625 \
1626 DEBUG_FAIL_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg); \ 1626 DEBUG_FAIL_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg); \
1627 PUSH_FAILURE_INT (highest_active_reg); \ 1627 PUSH_FAILURE_INT (highest_active_reg); \
1628 \ 1628 \
1629 DEBUG_FAIL_PRINT2 (" Pushing pattern 0x%lx: \n", (long) pattern_place); \ 1629 DEBUG_FAIL_PRINT2 (" Pushing pattern 0x%Ix: \n", (EMACS_INT) pattern_place); \
1630 DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ 1630 DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
1631 PUSH_FAILURE_POINTER (pattern_place); \ 1631 PUSH_FAILURE_POINTER (pattern_place); \
1632 \ 1632 \
1633 DEBUG_FAIL_PRINT2 (" Pushing string 0x%lx: `", (long) string_place); \ 1633 DEBUG_FAIL_PRINT2 (" Pushing string 0x%Ix: `", (EMACS_INT) string_place); \
1634 DEBUG_FAIL_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ 1634 DEBUG_FAIL_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
1635 size2); \ 1635 size2); \
1636 DEBUG_FAIL_PRINT1 ("'\n"); \ 1636 DEBUG_FAIL_PRINT1 ("'\n"); \
1637 PUSH_FAILURE_POINTER (string_place); \ 1637 PUSH_FAILURE_POINTER (string_place); \
1638 \ 1638 \
1687 \ 1687 \
1688 assert (!FAIL_STACK_EMPTY ()); \ 1688 assert (!FAIL_STACK_EMPTY ()); \
1689 \ 1689 \
1690 /* Remove failure points and point to how many regs pushed. */ \ 1690 /* Remove failure points and point to how many regs pushed. */ \
1691 DEBUG_FAIL_PRINT1 ("POP_FAILURE_POINT:\n"); \ 1691 DEBUG_FAIL_PRINT1 ("POP_FAILURE_POINT:\n"); \
1692 DEBUG_FAIL_PRINT2 (" Before pop, next avail: %ld\n", \ 1692 DEBUG_FAIL_PRINT2 (" Before pop, next avail: %Id\n", \
1693 (long) fail_stack.avail); \ 1693 (EMACS_INT) fail_stack.avail); \
1694 DEBUG_FAIL_PRINT2 (" size: %ld\n", \ 1694 DEBUG_FAIL_PRINT2 (" size: %Id\n", \
1695 (long) fail_stack.size); \ 1695 (EMACS_INT) fail_stack.size); \
1696 \ 1696 \
1697 assert (fail_stack.avail >= NUM_NONREG_ITEMS); \ 1697 assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
1698 \ 1698 \
1699 DEBUG_POP (&ffailure_id.integer); \ 1699 DEBUG_POP (&ffailure_id.integer); \
1700 DEBUG_FAIL_PRINT2 (" Popping failure id: %d\n", \ 1700 DEBUG_FAIL_PRINT2 (" Popping failure id: %d\n", \
1705 saved NULL, thus retaining our current position in the string. */ \ 1705 saved NULL, thus retaining our current position in the string. */ \
1706 string_temp = POP_FAILURE_POINTER (); \ 1706 string_temp = POP_FAILURE_POINTER (); \
1707 if (string_temp != NULL) \ 1707 if (string_temp != NULL) \
1708 str = string_temp; \ 1708 str = string_temp; \
1709 \ 1709 \
1710 DEBUG_FAIL_PRINT2 (" Popping string 0x%lx: `", (long) str); \ 1710 DEBUG_FAIL_PRINT2 (" Popping string 0x%Ix: `", (EMACS_INT) str); \
1711 DEBUG_FAIL_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ 1711 DEBUG_FAIL_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
1712 DEBUG_FAIL_PRINT1 ("'\n"); \ 1712 DEBUG_FAIL_PRINT1 ("'\n"); \
1713 \ 1713 \
1714 pat = (unsigned char *) POP_FAILURE_POINTER (); \ 1714 pat = (unsigned char *) POP_FAILURE_POINTER (); \
1715 DEBUG_FAIL_PRINT2 (" Popping pattern 0x%lx: ", (long) pat); \ 1715 DEBUG_FAIL_PRINT2 (" Popping pattern 0x%Ix: ", (EMACS_INT) pat); \
1716 DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ 1716 DEBUG_FAIL_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
1717 \ 1717 \
1718 /* Restore register info. */ \ 1718 /* Restore register info. */ \
1719 high_reg = POP_FAILURE_INT (); \ 1719 high_reg = POP_FAILURE_INT (); \
1720 DEBUG_FAIL_PRINT2 (" Popping high active reg: %d\n", high_reg); \ 1720 DEBUG_FAIL_PRINT2 (" Popping high active reg: %d\n", high_reg); \
1729 reg_info[this_reg].word = POP_FAILURE_ELT (); \ 1729 reg_info[this_reg].word = POP_FAILURE_ELT (); \
1730 DEBUG_FAIL_PRINT2 (" info: 0x%lx\n", \ 1730 DEBUG_FAIL_PRINT2 (" info: 0x%lx\n", \
1731 * (long *) &reg_info[this_reg]); \ 1731 * (long *) &reg_info[this_reg]); \
1732 \ 1732 \
1733 regend[this_reg] = POP_FAILURE_POINTER (); \ 1733 regend[this_reg] = POP_FAILURE_POINTER (); \
1734 DEBUG_FAIL_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \ 1734 DEBUG_FAIL_PRINT2 (" end: 0x%Ix\n", (EMACS_INT) regend[this_reg]); \
1735 \ 1735 \
1736 regstart[this_reg] = POP_FAILURE_POINTER (); \ 1736 regstart[this_reg] = POP_FAILURE_POINTER (); \
1737 DEBUG_FAIL_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \ 1737 DEBUG_FAIL_PRINT2 (" start: 0x%Ix\n", (EMACS_INT) regstart[this_reg]); \
1738 } \ 1738 } \
1739 \ 1739 \
1740 set_regs_matched_done = 0; \ 1740 set_regs_matched_done = 0; \
1741 DEBUG_STATEMENT (nfailure_points_popped++); \ 1741 DEBUG_STATEMENT (nfailure_points_popped++); \
1742 } while (0) /* POP_FAILURE_POINT */ 1742 } while (0) /* POP_FAILURE_POINT */
5349 /* This loops over pattern commands. It exits by returning from the 5349 /* This loops over pattern commands. It exits by returning from the
5350 function if the match is complete, or it drops through if the match 5350 function if the match is complete, or it drops through if the match
5351 fails at this starting point in the input data. */ 5351 fails at this starting point in the input data. */
5352 for (;;) 5352 for (;;)
5353 { 5353 {
5354 DEBUG_MATCH_PRINT2 ("\n0x%lx: ", (long) p); 5354 DEBUG_MATCH_PRINT2 ("\n0x%Ix: ", (EMACS_UINT) p);
5355 #ifdef emacs /* XEmacs added, w/removal of immediate_quit */ 5355 #ifdef emacs /* XEmacs added, w/removal of immediate_quit */
5356 if (!no_quit_in_re_search) 5356 if (!no_quit_in_re_search)
5357 { 5357 {
5358 BEGIN_REGEX_MALLOC_OK (); 5358 BEGIN_REGEX_MALLOC_OK ();
5359 QUIT; 5359 QUIT;
6066 case; that seems worse than this. */ 6066 case; that seems worse than this. */
6067 case on_failure_keep_string_jump: 6067 case on_failure_keep_string_jump:
6068 DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_keep_string_jump"); 6068 DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_keep_string_jump");
6069 6069
6070 EXTRACT_NUMBER_AND_INCR (mcnt, p); 6070 EXTRACT_NUMBER_AND_INCR (mcnt, p);
6071 DEBUG_MATCH_PRINT3 (" %d (to 0x%lx):\n", mcnt, (long) (p + mcnt)); 6071 DEBUG_MATCH_PRINT3 (" %d (to 0x%Ix):\n", mcnt, (EMACS_INT) (p + mcnt));
6072 6072
6073 PUSH_FAILURE_POINT (p + mcnt, (unsigned char *) 0, -2); 6073 PUSH_FAILURE_POINT (p + mcnt, (unsigned char *) 0, -2);
6074 break; 6074 break;
6075 6075
6076 6076
6089 case on_failure_jump: 6089 case on_failure_jump:
6090 on_failure: 6090 on_failure:
6091 DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_jump"); 6091 DEBUG_MATCH_PRINT1 ("EXECUTING on_failure_jump");
6092 6092
6093 EXTRACT_NUMBER_AND_INCR (mcnt, p); 6093 EXTRACT_NUMBER_AND_INCR (mcnt, p);
6094 DEBUG_MATCH_PRINT3 (" %d (to 0x%lx)", mcnt, (long) (p + mcnt)); 6094 DEBUG_MATCH_PRINT3 (" %d (to 0x%Ix)", mcnt, (EMACS_INT) (p + mcnt));
6095 6095
6096 /* If this on_failure_jump comes right before a group (i.e., 6096 /* If this on_failure_jump comes right before a group (i.e.,
6097 the original * applied to a group), save the information 6097 the original * applied to a group), save the information
6098 for that group and all inner ones, so that if we fail back 6098 for that group and all inner ones, so that if we fail back
6099 to this point, the group's information will be correct. 6099 to this point, the group's information will be correct.
6304 case jump: 6304 case jump:
6305 unconditional_jump: 6305 unconditional_jump:
6306 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ 6306 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
6307 DEBUG_MATCH_PRINT2 ("EXECUTING jump %d ", mcnt); 6307 DEBUG_MATCH_PRINT2 ("EXECUTING jump %d ", mcnt);
6308 p += mcnt; /* Do the jump. */ 6308 p += mcnt; /* Do the jump. */
6309 DEBUG_MATCH_PRINT2 ("(to 0x%lx).\n", (long) p); 6309 DEBUG_MATCH_PRINT2 ("(to 0x%Ix).\n", (EMACS_INT) p);
6310 break; 6310 break;
6311 6311
6312 6312
6313 /* We need this opcode so we can detect where alternatives end 6313 /* We need this opcode so we can detect where alternatives end
6314 in `group_match_null_string_p' et al. */ 6314 in `group_match_null_string_p' et al. */
6353 if (mcnt > 0) 6353 if (mcnt > 0)
6354 { 6354 {
6355 mcnt--; 6355 mcnt--;
6356 p += 2; 6356 p += 2;
6357 STORE_NUMBER_AND_INCR (p, mcnt); 6357 STORE_NUMBER_AND_INCR (p, mcnt);
6358 DEBUG_MATCH_PRINT3 (" Setting 0x%lx to %d.\n", (long) p, mcnt); 6358 DEBUG_MATCH_PRINT3 (" Setting 0x%Ix to %d.\n", (EMACS_INT) p, mcnt);
6359 } 6359 }
6360 else if (mcnt == 0) 6360 else if (mcnt == 0)
6361 { 6361 {
6362 DEBUG_MATCH_PRINT2 (" Setting two bytes from 0x%lx to no_op.\n", 6362 DEBUG_MATCH_PRINT2 (" Setting two bytes from 0x%Ix to no_op.\n",
6363 (long) (p+2)); 6363 (EMACS_INT) (p+2));
6364 p[2] = (unsigned char) no_op; 6364 p[2] = (unsigned char) no_op;
6365 p[3] = (unsigned char) no_op; 6365 p[3] = (unsigned char) no_op;
6366 goto on_failure; 6366 goto on_failure;
6367 } 6367 }
6368 break; 6368 break;
6388 DEBUG_MATCH_PRINT1 ("EXECUTING set_number_at.\n"); 6388 DEBUG_MATCH_PRINT1 ("EXECUTING set_number_at.\n");
6389 6389
6390 EXTRACT_NUMBER_AND_INCR (mcnt, p); 6390 EXTRACT_NUMBER_AND_INCR (mcnt, p);
6391 p1 = p + mcnt; 6391 p1 = p + mcnt;
6392 EXTRACT_NUMBER_AND_INCR (mcnt, p); 6392 EXTRACT_NUMBER_AND_INCR (mcnt, p);
6393 DEBUG_MATCH_PRINT3 (" Setting 0x%lx to %d.\n", (long) p1, mcnt); 6393 DEBUG_MATCH_PRINT3 (" Setting 0x%Ix to %d.\n", (EMACS_INT) p1, mcnt);
6394 STORE_NUMBER (p1, mcnt); 6394 STORE_NUMBER (p1, mcnt);
6395 break; 6395 break;
6396 } 6396 }
6397 6397
6398 case wordbound: 6398 case wordbound: