From 74f5bbe1365808d62b476dbb14c466422ae3776f Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Fri, 4 Apr 2003 15:32:08 +0000 Subject: - update broken code --- USER/USER.xs | 96 +++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 40 deletions(-) (limited to 'USER') diff --git a/USER/USER.xs b/USER/USER.xs index df8e796..6cb362b 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -42,53 +42,48 @@ convert_value_array_list(register SV **sp, GValueArray *array) { return sp; } -static char * -get_string(USER__ENT *ent, ) { - char -} - MODULE = USER PACKAGE = USER::ADMIN PREFIX = Admin_ USER::ADMIN Admin_new(CLASS) char *CLASS - CODE: + CODE: RETVAL = (USER__ADMIN)safemalloc( sizeof( USER__ADMIN ) ); if( RETVAL == NULL ){ warn("unable to malloc USER__ADMIN"); XSRETURN_UNDEF; } - OUTPUT: + OUTPUT: RETVAL - + void Admin_start(self) - USER::ADMIN self - CODE: - USER__ERR error; - self = lu_start(NULL, 0, NULL, NULL, NULL, NULL, &error); - + USER::ADMIN self + CODE: + USER__ERR error; + self = lu_start(NULL, 0, NULL, NULL, NULL, NULL, &error); + void Admin_DESTROY(self) - USER::ADMIN self - CODE: - lu_end(self); - lu_ctx_free(self) - + USER::ADMIN self + CODE: + lu_end(self); + lu_ctx_free(self) + void Admin_lookup_user_name(self, name) - USER::ADMIN self - char *name - PREINIT: - USER::ENT ent; - USER__ERR err; - PPCODE: - ent = lu_ent_new(); - if ( lu_user_lookup_name(self, name, ent, &err)) { - XPUSHs(sv_2mortal(newSViv(ent))) - } else { - /* No such user. Clean up and bug out. */ - lu_ent_free(ent); + USER::ADMIN self + char *name + PREINIT: + USER::ENT ent; + USER__ERR err; + PPCODE: + ent = lu_ent_new(); + if ( lu_user_lookup_name(self, name, ent, &err)) { + XPUSHs(sv_2mortal(newSViv(ent))) + } else { + /* No such user. Clean up and bug out. */ + lu_ent_free(ent); } MODULE = USER PACKAGE = USER::ENT Prefix = PREFIX_ @@ -96,27 +91,48 @@ MODULE = USER PACKAGE = USER::ENT Prefix = PREFIX_ USER::ENT Ent_new (CLASS) char *CLASS - CODE: + CODE: RETVAL = (USER__ENT)safemalloc( sizeof( USER__ENT ) ); if( RETVAL == NULL ){ - warn("unable to malloc USER__CTX"); + warn("unable to malloc USER__ENT"); XSRETURN_UNDEF; } - OUTPUT: + OUTPUT: RETVAL +void +Ent_begin(self) + USER::ENT self + PPCODE: + self = lu_ent_new() + void Ent_DESTROY(self) - USER::ENT self - CODE: + USER::ENT self + CODE: lu_ent_free(self); + safefree(self) + +void +Ent_uid + USER::ENT self + PPCODE: + XPUSHs(sv_2mortal(newSViv(get_int(self, )))) + +void +Ent_uidNumber + +void +Ent_groupName + +void +Ent_gecos + +void +Ent_shell -/* Get the names of the modules which had something to do with this object. */ void -Ent_modules(self) - USER::ENT self - PPCODE: - SP = convert_value_array_list(SP, self->modules); +Ent_homeDir void Ent_add(self, val) -- cgit v1.2.1