summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls14
-rw-r--r--generic/tcl.h22
-rw-r--r--generic/tclNotify.c14
-rw-r--r--generic/tclPlatDecls.h18
-rw-r--r--generic/tclStubInit.c5
5 files changed, 64 insertions, 9 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 7cfb65b..2dbc2c5 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -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: tcl.decls,v 1.93 2002/08/05 15:01:03 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.94 2002/08/31 06:09:45 das Exp $
library tcl
@@ -1821,3 +1821,15 @@ declare 7 mac {
declare 8 mac {
int strcasecmp(CONST char *s1, CONST char *s2)
}
+
+##################
+# Mac OS X declarations
+#
+
+declare 0 macosx {
+ int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
+ CONST char *bundleName,
+ int hasResourceFile,
+ int maxPathLen,
+ char *libraryPath)
+}
diff --git a/generic/tcl.h b/generic/tcl.h
index 8de3c7e..bb62de4 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -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: tcl.h,v 1.140 2002/08/20 15:33:32 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.141 2002/08/31 06:09:45 das Exp $
*/
#ifndef _TCL
@@ -125,6 +125,16 @@ extern "C" {
#ifndef RC_INVOKED
+/*
+ * A special definition for Macintosh used to allow this header file
+ * to be included in resource files so that they can get obtain
+ * version information from this file. Resource compilers don't like
+ * all the C stuff, like typedefs and procedure declarations, that
+ * occur below.
+*/
+
+#ifndef RESOURCE_INCLUDED
+
/*
* Special macro to define mutexes, that doesn't do anything
* if we are not using threads.
@@ -697,6 +707,10 @@ typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_((ClientData clientData,
typedef void (Tcl_CreateFileHandlerProc) _ANSI_ARGS_((int fd, int mask,
Tcl_FileProc *proc, ClientData clientData));
typedef void (Tcl_DeleteFileHandlerProc) _ANSI_ARGS_((int fd));
+typedef void (Tcl_AlertNotifierProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_ServiceModeHookProc) _ANSI_ARGS_((int mode));
+typedef ClientData (Tcl_InitNotifierProc) _ANSI_ARGS_((VOID));
+typedef void (Tcl_FinalizeNotifierProc) _ANSI_ARGS_((ClientData clientData));
typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void));
@@ -1866,6 +1880,10 @@ typedef struct Tcl_NotifierProcs {
Tcl_WaitForEventProc *waitForEventProc;
Tcl_CreateFileHandlerProc *createFileHandlerProc;
Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
+ Tcl_InitNotifierProc *initNotifierProc;
+ Tcl_FinalizeNotifierProc *finalizeNotifierProc;
+ Tcl_AlertNotifierProc *alertNotifierProc;
+ Tcl_ServiceModeHookProc *serviceModeHookProc;
} Tcl_NotifierProcs;
@@ -2269,6 +2287,8 @@ EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+#endif /* RESOURCE_INCLUDED */
+
/*
* end block for C++
*/
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index 2f32adc..a8754b0 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -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: tclNotify.c,v 1.8 2002/04/12 06:31:28 hobbs Exp $
+ * RCS: @(#) $Id: tclNotify.c,v 1.9 2002/08/31 06:09:45 das Exp $
*/
#include "tclInt.h"
@@ -116,7 +116,7 @@ TclInitNotifier()
Tcl_MutexLock(&listLock);
tsdPtr->threadId = Tcl_GetCurrentThread();
- tsdPtr->clientData = Tcl_InitNotifier();
+ tsdPtr->clientData = tclStubs.tcl_InitNotifier();
tsdPtr->nextPtr = firstNotifierPtr;
firstNotifierPtr = tsdPtr;
@@ -160,7 +160,7 @@ TclFinalizeNotifier()
Tcl_MutexLock(&listLock);
- Tcl_FinalizeNotifier(tsdPtr->clientData);
+ tclStubs.tcl_FinalizeNotifier(tsdPtr->clientData);
Tcl_MutexFinalize(&(tsdPtr->queueMutex));
for (prevPtrPtr = &firstNotifierPtr; *prevPtrPtr != NULL;
prevPtrPtr = &((*prevPtrPtr)->nextPtr)) {
@@ -203,6 +203,10 @@ Tcl_SetNotifier(notifierProcPtr)
#endif
tclStubs.tcl_SetTimer = notifierProcPtr->setTimerProc;
tclStubs.tcl_WaitForEvent = notifierProcPtr->waitForEventProc;
+ tclStubs.tcl_InitNotifier = notifierProcPtr->initNotifierProc;
+ tclStubs.tcl_FinalizeNotifier = notifierProcPtr->finalizeNotifierProc;
+ tclStubs.tcl_AlertNotifier = notifierProcPtr->alertNotifierProc;
+ tclStubs.tcl_ServiceModeHook = notifierProcPtr->serviceModeHookProc;
}
/*
@@ -717,7 +721,7 @@ Tcl_SetServiceMode(mode)
oldMode = tsdPtr->serviceMode;
tsdPtr->serviceMode = mode;
- Tcl_ServiceModeHook(mode);
+ tclStubs.tcl_ServiceModeHook(mode);
return oldMode;
}
@@ -1083,7 +1087,7 @@ Tcl_ThreadAlert(threadId)
Tcl_MutexLock(&listLock);
for (tsdPtr = firstNotifierPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) {
if (tsdPtr->threadId == threadId) {
- Tcl_AlertNotifier(tsdPtr->clientData);
+ tclStubs.tcl_AlertNotifier(tsdPtr->clientData);
break;
}
}
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index c499d29..e0fed76 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -6,7 +6,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclPlatDecls.h,v 1.16 2002/02/08 02:52:54 dgp Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.17 2002/08/31 06:09:45 das Exp $
*/
#ifndef _TCLPLATDECLS
@@ -74,6 +74,13 @@ EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1,
EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1,
CONST char * s2));
#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+/* 0 */
+EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * bundleName,
+ int hasResourceFile, int maxPathLen,
+ char * libraryPath));
+#endif /* MAC_OSX_TCL */
typedef struct TclPlatStubs {
int magic;
@@ -94,6 +101,9 @@ typedef struct TclPlatStubs {
int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+ int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 0 */
+#endif /* MAC_OSX_TCL */
} TclPlatStubs;
#ifdef __cplusplus
@@ -158,6 +168,12 @@ extern TclPlatStubs *tclPlatStubsPtr;
(tclPlatStubsPtr->strcasecmp) /* 8 */
#endif
#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+#ifndef Tcl_MacOSXOpenBundleResources
+#define Tcl_MacOSXOpenBundleResources \
+ (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
+#endif
+#endif /* MAC_OSX_TCL */
#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index a9f5ab4..49f581c 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.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: tclStubInit.c,v 1.74 2002/08/06 01:49:27 das Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.75 2002/08/31 06:09:45 das Exp $
*/
#include "tclInt.h"
@@ -351,6 +351,9 @@ TclPlatStubs tclPlatStubs = {
strncasecmp, /* 7 */
strcasecmp, /* 8 */
#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+ Tcl_MacOSXOpenBundleResources, /* 0 */
+#endif /* MAC_OSX_TCL */
};
static TclStubHooks tclStubHooks = {