summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2002-08-30 18:18:11 (GMT)
committerdas <das>2002-08-30 18:18:11 (GMT)
commit5ccf903c983e79875e8eb8ea04adabe117a23cee (patch)
tree4b6e9fd48d64642e47117e7151aee760afded773
parentea6da1ae5353546664b9c446808a68b1c552c6de (diff)
downloadtk-5ccf903c983e79875e8eb8ea04adabe117a23cee.zip
tk-5ccf903c983e79875e8eb8ea04adabe117a23cee.tar.gz
tk-5ccf903c983e79875e8eb8ea04adabe117a23cee.tar.bz2
various project cleanups & enhancements
added macosx/Makefile to facilitate building from cli added [tk windowingsystem] and removed $::tcl_plaform(windowingsystem) changed all runtime library references to the above removed duplicate entries in tk.decls & tkInt.decls CONSTification and other small changes in macosx/ to remove compiler warnings
-rw-r--r--generic/tkCmds.c26
-rw-r--r--generic/tkInt.decls59
-rw-r--r--generic/tkInt.h4
-rw-r--r--generic/tkIntDecls.h10
-rw-r--r--generic/tkIntPlatDecls.h77
-rw-r--r--generic/tkStubInit.c16
-rw-r--r--generic/tkStubLib.c18
-rw-r--r--library/bgerror.tcl14
-rw-r--r--library/button.tcl14
-rw-r--r--library/console.tcl8
-rw-r--r--library/demos/menu.tcl10
-rw-r--r--library/demos/menubu.tcl6
-rw-r--r--library/demos/puzzle.tcl4
-rw-r--r--library/demos/widget4
-rw-r--r--library/dialog.tcl12
-rw-r--r--library/entry.tcl8
-rw-r--r--library/listbox.tcl4
-rw-r--r--library/menu.tcl16
-rw-r--r--library/msgbox.tcl22
-rw-r--r--library/scrlbar.tcl4
-rw-r--r--library/spinbox.tcl8
-rw-r--r--library/text.tcl14
-rw-r--r--library/tk.tcl8
-rw-r--r--mac/tkMacBitmap.c4
-rw-r--r--mac/tkMacWm.c4
-rw-r--r--macosx/Makefile50
-rw-r--r--macosx/Wish.pbproj/project.pbxproj182
-rw-r--r--macosx/tkMacOSXBitmap.c8
-rw-r--r--macosx/tkMacOSXButton.c4
-rw-r--r--macosx/tkMacOSXColor.c8
-rw-r--r--macosx/tkMacOSXCursor.c8
-rw-r--r--macosx/tkMacOSXDebug.c2
-rw-r--r--macosx/tkMacOSXDialog.c14
-rw-r--r--macosx/tkMacOSXFont.c18
-rw-r--r--macosx/tkMacOSXInit.c5
-rw-r--r--macosx/tkMacOSXInt.h15
-rw-r--r--macosx/tkMacOSXKeyboard.c8
-rw-r--r--macosx/tkMacOSXMenu.c13
-rw-r--r--macosx/tkMacOSXMenus.c8
-rw-r--r--macosx/tkMacOSXScrlbr.c12
-rw-r--r--macosx/tkMacOSXSend.c14
-rw-r--r--macosx/tkMacOSXWm.c18
-rw-r--r--macosx/tkMacOSXWm.h4
-rw-r--r--macosx/tkMacOSXXStubs.c4
-rw-r--r--unix/tkUnixInit.c3
-rw-r--r--win/tkWinInit.c3
46 files changed, 445 insertions, 330 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 35adc26..3739776 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.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: tkCmds.c,v 1.20.2.5 2002/08/20 20:27:03 das Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.20.2.6 2002/08/30 18:18:11 das Exp $
*/
#include "tkPort.h"
@@ -621,10 +621,11 @@ Tk_TkObjCmd(clientData, interp, objc, objv)
Tk_Window tkwin;
static CONST char *optionStrings[] = {
"appname", "caret", "scaling", "useinputmethods",
- NULL
+ "windowingsystem", NULL
};
enum options {
- TK_APPNAME, TK_CARET, TK_SCALING, TK_USE_IM
+ TK_APPNAME, TK_CARET, TK_SCALING, TK_USE_IM,
+ TK_WINDOWINGSYSTEM
};
tkwin = (Tk_Window) clientData;
@@ -811,6 +812,25 @@ Tk_TkObjCmd(clientData, interp, objc, objv)
(int) (dispPtr->flags & TK_DISPLAY_USE_IM));
break;
}
+ case TK_WINDOWINGSYSTEM: {
+ CONST char *windowingsystem;
+
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 2, objv, NULL);
+ return TCL_ERROR;
+ }
+ #if defined(__WIN32__) || defined(_WIN32)
+ windowingsystem = "win32";
+ #elif defined(MAC_TCL)
+ windowingsystem = "classic";
+ #elif defined(MAC_OSX_TK)
+ windowingsystem = "aqua";
+ #else
+ windowingsystem = "x11";
+ #endif
+ Tcl_SetStringObj(Tcl_GetObjResult(interp), windowingsystem, -1);
+ break;
+ }
}
return TCL_OK;
}
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 8ef7e0a..81da365 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -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: tkInt.decls,v 1.21.2.5 2002/08/20 20:27:05 das Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.21.2.6 2002/08/30 18:18:12 das Exp $
library tk
@@ -563,7 +563,7 @@ declare 119 {mac aqua win} {
#}
declare 121 {mac aqua} {
- Pixmap TkpCreateNativeBitmap (Display *display, char * source)
+ Pixmap TkpCreateNativeBitmap (Display *display, CONST char * source)
}
declare 122 {mac aqua} {
@@ -882,7 +882,7 @@ declare 0 mac {
# removed duplicates from tkInt table
#declare 1 mac {
-# Pixmap TkpCreateNativeBitmap (Display *display, char * source)
+# Pixmap TkpCreateNativeBitmap (Display *display, CONST char * source)
#}
#
#declare 2 mac {
@@ -1121,13 +1121,14 @@ declare 0 aqua {
void TkGenerateActivateEvents (TkWindow *winPtr, int active)
}
-declare 1 aqua {
- Pixmap TkpCreateNativeBitmap (Display *display, char * source)
-}
-
-declare 2 aqua {
- void TkpDefineNativeBitmaps (void)
-}
+# removed duplicates from tkInt table
+#declare 1 aqua {
+# Pixmap TkpCreateNativeBitmap (Display *display, CONST char * source)
+#}
+#
+#declare 2 aqua {
+# void TkpDefineNativeBitmaps (void)
+#}
declare 3 aqua {
void TkPointerDeadWindow (TkWindow *winPtr)
@@ -1169,17 +1170,19 @@ declare 12 aqua {
void TkMacOSXHandleTearoffMenu (void)
}
-declare 13 aqua {
- void TkMacOSXInvalClipRgns (TkWindow *winPtr)
-}
+# removed duplicate from tkPlat table (tk.decls)
+#declare 13 aqua {
+# void TkMacOSXInvalClipRgns (TkWindow *winPtr)
+#}
declare 14 aqua {
int TkMacOSXDoHLEvent (EventRecord *theEvent)
}
-declare 15 aqua {
- GWorldPtr TkMacOSXGetDrawablePort (Drawable drawable)
-}
+# removed duplicate from tkPlat table (tk.decls)
+#declare 15 aqua {
+# GWorldPtr TkMacOSXGetDrawablePort (Drawable drawable)
+#}
declare 16 aqua {
Window TkMacOSXGetXWindow (WindowRef macWinPtr)
@@ -1193,13 +1196,14 @@ declare 18 aqua {
void TkMacOSXHandleMenuSelect (long mResult, int optionKeyPressed)
}
-declare 19 aqua {
- void TkMacOSXInitAppleEvents (Tcl_Interp *interp)
-}
-
-declare 20 aqua {
- void TkMacOSXInitMenus (Tcl_Interp *interp)
-}
+# removed duplicates from tkPlat table (tk.decls)
+#declare 19 aqua {
+# void TkMacOSXInitAppleEvents (Tcl_Interp *interp)
+#}
+#
+#declare 20 aqua {
+# void TkMacOSXInitMenus (Tcl_Interp *interp)
+#}
declare 21 aqua {
void TkMacOSXInvalidateWindow (MacDrawable *macWin, int flag)
@@ -1323,10 +1327,11 @@ declare 51 aqua {
void TkGenWMDestroyEvent (Tk_Window tkwin)
}
-declare 52 aqua {
- void TkGenWMConfigureEvent (Tk_Window tkwin, int x, int y, \
- int width, int height, int flags)
-}
+# removed duplicate from tkPlat table (tk.decls)
+#declare 52 aqua {
+# void TkGenWMConfigureEvent (Tk_Window tkwin, int x, int y, \
+# int width, int height, int flags)
+#}
declare 53 aqua {
unsigned long TkpGetMS (void)
diff --git a/generic/tkInt.h b/generic/tkInt.h
index d488b41..737401f 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.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: tkInt.h,v 1.40.2.3 2002/08/20 20:27:05 das Exp $
+ * RCS: $Id: tkInt.h,v 1.40.2.4 2002/08/30 18:18:12 das Exp $
*/
#ifndef _TKINT
@@ -1169,7 +1169,7 @@ EXTERN char * TkTilePrintProc _ANSI_ARGS_((
* Unsupported commands.
*/
EXTERN int TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index de975ee..151ef6d 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.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: tkIntDecls.h,v 1.13.2.6 2002/08/20 20:27:05 das Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.13.2.7 2002/08/30 18:18:12 das Exp $
*/
#ifndef _TKINTDECLS
@@ -474,12 +474,12 @@ EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect,
#ifdef MAC_TCL
/* 121 */
EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display * display,
- char * source));
+ CONST char * source));
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
/* 121 */
EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display * display,
- char * source));
+ CONST char * source));
#endif /* MAC_OSX_TK */
#ifdef MAC_TCL
/* 122 */
@@ -766,10 +766,10 @@ typedef struct TkIntStubs {
void *reserved121;
#endif /* __WIN32__ */
#ifdef MAC_TCL
- Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, char * source)); /* 121 */
+ Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, CONST char * source)); /* 121 */
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
- Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, char * source)); /* 121 */
+ Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, CONST char * source)); /* 121 */
#endif /* MAC_OSX_TK */
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
void *reserved122;
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index 54819f2..2e60a5a 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.9.2.5 2002/08/20 20:27:05 das Exp $
+ * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.9.2.6 2002/08/30 18:18:12 das Exp $
*/
#ifndef _TKINTPLATDECLS
@@ -262,11 +262,8 @@ EXTERN int TkpIsWindowFloating _ANSI_ARGS_((WindowRef window));
/* 0 */
EXTERN void TkGenerateActivateEvents _ANSI_ARGS_((
TkWindow * winPtr, int active));
-/* 1 */
-EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display * display,
- char * source));
-/* 2 */
-EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void));
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
/* 3 */
EXTERN void TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
/* 4 */
@@ -290,14 +287,11 @@ EXTERN void TkMacOSXInstallCursor _ANSI_ARGS_((
int resizeOverride));
/* 12 */
EXTERN void TkMacOSXHandleTearoffMenu _ANSI_ARGS_((void));
-/* 13 */
-EXTERN void TkMacOSXInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr));
+/* Slot 13 is reserved */
/* 14 */
EXTERN int TkMacOSXDoHLEvent _ANSI_ARGS_((
EventRecord * theEvent));
-/* 15 */
-EXTERN GWorldPtr TkMacOSXGetDrawablePort _ANSI_ARGS_((
- Drawable drawable));
+/* Slot 15 is reserved */
/* 16 */
EXTERN Window TkMacOSXGetXWindow _ANSI_ARGS_((WindowRef macWinPtr));
/* 17 */
@@ -306,11 +300,8 @@ EXTERN int TkMacOSXGrowToplevel _ANSI_ARGS_((
/* 18 */
EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((long mResult,
int optionKeyPressed));
-/* 19 */
-EXTERN void TkMacOSXInitAppleEvents _ANSI_ARGS_((
- Tcl_Interp * interp));
-/* 20 */
-EXTERN void TkMacOSXInitMenus _ANSI_ARGS_((Tcl_Interp * interp));
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
/* 21 */
EXTERN void TkMacOSXInvalidateWindow _ANSI_ARGS_((
MacDrawable * macWin, int flag));
@@ -391,10 +382,7 @@ EXTERN int TkGenerateButtonEvent _ANSI_ARGS_((int x, int y,
Window window, unsigned int state));
/* 51 */
EXTERN void TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
-/* 52 */
-EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin,
- int x, int y, int width, int height,
- int flags));
+/* Slot 52 is reserved */
/* 53 */
EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void));
#endif /* MAC_OSX_TK */
@@ -543,8 +531,8 @@ typedef struct TkIntPlatStubs {
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
- Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, char * source)); /* 1 */
- void (*tkpDefineNativeBitmaps) _ANSI_ARGS_((void)); /* 2 */
+ void *reserved1;
+ void *reserved2;
void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 3 */
void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 4 */
void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 5 */
@@ -555,14 +543,14 @@ typedef struct TkIntPlatStubs {
int (*tkMacOSXDispatchMenuEvent) _ANSI_ARGS_((int menuID, int index)); /* 10 */
void (*tkMacOSXInstallCursor) _ANSI_ARGS_((int resizeOverride)); /* 11 */
void (*tkMacOSXHandleTearoffMenu) _ANSI_ARGS_((void)); /* 12 */
- void (*tkMacOSXInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); /* 13 */
+ void *reserved13;
int (*tkMacOSXDoHLEvent) _ANSI_ARGS_((EventRecord * theEvent)); /* 14 */
- GWorldPtr (*tkMacOSXGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 15 */
+ void *reserved15;
Window (*tkMacOSXGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 16 */
int (*tkMacOSXGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 17 */
void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 18 */
- void (*tkMacOSXInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); /* 19 */
- void (*tkMacOSXInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); /* 20 */
+ void *reserved19;
+ void *reserved20;
void (*tkMacOSXInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 21 */
int (*tkMacOSXIsCharacterMissing) _ANSI_ARGS_((Tk_Font tkfont, unsigned int searchChar)); /* 22 */
void (*tkMacOSXMakeRealWindowExist) _ANSI_ARGS_((TkWindow * winPtr)); /* 23 */
@@ -594,7 +582,7 @@ typedef struct TkIntPlatStubs {
Window (*tkGetTransientMaster) _ANSI_ARGS_((TkWindow * winPtr)); /* 49 */
int (*tkGenerateButtonEvent) _ANSI_ARGS_((int x, int y, Window window, unsigned int state)); /* 50 */
void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 51 */
- void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); /* 52 */
+ void *reserved52;
unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 53 */
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
@@ -978,14 +966,8 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkGenerateActivateEvents \
(tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
#endif
-#ifndef TkpCreateNativeBitmap
-#define TkpCreateNativeBitmap \
- (tkIntPlatStubsPtr->tkpCreateNativeBitmap) /* 1 */
-#endif
-#ifndef TkpDefineNativeBitmaps
-#define TkpDefineNativeBitmaps \
- (tkIntPlatStubsPtr->tkpDefineNativeBitmaps) /* 2 */
-#endif
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
#ifndef TkPointerDeadWindow
#define TkPointerDeadWindow \
(tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */
@@ -1026,18 +1008,12 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkMacOSXHandleTearoffMenu \
(tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */
#endif
-#ifndef TkMacOSXInvalClipRgns
-#define TkMacOSXInvalClipRgns \
- (tkIntPlatStubsPtr->tkMacOSXInvalClipRgns) /* 13 */
-#endif
+/* Slot 13 is reserved */
#ifndef TkMacOSXDoHLEvent
#define TkMacOSXDoHLEvent \
(tkIntPlatStubsPtr->tkMacOSXDoHLEvent) /* 14 */
#endif
-#ifndef TkMacOSXGetDrawablePort
-#define TkMacOSXGetDrawablePort \
- (tkIntPlatStubsPtr->tkMacOSXGetDrawablePort) /* 15 */
-#endif
+/* Slot 15 is reserved */
#ifndef TkMacOSXGetXWindow
#define TkMacOSXGetXWindow \
(tkIntPlatStubsPtr->tkMacOSXGetXWindow) /* 16 */
@@ -1050,14 +1026,8 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkMacOSXHandleMenuSelect \
(tkIntPlatStubsPtr->tkMacOSXHandleMenuSelect) /* 18 */
#endif
-#ifndef TkMacOSXInitAppleEvents
-#define TkMacOSXInitAppleEvents \
- (tkIntPlatStubsPtr->tkMacOSXInitAppleEvents) /* 19 */
-#endif
-#ifndef TkMacOSXInitMenus
-#define TkMacOSXInitMenus \
- (tkIntPlatStubsPtr->tkMacOSXInitMenus) /* 20 */
-#endif
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
#ifndef TkMacOSXInvalidateWindow
#define TkMacOSXInvalidateWindow \
(tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */
@@ -1179,10 +1149,7 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkGenWMDestroyEvent \
(tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */
#endif
-#ifndef TkGenWMConfigureEvent
-#define TkGenWMConfigureEvent \
- (tkIntPlatStubsPtr->tkGenWMConfigureEvent) /* 52 */
-#endif
+/* Slot 52 is reserved */
#ifndef TkpGetMS
#define TkpGetMS \
(tkIntPlatStubsPtr->tkpGetMS) /* 53 */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index d7624d4..dc1e364 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.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: tkStubInit.c,v 1.28.2.6 2002/08/20 20:27:07 das Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.28.2.7 2002/08/30 18:18:13 das Exp $
*/
#include "tkInt.h"
@@ -440,8 +440,8 @@ TkIntPlatStubs tkIntPlatStubs = {
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
TkGenerateActivateEvents, /* 0 */
- TkpCreateNativeBitmap, /* 1 */
- TkpDefineNativeBitmaps, /* 2 */
+ NULL, /* 1 */
+ NULL, /* 2 */
TkPointerDeadWindow, /* 3 */
TkpSetCapture, /* 4 */
TkpSetCursor, /* 5 */
@@ -452,14 +452,14 @@ TkIntPlatStubs tkIntPlatStubs = {
TkMacOSXDispatchMenuEvent, /* 10 */
TkMacOSXInstallCursor, /* 11 */
TkMacOSXHandleTearoffMenu, /* 12 */
- TkMacOSXInvalClipRgns, /* 13 */
+ NULL, /* 13 */
TkMacOSXDoHLEvent, /* 14 */
- TkMacOSXGetDrawablePort, /* 15 */
+ NULL, /* 15 */
TkMacOSXGetXWindow, /* 16 */
TkMacOSXGrowToplevel, /* 17 */
TkMacOSXHandleMenuSelect, /* 18 */
- TkMacOSXInitAppleEvents, /* 19 */
- TkMacOSXInitMenus, /* 20 */
+ NULL, /* 19 */
+ NULL, /* 20 */
TkMacOSXInvalidateWindow, /* 21 */
TkMacOSXIsCharacterMissing, /* 22 */
TkMacOSXMakeRealWindowExist, /* 23 */
@@ -491,7 +491,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkGetTransientMaster, /* 49 */
TkGenerateButtonEvent, /* 50 */
TkGenWMDestroyEvent, /* 51 */
- TkGenWMConfigureEvent, /* 52 */
+ NULL, /* 52 */
TkpGetMS, /* 53 */
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c
index 7ef3e1c..ffe01ef 100644
--- a/generic/tkStubLib.c
+++ b/generic/tkStubLib.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: tkStubLib.c,v 1.6.2.4 2002/08/20 20:27:07 das Exp $
+ * RCS: @(#) $Id: tkStubLib.c,v 1.6.2.5 2002/08/30 18:18:13 das Exp $
*/
@@ -21,18 +21,6 @@
* including the rest of the stub functions.
*/
-/*
- * Because of problems with pre-compiled headers on the Mac, we need to
- * do these includes before we add the stubs defines. This a hack.
- */
-
-#if defined(MAC_OSX_TK)
-#include "tkMacOSXInt.h"
-
-#include "tkInt.h"
-#include "tkPort.h"
-#endif /* MAC_OSX_TK */
-
#ifndef USE_TCL_STUBS
#define USE_TCL_STUBS
#endif
@@ -54,6 +42,10 @@
#include "tkMacInt.h"
#endif
+#ifdef MAC_OSX_TK
+#include "tkMacOSXInt.h"
+#endif
+
#include "tkDecls.h"
#include "tkIntDecls.h"
#include "tkPlatDecls.h"
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index e7ad441..5974f4c 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -9,8 +9,8 @@
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.17.2.5 2002/08/21 12:28:55 das Exp $
-# $Id: bgerror.tcl,v 1.17.2.5 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.17.2.6 2002/08/30 18:18:13 das Exp $
+# $Id: bgerror.tcl,v 1.17.2.6 2002/08/30 18:18:13 das Exp $
namespace eval ::tk {
namespace eval dialog {
@@ -93,7 +93,7 @@ proc ::tk::dialog::error::bgerror err {
# Ok the application's tkerror either failed or was not found
# we use the default dialog then :
if {($tcl_platform(platform) eq "macintosh")
- || ($tcl_platform(windowingsystem) eq "aqua")} {
+ || ([tk windowingsystem] eq "aqua")} {
set ok [mc Ok]
set messageFont system
set textRelief flat
@@ -141,13 +141,13 @@ proc ::tk::dialog::error::bgerror err {
wm protocol .bgerrorDialog WM_DELETE_WINDOW { }
if {($tcl_platform(platform) eq "macintosh")
- || ($tcl_platform(windowingsystem) eq "aqua")} {
+ || ([tk windowingsystem] eq "aqua")} {
::tk::unsupported::MacWindowStyle style .bgerrorDialog dBoxProc
}
frame .bgerrorDialog.bot
frame .bgerrorDialog.top
- if {$tcl_platform(windowingsystem) eq "x11"} {
+ if {[tk windowingsystem] eq "x11"} {
.bgerrorDialog.bot configure -relief raised -bd 1
.bgerrorDialog.top configure -relief raised -bd 1
}
@@ -184,7 +184,7 @@ proc ::tk::dialog::error::bgerror err {
label .bgerrorDialog.msg -justify left -text $text -font $messageFont \
-wraplength $wrapwidth
if {($tcl_platform(platform) eq "macintosh")
- || ($tcl_platform(windowingsystem) eq "aqua")} {
+ || ([tk windowingsystem] eq "aqua")} {
# On the Macintosh, use the stop bitmap
label .bgerrorDialog.bitmap -bitmap stop
} else {
@@ -220,7 +220,7 @@ proc ::tk::dialog::error::bgerror err {
grid columnconfigure .bgerrorDialog.bot $i -weight 1
# We boost the size of some Mac buttons for l&f
if {($tcl_platform(platform) eq "macintosh")
- || ($tcl_platform(windowingsystem) eq "aqua")} {
+ || ([tk windowingsystem] eq "aqua")} {
if {($name eq "ok") || ($name eq "dismiss")} {
grid columnconfigure .bgerrorDialog.bot $i -minsize 79
}
diff --git a/library/button.tcl b/library/button.tcl
index 9512f7b..fa77591 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -4,7 +4,7 @@
# checkbutton, and radiobutton widgets and provides procedures
# that help in implementing those bindings.
#
-# RCS: @(#) $Id: button.tcl,v 1.11.2.5 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: button.tcl,v 1.11.2.6 2002/08/30 18:18:13 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -18,8 +18,8 @@
# The code below creates the default class bindings for buttons.
#-------------------------------------------------------------------------
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
bind Radiobutton <Enter> {
tk::ButtonEnter %W
}
@@ -69,7 +69,7 @@ if {[string equal "windows" $tcl_platform(platform)]} {
tk::CheckRadioEnter %W
}
}
-if {[string equal "x11" $tcl_platform(windowingsystem)]} {
+if {[string equal "x11" [tk windowingsystem]]} {
bind Checkbutton <Return> {
if {!$tk_strictMotif} {
tk::CheckRadioInvoke %W
@@ -299,7 +299,7 @@ proc ::tk::CheckRadioDown w {
}
-if {[string equal "x11" $tcl_platform(windowingsystem)]} {
+if {[string equal "x11" [tk windowingsystem]]} {
#####################
# Unix implementation
@@ -426,8 +426,8 @@ proc ::tk::ButtonUp w {
}
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
####################
# Mac implementation
diff --git a/library/console.tcl b/library/console.tcl
index 849db59..c06119d 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.13.2.5 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: console.tcl,v 1.13.2.6 2002/08/30 18:18:13 das Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -50,7 +50,7 @@ proc ::tk::ConsoleInit {} {
}
if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ || [string equal [tk windowingsystem] "aqua"]} {
set mod "Cmd"
} else {
set mod "Ctrl"
@@ -68,7 +68,7 @@ proc ::tk::ConsoleInit {} {
.menubar.file add command -label [mc "Clear Console"] \
-underline 0 -command {.console delete 1.0 "promptEnd linestart"}
if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ || [string equal [tk windowingsystem] "aqua"]} {
.menubar.file add command -label [mc "Quit"] \
-command exit -accel Cmd-Q
} else {
@@ -111,7 +111,7 @@ proc ::tk::ConsoleInit {} {
$con configure -font systemfixed
}
"unix" {
- if {[string equal $tcl_platform(windowingsystem) "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
$con configure -font {Monaco 9 normal} -highlightthickness 0
}
}
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl
index 57a306b..e006216 100644
--- a/library/demos/menu.tcl
+++ b/library/demos/menu.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a window with a bunch of menus
# and cascaded menus using menubars.
#
-# RCS: @(#) $Id: menu.tcl,v 1.2.24.3 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.2.24.4 2002/08/30 18:18:14 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -17,8 +17,8 @@ wm iconname $w "menu"
positionWindow $w
label $w.msg -font $font -wraplength 4i -justify left
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
$w.msg configure -text "This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse."
} else {
$w.msg configure -text "This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu."
@@ -56,8 +56,8 @@ set m $w.menu.basic
$w.menu add cascade -label "Basic" -menu $m -underline 0
menu $m -tearoff 0
$m add command -label "Long entry that does nothing"
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
set modifier Command
} elseif {$tcl_platform(platform) == "windows"} {
set modifier Control
diff --git a/library/demos/menubu.tcl b/library/demos/menubu.tcl
index ceb4f22..c3cae55 100644
--- a/library/demos/menubu.tcl
+++ b/library/demos/menubu.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a window with a bunch of menus
# and cascaded menus using menubuttons.
#
-# # RCS: @(#) $Id: menubu.tcl,v 1.2.24.2 2002/08/21 12:28:56 das Exp $
+# # RCS: @(#) $Id: menubu.tcl,v 1.2.24.3 2002/08/30 18:18:14 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -57,8 +57,8 @@ pack $body.buttons -padx 25 -pady 25
tk_optionMenu $body.buttons.options menubuttonoptions one two three
pack $body.buttons.options -side left -padx 25 -pady 25
set m [tk_optionMenu $body.buttons.colors paletteColor Black red4 DarkGreen NavyBlue gray75 Red Green Blue gray50 Yellow Cyan Magenta White Brown DarkSeaGreen DarkViolet]
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
set topBorderColor Black
set bottomBorderColor Black
} else {
diff --git a/library/demos/puzzle.tcl b/library/demos/puzzle.tcl
index f817477..9ff81c2 100644
--- a/library/demos/puzzle.tcl
+++ b/library/demos/puzzle.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a 15-puzzle game using a collection
# of buttons.
#
-# RCS: @(#) $Id: puzzle.tcl,v 1.3.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+# RCS: @(#) $Id: puzzle.tcl,v 1.3.2.2 2002/08/30 18:18:14 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -59,7 +59,7 @@ scrollbar $w.s
# using place which doesn't autosize, then we need to have a
# slightly larger frame here...
-if {[string equal $tcl_platform(windowingsystem) aqua]} {
+if {[string equal [tk windowingsystem] aqua]} {
set frameSize 160
} else {
set frameSize 120
diff --git a/library/demos/widget b/library/demos/widget
index e09cebb..12670d5 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -11,7 +11,7 @@ exec wish "$0" "$@"
# ".tcl" files is this directory, which are sourced by this script
# as needed.
#
-# RCS: @(#) $Id: widget,v 1.3.2.3 2002/06/10 05:38:24 wolfsuit Exp $
+# RCS: @(#) $Id: widget,v 1.3.2.4 2002/08/30 18:18:14 das Exp $
eval destroy [winfo child .]
wm title . "Widget Demonstration"
@@ -47,7 +47,7 @@ menu .menuBar -tearoff 0
menu .menuBar.file -tearoff 0
# On the Mac use the specia .apple menu for the about item
-if {[string equal $tcl_platform(windowingsystem) "classic"]} {
+if {[string equal [tk windowingsystem] "classic"]} {
.menuBar add cascade -menu .menuBar.apple
menu .menuBar.apple -tearoff 0
.menuBar.apple add command -label "About..." -command "aboutBox"
diff --git a/library/dialog.tcl b/library/dialog.tcl
index 09476a1..62bb8a4 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -3,7 +3,7 @@
# This file defines the procedure tk_dialog, which creates a dialog
# box containing a bitmap, a message, and one or more buttons.
#
-# RCS: @(#) $Id: dialog.tcl,v 1.12.2.3 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: dialog.tcl,v 1.12.2.4 2002/08/30 18:18:13 das Exp $
#
# Copyright (c) 1992-1993 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -66,13 +66,13 @@ proc ::tk_dialog {w title text bitmap default args} {
}
if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ || [string equal [tk windowingsystem] "aqua"]} {
::tk::unsupported::MacWindowStyle style $w dBoxProc
}
frame $w.bot
frame $w.top
- if {[string equal $tcl_platform(windowingsystem) "x11"]} {
+ if {[string equal [tk windowingsystem] "x11"]} {
$w.bot configure -relief raised -bd 1
$w.top configure -relief raised -bd 1
}
@@ -85,7 +85,7 @@ proc ::tk_dialog {w title text bitmap default args} {
option add *Dialog.msg.wrapLength 3i widgetDefault
if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ || [string equal [tk windowingsystem] "aqua"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 12} widgetDefault
@@ -95,7 +95,7 @@ proc ::tk_dialog {w title text bitmap default args} {
pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m
if {[string compare $bitmap ""]} {
if {([string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]) &&\
+ || [string equal [tk windowingsystem] "aqua"]) &&\
[string equal $bitmap "error"]} {
set bitmap "stop"
}
@@ -118,7 +118,7 @@ proc ::tk_dialog {w title text bitmap default args} {
grid columnconfigure $w.bot $i
# We boost the size of some Mac buttons for l&f
if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ || [string equal [tk windowingsystem] "aqua"]} {
set tmp [string tolower $but]
if {[string equal $tmp "ok"] || [string equal $tmp "cancel"]} {
grid columnconfigure $w.bot $i -minsize [expr {59 + 20}]
diff --git a/library/entry.tcl b/library/entry.tcl
index 416c8ee..88a0d55 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.16.2.4 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.16.2.5 2002/08/30 18:18:13 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -50,7 +50,7 @@ bind Entry <<Copy>> {
bind Entry <<Paste>> {
global tcl_platform
catch {
- if {[string compare $tcl_platform(windowingsystem) "x11"]} {
+ if {[string compare [tk windowingsystem] "x11"]} {
catch {
%W delete sel.first sel.last
}
@@ -203,8 +203,8 @@ bind Entry <Escape> {# nothing}
bind Entry <Return> {# nothing}
bind Entry <KP_Enter> {# nothing}
bind Entry <Tab> {# nothing}
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
bind Entry <Command-KeyPress> {# nothing}
}
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 654157b..8e82d68 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk listbox widgets
# and provides procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: listbox.tcl,v 1.12.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+# RCS: @(#) $Id: listbox.tcl,v 1.12.2.2 2002/08/30 18:18:13 das Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -183,7 +183,7 @@ bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}
-if {[string equal "x11" $tcl_platform(windowingsystem)]} {
+if {[string equal "x11" [tk windowingsystem]]} {
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
# Linux configuration info at:
diff --git a/library/menu.tcl b/library/menu.tcl
index d3e9261..740e6b2 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -4,7 +4,7 @@
# It also implements keyboard traversal of menus and implements a few
# other utility procedures related to menus.
#
-# RCS: @(#) $Id: menu.tcl,v 1.13.2.3 2002/08/20 20:27:09 das Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.13.2.4 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -121,7 +121,7 @@ bind Menu <Enter> {
set tk::Priv(window) %W
if {[%W cget -type] eq "tearoff"} {
if {"%m" ne "NotifyUngrab"} {
- if {$tcl_platform(windowingsystem) eq "x11"} {
+ if {[tk windowingsystem] eq "x11"} {
tk_menuSetFocus %W
}
}
@@ -169,7 +169,7 @@ bind Menu <KeyPress> {
# The following bindings apply to all windows, and are used to
# implement keyboard menu traversal.
-if {[string equal $tcl_platform(windowingsystem) "x11"]} {
+if {[string equal [tk windowingsystem] "x11"]} {
bind all <Alt-KeyPress> {
tk::TraverseToMenu %W %A
}
@@ -251,7 +251,7 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
if {[string equal $menu ""]} {
return
}
- set tearoff [expr {$tcl_platform(windowingsystem) eq "x11" \
+ set tearoff [expr {[tk windowingsystem] eq "x11" \
|| [$menu cget -type] eq "tearoff"}]
if {[string first $w $menu] != 0} {
error "can't post $menu: it isn't a descendant of $w (this is a new requirement in Tk versions 3.0 and later)"
@@ -443,7 +443,7 @@ proc ::tk::MenuUnpost menu {
$Priv(menuBar) configure -cursor $Priv(cursor)
set Priv(menuBar) {}
}
- if {$tcl_platform(windowingsystem) ne "x11"} {
+ if {[tk windowingsystem] ne "x11"} {
set Priv(tearoff) 0
}
}
@@ -499,7 +499,7 @@ proc ::tk::MbButtonUp w {
global tcl_platform
set menu [$w cget -menu]
- set tearoff [expr {$tcl_platform(windowingsystem) eq "x11" || \
+ set tearoff [expr {[tk windowingsystem] eq "x11" || \
($menu ne "" && [$menu cget -type] eq "tearoff")}]
if {($tearoff != 0) && $Priv(postedMb) eq $w \
&& $Priv(inMenubutton) eq $w} {
@@ -592,7 +592,7 @@ proc ::tk::MenuButtonDown menu {
# Must re-grab even if the grab window hasn't changed, in order
# to release the implicit grab from the button press.
- if {[string equal $tcl_platform(windowingsystem) "x11"]} {
+ if {[string equal [tk windowingsystem] "x11"]} {
grab -global $menu
}
}
@@ -1286,7 +1286,7 @@ proc ::tk_popup {menu x y {entry {}}} {
tk::MenuUnpost {}
}
tk::PostOverPoint $menu $x $y $entry
- if {$tcl_platform(windowingsystem) eq "x11" && [winfo viewable $menu]} {
+ if {[tk windowingsystem] eq "x11" && [winfo viewable $menu]} {
tk::SaveGrabInfo $menu
grab -global $menu
set Priv(popup) $menu
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 34845d8..9f62a83 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -3,7 +3,7 @@
# Implements messageboxes for platforms that do not have native
# messagebox support.
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.15.2.4 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.15.2.5 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
#
@@ -157,8 +157,8 @@ proc ::tk::MessageBox {args} {
if {[lsearch -exact {info warning error question} $data(-icon)] == -1} {
error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning"
}
- if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
switch -- $data(-icon) {
"error" {set data(-icon) "stop"}
"warning" {set data(-icon) "caution"}
@@ -261,8 +261,8 @@ proc ::tk::MessageBox {args} {
wm transient $w $data(-parent)
}
- if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
unsupported::MacWindowStyle style $w dBoxProc
}
@@ -270,8 +270,8 @@ proc ::tk::MessageBox {args} {
pack $w.bot -side bottom -fill both
frame $w.top -background $bg
pack $w.top -side top -fill both -expand 1
- if {![string equal $tcl_platform(windowingsystem) "classic"]
- && ![string equal $tcl_platform(windowingsystem) "aqua"]} {
+ if {![string equal [tk windowingsystem] "classic"]
+ && ![string equal [tk windowingsystem] "aqua"]} {
$w.bot configure -relief raised -bd 1
$w.top configure -relief raised -bd 1
}
@@ -281,8 +281,8 @@ proc ::tk::MessageBox {args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+ if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 18} widgetDefault
@@ -291,8 +291,8 @@ proc ::tk::MessageBox {args} {
label $w.msg -anchor nw -justify left -text $data(-message) \
-background $bg
if {[string compare $data(-icon) ""]} {
- if {([string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"])
+ if {([string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"])
|| ([winfo depth $w] < 4) || $tk_strictMotif} {
label $w.bitmap -bitmap $data(-icon) -background $bg
} else {
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 65419c4..f65cbd6 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk scrollbar widgets.
# It also provides procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: scrlbar.tcl,v 1.9.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+# RCS: @(#) $Id: scrlbar.tcl,v 1.9.2.2 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -17,7 +17,7 @@
#-------------------------------------------------------------------------
# Standard Motif bindings:
-if {[string equal $tcl_platform(windowingsystem) "x11"]} {
+if {[string equal [tk windowingsystem] "x11"]} {
bind Scrollbar <Enter> {
if {$tk_strictMotif} {
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index a2406bd..84d4829 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -4,7 +4,7 @@
# procedures that help in implementing those bindings. The spinbox builds
# off the entry widget, so it can reuse Entry bindings and procedures.
#
-# RCS: @(#) $Id: spinbox.tcl,v 1.3.2.4 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: spinbox.tcl,v 1.3.2.5 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -56,7 +56,7 @@ bind Spinbox <<Copy>> {
bind Spinbox <<Paste>> {
global tcl_platform
catch {
- if {$tcl_platform(windowingsystem) ne "x11"} {
+ if {[tk windowingsystem] ne "x11"} {
catch {
%W delete sel.first sel.last
}
@@ -212,8 +212,8 @@ bind Spinbox <Escape> {# nothing}
bind Spinbox <Return> {# nothing}
bind Spinbox <KP_Enter> {# nothing}
bind Spinbox <Tab> {# nothing}
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
bind Spinbox <Command-KeyPress> {# nothing}
}
diff --git a/library/text.tcl b/library/text.tcl
index 10d0a40..cae19d7 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.17.2.5 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: text.tcl,v 1.17.2.6 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -276,8 +276,8 @@ bind Text <Meta-KeyPress> {# nothing}
bind Text <Control-KeyPress> {# nothing}
bind Text <Escape> {# nothing}
bind Text <KP_Enter> {# nothing}
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
bind Text <Command-KeyPress> {# nothing}
}
@@ -394,8 +394,8 @@ bind Text <Meta-Delete> {
# Macintosh only bindings:
# if text black & highlight black -> text white, other text the same
-if {[string equal $tcl_platform(windowingsystem) "classic"]
- || [string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
bind Text <FocusIn> {
%W tag configure sel -borderwidth 0
%W configure -selectbackground systemHighlight -selectforeground systemHighlightText
@@ -462,7 +462,7 @@ bind Text <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}
-if {[string equal "x11" $tcl_platform(windowingsystem)]} {
+if {[string equal "x11" [tk windowingsystem]]} {
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
# Linux configuration info at:
@@ -1001,7 +1001,7 @@ proc ::tk_textPaste w {
$w configure -autoseparators 0
$w edit separator
}
- if {[string compare $tcl_platform(windowingsystem) "x11"]} {
+ if {[string compare [tk windowingsystem] "x11"]} {
catch { $w delete sel.first sel.last }
}
$w insert insert $sel
diff --git a/library/tk.tcl b/library/tk.tcl
index 571c9c3..71e5b43 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.31.2.5 2002/08/21 12:28:55 das Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.31.2.6 2002/08/30 18:18:14 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -257,7 +257,7 @@ proc ::tk::ScreenChanged screen {
selectMode char
}
set Priv(screen) $screen
- set Priv(tearoff) [string equal $tcl_platform(windowingsystem) "x11"]
+ set Priv(tearoff) [string equal [tk windowingsystem] "x11"]
set Priv(window) {}
}
@@ -333,7 +333,7 @@ if {[string equal [info command tk_chooseDirectory] ""]} {
# Define the set of common virtual events.
#----------------------------------------------------------------------
-switch $tcl_platform(windowingsystem) {
+switch [tk windowingsystem] {
"x11" {
event add <<Cut>> <Control-Key-x> <Key-F20>
event add <<Copy>> <Control-Key-c> <Key-F16>
@@ -568,7 +568,7 @@ proc ::tk::mcmaxamp {args} {
}
# For now, turn off the custom mdef proc for the mac:
-if {[string equal $tcl_platform(windowingsystem) "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
namespace eval ::tk::mac {
set useCustomMDEF 0
}
diff --git a/mac/tkMacBitmap.c b/mac/tkMacBitmap.c
index e434c26..073a8e0 100644
--- a/mac/tkMacBitmap.c
+++ b/mac/tkMacBitmap.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: tkMacBitmap.c,v 1.4 1999/05/22 06:32:12 jingham Exp $
+ * RCS: @(#) $Id: tkMacBitmap.c,v 1.4.16.1 2002/08/30 18:18:14 das Exp $
*/
#include "tkPort.h"
@@ -142,7 +142,7 @@ TkpDefineNativeBitmaps()
Pixmap
TkpCreateNativeBitmap(
Display *display,
- char * source) /* Info about the icon to build. */
+ CONST char * source) /* Info about the icon to build. */
{
Pixmap pix;
GWorldPtr destPort;
diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c
index aa1ec96..4f8122d 100644
--- a/mac/tkMacWm.c
+++ b/mac/tkMacWm.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: tkMacWm.c,v 1.11.2.3 2002/08/20 20:27:11 das Exp $
+ * RCS: @(#) $Id: tkMacWm.c,v 1.11.2.4 2002/08/30 18:18:14 das Exp $
*/
#include <Gestalt.h>
@@ -5002,7 +5002,7 @@ TkUnsupported1Cmd(
* interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
- char **argv) /* Argument strings. */
+ CONST char **argv) /* Argument strings. */
{
Tk_Window tkwin = (Tk_Window) clientData;
TkWindow *winPtr;
diff --git a/macosx/Makefile b/macosx/Makefile
new file mode 100644
index 0000000..e659ec6
--- /dev/null
+++ b/macosx/Makefile
@@ -0,0 +1,50 @@
+################################################################################
+#
+# Simple makefile for building on Mac OS X with the
+# Project Builder command line tool 'pbxbuild'
+#
+# RCS: @(#) $Id: Makefile,v 1.1.2.1 2002/08/30 18:18:16 das Exp $
+#
+################################################################################
+
+INSTALL_ROOT =
+
+TARGET = Wish
+
+DEVBUILDSTYLE = Development
+DEPBUILDSTYLE = Deployment
+
+PBXBUILD = /usr/bin/pbxbuild
+
+DEVBUILD = ${PBXBUILD} -target "${TARGET}" -buildstyle "${DEVBUILDSTYLE}"
+DEPBUILD = ${PBXBUILD} -target "${TARGET}" -buildstyle "${DEPBUILDSTYLE}"
+
+################################################################################
+
+all: develop deploy
+
+install: install-develop install-deploy
+
+clean: clean-develop clean-deploy
+
+################################################################################
+
+develop:
+ ${DEVBUILD}
+
+deploy:
+ ${DEPBUILD}
+
+install-develop:
+ ${DEVBUILD} install INSTALL_ROOT="${INSTALL_ROOT}"
+
+install-deploy:
+ ${DEPBUILD} install INSTALL_ROOT="${INSTALL_ROOT}"
+
+clean-develop:
+ ${DEVBUILD} clean
+
+clean-deploy:
+ ${DEPBUILD} clean
+
+################################################################################
diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj
index 0814edd..ee2dc87 100644
--- a/macosx/Wish.pbproj/project.pbxproj
+++ b/macosx/Wish.pbproj/project.pbxproj
@@ -45,6 +45,7 @@
F51D9048018149FD01DC9062,
);
isa = PBXCopyFilesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F51D9040018149FD01DC9062 = {
fileRef = F53755CE016C389901DC9062;
@@ -100,6 +101,19 @@
settings = {
};
};
+ F52D38C5031F4259016F146B = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# keep copy of debug library around, so that\n\t# Deployment build can be installed on top\n\t# of Development build without overwriting it\n\tcd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\n\tcp -fp \"${PRODUCT_NAME}\" \"${PRODUCT_NAME}_debug\"\n\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi";
+ };
F537552A016C352C01DC9062 = {
buildStyles = (
F537552C016C352C01DC9062,
@@ -125,8 +139,8 @@
F537553C016C376E01DC9062,
F53755C9016C389901DC9062,
F53755CC016C389901DC9062,
- F53755DD016C38D201DC9062,
F537567C016C3ADB01DC9062,
+ F53755DD016C38D201DC9062,
);
isa = PBXGroup;
refType = 4;
@@ -135,8 +149,8 @@
buildRules = (
);
buildSettings = {
- COPY_PHASE_STRIP = NO;
- OTHER_LDFLAGS = "\U0001-prebind";
+ TEMP_DIR = "${OBJROOT}/Development.build/$(PROJECT_NAME).build/$(TARGET_NAME).build";
+ UNSTRIPPED_PRODUCT = YES;
};
isa = PBXBuildStyle;
name = Development;
@@ -145,9 +159,9 @@
buildRules = (
);
buildSettings = {
- COPY_PHASE_STRIP = YES;
- OPTIMIZATION_CFLAGS = "-O3";
- OTHER_LDFLAGS = "\U0001-prebind";
+ DEBUGGING_SYMBOLS = NO;
+ OPTIMIZATION_CFLAGS = "-Os";
+ TEMP_DIR = "${OBJROOT}/Deployment.build/$(PROJECT_NAME).build/$(TARGET_NAME).build";
};
isa = PBXBuildStyle;
name = Deployment;
@@ -1330,6 +1344,7 @@
};
F53755DF016C38D201DC9062 = {
buildPhases = (
+ F5877FB7031F97ED016F146B,
F53755E0016C38D201DC9062,
F53755E1016C38D301DC9062,
F53755E2016C38D301DC9062,
@@ -1338,6 +1353,8 @@
F5B1FC08016FFE3501DC9062,
F51D903F018149BD01DC9062,
F548F8C80313C9E0016F146B,
+ F52D38C5031F4259016F146B,
+ F5877FBC031FA968016F146B,
F5C1D51901B88F9A01DC9062,
);
buildSettings = {
@@ -1345,12 +1362,13 @@
DYLIB_CURRENT_VERSION = 8.4;
FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\"";
FRAMEWORK_VERSION = 8.4;
+ GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../bitmaps ../generic ../xlib";
INSTALL_PATH = /Library/Frameworks;
LIBRARY_SEARCH_PATHS = "";
OPTIMIZATION_CFLAGS = "-O0";
- OTHER_CFLAGS = "-DMAC_OSX_TCL -DMAC_OSX_TK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\" -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DTCL_WIDE_INT_TYPE=\"long long\" -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1-DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1";
- OTHER_LDFLAGS = "-seg1addr 0x400000";
+ OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
+ OTHER_LDFLAGS = "-seg1addr 0xb000000";
OTHER_LIBTOOL_FLAGS = "";
OTHER_REZFLAGS = "-i \"../../tcl/generic\" -i \"../generic\"";
PRINCIPAL_CLASS = "";
@@ -1360,7 +1378,7 @@
TK_MINOR_VERSION = 4;
TK_PATCH_LEVEL = b3;
USE_GCC3_PFE_SUPPORT = NO;
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-unused-variable";
WRAPPER_EXTENSION = framework;
};
dependencies = (
@@ -1372,8 +1390,8 @@
productName = TkLibrary;
productReference = F53755DE016C38D201DC9062;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
-<plist version=\"0.9\">
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
@@ -1461,12 +1479,14 @@ Copyright Apple Computer, Inc 2001</string>
F5BFE59002F8C45B01DC9062,
);
isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53755E1016C38D301DC9062 = {
buildActionMask = 2147483647;
files = (
);
isa = PBXResourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53755E2016C38D301DC9062 = {
buildActionMask = 2147483647;
@@ -1583,6 +1603,7 @@ Copyright Apple Computer, Inc 2001</string>
F5BFE58E02F8C41501DC9062,
);
isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53755E3016C38D301DC9062 = {
buildActionMask = 2147483647;
@@ -1592,6 +1613,7 @@ Copyright Apple Computer, Inc 2001</string>
F50D96130196176E01DC9062,
);
isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53755E4016C38D301DC9062 = {
buildActionMask = 2147483647;
@@ -1602,6 +1624,7 @@ Copyright Apple Computer, Inc 2001</string>
F5375682016C3ADB01DC9062,
);
isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53755E5016C390401DC9062 = {
fileRef = F5375569016C37A601DC9062;
@@ -2708,20 +2731,22 @@ Copyright Apple Computer, Inc 2001</string>
};
F53756A0016C4DD401DC9062 = {
buildPhases = (
+ F5877FB8031F982D016F146B,
F53756A1016C4DD401DC9062,
F53756A2016C4DD401DC9062,
F53756A4016C4DD401DC9062,
F53756A6016C4DD401DC9062,
F53756AA016C4DD401DC9062,
- F5FBD6E30173513601DC9062,
+ F5877FBD031FAC6A016F146B,
);
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\"";
+ GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../generic ../xlib";
+ INSTALL_PATH = /Applications/Utilities;
LIBRARY_SEARCH_PATHS = "";
OPTIMIZATION_CFLAGS = "-O0";
- OTHER_CFLAGS = "-DMAC_OSX_TCL -DMAC_OSX_TK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\" -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DTCL_WIDE_INT_TYPE=\"long long\" -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1-DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1";
- OTHER_LDFLAGS = "";
+ OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
OTHER_REZFLAGS = "-i \"../../tcl/generic\" -i \"../generic\"";
PRODUCT_NAME = "Wish Shell";
SECTORDER_FLAGS = "";
@@ -2733,13 +2758,13 @@ Copyright Apple Computer, Inc 2001</string>
F53756B2016C525F01DC9062,
);
isa = PBXApplicationTarget;
- name = "Wish Shell";
- productInstallPath = "$(USER_APPS_DIR)";
+ name = Wish;
+ productInstallPath = /Applications/Utilities;
productName = "Wish Shell";
productReference = F537569F016C4DD401DC9062;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
-<plist version=\"0.9\">
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
@@ -2779,15 +2804,15 @@ Copyright Apple Computer, Inc 2002</string>
F53756AE016C4E1D01DC9062,
);
isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53756A2016C4DD401DC9062 = {
buildActionMask = 2147483647;
files = (
F53756A3016C4DD401DC9062,
- F5C8865E017D625C01DC9062,
- F5C8865F017D625C01DC9062,
);
isa = PBXResourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53756A3016C4DD401DC9062 = {
fileRef = F537553B016C376E01DC9062;
@@ -2801,6 +2826,7 @@ Copyright Apple Computer, Inc 2002</string>
F53756A5016C4DD401DC9062,
);
isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53756A5016C4DD401DC9062 = {
fileRef = F5375548016C376E01DC9062;
@@ -2815,8 +2841,10 @@ Copyright Apple Computer, Inc 2002</string>
F5875C7D016FEF1D01DC9062,
F53756A7016C4DD401DC9062,
F50D96140196176E01DC9062,
+ F5877FB9031F9F49016F146B,
);
isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53756A7016C4DD401DC9062 = {
fileRef = F53755DE016C38D201DC9062;
@@ -2835,6 +2863,7 @@ Copyright Apple Computer, Inc 2002</string>
files = (
);
isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F53756AC016C4E1D01DC9062 = {
fileRef = F537556B016C37A601DC9062;
@@ -2863,15 +2892,17 @@ Copyright Apple Computer, Inc 2002</string>
dstPath = "Versions/$(FRAMEWORK_VERSION)";
dstSubfolderSpec = 1;
files = (
- F548F8D40313CFC8016F146B,
+ F5877FBA031F9F4B016F146B,
);
isa = PBXCopyFilesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F548F8CA0313CEF0016F146B = {
buildActionMask = 2147483647;
files = (
);
isa = PBXHeadersBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F548F8CB0313CEF0016F146B = {
buildActionMask = 2147483647;
@@ -2880,18 +2911,21 @@ Copyright Apple Computer, Inc 2002</string>
F548F8D00313CF11016F146B,
);
isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F548F8CC0313CEF0016F146B = {
buildActionMask = 2147483647;
files = (
);
isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F548F8CD0313CEF0016F146B = {
buildActionMask = 2147483647;
files = (
);
isa = PBXRezBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F548F8CE0313CEF0016F146B = {
buildPhases = (
@@ -2901,13 +2935,15 @@ Copyright Apple Computer, Inc 2002</string>
F548F8CD0313CEF0016F146B,
);
buildSettings = {
+ GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT";
HEADER_SEARCH_PATHS = "../../tcl/generic ../../tcl/unix ../generic ../xlib";
LIBRARY_STYLE = STATIC;
OPTIMIZATION_CFLAGS = "-O0";
- OTHER_CFLAGS = "-DMAC_OSX_TCL -DMAC_OSX_TK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\" -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DTCL_WIDE_INT_TYPE=\"long long\" -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1-DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1";
+ OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\"";
OTHER_LDFLAGS = "";
OTHER_LIBTOOL_FLAGS = "";
- PRODUCT_NAME = libtclstub8.4.a;
+ PRODUCT_NAME = libtkstub8.4.a;
+ REZ_EXECUTABLE = YES;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
};
@@ -2922,7 +2958,7 @@ Copyright Apple Computer, Inc 2002</string>
};
F548F8CF0313CEF0016F146B = {
isa = PBXLibraryReference;
- path = libtclstub8.4.a;
+ path = libtkstub8.4.a;
refType = 3;
};
F548F8D00313CF11016F146B = {
@@ -2941,12 +2977,6 @@ Copyright Apple Computer, Inc 2002</string>
isa = PBXTargetDependency;
target = F548F8CE0313CEF0016F146B;
};
- F548F8D40313CFC8016F146B = {
- fileRef = F548F8CF0313CEF0016F146B;
- isa = PBXBuildFile;
- settings = {
- };
- };
F55BC46802B2D38B01DC9062 = {
isa = PBXFileReference;
name = tkPanedWindow.c;
@@ -2982,6 +3012,70 @@ Copyright Apple Computer, Inc 2002</string>
settings = {
};
};
+ F5877FB7031F97ED016F146B = {
+ buildActionMask = 8;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ shellPath = /bin/sh;
+ shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi";
+ };
+ F5877FB8031F982D016F146B = {
+ buildActionMask = 8;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ shellPath = /bin/sh;
+ shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi";
+ };
+ F5877FB9031F9F49016F146B = {
+ fileRef = F548F8CF0313CEF0016F146B;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5877FBA031F9F4B016F146B = {
+ fileRef = F548F8CF0313CEF0016F146B;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5877FBC031FA968016F146B = {
+ buildActionMask = 8;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ shellPath = /bin/sh;
+ shellScript = "# redo prebinding\nif [ ! -d \"${INSTALL_ROOT}/usr/lib\" ]; then ln -fs /usr/lib \"${INSTALL_ROOT}/usr/\"; RM_USRLIB=1; fi\nif [ ! -d \"${INSTALL_ROOT}/System\" ]; then ln -fs /System \"${INSTALL_ROOT}/\"; RM_SYSTEM=1; fi\nredo_prebinding -r \"${INSTALL_ROOT}\" \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f \"${INSTALL_ROOT}/usr/lib\"; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f ${INSTALL_ROOT}/System; fi";
+ };
+ F5877FBD031FAC6A016F146B = {
+ buildActionMask = 8;
+ files = (
+ );
+ generatedFileNames = (
+ );
+ isa = PBXShellScriptBuildPhase;
+ neededFileNames = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ shellPath = /bin/sh;
+ shellScript = "# redo prebinding\nif [ ! -d \"${INSTALL_ROOT}/usr/lib\" ]; then ln -fs /usr/lib \"${INSTALL_ROOT}/usr/\"; RM_USRLIB=1; fi\nif [ ! -d \"${INSTALL_ROOT}/System\" ]; then ln -fs /System \"${INSTALL_ROOT}/\"; RM_SYSTEM=1; fi\nredo_prebinding -r \"${INSTALL_ROOT}\" \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f \"${INSTALL_ROOT}/usr/lib\"; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f ${INSTALL_ROOT}/System; fi";
+ };
F5B1FC08016FFE3501DC9062 = {
buildActionMask = 2147483647;
dstPath = "Versions/$(FRAMEWORK_VERSION)/Resources/Scripts";
@@ -3020,6 +3114,7 @@ Copyright Apple Computer, Inc 2002</string>
F5B1FC26016FFE3501DC9062,
);
isa = PBXCopyFilesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
};
F5B1FC09016FFE3501DC9062 = {
fileRef = F5DF0928016CD3F901DC9062;
@@ -3246,8 +3341,9 @@ Copyright Apple Computer, Inc 2002</string>
isa = PBXShellScriptBuildPhase;
neededFileNames = (
);
+ runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "source buildConfig";
+ shellScript = "#source buildConfig";
};
F5C88659017D625C01DC9062 = {
children = (
@@ -3270,18 +3366,6 @@ Copyright Apple Computer, Inc 2002</string>
path = ../generic/tkInt.decls;
refType = 2;
};
- F5C8865E017D625C01DC9062 = {
- fileRef = F5C8865A017D625C01DC9062;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5C8865F017D625C01DC9062 = {
- fileRef = F5C8865B017D625C01DC9062;
- isa = PBXBuildFile;
- settings = {
- };
- };
F5DF07A7016CD03801DC9062 = {
children = (
F5DF0928016CD3F901DC9062,
@@ -3503,18 +3587,6 @@ Copyright Apple Computer, Inc 2002</string>
path = ../library/xmfbox.tcl;
refType = 2;
};
- F5FBD6E30173513601DC9062 = {
- buildActionMask = 2147483647;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- shellPath = /bin/sh;
- shellScript = pwd;
- };
};
rootObject = F537552A016C352C01DC9062;
}
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index a6dfa08..ab54c0e 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.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: tkMacOSXBitmap.c,v 1.1.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXBitmap.c,v 1.1.2.2 2002/08/30 18:18:16 das Exp $
*/
#include "tkPort.h"
@@ -101,7 +101,7 @@ TkpDefineNativeBitmaps()
int new;
Tcl_HashEntry *predefHashPtr;
TkPredefBitmap *predefPtr;
- char * name;
+ CONST char * name;
BuiltInIcon *builtInPtr;
NativeIcon *nativeIconPtr;
Tcl_HashTable *tablePtr;
@@ -146,7 +146,7 @@ TkpDefineNativeBitmaps()
Pixmap
TkpCreateNativeBitmap(
Display *display,
- char * source) /* Info about the icon to build. */
+ CONST char * source) /* Info about the icon to build. */
{
Pixmap pix;
GWorldPtr destPort;
@@ -216,7 +216,7 @@ TkpGetNativeAppBitmap(
GWorldPtr destPort;
Rect destRect;
Handle resource;
- int type, destWrote;
+ int type = -1, destWrote;
Str255 nativeName;
/*
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 7985b54..7408840 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.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: tkMacOSXButton.c,v 1.1.2.4 2002/08/21 12:28:56 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.1.2.5 2002/08/30 18:18:16 das Exp $
*/
#include "tkButton.h"
@@ -511,7 +511,7 @@ void
TkpComputeButtonGeometry(
TkButton *butPtr) /* Button whose geometry may have changed. */
{
- int width, height, avgWidth, haveImage = 0, haveText;
+ int width, height, avgWidth, haveImage = 0, haveText = 0;
int xInset, yInset;
int txtWidth, txtHeight;
Tk_FontMetrics fm;
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 7d21e73..bb58504 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -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: tkMacOSXColor.c,v 1.1.2.1 2001/10/15 09:22:00 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXColor.c,v 1.1.2.2 2002/08/30 18:18:16 das Exp $
*/
#include <tkColor.h>
@@ -67,7 +67,7 @@ TkSetMacColor(
LMGetHiliteRGB(macColor);
if ((macColor->red == 0) && (macColor->green == 0)
&& (macColor->blue == 0)) {
- macColor->red = macColor->green = macColor->blue = 0xFFFFFFFF;
+ macColor->red = macColor->green = macColor->blue = 0xFFFF;
} else {
macColor->red = macColor->green = macColor->blue = 0;
}
@@ -202,7 +202,7 @@ TkpGetColor(
if (strncasecmp(name, "system", 6) == 0) {
int foundSystemColor = false;
RGBColor rgbValue;
- char pixelCode;
+ char pixelCode = 0;
if (!strcasecmp(name+6, "Highlight")) {
LMGetHiliteRGB(&rgbValue);
@@ -212,7 +212,7 @@ TkpGetColor(
LMGetHiliteRGB(&rgbValue);
if ((rgbValue.red == 0) && (rgbValue.green == 0)
&& (rgbValue.blue == 0)) {
- rgbValue.red = rgbValue.green = rgbValue.blue = 0xFFFFFFFF;
+ rgbValue.red = rgbValue.green = rgbValue.blue = 0xFFFF;
} else {
rgbValue.red = rgbValue.green = rgbValue.blue = 0;
}
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 7163832..4a0d51c 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.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: tkMacOSXCursor.c,v 1.1.2.2 2002/08/20 20:27:11 das Exp $
+ * RCS: @(#) $Id: tkMacOSXCursor.c,v 1.1.2.3 2002/08/30 18:18:16 das Exp $
*/
#include "tkPort.h"
@@ -79,7 +79,7 @@ static int gTkOwnsCursor = true; /* A boolean indicating whether
*/
static void FindCursorByName _ANSI_ARGS_ ((TkMacOSXCursor *macCursorPtr,
- char *string));
+ CONST char *string));
/*
*----------------------------------------------------------------------
@@ -104,7 +104,7 @@ static void FindCursorByName _ANSI_ARGS_ ((TkMacOSXCursor *macCursorPtr,
void
FindCursorByName(
TkMacOSXCursor *macCursorPtr,
- char *string)
+ CONST char *string)
{
Handle resource;
Str255 curName;
@@ -199,7 +199,7 @@ TkGetCursorByName(
FindCursorByName(macCursorPtr, string);
if (macCursorPtr->macCursor == NULL) {
- char **argv;
+ CONST char **argv;
int argc, err;
/*
diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c
index a929386..53997e8 100644
--- a/macosx/tkMacOSXDebug.c
+++ b/macosx/tkMacOSXDebug.c
@@ -291,7 +291,7 @@ char * CarbonEventKindToAscii(EventRef eventRef, char * buf )
EventKind eventKind;
MyEventNameList * list = eventNameList;
MyEventName * names = NULL;
- int found;
+ int found = 0;
eventClass = GetEventClass(eventRef);
eventKind = GetEventKind(eventRef);
while (list->names && (!names) ) {
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index fd1d56a..62eecf3 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.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: tkMacOSXDialog.c,v 1.1.2.7 2002/07/22 04:08:26 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.1.2.8 2002/08/30 18:18:16 das Exp $
*/
#include <Carbon/Carbon.h>
@@ -124,7 +124,7 @@ Tk_ChooseColorObjCmd(
ColorPickerInfo cpinfo;
static int inited = 0;
static RGBColor in;
- static char *optionStrings[] = {
+ static CONST char *optionStrings[] = {
"-initialcolor", "-parent", "-title", NULL
};
enum options {
@@ -261,7 +261,7 @@ Tk_GetOpenFileObjCmd(
AEDesc *initialPtr = NULL;
AEDescList selectDesc = {typeNull, NULL};
char *initialFile = NULL, *initialDir = NULL;
- static char *openOptionStrings[] = {
+ static CONST char *openOptionStrings[] = {
"-defaultextension", "-filetypes",
"-initialdir", "-initialfile",
"-message", "-multiple",
@@ -410,7 +410,7 @@ Tk_GetSaveFileObjCmd(
FSRef dirRef;
Str255 title, message;
OpenFileData ofd;
- static char *saveOptionStrings[] = {
+ static CONST char *saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
"-message", "-parent", "-title", NULL
};
@@ -547,7 +547,7 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv)
Str255 message, title;
int srcRead, dstWrote;
OpenFileData ofd;
- static char *chooseOptionStrings[] = {
+ static CONST char *chooseOptionStrings[] = {
"-initialdir", "-message", "-mustexist", "-parent", "-title", NULL
};
enum chooseOptions {
@@ -731,7 +731,7 @@ NavServicesGetFile(
NavDialogRef dialogRef = NULL;
CFStringRef * menuItemNames = NULL;
OSErr err;
- Tcl_Obj *theResult;
+ Tcl_Obj *theResult = NULL;
int result;
TextEncoding encoding;
@@ -772,7 +772,7 @@ NavServicesGetFile(
filterPtr->name, encoding);
}
diagOptions.popupExtension = CFArrayCreate(NULL,
- (void **)menuItemNames, ofdPtr->fl.numFilters, NULL);;
+ (const void **)menuItemNames, ofdPtr->fl.numFilters, NULL);;
} else {
diagOptions.optionFlags += kNavNoTypePopup;
diagOptions.popupExtension = NULL;
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index fc5c90b..26586f4 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.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: tkMacOSXFont.c,v 1.1.2.3 2002/08/21 12:28:56 das Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.c,v 1.1.2.4 2002/08/30 18:18:16 das Exp $
*/
#include <Carbon/Carbon.h>
@@ -234,7 +234,7 @@ static GWorldPtr gWorld = NULL;
static FontFamily * AllocFontFamily(CONST MacFont *fontPtr, int family);
static SubFont * CanUseFallback(MacFont *fontPtr, CONST char *fallbackName, int ch);
-static SubFont * CanUseFallbackWithAliases(MacFont *fontPtr, char *faceName, int ch, Tcl_DString *nameTriedPtr);
+static SubFont * CanUseFallbackWithAliases(MacFont *fontPtr, CONST char *faceName, int ch, Tcl_DString *nameTriedPtr);
static SubFont * FindSubFontForChar(MacFont *fontPtr, int ch);
static void FontMapInsert(SubFont *subFontPtr, int ch);
static void FontMapLoadPage(SubFont *subFontPtr, int row);
@@ -247,7 +247,7 @@ static void ReleaseFont(MacFont *fontPtr);
static void ReleaseSubFont(SubFont *subFontPtr);
static int SeenName(CONST char *name, Tcl_DString *dsPtr);
-static char * BreakLine(FontFamily *familyPtr, int flags, CONST char *source, int numBytes, int *widthPtr);
+static CONST char * BreakLine(FontFamily *familyPtr, int flags, CONST char *source, int numBytes, int *widthPtr);
static int GetFamilyNum(CONST char *faceName, short *familyPtr);
static int GetFamilyOrAliasNum(CONST char *faceName, short *familyPtr);
static Tcl_Encoding GetFontEncoding(int faceNum, int allowSymbol, int *isSymbolPtr);
@@ -464,7 +464,7 @@ TkpGetFontFromAttributes(
{
short faceNum, style;
int i, j;
- char *faceName, *fallback;
+ CONST char *faceName, *fallback;
char ***fallbacks;
MacFont *fontPtr;
@@ -741,7 +741,7 @@ Tk_MeasureChars(
int widthLeft;
FontFamily *thisFamilyPtr;
Tcl_UniChar ch;
- char *rest;
+ CONST char *rest = NULL;
/*
* How many chars will fit in the space allotted?
@@ -815,7 +815,7 @@ Tk_MeasureChars(
*---------------------------------------------------------------------------
*/
-static char *
+static CONST char *
BreakLine(
FontFamily *familyPtr, /* FontFamily that describes the font values
* that are already selected into the graphics
@@ -1077,7 +1077,7 @@ MultiFontDrawText(
int x, int y) /* Coordinates at which to place origin *
* of string when drawing. */
{
- FontFamily *lastFamilyPtr, *thisFamilyPtr;
+ FontFamily *lastFamilyPtr, *thisFamilyPtr = NULL;
Tcl_DString runString;
CONST char *p, *end, *next;
Tcl_UniChar ch;
@@ -1498,7 +1498,7 @@ FindSubFontForChar(
int ch) /* The Unicode character to be displayed. */
{
int i, j, k;
- char *fallbackName;
+ CONST char *fallbackName;
char **aliases;
SubFont *subFontPtr;
FontNameMap *mapPtr;
@@ -1839,7 +1839,7 @@ static SubFont *
CanUseFallbackWithAliases(
MacFont *fontPtr, /* The font object that will own the new
* screen font. */
- char *faceName, /* Desired face name for new screen font. */
+ CONST char *faceName, /* Desired face name for new screen font. */
int ch, /* The Unicode character that the new
* screen font must be able to display. */
Tcl_DString *nameTriedPtr) /* Records face names that have already
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 60eb0ad..d0faa0d 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.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: tkMacOSXInit.c,v 1.1.2.7 2002/08/21 12:28:56 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInit.c,v 1.1.2.8 2002/08/30 18:18:16 das Exp $
*/
#include "tkInt.h"
@@ -136,9 +136,6 @@ TkpInit(interp)
}
}
- Tcl_SetVar2(interp, "tcl_platform", "windowingsystem",
- "aqua", TCL_GLOBAL_ONLY);
-
/*
* When Tk is in a framework, force tcl_findLibrary to look in the
* framework scripts directory.
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 750d966..d472201 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -9,15 +9,28 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXInt.h,v 1.1.2.2 2002/07/19 09:22:34 vincentdarley Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.1.2.3 2002/08/30 18:18:16 das Exp $
*/
#ifndef _TKMACINT
#define _TKMACINT
+#ifndef _TKINT
#include "tkInt.h"
+#endif
+/*
+ * Include platform specific public interfaces.
+ */
+
+#ifndef _TKMAC
#include "tkMacOSX.h"
+#endif
+
+#ifndef _TKPORT
+#include "tkPort.h"
+#endif
+
#include <Carbon/Carbon.h>
struct TkWindowPrivate {
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index a2778a3..a96c6f7 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.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: tkMacOSXKeyboard.c,v 1.1.2.3 2002/07/19 09:22:34 vincentdarley Exp $
+ * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.1.2.4 2002/08/30 18:18:16 das Exp $
*/
#include "tkInt.h"
@@ -19,7 +19,7 @@
#include "tkMacOSXInt.h"
typedef struct {
- short keycode; /* Macintosh keycode */
+ int keycode; /* Macintosh keycode */
KeySym keysym; /* X windows Keysym */
} KeyInfo;
@@ -141,7 +141,7 @@ XKeycodeToKeysym(
{
register Tcl_HashEntry *hPtr;
int c;
- char virtualKey;
+ int virtualKey;
int newKeycode;
unsigned long dummy, newChar;
@@ -216,7 +216,7 @@ TkpGetString(
{
register Tcl_HashEntry *hPtr;
char string[3];
- char virtualKey;
+ int virtualKey;
int c, len;
if (!initialized) {
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 731fcad..6dc0050 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.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: tkMacOSXMenu.c,v 1.1.2.8 2002/08/26 21:57:44 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.1.2.9 2002/08/30 18:18:16 das Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMenuButton.h"
@@ -412,7 +412,7 @@ int
{
int found = 0;
int newEntry;
- Tcl_HashEntry *commandEntryPtr;
+ Tcl_HashEntry *commandEntryPtr = NULL;
short returnID = *menuIDPtr;
/*
@@ -1086,7 +1086,6 @@ ReconfigureIndividualMenu(
cf = CFSTR ("<Error>");
SetMenuItemTextWithCFString(macMenuHdl, base + index, cf);
}
-
Tcl_DStringFree(&itemTextDString);
/*
@@ -2441,7 +2440,7 @@ DrawSICN(
CGrafPtr saveWorld;
GDHandle saveDevice;
GWorldPtr destPort;
- BitMapPtr destBitMap;
+ const BitMap *destBitMap;
RGBColor origForeColor, origBackColor, foreColor, backColor;
HLock(sicnHandle);
@@ -3985,7 +3984,7 @@ HandleMenuHiliteMsg (MenuRef menu,
SInt16 *whichItem,
TkMenu *menuPtr)
{
- TkMenuEntry *mePtr;
+ TkMenuEntry *mePtr = NULL;
Tk_Font tkfont;
Tk_FontMetrics fontMetrics;
int oldItem;
@@ -4277,7 +4276,7 @@ HandleMenuFindItemsMsg (MenuRef menu,
DONT_SCROLL, DOWN_SCROLL, UP_SCROLL
} scrollDirection;
Rect updateRect;
- short scrollAmt;
+ short scrollAmt = 0;
RGBColor origForeColor, origBackColor;
/*
@@ -4421,7 +4420,7 @@ HandleMenuFindItemsMsg (MenuRef menu,
Tk_Font menuFont;
RgnHandle updateRgn = NewRgn();
- ScrollMenuImage(menu, &menuRectPtr, 0, scrollAmt, NULL);
+ ScrollMenuImage(menu, menuRectPtr, 0, scrollAmt, NULL);
mtdPtr->virtualMenuTop += scrollAmt;
mtdPtr->virtualMenuBottom += scrollAmt;
#if 0
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 0f90002..8f3a1b9 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.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: tkMacOSXMenus.c,v 1.1.2.2 2002/02/05 02:25:17 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.1.2.3 2002/08/30 18:18:16 das Exp $
*/
#include "tk.h"
@@ -175,7 +175,9 @@ TkMacOSXInitMenus(
InsertMenu(tkAppleMenu, 0);
AppendMenu(tkAppleMenu, "\pAbout Tcl & TkÉ");
AppendMenu(tkAppleMenu, "\p(-");
+ /* Not necessary in Carbon:
AppendResMenu(tkAppleMenu, 'DRVR');
+ */
if (TkMacOSXUseMenuID(kFileMenu) != TCL_OK) {
panic("Menu ID %d is already in use!", kFileMenu);
@@ -302,8 +304,8 @@ static void
SourceDialog()
{
int result;
- char *path;
- char openCmd[] = "tk_getOpenFile -filetypes {\
+ CONST char *path;
+ CONST char *openCmd = "tk_getOpenFile -filetypes {\
{{TCL Scripts} {.tcl} TEXT} {{Text Files} {} TEXT}}";
if (gInterp == NULL) {
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 735f3b7..6347f2f 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.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: tkMacOSXScrlbr.c,v 1.1.2.2 2002/08/26 21:55:38 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.1.2.3 2002/08/30 18:18:16 das Exp $
*/
#include "tkScrollbar.h"
@@ -571,7 +571,7 @@ ThumbActionProc()
Rect trackRect;
Tcl_Interp *interp;
MouseTrackingResult trackingResult;
- int err;
+ OSErr err;
if (scrollPtr == NULL) {
return;
@@ -588,7 +588,7 @@ ThumbActionProc()
*
* Note: the arrowLength is equal to the thumb width of a Mac scrollbar.
*/
-
+
origValue = GetControlValue(macScrollPtr->sbHandle);
GetControlBounds(macScrollPtr->sbHandle, &trackRect);
if (scrollPtr->vertical == true) {
@@ -611,10 +611,8 @@ ThumbActionProc()
* we calculate the value that should be passed to the "command" part of
* the scrollbar.
*/
-
+
do {
- OSErr err;
-
err = TrackMouseLocationWithOptions(NULL,
kTrackMouseLocationOptionDontConsumeMouseUp,
kEventDurationForever,
@@ -662,7 +660,7 @@ ThumbActionProc()
Tcl_Release((ClientData) interp);
}
} while ((err==noErr) && trackingResult!=kMouseTrackingMouseReleased );
-
+
Tcl_DStringFree(&cmdString);
return;
}
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index 523e496..126792b 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -32,7 +32,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXSend.c,v 1.1.2.2 2002/08/20 20:27:11 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSend.c,v 1.1.2.3 2002/08/30 18:18:16 das Exp $
*/
#include <Carbon/Carbon.h>
@@ -191,6 +191,8 @@ int tkSendSerial = 0;
* Forward declarations for procedures defined later in this file:
*/
+static int SendInit _ANSI_ARGS_((Tcl_Interp *interp));
+/*
static int AppendErrorProc _ANSI_ARGS_((ClientData clientData,
XErrorEvent *errorPtr));
static void DeleteProc _ANSI_ARGS_((ClientData clientData));
@@ -205,13 +207,13 @@ static NameRegistry * RegOpen _ANSI_ARGS_((Tcl_Interp *interp,
TkWindow *winPtr, int lock));
static void SendEventProc _ANSI_ARGS_((ClientData clientData,
XEvent *eventPtr));
-static int SendInit _ANSI_ARGS_((Tcl_Interp *interp));
static Bool SendRestrictProc _ANSI_ARGS_((Display *display,
XEvent *eventPtr, char *arg));
static int ServerSecure _ANSI_ARGS_((TkDisplay *dispPtr));
static void TimeoutProc _ANSI_ARGS_((ClientData clientData));
static int ValidateName _ANSI_ARGS_((TkDisplay *dispPtr,
char *name, Window commWindow, int oldOK));
+*/
/*
*--------------------------------------------------------------
@@ -252,7 +254,7 @@ Tk_SetAppName(
Tcl_Interp *interp = winPtr->mainPtr->interp;
int i, suffix, offset, result;
RegisteredInterp *riPtr, *prevPtr;
- char *actualName;
+ CONST char *actualName;
Tcl_DString dString;
Tcl_Obj *resultObjPtr, *interpNamePtr;
char *interpName;
@@ -309,7 +311,7 @@ Tk_SetAppName(
actualName = Tcl_DStringValue(&dString);
}
suffix++;
- sprintf(actualName + offset, "%d", suffix);
+ sprintf(Tcl_DStringValue(&dString) + offset, "%d", suffix);
i = 0;
} else {
i++;
@@ -364,13 +366,13 @@ Tk_SendObjCmd(
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[]) /* The arguments */
{
- static char *sendOptions[] = {"-async", "-displayof", "-", (char *) NULL};
+ CONST char *sendOptions[] = {"-async", "-displayof", "-", (char *) NULL};
char *stringRep, *destName;
int async = 0;
int i, index, firstArg;
RegisteredInterp *riPtr;
Tcl_Obj *resultPtr, *listObjPtr;
- int result;
+ int result = TCL_OK;
for (i = 1; i < (objc - 1); ) {
stringRep = Tcl_GetStringFromObj(objv[i], NULL);
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index ccde42d..012b162 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -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: tkMacOSXWm.c,v 1.1.2.6 2002/08/20 20:27:11 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.1.2.7 2002/08/30 18:18:16 das Exp $
*/
#include <Carbon/Carbon.h>
@@ -1435,7 +1435,7 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
if (objc == 3) {
if (wmPtr->hints.flags & IconPixmapHint) {
Tcl_SetResult(interp,
- Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_pixmap),
+ (char *) Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_pixmap),
TCL_STATIC);
}
return TCL_OK;
@@ -1565,7 +1565,7 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
if (objc == 3) {
if (wmPtr->hints.flags & IconMaskHint) {
Tcl_SetResult(interp,
- Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_mask),
+ (char *) Tk_NameOfBitmap(winPtr->display, wmPtr->hints.icon_mask),
TCL_STATIC);
}
return TCL_OK;
@@ -1613,7 +1613,7 @@ int objc; /* Number of arguments. */
Tcl_Obj *CONST objv[]; /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- char *argv3;
+ CONST char *argv3;
int length;
if (objc > 4) {
@@ -1622,7 +1622,7 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
}
if (objc == 3) {
Tcl_SetResult(interp,
- ((wmPtr->iconName != NULL) ? wmPtr->iconName : ""),
+ (char *) ((wmPtr->iconName != NULL) ? wmPtr->iconName : ""),
TCL_STATIC);
return TCL_OK;
} else {
@@ -2470,7 +2470,7 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
}
if (objc == 3) {
Tcl_SetResult(interp,
- ((wmPtr->titleUid != NULL) ? wmPtr->titleUid : winPtr->nameUid),
+ (char *) ((wmPtr->titleUid != NULL) ? wmPtr->titleUid : winPtr->nameUid),
TCL_STATIC);
return TCL_OK;
} else {
@@ -4472,7 +4472,7 @@ TkUnsupported1Cmd(
* interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
- char **argv) /* Argument strings. */
+ CONST char **argv) /* Argument strings. */
{
Tk_Window tkwin = (Tk_Window) clientData;
TkWindow *winPtr;
@@ -4559,7 +4559,7 @@ TkUnsupported1Cmd(
panic("invalid style");
}
if (appearanceSpec) {
- Tcl_Obj *attributeList, *newResult;
+ Tcl_Obj *attributeList, *newResult = NULL;
switch (wmPtr->macClass) {
case kAlertWindowClass:
@@ -4724,7 +4724,7 @@ TkUnsupported1Cmd(
} else {
int foundOne = 0;
int attrArgc, i;
- char **attrArgv = NULL;
+ CONST char **attrArgv = NULL;
if (Tcl_SplitList(interp, argv[4], &attrArgc, &attrArgv) != TCL_OK) {
wmPtr->macClass = oldClass;
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h
index f5f99f0..eaa0dd5 100644
--- a/macosx/tkMacOSXWm.h
+++ b/macosx/tkMacOSXWm.h
@@ -103,7 +103,7 @@ typedef struct TkWmInfo {
* value None. */
Tk_Uid titleUid; /* Title to display in window caption. If
* NULL, use name of widget. */
- Tk_Uid iconName; /* Name to display in icon. */
+ char *iconName; /* Name to display in icon. */
Window master; /* Master window for TRANSIENT_FOR property,
* or None. */
XWMHints hints; /* Various pieces of information for
@@ -222,7 +222,7 @@ typedef struct TkWmInfo {
ProtocolHandler *protPtr; /* First in list of protocol handlers for
* this window (NULL means none). */
int cmdArgc; /* Number of elements in cmdArgv below. */
- char **cmdArgv; /* Array of strings to store in the
+ CONST char **cmdArgv; /* Array of strings to store in the
* WM_COMMAND property. NULL means nothing
* available. */
char *clientMachine; /* String to store in WM_CLIENT_MACHINE
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index f767c33..c5bb73b 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -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: tkMacOSXXStubs.c,v 1.1.2.4 2002/08/20 20:27:11 das Exp $
+ * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.1.2.5 2002/08/30 18:18:16 das Exp $
*/
#include "tkInt.h"
@@ -95,7 +95,7 @@ TkpOpenDisplay(
Display *display;
Screen *screen;
GDHandle graphicsDevice;
- int fd;
+ int fd = 0;
if (gMacDisplay != NULL) {
if (strcmp(gMacDisplay->display->display_name, display_name) == 0) {
return gMacDisplay;
diff --git a/unix/tkUnixInit.c b/unix/tkUnixInit.c
index 520a786..7ee240f 100644
--- a/unix/tkUnixInit.c
+++ b/unix/tkUnixInit.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: tkUnixInit.c,v 1.4.18.2 2002/02/05 02:25:18 wolfsuit Exp $
+ * RCS: @(#) $Id: tkUnixInit.c,v 1.4.18.3 2002/08/30 18:18:17 das Exp $
*/
#include "tkInt.h"
@@ -44,7 +44,6 @@ int
TkpInit(interp)
Tcl_Interp *interp;
{
- Tcl_SetVar2(interp, "tcl_platform", "windowingsystem", "x11", TCL_GLOBAL_ONLY);
TkCreateXEventSource();
return Tcl_Eval(interp, initScript);
}
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index 93c49cd..d92c0c0 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.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: tkWinInit.c,v 1.4.8.3 2002/06/10 05:38:28 wolfsuit Exp $
+ * RCS: @(#) $Id: tkWinInit.c,v 1.4.8.4 2002/08/30 18:18:17 das Exp $
*/
#include "tkWinInt.h"
@@ -48,7 +48,6 @@ TkpInit(interp)
* otherwise because TkWinXInit flips a static bit to do
* its work just once.
*/
- Tcl_SetVar2(interp, "tcl_platform", "windowingsystem", "win32", TCL_GLOBAL_ONLY);
TkWinXInit(GetModuleHandle(NULL));
return Tcl_Eval(interp, initScript);
}