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 21:22:37 GMT
nd          2003/08/25 14:22:37

  Modified:    modules/filters mod_include.c
  Log:
  shorten the code by reversing the case conditions
  
  Revision  Changes    Path
  1.268     +13 -31    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.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- mod_include.c	25 Aug 2003 19:56:00 -0000	1.267
  +++ mod_include.c	25 Aug 2003 21:22:37 -0000	1.268
  @@ -1159,26 +1159,19 @@
                                   new->token.value, NULL);
                   break;
   
  -            case TOKEN_EQ:
  -            case TOKEN_NE:
  -            case TOKEN_AND:
  -            case TOKEN_OR:
  -            case TOKEN_LBRACE:
  -            case TOKEN_NOT:
  -            case TOKEN_GE:
  -            case TOKEN_GT:
  -            case TOKEN_LE:
  -            case TOKEN_LT:
  -                new->parent = current;
  -                current = current->right = new;
  -                break;
  -
  -            default:
  +            case TOKEN_RE:
  +            case TOKEN_RBRACE:
  +            case TOKEN_GROUP:
                   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                                 "Invalid expression \"%s\" in file %s",
                                 expr, r->filename);
                   *was_error = 1;
                   return retval;
  +
  +            default:
  +                new->parent = current;
  +                current = current->right = new;
  +                break;
               }
               break;
   
  @@ -1221,30 +1214,19 @@
               /* Percolate upwards */
               while (current) {
                   switch (current->token.type) {
  -                case TOKEN_STRING:
  -                case TOKEN_RE:
  -                case TOKEN_GROUP:
  -                case TOKEN_NOT:
  -                case TOKEN_EQ:
  -                case TOKEN_NE:
  -                case TOKEN_AND:
  -                case TOKEN_OR:
  -                case TOKEN_GE:
  -                case TOKEN_GT:
  -                case TOKEN_LE:
  -                case TOKEN_LT:
  -                    current = current->parent;
  -                    continue;
  -
                   case TOKEN_LBRACE:
                       break;
   
  -                default:
  +                case TOKEN_RBRACE:
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                                     "Invalid expression \"%s\" in file %s",
                                     expr, r->filename);
                       *was_error = 1;
                       return retval;
  +
  +                default:
  +                    current = current->parent;
  +                    continue;
                   }
                   break;
               }
  
  
  

Mime
View raw message