Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / h / strings.h
1 /* strings.h - define standard string functions */
2 /* @(#)$Id: strings.h,v 1.20 1995/12/06 23:48:12 jromine Exp $ */
3
4 #ifndef _STRINGS                /* once-only... */
5 #define _STRINGS
6
7 #ifdef AUX
8 #include <stdlib.h>
9 #endif
10
11 #ifdef _AIX
12 #include <string.h>
13 #include <stdlib.h>
14
15 #define bcmp(b1,b2,length)      memcmp(b1, b2, length)
16 #define bcopy(b1,b2,length)     (void) memcpy (b2, b1, length)
17 #define bcpy(b1,b2,length)      memcmp (b1, b2, length)
18 #define bzero(b,length)         (void) memset (b, 0, length)
19
20 #else /* _AIX */
21
22 #ifdef  SYS5
23 #define index   strchr
24 #define rindex  strrchr
25 #endif /* SYS5 */
26
27 #if     defined(BSD42) || defined(SVR4)
28 #if !defined(SVR4) && !defined(__386BSD__) && !defined(BSD44)
29 #include <strings.h>
30 #else
31 #include <string.h>
32 #include <stdlib.h>
33 #endif
34 #else   /* not BSD42 || SVR4 */
35 char   *index ();
36 char   *mktemp ();
37 char   *rindex ();
38 #ifndef SPRINTFTYPE
39 #ifndef ncr             /* NCR compiler complains about re-declaration */
40 char   *sprintf ();             /* I guess this is the new standard */
41 #endif
42 #else
43 SPRINTFTYPE sprintf ();
44 #endif
45 char   *strcat ();
46 int     strcmp ();
47 char   *strcpy ();
48 int     strlen ();
49 char   *strncat ();
50 int     strncmp ();
51 char   *strncpy ();
52 #endif
53
54 #if !defined(SVR4) && !defined(__386BSD__) && !defined(BSD44)
55 char   *getenv ();
56 char   *calloc (), *malloc (), *realloc ();
57 #endif  /* SVR4 */
58
59 #ifdef  SYS5
60 #include <memory.h>
61 #define bcmp(b1,b2,length)      memcmp(b1, b2, length)
62 #define bcopy(b1,b2,length)     (void) memcpy (b2, b1, length)
63 #define bcpy(b1,b2,length)      memcmp (b1, b2, length)
64 #define bzero(b,length)         (void) memset (b, 0, length)
65 #endif /* SYS5 */
66 #endif  /* _AIX */
67 #endif /* not _STRINGS */
68
69 #if !defined(bcopy) && (defined(__HIGHC__) || __GNUC__ == 2)
70 #define bcopy(s,d,l)    memcpy(d,s,l)
71 #endif