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

Diff for /mandoc/man.c between version 1.108 and 1.111

version 1.108, 2011/07/18 07:46:41 version 1.111, 2011/07/28 14:17:11
Line 320  int
Line 320  int
 man_word_alloc(struct man *m, int line, int pos, const char *word)  man_word_alloc(struct man *m, int line, int pos, const char *word)
 {  {
         struct man_node *n;          struct man_node *n;
         size_t           sv, len;  
   
         len = strlen(word);  
   
         n = man_node_alloc(m, line, pos, MAN_TEXT, MAN_MAX);          n = man_node_alloc(m, line, pos, MAN_TEXT, MAN_MAX);
         n->string = mandoc_malloc(len + 1);          n->string = roff_strdup(m->roff, word);
         sv = strlcpy(n->string, word, len + 1);  
   
         /* Prohibit truncation. */  
         assert(sv < len + 1);  
   
         if ( ! man_node_append(m, n))          if ( ! man_node_append(m, n))
                 return(0);                  return(0);
   
Line 371  man_addeqn(struct man *m, const struct eqn *ep)
Line 364  man_addeqn(struct man *m, const struct eqn *ep)
   
         assert( ! (MAN_HALT & m->flags));          assert( ! (MAN_HALT & m->flags));
   
         n = man_node_alloc(m, ep->line, ep->pos, MAN_EQN, MAN_MAX);          n = man_node_alloc(m, ep->ln, ep->pos, MAN_EQN, MAN_MAX);
         n->eqn = ep;          n->eqn = ep;
   
         if ( ! man_node_append(m, n))          if ( ! man_node_append(m, n))
                 return(0);                  return(0);
   
         m->next = MAN_NEXT_SIBLING;          m->next = MAN_NEXT_SIBLING;
         return(man_descope(m, ep->line, ep->pos));          return(man_descope(m, ep->ln, ep->pos));
 }  }
   
 int  int

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.111

CVSweb