dbm.3 (108037) | dbm.3 (108087) |
---|---|
1.\" Copyright (c) 1999 Tim Singletary 2.\" No copyright is claimed. 3.\" 4.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 5.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 8.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 9.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 10.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 11.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 12.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 13.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 14.\" SUCH DAMAGE. 15.\" | 1.\" Copyright (c) 1999 Tim Singletary 2.\" No copyright is claimed. 3.\" 4.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 5.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 8.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 9.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 10.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 11.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 12.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 13.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 14.\" SUCH DAMAGE. 15.\" |
16.\" $FreeBSD: head/lib/libc/db/man/dbm.3 108037 2002-12-18 12:45:11Z ru $ | 16.\" $FreeBSD: head/lib/libc/db/man/dbm.3 108087 2002-12-19 09:40:28Z ru $ |
17.\" 18.\" Note: The date here should be updated whenever a non-trivial 19.\" change is made to the manual page. 20.Dd July 7, 1999 21.Dt DBM 3 22.Os 23.Sh NAME 24.Nm dbm_clearerr , --- 47 unchanged lines hidden (view full) --- 72 int dsize; 73} datum; 74.Ed 75.Pp 76The 77.Fn dbm_open base flags mode 78function 79opens or creates a database. | 17.\" 18.\" Note: The date here should be updated whenever a non-trivial 19.\" change is made to the manual page. 20.Dd July 7, 1999 21.Dt DBM 3 22.Os 23.Sh NAME 24.Nm dbm_clearerr , --- 47 unchanged lines hidden (view full) --- 72 int dsize; 73} datum; 74.Ed 75.Pp 76The 77.Fn dbm_open base flags mode 78function 79opens or creates a database. |
80The |
|
80.Fa base | 81.Fa base |
82argument |
|
81is the basename of the file containing 82the database; the actual database has a 83.Pa .db 84suffix. 85I.e., if 86.Fa base 87is 88.Qq Li /home/me/mystuff 89then the actual database is in the file 90.Pa /home/me/mystuff.db . | 83is the basename of the file containing 84the database; the actual database has a 85.Pa .db 86suffix. 87I.e., if 88.Fa base 89is 90.Qq Li /home/me/mystuff 91then the actual database is in the file 92.Pa /home/me/mystuff.db . |
93The |
|
91.Fa flags 92and 93.Fa mode | 94.Fa flags 95and 96.Fa mode |
97arguments |
|
94are passed to 95.Xr open 2 . 96.Pq Dv O_RDWR | O_CREAT 97is a typical value for 98.Fa flags ; 99.Li 0660 100is a typical value for 101.Fa mode . --- 22 unchanged lines hidden (view full) --- 124.Fn dbm_close 125function 126normally returns zero. 127.Pp 128The 129.Fn dbm_store db key data flags 130function 131inserts or replaces an entry in the database. | 98are passed to 99.Xr open 2 . 100.Pq Dv O_RDWR | O_CREAT 101is a typical value for 102.Fa flags ; 103.Li 0660 104is a typical value for 105.Fa mode . --- 22 unchanged lines hidden (view full) --- 128.Fn dbm_close 129function 130normally returns zero. 131.Pp 132The 133.Fn dbm_store db key data flags 134function 135inserts or replaces an entry in the database. |
136The |
|
132.Fa flags | 137.Fa flags |
138argument |
|
133is either 134.Dv DBM_INSERT 135or 136.Dv DBM_REPLACE . 137If 138.Fa flags 139is 140.Dv DBM_INSERT --- 88 unchanged lines hidden --- | 139is either 140.Dv DBM_INSERT 141or 142.Dv DBM_REPLACE . 143If 144.Fa flags 145is 146.Dv DBM_INSERT --- 88 unchanged lines hidden --- |