File: pdb.4

package info (click to toggle)
txt2pdbdoc 1.4.4-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 468 kB
  • ctags: 100
  • sloc: sh: 795; ansic: 533; perl: 298; makefile: 58
file content (114 lines) | stat: -rw-r--r-- 3,080 bytes parent folder | download
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.\" 
.\" Text-to-Doc converter for Palm Pilots
.\" pdb.4
.\" 
.\" Copyright (C) 1998  Paul J. Lucas
.\" 
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" 
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\" 
.\" ---------------------------------------------------------------------------
.\" define code-start macro
.de cS
.sp
.nf
.RS 5
.ft CW
.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i
..
.\" define code-end macro
.de cE
.ft 1
.RE
.fi
.sp
..
.\" ---------------------------------------------------------------------------
.TH "\f3PDB\f1" "4" "January 21, 2005" "txt2pdbdoc" ""
.SH "NAME"
PDB (Pilot Database) file format
.SH "SYNOPSIS"
.nf 
.ft CW
.ta 5 12 26
#define dmDBNameLength	32	/* 31 chars + 1 null terminator */

struct pdb_header {	/* 78 bytes total */
	char	name[ dmDBNameLength ];
	DWord	attributes;
	Word	version;
	DWord	create_time;
	DWord	modify_time;
	DWord	backup_time;
	DWord	modificationNumber;
	DWord	appInfoID;
	DWord	sortInfoID;
	char	type[4];
	char	creator[4];
	DWord	id_seed;
	DWord	nextRecordList;
	Word	numRecords;
};
.P
struct pdb_rec_header {	/* 8 bytes total */
	DWord	offset;
	struct {
		int delete	: 1;
		int dirty	: 1;
		int busy	: 1;
		int secret	: 1;
		int category	: 4;
	}	attributes;
	char	uniqueID[3];
}
.ft 1
.fi 
.SH "DESCRIPTION"
The PDB (Pilot Database) file format is used by all models
of the Palm Pilot and IBM Workpad.
The format consists of a header followed by a set of record headers
followed by the records themselves.
.SS Word Sizes
In the SYNOPSIS above, the types
``\f(CWByte\f1,''
``\f(CWWord\f1,'' and ``\f(CWDWord\f1''
are used just as in the Pilot headers.
The type ``\f(CWByte\f1'' is 8 bits;
``\f(CWWord\f1'' is 16 bits;
``\f(CWDWord\f1'' is 32 bits.
The latter two are in big\-endian format.
.SH "CAVEATS"
.TP 4
1.
The C structures given in the SYNOPSIS above are illustrative
and most likely will not work in actual C code
since compilers align data members on word boundaries.
.TP 
2.
The PDB file format presented here is not official and was written at
the time when PDB file format was not public. It is possibly outdated.
The official standard is available on the Palm web page. (SEE ALSO)
.SH "SEE ALSO"
txt2pdbdoc(1), html2pdbtxt(1), pdbtxt2html(1), doc(4)
.PP 
Palm Computing Inc.
.I Palm File Format Specification,
2000.
.br 
http://www.palmos.com/dev/support/docs/fileformats/front.html
.SH "AUTHOR"
Paul J. Lucas
.RI < pauljlucas@mac.com >
Updated by Erik Schanze
.RI < schanzi_@gmx.de >