* PATCH: misc.
@ 2000-01-24 8:57 Sven Wischnowsky
2000-01-24 20:01 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 2000-01-24 8:57 UTC (permalink / raw)
To: zsh-workers
Just some cleanups... a missing `zsh/' module name prefix, the test
for the new completion system in zfinit wasn't correct and some
`... might be used uninitialized' warnings.
Bye
Sven
diff -ru ../z.old/Functions/Zftp/zfinit Functions/Zftp/zfinit
--- ../z.old/Functions/Zftp/zfinit Mon Jan 24 09:22:57 2000
+++ Functions/Zftp/zfinit Mon Jan 24 09:55:12 2000
@@ -2,7 +2,7 @@
[[ $1 = -n ]] || zmodload -e zsh/zftp || zmodload -ia zsh/zftp zftp || return 1
-if zmodload -i zutil; then
+if zmodload -i zsh/zutil; then
local arr
# Set defaults for styles if none set.
zstyle -g arr ':zftp:*' progress || zstyle ':zftp:*' progress bar
@@ -31,7 +31,7 @@
# zftp completions: only use these if new-style completion is not
# active.
#
-if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)zf*]} ]]; then
+if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]]; then
# only way of getting that noglob out of the way: this is unnecessary with
# widget-based completion
setopt completealiases
diff -ru ../z.old/Src/Modules/zutil.c Src/Modules/zutil.c
--- ../z.old/Src/Modules/zutil.c Mon Jan 24 09:22:04 2000
+++ Src/Modules/zutil.c Mon Jan 24 09:55:12 2000
@@ -785,7 +785,7 @@
RParseState *st;
RParseBranch *br;
char *pattern, *lookahead;
- int patternlen, lookaheadlen;
+ int patternlen, lookaheadlen = 0;
l = strlen(s);
if (!((2 <= l && s[l - 1] == '/') ||
diff -ru ../z.old/Src/loop.c Src/loop.c
--- ../z.old/Src/loop.c Mon Jan 24 09:21:54 2000
+++ Src/loop.c Mon Jan 24 09:55:13 2000
@@ -52,9 +52,9 @@
Wordcode end, loop;
wordcode code = state->pc[-1];
int iscond = (WC_FOR_TYPE(code) == WC_FOR_COND);
- char *name, *str, *cond, *advance;
+ char *name, *str, *cond = NULL, *advance = NULL;
zlong val = 0;
- LinkList args;
+ LinkList args = NULL;
name = ecgetstr(state, 0);
end = state->pc + WC_FOR_SKIP(code);
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: misc.
2000-01-24 8:57 PATCH: misc Sven Wischnowsky
@ 2000-01-24 20:01 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2000-01-24 20:01 UTC (permalink / raw)
To: zsh-workers
Sven Wischnowsky wrote:
> -if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)zf*]} ]]; then
> +if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]]; then
The index was originally `[(i)zf*]' until you interpreted this as a bug and
changed the (i) to (r), hence it was originally searching the keys of
_patcomps for zf* functions, not the values for _zftp. But the final
result is perfectly OK.
--
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-01-24 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-24 8:57 PATCH: misc Sven Wischnowsky
2000-01-24 20:01 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).