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

Diff for /mandoc/mdoc_html.c between version 1.50 and 1.53

version 1.50, 2010/01/01 13:17:58 version 1.53, 2010/01/29 14:39:38
Line 14 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #ifdef HAVE_CONFIG_H
   #include "config.h"
   #endif
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/param.h>  
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
Line 36 
Line 39 
                           const struct mdoc_node *n, \                            const struct mdoc_node *n, \
                           struct html *h                            struct html *h
   
   #ifndef MIN
   #define MIN(a,b)        ((/*CONSTCOND*/(a)<(b))?(a):(b))
   #endif
   
 struct  htmlmdoc {  struct  htmlmdoc {
         int             (*pre)(MDOC_ARGS);          int             (*pre)(MDOC_ARGS);
         void            (*post)(MDOC_ARGS);          void            (*post)(MDOC_ARGS);
Line 126  static int    mdoc_vt_pre(MDOC_ARGS);
Line 133  static int    mdoc_vt_pre(MDOC_ARGS);
 static  int               mdoc_xr_pre(MDOC_ARGS);  static  int               mdoc_xr_pre(MDOC_ARGS);
 static  int               mdoc_xx_pre(MDOC_ARGS);  static  int               mdoc_xx_pre(MDOC_ARGS);
   
 #ifdef __linux__  
 extern  size_t            strlcpy(char *, const char *, size_t);  
 extern  size_t            strlcat(char *, const char *, size_t);  
 #endif  
   
 static  const struct htmlmdoc mdocs[MDOC_MAX] = {  static  const struct htmlmdoc mdocs[MDOC_MAX] = {
         {mdoc_ap_pre, NULL}, /* Ap */          {mdoc_ap_pre, NULL}, /* Ap */
         {NULL, NULL}, /* Dd */          {NULL, NULL}, /* Dd */
Line 264  html_mdoc(void *arg, const struct mdoc *m)
Line 266  html_mdoc(void *arg, const struct mdoc *m)
   
         h = (struct html *)arg;          h = (struct html *)arg;
   
         print_gen_doctype(h);          print_gen_decls(h);
         t = print_otag(h, TAG_HTML, 0, NULL);          t = print_otag(h, TAG_HTML, 0, NULL);
         print_mdoc(mdoc_meta(m), mdoc_node(m), h);          print_mdoc(mdoc_meta(m), mdoc_node(m), h);
         print_tagq(h, t);          print_tagq(h, t);
Line 659  mdoc_fl_pre(MDOC_ARGS)
Line 661  mdoc_fl_pre(MDOC_ARGS)
 {  {
         struct htmlpair  tag;          struct htmlpair  tag;
   
           PAIR_CLASS_INIT(&tag, "flag");
           print_otag(h, TAG_SPAN, 1, &tag);
   
         /* `Cm' has no leading hyphen. */          /* `Cm' has no leading hyphen. */
   
         if (MDOC_Cm == n->tok) {          if (MDOC_Cm == n->tok)
                 PAIR_CLASS_INIT(&tag, "flag");  
                 print_otag(h, TAG_SPAN, 1, &tag);  
                 return(1);                  return(1);
         }  
   
         /* A zero-length child shouldn't get a dash. */  
   
         if (n->child) {  
                 assert(MDOC_TEXT == n->child->type);  
                 assert(n->child->string);  
                 if ('\0' == *n->child->string)  
                         return(0);  
         }  
   
         PAIR_CLASS_INIT(&tag, "flag");  
         print_otag(h, TAG_SPAN, 1, &tag);  
   
         print_text(h, "\\-");          print_text(h, "\\-");
   

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.53

CVSweb