diff options
| author | michaels <> | 1997-04-26 22:06:38 +0000 |
|---|---|---|
| committer | michaels <> | 1997-04-26 22:06:38 +0000 |
| commit | 3ed6f97e942070f748a4f17699e4c41bede4afea (patch) | |
| tree | aacde1ad6b4e099e697f3f7229e9d9484c00e056 /src/lib/libc | |
| parent | b137f55f90d3eda4dc92d31bcdb432168e5c3510 (diff) | |
| download | openbsd-3ed6f97e942070f748a4f17699e4c41bede4afea.tar.gz openbsd-3ed6f97e942070f748a4f17699e4c41bede4afea.tar.bz2 openbsd-3ed6f97e942070f748a4f17699e4c41bede4afea.zip | |
correct declaration given for herror(3) and describe better.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/gethostbyname.3 | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3 index 1394fa3467..9df758af23 100644 --- a/src/lib/libc/net/gethostbyname.3 +++ b/src/lib/libc/net/gethostbyname.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: gethostbyname.3,v 1.4 1997/03/13 19:07:23 downsj Exp $ | 1 | .\" $OpenBSD: gethostbyname.3,v 1.5 1997/04/26 22:06:38 michaels Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
| 4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
| @@ -59,7 +59,7 @@ | |||
| 59 | .Ft void | 59 | .Ft void |
| 60 | .Fn endhostent void | 60 | .Fn endhostent void |
| 61 | .Ft void | 61 | .Ft void |
| 62 | .Fn herror "char *string" | 62 | .Fn herror "const char *string" |
| 63 | .Sh DESCRIPTION | 63 | .Sh DESCRIPTION |
| 64 | The | 64 | The |
| 65 | .Fn gethostbyname | 65 | .Fn gethostbyname |
| @@ -153,6 +153,19 @@ function | |||
| 153 | closes the | 153 | closes the |
| 154 | .Tn TCP | 154 | .Tn TCP |
| 155 | connection. | 155 | connection. |
| 156 | .Pp | ||
| 157 | The | ||
| 158 | .Fn herror | ||
| 159 | function prints an error message describing the failure. If it's argument | ||
| 160 | .Fa string | ||
| 161 | is | ||
| 162 | .Pf non Dv -NULL , | ||
| 163 | it is prepended to the message string and seperated from it by a colon | ||
| 164 | and a space. The error message is printed with a trailing newline. | ||
| 165 | The contents of the error message is the same as that returned by | ||
| 166 | .Fn hstrerror | ||
| 167 | with arrgument | ||
| 168 | .Fa h_errno . | ||
| 156 | .Sh FILES | 169 | .Sh FILES |
| 157 | .Bl -tag -width /etc/hosts -compact | 170 | .Bl -tag -width /etc/hosts -compact |
| 158 | .It Pa /etc/hosts | 171 | .It Pa /etc/hosts |
| @@ -168,15 +181,6 @@ The external integer | |||
| 168 | .Va h_errno | 181 | .Va h_errno |
| 169 | may then be checked to see whether this is a temporary failure | 182 | may then be checked to see whether this is a temporary failure |
| 170 | or an invalid or unknown host. | 183 | or an invalid or unknown host. |
| 171 | The routine | ||
| 172 | .Fn herror | ||
| 173 | can be used to print an error message describing the failure. | ||
| 174 | If its argument | ||
| 175 | .Fa string | ||
| 176 | is | ||
| 177 | .Pf non Dv -NULL , | ||
| 178 | it is printed, followed by a colon and a space. | ||
| 179 | The error message is printed with a trailing newline. | ||
| 180 | .Pp | 184 | .Pp |
| 181 | The variable | 185 | The variable |
| 182 | .Va h_errno | 186 | .Va h_errno |
