From 1bd4094341bcada53540b6f51833c30d61f1dcd6 Mon Sep 17 00:00:00 2001 From: Lucien Van Elsen Date: Wed, 4 Dec 1991 08:25:09 +0000 Subject: Converted back to ANSI C (with ifdef's for standard C) --- server/access.h | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) (limited to 'server/access.h') diff --git a/server/access.h b/server/access.h index 43e0d77..df1201d 100644 --- a/server/access.h +++ b/server/access.h @@ -18,7 +18,7 @@ #include #include -#include "ZString.h" +#include "zstring.h" #include "unix.h" typedef enum _ZAccess_t { @@ -28,35 +28,25 @@ typedef enum _ZAccess_t { INSTUID /* use instance UID identity acl */ } ZAccess_t; -class ZAcl_t { - char *acl_filename; - int acl_types; /* Flag field indcating which acls - are present. Used ONLY in access.c */ - public: - int ok (ZString, ZAccess_t); - ZAcl_t (const char *path) { - extern char * strsave (const char *); - acl_filename = strsave (path); - acl_types = 0; - check (); - } - ~ZAcl_t () { - xfree (acl_filename); - } - private: - void check (void); - void check_acl_type (ZAccess_t, int); -}; - -inline int access_check(ZString sender, ZAcl_t *acl, ZAccess_t accesstype) { - return acl->ok (sender, accesstype); -} +typedef struct _ZAcl_t { + char *acl_filename; + int acl_types; /* Flag field indcating which acls + are present. Used ONLY in access.c */ +} ZAcl_t; + +#ifdef __STDC__ +# define P(s) s +#else +# define P(s) () +#endif /* found in access.c */ -extern void access_init (void), access_reinit (void); +extern void access_init P((void)), access_reinit P((void)); /* found in acl_files.c */ -extern "C" int acl_load (char *); +extern int acl_load P((char *)); + +#undef P /* external data relevant */ extern int zdebug; -- cgit v1.2.3