home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 6.ddi / MWHC.006 / 40 < prev    next >
Encoding:
Text File  |  1992-12-09  |  3.8 KB  |  106 lines

  1. /*
  2.  *   string.h -- ANSI 
  3.  *
  4.  *   Functions, types, and macros for manipulating strings and
  5.  *   arbitrary areas of memory.
  6.  *
  7.  *           Copyright (c) 1990, MetaWare Incorporated
  8.  */
  9. #ifndef _STRING_H
  10. #define _STRING_H
  11.  
  12. #ifdef __CPLUSPLUS__
  13. extern "C" {
  14. #endif
  15.  
  16. #ifndef _SIZET_H
  17. #include <sizet.h>
  18. #endif
  19.  
  20. #ifndef NULL
  21. #define NULL            ((void *)0)
  22. #endif
  23. #define _MAXSTRING (0xffffffff)
  24.  
  25. /* Copying functions */
  26. extern  void *      memcpy(void *__s1, const void *__s2, size_t __n);
  27. extern  void *      memmove(void *__s1, const void *__s2, size_t __n);
  28. extern  char *      strcpy(char *__s1, const char *__s2);
  29. extern  char *      strncpy(char *__s1, const char *__s2, size_t __n);
  30.  
  31. /* Concatenation functions */
  32. extern  char *      strcat(char *__s1, const char *__s2);
  33. extern  char *      strncat(char *__s1, const char *__s2, size_t __n);
  34.  
  35. /* Comparison functions */
  36. extern  int         memcmp(const void *__s1, const void *__s2, size_t __n);
  37. extern  int         strcmp(const char *__s1, const char *__s2);
  38. extern  int         strcoll(const char *__s1, const char *__s2);
  39. extern  int         strncmp(const char *__s1, const char *__s2, size_t __n);
  40. extern  size_t      strxfrm(char *__s1, const char *__s2, size_t __n);
  41.  
  42. /* Search functions */
  43. extern  void *      memchr(const void *__s, int __c, size_t __n);
  44. extern  char *      strchr(const char *__s, int __c);
  45. extern  size_t      strcspn(const char *__s1, const char *__s2);
  46. extern  char *      strpbrk(const char *__s1, const char *__s2);
  47. extern  char *      strrchr(const char *__s, int __c);
  48. extern  size_t      strspn(const char *__s1, const char *__s2);
  49. extern  char *      strstr(const char *__s1, const char *__s2);
  50. extern  char *      strtok(char *__s1, const char *__s2);
  51.  
  52. /* Miscellaneous functions */
  53. extern  void *      memset(void *__s, int __c, size_t __n);
  54. #ifndef strerror    /*strerror may be a macro on Sun and BSD systems*/
  55. extern  char *      strerror(int __errnum);
  56. #endif
  57. extern  size_t      strlen(const char *__s);
  58.  
  59. /* Non-ansi additions */
  60. extern void *_rmemcpy(void *__d, const void *__s, size_t __len);
  61. extern char *_rstrcpy(char *__d, const char *__s);
  62. extern char *_rstrncpy(char *__d, const char *__s, size_t __len);
  63. extern char *_strncat(char *__s1, const char *__s2, size_t __len);
  64. extern char *_strcats(int __count, char *__s1, const char *__s2,...);
  65. extern char *_strrev(char *__s);
  66. extern void *_memccpy(void *, void *, int, unsigned int);
  67. extern char *_strnset(char *__s, int __character, size_t __kount);
  68. extern char *_strset(char *__s, int __c);
  69. extern char *_strdup(const char *s1);
  70.  
  71. #if __HIGHC__ 
  72. extern void *memccpy(void *, void *, int, unsigned int);
  73. extern char *strnset(char *__s, int __character, size_t __kount);
  74. extern char *strset(char *__s, int __c);
  75. extern char *strdup(const char *s1);
  76. extern char *strrev(char *__s);
  77. #endif
  78.  
  79. #if _MSDOS
  80. extern char * _strerror(char *);
  81. extern int _memicmp(void *, void *, unsigned int);
  82. extern void _movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
  83. extern int _strcmpi(const char *s1, const char *s2);
  84. extern int _stricmp(const char *s1, const char *s2);
  85. extern char *_strlwr(char *s1);
  86. extern char *_strupr(char *s1);
  87. extern int _strnicmp(const char *__s1, const char *__s2, size_t __n);
  88.  
  89. #if __HIGHC__ 
  90. #define _compare(s1, s2, n) memcmp(s1, s2, n)
  91. extern int memicmp(void *, void *, unsigned int);
  92. extern void movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
  93. extern int strcmpi(const char *s1, const char *s2);
  94. extern int stricmp(const char *s1, const char *s2);
  95. extern char *strlwr(char *s1);
  96. extern char *strupr(char *s1);
  97. extern int strnicmp(const char *__s1, const char *__s2, size_t __n);
  98.  
  99. #endif /*__HIGHC__*/
  100. #endif /*_MSDOS*/
  101.  
  102. #ifdef __CPLUSPLUS__
  103. }
  104. #endif
  105. #endif /*_STRING_H*/
  106.