diff options
Diffstat (limited to 'v4.0/src/CMD/RESTORE/RTT1.C')
| -rw-r--r-- | v4.0/src/CMD/RESTORE/RTT1.C | 79 |
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 | |||
| 16 | extern BYTE destddir[MAXPATH+3]; | ||
| 17 | extern BYTE srcddir[MAXPATH+3]; | ||
| 18 | extern BYTE rtswitch; | ||
| 19 | extern BYTE control_flag; | ||
| 20 | extern BYTE control_flag2; | ||
| 21 | extern BYTE filename[12]; | ||
| 22 | extern unsigned control_file_handle; /* !wrw */ | ||
| 23 | extern BYTE append_indicator; /*;AN000;2*/ | ||
| 24 | extern 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 | /***************************************************/ | ||
| 36 | void 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 | ||