home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / STRING.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  7KB  |  191 lines

  1. /*  string.h
  2.  
  3.     Definitions for memory and string functions.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 1.5
  9.  *
  10.  *      Copyright (c) 1987, 1994 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __STRING_H
  16. #define __STRING_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22. #ifndef NULL
  23. #include <_null.h>
  24. #endif
  25.  
  26. #if !defined(__STDC__) && defined(__USELOCALES__)
  27.  
  28. #if !defined(__LOCALE_H)
  29. #include <locale.h>
  30. #endif
  31.  
  32. #endif  /* !__STDC__ && __USELOCALES__ */
  33.  
  34.  
  35. #if !defined(RC_INVOKED)
  36.  
  37. #if defined(__STDC__)
  38. #pragma warn -nak
  39. #endif
  40.  
  41. #endif  /* !RC_INVOKED */
  42.  
  43.  
  44. #ifndef _SIZE_T
  45. #define _SIZE_T
  46. typedef unsigned size_t;
  47. #endif
  48.  
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. int    _RTLENTRY  _EXPFUNC memcmp(const void * __s1,
  54.                                   const void * __s2, size_t __n);
  55. void * _RTLENTRY  _EXPFUNC memcpy(void * __dest, const void * __src,
  56.                                   size_t __n);
  57. void * _RTLENTRYF _EXPFUNC memmove(void * __dest, const void * __src,
  58.                                    size_t __n);
  59. void * _RTLENTRYF _EXPFUNC memset(void * __s, int __c, size_t __n);
  60. char * _RTLENTRYF _EXPFUNC strcat(char * __dest, const char * __src);
  61. int    _RTLENTRYF _EXPFUNC strcmp(const char * __s1, const char * __s2);
  62. int    _RTLENTRY  _EXPFUNC strcoll(const char * __s1, const char * __s2);
  63. int    _RTLENTRY  _EXPFUNC _lstrcoll(const char * __s1, const char * __s2);
  64. char * _RTLENTRYF _EXPFUNC strcpy(char * __dest, const char * __src);
  65. size_t _RTLENTRY  _EXPFUNC strcspn(const char * __s1, const char * __s2);
  66. char * _RTLENTRY  _EXPFUNC strerror(int __errnum);
  67. size_t _RTLENTRYF _EXPFUNC strlen(const char * __s);
  68. char * _RTLENTRYF _EXPFUNC strncat(char * __dest, const char * __src,
  69.                                    size_t __maxlen);
  70. int    _RTLENTRYF _EXPFUNC strncmp(const char * __s1, const char * __s2,
  71.                                    size_t __maxlen);
  72. char * _RTLENTRYF _EXPFUNC strncpy(char * __dest, const char * __src,
  73.                                    size_t __maxlen);
  74. size_t _RTLENTRY  _EXPFUNC strspn(const char * __s1, const char * __s2);
  75. char * _RTLENTRYF _EXPFUNC strtok(char * __s1, const char * __s2);
  76. size_t _RTLENTRY  _EXPFUNC strxfrm(char * __s1, const char * __s2,
  77.                                    size_t __n );
  78. size_t _RTLENTRY  _EXPFUNC _lstrxfrm(char * __s1, const char * __s2,
  79.                                    size_t __n );
  80. char * _RTLENTRY  _EXPFUNC _strerror(const char * __s);
  81.  
  82.  
  83. #if !__STDC__
  84. /* compatibility with other compilers */
  85. #define strcmpi(s1,s2)      stricmp(s1,s2)
  86. #define strncmpi(s1,s2,n)   strnicmp(s1,s2,n)
  87.  
  88. void * _RTLENTRY _EXPFUNC memccpy(void * __dest, const void * __src,
  89.                                   int __c, size_t __n);
  90. int    _RTLENTRY _EXPFUNC memicmp(const void * __s1, const void * __s2,
  91.                                   size_t __n);
  92. char * _RTLENTRYF _EXPFUNC stpcpy(char * __dest, const char * __src);
  93. char * _RTLENTRY  _EXPFUNC _stpcpy(char * __dest, const char * __src);
  94. char * _RTLENTRY  _EXPFUNC strdup(const char * __s);
  95. int    _RTLENTRYF _EXPFUNC stricmp(const char * __s1, const char * __s2);
  96. char * _RTLENTRYF _EXPFUNC strlwr(char * __s);
  97. char * _RTLENTRYF _EXPFUNC _lstrlwr(char * __s);
  98. int    _RTLENTRYF _EXPFUNC strnicmp(const char * __s1, const char * __s2,
  99.                                     size_t __maxlen);
  100. char * _RTLENTRY  _EXPFUNC strnset(char * __s, int __ch, size_t __n);
  101. char * _RTLENTRY  _EXPFUNC strrev(char * __s);
  102. char * _RTLENTRY  _EXPFUNC strset(char * __s, int __ch);
  103. char * _RTLENTRYF _EXPFUNC strupr(char * __s);
  104. char * _RTLENTRYF _EXPFUNC _lstrupr(char * __s);
  105.  
  106. #endif  /* ! __STDC__ */
  107.  
  108. #ifdef __cplusplus
  109. }
  110. #endif
  111.  
  112. #if defined( __USELOCALES__ )
  113.  
  114. #define  strupr   _lstrupr
  115. #define  strlwr   _lstrlwr
  116. #define  _fstrupr _lstrupr
  117. #define  _fstrlwr _lstrlwr
  118. #define  strcoll  _lstrcoll
  119. #define  strxfrm  _lstrxfrm
  120.  
  121. #endif
  122.  
  123.  
  124. #if defined(__cplusplus)
  125. extern "C++" {
  126.       void _FAR * _RTLENTRY  _EXPFUNC32 memchr(void _FAR *__s, int __c, size_t __n);
  127. const void _FAR * _RTLENTRY  _EXPFUNC32 memchr(const void _FAR *__s, int __c, size_t __n);
  128.       char _FAR * _RTLENTRYF _EXPFUNC   strchr(char _FAR * __s, int __c);
  129. const char _FAR * _RTLENTRYF _EXPFUNC   strchr(const char _FAR * __s, int __c);
  130.       char _FAR * _RTLENTRYF _EXPFUNC   strrchr(char _FAR *__s, int __c);
  131. const char _FAR * _RTLENTRYF _EXPFUNC   strrchr(const char _FAR *__s, int __c);
  132.       char _FAR * _RTLENTRYF _EXPFUNC   strpbrk(char _FAR *__s1, const char _FAR *__s2);
  133. const char _FAR * _RTLENTRYF _EXPFUNC   strpbrk(const char _FAR *__s1, const char _FAR *__s2);
  134.       char _FAR * _RTLENTRY  _EXPFUNC   strstr(char _FAR *__s1, const char _FAR *__s2);
  135. const char _FAR * _RTLENTRY  _EXPFUNC   strstr(const char _FAR *__s1, const char _FAR *__s2);
  136. }
  137. #else
  138. void _FAR * _RTLENTRY  _EXPFUNC32 memchr(const void _FAR *__s, int __c, size_t __n);
  139. char _FAR * _RTLENTRYF _EXPFUNC   strchr(const char _FAR * __s, int __c);
  140. char _FAR * _RTLENTRYF _EXPFUNC   strrchr(const char _FAR *__s, int __c);
  141. char _FAR * _RTLENTRYF _EXPFUNC   strpbrk(const char _FAR *__s1, const char _FAR *__s2);
  142. char _FAR * _RTLENTRY  _EXPFUNC   strstr(const char _FAR *__s1, const char _FAR *__s2);
  143. #endif
  144.  
  145. #ifdef __cplusplus
  146. extern "C" {
  147. #endif
  148.  
  149. /* Intrinsic functions */
  150.  
  151. #if !defined(__MEM_H)
  152. void _FAR * _RTLENTRY  _EXPFUNC16 __memchr__  (const void _FAR *__s, int __c, size_t __n);
  153. int         _RTLENTRY  _EXPFUNC16 __memcmp__(const void _FAR *__s1,
  154.                                     const void _FAR *__s2, size_t __n);
  155. void _FAR * _RTLENTRY  _EXPFUNC16 __memcpy__(void _FAR *__dest, const void _FAR *__src,
  156.                                     size_t __n);
  157. void _FAR * _RTLENTRYF _EXPFUNC16 __memset__(void _FAR *__s, int __c, size_t __n);
  158. #endif
  159.  
  160. char _FAR * _RTLENTRY             __stpcpy__(char _FAR *__dest, const char _FAR *__src);
  161. char _FAR * _RTLENTRYF _EXPFUNC16 __strcat__(char _FAR *__dest, const char _FAR *__src);
  162. char _FAR * _RTLENTRY  _EXPFUNC16 __strchr__(const char _FAR *__s, int __c);
  163. int         _RTLENTRYF _EXPFUNC16 __strcmp__(const char _FAR *__s1, const char _FAR *__s2);
  164. char _FAR * _RTLENTRYF _EXPFUNC16 __strcpy__(char _FAR *__dest, const char _FAR *__src);
  165. size_t      _RTLENTRYF _EXPFUNC16 __strlen__(const char _FAR *__s);
  166. char _FAR * _RTLENTRY  _EXPFUNC16 __strncat__(char _FAR *__dest, const char _FAR *__src,
  167.                                     size_t __maxlen);
  168. int         _RTLENTRY  _EXPFUNC16 __strncmp__(const char _FAR *__s1, const char _FAR *__s2,
  169.                                     size_t __maxlen);
  170. char _FAR * _RTLENTRYF _EXPFUNC16 __strncpy__(char _FAR *__dest, const char _FAR *__src,
  171.                                     size_t __maxlen);
  172. char _FAR * _RTLENTRY  _EXPFUNC16 __strnset__(char _FAR *__s, int __ch, size_t __n);
  173. char _FAR * _RTLENTRYF _EXPFUNC16 __strrchr__(const char _FAR *__s, int __c);
  174. char _FAR * _RTLENTRY  _EXPFUNC16 __strset__(char _FAR *__s, int __ch);
  175.  
  176. #ifdef __cplusplus
  177. }
  178. #endif
  179.  
  180.  
  181. #if !defined(RC_INVOKED)
  182.  
  183. #if defined(__STDC__)
  184. #pragma warn .nak
  185. #endif
  186.  
  187. #endif  /* !RC_INVOKED */
  188.  
  189.  
  190. #endif  /* __STRING_H */
  191.