Lines Matching refs:hostf
1477 static void _sethtent(FILE** hostf) { in _sethtent() argument
1478 if (!*hostf) in _sethtent()
1479 *hostf = fopen(_PATH_HOSTS, "re"); in _sethtent()
1481 rewind(*hostf); in _sethtent()
1484 static void _endhtent(FILE** hostf) { in _endhtent() argument
1485 if (*hostf) { in _endhtent()
1486 (void) fclose(*hostf); in _endhtent()
1487 *hostf = NULL; in _endhtent()
1491 static struct addrinfo* _gethtent(FILE** hostf, const char* name, const struct addrinfo* pai) { in _gethtent() argument
1502 if (!*hostf && !(*hostf = fopen(_PATH_HOSTS, "re"))) return (NULL); in _gethtent()
1504 if (!(p = fgets(hostbuf, sizeof hostbuf, *hostf))) return (NULL); in _gethtent()
1545 FILE* hostf = NULL; in files_getaddrinfo() local
1549 _sethtent(&hostf); in files_getaddrinfo()
1550 while ((p = _gethtent(&hostf, name, pai)) != NULL) { in files_getaddrinfo()
1554 _endhtent(&hostf); in files_getaddrinfo()