1 | UNIT Unit3_data;
|
---|
2 | INTERFACE
|
---|
3 | USES Classes, SQLiteTable3;
|
---|
4 |
|
---|
5 | VAR
|
---|
6 | DB: TSQLiteDatabase;
|
---|
7 |
|
---|
8 | CONST
|
---|
9 | version:String='v0.19a';
|
---|
10 | dbversion:String='0.1';
|
---|
11 | CrLf:String[2]=#13+#10;
|
---|
12 |
|
---|
13 | TYPE
|
---|
14 | Tdata=Array OF Byte;
|
---|
15 | Theader=PACKED RECORD
|
---|
16 | Ident:Array[0..$13] OF Byte;
|
---|
17 | Files:LongWord;
|
---|
18 | NamedFiles:LongWord;
|
---|
19 | Extensions:LongWord;
|
---|
20 | DataAddr:LongWord;
|
---|
21 | DataSize:LongWord;
|
---|
22 | NamesAddr:LongWord;
|
---|
23 | NamesSize:LongWord;
|
---|
24 | Ident2:Array[0..$F] OF Byte;
|
---|
25 | END;
|
---|
26 | Tfilesmap=Array OF PACKED RECORD
|
---|
27 | Extension:Array[0..$3] OF Char;
|
---|
28 | DataAddr:LongWord;
|
---|
29 | NameAddr:LongWord;
|
---|
30 | FileSize:LongWord;
|
---|
31 | FileType:LongWord;
|
---|
32 | END;
|
---|
33 | Tfiles=Array OF PACKED RECORD
|
---|
34 | FileName:String;
|
---|
35 | Extension:String[4];
|
---|
36 | Name:String;
|
---|
37 | Size:LongWord;
|
---|
38 | FileType:LongWord;
|
---|
39 | DatAddr:LongWord;
|
---|
40 | opened:Boolean;
|
---|
41 | END;
|
---|
42 |
|
---|
43 | Tnamedfilesmap=Array OF PACKED RECORD
|
---|
44 | FileNumber:LongWord;
|
---|
45 | blubb:LongWord;
|
---|
46 | END;
|
---|
47 | Textensionsmap=Array OF PACKED RECORD
|
---|
48 | Ident:Array[0..$7] OF Byte;
|
---|
49 | Extension:Array[0..$3] OF Char;
|
---|
50 | ExtCount:LongWord;
|
---|
51 | END;
|
---|
52 |
|
---|
53 | TAppSettings=RECORD
|
---|
54 | DatPath:String[250];
|
---|
55 | ExtractPath:String[250];
|
---|
56 | END;
|
---|
57 |
|
---|
58 | TExportHandlers=RECORD
|
---|
59 | Ext:String[4];
|
---|
60 | needed:Boolean;
|
---|
61 | Handler:Function(fileid:LongWord; convert:Boolean):Integer;
|
---|
62 | END;
|
---|
63 |
|
---|
64 | TStringList=Array OF String;
|
---|
65 |
|
---|
66 | VAR
|
---|
67 | opened_state:Byte=0;
|
---|
68 | dat_filename:String='';
|
---|
69 | raw_filename:String='';
|
---|
70 | dat_header:Theader;
|
---|
71 | dat_filesmap:Tfilesmap;
|
---|
72 | dat_files:Tfiles;
|
---|
73 | dat_namedfilesmap:Tnamedfilesmap;
|
---|
74 | dat_extensionsmap:Textensionsmap;
|
---|
75 | AppSettings:TAppSettings;
|
---|
76 | AppSettingsFile:File OF TAppSettings;
|
---|
77 |
|
---|
78 | database_level:LongWord;
|
---|
79 | database_ident:Array[0..$13] OF Byte;
|
---|
80 |
|
---|
81 | CONST
|
---|
82 | header_ident1:Array[0..$13] OF Byte=
|
---|
83 | ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
|
---|
84 | header_ident2:Array[0..$F] OF Byte=
|
---|
85 | ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
|
---|
86 |
|
---|
87 | export_noerror:Integer=0;
|
---|
88 | export_nohandler:Integer=1;
|
---|
89 | export_handlererror:Integer=2;
|
---|
90 | export_error:Integer=3;
|
---|
91 |
|
---|
92 | opened_nothing:Byte=0;
|
---|
93 | opened_dat:Byte=1;
|
---|
94 | opened_db:Byte=2;
|
---|
95 |
|
---|
96 | IMPLEMENTATION
|
---|
97 |
|
---|
98 | END.
|
---|
99 |
|
---|