print-sunrpc.c (26183) | print-sunrpc.c (39300) |
---|---|
1/* 2 * Copyright (c) 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 7 unchanged lines hidden (view full) --- 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ 21 22#ifndef lint 23static const char rcsid[] = | 1/* 2 * Copyright (c) 1992, 1993, 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 7 unchanged lines hidden (view full) --- 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ 21 22#ifndef lint 23static const char rcsid[] = |
24 "@(#) $Header: print-sunrpc.c,v 1.25 96/09/26 23:36:49 leres Exp $ (LBL)"; | 24 "@(#) $Header: print-sunrpc.c,v 1.26 96/12/31 21:27:43 leres Exp $ (LBL)"; |
25#endif 26 27#include <sys/param.h> 28#include <sys/time.h> 29#include <sys/socket.h> 30 31#if __STDC__ 32struct mbuf; --- 81 unchanged lines hidden (view full) --- 114} 115 116static char * 117progstr(prog) 118 u_int32_t prog; 119{ 120 register struct rpcent *rp; 121 static char buf[32]; | 25#endif 26 27#include <sys/param.h> 28#include <sys/time.h> 29#include <sys/socket.h> 30 31#if __STDC__ 32struct mbuf; --- 81 unchanged lines hidden (view full) --- 114} 115 116static char * 117progstr(prog) 118 u_int32_t prog; 119{ 120 register struct rpcent *rp; 121 static char buf[32]; |
122 static lastprog = 0; | 122 static int lastprog = 0; |
123 124 if (lastprog != 0 && prog == lastprog) 125 return (buf); 126 rp = getrpcbynumber(prog); 127 if (rp == NULL) 128 (void) sprintf(buf, "#%u", prog); 129 else 130 strcpy(buf, rp->r_name); 131 return (buf); 132} | 123 124 if (lastprog != 0 && prog == lastprog) 125 return (buf); 126 rp = getrpcbynumber(prog); 127 if (rp == NULL) 128 (void) sprintf(buf, "#%u", prog); 129 else 130 strcpy(buf, rp->r_name); 131 return (buf); 132} |