summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/RESTORE/RT.H
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/RESTORE/RT.H')
-rw-r--r--v4.0/src/CMD/RESTORE/RT.H272
1 files changed, 272 insertions, 0 deletions
diff --git a/v4.0/src/CMD/RESTORE/RT.H b/v4.0/src/CMD/RESTORE/RT.H
new file mode 100644
index 0000000..86a3bec
--- /dev/null
+++ b/v4.0/src/CMD/RESTORE/RT.H
@@ -0,0 +1,272 @@
1/*  0 */
2/*---------------------------------------------------------
3/*-
4/*- RESTORE Utility include file RT.H
5/*-
6/*---------------------------------------------------------*/
7
8
9/****************************************************************************/
10/* This file contains equates for RESTORE utility */
11/* The equates for messages can be found in rt2.h */
12/****************************************************************************/
13
14#define BYTE unsigned char
15#define WORD unsigned short
16#define DWORD unsigned long
17
18#define NOERROR 0
19#define CARRY 0x0001 /*;AN000;*/
20
21
22/*******************************************/
23/* Lengths of CONTROL.xxx structures */
24/*******************************************/
25#define DHEADLEN 139 /* length of new format disk header */
26#define DIRBLKLEN 70 /* length of new format dir block */
27#define FHEADLEN34 38 /*;AN000;3 Length of new format file header */ /* !wrw */
28#define FHEADLEN33 34 /* length of DOS 3.3 file header */ /* !wrw */
29
30/****************************************************************************/
31/* The following group of definitions are used to set and test the restore */
32/* switch flags. */
33/****************************************************************************/
34
35#define PROMPT 1 /* Prompt user before restoring hidden and */
36 /* read-only files. */
37#define SUB 2 /* Restore all subdirectories too */
38#define BEFORE 4 /* Only restore files written before a date */
39#define AFTER 8 /* Only restore files written after a date */
40#define EARLIER 16 /* Only restore files written earlier then a time*/
41#define LATER 32 /* Only restore files written later than a time */
42#define Revised 64 /* Only restore files that have changed */
43#define NOTEXIST 128 /* Only restore files that no longer exist on */
44 /* the destination drive. */
45
46
47/****************************************************************************/
48/* The following group of definitions are used to set and test the */
49/* restore control flags:control_flag. */
50/****************************************************************************/
51
52#define WILDCARD 1 /* Wildcards in input filespec */
53#define OLDNEW 2 /* indicate old format or new format */
54#define CREATIT 4 /* Restore file does not exist on dest disk */
55#define FOUND 8 /* Found a file to restore */
56#define SPLITFILE 16 /* File was backed up onto 2 or more disks */
57#define SWITCHES 32 /* There are switches set */
58#define SHARERROR 64 /* There is a file not restored due to */
59 /* sharing error */
60#define PARTIAL 128 /* Set if file partially restored */
61
62/****************************************************************************/
63/* The following group of definitions are used to set and test the restore */
64/* control flags:control_flag2 */
65/****************************************************************************/
66
67#define SPLITCTL 1 /* Indicate whether control.xxx is larger */
68 /* then MAXCTRL */
69#define RTSYSTEM 2 /* The file to be restore is system file */
70 /* it has to be restored contiguously */
71#define COUNTRY 4 /*when the bit is on, country info is available */
72#define CPPC 8 /* bit = 1 when CP/DOS, otherwise, PC/DOS */
73#define SRC_HDISK 16 /* bit = 1 when the source disk is harddisk */
74#define TAR_HDISK 32 /* bit = 1 when the target disk is harddisk */
75#define OUTOF_SEQ 64 /* bit = 1 when the disk is out of sequence */
76/****************************************************************************/
77/* Miscelleneous definitions */
78/****************************************************************************/
79#define ON 1 /* the tested bit is on*/
80#define OFF 0 /* the tested bit is off */
81
82#define BACKUPID "BACKUPID.@@@" /* Used to reference that file */
83#define HEADLEN 128 /* Backup file header length */
84#define MAXARGS 11 /* Max # of arguments */
85#define MINARGS 1 /* Minimum # of arguments */
86#define MAXBUF 0xffff /* Max size of buf */
87#define DOWNSIZE 512 /* Amount to decrement memory request size */
88 /* by when doing a series of mallocs. */
89#define MAXPATH 65 /* Length of space allocate for path names */
90#define MAXFNAME 9 /* Max length of file name */
91#define MAXFEXT 4 /* Max length of file extension */
92#define MAXFSPEC 13 /* Max length of file spec. */
93#define MAXPATHF 78 /* Max length of path and file spec */
94#define MAXYEARLEN 4 /* Max length of string that represent year */
95#define MAXMONTHLEN 2 /* Max length of string that represent month */
96#define MAXDAYLEN 2 /* Max length of string that represent day */
97#define MINYEAR 1980 /* Min value of input year */
98#define MAXYEAR 2079 /* Max value of input year */
99#define MAXMONTH 12 /* Max value of input year */
100#define MAXDAY 31 /* Max value of input year */
101#define MAXHOURLEN 2 /* Max length of string that represent hour */
102#define MAXMINUTELEN 2 /* Max length of string that represent minute*/
103#define MAXSECONDLEN 2 /* Max length of string that represent second*/
104#define NUL 0 /* The null character */
105#define NULLC '\000' /* The null character */
106#define MAXCTRL 3072 /* size of buffer to contain control.xxx */
107#define BKIDLENG 7 /* the lenght of old format disk header */
108#define NEWBKIDLENG 139 /* the length of new format disk header */
109#define NOTV 0x16 /* all file attrs except vol id */
110#define ON 1 /* the tested bit is on*/
111#define OFF 0 /* the tested bit is off */
112#define TRUE 0 /* return code, no error */
113#define FALSE 1 /* return code, there is an error */
114#define TTRUE 1 /* return code, no error */
115#define FFALSE 0 /* return code, there is an error */
116#define LAST_PART 0x01 /* the flag in finfo->fflag */
117 /* if on, the file is last part of a file */
118#define COMPLETE_BIT 0x02 /* the complete bit in fheadnew->flag */
119 /* if on, the file was backed up sucessfully */
120#define USA 0
121#define EUR 1
122#define JAP 2
123#define INSTALL_SIGNAL 2 /* active signal handler routine */
124#define DEACTIVE_SIGNAL 1 /* ignor signals */
125#define CTRL_C 1 /* control_c signal */
126#define CTRL_BREAK 4 /* control break signal */
127
128/****************************************************************************/
129/* Defines for common subroutines - comgetarg and computmsg */
130/****************************************************************************/
131
132#define RESPDATA_SIZE 1 /* size of the respdata */
133#define STND_IN_DEV 0 /* standard out device */
134#define STND_OUT_DEV 1 /* standard out device */
135#define STND_ERR_DEV 2 /* standard error device */
136#define NO_RESPTYPE 0 /*response type is no user */
137 /*interaction */
138#define ANY_KEY_RESPTYPE 1 /*response type is ask user to enter*/
139 /*any key. */
140#define ENTER_Y 0 /*user enter yes as response */
141#define ENTER_N 1 /*user enter no as response */
142
143/****************************************************************************/
144/* Defines for convert date format */
145/****************************************************************************/
146
147#define HRSHIFT 11 /* shift 11 bits to get the value of hour */
148#define HRMASK 0x1F /* mask to get the value of hour */
149#define MNSHIFT 5 /* shift 5 bits to get the value of minute */
150#define MNMASK 0x3F /* mask to get the value of minute */
151#define SCMASK 0x1F /* mask to get the value of second */
152#define MOSHIFT 5 /* shift 5 bits to get the value of month */
153#define MOMASK 0x0F /* mask to get the value of month */
154#define DYMASK 0x1F /* shift 9 bits to get the value of day */
155#define YRSHIFT 9 /* mask to get the value of day */
156#define YRMASK 0x7F /* mask to get the value of year */
157#define USA 0
158#define EUR 1
159#define JAP 2
160#define LOYR 1980
161
162/****************************************************************************/
163/* Defines for subroutine set_reset_test_flag */
164/****************************************************************************/
165#define SET 0
166#define RESET 1
167#define TEST 2
168
169/****************************************************************************/
170/* Defines for file attribut byte */
171/****************************************************************************/
172#define READONLY 1 /*the file is marked read only */
173#define HIDDEN 2 /*the file is marked hidden file */
174#define SYSTEM 4 /*the file is marked system file */
175#define VOLUME 8 /*the entry contains a volume label */
176#define SUBDIR 16 /*the entry is a subdirectory name */
177#define ARCHIVE 32 /*the archieve bit of the file */
178
179/****************************************************************************/
180/* Defines for PCDOS return levels */
181/****************************************************************************/
182
183#define PC_NORMAL 0
184 /* Normal completion */
185#define PC_NOFILES 1
186 /* no fl were found to restore */
187#define PC_SHARERR 2
188 /* Some file not restored due to sharing error */
189#define PC_TUSER 3
190 /* Terminated by user */
191#define PC_OTHER 4
192 /* Terminated by user */
193/****************************************************************************/
194/* Defines for CPDOS return codes */
195/****************************************************************************/
196
197#define NORMAL NO_ERROR
198 /* Normal completion */
199#define NOFILES ERROR_FILE_NOT_FOUND
200 /* no fl were found to restore */
201#define SHARERR ERROR_SHARING_VIOLATION
202 /* Some file not restored due to sharing error */
203#define TUSER 1026
204 /* Terminated by user */
205#define INSUFMEM ERROR_NOT_ENOUGH_MEMORY
206 /* insufficient memory */
207#define NOBACKUPFILE 1027
208 /* source does not contain bk file*/
209#define INVALIDPARM ERROR_INVALID_PARAMETER
210 /* invalid parmameter */
211#define INVALIDDRIVE ERROR_INVALID_DRIVE
212 /* invalid drive */
213#define FILESEQERROR 1028
214 /* file seq error */
215#define TARGETFULL ERROR_DISK_FULL
216 /* target disk is full */
217#define UNEXPECTED 999
218 /* unexpected error */
219#define CREATIONERROR 1029
220 /* file creation error */
221 /************************************************/
222 /* Substitution List for Message Retriever */
223 /************************************************/
224/*-----------------------
225; SUBLIST Equates
226;------------------------*/
227#define SUBLIST_SIZE 11 /*;AN000;6 */
228
229#define LEFT_ALIGN 0x0 /*;AN000;6 00xxxxxx */
230#define RIGHT_ALIGN 0x80 /*;AN000;6 10xxxxxx */
231
232#define CHAR_FIELD_CHAR 0x0 /*;AN000;6 a0000000 */
233#define CHAR_FIELD_ASCIIZ 0x10 /*;AN000;6 a0010000 */
234
235#define UNSGN_BIN_BYTE 0x11 /*;AN000;6 a0010001 - Unsigned BINary to Decimal CHARacter */
236#define UNSGN_BIN_WORD 0x21 /*;AN000;6 a0100001 */
237#define UNSGN_BIN_DWORD 0x31 /*;AN000;6 a0110001 */
238
239#define SGN_BIN_BYTE 0x12 /*;AN000;6 a0010010 - Signed BINary to Decimal CHARacter */
240#define SGN_BIN_WORD 0x22 /*;AN000;6 a0100010 */
241#define SGN_BIN_DWORD 0x32 /*;AN000;6 a0110010 */
242
243#define BIN_HEX_BYTE 0x13 /*;AN000;6 a0010011 - Unsigned BINary to Hexidecimal CHARacter */
244#define BIN_HEX_WORD 0x23 /*;AN000;6 a0100011 */
245#define BIN_HEX_DWORD 0x33 /*;AN000;6 a0110011 */
246
247
248#define DATE_MDY_4 0x34 /*;AN000;6 MONTH,DAY AND YEAR (4 DIGITS)*/
249/*------------------------------------*/
250/*- MESSAGE CLASSES -*/
251/*------------------------------------*/
252#define EXTENDED 1 /*;AN000;6*/
253#define PARSEERROR 2 /*;AN000;6*/
254#define UTIL_MSG -1 /*;AN000;6*/
255
256#define CR 0x0d /*;AN000;6*/
257#define LF 0x0a /*;AN000;6*/
258/*-------------------------------
259/*- INT 21h
260/*-------------------------------*/
261#define SETLOGICALDRIVE 0x440f /*;AN000;8*/
262
263#define INSTALL_CHECK 0xB700 /*;AN000;2*/
264#define NOT_INSTALLED 0 /*;AN000;2*/
265#define GET_APPEND_VER 0xB702 /*;AN000;2*/
266#define NET_APPEND 1 /*;AN000;2*/
267#define DOS_APPEND 2 /*;AN000;2*/
268#define GET_STATE 0xB706 /*;AN000;2*/
269#define SET_STATE 0xB707 /*;AN000;2*/
270
271#define APPEND_X_BIT 0x8000 /*;AN000;2*/
272