[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.246 and 1.247

version 1.246, 2017/01/10 23:36:34 version 1.247, 2017/01/11 17:39:53
Line 70  static int    mdoc_bf_pre(MDOC_ARGS);
Line 70  static int    mdoc_bf_pre(MDOC_ARGS);
 static  void              mdoc_bk_post(MDOC_ARGS);  static  void              mdoc_bk_post(MDOC_ARGS);
 static  int               mdoc_bk_pre(MDOC_ARGS);  static  int               mdoc_bk_pre(MDOC_ARGS);
 static  int               mdoc_bl_pre(MDOC_ARGS);  static  int               mdoc_bl_pre(MDOC_ARGS);
 static  int               mdoc_bt_pre(MDOC_ARGS);  
 static  int               mdoc_cd_pre(MDOC_ARGS);  static  int               mdoc_cd_pre(MDOC_ARGS);
 static  int               mdoc_d1_pre(MDOC_ARGS);  static  int               mdoc_d1_pre(MDOC_ARGS);
 static  int               mdoc_dv_pre(MDOC_ARGS);  static  int               mdoc_dv_pre(MDOC_ARGS);
Line 106  static int    mdoc_pp_pre(MDOC_ARGS);
Line 105  static int    mdoc_pp_pre(MDOC_ARGS);
 static  void              mdoc_quote_post(MDOC_ARGS);  static  void              mdoc_quote_post(MDOC_ARGS);
 static  int               mdoc_quote_pre(MDOC_ARGS);  static  int               mdoc_quote_pre(MDOC_ARGS);
 static  int               mdoc_rs_pre(MDOC_ARGS);  static  int               mdoc_rs_pre(MDOC_ARGS);
 static  int               mdoc_rv_pre(MDOC_ARGS);  
 static  int               mdoc_sh_pre(MDOC_ARGS);  static  int               mdoc_sh_pre(MDOC_ARGS);
 static  int               mdoc_skip_pre(MDOC_ARGS);  static  int               mdoc_skip_pre(MDOC_ARGS);
 static  int               mdoc_sm_pre(MDOC_ARGS);  static  int               mdoc_sm_pre(MDOC_ARGS);
Line 114  static int    mdoc_sp_pre(MDOC_ARGS);
Line 112  static int    mdoc_sp_pre(MDOC_ARGS);
 static  int               mdoc_ss_pre(MDOC_ARGS);  static  int               mdoc_ss_pre(MDOC_ARGS);
 static  int               mdoc_sx_pre(MDOC_ARGS);  static  int               mdoc_sx_pre(MDOC_ARGS);
 static  int               mdoc_sy_pre(MDOC_ARGS);  static  int               mdoc_sy_pre(MDOC_ARGS);
 static  int               mdoc_ud_pre(MDOC_ARGS);  
 static  int               mdoc_va_pre(MDOC_ARGS);  static  int               mdoc_va_pre(MDOC_ARGS);
 static  int               mdoc_vt_pre(MDOC_ARGS);  static  int               mdoc_vt_pre(MDOC_ARGS);
 static  int               mdoc_xr_pre(MDOC_ARGS);  static  int               mdoc_xr_pre(MDOC_ARGS);
Line 157  static const struct htmlmdoc mdocs[MDOC_MAX] = {
Line 154  static const struct htmlmdoc mdocs[MDOC_MAX] = {
         {mdoc_quote_pre, mdoc_quote_post}, /* Op */          {mdoc_quote_pre, mdoc_quote_post}, /* Op */
         {mdoc_ft_pre, NULL}, /* Ot */          {mdoc_ft_pre, NULL}, /* Ot */
         {mdoc_pa_pre, NULL}, /* Pa */          {mdoc_pa_pre, NULL}, /* Pa */
         {mdoc_rv_pre, NULL}, /* Rv */          {mdoc_ex_pre, NULL}, /* Rv */
         {NULL, NULL}, /* St */          {NULL, NULL}, /* St */
         {mdoc_va_pre, NULL}, /* Va */          {mdoc_va_pre, NULL}, /* Va */
         {mdoc_vt_pre, NULL}, /* Vt */          {mdoc_vt_pre, NULL}, /* Vt */
Line 223  static const struct htmlmdoc mdocs[MDOC_MAX] = {
Line 220  static const struct htmlmdoc mdocs[MDOC_MAX] = {
         {NULL, NULL}, /* Oc */          {NULL, NULL}, /* Oc */
         {mdoc_bk_pre, mdoc_bk_post}, /* Bk */          {mdoc_bk_pre, mdoc_bk_post}, /* Bk */
         {NULL, NULL}, /* Ek */          {NULL, NULL}, /* Ek */
         {mdoc_bt_pre, NULL}, /* Bt */          {NULL, NULL}, /* Bt */
         {NULL, NULL}, /* Hf */          {NULL, NULL}, /* Hf */
         {mdoc_em_pre, NULL}, /* Fr */          {mdoc_em_pre, NULL}, /* Fr */
         {mdoc_ud_pre, NULL}, /* Ud */          {NULL, NULL}, /* Ud */
         {mdoc_lb_pre, NULL}, /* Lb */          {mdoc_lb_pre, NULL}, /* Lb */
         {mdoc_pp_pre, NULL}, /* Lp */          {mdoc_pp_pre, NULL}, /* Lp */
         {mdoc_lk_pre, NULL}, /* Lk */          {mdoc_lk_pre, NULL}, /* Lk */
Line 921  mdoc_bl_pre(MDOC_ARGS)
Line 918  mdoc_bl_pre(MDOC_ARGS)
 static int  static int
 mdoc_ex_pre(MDOC_ARGS)  mdoc_ex_pre(MDOC_ARGS)
 {  {
         struct htmlpair   tag;  
         struct tag       *t;  
         struct roff_node *nch;  
   
         if (n->prev)          if (n->prev)
                 print_otag(h, TAG_BR, 0, NULL);                  print_otag(h, TAG_BR, 0, NULL);
           return 1;
         PAIR_CLASS_INIT(&tag, "utility");  
   
         print_text(h, "The");  
   
         for (nch = n->child; nch != NULL; nch = nch->next) {  
                 assert(nch->type == ROFFT_TEXT);  
   
                 t = print_otag(h, TAG_B, 1, &tag);  
                 print_text(h, nch->string);  
                 print_tagq(h, t);  
   
                 if (nch->next == NULL)  
                         continue;  
   
                 if (nch->prev != NULL || nch->next->next != NULL) {  
                         h->flags |= HTML_NOSPACE;  
                         print_text(h, ",");  
                 }  
   
                 if (nch->next->next == NULL)  
                         print_text(h, "and");  
         }  
   
         if (n->child != NULL && n->child->next != NULL)  
                 print_text(h, "utilities exit\\~0");  
         else  
                 print_text(h, "utility exits\\~0");  
   
         print_text(h, "on success, and\\~>0 if an error occurs.");  
         return 0;  
 }  }
   
 static int  static int
Line 1635  mdoc_ic_pre(MDOC_ARGS)
Line 1598  mdoc_ic_pre(MDOC_ARGS)
 }  }
   
 static int  static int
 mdoc_rv_pre(MDOC_ARGS)  
 {  
         struct htmlpair  tag;  
         struct tag      *t;  
         struct roff_node *nch;  
   
         if (n->prev)  
                 print_otag(h, TAG_BR, 0, NULL);  
   
         PAIR_CLASS_INIT(&tag, "fname");  
   
         if (n->child != NULL) {  
                 print_text(h, "The");  
   
                 for (nch = n->child; nch != NULL; nch = nch->next) {  
                         t = print_otag(h, TAG_B, 1, &tag);  
                         print_text(h, nch->string);  
                         print_tagq(h, t);  
   
                         h->flags |= HTML_NOSPACE;  
                         print_text(h, "()");  
   
                         if (nch->next == NULL)  
                                 continue;  
   
                         if (nch->prev != NULL || nch->next->next != NULL) {  
                                 h->flags |= HTML_NOSPACE;  
                                 print_text(h, ",");  
                         }  
                         if (nch->next->next == NULL)  
                                 print_text(h, "and");  
                 }  
   
                 if (n->child != NULL && n->child->next != NULL)  
                         print_text(h, "functions return");  
                 else  
                         print_text(h, "function returns");  
   
                 print_text(h, "the value\\~0 if successful;");  
         } else  
                 print_text(h, "Upon successful completion,"  
                     " the value\\~0 is returned;");  
   
         print_text(h, "otherwise the value\\~\\-1 is returned"  
            " and the global variable");  
   
         PAIR_CLASS_INIT(&tag, "var");  
         t = print_otag(h, TAG_B, 1, &tag);  
         print_text(h, "errno");  
         print_tagq(h, t);  
         print_text(h, "is set to indicate the error.");  
         return 0;  
 }  
   
 static int  
 mdoc_va_pre(MDOC_ARGS)  mdoc_va_pre(MDOC_ARGS)
 {  {
         struct htmlpair tag;          struct htmlpair tag;
Line 1813  mdoc_sy_pre(MDOC_ARGS)
Line 1721  mdoc_sy_pre(MDOC_ARGS)
         PAIR_CLASS_INIT(&tag, "symb");          PAIR_CLASS_INIT(&tag, "symb");
         print_otag(h, TAG_SPAN, 1, &tag);          print_otag(h, TAG_SPAN, 1, &tag);
         return 1;          return 1;
 }  
   
 static int  
 mdoc_bt_pre(MDOC_ARGS)  
 {  
   
         print_text(h, "is currently in beta test.");  
         return 0;  
 }  
   
 static int  
 mdoc_ud_pre(MDOC_ARGS)  
 {  
   
         print_text(h, "currently under development.");  
         return 0;  
 }  }
   
 static int  static int

Legend:
Removed from v.1.246  
changed lines
  Added in v.1.247

CVSweb