Commit Graph

75 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
485944b492 * Char -> AnsiChar 2023-07-14 17:26:09 +02:00
Tomas Hajny
1e6ee7f3c7 * fix remaining search handle leaks in Dos.FSearch - fix for bug #30896
git-svn-id: trunk@34910 -
2016-11-17 22:05:17 +00:00
Tomas Hajny
b7de70422f * fix for bug #24504 (extended version of patch by Bart Broersma)
git-svn-id: trunk@34849 -
2016-11-08 22:16:49 +00:00
Tomas Hajny
c1afb4b63b * avoid FindFirst failing due to Attribute parameter bigger than $FF
git-svn-id: trunk@33894 -
2016-06-03 21:16:35 +00:00
nickysn
aa44dcbd7f * fixed hang in dos.exec_ansistring when passing a long command line via the
go32v2 proxy method. This fixes go32v2 snapshot building, among other things.

git-svn-id: trunk@28798 -
2014-10-11 20:56:36 +00:00
Tomas Hajny
cedf009d3c * fix for SIGSEGV in Exec without command line parameters revealed in discussion for #26160
git-svn-id: trunk@27804 -
2014-05-18 20:37:40 +00:00
Tomas Hajny
bb0a670e9e * fix for bug #26160
git-svn-id: trunk@27803 -
2014-05-18 20:02:10 +00:00
Jonas Maebe
df6a2dce00 + unicodestring support for assign/erase/rename
+ codepage support for textrec/filerec and the above routines
  * textrec/filerec now store the filename by default using widechar. It is
    possible to switch back to ansichars using the FPC_ANSI_TEXTFILEREC define.
    In that case, from now on the filename will always be stored in
    DefaultFileSystemEncoding
  * fixed potential buffer overflows and non-null-terminated file names in
    textrec/filerec
  + dodirseparators(pwidechar), changed the dodirseparators(pchar/pwidechar)
    parameters into var-parameters and gave those routines an extra parameter
    that indicates whether the p(wide)char can be changed in place if
    necessary or whether a copy must be made first (avoids us having to make
    all strings always unique everywhere, because they might be changed on
    some platforms via a pchar)
  * do_open/do_erase/do_rename got extra boolean parameters indicating whether
    the passed pchars point to data that can be freely changed (to pass on to
    dodirseparators() if applicable)
  * objects.pp: force assign(pchar) to be called, because
    assign(array[0..255]) cannot choose between pchar and rawbytestring
    versions (and removing the pchar version means that assign(pchar) will
    be mapped to assign(shortstring) in {$h-})
  * fixed up some routines in other units that depend on the format of
    the textrec/filerec.name field

git-svn-id: branches/cpstrrtl@25137 -
2013-07-19 16:30:51 +00:00
marco
5ce5f4f2a9 * Init use_proxy to false, Mantis #21097
git-svn-id: trunk@20099 -
2012-01-17 07:57:39 +00:00
pierre
59720fa55a * Fix error in last commit for quoted args.
end_of_args needs to be reset for even if
    curent_arg is empty.

git-svn-id: trunk@18160 -
2011-08-10 15:34:08 +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
giulio
80b0231616 Fixed DiskFree/DiskSize:
Int21/7303 is not related to lfn, since it's supported by win9x even when in DOS mode, while it's not supported by WinNTs.
The behaviour (inspired by djgpp) is then to try different methods:
 * if the drive is a cdrom unit, try to ask to MSCDEX (this is required for pure DOS)
 * else, try int21/7303 (it will work for non-cdrom drives under win9x when in DOS mode, and in Win9x dos box and FreeDOS)
 * else, last choice is old int21/36 (it will work in MSDOS and WinNTs, though in the latter case sizes are wrong for free space or disk size > 2GB, but it's the best we can do)

This solves bug #11477

git-svn-id: trunk@11246 -
2008-06-19 14:59:41 +00:00
Tomas Hajny
68a4c0347a * patch from Giulio for FindFirst return value with no files and SetFAttr with VolumeID - web bug #11247
git-svn-id: trunk@11231 -
2008-06-15 15:14:07 +00:00
giulio
5da751376b Prevent memory corruption by respecting DOS command line length limit (tests/test/targ1b doesn't crash the machine anymore)
git-svn-id: trunk@10958 -
2008-05-12 14:42:24 +00:00
Tomas Hajny
17f3d9fcf7 * fix by Guilio Bernardi for DosExitCode always 0 under Go32v2
git-svn-id: trunk@10781 -
2008-04-24 15:17:40 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04: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
c00021373a * fix from r7819 extended to more platforms
git-svn-id: trunk@7828 -
2007-06-26 21:08:37 +00:00
pierre
11923e9786 + code to debug LFN FindFirst/findClose
git-svn-id: trunk@7344 -
2007-05-15 13:37:19 +00:00
Tomas Hajny
374e759169 * cleanup by Marco Borsari (borsa77)
git-svn-id: trunk@6794 -
2007-03-11 20:57:50 +00:00
daniel
139408b512 * Environment corruption fix by Ladislav Lacina
git-svn-id: trunk@5562 -
2006-12-10 20:43:46 +00:00
Tomas Hajny
054f7dda20 * remove DosVersion check limiting use of LFN calls for DiskSize/DiskFree to Win9x/ME (ignoring e.g. Win2K and others)
git-svn-id: trunk@3942 -
2006-06-25 15:18:16 +00:00
Tomas Hajny
f7f1f9917d * addition to the previous patch
git-svn-id: trunk@3932 -
2006-06-24 23:00:18 +00:00
Tomas Hajny
1ecf556685 * patch for Dos.Exec and others from borsa77 at libero.it
git-svn-id: trunk@3930 -
2006-06-24 22:47:39 +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
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
Tomas Hajny
e1252e7302 * GetMsCount added, platform independent routines moved to single include file 2004-12-05 16:44:43 +00:00
daniel
bc7f8a474d * Enable threadvars again 2004-02-17 17:37:25 +00:00
Tomas Hajny
7a08fcd395 * LastDosExitCode changed back from threadvar temporarily 2004-02-16 22:16:55 +00:00
Tomas Hajny
601f2e02ce * overloaded ExecuteProcess added, EnvStr param changed to longint 2004-02-15 21:34:06 +00:00
michael
6571f6a7e5 + Switched to single interface in dosh.inc 2004-02-09 12:03:16 +00:00
florian
3c481f1688 * fixed fsearch 2004-01-06 00:58:35 +00:00
peter
d97075a245 * stdcall fixes 2003-10-03 21:46:25 +00:00
peter
9f31783a0a * old logs removed and tabs fixed 2002-09-07 16:01:16 +00:00
carl
edb0740421 * completely merged from fixes branch 2001-11-23 00:18:54 +00:00
peter
22ab77e873 * fix error return in disksize (merged) 2001-10-12 16:04:15 +00:00
Tomas Hajny
d5e9273b9b * universal FExpand 2001-03-16 20:09:58 +00:00
peter
29bdb0b698 * fixed disksize to return -1 on error 2000-12-16 15:27:15 +00:00
peter
f07f30990e * diskfree doserror fix (merged) 2000-10-11 15:38:03 +00:00
peter
7229ed1cab * removed previous fsplit() patch as it's not the correct behaviour for
LFNs. The code showing the bug could easily be adapted (merged)
2000-09-06 20:47:34 +00:00
peter
ae5fe3eb68 * fixed previous commit (merged) 2000-09-04 20:17:53 +00:00
peter
4072466464 * fsplit with .. fix from Thomas (merged) 2000-09-04 19:38:12 +00:00
peter
9b1864c586 * getenv case insensitive (merged) 2000-08-04 21:45:39 +00:00
peter
1b04862b8c * merged fixes 2000-07-30 17:09:55 +00:00
Jonas Maebe
7c914c429f * merged dossearchrec2searchrec() fix from fixes branch 2000-07-22 12:24:55 +00:00
michael
586c4cea50 + Conditionals fixed 2000-07-14 10:33:09 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00