2 /*----------------------------
3 /* SOURCE FILE NAME: RTT1.C
4 /*----------------------------
10 #include "restpars.h" /*;AN000;4*/
11 #include "dos.h" /*;AN000;2*/
12 #include "comsub.h" /* common subroutine def'n */
16 extern BYTE destddir[MAXPATH+3];
17 extern BYTE srcddir[MAXPATH+3];
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*/
26 /**
\f***********************************************/
28 /* SUBROUTINE NAME: check_appendX
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.
35 /***************************************************/
36 void check_appendX() /*;AN000;2*/
38 union REGS gregs; /*;AN000;2 Register set */
40 gregs.x.ax = INSTALL_CHECK; /*;AN000;2 Get installed state*/
41 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
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*/
51 gregs.x.ax = GET_APPEND_VER; /*;AN000;2*/
52 int86(0x2f,&gregs,&gregs); /*;AN000;2*/
54 if (gregs.h.al == (BYTE)-1) /*;AN000;2 -1 if PCDOS version*/
55 append_indicator = DOS_APPEND; /*;AN000;2*/
57 append_indicator = NET_APPEND; /*;AN000;2*/
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*/
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*/
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*/