Re: [fpc-pascal] Processing passwords etc.

2014-04-13 Thread Ludo Brands
On 04/13/2014 09:02 AM, Michael Van Canneyt wrote: > > > You are right. A logic error. ReallocMem is the more tricky one. > Revised. In case of a block move, the memory (OP) is already freed when you clear/scramble it. I'm afraid you can't simply re-use the underlying ReAllocMem (think cmem for

Re: [fpc-pascal] Processing passwords etc.

2014-04-12 Thread Ludo Brands
On 04/12/2014 02:24 PM, Michael Van Canneyt wrote: > > Attached is an implementation that allows you to specify: > A few comments: - allocmem already zeros the memory. No need to do it a second time - Getmem and Allocmem can return nil (dependent on mem manager, sometimes on ReturnNilIfGrowHeap

Re: [fpc-pascal] $LINKLIB MSVCRT on windows/osx

2014-03-10 Thread Ludo Brands
On 03/09/2014 08:36 PM, m...@rpzdesign.com wrote: > Marco: > > Based on the tone of your response, I am thinking that I > am doing something stupid on windows win32? > You are on the correct path but you need to point to the mingw libraries. They provide the stubs for msvcrt and other windows st

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ludo Brands
On 01/17/2014 05:09 PM, Fred van Stappen wrote: > >> I don't know if the Handle type in the header is defined by the C++ > compiler >> or by the package itself. Consult their respective documentation for more >> info. > > Here declaration of create instance : > > // Create a new instance of Soun

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ludo Brands
On 01/17/2014 03:55 PM, Fred van Stappen wrote: > >> > I run nm and find the name of the procedures ( PS : without > nm-Ewald's tip, you must be a high soothsayer to find it) >> > For example, a C called procedure : soundtouch_getVersionString() > becomes : _ZN10soundtouch10SoundTouch16getVersionS

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ludo Brands
On 01/17/2014 03:16 PM, Fred van Stappen wrote: > > I run nm and find the name of the procedures ( PS : without nm-Ewald's tip, > you must be a high soothsayer to find it) > For example, a C called procedure : soundtouch_getVersionString() becomes : > _ZN10soundtouch10SoundTouch16getVersionStri

Re: [fpc-pascal] embedded HTTP server in GUI application

2013-09-03 Thread Ludo Brands
On 09/03/2013 12:09 PM, Michael Van Canneyt wrote: > > > On Tue, 3 Sep 2013, Marco van de Voort wrote: > >> In our previous episode, Graeme Geldenhuys said: >>> Can anybody make recommendations for embedding a HTTP Server into a GUI >>> application? >>> >>> ps: I'm using FPC 2.6.2, and the end r

Re: [fpc-pascal] math round vs banker's round

2013-08-14 Thread Ludo Brands
On 08/14/2013 08:47 AM, David Emerson wrote: > > I don't see this TfpuRoundingMode mentioned anywhere in the > documentation, other than the "get" and "set" functions for the same. > What does it effect? > It sets the 8087 registers and or SSE registers in x86 and x64 systems. The problem is tha

Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread Ludo Brands
On 08/14/2013 08:03 AM, Sven Barth wrote: > Am 13.08.2013 23:48 schrieb "David Emerson" >: >> >> Hi all, >> >> I have just discovered that the system.round function has this very > odd behavior of rounding towards an even number when the fractional part > is .5 -- in t

Re: [fpc-pascal] Re: SQLdb: TMSSQLConnection: using Instance name in Host

2013-06-22 Thread Ludo Brands
On 06/22/2013 03:20 PM, Marcos Douglas wrote: > On Sat, Jun 22, 2013 at 4:35 AM, Ludo Brands wrote: >> Can you confirm it works with dbsetlname(FDBLogin, PChar('MyApp'), 5) ? >> If that is the case I'll make a patch for dblib.pp and will add an >> application

Re: [fpc-pascal] Re: SQLdb: TMSSQLConnection: using Instance name in Host

2013-06-22 Thread Ludo Brands
On 06/21/2013 09:12 PM, Marcos Douglas wrote: > On Fri, Jun 21, 2013 at 4:08 PM, Marcos Douglas wrote: >> On Fri, Jun 21, 2013 at 3:59 PM, Ludo Brands wrote: >>> Ah, just found out that DBSETAPP is wrongly defined for FreeTDS. >>> It should be 5 instead of 4 according

Re: [fpc-pascal] Re: SQLdb: TMSSQLConnection: using Instance name in Host

2013-06-21 Thread Ludo Brands
On 06/21/2013 08:01 PM, Marcos Douglas wrote: > Worked but I have another problem: > To connect in DB of my client I need to pass the Application Name parameter. > I tried to use Params property but didn't worked so, I changed the mssqlconn: > > dbsetlname(FDBLogin, PChar('MyApp'), DBSETAPP); >

Re: [fpc-pascal] Re: SQLdb: TMSSQLConnection: using Instance name in Host

2013-06-21 Thread Ludo Brands
On 06/21/2013 04:14 PM, Marcos Douglas wrote: > On Fri, Jun 21, 2013 at 10:38 AM, Marcos Douglas wrote: >> Hi, >> >> Is possible to use "instance name" in host connection like bellow? >> server001\instanceABC >> >> I'm using FPC 2.6.2 >> >> Thanks, >> Marcos Douglas > > The error is: > Error 2000

Re: [fpc-pascal] FPC 2.6.2 throws SEGV in fpc_AnsiStr_Decr_Ref(). How is this possible?

2013-05-08 Thread Ludo Brands
On 05/09/2013 05:19 AM, Bruce Tulloch wrote: > > This tells me that the test at the top of fpc_AnsiStr_Decr_Ref: > > cmpl $0,(%eax) > jne .Ldecr_ref_continue > ret > .Ldecr_ref_continue: > > passed (i.e. (%eax) was NOT nil) but sometime during the execution of > the follo

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-06 Thread Ludo Brands
On 05/06/2013 07:17 AM, silvioprog wrote: > > Ludo, I'm almost by completing the units in this link: > > https://bitbucket.org/silvioprog/tcpipcomp (this repository is temporary) > > The current code (I'm updating it daily) in these units is good? I'm > open to suggestions, and we can change wh

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-05 Thread Ludo Brands
On 05/04/2013 09:59 PM, Zaher Dirkey wrote: > now in this example > http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspx > They not use Select before acce​pt > If you are happy with accept blocking or if you use non-blocking sockets you don't need select before accep

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-04 Thread Ludo Brands
On 05/04/2013 08:00 PM, Zaher Dirkey wrote: > Hmm there is diffrents > Yours > res:=select(sock+1,@readfds,@writefds,@exceptfds,@tv); > Mine > c := WinSock2.select(0, PSetRead, PSetWrite, nil, @TimeVal); > > 0 here in mine, in yours sock+1 (FHandle+1 in mine). > I will take more testing. > > Ac

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-04 Thread Ludo Brands
On 05/04/2013 05:05 PM, Zaher Dirkey wrote: > > On Sat, May 4, 2013 at 5:40 PM, Ludo Brands <mailto:ludo.bra...@free.fr>> wrote: > > Can you show the code you use? You tested on Windows, linux, Mac, ...? > > > ​Only on Windows XP > This is a small tes

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-04 Thread Ludo Brands
On 05/04/2013 04:31 PM, Zaher Dirkey wrote: > > > ​I have put Select before Accept and it doesn't work, it blocked forever > ​ without accepting any connection. > Accept function who block the thread and get new connection. > Can you show the code you use? You tested on Windows, linux, Mac, ...

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ludo Brands
On 05/03/2013 05:57 PM, silvioprog wrote: > > Could you give me an example in practice? Theoretically I understand, > but I don't know do in practice. :/ > > Now, TTcpIpServer is working well. The new problem is: when I close the > server with one or more clients connected, I got a memory leak.

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Ludo Brands
On 05/02/2013 10:00 PM, silvioprog wrote: > > Lines 277 and 278. That is, I already do that. The problem now is how to > stop the "Accept" but without errors. > > I implemented the "Stop" method in socket, but I did not want to do it > this ugly way. > Same solution as for recv and send. Or use

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 07:06 PM, silvioprog wrote: > Ludo, a small question > > So, In loop of my thread, to the process doesn't stay blocked in recv, I > need to use select in client too? > If your socket is in blocking mode and you don't want your thread to block, yes. Server or client, there is n

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Ludo Brands
On 04/26/2013 10:19 AM, Ludo Brands wrote: > > Pass -M or --print-map to ld to get a memory map. It includes all object > files included. > On my system it shows that open and close are from MinGW32/lib/libmoldname.a and a undefined reference to `fil

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:54 AM, Darius Blaszyk wrote: > > On Apr 26, 2013, at 1:37 AM, Paul Breneman wrote: > >>> Yes it does find them, the statically libraries are linked into an >>> executable which works fine. That is why I was surprised. I'm sure MinGW >>> must link to other libraries as well

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:19 AM, Michael Van Canneyt wrote: > > > On Fri, 26 Apr 2013, Ludo Brands wrote: > >> On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: >>> >>> >>> On Thu, 25 Apr 2013, silvioprog wrote: >>> >>>> I do not know wh

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: > > > On Thu, 25 Apr 2013, silvioprog wrote: > >> I do not know where it would be used, it's just an observation hehe... > > Yes, but the above is what I mean with 'it does not make much sense'. > > I can easily add this - in fact I will do so

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-24 Thread Ludo Brands
On 04/24/2013 10:21 PM, silvioprog wrote: > 2013/4/24 silvioprog mailto:silviop...@gmail.com>> > > Hello, > > There are a multi-thread example using SSockets in FPC? > > I'm trying to implement it*, but it's very hard and this work it's > consuming all my time. The difficulty is

Re: [fpc-pascal] Statically link library

2013-04-24 Thread Ludo Brands
On 04/23/2013 10:14 PM, Darius Blaszyk wrote: > > > Thanks Ludo! Works perfectly also here. However for my understanding. Why > does MinGW find open, filesize etc? Is there some header file that > "translates" these functions to be compatible with msvcrt? If not I would > have to create one my

Re: [fpc-pascal] Statically link library

2013-04-20 Thread Ludo Brands
On 04/20/2013 11:54 AM, Darius Blaszyk wrote: > Hi, > > I'm linking a C and FPC program but I keep on getting undifined symbols > (see example below). > > Error: Undefined symbol: _strcpy > Sofar I have added: > > {$linklib msvcrt} > {$linklib gcc} > > What other libraries should I add? BT

Re: [fpc-pascal] SqlDB vs Zeos: TDataset.FieldDefs[].Size

2013-04-20 Thread Ludo Brands
On 04/19/2013 05:59 PM, Graeme Geldenhuys wrote: > Hi, > > I have a Firebird database living on a FreeBSD server. I did not specify > a charset when the database was created. > > I have a table with a string field defined as VarChar(10). > > When I use SqlDB and retrieve the Size of that field v

Re: [fpc-pascal] Why does this work?

2013-04-12 Thread Ludo Brands
On 04/12/2013 11:47 AM, Reinier Olislagers wrote: > if (FNullField <> nil) and (Dst = nil) and (AFieldDef.NullPosition >= > 0) then > begin > Src := PChar(Src) + FNullField.Offset + (AFieldDef.NullPosition shr 3); > Result := (PByte(Src)^ and (1 shl (AFieldDef.NullPosition and $7))) = 0

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Ludo Brands
On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote: > > It might be notable that Debian doesn't volunteer a domain name unless > it's able to contact DNS. I'll get onto nslookup, or just use temporary > text (it's only salt for a password hash, and is stored). > One of the problems with uname is t

Re: [fpc-pascal] Re: TPQConnection: Duplicated error message.

2013-04-05 Thread Ludo Brands
On 04/05/2013 09:10 AM, Reinier Olislagers wrote: >> I'm sure the guy who implemented this (I think Ludo Brands) can tell you > exactly what's going on. > Yes;) The background of spitting out the complete error detail was people complaining about not getting the hints as

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-26 Thread Ludo Brands
On 03/26/2013 10:40 AM, Sven Barth wrote: > Am 26.03.2013 06:53, schrieb Anthony Walter: >> I wasn't asking you to stop your work, rather I was attempting to >> share insights and my opinions with the group. My point in the >> previous message was that many times it make sense to reuse something >

Re: [fpc-pascal] FBAdmin

2013-03-24 Thread Ludo Brands
On 03/24/2013 10:54 AM, Mark Morgan Lloyd wrote: > I've added a call to FBAdmin to what I'm working on, to get the full > description of the server (i.e. comparable to PostgreSQL's version() > function). Thanks Ludo :-) > > Is it possible to piggyback this onto an open Firebird connection, in > ca

Re: [fpc-pascal] Re: a proposal about "with" syntax

2013-03-18 Thread Ludo Brands
On 03/18/2013 02:30 PM, leledumbo wrote: >> I cannot recall if there is already a notion of "alias" in free pascal, if > not then we just introduce this idea within the scope of "with" expression. > > Let me give you one then: > > procedure p; [public, alias: 'my_p']; > And another one: var

Re: [fpc-pascal] Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-09 Thread Ludo Brands
On 03/09/2013 03:03 PM, Tony Whyman wrote: > Mark, > > You should be able to do this using the Firebird Services API. IBX > exposes this API under the Firebird Admin tab and the TIBSecurityService > class is what you are looking for. > > This has methods to > > "DisplayUsers", which gets info on

Re: [fpc-pascal] Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-09 Thread Ludo Brands
On 03/09/2013 02:08 PM, Mark Morgan Lloyd wrote: > I don't know whether anybody can help me with this one, but I'm working > on something where I need a program to be able to create login-capable > database users on-the-fly. I was hoping to be able to use either > PostgreSQL or Firebird as the back

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-02 Thread Ludo Brands
On 03/01/2013 07:10 PM, Krzysztof wrote: > Hi, > > I'm reading that I can't use timer in daemon because daemon core is > based on thread. daemonapp is using threads but nothing stops you from daemonizing your app yourself with a simple fork. > So I'm trying to create another thread which simul

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 04:37 PM, Michael Van Canneyt wrote: > > On Fri, 1 Mar 2013, Ludo Brands wrote: > >> What about just using a 32k buffer? > > No problem with that as far as I am concerned. > > Since the code is shared between embedded and non-embedded targets, it &g

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 06:02 PM, Sven Barth wrote: > > While the kernel might pass less than 256 characters the dirent > structure contains a "dd_nextoff" field which is already used in FPC's > fpreaddir call to locate the next returned entry. > Yes, I know. Otherwise we would lose more than one file na

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 12:52 PM, Sven Barth wrote: > Currently FPC allocates only one pdirent in fpopendir > (rtl/linux/ossysc.inc). Maybe it should first stat the directory and > then decide based on st_blksize how much pdirent entries to allocate > (but it should also provide a sane default, as there is

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 10:55 AM, Max Vlasov wrote: > > On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands <mailto:ludo.bra...@free.fr>> wrote: > > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight c

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 09:14 AM, Max Vlasov wrote: > Hi, > > Working with lazarus on Linux Mint I noticed that when I mount a windows > shared with "Connect to server", everything works fine (Nautilus, > Midnight Commander, Lazarus file operations). But meeting that .gvfs > folder is hidden, I tried to mou

Re: [fpc-pascal] Place of elements in record

2013-02-28 Thread Ludo Brands
On 02/28/2013 08:59 AM, Koenraad Lelong wrote: > Other solutions ? > type EEPROM_Content= record Var1 : byte; Var2 : word; Var3 : byte; end; ... @EEPROM_Content(nil^).Var2 gives you the relative address of Var2 in the record. Calculated at compile time. Ludo _

Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Ludo Brands
On 02/27/2013 05:25 PM, Krzysztof wrote: > Hi, > > I need system info such CPU (by PID), memory usage (by PID), free memory > etc. Target platform: Linux. > Linux have command line tools like ps, top, memstat, but I'm just > wondering if Free Pascal has wrappers for these commands. If not, then I

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 12:59, Ludo Brands wrote: On 28/12/2012 12:48, Mark Morgan Lloyd wrote: Ludo Brands wrote: type TAllServerCapabilitiesBase=(uscConnected, uscCanIssueGUID,lscConnected, lscCanIssueGUID, lscIsFirebird); TUpstreamServerCapabilitiesBase= uscConnected .. uscCanIssueGUID

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 12:48, Mark Morgan Lloyd wrote: Ludo Brands wrote: type TAllServerCapabilitiesBase=(uscConnected, uscCanIssueGUID,lscConnected, lscCanIssueGUID, lscIsFirebird); TUpstreamServerCapabilitiesBase= uscConnected .. uscCanIssueGUID; TLocalServerCapabilitiesBase= lscConnected

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 11:42, Mark Morgan Lloyd wrote: Is it possible to extend an enumeration, while preserving strong type checking? In other words, given existing code like typeTUpstreamServerCapabilitiesBase= (uscConnected, uscCanIssueGUID); TLocalServerCapabilitiesBase= (lscConnected, l

Re: [fpc-pascal] GetTableNames in TSQLConnection / Postgresql

2012-12-17 Thread Ludo Brands
The question is also why return SCHEMA_NAME || '.' || TABLE_NAME when this is not always usable in a query later on ? One DB needs "SCHEMA_NAME"."TABLE_NAME", another `SCHEMA_NAME`.`TABLE_NAME`. An additional option soQuoteNames? Well, if you don't need the concatenation, presumably you don'

Re: [fpc-pascal] GetTableNames in TSQLConnection / Postgresql

2012-12-17 Thread Ludo Brands
On 17/12/2012 10:45, michael.vancann...@wisa.be wrote: On Mon, 17 Dec 2012, LacaK wrote: Yes. May be, that I was not clear. My suggestion was 3+ fields in query: SCHEMA_NAME, TABLE_NAME, SCHEMA_TABLE_NAME (SCHEMA_NAME || '.' || TABLE_NAME) But original question AFAIU was about: what shoul

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Ludo Brands
On 03/12/2012 16:44, Reinier Olislagers wrote: Been fiddling with the Oracle connector. This: using the scott schema on Oracle 10g, this works fine in my JDBC query GUI and in sql*plus: select * from scott.emp where JOB='CLERK'; However, in code (FPC trunk x86, Windows), this: Q.SQL.Text:='sele

Re: [fpc-pascal] TurboPower FlashFiler for Free Pascal

2012-10-23 Thread Ludo Brands
> > If I understand Graeme correctly, he wants it compiled-in > (i.e. without dll). SQLite is a separate DLL. > See http://forum.lazarus.freepascal.org/index.php/topic,15712.msg84781.html#msg8 4781 for instructions on static linking of sqlite3. No dll needed. Ludo ___

Re: [fpc-pascal] DOM, XMLRead, XMLWrite - cwstring requirement

2012-09-28 Thread Ludo Brands
> > No, it is just for the XML reader, since it uses widestrings: > > Ah, so it only takes affect on the WideString type, not the > String type. I guess from the name 'widestring manager' I > should have seen that relationship. :) > Using cwstring does affect some ansistring functions. It come

Re: [fpc-pascal] Re: SDFDataset users!?

2012-09-24 Thread Ludo Brands
> > That is in contradiction with the existing implementation > as well as > > the following comments following comments in SDFData.pp > > > > 14/Ago/01 Version 2.00 (Orlando Arrocha) > > John Dung Nguyen showed me how to make this > compatible with > > You are erroneously assuming I

Re: [fpc-pascal] Re: SDFDataset users!?

2012-09-24 Thread Ludo Brands
> > Is there some defined on-disk format that sdfdataset should be > > following? > > As I understood it, it is either fixed length or CSV. > CSV as in http://tools.ietf.org/html/rfc4180 > > That is in contradiction with the existing implementation as well as the following comments following

Re: [fpc-pascal] FBAdmin

2012-09-14 Thread Ludo Brands
> It is already quite a useful component as is. Since you are FBAdmin's > author, and are knowledgeable in the service API, what do you > recommend > regarding the non basic admin actions? Forced Writes in particular is > interesting as it might have to be turned off when pumping > data for ex

Re: [fpc-pascal] FBAdmin

2012-09-13 Thread Ludo Brands
> A few questions regarding FBAdmin: > > - Will FBAdmin be backported to 2.6.1? > I can't comment on that. > - Will more functionality be added to it? In particular the > setting of > Forced Writes (I could perhaps supply a patch then). > Not from my side. Purpose of TFBAdmin was to provide

Re: [fpc-pascal] Re: Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> If it prepares the statement automatically, it also > unprepares it. (at least, it should :) ) > I does for every change in query, connection, transaction, active state of dataset, filter, etc. , but not at the end of an execsql. Ludo ___ fpc-pascal

Re: [fpc-pascal] Re: Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> > Do you prepare the query before you start the batch ? > > If not, it is prepared on every insert, which is inherently slower. > I didn't do an explicit .Prepare, but I've added it, thanks. > I thought sqldb would prepare automatically if you are using > parameters though? sqldb always uses a

Re: [fpc-pascal] Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> For my Dutch postcode program https://bitbucket.org/reiniero/postcode > with an embedded Firebird 2.5 database, I allow users to read > in a CSV file with new or updated postcode data. I use sqldb, > FPC x86. I'd like to get your suggestions on speed improvements. > Turn of indices when inser

Re: [fpc-pascal] Resource compiler under Linux - windres?

2012-09-01 Thread Ludo Brands
> Does anybody know if there is a 'winres' for non-Windows > platforms? How > do I compile *.rc files into *.res files under Linux, FreeBSD etc? Or > does Linux/*BSD executables simply not support such resources? > Windres for linux can be found in the cross binutils for windows. When installed

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> There are more problems: the library name is not > cross-platform, so the project will no longer be > cross-platform. Which is a far more serious problem, IMHO. > (and one which would exist even if I had followed your > suggestion of implementing the property in TSQLConnection). > That is no

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> Also, if I understand the mode of operation correctly, the > TSQLDBLibraryLoader, when enabled, loads the library before > the TxxxConnection tries to load it. But how can you be sure > TSQLDBLibraryLoader is streamed before a TxxxConnection that > has connected set to true > Previous messag

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> (In the IDE: drop, set connector type from picklist, maybe > change library name, set to enabled). > I'm having some problems using this in the IDE. The picklist is empty. Probably something missing in procedure TSQLDBConnectorTypePropertyEditor.GetValues( Proc: TGetStrProc); Var L : TSt

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> > After recent discussions about which library to load when > loading DB client libraries, I changed the default names for > Firebird, MySQL, Postgres. > That was well in time ;) Thanks. Another little bug and patch in http://bugs.freepascal.org/view.php?id=22691 Ludo

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] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Ludo Brands
> Only in {$mode delphiunicode} (which is what you should use if you > want to compile code written for a Delphi version in which > string=unicodestring). > Is this hidden gem announced or documented somewhere? Is there a -M compiler switch to set it as default language mode? FPC doesn't list

Re: Re : [fpc-pascal] Malformed email messages

2012-08-17 Thread Ludo Brands
> > > > I wrote a little VBA module in Outlook that modifies the > RE: back to > > Re: before sending the message and that seems to solve the problem. > > Almost. You now have an "Re :" in the front, and not a "Re:". > Removing > the space before the colon should fix it completely I think. >

Re : [fpc-pascal] Malformed email messages

2012-08-17 Thread Ludo Brands
> > > One of Ludo's later messages gives me: > > > > RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: > > shouldwehard-codeversionedorunversioned shared libraries in > our apps? > > > > In gmail's web client, the conversation view only shows the > original > > subject at the top, but it's st

Re : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedsharedlibraries in our apps?

2012-08-16 Thread Ludo Brands
> If someone knows the correct version numbers for the various > postgres and mysql libs, > that would be appreciated. > libpq.so.3 pg 7.3 7.4 libpq.so.4 pg 8.0 8.1 libpq.so.5 pg >= 8.2.4 libmysqlclient.so.13mysql 4.0 libmysqlclient.so.14mysql 4.1 libmysqlclient.so.15mysql 5.0

RE : RE : RE : [fpc-pascal] Re:linux:shouldwehard-codeversionedorunversionedsharedlibraries in our apps?

2012-08-16 Thread Ludo Brands
> > I'm glad to see I was mistaken in interpreting the way this > discussion > > was going. Probably seen too many other discussions and initiatives > > that end up nowhere. > > Tatata. Don't sell the bearskin before the bear has been shot. > > You can be glad when I actually commit the soluti

RE : [fpc-pascal] Malformed email messages

2012-08-16 Thread Ludo Brands
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Henry Vermaak > Envoyé : jeudi 16 août 2012 15:28 > À : FPC-Pascal users discussions > Objet : Re: [fpc-pascal] Malformed email messages > > > On 16/

RE : RE : [fpc-pascal] Re: linux:shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Why do you say that? > > It's not because I personally think that no extra solution is needed, > that I am oblivious to the problems of users. > > We'll solve the problem, thereby improving sqldb. > I will implement it myself next week: > > * Change default library names to make more sense.

RE : RE : RE : RE : RE : RE : [fpc-pascal] Re: linux:shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > It is a different story but an integral part of this particular > > problem. Why else has the "solution" to be spelled out > everytime the > > problem pops up? You'll say people don't make the effort to > read old > > messages. But in this thread alone you'll find a > "InitializeInterbase

RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Well, first of all, I don't think something needs to be > changed in the first place :) > > So, if we must do something extra anyway, then I prefer it to be the > correct solution, and not a shortcut. > And that is how also this attempt to improve sqldb grinds to a halt ... Ludo __

RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > Unfortunately your example illustrates nicely the difference. > > InitializeInterbase is unknown in the fpc I'm using. > InitialiseIBase60 > > does exist but you have to add the non-trivial ibase60dyn > to the uses > > clause to get to it (Google has 146 hits for > "InitialiseIBase60", no

RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Remains the fact that I think that - no matter what the other > component sets do > - the library name should NOT be a connection component > property, unless you > allow each connection to use a different library. Since that > is not possible > with the current *dyn units, the property sho

RE : RE : RE : RE : [fpc-pascal] Re: linux: should wehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > We differ only in the implementation of the 'easier way': > > I meant that I do not see the advantage of writing something like > > With Inifile do > begin > > IBConnection1.LibraryName:=ReadString('Connection','libraryNam > e','fbclient.dll'); > end > > over >With IniFil

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> And IMHO this all reeks of that. (dll name in component). > Sounds "easy", but it doesn't really solve anything. > Making it easier for the programmer to specify the library he wants will put a halt on "this discussion returning in some way or the other every 6-9 months". What is recurring in

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> > You can't be connected the 2 at the > > same time but that is a run-time issue, not design time. > > I'm not sure I'm following. Do you mean SqlDB can't connect > to two different database at the same time? I can't think > that is true, so could you explain this limitation you are > talking

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Michael Van Canneyt > > I don't see what is wrong with that. You get a nice > exception when you > > try to load a different library than the one th

RE : RE : [fpc-pascal] Re: linux: should we hard-code versionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> No, this would suggest that you can set a different value for > each instance. > I don't see what is wrong with that. You get a nice exception when you try to load a different library than the one that is alread loaded. But if I want to make an app that works with embedded firebird or firebird c

RE : [fpc-pascal] Re: linux: should we hard-code versioned orunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> So why does FCL-DB look at the unversioned *.so by default? > Wouldn't it make more sense to change FCL-DB to look for > libfbclient.so.2 instead? 2 being the latest major version of > Firebird DB, and that is also the latest version that > ibconnection.pp was written for. > Completely agree

RE : RE : [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-13 Thread Ludo Brands
> > I encounter the same problem as Reinier and > > I build the compiler with OPT="-g -gl", nothing more. > > Then it's probably something else. > Problem is caused by the changes in rev 21972. Code iterates now indefinitely TDebugInfoStabs.field_write_defs, TDebugInfo.appenddef, TDebugInfoStabs.

RE : [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-12 Thread Ludo Brands
> > I would suggest to start by not compiling the compiler or RTL > with stack checking enabled. > Is stack checking on by default? I encounter the same problem as Reinier and I build the compiler with OPT="-g -gl", nothing more. Ludo ___ fpc-pasca

RE : [fpc-pascal] Dynamic messaging in Delphi

2012-07-26 Thread Ludo Brands
http://www.freepascal.org/docs-html/rtl/sysutils/supports.html > I'm getting an identifier not found error with the procedure > "Supports". Where is this defined? > > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

RE : [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Ludo Brands
> > We only support 32 bit SPARC, and there we split a 64 bit load into > > two > > 32 bit loads. dbl, assuming it points to a double, should > point to a 64 > > bit-aligned memory location though (depending on the cpu, 32 bit > > alignment may be sufficient, but better be safe than sorry). >

RE : [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Ludo Brands
> I've found a problem when a (well-tested) program that connects to a > PostgreSQL database is compiled and run on Solaris 10 for > SPARC, Linux > SPARC is OK. > > I appreciate that this is a minority platform, but would I be less > unpopular reporting it against 2.6.0 or testing it against

RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Nothing is unthinkable. The other constructs are very ugly. > > I reversed the argument default value to True. UTF8 is now > the default. > A very wise decision;) Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freep

RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> So you'd reverse the constructor boolean argument to specify > Utf8 as default, > and let the user choose the old behaviour if he needs it ? > If that is "unthinkable" then define new contructors TJSONParser.Create2(...,AUseUTF8 : Boolean = True) or Create2(...,AUseUTF8 : Boolean = True) and m

RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Because the old behaviour is not "buggy". > > It simply did not support Unicode, and does the next best thing, > in casu: it transforms to the system codepage. > > A car without ABS and SAT-Nav is not buggy. > It just doesn't support features which are nowadays called > standard. You can per

RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Following up on bug 22310 http://bugs.freepascal.org/view.php?id=22310 > > I enabled the use of UTF8 in the FPC JSON support. > > The constructors of the JSON parser/scanner now accept an > extra argument > UseUTF8 which tells them to convert JSON strings to UTF8, not > the system codepage.

RE : [fpc-pascal] How can a project determine if it's using cmem?

2012-07-04 Thread Ludo Brands
> How can code in the library test whether it is using cmem, so that it > can tell the caller that it's safe to call functions that > move strings > and objects around? It's obviously trivial to rely on a compile-time > conditional, but can this be done in a way that doesn't rely on this? > F

RE : [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Ludo Brands
>> >> A typelib importer is already in svn. > Which won't be of much use for WinRT as this metadata is > based on the metadata that .NET assemblies already use and not on IDL. >From .net assemblies a TLB type library can be extracted with the regasm or tlbexp .net tools. The typelib importer read

RE : [fpc-pascal] Windows Phone 8 + pascal

2012-06-24 Thread Ludo Brands
> Page http://en.wikipedia.org/wiki/Windows_RunTime > says that WinRT is a COM-based API and uses a .NET-like > metadata format. > So it is not native code after all then. I don't know why > they advertised it as native. I guess it is faster than .NET > code because it is not managed. I thought

RE : [fpc-pascal] Postgresql Concurrent Transactions

2012-06-22 Thread Ludo Brands
Each manager thread has its own Connection, Transaction, and TQuery. Each manager can handle potentially thousands of sockets Each server instance (1 process) can have up to ~100 manager threads. Each Manager executes socket "commands" that translate at some point, into a Database, Select, Upd

RE : [fpc-pascal] Adding method dynamically to a class

2012-06-20 Thread Ludo Brands
They can, but there is a protocol that I'm trying to create that provides me information what to execute (out of white list). The thing is, that the first request maps the methods to be used, and there could be 2 or 200. To implement 200 methods that might be used is not a good idea imho, but add

RE : RE : [fpc-pascal] Dynamically Execute method

2012-06-19 Thread Ludo Brands
> As Bern said you can't call an object method without passing > the reference to the instance. In this case you are lucky > because TMyClass.SayHi doesn't use any properties or class > vars. Add a property to TMyClass and try to writeln that > property and you will see it fails. What you are

RE : [fpc-pascal] Dynamically Execute method

2012-06-19 Thread Ludo Brands
> Seems to work for me, updated the example: https://gist.github.com/2950789 > > Or am O missing something ? Change your method to procedure TMyClass.SayHi; begin writeln('Hi World from '+IntToStr(ptruint(self))); end; And the test to write('From MyClass2 : '); MyClass2.SayHi; if not Exe

  1   2   3   4   >