summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/RESTORE/RT1.H
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/RESTORE/RT1.H')
-rw-r--r--v4.0/src/CMD/RESTORE/RT1.H273
1 files changed, 273 insertions, 0 deletions
diff --git a/v4.0/src/CMD/RESTORE/RT1.H b/v4.0/src/CMD/RESTORE/RT1.H
new file mode 100644
index 0000000..e9ab46f
--- /dev/null
+++ b/v4.0/src/CMD/RESTORE/RT1.H
@@ -0,0 +1,273 @@
1/*  0 */
2/*---------------------------------------------------------
3/*-
4/*- RESTORE Utility include file RT1.H
5/*-
6/*---------------------------------------------------------*/
7
8/****************************************************************************/
9/* This file contains equates for structure definitions used in RESTORE */
10/* utility. */
11/****************************************************************************/
12
13/***************************************************************************/
14/* dheadnew - structure of disk header in CONTROL.xxx, */
15/* used for new format only */
16/***************************************************************************/
17struct disk_header_new
18 {
19 BYTE dhlength; /* length, in byte , of disk header*/
20 BYTE id[8]; /* identifies disk as a backup */
21 BYTE sequence; /* backup diskette sequence num */
22 /* (binary 1-255) */
23 BYTE command[128]; /* save area for command line */
24 /* parameters. */
25 BYTE lastdisk; /* 0ffh if last targert 0 otherwise*/
26 };
27
28
29/***************************************************************************/
30/* dirblk - structure of directory blocks in CONTROL.xxx, */
31/* used for new format only */
32/***************************************************************************/
33struct dir_block
34 {
35 BYTE dblength; /* length, in bytes, of dir block */
36 BYTE path[63];
37 /* ascii path of this directory, */
38 /* drive letter omitted */
39 WORD numentry; /* num of filenames currently in list*/
40 DWORD nextdb; /* offset of next directory block */
41 }; /* =0xffff if last dir block */
42
43
44/***************************************************************************/
45/* fheadnew - structure of file header in CONTROL.xxx, */
46/* used for new format only */
47/***************************************************************************/
48#define EXT_ATTR_FLAG 4 /*;AN000;3*/
49
50struct file_header_new
51 {
52 BYTE fhlength; /* Length, in bytes, of file header */
53 BYTE fname[12]; /* ASCII file name (from directory)*/
54 BYTE flag; /* bit 0=1 if last part of file */
55 /* bit 1=1 if it is backed up successfully */
56 /* ;AN000;3 bit 2=1 if Extended Attributes are backed up (New for DOS4.00) */
57 DWORD flength; /* Total length of the file (from directory) */
58 WORD fsequenc; /* Sequence #, for files that span */
59 DWORD offset; /* Offset in BACKUP.xxx where this segment begins */
60 DWORD partsize; /* Length of part of file on current target */
61 WORD attrib; /* File attribute (from directory) */
62 WORD ftime; /* Time when file was last Revised (from directory)*/
63 WORD fdate; /* Date when file was last Revised (from directory)*/
64 DWORD FH_EA_offset; /*;AN000;3 Offset in BACKUP.xxx where extended attrib begin */
65 };
66
67/*----------------------------------*/
68/*- EXTENDED OPEN PARAMETER LIST -*/
69/*----------------------------------*/
70#define EXTATTBUFLEN 4086 /*;AN000;3*/
71 struct parm_list /*;AN000;3*/
72 { /*;AN000;3*/
73 DWORD ext_attr_addr; /*;AN000;3*/
74 WORD num_additional; /*;AN000;3*/
75 }; /*;AN000;3*/
76
77
78
79
80
81
82
83
84
85
86/**************************************************************************/
87/* Fheadold - structure of file header, used for old format only. */
88/* There are 128 bytes totally in file header of the old */
89/* format backup disk. Only the first 85 bytes contains */
90/* meaningful information. */
91/* This is the structure attached to the beginning of every */
92/* file backed up with DOS 2.0 through 3.2 inclusive. */
93/**************************************************************************/
94struct file_header_old
95 {
96 BYTE headflg; /* 0FFh is last sequence of file, 00h if not last*/
97 BYTE disknum[2]; /* file sequence number */
98 BYTE fill1[2]; /* not used */
99 BYTE wherefrom [78]; /* asciiz path and name without drive letter*/
100 unsigned pathlen; /* length of previous field, not used in this program*/
101 char garbage[50]; /* Filler */
102 };
103
104
105
106
107/***************************************************************************/
108/* dheadold - structure of disk informtion, used by old format only. */
109/* There are 128 bytes totally in disk header of the old */
110/* format backup disk. Only the first 7 bytes contains */
111/* meaningful information. */
112/* This is the BACKUPID.@@@ file */
113/***************************************************************************/
114
115struct disk_header_old
116 {
117 BYTE diskflag; /* 0FFh if last disk, 00h if not last disk. */
118 /* initialize it to 0FFh when BACKUP.@@@ is created,*/
119 /* and zero it out when the disk is full */
120 BYTE disknum[2]; /* Sequence number of the disk. Least significant*/
121 /* byte first. */
122 BYTE diskyear[2]; /* Year, LSB first. */
123 BYTE diskday; /* Month (1 byte) and day (1 byte). */
124 BYTE diskmonth; /* Month (1 byte) and day (1 byte). */
125 };
126
127
128/***************************************************************************/
129/* timedate- structure of buffer to hold time and date data */
130/***************************************************************************/
131struct timedate {
132 unsigned int earlier_hour;
133 unsigned int earlier_minute;
134 unsigned int earlier_second;
135 unsigned int later_hour;
136 unsigned int later_minute;
137 unsigned int later_second;
138 unsigned int before_year;
139 unsigned int before_month;
140 unsigned int before_day;
141 unsigned int after_year;
142 unsigned int after_month;
143 unsigned int after_day;
144};
145/***************************************************************************/
146/* fsinfo - structure of buffer returned from dosqsinfo */
147/***************************************************************************/
148struct fsinfo { /* file system information */
149 unsigned long file_system_id; /* file system ID 4 */
150 unsigned long sectors_per_alloc_unit; /* sectors per allocation unit 4 */
151 unsigned long number_of_alloc_unit; /* number of allocation unit 4 */
152 unsigned long available_alloc_unit; /* available allocatuib unit 4 */
153 unsigned bytes_per_sector; /* number of bytes per sectors 2 */
154}; /* total byte size = 18 */
155
156#define FSINFO_BYTES sizeof(struct fsinfo) /* total # of bytes for BPB */
157
158/***************************************************************************/
159/* internat - structure of buffer returned from get country information */
160/***************************************************************************/
161struct internat {
162unsigned country_code; /* country code */
163unsigned code_page; /* country code page */
164unsigned dtformat; /* time date format */
165 /* 0-usa 1-eur 2-jap */
166BYTE currency_sym, /* Currency Symbol 5 bytes */
167 r1,
168 r2,
169 r3;
170BYTE r4; /* null terminated */
171BYTE thous_sep, /* Thousands separator 2 bytes */
172 r5; /* null terminated */
173BYTE decimal_sep, /* Decimal separator 2 bytes */
174 r6; /* null terminated */
175BYTE datesep, /* Date separator 2 bytes */
176 r7; /* null terminated */
177BYTE timesep, /* Time separator 2 bytes */
178 r8; /* null terminated */
179BYTE bit_field; /* Bit values */
180 /* Bit 0 = 0 if currency symbol first */
181 /* = 1 if currency symbol last */
182 /* Bit 1= 0 if No space after currency symbol*/
183 /* = 1 if space after currency symbol */
184BYTE currency_cents; /* Number of places after currency dec point*/
185BYTE tformat; /* 1 if 24 hour time, 0 if 12 hour time */
186unsigned long map_call; /* Address of case mapping call (DWORD) */
187 /* in real mode compatibility API */
188BYTE data_sep, /* Data list separator character */
189 r9; /* null terminated */
190unsigned ra[ 5 ]; /* reserved */
191} ;
192
193
194/***************************************************************************/
195/* Finfo - structure of file information, used for both old format and */
196/* new format. It contains the information which is common */
197/* between new and old. */
198/***************************************************************************/
199struct file_info
200 {
201 BYTE fname[MAXFSPEC+1]; /* ASCII, filename and file extension.*/
202 BYTE path[MAXPATH+1]; /* ASCII, file path, always started with \ */
203 /* and not end with \ */
204 BYTE fflag; /* last disk in case of file expanded */
205 /* bit 0 = 1 if last part of file */
206 /* In old format file header, its 0ffh if last. */
207 /* The old format has to be converted into bit0=1.*/
208 unsigned dnum; /* sequence number of the file. For file that span */
209 unsigned attrib; /* file attribute */
210 unsigned ftime; /* time when the file was created */
211 unsigned fdate; /* date when the file was created */
212 unsigned long partsize; /* part size of the file */
213 unsigned long offset; /* offset of the file in backup.xxx */
214 BYTE curdir[MAXPATH]; /* current directory of the destination disk.*/
215 /* The current directory usually is maintained to be*/
216 /* the directory that reside the file to be restored*/
217 DWORD ea_offset; /*;AN000;3 Offset in BACKUP.xxx where extended attrib begin */
218};
219
220/****************************************************************************/
221/* dfinfo - destination file information, if the destination file */
222/* is exist. Structure of file information, used for both old */
223/* format and new format. It contains the information which is*/
224/* common between new and old. */
225/****************************************************************************/
226struct dfile_info {
227BYTE fname[12]; /* ASCII, filename and file extension.*/
228BYTE path[64]; /* ASCII, file path, always started with \ and */
229 /* not end with \ */
230BYTE fflag; /* last disk in case of file expanded */
231 /* bit 0 = 1 if last part of file */
232 /* In old format file header, its 0ffh if last. */
233 /* The old format has to be converted into bit0=1.*/
234unsigned short dnum; /* sequence number of the file. For file that span */
235unsigned attrib; /* file attribute */
236unsigned ftime; /* time when the file was created */
237unsigned fdate; /* date when the file was created */
238BYTE *curdir; /* current directory of the destination disk. */
239 /* The current directory usually is maintained to be */
240 /* the directory that reside the file to be restored */
241};
242
243/***************************************************************************/
244/* dinfo - structure of disk information, used for both old format and */
245/* new format. It contains the information which is common */
246/* between new and old. */
247/***************************************************************************/
248struct disk_info {
249BYTE dflag; /* last backup disk or not */
250 /* Its 0ffh if last. 00h otherwise */
251BYTE disknum; /* sequence number of the file. For file that span */
252};
253 struct subst_list /*;AN000;6 */
254 { /*;AN000;6 */
255 BYTE sl_size1; /* Size of List */ /*;AN000;6 */
256 BYTE zero1; /* Reserved */ /*;AN000;6 */
257 char far *value1; /* Time, date, or ptr to data item*/ /*;AN000;6 */
258 BYTE one; /* n of %n */ /*;AN000;6 */
259 BYTE flags1; /* Data Type flags */ /*;AN000;6 */
260 BYTE max_width1; /* Maximum FIELD width */ /*;AN000;6 */
261 BYTE min_width1; /* Minimum FIELD width */ /*;AN000;6 */
262 BYTE pad_char1; /* Character for pad FIELD */ /*;AN000;6 */
263
264 BYTE sl_size2; /* Size of List */ /*;AN000;6 */
265 BYTE zero2; /* Reserved */ /*;AN000;6 */
266 char far *value2; /* Time; date; or ptr to data item*/ /*;AN000;6 */
267 BYTE two; /* n of %n */ /*;AN000;6 */
268 BYTE flags2; /* Data Type flags */ /*;AN000;6 */
269 BYTE max_width2; /* Maximum FIELD width */ /*;AN000;6 */
270 BYTE min_width2; /* Minimum FIELD width */ /*;AN000;6 */
271 BYTE pad_char2; /* Character for pad FIELD */ /*;AN000;6 */
272 }; /*;AN000;6 */
273