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

Diff for /mandoc/Attic/xstd.c between version 1.10 and 1.13

version 1.10, 2009/03/16 22:19:19 version 1.13, 2009/03/23 14:22:11
Line 1 
Line 1 
 /* $Id$ */  /* $Id$ */
 /*  /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>   * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the   * purpose with or without fee is hereby granted, provided that the
Line 21 
Line 21 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
 #include "private.h"  #include "libmdoc.h"
   
   #ifdef __linux__
   extern  size_t                  strlcpy(char *, const char *, size_t);
   extern  size_t                  strlcat(char *, const char *, size_t);
   #endif
   
 /*  /*
  * Contains wrappers for common functions to simplify their general   * Contains wrappers for common functions to simplify their general
  * usage throughout this codebase.   * usage throughout this codebase.
Line 59  xrealloc(void *ptr, size_t sz)
Line 64  xrealloc(void *ptr, size_t sz)
         return(p);          return(p);
 }  }
   
 void *  
 xcalloc(size_t num, size_t sz)  
 {  
         void            *p;  
   
         if (NULL == (p = calloc(num, sz)))  
                 err(EXIT_FAILURE, "calloc");  
         return(p);  
 }  
   
 char *  char *
 xstrdup(const char *p)  xstrdup(const char *p)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

CVSweb