|
|
1.1 root 1: /* (-lgl
2: * COHERENT Version 3.2
3: * Copyright (c) 1982, 1993 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: /*
7: * string.h
8: * C string handling library header.
9: * Draft Proposed ANSI C Standard, Section 4.11, 5/13/88 draft.
10: */
11:
12: #ifndef __STRING_H__
13: #define __STRING_H__
14:
15: #include <common/feature.h>
16: #include <common/ccompat.h>
17: #include <common/_size.h>
18: #include <common/_null.h>
19:
20:
21: __EXTERN_C_BEGIN__
22:
23: __VOID__ * memcpy __PROTO ((__VOID__ * _s1,
24: __CONST__ __VOID__ * _s2,
25: size_t _n));
26: __VOID__ * memmove __PROTO ((__VOID__ * _s1,
27: __CONST__ __VOID__ * _s2,
28: size_t _n));
29: char * strcpy __PROTO ((char * _s1, __CONST__ char * _s2));
30: char * strncpy __PROTO ((char * _s1, __CONST__ char * _s2,
31: size_t _n));
32: char * strcat __PROTO ((char * _s1, __CONST__ char * _s2));
33: char * strncat __PROTO ((char * _s1, __CONST__ char * _s2,
34: size_t _n));
35: int memcmp __PROTO ((__CONST__ __VOID__ * _s1,
36: __CONST__ __VOID__ * _s2,
37: size_t _n));
38: int strcmp __PROTO ((__CONST__ char * _s1,
39: __CONST__ char * _s2));
40: int strcoll __PROTO ((__CONST__ char * _s1,
41: __CONST__ char * _s2));
42: int strncmp __PROTO ((__CONST__ char * _s1,
43: __CONST__ char * _s2, size_t _n));
44: size_t strxfrm __PROTO ((char * _s1, __CONST__ char * _s2,
45: size_t _n));
46: __VOID__ * memchr __PROTO ((__CONST__ __VOID__ * _s1, int _c,
47: size_t _n));
48: char * strchr __PROTO ((__CONST__ char * _s, int _c));
49: size_t strcspn __PROTO ((__CONST__ char * _s1,
50: __CONST__ char * _s2));
51: char * strpbrk __PROTO ((__CONST__ char * _s1,
52: __CONST__ char * _s2));
53: char * strrchr __PROTO ((__CONST__ char * _s1, int _c));
54: size_t strspn __PROTO ((__CONST__ char * _s1,
55: __CONST__ char * _s2));
56: char * strstr __PROTO ((__CONST__ char * _s1,
57: __CONST__ char * _s2));
58: char * strtok __PROTO ((char * _s1, __CONST__ char * _s2));
59: __VOID__ * memset __PROTO ((__VOID__ * _s, int _c, size_t _n));
60: char * strerror __PROTO ((int _errnum));
61: size_t strlen __PROTO ((__CONST__ char * _s));
62:
63: #if ! _STDC_SOURCE && ! _POSIX_SOURCE
64:
65: __VOID__ * memccpy __PROTO ((__VOID__ * _s1,
66: __CONST__ __VOID__ * _s2, int _c,
67: size_t _n));
68: char * strdup __PROTO ((__CONST__ char * _s));
69:
70:
71: /*
72: * While we are here, change calls to BSD-style string and memory functions
73: * into something more modern. Programs which attempt to take the address of
74: * the functions, or which attempt to access an underlying function, or
75: * which do not include this header *must* be changed.
76: */
77:
78: #define index(s,c) (strchr (s, c))
79: #define rindex(s,c) (strrchr (s, c))
80: #define bcopy(s2,s1,c) (memcpy (s1, s2, c))
81: #define bcmp(s1,s2,c) (memcmp (s2, s1, c))
82: #define bzero(s,c) (memset (s, 0, c))
83:
84: #endif
85:
86: __EXTERN_C_END__
87:
88: #if 1
89:
90: /* Internal function. */
91: extern void _memxchg();
92:
93: #endif /* not permitted in this header */
94:
95: #endif /* ! defined (__STRING_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.