about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-05-29 02:31:59 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-05-29 02:31:59 +0000
commit5828c247a5bbd4472c62a49f96a8fa24e41ecd20 (patch)
treeead2347b3cfb2c33584b677f70888d2abf7ca776 /Src
parent0368cf025b865828bdadb2e1400346153a91f916 (diff)
downloadzsh-5828c247a5bbd4472c62a49f96a8fa24e41ecd20.tar.gz
zsh-5828c247a5bbd4472c62a49f96a8fa24e41ecd20.tar.xz
zsh-5828c247a5bbd4472c62a49f96a8fa24e41ecd20.zip
Merge of unposted revisions 1.49 and 1.51.
Diffstat (limited to 'Src')
-rw-r--r--Src/parse.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/Src/parse.c b/Src/parse.c
index ecb5ff7e4..9a7125ccd 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2108,6 +2108,16 @@ yyerror(int noerr)
 	errflag = 1;
 }
 
+/*
+ * Duplicate a programme list, on the heap if heap is 1, else
+ * in permanent storage.
+ *
+ * Be careful in case p is the Eprog for a function which will
+ * later be autoloaded.  The shf element of the returned Eprog
+ * must be set appropriately by the caller.  (Normally we create
+ * the Eprog in this case by using mkautofn.)
+ */
+
 /**/
 mod_export Eprog
 dupeprog(Eprog p, int heap)
@@ -2898,7 +2908,7 @@ static FuncDump dumps;
 
 /**/
 static int
-zwcstat(char *filename, struct stat *buf, FuncDump dumps)
+zwcstat(char *filename, struct stat *buf)
 {
     if (stat(filename, buf)) {
 #ifdef HAVE_FSTAT
@@ -2971,7 +2981,7 @@ load_dump_file(char *dump, struct stat *sbuf, int other, int len)
 
 #else
 
-#define zwcstat(f, b, d) stat(f, b)
+#define zwcstat(f, b) (!!stat(f, b))
 
 #endif
 
@@ -2998,7 +3008,7 @@ try_dump_file(char *path, char *name, char *file, int *ksh)
     dig = dyncat(path, FD_EXT);
     wc = dyncat(file, FD_EXT);
 
-    rd = zwcstat(dig, &std, dumps);
+    rd = zwcstat(dig, &std);
     rc = stat(wc, &stc);
     rn = stat(file, &stn);
 
@@ -3078,7 +3088,7 @@ check_dump_file(char *file, struct stat *sbuf, char *name, int *ksh)
     struct stat lsbuf;
 
     if (!sbuf) {
-	if (zwcstat(file, &lsbuf, dumps))
+	if (zwcstat(file, &lsbuf))
 	    return NULL;
 	sbuf = &lsbuf;
     }