mirror of https://github.com/FDOS/kernel.git
Update CVS to 2020
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@7 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
8a8df7fba8
commit
b857858f48
|
@ -67,8 +67,8 @@ component. Study the makefile to better understand this.
|
|||
$Id$
|
||||
|
||||
$Log$
|
||||
Revision 1.1 2000/05/06 19:34:38 jhall1
|
||||
Initial revision
|
||||
Revision 1.2 2000/05/08 04:27:48 jimtabor
|
||||
Update CVS to 2020
|
||||
|
||||
Revision 1.2 1999/08/25 04:12:31 jprice
|
||||
update
|
||||
|
|
|
@ -11,6 +11,7 @@ John Price (linux-guru@gcfl.net)
|
|||
Steve Miller (SMiller@dsfx.com)
|
||||
Jens Horstmeier (Jens.Horstmeier@Abg1.SIEMENS.DE)
|
||||
James Tabor (jimtabor@infohwy.com)
|
||||
Eric Biederman (ebiederm+eric@ccr.net)
|
||||
|
||||
And last, but not least, a big thanx to Pasquale J. Villani
|
||||
(patv@iop.com), who was the original author of DOS-C, in which the
|
||||
|
|
10
docs/copying
10
docs/copying
|
@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
|
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
|||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
|
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
|||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
|
@ -225,7 +225,7 @@ impose that choice.
|
|||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
|
@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
|
|
|
@ -1,3 +1,71 @@
|
|||
2000 Apr 28 - Build 2020
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
+ Added Dos Function calls 0x69, and 0x6C. IOCTL support in disk driver.
|
||||
New funtions not yet fully implemented.
|
||||
Clean up DSK.C, IOCTL.C and FCBFNS.C. Removed old blk_device
|
||||
pointers.
|
||||
|
||||
2000 Apr 03 - Build 2020
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
+ Fixed All DPB chains were linking to -1.
|
||||
|
||||
2000 Apr 02 - Build 2020
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
+ Fixed Dos_Free returned wrong due to MaxCluster Calc.
|
||||
Media_Check MaxCluster count wrong, needed +1.
|
||||
|
||||
2000 Apr 01 - Build 2020
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
+ fixed Unable to cd back out of cdrom directories.
|
||||
|
||||
2000 Mar 31 - Build 2019
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
+ added Eric W. Biederman patches via CVS.
|
||||
|
||||
+ 2000 Mar 25
|
||||
+ -------- Eric Biederman
|
||||
+ Fixed Lastdrive handling
|
||||
+ Fixed Not enough drives for number present devices
|
||||
+ Added Working (though not perfect network redirector)
|
||||
Note: Error codes internal to freedos are negative
|
||||
Error codes external to freedos are postive.
|
||||
The network redirector is external to freedos...
|
||||
Note: Running the nonredirected functions on a redirected
|
||||
drive is dangerous. My patch is very careful
|
||||
not to. Except in truename. Where (a) it is safe
|
||||
and (b) I think it is required, and (c) it is needed
|
||||
by dosemu.
|
||||
|
||||
2000 Mar 19 - Build 2019
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
* Jean-Francois <lozevis.jeanfrancois@free.fr> email noting
|
||||
the set/clear interrupt was reverse in order.
|
||||
|
||||
2000 Mar 17 - Build 2019
|
||||
-------- Steffen Kaiser (Steffen.Kaiser@fh-rhein-sieg.de)
|
||||
+ Fixed Config.c COUNTRY= statement
|
||||
+ Fixed *.c to call upFMem() when upcasing filenames
|
||||
- Removed everything to load NLS into memory
|
||||
= Redesigned hardcoded NLS information
|
||||
|
||||
--> The kernel will now return the proper information for the
|
||||
hardcoded NLS (U.S.A. / CP437), it would return the correct
|
||||
information for other NLS, too, if there would be a NLSFUNC
|
||||
available, which is not at this time.
|
||||
|
||||
NOTE: The way the external NLSFUNC is called does not look well,
|
||||
therfore expect a change soon.
|
||||
|
||||
2000 Mar 15 - Build 2019
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
* Dennis Newbold and Massimo De Munari email kernel bug reports
|
||||
with changes to Globals.h and Inthndlr.c. Fix to leap year and
|
||||
Delete file return code.
|
||||
* Michal Meller found a bug in media_check. It return the wrong
|
||||
value of sector count. Change in FATFS.C.
|
||||
* Fixed Func 0x32 based on information from Marty <k3pbu@arrl.net>.
|
||||
Func 0x32 Get Drive Parameter BLK did not work.
|
||||
|
||||
2000 Mar 09 - Build 2018
|
||||
-------- James Tabor (jimtabor@infohwy.com)
|
||||
Added CDS and made FD CDS based. Changes encompass all of the
|
||||
|
|
|
@ -44,7 +44,7 @@ int 21 Description State Ver Status
|
|||
1ch Get Drive Data superseded 2.00 supported
|
||||
1dh CP/M compatibility obsolete 1.00 supported
|
||||
1eh CP/M compatibility obsolete 1.00 supported
|
||||
1fh Get Default DPB active 5.00 Note 2
|
||||
1fh Get Default DPB active 5.00 supported
|
||||
20h CP/M compatibility obsolete 1.00 supported
|
||||
21h Random Read superseded 1.00 supported
|
||||
22h Random Write superseded 1.00 supported
|
||||
|
@ -63,7 +63,7 @@ int 21 Description State Ver Status
|
|||
2fh Get DTA active 2.00 supported
|
||||
30h Get Version Number active 2.00 supported
|
||||
31h Keep Program active 2.00 supported
|
||||
32h Get DPB active 5.00 Note 2
|
||||
32h Get DPB active 5.00 supported
|
||||
3300h Get CTRL+C Check Flag active 2.00 supported
|
||||
3301h Set CTRL+C Check Flag active 2.00 supported
|
||||
3305h Get Startup Drive active 2.00 supported
|
||||
|
@ -118,19 +118,19 @@ int 21 Description State Ver Status
|
|||
5ah Create Temporary File active 3.00
|
||||
5bh Create New File active 3.00
|
||||
5ch Lock/Unlock File active 3.10 planned
|
||||
5d00h Server Function Call active 3.10 planned
|
||||
5d00h Server Function Call active 3.10 supported
|
||||
5d01h Commit All Files active 3.10 planned
|
||||
5d02h Close File by Name active 3.10 planned
|
||||
5d03h Close All Files for Computer active 3.10 planned
|
||||
5d04h Close All Files for Process active 3.10 planned
|
||||
5d05h Get Open File List active 3.10 planned
|
||||
5d06h Get Multiple SDA active 4.00 supported
|
||||
5d07h Get Redirected Printer Mode active 3.10 planned
|
||||
5d08h Set Redirected Printer Mode active 4.00 planned
|
||||
5d09h Flush Redirected Printer Output active 4.00 planned
|
||||
5d07h Get Redirected Printer Mode active 3.10 supported
|
||||
5d08h Set Redirected Printer Mode active 4.00 supported
|
||||
5d09h Flush Redirected Printer Output active 4.00 supported
|
||||
5d0ah Set Extended Error active 4.00 planned
|
||||
5eh Generic Network Functions #1 active 3.10 planned
|
||||
5fh Generic Network Functions #2 active 3.10 planned
|
||||
5eh Generic Network Functions #1 active 3.10 supported
|
||||
5fh Generic Network Functions #2 active 3.10 supported
|
||||
60h Truename function undocumented 3.00 supported
|
||||
61h UNUSED obsolete supported
|
||||
62h Get current PSP active 3.00 supported
|
||||
|
@ -165,7 +165,7 @@ int 27: TSR
|
|||
Supported.
|
||||
|
||||
int 28: DOS Idle.
|
||||
Note 5.
|
||||
Supported.
|
||||
|
||||
int 29: Fast Console Output.
|
||||
Supported.
|
||||
|
@ -195,8 +195,11 @@ See COPYING in DOS-C root directory for license.
|
|||
$Id$
|
||||
|
||||
$Log$
|
||||
Revision 1.1 2000/05/06 19:34:43 jhall1
|
||||
Initial revision
|
||||
Revision 1.2 2000/05/08 04:27:48 jimtabor
|
||||
Update CVS to 2020
|
||||
|
||||
Revision 1.2 2000/03/18 05:51:55 kernel
|
||||
changes in supported functions
|
||||
|
||||
Revision 1.1 1999/08/25 03:46:42 jprice
|
||||
New build config
|
||||
|
|
|
@ -34,8 +34,8 @@ static BYTE *Cds_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -38,8 +38,8 @@ static BYTE *clock_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:22 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -38,8 +38,8 @@ static BYTE *date_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 1999/08/25 03:17:11 jprice
|
||||
* ror4 patches to allow TC 2.01 compile.
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *clock_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
38
hdr/device.h
38
hdr/device.h
|
@ -35,8 +35,11 @@ static BYTE *device_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:46 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -244,6 +247,17 @@ typedef struct
|
|||
}
|
||||
bpb;
|
||||
|
||||
struct gblkio
|
||||
{
|
||||
UBYTE gbio_spcfunbit;
|
||||
UBYTE gbio_devtype;
|
||||
UWORD gbio_devattrib;
|
||||
UWORD gbio_ncyl;
|
||||
UBYTE gbio_media;
|
||||
bpb gbio_bpb;
|
||||
UWORD gbio_nsecs;
|
||||
};
|
||||
|
||||
/* */
|
||||
/* Boot Block (Super Block) */
|
||||
/* */
|
||||
|
@ -256,13 +270,19 @@ bpb;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
BYTE bt_jump[3]; /* Boot Jump opcodes */
|
||||
BYTE bt_oem[8]; /* OEM Name */
|
||||
bpb bt_bpb; /* BPB for this media/device */
|
||||
WORD bt_nsecs; /* # Sectors per Track */
|
||||
WORD bt_nheads; /* # Heads */
|
||||
WORD bt_hidden; /* # Hidden sectors */
|
||||
LONG bt_huge; /* use if nsecs == 0 */
|
||||
BYTE bt_jump[3]; /* Boot Jump opcodes */
|
||||
BYTE bt_oem[8]; /* OEM Name */
|
||||
bpb bt_bpb; /* BPB for this media/device */
|
||||
WORD bt_nsecs; /* # Sectors per Track */
|
||||
WORD bt_nheads; /* # Heads */
|
||||
WORD bt_hidden; /* # Hidden sectors */
|
||||
LONG bt_huge; /* use if nsecs == 0 */
|
||||
BYTE bt_drvno;
|
||||
BYTE bt_reserv;
|
||||
BYTE bt_btid;
|
||||
ULONG bt_serialno;
|
||||
BYTE bt_volume[11];
|
||||
BYTE bt_fstype[8];
|
||||
}
|
||||
boot;
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *dirmatch_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *dosnames_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:27 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *error_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:27 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *exe_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:47 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:28 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *fat_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 1999/05/03 06:28:00 jprice
|
||||
* Changed some variables from signed to unsigned.
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *fcb_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 1999/09/20 21:24:54 jprice
|
||||
* *** empty log message ***
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *file_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:30 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *fnode_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *kbd_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:31 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *mcb_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:48 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define REM_PRINTSET 0x111f
|
||||
#define REM_FLUSHALL 0x1120
|
||||
#define REM_LSEEK 0x1121
|
||||
#define REM_PROCESS_END 0x1122
|
||||
#define REM_FILENAME 0x1123
|
||||
#define REM_PRINTREDIR 0x1125
|
||||
#define REM_EXTOC 0x112e
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *pcb_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:49 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:32 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -36,8 +36,8 @@ static char *portab_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:49 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 1999/08/25 03:17:11 jprice
|
||||
* ror4 patches to allow TC 2.01 compile.
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *process_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:49 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:34 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -35,8 +35,8 @@ static BYTE *sft_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:50 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:34:50 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 2000/03/09 06:06:38 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *tail_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:50 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:39:36 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -40,8 +40,8 @@ static BYTE *time_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:50 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:28:22 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 1999/08/25 03:17:11 jprice
|
||||
* ror4 patches to allow TC 2.01 compile.
|
||||
|
|
|
@ -42,5 +42,5 @@ static BYTE *date_hRcsId = "$Id$";
|
|||
|
||||
#define REVISION_MAJOR 1
|
||||
#define REVISION_MINOR 1
|
||||
#define REVISION_SEQ 18
|
||||
#define BUILD 2018
|
||||
#define REVISION_SEQ 20
|
||||
#define BUILD 2020
|
||||
|
|
|
@ -39,8 +39,8 @@ static BYTE *RcsId = "$Header$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:52 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 2000/03/09 06:07:10 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:34:52 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.2 1999/08/10 17:57:12 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:34:52 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 1999/08/10 17:57:12 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -37,8 +37,11 @@ static BYTE *blockioRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:53 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.15 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.14 2000/03/09 06:07:10 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -157,7 +160,7 @@ VOID FAR init_buffers(void)
|
|||
lastbuf = &buffers[Config.cfgBuffers - 1];
|
||||
}
|
||||
|
||||
/* Extract the block number from a buffer structure. */
|
||||
/* Extract the block number from a buffer structure. */
|
||||
ULONG getblkno(struct buffer FAR * bp)
|
||||
{
|
||||
if (bp->b_blkno == 0xffffu)
|
||||
|
@ -166,8 +169,8 @@ ULONG getblkno(struct buffer FAR * bp)
|
|||
return bp->b_blkno;
|
||||
}
|
||||
|
||||
/* Set the block number of a buffer structure. (The caller should */
|
||||
/* set the unit number before calling this function.) */
|
||||
/* Set the block number of a buffer structure. (The caller should */
|
||||
/* set the unit number before calling this function.) */
|
||||
VOID setblkno(struct buffer FAR * bp, ULONG blkno)
|
||||
{
|
||||
if (blkno >= 0xffffu)
|
||||
|
@ -178,7 +181,10 @@ VOID setblkno(struct buffer FAR * bp, ULONG blkno)
|
|||
else
|
||||
{
|
||||
bp->b_blkno = blkno;
|
||||
bp->b_dpbp = &blk_devices[bp->b_unit];
|
||||
/* bp->b_dpbp = &blk_devices[bp->b_unit]; */
|
||||
|
||||
bp->b_dpbp = CDSp->cds_table[bp->b_unit].cdsDpb;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,9 +248,9 @@ struct buffer FAR *getblock(ULONG blkno, COUNT dsk)
|
|||
#endif
|
||||
|
||||
/* make sure we keep at least 3 buffers for the FAT. If this is not a */
|
||||
/* FAT buffer, or there are at least 3 already, then we can use this */
|
||||
/* buffer. */
|
||||
/* otherwise, search again, and find the last non-FAT buffer. */
|
||||
/* FAT buffer, or there are at least 3 already, then we can use this */
|
||||
/* buffer. */
|
||||
/* otherwise, search again, and find the last non-FAT buffer. */
|
||||
if ((lbp->b_flag & BFR_FAT) && (fat_count < 3))
|
||||
{
|
||||
bp = firstbuf;
|
||||
|
@ -253,12 +259,12 @@ struct buffer FAR *getblock(ULONG blkno, COUNT dsk)
|
|||
while ((bp != NULL) && (bp->b_flag & BFR_FAT))
|
||||
{
|
||||
/* if this is a FAT buffer, then move to the next one, else we found */
|
||||
/* the one we want. */
|
||||
/* the one we want. */
|
||||
mbp = lbp; /* move along to next buffer */
|
||||
lbp = bp;
|
||||
bp = bp->b_next;
|
||||
}
|
||||
/* if we get to the end of the list here, then we must only have 3 */
|
||||
/* if we get to the end of the list here, then we must only have 3 */
|
||||
/* buffers, which is not suppose to happen, but if it does, then we */
|
||||
/* end up using the last buffer (even though it is FAT). */
|
||||
|
||||
|
@ -357,9 +363,9 @@ BOOL getbuf(struct buffer FAR ** pbp, ULONG blkno, COUNT dsk)
|
|||
#endif
|
||||
|
||||
/* make sure we keep at least 3 buffers for the FAT. If this is not a */
|
||||
/* FAT buffer, or there are at least 3 already, then we can use this */
|
||||
/* buffer. */
|
||||
/* otherwise, search again, and find the last non-FAT buffer. */
|
||||
/* FAT buffer, or there are at least 3 already, then we can use this */
|
||||
/* buffer. */
|
||||
/* otherwise, search again, and find the last non-FAT buffer. */
|
||||
if ((lbp->b_flag & BFR_FAT) && (fat_count < 3))
|
||||
{
|
||||
bp = firstbuf;
|
||||
|
@ -368,14 +374,14 @@ BOOL getbuf(struct buffer FAR ** pbp, ULONG blkno, COUNT dsk)
|
|||
while ((bp != NULL) && (bp->b_flag & BFR_FAT))
|
||||
{
|
||||
/* if this is a FAT buffer, then move to the next one, else we found */
|
||||
/* the one we want. */
|
||||
/* the one we want. */
|
||||
mbp = lbp; /* move along to next buffer */
|
||||
lbp = bp;
|
||||
bp = bp->b_next;
|
||||
}
|
||||
/* if we get to the end of the list here, then we must only have 3 */
|
||||
/* buffers, which is not suppose to happen, but if it does, then we */
|
||||
/* end up using the last buffer (even though it is FAT). */
|
||||
/* if we get to the end of the list here, then we must only have 3 */
|
||||
/* buffers, which is not suppose to happen, but if it does, then we */
|
||||
/* end up using the last buffer (even though it is FAT). */
|
||||
|
||||
if (bp == NULL)
|
||||
{
|
||||
|
@ -539,7 +545,9 @@ BOOL fill(REG struct buffer FAR * bp, ULONG blkno, COUNT dsk)
|
|||
/* */
|
||||
BOOL dskxfer(COUNT dsk, ULONG blkno, VOID FAR * buf, UWORD numblocks, COUNT mode)
|
||||
{
|
||||
REG struct dpb *dpbp = &blk_devices[dsk];
|
||||
/* REG struct dpb *dpbp = &blk_devices[dsk]; */
|
||||
|
||||
REG struct dpb *dpbp = CDSp->cds_table[dsk].cdsDpb;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -38,8 +38,8 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:54 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 2000/03/09 06:07:10 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *charioRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:54 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.7 2000/03/09 06:07:10 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "portab.h"
|
||||
#include "globals.h"
|
||||
#include "nls.h"
|
||||
|
||||
#ifdef VERSION_STRINGS
|
||||
static BYTE *RcsId = "$Id$";
|
||||
|
@ -38,8 +39,14 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:56 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.15 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.14 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.13 2000/03/09 06:07:10 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -204,6 +211,10 @@ INIT void PreConfig(void)
|
|||
/* Initialize the base memory pointers */
|
||||
lpOldLast = lpBase = AlignParagraph((BYTE FAR *) & last);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("SDA located at 0x%04x:0x%04x\n",
|
||||
FP_SEG(internal_data), FP_OFF(internal_data));
|
||||
#endif
|
||||
/* Begin by initializing our system buffers */
|
||||
dma_scratch = (BYTE FAR *) KernelAllocDma(BUFFERSIZE);
|
||||
#ifdef DEBUG
|
||||
|
@ -230,7 +241,7 @@ INIT void PreConfig(void)
|
|||
+ Config.cfgFiles * sizeof(sft));
|
||||
|
||||
CDSp = (cdstbl FAR *)
|
||||
KernelAlloc(0x58 * lastdrive + 1);
|
||||
KernelAlloc(0x58 * (lastdrive + 1));
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
@ -271,6 +282,11 @@ INIT void PostConfig(void)
|
|||
/* Set pass number */
|
||||
nPass = 2;
|
||||
|
||||
/* compute lastdrive ... */
|
||||
lastdrive = Config.cfgLastdrive;
|
||||
if (lastdrive < nblkdev -1)
|
||||
lastdrive = nblkdev -1;
|
||||
|
||||
/* Initialize the base memory pointers from last time. */
|
||||
lpBase = AlignParagraph(lpOldLast);
|
||||
|
||||
|
@ -300,7 +316,7 @@ INIT void PostConfig(void)
|
|||
+ Config.cfgFiles * sizeof(sft));
|
||||
|
||||
CDSp = (cdstbl FAR *)
|
||||
KernelAlloc(0x58 * lastdrive + 1);
|
||||
KernelAlloc(0x58 * (lastdrive + 1));
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
@ -334,6 +350,14 @@ INIT VOID configDone(VOID)
|
|||
{
|
||||
COUNT i;
|
||||
|
||||
if (lastdrive < nblkdev -1) {
|
||||
#ifdef DEBUG
|
||||
printf("lastdrive %c too small upping it to: %c\n", lastdrive + 'A', nblkdev + 'A' -1);
|
||||
#endif /* DEBUG */
|
||||
lastdrive = nblkdev -1;
|
||||
CDSp = (cdstbl FAR *)
|
||||
KernelAlloc(0x58 * (lastdrive +1));
|
||||
}
|
||||
first_mcb = FP_SEG(lpBase) + ((FP_OFF(lpBase) + 0x0f) >> 4);
|
||||
|
||||
/* We expect ram_top as Kbytes, so convert to paragraphs */
|
||||
|
@ -634,6 +658,22 @@ INIT static VOID Fcbs(BYTE * pLine)
|
|||
Config.cfgProtFcbs = Config.cfgFcbs;
|
||||
}
|
||||
|
||||
/* LoadCountryInfo():
|
||||
* Searches a file in the COUNTRY.SYS format for an entry
|
||||
* matching the specified code page and country code, and loads
|
||||
* the corresponding information into memory. If code page is 0,
|
||||
* the default code page for the country will be used.
|
||||
*
|
||||
* Returns TRUE if successful, FALSE if not.
|
||||
*/
|
||||
|
||||
static INIT BOOL LoadCountryInfo(char *filename, UWORD ctryCode, UWORD codePage)
|
||||
{
|
||||
/* printf("cntry: %u, CP%u, file=\"%s\"\n", ctryCode, codePage, filename); */
|
||||
printf("Sorry, the COUNTRY= statement has been temporarily disabled\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
INIT static VOID Country(BYTE * pLine)
|
||||
{
|
||||
/* Format: COUNTRY = countryCode, [codePage], filename */
|
||||
|
@ -646,12 +686,11 @@ INIT static VOID Country(BYTE * pLine)
|
|||
pLine = skipwh(pLine);
|
||||
if (*pLine == ',')
|
||||
{
|
||||
pLine = skipwh(pLine);
|
||||
pLine = skipwh(pLine + 1);
|
||||
|
||||
if (*pLine == ',')
|
||||
{
|
||||
codePage = 0;
|
||||
++pLine;
|
||||
codePage = NLS_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -761,7 +800,7 @@ INIT static VOID CfgFailure(BYTE * pLine)
|
|||
BYTE *pTmp = pLineStart;
|
||||
|
||||
printf("CONFIG.SYS error in line %d\n", nCfgLine);
|
||||
printf(">>>%s\n", pTmp);
|
||||
printf(">>>%s\n ", pTmp);
|
||||
while (++pTmp != pLine)
|
||||
printf(" ");
|
||||
printf("^\n");
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:34:56 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.8 2000/03/09 06:07:10 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
|
428
kernel/dosfns.c
428
kernel/dosfns.c
|
@ -34,8 +34,17 @@ static BYTE *dosfnsRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:34:59 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.14 2000/04/02 05:01:08 jtabor
|
||||
* Replaced ChgDir Code
|
||||
*
|
||||
* Revision 1.13 2000/04/02 04:53:56 jtabor
|
||||
* Fix to DosChgDir
|
||||
*
|
||||
* Revision 1.12 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.11 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -295,7 +304,7 @@ UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
|||
sft FAR *s;
|
||||
WORD sys_idx;
|
||||
sfttbl FAR *sp;
|
||||
UCOUNT ReadCount;
|
||||
UCOUNT WriteCount;
|
||||
|
||||
/* Test that the handle is valid */
|
||||
if (hndl < 0)
|
||||
|
@ -321,10 +330,10 @@ UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
|||
}
|
||||
if (s->sft_flags & SFT_FSHARED)
|
||||
{
|
||||
ReadCount = Remote_RW(REM_WRITE, n, bp, s, err);
|
||||
WriteCount = Remote_RW(REM_WRITE, n, bp, s, err);
|
||||
if (err)
|
||||
{
|
||||
return ReadCount;
|
||||
return WriteCount;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
@ -463,7 +472,7 @@ UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
|||
{
|
||||
COUNT rc;
|
||||
|
||||
ReadCount = writeblock(s->sft_status, bp, n, &rc);
|
||||
WriteCount = writeblock(s->sft_status, bp, n, &rc);
|
||||
if (rc < SUCCESS)
|
||||
{
|
||||
*err = rc;
|
||||
|
@ -472,50 +481,34 @@ UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
|||
else
|
||||
{
|
||||
*err = SUCCESS;
|
||||
return ReadCount;
|
||||
return WriteCount;
|
||||
}
|
||||
}
|
||||
*err = SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
COUNT DosSeek(COUNT hndl, LONG new_pos, COUNT mode, ULONG * set_pos)
|
||||
COUNT SftSeek(sft FAR *s, LONG new_pos, COUNT mode)
|
||||
{
|
||||
sft FAR *s;
|
||||
ULONG lrx;
|
||||
|
||||
/* Test for invalid mode */
|
||||
if (mode < 0 || mode > 2)
|
||||
return DE_INVLDFUNC;
|
||||
|
||||
/* Test that the handle is valid */
|
||||
if (hndl < 0)
|
||||
return DE_INVLDHNDL;
|
||||
|
||||
/* Get the SFT block that contains the SFT */
|
||||
if ((s = get_sft(hndl)) == (sft FAR *) - 1)
|
||||
return DE_INVLDHNDL;
|
||||
|
||||
lpCurSft = (sfttbl FAR *) s;
|
||||
|
||||
if (s->sft_flags & SFT_FSHARED)
|
||||
{
|
||||
if (mode == 2)
|
||||
{ /* seek from end of file */
|
||||
if (mode == 2) {
|
||||
/* seek from end of file */
|
||||
int2f_Remote_call(REM_LSEEK, 0, (UWORD) FP_SEG(new_pos), (UWORD) FP_OFF(new_pos), (VOID FAR *) s, 0, 0);
|
||||
*set_pos = s->sft_posit;
|
||||
return SUCCESS;
|
||||
}
|
||||
if (mode == 0)
|
||||
{
|
||||
if (mode == 0) {
|
||||
s->sft_posit = new_pos;
|
||||
*set_pos = new_pos;
|
||||
return SUCCESS;
|
||||
}
|
||||
if (mode == 1)
|
||||
{
|
||||
if (mode == 1) {
|
||||
s->sft_posit += new_pos;
|
||||
*set_pos = s->sft_posit;
|
||||
return SUCCESS;
|
||||
}
|
||||
return DE_INVLDFUNC;
|
||||
|
@ -524,17 +517,39 @@ COUNT DosSeek(COUNT hndl, LONG new_pos, COUNT mode, ULONG * set_pos)
|
|||
/* Do special return for character devices */
|
||||
if (s->sft_flags & SFT_FDEVICE)
|
||||
{
|
||||
*set_pos = 0l;
|
||||
s->sft_posit = 0l;
|
||||
return SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
*set_pos = dos_lseek(s->sft_status, new_pos, mode);
|
||||
if ((LONG) * set_pos < 0)
|
||||
return (int)*set_pos;
|
||||
else
|
||||
LONG result = dos_lseek(s->sft_status, new_pos, mode);
|
||||
if (result < 0l)
|
||||
return (int)result;
|
||||
else {
|
||||
s->sft_posit = result;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
COUNT DosSeek(COUNT hndl, LONG new_pos, COUNT mode, ULONG * set_pos)
|
||||
{
|
||||
sft FAR *s;
|
||||
COUNT result;
|
||||
|
||||
/* Test that the handle is valid */
|
||||
if (hndl < 0)
|
||||
return DE_INVLDHNDL;
|
||||
|
||||
/* Get the SFT block that contains the SFT */
|
||||
if ((s = get_sft(hndl)) == (sft FAR *) - 1)
|
||||
return DE_INVLDHNDL;
|
||||
|
||||
result = SftSeek(s, new_pos, mode);
|
||||
if (result == SUCCESS) {
|
||||
*set_pos = s->sft_posit;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static WORD get_free_hndl(void)
|
||||
|
@ -613,12 +628,12 @@ static BOOL fnmatch(BYTE FAR * s, BYTE FAR * d, COUNT n, COUNT mode)
|
|||
COUNT DosCreat(BYTE FAR * fname, COUNT attrib)
|
||||
{
|
||||
psp FAR *p = MK_FP(cu_psp, 0);
|
||||
WORD hndl,
|
||||
sft_idx;
|
||||
WORD hndl, sft_idx;
|
||||
sft FAR *sftp;
|
||||
struct dhdr FAR *dhp;
|
||||
BYTE FAR *froot;
|
||||
WORD i;
|
||||
COUNT result, drive;
|
||||
|
||||
/* get a free handle */
|
||||
if ((hndl = get_free_hndl()) == 0xff)
|
||||
|
@ -662,14 +677,26 @@ COUNT DosCreat(BYTE FAR * fname, COUNT attrib)
|
|||
}
|
||||
}
|
||||
|
||||
if (Remote_OCT(REM_CREATE, fname, attrib, sftp) == 0)
|
||||
{
|
||||
if (sftp->sft_flags & SFT_FSHARED)
|
||||
{
|
||||
drive = get_verify_drive(fname);
|
||||
if(drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(fname, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
lpCurSft = (sfttbl FAR *)sftp;
|
||||
result = int2f_Remote_call(REM_CREATE, 0, 0, 0, (VOID FAR *) sftp, 0, MK_FP(0, attrib));
|
||||
result = -result;
|
||||
if (result == SUCCESS) {
|
||||
sftp->sft_count += 1;
|
||||
p->ps_filetab[hndl] = sft_idx;
|
||||
return hndl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
sftp->sft_status = dos_creat(fname, attrib);
|
||||
|
@ -775,6 +802,7 @@ COUNT DosOpen(BYTE FAR * fname, COUNT mode)
|
|||
struct dhdr FAR *dhp;
|
||||
BYTE FAR *froot;
|
||||
WORD i;
|
||||
COUNT drive, result;
|
||||
|
||||
/* test if mode is in range */
|
||||
if ((mode & ~SFT_OMASK) != 0)
|
||||
|
@ -828,16 +856,27 @@ COUNT DosOpen(BYTE FAR * fname, COUNT mode)
|
|||
}
|
||||
}
|
||||
|
||||
if (Remote_OCT(REM_OPEN, fname, mode, sftp) == 0)
|
||||
{
|
||||
if (sftp->sft_flags & SFT_FSHARED)
|
||||
{
|
||||
drive = get_verify_drive(fname);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(fname, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
lpCurSft = (sfttbl FAR *)sftp;
|
||||
result = int2f_Remote_call(REM_OPEN, 0, 0, 0, (VOID FAR *) sftp, 0, MK_FP(0, mode));
|
||||
result = -result;
|
||||
if (result == SUCCESS) {
|
||||
sftp->sft_count += 1;
|
||||
p->ps_filetab[hndl] = sft_idx;
|
||||
return hndl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
sftp->sft_status = dos_open(fname, mode);
|
||||
|
||||
if (sftp->sft_status >= 0)
|
||||
|
@ -918,27 +957,27 @@ VOID DosGetFree(COUNT drive, COUNT FAR * spc, COUNT FAR * navc, COUNT FAR * bps,
|
|||
{
|
||||
struct dpb *dpbp;
|
||||
struct cds FAR *cdsp;
|
||||
static char rg[8];
|
||||
static COUNT rg[4];
|
||||
|
||||
/* next - "log" in the drive */
|
||||
drive = (drive == 0 ? default_drive : drive - 1);
|
||||
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
/* first check for valid drive */
|
||||
if (drive < 0 || drive > lastdrive)
|
||||
{
|
||||
int2f_Remote_call(REM_GETSPACE, 0, 0, 0, cdsp, 0, &rg);
|
||||
|
||||
*spc = (COUNT) rg[0];
|
||||
*navc = (COUNT) rg[2];
|
||||
*bps = (COUNT) rg[4];
|
||||
*nc = (COUNT) rg[6];
|
||||
*spc = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* first check for valid drive */
|
||||
if (drive < 0 || drive > lastdrive)
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
if (cdsp->cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
*spc = -1;
|
||||
int2f_Remote_call(REM_GETSPACE, 0, 0, 0, cdsp, 0, &rg);
|
||||
|
||||
*spc = (COUNT) rg[0];
|
||||
*nc = (COUNT) rg[1];
|
||||
*bps = (COUNT) rg[2];
|
||||
*navc = (COUNT) rg[3];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -968,82 +1007,86 @@ VOID DosGetFree(COUNT drive, COUNT FAR * spc, COUNT FAR * navc, COUNT FAR * bps,
|
|||
COUNT DosGetCuDir(COUNT drive, BYTE FAR * s)
|
||||
{
|
||||
REG struct cds FAR *cdsp;
|
||||
REG WORD x;
|
||||
|
||||
/* next - "log" in the drive */
|
||||
drive = (drive == 0 ? default_drive : drive - 1);
|
||||
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
/* first check for valid drive */
|
||||
if (drive < 0 || drive > lastdrive) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
current_ldt = cdsp;
|
||||
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
{
|
||||
dos_pwd(cdsp, s);
|
||||
return SUCCESS;
|
||||
if (!(cdsp->cdsFlags & CDSNETWDRV) && (cdsp->cdsDpb == 0)) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
|
||||
/* first check for valid drive */
|
||||
x = 1 + cdsp->cdsJoinOffset;
|
||||
fsncopy((BYTE FAR *) & cdsp->cdsCurrentPath[x], s, 64);
|
||||
|
||||
if (cdsp->cdsDpb == 0)
|
||||
return DE_INVLDDRV;
|
||||
|
||||
/* if (drive < 0 || drive > nblkdev)
|
||||
return DE_INVLDDRV;
|
||||
*/
|
||||
dos_pwd(cdsp, s);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
#undef CHDIR_DEBUG
|
||||
COUNT DosChangeDir(BYTE FAR * s)
|
||||
{
|
||||
REG struct dpb *dpbp;
|
||||
REG struct cds FAR *cdsp;
|
||||
REG COUNT drive;
|
||||
struct f_node FAR *fp;
|
||||
COUNT ret;
|
||||
/* Parse and extract drive */
|
||||
if (*(s + 1) == ':')
|
||||
{
|
||||
drive = *s - '@';
|
||||
if (drive > 26)
|
||||
drive -= 'a' - 'A';
|
||||
}
|
||||
else
|
||||
drive = 0;
|
||||
COUNT result;
|
||||
BYTE FAR *p;
|
||||
|
||||
/* next - "log" in the drive */
|
||||
drive = (drive == 0 ? default_drive : drive - 1);
|
||||
drive = get_verify_drive(s);
|
||||
if (drive < 0 ) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(s, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
|
||||
current_ldt = cdsp;
|
||||
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
if (cdsp->cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
ret = dos_cd(cdsp, s);
|
||||
return ret;
|
||||
}
|
||||
#if defined(CHDIR_DEBUG)
|
||||
printf("Remote Chdir: n='");
|
||||
p = s; while(*p) print("%c", *p++);
|
||||
printf("' p='");
|
||||
p = PriPathName; while(*p) printf("%c", *p++);
|
||||
printf("'\n");
|
||||
#endif
|
||||
result = int2f_Remote_call(REM_CHDIR, 0, 0, 0, PriPathName, 0, 0);
|
||||
#if defined(CHDIR_DEBUG)
|
||||
printf("status = %04x, new_path='", result);
|
||||
p = cdsd->cdsCurrentPath; while(p) printf("%c", *p++)
|
||||
print("'\n");
|
||||
#endif
|
||||
result = -result;
|
||||
if (result != SUCCESS) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
/*
|
||||
Some redirectors do not write back to the CDS.
|
||||
SHSUCdX needs this. jt
|
||||
*/
|
||||
fscopy(&PriPathName[0], cdsp->cdsCurrentPath);
|
||||
if (PriPathName[7] == 0)
|
||||
cdsp->cdsCurrentPath[8] = 0; /* Need two Zeros at the end */
|
||||
|
||||
/* first check for valid drive */
|
||||
if (cdsp->cdsDpb == 0)
|
||||
return DE_INVLDDRV;
|
||||
|
||||
/* test for path existance from fs */
|
||||
if ((fp = dir_open((BYTE FAR *) s)) == (struct f_node FAR *)0)
|
||||
return DE_PATHNOTFND;
|
||||
else
|
||||
dir_close(fp);
|
||||
|
||||
/* if (drive < 0 || drive > nblkdev)
|
||||
return DE_INVLDDRV; */
|
||||
|
||||
dpbp = (struct dpb *)cdsp->cdsDpb;
|
||||
if ((media_check(dpbp) < 0))
|
||||
return DE_INVLDDRV;
|
||||
} else {
|
||||
/* now get fs to change to new */
|
||||
/* directory */
|
||||
ret = dos_cd(cdsp, s);
|
||||
return ret;
|
||||
result = dos_cd(cdsp, PriPathName);
|
||||
}
|
||||
if (result == SUCCESS) {
|
||||
fscopy(&PriPathName[0], cdsp->cdsCurrentPath);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name)
|
||||
|
@ -1120,25 +1163,79 @@ COUNT DosSetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
|||
|
||||
COUNT DosGetFattr(BYTE FAR * name, UWORD FAR * attrp)
|
||||
{
|
||||
static UWORD srfa[5];
|
||||
COUNT result, drive;
|
||||
struct cds FAR *last_cds;
|
||||
BYTE FAR * p;
|
||||
|
||||
if (Remote_GSattr(REM_GETATTRZ, name, attrp) == 0)
|
||||
return SUCCESS;
|
||||
#if 0
|
||||
if (IsDevice(name)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
#endif
|
||||
|
||||
return dos_getfattr(name, attrp);
|
||||
drive = get_verify_drive(name);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(name, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
last_cds = current_ldt;
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
result = int2f_Remote_call(REM_GETATTRZ, 0, 0, 0, 0, 0, (VOID FAR *) srfa);
|
||||
result = -result;
|
||||
current_ldt = last_cds;
|
||||
*attrp = srfa[0];
|
||||
}
|
||||
else {
|
||||
result = dos_getfattr(name, attrp);
|
||||
}
|
||||
}
|
||||
|
||||
COUNT DosSetFattr(BYTE FAR * name, UWORD FAR * attrp)
|
||||
{
|
||||
if (Remote_GSattr(REM_SETATTR, name, attrp) == 0)
|
||||
return SUCCESS;
|
||||
COUNT result, drive;
|
||||
struct cds FAR *last_cds;
|
||||
BYTE FAR *p;
|
||||
|
||||
return dos_setfattr(name, attrp);
|
||||
#if 0
|
||||
if (IsDevice(name)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
#endif
|
||||
drive = get_verify_drive(name);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(name, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
last_cds = current_ldt;
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
result = int2f_Remote_call(REM_SETATTR, 0, 0, 0, 0, 0, MK_FP(0, attrp));
|
||||
result = -result;
|
||||
current_ldt = last_cds;
|
||||
}
|
||||
else {
|
||||
result = dos_setfattr(name, attrp);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
BYTE DosSelectDrv(BYTE drv)
|
||||
{
|
||||
if (CDSp->cds_table[drv].cdsFlags & 0xf000)
|
||||
if ((drv <= lastdrive) && (CDSp->cds_table[drv].cdsFlags & 0xf000))
|
||||
{
|
||||
current_ldt = &CDSp->cds_table[drv];
|
||||
default_drive = drv;
|
||||
|
@ -1146,3 +1243,108 @@ BYTE DosSelectDrv(BYTE drv)
|
|||
return lastdrive;
|
||||
}
|
||||
|
||||
COUNT DosDelete(BYTE FAR *path)
|
||||
{
|
||||
COUNT result, drive;
|
||||
|
||||
if (IsDevice(path)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
|
||||
drive = get_verify_drive(path);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
|
||||
result = truename(path, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
result = int2f_Remote_call(REM_DELETE, 0, 0, 0, 0, 0, 0);
|
||||
result = -result;
|
||||
} else {
|
||||
result = dos_delete(path);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2)
|
||||
{
|
||||
COUNT result, drive1, drive2;
|
||||
if (IsDevice(path1) || IsDevice(path2)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
drive1 = get_verify_drive(path1);
|
||||
result = truename(path1, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
drive2 = get_verify_drive(path2);
|
||||
result = truename(path2, SecPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((drive1 != drive2) || (drive1 < 0)) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
current_ldt = &CDSp->cds_table[drive1];
|
||||
if (CDSp->cds_table[drive1].cdsFlags & CDSNETWDRV) {
|
||||
result = int2f_Remote_call(REM_RENAME, 0, 0, 0, 0, 0, 0);
|
||||
result = -result;
|
||||
} else {
|
||||
result = dos_rename(path1, path2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
COUNT DosMkdir(BYTE FAR * dir)
|
||||
{
|
||||
COUNT result, drive;
|
||||
|
||||
if (IsDevice(dir)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
drive = get_verify_drive(dir);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
result = truename(dir, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
result = int2f_Remote_call(REM_MKDIR, 0, 0, 0, 0, 0, 0);
|
||||
result = -result;
|
||||
} else {
|
||||
result = dos_mkdir(dir);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
COUNT DosRmdir(BYTE FAR * dir)
|
||||
{
|
||||
COUNT result, drive;
|
||||
|
||||
if (IsDevice(dir)) {
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
drive = get_verify_drive(dir);
|
||||
if (drive < 0) {
|
||||
return drive;
|
||||
}
|
||||
result = truename(dir, PriPathName, FALSE);
|
||||
if (result != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
result = int2f_Remote_call(REM_RMDIR, 0, 0, 0, 0, 0, 0);
|
||||
result = -result;
|
||||
} else {
|
||||
result = dos_rmdir(dir);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;
|
||||
; DOS-C
|
||||
; Copyright (c) 1995, 1999
|
||||
; Pasquale J. Villani
|
||||
; James B. Tabor
|
||||
; All Rights Reserved
|
||||
;
|
||||
; This file is part of DOS-C.
|
||||
|
|
|
@ -36,8 +36,11 @@ static BYTE *dosnamesRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:00 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -329,13 +332,13 @@ COUNT ParseDosPath(BYTE FAR * lpszFileName,
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
BOOL IsDevice(BYTE * pszFileName)
|
||||
BOOL IsDevice(BYTE FAR * pszFileName)
|
||||
{
|
||||
REG struct dhdr FAR *dhp = (struct dhdr FAR *)&nul_dev;
|
||||
BYTE szName[FNAME_SIZE];
|
||||
|
||||
/* break up the name first */
|
||||
if (ParseDosName((BYTE FAR *) pszFileName,
|
||||
if (ParseDosName(pszFileName,
|
||||
(COUNT *) 0, TempBuffer, szName, (BYTE *) 0, FALSE)
|
||||
!= SUCCESS)
|
||||
return FALSE;
|
||||
|
|
39
kernel/dsk.c
39
kernel/dsk.c
|
@ -33,8 +33,11 @@ static BYTE *dskRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:01 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.6 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.5 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -174,6 +177,7 @@ WORD init(rqptr),
|
|||
mediachk(rqptr),
|
||||
bldbpb(rqptr),
|
||||
blockio(rqptr),
|
||||
Genblkdev(rqptr),
|
||||
blk_error(rqptr);
|
||||
COUNT ltop(WORD *, WORD *, WORD *, COUNT, COUNT, LONG, byteptr);
|
||||
WORD dskerr(COUNT);
|
||||
|
@ -217,7 +221,7 @@ static WORD(*dispatch[NENTRY]) () =
|
|||
blk_error, /* Output till busy */
|
||||
blk_error, /* undefined */
|
||||
blk_error, /* undefined */
|
||||
blk_error, /* Generic Ioctl */
|
||||
Genblkdev, /* Generic Ioctl */
|
||||
blk_error, /* undefined */
|
||||
blk_error, /* undefined */
|
||||
blk_error, /* undefined */
|
||||
|
@ -534,6 +538,35 @@ static COUNT write_and_verify(WORD drive, WORD head, WORD track, WORD sector,
|
|||
return fl_verify(drive, head, track, sector, count, buffer);
|
||||
}
|
||||
|
||||
static WORD Genblkdev(rqptr rp)
|
||||
{
|
||||
UWORD cmd = rp->r_count;
|
||||
|
||||
|
||||
switch(cmd){
|
||||
case 0x0860:
|
||||
{
|
||||
struct gblkio FAR * gblp = rp->r_trans;
|
||||
|
||||
gblp->gbio_devtype = 0x05;
|
||||
gblp->gbio_devattrib = 0x01;
|
||||
gblp->gbio_ncyl = miarray[rp->r_unit].mi_cyls;
|
||||
gblp->gbio_media = 0;
|
||||
gblp->gbio_bpb = bpbarray[rp->r_unit];
|
||||
gblp->gbio_nsecs = bpbarray[rp->r_unit].bpb_nsector;
|
||||
|
||||
printf("GenBlkIO = %08lx\n", rp->r_trans);
|
||||
printf("GenBlkIO = %08lx\n", gblp);
|
||||
break;
|
||||
}
|
||||
case 0x0866:
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return S_DONE;
|
||||
}
|
||||
static WORD blockio(rqptr rp)
|
||||
{
|
||||
REG retry = N_RETRY,
|
||||
|
|
|
@ -28,8 +28,11 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:03 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:29:59 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.5 2000/03/20 03:15:49 kernel
|
||||
; Change in Entry.asm
|
||||
;
|
||||
; Revision 1.4 1999/09/23 04:40:46 jprice
|
||||
; *** empty log message ***
|
||||
|
@ -306,13 +309,13 @@ int21_3:
|
|||
; Recover registers from system call. Registers and flags
|
||||
; were modified by the system call.
|
||||
;
|
||||
int21_exit: sti
|
||||
int21_exit: cli
|
||||
mov bp,word [_user_r+2]
|
||||
mov ss,bp
|
||||
mov bp,word [_user_r] ; store and init
|
||||
mov sp,bp
|
||||
dec byte [_InDOS]
|
||||
cli
|
||||
sti
|
||||
int21_ret: POP$ALL
|
||||
|
||||
;
|
||||
|
|
|
@ -34,8 +34,8 @@ static BYTE *errorRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:03 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.2 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:03 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,14 @@ static BYTE *fatdirRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:05 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.12 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.11 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.10 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -160,14 +166,16 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
|||
if (drive >= 0)
|
||||
{
|
||||
dirname += 2; /* Assume FAT style drive */
|
||||
TempCDS.cdsDpb = CDSp->cds_table[drive].cdsDpb;
|
||||
}
|
||||
else
|
||||
{
|
||||
drive = default_drive;
|
||||
TempCDS.cdsDpb = CDSp->cds_table[drive].cdsDpb;
|
||||
|
||||
}
|
||||
if (drive > lastdrive) {
|
||||
release_f_node(fnp);
|
||||
return NULL;
|
||||
}
|
||||
TempCDS.cdsDpb = CDSp->cds_table[drive].cdsDpb;
|
||||
|
||||
cdsp = &CDSp->cds_table[drive];
|
||||
|
||||
|
@ -180,7 +188,7 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
|||
/* Generate full path name */
|
||||
ParseDosPath(dirname, (COUNT *) 0, pszPath, (BYTE FAR *) & cdsp->cdsCurrentPath[x]);
|
||||
|
||||
if ((cdsp->cdsFlags & 0x8000))
|
||||
if ((cdsp->cdsFlags & CDSNETWDRV))
|
||||
{
|
||||
printf("FailSafe %x \n", Int21AX);
|
||||
return fnp;
|
||||
|
@ -192,7 +200,7 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* if (drive >= lastdrive)
|
||||
/* if (drive > lastdrive)
|
||||
{
|
||||
release_f_node(fnp);
|
||||
return NULL;
|
||||
|
@ -264,7 +272,7 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
|||
/* find the entry... */
|
||||
i = FALSE;
|
||||
|
||||
upMem((BYTE FAR *) TempBuffer, FNAME_SIZE + FEXT_SIZE);
|
||||
upFMem((BYTE FAR *) TempBuffer, FNAME_SIZE + FEXT_SIZE);
|
||||
|
||||
while (dir_read(fnp) == DIRENT_SIZE)
|
||||
{
|
||||
|
@ -548,6 +556,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
|
|||
COUNT nDrive;
|
||||
BYTE *p;
|
||||
struct cds FAR *cdsp;
|
||||
BYTE FAR *ptr;
|
||||
|
||||
static BYTE local_name[FNAME_SIZE + 1],
|
||||
local_ext[FEXT_SIZE + 1];
|
||||
|
@ -578,9 +587,12 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
|
|||
else
|
||||
nDrive = default_drive;
|
||||
|
||||
if (nDrive > lastdrive) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
cdsp = &CDSp->cds_table[nDrive];
|
||||
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
if (cdsp->cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
if (Remote_find(REM_FINDFIRST, attr, name, dmp) != 0)
|
||||
return DE_FILENOTFND;
|
||||
|
@ -619,7 +631,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
|
|||
SearchDir.dir_ext[i] = ' ';
|
||||
|
||||
/* Convert everything to uppercase. */
|
||||
upMem(SearchDir.dir_name, FNAME_SIZE + FEXT_SIZE);
|
||||
upFMem(SearchDir.dir_name, FNAME_SIZE + FEXT_SIZE);
|
||||
|
||||
/* Copy the raw pattern from our data segment to the DTA. */
|
||||
fbcopy((BYTE FAR *) SearchDir.dir_name, dmp->dm_name_pat,
|
||||
|
@ -703,8 +715,17 @@ COUNT dos_findnext(void)
|
|||
|
||||
nDrive = dmp->dm_drive;
|
||||
|
||||
if (nDrive > lastdrive) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
cdsp = &CDSp->cds_table[nDrive];
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
|
||||
#if 0
|
||||
printf("findnext: %c %s\n",
|
||||
nDrive + 'A', (cdsp->cdsFlags & CDSNETWDRV)?"remote":"local");
|
||||
#endif
|
||||
|
||||
if (cdsp->cdsFlags & CDSNETWDRV)
|
||||
{
|
||||
if (Remote_find(REM_FINDNEXT, 0, 0, dmp) != 0)
|
||||
return DE_FILENOTFND;
|
||||
|
@ -720,6 +741,9 @@ COUNT dos_findnext(void)
|
|||
/* Force the fnode into read-write mode */
|
||||
fnp->f_mode = RDWR;
|
||||
|
||||
if (dmp->dm_drive > lastdrive) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
/* Select the default to help non-drive specified path */
|
||||
/* searches... */
|
||||
fnp->f_dpb = (struct dpb *)CDSp->cds_table[dmp->dm_drive].cdsDpb;
|
||||
|
|
|
@ -36,8 +36,20 @@ BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:09 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.23 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.19 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.18 2000/03/17 04:13:12 kernel
|
||||
* Added Change for media_check
|
||||
*
|
||||
* Revision 1.17 2000/03/17 04:01:20 kernel
|
||||
* Added Change for media_check
|
||||
*
|
||||
* Revision 1.16 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -307,6 +319,9 @@ static struct f_node FAR *
|
|||
SpacePad(fname, FNAME_SIZE);
|
||||
SpacePad(fext, FEXT_SIZE);
|
||||
|
||||
if (nDrive > lastdrive) {
|
||||
return (struct f_node FAR *)0;
|
||||
}
|
||||
cdsp = &CDSp->cds_table[nDrive];
|
||||
|
||||
/* If the path is null, we to default to the current */
|
||||
|
@ -327,6 +342,14 @@ static struct f_node FAR *
|
|||
Do the redirection in Network.c>
|
||||
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (cdsp->cdsFlags & CDSNETWDRV) {
|
||||
BYTE FAR *p;
|
||||
printf("split path called for redirected file: `%s.%s'\n",
|
||||
fname, fext);
|
||||
return (struct f_node FAR *)0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Translate the path into a useful pointer */
|
||||
fnp = dir_open((BYTE FAR *) dname);
|
||||
|
@ -341,9 +364,9 @@ static struct f_node FAR *
|
|||
}
|
||||
|
||||
/* Convert the name into an absolute name for comparison... */
|
||||
upMem((BYTE FAR *) dname, strlen(dname));
|
||||
upMem((BYTE FAR *) fname, FNAME_SIZE);
|
||||
upMem((BYTE FAR *) fext, FEXT_SIZE);
|
||||
upFMem((BYTE FAR *) dname, strlen(dname));
|
||||
upFMem((BYTE FAR *) fname, FNAME_SIZE);
|
||||
upFMem((BYTE FAR *) fext, FEXT_SIZE);
|
||||
|
||||
return fnp;
|
||||
}
|
||||
|
@ -419,7 +442,7 @@ COUNT dos_creat(BYTE FAR * path, COUNT attrib)
|
|||
/* it in building the new file. */
|
||||
/* Note that if we're in the root and we don't */
|
||||
/* find an empty slot, we need to abort. */
|
||||
if (!(is_free = find_free(fnp)) && (fnp->f_flags.f_droot))
|
||||
if (((is_free = find_free(fnp)) == 0) && (fnp->f_flags.f_droot))
|
||||
{
|
||||
fnp->f_flags.f_dmod = FALSE;
|
||||
dir_close(fnp);
|
||||
|
@ -661,7 +684,7 @@ COUNT dos_rename(BYTE FAR * path1, BYTE FAR * path2)
|
|||
|
||||
/* Now find a free slot to put the file into. */
|
||||
/* If it's the root and we don't have room, return an error. */
|
||||
if (!(is_free = find_free(fnp2)) && (fnp2->f_flags.f_droot))
|
||||
if (((is_free = find_free(fnp2)) == 0) && (fnp2->f_flags.f_droot))
|
||||
{
|
||||
fnp2->f_flags.f_dmod = FALSE;
|
||||
dir_close(fnp1);
|
||||
|
@ -1032,7 +1055,7 @@ COUNT dos_mkdir(BYTE FAR * dir)
|
|||
/* it in building the new file. */
|
||||
/* Note that if we're in the root and we don't */
|
||||
/* find an empty slot, we need to abort. */
|
||||
if (!(is_free = find_free(fnp)) && (fnp->f_flags.f_droot))
|
||||
if (((is_free = find_free(fnp)) == 0) && (fnp->f_flags.f_droot))
|
||||
{
|
||||
fnp->f_flags.f_dmod = FALSE;
|
||||
dir_close(fnp);
|
||||
|
@ -1825,9 +1848,12 @@ UWORD dos_free(struct dpb * dpbp)
|
|||
/* cluster start at 2 and run to max_cluster+2 */
|
||||
REG UWORD i;
|
||||
REG UWORD cnt = 0;
|
||||
UWORD max_cluster = ((ULONG) dpbp->dpb_size
|
||||
* (ULONG) (dpbp->dpb_clsmask + 1) - dpbp->dpb_data + 1)
|
||||
/ (dpbp->dpb_clsmask + 1) + 2;
|
||||
/* UWORD max_cluster = ( ((ULONG) dpbp->dpb_size
|
||||
* * (ULONG) (dpbp->dpb_clsmask + 1) - (dpbp->dpb_data + 1) )
|
||||
* / (dpbp->dpb_clsmask + 1) ) + 2;
|
||||
*/
|
||||
UWORD max_cluster = ( ((ULONG) dpbp->dpb_size * (ULONG) (dpbp->dpb_clsmask + 1))
|
||||
/ (dpbp->dpb_clsmask + 1) ) + 1;
|
||||
|
||||
if (dpbp->dpb_nfreeclst != UNKNCLUSTER)
|
||||
return dpbp->dpb_nfreeclst;
|
||||
|
@ -1843,41 +1869,34 @@ UWORD dos_free(struct dpb * dpbp)
|
|||
}
|
||||
}
|
||||
|
||||
VOID dos_pwd(struct cds FAR * cdsp, BYTE FAR * s)
|
||||
{
|
||||
WORD x = 1 + cdsp->cdsJoinOffset;
|
||||
fsncopy((BYTE FAR *) & cdsp->cdsCurrentPath[x], s, 64);
|
||||
}
|
||||
|
||||
|
||||
#ifndef IPL
|
||||
COUNT dos_cd(struct cds FAR * cdsp, BYTE FAR * s)
|
||||
COUNT dos_cd(struct cds FAR * cdsp, BYTE FAR *PathName)
|
||||
{
|
||||
BYTE FAR *p;
|
||||
struct f_node FAR *fnp;
|
||||
REG struct dpb *dpbp;
|
||||
COUNT x;
|
||||
|
||||
/* Get the current directory so that we initialize all access */
|
||||
/* relative to root. */
|
||||
truename(s, PriPathName, FALSE);
|
||||
/* first check for valid drive */
|
||||
if (cdsp->cdsDpb == 0)
|
||||
return DE_INVLDDRV;
|
||||
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
{
|
||||
if ((int2f_Remote_call(REM_CHDIR, 0, 0, 0, PriPathName, 0, 0)) != 0)
|
||||
return DE_PATHNOTFND;
|
||||
fscopy(&PriPathName[0], cdsp->cdsCurrentPath);
|
||||
if (PriPathName[7] == 0)
|
||||
cdsp->cdsCurrentPath[8] = 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
dpbp = (struct dpb *)cdsp->cdsDpb;
|
||||
if ((media_check(dpbp) < 0))
|
||||
return DE_INVLDDRV;
|
||||
|
||||
/* now test for its existance. If it doesn't, return an error. */
|
||||
/* If it does, copy the path to the current directory */
|
||||
/* structure. */
|
||||
if ((fnp = dir_open((BYTE FAR *) PriPathName)) == NULL)
|
||||
if ((fnp = dir_open(PathName)) == NULL)
|
||||
return DE_PATHNOTFND;
|
||||
|
||||
cdsp->cdsStrtClst = fnp->f_dirstart;
|
||||
dir_close(fnp);
|
||||
fscopy(&PriPathName[0], cdsp->cdsCurrentPath);
|
||||
fscopy(&PathName[0], cdsp->cdsCurrentPath);
|
||||
return SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
@ -2074,7 +2093,9 @@ COUNT media_check(REG struct dpb * dpbp)
|
|||
size = bpbp->bpb_nsize == 0 ?
|
||||
bpbp->bpb_huge :
|
||||
(ULONG) bpbp->bpb_nsize;
|
||||
/* patch point
|
||||
dpbp->dpb_size = size / ((ULONG) bpbp->bpb_nsector);
|
||||
*/
|
||||
dpbp->dpb_fatsize = bpbp->bpb_nfsect;
|
||||
dpbp->dpb_dirstrt = dpbp->dpb_fatstrt
|
||||
+ dpbp->dpb_fats * dpbp->dpb_fatsize;
|
||||
|
@ -2082,8 +2103,13 @@ COUNT media_check(REG struct dpb * dpbp)
|
|||
+ ((DIRENT_SIZE * dpbp->dpb_dirents
|
||||
+ (dpbp->dpb_secsize - 1))
|
||||
/ dpbp->dpb_secsize);
|
||||
/*
|
||||
Michal Meller <maceman@priv4,onet.pl> patch to jimtabor
|
||||
*/
|
||||
dpbp->dpb_size = ((size - dpbp->dpb_data) / ((ULONG) bpbp->bpb_nsector) + 1);
|
||||
|
||||
dpbp->dpb_flags = 0;
|
||||
dpbp->dpb_next = (struct dpb FAR *)-1;
|
||||
/* dpbp->dpb_next = (struct dpb FAR *)-1;*/
|
||||
dpbp->dpb_cluster = UNKNCLUSTER;
|
||||
dpbp->dpb_nfreeclst = UNKNCLUSTER; /* number of free clusters */
|
||||
for (i = 1, dpbp->dpb_shftcnt = 0;
|
||||
|
@ -2112,6 +2138,9 @@ COUNT xlt_fnp(struct f_node FAR * fnp)
|
|||
struct dhdr FAR *select_unit(COUNT drive)
|
||||
{
|
||||
/* Just get the header from the dhdr array */
|
||||
return blk_devices[drive].dpb_device;
|
||||
/* return blk_devices[drive].dpb_device; */
|
||||
|
||||
return CDSp->cds_table[drive].cdsDpb;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:09 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.6 1999/08/10 18:03:42 jprice
|
||||
* ror4 2011-03 patch
|
||||
|
|
|
@ -35,8 +35,14 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:12 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.7 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.6 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.5 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -131,7 +137,7 @@ VOID FatGetDrvData(COUNT drive, COUNT FAR * spc, COUNT FAR * bps,
|
|||
printf("FGDD\n");
|
||||
|
||||
/* first check for valid drive */
|
||||
if (drive < 0 || drive > NDEVS)
|
||||
if ((drive < 0) || (drive > lastdrive) || (drive > NDEVS))
|
||||
{
|
||||
*spc = -1;
|
||||
return;
|
||||
|
@ -139,6 +145,11 @@ VOID FatGetDrvData(COUNT drive, COUNT FAR * spc, COUNT FAR * bps,
|
|||
|
||||
/* next - "log" in the drive */
|
||||
drive = (drive == 0 ? default_drive : drive - 1);
|
||||
if (CDSp->cds_table[drive].cdsFlags & CDSNETWDRV) {
|
||||
printf("FatGetDrvData not yet supported over network drives\n");
|
||||
*spc = -1;
|
||||
return;
|
||||
}
|
||||
dpbp = (struct dpb *)CDSp->cds_table[drive].cdsDpb;
|
||||
dpbp->dpb_flags = -1;
|
||||
if ((media_check(dpbp) < 0))
|
||||
|
@ -340,7 +351,7 @@ BOOL FcbRead(xfcb FAR * lpXfcb, COUNT * nErrorCode)
|
|||
/* to. */
|
||||
lPosit = ((lpFcb->fcb_cublock * 128) + lpFcb->fcb_curec)
|
||||
* lpFcb->fcb_recsiz;
|
||||
if (dos_lseek(s->sft_status, lPosit, 0) < 0)
|
||||
if (SftSeek(s, lPosit, 0) != SUCCESS)
|
||||
{
|
||||
*nErrorCode = FCB_ERR_EOF;
|
||||
return FALSE;
|
||||
|
@ -412,7 +423,7 @@ BOOL FcbWrite(xfcb FAR * lpXfcb, COUNT * nErrorCode)
|
|||
/* to. */
|
||||
lPosit = ((lpFcb->fcb_cublock * 128) + lpFcb->fcb_curec)
|
||||
* lpFcb->fcb_recsiz;
|
||||
if (dos_lseek(s->sft_status, lPosit, 0) < 0)
|
||||
if (SftSeek(s, lPosit, 0) != SUCCESS)
|
||||
{
|
||||
*nErrorCode = FCB_ERR_EOF;
|
||||
return FALSE;
|
||||
|
@ -427,12 +438,13 @@ BOOL FcbWrite(xfcb FAR * lpXfcb, COUNT * nErrorCode)
|
|||
|
||||
/* Do the read */
|
||||
nWritten = dos_write(s->sft_status, p->ps_dta, lpFcb->fcb_recsiz);
|
||||
s->sft_size = dos_getcufsize(s->sft_status);
|
||||
}
|
||||
|
||||
/* Now find out how we will return and do it. */
|
||||
if (nWritten == lpFcb->fcb_recsiz)
|
||||
{
|
||||
lpFcb->fcb_fsize = dos_getcufsize(s->sft_status);
|
||||
lpFcb->fcb_fsize = s->sft_size;
|
||||
FcbNextRecord(lpFcb);
|
||||
*nErrorCode = FCB_SUCCESS;
|
||||
return TRUE;
|
||||
|
@ -813,24 +825,40 @@ BOOL FcbOpen(xfcb FAR * lpXfcb)
|
|||
}
|
||||
}
|
||||
}
|
||||
fbcopy((BYTE FAR *) & lpFcb->fcb_fname, (BYTE FAR *) & sftp->sft_name, FNAME_SIZE + FEXT_SIZE);
|
||||
if ((FcbDrive < 0) || (FcbDrive > lastdrive)) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
if (CDSp->cds_table[FcbDrive].cdsFlags & CDSNETWDRV) {
|
||||
COUNT result;
|
||||
lpCurSft = (sfttbl FAR *)sftp;
|
||||
result = int2f_Remote_call(REM_OPEN, 0, 0, 0, (VOID FAR *) sftp, 0, MK_FP(0, O_RDWR));
|
||||
result = -result;
|
||||
sftp->sft_status = result;
|
||||
}
|
||||
else {
|
||||
sftp->sft_status = dos_open(PriPathName, O_RDWR);
|
||||
sftp->sft_size = dos_getfsize(sftp->sft_status);
|
||||
dos_getftime(sftp->sft_status,
|
||||
(date FAR *) & sftp->sft_date,
|
||||
(time FAR *) & sftp->sft_time);
|
||||
|
||||
}
|
||||
if (sftp->sft_status >= 0)
|
||||
{
|
||||
lpFcb->fcb_drive = FcbDrive;
|
||||
lpFcb->fcb_sftno = sft_idx;
|
||||
lpFcb->fcb_curec = 0;
|
||||
lpFcb->fcb_recsiz = 128;
|
||||
lpFcb->fcb_fsize = dos_getfsize(sftp->sft_status);
|
||||
dos_getftime(sftp->sft_status,
|
||||
(date FAR *) & lpFcb->fcb_date,
|
||||
(time FAR *) & lpFcb->fcb_time);
|
||||
lpFcb->fcb_fsize = sftp->sft_size;
|
||||
lpFcb->fcb_date = sftp->sft_date;
|
||||
lpFcb->fcb_time = sftp->sft_time;
|
||||
lpFcb->fcb_rndm = 0;
|
||||
sftp->sft_count += 1;
|
||||
sftp->sft_mode = O_RDWR;
|
||||
sftp->sft_attrib = 0;
|
||||
sftp->sft_flags = 0;
|
||||
sftp->sft_psp = cu_psp;
|
||||
fbcopy((BYTE FAR *) & lpFcb->fcb_fname, (BYTE FAR *) & sftp->sft_name, FNAME_SIZE + FEXT_SIZE);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -844,6 +872,14 @@ BOOL FcbDelete(xfcb FAR * lpXfcb)
|
|||
/* Build a traditional DOS file name */
|
||||
CommonFcbInit(lpXfcb, PriPathName, &FcbDrive);
|
||||
|
||||
if ((FcbDrive < 0) || (FcbDrive > lastdrive)) {
|
||||
return DE_INVLDDRV;
|
||||
}
|
||||
current_ldt = &CDSp->cds_table[FcbDrive];
|
||||
if (CDSp->cds_table[FcbDrive].cdsFlags & CDSNETWDRV) {
|
||||
return -int2f_Remote_call(REM_DELETE, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* check for a device */
|
||||
/* if we have an extension, can't be a device */
|
||||
if (IsDevice(PriPathName))
|
||||
|
@ -1148,7 +1184,7 @@ BOOL FcbFindNext(xfcb FAR * lpXfcb)
|
|||
Dmatch.dm_drive = FcbDrive ? FcbDrive - 1 : default_drive;
|
||||
|
||||
fbcopy(lpFcb->fcb_fname, (BYTE FAR *) Dmatch.dm_name_pat, FNAME_SIZE + FEXT_SIZE);
|
||||
upMem((BYTE FAR *) Dmatch.dm_name_pat, FNAME_SIZE + FEXT_SIZE);
|
||||
upFMem((BYTE FAR *) Dmatch.dm_name_pat, FNAME_SIZE + FEXT_SIZE);
|
||||
Dmatch.dm_attr_srch = wAttr;
|
||||
Dmatch.dm_entry = lpFcb->fcb_diroff;
|
||||
Dmatch.dm_cluster = lpFcb->fcb_dirclst;
|
||||
|
|
|
@ -36,8 +36,11 @@ static BYTE *Globals_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:18 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.17 2000/03/16 03:28:49 kernel
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.16 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -703,7 +706,7 @@ VOID fputbyte();
|
|||
#ifdef I86
|
||||
#define setvec(n, isr) (void)(*(VOID (INRPT FAR * FAR *)())(4 * (n)) = (isr))
|
||||
#endif
|
||||
#define is_leap_year(y) ((y) & 3 ? 0 : (y) % 100 ? 1 : (y) % 400 ? 1 : 0)
|
||||
#define is_leap_year(y) ((y) & 3 ? 0 : (y) % 100 ? 1 : (y) % 400 ? 0 : 1)
|
||||
|
||||
/* ^Break handling */
|
||||
void spawn_int23(void); /* procsupt.asm */
|
||||
|
|
|
@ -38,8 +38,8 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:18 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -30,8 +30,11 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:18 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.4 2000/03/31 05:40:09 jtabor
|
||||
; Added Eric W. Biederman Patches
|
||||
;
|
||||
; Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
@ -181,12 +184,16 @@ int2f_r_5:
|
|||
pop ds
|
||||
call int2f_call
|
||||
pop ds
|
||||
jc short int2f_rfner
|
||||
xor ax,ax
|
||||
jmp short int2f_rfner
|
||||
int2f_r_6:
|
||||
;
|
||||
; everything else goes through here.
|
||||
;
|
||||
call int2f_call
|
||||
jc int2f_rfner
|
||||
xor ax,ax
|
||||
int2f_rfner:
|
||||
pop bx
|
||||
pop cx
|
||||
|
@ -213,6 +220,10 @@ _QRemote_Fn
|
|||
les di,[bp+8]
|
||||
stc
|
||||
int 2fh
|
||||
mov ax,0xffff
|
||||
jnc QRemote_Fn_out
|
||||
xor ax,ax
|
||||
QRemote_Fn_out:
|
||||
pop di
|
||||
pop si
|
||||
pop ds
|
||||
|
@ -229,4 +240,3 @@ int2f_call:
|
|||
pop bp
|
||||
pop bp
|
||||
ret
|
||||
|
||||
|
|
|
@ -36,8 +36,26 @@ BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:19 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.25 2000/04/29 05:31:47 jtabor
|
||||
* fix history
|
||||
*
|
||||
* Revision 1.24 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.23 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.22 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.21 2000/03/17 05:00:11 kernel
|
||||
* Fixed Func 0x32
|
||||
*
|
||||
* Revision 1.20 2000/03/16 03:28:49 kernel
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.19 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -253,8 +271,8 @@ VOID int21_syscall(iregs FAR * irp)
|
|||
|
||||
VOID int21_service(iregs FAR * r)
|
||||
{
|
||||
COUNT rc,
|
||||
rc1;
|
||||
COUNT rc = 0,
|
||||
rc1;
|
||||
ULONG lrc;
|
||||
psp FAR *p = MK_FP(cu_psp, 0);
|
||||
|
||||
|
@ -565,7 +583,7 @@ dispatch:
|
|||
|
||||
/* Get default DPB */
|
||||
case 0x1f:
|
||||
if (default_drive < lastdrive)
|
||||
if (default_drive <= lastdrive)
|
||||
{
|
||||
struct dpb FAR *dpb = (struct dpb FAR *)CDSp->cds_table[default_drive].cdsDpb;
|
||||
if (dpb == 0)
|
||||
|
@ -750,7 +768,8 @@ dispatch:
|
|||
|
||||
/* Get DPB */
|
||||
case 0x32:
|
||||
if (r->DL < lastdrive)
|
||||
r->DL = ( r->DL == 0 ? default_drive : r->DL - 1);
|
||||
if (r->DL <= lastdrive)
|
||||
{
|
||||
struct dpb FAR *dpb = CDSp->cds_table[r->DL].cdsDpb;
|
||||
if (dpb == 0)
|
||||
|
@ -822,40 +841,30 @@ dispatch:
|
|||
/* Get/Set Country Info */
|
||||
case 0x38:
|
||||
{
|
||||
BYTE FAR *lpTable
|
||||
= (BYTE FAR *) MK_FP(r->DS, r->DX);
|
||||
BYTE nRetCode;
|
||||
UWORD cntry = r->AL;
|
||||
|
||||
if (0xffff == r->DX)
|
||||
{
|
||||
r->BX = SetCtryInfo(
|
||||
(UBYTE FAR *) & (r->AL),
|
||||
(UWORD FAR *) & (r->BX),
|
||||
(BYTE FAR *) & lpTable,
|
||||
(UBYTE *) & nRetCode);
|
||||
if(cntry == 0)
|
||||
cntry = (UWORD)-1;
|
||||
else if(cntry == 0xff)
|
||||
cntry = r->BX;
|
||||
|
||||
if (nRetCode != 0)
|
||||
{
|
||||
r->AX = 0xff;
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
}
|
||||
else
|
||||
{
|
||||
r->AX = nRetCode;
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
r->BX = GetCtryInfo(&(r->AL), &(r->BX), lpTable);
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
if (0xffff == r->DX) {
|
||||
/* Set Country Code */
|
||||
if((rc = setCountryCode(cntry)) < 0)
|
||||
goto error_invalid;
|
||||
} else {
|
||||
/* Get Country Information */
|
||||
if((rc = getCountryInformation(cntry, MK_FP(r->DS, r->DX))) < 0)
|
||||
goto error_invalid;
|
||||
r->AX = r->BX = cntry;
|
||||
}
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Dos Create Directory */
|
||||
case 0x39:
|
||||
rc = dos_mkdir((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
rc = DosMkdir((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
if (rc != SUCCESS)
|
||||
goto error_exit;
|
||||
else
|
||||
|
@ -866,7 +875,7 @@ dispatch:
|
|||
|
||||
/* Dos Remove Directory */
|
||||
case 0x3a:
|
||||
rc = dos_rmdir((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
rc = DosRmdir((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
if (rc != SUCCESS)
|
||||
goto error_exit;
|
||||
else
|
||||
|
@ -948,11 +957,11 @@ dispatch:
|
|||
|
||||
/* Dos Delete File */
|
||||
case 0x41:
|
||||
rc = dos_delete((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
rc = DosDelete((BYTE FAR *) MK_FP(r->DS, r->DX));
|
||||
if (rc < 0)
|
||||
{
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
r->AX = -rc1;
|
||||
r->AX = -rc;
|
||||
}
|
||||
else
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
|
@ -976,7 +985,7 @@ dispatch:
|
|||
{
|
||||
case 0x00:
|
||||
rc = DosGetFattr((BYTE FAR *) MK_FP(r->DS, r->DX), (UWORD FAR *) & r->CX);
|
||||
if (rc < SUCCESS)
|
||||
if (rc != SUCCESS)
|
||||
goto error_exit;
|
||||
else
|
||||
{
|
||||
|
@ -1009,6 +1018,10 @@ dispatch:
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(r->AL == 0x02)
|
||||
r->AX = r->CX;
|
||||
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
}
|
||||
|
@ -1117,9 +1130,8 @@ dispatch:
|
|||
|| ((psp FAR *) (MK_FP(cu_psp, 0)))->ps_parent == cu_psp)
|
||||
break;
|
||||
tsr = FALSE;
|
||||
/* int2f_Remote_call(0x1122, 0, 0, 0, 0, 0, 0);
|
||||
int2f_Remote_call(REM_PROCESS_END, 0, 0, 0, 0, 0, 0);
|
||||
int2f_Remote_call(REM_CLOSEALL, 0, 0, 0, 0, 0, 0);
|
||||
*/
|
||||
if (ErrorMode)
|
||||
{
|
||||
ErrorMode = FALSE;
|
||||
|
@ -1210,7 +1222,7 @@ dispatch:
|
|||
|
||||
/* Dos Rename */
|
||||
case 0x56:
|
||||
rc = dos_rename(
|
||||
rc = DosRename(
|
||||
(BYTE FAR *) MK_FP(r->DS, r->DX), /* OldName */
|
||||
(BYTE FAR *) MK_FP(r->ES, r->DI)); /* NewName */
|
||||
if (rc < SUCCESS)
|
||||
|
@ -1341,9 +1353,17 @@ dispatch:
|
|||
case 0x07:
|
||||
case 0x08:
|
||||
case 0x09:
|
||||
int2f_Remote_call(REM_PRINTREDIR, 0, 0, r->DX, 0, 0, (MK_FP(0, Int21AX)));
|
||||
{
|
||||
COUNT result;
|
||||
result = int2f_Remote_call(REM_PRINTREDIR, 0, 0, r->DX, 0, 0, (MK_FP(0, Int21AX)));
|
||||
r->AX = result;
|
||||
if (result != SUCCESS) {
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
} else {
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
goto error_invalid;
|
||||
}
|
||||
|
@ -1361,25 +1381,47 @@ dispatch:
|
|||
break;
|
||||
|
||||
default:
|
||||
int2f_Remote_call(REM_PRINTSET, r->BX, r->CX, r->DX, (MK_FP(r->ES, r->DI)), r->SI, (MK_FP(r->DS, Int21AX)));
|
||||
{
|
||||
COUNT result;
|
||||
result = int2f_Remote_call(REM_PRINTSET, r->BX, r->CX, r->DX, (MK_FP(r->ES, r->DI)), r->SI, (MK_FP(r->DS, Int21AX)));
|
||||
r->AX = result;
|
||||
if (result != SUCCESS) {
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
} else {
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5f:
|
||||
switch (r->AL)
|
||||
{
|
||||
case 0x07:
|
||||
if (r->DL <= lastdrive) {
|
||||
CDSp->cds_table[r->DL].cdsFlags |= 0x100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x08:
|
||||
if (r->DL <= lastdrive) {
|
||||
CDSp->cds_table[r->DL].cdsFlags &= ~0x100;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
int2f_Remote_call(REM_DOREDIRECT, r->BX, r->CX, r->DX, (MK_FP(r->ES, r->DI)), r->SI, (MK_FP(r->DS, Int21AX)));
|
||||
{
|
||||
COUNT result;
|
||||
result = int2f_Remote_call(REM_DOREDIRECT, r->BX, r->CX, r->DX, (MK_FP(r->ES, r->DI)), r->SI, (MK_FP(r->DS, Int21AX)));
|
||||
r->AX = result;
|
||||
if (result != SUCCESS) {
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
} else {
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1441,71 +1483,58 @@ dispatch:
|
|||
|
||||
/* Extended country info */
|
||||
case 0x65:
|
||||
if (r->AL <= 0x7)
|
||||
{
|
||||
if (ExtCtryInfo(
|
||||
r->AL,
|
||||
r->BX,
|
||||
r->CX,
|
||||
MK_FP(r->ES, r->DI)))
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
else
|
||||
goto error_invalid;
|
||||
}
|
||||
else if ((r->AL >= 0x20) && (r->AL <= 0x22))
|
||||
{
|
||||
switch (r->AL)
|
||||
{
|
||||
case 0x20:
|
||||
switch(r->AL) {
|
||||
case 0x20: /* upcase single character */
|
||||
r->DL = upChar(r->DL);
|
||||
goto okay;
|
||||
|
||||
case 0x21:
|
||||
upMem(
|
||||
MK_FP(r->DS, r->DX),
|
||||
r->CX);
|
||||
goto okay;
|
||||
|
||||
case 0x22:
|
||||
upString(MK_FP(r->DS, r->DX));
|
||||
okay:
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
break;
|
||||
|
||||
case 0x23:
|
||||
case 0x21: /* upcase memory area */
|
||||
upMem(MK_FP(r->DS, r->DX), r->CX);
|
||||
break;
|
||||
case 0x22: /* upcase ASCIZ */
|
||||
upString(MK_FP(r->DS, r->DX));
|
||||
break;
|
||||
case 0xA0: /* upcase single character of filenames */
|
||||
r->DL = upFChar(r->DL);
|
||||
break;
|
||||
case 0xA1: /* upcase memory area of filenames */
|
||||
upFMem(MK_FP(r->DS, r->DX), r->CX);
|
||||
break;
|
||||
case 0xA2: /* upcase ASCIZ of filenames */
|
||||
upFString(MK_FP(r->DS, r->DX));
|
||||
break;
|
||||
case 0x23: /* check Yes/No response */
|
||||
r->AX = yesNo(r->DL);
|
||||
goto okay;
|
||||
|
||||
default:
|
||||
goto error_invalid;
|
||||
}
|
||||
}
|
||||
else
|
||||
r->FLAGS |= FLG_CARRY;
|
||||
break;
|
||||
default:
|
||||
if ((rc = extCtryInfo(
|
||||
r->AL, r->BX, r->DX, r->CX,
|
||||
MK_FP(r->ES, r->DI))) < 0)
|
||||
goto error_exit;
|
||||
break;
|
||||
}
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
break;
|
||||
|
||||
/* Code Page functions */
|
||||
case 0x66:
|
||||
case 0x66: {
|
||||
int rc;
|
||||
switch (r->AL)
|
||||
{
|
||||
case 1:
|
||||
GetGlblCodePage(
|
||||
(UWORD FAR *) & (r->BX),
|
||||
(UWORD FAR *) & (r->DX));
|
||||
goto okay_66;
|
||||
|
||||
rc = getCodePage(&r->BX, &r->DX);
|
||||
break;
|
||||
case 2:
|
||||
SetGlblCodePage(
|
||||
(UWORD FAR *) & (r->BX),
|
||||
(UWORD FAR *) & (r->DX));
|
||||
okay_66:
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
rc = setCodePage(r->BX, r->DX);
|
||||
break;
|
||||
|
||||
default:
|
||||
goto error_invalid;
|
||||
}
|
||||
if(rc != SUCCESS)
|
||||
goto error_exit;
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set Max file handle count */
|
||||
case 0x67:
|
||||
|
@ -1521,6 +1550,63 @@ dispatch:
|
|||
case 0x68:
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
break;
|
||||
|
||||
/* Get/Set Serial Number */
|
||||
case 0x69:
|
||||
r->BL = ( r->BL == 0 ? default_drive : r->BL - 1);
|
||||
if (r->BL <= lastdrive)
|
||||
{
|
||||
if (CDSp->cds_table[r->BL].cdsFlags & CDSNETWDRV) {
|
||||
r->AX = 0x01;
|
||||
goto error_out;
|
||||
}
|
||||
switch(r->AL){
|
||||
case 0x00:
|
||||
r->CX = 0x0866;
|
||||
rc = DosDevIOctl(r, (COUNT FAR *) & rc1);
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
r->CX = 0x0846;
|
||||
rc = DosDevIOctl(r, (COUNT FAR *) & rc1);
|
||||
break;
|
||||
}
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
break;
|
||||
}
|
||||
else
|
||||
r->AL = 0xFF;
|
||||
break;
|
||||
|
||||
|
||||
/* Extended Open-Creat, not fully functional.*/
|
||||
case 0x6c:
|
||||
switch(r->DL) {
|
||||
case 0x01:
|
||||
if ((rc = DosCreat(MK_FP(r->DS, r->SI), r->CX )) < 0 )
|
||||
goto error_exit;
|
||||
else
|
||||
{
|
||||
r->CX = 0x02;
|
||||
r->AX = rc;
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
if ((rc = DosOpen(MK_FP(r->DS, r->SI), r->BL )) < 0 )
|
||||
goto error_exit;
|
||||
else
|
||||
{
|
||||
r->CX = 0x01;
|
||||
r->AX = rc;
|
||||
r->FLAGS &= ~FLG_CARRY;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
goto error_invalid;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:20 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:20 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 1999/08/10 17:57:12 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -35,8 +35,11 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:20 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/04/29 05:13:16 jtabor
|
||||
* Added new functions and clean up code
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -99,6 +102,7 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
{
|
||||
sft FAR *s;
|
||||
struct dpb FAR *dpbp;
|
||||
struct cds FAR *cdsp;
|
||||
BYTE FAR *pBuffer = MK_FP(r->DS, r->DX);
|
||||
COUNT nMode;
|
||||
|
||||
|
@ -131,13 +135,7 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
case 0x0f:
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
if (r->BL > nblkdev)
|
||||
{
|
||||
*err = DE_INVLDDRV;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/*
|
||||
This line previously returned the deviceheader at r->bl. But,
|
||||
DOS numbers its drives starting at 1, not 0. A=1, B=2, and so
|
||||
|
@ -146,11 +144,20 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
-SRM
|
||||
*/
|
||||
/* JPP - changed to use default drive if drive=0 */
|
||||
if (r->BL == 0)
|
||||
dpbp = &blk_devices[default_drive];
|
||||
else
|
||||
dpbp = &blk_devices[r->BL - 1];
|
||||
/* JT Fixed it */
|
||||
|
||||
r->BL = ( r->BL == 0 ? default_drive : r->BL - 1);
|
||||
if (r->BL > lastdrive)
|
||||
{
|
||||
*err = DE_INVLDDRV;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cdsp = &CDSp->cds_table[r->BL];
|
||||
dpbp = cdsp->cdsDpb;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 0x0b:
|
||||
|
@ -172,19 +179,14 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
/* Get the flags from the SFT */
|
||||
r->DX = r->AX = s->sft_flags;
|
||||
|
||||
/* Test for file and network SFT. These return a 0 in */
|
||||
/* the AH register. */
|
||||
if ((s->sft_flags & SFT_FSHARED)
|
||||
|| !(s->sft_flags & SFT_FDEVICE))
|
||||
{
|
||||
r->AH = 0;
|
||||
}
|
||||
/* r->DX = r->AX = s->sft_dev->dh_attr;*/
|
||||
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
/* sft_flags is a file, return an error because you */
|
||||
/* can't set the status of a file. */
|
||||
if (!(s->sft_flags & SFT_FDEVICE))
|
||||
if ((s->sft_flags & SFT_FDEVICE)) /* !*/
|
||||
{
|
||||
*err = DE_INVLDFUNC;
|
||||
return 0;
|
||||
|
@ -209,8 +211,9 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
IoCharCommon:
|
||||
|
||||
if ((s->sft_flags & SFT_FDEVICE)
|
||||
|| ((r->AL == 0x10) && !(s->sft_dev->dh_attr & ATTR_QRYIOCTL))
|
||||
|| ((r->AL == 0x0c) && !(s->sft_dev->dh_attr & ATTR_GENIOCTL)))
|
||||
|| ((r->AL == 0x10) && (s->sft_dev->dh_attr & ATTR_QRYIOCTL))
|
||||
|| ((r->AL == 0x0c) && (s->sft_dev->dh_attr & ATTR_GENIOCTL)))
|
||||
/* ! ! */
|
||||
{
|
||||
if (s->sft_dev->dh_attr & SFT_FIOCTL)
|
||||
{
|
||||
|
@ -249,8 +252,9 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
nMode = C_IOCTLOUT;
|
||||
IoBlockCommon:
|
||||
if ((dpbp->dpb_device->dh_attr & ATTR_IOCTL)
|
||||
|| ((r->AL == 0x11) && !(dpbp->dpb_device->dh_attr & ATTR_QRYIOCTL))
|
||||
|| ((r->AL == 0x0d) && !(dpbp->dpb_device->dh_attr & ATTR_GENIOCTL)))
|
||||
|| ((r->AL == 0x11) && (dpbp->dpb_device->dh_attr & ATTR_QRYIOCTL))
|
||||
|| ((r->AL == 0x0d) && (dpbp->dpb_device->dh_attr & ATTR_GENIOCTL)))
|
||||
/* ! ! */
|
||||
{
|
||||
*err = DE_INVLDFUNC;
|
||||
return 0;
|
||||
|
@ -310,11 +314,14 @@ COUNT DosDevIOctl(iregs FAR * r, COUNT FAR * err)
|
|||
return 0;
|
||||
|
||||
case 0x09:
|
||||
r->DX = dpbp->dpb_device->dh_attr;
|
||||
if(cdsp->cdsFlags & CDSNETWDRV)
|
||||
r->DX = 0x1000;
|
||||
else
|
||||
r->DX = dpbp->dpb_device->dh_attr;
|
||||
break;
|
||||
|
||||
case 0x0a:
|
||||
r->DX = s->sft_dcb->dpb_device->dh_attr;
|
||||
r->DX = s->sft_flags & SFT_FSHARED;
|
||||
break;
|
||||
|
||||
case 0x0e:
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:21 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:22 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.6 2000/03/09 06:07:11 kernel
|
||||
; 2017f updates by James Tabor
|
||||
|
|
|
@ -5,8 +5,14 @@
|
|||
#
|
||||
|
||||
# $Log$
|
||||
# Revision 1.1 2000/05/06 19:35:23 jhall1
|
||||
# Initial revision
|
||||
# Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
# Update CVS to 2020
|
||||
#
|
||||
# Revision 1.14 2000/03/31 05:40:09 jtabor
|
||||
# Added Eric W. Biederman Patches
|
||||
#
|
||||
# Revision 1.13 2000/03/17 22:59:04 kernel
|
||||
# Steffen Kaiser's NLS changes
|
||||
#
|
||||
# Revision 1.12 2000/03/09 06:07:11 kernel
|
||||
# 2017f updates by James Tabor
|
||||
|
@ -117,6 +123,9 @@ HDR=../hdr/
|
|||
.c.obj:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.c.asm:
|
||||
$(CC) $(CFLAGS) -S $<
|
||||
|
||||
.cpp.obj:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
|
@ -149,6 +158,7 @@ EXE_dependencies = \
|
|||
int2f.obj \
|
||||
inthndlr.obj \
|
||||
io.obj \
|
||||
intr.obj \
|
||||
ioctl.obj \
|
||||
irqstack.obj \
|
||||
kernel.obj \
|
||||
|
@ -158,6 +168,7 @@ EXE_dependencies = \
|
|||
newstuff.obj \
|
||||
network.obj \
|
||||
nls.obj \
|
||||
nls_hc.obj \
|
||||
nlssupt.obj \
|
||||
prf.obj \
|
||||
printer.obj \
|
||||
|
@ -189,16 +200,16 @@ clean:
|
|||
# inability of Turbo `make' 2.0 to perform command line redirection. -- ror4
|
||||
kernel.exe: $(EXE_dependencies) $(LIBS)
|
||||
del kernel.lib
|
||||
$(LIBUTIL) kernel +entry +io +blockio +chario +dosfns +console
|
||||
$(LIBUTIL) kernel +printer +serial +dsk +error +fatdir +fatfs
|
||||
$(LIBUTIL) kernel +fattab +fcbfns +initoem +inthndlr +ioctl
|
||||
$(LIBUTIL) kernel +main +config +memmgr +misc +newstuff +nls
|
||||
$(LIBUTIL) kernel +entry +io +blockio +chario +dosfns +console
|
||||
$(LIBUTIL) kernel +printer +serial +dsk +error +fatdir +fatfs
|
||||
$(LIBUTIL) kernel +fattab +fcbfns +initoem +inthndlr +ioctl +nls_hc
|
||||
$(LIBUTIL) kernel +main +config +memmgr +misc +newstuff +nls +intr
|
||||
$(LIBUTIL) kernel +dosnames +prf +strings +network +sysclk +syspack
|
||||
$(LIBUTIL) kernel +systime +task +int2f +irqstack +apisupt
|
||||
$(LIBUTIL) kernel +asmsupt +execrh +nlssupt +procsupt +break
|
||||
$(LIBUTIL) kernel +systime +task +int2f +irqstack +apisupt
|
||||
$(LIBUTIL) kernel +asmsupt +execrh +nlssupt +procsupt +break
|
||||
$(LIBUTIL) kernel +dosidle
|
||||
del kernel.bak
|
||||
$(LINK) /m/c/L$(LIBPATH) kernel,kernel,kernel,kernel+$(LIBS);
|
||||
del kernel.bak
|
||||
$(LINK) /m/c/L$(LIBPATH) kernel,kernel,kernel,kernel+$(LIBS);
|
||||
del kernel.lib
|
||||
|
||||
# *Individual File Dependencies*
|
||||
|
@ -220,6 +231,8 @@ execrh.obj: execrh.asm segs.inc
|
|||
|
||||
int2f.obj: int2f.asm segs.inc
|
||||
|
||||
intr.obj: intr.asm segs.inc intr.h
|
||||
|
||||
io.obj: io.asm segs.inc
|
||||
|
||||
irqstack.obj: irqstack.asm
|
||||
|
@ -382,6 +395,8 @@ nls.obj: nls.c $(HDR)portab.h globals.h $(HDR)device.h $(HDR)mcb.h \
|
|||
$(HDR)clock.h $(HDR)kbd.h $(HDR)error.h $(HDR)version.h proto.h \
|
||||
001-437.nls
|
||||
|
||||
nls_hc.obj: nls_hc.c globals.h $(HDR)portab.h $(HDR)nls.h
|
||||
|
||||
prf.obj: prf.c $(HDR)portab.h
|
||||
|
||||
strings.obj: strings.c $(HDR)portab.h
|
||||
|
|
|
@ -39,8 +39,11 @@ static BYTE *mainRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:25 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.14 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.13 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -215,19 +218,19 @@ INIT static VOID init_kernel(void)
|
|||
/* Now process CONFIG.SYS */
|
||||
DoConfig();
|
||||
|
||||
lastdrive = Config.cfgLastdrive;
|
||||
if (lastdrive < nblkdev)
|
||||
lastdrive = nblkdev;
|
||||
|
||||
/* and do final buffer allocation. */
|
||||
PostConfig();
|
||||
|
||||
/* Now config the final file system */
|
||||
/* Init the file system on emore time */
|
||||
FsConfig();
|
||||
|
||||
/* and process CONFIG.SYS one last time to load device drivers. */
|
||||
DoConfig();
|
||||
configDone();
|
||||
|
||||
/* Now config the final file system */
|
||||
FsConfig();
|
||||
|
||||
#endif
|
||||
/* Now to initialize all special flags, etc. */
|
||||
mem_access_mode = FIRST_FIT;
|
||||
|
@ -347,7 +350,7 @@ INIT VOID FsConfig(VOID)
|
|||
if (i < nblkdev)
|
||||
{
|
||||
CDSp->cds_table[i].cdsDpb = &blk_devices[i];
|
||||
CDSp->cds_table[i].cdsFlags = 0x4000;
|
||||
CDSp->cds_table[i].cdsFlags = CDSPHYSDRV;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -446,10 +449,10 @@ VOID init_device(struct dhdr FAR * dhp, BYTE FAR * cmdLine)
|
|||
blk_devices[nblkdev].dpb_subunit = Index;
|
||||
blk_devices[nblkdev].dpb_device = dhp;
|
||||
blk_devices[nblkdev].dpb_flags = M_CHANGED;
|
||||
if ((CDSp) != 0)
|
||||
if ((CDSp != 0) && (nblkdev <= lastdrive))
|
||||
{
|
||||
CDSp->cds_table[nblkdev].cdsDpb = &blk_devices[nblkdev];
|
||||
CDSp->cds_table[nblkdev].cdsFlags = 0x4000;
|
||||
CDSp->cds_table[nblkdev].cdsFlags = CDSPHYSDRV;
|
||||
}
|
||||
++nblkdev;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ static BYTE *memmgrRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:26 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -34,8 +34,8 @@ static BYTE *miscRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:27 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,14 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:27 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.5 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.4 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -85,10 +91,11 @@ UCOUNT Remote_RW(UWORD func, UCOUNT n, BYTE FAR * bp, sft FAR * s, COUNT FAR * e
|
|||
dta = bp;
|
||||
rx = int2f_Remote_call(func, 0, n, 0, (VOID FAR *) s, 0, (VOID FAR *) & rc);
|
||||
dta = save_dta;
|
||||
*err = rx;
|
||||
*err = -rx;
|
||||
return ((UCOUNT) rc);
|
||||
}
|
||||
|
||||
#undef FIND_DEBUG
|
||||
/*
|
||||
|
||||
*/
|
||||
|
@ -96,21 +103,31 @@ COUNT Remote_find(UWORD func, UWORD attrib, BYTE FAR * name, REG dmatch FAR * dm
|
|||
{
|
||||
COUNT i,
|
||||
x;
|
||||
BYTE FAR *p,
|
||||
char FAR *p,
|
||||
*q;
|
||||
struct dirent FAR *SDp = (struct dirent FAR *)&SearchDir;
|
||||
struct dirent FAR *SDp = (struct dirent FAR *) &SearchDir;
|
||||
|
||||
if (func == REM_FINDFIRST)
|
||||
{
|
||||
truename(name, PriPathName, FALSE);
|
||||
SAttr = (BYTE) attrib;
|
||||
i = truename(name, PriPathName, FALSE);
|
||||
if (i != SUCCESS) {
|
||||
return i;
|
||||
}
|
||||
#if defined(FIND_DEBUG)
|
||||
printf("Remote Find: n='");
|
||||
p = name; while(*p) printf("%c", *p++);
|
||||
printf("' p='");
|
||||
p = PriPathName; while(*p) printf("%c", *p++);
|
||||
printf("'\n");
|
||||
#endif
|
||||
}
|
||||
fsncopy(dta, (BYTE FAR *) & TempBuffer, 21);
|
||||
fsncopy(dta, (BYTE FAR *) &TempBuffer, 21);
|
||||
p = dta;
|
||||
dta = (BYTE FAR *) & TempBuffer;
|
||||
dta = (BYTE FAR *) &TempBuffer;
|
||||
i = int2f_Remote_call(func, 0, 0, 0, 0, 0, 0);
|
||||
dta = p;
|
||||
fsncopy((BYTE FAR *) & TempBuffer[1], &dta[1], 20);
|
||||
fsncopy((BYTE FAR *) &TempBuffer[1], &dta[1], 20);
|
||||
|
||||
if (i != 0)
|
||||
return i;
|
||||
|
@ -157,53 +174,5 @@ COUNT Remote_find(UWORD func, UWORD attrib, BYTE FAR * name, REG dmatch FAR * dm
|
|||
return i;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open Existing Remote File, SDA First FN ptr -> Fully qualified name.
|
||||
* open func 3d
|
||||
* Create/Truncate w/o CDS Remote File
|
||||
* Extended Open/Create File
|
||||
*/
|
||||
UWORD Remote_OCT(UWORD func, BYTE FAR * name, UWORD pw, sft FAR * s)
|
||||
{
|
||||
truename(name, PriPathName, FALSE);
|
||||
lpCurSft = (sfttbl FAR *) s;
|
||||
return (int2f_Remote_call(func, 0, 0, 0, (VOID FAR *) s, 0, MK_FP(0, pw)));
|
||||
}
|
||||
|
||||
COUNT Remote_GSattr(UWORD func, BYTE FAR * name, UWORD FAR * attrp)
|
||||
{
|
||||
static char srfa[10];
|
||||
COUNT drive;
|
||||
struct cds FAR *p;
|
||||
|
||||
truename(name, PriPathName, TRUE);
|
||||
drive = PriPathName[0];
|
||||
drive -= 'A';
|
||||
truename(name, PriPathName, FALSE);
|
||||
|
||||
if (CDSp->cds_table[drive].cdsFlags & 0x8000)
|
||||
{
|
||||
p = current_ldt;
|
||||
current_ldt = &CDSp->cds_table[drive];
|
||||
if (func == REM_GETATTRZ)
|
||||
{
|
||||
|
||||
if (int2f_Remote_call(func, 0, 0, 0, 0, 0, (VOID FAR *) srfa) != 0)
|
||||
{
|
||||
current_ldt = p;
|
||||
goto AEXIT;
|
||||
}
|
||||
*attrp = (UWORD) srfa[0];
|
||||
goto GEXIT;
|
||||
}
|
||||
int2f_Remote_call(func, 0, 0, 0, 0, 0, MK_FP(0, attrp));
|
||||
GEXIT:
|
||||
current_ldt = p;
|
||||
return (COUNT) 0;
|
||||
}
|
||||
AEXIT:
|
||||
return (COUNT) 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,17 @@ static BYTE *mainRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:27 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.8 2000/04/02 06:11:35 jtabor
|
||||
* Fix ChgDir Code
|
||||
*
|
||||
* Revision 1.7 2000/04/02 05:30:48 jtabor
|
||||
* Fix ChgDir Code
|
||||
*
|
||||
* Revision 1.6 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.5 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -175,21 +184,41 @@ int DosMkTmp(BYTE FAR * pathname, UWORD attr)
|
|||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
COUNT get_verify_drive(char FAR *src)
|
||||
{
|
||||
COUNT drive;
|
||||
/* First, adjust the source pointer */
|
||||
src = adjust_far(src);
|
||||
|
||||
/* Do we have a drive? */
|
||||
if (src[1] == ':')
|
||||
{
|
||||
drive = (src[0] | 0x20) - 'a';
|
||||
}
|
||||
else
|
||||
drive = default_drive;
|
||||
if ((drive < 0) || (drive > lastdrive)) {
|
||||
drive = DE_INVLDDRV;
|
||||
}
|
||||
return drive;
|
||||
}
|
||||
|
||||
/*
|
||||
* Added support for external and internal calls.
|
||||
* Clean buffer before use. Make the true path and expand file names.
|
||||
* Example: *.* -> ????????.??? as in the currect way.
|
||||
*/
|
||||
int truename(char FAR * src, char FAR * dest, COUNT t)
|
||||
COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
||||
{
|
||||
static char buf[128] = "A:\\";
|
||||
char *bufp = buf + 3;
|
||||
COUNT i,
|
||||
n;
|
||||
COUNT i, n, x = 2;
|
||||
BYTE far *test;
|
||||
REG struct cds FAR *cdsp;
|
||||
|
||||
fbcopy((VOID FAR *) "A:\\\0\0\0\0\0\0\0", (VOID FAR *) buf, 10);
|
||||
dest[0] = '\0';
|
||||
|
||||
/* First, adjust the source pointer */
|
||||
src = adjust_far(src);
|
||||
|
@ -199,7 +228,7 @@ int truename(char FAR * src, char FAR * dest, COUNT t)
|
|||
{
|
||||
buf[0] = (src[0] | 0x20) + 'A' - 'a';
|
||||
|
||||
if (buf[0] >= lastdrive + 'A')
|
||||
if (buf[0] > lastdrive + 'A')
|
||||
return DE_PATHNOTFND;
|
||||
|
||||
src += 2;
|
||||
|
@ -207,24 +236,29 @@ int truename(char FAR * src, char FAR * dest, COUNT t)
|
|||
else
|
||||
buf[0] = default_drive + 'A';
|
||||
|
||||
i = buf[0] - '@';
|
||||
i = buf[0] - 'A';
|
||||
|
||||
cdsp = &CDSp->cds_table[i - 1];
|
||||
cdsp = &CDSp->cds_table[i];
|
||||
current_ldt = cdsp;
|
||||
|
||||
if (cdsp->cdsFlags & 0x8000)
|
||||
{
|
||||
QRemote_Fn(src, dest);
|
||||
/* Always give the redirector a chance to rewrite the filename */
|
||||
fsncopy((BYTE FAR *) src, bufp -1, sizeof(buf) - (bufp - buf));
|
||||
if ((QRemote_Fn(buf, dest) == SUCCESS) && (dest[0] != '\0')) {
|
||||
return SUCCESS;
|
||||
} else {
|
||||
bufp[-1] = '\\';
|
||||
}
|
||||
if (t == FALSE)
|
||||
{
|
||||
bufp += 4;
|
||||
fsncopy((BYTE FAR *) & cdsp->cdsCurrentPath[0], (BYTE FAR *) & buf[0], cdsp->cdsJoinOffset);
|
||||
bufp = buf + cdsp->cdsJoinOffset;
|
||||
x = cdsp->cdsJoinOffset;
|
||||
*bufp++ = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
if (*src != '\\' && *src != '/') /* append current dir */
|
||||
{
|
||||
DosGetCuDir(i, bufp);
|
||||
DosGetCuDir(i+1, bufp);
|
||||
if (*bufp)
|
||||
{
|
||||
while (*bufp)
|
||||
|
@ -239,11 +273,15 @@ int truename(char FAR * src, char FAR * dest, COUNT t)
|
|||
while (*src)
|
||||
{
|
||||
char c;
|
||||
|
||||
switch ((c = *src++))
|
||||
c = *src++;
|
||||
switch (c)
|
||||
{
|
||||
/* added *.*, *., * support.
|
||||
*/
|
||||
/* This doesn't expand cases like: foo*.* corrrectly
|
||||
* disable it for now.
|
||||
*/
|
||||
#if 1
|
||||
case '*':
|
||||
if (*src == '.')
|
||||
{
|
||||
|
@ -269,7 +307,7 @@ int truename(char FAR * src, char FAR * dest, COUNT t)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
case '/': /* convert to backslash */
|
||||
case '\\':
|
||||
|
||||
|
@ -287,7 +325,7 @@ int truename(char FAR * src, char FAR * dest, COUNT t)
|
|||
|
||||
for (bufp -= 2; *bufp != '\\'; bufp--)
|
||||
{
|
||||
if (bufp < buf + 2) /* '..' illegal in root dir */
|
||||
if (bufp < buf + x) /* '..' illegal in root dir */
|
||||
return DE_PATHNOTFND;
|
||||
}
|
||||
src++;
|
||||
|
|
864
kernel/nls.c
864
kernel/nls.c
|
@ -1,19 +1,15 @@
|
|||
/****************************************************************/
|
||||
/* */
|
||||
/* nls.c */
|
||||
/* DOS-C */
|
||||
/* FreeDOS */
|
||||
/* */
|
||||
/* National Languge Support functions and data structures */
|
||||
/* */
|
||||
/* Copyright (c) 1995, 1996 */
|
||||
/* Pasquale J. Villani */
|
||||
/* All Rights Reserved */
|
||||
/* */
|
||||
/* Copyright (c) 1995, 1996 */
|
||||
/* Copyright (c) 1995, 1996, 2000 */
|
||||
/* Steffen Kaiser */
|
||||
/* All Rights Reserved */
|
||||
/* */
|
||||
/* This file is part of DOS-C. */
|
||||
/* This file is part of FreeDOS. */
|
||||
/* */
|
||||
/* DOS-C is free software; you can redistribute it and/or */
|
||||
/* modify it under the terms of the GNU General Public License */
|
||||
|
@ -33,6 +29,8 @@
|
|||
|
||||
#include "portab.h"
|
||||
#include "globals.h"
|
||||
#include "intr.h"
|
||||
#include "nls.h"
|
||||
|
||||
#ifdef VERSION_STRINGS
|
||||
static BYTE *RcsId = "$Id$";
|
||||
|
@ -40,446 +38,283 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:29 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.7 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
* Revision 1.8 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.6 1999/09/23 04:40:48 jprice
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.4 1999/08/25 03:18:09 jprice
|
||||
* ror4 patches to allow TC 2.01 compile.
|
||||
*
|
||||
* Revision 1.3 1999/05/03 06:25:45 jprice
|
||||
* Patches from ror4 and many changed of signed to unsigned variables.
|
||||
*
|
||||
* Revision 1.2 1999/04/16 00:53:33 jprice
|
||||
* Optimized FAT handling
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:41:24 jprice
|
||||
* New version without IPL.SYS
|
||||
*
|
||||
* Revision 1.6 1999/02/08 05:55:57 jprice
|
||||
* Added Pat's 1937 kernel patches
|
||||
*
|
||||
* Revision 1.5 1999/02/04 03:12:08 jprice
|
||||
* Removed extra text. Made .exe smaller.
|
||||
*
|
||||
* Revision 1.4 1999/02/01 01:48:41 jprice
|
||||
* Clean up; Now you can use hex numbers in config.sys. added config.sys screen function to change screen mode (28 or 43/50 lines)
|
||||
*
|
||||
* Revision 1.3 1999/01/30 08:28:12 jprice
|
||||
* Clean up; Fixed bug with set attribute function.
|
||||
*
|
||||
* Revision 1.2 1999/01/22 04:13:26 jprice
|
||||
* Formating
|
||||
*
|
||||
* Revision 1.1.1.1 1999/01/20 05:51:01 jprice
|
||||
* Imported sources
|
||||
*
|
||||
*
|
||||
* Rev 1.4 04 Jan 1998 23:15:16 patv
|
||||
* Changed Log for strip utility
|
||||
*
|
||||
* Rev 1.3 16 Jan 1997 12:46:54 patv
|
||||
* pre-Release 0.92 feature additions
|
||||
*
|
||||
* Rev 1.2 29 May 1996 21:03:46 patv
|
||||
* bug fixes for v0.91a
|
||||
*
|
||||
* Rev 1.1 19 Feb 1996 4:34:46 patv
|
||||
* Corrected typo
|
||||
*
|
||||
* Rev 1.0 19 Feb 1996 3:21:46 patv
|
||||
* Added NLS, int2f and config.sys processing
|
||||
*/
|
||||
|
||||
extern UWORD internalUpcase(UWORD c);
|
||||
|
||||
#ifdef __TURBOC__
|
||||
/* TC 2.01 require these. :( -- ror4 */
|
||||
void __int__(int);
|
||||
void __emit__();
|
||||
#endif
|
||||
|
||||
/* one byte alignment */
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define asm __asm
|
||||
#pragma pack(1)
|
||||
#elif defined(_QC) || defined(__WATCOM__)
|
||||
#pragma pack(1)
|
||||
#elif defined(__ZTC__)
|
||||
#pragma ZTC align 1
|
||||
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
|
||||
#pragma option -a-
|
||||
#endif
|
||||
|
||||
struct ctryInfo
|
||||
{ /* Country Information DOS-38 */
|
||||
WORD dateFmt; /* 0: USA, 1: Europe, 2: Japan */
|
||||
char curr[5]; /* ASCIZ of currency string */
|
||||
char thSep[2]; /* ASCIZ of thousand's separator */
|
||||
char point[2]; /* ASCIZ of decimal point */
|
||||
char dateSep[2]; /* ASCIZ of date separator */
|
||||
char timeSep[2]; /* ASCIZ of time separator */
|
||||
BYTE currFmt; /* format of currency:
|
||||
bit 0: currency string is placed 0: before, 1: behind number
|
||||
bit 1: currency string and number are separated by a space; 0: No, 1: Yes
|
||||
*/
|
||||
BYTE prescision; /* */
|
||||
BYTE timeFmt; /* time format: 0: 12 hours; 1: 24 houres */
|
||||
VOID(FAR * upCaseFct) (VOID); /* far call to a function mapping character in register AL */
|
||||
char dataSep[2]; /* ASCIZ of separator in data records */
|
||||
};
|
||||
|
||||
struct _VectorTable
|
||||
{
|
||||
VOID FAR *Table;
|
||||
BYTE FnCode;
|
||||
};
|
||||
|
||||
struct _NlsInfo
|
||||
{
|
||||
struct extCtryInfo
|
||||
{
|
||||
BYTE reserved[8];
|
||||
BYTE countryFname[64];
|
||||
WORD sysCodePage;
|
||||
WORD nFnEntries;
|
||||
struct _VectorTable VectorTable[6];
|
||||
|
||||
/* Extended Country Information DOS-65-01 */
|
||||
WORD countryCode; /* current COUNTRY= code */
|
||||
WORD codePage; /* current code page (CP) */
|
||||
|
||||
struct ctryInfo nlsCtryInfo;
|
||||
}
|
||||
nlsExtCtryInfo;
|
||||
|
||||
/* characters of Yes/No prompt for DOS-65-23 */
|
||||
char yesCharacter;
|
||||
char noCharacter;
|
||||
|
||||
/* upcased characters for ECS-ASCII > 0x7f for DOS-65-02 */
|
||||
WORD upNCsize; /* number of entries in the following array */
|
||||
char upNormCh[128];
|
||||
|
||||
/* upcased characters for ECS-ASCII > 0x7f for file names for DOS-65-04 */
|
||||
WORD upFCsize; /* number of entries in the following array */
|
||||
char upFileCh[128];
|
||||
|
||||
/* collating sequence for ECS-ASCII 0..0xff for DOS-65-06 */
|
||||
WORD collSize; /* number of entries in the following array */
|
||||
char collSeq[256];
|
||||
|
||||
/* DBC support for DOS-65-07 */
|
||||
WORD dbcSize; /* number of entries in the following array */
|
||||
/* char dbcTable[1024]; no DBC support */
|
||||
WORD dbcEndMarker; /* contains always 0 */
|
||||
|
||||
/* in file names permittable characters for DOS-65-05 */
|
||||
struct chFileNames
|
||||
{
|
||||
WORD fnSize; /* size of this structure */
|
||||
BYTE dummy1;
|
||||
char firstCh,
|
||||
lastCh; /* first, last permittable character */
|
||||
BYTE dummy2;
|
||||
char firstExcl,
|
||||
lastExcl; /* first, last excluded character */
|
||||
BYTE dummy3;
|
||||
BYTE numSep; /* number of file name separators */
|
||||
char fnSeparators[14];
|
||||
}
|
||||
nlsFn;
|
||||
}
|
||||
nlsInfo
|
||||
#ifdef INIT_NLS_049
|
||||
= /* let's initialize it with values for Germany */
|
||||
#include "049-437.nls"
|
||||
#ifdef NLS_REORDER_POINTERS
|
||||
#define getTable2 (&nlsInfo.actPkg->nlsPointer[0].pointer)
|
||||
#define getTable4 (&nlsInfo.actPkg->nlsPointer[1].pointer)
|
||||
#else
|
||||
= /* let's initialize it with default values (USA) */
|
||||
#include "001-437.nls"
|
||||
#endif
|
||||
;
|
||||
|
||||
#define normalCh nlsInfo.upNormCh
|
||||
#define fileCh nlsInfo.upFileCh
|
||||
#define yesChar nlsInfo.yesCharacter
|
||||
#define noChar nlsInfo.noCharacter
|
||||
|
||||
#define PathSep(c) ((c)=='/'||(c)=='\\')
|
||||
#define DriveChar(c) (((c)>='A'&&(c)<='Z')||((c)>='a'&&(c)<='z'))
|
||||
|
||||
/* COUNTRY.SYS structures */
|
||||
struct CpiHeader
|
||||
{
|
||||
BYTE name[8]; /* signature */
|
||||
BYTE reserved[8];
|
||||
WORD nPointers; /* size of following array */
|
||||
|
||||
struct
|
||||
{
|
||||
BYTE pointerType; /* always 1 */
|
||||
DWORD offset; /* offset to data */
|
||||
}
|
||||
pointer[1];
|
||||
};
|
||||
|
||||
struct CountryRecord
|
||||
{
|
||||
WORD length; /* size of record */
|
||||
WORD country; /* country code */
|
||||
WORD codePage; /* code page */
|
||||
WORD reserved[2];
|
||||
DWORD subCountryOffset; /* offset to data record */
|
||||
};
|
||||
|
||||
struct CountryTableDescr
|
||||
{
|
||||
WORD length; /* size of structure */
|
||||
WORD id; /* table type id */
|
||||
DWORD offset; /* offset to table data */
|
||||
};
|
||||
|
||||
/* standard alignment */
|
||||
|
||||
#if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__)
|
||||
#pragma pack()
|
||||
#elif defined (__ZTC__)
|
||||
#pragma ZTC align
|
||||
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
|
||||
#pragma option -a.
|
||||
#define getTable2 getTable(2)
|
||||
#define getTable4 getTable(4)
|
||||
#define NEED_GET_TABLE
|
||||
#endif
|
||||
|
||||
COUNT NlsFuncInst(VOID)
|
||||
{
|
||||
BYTE cNlsRet;
|
||||
|
||||
#ifndef __TURBOC__
|
||||
asm
|
||||
{
|
||||
xor bx,
|
||||
bx
|
||||
mov ax,
|
||||
0x1400
|
||||
int 0x2F
|
||||
mov cNlsRet,
|
||||
al
|
||||
}
|
||||
#ifdef NLS_CACHE_POINTERS
|
||||
#define normalCh nlsInfo.upTable
|
||||
#define fileCh nlsInfo.fnamUpTable
|
||||
#else
|
||||
_BX = 0;
|
||||
_AX = 0x1400;
|
||||
__int__(0x2f);
|
||||
cNlsRet = _AL;
|
||||
#define normalCh getTable2
|
||||
#define fileCh getTable4
|
||||
#endif
|
||||
#define yesChar nlsInfo.actPkg->yeschar
|
||||
#define noChar nlsInfo.actPkg->nochar
|
||||
|
||||
|
||||
#define NLS_MUX_COUNTRY_INFO(nls) ((nls)->muxCallingFlags & NLS_FLAG_INFO)
|
||||
#define NLS_MUX_POINTERS(nls) ((nls)->muxCallingFlags & NLS_FLAG_POINTERS)
|
||||
#define NLS_MUX_YESNO(nls) ((nls)->muxCallingFlags & NLS_FLAG_YESNO)
|
||||
#define NLS_MUX_EXTERNAL_UP(nls) ((nls)->muxCallingFlags & NLS_FLAG_UP)
|
||||
#define NLS_MUX_EXTERNAL_FUP(nls) ((nls)->muxCallingFlags & NLS_FLAG_FUP)
|
||||
|
||||
|
||||
|
||||
static COUNT muxGo(int subfct, struct REGPACK *rp)
|
||||
{ rp->r_si = FP_OFF(&nlsInfo);
|
||||
rp->r_ds = FP_SEG(&nlsInfo);
|
||||
rp->r_ax = 0x1400 | subfct;
|
||||
intr(0x2f, rp);
|
||||
return rp->r_ax;
|
||||
}
|
||||
|
||||
/*
|
||||
* Call NLSFUNC to load the NLS package
|
||||
*/
|
||||
COUNT muxLoadPkg(UWORD cp, UWORD cntry)
|
||||
{ struct REGPACK r;
|
||||
|
||||
/* Return the al register as sign extended: */
|
||||
/* 0x1400 == not installed, ok to install */
|
||||
/* 0x1401 == not installed, not ok to install */
|
||||
/* 0x14FF == installed */
|
||||
|
||||
r.r_bx = 0; /* make sure the NLSFUNC ID is updated */
|
||||
if(muxGo(0, &r) != 0x14ff)
|
||||
return DE_FILENOTFND; /* No NLSFUNC --> no load */
|
||||
if(r.r_bx != NLS_FREEDOS_NLSFUNC_ID)
|
||||
return DE_INVLDACC;
|
||||
|
||||
/* OK, the correct NLSFUNC is available --> load pkg */
|
||||
r.r_dx = cntry;
|
||||
r.r_bx = cp;
|
||||
return muxGo(NLS_NLSFUNC_LOAD_PKG, &r);
|
||||
}
|
||||
|
||||
static int muxBufGo(int subfct, int bp, UWORD cp, UWORD cntry, UWORD bufsize
|
||||
, BYTE FAR *buf)
|
||||
{ struct REGPACK r;
|
||||
|
||||
r.r_bx = cntry;
|
||||
r.r_dx = cp;
|
||||
r.r_es = FP_SEG(*buf);
|
||||
r.r_di = FP_OFF(*buf);
|
||||
r.r_cx = bufsize;
|
||||
r.r_bp = bp;
|
||||
return muxGo(subfct, &r);
|
||||
}
|
||||
|
||||
#define mux38(cp,cc,bs,b) muxBufGo(4, 0, (cp), (cc), (bs), (b))
|
||||
#define mux65(s,cp,cc,bs,b) muxBufGo(2, (s), (cp), (cc), (bs), (b))
|
||||
#define muxUpMem(s,l,f) muxBufGo((f), 0, NLS_DEFAULT, NLS_DEFAULT, l, s)
|
||||
|
||||
static int muxYesNo(int ch)
|
||||
{ struct REGPACK r;
|
||||
|
||||
r.r_cx = ch;
|
||||
return muxGo(NLS_NLSFUNC_YESNO, &r);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Search the NLS package within the chain
|
||||
* Also resolves the default values (-1) into the current
|
||||
* active codepage/country code.
|
||||
*/
|
||||
struct nlsPackage FAR *searchPackage(UWORD *cp, UWORD *cntry)
|
||||
{ struct nlsPackage FAR *nls;
|
||||
|
||||
if(*cp == NLS_DEFAULT)
|
||||
*cp = nlsInfo.actPkg->cntryInfo.codePage;
|
||||
if(*cntry == NLS_DEFAULT)
|
||||
*cntry = nlsInfo.actPkg->cntryInfo.countryCode;
|
||||
|
||||
nls = &nlsInfo.chain;
|
||||
while((nls->cntryInfo.codePage != *cp
|
||||
|| nls->cntryInfo.countryCode != *cntry)
|
||||
&& (nls = nls->nxt) != NULL);
|
||||
|
||||
return nls;
|
||||
}
|
||||
|
||||
struct nlsPointerInf FAR *locateSubfct(struct nlsPackage FAR *nls
|
||||
, UBYTE subfct)
|
||||
{ int cnt;
|
||||
struct nlsPointerInf FAR *p;
|
||||
|
||||
for(cnt = nls->numSubfct, p = &nls->nlsPointer[0]
|
||||
; cnt--; ++p)
|
||||
if(p->subfct == subfct)
|
||||
return p;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef NEED_GET_TABLE
|
||||
/* search the table (from a subfct) from the active package */
|
||||
struct nlsPointerInf FAR *getTable(UBYTE subfct)
|
||||
{ struct nlsPointerInf FAR *poi;
|
||||
|
||||
if((poi = locateSubfct(nlsInfo.actPkg, subfct)) != NULL)
|
||||
return poi;
|
||||
|
||||
/* Failed --> return the hardcoded table */
|
||||
switch(subfct) {
|
||||
case 2: return &nlsUpHardcodedTable;
|
||||
case 4: return &nlsFnameUpHardcodedTable;
|
||||
case 5: return &nlsFnameTermHardcodedTable;
|
||||
case 6: return &nlsCollHardcodedTable;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Return the al register as sign extended: */
|
||||
/* 0 == not installed, ok to install */
|
||||
/* 1 == not installed, not ok to install */
|
||||
/* -1 == installed */
|
||||
return cNlsRet;
|
||||
/*
|
||||
* Copy a buffer and test the size of the buffer
|
||||
* Returns SUCCESS on success; DE_INVLDFUNC on failure
|
||||
*/
|
||||
static COUNT cpyBuf(UBYTE FAR *dst, UBYTE FAR *src
|
||||
, UWORD srclen, UWORD dstlen)
|
||||
{
|
||||
if(srclen <= dstlen) {
|
||||
_fmemcpy((BYTE FAR*)dst, (BYTE FAR*)src, srclen);
|
||||
return SUCCESS;
|
||||
}
|
||||
return DE_INVLDFUNC; /* buffer too small */
|
||||
}
|
||||
|
||||
BOOL
|
||||
GetGlblCodePage(UWORD FAR * ActvCodePage, UWORD FAR * SysCodePage)
|
||||
{
|
||||
*ActvCodePage = nlsInfo.nlsExtCtryInfo.codePage;
|
||||
*SysCodePage = nlsInfo.nlsExtCtryInfo.sysCodePage;
|
||||
return TRUE;
|
||||
/*
|
||||
* Called for all subfunctions other than 0x20-0x23,& 0xA0-0xA2
|
||||
* of DOS-65
|
||||
*/
|
||||
COUNT extCtryInfo(int subfct, UWORD codepage
|
||||
, UWORD cntry, UWORD bufsize, UBYTE FAR * buf)
|
||||
{ struct nlsPackage FAR*nls; /* NLS package to use to return the info from */
|
||||
int rc;
|
||||
int muxOnCntryInfo, muxOnPointer;
|
||||
struct nlsPointerInf FAR *poi;
|
||||
|
||||
if(!buf)
|
||||
return DE_INVLDDATA;
|
||||
if(subfct == 0) /* Currently not supported */
|
||||
return DE_INVLDFUNC;
|
||||
|
||||
/* nls := NLS package of cntry/codepage */
|
||||
if((nls = searchPackage(&codepage, &cntry)) == NULL)
|
||||
/* requested NLS package is not loaded -->
|
||||
pass the request to NLSFUNC */
|
||||
muxOnCntryInfo = muxOnPointer = TRUE;
|
||||
else {
|
||||
muxOnCntryInfo = NLS_MUX_COUNTRY_INFO(nls);
|
||||
muxOnPointer = NLS_MUX_POINTERS(nls);
|
||||
}
|
||||
|
||||
if(subfct == 1) { /* return Extended Country Information */
|
||||
if(muxOnCntryInfo)
|
||||
return mux65(1, codepage, cntry, bufsize, buf);
|
||||
return cpyBuf(buf, (BYTE FAR*)&nls->cntryInfo
|
||||
, nls->cntryInfo.size + 3, bufsize);
|
||||
}
|
||||
if(subfct == NLS_DOS_38) { /* return Country Information */
|
||||
if(muxOnCntryInfo)
|
||||
return mux38(codepage, cntry, bufsize, buf);
|
||||
return cpyBuf(buf, (BYTE FAR*)&nls->cntryInfo.dateFmt
|
||||
, nls->cntryInfo.size - 4, bufsize);
|
||||
}
|
||||
|
||||
if(muxOnPointer)
|
||||
return mux65(subfct, codepage, cntry, bufsize, buf);
|
||||
|
||||
/* any other subfunction returns a pointer to any sort
|
||||
of data; the pointer is located within the nlsPointers
|
||||
array */
|
||||
if((poi = locateSubfct(nls, subfct)) != NULL)
|
||||
return cpyBuf(buf, (UBYTE FAR *)poi
|
||||
, sizeof(struct nlsPointerInf), bufsize);
|
||||
|
||||
return DE_INVLDFUNC;
|
||||
}
|
||||
|
||||
BOOL
|
||||
SetGlblCodePage(UWORD FAR * ActvCodePage, UWORD FAR * SysCodePage)
|
||||
{
|
||||
nlsInfo.nlsExtCtryInfo.codePage = *ActvCodePage;
|
||||
nlsInfo.nlsExtCtryInfo.sysCodePage = *SysCodePage;
|
||||
return TRUE;
|
||||
}
|
||||
/*
|
||||
* Changes the current active codepage or cntry
|
||||
*/
|
||||
static COUNT setPackage(UWORD cp, UWORD cntry)
|
||||
{ struct nlsPackage FAR*nls; /* NLS package to use to return the info from */
|
||||
int rc;
|
||||
|
||||
UWORD SetCtryInfo(UBYTE FAR * lpShrtCode, UWORD FAR * lpLongCode,
|
||||
BYTE FAR * lpTable, UBYTE * nRetCode)
|
||||
{
|
||||
UWORD CntryCode;
|
||||
UBYTE nNlsEntry;
|
||||
UWORD uSegTable,
|
||||
uOffTable;
|
||||
UBYTE nLclRet;
|
||||
/* nls := NLS package of cntry/codepage */
|
||||
if((nls = searchPackage(&cp, &cntry)) == NULL) {
|
||||
/* not loaded --> invoke NLSFUNC to load it */
|
||||
if((rc = muxLoadPkg(cp, cntry)) != SUCCESS)
|
||||
return rc;
|
||||
if((nls = searchPackage(&cp, &cntry)) == NULL)
|
||||
/* something went wrong */
|
||||
return DE_INVLDFUNC;
|
||||
}
|
||||
|
||||
/* Get the Country Code according to the DOS silly rules. */
|
||||
if (0xff != *lpShrtCode)
|
||||
CntryCode = *lpShrtCode;
|
||||
else
|
||||
CntryCode = *lpLongCode;
|
||||
|
||||
/* If it's the same country code as what's installed, just */
|
||||
/* return because there's nothing to do. */
|
||||
if (CntryCode == nlsInfo.nlsExtCtryInfo.countryCode)
|
||||
{
|
||||
*nRetCode = 0;
|
||||
return CntryCode;
|
||||
}
|
||||
|
||||
/* Check if nlsfunc is installed */
|
||||
if (NlsFuncInst() >= 0)
|
||||
{
|
||||
*nRetCode = 0xff;
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
/* Get the country information from nlsfunc */
|
||||
uSegTable = FP_SEG(lpTable);
|
||||
uOffTable = FP_OFF(lpTable);
|
||||
|
||||
#ifndef __TURBOC__
|
||||
asm
|
||||
{
|
||||
push ds
|
||||
mov bx,
|
||||
CntryCode
|
||||
mov ax,
|
||||
uSegTable
|
||||
mov dx,
|
||||
uOffTable
|
||||
mov ds,
|
||||
ax
|
||||
mov ax,
|
||||
0x1404
|
||||
int 0x2F
|
||||
pop ds
|
||||
mov CntryCode,
|
||||
bx
|
||||
mov nLclRet,
|
||||
al
|
||||
}
|
||||
#else
|
||||
/* XXX: this is ugly... but needed on `tcc' 2.01 without `tasm'. -- ror4 */
|
||||
__emit__(0x1e); /* push ds */
|
||||
_BX = CntryCode;
|
||||
_AX = uSegTable;
|
||||
_DX = uOffTable;
|
||||
_DS = _AX;
|
||||
_AX = 0x1404;
|
||||
__int__(0x2f);
|
||||
__emit__(0x1f); /* pop ds */
|
||||
CntryCode = _BX;
|
||||
nLclRet = _AL;
|
||||
nlsInfo.actPkg = nls;
|
||||
#ifdef NLS_CACHE_POINTERS
|
||||
/* Fill the quick-access pointers */
|
||||
nlsInfo.fnamUpTable = getTable4->pointer - 0x80;
|
||||
nlsInfo.upTable = getTable2->pointer - 0x80;
|
||||
#endif
|
||||
*nRetCode = nLclRet;
|
||||
return CntryCode;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
UWORD GetCtryInfo(UBYTE FAR * lpShrtCode, UWORD FAR * lpLongCode,
|
||||
BYTE FAR * lpTable)
|
||||
{
|
||||
fbcopy((BYTE FAR *) & nlsInfo.nlsExtCtryInfo.nlsCtryInfo,
|
||||
lpTable, sizeof(struct ctryInfo));
|
||||
return nlsInfo.nlsExtCtryInfo.countryCode;
|
||||
/*
|
||||
* Called for DOS-38 get info
|
||||
*
|
||||
* Note: DOS-38 does not receive the size of the buffer; therefore
|
||||
* it is assumed the buffer is large enough as described in RBIL,
|
||||
* which is 34 bytes _hardcoded_.
|
||||
*/
|
||||
COUNT getCountryInformation(UWORD cntry, BYTE FAR *buf)
|
||||
{ return extCtryInfo(NLS_DOS_38, NLS_DEFAULT, cntry, 34, buf);
|
||||
}
|
||||
|
||||
BOOL ExtCtryInfo(UBYTE nOpCode, UWORD CodePageID, UWORD InfoSize, VOID FAR * Information)
|
||||
{
|
||||
VOID FAR *lpSource;
|
||||
COUNT nIdx;
|
||||
|
||||
if (0xffff != CodePageID)
|
||||
{
|
||||
UBYTE nNlsEntry;
|
||||
|
||||
if (NlsFuncInst() >= 0)
|
||||
return FALSE;
|
||||
|
||||
#ifndef __TURBOC__
|
||||
asm
|
||||
{
|
||||
mov bp,
|
||||
word ptr nOpCode
|
||||
mov bx,
|
||||
CodePageID
|
||||
mov si,
|
||||
word ptr Information + 2
|
||||
mov ds,
|
||||
si
|
||||
mov si,
|
||||
word ptr Information
|
||||
mov ax,
|
||||
0x1402
|
||||
int 0x2F
|
||||
cmp al,
|
||||
0
|
||||
mov nNlsEntry,
|
||||
al
|
||||
}
|
||||
#else
|
||||
/* XXX: again, this is ugly... -- ror4 */
|
||||
__emit__(0x1e, 0x55, 0x56); /* push ds; push bp; push si */
|
||||
_BX = CodePageID;
|
||||
_SI = ((WORD *) & Information)[1];
|
||||
_DS = _SI;
|
||||
_SI = *(WORD *) & Information;
|
||||
_BP = *(WORD *) & nOpCode;
|
||||
_BP &= 0x00ff;
|
||||
_AX = 0x1402;
|
||||
__int__(0x2f);
|
||||
nNlsEntry = _AL;
|
||||
__emit__(0x5e, 0x5d, 0x1f); /* pop si; pop bp; pop ds */
|
||||
#endif
|
||||
|
||||
if (0 != nNlsEntry)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
CodePageID = nlsInfo.nlsExtCtryInfo.codePage;
|
||||
|
||||
for (nIdx = 0; nIdx < nlsInfo.nlsExtCtryInfo.nFnEntries; nIdx++)
|
||||
{
|
||||
if (nlsInfo.nlsExtCtryInfo.VectorTable[nIdx].FnCode == nOpCode)
|
||||
{
|
||||
BYTE FAR *bp = Information;
|
||||
lpSource = nlsInfo.nlsExtCtryInfo.VectorTable[nIdx].Table;
|
||||
|
||||
if (nOpCode == 1)
|
||||
{
|
||||
bp++; /* first byte unused */
|
||||
|
||||
*bp = (BYTE) (sizeof(struct ctryInfo) + 4);
|
||||
bp += 2;
|
||||
|
||||
fbcopy(lpSource, bp, InfoSize > 3 ? InfoSize - 3 : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
*bp++ = nOpCode;
|
||||
*((VOID FAR **) bp) = lpSource;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
/*
|
||||
* Called for DOS-38 set country code
|
||||
*/
|
||||
COUNT setCountryCode(UWORD cntry)
|
||||
{ return setPackage(NLS_DEFAULT, cntry);
|
||||
}
|
||||
|
||||
UWORD internalUpcase(UWORD c)
|
||||
{
|
||||
if (!(c & 0x80))
|
||||
return c;
|
||||
|
||||
return (c & 0xff00) | (nlsInfo.upNormCh[c & 0x7f] & 0xff);
|
||||
/*
|
||||
* Called for DOS-66-01 get CP
|
||||
*/
|
||||
COUNT getCodePage(UWORD FAR* actCP, UWORD FAR*sysCP)
|
||||
{ *sysCP = nlsInfo.sysCodePage;
|
||||
*actCP = nlsInfo.actPkg->cntryInfo.codePage;
|
||||
return SUCCESS;
|
||||
}
|
||||
/*
|
||||
* Called for DOS-66-02 set CP
|
||||
* Note: One cannot change the system CP. Why it is necessary
|
||||
* to specify it, is lost to me. (2000/02/13 ska)
|
||||
*/
|
||||
COUNT setCodePage(UWORD actCP, UWORD sysCP)
|
||||
{ if(sysCP == NLS_DEFAULT || sysCP == nlsInfo.sysCodePage)
|
||||
return setPackage(actCP, NLS_DEFAULT);
|
||||
return DE_INVLDDATA;
|
||||
}
|
||||
|
||||
char upMChar(UPMAP map, char ch)
|
||||
/* upcase character ch according to the map */
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') ? ch + 'A' - 'a' :
|
||||
((unsigned)ch > 0x7f ? map[ch & 0x7f] : ch);
|
||||
}
|
||||
|
||||
VOID upMMem(UPMAP map, char FAR * str, unsigned len)
|
||||
|
||||
static VOID upMMem(unsigned char FAR *map, unsigned char FAR * str
|
||||
, unsigned len)
|
||||
{
|
||||
REG unsigned c;
|
||||
|
||||
|
@ -495,9 +330,14 @@ VOID upMMem(UPMAP map, char FAR * str, unsigned len)
|
|||
while (--len);
|
||||
}
|
||||
|
||||
BYTE yesNo(char ch) /* returns: 0: ch == "No", 1: ch == "Yes", 2: ch crap */
|
||||
|
||||
BYTE yesNo(unsigned char ch)
|
||||
/* returns: 0: ch == "No", 1: ch == "Yes", 2: ch crap */
|
||||
{
|
||||
ch = upMChar(normalCh, ch);
|
||||
if(NLS_MUX_YESNO(nlsInfo.actPkg))
|
||||
return muxYesNo(ch);
|
||||
|
||||
ch = upChar(ch);
|
||||
if (ch == noChar)
|
||||
return 0;
|
||||
if (ch == yesChar)
|
||||
|
@ -505,163 +345,57 @@ BYTE yesNo(char ch) /* returns: 0: ch == "No", 1: ch == "Yes", 2: ch
|
|||
return 2;
|
||||
}
|
||||
|
||||
char upChar(char ch) /* upcase a single character */
|
||||
{
|
||||
return upMChar(normalCh, ch);
|
||||
}
|
||||
|
||||
VOID upString(char FAR * str) /* upcase a string */
|
||||
{
|
||||
upMMem(normalCh, str, fstrlen(str));
|
||||
}
|
||||
|
||||
VOID upMem(char FAR * str, unsigned len) /* upcase a memory area */
|
||||
VOID upMem(unsigned char FAR * str, unsigned len)
|
||||
/* upcase a memory area */
|
||||
{
|
||||
#ifndef NLS_CACHE_POINTERS
|
||||
if(NLS_MUX_EXTERNAL_UP(nlsInfo.actPkg)) {
|
||||
muxUpMem(str, len, NLS_NLSFUNC_UP);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
upMMem(normalCh, str, len);
|
||||
}
|
||||
|
||||
char upFChar(char ch) /* upcase a single character for file names */
|
||||
{
|
||||
return upMChar(fileCh, ch);
|
||||
unsigned char upChar(unsigned char ch)
|
||||
/* upcase a single character */
|
||||
{ unsigned char buf[1];
|
||||
*buf = ch;
|
||||
upMem((BYTE FAR*)buf, 1);
|
||||
return *buf;
|
||||
}
|
||||
|
||||
VOID upFString(char FAR * str) /* upcase a string for file names */
|
||||
VOID upString(unsigned char FAR * str)
|
||||
/* upcase a string */
|
||||
{
|
||||
upMMem(fileCh, str, fstrlen(str));
|
||||
upMem(str, fstrlen(str));
|
||||
}
|
||||
|
||||
VOID upFMem(char FAR * str, unsigned len) /* upcase a memory area for file names */
|
||||
VOID upFMem(unsigned char FAR * str, unsigned len)
|
||||
/* upcase a memory area for file names */
|
||||
{
|
||||
#ifndef NLS_CACHE_POINTERS
|
||||
if(NLS_MUX_EXTERNAL_FUP(nlsInfo.actPkg)) {
|
||||
muxUpMem(str, len, NLS_NLSFUNC_FUP);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
upMMem(fileCh, str, len);
|
||||
}
|
||||
|
||||
/* ReadCountryTable():
|
||||
unsigned char upFChar(unsigned char ch)
|
||||
/* upcase a single character for file names */
|
||||
{ unsigned char buf[1];
|
||||
|
||||
* Loads a country information table.
|
||||
*/
|
||||
|
||||
static BOOL ReadCountryTable(COUNT file, WORD id, ULONG offset)
|
||||
{
|
||||
VOID *buf; /* where to load the information */
|
||||
UWORD maxSize; /* max number of bytes to read */
|
||||
UWORD length; /* length of table in file */
|
||||
BOOL rc = TRUE;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 1: /* extended country information */
|
||||
buf = &nlsInfo.nlsExtCtryInfo.countryCode;
|
||||
maxSize = sizeof(struct ctryInfo) + sizeof(WORD) * 2;
|
||||
break;
|
||||
|
||||
case 2: /* uppercase table */
|
||||
buf = &normalCh[0];
|
||||
maxSize = sizeof normalCh;
|
||||
break;
|
||||
|
||||
case 4: /* filename uppercase table */
|
||||
buf = &fileCh[0];
|
||||
maxSize = sizeof fileCh;
|
||||
break;
|
||||
|
||||
case 5: /* filename terminator table */
|
||||
buf = &nlsInfo.nlsFn.dummy1;
|
||||
maxSize = sizeof(struct chFileNames) - sizeof(WORD);
|
||||
break;
|
||||
|
||||
case 6: /* collating sequence table */
|
||||
buf = &nlsInfo.collSeq[0];
|
||||
maxSize = sizeof nlsInfo.collSeq;
|
||||
break;
|
||||
|
||||
default: /* unknown or unsupported table - ignore */
|
||||
buf = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (buf)
|
||||
{
|
||||
dos_lseek(file, offset, 0);
|
||||
dos_read(file, &length, sizeof(length));
|
||||
|
||||
if (length > maxSize)
|
||||
length = maxSize;
|
||||
|
||||
if (dos_read(file, buf, length) != length)
|
||||
rc = FALSE;
|
||||
|
||||
if (id == 1)
|
||||
nlsInfo.nlsExtCtryInfo.nlsCtryInfo.upCaseFct = CharMapSrvc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
*buf = ch;
|
||||
upFMem((BYTE FAR*)buf, 1);
|
||||
return *buf;
|
||||
}
|
||||
|
||||
/* LoadCountryInfo():
|
||||
|
||||
* Searches a file in the COUNTRY.SYS format for an entry
|
||||
* matching the specified code page and country code, and loads
|
||||
* the corresponding information into memory. If code page is 0,
|
||||
* the default code page for the country will be used.
|
||||
*
|
||||
* Returns TRUE if successful, FALSE if not.
|
||||
*/
|
||||
|
||||
/* XXX: This function should be placed in `INIT_TEXT'. -- ror4 */
|
||||
BOOL FAR LoadCountryInfo(char FAR * filename, WORD ctryCode, WORD codePage)
|
||||
VOID upFString(unsigned char FAR * str)
|
||||
/* upcase a string for file names */
|
||||
{
|
||||
struct CpiHeader hdr;
|
||||
struct CountryRecord ctry;
|
||||
struct CountryTableDescr ct;
|
||||
COUNT i,
|
||||
nCountries,
|
||||
nSubEntries;
|
||||
ULONG currpos;
|
||||
int rc = FALSE;
|
||||
COUNT file;
|
||||
|
||||
if ((file = dos_open(filename, 0)) < 0)
|
||||
return rc;
|
||||
|
||||
if (dos_read(file, &hdr, sizeof(hdr)) == sizeof(hdr))
|
||||
{
|
||||
/* check signature */
|
||||
if (!fstrncmp(hdr.name, "\377COUNTRY", 8))
|
||||
{
|
||||
dos_lseek(file, hdr.pointer[0].offset, 0);
|
||||
dos_read(file, &nCountries, sizeof(nCountries));
|
||||
|
||||
/* search for matching country record */
|
||||
for (i = 0; i < nCountries; i++)
|
||||
{
|
||||
if (dos_read(file, &ctry, sizeof(ctry)) != sizeof(ctry))
|
||||
break;
|
||||
|
||||
if (ctry.country == ctryCode && (!codePage || ctry.codePage == codePage))
|
||||
{
|
||||
/* found country - now load the tables */
|
||||
dos_lseek(file, ctry.subCountryOffset, 0);
|
||||
dos_read(file, &nSubEntries, sizeof(nSubEntries));
|
||||
currpos = ctry.subCountryOffset + sizeof(nSubEntries);
|
||||
|
||||
for (i = 0; i < nSubEntries; i++)
|
||||
{
|
||||
dos_lseek(file, currpos, 0);
|
||||
if (dos_read(file, &ct, sizeof(ct)) != sizeof(ct))
|
||||
break;
|
||||
|
||||
currpos += ct.length + sizeof(ct.length);
|
||||
ReadCountryTable(file, ct.id, ct.offset + 8);
|
||||
}
|
||||
|
||||
if (i == nSubEntries)
|
||||
rc = TRUE;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dos_close(file);
|
||||
return rc;
|
||||
upFMem(str, fstrlen(str));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,11 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:29 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.3 2000/03/17 22:59:04 kernel
|
||||
; Steffen Kaiser's NLS changes
|
||||
;
|
||||
; Revision 1.2 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
@ -69,7 +72,7 @@
|
|||
|
||||
segment _TEXT
|
||||
global _CharMapSrvc
|
||||
extern _internalUpcase:wrt TGROUP
|
||||
extern _upChar:wrt TGROUP
|
||||
;
|
||||
; CharMapSrvc:
|
||||
; User callable character mapping service.
|
||||
|
@ -89,8 +92,11 @@ _CharMapSrvc:
|
|||
mov ds, dx
|
||||
|
||||
push ax
|
||||
call _internalUpcase
|
||||
add sp, byte 2
|
||||
call _upChar
|
||||
;add sp, byte 2 // next POP retrieves orig AX
|
||||
|
||||
pop bx
|
||||
mov ah, bh ; keep hibyte untouched
|
||||
|
||||
pop bx
|
||||
pop cx
|
||||
|
|
|
@ -34,8 +34,8 @@ static BYTE *prfRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:29 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:30 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.2 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
; $Id$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:30 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.4 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -34,8 +34,14 @@ static BYTE *Proto_hRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:32 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.17 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.16 2000/03/17 22:59:04 kernel
|
||||
* Steffen Kaiser's NLS changes
|
||||
*
|
||||
* Revision 1.15 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -176,6 +182,7 @@ INIT VOID strcat(REG BYTE * d, REG BYTE * s);
|
|||
BOOL check_break(void);
|
||||
UCOUNT GenericRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err,
|
||||
BOOL force_binary);
|
||||
COUNT SftSeek(sft FAR *sftp, LONG new_pos, COUNT mode);
|
||||
UCOUNT DosRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err);
|
||||
UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err);
|
||||
COUNT DosSeek(COUNT hndl, LONG new_pos, COUNT mode, ULONG * set_pos);
|
||||
|
@ -195,6 +202,10 @@ COUNT DosSetFtime(COUNT hndl, date FAR * dp, time FAR * tp);
|
|||
COUNT DosGetFattr(BYTE FAR * name, UWORD FAR * attrp);
|
||||
COUNT DosSetFattr(BYTE FAR * name, UWORD FAR * attrp);
|
||||
BYTE DosSelectDrv(BYTE drv);
|
||||
COUNT DosDelete(BYTE FAR *path);
|
||||
COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2);
|
||||
COUNT DosMkdir(BYTE FAR * dir);
|
||||
COUNT DosRmdir(BYTE FAR * dir);
|
||||
|
||||
/*dosidle.asm */
|
||||
VOID DosIdle_int(void);
|
||||
|
@ -203,7 +214,7 @@ VOID DosIdle_int(void);
|
|||
VOID SpacePad(BYTE *, COUNT);
|
||||
COUNT ParseDosName(BYTE FAR *, COUNT *, BYTE *, BYTE *, BYTE *, BOOL);
|
||||
COUNT ParseDosPath(BYTE FAR *, COUNT *, BYTE *, BYTE FAR *);
|
||||
BOOL IsDevice(BYTE * FileName);
|
||||
BOOL IsDevice(BYTE FAR * FileName);
|
||||
|
||||
/* dsk.c */
|
||||
COUNT blk_driver(rqptr rp);
|
||||
|
@ -250,11 +261,9 @@ COUNT dos_write(COUNT fd, VOID FAR * buffer, UCOUNT count);
|
|||
LONG dos_lseek(COUNT fd, LONG foffset, COUNT origin);
|
||||
UWORD dos_free(struct dpb *dpbp);
|
||||
|
||||
VOID dos_pwd(struct cds FAR * cdsp, BYTE FAR * s);
|
||||
|
||||
VOID trim_path(BYTE FAR * s);
|
||||
|
||||
COUNT dos_cd(struct cds FAR * cdsp, BYTE FAR * s);
|
||||
COUNT dos_cd(struct cds FAR * cdsp, BYTE FAR * PathName);
|
||||
|
||||
struct f_node FAR *get_f_node(void);
|
||||
VOID release_f_node(struct f_node FAR * fnp);
|
||||
|
@ -361,22 +370,19 @@ VOID bcopy(REG BYTE * s, REG BYTE * d, REG COUNT n);
|
|||
__FAR_WRAPPER(VOID, fbcopy, (REG VOID FAR * s, REG VOID FAR * d, REG COUNT n))
|
||||
|
||||
/* nls.c */
|
||||
UWORD GetCtryInfo(UBYTE FAR * lpShrtCode, UWORD FAR * lpLongCode, BYTE FAR * lpTable);
|
||||
UWORD SetCtryInfo(UBYTE FAR * lpShrtCode, UWORD FAR * lpLongCode, BYTE FAR * lpTable, UBYTE * nRetCode);
|
||||
UWORD internalUpcase(UWORD c);
|
||||
BOOL GetGlblCodePage(UWORD FAR * ActvCodePage, UWORD FAR * SysCodePage);
|
||||
BOOL SetGlblCodePage(UWORD FAR * ActvCodePage, UWORD FAR * SysCodePage);
|
||||
BOOL ExtCtryInfo(UBYTE nOpCode, UWORD CodePageID, UWORD InfoSize, VOID FAR * Information);
|
||||
char upMChar(UPMAP map, char ch);
|
||||
VOID upMMem(UPMAP map, char FAR * str, unsigned len);
|
||||
BYTE yesNo(char ch);
|
||||
char upChar(char ch);
|
||||
VOID upString(char FAR * str);
|
||||
VOID upMem(char FAR * str, unsigned len);
|
||||
char upFChar(char ch);
|
||||
VOID upFString(char FAR * str);
|
||||
VOID upFMem(char FAR * str, unsigned len);
|
||||
BOOL FAR LoadCountryInfo(char FAR * filename, WORD ctryCode, WORD codePage);
|
||||
COUNT extCtryInfo(int subfct, UWORD codepage,
|
||||
UWORD cntry, UWORD bufsize, UBYTE FAR * buf);
|
||||
BYTE yesNo(unsigned char ch);
|
||||
unsigned char upChar(unsigned char ch);
|
||||
VOID upString(unsigned char FAR * str);
|
||||
VOID upMem(unsigned char FAR * str, unsigned len);
|
||||
unsigned char upFChar(unsigned char ch);
|
||||
VOID upFString(unsigned char FAR * str);
|
||||
VOID upFMem(unsigned char FAR * str, unsigned len);
|
||||
COUNT setCountryCode(UWORD cntry);
|
||||
COUNT getCountryInformation(UWORD cntry, BYTE FAR *buf);
|
||||
COUNT getCodePage(UWORD FAR* actCP, UWORD FAR*sysCP);
|
||||
COUNT setCodePage(UWORD actCP, UWORD sysCP);
|
||||
|
||||
/* prf.c */
|
||||
VOID put_console(COUNT c);
|
||||
|
@ -432,7 +438,8 @@ VOID init_stacks(VOID FAR * stack_base, COUNT nStacks, WORD stackSize);
|
|||
/* newstuff.c */
|
||||
int SetJFTSize(UWORD nHandles);
|
||||
int DosMkTmp(BYTE FAR * pathname, UWORD attr);
|
||||
int truename(char FAR * src, char FAR * dest, COUNT t);
|
||||
COUNT get_verify_drive(char FAR * src);
|
||||
COUNT truename(char FAR * src, char FAR * dest, COUNT t);
|
||||
|
||||
/* network.c */
|
||||
COUNT int2f_Remote_call(UWORD func, UWORD b, UCOUNT n, UWORD d, VOID FAR * s, UWORD i, VOID FAR * data);
|
||||
|
@ -440,10 +447,8 @@ COUNT QRemote_Fn(char FAR * s, char FAR * d);
|
|||
|
||||
UWORD get_machine_name(BYTE FAR * netname);
|
||||
VOID set_machine_name(BYTE FAR * netname, UWORD name_num);
|
||||
UWORD Remote_OCT(UWORD func, BYTE FAR * name, UWORD pw, sft FAR * s);
|
||||
UCOUNT Remote_RW(UWORD func, UCOUNT n, BYTE FAR * bp, sft FAR * s, COUNT FAR * err);
|
||||
COUNT Remote_find(UWORD func, UWORD attrib, BYTE FAR * name, REG dmatch FAR * dmp);
|
||||
COUNT Remote_GSattr(UWORD func, BYTE FAR * name, UWORD FAR * attrp);
|
||||
|
||||
/* procsupt.asm */
|
||||
VOID INRPT FAR exec_user(iregs FAR * irp);
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:32 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.2 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
; $Header$
|
||||
;
|
||||
; $Log$
|
||||
; Revision 1.1 2000/05/06 19:35:33 jhall1
|
||||
; Initial revision
|
||||
; Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
; Update CVS to 2020
|
||||
;
|
||||
; Revision 1.2 1999/08/10 17:57:13 jprice
|
||||
; ror4 2011-02 patch
|
||||
|
|
|
@ -34,8 +34,8 @@ static BYTE *stringsRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:33 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.4 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -35,8 +35,8 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:33 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
|
|
@ -36,8 +36,8 @@ static BYTE *syspackRcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:34 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.1.1.1 1999/03/29 15:42:21 jprice
|
||||
* New version without IPL.SYS
|
||||
|
|
|
@ -37,8 +37,8 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:34 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.3 1999/05/04 16:40:30 jprice
|
||||
* ror4 date fix
|
||||
|
|
|
@ -35,8 +35,11 @@ static BYTE *RcsId = "$Id$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.1 2000/05/06 19:35:36 jhall1
|
||||
* Initial revision
|
||||
* Revision 1.2 2000/05/08 04:30:00 jimtabor
|
||||
* Update CVS to 2020
|
||||
*
|
||||
* Revision 1.8 2000/03/31 05:40:09 jtabor
|
||||
* Added Eric W. Biederman Patches
|
||||
*
|
||||
* Revision 1.7 2000/03/09 06:07:11 kernel
|
||||
* 2017f updates by James Tabor
|
||||
|
@ -265,7 +268,9 @@ COUNT ChildEnv(exec_blk FAR * exp, UWORD * pChildEnvSeg, char far * pathname)
|
|||
*((UWORD FAR *) pDest)++ = 1;
|
||||
|
||||
/* copy complete pathname */
|
||||
truename(pathname, pDest, TRUE);
|
||||
if ((RetCode = truename(pathname, pDest, TRUE)) != SUCCESS) {
|
||||
return RetCode;
|
||||
}
|
||||
|
||||
/* Theoretically one could either:
|
||||
+ resize the already allocated block to best-fit behind the pathname, or
|
||||
|
|
Loading…
Reference in New Issue