home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / ansi / string.h < prev    next >
Text File  |  1991-06-17  |  2KB  |  67 lines

  1. /* Copyright (c) 1988 NeXT, Inc. - 9/8/88 CCH */
  2.  
  3. #ifndef _STRING_H
  4. #define _STRING_H
  5.  
  6. #ifdef __STRICT_BSD__
  7. #import <strings.h>
  8. extern char *strcpyn();
  9. extern char *strcatn();
  10. extern int strcmpn();
  11. extern char *strchr();
  12. extern char *strrchr();
  13. extern char *strpbrk();
  14. extern int strspn();
  15. extern int strcspn();
  16. extern char *strtok();
  17. #else /* __STRICT_BSD__ */
  18.  
  19. #import <stddef.h>
  20.  
  21. extern void *memcpy(void *s1, const void *s2, size_t n);
  22. extern void *memmove(void *s1, const void *s2, size_t n);
  23. extern int memcmp(const void *s1, const void *s2, size_t n);
  24. extern size_t strcoll(char *to, size_t maxsize, const char *from);
  25. extern void *memchr(const void *s, int c, size_t n);
  26. extern char *strstr(const char *s1, const char *s2);
  27. extern void *memset(void *s, int c, size_t n);
  28. extern char *strerror(int errnum);
  29. extern char *strcpy(char *s1, const char *s2);
  30. extern char *strcat(char *s1, const char *s2);
  31. extern int strcmp(const char *s1, const char *s2);
  32. extern int strcasecmp(const char *s1, const char *s2);
  33. extern char *strchr(const char *s, int c);
  34. extern char *strpbrk(const char *s1, const char *s2);
  35. extern char *strrchr(const char *s, int c);
  36. extern char *strtok(char *s1, const char *s2);
  37. extern char *strncpy(char *s1, const char *s2, size_t n);
  38. extern char *strncat(char *s1, rt char *s2, size_t n);
  39. extern int strncmp(const char *s1, const char *s2, size_t n);
  40. extern int strncasecmp(const char *s1, const char *s2, size_t n);
  41. extern size_t strcspn(const char *s1, const char *s2);
  42. extern size_t strspn(const char *s1, const char *s2);
  43. extern size_t strlen(const char *s);
  44.  
  45. #ifndef __STRICT_ANSI__
  46. /* added for BSD compatibility */
  47. #undef index
  48. extern char *index(const char *s, int c);
  49. #define index(s,c) strchr(s,c)
  50.  
  51. #undef rindex
  52. extern char *rindex(const char *s, int c);
  53. #define rindex(s,c) strrchr(s,c)
  54.  
  55. #define bcopy(from,to,len) ((void)memmove(to,from,len))
  56. #define bcmp(s1,s2,len) memcmp(s1,s2,len)
  57. #define bzero(b,len) memset(b,0,len)
  58.  
  59. /* obsolete trash, for BSD compatibility */
  60. extern char *strcpyn();
  61. extern char *strcatn();
  62. extern int strcmpn();
  63. #endif /* __STRICT_ANSI__ */
  64. #endif /* __STRICT_BSD__ */
  65.  
  66. #endif /* _STRING_H */
  67.