| 514 | |
| 515 | |
| 516 | bool_t xdr_int(xdr_t* xdrs, int* ip) |
| 517 | { |
| 518 | /************************************** |
| 519 | * |
| 520 | * x d r _ i n t |
| 521 | * |
| 522 | ************************************** |
| 523 | * |
| 524 | * Functional description |
| 525 | * Map from external to internal representation (or vice versa). |
| 526 | * |
| 527 | **************************************/ |
| 528 | SLONG temp; |
| 529 | |
| 530 | switch (xdrs->x_op) |
| 531 | { |
| 532 | case XDR_ENCODE: |
| 533 | temp = *ip; |
| 534 | return PUTLONG(xdrs, &temp); |
| 535 | |
| 536 | case XDR_DECODE: |
| 537 | if (!GETLONG(xdrs, &temp)) |
| 538 | return FALSE; |
| 539 | *ip = (int) temp; |
| 540 | return TRUE; |
| 541 | |
| 542 | case XDR_FREE: |
| 543 | return TRUE; |
| 544 | } |
| 545 | |
| 546 | return FALSE; |
| 547 | } |
| 548 | |
| 549 | |
| 550 | bool_t xdr_long(xdr_t* xdrs, SLONG* ip) |