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

Diff for /mandoc/Attic/mdoc_action.c between version 1.26 and 1.27

version 1.26, 2009/07/12 20:30:35 version 1.27, 2009/07/12 20:50:08
Line 41  static int   post_bl_width(POST_ARGS);
Line 41  static int   post_bl_width(POST_ARGS);
 static  int       post_dd(POST_ARGS);  static  int       post_dd(POST_ARGS);
 static  int       post_display(POST_ARGS);  static  int       post_display(POST_ARGS);
 static  int       post_dt(POST_ARGS);  static  int       post_dt(POST_ARGS);
   static  int       post_lb(POST_ARGS);
 static  int       post_lk(POST_ARGS);  static  int       post_lk(POST_ARGS);
 static  int       post_nm(POST_ARGS);  static  int       post_nm(POST_ARGS);
 static  int       post_os(POST_ARGS);  static  int       post_os(POST_ARGS);
Line 159  const struct actions mdoc_actions[MDOC_MAX] = {
Line 160  const struct actions mdoc_actions[MDOC_MAX] = {
         { NULL, NULL }, /* Hf */          { NULL, NULL }, /* Hf */
         { NULL, NULL }, /* Fr */          { NULL, NULL }, /* Fr */
         { NULL, NULL }, /* Ud */          { NULL, NULL }, /* Ud */
         { NULL, NULL }, /* Lb */          { NULL, post_lb }, /* Lb */
         { NULL, NULL }, /* Lp */          { NULL, NULL }, /* Lp */
         { NULL, post_lk }, /* Lk */          { NULL, post_lk }, /* Lk */
         { NULL, NULL }, /* Mt */          { NULL, NULL }, /* Mt */
Line 286  post_nm(POST_ARGS)
Line 287  post_nm(POST_ARGS)
         if (NULL == (m->meta.name = strdup(buf)))          if (NULL == (m->meta.name = strdup(buf)))
                 return(mdoc_nerr(m, m->last, EMALLOC));                  return(mdoc_nerr(m, m->last, EMALLOC));
   
           return(1);
   }
   
   
   static int
   post_lb(POST_ARGS)
   {
           const char      *p;
           char            *buf;
           size_t           sz;
   
           assert(MDOC_TEXT == m->last->child->type);
           p = mdoc_a2lib(m->last->child->string);
           if (NULL == p) {
                   sz = strlen(m->last->child->string) +
                           2 + strlen("\\(lqlibrary\\(rq");
                   buf = malloc(sz);
                   if (NULL == buf)
                           return(mdoc_nerr(m, m->last, EMALLOC));
                   (void)snprintf(buf, sz, "library \\(lq%s\\(rq",
                                   m->last->child->string);
                   free(m->last->child->string);
                   m->last->child->string = buf;
                   return(1);
           }
   
           free(m->last->child->string);
           m->last->child->string = strdup(p);
           if (NULL == m->last->child->string)
                   return(mdoc_nerr(m, m->last, EMALLOC));
         return(1);          return(1);
 }  }
   

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

CVSweb