Deleted Added
full compact
rpc_cout.c (27935) rpc_cout.c (48566)
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *

--- 20 unchanged lines hidden (view full) ---

29
30#ident "@(#)rpc_cout.c 1.14 93/07/05 SMI"
31
32#ifndef lint
33#if 0
34static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
35#endif
36static const char rcsid[] =
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *

--- 20 unchanged lines hidden (view full) ---

29
30#ident "@(#)rpc_cout.c 1.14 93/07/05 SMI"
31
32#ifndef lint
33#if 0
34static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
35#endif
36static const char rcsid[] =
37 "$Id$";
37 "$Id: rpc_cout.c,v 1.5 1997/08/06 06:47:39 charnier Exp $";
38#endif
39
40/*
41 * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
42 * Copyright (C) 1987, Sun Microsystems, Inc.
43 */
44#include <err.h>
45#include <ctype.h>

--- 415 unchanged lines hidden (view full) ---

461 warnx("fatal error: no memory");
462 crash();
463 };
464 sizestr = strcat(sizestr, ptemp);
465 /* build up length of array */
466 }
467 }
468 } else {
38#endif
39
40/*
41 * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
42 * Copyright (C) 1987, Sun Microsystems, Inc.
43 */
44#include <err.h>
45#include <ctype.h>

--- 415 unchanged lines hidden (view full) ---

461 warnx("fatal error: no memory");
462 crash();
463 };
464 sizestr = strcat(sizestr, ptemp);
465 /* build up length of array */
466 }
467 }
468 } else {
469 if (i > 0)
469 if (i > 0) {
470 if (sizestr == NULL && size < inline){
471 /*
472 * don't expand into inline code
473 * if size < inline
474 */
475 while (cur != dl){
476 print_stat(indent + 1, &cur->decl);
477 cur = cur->next;
478 }
479 } else {
480 /* were already looking at a xdr_inlineable structure */
481 tabify(fout, indent + 1);
482 if (sizestr == NULL)
483 f_print(fout, "buf = XDR_INLINE(xdrs, %d * BYTES_PER_XDR_UNIT);",
484 size);
470 if (sizestr == NULL && size < inline){
471 /*
472 * don't expand into inline code
473 * if size < inline
474 */
475 while (cur != dl){
476 print_stat(indent + 1, &cur->decl);
477 cur = cur->next;
478 }
479 } else {
480 /* were already looking at a xdr_inlineable structure */
481 tabify(fout, indent + 1);
482 if (sizestr == NULL)
483 f_print(fout, "buf = XDR_INLINE(xdrs, %d * BYTES_PER_XDR_UNIT);",
484 size);
485 else
485 else {
486 if (size == 0)
487 f_print(fout,
488 "buf = XDR_INLINE(xdrs, (%s) * BYTES_PER_XDR_UNIT);",
489 sizestr);
490 else
491 f_print(fout,
492 "buf = XDR_INLINE(xdrs, (%d + (%s)) * BYTES_PER_XDR_UNIT);",
493 size, sizestr);
494
486 if (size == 0)
487 f_print(fout,
488 "buf = XDR_INLINE(xdrs, (%s) * BYTES_PER_XDR_UNIT);",
489 sizestr);
490 else
491 f_print(fout,
492 "buf = XDR_INLINE(xdrs, (%d + (%s)) * BYTES_PER_XDR_UNIT);",
493 size, sizestr);
494
495 }
495 f_print(fout, "\n");
496 tabify(fout, indent + 1);
497 f_print(fout,
498 "if (buf == NULL) {\n");
499
500 psav = cur;
501 while (cur != dl){
502 print_stat(indent + 2, &cur->decl);

--- 6 unchanged lines hidden (view full) ---

509 while (cur != dl){
510 emit_inline(indent + 2, &cur->decl, flag);
511 cur = cur->next;
512 }
513
514 tabify(fout, indent + 1);
515 f_print(fout, "}\n");
516 }
496 f_print(fout, "\n");
497 tabify(fout, indent + 1);
498 f_print(fout,
499 "if (buf == NULL) {\n");
500
501 psav = cur;
502 while (cur != dl){
503 print_stat(indent + 2, &cur->decl);

--- 6 unchanged lines hidden (view full) ---

510 while (cur != dl){
511 emit_inline(indent + 2, &cur->decl, flag);
512 cur = cur->next;
513 }
514
515 tabify(fout, indent + 1);
516 f_print(fout, "}\n");
517 }
518 }
517 size = 0;
518 i = 0;
519 sizestr = NULL;
520 print_stat(indent + 1, &dl->decl);
521 }
522 }
523
524 if (i > 0)

--- 235 unchanged lines hidden ---
519 size = 0;
520 i = 0;
521 sizestr = NULL;
522 print_stat(indent + 1, &dl->decl);
523 }
524 }
525
526 if (i > 0)

--- 235 unchanged lines hidden ---