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

Diff for /mandoc/Attic/xstd.c between version 1.5 and 1.8

version 1.5, 2009/01/20 22:55:46 version 1.8, 2009/03/08 11:41:22
Line 63  xstrlcpy(char *dst, const char *src, size_t sz)
Line 63  xstrlcpy(char *dst, const char *src, size_t sz)
 }  }
   
 void *  void *
   xrealloc(void *ptr, size_t sz)
   {
           void            *p;
   
           if (NULL == (p = realloc(ptr, sz)))
                   err(EXIT_FAILURE, "realloc");
           return(p);
   }
   
   void *
 xcalloc(size_t num, size_t sz)  xcalloc(size_t num, size_t sz)
 {  {
         void            *p;          void            *p;
Line 83  xstrdup(const char *p)
Line 93  xstrdup(const char *p)
 }  }
   
 int  int
 xstrlcats(char *buf, const struct mdoc_node *n, size_t sz)  xstrlcpys(char *buf, const struct mdoc_node *n, size_t sz)
 {  {
         char             *p;          char             *p;
   
Line 93  xstrlcats(char *buf, const struct mdoc_node *n, size_t
Line 103  xstrlcats(char *buf, const struct mdoc_node *n, size_t
   
         for ( ; n; n = n->next) {          for ( ; n; n = n->next) {
                 assert(MDOC_TEXT == n->type);                  assert(MDOC_TEXT == n->type);
                 p = n->data.text.string;                  p = n->string;
                 if ( ! xstrlcat(buf, p, sz))                  if ( ! xstrlcat(buf, p, sz))
                         return(0);                          return(0);
                 if (n->next && ! xstrlcat(buf, " ", sz))                  if (n->next && ! xstrlcat(buf, " ", sz))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

CVSweb