| Line 1... |
Line 1... |
| 1 |
/*********************************************************************
|
1 |
/*********************************************************************
|
| 2 |
* RPC for the Windows NT Operating System
|
2 |
* RPC for the Windows NT Operating System
|
| 3 |
* 1993 by Martin F. Gergeleit
|
3 |
* 1993 by Martin F. Gergeleit
|
| 4 |
* Users may use, copy or modify Sun RPC for the Windows NT Operating
|
4 |
* Users may use, copy or modify RPC for the Windows NT Operating
|
| 5 |
* System according to the Sun copyright below.
|
5 |
* System according to the Oracle copyright below.
|
| 6 |
*
|
6 |
*
|
| 7 |
* RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO
|
7 |
* RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO
|
| 8 |
* WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE
|
8 |
* WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE
|
| 9 |
* USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
|
9 |
* USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
|
| 10 |
*********************************************************************/
|
10 |
*********************************************************************/
|
| 11 |
|
11 |
|
| 12 |
/* @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC */
|
12 |
/* @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC */
|
| 13 |
/*
|
13 |
/*
|
| 14 |
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
- |
|
| 15 |
* unrestricted use provided that this legend is included on all tape
|
- |
|
| 16 |
* media and as a part of the software program in whole or part. Users
|
- |
|
| 17 |
* may copy or modify Sun RPC without charge, but are not authorized
|
- |
|
| 18 |
* to license or distribute it to anyone else except as part of a product or
|
- |
|
| 19 |
* program developed by the user.
|
- |
|
| 20 |
*
|
- |
|
| 21 |
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
- |
|
| 22 |
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
- |
|
| 23 |
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
- |
|
| 24 |
*
|
- |
|
| 25 |
* Sun RPC is provided with no support and without any obligation on the
|
- |
|
| 26 |
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
- |
|
| 27 |
* modification or enhancement.
|
- |
|
| 28 |
*
|
- |
|
| 29 |
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
- |
|
| 30 |
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
- |
|
| 31 |
* OR ANY PART THEREOF.
|
- |
|
| 32 |
*
|
- |
|
| 33 |
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
- |
|
| 34 |
* or profits or other special, indirect and consequential damages, even if
|
- |
|
| 35 |
* Sun has been advised of the possibility of such damages.
|
- |
|
| 36 |
*
|
- |
|
| 37 |
* Sun Microsystems, Inc.
|
- |
|
| 38 |
* 2550 Garcia Avenue
|
- |
|
| 39 |
* Mountain View, California 94043
|
- |
|
| 40 |
*/
|
- |
|
| 41 |
#if !defined(lint) && defined(SCCSIDS)
|
- |
|
| 42 |
static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
|
- |
|
| 43 |
#endif
|
- |
|
| 44 |
|
- |
|
| 45 |
/*
|
- |
|
| 46 |
* xdr.c, Generic XDR routines implementation.
|
14 |
* xdr.c, Generic XDR routines implementation.
|
| 47 |
*
|
15 |
*
|
| 48 |
* Copyright (C) 1986, Sun Microsystems, Inc.
|
16 |
* Copyright (c) 2010, Oracle America, Inc.
|
| - |
|
17 |
*
|
| - |
|
18 |
* Redistribution and use in source and binary forms, with or without
|
| - |
|
19 |
* modification, are permitted provided that the following conditions are
|
| - |
|
20 |
* met:
|
| - |
|
21 |
*
|
| - |
|
22 |
* * Redistributions of source code must retain the above copyright
|
| - |
|
23 |
* notice, this list of conditions and the following disclaimer.
|
| - |
|
24 |
* * Redistributions in binary form must reproduce the above
|
| - |
|
25 |
* copyright notice, this list of conditions and the following
|
| - |
|
26 |
* disclaimer in the documentation and/or other materials
|
| - |
|
27 |
* provided with the distribution.
|
| - |
|
28 |
* * Neither the name of the "Oracle America, Inc." nor the names of its
|
| - |
|
29 |
* contributors may be used to endorse or promote products derived
|
| - |
|
30 |
* from this software without specific prior written permission.
|
| - |
|
31 |
*
|
| - |
|
32 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| - |
|
33 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
| - |
|
34 |
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
| - |
|
35 |
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
| - |
|
36 |
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| - |
|
37 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
| - |
|
38 |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
| - |
|
39 |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
| - |
|
40 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
| - |
|
41 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| - |
|
42 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 49 |
*
|
43 |
*
|
| 50 |
* These are the "generic" xdr routines used to serialize and de-serialize
|
44 |
* These are the "generic" xdr routines used to serialize and de-serialize
|
| 51 |
* most common data items. See xdr.h for more info on the interface to
|
45 |
* most common data items. See xdr.h for more info on the interface to
|
| 52 |
* xdr.
|
46 |
* xdr.
|
| 53 |
*/
|
47 |
*/
|
| - |
|
48 |
#if !defined(lint) && defined(SCCSIDS)
|
| - |
|
49 |
static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
|
| - |
|
50 |
#endif
|
| 54 |
|
51 |
|
| 55 |
#include <stdlib.h>
|
52 |
#include <stdlib.h>
|
| 56 |
#include <stdio.h>
|
53 |
#include <stdio.h>
|
| 57 |
#include <string.h> /* strlen */
|
54 |
#include <string.h> /* strlen */
|
| 58 |
#include <stdint.h>
|
55 |
#include <stdint.h>
|