Large diffs are not rendered by default.

@@ -0,0 +1,38 @@
* Apply 3 changes based on revisions developed by the fedora linux team.
+ 03-fedora-patch-2.diff
+ 04-fedora-tk8.5.6.patch.diff
--> + 05-tk8.5-zoomstack.diff
* Those patches are required to solve segmentation faults that are observed
when blt is used with tcltk 8.5. We have a substantial amount of
experience using this patched version of blt in the Swarm
Simulation System (www.swarm.org) and have observed no ill-effects.
Author: Paul E. Johnson (Debian Packaging) <pauljohn32@freefaculty.org>

--- a/library/Makefile.in
+++ b/library/Makefile.in
@@ -29,6 +29,7 @@
tabnotebook.tcl \
tabset.tcl \
treeview.tcl \
+ ZoomStack.itcl \
tvutil.tcl \
init.tcl \
tclIndex \
--- a/library/ZoomStack.itcl
+++ b/library/ZoomStack.itcl
@@ -1,4 +1,6 @@
-import add itcl
+#import add itcl
+package require Itcl
+namespace import itcl::*

class ZoomStackGraph {

@@ -48,6 +50,7 @@
private method SaveCoords { x y }
private method Zoom {}
private method Unzoom {}
+ private method Empty {}
private method Push { cmd }
private method Pop {}
private method MarkPoint { x y }
@@ -0,0 +1,43 @@
Description: fix autotools input for compatibility with recent autoconf
It is not possible to regenerate the blt configure script using current
versions of autoconf. Update for recent syntax so that we can get a modern
(and cross-build-friendly) configure script at build.
Author: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: http://bugs.debian.org/772590

diff -ruN a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -12,7 +12,7 @@
cat > conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+AC_LANG_CASE([C++], [#ifdef __cplusplus
extern "C" void exit(int);
#endif
])dnl
diff -ruN a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -127,9 +127,9 @@
AC_CACHE_VAL(blt_cv_prog_cc, blt_cv_prog_cc=$CC)
AC_SUBST(CC)
AC_PROG_CPP
-if test "x${GCC}" != "x" ; then
+AS_IF([test "x${GCC}" != "x"],[
blt_have_gcc="yes"
-else
+],[
AC_MSG_CHECKING([if C compiler is really gcc])
AC_EGREP_CPP(_cc_is_gcc_, [
#ifdef __GNUC__
@@ -137,7 +137,7 @@
#endif
], [blt_have_gcc=yes], [blt_have_gcc=no])
AC_MSG_RESULT([$blt_have_gcc])
-fi
+])

#
# CFLAGS search order
@@ -0,0 +1,36 @@
--- a/configure.in
+++ b/configure.in
@@ -183,9 +183,6 @@
blt_lib_prefix=""
fi
;;
- *-*-macosx)
- blt_platform="macosx"
- ;;
*)
blt_platform="unix"
;;
@@ -728,6 +725,9 @@
*-hpux*)
SHLIB_SUFFIX="sl"
;;
+ *-darwin*)
+ SHLIB_SUFFIX="dylib"
+ ;;
*)
SHLIB_SUFFIX="so"
;;
@@ -1154,6 +1154,13 @@
LDFLAGS=""
;;

+ *-darwin*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="${CC}"
+ SHLIB_LD_FLAGS='-dynamiclib -install_name $(libdir)/$@'
+ SHLIB_SUFFIX=".dylib"
+ ;;
+
*-dgux*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD="cc"

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,16 @@
Description: Patch silences GCC warnings for overflow on implicit constant
conversions.
Author: FreeBSD BLT maintainers
Last-Modified: Tue, 08 Jul 2014 12:19:13 +0400

--- a/generic/bltHash.h.in
+++ b/generic/bltHash.h.in
@@ -88,7 +88,7 @@
* Acceptable key types for hash tables:
*/
#define BLT_STRING_KEYS 0
-#define BLT_ONE_WORD_KEYS ((size_t)-1)
+#define BLT_ONE_WORD_KEYS -1

/*
* Forward declaration of Blt_HashTable. Needed by some C++ compilers
@@ -0,0 +1,24 @@
Description: Patch fixes call to Blt_ParseQualifiedName().
Author: FreeBSD BLT maintainers
Last-Modified: Tue, 08 Jul 2014 11:51:01 +0400

--- a/generic/bltNsUtil.c
+++ b/generic/bltNsUtil.c
@@ -64,7 +64,7 @@
Tcl_Var varPtr;
Tcl_Namespace *nsPtr;
Tcl_Obj *objPtr;
- char *str, *cp;
+ CONST char *str, *cp;

varPtr = Tcl_FindNamespaceVar(interp, (char *)name,
(Tcl_Namespace *)NULL, 0);
@@ -74,7 +74,7 @@
objPtr = Tcl_NewObj();
Tcl_GetVariableFullName(interp, varPtr, objPtr);
str = Tcl_GetString(objPtr);
- if (Blt_ParseQualifiedName(interp, str, &nsPtr, &cp) == NULL) {
+ if (Blt_ParseQualifiedName(interp, str, &nsPtr, &cp) != TCL_OK) {
nsPtr = NULL;
}
Tcl_DecrRefCount(objPtr);

Large diffs are not rendered by default.

@@ -0,0 +1,42 @@
Description: Patch fixes BLT stubs declarations.
Author: FreeBSD BLT port maintainers, modified by Sergei Golovan
Last-Modified: Tue, 08 Jul 2014 11:28:55 +0400

--- a/generic/bltDecls.h
+++ b/generic/bltDecls.h
@@ -532,7 +532,7 @@

Blt_TreeKey (*blt_TreeGetKey) _ANSI_ARGS_((CONST char * string)); /* 0 */
Blt_TreeNode (*blt_TreeCreateNode) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode parent, CONST char * name, int position)); /* 1 */
- Blt_TreeNode (*blt_TreeCreateNodeWithId) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode parent, CONST char * name, int position, int inode)); /* 2 */
+ Blt_TreeNode (*blt_TreeCreateNodeWithId) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode parent, CONST char * name, unsigned int inode, int position)); /* 2 */
int (*blt_TreeDeleteNode) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node)); /* 3 */
int (*blt_TreeMoveNode) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, Blt_TreeNode parent, Blt_TreeNode before)); /* 4 */
Blt_TreeNode (*blt_TreeGetNode) _ANSI_ARGS_((Blt_Tree tree, unsigned int inode)); /* 5 */
@@ -558,7 +558,7 @@
int (*blt_TreeSetArrayValue) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, CONST char * arrayName, CONST char * elemName, Tcl_Obj * valueObjPtr)); /* 25 */
int (*blt_TreeUnsetArrayValue) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, CONST char * arrayName, CONST char * elemName)); /* 26 */
int (*blt_TreeArrayValueExists) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, CONST char * arrayName, CONST char * elemName)); /* 27 */
- int (*blt_TreeArrayNames) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, CONST char * arrayName, Tcl_Obj * listObjPtr)); /* 28 */
+ int (*blt_TreeArrayNames) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, CONST char * arrayName, Tcl_Obj * listObjPtr, CONST char * pattern)); /* 28 */
int (*blt_TreeGetValueByKey) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, Blt_TreeKey key, Tcl_Obj ** valuePtr)); /* 29 */
int (*blt_TreeSetValueByKey) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, Blt_TreeKey key, Tcl_Obj * valuePtr)); /* 30 */
int (*blt_TreeUnsetValueByKey) _ANSI_ARGS_((Tcl_Interp * interp, Blt_Tree tree, Blt_TreeNode node, Blt_TreeKey key)); /* 31 */
@@ -578,13 +578,13 @@
void (*blt_TreeDeleteTrace) _ANSI_ARGS_((Blt_TreeTrace token)); /* 45 */
void (*blt_TreeCreateEventHandler) _ANSI_ARGS_((Blt_Tree tree, unsigned int mask, Blt_TreeNotifyEventProc * proc, ClientData clientData)); /* 46 */
void (*blt_TreeDeleteEventHandler) _ANSI_ARGS_((Blt_Tree tree, unsigned int mask, Blt_TreeNotifyEventProc * proc, ClientData clientData)); /* 47 */
- void (*blt_TreeRelabelNode) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, CONST char * string)); /* 48 */
- void (*blt_TreeRelabelNode2) _ANSI_ARGS_((Blt_TreeNode node, CONST char * string)); /* 49 */
+ int (*blt_TreeRelabelNode) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, CONST char * string)); /* 48 */
+ int (*blt_TreeRelabelNode2) _ANSI_ARGS_((Blt_TreeNode node, CONST char * string)); /* 49 */
char * (*blt_TreeNodePath) _ANSI_ARGS_((Blt_TreeNode node, Tcl_DString * resultPtr)); /* 50 */
int (*blt_TreeNodePosition) _ANSI_ARGS_((Blt_TreeNode node)); /* 51 */
void (*blt_TreeClearTags) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node)); /* 52 */
- void (*blt_TreeAddTag) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, CONST char * tagName)); /* 53 */
- void (*blt_TreeForgetTag) _ANSI_ARGS_((Blt_Tree tree, CONST char * tagName)); /* 54 */
+ int (*blt_TreeAddTag) _ANSI_ARGS_((Blt_Tree tree, Blt_TreeNode node, CONST char * tagName)); /* 53 */
+ int (*blt_TreeForgetTag) _ANSI_ARGS_((Blt_Tree tree, CONST char * tagName)); /* 54 */
int (*blt_TreeTagTableIsShared) _ANSI_ARGS_((Blt_Tree tree)); /* 55 */
int (*blt_TreeShareTagTable) _ANSI_ARGS_((Blt_Tree src, Blt_Tree target)); /* 56 */
Blt_HashEntry * (*blt_TreeFirstTag) _ANSI_ARGS_((Blt_Tree tree, Blt_HashSearch * searchPtr)); /* 57 */

Large diffs are not rendered by default.

@@ -0,0 +1,180 @@
Description: Patch fixes installing directories and copying files under
INSTALL_ROOT. Also, it adds bltOldConfig.h to the installable headers
list and fixes it to include tk.h.
Author: Chris Waters and Sergei Golovan
Author: Steve Langasek <vorlon@debian.org>
Last-Modified: Mon, 31 Aug 2015 12:37:00 -0700

Index: blt-2.5.3+dfsg/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/Makefile.in
+++ blt-2.5.3+dfsg/Makefile.in
@@ -47,9 +47,9 @@
(cd library; $(MAKE) install)
(cd man; $(MAKE) install)
(cd demos; $(MAKE) install)
- $(INSTALL_DATA) $(srcdir)/README $(INSTALL_DIR)$(scriptdir)
- $(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_DIR)$(scriptdir)
- $(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_DIR)$(scriptdir)
+ $(INSTALL_DATA) $(srcdir)/README $(INSTALL_ROOT)$(scriptdir)
+ $(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_ROOT)$(scriptdir)
+ $(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_ROOT)$(scriptdir)

mkdirs:
@for i in $(instdirs) ; do \
@@ -57,7 +57,7 @@
: ; \
else \
echo " mkdir $(INSTALL_ROOT)$$i" ; \
- mkdir $(INSTALL_ROOT)$$i ; \
+ mkdir -p $(INSTALL_ROOT)$$i ; \
fi ; \
done

@@ -66,10 +66,14 @@
(cd library; $(MAKE) clean)
(cd man; $(MAKE) clean)
(cd demos; $(MAKE) clean)
- $(RM) *.bak *\~ "#"* *pure* .pure*
+ $(RM) *.bak *\~ "#"* .pure*

GENERATED_FILES = \
config.status config.cache config.log Makefile

distclean: clean
+ (cd generic; $(MAKE) distclean)
+ (cd library; $(MAKE) distclean)
+ (cd man; $(MAKE) distclean)
+ (cd demos; $(MAKE) distclean)
$(RM) $(GENERATED_FILES)
Index: blt-2.5.3+dfsg/generic/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/generic/Makefile.in
+++ blt-2.5.3+dfsg/generic/Makefile.in
@@ -152,6 +152,7 @@
$(srcdir)/bltChain.h \
bltHash.h \
$(srcdir)/bltList.h \
+ $(srcdir)/bltOldConfig.h \
$(srcdir)/bltPool.h \
$(srcdir)/bltTree.h \
$(srcdir)/bltDecls.h \
@@ -230,7 +231,7 @@
: ; \
else \
echo " mkdir $(INSTALL_ROOT)$$i" ; \
- mkdir $(INSTALL_ROOT)$$i ; \
+ mkdir -p $(INSTALL_ROOT)$$i ; \
fi ; \
done

@@ -262,7 +263,8 @@

distclean: clean
$(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* Makefile
- $(RM) bltConfig.h Makefile TAGS
+ $(RM) bltConfig.h bltHash.h Makefile TAGS
+ (cd shared; $(MAKE) distclean)

.c.o:
$(CC) -c $(CC_SWITCHES) $<
Index: blt-2.5.3+dfsg/generic/shared/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/generic/shared/Makefile.in
+++ blt-2.5.3+dfsg/generic/shared/Makefile.in
@@ -145,14 +145,20 @@
$(srcdir)/bltInit.c
$(RM) $@
$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(OBJS) \
- $(SHLIB_LIB_SPECS)
+ $(LIBS)
+
+# Line above changed for complete dependency listings - gordon
+# $(SHLIB_LIB_SPECS)

$(tcl_only_lib_so): $(TCL_ONLY_OBJS)
$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(scriptdir)\" \
$(srcdir)/bltInit.c
$(RM) $@
$(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
- $(SHLIB_TCL_ONLY_LIB_SPECS)
+ $(TCL_ONLY_LIB_SPECS)
+
+# Line above changed for complete dependency listings - gordon
+# $(SHLIB_TCL_ONLY_LIB_SPECS)

install: mkdirs install-lib install-demo

@@ -175,10 +181,10 @@
done
clean:
$(RM) $(OBJS) $(lib_so) $(tcl_only_lib_so) $(bltwish) $(bltsh) \
- *pure* .pure*
+ *pure* .pure* bltInit.o

distclean: clean
- $(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"*
+ $(RM) $(srcdir)/*.bak $(srcdir)/*\~ $(srcdir)/"#"* Makefile

# ------------------------------------------------------------------------
# in lieu of viewpath-ing...
Index: blt-2.5.3+dfsg/demos/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/demos/Makefile.in
+++ blt-2.5.3+dfsg/demos/Makefile.in
@@ -79,7 +79,7 @@
: ; \
else \
echo " mkdir $(INSTALL_ROOT)$$i" ; \
- mkdir $(INSTALL_ROOT)"$$i" ; \
+ mkdir -p $(INSTALL_ROOT)"$$i" ; \
fi ; \
done

Index: blt-2.5.3+dfsg/man/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/man/Makefile.in
+++ blt-2.5.3+dfsg/man/Makefile.in
@@ -52,7 +52,7 @@
: ; \
else \
echo " mkdir $(INSTALL_ROOT)$$i" ; \
- mkdir $(INSTALL_ROOT)$$i ; \
+ mkdir -p $(INSTALL_ROOT)$$i ; \
fi ; \
done

Index: blt-2.5.3+dfsg/library/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/library/Makefile.in
+++ blt-2.5.3+dfsg/library/Makefile.in
@@ -61,7 +61,7 @@
for i in $(miscFiles) ; do \
$(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(scriptdir) ; \
done
- $(INSTALL_DATA) pkgIndex.tcl $(scriptdir)
+ $(INSTALL_DATA) pkgIndex.tcl $(INSTALL_ROOT)$(scriptdir)

mkdirs:
@for i in $(instdirs) ; do \
@@ -69,7 +69,7 @@
: ; \
else \
echo " mkdir $(INSTALL_ROOT)$$i" ; \
- mkdir $(INSTALL_ROOT)$$i ; \
+ mkdir -p $(INSTALL_ROOT)$$i ; \
fi ; \
done

Index: blt-2.5.3+dfsg/generic/bltOldConfig.h
===================================================================
--- blt-2.5.3+dfsg.orig/generic/bltOldConfig.h
+++ blt-2.5.3+dfsg/generic/bltOldConfig.h
@@ -1,5 +1,7 @@
/* Old config headers. */

+#include <tk.h>
+
EXTERN int Blt_ConfigureInfo _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_ConfigSpec * specs,
char * widgRec, CONST char * argvName,
@@ -0,0 +1,54 @@
Description: Patch adds support for externally set LDFLAGS. It lets
passing hardening flags from debian/rules. Also, the rpath
definition is removed.
Author: Sergei Golovan
Last-Modified: Fri, 04 Jul 2014 09:29:39 +0400

--- a/configure.in
+++ b/configure.in
@@ -1061,7 +1061,7 @@
SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}"
SHLIB_TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS}"
SHLIB_TCL_ONLY_LIB_SPECS=""
-LDFLAGS=""
+LDFLAGS="${LDFLAGS}"
LD_RUN_PATH=""
EXTRA_LIB_SPECS=""

@@ -1197,13 +1197,13 @@
fi
;;

- *-linux*)
+ *-linux*|*-gnu*)
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC}"
SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
- LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
+ LD_RUN_PATH=""

- LDFLAGS=""
+ LDFLAGS="${LDFLAGS}"
EXTRA_LIB_SPECS="-ldl"
;;

--- a/generic/shared/Makefile.in
+++ b/generic/shared/Makefile.in
@@ -144,7 +144,7 @@
$(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY=\"$(scriptdir)\" \
$(srcdir)/bltInit.c
$(RM) $@
- $(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(OBJS) \
+ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(OBJS) \
$(LIBS)

# Line above changed for complete dependency listings - gordon
@@ -154,7 +154,7 @@
$(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(scriptdir)\" \
$(srcdir)/bltInit.c
$(RM) $@
- $(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
+ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
$(TCL_ONLY_LIB_SPECS)

# Line above changed for complete dependency listings - gordon

This file was deleted.

@@ -0,0 +1,11 @@
--- a/configure.in 2010-11-30 14:50:56.000000000 -0800
+++ b/configure.in 2019-05-04 20:36:50.000000000 -0700
@@ -83,7 +83,7 @@
#
# -----------------------------------------------------------------------

-BLT_ENV_CC=$CC
+BLT_ENV_CC=

#
# CC search order

This file was deleted.

This file was deleted.

@@ -0,0 +1,11 @@
--- a/demos/Makefile.in 2009-05-09 09:27:27.000000000 -0700
+++ b/demos/Makefile.in 2019-05-05 12:44:39.000000000 -0700
@@ -6,7 +6,7 @@
exec_prefix = @exec_prefix@
version = @BLT_VERSION@
libdir = @libdir@
-scriptdir = $(prefix)/lib/blt$(version)
+scriptdir = $(prefix)/share/blt
destdir = $(scriptdir)/demos
srcdir = @srcdir@

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,90 @@
Description: Patch fixes loading the libBLT library from
[package require BLT]. Specifically, it provides correct version
BLT_PATCH_LEVEL and prevents loading the library twice (once
by its real name and onr more time by a symlink if the blt-dev
package is installed). Also, it skips initializing widget bindings
if Tk isn't present.
Author: Sergei Golovan
Author: Steve Langasek <vorlon@debian.org>
Last-Modified: Mon, 31 Aug 2015 12:09:00 -0700

Index: blt-2.5.3+dfsg/library/Makefile.in
===================================================================
--- blt-2.5.3+dfsg.orig/library/Makefile.in
+++ blt-2.5.3+dfsg/library/Makefile.in
@@ -5,6 +5,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
version = @BLT_VERSION@
+patchlevel = @BLT_PATCH_LEVEL@
lib_prefix = @BLT_LIB_PREFIX@
srcdir = @srcdir@
libdir = @libdir@
@@ -49,6 +50,7 @@
pkgIndex:
rm -f pkgIndex.tcl
sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \
+ sed -e 's/%PATCHLEVEL%/$(patchlevel)/' | \
sed -e 's/%LIB_PREFIX%/$(lib_prefix)/' | \
sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl

Index: blt-2.5.3+dfsg/library/pkgIndex.tcl.in
===================================================================
--- blt-2.5.3+dfsg.orig/library/pkgIndex.tcl.in
+++ blt-2.5.3+dfsg/library/pkgIndex.tcl.in
@@ -49,11 +49,13 @@
}
if { ![file exists $library] } continue
load $library BLT
+ break
}
}

set version "%VERSION%"
+set patchlevel %PATCHLEVEL%

-package ifneeded BLT $version [list LoadBLT25 $version $dir]
+package ifneeded BLT $patchlevel [list LoadBLT25 $version $dir]

# End of package index file
Index: blt-2.5.3+dfsg/library/init.tcl
===================================================================
--- blt-2.5.3+dfsg.orig/library/init.tcl
+++ blt-2.5.3+dfsg/library/init.tcl
@@ -8,7 +8,9 @@
}
}

- initializeLibrary
+ if {[info commands tk] == "tk"} {
+ initializeLibrary
+ }

}

Index: blt-2.5.3+dfsg/configure.in
===================================================================
--- blt-2.5.3+dfsg.orig/configure.in
+++ blt-2.5.3+dfsg/configure.in
@@ -977,6 +977,13 @@

BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION}

+AC_MSG_CHECKING([BLT_PATCH_LEVEL])
+AC_CACHE_VAL(blt_cv_patch_level,
+AC_GREP_SYMBOL(blt_cv_patch_level, BLT_PATCH_LEVEL, ${srcdir}/generic/blt.h)
+)
+AC_MSG_RESULT([$blt_cv_patch_level])
+BLT_PATCH_LEVEL=${blt_cv_patch_level}
+
# Add BLT to the run path
libdir=${exec_prefix}/lib

@@ -1386,6 +1393,7 @@
AC_SUBST(DEFINES)
AC_SUBST(BLT_MAJOR_VERSION)
AC_SUBST(BLT_MINOR_VERSION)
+AC_SUBST(BLT_PATCH_LEVEL)
AC_SUBST(BLT_VERSION)
AC_SUBST(AUX_LIBS)
AC_SUBST(TCL_LIB_DIR)

Large diffs are not rendered by default.

@@ -0,0 +1,85 @@
This patch removes references to non-free dd_protocol/* files from makefiles.
It's a part of code which makes the original tarball DFSG-compliant. The rest
is in debian/rules (get-orig-source target).

--- a/library/Makefile.in
+++ b/library/Makefile.in
@@ -34,14 +34,14 @@
tclIndex \
$(cursors)

-ddFiles = dd-color.tcl \
- dd-file.tcl \
- dd-number.tcl \
- dd-text.tcl \
- tclIndex
+#ddFiles = dd-color.tcl \
+# dd-file.tcl \
+# dd-number.tcl \
+# dd-text.tcl \
+# tclIndex

instdirs = $(prefix) $(exec_prefix) \
- $(libdir) $(prefix)/lib $(scriptdir) $(scriptdir)/dd_protocols
+ $(libdir) $(prefix)/lib $(scriptdir) #$(scriptdir)/dd_protocols

all: pkgIndex

@@ -53,10 +53,10 @@


install: mkdirs pkgIndex
- for i in $(ddFiles) ; do \
- $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i \
- $(INSTALL_ROOT)$(scriptdir)/dd_protocols ; \
- done
+ #for i in $(ddFiles) ; do \
+ # $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i \
+ # $(INSTALL_ROOT)$(scriptdir)/dd_protocols ; \
+ #done
for i in $(miscFiles) ; do \
$(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(scriptdir) ; \
done
--- a/library/Makefile.vc
+++ b/library/Makefile.vc
@@ -24,11 +24,11 @@
tclIndex \
$(cursors)

-ddFiles = dd-color.tcl \
- dd-file.tcl \
- dd-number.tcl \
- dd-text.tcl \
- tclIndex
+#ddFiles = dd-color.tcl \
+# dd-file.tcl \
+# dd-number.tcl \
+# dd-text.tcl \
+# tclIndex

instdirs = $(prefix) $(exec_prefix) $(libdir) \
$(scriptdir) $(scriptdir)/dd_protocols $(libdir)/tcl$(v1) \
@@ -44,9 +44,9 @@
done

install-ddfiles: install-dirs
- for i in $(ddFiles) ; do \
- $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i $(scriptdir)/dd_protocols ; \
- done
+ #for i in $(ddFiles) ; do \
+ # $(INSTALL_DATA) $(srcdir)/dd_protocols/$$i $(scriptdir)/dd_protocols ; \
+ #done

install-files: install-dirs
for i in $(miscFiles) ; do \
--- a/win/install.tcl
+++ b/win/install.tcl
@@ -78,7 +78,7 @@
-pattern *.pro \
-file tclIndex \
$scriptdir
- Add ${srcdir}/library/dd_protocols \
+ #Add ${srcdir}/library/dd_protocols \
-pattern *.tcl \
-file tclIndex \
$scriptdir/dd_protocols
@@ -0,0 +1,123 @@
Description: Patch restores blt::table command which was renamed to
blt::blttable in 2.5.3.
TODO: Make the blttable alias if necessary.
Author: Sergei Golovan
Last-Modified: Fri, 04 Jul 2014 09:22:10 +0400

--- a/demos/tour.tcl
+++ b/demos/tour.tcl
@@ -22,7 +22,7 @@
# --------------------------------------------------------------------------
if { $tcl_version >= 8.0 } {
namespace import -force blt::*
- interp alias {} table {} blttable
+ #interp alias {} table {} blttable
#namespace import -force blt::tile::*
}
source scripts/demo.tcl
--- a/generic/bltTable.c
+++ b/generic/bltTable.c
@@ -24,7 +24,7 @@
* out of or in connection with the use or performance of this
* software.
*
- * The "blttable" geometry manager was created by George Howlett.
+ * The "table" geometry manager was created by George Howlett.
*/

/*
@@ -85,7 +85,7 @@

static Tk_GeomMgr tableMgrInfo =
{
- "blttable", /* Name of geometry manager used by winfo */
+ "table", /* Name of geometry manager used by winfo */
WidgetGeometryProc, /* Procedure to for new geometry requests */
WidgetCustodyProc, /* Procedure when widget is taken away */
};
@@ -4955,7 +4955,7 @@
Blt_TableInit(interp)
Tcl_Interp *interp;
{
- static Blt_CmdSpec cmdSpec = {"blttable", TableCmd, };
+ static Blt_CmdSpec cmdSpec = {"table", TableCmd, };
TableInterpData *dataPtr;

dataPtr = GetTableInterpData(interp);
--- a/library/graph.tcl
+++ b/library/graph.tcl
@@ -434,50 +434,50 @@
set row 1
set col 0
label $top.title -text "PostScript Options"
- blttable $top $top.title -cspan 7
+ blt::table $top $top.title -cspan 7
foreach bool { center landscape maxpect preview decorations } {
set w $top.$bool-label
label $w -text "-$bool" -font *courier*-r-*12*
- blttable $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
+ blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
set w $top.$bool-yes
global $graph.$bool
radiobutton $w -text "yes" -variable $graph.$bool -value 1
- blttable $top $row,$col+1 $w -anchor w
+ blt::table $top $row,$col+1 $w -anchor w
set w $top.$bool-no
radiobutton $w -text "no" -variable $graph.$bool -value 0
- blttable $top $row,$col+2 $w -anchor w
+ blt::table $top $row,$col+2 $w -anchor w
incr row
}
label $top.modes -text "-colormode" -font *courier*-r-*12*
- blttable $top $row,0 $top.modes -anchor e -pady { 2 0 } -padx { 0 4 }
+ blt::table $top $row,0 $top.modes -anchor e -pady { 2 0 } -padx { 0 4 }
set col 1
foreach m { color greyscale } {
set w $top.$m
radiobutton $w -text $m -variable $graph.colormode -value $m
- blttable $top $row,$col $w -anchor w
+ blt::table $top $row,$col $w -anchor w
incr col
}
set row 1
frame $top.sep -width 2 -bd 1 -relief sunken
- blttable $top $row,3 $top.sep -fill y -rspan 6
+ blt::table $top $row,3 $top.sep -fill y -rspan 6
set col 4
foreach value { padx pady paperwidth paperheight width height } {
set w $top.$value-label
label $w -text "-$value" -font *courier*-r-*12*
- blttable $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
+ blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
set w $top.$value-entry
global $graph.$value
entry $w -textvariable $graph.$value -width 8
- blttable $top $row,$col+1 $w -cspan 2 -anchor w -padx 8
+ blt::table $top $row,$col+1 $w -cspan 2 -anchor w -padx 8
incr row
}
- blttable configure $top c3 -width .125i
+ blt::table configure $top c3 -width .125i
button $top.cancel -text "Cancel" -command "destroy $top"
- blttable $top $row,0 $top.cancel -width 1i -pady 2 -cspan 3
+ blt::table $top $row,0 $top.cancel -width 1i -pady 2 -cspan 3
button $top.reset -text "Reset" -command "destroy $top"
- #blttable $top $row,1 $top.reset -width 1i
+ #blt::table $top $row,1 $top.reset -width 1i
button $top.print -text "Print" -command "blt::ResetPostScript $graph"
- blttable $top $row,4 $top.print -width 1i -pady 2 -cspan 2
+ blt::table $top $row,4 $top.print -width 1i -pady 2 -cspan 2
}

proc blt::ResetPostScript { graph } {
--- a/library/tabnotebook.tcl
+++ b/library/tabnotebook.tcl
@@ -215,7 +215,7 @@
set top "$widget.toplevel-$id"
toplevel $top
$widget tab tearoff $tab $top.container
- blttable $top $top.container -fill both
+ table $top $top.container -fill both

incr rootX 10 ; incr rootY 10
wm geometry $top +$rootX+$rootY
@@ -0,0 +1,91 @@
Description: Patch replaces the direct usage of deprecated interp->result
by Tcl_SetResult() and Tcl_GetStringResult() calls making it possible
to build using Tcl/Tk 8.6.
Last-Modified: Fri, 04 Jul 2014 09:20:48 +0400

--- a/generic/bltScrollbar.c
+++ b/generic/bltScrollbar.c
@@ -588,7 +588,7 @@
} else {
fraction = ((double)pixels / (double)barWidth);
}
- sprintf(interp->result, "%g", fraction);
+ sprintf(Tcl_GetStringResult(interp), "%g", fraction);
} else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
int x, y, pos, barWidth;
double fraction;
--- a/generic/bltTed.c
+++ b/generic/bltTed.c
@@ -1504,7 +1504,7 @@
tablePtr->flags |= ARRANGE_PENDING;
Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
}
- interp->result = Tk_PathName(tedPtr->tkwin);
+ Tcl_SetResult(interp, (char*)Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
tedPtr->flags |= LAYOUT_PENDING;
EventuallyRedraw(tedPtr);
return TCL_OK;
@@ -1678,7 +1678,7 @@
tedPtr->activeRectArr[4].width = grip - 1;
tedPtr->activeRectArr[4].height = grip - 1;

- interp->result = Tk_PathName(entryPtr->tkwin);
+ Tcl_SetResult(interp, (char*)Tk_PathName(entryPtr->tkwin), TCL_VOLATILE);
active = 1;
break;
}
@@ -1751,7 +1751,7 @@
tablePtr->flags |= ARRANGE_PENDING;
Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
}
- interp->result = Tk_PathName(tedPtr->tkwin);
+ Tcl_SetResult(interp, (char*)Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
tedPtr->flags |= LAYOUT_PENDING;
EventuallyRedraw(tedPtr);
return TCL_OK;
--- a/generic/bltVecMath.c
+++ b/generic/bltVecMath.c
@@ -834,20 +834,20 @@
if ((errno == EDOM) || (value != value)) {
Tcl_AppendResult(interp, "domain error: argument not in valid range",
(char *)NULL);
- Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", interp->result,
+ Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", Tcl_GetStringResult(interp),
(char *)NULL);
} else if ((errno == ERANGE) || IS_INF(value)) {
if (value == 0.0) {
Tcl_AppendResult(interp,
"floating-point value too small to represent",
(char *)NULL);
- Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", interp->result,
+ Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", Tcl_GetStringResult(interp),
(char *)NULL);
} else {
Tcl_AppendResult(interp,
"floating-point value too large to represent",
(char *)NULL);
- Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", interp->result,
+ Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", Tcl_GetStringResult(interp),
(char *)NULL);
}
} else {
@@ -856,7 +856,7 @@
sprintf(buf, "%d", errno);
Tcl_AppendResult(interp, "unknown floating-point error, ",
"errno = ", buf, (char *)NULL);
- Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", interp->result,
+ Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", Tcl_GetStringResult(interp),
(char *)NULL);
}
}
--- a/generic/bltTreeCmd.c
+++ b/generic/bltTreeCmd.c
@@ -8560,7 +8560,7 @@
if (result == TCL_CONTINUE ) continue;
if (result == TCL_ERROR) {
Tcl_AppendResult(interp,
- "\n (\"tree foreach\" body line ", Blt_Itoa(interp->errorLine), ")\n", 0);
+ "\n (\"tree foreach\" body line ", Blt_Itoa(Tcl_GetErrorLine(interp)), ")\n", 0);
break;
}
if (result != TCL_OK) {
@@ -0,0 +1,29 @@
Description: Patch replaces call to TkCopyAndGlobalEval by a call to
Tcl_EvalObjEx because the former function has been dropped in Tk 8.6.
Last-Modified: Fri, 04 Jul 2014 09:18:32 +0400

--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -864,8 +864,6 @@
static Blt_TileChangedProc TileChangedProc;
static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;

-EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script));
-
#if (TK_MAJOR_VERSION > 4)
EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin,
int padX, int padY, int innerWidth, int innerHeight, int *xPtr,
@@ -3292,7 +3290,12 @@
}
}
if ((butPtr->type > TYPE_LABEL) && (butPtr->command != NULL)) {
- return TkCopyAndGlobalEval(butPtr->interp, butPtr->command);
+ Tcl_DString buf;
+ Tcl_DStringInit(&buf);
+ Tcl_DStringAppend(&buf, butPtr->command, -1);
+ int code = Tcl_EvalEx(butPtr->interp, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf), TCL_EVAL_GLOBAL);
+ Tcl_DStringFree(&buf);
+ return code;
}
return TCL_OK;
}
@@ -0,0 +1,278 @@
Description: Patch initializes all variables for which GCC gave warnings
about unitialized or maybe unitialized variables.
Author: Sergei Golovan
Last-Modified: Wed, 09 Jul 2014 19:17:02 +0400

--- a/generic/bltArrayObj.c
+++ b/generic/bltArrayObj.c
@@ -69,6 +69,7 @@
}
if (nElem%2) {
if (interp != NULL) {
+ string = Tcl_GetString(objPtr);
Tcl_AppendResult(interp, "odd length: ", string, 0);
}
return TCL_ERROR;
--- a/generic/bltBgexec.c
+++ b/generic/bltBgexec.c
@@ -559,6 +559,7 @@
*lengthPtr = length;
return string;
}
+ *lengthPtr = length;
return NULL;
}

@@ -603,6 +604,7 @@
return string;
}
}
+ *lengthPtr = 0;
return NULL;
}
/*
--- a/generic/bltTreeCmd.c
+++ b/generic/bltTreeCmd.c
@@ -8086,7 +8086,7 @@
Blt_TreeKeySearch keyIter;
int vobjc, kobjc, i, result = TCL_OK, len, cnt = 0, isar;
int nobreak = 0, noupdate = 0, unset = 0, init = 0, aLen;
- char *var, *string, *aName, *aPat = NULL;
+ char *var, *string, *aName = NULL, *aPat = NULL;
int klen, kl, j;
int *keySet = NULL;
unsigned int inode;
--- a/generic/bltVector.c
+++ b/generic/bltVector.c
@@ -1896,7 +1896,7 @@
return TCL_OK;
}
for (i=2; i<objc; i+=2) {
- int option, *ovar;
+ int option, *ovar = NULL;
if (Tcl_GetIndexFromObj(interp, objv[i], optionArr, "option",
0, &option) != TCL_OK) {
return TCL_OK;
--- a/generic/bltGrAxis.c
+++ b/generic/bltGrAxis.c
@@ -1426,7 +1426,15 @@

nMajor = nMinor = 0;
majorStep = minorStep = 0.0;
- if (min < max) {
+ if (min > max) {
+ double m;
+ m = min;
+ min = max;
+ max = m;
+ } else if (min == max) {
+ max = min + 1.0;
+ }
+ /* if (min < max) { */
min = (min != 0.0) ? log10(FABS(min)) : 0.0;
max = (max != 0.0) ? log10(FABS(max)) : 1.0;

@@ -1474,7 +1482,7 @@
(DEFINED(axisPtr->reqMax)))) {
tickMax = max;
}
- }
+ /* } */
axisPtr->majorSweep.step = majorStep;
axisPtr->majorSweep.initial = floor(tickMin);
axisPtr->majorSweep.nSteps = nMajor;
@@ -1556,7 +1564,15 @@

nTicks = 0;
tickMin = tickMax = 0.0;
- if (min < max) {
+ if (min > max) {
+ double m;
+ m = min;
+ min = max;
+ max = m;
+ } else if (min == max) {
+ max = min + 1.0;
+ }
+ /* if (min < max) { */
range = max - min;

/* Calculate the major tick stepping. */
@@ -1578,7 +1594,7 @@
axisMax = tickMax = ceil(max / step) * step + 0.0;

nTicks = Round((tickMax - tickMin) / step) + 1;
- }
+ /* } */
axisPtr->majorSweep.step = step;
axisPtr->majorSweep.initial = tickMin;
axisPtr->majorSweep.nSteps = nTicks;
--- a/generic/bltGrLine.c
+++ b/generic/bltGrLine.c
@@ -3085,8 +3085,9 @@
register Point2D *pointPtr, *endPtr;
int i;

- i = -1; /* Suppress compiler warning. */
+ i = searchPtr->index;
minDist = searchPtr->dist;
+ closest = searchPtr->point;
for (linkPtr = Blt_ChainFirstLink(linePtr->traces); linkPtr != NULL;
linkPtr = Blt_ChainNextLink(linkPtr)) {
tracePtr = Blt_ChainGetValue(linkPtr);
@@ -3140,8 +3141,9 @@
int i;
register Segment2D *s;

- i = 0;
+ i = searchPtr->index;
minDist = searchPtr->dist;
+ closest = searchPtr->point;
s = linePtr->strips;
for (count = 0; count < linePtr->nStrips; count++, s++) {
dist = (*distProc)(searchPtr->x, searchPtr->y, &(s->p), &(s->q), &b);
--- a/generic/bltBeep.c
+++ b/generic/bltBeep.c
@@ -58,9 +58,7 @@
argv[0], " ?volumePercent?\"", (char *)NULL);
return TCL_ERROR;
}
- if (argc == 1) {
- percent = 50; /* Default setting */
- } else if (argc == 2) {
+ if (argc == 2) {
if (Tcl_GetInt(interp, argv[1], &percent) != TCL_OK) {
return TCL_ERROR;
}
@@ -69,6 +67,8 @@
argv[1], "\"", (char *)NULL);
return TCL_ERROR;
}
+ } else {
+ percent = 50; /* Default setting */
}
XBell(Tk_Display(Tk_MainWindow(interp)), percent);
return TCL_OK;
--- a/generic/bltConfig.c
+++ b/generic/bltConfig.c
@@ -977,6 +977,7 @@
int dropOffset;

colorPtr = NULL;
+ color2Ptr = NULL;
dropOffset = 0;
if ((string != NULL) && (string[0] != '\0')) {
int nElem;
--- a/generic/bltHtext.c
+++ b/generic/bltHtext.c
@@ -3100,6 +3100,8 @@
forceCopy = 0;
} else {
htPtr->last = htPtr->first - 1;
+ lineNum = htPtr->first;
+ lastY = 0;
}

/* Draw each line */
--- a/generic/bltImage.c
+++ b/generic/bltImage.c
@@ -2738,7 +2738,7 @@
if (opacity2<0.0) {
a1 = (1.0 - a2);
} else {
- a2 = (opacity2<0.0 ? 0.0 : (opacity2>1.0?1.0:opacity2));
+ a1 = (opacity2<0.0 ? 0.0 : (opacity2>1.0?1.0:opacity2));
}

for (endPtr = destPtr + count; destPtr < endPtr; srcPtr++, src2Ptr++, destPtr++) {
--- a/generic/bltTabnotebook.c
+++ b/generic/bltTabnotebook.c
@@ -2430,7 +2430,7 @@
int cavityWidth, cavityHeight;
int width, height;
int dx, dy;
- int x, y;
+ int x = 0, y = 0;

nbPtr = tabPtr->nbPtr;
pad = nbPtr->inset + nbPtr->inset2;
--- a/generic/bltTabset.c
+++ b/generic/bltTabset.c
@@ -5771,14 +5771,6 @@
* side when correcting for left/right slants.
*/
switch (setPtr->side) {
- case SIDE_TOP:
- case SIDE_BOTTOM:
- if (setPtr->slant == SLANT_LEFT) {
- x += setPtr->overlap;
- } else if (setPtr->slant == SLANT_RIGHT) {
- x -= setPtr->overlap;
- }
- break;
case SIDE_LEFT:
case SIDE_RIGHT:
if (setPtr->slant == SLANT_LEFT) {
@@ -5787,6 +5779,15 @@
y -= setPtr->overlap;
}
break;
+ case SIDE_TOP:
+ case SIDE_BOTTOM:
+ default:
+ if (setPtr->slant == SLANT_LEFT) {
+ x += setPtr->overlap;
+ } else if (setPtr->slant == SLANT_RIGHT) {
+ x -= setPtr->overlap;
+ }
+ break;
}

/*
@@ -5817,7 +5818,7 @@
iw = imgWidth = ImageWidth(image);
ih = imgHeight = ImageHeight(image);
}
- img2Width = img2Height = 0;
+ iw2 = ih2 = img2Width = img2Height = 0;
if (image2 != NULL) {
iw2 = img2Width = ImageWidth(image2);
ih2 = img2Height = ImageHeight(image2);
@@ -5847,6 +5848,7 @@
tx = x + (tabPtr->screenWidth - tabPtr->textWidth) / 2;
break;
case SIDE_TOP:
+ default:
tx = x + (tabPtr->screenWidth - tabPtr->textWidth) / 2;
ty = y + dy + tabPtr->iPadY.side1 + IMAGE_PAD;
ix = x + (tabPtr->screenWidth - iw) / 2;
@@ -5915,6 +5917,7 @@
i2x = x + (tabPtr->screenWidth - iw2) / 2;
break;
case SIDE_TOP:
+ default:
i2y = iy + imgHeight + IMAGE_PAD + setPtr->gapLeft;
i2x = x + (tabPtr->screenWidth - iw2) / 2;
break;
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -1701,7 +1701,7 @@
GC newGC;
unsigned long mask;
Tk_Image image;
- char *oldTextVar, *oldSelVar;
+ char *oldTextVar = NULL, *oldSelVar = NULL;
Blt_Tree oldTree;
int oldNode, result = TCL_OK;
char * oldABdStr = butPtr->activeBdImageString;
@@ -1721,8 +1721,8 @@

if (Blt_ConfigureWidget(interp, butPtr->tkwin, configSpecs,
argc, argv, (char *)butPtr, flags) != TCL_OK) {
- if (oldTextVar) ckfree(oldTextVar);
- if (oldTextVar) ckfree(oldSelVar);
+ if (oldTextVar != NULL) ckfree(oldTextVar);
+ if (oldSelVar != NULL) ckfree(oldSelVar);
return TCL_ERROR;
}
/*

Large diffs are not rendered by default.

@@ -0,0 +1,26 @@
Description: Patch adds missing headers which helps building BLT on
64-bit architectures.
Author: Matthias Klose
Last-Modified: Sun, 06 Jul 2014 07:28:14 +0400

--- a/generic/bltNsUtil.c
+++ b/generic/bltNsUtil.c
@@ -27,6 +27,8 @@

#include "bltInt.h"
#include "bltList.h"
+#include "bltNsUtil.h"
+#include "tclInt.h"

/* Namespace related routines */

--- a/configure.in
+++ b/configure.in
@@ -825,6 +825,7 @@
"${TCL_INC_DIR}" != "${TK_INC_DIR}" ; then
INC_SPECS="${INC_SPECS} -I${TCL_INC_DIR}"
fi
+INC_SPECS="${INC_SPECS} -I${TCL_SRC_DIR}/generic -I${TCL_SRC_DIR}/unix"


# On Windows, override the default include directory with our own.

Large diffs are not rendered by default.