Lines Matching refs:hostf
1473 static void _sethtent(FILE** hostf) { in _sethtent() argument
1474 if (!*hostf) in _sethtent()
1475 *hostf = fopen(_PATH_HOSTS, "re"); in _sethtent()
1477 rewind(*hostf); in _sethtent()
1480 static void _endhtent(FILE** hostf) { in _endhtent() argument
1481 if (*hostf) { in _endhtent()
1482 (void) fclose(*hostf); in _endhtent()
1483 *hostf = NULL; in _endhtent()
1487 static struct addrinfo* _gethtent(FILE** hostf, const char* name, const struct addrinfo* pai) { in _gethtent() argument
1498 if (!*hostf && !(*hostf = fopen(_PATH_HOSTS, "re"))) return (NULL); in _gethtent()
1500 if (!(p = fgets(hostbuf, sizeof hostbuf, *hostf))) return (NULL); in _gethtent()
1559 FILE* hostf = nullptr; in files_getaddrinfo() local
1562 _sethtent(&hostf); in files_getaddrinfo()
1563 while ((p = _gethtent(&hostf, name, pai)) != nullptr) { in files_getaddrinfo()
1567 _endhtent(&hostf); in files_getaddrinfo()