home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / LATTIC_3.LZH / HEADERS / STRING.H < prev    next >
C/C++ Source or Header  |  1990-06-11  |  4KB  |  149 lines

  1. /*
  2.  * string.h - string and memory operations interface file
  3.  *
  4.  * Started 30/8/89 Alex G. Kiernan, based on Lattice source
  5.  *
  6.  * Copyright (c) 1989 HiSoft and Lattice, Inc.
  7.  */
  8.  
  9. #ifndef _STRING_H
  10. #define _STRING_H
  11.  
  12. #ifndef    _SIZE_T
  13. #define    _SIZE_T
  14. typedef unsigned long int size_t;
  15. #endif
  16.  
  17. extern char _SLASH;        /* path separator character */
  18.  
  19. /*
  20.  *
  21.  * External definitions for string services
  22.  *
  23.  */
  24. char *strcat(char *, const char *);
  25. char *strchr(const char *, int);
  26. int strcmp(const char *, const char *);
  27. char *strcpy(char *, const char *);
  28. size_t strcspn(const char *, const char *);
  29. size_t strspn(const char *, const char *);
  30. size_t strlen(const char *);
  31. char *strncat(char *, const char *, size_t);
  32. int strncmp(const char *, const char *, size_t);
  33. char *strncpy(char *, const char *, size_t);
  34. char *strpbrk(const char *, const char *);
  35. char *strrchr(const char *, int);
  36. char *strstr(const char *, const char *);
  37. char *strtok(char *, const char *);
  38. char *strerror(int);
  39. int strcoll(const char *, const char *);
  40. size_t strxfrm(char *, const char *, size_t);
  41.  
  42. size_t __builtin_strlen(const char *);
  43. char *__builtin_strcpy(char *, const char *);
  44. int __builtin_strcmp(const char *, const char *);
  45.  
  46. #define strlen(x)    __builtin_strlen(x)
  47. #define strcpy(x,y)    __builtin_strcpy(x,y)
  48. #define strcmp(x,y)    __builtin_strcmp(x,y)
  49.  
  50. #if !defined __STDC__ || __STDC__ != 1
  51.  
  52. size_t stcarg(const char *, const char *);
  53. size_t stccpy(char *to, const char *from, size_t length);
  54. char *stpcpy(char *, const char *);
  55. char *strdup(const char *);
  56. void strins(char *, const char *);
  57. char *strnset(char *, int, size_t);
  58. char *strrev(char *);
  59. size_t stcis(const char *, const char *);
  60. size_t stcisn(const char *, const char *);
  61. size_t stcpm(const char *, const char *, char **);
  62. size_t stcpma(const char *, const char *);
  63. char *stpblk(const char *);
  64. char *stpbrk(const char *, const char *);
  65. char *stpchr(const char *, int);
  66. char *stpsym(const char *, char *, size_t);
  67. char *stpchrn(const char *, int);
  68. char *stptok(const char *, char *, size_t, const char *);
  69. long strbpl(char **, size_t, const char *);
  70.  
  71. int stcgfe(char *, char *);
  72. int stcgfn(char *, char *);
  73. int stcd_i(const char *, int *);
  74. int stcd_l(const char *, long *);
  75. int stch_i(const char *, int *);
  76. int stch_l(const char *, long *);
  77. int stci_d(const char *, int);
  78. int stci_h(const char *, int);
  79. int stci_o(const char *, int);
  80. int stcl_d(const char *, long);
  81. int stcl_h(const char *, long);
  82. int stcl_o(const char *, long);
  83. int stco_i(const char *, int *);
  84. int stco_l(const char *, long *);
  85. int stcsma(char *, char *);
  86. int stcu_d(char *, unsigned);
  87. int stcul_d(char *, unsigned long);
  88.  
  89. size_t stclen(const char *);
  90. #define stclen(a) strlen(a)
  91.  
  92. char *stpdate(char *, int, char *);
  93. char *stptime(char *, int, char *);
  94.  
  95. int strmid(const char *, char *, size_t, size_t);
  96. char *strlwr(char *);
  97. void strmfe(char *, const char *, const char *);
  98. void strmfn(char *, const char *, const char *, const char *, const char *);
  99. void strmfp(char *, const char *, const char *);
  100. int stcgfp(char *, const char *);
  101.  
  102. int strnicmp(const char *, const char *, size_t);
  103. int stricmp(const char *, const char *);
  104.  
  105. char *strset(char *, int);
  106. void strsfn(const char *, char *, char *, char *, char *);
  107. char *strupr(char *);
  108. int stspfp(char *, int *);
  109. void strsrt(char *[], size_t);
  110.  
  111.  
  112. #define strcmpi stricmp        /* For Microsoft compatibility */
  113.  
  114. #endif
  115. /*
  116.  *
  117.  * External definitions for memory block services
  118.  *
  119.  */
  120. void *memchr(const void *, int, size_t);
  121. int memcmp(const void *, const void *, size_t);
  122. void *memcpy(void *, const void *, size_t);
  123. void *memmove(void *, const void *, size_t);
  124. void *memset(void *, int, size_t);
  125.  
  126. void *__builtin_memset(void *, int, size_t);
  127. int __builtin_memcmp(const void *, const void *, size_t);
  128. void *__builtin_memcpy(void *, const void *, size_t);
  129.  
  130. #define memset(x,y,z)    __builtin_memset(x,y,z)
  131. #define memcmp(x,y,z)    __builtin_memcmp(x,y,z)
  132. #define memcpy(x,y,z)    __builtin_memcpy(x,y,z)
  133.  
  134. #if !defined __STDC__ || __STDC__ != 1
  135.  
  136. void *memccpy(void *, const void *, int, size_t);
  137. void *memswp(void *, void *, size_t);
  138. void *memrep(void *, void *, size_t, size_t);
  139.  
  140. void setmem(void *, unsigned, int);
  141. void movmem(void *, void *, unsigned);
  142. void repmem(void *, void *, unsigned, unsigned);
  143. void swmem(void *, void *, unsigned);
  144. #endif
  145.  
  146. #define    NULL    ((void *)0)
  147.  
  148. #endif
  149.