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/generators mod_autoindex.c
Date Sun, 02 Mar 2003 17:28:35 GMT
nd          2003/03/02 09:28:34

  Modified:    modules/generators mod_autoindex.c
  Log:
  add some comments and WS to make it better readable (hopefully ;-)
  
  Revision  Changes    Path
  1.118     +24 -12    httpd-2.0/modules/generators/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_autoindex.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- mod_autoindex.c	2 Mar 2003 17:15:43 -0000	1.117
  +++ mod_autoindex.c	2 Mar 2003 17:28:34 -0000	1.118
  @@ -2007,24 +2007,30 @@
           qstring = r->args;
   
           while (qstring && *qstring) {
  -            if (qstring[0] == 'C' && qstring[1] == '='
  -                    && qstring[2] && strchr(K_VALID, qstring[2])
  -                    && (qstring[3] == '&' || qstring[3] == ';'
  -                        || !qstring[3])) {
  +
  +            /* C= First Sort key Column (N, M, S, D) */
  +            if (   qstring[0] == 'C' && qstring[1] == '='
  +                && qstring[2] && strchr(K_VALID, qstring[2])
  +                && (   qstring[3] == '&' || qstring[3] == ';'
  +                    || !qstring[3])) {
                   keyid = qstring[2];
                   qstring += qstring[3] ? 4 : 3;
               }
  -            else if (qstring[0] == 'O' && qstring[1] == '='
  -                     && ((qstring[2] == D_ASCENDING)
  +
  +            /* O= Sort order (A, D) */
  +            else if (   qstring[0] == 'O' && qstring[1] == '='
  +                     && (   (qstring[2] == D_ASCENDING)
                            || (qstring[2] == D_DESCENDING))
  -                     && (qstring[3] == '&' || qstring[3] == ';'
  +                     && (   qstring[3] == '&' || qstring[3] == ';'
                            || !qstring[3])) {
                   direction = qstring[2];
                   qstring += qstring[3] ? 4 : 3;
               }
  -            else if (qstring[0] == 'F' && qstring[1] == '='
  +
  +            /* F= Output Format (0 plain, 1 fancy (pre), 2 table) */
  +            else if (   qstring[0] == 'F' && qstring[1] == '='
                        && qstring[2] && strchr("012", qstring[2])
  -                     && (qstring[3] == '&' || qstring[3] == ';'
  +                     && (   qstring[3] == '&' || qstring[3] == ';'
                            || !qstring[3])) {
                   if (qstring[2] == '0') {
                       autoindex_opts &= ~(FANCY_INDEXING | TABLE_INDEXING);
  @@ -2040,9 +2046,11 @@
                   fval[3] = qstring[2];
                   qstring += qstring[3] ? 4 : 3;
               }
  -            else if (qstring[0] == 'V' && qstring[1] == '='
  +
  +            /* V= Version sort (0, 1) */
  +            else if (   qstring[0] == 'V' && qstring[1] == '='
                        && (qstring[2] == '0' || qstring[2] == '1')
  -                     && (qstring[3] == '&' || qstring[3] == ';'
  +                     && (   qstring[3] == '&' || qstring[3] == ';'
                            || !qstring[3])) {
                   if (qstring[2] == '0') {
                       autoindex_opts &= ~VERSION_SORT;
  @@ -2054,6 +2062,8 @@
                   vval[3] = qstring[2];
                   qstring += qstring[3] ? 4 : 3;
               }
  +
  +            /* P= wildcard pattern (*.foo) */
               else if (qstring[0] == 'P' && qstring[1] == '=') {
                   const char *eos = qstring + 2;
   
  @@ -2077,7 +2087,9 @@
                       pstring = NULL;
                   }
               }
  -            else {              /* Syntax error?  Ignore the remainder! */
  +
  +            /* Syntax error?  Ignore the remainder! */
  +            else {
                   qstring = NULL;
               }
           }
  
  
  

Mime
View raw message