summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-01-22 06:42:33 (GMT)
committernijtmans <nijtmans>2009-01-22 06:42:33 (GMT)
commit1cc677fe337ed9c32c7a1bbaafc2988e98a8076f (patch)
tree6d0ba0d888c02ee1ac8ad6f7a50157036d96fbd9
parented5043f99afd5932ca7403cf20b19383d20dc9dc (diff)
downloadtcl-1cc677fe337ed9c32c7a1bbaafc2988e98a8076f.zip
tcl-1cc677fe337ed9c32c7a1bbaafc2988e98a8076f.tar.gz
tcl-1cc677fe337ed9c32c7a1bbaafc2988e98a8076f.tar.bz2
CONSTify TclPrintInstruction and TclpNativeJoinPath (TIP #27)
{unix win} in *.decls is equivalent to {generic} tclGetDate.y, tclDate.c: single internal const decoration
-rw-r--r--ChangeLog13
-rw-r--r--generic/tcl.decls8
-rw-r--r--generic/tclCompile.c8
-rw-r--r--generic/tclCompile.h4
-rw-r--r--generic/tclDate.c2
-rw-r--r--generic/tclDecls.h118
-rw-r--r--generic/tclFileName.c23
-rw-r--r--generic/tclGetDate.y4
-rw-r--r--generic/tclInt.decls8
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclIntDecls.h124
11 files changed, 47 insertions, 269 deletions
diff --git a/ChangeLog b/ChangeLog
index 15025f3..ac5b07d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-01-22 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclCompile.h: CONSTify TclPrintInstruction (TIP #27)
+ * generic/tclCompile.c
+ * generic/tclInt.h: CONSTify TclpNativeJoinPath (TIP #27)
+ * generic/tclFileName.c
+ * generic/tcl.decls {unix win} is equivalent to {generic}
+ * generic/tclInt.decls
+ * generic/tclDecls.h (regenerated)
+ * generic/tclIntDecls.h
+ * generic/tclGetDate.y: single internal const decoration
+ * generic/tclDate.c:
+
2009-01-22 Kevin B. Kenny <kennykb@acm.org>
* unix/tcl.m4: Corrected a typo ($(SHLIB_VERSION) should be
diff --git a/generic/tcl.decls b/generic/tcl.decls
index a9a5bcf..a95acf8 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -12,7 +12,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.167 2008/12/27 10:07:06 dkf Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.168 2009/01/22 06:42:33 nijtmans Exp $
library tcl
@@ -412,7 +412,7 @@ declare 109 generic {
declare 110 generic {
void Tcl_DeleteInterp(Tcl_Interp *interp)
}
-declare 111 {unix win} {
+declare 111 generic {
void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr)
}
declare 112 generic {
@@ -703,7 +703,7 @@ declare 196 generic {
Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags)
}
-declare 197 {unix win} {
+declare 197 generic {
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
CONST84 char **argv, int flags)
}
@@ -739,7 +739,7 @@ declare 205 generic {
declare 206 generic {
int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead)
}
-declare 207 {unix win} {
+declare 207 generic {
void Tcl_ReapDetachedProcs(void)
}
declare 208 generic {
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index d93e321..8e68d7d 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -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: tclCompile.c,v 1.164 2009/01/09 11:21:45 dkf Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.165 2009/01/22 06:42:33 nijtmans Exp $
*/
#include "tclInt.h"
@@ -2151,7 +2151,7 @@ TclFindCompiledLocal(
*/
LocalCache *cachePtr = envPtr->iPtr->varFramePtr->localCachePtr;
- char *localName;
+ const char *localName;
Tcl_Obj **varNamePtr;
int len;
@@ -3368,7 +3368,7 @@ TclPrintByteCodeObj(
int
TclPrintInstruction(
ByteCode *codePtr, /* Bytecode containing the instruction. */
- unsigned char *pc) /* Points to first byte of instruction. */
+ const unsigned char *pc) /* Points to first byte of instruction. */
{
Tcl_Obj *bufferObj;
int numBytes;
@@ -3839,7 +3839,7 @@ FormatInstruction(
}
}
if (suffixObj) {
- char *bytes;
+ const char *bytes;
int length;
Tcl_AppendToObj(bufferObj, "\t# ", -1);
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index f42247d..c0d18e4 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -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: tclCompile.h,v 1.113 2008/10/28 23:29:54 nijtmans Exp $
+ * RCS: @(#) $Id: tclCompile.h,v 1.114 2009/01/22 06:42:33 nijtmans Exp $
*/
#ifndef _TCLCOMPILATION
@@ -925,7 +925,7 @@ MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp,
Tcl_Obj *objPtr);
#endif
MODULE_SCOPE int TclPrintInstruction(ByteCode* codePtr,
- unsigned char *pc);
+ const unsigned char *pc);
MODULE_SCOPE void TclPrintObject(FILE *outFile,
Tcl_Obj *objPtr, int maxChars);
MODULE_SCOPE void TclPrintSource(FILE *outFile,
diff --git a/generic/tclDate.c b/generic/tclDate.c
index eabd37a..94b3caf 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -178,7 +178,7 @@ typedef struct DateInfo {
time_t dateDayNumber;
int dateHaveDay;
- char *dateInput;
+ const char *dateInput;
time_t *dateRelPointer;
int dateDigitCount;
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index a680700..4eadfa2 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.168 2008/12/27 10:07:06 dkf Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.169 2009/01/22 06:42:33 nijtmans Exp $
*/
#ifndef _TCLDECLS
@@ -708,27 +708,11 @@ EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr);
/* 110 */
EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp);
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tcl_DetachPids_TCL_DECLARED
-#define Tcl_DetachPids_TCL_DECLARED
-/* 111 */
-EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr);
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef Tcl_DetachPids_TCL_DECLARED
-#define Tcl_DetachPids_TCL_DECLARED
-/* 111 */
-EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr);
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef Tcl_DetachPids_TCL_DECLARED
#define Tcl_DetachPids_TCL_DECLARED
/* 111 */
EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr);
#endif
-#endif /* MACOSX */
#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED
#define Tcl_DeleteTimerHandler_TCL_DECLARED
/* 112 */
@@ -1217,30 +1201,12 @@ EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp,
Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
Tcl_Obj * newValuePtr, int flags);
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tcl_OpenCommandChannel_TCL_DECLARED
-#define Tcl_OpenCommandChannel_TCL_DECLARED
-/* 197 */
-EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp,
- int argc, CONST84 char ** argv, int flags);
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef Tcl_OpenCommandChannel_TCL_DECLARED
-#define Tcl_OpenCommandChannel_TCL_DECLARED
-/* 197 */
-EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp,
- int argc, CONST84 char ** argv, int flags);
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef Tcl_OpenCommandChannel_TCL_DECLARED
#define Tcl_OpenCommandChannel_TCL_DECLARED
/* 197 */
EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp,
int argc, CONST84 char ** argv, int flags);
#endif
-#endif /* MACOSX */
#ifndef Tcl_OpenFileChannel_TCL_DECLARED
#define Tcl_OpenFileChannel_TCL_DECLARED
/* 198 */
@@ -1296,27 +1262,11 @@ EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr,
EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr,
int toRead);
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED
#define Tcl_ReapDetachedProcs_TCL_DECLARED
/* 207 */
EXTERN void Tcl_ReapDetachedProcs (void);
#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED
-#define Tcl_ReapDetachedProcs_TCL_DECLARED
-/* 207 */
-EXTERN void Tcl_ReapDetachedProcs (void);
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED
-#define Tcl_ReapDetachedProcs_TCL_DECLARED
-/* 207 */
-EXTERN void Tcl_ReapDetachedProcs (void);
-#endif
-#endif /* MACOSX */
#ifndef Tcl_RecordAndEval_TCL_DECLARED
#define Tcl_RecordAndEval_TCL_DECLARED
/* 208 */
@@ -3913,15 +3863,7 @@ typedef struct TclStubs {
void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */
void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */
void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
- void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */
-#endif /* MACOSX */
void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */
void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */
void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */
@@ -4015,15 +3957,7 @@ typedef struct TclStubs {
void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */
Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */
Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
- Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */
-#endif /* MACOSX */
Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */
Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */
Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */
@@ -4033,15 +3967,7 @@ typedef struct TclStubs {
CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */
void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */
int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
- void (*tcl_ReapDetachedProcs) (void); /* 207 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
- void (*tcl_ReapDetachedProcs) (void); /* 207 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
void (*tcl_ReapDetachedProcs) (void); /* 207 */
-#endif /* MACOSX */
int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */
int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */
void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */
@@ -4931,24 +4857,10 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_DeleteInterp \
(tclStubsPtr->tcl_DeleteInterp) /* 110 */
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tcl_DetachPids
-#define Tcl_DetachPids \
- (tclStubsPtr->tcl_DetachPids) /* 111 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef Tcl_DetachPids
-#define Tcl_DetachPids \
- (tclStubsPtr->tcl_DetachPids) /* 111 */
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef Tcl_DetachPids
#define Tcl_DetachPids \
(tclStubsPtr->tcl_DetachPids) /* 111 */
#endif
-#endif /* MACOSX */
#ifndef Tcl_DeleteTimerHandler
#define Tcl_DeleteTimerHandler \
(tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */
@@ -5294,24 +5206,10 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_ObjSetVar2 \
(tclStubsPtr->tcl_ObjSetVar2) /* 196 */
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tcl_OpenCommandChannel
-#define Tcl_OpenCommandChannel \
- (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
#ifndef Tcl_OpenCommandChannel
#define Tcl_OpenCommandChannel \
(tclStubsPtr->tcl_OpenCommandChannel) /* 197 */
#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#ifndef Tcl_OpenCommandChannel
-#define Tcl_OpenCommandChannel \
- (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */
-#endif
-#endif /* MACOSX */
#ifndef Tcl_OpenFileChannel
#define Tcl_OpenFileChannel \
(tclStubsPtr->tcl_OpenFileChannel) /* 198 */
@@ -5348,24 +5246,10 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_Read \
(tclStubsPtr->tcl_Read) /* 206 */
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tcl_ReapDetachedProcs
-#define Tcl_ReapDetachedProcs \
- (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
#ifndef Tcl_ReapDetachedProcs
#define Tcl_ReapDetachedProcs \
(tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */
#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#ifndef Tcl_ReapDetachedProcs
-#define Tcl_ReapDetachedProcs \
- (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */
-#endif
-#endif /* MACOSX */
#ifndef Tcl_RecordAndEval
#define Tcl_RecordAndEval \
(tclStubsPtr->tcl_RecordAndEval) /* 208 */
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 2d62414..c621aff 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -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: tclFileName.c,v 1.95 2008/12/03 07:08:44 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.96 2009/01/22 06:42:33 nijtmans Exp $
*/
#include "tclInt.h"
@@ -211,7 +211,7 @@ ExtractWinRoot(
Tcl_DStringAppend(resultPtr, path, 2);
return &path[2];
} else {
- char *tail = (char *) &path[3];
+ const char *tail = &path[3];
/*
* Skip separators.
@@ -389,7 +389,7 @@ TclpGetNativePathType(
{
Tcl_PathType type = TCL_PATH_ABSOLUTE;
int pathLen;
- char *path = Tcl_GetStringFromObj(pathPtr, &pathLen);
+ const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen);
if (path[0] == '~') {
/*
@@ -398,7 +398,7 @@ TclpGetNativePathType(
*/
if (driveNameLengthPtr != NULL) {
- char *end = path + 1;
+ const char *end = path + 1;
while ((*end != '\0') && (*end != '/')) {
end++;
}
@@ -407,7 +407,7 @@ TclpGetNativePathType(
} else {
switch (tclPlatform) {
case TCL_PLATFORM_UNIX: {
- char *origPath = path;
+ const char *origPath = path;
/*
* Paths that begin with / are absolute.
@@ -550,7 +550,8 @@ Tcl_SplitPath(
Tcl_Obj *resultPtr = NULL; /* Needed only to prevent gcc warnings. */
Tcl_Obj *tmpPtr, *eltPtr;
int i, size, len;
- char *p, *str;
+ char *p;
+ const char *str;
/*
* Perform the splitting, using objectified, vfs-aware code.
@@ -835,10 +836,12 @@ Tcl_FSJoinToPath(
void
TclpNativeJoinPath(
Tcl_Obj *prefix,
- char *joining)
+ const char *joining)
{
int length, needsSep;
- char *dest, *p, *start;
+ char *dest;
+ const char *p;
+ const char *start;
start = Tcl_GetStringFromObj(prefix, &length);
@@ -962,7 +965,7 @@ Tcl_JoinPath(
int i, len;
Tcl_Obj *listObj = Tcl_NewObj();
Tcl_Obj *resultObj;
- char *resultStr;
+ const char *resultStr;
/*
* Build the list of paths.
@@ -1979,7 +1982,7 @@ TclGlob(
Tcl_ListObjGetElements(NULL, filenamesObj, &objc, &objv);
for (i = 0; i< objc; i++) {
int len;
- char *oldStr = Tcl_GetStringFromObj(objv[i], &len);
+ const char *oldStr = Tcl_GetStringFromObj(objv[i], &len);
Tcl_Obj *elems[1];
if (len == prefixLen) {
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index af20a61..8a7d167 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclGetDate.y,v 1.39 2008/10/16 22:34:18 nijtmans Exp $
+ * RCS: @(#) $Id: tclGetDate.y,v 1.40 2009/01/22 06:42:33 nijtmans Exp $
*/
%{
@@ -75,7 +75,7 @@ typedef struct DateInfo {
time_t dateDayNumber;
int dateHaveDay;
- char *dateInput;
+ const char *dateInput;
time_t *dateRelPointer;
int dateDigitCount;
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 433ba9b..a3229e3 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -13,7 +13,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.135 2008/12/19 09:33:16 nijtmans Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.136 2009/01/22 06:42:33 nijtmans Exp $
library tcl
@@ -43,7 +43,7 @@ declare 3 generic {
# declare 4 generic {
# int TclChdir(Tcl_Interp *interp, char *dirName)
# }
-declare 5 {unix win} {
+declare 5 generic {
int TclCleanupChildren(Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr,
Tcl_Channel errorChan)
}
@@ -60,7 +60,7 @@ declare 8 generic {
# TclCreatePipeline unofficially exported for use by BLT.
-declare 9 {unix win} {
+declare 9 generic {
int TclCreatePipeline(Tcl_Interp *interp, int argc, const char **argv,
Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr,
TclFile *errFilePtr)
@@ -421,7 +421,7 @@ declare 103 generic {
int TclSockGetPort(Tcl_Interp *interp, const char *str, const char *proto,
int *portPtr)
}
-declare 104 {unix win} {
+declare 104 generic {
int TclSockMinimumBuffers(int sock, int size)
}
# Replaced by Tcl_FSStat in 8.4:
diff --git a/generic/tclInt.h b/generic/tclInt.h
index ee4fec7..b633e12 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,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.h,v 1.413 2009/01/13 20:30:03 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.414 2009/01/22 06:42:33 nijtmans Exp $
*/
#ifndef _TCLINT
@@ -2792,7 +2792,7 @@ MODULE_SCOPE int TclpMatchFiles(Tcl_Interp *interp, char *separators,
Tcl_DString *dirPtr, char *pattern, char *tail);
MODULE_SCOPE int TclpObjNormalizePath(Tcl_Interp *interp,
Tcl_Obj *pathPtr, int nextCheckpoint);
-MODULE_SCOPE void TclpNativeJoinPath(Tcl_Obj *prefix, char *joining);
+MODULE_SCOPE void TclpNativeJoinPath(Tcl_Obj *prefix, const char *joining);
MODULE_SCOPE Tcl_Obj * TclpNativeSplitPath(Tcl_Obj *pathPtr, int *lenPtr);
MODULE_SCOPE Tcl_PathType TclpGetNativePathType(Tcl_Obj *pathPtr,
int *driveNameLengthPtr, Tcl_Obj **driveNameRef);
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 1057bda..c728614 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.130 2008/12/19 09:33:16 nijtmans Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.131 2009/01/22 06:42:33 nijtmans Exp $
*/
#ifndef _TCLINTDECLS
@@ -54,30 +54,12 @@
EXTERN void TclAllocateFreeObjects (void);
#endif
/* Slot 4 is reserved */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
#ifndef TclCleanupChildren_TCL_DECLARED
#define TclCleanupChildren_TCL_DECLARED
/* 5 */
EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids,
Tcl_Pid * pidPtr, Tcl_Channel errorChan);
#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef TclCleanupChildren_TCL_DECLARED
-#define TclCleanupChildren_TCL_DECLARED
-/* 5 */
-EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids,
- Tcl_Pid * pidPtr, Tcl_Channel errorChan);
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#ifndef TclCleanupChildren_TCL_DECLARED
-#define TclCleanupChildren_TCL_DECLARED
-/* 5 */
-EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids,
- Tcl_Pid * pidPtr, Tcl_Channel errorChan);
-#endif
-#endif /* MACOSX */
#ifndef TclCleanupCommand_TCL_DECLARED
#define TclCleanupCommand_TCL_DECLARED
/* 6 */
@@ -96,17 +78,6 @@ EXTERN int TclCopyChannel (Tcl_Interp * interp,
Tcl_Channel inChan, Tcl_Channel outChan,
int toRead, Tcl_Obj * cmdPtr);
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef TclCreatePipeline_TCL_DECLARED
-#define TclCreatePipeline_TCL_DECLARED
-/* 9 */
-EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc,
- const char ** argv, Tcl_Pid ** pidArrayPtr,
- TclFile * inPipePtr, TclFile * outPipePtr,
- TclFile * errFilePtr);
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
#ifndef TclCreatePipeline_TCL_DECLARED
#define TclCreatePipeline_TCL_DECLARED
/* 9 */
@@ -115,17 +86,6 @@ EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc,
TclFile * inPipePtr, TclFile * outPipePtr,
TclFile * errFilePtr);
#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#ifndef TclCreatePipeline_TCL_DECLARED
-#define TclCreatePipeline_TCL_DECLARED
-/* 9 */
-EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc,
- const char ** argv, Tcl_Pid ** pidArrayPtr,
- TclFile * inPipePtr, TclFile * outPipePtr,
- TclFile * errFilePtr);
-#endif
-#endif /* MACOSX */
#ifndef TclCreateProc_TCL_DECLARED
#define TclCreateProc_TCL_DECLARED
/* 10 */
@@ -462,27 +422,11 @@ EXTERN int TclSockGetPort (Tcl_Interp * interp,
const char * str, const char * proto,
int * portPtr);
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef TclSockMinimumBuffers_TCL_DECLARED
-#define TclSockMinimumBuffers_TCL_DECLARED
-/* 104 */
-EXTERN int TclSockMinimumBuffers (int sock, int size);
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef TclSockMinimumBuffers_TCL_DECLARED
-#define TclSockMinimumBuffers_TCL_DECLARED
-/* 104 */
-EXTERN int TclSockMinimumBuffers (int sock, int size);
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef TclSockMinimumBuffers_TCL_DECLARED
#define TclSockMinimumBuffers_TCL_DECLARED
/* 104 */
EXTERN int TclSockMinimumBuffers (int sock, int size);
#endif
-#endif /* MACOSX */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
/* Slot 107 is reserved */
@@ -1092,27 +1036,11 @@ typedef struct TclIntStubs {
void *reserved2;
void (*tclAllocateFreeObjects) (void); /* 3 */
void *reserved4;
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
- int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */
-#endif /* MACOSX */
void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */
int (*tclCopyAndCollapse) (int count, const char * src, char * dst); /* 7 */
int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
- int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */
-#endif /* MACOSX */
int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, const char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */
void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */
void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */
@@ -1207,15 +1135,7 @@ typedef struct TclIntStubs {
char * (*tclSetPreInitScript) (char * string); /* 101 */
void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */
int (*tclSockGetPort) (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); /* 103 */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
- int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */
-#endif /* MACOSX */
void *reserved105;
void *reserved106;
void *reserved107;
@@ -1374,24 +1294,10 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */
#endif
/* Slot 4 is reserved */
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef TclCleanupChildren
-#define TclCleanupChildren \
- (tclIntStubsPtr->tclCleanupChildren) /* 5 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef TclCleanupChildren
-#define TclCleanupChildren \
- (tclIntStubsPtr->tclCleanupChildren) /* 5 */
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef TclCleanupChildren
#define TclCleanupChildren \
(tclIntStubsPtr->tclCleanupChildren) /* 5 */
#endif
-#endif /* MACOSX */
#ifndef TclCleanupCommand
#define TclCleanupCommand \
(tclIntStubsPtr->tclCleanupCommand) /* 6 */
@@ -1404,24 +1310,10 @@ extern const TclIntStubs *tclIntStubsPtr;
#define TclCopyChannel \
(tclIntStubsPtr->tclCopyChannel) /* 8 */
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef TclCreatePipeline
-#define TclCreatePipeline \
- (tclIntStubsPtr->tclCreatePipeline) /* 9 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef TclCreatePipeline
-#define TclCreatePipeline \
- (tclIntStubsPtr->tclCreatePipeline) /* 9 */
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef TclCreatePipeline
#define TclCreatePipeline \
(tclIntStubsPtr->tclCreatePipeline) /* 9 */
#endif
-#endif /* MACOSX */
#ifndef TclCreateProc
#define TclCreateProc \
(tclIntStubsPtr->tclCreateProc) /* 10 */
@@ -1666,24 +1558,10 @@ extern const TclIntStubs *tclIntStubsPtr;
#define TclSockGetPort \
(tclIntStubsPtr->tclSockGetPort) /* 103 */
#endif
-#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef TclSockMinimumBuffers
-#define TclSockMinimumBuffers \
- (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */
-#endif
-#endif /* UNIX */
-#ifdef __WIN32__ /* WIN */
-#ifndef TclSockMinimumBuffers
-#define TclSockMinimumBuffers \
- (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */
-#endif
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
#ifndef TclSockMinimumBuffers
#define TclSockMinimumBuffers \
(tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */
#endif
-#endif /* MACOSX */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
/* Slot 107 is reserved */