123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #if 0
- static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
- #endif
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- #include <rpc/pmap_prot.h>
- libc_hidden_proto(xdr_bool)
- libc_hidden_proto(xdr_reference)
- bool_t
- xdr_pmaplist (xdrs, rp)
- XDR *xdrs;
- struct pmaplist **rp;
- {
-
- bool_t more_elements;
- int freeing = (xdrs->x_op == XDR_FREE);
- struct pmaplist **next = NULL;
- while (TRUE)
- {
- more_elements = (bool_t) (*rp != NULL);
- if (!xdr_bool (xdrs, &more_elements))
- return FALSE;
- if (!more_elements)
- return TRUE;
-
- if (freeing)
- next = &((*rp)->pml_next);
- if (!xdr_reference (xdrs, (caddr_t *) rp,
- (u_int) sizeof (struct pmaplist),
- (xdrproc_t) xdr_pmap))
- return FALSE;
- rp = freeing ? next : &((*rp)->pml_next);
- }
- }
|