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

Diff for /mandoc/cgi.c between version 1.113 and 1.114

version 1.113, 2015/11/05 17:47:51 version 1.114, 2015/11/05 20:55:41
Line 77  static void   pg_searchres(const struct req *,
Line 77  static void   pg_searchres(const struct req *,
 static  void             pg_show(struct req *, const char *);  static  void             pg_show(struct req *, const char *);
 static  void             resp_begin_html(int, const char *);  static  void             resp_begin_html(int, const char *);
 static  void             resp_begin_http(int, const char *);  static  void             resp_begin_http(int, const char *);
   static  void             resp_copy(const char *);
 static  void             resp_end_html(void);  static  void             resp_end_html(void);
 static  void             resp_searchform(const struct req *);  static  void             resp_searchform(const struct req *);
 static  void             resp_show(const struct req *, const char *);  static  void             resp_show(const struct req *, const char *);
Line 368  resp_begin_http(int code, const char *msg)
Line 369  resp_begin_http(int code, const char *msg)
 }  }
   
 static void  static void
   resp_copy(const char *filename)
   {
           char     buf[4096];
           ssize_t  sz;
           int      fd;
   
           if ((fd = open(filename, O_RDONLY)) != -1) {
                   fflush(stdout);
                   while ((sz = read(fd, buf, sizeof(buf))) > 0)
                           write(STDOUT_FILENO, buf, sz);
           }
   }
   
   static void
 resp_begin_html(int code, const char *msg)  resp_begin_html(int code, const char *msg)
 {  {
   
Line 384  resp_begin_html(int code, const char *msg)
Line 399  resp_begin_html(int code, const char *msg)
                "<BODY>\n"                 "<BODY>\n"
                "<!-- Begin page content. //-->\n",                 "<!-- Begin page content. //-->\n",
                CSS_DIR, CUSTOMIZE_TITLE);                 CSS_DIR, CUSTOMIZE_TITLE);
   
           resp_copy(MAN_DIR "/header.html");
 }  }
   
 static void  static void
 resp_end_html(void)  resp_end_html(void)
 {  {
   
           resp_copy(MAN_DIR "/footer.html");
   
         puts("</BODY>\n"          puts("</BODY>\n"
              "</HTML>");               "</HTML>");
 }  }
Line 399  resp_searchform(const struct req *req)
Line 418  resp_searchform(const struct req *req)
 {  {
         int              i;          int              i;
   
         puts(CUSTOMIZE_BEGIN);  
         puts("<!-- Begin search form. //-->");          puts("<!-- Begin search form. //-->");
         printf("<DIV ID=\"mancgi\">\n"          printf("<DIV ID=\"mancgi\">\n"
                "<FORM ACTION=\"%s\" METHOD=\"get\">\n"                 "<FORM ACTION=\"%s\" METHOD=\"get\">\n"

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114

CVSweb