version 1.11, 1999/03/08 10:35:43 |
version 1.19, 2004/04/23 14:48:07 |
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright |
.\" 2. Redistributions in binary form must reproduce the above copyright |
.\" notice, this list of conditions and the following disclaimer in the |
.\" notice, this list of conditions and the following disclaimer in the |
.\" documentation and/or other materials provided with the distribution. |
.\" documentation and/or other materials provided with the distribution. |
.\" 3. All advertising materials mentioning features or use of this software |
.\" 3. Neither the name of the University nor the names of its contributors |
.\" must display the following acknowledgement: |
|
.\" This product includes software developed by the University of |
|
.\" California, Berkeley and its contributors. |
|
.\" 4. Neither the name of the University nor the names of its contributors |
|
.\" may be used to endorse or promote products derived from this software |
.\" may be used to endorse or promote products derived from this software |
.\" without specific prior written permission. |
.\" without specific prior written permission. |
.\" |
.\" |
|
|
.Sh LIBRARY |
.Sh LIBRARY |
.Lb libc |
.Lb libc |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Fd #include <stdlib.h> |
.In stdlib.h |
.Ft int |
.Ft int |
.Fn cgetent "char **buf" "char **db_array" "const char *name" |
.Fn cgetent "char **buf" "const char * const *db_array" "const char *name" |
.Ft int |
.Ft int |
.Fn cgetset "const char *ent" |
.Fn cgetset "const char *ent" |
.Ft int |
.Ft int |
|
|
.Ft int |
.Ft int |
.Fn cgetustr "char *buf" "const char *cap" "char **str" |
.Fn cgetustr "char *buf" "const char *cap" "char **str" |
.Ft int |
.Ft int |
.Fn cgetfirst "char **buf" "char **db_array" |
.Fn cgetfirst "char **buf" "const char * const *db_array" |
.Ft int |
.Ft int |
.Fn cgetnext "char **buf" "char **db_array" |
.Fn cgetnext "char **buf" "const char * const *db_array" |
.Ft int |
.Ft int |
.Fn cgetclose "void" |
.Fn cgetclose "void" |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
Line 105 must be retained through all subsequent |
|
Line 101 must be retained through all subsequent |
|
and |
and |
.Fn cgetustr , |
.Fn cgetustr , |
but may then be |
but may then be |
.Xr free 3 Ns \&'d. |
.Xr free 3 Ns \&'d . |
.Pp |
.Pp |
On success 0 is returned, 1 if the returned record contains an unresolved |
On success 0 is returned, 1 if the returned record contains an unresolved |
.Qq tc |
.Qq tc |
Line 289 database begins: |
|
Line 285 database begins: |
|
giving four names that can be used to access the record. |
giving four names that can be used to access the record. |
.Pp |
.Pp |
The remaining non-empty capabilities describe a set of (name, value) |
The remaining non-empty capabilities describe a set of (name, value) |
bindings, consisting of a names optionally followed by a typed values: |
bindings, consisting of a name optionally followed by a typed value: |
.Bl -column "nameTvalue" |
.Bl -column "nameTvalue" |
.It name Ta "typeless [boolean] capability" |
.It name Ta "typeless [boolean] capability" |
.Em name No "is present [true]" |
.Em name No "is present [true]" |
Line 423 overrides the definition of |
|
Line 419 overrides the definition of |
|
interpolated from the capability record |
interpolated from the capability record |
.Em old |
.Em old |
in |
in |
.Fa file2, |
.Fa file2 , |
.Qq who-cares@ |
.Qq who-cares@ |
prevents the definition of any who-cares definitions in |
prevents the definition of any who-cares definitions in |
.Em old |
.Em old |
Line 452 Two types are predefined by |
|
Line 448 Two types are predefined by |
|
and |
and |
.Fn cgetstr : |
.Fn cgetstr : |
.Bl -column "nameXnumber" |
.Bl -column "nameXnumber" |
.Sm off |
.It Em name Ns \&# Ns Em number Ta numeric |
.It Em name No \&# Em number Ta numeric |
|
capability |
capability |
.Em name |
.Em name |
has value |
has value |
.Em number |
.Em number |
.It Em name No = Em string Ta "string capability" |
.It Em name Ns = Ns Em string Ta "string capability" |
.Em name |
.Em name |
has value |
has value |
.Em string |
.Em string |
.It Em name No \&#@ Ta "the numeric capability" |
.It Em name Ns \&#@ Ns Ta "the numeric capability" |
.Em name |
.Em name |
does not exist |
does not exist |
.It Em name No \&=@ Ta "the string capability" |
.It Em name Ns \&=@ Ns Ta "the string capability" |
.Em name |
.Em name |
does not exist |
does not exist |
.El |
.El |
|
|
codes, new lines, and colons may be conveniently represented by the use |
codes, new lines, and colons may be conveniently represented by the use |
of escape sequences: |
of escape sequences: |
.Bl -column "\e\|X,X\e\|X" "(ASCII octal nnn)" |
.Bl -column "\e\|X,X\e\|X" "(ASCII octal nnn)" |
^X ('\fIX\fP' & 037) control-\fIX\fP |
^X ('\fIX\fP' \*[Am] 037) control-\fIX\fP |
\e\|b, \e\|B (ASCII 010) backspace |
\e\|b, \e\|B (ASCII 010) backspace |
\e\|t, \e\|T (ASCII 011) tab |
\e\|t, \e\|T (ASCII 011) tab |
\e\|n, \e\|N (ASCII 012) line feed (newline) |
\e\|n, \e\|N (ASCII 012) line feed (newline) |
Line 501 of escape sequences: |
|
Line 496 of escape sequences: |
|
\e\|\fInnn\fP (ASCII octal \fInnn\fP) |
\e\|\fInnn\fP (ASCII octal \fInnn\fP) |
.El |
.El |
.Pp |
.Pp |
A `\|\e' may be followed by up to three octal digits directly specifies |
A `\|\e' followed by up to three octal digits directly specifies |
the numeric code for a character. |
the numeric code for a character. |
The use of |
The use of |
.Tn ASCII |
.Tn ASCII |