Lines Matching +full:ascii +full:. +full:d

1 .\" Copyright (c) 1992, 1993
2 .\" The Regents of the University of California. All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Casey Leedom of Lawrence Livermore National Laboratory.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" @(#)getcap.3 8.4 (Berkeley) 5/13/94
32 .\" $FreeBSD: src/lib/libc/gen/getcap.3,v 1.30 2007/02/11 18:14:49 maxim Exp $
33 .\"
83 .Xr malloc 3 Ns \&'d
85 .Fa buf .
89 .Pa .db
92 before accessing the ASCII file.
104 .Xr free 3 Ns \&'d .
110 \-2 if a system error was encountered (could not open/read a file, etc.) also
115 comments below).
121 to the capability database.
124 .Fn cgetent .
126 .Fa ent .
131 the current entry is removed from the database.
134 must precede the database traversal.
137 call.
145 call.
146 On success 0 is returned and \-1 on failure.
155 not.
164 .Fa type .
167 is specified using any single character.
170 types).
178 found.
180 .Tn ASCII
182 (see below for capability database syntax).
189 .Fa buf .
193 .Fa num .
195 be found.
202 .Fa buf .
206 .Xr malloc 3 Ns \&'d
210 .Fa str .
215 failure).
222 character of the capability string literally.
232 .Fa db_array .
236 to the first record.
244 call.
246 returned.
248 .Xr malloc 3 Ns \&'d
250 .Fa buf .
254 comments below).
262 comments below).
263 Upon completion of database (0 return) the database is closed.
268 being used.
270 .Fn cgetset .
284 than 0 on failure.
289 on failure.
292 .Tn ASCII
294 text editors.
296 and are ignored.
299 are ignored.
301 lines by ending each line except the last with a `\|\e'.
304 line.
306 (capabilities).
308 characters (spaces and tabs) are ignored.
311 characters.
312 These names are used to reference records in the database.
314 a lookup tag.
323 giving four names that can be used to access the record.
330 .It name Ns Em \&T Ns value Ta capability
331 .Pq Em name , \&T
335 .It name Ns Em T Ns \&@ Ta capability
340 Names consist of one or more characters.
343 characters and avoid use of graphics like `#', `=', `%', `@', etc.
346 associated typed values.
347 Types may be any character except a `:'.
348 Typically, graphics like `#', `=', `%', etc.\& are used.
350 number of characters and may contain any character except `:'.
352 Capability records describe a set of (name, value) bindings.
353 Names may have multiple values bound to them.
356 .Fa types .
360 name and the type of the value.
363 string typed values, but no restriction on those types is enforced.
370 and `='.
372 presence or absence indicating truth and false values respectively.
383 capability.
389 capability may be used in a record.
392 expansion scope (i.e., where the argument is searched for) contains the
395 is declared and all subsequent files in the file array.
398 record in the search is returned.
410 from being seen.
416 definitions, or hiding following definitions via `@' capabilities.
426 type `^') and any other value bindings are hidden.
429 being defined in the capability record more.
435 old\||\|old_record\||\|an old database record:\e
441 with file1 preceding file2.
446 defined by the record extensions is added to those definitions in old.
448 tc=old is important here.
450 would take precedence.
458 .It Em name No \&# Em number Ta numeric
471 .It Em name No \&#@ Ta "the numeric capability"
476 .It Em name No \&=@ Ta "the string capability"
482 Numeric capability values may be given in one of three numeric bases.
488 may be used to denote the extended hexadecimal digits).
491 it is interpreted as an octal number.
492 Otherwise the number is interpreted as a decimal number.
494 String capability values may contain any character.
496 .Dv ASCII
499 .Bl -column "\e\|X,X\e\|X" "(ASCII octal nnn)"
501 \e\|b, \e\|B (ASCII 010) backspace
502 \e\|t, \e\|T (ASCII 011) tab
503 \e\|n, \e\|N (ASCII 012) line feed (newline)
504 \e\|f, \e\|F (ASCII 014) form feed
505 \e\|r, \e\|R (ASCII 015) carriage return
506 \e\|e, \e\|E (ASCII 027) escape
510 \e\|nnn (ASCII octal nnn)
514 the numeric code for a character.
516 .Tn ASCII
523 .Dv NUL .
536 .Xr close 2 .
550 No memory to allocate.
556 Colons (`:') cannot be used in names, types, or values.
561 .Fn cgetent .
565 is not unique to the database but is rather prepended to any database used.