Commit Graph

269 Commits

Author SHA1 Message Date
Bart Oldeman
b0009452ee Remove add_far. adjust_far can do the job.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@813 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 16:38:46 +00:00
Bart Oldeman
c73ee8084a Remove the 65535 check for root directories. It's checked against
a different limit later anyway later, and it breaks remove_lfn_entries...


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@812 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 15:43:56 +00:00
Bart Oldeman
11a7b69e5c Make f_diroff an entry offset so it can be 16bits. Enforce the 65536
entry limit in dir_read(). Saves 80 bytes or so + 2 bytes in every f_node.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@811 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 10:29:26 +00:00
Bart Oldeman
1285c36f8c Echo input LF as CR-LF unless it's the first character. Never store LF
in the buffer.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@810 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 23:25:53 +00:00
Bart Oldeman
43ca8741b0 echo ^C to stdout, not stdin or stderr.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@809 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 22:01:41 +00:00
Bart Oldeman
600e02b1b4 A few suggestions from Arkady. Saves 5 bytes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@808 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 15:31:45 +00:00
Bart Oldeman
82261c0caf add_far can get away with adding 16 bit offsets only. Saves ~200 bytes!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@807 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 13:56:13 +00:00
Bart Oldeman
00ef6b1be2 Eliminated long2para and avoided use of "long"s in DosExeLoader, using
paragraphs to measure size instead. Saves ~130 bytes together.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@806 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 12:36:47 +00:00
Bart Oldeman
7bf976be3f Saved ~75 bytes in printf and by elimination of fstrlen. There's only one
call and inlining doesn't increase the size.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@803 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-20 10:41:30 +00:00
Bart Oldeman
28be8284a8 Eliminate intr() from resident code. Saves ~200 bytes of HMA resident code.
Also made the nls.c functions SS!=DS safe.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@802 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-19 22:33:48 +00:00
Bart Oldeman
329c7c6e6a Remove wrong automatic "*.*" code from Lixing Yuan -- return DE_PATHNOTFND
or D_NFILES instead (mostly from Lucho)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@800 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 22:04:40 +00:00
Bart Oldeman
69faceffe5 int21/ah=26: new_psp now copies the old psp and just sets a few fields
int21/ah=55: child_psp does the rest
init code does the init (fixed values are always copied now)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@799 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 21:28:54 +00:00
Bart Oldeman
77331799bd Commit each close, even if the ref count is > 0.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@798 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 20:32:55 +00:00
Bart Oldeman
0f56cb2b3b From Lucho: move the lock/unlock simulation of success before the device
GENIOCTL check so that it applies to any device.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@797 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 13:07:05 +00:00
Bart Oldeman
0d6d0b8523 (with Lucho) -- remove the dosnames path 67 length check. Review the places
where it really matters (chdir and mkdir).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@796 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 12:59:38 +00:00
Bart Oldeman
3e3c05ff22 From Lucho: enable interactive re-execution of the SHELL.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@795 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 12:19:43 +00:00
Bart Oldeman
d61defe941 From Lucho: move NLS #defines to nls.h. Move config structure to config.h.
Some cosmetic changes.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@794 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 11:56:14 +00:00
Bart Oldeman
1c6f3640a3 Borland C (unlike Turbo C) didn't like this pseudo register use.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@792 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 11:09:52 +00:00
Bart Oldeman
a779a14070 Merge "suspect partition" copy/paste code into functions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@790 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 23:46:04 +00:00
Bart Oldeman
d06b147cb0 Save a couple bytes by moving the strncmp_retzero block.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@789 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 23:24:27 +00:00
Bart Oldeman
216f51cb65 Use memcpy instead of fmemcpy where possible.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@788 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 13:11:14 +00:00
Bart Oldeman
5214472bf7 Use asmsupt string and mem functions for the init code too.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@787 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 00:25:56 +00:00
Bart Oldeman
47ae1ab1d3 From Lucho: fix EBDA problems with INSTALL. This fixes the weird
fmemcpy lockup; in reality kernel init code was overwritten.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@786 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-23 23:41:17 +00:00
Bart Oldeman
f03eba4e15 Remove unused variable lpFcb.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@779 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-09 19:35:50 +00:00
Bart Oldeman
0081bfe408 Don't call truename from FcbNameInit(). It was only necessary for "FcbRename",
which can call it itself. This avoids yesterday's hack.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@778 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-09 19:32:22 +00:00
Bart Oldeman
b34b68a265 FcbOpen/FcbFindFirstNext:
Fix a consequence of truename's funny behaviour:
truename(c:nul) = c:/nul and truename(c:/nul) = c:\nul
and for FCBs it's still easiest to call truename twice
so we have to copy c:/nul back to c:nul to compensate.
This fixes the EJECT problem from Lucho.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@777 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-08 20:58:09 +00:00
Bart Oldeman
de444743cc Define I386 and I186 more cleanly.
Add (UWORD) casts to silence the compiler.
Optimize (head*sector) to secs_per_cyl
Add BORLANDC to compiler list and simplify startup printf to one message.
#pragma enable_message(130) for Watcom C causes it to behave a little more
like Borland in terms of warnings.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@776 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 18:16:27 +00:00
Bart Oldeman
0e0abcd685 Added explicit (UWORD) type casts to avoid compiler warnings and sometimes
save a few bytes too. Also changed the FcbParseFname return value:
returns offset portion of pointer (SI) instead of the number of bytes to
be added to SI.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@775 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 18:04:50 +00:00
Bart Oldeman
4950f7483b From Lucho: fixes the CHKDSK I: "Invalid drive specification" bug
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@773 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-06 20:55:55 +00:00
Bart Oldeman
8b384359e0 Update LSM & copyright year.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@767 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 16:04:00 +00:00
Bart Oldeman
42b55cd1ac allow "0" in full-screen config menus and plug a few potential related
overflows.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@765 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 15:06:36 +00:00
Bart Oldeman
272f86af3d Corrections to get past turbo c warnings.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@764 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 15:04:09 +00:00
Bart Oldeman
2b9e17a680 Only put PATH= in the environment if it's still empty just before
executing the shell. This repairs SET PATH=.... in config.sys without
confusing anyone.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@762 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 11:39:50 +00:00
Bart Oldeman
5567aba08b Fixed bug #1722: dir_close() was called for normal files (via map_cluster
and find_fat_free). This completely messed up rwblock. Removed these calls
(for directories they are already covered at a higher level) and added
a few sanity checks to dir_close and dir_write.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@761 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 23:18:24 +00:00
Bart Oldeman
d4f6a7104b Clean up scr_pos updating routines: combine into update_scr_pos() function
instead of 2 copies of the same thing.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@760 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 20:07:28 +00:00
Bart Oldeman
b7491eba32 Expand tabs for int21/ah=2,9 even in raw device modes and if stdout is
redirected. This solves bug 1737 (grep2msg problem)
This copy&paste exercise is to be cleaned up a bit later!


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@759 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 19:26:58 +00:00
Bart Oldeman
828a125aed Have to move attr/flags init before switch, otherwise they won't work!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@758 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 12:42:45 +00:00
Bart Oldeman
44e4319e93 Save ~100 bytes by replacing s->sft_flags with flags,
s->sft_dev->dh_attr with attr and simplifying the if() statement a bit


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@757 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 19:43:06 +00:00
Bart Oldeman
eecbe8439a Adapted from Chris Rodie's patch for bugzilla #1730:
do a device input status request for int21/ax=4406 for devices
(not for files).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@756 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 19:40:13 +00:00
Bart Oldeman
a9c00dcf86 Adapted from Chris Rodie's patch (bugzilla #1729):
"open" and "close" should call the open/close functions for devices using
a device request when appropriate.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@755 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 13:18:13 +00:00
Bart Oldeman
3d7d36cf91 Using a FAT32 table so that FATs won't be too big for drives <= 64 GB
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@754 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 02:01:34 +00:00
Bart Oldeman
4f1a117069 * FAT32 kernels should ignore the upper word of the cluster number for
FAT16 partitions (just like FAT16 kernels do)
* added extra checks to make sure that invalid FAT entries are never
  followed
* made put_console() public to be able to print a message in case of
  FAT corruption
* some small optimizations and header cleanups (some suggested by Arkady)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@753 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:51:49 +00:00
Bart Oldeman
dacd24e524 Make strupr code unambiguous
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@752 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:47:56 +00:00
Bart Oldeman
3819d769a7 From Lucho: clean up *.lnk files for "clean" and "clobber".
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@750 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:37:20 +00:00
Bart Oldeman
c0a292ae04 From Lucho: the DJ mechanism needs to affect
--------D-M00500004--------------------------
MEM 0050h:0004h - MS-DOS - LOGICAL DRIVE FOR SINGLE-FLOPPY SYSTEM (A: / B:)
Size:   BYTE


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@749 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:35:53 +00:00
Bart Oldeman
6534691f85 from Lucho: basic implementation of
--------D-2F4A33-----------------------------
INT 2F - Windows95 - CHECK MS-DOS VERSION 7
necessary for SpinRite (Steve Gibson)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@748 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:20:48 +00:00
Bart Oldeman
ee60fb10b8 From Lucho: implement
--------D-2F1211-----------------------------
INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@747 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:12:30 +00:00
Bart Oldeman
36101b0d51 Fix missing (unsigned long) cast for multiplication: this fixes the
FAT16 calculation for the default bpb.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@745 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 17:52:11 +00:00
Bart Oldeman
b92f552a57 Better (for FAT32) and simpler FAT default value calculations.
Also use 16-bit instead of 32-bit quantities where possible to save code size.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@743 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-13 03:07:49 +00:00
Bart Oldeman
f1f51592ba MSC/TurboC compatibility fixes (Luchezar/Bart)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@735 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-02 23:46:03 +00:00