about summary refs log tree commit diff
path: root/Src/Modules/parameter.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-17 18:25:25 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-17 18:25:25 +0000
commit63acd1060174cd9d3595abb3fe71174c595e8131 (patch)
tree5885596a27556a0d5bfd104ec18848d0c05ce759 /Src/Modules/parameter.c
parentcf10e6052445bc5460e86fc9621dec4cd4b9cb02 (diff)
downloadzsh-63acd1060174cd9d3595abb3fe71174c595e8131.tar.gz
zsh-63acd1060174cd9d3595abb3fe71174c595e8131.tar.xz
zsh-63acd1060174cd9d3595abb3fe71174c595e8131.zip
zsh-workers/9332
Diffstat (limited to 'Src/Modules/parameter.c')
-rw-r--r--Src/Modules/parameter.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index b0ea78ac7..b67d9557c 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -339,23 +339,23 @@ setfunction(char *name, char *val, int dis)
 {
     char *value = dupstring(val);
     Shfunc shf;
-    List list;
+    Eprog prog;
     int sn;
 
     val = metafy(val, strlen(val), META_REALLOC);
 
     HEAPALLOC {
-	list = parse_string(val, 1);
+	prog = parse_string(val, 1);
     } LASTALLOC;
 
-    if (!list || list == &dummy_list) {
+    if (!prog || prog == &dummy_eprog) {
 	zwarn("invalid function definition", value, 0);
 	zsfree(val);
 	return;
     }
     PERMALLOC {
 	shf = (Shfunc) zalloc(sizeof(*shf));
-	shf->funcdef = (List) dupstruct(list);
+	shf->funcdef = dupeprog(prog);
 	shf->flags = dis;
 
 	if (!strncmp(name, "TRAP", 4) &&
@@ -463,8 +463,7 @@ getfunction(HashTable ht, char *name, int dis)
 				    ((shf->flags & PM_TAGGED) ? "Ut" : "U") :
 				    ((shf->flags & PM_TAGGED) ? "t" : "")));
 	    } else {
-		char *t = getpermtext((void *) dupstruct((void *)
-							 shf->funcdef)), *h;
+		char *t = getpermtext(shf->funcdef, NULL), *h;
 
 		h = dupstring(t);
 		zsfree(t);
@@ -528,8 +527,7 @@ scanfunctions(HashTable ht, ScanFunc func, int flags, int dis)
 				    ((shf->flags & PM_TAGGED) ? "Ut" : "U") :
 				    ((shf->flags & PM_TAGGED) ? "t" : "")));
 		    } else {
-			char *t = getpermtext((void *)
-					      dupstruct((void *) ((Shfunc) hn)->funcdef));
+			char *t = getpermtext(((Shfunc) hn)->funcdef, NULL);
 
 			pm.u.str = dupstring(t);
 			unmetafy(pm.u.str, NULL);
@@ -577,13 +575,13 @@ funcstackgetfn(Param pm)
 
 /**/
 static int
-func_wrapper(List list, FuncWrap w, char *name)
+func_wrapper(Eprog prog, FuncWrap w, char *name)
 {
     PERMALLOC {
 	pushnode(funcstack, ztrdup(name));
     } LASTALLOC;
 
-    runshfunc(list, w, name);
+    runshfunc(prog, w, name);
 
     DPUTS(strcmp(name, (char *) getdata(firstnode(funcstack))),
 	  "funcstack wrapper with wrong function");