diff options
author | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
commit | fa40f30b4253b1e05c46cc5e0c111176825b7623 (patch) | |
tree | 76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/dietlibc/librpc/xdr_stdio.c | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.gz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.bz2 drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.xz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.zip |
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/dietlibc/librpc/xdr_stdio.c')
-rw-r--r-- | mdk-stage1/dietlibc/librpc/xdr_stdio.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mdk-stage1/dietlibc/librpc/xdr_stdio.c b/mdk-stage1/dietlibc/librpc/xdr_stdio.c index e3190e0a9..405cc6a69 100644 --- a/mdk-stage1/dietlibc/librpc/xdr_stdio.c +++ b/mdk-stage1/dietlibc/librpc/xdr_stdio.c @@ -51,7 +51,7 @@ static bool_t xdrstdio_getlong(); static bool_t xdrstdio_putlong(); static bool_t xdrstdio_getbytes(); static bool_t xdrstdio_putbytes(); -static u_int xdrstdio_getpos(); +static unsigned int xdrstdio_getpos(); static bool_t xdrstdio_setpos(); static int32_t *xdrstdio_inline(); static void xdrstdio_destroy(); @@ -70,6 +70,7 @@ static struct xdr_ops xdrstdio_ops = { xdrstdio_destroy /* destroy stream */ }; + /* * Initialize a stdio xdr stream. * Sets the xdr stream handle xdrs for use on the stream file. @@ -83,7 +84,7 @@ enum xdr_op op; xdrs->x_op = op; xdrs->x_ops = &xdrstdio_ops; - xdrs->x_private = (caddr_t) file; + xdrs->x_private = (char*) file; xdrs->x_handy = 0; xdrs->x_base = 0; } @@ -104,7 +105,7 @@ XDR *xdrs; register long *lp; { - if (fread((caddr_t) lp, sizeof(long), 1, (FILE *) xdrs->x_private) != + if (fread((char*) lp, sizeof(long), 1, (FILE *) xdrs->x_private) != 1) return (FALSE); #ifndef mc68000 @@ -123,7 +124,7 @@ long *lp; lp = &mycopy; #endif - if (fwrite((caddr_t) lp, sizeof(long), 1, (FILE *) xdrs->x_private) != + if (fwrite((char*) lp, sizeof(long), 1, (FILE *) xdrs->x_private) != 1) return (FALSE); return (TRUE); @@ -131,8 +132,8 @@ long *lp; static bool_t xdrstdio_getbytes(xdrs, addr, len) XDR *xdrs; -caddr_t addr; -u_int len; +char* addr; +unsigned int len; { if ((len != 0) @@ -143,8 +144,8 @@ u_int len; static bool_t xdrstdio_putbytes(xdrs, addr, len) XDR *xdrs; -caddr_t addr; -u_int len; +char* addr; +unsigned int len; { if ((len != 0) @@ -153,25 +154,23 @@ u_int len; return (TRUE); } -static u_int xdrstdio_getpos(xdrs) +static unsigned int xdrstdio_getpos(xdrs) XDR *xdrs; { - return ((u_int) ftell((FILE *) xdrs->x_private)); + return ((unsigned int) ftell((FILE *) xdrs->x_private)); } static bool_t xdrstdio_setpos(xdrs, pos) XDR *xdrs; -u_int pos; +unsigned int pos; { return ((fseek((FILE *) xdrs->x_private, (long) pos, 0) < 0) ? FALSE : TRUE); } -static int32_t *xdrstdio_inline(xdrs, len) -XDR *xdrs; -u_int len; +static int32_t *xdrstdio_inline(XDR* xdrs, unsigned int len) { /* @@ -185,3 +184,4 @@ u_int len; */ return (NULL); } + |