From 0bda29964ce6fbced68f2110c01699cbc7b68cc9 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 5 Sep 2022 03:24:11 +0200 Subject: gethostbyname.3: Move non-deprecated functions to the top Signed-off-by: Alejandro Colomar --- man3/gethostbyname.3 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3 index 75d624c3f..45446e7cd 100644 --- a/man3/gethostbyname.3 +++ b/man3/gethostbyname.3 @@ -30,15 +30,15 @@ Standard C library .nf .B #include .PP +.BI "void sethostent(int " stayopen ); +.B void endhostent(void); +.PP .B [[deprecated]] extern int h_errno; .PP .BI "[[deprecated]] struct hostent *gethostbyname(const char *" name ); .BI "[[deprecated]] struct hostent *gethostbyaddr(const void *" addr , .BI " socklen_t " len ", int " type ); .PP -.BI "void sethostent(int " stayopen ); -.B void endhostent(void); -.PP .BI "[[deprecated]] void herror(const char *" s ); .BI "[[deprecated]] const char *hstrerror(int " err ); .PP @@ -128,6 +128,18 @@ and instead. .PP The +.BR sethostent () +function specifies, if \fIstayopen\fP is true (1), +that a connected TCP socket should be used for the name server queries and +that the connection should remain open during successive queries. +Otherwise, name server queries will use UDP datagrams. +.PP +The +.BR endhostent () +function ends the use of a TCP connection for name +server queries. +.PP +The .BR gethostbyname () function returns a structure of type .I hostent @@ -184,18 +196,6 @@ obtained via a call to for address type .BR AF_INET . .PP -The -.BR sethostent () -function specifies, if \fIstayopen\fP is true (1), -that a connected TCP socket should be used for the name server queries and -that the connection should remain open during successive queries. -Otherwise, name server queries will use UDP datagrams. -.PP -The -.BR endhostent () -function ends the use of a TCP connection for name -server queries. -.PP The (obsolete) .BR herror () function prints the error message associated -- cgit v1.2.3