From 4f7239111f6f845827fc7b1e8c46e71653a103e0 Mon Sep 17 00:00:00 2001 From: jaeger401 Date: Wed, 8 Jul 2015 10:45:00 -0400 Subject: [PATCH] Tcl/Tk 8.5 conversion; compiles but doesn't run Compilation throws a ton of warnings, but it's unclear if those are expected (i.e., pre-existing) or not. Compilation works, but the resulting executable dies with an error: "upvar won't create a scalar variable that looks like an array element" --- Makefile | 8 +++----- libs/tkInt.h | 9 +++++---- libs/tkUnixPort.h | 2 +- libs/tkgButton.c | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 78effa9..2243e88 100755 --- a/Makefile +++ b/Makefile @@ -12,12 +12,10 @@ prefix = /usr exec_prefix = ${prefix} # Where to create the tkgoodstuff library directory -#TKG_LIBRARY = $(prefix)/lib/tkgoodstuff -TKG_LIBRARY = ./lib/tkgoodstuff +TKG_LIBRARY = $(prefix)/lib/tkgoodstuff # Where to put the executable scripts (tkgoodstuff, Dialer) -#BIN_INSTALL_DIR = $(exec_prefix)/bin -BIN_INSTALL_DIR = ./bin +BIN_INSTALL_DIR = $(exec_prefix)/bin # english or french TKG_LANGUAGE = english @@ -26,7 +24,7 @@ TKG_LANGUAGE = english EXECSHELL = $(BIN_INSTALL_DIR)/tkgwish$(VERSION) SRCDIR = . -TCLSH = /usr/bin/tclsh8.0 +TCLSH = /usr/bin/tclsh8.5 INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 diff --git a/libs/tkInt.h b/libs/tkInt.h index 0460486..e8d2653 100755 --- a/libs/tkInt.h +++ b/libs/tkInt.h @@ -32,7 +32,7 @@ typedef struct TkColormap TkColormap; typedef struct TkGrabEvent TkGrabEvent; -typedef struct Tk_PostscriptInfo Tk_PostscriptInfo; +/*typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;*/ typedef struct TkpCursor *TkpCursor; typedef struct TkRegion_ *TkRegion; typedef struct TkStressedCmap TkStressedCmap; @@ -674,15 +674,16 @@ extern TkDisplay *tkDisplayList; * to the outside world: */ -extern Tk_Uid tkActiveUid; +/* a few things here were extern; removed -- JSG */ +Tk_Uid tkActiveUid; extern Tk_ImageType tkBitmapImageType; -extern Tk_Uid tkDisabledUid; +Tk_Uid tkDisabledUid; extern Tk_PhotoImageFormat tkImgFmtGIF; extern void (*tkHandleEventProc) _ANSI_ARGS_(( XEvent* eventPtr)); extern Tk_PhotoImageFormat tkImgFmtPPM; extern TkMainInfo *tkMainWindowList; -extern Tk_Uid tkNormalUid; +Tk_Uid tkNormalUid; extern Tk_ImageType tkPhotoImageType; extern Tcl_HashTable tkPredefBitmapTable; extern int tkSendSerial; diff --git a/libs/tkUnixPort.h b/libs/tkUnixPort.h index 5677382..2e61db2 100755 --- a/libs/tkUnixPort.h +++ b/libs/tkUnixPort.h @@ -135,7 +135,7 @@ extern int errno; * in any other header file. */ -extern void panic(); +/*extern void panic();*/ /* * These functions do nothing under Unix, so we just eliminate calls to them. diff --git a/libs/tkgButton.c b/libs/tkgButton.c index ffa337e..8d2d4ad 100755 --- a/libs/tkgButton.c +++ b/libs/tkgButton.c @@ -382,7 +382,7 @@ TkgButtonCreate(clientData, interp, argc, argv, type) Tk_SetClass(new, classNames[type]); butPtr = TkpCreateTkgButton(new); - TkSetClassProcs(new, &tkpTkgButtonProcs, (ClientData) butPtr); + Tk_SetClassProcs(new, &tkpTkgButtonProcs, (ClientData) butPtr); /* * Initialize the data structure for the button.