summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredman <redman>1999-07-22 01:08:03 (GMT)
committerredman <redman>1999-07-22 01:08:03 (GMT)
commit54b6980992593dd026c12db3f5aaef9dce67e0e3 (patch)
tree5dbfa8778122c25040f24668b6e635cf0ab23b40
parent0921ebbcedf454aec8e95005807f6f564f812299 (diff)
downloadtcl-54b6980992593dd026c12db3f5aaef9dce67e0e3.zip
tcl-54b6980992593dd026c12db3f5aaef9dce67e0e3.tar.gz
tcl-54b6980992593dd026c12db3f5aaef9dce67e0e3.tar.bz2
* doc/Utf.3:
* generic/tcl.decls: * generic/tclInt.decls: * generic/tclDecls.h: * generic/tclIntDecls.h: * generic/tclUtf.c: * compat/strftime.c: * unix/tclUnixTime.c: Changed function declarations in non-platform-specific APIs to use "unsigned long" instead of "size_t", which may not be defined on certain compilers (rather than include sys/types.h, which may not exist).
-rw-r--r--ChangeLog12
-rw-r--r--compat/strftime.c12
-rw-r--r--doc/Utf.34
-rw-r--r--generic/tcl.decls9
-rw-r--r--generic/tclDecls.h14
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntDecls.h6
-rw-r--r--generic/tclUtf.c8
-rw-r--r--unix/tclUnixTime.c6
9 files changed, 44 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index aa993d3..0488403 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
1999-07-21 <redman@scriptics.com>
+ * doc/Utf.3:
+ * generic/tcl.decls:
+ * generic/tclInt.decls:
+ * generic/tclDecls.h:
+ * generic/tclIntDecls.h:
+ * generic/tclUtf.c:
+ * compat/strftime.c:
+ * unix/tclUnixTime.c: Changed function declarations in
+ non-platform-specific APIs to use "unsigned long" instead of
+ "size_t", which may not be defined on certain compilers (rather
+ than include sys/types.h, which may not exist).
+
* unix/Makefile.in: Added the Windows configure script to the
distribution file list, already shipping configure.in and the .m4
files, but needed the configure script itself.
diff --git a/compat/strftime.c b/compat/strftime.c
index d588433..8f93a1a 100644
--- a/compat/strftime.c
+++ b/compat/strftime.c
@@ -8,7 +8,7 @@
* source. See the copyright notice below for details on redistribution
* restrictions. The "license.terms" file does not apply to this file.
*
- * RCS: @(#) $Id: strftime.c,v 1.3 1999/04/16 00:46:30 stanton Exp $
+ * RCS: @(#) $Id: strftime.c,v 1.4 1999/07/22 01:08:04 redman Exp $
*/
/*
@@ -45,7 +45,7 @@
*/
#if defined(LIBC_SCCS)
-static char *rcsid = "$Id: strftime.c,v 1.3 1999/04/16 00:46:30 stanton Exp $";
+static char *rcsid = "$Id: strftime.c,v 1.4 1999/07/22 01:08:04 redman Exp $";
#endif /* LIBC_SCCS */
#include <time.h>
@@ -104,7 +104,7 @@ static int _secs _ANSI_ARGS_((const struct tm *t));
static size_t _fmt _ANSI_ARGS_((const char *format,
const struct tm *t));
-size_t
+unsigned long
TclpStrftime(s, maxsize, format, t)
char *s;
size_t maxsize;
@@ -115,12 +115,12 @@ TclpStrftime(s, maxsize, format, t)
pt = s;
if ((gsize = maxsize) < 1)
- return(0);
+ return (unsigned long)(0);
if (_fmt(format, t)) {
*pt = '\0';
- return(maxsize - gsize);
+ return (unsigned long) (maxsize - gsize);
}
- return(0);
+ return (unsigned long)(0);
}
#define SUN_WEEK(t) (((t)->tm_yday + 7 - \
diff --git a/doc/Utf.3 b/doc/Utf.3
index b3b3a4b..45847a1 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.5 1999/05/06 19:14:42 stanton Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.6 1999/07/22 01:08:04 redman Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -88,7 +88,7 @@ The length of the Unicode string in characters. Must be greater than or
equal to 0.
.AP "Tcl_DString" *dstPtr in/out
A pointer to a previously-initialized \fBTcl_DString\fR.
-.AP size_t n in
+.AP "unsigned long" num in
The number of characters to compare.
.AP "CONST char" *start in
Pointer to the beginning of a UTF-8 string.
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 04bd7e5..32dc15a 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tcl.decls,v 1.21 1999/07/16 21:56:38 redman Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.22 1999/07/22 01:08:04 redman Exp $
library tcl
@@ -1218,7 +1218,8 @@ declare 352 generic {
int Tcl_UniCharLen(Tcl_UniChar *str)
}
declare 353 generic {
- int Tcl_UniCharNcmp(CONST Tcl_UniChar *cs, CONST Tcl_UniChar *ct, size_t n)
+ int Tcl_UniCharNcmp(CONST Tcl_UniChar *cs, CONST Tcl_UniChar *ct,\
+ unsigned long n)
}
declare 354 generic {
char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *string, int numChars, \
@@ -1276,10 +1277,10 @@ declare 368 generic {
int Tcl_Stat(CONST char *path, struct stat *bufPtr)
}
declare 369 generic {
- int Tcl_UtfNcmp(CONST char *s1, CONST char *s2, size_t n)
+ int Tcl_UtfNcmp(CONST char *s1, CONST char *s2, unsigned long n)
}
declare 370 generic {
- int Tcl_UtfNcasecmp(CONST char *s1, CONST char *s2, size_t n)
+ int Tcl_UtfNcasecmp(CONST char *s1, CONST char *s2, unsigned long n)
}
declare 371 generic {
int Tcl_StringCaseMatch(CONST char *str, CONST char *pattern, int nocase)
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 9bcd17c..eb1c35a 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDecls.h,v 1.22 1999/07/16 21:56:38 redman Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.23 1999/07/22 01:08:04 redman Exp $
*/
#ifndef _TCLDECLS
@@ -1105,7 +1105,7 @@ EXTERN int Tcl_UniCharIsWordChar _ANSI_ARGS_((int ch));
EXTERN int Tcl_UniCharLen _ANSI_ARGS_((Tcl_UniChar * str));
/* 353 */
EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar * cs,
- CONST Tcl_UniChar * ct, size_t n));
+ CONST Tcl_UniChar * ct, unsigned long n));
/* 354 */
EXTERN char * Tcl_UniCharToUtfDString _ANSI_ARGS_((
CONST Tcl_UniChar * string, int numChars,
@@ -1160,10 +1160,10 @@ EXTERN int Tcl_Stat _ANSI_ARGS_((CONST char * path,
struct stat * bufPtr));
/* 369 */
EXTERN int Tcl_UtfNcmp _ANSI_ARGS_((CONST char * s1,
- CONST char * s2, size_t n));
+ CONST char * s2, unsigned long n));
/* 370 */
EXTERN int Tcl_UtfNcasecmp _ANSI_ARGS_((CONST char * s1,
- CONST char * s2, size_t n));
+ CONST char * s2, unsigned long n));
/* 371 */
EXTERN int Tcl_StringCaseMatch _ANSI_ARGS_((CONST char * str,
CONST char * pattern, int nocase));
@@ -1628,7 +1628,7 @@ typedef struct TclStubs {
int (*tcl_UniCharIsUpper) _ANSI_ARGS_((int ch)); /* 350 */
int (*tcl_UniCharIsWordChar) _ANSI_ARGS_((int ch)); /* 351 */
int (*tcl_UniCharLen) _ANSI_ARGS_((Tcl_UniChar * str)); /* 352 */
- int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, size_t n)); /* 353 */
+ int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 353 */
char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */
Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */
Tcl_RegExp (*tcl_GetRegExpFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * patObj, int flags)); /* 356 */
@@ -1644,8 +1644,8 @@ typedef struct TclStubs {
int (*tcl_Chdir) _ANSI_ARGS_((CONST char * dirName)); /* 366 */
int (*tcl_Access) _ANSI_ARGS_((CONST char * path, int mode)); /* 367 */
int (*tcl_Stat) _ANSI_ARGS_((CONST char * path, struct stat * bufPtr)); /* 368 */
- int (*tcl_UtfNcmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 369 */
- int (*tcl_UtfNcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 370 */
+ int (*tcl_UtfNcmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, unsigned long n)); /* 369 */
+ int (*tcl_UtfNcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, unsigned long n)); /* 370 */
int (*tcl_StringCaseMatch) _ANSI_ARGS_((CONST char * str, CONST char * pattern, int nocase)); /* 371 */
int (*tcl_UniCharIsControl) _ANSI_ARGS_((int ch)); /* 372 */
int (*tcl_UniCharIsGraph) _ANSI_ARGS_((int ch)); /* 373 */
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 48cb4dd..26b02d4 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.12 1999/06/30 22:34:44 redman Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.13 1999/07/22 01:08:05 redman Exp $
library tcl
@@ -502,7 +502,7 @@ declare 133 generic {
struct tm * TclpGetDate(TclpTime_t time, int useGMT)
}
declare 134 generic {
- size_t TclpStrftime(char *s, size_t maxsize, CONST char *format, \
+ unsigned long TclpStrftime(char *s, size_t maxsize, CONST char *format, \
CONST struct tm *t)
}
declare 135 generic {
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 8f3ff12..89292bb 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.12 1999/06/30 22:34:44 redman Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.13 1999/07/22 01:08:05 redman Exp $
*/
#ifndef _TCLINTDECLS
@@ -452,7 +452,7 @@ EXTERN int TclpHasSockets _ANSI_ARGS_((Tcl_Interp * interp));
/* 133 */
EXTERN struct tm * TclpGetDate _ANSI_ARGS_((TclpTime_t time, int useGMT));
/* 134 */
-EXTERN size_t TclpStrftime _ANSI_ARGS_((char * s, size_t maxsize,
+EXTERN unsigned long TclpStrftime _ANSI_ARGS_((char * s, size_t maxsize,
CONST char * format, CONST struct tm * t));
/* 135 */
EXTERN int TclpCheckStackSpace _ANSI_ARGS_((void));
@@ -667,7 +667,7 @@ typedef struct TclIntStubs {
void (*tcl_SetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 131 */
int (*tclpHasSockets) _ANSI_ARGS_((Tcl_Interp * interp)); /* 132 */
struct tm * (*tclpGetDate) _ANSI_ARGS_((TclpTime_t time, int useGMT)); /* 133 */
- size_t (*tclpStrftime) _ANSI_ARGS_((char * s, size_t maxsize, CONST char * format, CONST struct tm * t)); /* 134 */
+ unsigned long (*tclpStrftime) _ANSI_ARGS_((char * s, size_t maxsize, CONST char * format, CONST struct tm * t)); /* 134 */
int (*tclpCheckStackSpace) _ANSI_ARGS_((void)); /* 135 */
void *reserved136;
int (*tclpChdir) _ANSI_ARGS_((CONST char * dirName)); /* 137 */
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 9b21f4f..8a2354e 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtf.c,v 1.9 1999/06/24 03:27:57 stanton Exp $
+ * RCS: @(#) $Id: tclUtf.c,v 1.10 1999/07/22 01:08:05 redman Exp $
*/
#include "tclInt.h"
@@ -1080,7 +1080,7 @@ int
Tcl_UtfNcmp(cs, ct, n)
CONST char *cs; /* UTF string to compare to ct. */
CONST char *ct; /* UTF string cs is compared to. */
- size_t n; /* Number of UTF chars to compare. */
+ unsigned long n; /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
/*
@@ -1127,7 +1127,7 @@ int
Tcl_UtfNcasecmp(cs, ct, n)
CONST char *cs; /* UTF string to compare to ct. */
CONST char *ct; /* UTF string cs is compared to. */
- size_t n; /* Number of UTF chars to compare. */
+ unsigned long n; /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
while (n-- > 0) {
@@ -1294,7 +1294,7 @@ int
Tcl_UniCharNcmp(cs, ct, n)
CONST Tcl_UniChar *cs; /* Unicode string to compare to ct. */
CONST Tcl_UniChar *ct; /* Unicode string cs is compared to. */
- size_t n; /* Number of unichars to compare. */
+ unsigned long n; /* Number of unichars to compare. */
{
for ( ; n != 0; n--, cs++, ct++) {
if (*cs != *ct) {
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 9427999..853ab2c 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTime.c,v 1.4 1999/04/16 00:48:06 stanton Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.5 1999/07/22 01:08:05 redman Exp $
*/
#include "tclInt.h"
@@ -288,12 +288,12 @@ TclpGetDate(time, useGMT)
*----------------------------------------------------------------------
*/
-size_t
+unsigned long
TclpStrftime(s, maxsize, format, t)
char *s;
size_t maxsize;
CONST char *format;
CONST struct tm *t;
{
- return strftime(s, maxsize, format, t);
+ return (unsigned long) strftime(s, maxsize, format, t);
}