nsb

utils.h

nsb
Jul 14th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #ifndef UTILS_H
  2. #define UTILS_H 1
  3. #include <stddef.h>
  4. /**
  5.  * Get memory space and check, wheter I have it
  6.  */
  7. void *
  8. xmalloc(size_t size);
  9.  
  10. /**
  11.  * reallocate space and check it
  12.  */
  13. void *
  14. xrealloc(void * pointer, size_t size);
  15.  
  16. /**
  17.  * safe version of strcat
  18.  */
  19. void
  20. cat(char **to, char * from);
  21.  
  22. /**
  23.  * safe version strcpy
  24.  */
  25. void
  26. cpy(char **to, char * from);
  27.  
  28. /**
  29.  * Add "/" to pathname
  30.  */
  31. void
  32. addslash(char * path);
  33. #endif
Advertisement
Add Comment
Please, Sign In to add comment