Updated to newer version

This commit is contained in:
2018-05-28 20:16:11 -05:00
parent d2fc926fae
commit 60a77e3b78
10 changed files with 87 additions and 80 deletions

View File

@@ -1,16 +0,0 @@
diff -purN a/bc/execute.c b/bc/execute.c
--- a/bc/execute.c 2006-09-04 21:39:31.000000000 -0500
+++ b/bc/execute.c 2016-09-09 12:57:14.756000000 -0500
@@ -133,7 +133,11 @@ execute ()
gp = functions[pc.pc_func].f_label;
l_gp = label_num >> BC_LABEL_LOG;
l_off = label_num % BC_LABEL_GROUP;
- while (l_gp-- > 0) gp = gp->l_next;
+ while (gp && l_gp-- > 0) gp = gp->l_next;
+ if (!gp) {
+ rt_error ("No label group for label %d.", label_num);
+ break;
+ }
pc.pc_addr = gp->l_adrs[l_off];
}
break;

View File

@@ -1,24 +0,0 @@
diff -purN a/bc/bc.y b/bc/bc.y
--- a/bc/bc.y 2006-09-04 21:39:31.000000000 -0500
+++ b/bc/bc.y 2016-09-09 13:02:41.476000000 -0500
@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_O
generate (">");
break;
}
+ free($2);
}
| expression '+' expression
{
diff -purN a/bc/util.c b/bc/util.c
--- a/bc/util.c 2006-09-04 21:39:31.000000000 -0500
+++ b/bc/util.c 2016-09-09 13:02:41.476000000 -0500
@@ -602,8 +602,7 @@ lookup (name, namekind)
case FUNCTDEF:
if (id->f_name != 0)
{
- if (namekind != FUNCT)
- free(name);
+ free(name);
/* Check to see if we are redefining a math lib function. */
if (use_math && namekind == FUNCTDEF && id->f_name <= 6)
id->f_name = next_func++;

View File

@@ -1,11 +0,0 @@
diff -purN a/bc/storage.c b/bc/storage.c
--- a/bc/storage.c 2006-09-04 21:39:31.000000000 -0500
+++ b/bc/storage.c 2016-09-09 13:05:09.720000000 -0500
@@ -99,6 +99,7 @@ more_functions (VOID)
{
f = &functions[indx];
f->f_defined = FALSE;
+ f->f_void = FALSE;
f->f_body = (char *) bc_malloc (BC_START_SIZE);
f->f_body_size = BC_START_SIZE;
f->f_code_size = 0;

View File

@@ -1,2 +1,3 @@
Place any patch files here and preface each with a number indicating
the order of execution. Patch files are expected to use a .patch extension.
Place any patch files here and preface each with a
number indicating the order of execution. Patch
files are expected to use a .patch extension.