Commit Graph

439 Commits

Author SHA1 Message Date
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
aeec36ea4b talloc fix from Lucho
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@801 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 22:06:57 +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
eaf31bcf80 From Lucho: update contributors list.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@793 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 11:38:49 +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
9e92e3025b Correct int25/26 pragmas. Need to explicitly preserve bp and pop flags.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@791 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-02 10:46:28 +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
decc3f5c37 From Lucho: smaller Protect/Restore 386 register macros.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@785 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-23 23:26:01 +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
005e8cc35f talloc won't work with MSC (no sbrk or brk available)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@774 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 17:59:45 +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
d3447eef6c Remove obsolete rdatclk from filelist.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@768 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 16:23:50 +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
22e0e670d6 history.txt and build.txt updates to reflect current situation.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@766 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 16:00:16 +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
e7f0852dbd correct sectors/track, head and hidden sector values if the boot sector
disagrees with the default bpb (unless the default bpb says that the
number of hidden sectors is zero (usual for floppies)).

introduce generic_block_ioctl() function to handle all 0x440d ioctls
(inclusive locking)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@763 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 15:01:40 +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
677bac3481 From Lucho:
SYS 3.0 changes: added /L parameter to SYS to be able to change the kernel
boot segment + a few boot sector changes to get the pointer at the same
magic place for all boot sectors.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@751 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:40:41 +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