httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Mon, 25 Aug 2003 15:36:51 GMT
nd          2003/08/25 08:36:51

  Modified:    modules/filters mod_include.c
  Log:
  simplify the dumper code
  
  Revision  Changes    Path
  1.265     +11 -33    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.264
  retrieving revision 1.265
  diff -u -r1.264 -r1.265
  --- mod_include.c	25 Aug 2003 03:30:50 -0000	1.264
  +++ mod_include.c	25 Aug 2003 15:36:51 -0000	1.265
  @@ -335,35 +335,10 @@
               current = current->parent;
               continue;
   
  -        case TOKEN_AND:
  -        case TOKEN_OR:
  -        case TOKEN_EQ:
  -        case TOKEN_NE:
  -        case TOKEN_GE:
  -        case TOKEN_LE:
  -        case TOKEN_GT:
  -        case TOKEN_LT:
  -            if (!current->dump_done) {
  -                debug_printf(ctx, "%s%s\n", is, current->token.s);
  -                is = apr_pstrcat(ctx->dpool, is, "    ", NULL);
  -                current->dump_done = 1;
  -            }
  -
  -            DUMP__CHILD(ctx, is, current, left)
  -            DUMP__CHILD(ctx, is, current, right)
  -
  -            if ((!current->left || current->left->dump_done) &&
  -                (!current->right || current->right->dump_done)) {
  -
  -                is = apr_pstrmemdup(ctx->dpool, is, strlen(is) - 4);
  -                if (current->left) current->left->dump_done = 0;
  -                if (current->right) current->right->dump_done = 0;
  -                current = current->parent;
  -            }
  -            continue;
  -
           case TOKEN_NOT:
           case TOKEN_GROUP:
  +        case TOKEN_RBRACE:
  +        case TOKEN_LBRACE:
               if (!current->dump_done) {
                   debug_printf(ctx, "%s%s\n", is, current->token.s);
                   is = apr_pstrcat(ctx->dpool, is, "    ", NULL);
  @@ -379,18 +354,21 @@
               }
               continue;
   
  -        case TOKEN_RBRACE:
  -        case TOKEN_LBRACE:
  +        default:
               if (!current->dump_done) {
  -                debug_printf(ctx, "%sunmatched %s\n", is, current->token.s);
  +                debug_printf(ctx, "%s%s\n", is, current->token.s);
                   is = apr_pstrcat(ctx->dpool, is, "    ", NULL);
                   current->dump_done = 1;
               }
   
  +            DUMP__CHILD(ctx, is, current, left)
               DUMP__CHILD(ctx, is, current, right)
   
  -            if (!current->right || current->right->dump_done) {
  +            if ((!current->left || current->left->dump_done) &&
  +                (!current->right || current->right->dump_done)) {
  +
                   is = apr_pstrmemdup(ctx->dpool, is, strlen(is) - 4);
  +                if (current->left) current->left->dump_done = 0;
                   if (current->right) current->right->dump_done = 0;
                   current = current->parent;
               }
  @@ -422,10 +400,10 @@
       token_t *d__t = (token);                                                  \
                                                                                 \
       if (d__t->type == TOKEN_STRING || d__t->type == TOKEN_RE) {               \
  -        DEBUG_PRINTF(((ctx), "     Token: %s (%s)\n", d__t->s, d__t->value)); \
  +        DEBUG_PRINTF(((ctx), "     Found: %s (%s)\n", d__t->s, d__t->value)); \
       }                                                                         \
       else {                                                                    \
  -        DEBUG_PRINTF((ctx, "     Token: %s\n", d__t->s));                     \
  +        DEBUG_PRINTF((ctx, "     Found: %s\n", d__t->s));                     \
       }                                                                         \
   } while(0)
   
  
  
  

Mime
View raw message