summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/RESTORE/RTT1.C
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/CMD/RESTORE/RTT1.C
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/CMD/RESTORE/RTT1.C')
-rw-r--r--v4.0/src/CMD/RESTORE/RTT1.C79
1 files changed, 79 insertions, 0 deletions
diff --git a/v4.0/src/CMD/RESTORE/RTT1.C b/v4.0/src/CMD/RESTORE/RTT1.C
new file mode 100644
index 0000000..7b75f75
--- /dev/null
+++ b/v4.0/src/CMD/RESTORE/RTT1.C
@@ -0,0 +1,79 @@
1
2/*----------------------------
3/* SOURCE FILE NAME: RTT1.C
4/*----------------------------
5/*  0 */
6
7#include "rt.h"
8#include "rt1.h"
9#include "rt2.h"
10#include "restpars.h" /*;AN000;4*/
11#include "dos.h" /*;AN000;2*/
12#include "comsub.h" /* common subroutine def'n */
13#include "doscalls.h"
14#include "error.h"
15
16extern BYTE destddir[MAXPATH+3];
17extern BYTE srcddir[MAXPATH+3];
18extern BYTE rtswitch;
19extern BYTE control_flag;
20extern BYTE control_flag2;
21extern BYTE filename[12];
22extern unsigned control_file_handle; /* !wrw */
23extern BYTE append_indicator; /*;AN000;2*/
24extern WORD original_append_func; /*;AN000;2*/
25
26/** ***********************************************/
27/*
28/* SUBROUTINE NAME: check_appendX
29/*
30/* FUNCTION:
31/* Check APPEND /X status. If it is not active,
32/* do nothing. If it is active, then turn it off
33/* and set flag indicating that we must reset it later.
34/*
35/***************************************************/
36void check_appendX() /*;AN000;2*/
37{ /*;AN000;2*/
38 union REGS gregs; /*;AN000;2 Register set */
39
40 gregs.x.ax = INSTALL_CHECK; /*;AN000;2 Get installed state*/
41 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
42
43 /*****************************************************/
44 /* 1) See if append is active
45 /* 2) If so, figure out if PCDOS or PCNET version
46 /*****************************************************/
47 if (gregs.h.al == 0) /*;AN000;2 Zero if not installed*/
48 append_indicator = NOT_INSTALLED; /*;AN000;2 */
49 else /*;AN000;2 See which APPEND it is*/
50 { /*;AN000;2*/
51 gregs.x.ax = GET_APPEND_VER; /*;AN000;2*/
52 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
53
54 if (gregs.h.al == (BYTE)-1) /*;AN000;2 -1 if PCDOS version*/
55 append_indicator = DOS_APPEND; /*;AN000;2*/
56 else /*;AN000;2*/
57 append_indicator = NET_APPEND; /*;AN000;2*/
58 } /*;AN000;2*/
59
60 /*****************************************************/
61 /* If it is the PCDOS append
62 /* 1) Get the current append functions (returned in BX)
63 /* 2) Reset append with /X support off
64 /*****************************************************/
65 if (append_indicator == DOS_APPEND) /*;AN000;2*/
66 { /*;AN000;2*/
67 gregs.x.ax = GET_STATE; /*;AN000;2 Get active APPEND functions*/
68 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
69 original_append_func = gregs.x.bx; /*;AN000;2*/
70
71 gregs.x.ax = SET_STATE; /*;AN000;2*/
72 gregs.x.bx = gregs.x.bx & (!APPEND_X_BIT); /*;AN000;2*/
73 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
74
75 } /*;AN000;2*/
76
77 return; /*;AN000;2*/
78} /*;AN000;2*/
79 \ No newline at end of file