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

Diff for /mandoc/Attic/xstd.c between version 1.4 and 1.7

version 1.4, 2009/01/20 13:44:05 version 1.7, 2009/03/06 14:13:47
Line 33  extern size_t   strlcat(char *, const char *, size_t);
Line 33  extern size_t   strlcat(char *, const char *, size_t);
 extern  size_t           strlcpy(char *, const char *, size_t);  extern  size_t           strlcpy(char *, const char *, size_t);
 #endif  #endif
   
   
 int  int
   xstrncmp(const char *p1, const char *p2, size_t sz)
   {
   
           return(0 == strncmp(p1, p2, sz));
   }
   
   int
 xstrcmp(const char *p1, const char *p2)  xstrcmp(const char *p1, const char *p2)
 {  {
   
Line 55  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 75  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;
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

CVSweb