pike.git / src / modules / Regexp / pike_regexp.c

version» Context lines:

pike.git/src/modules/Regexp/pike_regexp.c:758:    return;       /* Find last node. */    for (scan = p; (temp = regnext(scan)) != NULL; scan = temp)    continue;       if (OP(scan) == BACK)    offset = scan - val;    else    offset = val - scan; -  *(scan + 1) = DO_NOT_WARN((offset >> 8) & 0377); -  *(scan + 2) = DO_NOT_WARN(offset & 0377); +  *(scan + 1) = (offset >> 8) & 0377; +  *(scan + 2) = offset & 0377;   }      /*    - regoptail - regtail on operand of first argument; nop if operandless    */   static void regoptail(char *p, const char *val)   {    /* "Operandless" and "op != BRANCH" are synonymous in practice. */    if (p == NULL || p == regdummy || OP(p) != BRANCH)    return;
pike.git/src/modules/Regexp/pike_regexp.c:1141: Inside #if defined(PIKE_DEBUG)
  void regdump(regexp *r)   {    char *s;    char op = EXACTLY; /* Arbitrary non-END op. */    char *next;       s = r->program;    while (op != END) { /* While that wasn't END last time... */    op = OP(s);    printf("%2ld%s", /* Where, what. */ -  DO_NOT_WARN((long)(s - r->program)), +  (long)(s - r->program),    regprop(s));    next = regnext(s);    if (next == NULL) /* next ptr. */    printf("(0)");    else    printf("(%ld)", -  DO_NOT_WARN((long)( (s - r->program) + (next - s)))); +  (long)( (s - r->program) + (next - s)));    s += 3;    if (op == ANYOF || op == ANYBUT || op == EXACTLY) {    /* Literal string, where present. */    while (*s != '\0') {    putchar(*s);    s++;    }    s++;    }    putchar('\n');