From 5779d9e2ce26a8a9419ebf4fcf02f3571af34332 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 3 Nov 2006 10:06:54 +0000 Subject: make loop macros common, create macros for expanding {set,get,end}ent() functions and implement {set,get,end}aliasent git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@62 ef36b2f9-881f-0410-afb5-c4e39611909c --- nss/group.c | 62 ++++++++++++------------------------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-) (limited to 'nss/group.c') diff --git a/nss/group.c b/nss/group.c index 1013a6b..4c98f6b 100644 --- a/nss/group.c +++ b/nss/group.c @@ -30,24 +30,6 @@ #include "nslcd-client.h" #include "common.h" - -/* generic macros in development here */ -#define READ_LOOP_NULLTERM(fp,arr,opr) \ - READ_TYPE(fp,tmpint32,int32_t); \ - /* allocate room for *char[num+1] */ \ - tmp2int32=(tmpint32+1)*sizeof(char *); \ - if ((bufptr+(size_t)tmp2int32)>buflen) \ - { ERROR_OUT_BUFERROR(fp) } /* will not fit */ \ - (arr)=(char **)(buffer+bufptr); \ - /* set last entry to NULL */ \ - (arr)[tmpint32]=NULL; \ - /* read all entries */ \ - bufptr+=(size_t)tmpint32; \ - for (tmp2int32=0;tmp2int32