Lines Matching defs:pvt

87 struct pvt {
123 struct pvt *pvt;
127 if (!(pvt = memget(sizeof *pvt))) {
131 memset(pvt, 0, sizeof *pvt);
133 memput(pvt, sizeof *pvt);
138 nw->private = pvt;
154 struct pvt *pvt = (struct pvt *)this->private;
157 if (pvt->res && pvt->free_res)
158 (*pvt->free_res)(pvt->res);
159 if (pvt->fp)
160 (void)fclose(pvt->fp);
161 memput(pvt, sizeof *pvt);
204 struct pvt *pvt = (struct pvt *)this->private;
206 if (pvt->fp) {
207 if (fseek(pvt->fp, 0L, SEEK_SET) == 0)
209 (void)fclose(pvt->fp);
211 if (!(pvt->fp = fopen(_PATH_NETWORKS, "r")))
213 if (fcntl(fileno(pvt->fp), F_SETFD, 1) < 0) {
214 (void)fclose(pvt->fp);
215 pvt->fp = NULL;
221 struct pvt *pvt = (struct pvt *)this->private;
230 if (pvt->fp == NULL)
232 if (pvt->fp == NULL) {
233 RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
236 bufp = pvt->line;
237 bufsiz = sizeof(pvt->line);
240 p = fgets(bufp + offset, bufsiz - offset, pvt->fp);
243 if (!strchr(p, '\n') && !feof(pvt->fp)) {
258 while ((c = getc(pvt->fp)) != EOF)
262 ungetc(c, pvt->fp);
276 pvt->net.n_name = p;
286 pvt->net.n_length = inet_net_pton(AF_INET, cp, pvt->addr,
287 sizeof pvt->addr);
288 if (pvt->net.n_length < 0)
290 pvt->net.n_addrtype = AF_INET;
291 pvt->net.n_addr = pvt->addr;
292 q = pvt->net.n_aliases = pvt->aliases;
300 if (q < &pvt->aliases[MAXALIASES - 1])
308 ret = &pvt->net;
319 struct pvt *pvt = (struct pvt *)this->private;
321 if (pvt->res)
322 res_nclose(pvt->res);
323 if (pvt->fp != NULL) {
324 (void)fclose(pvt->fp);
325 pvt->fp = NULL;
331 struct pvt *pvt = (struct pvt *)this->private;
333 if (!pvt->res) {
344 return (pvt->res);
350 struct pvt *pvt = (struct pvt *)this->private;
352 if (pvt->res && pvt->free_res) {
353 res_nclose(pvt->res);
354 (*pvt->free_res)(pvt->res);
357 pvt->res = res;
358 pvt->free_res = free_res;
363 struct pvt *pvt = (struct pvt *)this->private;
365 if (!pvt->res && !nw_res_get(this))
367 if (((pvt->res->options & RES_INIT) == 0U) &&
368 res_ninit(pvt->res) == -1)