From 0b787b5da25615fff4f41a1101a42f1ab142dcd4 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 3 Mar 2004 11:05:40 +0000 Subject: 19525: suppress compiler warnings and complete groups using lookupd on Mac OS --- ChangeLog | 10 +++++++++- Completion/Unix/Type/_groups | 4 +++- Src/Modules/socket.c | 2 +- Src/Modules/tcp.c | 2 +- Src/Zle/zle_params.c | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 433cab71d..49356ab94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-03-03 Oliver Kiddle + + * 19525: Completion/Unix/Type/_groups: complete groups using + lookupd on Mac OS X + + * 19525: Src/Modules/socket.c, Src/Modules/tcp.c, + Src/Zle/zle_params.c: suppress a few compiler warnings + 2004-03-03 Peter Stephenson * unposted: Config/version.mk: zsh 4.2.0-pre-2. @@ -16,7 +24,7 @@ 2004-03-01 Peter Stephenson * 19512: INSTALL, configure.ac, Src/Modules/pcre.mdd: - Reqire --enable-pcre in order to avoid problems with libpcre.so + Require --enable-pcre in order to avoid problems with libpcre.so availability. 2004-03-01 Oliver Kiddle diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups index b6d599c28..6ba32f4f0 100644 --- a/Completion/Unix/Type/_groups +++ b/Completion/Unix/Type/_groups @@ -6,7 +6,9 @@ _tags groups || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || - if (( ${+commands[getent]} )); then + if [[ $OSTYPE = darwin* ]]; then + : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }} + elif (( ${+commands[getent]} )); then : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}} else : ${(A)_cache_groups:=${${${(s: :)$(len); + unmetafy(*p, (int *)&kptr->len); kptr->buf = (char *)zalloc(kptr->len); memcpy(kptr->buf, *p, kptr->len); zfree(*p, len+1); -- cgit 1.4.1