File:  [cvs.NetBSD.org] / pkgsrc / x11 / blt / patches / patch-src_bltTree.c
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jun 6 04:27:14 2022 UTC (2 years, 6 months ago) by dholland
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, HEAD
Patch up x11/blt some.

Most importantly, fix up what it passes to the TCL package handling
functions, since as it was the library won't initialize. I can't
remember when this changed in TCL but I've seen the same issue
before... years ago. This library has likely been inoperable all that
time.

Patch up a whole bunch of build warnings, some significant.

However, it probably still doesn't work and in addition to a lot more
routine build issues it needs attention from someone who knows more
tcl than me.

Bump PKGREVISION (to 13). I'm not going to bump the handful of
dependent packages since I don't think I've done anything to change
the interface, plus they're all likely inoperable anyway given how
broken this thing looks.

Prerequisite for checking PR 32807 for currency, since it depends on
blt and blt won't load. But I rather imagine the problem seen at the
time was blt dumping core.

$NetBSD: patch-src_bltTree.c,v 1.1 2022/06/06 04:27:14 dholland Exp $

Silence gcc warnings in the interests of being able to see the
real build problems.

--- src/bltTree.c~	2022-06-06 02:53:11.389200304 +0000
+++ src/bltTree.c
@@ -405,7 +405,7 @@ FreeNode(TreeObject *treeObjPtr, Node *n
     TreeDestroyValues(nodePtr);
     UnlinkNode(nodePtr);
     treeObjPtr->nNodes--;
-    hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)nodePtr->inode);
+    hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)(intptr_t)nodePtr->inode);
     assert(hPtr);
     Blt_DeleteHashEntry(&treeObjPtr->nodeTable, hPtr);
     Blt_PoolFreeItem(treeObjPtr->nodePool, (char *)nodePtr);
@@ -838,7 +838,7 @@ Blt_TreeCreateNode(
     /* Generate an unique serial number for this node.  */
     do {
 	inode = treeObjPtr->nextInode++;
-	hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)inode, 
+	hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)(intptr_t)inode, 
 		   &isNew);
     } while (!isNew);
     nodePtr = NewNode(treeObjPtr, name, inode);
@@ -893,7 +893,7 @@ Blt_TreeCreateNodeWithId(
     int isNew;
 
     treeObjPtr = parentPtr->treeObject;
-    hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)inode, &isNew);
+    hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)(intptr_t)inode, &isNew);
     if (!isNew) {
 	return NULL;
     }
@@ -999,7 +999,7 @@ Blt_TreeGetNode(TreeClient *clientPtr, u
     TreeObject *treeObjPtr = clientPtr->treeObject;
     Blt_HashEntry *hPtr;
 
-    hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)inode);
+    hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)(uintptr_t)inode);
     if (hPtr != NULL) {
 	return (Blt_TreeNode)Blt_GetHashValue(hPtr);
     }
@@ -2433,7 +2433,7 @@ Blt_TreeClearTags(TreeClient *clientPtr,
 	Blt_TreeTagEntry *tPtr;
 
 	tPtr = Blt_GetHashValue(hPtr);
-	h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
+	h2Ptr = Blt_FindHashEntry(&tPtr->nodeTable, node);
 	if (h2Ptr != NULL) {
 	    Blt_DeleteHashEntry(&tPtr->nodeTable, h2Ptr);
 	}
@@ -2461,7 +2461,7 @@ Blt_TreeHasTag(
 	return FALSE;
     }
     tPtr = Blt_GetHashValue(hPtr);
-    hPtr = Blt_FindHashEntry(&tPtr->nodeTable, (char *)node);
+    hPtr = Blt_FindHashEntry(&tPtr->nodeTable, node);
     if (hPtr == NULL) {
 	return FALSE;
     }
@@ -2495,7 +2495,7 @@ Blt_TreeAddTag(
     } else {
 	tPtr = Blt_GetHashValue(hPtr);
     }
-    hPtr = Blt_CreateHashEntry(&tPtr->nodeTable, (char *)node, &isNew);
+    hPtr = Blt_CreateHashEntry(&tPtr->nodeTable, node, &isNew);
     assert(hPtr);
     if (isNew) {
 	Blt_SetHashValue(hPtr, node);

CVSweb <webmaster@jp.NetBSD.org>