home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL3.ZIP / PATINC.ZIP / STRING.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  6.5 KB  |  137 lines

  1. /*  string.h
  2.  
  3.     Definitions for memory and string functions.
  4.  
  5.         Copyright (c) Borland International 1987,1988,1990,1991
  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. #if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
  18. #define NULL    0
  19. #else
  20. #define NULL    0L
  21. #endif
  22. #endif
  23.  
  24. #ifndef _SIZE_T
  25. #define _SIZE_T
  26. typedef unsigned size_t;
  27. #endif
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. void _FAR * _Cdecl _FARFUNC memchr  (const void _FAR *__s, int __c, size_t __n);
  33. int         _Cdecl _FARFUNC memcmp(const void _FAR *__s1,
  34.                           const void _FAR *__s2, size_t __n);
  35. void _FAR * _Cdecl _FARFUNC memcpy(void _FAR *__dest, const void _FAR *__src,
  36.                           size_t __n);
  37. void _FAR * _CType _FARFUNC memmove(void _FAR *__dest, const void _FAR *__src,
  38.                            size_t __n);
  39. void * _CType _FARFUNC memset(void *__s, int __c, size_t __n);
  40. char _FAR * _CType _FARFUNC strcat(char _FAR *__dest, const char _FAR *__src);
  41. char _FAR * _Cdecl _FARFUNC strchr(const char _FAR *__s, int __c);
  42. int         _CType _FARFUNC strcmp(const char _FAR *__s1, const char _FAR *__s2);
  43. int         _Cdecl strcoll(const char *__s1, const char *__s2);
  44. char _FAR * _CType _FARFUNC strcpy(char _FAR *__dest, const char _FAR *__src);
  45. size_t      _Cdecl _FARFUNC strcspn(const char _FAR *__s1, const char _FAR *__s2);
  46. char _FAR * _Cdecl _FARFUNC strerror(int __errnum);
  47. size_t      _CType _FARFUNC strlen(const char _FAR *__s);
  48. char _FAR * _Cdecl _FARFUNC strncat(char _FAR *__dest, const char _FAR *__src,
  49.                            size_t __maxlen);
  50. int         _Cdecl _FARFUNC strncmp(const char _FAR *__s1, const char _FAR *__s2,
  51.                            size_t __maxlen);
  52. char _FAR * _CType _FARFUNC strncpy(char _FAR *__dest, const char _FAR *__src,
  53.                            size_t __maxlen);
  54. char _FAR * _Cdecl _FARFUNC strpbrk(const char _FAR *__s1, const char _FAR *__s2);
  55. char _FAR * _CType _FARFUNC strrchr(const char _FAR *__s, int __c);
  56. size_t      _Cdecl _FARFUNC strspn(const char _FAR *__s1, const char _FAR *__s2);
  57. char _FAR * _Cdecl _FARFUNC strstr(const char _FAR *__s1, const char _FAR *__s2);
  58. char _FAR * _Cdecl _FARFUNC strtok(char _FAR *__s1, const char _FAR *__s2);
  59. size_t      _Cdecl strxfrm(char *__s1, const char *__s2,
  60.                            size_t __n );
  61. char _FAR * _Cdecl _FARFUNC _strerror(const char _FAR *__s);
  62.  
  63.  
  64. #if !__STDC__
  65. /* compatibility with other compilers */
  66. #define strcmpi(s1,s2)      stricmp(s1,s2)
  67. #define strncmpi(s1,s2,n)   strnicmp(s1,s2,n)
  68.  
  69. void _FAR * _Cdecl _FARFUNC memccpy(void _FAR *__dest, const void _FAR *__src,
  70.                            int __c, size_t __n);
  71. int         _Cdecl _FARFUNC memicmp(const void _FAR *__s1, const void _FAR *__s2,
  72.                            size_t __n);
  73. void        _Cdecl _FARFUNC movedata(unsigned __srcseg,unsigned __srcoff,
  74.                             unsigned __dstseg,unsigned __dstoff, size_t __n);
  75. char * _Cdecl stpcpy(char *__dest, const char *__src);
  76. char _FAR * _Cdecl _FARFUNC strdup(const char _FAR *__s);
  77. int         _CType _FARFUNC stricmp(const char _FAR *__s1, const char _FAR *__s2);
  78. char _FAR * _Cdecl _FARFUNC strlwr(char _FAR *__s);
  79. int         _Cdecl _FARFUNC strnicmp(const char _FAR *__s1, const char _FAR *__s2,
  80.                             size_t __maxlen);
  81. char _FAR * _Cdecl _FARFUNC strnset(char _FAR *__s, int __ch, size_t __n);
  82. char _FAR * _Cdecl _FARFUNC strrev(char _FAR *__s);
  83. char _FAR * _Cdecl _FARFUNC strset(char _FAR *__s, int __ch);
  84. char _FAR * _Cdecl _FARFUNC strupr(char _FAR *__s);
  85.  
  86. void    far * _FARCALL cdecl _fmemccpy(void far *__dest, const void far *__src,
  87.                                 int c, size_t __n);
  88. void    far * _FARCALL cdecl _fmemchr(const void far *__s, int c, size_t __n);
  89. int           _FARCALL cdecl _fmemcmp(const void far *__s1, const void far *__s2,
  90.                                 size_t __n);
  91. void    far * _FARCALL cdecl _fmemcpy(void far *__dest, const void far *__src,
  92.                                 size_t __n);
  93. int           _FARCALL cdecl _fmemicmp(const void far *__s1, const void far *__s2,
  94.                                 size_t __n);
  95. void    far * _FARCALL cdecl _fmemmove(void far *__dest, const void far *__src,
  96.                                 size_t __n);
  97. void    far * _FARCALL cdecl _fmemset(void far *__s, int c, size_t __n);
  98. void          _FARCALL cdecl _fmovmem(void far *__src, void far *__dest,
  99.                                 unsigned __length);
  100. void          _FARCALL cdecl _fsetmem(void far *__dest,unsigned __length, 
  101.                                 char __value);
  102.  
  103. char    far * _FARCALL cdecl _fstrcat(char far *__dest, const char far *__src);
  104. char    far * _FARCALL cdecl _fstrchr(const char far *__s, int c);
  105. int           _FARCALL cdecl _fstrcmp(const char far *__s1, const char far *__s2);
  106. char    far * _FARCALL cdecl _fstrcpy(char far *__dest, const char far *__src);
  107. size_t        _FARCALL cdecl _fstrcspn(const char far *__s1, const char far *__s2);
  108. char    far * _FARCALL cdecl _fstrdup(const char far *__s);
  109. int           _FARCALL cdecl _fstricmp(const char far *__s1, const char far *__s2);
  110. size_t        _FARCALL cdecl _fstrlen(const char far *__s);
  111. char    far * _FARCALL cdecl _fstrlwr(char far *__s);
  112. char    far * _FARCALL cdecl _fstrncat(char far *__dest, const char far *__src,
  113.                          size_t maxlen);
  114. int           _FARCALL cdecl _fstrncmp(const char far *__s1, const char far *__s2,
  115.                          size_t maxlen);
  116. char    far * _FARCALL cdecl _fstrncpy(char far *__dest, const char far *__src,
  117.                          size_t maxlen);
  118. int           _FARCALL cdecl _fstrnicmp(const char far *__s1, const char far *__s2,
  119.                           size_t maxlen);
  120. char    far * _FARCALL cdecl _fstrnset(char far *__s, int ch, size_t __n);
  121. char    far * _FARCALL cdecl _fstrpbrk(const char far *__s1, const char far *__s2);
  122. char    far * _FARCALL cdecl _fstrrchr(const char far *__s, int c);
  123. char    far * _FARCALL cdecl _fstrrev(char far *__s);
  124. char    far * _FARCALL cdecl _fstrset(char far *__s, int ch);
  125. size_t        _FARCALL cdecl _fstrspn(const char far *__s1, const char far *__s2);
  126. char    far * _FARCALL cdecl _fstrstr(const char far *__s1, const char far *__s2);
  127. char    far * _FARCALL cdecl _fstrtok(char far *__s1, const char far *__s2);
  128. char    far * _FARCALL cdecl _fstrupr(char far *__s);
  129.  
  130. #endif
  131.  
  132. #ifdef __cplusplus
  133. }
  134. #endif
  135.  
  136. #endif
  137.