home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / mkid2 / part01 / string.h < prev    next >
C/C++ Source or Header  |  1991-10-09  |  525b  |  28 lines

  1. /* Copyright (c) 1986, Greg McGary */
  2. /* @(#)string.h    1.1 86/10/09 */
  3.  
  4. #ifdef RINDEX
  5. #define    strchr    index
  6. #define    strrchr    rindex
  7. #endif
  8.  
  9. extern char
  10.     *strcpy(),
  11.     *strncpy(),
  12.     *strcat(),
  13.     *strncat(),
  14.     *strchr(),
  15.     *strrchr(),
  16.     *strpbrk(),
  17.     *strtok();
  18.  
  19. extern long
  20.     strtol();
  21.  
  22. extern char    *calloc();
  23.  
  24. #define    strequ(s1, s2)        (strcmp((s1), (s2)) == 0)
  25. #define    strnequ(s1, s2, n)    (strncmp((s1), (s2), (n)) == 0)
  26. #define    strsav(s)        (strcpy(calloc(1, strlen(s)+1), (s)))
  27. #define    strnsav(s, n)        (strncpy(calloc(1, (n)+1), (s), (n)))
  28.