respect CFLAGS
fix memory bugs while I'm at it
This commit is contained in:
parent
4d000db702
commit
11f08e1166
@ -1,6 +1,25 @@
|
||||
--- tcl/tclProc.c.orig Fri Feb 24 16:19:56 1995
|
||||
+++ tcl/tclProc.c Sun Jan 16 01:53:10 2000
|
||||
@@ -793,11 +793,13 @@
|
||||
--- tcl/tclProc.c.orig Fri Feb 24 22:19:56 1995
|
||||
+++ tcl/tclProc.c Sun Feb 11 12:27:12 2001
|
||||
@@ -124,8 +124,8 @@
|
||||
argPtr = (Var *) malloc(VAR_SIZE(nameLength, valueLength));
|
||||
procPtr->argPtr = argPtr;
|
||||
} else {
|
||||
- argPtr->nextPtr = (Var *) malloc(VAR_SIZE(nameLength, valueLength));
|
||||
- argPtr = argPtr->nextPtr;
|
||||
+ procPtr->argPtr->nextPtr = (Var *) malloc(VAR_SIZE(nameLength, valueLength));
|
||||
+ argPtr = procPtr->argPtr->nextPtr;
|
||||
}
|
||||
strcpy(argPtr->name, fieldValues[0]);
|
||||
if (fieldCount == 2) {
|
||||
@@ -136,6 +136,7 @@
|
||||
}
|
||||
argPtr->valueLength = valueLength;
|
||||
argPtr->flags = 0;
|
||||
+ argPtr->globalPtr = NULL;
|
||||
argPtr->nextPtr = NULL;
|
||||
free((char *) fieldValues);
|
||||
}
|
||||
@@ -793,11 +794,13 @@
|
||||
*/
|
||||
|
||||
procDone:
|
||||
@ -16,3 +35,20 @@
|
||||
}
|
||||
iPtr->framePtr = frame.callerPtr;
|
||||
iPtr->varFramePtr = frame.callerVarPtr;
|
||||
@@ -826,13 +829,14 @@
|
||||
ProcDeleteProc(procPtr)
|
||||
register Proc *procPtr; /* Procedure to be deleted. */
|
||||
{
|
||||
- register Var *argPtr;
|
||||
+ register Var *argPtr, *arg1Ptr;
|
||||
|
||||
free((char *) procPtr->command);
|
||||
- for (argPtr = procPtr->argPtr; argPtr != NULL; argPtr = argPtr->nextPtr) {
|
||||
+ for (argPtr = procPtr->argPtr; argPtr != NULL; argPtr = arg1Ptr) {
|
||||
if (argPtr->flags & VAR_DYNAMIC) {
|
||||
free(argPtr->value);
|
||||
}
|
||||
+ arg1Ptr = argPtr->nextPtr;
|
||||
free((char *) argPtr);
|
||||
}
|
||||
free((char *) procPtr);
|
||||
|
@ -1,6 +1,12 @@
|
||||
--- tcl/Make.orig Fri Feb 24 13:19:48 1995
|
||||
+++ tcl/Make Mon May 25 14:58:35 1998
|
||||
@@ -11,13 +11,6 @@
|
||||
--- tcl/Make.orig Fri Feb 24 22:19:48 1995
|
||||
+++ tcl/Make Mon Mar 12 16:54:43 2001
|
||||
@@ -6,18 +6,11 @@
|
||||
# You should not need to modify this makefile.
|
||||
|
||||
LIBDIR = ..
|
||||
-CFLAGS = $(TCLCFLAGS) -I. -DTCL_VERSION=\"3.3\"
|
||||
+CFLAGS += $(TCLCFLAGS) -I. -DTCL_VERSION=\"3.3\"
|
||||
#PMAKE = &
|
||||
|
||||
SRC = \
|
||||
panic.c \
|
||||
|
13
net/icb/patches/patch-readline_Make
Normal file
13
net/icb/patches/patch-readline_Make
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-readline_Make,v 1.1 2001/03/12 15:59:02 wilfried Exp $
|
||||
--- readline/Make.orig Fri Feb 24 22:19:59 1995
|
||||
+++ readline/Make Mon Mar 12 16:55:33 2001
|
||||
@@ -34,8 +34,7 @@
|
||||
READLINE_DEFINES = $(TYPES) -DVI_MODE
|
||||
|
||||
DEBUG_FLAGS = -g
|
||||
-LDFLAGS = $(DEBUG_FLAGS)
|
||||
-CFLAGS = $(DEBUG_FLAGS) $(USG) -I. -I..
|
||||
+CFLAGS += $(USG) -I. -I..
|
||||
|
||||
# A good alternative is gcc -traditional.
|
||||
#CC = gcc -traditional
|
11
net/icb/patches/patch-tcl_tclBasic_c
Normal file
11
net/icb/patches/patch-tcl_tclBasic_c
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-tcl_tclBasic_c,v 1.1 2001/03/12 15:59:02 wilfried Exp $
|
||||
--- tcl/tclBasic.c.orig Fri Feb 24 22:19:53 1995
|
||||
+++ tcl/tclBasic.c Sun Feb 11 11:58:22 2001
|
||||
@@ -132,6 +132,7 @@ Tcl_CreateInterp()
|
||||
iPtr->errorLine = 0;
|
||||
iPtr->commandPtr = NULL;
|
||||
iPtr->globalPtr = NULL;
|
||||
+ iPtr->localPtr = NULL;
|
||||
iPtr->numLevels = 0;
|
||||
iPtr->framePtr = NULL;
|
||||
iPtr->varFramePtr = NULL;
|
19
net/icb/patches/patch-tcl_tclHistory_c
Normal file
19
net/icb/patches/patch-tcl_tclHistory_c
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-tcl_tclHistory_c,v 1.1 2001/03/12 15:59:02 wilfried Exp $
|
||||
--- tcl/tclHistory.c.orig Fri Feb 24 22:19:55 1995
|
||||
+++ tcl/tclHistory.c Sun Feb 11 12:01:16 2001
|
||||
@@ -664,6 +664,7 @@ RevCommand(iPtr, string)
|
||||
revPtr->lastIndex = iPtr->evalLast - iPtr->historyFirst - 1;
|
||||
revPtr->newSize = strlen(string);
|
||||
revPtr->newBytes = malloc((unsigned) (revPtr->newSize+1));
|
||||
+ revPtr->nextPtr = NULL;
|
||||
strcpy(revPtr->newBytes, string);
|
||||
InsertRev(iPtr, revPtr);
|
||||
}
|
||||
@@ -732,6 +733,7 @@ RevResult(iPtr, string)
|
||||
argv[0] = string;
|
||||
revPtr->newBytes = Tcl_Merge(1, argv);
|
||||
revPtr->newSize = strlen(revPtr->newBytes);
|
||||
+ revPtr->nextPtr = NULL;
|
||||
InsertRev(iPtr, revPtr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user