summaryrefslogtreecommitdiffstats
path: root/compat/string.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-05-02 10:27:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-05-02 10:27:04 (GMT)
commitd5fc5663024f3eb25cbb19839bad08087fea9b4a (patch)
treea2961d8a6ed11aa358d492acf28db69f5b9ea4a0 /compat/string.h
parent1c67385eb956a4983ba5a685b4d6a7594a3cb9b3 (diff)
downloadtcl-d5fc5663024f3eb25cbb19839bad08087fea9b4a.zip
tcl-d5fc5663024f3eb25cbb19839bad08087fea9b4a.tar.gz
tcl-d5fc5663024f3eb25cbb19839bad08087fea9b4a.tar.bz2
More elimination of pre-C89-isms.
Diffstat (limited to 'compat/string.h')
-rw-r--r--compat/string.h74
1 files changed, 31 insertions, 43 deletions
diff --git a/compat/string.h b/compat/string.h
index 128b458..e452183 100644
--- a/compat/string.h
+++ b/compat/string.h
@@ -6,10 +6,10 @@
* Copyright (c) 1991-1993 The Regents of the University of California.
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
*
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: string.h,v 1.7 2005/05/10 18:33:53 kennykb Exp $
+ * RCS: @(#) $Id: string.h,v 1.8 2008/05/02 10:27:04 dkf Exp $
*/
#ifndef _STRING
@@ -18,56 +18,44 @@
#include <tcl.h>
/*
- * The following #include is needed to define size_t. (This used to
- * include sys/stdtypes.h but that doesn't exist on older versions
- * of SunOS, e.g. 4.0.2, so I'm trying sys/types.h now.... hopefully
- * it exists everywhere)
+ * The following #include is needed to define size_t. (This used to include
+ * sys/stdtypes.h but that doesn't exist on older versions of SunOS, e.g.
+ * 4.0.2, so I'm trying sys/types.h now.... hopefully it exists everywhere)
*/
#include <sys/types.h>
#ifdef __APPLE__
-extern VOID * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
+extern void * memchr(const void *s, int c, size_t n);
#else
-extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
+extern char * memchr(const void *s, int c, size_t n);
#endif
-extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
- size_t n));
-extern char * memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n));
+extern int memcmp(const void *s1, const void *s2, size_t n);
+extern char * memcpy(void *t, const void *f, size_t n);
#ifdef NO_MEMMOVE
-#define memmove(d, s, n) bcopy ((s), (d), (n))
+#define memmove(d,s,n) (bcopy((s), (d), (n)))
#else
-extern char * memmove _ANSI_ARGS_((VOID *t, CONST VOID *f,
- size_t n));
+extern char * memmove(void *t, const void *f, size_t n);
#endif
-extern char * memset _ANSI_ARGS_((VOID *s, int c, size_t n));
+extern char * memset(void *s, int c, size_t n);
-extern int strcasecmp _ANSI_ARGS_((CONST char *s1,
- CONST char *s2));
-extern char * strcat _ANSI_ARGS_((char *dst, CONST char *src));
-extern char * strchr _ANSI_ARGS_((CONST char *string, int c));
-extern int strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2));
-extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src));
-extern size_t strcspn _ANSI_ARGS_((CONST char *string,
- CONST char *chars));
-extern char * strdup _ANSI_ARGS_((CONST char *string));
-extern char * strerror _ANSI_ARGS_((int error));
-extern size_t strlen _ANSI_ARGS_((CONST char *string));
-extern int strncasecmp _ANSI_ARGS_((CONST char *s1,
- CONST char *s2, size_t n));
-extern char * strncat _ANSI_ARGS_((char *dst, CONST char *src,
- size_t numChars));
-extern int strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
- size_t nChars));
-extern char * strncpy _ANSI_ARGS_((char *dst, CONST char *src,
- size_t numChars));
-extern char * strpbrk _ANSI_ARGS_((CONST char *string,
- CONST char *chars));
-extern char * strrchr _ANSI_ARGS_((CONST char *string, int c));
-extern size_t strspn _ANSI_ARGS_((CONST char *string,
- CONST char *chars));
-extern char * strstr _ANSI_ARGS_((CONST char *string,
- CONST char *substring));
-extern char * strtok _ANSI_ARGS_((char *s, CONST char *delim));
+extern int strcasecmp(const char *s1, const char *s2);
+extern char * strcat(char *dst, const char *src);
+extern char * strchr(const char *string, int c);
+extern int strcmp(const char *s1, const char *s2);
+extern char * strcpy(char *dst, const char *src);
+extern size_t strcspn(const char *string, const char *chars);
+extern char * strdup(const char *string);
+extern char * strerror(int error);
+extern size_t strlen(const char *string);
+extern int strncasecmp(const char *s1, const char *s2, size_t n);
+extern char * strncat(char *dst, const char *src, size_t numChars);
+extern int strncmp(const char *s1, const char *s2,size_t nChars);
+extern char * strncpy(char *dst, const char *src, size_t numChars);
+extern char * strpbrk(const char *string, const char *chars);
+extern char * strrchr(const char *string, int c);
+extern size_t strspn(const char *string, const char *chars);
+extern char * strstr(const char *string, const char *substring);
+extern char * strtok(char *s, const char *delim);
#endif /* _STRING */