Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Tue, Aug 21, 2012 at 2:11 AM, Martin wrote: > On 21/08/2012 00:09, Juha Manninen wrote: > >> The converter is clever enough to ask from user what to do with an >> unknown unit name. >> It can be commented out or the user can search and select its location. >> However, scanning the parent direc

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Martin
On 21/08/2012 00:09, Juha Manninen wrote: The converter is clever enough to ask from user what to do with an unknown unit name. It can be commented out or the user can search and select its location. However, scanning the parent directory makes the number of "stupid" questions lower as the obvi

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Martin
On 20/08/2012 23:55, Juha Manninen wrote: About scanning "only paths specified by the user", do you really mean the user should search for pascal sources in a to-be-converted Delphi project directories, then type the directory names into a config file and then feed that file to the converter's

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Tue, Aug 21, 2012 at 1:28 AM, Martin wrote: > Well I am not myself a user of the converter. > But even if files are organized like this, then there may be several > versions of the "Mijn Lib" (or one of the units that should be found > there, is also in another folder). Then the converter can

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Juha Manninen
On Mon, Aug 20, 2012 at 5:47 PM, Jürgen Hestermann < juergen.hesterm...@gmx.de> wrote: > Well, it is a bad idea to wildly scan directory branches "just in case" at > all. > That's fooling so many people and there is no good reason for doing so. > Only paths specified by the user (i.e. in config) s

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Martin
On 20/08/2012 23:00, Bart wrote: On 8/20/12, Jürgen Hestermann wrote: Well, it is a bad idea to wildly scan directory branches "just in case" at all. In the context of the converter it is not a "just in case" scenario. My Delphi projects are located like this: F:\Delphi Projecten //all my p

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Bart
On 8/20/12, Jürgen Hestermann wrote: > Well, it is a bad idea to wildly scan directory branches "just in case" at > all. In the context of the converter it is not a "just in case" scenario. My Delphi projects are located like this: F:\Delphi Projecten //all my projects reside in a subfolder of

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Bart
On 8/20/12, Tomas Hajny wrote: > If that is the original problem, you could use the following check: > > if ExpandFileName (APath+'..'+DirectorySeparator) <> ExpandFileName > (APath) then ... [snip] > implementation). DirectoryExists for 'c:\..\' returns true under Win32 for > the same reason. T

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Tomas Hajny
On Mon, August 20, 2012 16:28, Mattias Gaertner wrote: > On Mon, 20 Aug 2012 14:38:05 +0200 > Sven Barth wrote: > >> Am 20.08.2012 14:05, schrieb JĂźrgen Hestermann: >> > Am 2012-08-20 00:17, schrieb Bart: >> > > Does fpc have a function that determines if a given paths is the >> root >> > > (e.

[fpc-pascal] Re: Searching for files all over the disk

2012-08-20 Thread Reinier Olislagers
On 20-8-2012 16:47, Jürgen Hestermann wrote: > > Am 2012-08-20 16:28, schrieb Mattias Gaertner: >> Apparently it is a bad idea to scan a root directory. See >> http://bugs.freepascal.org/view.php?id=22630 > > Well, it is a bad idea to wildly scan directory branches "just in case" > at all. > That

[fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Jürgen Hestermann
Am 2012-08-20 16:28, schrieb Mattias Gaertner: Apparently it is a bad idea to scan a root directory. See http://bugs.freepascal.org/view.php?id=22630 Well, it is a bad idea to wildly scan directory branches "just in case" at all. That's fooling so many people and there is no good reason for d

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Mattias Gaertner
On Mon, 20 Aug 2012 14:38:05 +0200 Sven Barth wrote: > Am 20.08.2012 14:05, schrieb Jürgen Hestermann: > > Am 2012-08-20 00:17, schrieb Bart: > > > Does fpc have a function that determines if a given paths is the root > > > (e.g. '/' in Linux, 'F:\' in Windows)? > > > > The question is: For wha

[fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-20 Thread Olivier SANNIER
Hello all, I'm using FreePascal 2.6.0 under Win32 here and I'm seeing a very weird behavior as I'm not getting EZeroDivide when doing float divisions, but a rather surprising EControlC. As I was writing the code in assembly, I also tried with plain Pascal code, but I get the same result. Here is t

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Jürgen Hestermann
Am 2012-08-20 14:38, schrieb Sven Barth: > Am 20.08.2012 14:05, schrieb Jürgen Hestermann: >> The question is: For what reason is this function needed? If you use >> "subst" on Windows you can make every path to a root path if you want. > > Maybe because he wants to determine whether a path is abs

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Sven Barth
Am 20.08.2012 14:05, schrieb Jürgen Hestermann: Am 2012-08-20 00:17, schrieb Bart: > Does fpc have a function that determines if a given paths is the root > (e.g. '/' in Linux, 'F:\' in Windows)? The question is: For what reason is this function needed? If you use "subst" on Windows you can ma

Re: [fpc-pascal] Possible RTFM question: is there something like anIsRootPath() function?

2012-08-20 Thread Ludo Brands
> I ended up with this: > > function IsRootPath(APath: String): Boolean; > //crude function, it maybe needs support for UNC drives > var > D: String; > Len: Integer; > begin > D := ExtractFileDrive(APath); > Len := Length(D); > System.Delete(APath, 1, Len); > Result

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Jürgen Hestermann
Am 2012-08-20 00:17, schrieb Bart: > Does fpc have a function that determines if a given paths is the root > (e.g. '/' in Linux, 'F:\' in Windows)? The question is: For what reason is this function needed? If you use "subst" on Windows you can make every path to a root path if you want. > The

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Bart
On 8/20/12, michael.vancann...@wisa.be wrote: > There is no such function. Thanks for the quick response. I ended up with this: function IsRootPath(APath: String): Boolean; //crude function, it maybe needs support for UNC drives var D: String; Len: Integer; begin D := Extra

[fpc-pascal] Re: DOSbox issues

2012-08-20 Thread Guillermo Martínez Jiménez
From: Reinier Olislagers > Just for interest: are you trying out FPC for DOS for fun or do you need > to create/support DOS (not Windows) programs? I think I'm trying it just for fun. Actually I was angry because my Allegro.pas wrapper doesn't work (well, version 4.4 almost do but version 5 only