pike.git / src / modules / Yp / yp.c

version» Context lines:

pike.git/src/modules/Yp/yp.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id$ +    */      #include "global.h"   #include "config.h"      #if defined(HAVE_RPCSVC_YPCLNT_H) && defined(HAVE_RPCSVC_YP_PROT_H) - #ifdef HAVE_SYS_TYPES_H - #include <sys/types.h> - #endif /* HAVE_SYS_TYPES_H */ +    #ifdef HAVE_RPC_TYPES_H   #include <rpc/types.h>   #endif /* HAVE_RPC_TYPES_H */   #ifdef HAVE_RPC_RPC_H   #include <rpc/rpc.h>   #endif /* HAVE_RPC_RPC_H */   #ifdef HAVE_RPC_CLNT_H   #include <rpc/clnt.h>   #endif /* HAVE_RPC_CLNT_H */   #include <rpcsvc/yp_prot.h>
pike.git/src/modules/Yp/yp.c:128:       if(this->domain)    {    yp_unbind( this->domain );    free(this->domain);    }    this->domain = strdup( sp[-args].u.string->str );    err = yp_bind( this->domain );       YPERROR( err ); -  -  pop_n_elems(args); +    }      /*! @decl mapping(string:string) all(string map)    *!    *! Returns the whole map as a mapping.    *!    *! @[map] is the YP-map to search in. This must be the full map name,    *! you have to use @tt{passwd.byname@} instead of just @tt{passwd@}.    */   static void f_all(INT32 args)
pike.git/src/modules/Yp/yp.c:209:    push_string(make_shared_binary_string(retkey, retkeylen));    push_string(make_shared_binary_string(retval, retlen));    apply_svalue( f, 2 );       err = yp_next(this->domain, map, retkey, retkeylen,    &retkey, &retkeylen, &retval, &retlen);    } while(!err);       if(err != YPERR_NOMORE)    YPERROR( err ); -  -  pop_n_elems(args); +    }      /*! @decl int order(string map)    *!    *! Returns the 'order' number for the map @[map].    *!    *! This is usually the number of seconds since Jan 1 1970 (see @[time()]).    *! When the map is changed, this number will change as well.    *!    *! @[map] is the YP-map to search in. This must be the full map name.
pike.git/src/modules/Yp/yp.c:274:    push_undefined();    return;    }       YPERROR( err );       pop_n_elems( args );    push_string(make_shared_binary_string( retval, retlen ));   }    - static void init_yp_struct( struct object *o ) + static void init_yp_struct( struct object *UNUSED(o) )   {    this->domain = 0;    this->last_size = 0;   }    - static void exit_yp_struct( struct object *o ) + static void exit_yp_struct( struct object *UNUSED(o) )   {    if(this->domain)    {    yp_unbind( this->domain );    free(this->domain);    }   }      /*! @endclass    */