OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.40.
[linuxjm/LDP_man-pages.git] / po4a / db / po / db.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/btree.3:34
21 #, no-wrap
22 msgid "BTREE"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/btree.3:34 build/C/man3/dbopen.3:34 build/C/man3/hash.3:34 build/C/man3/recno.3:34
27 #, no-wrap
28 msgid "2012-04-23"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/btree.3:34 build/C/man3/dbopen.3:34 build/C/man3/hash.3:34 build/C/man3/mpool.3:34 build/C/man3/recno.3:34
33 #, no-wrap
34 msgid "Linux Programmer's Manual"
35 msgstr ""
36
37 #. type: SH
38 #: build/C/man3/btree.3:36 build/C/man3/dbopen.3:36 build/C/man3/hash.3:36 build/C/man3/mpool.3:36 build/C/man3/recno.3:36
39 #, no-wrap
40 msgid "NAME"
41 msgstr ""
42
43 #. type: Plain text
44 #: build/C/man3/btree.3:38
45 msgid "btree - btree database access method"
46 msgstr ""
47
48 #. type: SH
49 #: build/C/man3/btree.3:38 build/C/man3/dbopen.3:38 build/C/man3/hash.3:38 build/C/man3/mpool.3:38 build/C/man3/recno.3:38
50 #, no-wrap
51 msgid "SYNOPSIS"
52 msgstr ""
53
54 #. type: Plain text
55 #: build/C/man3/btree.3:43 build/C/man3/hash.3:43 build/C/man3/recno.3:43
56 #, no-wrap
57 msgid ""
58 "B<#include E<lt>sys/types.hE<gt>\n"
59 "#include E<lt>db.hE<gt>>\n"
60 msgstr ""
61
62 #. type: SH
63 #: build/C/man3/btree.3:45 build/C/man3/dbopen.3:48 build/C/man3/hash.3:45 build/C/man3/mpool.3:60 build/C/man3/recno.3:45
64 #, no-wrap
65 msgid "DESCRIPTION"
66 msgstr ""
67
68 #. type: Plain text
69 #: build/C/man3/btree.3:52 build/C/man3/dbopen.3:55 build/C/man3/hash.3:52 build/C/man3/mpool.3:67 build/C/man3/recno.3:52
70 msgid ""
71 "I<Note well>: This page documents interfaces provided in glibc up until "
72 "version 2.1.  Since version 2.2, glibc no longer provides these interfaces.  "
73 "Probably, you are looking for the APIs provided by the I<libdb> library "
74 "instead."
75 msgstr ""
76
77 #. type: Plain text
78 #: build/C/man3/btree.3:60
79 msgid ""
80 "The routine B<dbopen>(3)  is the library interface to database files.  One "
81 "of the supported file formats is btree files.  The general description of "
82 "the database access methods is in B<dbopen>(3), this manual page describes "
83 "only the btree specific information."
84 msgstr ""
85
86 #. type: Plain text
87 #: build/C/man3/btree.3:63
88 msgid ""
89 "The btree data structure is a sorted, balanced tree structure storing "
90 "associated key/data pairs."
91 msgstr ""
92
93 #. type: Plain text
94 #: build/C/man3/btree.3:69
95 msgid ""
96 "The btree access method specific data structure provided to B<dbopen>(3)  is "
97 "defined in the I<E<lt>db.hE<gt>> include file as follows:"
98 msgstr ""
99
100 #. type: Plain text
101 #: build/C/man3/btree.3:82
102 #, no-wrap
103 msgid ""
104 "typedef struct {\n"
105 "    unsigned long flags;\n"
106 "    unsigned int  cachesize;\n"
107 "    int           maxkeypage;\n"
108 "    int           minkeypage;\n"
109 "    unsigned int  psize;\n"
110 "    int         (*compare)(const DBT *key1, const DBT *key2);\n"
111 "    size_t      (*prefix)(const DBT *key1, const DBT *key2);\n"
112 "    int           lorder;\n"
113 "} BTREEINFO;\n"
114 msgstr ""
115
116 #. type: Plain text
117 #: build/C/man3/btree.3:86 build/C/man3/hash.3:83
118 msgid "The elements of this structure are as follows:"
119 msgstr ""
120
121 #. type: TP
122 #: build/C/man3/btree.3:86
123 #, no-wrap
124 msgid "I<flags>"
125 msgstr ""
126
127 #. type: Plain text
128 #: build/C/man3/btree.3:89 build/C/man3/recno.3:95
129 msgid "The flag value is specified by ORing any of the following values:"
130 msgstr ""
131
132 #. type: TP
133 #: build/C/man3/btree.3:90
134 #, no-wrap
135 msgid "B<R_DUP>"
136 msgstr ""
137
138 #. type: Plain text
139 #: build/C/man3/btree.3:109
140 msgid ""
141 "Permit duplicate keys in the tree, that is, permit insertion if the key to "
142 "be inserted already exists in the tree.  The default behavior, as described "
143 "in B<dbopen>(3), is to overwrite a matching key when inserting a new key or "
144 "to fail if the B<R_NOOVERWRITE> flag is specified.  The B<R_DUP> flag is "
145 "overridden by the B<R_NOOVERWRITE> flag, and if the B<R_NOOVERWRITE> flag is "
146 "specified, attempts to insert duplicate keys into the tree will fail."
147 msgstr ""
148
149 #. type: Plain text
150 #: build/C/man3/btree.3:119
151 msgid ""
152 "If the database contains duplicate keys, the order of retrieval of key/data "
153 "pairs is undefined if the I<get> routine is used, however, I<seq> routine "
154 "calls with the B<R_CURSOR> flag set will always return the logical \"first\" "
155 "of any group of duplicate keys."
156 msgstr ""
157
158 #. type: TP
159 #: build/C/man3/btree.3:120 build/C/man3/hash.3:100 build/C/man3/recno.3:127
160 #, no-wrap
161 msgid "I<cachesize>"
162 msgstr ""
163
164 #. type: Plain text
165 #: build/C/man3/btree.3:135
166 msgid ""
167 "A suggested maximum size (in bytes) of the memory cache.  This value is "
168 "I<only> advisory, and the access method will allocate more memory rather "
169 "than fail.  Since every search examines the root page of the tree, caching "
170 "the most recently used pages substantially improves access time.  In "
171 "addition, physical writes are delayed as long as possible, so a moderate "
172 "cache can reduce the number of I/O operations significantly.  Obviously, "
173 "using a cache increases (but only increases) the likelihood of corruption or "
174 "lost data if the system crashes while a tree is being modified.  If "
175 "I<cachesize> is 0 (no size is specified) a default cache is used."
176 msgstr ""
177
178 #. type: TP
179 #: build/C/man3/btree.3:135
180 #, no-wrap
181 msgid "I<maxkeypage>"
182 msgstr ""
183
184 #.  The maximum number of keys which will be stored on any single page.
185 #.  Because of the way the btree data structure works,
186 #.  .I maxkeypage
187 #.  must always be greater than or equal to 2.
188 #.  If
189 #.  .I maxkeypage
190 #.  is 0 (no maximum number of keys is specified) the page fill factor is
191 #.  made as large as possible (which is almost invariably what is wanted).
192 #. type: Plain text
193 #: build/C/man3/btree.3:147
194 msgid ""
195 "The maximum number of keys which will be stored on any single page.  Not "
196 "currently implemented."
197 msgstr ""
198
199 #. type: TP
200 #: build/C/man3/btree.3:147
201 #, no-wrap
202 msgid "I<minkeypage>"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man3/btree.3:157
207 msgid ""
208 "The minimum number of keys which will be stored on any single page.  This "
209 "value is used to determine which keys will be stored on overflow pages, that "
210 "is, if a key or data item is longer than the pagesize divided by the "
211 "minkeypage value, it will be stored on overflow pages instead of in the page "
212 "itself.  If I<minkeypage> is 0 (no minimum number of keys is specified) a "
213 "value of 2 is used."
214 msgstr ""
215
216 #. type: TP
217 #: build/C/man3/btree.3:157 build/C/man3/recno.3:136
218 #, no-wrap
219 msgid "I<psize>"
220 msgstr ""
221
222 #. type: Plain text
223 #: build/C/man3/btree.3:165
224 msgid ""
225 "Page size is the size (in bytes) of the pages used for nodes in the tree.  "
226 "The minimum page size is 512 bytes and the maximum page size is 64K.  If "
227 "I<psize> is 0 (no page size is specified) a page size is chosen based on the "
228 "underlying file system I/O block size."
229 msgstr ""
230
231 #. type: TP
232 #: build/C/man3/btree.3:165
233 #, no-wrap
234 msgid "I<compare>"
235 msgstr ""
236
237 #. type: Plain text
238 #: build/C/man3/btree.3:177
239 msgid ""
240 "Compare is the key comparison function.  It must return an integer less "
241 "than, equal to, or greater than zero if the first key argument is considered "
242 "to be respectively less than, equal to, or greater than the second key "
243 "argument.  The same comparison function must be used on a given tree every "
244 "time it is opened.  If I<compare> is NULL (no comparison function is "
245 "specified), the keys are compared lexically, with shorter keys considered "
246 "less than longer keys."
247 msgstr ""
248
249 #. type: TP
250 #: build/C/man3/btree.3:177
251 #, no-wrap
252 msgid "I<prefix>"
253 msgstr ""
254
255 #. type: Plain text
256 #: build/C/man3/btree.3:196
257 msgid ""
258 "Prefix is the prefix comparison function.  If specified, this routine must "
259 "return the number of bytes of the second key argument which are necessary to "
260 "determine that it is greater than the first key argument.  If the keys are "
261 "equal, the key length should be returned.  Note, the usefulness of this "
262 "routine is very data-dependent, but, in some data sets can produce "
263 "significantly reduced tree sizes and search times.  If I<prefix> is NULL (no "
264 "prefix function is specified), I<and> no comparison function is specified, a "
265 "default lexical comparison routine is used.  If I<prefix> is NULL and a "
266 "comparison routine is specified, no prefix comparison is done."
267 msgstr ""
268
269 #. type: TP
270 #: build/C/man3/btree.3:196 build/C/man3/hash.3:115 build/C/man3/recno.3:148
271 #, no-wrap
272 msgid "I<lorder>"
273 msgstr ""
274
275 #. type: Plain text
276 #: build/C/man3/btree.3:204 build/C/man3/recno.3:156
277 msgid ""
278 "The byte order for integers in the stored database metadata.  The number "
279 "should represent the order as an integer; for example, big endian order "
280 "would be the number 4,321.  If I<lorder> is 0 (no order is specified) the "
281 "current host order is used."
282 msgstr ""
283
284 #. type: Plain text
285 #: build/C/man3/btree.3:215
286 msgid ""
287 "If the file already exists (and the B<O_TRUNC> flag is not specified), the "
288 "values specified for the arguments I<flags>, I<lorder> and I<psize> are "
289 "ignored in favor of the values used when the tree was created."
290 msgstr ""
291
292 #. type: Plain text
293 #: build/C/man3/btree.3:217
294 msgid "Forward sequential scans of a tree are from the least key to the greatest."
295 msgstr ""
296
297 #. type: Plain text
298 #: build/C/man3/btree.3:223
299 msgid ""
300 "Space freed up by deleting key/data pairs from the tree is never reclaimed, "
301 "although it is normally made available for reuse.  This means that the btree "
302 "storage structure is grow-only.  The only solutions are to avoid excessive "
303 "deletions, or to create a fresh tree periodically from a scan of an existing "
304 "one."
305 msgstr ""
306
307 #. type: Plain text
308 #: build/C/man3/btree.3:229
309 msgid ""
310 "Searches, insertions, and deletions in a btree will all complete in O lg "
311 "base N where base is the average fill factor.  Often, inserting ordered data "
312 "into btrees results in a low fill factor.  This implementation has been "
313 "modified to make ordered insertion the best case, resulting in a much better "
314 "than normal page fill factor."
315 msgstr ""
316
317 #. type: SH
318 #: build/C/man3/btree.3:229 build/C/man3/dbopen.3:478 build/C/man3/hash.3:149 build/C/man3/mpool.3:183 build/C/man3/recno.3:208
319 #, no-wrap
320 msgid "ERRORS"
321 msgstr ""
322
323 #. type: Plain text
324 #: build/C/man3/btree.3:236
325 msgid ""
326 "The I<btree> access method routines may fail and set I<errno> for any of the "
327 "errors specified for the library routine B<dbopen>(3)."
328 msgstr ""
329
330 #. type: SH
331 #: build/C/man3/btree.3:236 build/C/man3/dbopen.3:540 build/C/man3/hash.3:156 build/C/man3/recno.3:220
332 #, no-wrap
333 msgid "BUGS"
334 msgstr ""
335
336 #. type: Plain text
337 #: build/C/man3/btree.3:238 build/C/man3/recno.3:222
338 msgid "Only big and little endian byte order is supported."
339 msgstr ""
340
341 #. type: SH
342 #: build/C/man3/btree.3:238 build/C/man3/dbopen.3:551 build/C/man3/hash.3:158 build/C/man3/mpool.3:228 build/C/man3/recno.3:222
343 #, no-wrap
344 msgid "SEE ALSO"
345 msgstr ""
346
347 #. type: Plain text
348 #: build/C/man3/btree.3:243
349 msgid "B<dbopen>(3), B<hash>(3), B<mpool>(3), B<recno>(3)"
350 msgstr ""
351
352 #. type: Plain text
353 #: build/C/man3/btree.3:246
354 msgid ""
355 "I<The Ubiquitous B-tree>, Douglas Comer, ACM Comput. Surv. 11, 2 (June "
356 "1979), 121-138."
357 msgstr ""
358
359 #. type: Plain text
360 #: build/C/man3/btree.3:250
361 msgid ""
362 "I<Prefix B-trees>, Bayer and Unterauer, ACM Transactions on Database "
363 "Systems, Vol. 2, 1 (March 1977), 11-26."
364 msgstr ""
365
366 #. type: Plain text
367 #: build/C/man3/btree.3:253
368 msgid ""
369 "I<The Art of Computer Programming Vol. 3: Sorting and Searching>, "
370 "D.E. Knuth, 1968, pp 471-480."
371 msgstr ""
372
373 #. type: SH
374 #: build/C/man3/btree.3:253 build/C/man3/dbopen.3:559 build/C/man3/hash.3:169 build/C/man3/mpool.3:233 build/C/man3/recno.3:231
375 #, no-wrap
376 msgid "COLOPHON"
377 msgstr ""
378
379 #. type: Plain text
380 #: build/C/man3/btree.3:260 build/C/man3/dbopen.3:566 build/C/man3/hash.3:176 build/C/man3/mpool.3:240 build/C/man3/recno.3:238
381 msgid ""
382 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
383 "description of the project, and information about reporting bugs, can be "
384 "found at http://www.kernel.org/doc/man-pages/."
385 msgstr ""
386
387 #. type: TH
388 #: build/C/man3/dbopen.3:34
389 #, no-wrap
390 msgid "DBOPEN"
391 msgstr ""
392
393 #. type: Plain text
394 #: build/C/man3/dbopen.3:38
395 msgid "dbopen - database access methods"
396 msgstr ""
397
398 #. type: Plain text
399 #: build/C/man3/dbopen.3:43
400 #, no-wrap
401 msgid ""
402 "B<#include E<lt>sys/types.hE<gt>>\n"
403 "B<#include E<lt>limits.hE<gt>>\n"
404 "B<#include E<lt>db.hE<gt>>\n"
405 msgstr ""
406
407 #. type: Plain text
408 #: build/C/man3/dbopen.3:47
409 #, no-wrap
410 msgid ""
411 "B<DB *dbopen(const char *>I<file>B<, int >I<flags>B<, int >I<mode>B<, DBTYPE "
412 ">I<type>B<,>\n"
413 "B<           const void *>I<openinfo>B<);>\n"
414 msgstr ""
415
416 #. type: Plain text
417 #: build/C/man3/dbopen.3:69
418 msgid ""
419 "B<dbopen>()  is the library interface to database files.  The supported file "
420 "formats are btree, hashed and UNIX file oriented.  The btree format is a "
421 "representation of a sorted, balanced tree structure.  The hashed format is "
422 "an extensible, dynamic hashing scheme.  The flat-file format is a byte "
423 "stream file with fixed or variable length records.  The formats and file "
424 "format specific information are described in detail in their respective "
425 "manual pages B<btree>(3), B<hash>(3)  and B<recno>(3)."
426 msgstr ""
427
428 #. type: Plain text
429 #: build/C/man3/dbopen.3:78
430 msgid ""
431 "B<dbopen>()  opens I<file> for reading and/or writing.  Files never intended "
432 "to be preserved on disk may be created by setting the I<file> argument to "
433 "NULL."
434 msgstr ""
435
436 #. Three additional options may be specified by ORing
437 #. them into the
438 #. .I flags
439 #. argument.
440 #. .TP
441 #. DB_LOCK
442 #. Do the necessary locking in the database to support concurrent access.
443 #. If concurrent access isn't needed or the database is read-only this
444 #. flag should not be set, as it tends to have an associated performance
445 #. penalty.
446 #. .TP
447 #. DB_SHMEM
448 #. Place the underlying memory pool used by the database in shared
449 #. memory.
450 #. Necessary for concurrent access.
451 #. .TP
452 #. DB_TXN
453 #. Support transactions in the database.
454 #. The DB_LOCK and DB_SHMEM flags must be set as well.
455 #. type: Plain text
456 #: build/C/man3/dbopen.3:118
457 msgid ""
458 "The I<flags> and I<mode> arguments are as specified to the B<open>(2)  "
459 "routine, however, only the B<O_CREAT>, B<O_EXCL>, B<O_EXLOCK>, "
460 "B<O_NONBLOCK>, B<O_RDONLY>, B<O_RDWR>, B<O_SHLOCK>, and B<O_TRUNC> flags are "
461 "meaningful.  (Note, opening a database file B<O_WRONLY> is not possible.)"
462 msgstr ""
463
464 #. type: Plain text
465 #: build/C/man3/dbopen.3:131
466 msgid ""
467 "The I<type> argument is of type I<DBTYPE> (as defined in the "
468 "I<E<lt>db.hE<gt>> include file) and may be set to B<DB_BTREE>, B<DB_HASH>, "
469 "or B<DB_RECNO>."
470 msgstr ""
471
472 #. type: Plain text
473 #: build/C/man3/dbopen.3:140
474 msgid ""
475 "The I<openinfo> argument is a pointer to an access method specific structure "
476 "described in the access method's manual page.  If I<openinfo> is NULL, each "
477 "access method will use defaults appropriate for the system and the access "
478 "method."
479 msgstr ""
480
481 #. type: Plain text
482 #: build/C/man3/dbopen.3:151
483 msgid ""
484 "B<dbopen>()  returns a pointer to a I<DB> structure on success and NULL on "
485 "error.  The I<DB> structure is defined in the I<E<lt>db.hE<gt>> include "
486 "file, and contains at least the following fields:"
487 msgstr ""
488
489 #. type: Plain text
490 #: build/C/man3/dbopen.3:167
491 #, no-wrap
492 msgid ""
493 "typedef struct {\n"
494 "    DBTYPE type;\n"
495 "    int (*close)(const DB *db);\n"
496 "    int (*del)(const DB *db, const DBT *key, unsigned int flags);\n"
497 "    int (*fd)(const DB *db);\n"
498 "    int (*get)(const DB *db, DBT *key, DBT *data,\n"
499 "               unsigned int flags);\n"
500 "    int (*put)(const DB *db, DBT *key, const DBT *data,\n"
501 "               unsigned int flags);\n"
502 "    int (*sync)(const DB *db, unsigned int flags);\n"
503 "    int (*seq)(const DB *db, DBT *key, DBT *data,\n"
504 "               unsigned int flags);\n"
505 "} DB;\n"
506 msgstr ""
507
508 #. type: Plain text
509 #: build/C/man3/dbopen.3:175
510 msgid ""
511 "These elements describe a database type and a set of functions performing "
512 "various actions.  These functions take a pointer to a structure as returned "
513 "by B<dbopen>(), and sometimes one or more pointers to key/data structures "
514 "and a flag value."
515 msgstr ""
516
517 #. type: TP
518 #: build/C/man3/dbopen.3:175
519 #, no-wrap
520 msgid "I<type>"
521 msgstr ""
522
523 #. type: Plain text
524 #: build/C/man3/dbopen.3:178
525 msgid "The type of the underlying access method (and file format)."
526 msgstr ""
527
528 #. type: TP
529 #: build/C/man3/dbopen.3:178
530 #, no-wrap
531 msgid "I<close>"
532 msgstr ""
533
534 #. type: Plain text
535 #: build/C/man3/dbopen.3:192
536 msgid ""
537 "A pointer to a routine to flush any cached information to disk, free any "
538 "allocated resources, and close the underlying file(s).  Since key/data pairs "
539 "may be cached in memory, failing to sync the file with a I<close> or I<sync> "
540 "function may result in inconsistent or lost information.  I<close> routines "
541 "return -1 on error (setting I<errno>)  and 0 on success."
542 msgstr ""
543
544 #. type: TP
545 #: build/C/man3/dbopen.3:192
546 #, no-wrap
547 msgid "I<del>"
548 msgstr ""
549
550 #. type: Plain text
551 #: build/C/man3/dbopen.3:195
552 msgid "A pointer to a routine to remove key/data pairs from the database."
553 msgstr ""
554
555 #. type: Plain text
556 #: build/C/man3/dbopen.3:199
557 msgid "The argument I<flag> may be set to the following value:"
558 msgstr ""
559
560 #. type: TP
561 #: build/C/man3/dbopen.3:200 build/C/man3/dbopen.3:256 build/C/man3/dbopen.3:356
562 #, no-wrap
563 msgid "B<R_CURSOR>"
564 msgstr ""
565
566 #. type: Plain text
567 #: build/C/man3/dbopen.3:204
568 msgid ""
569 "Delete the record referenced by the cursor.  The cursor must have previously "
570 "been initialized."
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man3/dbopen.3:212
575 msgid ""
576 "I<delete> routines return -1 on error (setting I<errno>), 0 on success, and "
577 "1 if the specified I<key> was not in the file."
578 msgstr ""
579
580 #. type: TP
581 #: build/C/man3/dbopen.3:212
582 #, no-wrap
583 msgid "I<fd>"
584 msgstr ""
585
586 #. type: Plain text
587 #: build/C/man3/dbopen.3:234
588 msgid ""
589 "A pointer to a routine which returns a file descriptor representative of the "
590 "underlying database.  A file descriptor referencing the same file will be "
591 "returned to all processes which call B<dbopen>()  with the same I<file> "
592 "name.  This file descriptor may be safely used as an argument to the "
593 "B<fcntl>(2)  and B<flock>(2)  locking functions.  The file descriptor is not "
594 "necessarily associated with any of the underlying files used by the access "
595 "method.  No file descriptor is available for in memory databases.  I<fd> "
596 "routines return -1 on error (setting I<errno>), and the file descriptor on "
597 "success."
598 msgstr ""
599
600 #. type: TP
601 #: build/C/man3/dbopen.3:234
602 #, no-wrap
603 msgid "I<get>"
604 msgstr ""
605
606 #. type: Plain text
607 #: build/C/man3/dbopen.3:248
608 msgid ""
609 "A pointer to a routine which is the interface for keyed retrieval from the "
610 "database.  The address and length of the data associated with the specified "
611 "I<key> are returned in the structure referenced by I<data>.  I<get> routines "
612 "return -1 on error (setting I<errno>), 0 on success, and 1 if the I<key> was "
613 "not in the file."
614 msgstr ""
615
616 #. type: TP
617 #: build/C/man3/dbopen.3:248
618 #, no-wrap
619 msgid "I<put>"
620 msgstr ""
621
622 #. type: Plain text
623 #: build/C/man3/dbopen.3:251
624 msgid "A pointer to a routine to store key/data pairs in the database."
625 msgstr ""
626
627 #. type: Plain text
628 #: build/C/man3/dbopen.3:255
629 msgid "The argument I<flag> may be set to one of the following values:"
630 msgstr ""
631
632 #. type: Plain text
633 #: build/C/man3/dbopen.3:260
634 msgid ""
635 "Replace the key/data pair referenced by the cursor.  The cursor must have "
636 "previously been initialized."
637 msgstr ""
638
639 #. type: TP
640 #: build/C/man3/dbopen.3:260
641 #, no-wrap
642 msgid "B<R_IAFTER>"
643 msgstr ""
644
645 #. type: Plain text
646 #: build/C/man3/dbopen.3:271
647 msgid ""
648 "Append the data immediately after the data referenced by I<key>, creating a "
649 "new key/data pair.  The record number of the appended key/data pair is "
650 "returned in the I<key> structure.  (Applicable only to the B<DB_RECNO> "
651 "access method.)"
652 msgstr ""
653
654 #. type: TP
655 #: build/C/man3/dbopen.3:271
656 #, no-wrap
657 msgid "B<R_IBEFORE>"
658 msgstr ""
659
660 #. type: Plain text
661 #: build/C/man3/dbopen.3:282
662 msgid ""
663 "Insert the data immediately before the data referenced by I<key>, creating a "
664 "new key/data pair.  The record number of the inserted key/data pair is "
665 "returned in the I<key> structure.  (Applicable only to the B<DB_RECNO> "
666 "access method.)"
667 msgstr ""
668
669 #. type: TP
670 #: build/C/man3/dbopen.3:282
671 #, no-wrap
672 msgid "B<R_NOOVERWRITE>"
673 msgstr ""
674
675 #. type: Plain text
676 #: build/C/man3/dbopen.3:285
677 msgid "Enter the new key/data pair only if the key does not previously exist."
678 msgstr ""
679
680 #. type: TP
681 #: build/C/man3/dbopen.3:285
682 #, no-wrap
683 msgid "B<R_SETCURSOR>"
684 msgstr ""
685
686 #. type: Plain text
687 #: build/C/man3/dbopen.3:294
688 msgid ""
689 "Store the key/data pair, setting or initializing the position of the cursor "
690 "to reference it.  (Applicable only to the B<DB_BTREE> and B<DB_RECNO> access "
691 "methods.)"
692 msgstr ""
693
694 #. type: Plain text
695 #: build/C/man3/dbopen.3:304
696 msgid ""
697 "B<R_SETCURSOR> is available only for the B<DB_BTREE> and B<DB_RECNO> access "
698 "methods because it implies that the keys have an inherent order which does "
699 "not change."
700 msgstr ""
701
702 #. type: Plain text
703 #: build/C/man3/dbopen.3:314
704 msgid ""
705 "B<R_IAFTER> and B<R_IBEFORE> are available only for the B<DB_RECNO> access "
706 "method because they each imply that the access method is able to create new "
707 "keys.  This is only true if the keys are ordered and independent, record "
708 "numbers for example."
709 msgstr ""
710
711 #. type: Plain text
712 #: build/C/man3/dbopen.3:319
713 msgid ""
714 "The default behavior of the I<put> routines is to enter the new key/data "
715 "pair, replacing any previously existing key."
716 msgstr ""
717
718 #. type: Plain text
719 #: build/C/man3/dbopen.3:327
720 msgid ""
721 "I<put> routines return -1 on error (setting I<errno>), 0 on success, and 1 "
722 "if the B<R_NOOVERWRITE> I<flag> was set and the key already exists in the "
723 "file."
724 msgstr ""
725
726 #. type: TP
727 #: build/C/man3/dbopen.3:327
728 #, no-wrap
729 msgid "I<seq>"
730 msgstr ""
731
732 #. type: Plain text
733 #: build/C/man3/dbopen.3:338
734 msgid ""
735 "A pointer to a routine which is the interface for sequential retrieval from "
736 "the database.  The address and length of the key are returned in the "
737 "structure referenced by I<key>, and the address and length of the data are "
738 "returned in the structure referenced by I<data>."
739 msgstr ""
740
741 #. type: Plain text
742 #: build/C/man3/dbopen.3:351
743 msgid ""
744 "Sequential key/data pair retrieval may begin at any time, and the position "
745 "of the \"cursor\" is not affected by calls to the I<del>, I<get>, I<put>, or "
746 "I<sync> routines.  Modifications to the database during a sequential scan "
747 "will be reflected in the scan, that is, records inserted behind the cursor "
748 "will not be returned while records inserted in front of the cursor will be "
749 "returned."
750 msgstr ""
751
752 #. type: Plain text
753 #: build/C/man3/dbopen.3:355
754 msgid "The flag value B<must> be set to one of the following values:"
755 msgstr ""
756
757 #. type: Plain text
758 #: build/C/man3/dbopen.3:369
759 msgid ""
760 "The data associated with the specified key is returned.  This differs from "
761 "the I<get> routines in that it sets or initializes the cursor to the "
762 "location of the key as well.  (Note, for the B<DB_BTREE> access method, the "
763 "returned key is not necessarily an exact match for the specified key.  The "
764 "returned key is the smallest key greater than or equal to the specified key, "
765 "permitting partial key matches and range searches.)"
766 msgstr ""
767
768 #. type: TP
769 #: build/C/man3/dbopen.3:369
770 #, no-wrap
771 msgid "B<R_FIRST>"
772 msgstr ""
773
774 #. type: Plain text
775 #: build/C/man3/dbopen.3:373
776 msgid ""
777 "The first key/data pair of the database is returned, and the cursor is set "
778 "or initialized to reference it."
779 msgstr ""
780
781 #. type: TP
782 #: build/C/man3/dbopen.3:373
783 #, no-wrap
784 msgid "B<R_LAST>"
785 msgstr ""
786
787 #. type: Plain text
788 #: build/C/man3/dbopen.3:382
789 msgid ""
790 "The last key/data pair of the database is returned, and the cursor is set or "
791 "initialized to reference it.  (Applicable only to the B<DB_BTREE> and "
792 "B<DB_RECNO> access methods.)"
793 msgstr ""
794
795 #. type: TP
796 #: build/C/man3/dbopen.3:382
797 #, no-wrap
798 msgid "B<R_NEXT>"
799 msgstr ""
800
801 #. type: Plain text
802 #: build/C/man3/dbopen.3:388
803 msgid ""
804 "Retrieve the key/data pair immediately after the cursor.  If the cursor is "
805 "not yet set, this is the same as the B<R_FIRST> flag."
806 msgstr ""
807
808 #. type: TP
809 #: build/C/man3/dbopen.3:388
810 #, no-wrap
811 msgid "B<R_PREV>"
812 msgstr ""
813
814 #. type: Plain text
815 #: build/C/man3/dbopen.3:399
816 msgid ""
817 "Retrieve the key/data pair immediately before the cursor.  If the cursor is "
818 "not yet set, this is the same as the B<R_LAST> flag.  (Applicable only to "
819 "the B<DB_BTREE> and B<DB_RECNO> access methods.)"
820 msgstr ""
821
822 #. type: Plain text
823 #: build/C/man3/dbopen.3:410
824 msgid ""
825 "B<R_LAST> and B<R_PREV> are available only for the B<DB_BTREE> and "
826 "B<DB_RECNO> access methods because they each imply that the keys have an "
827 "inherent order which does not change."
828 msgstr ""
829
830 #. type: Plain text
831 #: build/C/man3/dbopen.3:423
832 msgid ""
833 "I<seq> routines return -1 on error (setting I<errno>), 0 on success and 1 if "
834 "there are no key/data pairs less than or greater than the specified or "
835 "current key.  If the B<DB_RECNO> access method is being used, and if the "
836 "database file is a character special file and no complete key/data pairs are "
837 "currently available, the I<seq> routines return 2."
838 msgstr ""
839
840 #. type: TP
841 #: build/C/man3/dbopen.3:423
842 #, no-wrap
843 msgid "I<sync>"
844 msgstr ""
845
846 #. type: Plain text
847 #: build/C/man3/dbopen.3:429
848 msgid ""
849 "A pointer to a routine to flush any cached information to disk.  If the "
850 "database is in memory only, the I<sync> routine has no effect and will "
851 "always succeed."
852 msgstr ""
853
854 #. type: Plain text
855 #: build/C/man3/dbopen.3:431
856 msgid "The flag value may be set to the following value:"
857 msgstr ""
858
859 #. type: TP
860 #: build/C/man3/dbopen.3:432
861 #, no-wrap
862 msgid "B<R_RECNOSYNC>"
863 msgstr ""
864
865 #. type: Plain text
866 #: build/C/man3/dbopen.3:444
867 msgid ""
868 "If the B<DB_RECNO> access method is being used, this flag causes the sync "
869 "routine to apply to the btree file which underlies the recno file, not the "
870 "recno file itself.  (See the I<bfname> field of the B<recno>(3)  manual page "
871 "for more information.)"
872 msgstr ""
873
874 #. type: Plain text
875 #: build/C/man3/dbopen.3:450
876 msgid "I<sync> routines return -1 on error (setting I<errno>)  and 0 on success."
877 msgstr ""
878
879 #. type: SS
880 #: build/C/man3/dbopen.3:450
881 #, no-wrap
882 msgid "Key/Data Pairs"
883 msgstr ""
884
885 #. type: Plain text
886 #: build/C/man3/dbopen.3:453
887 msgid ""
888 "Access to all file types is based on key/data pairs.  Both keys and data are "
889 "represented by the following data structure:"
890 msgstr ""
891
892 #. type: Plain text
893 #: build/C/man3/dbopen.3:460
894 #, no-wrap
895 msgid ""
896 "typedef struct {\n"
897 "    void  *data;\n"
898 "    size_t size;\n"
899 "} DBT;\n"
900 msgstr ""
901
902 #. type: Plain text
903 #: build/C/man3/dbopen.3:466
904 msgid "The elements of the I<DBT> structure are defined as follows:"
905 msgstr ""
906
907 #. type: TP
908 #: build/C/man3/dbopen.3:466
909 #, no-wrap
910 msgid "I<data>"
911 msgstr ""
912
913 #. type: Plain text
914 #: build/C/man3/dbopen.3:469
915 msgid "A pointer to a byte string."
916 msgstr ""
917
918 #. type: TP
919 #: build/C/man3/dbopen.3:469
920 #, no-wrap
921 msgid "I<size>"
922 msgstr ""
923
924 #. type: Plain text
925 #: build/C/man3/dbopen.3:472
926 msgid "The length of the byte string."
927 msgstr ""
928
929 #. type: Plain text
930 #: build/C/man3/dbopen.3:478
931 msgid ""
932 "Key and data byte strings may reference strings of essentially unlimited "
933 "length although any two of them must fit into available memory at the same "
934 "time.  It should be noted that the access methods provide no guarantees "
935 "about byte string alignment."
936 msgstr ""
937
938 #. type: Plain text
939 #: build/C/man3/dbopen.3:488
940 msgid ""
941 "The B<dbopen>()  routine may fail and set I<errno> for any of the errors "
942 "specified for the library routines B<open>(2)  and B<malloc>(3)  or the "
943 "following:"
944 msgstr ""
945
946 #. type: TP
947 #: build/C/man3/dbopen.3:488
948 #, no-wrap
949 msgid "B<EFTYPE>"
950 msgstr ""
951
952 #. type: Plain text
953 #: build/C/man3/dbopen.3:491
954 msgid "A file is incorrectly formatted."
955 msgstr ""
956
957 #. type: TP
958 #: build/C/man3/dbopen.3:491 build/C/man3/mpool.3:196 build/C/man3/recno.3:216
959 #, no-wrap
960 msgid "B<EINVAL>"
961 msgstr ""
962
963 #. type: Plain text
964 #: build/C/man3/dbopen.3:498
965 msgid ""
966 "A parameter has been specified (hash function, pad byte etc.) that is "
967 "incompatible with the current file specification or which is not meaningful "
968 "for the function (for example, use of the cursor without prior "
969 "initialization) or there is a mismatch between the version number of file "
970 "and the software."
971 msgstr ""
972
973 #. type: Plain text
974 #: build/C/man3/dbopen.3:510
975 msgid ""
976 "The I<close> routines may fail and set I<errno> for any of the errors "
977 "specified for the library routines B<close>(2), B<read>(2), B<write>(2), "
978 "B<free>(3), or B<fsync>(2)."
979 msgstr ""
980
981 #. type: Plain text
982 #: build/C/man3/dbopen.3:525
983 msgid ""
984 "The I<del>, I<get>, I<put> and I<seq> routines may fail and set I<errno> for "
985 "any of the errors specified for the library routines B<read>(2), "
986 "B<write>(2), B<free>(3)  or B<malloc>(3)."
987 msgstr ""
988
989 #. type: Plain text
990 #: build/C/man3/dbopen.3:533
991 msgid ""
992 "The I<fd> routines will fail and set I<errno> to B<ENOENT> for in memory "
993 "databases."
994 msgstr ""
995
996 #. type: Plain text
997 #: build/C/man3/dbopen.3:540
998 msgid ""
999 "The I<sync> routines may fail and set I<errno> for any of the errors "
1000 "specified for the library routine B<fsync>(2)."
1001 msgstr ""
1002
1003 #. type: Plain text
1004 #: build/C/man3/dbopen.3:545
1005 msgid ""
1006 "The typedef I<DBT> is a mnemonic for \"data base thang\", and was used "
1007 "because no-one could think of a reasonable name that wasn't already used."
1008 msgstr ""
1009
1010 #. type: Plain text
1011 #: build/C/man3/dbopen.3:548
1012 msgid ""
1013 "The file descriptor interface is a kludge and will be deleted in a future "
1014 "version of the interface."
1015 msgstr ""
1016
1017 #. type: Plain text
1018 #: build/C/man3/dbopen.3:551
1019 msgid ""
1020 "None of the access methods provide any form of concurrent access, locking, "
1021 "or transactions."
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: build/C/man3/dbopen.3:556
1026 msgid "B<btree>(3), B<hash>(3), B<mpool>(3), B<recno>(3)"
1027 msgstr ""
1028
1029 #. type: Plain text
1030 #: build/C/man3/dbopen.3:559
1031 msgid ""
1032 "I<LIBTP: Portable, Modular Transactions for UNIX>, Margo Seltzer, Michael "
1033 "Olson, USENIX proceedings, Winter 1992."
1034 msgstr ""
1035
1036 #. type: TH
1037 #: build/C/man3/hash.3:34
1038 #, no-wrap
1039 msgid "HASH"
1040 msgstr ""
1041
1042 #. type: Plain text
1043 #: build/C/man3/hash.3:38
1044 msgid "hash - hash database access method"
1045 msgstr ""
1046
1047 #. type: Plain text
1048 #: build/C/man3/hash.3:60
1049 msgid ""
1050 "The routine B<dbopen>(3)  is the library interface to database files.  One "
1051 "of the supported file formats is hash files.  The general description of the "
1052 "database access methods is in B<dbopen>(3), this manual page describes only "
1053 "the hash specific information."
1054 msgstr ""
1055
1056 #. type: Plain text
1057 #: build/C/man3/hash.3:62
1058 msgid "The hash data structure is an extensible, dynamic hashing scheme."
1059 msgstr ""
1060
1061 #. type: Plain text
1062 #: build/C/man3/hash.3:68
1063 msgid ""
1064 "The access method specific data structure provided to B<dbopen>(3)  is "
1065 "defined in the I<E<lt>db.hE<gt>> include file as follows:"
1066 msgstr ""
1067
1068 #. type: Plain text
1069 #: build/C/man3/hash.3:79
1070 #, no-wrap
1071 msgid ""
1072 "typedef struct {\n"
1073 "    unsigned int       bsize;\n"
1074 "    unsigned int       ffactor;\n"
1075 "    unsigned int       nelem;\n"
1076 "    unsigned int       cachesize;\n"
1077 "    uint32_t         (*hash)(const void *, size_t);\n"
1078 "    int         lorder;\n"
1079 "} HASHINFO;\n"
1080 msgstr ""
1081
1082 #. type: TP
1083 #: build/C/man3/hash.3:83
1084 #, no-wrap
1085 msgid "I<bsize>"
1086 msgstr ""
1087
1088 #. type: Plain text
1089 #: build/C/man3/hash.3:88
1090 msgid ""
1091 "defines the hash table bucket size, and is, by default, 256 bytes.  It may "
1092 "be preferable to increase the page size for disk-resident tables and tables "
1093 "with large data items."
1094 msgstr ""
1095
1096 #. type: TP
1097 #: build/C/man3/hash.3:88
1098 #, no-wrap
1099 msgid "I<ffactor>"
1100 msgstr ""
1101
1102 #. type: Plain text
1103 #: build/C/man3/hash.3:94
1104 msgid ""
1105 "indicates a desired density within the hash table.  It is an approximation "
1106 "of the number of keys allowed to accumulate in any one bucket, determining "
1107 "when the hash table grows or shrinks.  The default value is 8."
1108 msgstr ""
1109
1110 #. type: TP
1111 #: build/C/man3/hash.3:94
1112 #, no-wrap
1113 msgid "I<nelem>"
1114 msgstr ""
1115
1116 #. type: Plain text
1117 #: build/C/man3/hash.3:100
1118 msgid ""
1119 "is an estimate of the final size of the hash table.  If not set or set too "
1120 "low, hash tables will expand gracefully as keys are entered, although a "
1121 "slight performance degradation may be noticed.  The default value is 1."
1122 msgstr ""
1123
1124 #. type: Plain text
1125 #: build/C/man3/hash.3:106
1126 msgid ""
1127 "is the suggested maximum size, in bytes, of the memory cache.  This value is "
1128 "I<only advisory>, and the access method will allocate more memory rather "
1129 "than fail."
1130 msgstr ""
1131
1132 #. type: TP
1133 #: build/C/man3/hash.3:106
1134 #, no-wrap
1135 msgid "I<hash>"
1136 msgstr ""
1137
1138 #. type: Plain text
1139 #: build/C/man3/hash.3:115
1140 msgid ""
1141 "is a user-defined hash function.  Since no hash function performs equally "
1142 "well on all possible data, the user may find that the built-in hash function "
1143 "does poorly on a particular data set.  A user-specified hash functions must "
1144 "take two arguments (a pointer to a byte string and a length) and return a "
1145 "32-bit quantity to be used as the hash value."
1146 msgstr ""
1147
1148 #. type: Plain text
1149 #: build/C/man3/hash.3:125
1150 msgid ""
1151 "is the byte order for integers in the stored database metadata.  The number "
1152 "should represent the order as an integer; for example, big endian order "
1153 "would be the number 4,321.  If I<lorder> is 0 (no order is specified) the "
1154 "current host order is used.  If the file already exists, the specified value "
1155 "is ignored and the value specified when the tree was created is used."
1156 msgstr ""
1157
1158 #. type: Plain text
1159 #: build/C/man3/hash.3:137
1160 msgid ""
1161 "If the file already exists (and the B<O_TRUNC> flag is not specified), the "
1162 "values specified for I<bsize>, I<ffactor>, I<lorder>, and I<nelem> are "
1163 "ignored and the values specified when the tree was created are used."
1164 msgstr ""
1165
1166 #. type: Plain text
1167 #: build/C/man3/hash.3:142
1168 msgid ""
1169 "If a hash function is specified, I<hash_open> will attempt to determine if "
1170 "the hash function specified is the same as the one with which the database "
1171 "was created, and will fail if it is not."
1172 msgstr ""
1173
1174 #. type: Plain text
1175 #: build/C/man3/hash.3:149
1176 msgid ""
1177 "Backward-compatible interfaces to the routines described in B<dbm>(3), and "
1178 "B<ndbm>(3)  are provided, however these interfaces are not compatible with "
1179 "previous file formats."
1180 msgstr ""
1181
1182 #. type: Plain text
1183 #: build/C/man3/hash.3:156
1184 msgid ""
1185 "The I<hash> access method routines may fail and set I<errno> for any of the "
1186 "errors specified for the library routine B<dbopen>(3)."
1187 msgstr ""
1188
1189 #. type: Plain text
1190 #: build/C/man3/hash.3:158
1191 msgid "Only big and little endian byte order are supported."
1192 msgstr ""
1193
1194 #. type: Plain text
1195 #: build/C/man3/hash.3:163
1196 msgid "B<btree>(3), B<dbopen>(3), B<mpool>(3), B<recno>(3)"
1197 msgstr ""
1198
1199 #. type: Plain text
1200 #: build/C/man3/hash.3:166
1201 msgid ""
1202 "I<Dynamic Hash Tables>, Per-Ake Larson, Communications of the ACM, April "
1203 "1988."
1204 msgstr ""
1205
1206 #. type: Plain text
1207 #: build/C/man3/hash.3:169
1208 msgid ""
1209 "I<A New Hash Package for UNIX>, Margo Seltzer, USENIX Proceedings, Winter "
1210 "1991."
1211 msgstr ""
1212
1213 #. type: TH
1214 #: build/C/man3/mpool.3:34
1215 #, no-wrap
1216 msgid "MPOOL"
1217 msgstr ""
1218
1219 #. type: TH
1220 #: build/C/man3/mpool.3:34
1221 #, no-wrap
1222 msgid "2012-04-26"
1223 msgstr ""
1224
1225 #. type: Plain text
1226 #: build/C/man3/mpool.3:38
1227 msgid "mpool - shared memory buffer pool"
1228 msgstr ""
1229
1230 #. type: Plain text
1231 #: build/C/man3/mpool.3:42
1232 #, no-wrap
1233 msgid ""
1234 "B<#include E<lt>db.hE<gt>>\n"
1235 "B<#include E<lt>mpool.hE<gt>>\n"
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: build/C/man3/mpool.3:45
1240 #, no-wrap
1241 msgid ""
1242 "B<MPOOL *mpool_open(DBT *>I<key>B<, int >I<fd>B<, pgno_t >I<pagesize>B<, "
1243 "pgno_t >I<maxcache>B<);>\n"
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man3/mpool.3:49
1248 #, no-wrap
1249 msgid ""
1250 "B<void mpool_filter(MPOOL *>I<mp>B<, void (*pgin)(void *, pgno_t, void "
1251 "*),>\n"
1252 "B<                  void (*>I<pgout>B<)(void *, pgno_t, void *),>\n"
1253 "B<                  void *>I<pgcookie>B<);>\n"
1254 msgstr ""
1255
1256 #. type: Plain text
1257 #: build/C/man3/mpool.3:51
1258 #, no-wrap
1259 msgid "B<void *mpool_new(MPOOL *>I<mp>B<, pgno_t *>I<pgnoaddr>B<);>\n"
1260 msgstr ""
1261
1262 #. type: Plain text
1263 #: build/C/man3/mpool.3:53
1264 #, no-wrap
1265 msgid ""
1266 "B<void *mpool_get(MPOOL *>I<mp>B<, pgno_t >I<pgno>B<, unsigned int "
1267 ">I<flags>B<);>\n"
1268 msgstr ""
1269
1270 #. type: Plain text
1271 #: build/C/man3/mpool.3:55
1272 #, no-wrap
1273 msgid ""
1274 "B<int mpool_put(MPOOL *>I<mp>B<, void *>I<pgaddr>B<, unsigned int "
1275 ">I<flags>B<);>\n"
1276 msgstr ""
1277
1278 #. type: Plain text
1279 #: build/C/man3/mpool.3:57
1280 #, no-wrap
1281 msgid "B<int mpool_sync(MPOOL *>I<mp>B<);>\n"
1282 msgstr ""
1283
1284 #. type: Plain text
1285 #: build/C/man3/mpool.3:59
1286 #, no-wrap
1287 msgid "B<int mpool_close(MPOOL *>I<mp>B<);>\n"
1288 msgstr ""
1289
1290 #. type: Plain text
1291 #: build/C/man3/mpool.3:72
1292 msgid ""
1293 "I<Mpool> is the library interface intended to provide page oriented buffer "
1294 "management of files.  The buffers may be shared between processes."
1295 msgstr ""
1296
1297 #. type: Plain text
1298 #: build/C/man3/mpool.3:93
1299 msgid ""
1300 "The function B<mpool_open>()  initializes a memory pool.  The I<key> "
1301 "argument is the byte string used to negotiate between multiple processes "
1302 "wishing to share buffers.  If the file buffers are mapped in shared memory, "
1303 "all processes using the same key will share the buffers.  If I<key> is NULL, "
1304 "the buffers are mapped into private memory.  The I<fd> argument is a file "
1305 "descriptor for the underlying file, which must be seekable.  If I<key> is "
1306 "non-NULL and matches a file already being mapped, the I<fd> argument is "
1307 "ignored."
1308 msgstr ""
1309
1310 #. type: Plain text
1311 #: build/C/man3/mpool.3:104
1312 msgid ""
1313 "The I<pagesize> argument is the size, in bytes, of the pages into which the "
1314 "file is broken up.  The I<maxcache> argument is the maximum number of pages "
1315 "from the underlying file to cache at any one time.  This value is not "
1316 "relative to the number of processes which share a file's buffers, but will "
1317 "be the largest value specified by any of the processes sharing the file."
1318 msgstr ""
1319
1320 #. type: Plain text
1321 #: build/C/man3/mpool.3:120
1322 msgid ""
1323 "The B<mpool_filter>()  function is intended to make transparent input and "
1324 "output processing of the pages possible.  If the I<pgin> function is "
1325 "specified, it is called each time a buffer is read into the memory pool from "
1326 "the backing file.  If the I<pgout> function is specified, it is called each "
1327 "time a buffer is written into the backing file.  Both functions are called "
1328 "with the I<pgcookie> pointer, the page number and a pointer to the page to "
1329 "being read or written."
1330 msgstr ""
1331
1332 #. type: Plain text
1333 #: build/C/man3/mpool.3:133
1334 msgid ""
1335 "The function B<mpool_new>()  takes an I<MPOOL> pointer and an address as "
1336 "arguments.  If a new page can be allocated, a pointer to the page is "
1337 "returned and the page number is stored into the I<pgnoaddr> address.  "
1338 "Otherwise, NULL is returned and I<errno> is set."
1339 msgstr ""
1340
1341 #. type: Plain text
1342 #: build/C/man3/mpool.3:146
1343 msgid ""
1344 "The function B<mpool_get>()  takes an I<MPOOL> pointer and a page number as "
1345 "arguments.  If the page exists, a pointer to the page is returned.  "
1346 "Otherwise, NULL is returned and I<errno> is set.  The I<flags> argument is "
1347 "not currently used."
1348 msgstr ""
1349
1350 #. type: Plain text
1351 #: build/C/man3/mpool.3:158
1352 msgid ""
1353 "The function B<mpool_put>()  unpins the page referenced by I<pgaddr>.  "
1354 "I<pgaddr> must be an address previously returned by B<mpool_get>()  or "
1355 "B<mpool_new>().  The flag value is specified by ORing any of the following "
1356 "values:"
1357 msgstr ""
1358
1359 #. type: TP
1360 #: build/C/man3/mpool.3:158
1361 #, no-wrap
1362 msgid "B<MPOOL_DIRTY>"
1363 msgstr ""
1364
1365 #. type: Plain text
1366 #: build/C/man3/mpool.3:161
1367 msgid "The page has been modified and needs to be written to the backing file."
1368 msgstr ""
1369
1370 #. type: Plain text
1371 #: build/C/man3/mpool.3:164
1372 msgid "B<mpool_put>()  returns 0 on success and -1 if an error occurs."
1373 msgstr ""
1374
1375 #. type: Plain text
1376 #: build/C/man3/mpool.3:173
1377 msgid ""
1378 "The function B<mpool_sync>()  writes all modified pages associated with the "
1379 "I<MPOOL> pointer to the backing file.  B<mpool_sync>()  returns 0 on success "
1380 "and -1 if an error occurs."
1381 msgstr ""
1382
1383 #. type: Plain text
1384 #: build/C/man3/mpool.3:183
1385 msgid ""
1386 "The B<mpool_close>()  function free's up any allocated memory associated "
1387 "with the memory pool cookie.  Modified pages are B<not> written to the "
1388 "backing file.  B<mpool_close>()  returns 0 on success and -1 if an error "
1389 "occurs."
1390 msgstr ""
1391
1392 #. type: Plain text
1393 #: build/C/man3/mpool.3:190
1394 msgid ""
1395 "The B<mpool_open>()  function may fail and set I<errno> for any of the "
1396 "errors specified for the library routine B<malloc>(3)."
1397 msgstr ""
1398
1399 #. type: Plain text
1400 #: build/C/man3/mpool.3:196
1401 msgid "The B<mpool_get>()  function may fail and set I<errno> for the following:"
1402 msgstr ""
1403
1404 #. type: Plain text
1405 #: build/C/man3/mpool.3:199
1406 msgid "The requested record doesn't exist."
1407 msgstr ""
1408
1409 #. type: Plain text
1410 #: build/C/man3/mpool.3:211
1411 msgid ""
1412 "The B<mpool_new>()  and B<mpool_get>()  functions may fail and set I<errno> "
1413 "for any of the errors specified for the library routines B<read>(2), "
1414 "B<write>(2), and B<malloc>(3)."
1415 msgstr ""
1416
1417 #. type: Plain text
1418 #: build/C/man3/mpool.3:218
1419 msgid ""
1420 "The B<mpool_sync>()  function may fail and set I<errno> for any of the "
1421 "errors specified for the library routine B<write>(2)."
1422 msgstr ""
1423
1424 #. type: Plain text
1425 #: build/C/man3/mpool.3:225
1426 msgid ""
1427 "The B<mpool_close>()  function may fail and set I<errno> for any of the "
1428 "errors specified for the library routine B<free>(3)."
1429 msgstr ""
1430
1431 #. type: SH
1432 #: build/C/man3/mpool.3:225
1433 #, no-wrap
1434 msgid "CONFORMING TO"
1435 msgstr ""
1436
1437 #. type: Plain text
1438 #: build/C/man3/mpool.3:228
1439 msgid "Not in POSIX.1-2001.  Present on the BSDs."
1440 msgstr ""
1441
1442 #. type: Plain text
1443 #: build/C/man3/mpool.3:233
1444 msgid "B<btree>(3), B<dbopen>(3), B<hash>(3), B<recno>(3)"
1445 msgstr ""
1446
1447 #. type: TH
1448 #: build/C/man3/recno.3:34
1449 #, no-wrap
1450 msgid "RECNO"
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man3/recno.3:38
1455 msgid "recno - record number database access method"
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man3/recno.3:60
1460 msgid ""
1461 "The routine B<dbopen>(3)  is the library interface to database files.  One "
1462 "of the supported file formats is record number files.  The general "
1463 "description of the database access methods is in B<dbopen>(3), this manual "
1464 "page describes only the recno specific information."
1465 msgstr ""
1466
1467 #. type: Plain text
1468 #: build/C/man3/recno.3:69
1469 msgid ""
1470 "The record number data structure is either variable or fixed-length records "
1471 "stored in a flat-file format, accessed by the logical record number.  The "
1472 "existence of record number five implies the existence of records one through "
1473 "four, and the deletion of record number one causes record number five to be "
1474 "renumbered to record number four, as well as the cursor, if positioned after "
1475 "record number one, to shift down one record."
1476 msgstr ""
1477
1478 #. type: Plain text
1479 #: build/C/man3/recno.3:75
1480 msgid ""
1481 "The recno access method specific data structure provided to B<dbopen>(3)  is "
1482 "defined in the I<E<lt>db.hE<gt>> include file as follows:"
1483 msgstr ""
1484
1485 #. type: Plain text
1486 #: build/C/man3/recno.3:87
1487 #, no-wrap
1488 msgid ""
1489 "typedef struct {\n"
1490 "    unsigned long flags;\n"
1491 "    unsigned int  cachesize;\n"
1492 "    unsigned int  psize;\n"
1493 "    int           lorder;\n"
1494 "    size_t        reclen;\n"
1495 "    unsigned char bval;\n"
1496 "    char         *bfname;\n"
1497 "} RECNOINFO;\n"
1498 msgstr ""
1499
1500 #. type: Plain text
1501 #: build/C/man3/recno.3:91
1502 msgid "The elements of this structure are defined as follows:"
1503 msgstr ""
1504
1505 #. type: TP
1506 #: build/C/man3/recno.3:91
1507 #, no-wrap
1508 msgid "flags"
1509 msgstr ""
1510
1511 #. type: TP
1512 #: build/C/man3/recno.3:96
1513 #, no-wrap
1514 msgid "B<R_FIXEDLEN>"
1515 msgstr ""
1516
1517 #. type: Plain text
1518 #: build/C/man3/recno.3:107
1519 msgid ""
1520 "The records are fixed-length, not byte delimited.  The structure element "
1521 "I<reclen> specifies the length of the record, and the structure element "
1522 "I<bval> is used as the pad character.  Any records, inserted into the "
1523 "database, that are less than I<reclen> bytes long are automatically padded."
1524 msgstr ""
1525
1526 #. type: TP
1527 #: build/C/man3/recno.3:107
1528 #, no-wrap
1529 msgid "B<R_NOKEY>"
1530 msgstr ""
1531
1532 #. type: Plain text
1533 #: build/C/man3/recno.3:120
1534 msgid ""
1535 "In the interface specified by B<dbopen>(3), the sequential record retrieval "
1536 "fills in both the caller's key and data structures.  If the B<R_NOKEY> flag "
1537 "is specified, the I<cursor> routines are not required to fill in the key "
1538 "structure.  This permits applications to retrieve records at the end of "
1539 "files without reading all of the intervening records."
1540 msgstr ""
1541
1542 #. type: TP
1543 #: build/C/man3/recno.3:120
1544 #, no-wrap
1545 msgid "B<R_SNAPSHOT>"
1546 msgstr ""
1547
1548 #. type: Plain text
1549 #: build/C/man3/recno.3:126
1550 msgid ""
1551 "This flag requires that a snapshot of the file be taken when B<dbopen>(3)  "
1552 "is called, instead of permitting any unmodified records to be read from the "
1553 "original file."
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man3/recno.3:136
1558 msgid ""
1559 "A suggested maximum size, in bytes, of the memory cache.  This value is "
1560 "B<only> advisory, and the access method will allocate more memory rather "
1561 "than fail.  If I<cachesize> is 0 (no size is specified) a default cache is "
1562 "used."
1563 msgstr ""
1564
1565 #. type: Plain text
1566 #: build/C/man3/recno.3:148
1567 msgid ""
1568 "The recno access method stores the in-memory copies of its records in a "
1569 "btree.  This value is the size (in bytes) of the pages used for nodes in "
1570 "that tree.  If I<psize> is 0 (no page size is specified) a page size is "
1571 "chosen based on the underlying file system I/O block size.  See B<btree>(3)  "
1572 "for more information."
1573 msgstr ""
1574
1575 #. type: TP
1576 #: build/C/man3/recno.3:156
1577 #, no-wrap
1578 msgid "I<reclen>"
1579 msgstr ""
1580
1581 #. type: Plain text
1582 #: build/C/man3/recno.3:159
1583 msgid "The length of a fixed-length record."
1584 msgstr ""
1585
1586 #. type: TP
1587 #: build/C/man3/recno.3:159
1588 #, no-wrap
1589 msgid "I<bval>"
1590 msgstr ""
1591
1592 #. type: Plain text
1593 #: build/C/man3/recno.3:167
1594 msgid ""
1595 "The delimiting byte to be used to mark the end of a record for "
1596 "variable-length records, and the pad character for fixed-length records.  If "
1597 "no value is specified, newlines (\"\\en\") are used to mark the end of "
1598 "variable-length records and fixed-length records are padded with spaces."
1599 msgstr ""
1600
1601 #. type: TP
1602 #: build/C/man3/recno.3:167
1603 #, no-wrap
1604 msgid "I<bfname>"
1605 msgstr ""
1606
1607 #. type: Plain text
1608 #: build/C/man3/recno.3:177
1609 msgid ""
1610 "The recno access method stores the in-memory copies of its records in a "
1611 "btree.  If I<bfname> is non-NULL, it specifies the name of the btree file, "
1612 "as if specified as the filename for a B<dbopen>(3)  of a btree file."
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: build/C/man3/recno.3:195
1617 msgid ""
1618 "The data part of the key/data pair used by the I<recno> access method is the "
1619 "same as other access methods.  The key is different.  The I<data> field of "
1620 "the key should be a pointer to a memory location of type I<recno_t>, as "
1621 "defined in th I<E<lt>db.hE<gt>> include file.  This type is normally the "
1622 "largest unsigned integral type available to the implementation.  The I<size> "
1623 "field of the key should be the size of that type."
1624 msgstr ""
1625
1626 #. type: Plain text
1627 #: build/C/man3/recno.3:200
1628 msgid ""
1629 "Because there can be no metadata associated with the underlying recno access "
1630 "method files, any changes made to the default values (e.g., fixed record "
1631 "length or byte separator value) must be explicitly specified each time the "
1632 "file is opened."
1633 msgstr ""
1634
1635 #. type: Plain text
1636 #: build/C/man3/recno.3:208
1637 msgid ""
1638 "In the interface specified by B<dbopen>(3), using the I<put> interface to "
1639 "create a new record will cause the creation of multiple, empty records if "
1640 "the record number is more than one greater than the largest record currently "
1641 "in the database."
1642 msgstr ""
1643
1644 #. type: Plain text
1645 #: build/C/man3/recno.3:216
1646 msgid ""
1647 "The I<recno> access method routines may fail and set I<errno> for any of the "
1648 "errors specified for the library routine B<dbopen>(3)  or the following:"
1649 msgstr ""
1650
1651 #. type: Plain text
1652 #: build/C/man3/recno.3:220
1653 msgid ""
1654 "An attempt was made to add a record to a fixed-length database that was too "
1655 "large to fit."
1656 msgstr ""
1657
1658 #. type: Plain text
1659 #: build/C/man3/recno.3:227
1660 msgid "B<btree>(3), B<dbopen>(3), B<hash>(3), B<mpool>(3)"
1661 msgstr ""
1662
1663 #. type: Plain text
1664 #: build/C/man3/recno.3:231
1665 msgid ""
1666 "I<Document Processing in a Relational Database System>, Michael Stonebraker, "
1667 "Heidi Stettner, Joseph Kalash, Antonin Guttman, Nadene Lynn, Memorandum "
1668 "No. UCB/ERL M82/32, May 1982."
1669 msgstr ""