Commit Graph

32 Commits

Author SHA1 Message Date
Pierre Muller
67ba21f8a8 Add dotted version of Dos unit in msdos/sysutils source 2023-08-02 22:33:19 +02:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
78374bf772 * Synchronize API for AnsiString/Unicode string, keep string where possible. 2023-07-24 15:38:09 +02:00
Michael VAN CANNEYT
d3bc874500 * Char -> AnsiChar 2023-07-14 17:26:09 +02:00
Tomas Hajny
91da9eae17 + TZ variable based offset calculation included for DOS targets
git-svn-id: trunk@47546 -
2020-11-24 00:35:52 +00:00
Tomas Hajny
2774a0094c * reverted a change not belonging to the previous commit
git-svn-id: trunk@47543 -
2020-11-24 00:27:06 +00:00
Tomas Hajny
8038b711a5 + provided sysbeep for DOS targets
git-svn-id: trunk@47542 -
2020-11-24 00:25:20 +00:00
Tomas Hajny
10911173df * Correction of omissions in GetLocalTime
git-svn-id: trunk@47529 -
2020-11-22 16:19:34 +00:00
yury
1b99279617 * msdos: Enabled $HUGECODE for sysutils and classes to overcome 64K per unit code limit.
git-svn-id: trunk@46493 -
2020-08-19 10:49:40 +00:00
Tomas Hajny
e790cb067d * fix of FileSetDate after int64 changes (r44010 and r44013)
git-svn-id: trunk@44018 -
2020-01-22 12:14:47 +00:00
florian
69956cd97a * fix compilation on several OSes after r44010
git-svn-id: trunk@44013 -
2020-01-21 21:50:37 +00:00
florian
01302bc47d * subroutines working with an OS dependend time stamp use an int64 now, so the 2038 problem
on unixes can be tackled

git-svn-id: trunk@44010 -
2020-01-21 20:59:20 +00:00
pierre
6f2b027e51 Avoid range check error for functions returning THandle type by using unusedhandle system constant
git-svn-id: trunk@42742 -
2019-08-19 20:23:31 +00:00
svenbarth
c26348a3dd * follow up to r42457: FreeTerminateProcs needs to be called before DoneExceptions just in case an exception is triggered due to a corrupted list
git-svn-id: trunk@42461 -
2019-07-20 08:41:59 +00:00
svenbarth
176a63b67b * fix for Mantis #35862: free the list of functions added with AddTerminateProc to avoid memory leaks
+ added test

git-svn-id: trunk@42457 -
2019-07-19 15:55:21 +00:00
svenbarth
09e5f463dc + add Delphi-compatible FileGetSymLinkTarget functions to all platforms (currently returns False on all platforms); this also includes TSymLinkRec variants for both RawByteString and UnicodeString
git-svn-id: trunk@39669 -
2018-08-24 15:33:45 +00:00
svenbarth
92dcdd8b5b + add Delphi compatible FollowLink parameter (default is True) to FileExists and DirectoryExists; support for it is up to each target
git-svn-id: trunk@39668 -
2018-08-24 15:33:09 +00:00
nickysn
7cc581d4c7 * replaced Intr($21,regs) with MsDos(regs) in the i8086-msdos sysutils unit
git-svn-id: trunk@37733 -
2017-12-15 14:58:26 +00:00
pierre
50e5256f8e * system.pp:
+ Add MSDOS specific version of SysInitFPU, using Get/SetInterrput Vectors
    to test coprocessor presence.
    * Do not call SetupEnvironment in startup code.
    + Add internal_envp variable (nil by default).
    + Change envp to function, which calls SetUpEnvironment,
    if internal_envp is nil.
    * Do not call SetupArguments at startup,
    instead call it from inside paramcount or paramstr
    + Add SaveInt10 and SavdeInt75

  * dos.pp: Also swap Interrupt vectors $10 and $75

  * sysutils.pp: Adapt to envp change in system unit.

git-svn-id: trunk@36268 -
2017-05-19 22:01:12 +00:00
nickysn
6d4dfb5595 * fixed compilation of sysutils on i8086-msdos after r33290
git-svn-id: trunk@33312 -
2016-03-21 21:09:27 +00:00
michael
fde42ca8ef * Type helpers, compatible to Delphi XE 8
git-svn-id: trunk@32262 -
2015-11-07 09:40:54 +00:00
nickysn
4454332d7a * fixed the sysutils.GetEnvironment* functions for i8086-msdos
- removed the envp variable from the msdos system unit, because it's not
  compatible with ppchar in all memory models (we use ppfarchar to avoid copying
  the environment in the program's data segment in near data memory models)

git-svn-id: trunk@32017 -
2015-10-11 13:23:59 +00:00
nickysn
239fc27c38 + implemented sysutils.diskfree and sysutils.disksize for i8086-msdos
git-svn-id: trunk@31905 -
2015-10-01 15:25:13 +00:00
nickysn
12f49eb280 * fixed getting the current locale's ansi upper case table under i8086-msdos
git-svn-id: trunk@31904 -
2015-10-01 15:05:33 +00:00
nickysn
45ed066fed * fixed SysUtils.FindFirst/FindNext/FindClose on i8086-msdos in the compact and
large memory models by changing TSearchRec.FindHandle to a pointer (because
  THandle is 16-bit on this platform and is thus not able to hold a far pointer
  without truncating it)

git-svn-id: trunk@28451 -
2014-08-18 21:39:20 +00:00
nickysn
fec4c6a6e2 * various rtl fixes that allow objpas.integer to be 16-bit on 16-bit targets
(still not sure if it's a good idea, but trying, at least, is harmless - we
  can always rollback to integer being equal to longint)

git-svn-id: trunk@26966 -
2014-03-06 01:10:18 +00:00
Jonas Maebe
af3f12f60c * rawbytestring/unicodestring versions of findfirst/findnext/findclose
o these routines are now generic wrappers in filutil.inc, and call
     the platform-dependent internalfindfirst/next/close routines
   o on unix, the fnmatch routine got proper support for UTF-8 matching
     (e.g., it won't match a partial UTF-8 code point to a "?" wildcard)
   o for NativeNT, a similar (untested) UTF-16 version has been added
  + test for the above
  * rawbytestring/unicodestring versions of fileage

git-svn-id: branches/cpstrrtl@25302 -
2013-08-19 22:04:25 +00:00
Jonas Maebe
155aafc255 * moved SYSUTILS_HAS_ANSISTR/UNICODESTR_FILEUTIL_IMPL define to interface
so declarations can also depend on it and similar defines (not yet the
    case)
  + added SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL/SYSUTILS_HAS_UNICODESTR_ENVVAR_IMPL
    to indicate whether the platform-dependent part of the unit provides
    an ansistring/unicodestring interface to get environment variables
  + Windows version of getenvironmentvariable(unicodestring)
  + generic ansistring/unicodestring versions of GetEnvironmentVariable()
    in case the platform doesn't provide them
  * result of GetEnvironmentString() is ansistring/unicodestring depending
    on the state of the FPC_RTL_UNICODE define

git-svn-id: branches/cpstrrtl@25116 -
2013-07-16 14:16:34 +00:00
Jonas Maebe
eeb98a0c0f - removed platform-specific implementations of GetCurrentDir, SetCurrentDir,
CreateDir and RemoveDir, and implemented a generic one (based on the OS/2
    version) in the shared sysutils code (so that the filesystem code page
    support for the system unit routines can be reused)
  * include both ansistring and unicodestring versions of the above routines,
    and of ForceDirectories. Exception: GetCurrentDir, which cannot be
    overloaded based on function result and whose return type currently
    dependends on the FPC_UNICODE_RTL define

git-svn-id: branches/cpstrrtl@25113 -
2013-07-16 14:15:55 +00:00
Jonas Maebe
26b2149ced * converted the following sysutils routines to unicodestring and
rawbytestring: FileExists, DirectoryExists, FileSetDate, FileGetAttr,
    FileSetAttr, DeleteFile, RenameFile, FileSearch, ExeSearch,
    FileIsReadOnly

git-svn-id: branches/cpstrrtl@25078 -
2013-07-09 19:01:45 +00:00
Jonas Maebe
60365489e2 * converted fileopen/filecreate interface to RawByteString for
msdos/embedded, but do not perform any code page conversions
    (size limits prevent widestring manager on msdos, and the
     embedded routines are empty)

git-svn-id: branches/cpstrrtl@25076 -
2013-07-09 19:01:36 +00:00
nickysn
4708132ddf + added sysutils.pp to the i8086-msdos rtl
git-svn-id: trunk@24590 -
2013-05-25 13:25:35 +00:00