summaryrefslogtreecommitdiff
path: root/var.c
diff options
context:
space:
mode:
authorByron Rakitzis <byron@archone.tamu.edu>1994-03-07 00:00:01 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:59 +0100
commit5556dde4d3ad4e34267320b1411fc090b18a24b0 (patch)
tree9d22c48c75bcd778f30cbb2e37b6dff6abb4f1d2 /var.c
parent26bb34cf036027dfa22dfae8d8fc2f6bfd6acb75 (diff)
beta: rc-1.5betadev1
Diffstat (limited to 'var.c')
-rw-r--r--var.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/var.c b/var.c
index ef780b3..6a3e7c8 100644
--- a/var.c
+++ b/var.c
@@ -104,7 +104,7 @@ extern char *varlookup_string(char *name) {
return look->extdef;
if (look->def == NULL)
return NULL;
- return look->extdef = list2str(name, look->def);
+ return look->extdef = mprint("%F=%-L", name, look->def, "\001");
}
/* remove a variable from the symtab. "stack" determines whether a level of scoping is popped or not */
@@ -166,16 +166,15 @@ static void listassign(char *name, List *def, bool stack) {
return;
}
v = def->w;
- r = val = enew(List);
+ r = val = nnew(List);
while ((w = strchr(v, ':')) != NULL) {
*w = '\0';
- r->w = ecpy(v);
+ r->w = ncpy(v);
*w = ':';
v = w + 1;
- r->n = enew(List);
- r = r->n;
+ r = r->n = nnew(List);
}
- r->w = ecpy(v);
+ r->w = ncpy(v);
r->n = NULL;
varassign(name, val, stack);
}