about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2006-03-07 21:30:36 +0000
committerWayne Davison <wayned@users.sourceforge.net>2006-03-07 21:30:36 +0000
commit4cb83571c45670eb8111801499281ea416b5074d (patch)
treee46e881ad2f0ace5a02761e7cdb4f808df12d9f5 /Src/parse.c
parente17fc5079394ce0c30dc0573676983e6f4a0a5bc (diff)
downloadzsh-4cb83571c45670eb8111801499281ea416b5074d.tar.gz
zsh-4cb83571c45670eb8111801499281ea416b5074d.tar.xz
zsh-4cb83571c45670eb8111801499281ea416b5074d.zip
Changed some structures to avoid gcc's type-punned warnings.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 57ff73fbe..1a6146968 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2826,17 +2826,17 @@ cur_add_func(char *nam, Shfunc shf, LinkList names, LinkList progs,
     Eprog prog;
     WCFunc wcf;
 
-    if (shf->flags & PM_UNDEFINED) {
+    if (shf->node.flags & PM_UNDEFINED) {
 	int ona = noaliases;
 
 	if (!(what & 2)) {
-	    zwarnnam(nam, "function is not loaded: %s", shf->nam, 0);
+	    zwarnnam(nam, "function is not loaded: %s", shf->node.nam, 0);
 	    return 1;
 	}
-	noaliases = (shf->flags & PM_UNALIASED);
-	if (!(prog = getfpfunc(shf->nam, NULL)) || prog == &dummy_eprog) {
+	noaliases = (shf->node.flags & PM_UNALIASED);
+	if (!(prog = getfpfunc(shf->node.nam, NULL)) || prog == &dummy_eprog) {
 	    noaliases = ona;
-	    zwarnnam(nam, "can't load function: %s", shf->nam, 0);
+	    zwarnnam(nam, "can't load function: %s", shf->node.nam, 0);
 	    return 1;
 	}
 	if (prog->dump)
@@ -2844,20 +2844,20 @@ cur_add_func(char *nam, Shfunc shf, LinkList names, LinkList progs,
 	noaliases = ona;
     } else {
 	if (!(what & 1)) {
-	    zwarnnam(nam, "function is already loaded: %s", shf->nam, 0);
+	    zwarnnam(nam, "function is already loaded: %s", shf->node.nam, 0);
 	    return 1;
 	}
 	prog = dupeprog(shf->funcdef, 1);
     }
     wcf = (WCFunc) zhalloc(sizeof(*wcf));
-    wcf->name = shf->nam;
+    wcf->name = shf->node.nam;
     wcf->prog = prog;
     wcf->flags = ((prog->flags & EF_RUN) ? FDHF_KSHLOAD : FDHF_ZSHLOAD);
     addlinknode(progs, wcf);
-    addlinknode(names, shf->nam);
+    addlinknode(names, shf->node.nam);
 
     *hlen += ((sizeof(struct fdhead) / sizeof(wordcode)) +
-	      ((strlen(shf->nam) + sizeof(wordcode)) / sizeof(wordcode)));
+	      ((strlen(shf->node.nam) + sizeof(wordcode)) / sizeof(wordcode)));
     *tlen += (prog->len - (prog->npats * sizeof(Patprog)) +
 	      sizeof(wordcode) - 1) / sizeof(wordcode);
 
@@ -3358,10 +3358,10 @@ dump_autoload(char *nam, char *file, int on, Options ops, int func)
     for (n = firstfdhead(h), e = (FDHead) (h + fdheaderlen(h)); n < e;
 	 n = nextfdhead(n)) {
 	shf = (Shfunc) zshcalloc(sizeof *shf);
-	shf->flags = on;
+	shf->node.flags = on;
 	shf->funcdef = mkautofn(shf);
 	shfunctab->addnode(shfunctab, ztrdup(fdname(n) + fdhtail(n)), shf);
-	if (OPT_ISSET(ops,'X') && eval_autoload(shf, shf->nam, ops, func))
+	if (OPT_ISSET(ops,'X') && eval_autoload(shf, shf->node.nam, ops, func))
 	    ret = 1;
     }
     return ret;