Thu Apr 28 16:34:01 2011 UTC ()
Sort sections and errors.


(wiz)
diff -r1.30 -r1.31 src/lib/libc/gen/getgrent.3

cvs diff -r1.30 -r1.31 src/lib/libc/gen/getgrent.3 (expand / switch to unified diff)

--- src/lib/libc/gen/getgrent.3 2010/03/22 19:30:53 1.30
+++ src/lib/libc/gen/getgrent.3 2011/04/28 16:34:01 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: getgrent.3,v 1.30 2010/03/22 19:30:53 joerg Exp $ 1.\" $NetBSD: getgrent.3,v 1.31 2011/04/28 16:34:01 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1991, 1993 3.\" Copyright (c) 1989, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -206,74 +206,79 @@ to indicate the nature of the failure. @@ -206,74 +206,79 @@ to indicate the nature of the failure.
206.Pp 206.Pp
207The 207The
208.Fn setgroupent 208.Fn setgroupent
209function returns the value 1 if successful, otherwise the value 209function returns the value 1 if successful, otherwise the value
2100 is returned, setting the global variable 2100 is returned, setting the global variable
211.Dv errno 211.Dv errno
212to indicate the nature of the failure. 212to indicate the nature of the failure.
213.Pp 213.Pp
214The 214The
215.Fn endgrent 215.Fn endgrent
216and 216and
217.Fn setgrent 217.Fn setgrent
218functions have no return value. 218functions have no return value.
 219.Sh FILES
 220.Bl -tag -width /etc/group -compact
 221.It Pa /etc/group
 222group database file
 223.El
 224.Sh COMPATIBILITY
 225The historic function
 226.Fn setgrfile ,
 227which allowed the specification of alternative group databases, has
 228been deprecated and is no longer available.
219.Sh ERRORS 229.Sh ERRORS
220The following error codes may be set in 230The following error codes may be set in
221.Va errno  231.Va errno
222for 232for
223.Nm getgrent , 233.Nm getgrent ,
224.Nm getgrent_r , 234.Nm getgrent_r ,
225.Nm getgrnam , 235.Nm getgrnam ,
226.Nm getgrnam_r , 236.Nm getgrnam_r ,
227.Nm getgrgid , 237.Nm getgrgid ,
228.Nm getgrgid_r , 238.Nm getgrgid_r ,
229and 239and
230.Nm setgroupent : 240.Nm setgroupent :
231.Bl -tag -width Er 241.Bl -tag -width Er
232.It Bq Er EIO 
233An I/O error has occurred. 
234.It Bq Er EINTR 242.It Bq Er EINTR
235A signal was caught during the database search. 243A signal was caught during the database search.
 244.It Bq Er EIO
 245An I/O error has occurred.
236.It Bq Er EMFILE 246.It Bq Er EMFILE
237The limit on open files for this process has been reached. 247The limit on open files for this process has been reached.
238.It Bq Er ENFILE 248.It Bq Er ENFILE
239The system limit on open files has been reached. 249The system limit on open files has been reached.
240.El 250.El
241.Pp 251.Pp
242The following error code may be set in 252The following error code may be set in
243.Va errno  253.Va errno
244for 254for
245.Nm getgrent_r , 255.Nm getgrent_r ,
246.Nm getgrnam_r , 256.Nm getgrnam_r ,
247and 257and
248.Nm getgrgid_r : 258.Nm getgrgid_r :
249.Bl -tag -width Er 259.Bl -tag -width Er
250.It Bq Er ERANGE 260.It Bq Er ERANGE
251The resulting 261The resulting
252.Ft struct group 262.Ft struct group
253does not fit in the space defined by 263does not fit in the space defined by
254.Dv buffer 264.Dv buffer
255and 265and
256.Dv buflen 266.Dv buflen
257.El 267.El
258.Pp 268.Pp
259Other 269Other
260.Dv errno 270.Dv errno
261values may be set depending on the specific database backends. 271values may be set depending on the specific database backends.
262.Sh FILES 
263.Bl -tag -width /etc/group -compact 
264.It Pa /etc/group 
265group database file 
266.El 
267.Sh SEE ALSO 272.Sh SEE ALSO
268.Xr getpwent 3 , 273.Xr getpwent 3 ,
269.Xr group 5 , 274.Xr group 5 ,
270.Xr nsswitch.conf 5 275.Xr nsswitch.conf 5
271.Sh STANDARDS 276.Sh STANDARDS
272The 277The
273.Fn getgrgid 278.Fn getgrgid
274and 279and
275.Fn getgrnam 280.Fn getgrnam
276functions conform to 281functions conform to
277.St -p1003.1-90 . 282.St -p1003.1-90 .
278The 283The
279.Fn getgrgid_r 284.Fn getgrgid_r
@@ -303,31 +308,26 @@ appeared in @@ -303,31 +308,26 @@ appeared in
303.At v7 . 308.At v7 .
304The functions 309The functions
305.Fn setgrfile 310.Fn setgrfile
306and 311and
307.Fn setgroupent 312.Fn setgroupent
308appeared in 313appeared in
309.Bx 4.3 Reno . 314.Bx 4.3 Reno .
310The functions 315The functions
311.Fn getgrgid_r 316.Fn getgrgid_r
312and 317and
313.Fn getgrnam_r 318.Fn getgrnam_r
314appeared in 319appeared in
315.Nx 3.0 . 320.Nx 3.0 .
316.Sh COMPATIBILITY 
317The historic function 
318.Fn setgrfile , 
319which allowed the specification of alternative group databases, has 
320been deprecated and is no longer available. 
321.Sh BUGS 321.Sh BUGS
322The functions 322The functions
323.Fn getgrent , 323.Fn getgrent ,
324.Fn getgrgid , 324.Fn getgrgid ,
325.Fn getgrnam , 325.Fn getgrnam ,
326.Fn setgroupent 326.Fn setgroupent
327and 327and
328.Fn setgrent 328.Fn setgrent
329leave their results in an internal static object and return 329leave their results in an internal static object and return
330a pointer to that object. 330a pointer to that object.
331Subsequent calls to the same function will modify the same object. 331Subsequent calls to the same function will modify the same object.
332.Pp 332.Pp
333The functions 333The functions