diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-27 13:56:10 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-27 13:56:10 +0000 |
commit | 4d52b7ebe6d424e46cfddf2c6aa6ba704470f6ac (patch) | |
tree | d84ef47a22b39fb8370647c3e9974ea9a7e5b3ec /Src/Zle/compcore.c | |
parent | 4be5febd94a453c4ed67eb00e43d2107453e6563 (diff) | |
download | zsh-4d52b7ebe6d424e46cfddf2c6aa6ba704470f6ac.tar.gz zsh-4d52b7ebe6d424e46cfddf2c6aa6ba704470f6ac.tar.xz zsh-4d52b7ebe6d424e46cfddf2c6aa6ba704470f6ac.zip |
23670: rationalise some linked list functions
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 3e4f690f3..348054e86 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -644,7 +644,7 @@ callcompfunc(char *s, char *fn) if (compredirs) freearray(compredirs); if (rdstrs) - compredirs = bld_list_array(rdstrs); + compredirs = zlinklist2array(rdstrs); else compredirs = (char **) zshcalloc(sizeof(char *)); @@ -1852,30 +1852,13 @@ set_comp_sep(void) return 0; } -/* This builds an array from a list of strings. */ - -/**/ -mod_export char ** -bld_list_array(LinkList l) -{ - char **a, **p; - LinkNode n; - - a = (char **) zalloc((countlinknodes(l) + 1) * sizeof(char *)); - for (p = a, n = firstnode(l); n; incnode(n)) - *p++ = ztrdup((char *) getdata(n)); - *p = NULL; - - return a; -} - /* This stores the strings from the list in an array. */ /**/ mod_export void set_list_array(char *name, LinkList l) { - setaparam(name, bld_list_array(l)); + setaparam(name, zlinklist2array(l)); } /* Get the words from a variable or a (list of words). */ |