Lines Matching refs:hostf
1471 static void _sethtent(FILE** hostf) { in _sethtent() argument
1472 if (!*hostf) in _sethtent()
1473 *hostf = fopen(_PATH_HOSTS, "re"); in _sethtent()
1475 rewind(*hostf); in _sethtent()
1478 static void _endhtent(FILE** hostf) { in _endhtent() argument
1479 if (*hostf) { in _endhtent()
1480 (void) fclose(*hostf); in _endhtent()
1481 *hostf = NULL; in _endhtent()
1485 static struct addrinfo* _gethtent(FILE** hostf, const char* name, const struct addrinfo* pai) { in _gethtent() argument
1496 if (!*hostf && !(*hostf = fopen(_PATH_HOSTS, "re"))) return (NULL); in _gethtent()
1498 if (!(p = fgets(hostbuf, sizeof hostbuf, *hostf))) return (NULL); in _gethtent()
1557 FILE* hostf = nullptr; in files_getaddrinfo() local
1560 _sethtent(&hostf); in files_getaddrinfo()
1561 while ((p = _gethtent(&hostf, name, pai)) != nullptr) { in files_getaddrinfo()
1565 _endhtent(&hostf); in files_getaddrinfo()