os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/string.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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.4.18.1 2005/04/26 00:46:02 das 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 #ifndef MAC_TCL
    28 #include <sys/types.h>
    29 #endif
    30 
    31 #ifdef __APPLE__
    32 extern VOID *		memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
    33 #else
    34 extern char *		memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
    35 #endif
    36 extern int		memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
    37 			    size_t n));
    38 extern char *		memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n));
    39 #ifdef NO_MEMMOVE
    40 #define memmove(d, s, n) bcopy ((s), (d), (n))
    41 #else
    42 extern char *		memmove _ANSI_ARGS_((VOID *t, CONST VOID *f,
    43 			    size_t n));
    44 #endif
    45 extern char *		memset _ANSI_ARGS_((VOID *s, int c, size_t n));
    46 
    47 extern int		strcasecmp _ANSI_ARGS_((CONST char *s1,
    48 			    CONST char *s2));
    49 extern char *		strcat _ANSI_ARGS_((char *dst, CONST char *src));
    50 extern char *		strchr _ANSI_ARGS_((CONST char *string, int c));
    51 extern int		strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2));
    52 extern char *		strcpy _ANSI_ARGS_((char *dst, CONST char *src));
    53 extern size_t		strcspn _ANSI_ARGS_((CONST char *string,
    54 			    CONST char *chars));
    55 extern char *		strdup _ANSI_ARGS_((CONST char *string));
    56 extern char *		strerror _ANSI_ARGS_((int error));
    57 extern size_t		strlen _ANSI_ARGS_((CONST char *string));
    58 extern int		strncasecmp _ANSI_ARGS_((CONST char *s1,
    59 			    CONST char *s2, size_t n));
    60 extern char *		strncat _ANSI_ARGS_((char *dst, CONST char *src,
    61 			    size_t numChars));
    62 extern int		strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
    63 			    size_t nChars));
    64 extern char *		strncpy _ANSI_ARGS_((char *dst, CONST char *src,
    65 			    size_t numChars));
    66 extern char *		strpbrk _ANSI_ARGS_((CONST char *string,
    67 			    CONST char *chars));
    68 extern char *		strrchr _ANSI_ARGS_((CONST char *string, int c));
    69 extern size_t		strspn _ANSI_ARGS_((CONST char *string,
    70 			    CONST char *chars));
    71 extern char *		strstr _ANSI_ARGS_((CONST char *string,
    72 			    CONST char *substring));
    73 extern char *		strtok _ANSI_ARGS_((char *s, CONST char *delim));
    74 
    75 #endif /* _STRING */