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

Diff for /mandoc/cgi.c between version 1.107 and 1.108

version 1.107, 2015/04/18 16:06:39 version 1.108, 2015/04/18 16:34:25
Line 30 
Line 30 
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   
 #include "mandoc.h"  
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
   #include "mandoc.h"
   #include "roff.h"
 #include "main.h"  #include "main.h"
 #include "manconf.h"  #include "manconf.h"
 #include "mansearch.h"  #include "mansearch.h"
Line 819  format(const struct req *req, const char *file)
Line 820  format(const struct req *req, const char *file)
         struct manoutput conf;          struct manoutput conf;
         struct mparse   *mp;          struct mparse   *mp;
         struct mchars   *mchars;          struct mchars   *mchars;
         struct roff_man *mdoc;  
         struct roff_man *man;          struct roff_man *man;
         void            *vp;          void            *vp;
         int              fd;          int              fd;
Line 846  format(const struct req *req, const char *file)
Line 846  format(const struct req *req, const char *file)
             usepath     ? "&manpath="    : "",              usepath     ? "&manpath="    : "",
             usepath     ? req->q.manpath : "");              usepath     ? req->q.manpath : "");
   
         mparse_result(mp, &mdoc, &man, NULL);          mparse_result(mp, &man, NULL);
         if (NULL == man && NULL == mdoc) {          if (man == NULL) {
                 fprintf(stderr, "fatal mandoc error: %s/%s\n",                  fprintf(stderr, "fatal mandoc error: %s/%s\n",
                     req->q.manpath, file);                      req->q.manpath, file);
                 pg_error_internal();                  pg_error_internal();
Line 858  format(const struct req *req, const char *file)
Line 858  format(const struct req *req, const char *file)
   
         vp = html_alloc(mchars, &conf);          vp = html_alloc(mchars, &conf);
   
         if (NULL != mdoc)          if (man->macroset == MACROSET_MDOC)
                 html_mdoc(vp, mdoc);                  html_mdoc(vp, man);
         else          else
                 html_man(vp, man);                  html_man(vp, man);
   

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108

CVSweb