Commit Graph

763 Commits

Author SHA1 Message Date
Kenneth J Davis
82d77a19e1 mark unused space in kernel for unused win compatibility structs
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1488 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 03:19:32 +00:00
Kenneth J Davis
8f9448f313 comment/structure info update
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1487 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 03:13:43 +00:00
Kenneth J Davis
f82d41f169 comments added
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1486 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:58:57 +00:00
Kenneth J Davis
5c8fb2fbec comments added
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1485 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:35:05 +00:00
Kenneth J Davis
44e249282f update comments
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1484 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:26:23 +00:00
Kenneth J Davis
6762379cd6 update sys usage documentation
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1483 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:20:48 +00:00
Kenneth J Davis
dbf9e09dfc update sys to current version, adjust printf to support percent modifier, consistent prototype, and handle text not in current segment (FAR *) better, merge part of simplified debug (via prints) support
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1482 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-11 16:59:43 +00:00
Bart Oldeman
66f65090dd Corrected a bug in exeflat: it was writing 32 bytes too many from possibly
unexisting buffers after compressing exe files.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1480 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:51:54 +00:00
Bart Oldeman
d6b54e78d0 Corrected DEBUG #if to #ifdef for Turbo C and corrected debug printfs in
truename().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1479 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:33:24 +00:00
Bart Oldeman
d8537c13ef Simplified truename(): eliminated the addSep state by adding a backslash in
every new segment, including a trailing backslash. Simplified . and .. logic.
Converted switch to if because there were few cases left.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1478 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:04:53 +00:00
Bart Oldeman
f26372a241 DosChangeDir can only return DE_PATHNOTFND in case of error, so force that
error code.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1477 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:00:09 +00:00
Bart Oldeman
1f17a5e5da Remove the wildcard check for DosChangeDir() because truename() already does
that.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1476 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-06 20:26:27 +00:00
Bart Oldeman
5ad1fd51e1 Use simpler code for copying the current directory constructing the "truename":
instead of fmemcpy followed by strcpy, just use strcpy. Also use the near
TempCDS more.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1475 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-06 02:22:06 +00:00
Bart Oldeman
de81ab4e46 Unify parse_name_ext for name and extension and inline this function into
truename(). This is an optimization (200 bytes).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1474 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 22:13:01 +00:00
Bart Oldeman
9e1e01e9e6 If the current directory is no longer valid, call dos_cd() for the root to
update the CDS cluster. Call media_check explicitly in truename() as a central
first and only place in directory-using DOS calls (except DosFindNext)
to call it.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1473 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 21:21:14 +00:00
Bart Oldeman
95653072d3 The original DosGetCuDir is now inlined in truename(). DosGetCuDir now
does truename("D:", CDS_MODE_SKIP_PHYSICAL), and this mode was changed
to no longer call QRemote_Fn (int2f/ax=1123).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1472 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 21:09:34 +00:00
Bart Oldeman
39a9574824 Fix truename("C:") where the current directory is different from the root:
then it should not append a backslash.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1471 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 19:46:12 +00:00
Bart Oldeman
8cce4e7d84 Turbo C 2.01 and Linux cross-compilation compatibility fixes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1470 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-02 02:39:17 +00:00
Bart Oldeman
fb847baa95 For self-owning PSPs do everything that a normal exit does except for closing
files and releasing memory (see RBIL).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1469 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-02 02:24:44 +00:00
Bart Oldeman
2017b41dbb Fix problem with cd\ reported by ibid_ag@lavabit.com on the mailing list.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1468 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 02:43:21 +00:00
Kenneth J Davis
70851fff0a update build process to include country.sys
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1467 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 02:26:07 +00:00
Kenneth J Davis
3482128410 sync country source with latest from eduardocasino.es site
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1466 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 01:50:15 +00:00
Kenneth J Davis
60886a8424 add source for country.sys from dev branch
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1465 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 00:47:29 +00:00
Bart Oldeman
924f6d1bfd In case of "not sure" if the removable media has changed, the
IBM PCDOS technical reference says to call BLDBPB if there are no used
buffers, so we only do it then, instead of flushing the buffers.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1458 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-26 20:12:33 +00:00
Bart Oldeman
e597bb20d4 Merged int21/ax=7304, subfunctions 3 and 4, which work very similarly.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1457 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-26 20:00:41 +00:00
Kenneth J Davis
84fcfc5f11 simplify how version specified, enable SVN builds with revision#
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1456 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-23 01:26:30 +00:00
Kenneth J Davis
d6552eab77 add convenience options to build.bat for setting various defines
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1455 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-22 20:39:34 +00:00
Kenneth J Davis
6ffc037046 clear some additional env variables
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1454 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-22 20:37:36 +00:00
Bart Oldeman
6aa1e45bd8 Set the clean bit also on created/replaced files, not just opened files, so
the directory entry is only updated after they are written too.
Fixes SF bug #2380531.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1453 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-18 16:42:03 +00:00
Bart Oldeman
4d3e2e2fad Use a better formula for calculating FAT12 clusters, by multiplying nominator
and denominator by 3.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1452 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 22:04:49 +00:00
Bart Oldeman
e3f90446b3 initdisk: further optimizations in CalculateFATData(): merging the FAT16 & FAT32
loops.
fatfs: #if DEBUG fix.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1451 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 20:37:26 +00:00
Bart Oldeman
9e0b5e5bf6 Optimized initdisk.c by using constants instead of variables where possible.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1450 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 17:57:36 +00:00
Bart Oldeman
a93b71a18b Removed unused config variables and don't detect 'y' and 'n' if we're using
toupper anyway.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1449 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 14:09:57 +00:00
Bart Oldeman
132b1fe579 Cluster optimizations, mainly for FAT32: eliminated checkdstart,
replaced (cl == FREE || cl == 1) by (cl <= 1), UWORD cluster cast for FAT12/16,
and merge if branches for link_fat().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1448 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-16 21:45:17 +00:00
Bart Oldeman
d854929efb Merged if status==S_OPENED logic in dos_open, cache dir_attrib, and remove
unnecessary init to 0.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1447 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-16 20:13:41 +00:00
Bart Oldeman
4d0e2c4b47 Make the built-in COUNTRY table more compact and allow to merge duplicate
strings for error message.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1446 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-16 19:47:44 +00:00
Bart Oldeman
5252faa425 Optimization: changed find_fname() to call split_path() because find_fname
was always preceeded by split_path(). The return code is now an error code,
DE_FILENOTFND, DE_PATHNOTFND, or SUCCESS, depending on the failure.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1445 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-16 15:22:16 +00:00
Bart Oldeman
d20b59ebe0 Added a split boolean argument to dir_open so the trick with setting the
dir/filename separator to 0 can be avoided, and we don't need to calculate
its location in split_path(). Without the trick many more char * path
arguments in the kernel can become "const char *".


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1444 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-13 04:31:55 +00:00
Bart Oldeman
5c0be166ee Use tmp.exe instead of tmp$$$$$.exe -- the Linux cross compilation really
has trouble without quotes because $$ can be expanded as a shell variable
when passed to system().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1443 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-13 04:17:19 +00:00
Bart Oldeman
78fc7a1e6d Remove dosnames.c and inline ParseDosName, because there is only one user left
(split_path()) which only uses it to find out if the path ends in a backslash
and the length of the directory part.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1442 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-13 04:01:01 +00:00
Bart Oldeman
60915d3cd0 dos_findfirst() now uses split_path(). The only thing that needed to be
added was the need to check for "d:\" paths which return DE_NFILES.
Also, findfirst("d:\nonexist\*.*",D_VOLID) should fail even if it actually
searches in d:\.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1441 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-13 03:44:50 +00:00
Bart Oldeman
f7a9177b64 The invalid pathname character detection is moved from ParseDosName (dosnames.c)
to truename (newstuff.c), because TRUENAME should check these characters
before passing paths on to fatfs.c & fatdir.c.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1440 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-12 22:58:24 +00:00
Bart Oldeman
c812a96e85 Corrected the if-statement && logic for attributes in the findnext loop.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1439 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-12 20:57:39 +00:00
Bart Oldeman
07d2b24149 Make findfirst/findnext more MSDOS compatible:
* ignore 0x40 (D_DEVICE) in search attribute.
* if you specify D_VOLID + one or more of D_HIDDEN, D_SYSTEM, and D_DIR you
  will get files *and* volume labels in the specified directory, not forced
  to the root directory.
* VOLID searches must look at the search pattern name too, or do not match.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1438 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-12 20:38:40 +00:00
Bart Oldeman
f5696a4a7e For read/write don't update sft_posit in dosfns.c anymore so fatfs.c takes
care of it.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1437 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-11 13:25:32 +00:00
Bart Oldeman
76c967d581 Remove usage of the fnode f_flags field where it is not relevant anymore.
Because of the explicit dir_write() calls we only need them in situations
where SFTs where used, that is for open files but not for directories.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1436 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-11 12:33:30 +00:00
Bart Oldeman
3a16a4c755 Eliminate fcbname[] on the stack: we can use dm_name_pat in the dirmatch
structures instead.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1435 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 21:08:16 +00:00
Bart Oldeman
479e6fb0eb %if 0 unused asm functions and fix a stack return problem with fstrcmp.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1434 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 21:02:52 +00:00
Bart Oldeman
a21bcd8a85 Split 8.3 FCB-style filename extraction from ParseDosName into a new
ConvertNameSZToName83 function, also used by dir_open().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1433 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 19:02:24 +00:00
Bart Oldeman
8e2b96a70b Move the fnode fields f_diroff and f_dirstart into a referenced directory
match structure with fields dm_entry and dm_dircluster.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1432 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 16:10:54 +00:00