[BACK]Return to cgi.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/cgi.c between version 1.59 and 1.60

version 1.59, 2016/04/13 12:58:13 version 1.60, 2016/04/14 20:38:50
Line 53 
Line 53 
         struct query      q;          struct query      q;
         char            **p; /* array of available manpaths */          char            **p; /* array of available manpaths */
         size_t            psz; /* number of available manpaths */          size_t            psz; /* number of available manpaths */
           int               isquery; /* QUERY_STRING used, not PATH_INFO */
 };  };
   
 static  void             catman(const struct req *, const char *);  static  void             catman(const struct req *, const char *);
Line 186 
Line 187 
         char            *key, *val;          char            *key, *val;
         size_t           keysz, valsz;          size_t           keysz, valsz;
   
           req->isquery    = 1;
         req->q.manpath  = NULL;          req->q.manpath  = NULL;
         req->q.arch     = NULL;          req->q.arch     = NULL;
         req->q.sec      = NULL;          req->q.sec      = NULL;
Line 566 
Line 568 
                 return;                  return;
         }          }
   
         if (1 == sz) {          if (req->isquery && sz == 1) {
                 /*                  /*
                  * If we have just one result, then jump there now                   * If we have just one result, then jump there now
                  * without any delay.                   * without any delay.
Line 1083 
Line 1085 
 {  {
         int      dir_done;          int      dir_done;
   
           req->isquery = 0;
         req->q.equal = 1;          req->q.equal = 1;
         req->q.manpath = mandoc_strdup(path);          req->q.manpath = mandoc_strdup(path);
   

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60