diff options
author | redman <redman> | 1999-03-06 02:23:16 (GMT) |
---|---|---|
committer | redman <redman> | 1999-03-06 02:23:16 (GMT) |
commit | e70550a22b9cd29d9438f95c9c7d4c24d993bfdc (patch) | |
tree | 8e5682bdc3accb869e3c43dc481d15cc3c094e88 | |
parent | 6b661c846e57112bf72a9df53be4f9ebc0d7afdb (diff) | |
download | tk-e70550a22b9cd29d9438f95c9c7d4c24d993bfdc.zip tk-e70550a22b9cd29d9438f95c9c7d4c24d993bfdc.tar.gz tk-e70550a22b9cd29d9438f95c9c7d4c24d993bfdc.tar.bz2 |
Modified stubs code to work on Unix. Modified makefile and configure
to add stub support and build against libtclstub.a.
-rw-r--r-- | generic/tkCmds.c | 8 | ||||
-rw-r--r-- | generic/tkGrab.c | 6 | ||||
-rw-r--r-- | generic/tkIntPlatStubs.c | 3 | ||||
-rw-r--r-- | generic/tkStubInit.c | 7 | ||||
-rw-r--r-- | generic/tkWindow.c | 6 | ||||
-rw-r--r-- | unix/Makefile.in | 70 | ||||
-rw-r--r-- | unix/configure.in | 39 | ||||
-rw-r--r-- | unix/tkUnix.c | 31 | ||||
-rw-r--r-- | unix/tkUnix3d.c | 6 | ||||
-rw-r--r-- | unix/tkUnixDraw.c | 6 | ||||
-rw-r--r-- | unix/tkUnixFont.c | 4 |
11 files changed, 162 insertions, 24 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c index a6b7fb3..438821c 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -11,15 +11,19 @@ * 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.4.4.1 1999/03/06 00:08:02 redman Exp $ + * RCS: @(#) $Id: tkCmds.c,v 1.4.4.2 1999/03/06 02:23:16 redman Exp $ */ #include "tkPort.h" #include "tkInt.h" #include <errno.h> -#ifdef __WIN32__ +#if defined(__WIN32__) #include "tkWinInt.h" +#elif defined(MAC_TCL) +#include "tkMacInt.h" +#else +#include "tkUnixInt.h" #endif /* diff --git a/generic/tkGrab.c b/generic/tkGrab.c index bbb4f65..400a2d0 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -9,12 +9,16 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkGrab.c,v 1.2 1998/09/14 18:23:11 stanton Exp $ + * RCS: @(#) $Id: tkGrab.c,v 1.2.4.1 1999/03/06 02:23:16 redman Exp $ */ #include "tkPort.h" #include "tkInt.h" +#if !defined(__WIN32__) && !defined(MAC_TCL) +#include "tkUnixInt.h" +#endif + /* * The grab state machine has four states: ungrabbed, button pressed, * grabbed, and button pressed while grabbed. In addition, there are diff --git a/generic/tkIntPlatStubs.c b/generic/tkIntPlatStubs.c index 58a2339..d65ddd7 100644 --- a/generic/tkIntPlatStubs.c +++ b/generic/tkIntPlatStubs.c @@ -7,11 +7,12 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntPlatStubs.c,v 1.1.2.2 1999/03/06 01:54:59 redman Exp $ + * RCS: @(#) $Id: tkIntPlatStubs.c,v 1.1.2.3 1999/03/06 02:23:17 redman Exp $ */ #include "tkInt.h" #include "tkPort.h" +#include "tkIntPlatDecls.h" /* * WARNING: This file is automatically generated by the tools/genStubs.tcl diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 99fd46f..a6e8c18 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,11 +8,16 @@ * 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.1.2.2 1999/03/06 01:54:59 redman Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.1.2.3 1999/03/06 02:23:17 redman Exp $ */ #include "tkInt.h" #include "tkPort.h" +#include "tkDecls.h" +#include "tkPlatDecls.h" +#include "tkIntDecls.h" +#include "tkIntPlatDecls.h" +#include "tkIntXlibDecls.h" /* * Remove macros that will interfere with the definitions below. diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 64b06a8..aeb948b 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,12 +12,16 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.4 1998/09/30 19:01:20 rjohnson Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.4.4.1 1999/03/06 02:23:17 redman Exp $ */ #include "tkPort.h" #include "tkInt.h" +#if !defined(__WIN32__) && !defined(MAC_TCL) +#include "tkUnixInt.h" +#endif + /* * Count of number of main windows currently open in this process. */ diff --git a/unix/Makefile.in b/unix/Makefile.in index b4299df..691f8d3 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.11 1998/10/20 20:02:37 rjohnson Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.11.4.1 1999/03/06 02:23:18 redman Exp $ # Current Tk version; used in various names. @@ -110,10 +110,6 @@ X11_INCLUDES = @XINCLUDES@ # can override it). X11_LIB_SWITCHES = @XLIBSW@ -# Libraries to use when linking. This definition is determined by the -# configure script. -LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc - # To turn off the security checks that disallow incoming sends when # the X server appears to be insecure, reverse the comments on the # following lines: @@ -132,6 +128,22 @@ PROTO_FLAGS = MEM_DEBUG_FLAGS = #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG +# To enable support for stubs in Tcl. +STUB_LIB_FILE = @STUB_LIB_FILE@ + +TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@ +#TK_STUB_LIB_FILE = libtkstub.a + +TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@ +#TK_STUB_LIB_FLAG = -ltkstub + + + +# Libraries to use when linking. This definition is determined by the +# configure script. +LIBS = @TCL_BUILD_STUB_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc + + # If your X server is X11R4 or earlier, then you may wish to reverse # the comment characters on the following two lines. This will enable # extra code to speed up XStringToKeysym. In X11R5 and later releases @@ -166,9 +178,6 @@ TK_LIB_FILE = @TK_LIB_FILE@ TK_LIB_FLAG = @TK_LIB_FLAG@ #TK_LIB_FLAG = -ltk -TCL_LIB_FLAG = @TCL_LIB_FLAG@ -#TCL_LIB_FLAG = -ltcl - # The symbol below provides support for dynamic loading and shared # libraries. See configure.in for a description of what it means. # The values of the symbolis normally set by the configure script. @@ -206,14 +215,22 @@ TOOL_DIR = @TCL_SRC_DIR@/tools CC = @CC@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TK_SHLIB_CFLAGS} \ -I${UNIX_DIR} -I${GENERIC_DIR} \ --I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} \ +-I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ +${AC_FLAGS} ${PROTO_FLAGS} \ ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} +STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ +-I${UNIX_DIR} -I${GENERIC_DIR} \ +-I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ +${AC_FLAGS} ${PROTO_FLAGS} \ +${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS}\ + -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\" + DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ -I${BMAP_DIR} \ -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \ -${KEYSYM_FLAGS} +${KEYSYM_FLAGS} -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\" $(STUB_FLAGS) WISH_OBJS = tkAppInit.o @@ -236,7 +253,10 @@ UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \ tkUnixDialog.o tkUnixDraw.o \ tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \ tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \ - tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o + tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o + +STUB_LIB_OBJS = tkStubs.o tkIntStubs.o tkIntPlatStubs.o tkPlatStubs.o \ + tkIntXlibStubs.o OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \ tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \ @@ -281,6 +301,9 @@ SRCS = \ $(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \ $(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \ $(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \ + $(GENERIC_DIR)/tkStubs.c $(GENERIC_DIR)/tkIntStubs.c \ + $(GENERIC_DIR)/tkPlatStubs.c $(GENERIC_DIR)/tkIntPlatStubs.c \ + $(GENERIC_DIR)/tkIntXlibStubs.c $(GENERIC_DIR)/tkInitStubs.c \ $(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \ $(UNIX_DIR)/tkUnix3d.c \ $(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \ @@ -311,6 +334,11 @@ ${TK_LIB_FILE}: ${OBJS} @MAKE_LIB@ $(RANLIB) ${TK_LIB_FILE} +${STUB_LIB_FILE}: ${STUB_LIB_OBJS} + rm -f ${STUB_LIB_FILE} + @MAKE_STUB_LIB@ + $(RANLIB) ${STUB_LIB_FILE} + # Make target which outputs the list of the .o contained in the Tk lib # usefull to build a single big shared library containing Tcl/Tk and other # extensions. used for the Tcl Plugin. -- dl @@ -321,7 +349,7 @@ tkLibObjs: objs: ${OBJS} -wish: $(WISH_OBJS) $(TK_LIB_FILE) +wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(CC) @LD_FLAGS@ $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \ $(TK_CC_SEARCH_FLAGS) -o wish @@ -766,6 +794,24 @@ tkUnixWm.o: $(UNIX_DIR)/tkUnixWm.c tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c +tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubInit.c + +tkStubs.o: $(GENERIC_DIR)/tkStubs.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubs.c + +tkIntStubs.o: $(GENERIC_DIR)/tkIntStubs.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntStubs.c + +tkPlatStubs.o: $(GENERIC_DIR)/tkPlatStubs.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlatStubs.c + +tkIntPlatStubs.o: $(GENERIC_DIR)/tkIntPlatStubs.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntPlatStubs.c + +tkIntXlibStubs.o: $(GENERIC_DIR)/tkIntXlibStubs.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntXlibStubs.c + .c.o: $(CC) -c $(CC_SWITCHES) $< diff --git a/unix/configure.in b/unix/configure.in index aed841d..b9cf4c4 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. AC_INIT(../generic/tk.h) -# RCS: @(#) $Id: configure.in,v 1.26 1999/02/04 21:00:29 stanton Exp $ +# RCS: @(#) $Id: configure.in,v 1.26.4.1 1999/03/06 02:23:18 redman Exp $ TK_VERSION=8.0 TK_MAJOR_VERSION=8 @@ -434,6 +434,42 @@ fi TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" +#-------------------------------------------------------------------- +# The statements below define various symbols relating to Tcl +# stub support. +#-------------------------------------------------------------------- +# Replace ${VERSION} with contents of ${TK_VERSION} +eval "STUB_LIB_FILE=libtkstub${TCL_UNSHARED_LIB_SUFFIX}" + +# Replace DBGX with TCL_DBGX +eval "STUB_LIB_FILE=\"${STUB_LIB_FILE}\"" + +MAKE_STUB_LIB="ar cr \${STUB_LIB_FILE} \${STUB_LIB_OBJS}" + +TK_STUB_LIB_FILE=${STUB_LIB_FILE} + +if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TCL_DBGX}" +else + TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TCL_DBGX}" +fi + +TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}" +TL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}" +TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}" +TK_STUB_LIB_PATH="${exec_prefix}/lib/${TK_STUB_LIB_FILE}" + +AC_SUBST(STUB_LIB_FILE) + +AC_SUBST(TK_STUB_LIB_FILE) +AC_SUBST(TK_STUB_LIB_FLAG) +AC_SUBST(TK_BUILD_STUB_LIB_SPEC) +AC_SUBST(TK_STUB_LIB_SPEC) +AC_SUBST(TK_BUILD_STUB_LIB_PATH) +AC_SUBST(TK_STUB_LIB_PATH) +AC_SUBST(MAKE_STUB_LIB) + + AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(CFLAGS_OPTIMIZE) @@ -451,6 +487,7 @@ AC_SUBST(SHLIB_SUFFIX) AC_SUBST(SHLIB_VERSION) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_BUILD_LIB_SPEC) +AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) AC_SUBST(TCL_DBGX) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_SRC_DIR) diff --git a/unix/tkUnix.c b/unix/tkUnix.c index 04fdee1..e85d5a2 100644 --- a/unix/tkUnix.c +++ b/unix/tkUnix.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: tkUnix.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ + * RCS: @(#) $Id: tkUnix.c,v 1.2.4.1 1999/03/06 02:23:18 redman Exp $ */ #include <tkInt.h> @@ -77,3 +77,32 @@ TkGetDefaultScreenName(interp, screenName) } return screenName; } + + +/* + *---------------------------------------------------------------------- + * + * Tk_UpdatePointer -- + * + * Unused function in UNIX + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +Tk_UpdatePointer(tkwin, x, y, state) + Tk_Window tkwin; /* Window to which pointer event + * is reported. May be NULL. */ + int x, y; /* Pointer location in root coords. */ + int state; /* Modifier state mask. */ +{ + /* + * This function intentionally left blank + */ +} diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c index f8470a2..b3aaa8a 100644 --- a/unix/tkUnix3d.c +++ b/unix/tkUnix3d.c @@ -9,11 +9,15 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnix3d.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ + * RCS: @(#) $Id: tkUnix3d.c,v 1.2.4.1 1999/03/06 02:23:18 redman Exp $ */ #include <tk3d.h> +#if !defined(__WIN32__) && !defined(MAC_TCL) +#include "tkUnixInt.h" +#endif + /* * This structure is used to keep track of the extra colors used * by Unix 3d borders. diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c index 38c82a4..97ed5c5 100644 --- a/unix/tkUnixDraw.c +++ b/unix/tkUnixDraw.c @@ -8,12 +8,16 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixDraw.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ + * RCS: @(#) $Id: tkUnixDraw.c,v 1.2.4.1 1999/03/06 02:23:18 redman Exp $ */ #include "tkPort.h" #include "tkInt.h" +#if !defined(__WIN32__) && !defined(MAC_TCL) +#include "tkUnixInt.h" +#endif + /* * The following structure is used to pass information to * ScrollRestrictProc from TkScrollWindow. diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 1428b79..d713a8e 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.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: tkUnixFont.c,v 1.4 1998/11/25 01:48:54 stanton Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.4.4.1 1999/03/06 02:23:18 redman Exp $ */ #include "tkPort.h" @@ -141,7 +141,7 @@ TkpGetNativeFont(tkwin, name) */ hasSpace = dashes = hasWild = 0; - for (p = name; *p != '\0'; p++) { + for (p = (char *) name; *p != '\0'; p++) { if (*p == ' ') { if (p[1] == '-') { return NULL; |