]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/Extras/libg/gtpswd.c
Replaced use of snprintf() with memcpy()/memmove().
[nmh] / docs / historical / mh-jun-1982 / Extras / libg / gtpswd.c
1 #ifdef COMMENT
2 Proprietary Rand Corporation, 1981.
3 Further distribution of this software
4 subject to the terms of the Rand
5 license agreement.
6 #endif
7
8 #include "libg.h"
9
10 char *getpswd(uid)
11 {
12 static char pswd[9];
13 register char *bp, *np;
14
15 bp = u_buf; np = pswd;
16
17 if (getubuf(uid) <= 0) return(NULSTR);
18 while(*bp++ != ':');
19 --bp;
20 while((*np++ = *bp++) != ':');
21 *--np = '\0';
22 return(pswd);
23 }