home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / INCLUDE.ZIP / STRING.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  8.0 KB  |  168 lines

  1. /*  string.h
  2.  
  3.     Definitions for memory and string functions.
  4.  
  5.     Copyright (c) 1987, 1992 by Borland International
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __STRING_H
  10. #define __STRING_H
  11.  
  12. #if !defined(___DEFS_H)
  13. #include <_defs.h>
  14. #endif
  15.  
  16. #ifndef NULL
  17. #include <_null.h>
  18. #endif
  19.  
  20. #ifndef _SIZE_T
  21. #define _SIZE_T
  22. typedef unsigned size_t;
  23. #endif
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. void _FAR * _Cdecl _FARFUNC memchr  (const void _FAR *__s, int __c, size_t __n);
  29. int         _Cdecl _FARFUNC memcmp(const void _FAR *__s1,
  30.                           const void _FAR *__s2, size_t __n);
  31. void _FAR * _Cdecl _FARFUNC memcpy(void _FAR *__dest, const void _FAR *__src,
  32.                           size_t __n);
  33. void _FAR * _CType _FARFUNC memmove(void _FAR *__dest, const void _FAR *__src,
  34.                            size_t __n);
  35. void _FAR * _CType _FARFUNC memset(void _FAR *__s, int __c, size_t __n);
  36. char _FAR * _CType _FARFUNC strcat(char _FAR *__dest, const char _FAR *__src);
  37. char _FAR * _CType _FARFUNC strchr(const char _FAR *__s, int __c);
  38. int         _CType _FARFUNC strcmp(const char _FAR *__s1, const char _FAR *__s2);
  39. int         _Cdecl strcoll(const char _FAR *__s1, const char _FAR *__s2);
  40. char _FAR * _CType _FARFUNC strcpy(char _FAR *__dest, const char _FAR *__src);
  41. size_t      _Cdecl _FARFUNC strcspn(const char _FAR *__s1, const char _FAR *__s2);
  42. char _FAR * _Cdecl _FARFUNC strerror(int __errnum);
  43. size_t      _CType _FARFUNC strlen(const char _FAR *__s);
  44. char _FAR * _CType _FARFUNC strncat(char _FAR *__dest, const char _FAR *__src,
  45.                size_t __maxlen);
  46. int         _CType _FARFUNC strncmp(const char _FAR *__s1, const char _FAR *__s2,
  47.                size_t __maxlen);
  48. char _FAR * _CType _FARFUNC strncpy(char _FAR *__dest, const char _FAR *__src,
  49.                            size_t __maxlen);
  50. char _FAR * _CType _FARFUNC strpbrk(const char _FAR *__s1, const char _FAR *__s2);
  51. char _FAR * _CType _FARFUNC strrchr(const char _FAR *__s, int __c);
  52. size_t      _Cdecl _FARFUNC strspn(const char _FAR *__s1, const char _FAR *__s2);
  53. char _FAR * _Cdecl _FARFUNC strstr(const char _FAR *__s1, const char _FAR *__s2);
  54. char _FAR * _CType _FARFUNC strtok(char _FAR *__s1, const char _FAR *__s2);
  55. size_t      _Cdecl strxfrm(char _FAR *__s1, const char _FAR *__s2,
  56.                size_t __n );
  57. char _FAR * _Cdecl _FARFUNC _strerror(const char _FAR *__s);
  58.  
  59.  
  60. #if !__STDC__
  61. /* compatibility with other compilers */
  62. #define strcmpi(s1,s2)      stricmp(s1,s2)
  63. #define strncmpi(s1,s2,n)   strnicmp(s1,s2,n)
  64.  
  65. void _FAR * _Cdecl _FARFUNC memccpy(void _FAR *__dest, const void _FAR *__src,
  66.                int __c, size_t __n);
  67. int         _Cdecl _FARFUNC memicmp(const void _FAR *__s1, const void _FAR *__s2,
  68.                            size_t __n);
  69. void        _Cdecl _FARFUNC movedata(unsigned __srcseg,unsigned __srcoff,
  70.                             unsigned __dstseg,unsigned __dstoff, size_t __n);
  71. char _FAR * _CType stpcpy(char _FAR *__dest, const char _FAR *__src);
  72. char _FAR * _Cdecl _stpcpy(char _FAR *__dest, const char _FAR *__src);
  73. char _FAR * _Cdecl _FARFUNC strdup(const char _FAR *__s);
  74. int         _CType _FARFUNC stricmp(const char _FAR *__s1, const char _FAR *__s2);
  75. char _FAR * _CType _FARFUNC strlwr(char _FAR *__s);
  76. int         _CType _FARFUNC strnicmp(const char _FAR *__s1, const char _FAR *__s2,
  77.                 size_t __maxlen);
  78. char _FAR * _Cdecl _FARFUNC strnset(char _FAR *__s, int __ch, size_t __n);
  79. char _FAR * _Cdecl _FARFUNC strrev(char _FAR *__s);
  80. char _FAR * _Cdecl _FARFUNC strset(char _FAR *__s, int __ch);
  81. char _FAR * _CType _FARFUNC strupr(char _FAR *__s);
  82.  
  83. void    far * _FARCALL cdecl _fmemccpy(void far *__dest, const void far *__src,
  84.                 int c, size_t __n);
  85. void    far * _FARCALL cdecl _fmemchr(const void far *__s, int c, size_t __n);
  86. int           _FARCALL cdecl _fmemcmp(const void far *__s1, const void far *__s2,
  87.                 size_t __n);
  88. void    far * _FARCALL cdecl _fmemcpy(void far *__dest, const void far *__src,
  89.                 size_t __n);
  90. int           _FARCALL cdecl _fmemicmp(const void far *__s1, const void far *__s2,
  91.                 size_t __n);
  92. void    far * _FARCALL cdecl _fmemmove(void far *__dest, const void far *__src,
  93.                 size_t __n);
  94. void    far * _FARCALL cdecl _fmemset(void far *__s, int c, size_t __n);
  95. void          _FARCALL cdecl _fmovmem(const void far *__src, void far *__dest,
  96.                 unsigned __length);
  97. void          _FARCALL cdecl _fsetmem(void far *__dest,unsigned __length,
  98.                 char __value);
  99.  
  100. char    far * _FARCALL cdecl _fstrcat(char far *__dest, const char far *__src);
  101. char    far * _FARCALL cdecl _fstrchr(const char far *__s, int c);
  102. int           _FARCALL cdecl _fstrcmp(const char far *__s1, const char far *__s2);
  103. char    far * _FARCALL cdecl _fstrcpy(char far *__dest, const char far *__src);
  104. size_t        _FARCALL cdecl _fstrcspn(const char far *__s1, const char far *__s2);
  105. char    far * _FARCALL cdecl _fstrdup(const char far *__s);
  106. int           _FARCALL cdecl _fstricmp(const char far *__s1, const char far *__s2);
  107. size_t        _FARCALL cdecl _fstrlen(const char far *__s);
  108. char    far * _FARCALL cdecl _fstrlwr(char far *__s);
  109. char    far * _FARCALL cdecl _fstrncat(char far *__dest, const char far *__src,
  110.              size_t maxlen);
  111. int           _FARCALL cdecl _fstrncmp(const char far *__s1, const char far *__s2,
  112.              size_t maxlen);
  113. char    far * _FARCALL cdecl _fstrncpy(char far *__dest, const char far *__src,
  114.              size_t maxlen);
  115. int           _FARCALL cdecl _fstrnicmp(const char far *__s1, const char far *__s2,
  116.               size_t maxlen);
  117. char    far * _FARCALL cdecl _fstrnset(char far *__s, int ch, size_t __n);
  118. char    far * _FARCALL cdecl _fstrpbrk(const char far *__s1, const char far *__s2);
  119. char    far * _FARCALL cdecl _fstrrchr(const char far *__s, int c);
  120. char    far * _FARCALL cdecl _fstrrev(char far *__s);
  121. char    far * _FARCALL cdecl _fstrset(char far *__s, int ch);
  122. size_t        _FARCALL cdecl _fstrspn(const char far *__s1, const char far *__s2);
  123. char    far * _FARCALL cdecl _fstrstr(const char far *__s1, const char far *__s2);
  124. char    far * _FARCALL cdecl _fstrtok(char far *__s1, const char far *__s2);
  125. char    far * _FARCALL cdecl _fstrupr(char far *__s);
  126.  
  127. #ifdef __MSC
  128. #define _stricmp(s1,s2) stricmp(s1,s2)
  129. #define _strdup(s1)     strdup(s1)
  130. #define _strupr(s1)     strupr(s1)
  131. #define _strlwr(s1)     strlwr(s1)
  132. #define _strrev(s1)     strrev(s1)
  133. #endif
  134.  
  135. #endif  /* ! __STDC__ */
  136.  
  137. /* Intrinsic functions */
  138.  
  139. #if !defined(__MEM_H)
  140. void _FAR * _Cdecl _FARFUNC __memchr__  (const void _FAR *__s, int __c, size_t __n);
  141. int         _Cdecl _FARFUNC __memcmp__(const void _FAR *__s1,
  142.                           const void _FAR *__s2, size_t __n);
  143. void _FAR * _Cdecl _FARFUNC __memcpy__(void _FAR *__dest, const void _FAR *__src,
  144.                           size_t __n);
  145. void _FAR * _CType _FARFUNC __memset__(void _FAR *__s, int __c, size_t __n);
  146. #endif
  147. char _FAR * _Cdecl __stpcpy__(char _FAR *__dest, const char _FAR *__src);
  148. char _FAR * _CType _FARFUNC __strcat__(char _FAR *__dest, const char _FAR *__src);
  149. char _FAR * _Cdecl _FARFUNC __strchr__(const char _FAR *__s, int __c);
  150. int         _CType _FARFUNC __strcmp__(const char _FAR *__s1, const char _FAR *__s2);
  151. char _FAR * _CType _FARFUNC __strcpy__(char _FAR *__dest, const char _FAR *__src);
  152. size_t      _CType _FARFUNC __strlen__(const char _FAR *__s);
  153. char _FAR * _Cdecl _FARFUNC __strncat__(char _FAR *__dest, const char _FAR *__src,
  154.                size_t __maxlen);
  155. int         _Cdecl _FARFUNC __strncmp__(const char _FAR *__s1, const char _FAR *__s2,
  156.                size_t __maxlen);
  157. char _FAR * _CType _FARFUNC __strncpy__(char _FAR *__dest, const char _FAR *__src,
  158.                            size_t __maxlen);
  159. char _FAR * _Cdecl _FARFUNC __strnset__(char _FAR *__s, int __ch, size_t __n);
  160. char _FAR * _CType _FARFUNC __strrchr__(const char _FAR *__s, int __c);
  161. char _FAR * _Cdecl _FARFUNC __strset__(char _FAR *__s, int __ch);
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #endif
  168.