[BACK]Return to cgi.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/cgi.c between version 1.120 and 1.121

version 1.120, 2016/04/13 15:38:45 version 1.121, 2016/04/14 20:40:33
Line 55  struct req {
Line 55  struct req {
         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 188  http_parse(struct req *req, const char *qs)
Line 189  http_parse(struct req *req, const char *qs)
         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 568  pg_searchres(const struct req *req, struct manpage *r,
Line 570  pg_searchres(const struct req *req, struct manpage *r,
                 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 1085  path_parse(struct req *req, const char *path)
Line 1087  path_parse(struct req *req, const char *path)
 {  {
         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.120  
changed lines
  Added in v.1.121

CVSweb