1 | /* |
---|
2 | * string.h -- |
---|
3 | * |
---|
4 | * Declarations of ANSI C library procedures for string handling. |
---|
5 | * |
---|
6 | * Copyright (c) 1991-1993 The Regents of the University of California. |
---|
7 | * Copyright (c) 1994-1996 Sun Microsystems, Inc. |
---|
8 | * |
---|
9 | * See the file "license.terms" for information on usage and redistribution |
---|
10 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
11 | * |
---|
12 | * RCS: @(#) $Id: string.h,v 1.7 2005/05/10 18:33:53 kennykb Exp $ |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef _STRING |
---|
16 | #define _STRING |
---|
17 | |
---|
18 | #include <tcl.h> |
---|
19 | |
---|
20 | /* |
---|
21 | * The following #include is needed to define size_t. (This used to |
---|
22 | * include sys/stdtypes.h but that doesn't exist on older versions |
---|
23 | * of SunOS, e.g. 4.0.2, so I'm trying sys/types.h now.... hopefully |
---|
24 | * it exists everywhere) |
---|
25 | */ |
---|
26 | |
---|
27 | #include <sys/types.h> |
---|
28 | |
---|
29 | #ifdef __APPLE__ |
---|
30 | extern VOID * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n)); |
---|
31 | #else |
---|
32 | extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n)); |
---|
33 | #endif |
---|
34 | extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2, |
---|
35 | size_t n)); |
---|
36 | extern char * memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n)); |
---|
37 | #ifdef NO_MEMMOVE |
---|
38 | #define memmove(d, s, n) bcopy ((s), (d), (n)) |
---|
39 | #else |
---|
40 | extern char * memmove _ANSI_ARGS_((VOID *t, CONST VOID *f, |
---|
41 | size_t n)); |
---|
42 | #endif |
---|
43 | extern char * memset _ANSI_ARGS_((VOID *s, int c, size_t n)); |
---|
44 | |
---|
45 | extern int strcasecmp _ANSI_ARGS_((CONST char *s1, |
---|
46 | CONST char *s2)); |
---|
47 | extern char * strcat _ANSI_ARGS_((char *dst, CONST char *src)); |
---|
48 | extern char * strchr _ANSI_ARGS_((CONST char *string, int c)); |
---|
49 | extern int strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2)); |
---|
50 | extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src)); |
---|
51 | extern size_t strcspn _ANSI_ARGS_((CONST char *string, |
---|
52 | CONST char *chars)); |
---|
53 | extern char * strdup _ANSI_ARGS_((CONST char *string)); |
---|
54 | extern char * strerror _ANSI_ARGS_((int error)); |
---|
55 | extern size_t strlen _ANSI_ARGS_((CONST char *string)); |
---|
56 | extern int strncasecmp _ANSI_ARGS_((CONST char *s1, |
---|
57 | CONST char *s2, size_t n)); |
---|
58 | extern char * strncat _ANSI_ARGS_((char *dst, CONST char *src, |
---|
59 | size_t numChars)); |
---|
60 | extern int strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2, |
---|
61 | size_t nChars)); |
---|
62 | extern char * strncpy _ANSI_ARGS_((char *dst, CONST char *src, |
---|
63 | size_t numChars)); |
---|
64 | extern char * strpbrk _ANSI_ARGS_((CONST char *string, |
---|
65 | CONST char *chars)); |
---|
66 | extern char * strrchr _ANSI_ARGS_((CONST char *string, int c)); |
---|
67 | extern size_t strspn _ANSI_ARGS_((CONST char *string, |
---|
68 | CONST char *chars)); |
---|
69 | extern char * strstr _ANSI_ARGS_((CONST char *string, |
---|
70 | CONST char *substring)); |
---|
71 | extern char * strtok _ANSI_ARGS_((char *s, CONST char *delim)); |
---|
72 | |
---|
73 | #endif /* _STRING */ |
---|