about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/example.c4
-rw-r--r--Src/Modules/parameter.c18
-rw-r--r--Src/Modules/zftp.c30
-rw-r--r--Src/Modules/zprof.c4
4 files changed, 27 insertions, 29 deletions
diff --git a/Src/Modules/example.c b/Src/Modules/example.c
index bf4ad60fb..0b15fa064 100644
--- a/Src/Modules/example.c
+++ b/Src/Modules/example.c
@@ -143,7 +143,7 @@ math_length(char *name, char *arg, int id)
 
 /**/
 static int
-ex_wrapper(List list, FuncWrap w, char *name)
+ex_wrapper(Eprog prog, FuncWrap w, char *name)
 {
     if (strncmp(name, "example", 7))
 	return 1;
@@ -151,7 +151,7 @@ ex_wrapper(List list, FuncWrap w, char *name)
 	int ogd = opts[GLOBDOTS];
 
 	opts[GLOBDOTS] = 1;
-	runshfunc(list, w, name);
+	runshfunc(prog, w, name);
 	opts[GLOBDOTS] = ogd;
 
 	return 0;
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");
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index debb1a6bb..0df035c74 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -1600,9 +1600,9 @@ zfsenddata(char *name, int recv, int progress, off_t startat)
     char lsbuf[ZF_BUFSIZE], *ascbuf = NULL, *optr;
     off_t sofar = 0, last_sofar = 0;
     readwrite_t read_ptr = zfread, write_ptr = zfwrite;
-    List l;
+    Eprog prog;
 
-    if (progress && (l = getshfunc("zftp_progress")) != &dummy_list) {
+    if (progress && (prog = getshfunc("zftp_progress")) != &dummy_eprog) {
 	/*
 	 * progress to set up:  ZFTP_COUNT is zero.
 	 * We do this here in case we needed to wait for a RETR
@@ -1611,7 +1611,7 @@ zfsenddata(char *name, int recv, int progress, off_t startat)
 	int osc = sfcontext;
 
 	sfcontext = SFC_HOOK;
-	doshfunc("zftp_progress", l, NULL, 0, 1);
+	doshfunc("zftp_progress", prog, NULL, 0, 1);
 	sfcontext = osc;
 	/* Now add in the bit of the file we've got/sent already */
 	sofar = last_sofar = startat;
@@ -1739,12 +1739,12 @@ zfsenddata(char *name, int recv, int progress, off_t startat)
 	} else
 	    break;
 	if (!ret && sofar != last_sofar && progress &&
-	    (l = getshfunc("zftp_progress")) != &dummy_list) {
+	    (prog = getshfunc("zftp_progress")) != &dummy_eprog) {
 	    int osc = sfcontext;
 
 	    zfsetparam("ZFTP_COUNT", &sofar, ZFPM_READONLY|ZFPM_INTEGER);
 	    sfcontext = SFC_HOOK;
-	    doshfunc("zftp_progress", l, NULL, 0, 1);
+	    doshfunc("zftp_progress", prog, NULL, 0, 1);
 	    sfcontext = osc;
 	    last_sofar = sofar;
 	}
@@ -2444,7 +2444,7 @@ zfgetcwd(void)
 {
     char *ptr, *eptr;
     int endc;
-    List l;
+    Eprog prog;
 
     if (zfprefs & ZFPF_DUMB)
 	return 1;
@@ -2471,11 +2471,11 @@ zfgetcwd(void)
      * front end.  By putting it here, and in close when ZFTP_PWD is unset,
      * we at least cover the bases.
      */
-    if ((l = getshfunc("zftp_chpwd")) != &dummy_list) {
+    if ((prog = getshfunc("zftp_chpwd")) != &dummy_eprog) {
 	int osc = sfcontext;
 
 	sfcontext = SFC_HOOK;
-	doshfunc("zftp_chpwd", l, NULL, 0, 1);
+	doshfunc("zftp_chpwd", prog, NULL, 0, 1);
 	sfcontext = osc;
     }
     return 0;
@@ -2629,7 +2629,7 @@ zftp_getput(char *name, char **args, int flags)
 {
     int ret = 0, recv = (flags & ZFTP_RECV), getsize = 0, progress = 1;
     char *cmd = recv ? "RETR " : (flags & ZFTP_APPE) ? "APPE " : "STOR ";
-    List l;
+    Eprog prog;
 
     /*
      * At this point I'd like to set progress to 0 if we're
@@ -2647,7 +2647,7 @@ zftp_getput(char *name, char **args, int flags)
     for (; *args; args++) {
 	char *ln, *rest = NULL;
 	off_t startat = 0;
-	if (progress && (l = getshfunc("zftp_progress")) != &dummy_list) {
+	if (progress && (prog = getshfunc("zftp_progress")) != &dummy_eprog) {
 	    off_t sz;
 	    /*
 	     * This calls the SIZE command to get the size for remote
@@ -2688,14 +2688,14 @@ zftp_getput(char *name, char **args, int flags)
 	 * if and only if we called zfsenddata();
 	 */
 	if (progress && ret != 2 &&
-	    (l = getshfunc("zftp_progress")) != &dummy_list) {
+	    (prog = getshfunc("zftp_progress")) != &dummy_eprog) {
 	    /* progress to finish: ZFTP_TRANSFER set to GF or PF */
 	    int osc = sfcontext;
 
 	    zfsetparam("ZFTP_TRANSFER", ztrdup(recv ? "GF" : "PF"),
 		       ZFPM_READONLY);
 	    sfcontext = SFC_HOOK;
-	    doshfunc("zftp_progress", l, NULL, 0, 1);
+	    doshfunc("zftp_progress", prog, NULL, 0, 1);
 	    sfcontext = osc;
 	}
 	if (rest) {
@@ -2795,7 +2795,7 @@ static void
 zfclose(int leaveparams)
 {
     char **aptr;
-    List l;
+    Eprog prog;
 
     if (zfsess->cfd == -1)
 	return;
@@ -2837,11 +2837,11 @@ zfclose(int leaveparams)
 	    zfunsetparam(*aptr);
 
 	/* Now ZFTP_PWD is unset.  It's up to zftp_chpwd to notice. */
-	if ((l = getshfunc("zftp_chpwd")) != &dummy_list) {
+	if ((prog = getshfunc("zftp_chpwd")) != &dummy_eprog) {
 	    int osc = sfcontext;
 
 	    sfcontext = SFC_HOOK;
-	    doshfunc("zftp_chpwd", l, NULL, 0, 1);
+	    doshfunc("zftp_chpwd", prog, NULL, 0, 1);
 	    sfcontext = osc;
 	}
     }
diff --git a/Src/Modules/zprof.c b/Src/Modules/zprof.c
index 276ada4d6..59fea3154 100644
--- a/Src/Modules/zprof.c
+++ b/Src/Modules/zprof.c
@@ -214,7 +214,7 @@ bin_zprof(char *nam, char **args, char *ops, int func)
 
 /**/
 static int
-zprof_wrapper(List list, FuncWrap w, char *name)
+zprof_wrapper(Eprog prog, FuncWrap w, char *name)
 {
     struct sfunc sf, *sp;
     Pfunc f;
@@ -257,7 +257,7 @@ zprof_wrapper(List list, FuncWrap w, char *name)
     gettimeofday(&tv, &dummy);
     sf.beg = prev = ((((double) tv.tv_sec) * 1000.0) +
 		     (((double) tv.tv_usec) / 1000.0));
-    runshfunc(list, w, name);
+    runshfunc(prog, w, name);
     tv.tv_sec = tv.tv_usec = 0;
     gettimeofday(&tv, &dummy);