diff options
author | aaron <> | 2000-12-24 00:31:00 +0000 |
---|---|---|
committer | aaron <> | 2000-12-24 00:31:00 +0000 |
commit | b11608439e707f8c7601b090028e530ea5a1e067 (patch) | |
tree | 966934b4f9368fd14deca5be22b83ff9fb439cbd /src/lib/libc/net/getprotoent.3 | |
parent | 71213d0b131a3545184a31aa671f269eceacad1e (diff) | |
download | openbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.gz openbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.bz2 openbsd-b11608439e707f8c7601b090028e530ea5a1e067.zip |
Various repairs, mostly to get rid of short lines.
Diffstat (limited to 'src/lib/libc/net/getprotoent.3')
-rw-r--r-- | src/lib/libc/net/getprotoent.3 | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/src/lib/libc/net/getprotoent.3 b/src/lib/libc/net/getprotoent.3 index 4d1e96e615..1f95529532 100644 --- a/src/lib/libc/net/getprotoent.3 +++ b/src/lib/libc/net/getprotoent.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getprotoent.3,v 1.7 2000/12/17 21:30:38 millert Exp $ | 1 | .\" $OpenBSD: getprotoent.3,v 1.8 2000/12/24 00:30:56 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 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,11 +59,8 @@ The | |||
59 | .Fn getprotobyname , | 59 | .Fn getprotobyname , |
60 | and | 60 | and |
61 | .Fn getprotobynumber | 61 | .Fn getprotobynumber |
62 | functions | 62 | functions each return a pointer to an object with the following structure |
63 | each return a pointer to an object with the | 63 | containing the broken-out fields of a line in the network protocol database, |
64 | following structure | ||
65 | containing the broken-out | ||
66 | fields of a line in the network protocol database, | ||
67 | .Pa /etc/protocols . | 64 | .Pa /etc/protocols . |
68 | .Bd -literal -offset indent | 65 | .Bd -literal -offset indent |
69 | .Pp | 66 | .Pp |
@@ -86,13 +83,11 @@ The protocol number. | |||
86 | .Pp | 83 | .Pp |
87 | The | 84 | The |
88 | .Fn getprotoent | 85 | .Fn getprotoent |
89 | function | 86 | function reads the next line of the file, opening the file if necessary. |
90 | reads the next line of the file, opening the file if necessary. | ||
91 | .Pp | 87 | .Pp |
92 | The | 88 | The |
93 | .Fn setprotoent | 89 | .Fn setprotoent |
94 | function | 90 | function opens and rewinds the file. |
95 | opens and rewinds the file. | ||
96 | If the | 91 | If the |
97 | .Fa stayopen | 92 | .Fa stayopen |
98 | flag is non-zero, | 93 | flag is non-zero, |
@@ -103,24 +98,18 @@ or | |||
103 | .Pp | 98 | .Pp |
104 | The | 99 | The |
105 | .Fn endprotoent | 100 | .Fn endprotoent |
106 | function | 101 | function closes the file. |
107 | closes the file. | ||
108 | .Pp | 102 | .Pp |
109 | The | 103 | The |
110 | .Fn getprotobyname | 104 | .Fn getprotobyname |
111 | function | ||
112 | and | 105 | and |
113 | .Fn getprotobynumber | 106 | .Fn getprotobynumber |
114 | sequentially search from the beginning | 107 | functions sequentially search from the beginning of the file until a |
115 | of the file until a matching | 108 | matching protocol name or protocol number is found, or until |
116 | protocol name or | ||
117 | protocol number is found, | ||
118 | or until | ||
119 | .Dv EOF | 109 | .Dv EOF |
120 | is encountered. | 110 | is encountered. |
121 | .Sh RETURN VALUES | 111 | .Sh RETURN VALUES |
122 | Null pointer | 112 | Null pointer (0) returned on |
123 | (0) returned on | ||
124 | .Dv EOF | 113 | .Dv EOF |
125 | or error. | 114 | or error. |
126 | .Sh FILES | 115 | .Sh FILES |
@@ -140,7 +129,6 @@ and | |||
140 | functions appeared in | 129 | functions appeared in |
141 | .Bx 4.2 . | 130 | .Bx 4.2 . |
142 | .Sh BUGS | 131 | .Sh BUGS |
143 | These functions use a static data space; | 132 | These functions use a static data space; if the data is needed for future use, |
144 | if the data is needed for future use, it should be | 133 | it should be copied before any subsequent calls overwrite it. |
145 | copied before any subsequent calls overwrite it. | ||
146 | Only the Internet protocols are currently understood. | 134 | Only the Internet protocols are currently understood. |