Lines Matching refs:res

34   	struct passwd* res;  in getpwnam_r()  local
38 if ( (res = getpwnam(name)) ) in getpwnam_r()
42 nname= strlen(res->pw_name)+1; in getpwnam_r()
43 npasswd= strlen(res->pw_passwd)+1; in getpwnam_r()
44 nclass= strlen(res->pw_class)+1; in getpwnam_r()
45 ngecos= strlen(res->pw_gecos)+1; in getpwnam_r()
46 ndir= strlen(res->pw_dir)+1; in getpwnam_r()
49 +ndir+strlen(res->pw_shell) < size) in getpwnam_r()
51 memcpy(s, res, sizeof(struct passwd)); in getpwnam_r()
53 strcpy(buffer, res->pw_name); in getpwnam_r()
57 strcpy(buffer, res->pw_passwd); in getpwnam_r()
61 strcpy(buffer, res->pw_class); in getpwnam_r()
65 strcpy(buffer, res->pw_gecos); in getpwnam_r()
69 strcpy(buffer, res->pw_dir); in getpwnam_r()
73 strcpy(buffer, res->pw_shell); in getpwnam_r()
76 res = s; in getpwnam_r()
79 res = 0; in getpwnam_r()
84 return(res); in getpwnam_r()
90 struct passwd* res; in getpwuid_r() local
95 if ( (res = getpwuid(uid)) ) in getpwuid_r()
99 pw_name = strlen(res->pw_name)+1; in getpwuid_r()
100 pw_passwd = strlen(res->pw_passwd)+1; in getpwuid_r()
101 pw_class = strlen(res->pw_class)+1; in getpwuid_r()
102 pw_gecos = strlen(res->pw_gecos)+1; in getpwuid_r()
103 pw_dir = strlen(res->pw_dir)+1; in getpwuid_r()
104 pw_shell = strlen(res->pw_shell)+1; in getpwuid_r()
109 memcpy(pwd, res, sizeof(struct passwd)); in getpwuid_r()
111 strncpy(buffer, res->pw_name, pw_name); in getpwuid_r()
115 strncpy(buffer, res->pw_passwd, pw_passwd); in getpwuid_r()
119 strncpy(buffer, res->pw_class, pw_class); in getpwuid_r()
123 strncpy(buffer, res->pw_gecos, pw_gecos); in getpwuid_r()
127 strncpy(buffer, res->pw_dir, pw_dir); in getpwuid_r()
131 strncpy(buffer, res->pw_shell, pw_shell); in getpwuid_r()
152 struct tm* res; in localtime_r() local
156 if ( (res = localtime(timep))) in localtime_r()
158 memcpy(buffer, res, sizeof(struct tm)); in localtime_r()
159 res = buffer; in localtime_r()
164 return res; in localtime_r()
169 struct tm* res; in gmtime_r() local
173 if ( (res = gmtime(timep)) ) in gmtime_r()
175 memcpy(buffer, res, sizeof(struct tm)); in gmtime_r()
176 res = buffer; in gmtime_r()
181 return res; in gmtime_r()
192 struct spwd* res; in getspnam_r() local
196 if ( res = getspnam(name) ) in getspnam_r()
200 nnamp = strlen(res->sp_namp)+1; in getspnam_r()
202 if (nnamp+strlen(res->sp_pwdp) < size) { in getspnam_r()
203 memcpy(s, res, sizeof(struct spwd)); in getspnam_r()
205 strcpy(buffer, res->sp_namp); in getspnam_r()
209 strcpy(buffer, res->sp_pwdp); in getspnam_r()
212 res = s; in getspnam_r()
215 res = 0; in getspnam_r()
220 return res; in getspnam_r()
225 struct passwd* res; in getpwnam_r() local
229 if ( res = getpwnam(name) ) in getpwnam_r()
234 nname= strlen(res->pw_name)+1; in getpwnam_r()
235 npasswd= strlen(res->pw_passwd)+1; in getpwnam_r()
236 nage= strlen(res->pw_age)+1; in getpwnam_r()
237 ncomment= strlen(res->pw_comment)+1; in getpwnam_r()
238 ngecos= strlen(res->pw_gecos)+1; in getpwnam_r()
239 ndir= strlen(res->pw_dir)+1; in getpwnam_r()
242 +strlen(res->pw_shell) < size) in getpwnam_r()
244 memcpy(s, res, sizeof(struct passwd)); in getpwnam_r()
246 strcpy(buffer, res->pw_name); in getpwnam_r()
250 strcpy(buffer, res->pw_passwd); in getpwnam_r()
254 strcpy(buffer, res->pw_age); in getpwnam_r()
258 strcpy(buffer, res->pw_comment); in getpwnam_r()
262 strcpy(buffer, res->pw_gecos); in getpwnam_r()
266 strcpy(buffer, res->pw_dir); in getpwnam_r()
270 strcpy(buffer, res->pw_shell); in getpwnam_r()
273 res = s; in getpwnam_r()
276 res = 0; in getpwnam_r()
281 return res; in getpwnam_r()
300 struct hostent* res; in gethostbyname_r() local
304 if ( (res = gethostbyname(name)) ) in gethostbyname_r()
315 nname= strlen(res->h_name)+1; in gethostbyname_r()
319 for ( p = res->h_aliases; *p != NULL; p++) { in gethostbyname_r()
324 for ( p = res->h_addr_list; *p != NULL; p++) in gethostbyname_r()
329 + (naddr_list+1)*sizeof(char*) + naddr_list*res->h_length in gethostbyname_r()
332 memcpy(result, res, sizeof(struct hostent)); in gethostbyname_r()
334 strcpy(buffer, res->h_name); in gethostbyname_r()
341 for ( p = res->h_aliases; *p != NULL; p++) { in gethostbyname_r()
352 for ( p = res->h_addr_list; *p != NULL; p++) { in gethostbyname_r()
354 memcpy(data, *p, res->h_length); in gethostbyname_r()
355 data += res->h_length; in gethostbyname_r()
359 res = result; in gethostbyname_r()
364 res = NULL; in gethostbyname_r()
374 return res; in gethostbyname_r()