[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.54 and 1.57

version 1.54, 2010/05/08 07:30:19 version 1.57, 2010/05/14 16:02:29
Line 366  post_st(POST_ARGS)
Line 366  post_st(POST_ARGS)
   
         assert(MDOC_TEXT == n->child->type);          assert(MDOC_TEXT == n->child->type);
         p = mdoc_a2st(n->child->string);          p = mdoc_a2st(n->child->string);
         assert(p);          if (p != NULL) {
         free(n->child->string);                  free(n->child->string);
         n->child->string = mandoc_strdup(p);                  n->child->string = mandoc_strdup(p);
           }
         return(1);          return(1);
 }  }
   
Line 381  post_st(POST_ARGS)
Line 382  post_st(POST_ARGS)
 static int  static int
 post_at(POST_ARGS)  post_at(POST_ARGS)
 {  {
         struct mdoc_node        *nn;          struct mdoc_node *nn;
         const char              *p;          const char       *p, *q;
           char             *buf;
           size_t            sz;
   
         if (n->child) {          if (n->child) {
                 assert(MDOC_TEXT == n->child->type);                  assert(MDOC_TEXT == n->child->type);
                 p = mdoc_a2att(n->child->string);                  p = mdoc_a2att(n->child->string);
                 assert(p);                  if (p) {
                 free(n->child->string);                          free(n->child->string);
                 n->child->string = mandoc_strdup(p);                          n->child->string = mandoc_strdup(p);
                   } else {
                           p = "AT&T UNIX ";
                           q = n->child->string;
                           sz = strlen(p) + strlen(q) + 1;
                           buf = mandoc_malloc(sz);
                           strlcpy(buf, p, sz);
                           strlcat(buf, q, sz);
                           free(n->child->string);
                           n->child->string = buf;
                   }
                 return(1);                  return(1);
         }          }
   
Line 419  post_sh(POST_ARGS)
Line 432  post_sh(POST_ARGS)
   
         if ( ! concat(m, buf, n->child, BUFSIZ))          if ( ! concat(m, buf, n->child, BUFSIZ))
                 return(0);                  return(0);
         sec = mdoc_atosec(buf);          sec = mdoc_str2sec(buf);
         /*          /*
          * The first section should always make us move into a non-new           * The first section should always make us move into a non-new
          * state.           * state.

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.57

CVSweb