Commit Graph

67 Commits

Author SHA1 Message Date
Tomas Hajny
9f405f0a69 + TZ variable based offset calculation included for DOS targets
git-svn-id: trunk@47546 -
(cherry picked from commit 91da9eae17)
2023-12-16 19:39:41 +01:00
florian
336e72f3c4 * fix compilation on several OSes after r44010
git-svn-id: trunk@44013 -
(cherry picked from commit 69956cd97a)
2023-12-14 16:36:20 +01:00
Tomas Hajny
aac044f49f * fix of FileSetDate after int64 changes (r44010 and r44013)
git-svn-id: trunk@44018 -
(cherry picked from commit e790cb067d)
2023-12-14 11:06:23 +01:00
florian
3aadfc0802 * 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 -
(cherry picked from commit 01302bc47d)
2023-12-12 22:19:17 +01:00
marco
83f7e7e3dc --- Merging r46853 into '.':
U    rtl/inc/text.inc
--- Recording mergeinfo for merge of r46853 into '.':
 U   .
--- Merging r46864 into '.':
G    rtl/inc/text.inc
--- Recording mergeinfo for merge of r46864 into '.':
 G   .
--- Merging r46946 into '.':
G    rtl/inc/text.inc
A    tests/test/units/system/tseekeof.pp
--- Recording mergeinfo for merge of r46946 into '.':
 G   .
--- Merging r47542 into '.':
U    rtl/go32v2/sysutils.pp
U    rtl/msdos/sysutils.pp
U    rtl/watcom/sysutils.pp
--- Recording mergeinfo for merge of r47542 into '.':
 G   .
--- Merging r47543 into '.':
G    rtl/msdos/sysutils.pp
--- Recording mergeinfo for merge of r47543 into '.':
 G   .
--- Merging r47544 into '.':
G    rtl/go32v2/sysutils.pp
--- Recording mergeinfo for merge of r47544 into '.':
 G   .

# revisions: 46853,46864,46946,47542,47543,47544
r46853 | hajny | 2020-09-12 01:43:32 +0200 (Sat, 12 Sep 2020) | 1 line
Changed paths:
   M /trunk/rtl/inc/text.inc

  * fix for bug #37716 by Andrey 'Croco' Stolyarov
r46864 | hajny | 2020-09-14 07:30:59 +0200 (Mon, 14 Sep 2020) | 1 line
Changed paths:
   M /trunk/rtl/inc/text.inc

  * fix for problem with commit 46853
r46946 | hajny | 2020-09-24 21:33:28 +0200 (Thu, 24 Sep 2020) | 1 line
Changed paths:
   M /trunk/rtl/inc/text.inc
   A /trunk/tests/test/units/system/tseekeof.pp

  * simplified version of SeekEof for improved TP/BP/Delphi compatibility by Andrey 'Croco' Stolyarov as fix for #37716, plus a new test for testing the compatibility
r47542 | hajny | 2020-11-24 01:25:20 +0100 (Tue, 24 Nov 2020) | 1 line
Changed paths:
   M /trunk/rtl/go32v2/sysutils.pp
   M /trunk/rtl/msdos/sysutils.pp
   M /trunk/rtl/watcom/sysutils.pp

  + provided sysbeep for DOS targets
r47543 | hajny | 2020-11-24 01:27:06 +0100 (Tue, 24 Nov 2020) | 1 line
Changed paths:
   M /trunk/rtl/msdos/sysutils.pp

  * reverted a change not belonging to the previous commit
r47544 | hajny | 2020-11-24 01:29:08 +0100 (Tue, 24 Nov 2020) | 1 line
Changed paths:
   M /trunk/rtl/go32v2/sysutils.pp

  * reverted a change not belonging to the previous commit

git-svn-id: branches/fixes_3_2@47907 -
2020-12-30 14:07:54 +00:00
marco
f9aa77ace5 --- Merging r47528 into '.':
U    rtl/os2/sysutils.pp
--- Recording mergeinfo for merge of r47528 into '.':
 U   .
--- Merging r47529 into '.':
U    rtl/emx/sysutils.pp
U    rtl/go32v2/sysutils.pp
U    rtl/msdos/sysutils.pp
U    rtl/watcom/sysutils.pp
--- Recording mergeinfo for merge of r47529 into '.':
 G   .

# revisions: 47528,47529
r47528 | hajny | 2020-11-22 16:53:50 +0100 (Sun, 22 Nov 2020) | 1 line
Changed paths:
   M /trunk/rtl/os2/sysutils.pp

  * Corrections of omissions in GetLocalTime
r47529 | hajny | 2020-11-22 17:19:34 +0100 (Sun, 22 Nov 2020) | 1 line
Changed paths:
   M /trunk/rtl/emx/sysutils.pp
   M /trunk/rtl/go32v2/sysutils.pp
   M /trunk/rtl/msdos/sysutils.pp
   M /trunk/rtl/watcom/sysutils.pp

  * Correction of omissions in GetLocalTime

git-svn-id: branches/fixes_3_2@47539 -
2020-11-23 10:50:08 +00:00
marco
a4864e36f2 # revisions: 39668,39669,39671,39672,40652,41280,41281,42240,42244,42245,42286,42326,42456,42461,43048,43107,43108,43109,43110,43111,43112,43113
git-svn-id: branches/fixes_3_2@43394 -
2019-11-05 15:31:21 +00:00
marco
b8e3d6efa1 # revisions: 41570,41571,41938,42457,42327,42556,42557
git-svn-id: branches/fixes_3_2@43393 -
2019-11-05 15:16:28 +00:00
pierre
6f80a4cc29 Fix tw3124 test for systems on pagecode 437.
* Never modify the first half of LowerCaseTable:
   even if 'A' is the upper form of 'a' with an accent ('…'),
   that doesn't mean that the lowercase form of 'A' should be
   'a' with the accent ('…') instead of plain 'a'.

git-svn-id: trunk@34321 -
2016-08-16 14:47:29 +00:00
marco
7cda2d237f * improved prototypes for dos.
git-svn-id: trunk@33356 -
2016-03-27 21:13:24 +00:00
michael
fde42ca8ef * Type helpers, compatible to Delphi XE 8
git-svn-id: trunk@32262 -
2015-11-07 09:40:54 +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
b1c10cff02 * actually use the filename converted to the file system codepage in
FileCreate()

git-svn-id: branches/cpstrrtl@25072 -
2013-07-09 19:01:21 +00:00
Jonas Maebe
4c7605d6bf * fixed duplicate StringToTB definition error in r22467; only kept the
new StringToTB implementation (rawbytestring), because it ensures we
    don't overflow the transfer buffer size

git-svn-id: branches/cpstrrtl@24988 -
2013-06-27 21:37:25 +00:00
Jonas Maebe
a3c936fe5f + rawbytestring/unicodestring overloads for FileCreate and FileOpen.
The WinCE implementation converts the rawbytestring arguments to
    unicodestring and calls unicode OS APIs, while the others convert
    unicodestring arguments to DefaultFileSystemCodePage and call
    single byte OS APIs
  + test for the above

git-svn-id: branches/cpstrrtl@22467 -
2012-09-27 07:54:25 +00:00
Tomas Hajny
225cc1c1e0 * fix FileExists/DirectoryExists wrongly accepting non-existing entries with wrong path due to path normalization using ExpandFileName (correctly) accepting also non-existing paths
git-svn-id: trunk@20890 -
2012-04-15 19:46:33 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
Tomas Hajny
7f7a4518f7 * FileExists fixed - wildcards not accepted any longer
git-svn-id: trunk@18846 -
2011-08-25 21:34:44 +00:00
pierre
04a2d0bc94 * Handle -1 return if GetFileAttr call inside DirectoryExists
git-svn-id: trunk@18220 -
2011-08-16 15:01:20 +00:00
Tomas Hajny
6992049034 * fix for a silly typo in the previous revision
git-svn-id: trunk@18189 -
2011-08-13 18:18:15 +00:00
Tomas Hajny
867ad94115 * fix for DirectoryExists - proper handling of root directory
git-svn-id: trunk@18186 -
2011-08-13 00:06:14 +00:00
pierre
9d763ec052 * Avoid warnings about pointer to signed integers typecasts
+ Accept on trailing directory seperator for DirectoryExists
    and handle 'X:' directory separately by calling
    GetDir(drive,dir) to find the current directory of the drive
    considered.

git-svn-id: trunk@18176 -
2011-08-12 08:35:55 +00:00
pierre
1dfa5c2e74 + Implement !proxy support for long command line
this allows passing command lines longer than 126 chars to
    Free Pascal or go32v2 programs.

    By default only command lines longer than 126 chars are
    passed using !proxy method,
    it is however possible to disable this conversion completely by
    set Use_go32v2_proxy boolean variable to false (true by fdefault).
    In that case, command lines longer than 126 will be truncated, but
    a warning is echoed to stderr.
    For testing purposes, it is possible to set the boolean variable
    force_go32v2_proxy to true to force systematic use of this
    conversion.

    This is set by default if the RTL is compiled with
    SYSTEM_DEBUG_STARTUP conditional set.

    To allow use by sysutils unit, a new procedure:
    exec_ansistring(path : string;comline : ansistring);

    has been added to the interface, which is now called instead
    of Dos.Exec from Sysutils.ExecuteProcess

git-svn-id: trunk@18159 -
2011-08-10 14:27:24 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
pierre
9276fa437f * Fix tw1041 test failure
git-svn-id: trunk@16571 -
2010-12-16 13:25:20 +00:00
marco
be98b13554 * fix for 11263, changed fileread and fd_zero to out using $modeswitch.
git-svn-id: trunk@14965 -
2010-03-01 22:35:14 +00:00
marco
8e9a7e14ad * Revised yesterday solution to a more general one. Executeprocess gets
another parameter, a set type with flags, default = []

git-svn-id: trunk@14572 -
2010-01-07 20:49:28 +00:00
michael
01ed4a6745 * Implemented OnBeep to install custom beep handler
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
Tomas Hajny
573bc3b767 * inline on needed for 2.0.x
git-svn-id: trunk@8532 -
2007-09-17 21:19:12 +00:00
Tomas Hajny
f0959c1b1d * yet another fix for DiskFree/DiskSize
git-svn-id: trunk@8516 -
2007-09-16 20:17:27 +00:00
Tomas Hajny
77fe5f40fe * remove erratic / unreliable check for DOS version in Do_DiskData
git-svn-id: trunk@8461 -
2007-09-13 20:54:00 +00:00
Tomas Hajny
5e1a7997ee + FileTruncate allows 64-bit parameter
git-svn-id: trunk@6727 -
2007-03-05 23:47:10 +00:00
micha
ce9e589e15 * fix FileSeek implementation to match declaration
git-svn-id: trunk@5159 -
2006-11-01 17:47:47 +00:00
Tomas Hajny
a9b515c0bf * fexpand defines kept in platform specific sysutils.pp
git-svn-id: trunk@3726 -
2006-05-28 21:29:26 +00:00
florian
6992fde8fc * patch from Ales to Katona to change some var parameters to out
parameters

git-svn-id: trunk@292 -
2005-06-09 07:42:40 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
7fef413b69 + SysLocale 2005-02-26 14:38:14 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
Tomas Hajny
8280fbe06c * FileOpen fixes for DR-DOS, resourcestring in ExecuteProcess, implementation of Sleep changed to give up timeslices 2004-12-18 20:22:17 +00:00
michael
fbb13b5266 + Added GetEnvironmentVariableCount and GetEnvironmentString calls 2004-12-11 11:32:44 +00:00
Tomas Hajny
601f2e02ce * overloaded ExecuteProcess added, EnvStr param changed to longint 2004-02-15 21:34:06 +00:00
Jonas Maebe
5386a1c2ca * fixed compilation errors 2004-01-25 13:05:08 +00:00
Tomas Hajny
e0f9297e01 * ExecuteProcess fixes, ProcessID and ThreadID added 2004-01-20 23:05:31 +00:00
michael
5a1477ef6f + Added rtlconst dependency to classes.ppu and implemented sysutils.sleep 2004-01-10 20:25:14 +00:00
Jonas Maebe
c6550c2b3b * fixed compilation 2004-01-10 10:49:24 +00:00
florian
058d480f40 * error handling for Variants improved 2003-11-26 20:00:19 +00:00