File: pdb_AppendRecord.3

package info (click to toggle)
coldsync 2.2.5-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,824 kB
  • ctags: 1,660
  • sloc: ansic: 19,234; cpp: 1,854; perl: 1,377; yacc: 951; lex: 759; makefile: 445; sh: 176
file content (88 lines) | stat: -rw-r--r-- 2,172 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" pdb_AppendRecord.3
.\" 
.\" Copyright 2001, Andrew Arensburger.
.\" You may distribute this file under the terms of the Artistic
.\" License, as specified in the README file.
.\"
.\" $Id: pdb_AppendRecord.3,v 1.1 2001/11/20 14:35:19 arensb Exp $
.\"
.\" This man page uses the 'mdoc' formatting macros. If your 'man' uses
.\" the old 'man' package, you may run into problems.
.\"
.Dd Aug 16, 2001
.Dt pdb_AppendRecord 3
.Sh NAME
.Nm pdb_AppendRecord
.Nm pdb_AppendResource
.Nm pdb_InsertRecord
.Nm pdb_InsertResource
.Nd add records to a Palm database
.Sh LIBRARY
.Pa libpdb
.Sh SYNOPSIS
.Fd #include <pdb.h>
.Ft int
.Fn pdb_AppendRecord "struct pdb *db" "struct pdb_record *newrec"
.Ft int
.Fn pdb_AppendResource "struct pdb *db" "struct pdb_resource *newrsrc"
.Ft int
.Fn pdb_InsertRecord "struct pdb *db" "struct pdb_record *prev" "struct pdb_record *newrec"
.Ft int
.Fn pdb_InsertResource "struct pdb *db" "struct pdb_resource *prev" "struct pdb_resource *newrsrc"
.Sh DESCRIPTION
.Nm pdb_AppendRecord
appends the record pointed to by
.Fa newrec
to the database
.Fa db .
Note that
.Fa newrec
is not copied, so the caller must not free it.
.Pp
.Nm pdb_AppendResource
appends the resource pointed to by
.Fa newrsrc
to the database
.Fa db .
Note that
.Fa newrsrc
is not copied, so the caller must not free it.
.Pp
.Nm pdb_InsertRecord
adds the record pointed to by
.Fa newrec
into the database pointed to by
.Fa db ,
immediately after the record
.Fa prev .
If
.Fa prev
is NULL, the new record is inserted at the beginning of the database.
.Pp
.Nm pdb_InsertResource
adds the resource pointed to by
.Fa newrsrc
into the database pointed to by
.Fa db ,
immediately after the resource
.Fa prev .
If
.Fa prev
is NULL, the new resource is inserted at the beginning of the database.
.Sh RETURN VALUE
These functions return 0 if successful, or a negative value otherwise.
.Sh SEE ALSO
.Xr libpdb 3 ,
.Xr new_Record 3 ,
.Xr new_Resource 3 .
.Sh AUTHORS
.An Andrew Arensburger Aq arensb@ooblick.com
.Xr LIMITATIONS
.Nm pdb_InsertRecord
and
.Nm pdb_InsertResource
do not check whether
.Fa prev
is in
.Fa db .
It is strongly recommended that the caller not abuse this behavior.