Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-18 Thread Mattias Gaertner
On Fri, 18 Mar 2011 17:08:49 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Fri, 18 Mar 2011, Reimar Grabowski wrote: > > > On Fri, 18 Mar 2011 16:02:10 +0100 > > Mattias Gaertner wrote: > > > >> Why do you need to order them? > > I do

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-21 Thread Mattias Gaertner
On Mon, 21 Mar 2011 15:34:28 +0100 Reimar Grabowski wrote: >[...] > I am to lazy to attach the code, so here it is (you should know how to get it > into Lazarus without too much hassle :) ): > > program xmlattributes; > > {$mode objfpc}{$H+} > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} >

[fpc-pascal] run pascal programs as scripts

2011-03-24 Thread Mattias Gaertner
Hi all, I would like to execute small pascal programs like normal unix scripts. For example: #!/usr/bin/instantfpc begin writeln('shebang executed'); end. Has anyone already written a tool, that compiles and runs the program? Mattias ___ fpc-pascal

Re: [fpc-pascal] run pascal programs as scripts

2011-03-24 Thread Mattias Gaertner
On Thu, 24 Mar 2011 16:53:54 + Henry Vermaak wrote: > On 24 March 2011 16:44, Henry Vermaak wrote: > > On 24 March 2011 16:06, Mattias Gaertner wrote: > >> Hi all, > >> > >> I would like to execute small pascal programs like normal unix > >&g

Re: [fpc-pascal] run pascal programs as scripts

2011-03-24 Thread Mattias Gaertner
On Thu, 24 Mar 2011 18:38:04 +0100 (CET) Michael Van Canneyt wrote: > > > On Thu, 24 Mar 2011, Mattias Gaertner wrote: > > > Hi all, > > > > I would like to execute small pascal programs like normal unix > > scripts. For example: > > > > #!/us

Re: [fpc-pascal] run pascal programs as scripts

2011-03-24 Thread Mattias Gaertner
On Thu, 24 Mar 2011 22:40:22 +0100 Felipe Monteiro de Carvalho wrote: > On Thu, Mar 24, 2011 at 7:27 PM, Mark Morgan Lloyd > wrote: > > Would it be feasible to modify FPC so that it discarded everything preceding > > "program", "unit" etc? > > Feasable, yes, but it is probably easier to make a

Re: [fpc-pascal] run pascal programs as scripts

2011-03-24 Thread Mattias Gaertner
On Thu, 24 Mar 2011 23:10:08 +0100 Felipe Monteiro de Carvalho wrote: > > Commenting is better. Then the reported error line numbers are still > > valid. > > Yes, but then bash won't recognize it, I suppose I meant: Original file: #!/usr/bin/instantfpc begin end. bash is happy. Preprocessor

Re: [fpc-pascal] run pascal programs as scripts

2011-03-27 Thread Mattias Gaertner
I wrote a little tool: http://wiki.lazarus.freepascal.org/InstantFPC Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] run pascal programs as scripts

2011-03-27 Thread Mattias Gaertner
On Sun, 27 Mar 2011 19:05:12 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sun, 27 Mar 2011, Mattias Gaertner wrote: > > > I wrote a little tool: > > > > http://wiki.lazarus.freepascal.org/InstantFPC > > Nice job. OK to include in FPC

Re: [fpc-pascal] run pascal programs as scripts

2011-03-27 Thread Mattias Gaertner
On Sun, 27 Mar 2011 21:16:58 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sun, 27 Mar 2011, Mattias Gaertner wrote: > > > On Sun, 27 Mar 2011 19:05:12 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> > >> > >> On Sun, 27 Mar

Re: [fpc-pascal] run pascal programs as scripts

2011-03-27 Thread Mattias Gaertner
On Sun, 27 Mar 2011 23:59:11 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sun, 27 Mar 2011, Mattias Gaertner wrote: > > > On Sun, 27 Mar 2011 21:16:58 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> > >> > >> On Sun, 27 Ma

Re: [fpc-pascal] TDOMElement and multiple attributes

2011-03-27 Thread Mattias Gaertner
On Sun, 27 Mar 2011 22:56:16 -0300 Flávio Etrusco wrote: > > > > > >> someone@somewhere:~/pascal/Projects/xmldemo$ cat test.xml > >> > >> > >>   >> aaaAttribute="1"/> > >> > >> > >> Looks like the order is governed by the length of the attribute name first > >> and then alphabetically. > >>

[fpc-pascal] Lazarus 0.9.30 released

2011-03-28 Thread Mattias Gaertner
The Lazarus team is glad to announce the 0.9.30 release. This release is based on fpc 2.4.2. This release is available for download at the SourceForge download page: http://sourceforge.net/projects/lazarus/files/ Minimum requirements: Windows: 98, 2k, Vista, 7, 32 or 64bit FreeBSD/Linux: g

Re: [fpc-pascal] run pascal programs as scripts

2011-03-31 Thread Mattias Gaertner
On Thu, 31 Mar 2011 14:31:04 +0200 Darius Blaszyk wrote: > > On Mar 31, 2011, at 2:07 PM, michael.vancann...@wisa.be wrote: > > > Ok, last request: > > > > Please use the ExecuteProcess variant with an array of string as second > > parameter. > > > > Reason: as soon as a command-line argument

Re: [fpc-pascal] read lines at end of file

2011-04-11 Thread Mattias Gaertner
On Mon, 11 Apr 2011 19:45:10 +0200 José Mejuto wrote: > Hello FPC-Pascal, > > Monday, April 11, 2011, 6:32:20 PM, you wrote: > > JL> Need to read the last 4 lines (txt) of a very large log file 100M bytes, > JL> 100k lines or more lots of times - of course I can read through the file > in > J

Re: [fpc-pascal] Self pointer existence

2011-04-18 Thread Mattias Gaertner
On Mon, 18 Apr 2011 09:54:28 +0200 Wimpie Nortje wrote: > Hi > > When does the self pointer's value become valid? In NewInstance, so before the constructor is called. > I need a reference to the object being created inside the object's own > create method. The last statement in Create uses s

Re: [fpc-pascal] Message methods

2011-04-19 Thread Mattias Gaertner
    dhkblas...@zeelandnet.nl hat am 19. April 2011 um 17:48 geschrieben: > Hi, > > I'm trying to understand how message methods work in FPC. For this I created > a simple app that shows a message. I also created a second (identical form) > and I expected that all message methods related to

Re: [fpc-pascal] FPImage and GetDataLineStart

2011-04-21 Thread Mattias Gaertner
    Marco van de Voort hat am 21. April 2011 um 18:50 geschrieben: > In our previous episode, michael.vancann...@wisa.be said: > > * Create a TFPCustomImage descendant that is limited to the bit depth you > > need. > > * Do not use palette. > > * Implement GetPixel and SetPixel so they con

Re: [fpc-pascal] run pascal programs as scripts

2011-04-23 Thread Mattias Gaertner
On Sun, 27 Mar 2011 19:05:12 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sun, 27 Mar 2011, Mattias Gaertner wrote: > > > I wrote a little tool: > > > > http://wiki.lazarus.freepascal.org/InstantFPC > > Nice job. OK to include in FPC as one of th

Re: [fpc-pascal] run pascal programs as scripts

2011-04-23 Thread Mattias Gaertner
On Sat, 23 Apr 2011 20:27:37 +0200 "Ludo Brands" wrote: > Nice tool. > > 2 requests: > - I would like to select the compiler. I'm typically working with the svn > version of compiler but have in my PATH a stable version of the compiler. > >From the sources I can see that the compiler is searche

Re: [fpc-pascal] run pascal programs as scripts

2011-04-24 Thread Mattias Gaertner
On Sun, 24 Apr 2011 11:22:14 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sat, 23 Apr 2011, Mattias Gaertner wrote: > > > On Sun, 27 Mar 2011 19:05:12 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> > >> > >> On Sun, 27 Mar

Re: [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Mattias Gaertner
On Mon, 25 Apr 2011 10:24:58 +0200 "Ludo Brands" wrote: > > One solution: > > PATH=YourDirectory:$PATH; script.pas > > I prefer to keep the PATH intact. I'll use: > bash -c "PATH=YourDirectory:$PATH; script.pas" That's the same. To change the PATH you must use export PATH= in bash. > > Anoth

Re: [fpc-pascal] PChar resize

2011-05-11 Thread Mattias Gaertner
On Wed, 11 May 2011 08:31:02 -0500 Luis Fernando Del Aguila Mejía wrote: > Hi, I have two questions about PChar. > > Why Reallocmem function does not work with PChar? > How to increase the size of PChar without using Strings unit? > > Thanks. > > {$codepage utf8} > Var a:Pchar; > i:byte; >

[fpc-pascal] TimSort

2011-05-20 Thread Mattias Gaertner
  Is there already a TimSort implementation in fpc?   http://en.wikipedia.org/wiki/Timsort   Mattias  ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-20 Thread Mattias Gaertner
    "Juha (gmail)" hat am 20. Mai 2011 um 13:07 geschrieben: > Jonas Maebe kirjoitti perjantai, 20. toukokuuta 2011 13:52:22: > > If you want the source, choose "Source" instead of "Win32". > > Ok, right too many links. > Now i realized that all the mirrors give direct links to source

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-21 Thread Mattias Gaertner
On Fri, 20 May 2011 20:43:01 +0300 "Juha (gmail)" wrote: > Mattias Gaertner kirjoitti perjantai, 20. toukokuuta 2011 15:16:30: > > "Juha (gmail)" hat am 20. Mai 2011 um 13:07 > > > Installing and updating both FPC and Lazarus is still a major obstacle &

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-21 Thread Mattias Gaertner
On Sat, 21 May 2011 12:12:59 +0300 "Juha (gmail)" wrote: >[...] > > When trying to update the new lazarus and fpc binaries with deb packages I > > got in trouble with dependancies. Then I abort it. What troubles? > Yes. Based on forum posts updating causes more problems, also when updating >

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-21 Thread Mattias Gaertner
On Sat, 21 May 2011 11:47:28 +0200 Bernd Kreuss wrote: > On 21.05.2011 11:29, Mattias Gaertner wrote: > > On Sat, 21 May 2011 12:12:59 +0300 > > "Juha (gmail)" wrote: > > > >> [...] > >>> When trying to update the new lazarus and fpc bi

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-21 Thread Mattias Gaertner
On Sat, 21 May 2011 11:57:42 +0200 Rainer Stratmann wrote: > Am Saturday 21 May 2011 11:29:34 schrieb Mattias Gaertner: > > On Sat, 21 May 2011 12:12:59 +0300 > > > > "Juha (gmail)" wrote: > > >[...] > > > > > > > When trying to upda

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-21 Thread Mattias Gaertner
On Sat, 21 May 2011 12:58:56 +0200 Bernd Kreuss wrote: > On 21.05.2011 12:21, Mattias Gaertner wrote: > A README.txt would > > help. For example: > > If you want to install the gtk2 version of Lazarus use: > > A shell script that installs them in the correct order.

Re: [fpc-pascal] Testing recent Lazarus with fpc 2.5.1 on x86_64-linux / create fpc-src.rpm

2011-05-21 Thread Mattias Gaertner
On Sat, 21 May 2011 15:33:04 +0200 Johannes Nohl wrote: > Hello, > > I wanted to test Lazarus (recent snapshot) with fpc 2.5.1 on > x86_64-linux. Therefore I need to build fpc-XXX.rpm and > fpc-src-XXX.rpm. I figured out how to bild fpc-XXX.rpm the easy way. > > 1. Download fpcbuild.zip and ext

Re: [fpc-pascal] Easy install of FPC and Lazarus

2011-05-22 Thread Mattias Gaertner
On Sun, 22 May 2011 15:32:05 +0200 Rainer Stratmann wrote: > For userfriendly reasons I suggest one directory with all necessary Files in > a > zip File. > > Advantages: > Easy install, just unzip in a new directory. > Everything is separate from earlyer versions, so testing is easy. > > Disa

Re: [fpc-pascal] Easy install of FPC and Lazarus

2011-05-22 Thread Mattias Gaertner
On Sun, 22 May 2011 23:29:26 +0200 Rainer Stratmann wrote: > Am Sunday 22 May 2011 23:12:34 schrieb Mattias Gaertner: > > On Sun, 22 May 2011 15:32:05 +0200 > > > > Rainer Stratmann wrote: > > > For userfriendly reasons I suggest one directory with all neces

Re: [fpc-pascal] Easy install of FPC and Lazarus

2011-05-23 Thread Mattias Gaertner
On Mon, 23 May 2011 14:52:10 +0200 Rainer Stratmann wrote: > Am Monday 23 May 2011 12:23:02 schrieb Marco van de Voort: > > In our previous episode, Rainer Stratmann said: > > > > package systems "should" bring them in if they are missing. > > > > > > > > And the qtintf library is mostly likely n

Re: [fpc-pascal] Easy install of FPC and Lazarus

2011-05-23 Thread Mattias Gaertner
On Mon, 23 May 2011 14:52:10 +0200 Rainer Stratmann wrote: > Am Monday 23 May 2011 12:23:02 schrieb Marco van de Voort: > > In our previous episode, Rainer Stratmann said: > > > > package systems "should" bring them in if they are missing. > > > > > > > > And the qtintf library is mostly likely n

Re: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
    "José Mejuto" hat am 24. Mai 2011 um 11:59 geschrieben: > Hello FPC-Pascal, > > Friday, May 20, 2011, 12:21:43 PM, you wrote: > > MG> Is there already a TimSort implementation in fpc? > MG> http://en.wikipedia.org/wiki/Timsort > > Why is TimSort specially interesting to you ? I nee

Re: Re[2]: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
    "José Mejuto" hat am 24. Mai 2011 um 18:07 geschrieben: > Hello FPC-Pascal, > > Tuesday, May 24, 2011, 1:06:43 PM, you wrote: > >  >> Why is TimSort specially interesting to you ? > MG>  I need a fast stable sort, so multiple sorts work as expected (contrary > to > MG> QuickSort).

Re: [fpc-pascal] Re: TimSort

2011-05-24 Thread Mattias Gaertner
    Marco van de Voort hat am 24. Mai 2011 um 18:53 geschrieben: > In our previous episode, Uffe Kousgaard said: > > > Why is TimSort specially interesting to you ? > > > > If it is the best all-purpose sorting algorithm and now the standard in > > several other programming languages, it s

Re: [fpc-pascal] TimSort

2011-05-24 Thread Mattias Gaertner
On Tue, 24 May 2011 19:53:12 +0200 José Mejuto wrote: > Hello FPC-Pascal, > > Tuesday, May 24, 2011, 6:31:56 PM, you wrote: > > MG> It uses a lot of tricks, but it seems to me that Tim explained all the > MG> important things. > MG> It would be nice, if thetimsort unit has the same license as

Re: [fpc-pascal] Re: TimSort

2011-05-25 Thread Mattias Gaertner
On Wed, 25 May 2011 09:02:46 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > > A quick look at wikipedia will show that timsort has a disadvantage too. > > It > > > needs up to N records memory, not j

Re: [fpc-pascal] How to get string with target OS and CPU?

2011-05-27 Thread Mattias Gaertner
On Fri, 27 May 2011 13:18:11 +0200 Krzysztof wrote: > Hi, > > I need friendly name of OS and processor type at runtime. I need this for > "user-agent" header in http client. Some kind of "Linux x86_64 Ubuntu/11.04" > ("Linux x86_64" should be enough). "GetEnvironmentVariable" function does > not

Re: [fpc-pascal] How to get string with target OS and CPU?

2011-05-27 Thread Mattias Gaertner
On Fri, 27 May 2011 14:38:52 +0200 Krzysztof wrote: > Thanks! Exactly what I needed. Is exists similar trick for get widgetset > type (QT, GTK)? uses LCLProc; LCLPlatformDirNames[WidgetSet.LCLPlatform] Mattias ___ fpc-pascal maillist - fpc-pascal@l

Re: [fpc-pascal] Why is FPImage dog slow in reading jpeg's?

2011-05-30 Thread Mattias Gaertner
    Tomas Hajny hat am 30. Mai 2011 um 16:50 geschrieben: > On Mon, May 30, 2011 16:16, michael.vancann...@wisa.be wrote: > > > > Try the following code: > > > > Img:=TFPMemoryImage.Create(0,0); > > Img.UsePalette:=False; > > Img.loadFromFile(FileList[i]); > > > > That should work much

Re: [fpc-pascal] Why is FPImage dog slow in reading jpeg's?

2011-05-30 Thread Mattias Gaertner
On Mon, 30 May 2011 23:24:30 +0200 (CEST) Michael Van Canneyt wrote: > > > On Mon, 30 May 2011, Felipe Monteiro de Carvalho wrote: > > > On Mon, May 30, 2011 at 10:16 PM, Marco van de Voort > > wrote: > > http://bugs.freepascal.org/view.php?id=17621 > > > > > > Indeed, I was remember

[fpc-pascal] check if process ID is running under BSD

2011-06-06 Thread Mattias Gaertner
Hi all, I need to check under BSD if a PID is running and what name it has. Is there already a function for that? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] check if process ID is running under BSD

2011-06-06 Thread Mattias Gaertner
On Mon, 6 Jun 2011 22:02:39 +0100 (BST) phoebus phoebus wrote: > Hi Mattias, > > I don't know if it exist a FPC function for that. > > i'll do an external commad like " ps -ef | grep bash | grep -v grep | awk > '{print $8}'". Thanks, I knew that. I prefer a more direct way - for example via a

Re: [fpc-pascal] check if process ID is running under BSD

2011-06-09 Thread Mattias Gaertner
On Wed, 8 Jun 2011 12:58:55 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > > I don't know if it exist a FPC function for that. > > > > > > i'll do an external commad like " ps -ef | gre

Re: [fpc-pascal] Best integer type to be used for string indexes

2011-06-19 Thread Mattias Gaertner
On Sun, 19 Jun 2011 11:28:22 +0200 (CEST) Michael Van Canneyt wrote: > > > On Sat, 18 Jun 2011, Vladimir Zhirov wrote: > > > Hi, > > > > Reviewing a bunch of my string processing functions > > made me wonder what integer type should I use for > > position / length parameters. > > > > I used to

Re: [fpc-pascal] Best integer type to be used for string indexes

2011-06-19 Thread Mattias Gaertner
On Sun, 19 Jun 2011 23:57:04 +0200 (CEST) Michael Van Canneyt wrote: >[...] > >> Ansistring is not capable of keeping more than High(Integer) bytes. > > > > That's not true. At least 3*high(integer) compiles and runs fine here on > > 64bit: > > > > var > > s: ansistring; > > begin > > SetLength

Re: [fpc-pascal] porting to 64bit

2011-06-24 Thread Mattias Gaertner
On Fri, 24 Jun 2011 16:56:09 +0200 fred f wrote: > Hi, > > What's wrong on this condition to get the code running on 32 and 64bit: > > // Get pointer to varlength data. > function GetVarLengthData(AVarLength:PAnsiChar):PAnsiChar; > begin > Result:=PAnsiChar(AVarLength){$IFDEF > FPC}+SizeO

[fpc-pascal] File monitoring Linux

2011-09-13 Thread Mattias Gaertner
Hi, I'm searching some pascal code for file monitoring for Linux. That means getting notified if a file in a directory or its sub directories was modified. I found some hints that people started it, but I can't find the result. Any hints are greatly appreciated. Or has someone already implemented

Re: [fpc-pascal] File monitoring Linux

2011-09-13 Thread Mattias Gaertner
On Tue, 13 Sep 2011 13:14:10 +0100 Martin Schreiber wrote: > Am 13.09.2011 13:05, schrieb Mattias Gaertner: > > Hi, > > > > I'm searching some pascal code for file monitoring for Linux. That means > > getting notified if a file in a directory or its sub directori

[fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
Hi all, I found the Wiki page about the new for-in loop and found a misinformation. It stated wrongly that it is not possible to have multiple enumerators per class. It even gave a proposal for a new feature that did not add anything new. I added an example how to add a second enumerator to a cla

Re: [fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 18:52:30 -0300 Flávio Etrusco wrote: > On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner > wrote: > > Hi all, > > > > I found the Wiki page about the new for-in loop and found a > > misinformation. It stated wrongly that it is not possible to

[fpc-pascal] arm controller unit

2011-09-26 Thread Mattias Gaertner
Hi, On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need to know the exact conditions. What flags indicate that the controller unit is used? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:/

[fpc-pascal] SIGPIPE avoid or catch

2011-09-27 Thread Mattias Gaertner
Hi all, When I start under Linux a process with TProcess [poUsePipes], write stuff to Input and the process exits I get a SIGPIPE (broken pipe), which kills my whole program immediately. How can I catch or avoid the SIGPIPE with TProcess? Mattias ___ f

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-15 Thread Mattias Gaertner
"Ralf A. Quint" hat am 15. Oktober 2011 um 05:03 geschrieben: > At 03:56 PM 10/14/2011, Andrew Pennebaker wrote: > >Yeah, I know to chmod my scripts before dot-slashing them. It's just > >that fpc can't handle shebangs, and I don't want to have to choose > >either scripting or compiled. I lik

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-15 Thread Mattias Gaertner
Tomas Hajny hat am 15. Oktober 2011 um 10:19 geschrieben: > On Sat, October 15, 2011 00:43, Andrew Pennebaker wrote: > > Thanks ik. Merf, it appears fpc can't compile when a shebang is added. In > > future versions, can fpc treat shebangs as comments so that instantfpc > > code > > could be c

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-15 Thread Mattias Gaertner
"Ralf A. Quint" hat am 15. Oktober 2011 um 19:15 geschrieben: > At 10:00 AM 10/15/2011, Mattias Gaertner wrote: > > >"Ralf A. Quint" hat am 15. Oktober 2011 um 05:03 > >geschrieben: > At 03:56 PM 10/14/2011, Andrew Pennebaker > >wrote: > >

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-16 Thread Mattias Gaertner
Andrew Pennebaker hat am 16. Oktober 2011 um 19:53 geschrieben: > There are plenty who do believe it's convenient to hide compilation in the > background--the users of instantfpc. Syntax for shebangs in fpc would bridge > instantfpc and traditional Pascal code. You would no longer have to tr

Re: [fpc-pascal] Stack corruption setting UnicodeString Char

2011-10-19 Thread Mattias Gaertner
Felipe Monteiro de Carvalho hat am 19. Oktober 2011 um 09:13 geschrieben: > Hello, > > Usually when we work with PChars we do things like this to set the > final terminator: > > var >   ansistr: ansistring; > begin >   // Copy the originating string taking into account the specified length > 

Re: [fpc-pascal] parent class as a parameter type

2011-11-17 Thread Mattias Gaertner
On Thu, 17 Nov 2011 15:15:46 +0100 Sven Barth wrote: > Am 17.11.2011 15:07, schrieb ik: > > On Thu, Nov 17, 2011 at 16:03, Sven Barth > > wrote: > > > > Am 17.11.2011 09:23, schrieb ik: > > > > It's not allowed in Delphi in case of a var/out pa

Re: [fpc-pascal] How to read TDOMNode attributes

2011-12-02 Thread Mattias Gaertner
On Fri, 2 Dec 2011 18:59:25 + Frank Church wrote: > Is there a way of knowning the attribute count of a TDOMNode as well as > reading the value of an attribute if it exists? HasAttribute:=(Node is TDOMElement) and (TDOMElement.hasAttribute('Name')); Attribute value: if Node is TDOMElement

Re: [fpc-pascal] How to read TDOMNode attributes

2011-12-02 Thread Mattias Gaertner
On Fri, 2 Dec 2011 19:30:17 + Frank Church wrote: > On 2 December 2011 19:09, Mattias Gaertner wrote: > > > On Fri, 2 Dec 2011 18:59:25 + > > Frank Church wrote: > > > > > Is there a way of knowning the attribute count of a TDOMNode as well as > >

Re: [fpc-pascal] Testing applications with FPCUnit

2011-12-17 Thread Mattias Gaertner
On Sat, 17 Dec 2011 17:47:49 +0100 Felipe Monteiro de Carvalho wrote: > On Sat, Dec 17, 2011 at 5:03 PM, Luciano de Souza wrote: > > I can compile using callings like: > > fpc test.pas > > fpc -XX test.pas > > fpc test.pas -Fu./pas -FE./exe > > You can compile Lazarus projects in the command li

[fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2011-12-18 Thread Mattias Gaertner
Hi, For some reason TFPHTTPClient.Post hangs when accessing a "solr" server over "tomcat". It works with "solr" over "jetty". "curl" works fine with both, so I guess the tomcat server works normally. Here is the code: client:=TFPHTTPClient.Create(nil); client.RequestHeaders.Add('Content-

Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2011-12-19 Thread Mattias Gaertner
On Mon, 19 Dec 2011 09:27:16 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Mon, 19 Dec 2011, Mattias Gaertner wrote: > > > Hi, > > > > For some reason TFPHTTPClient.Post hangs when accessing a "solr" > > server over "tomcat".

Re: [fpc-pascal] Forward declarations

2011-12-22 Thread Mattias Gaertner
On Thu, 22 Dec 2011 15:33:13 -0500 Timothy Groves wrote: > Can anyone think of a situation in which you would *have* to use forward > declared functions? I'm trying to come up with an example for such for > my book, and I am drawing a blank. Traverse a html tree. For example with div and p no

Re: [fpc-pascal] Re: Installing FPC 2.5.1 in Mac OS X

2012-01-05 Thread Mattias Gaertner
On Thu, 5 Jan 2012 15:53:19 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Vincent Snijders said: > > > Well, aside from installing different compilers in different prefixes > > > (what > > > I usually do), yes. > > > > > > I would file a bug, and see how Laz d

Re: [fpc-pascal] Re: Help!!

2012-01-15 Thread Mattias Gaertner
On Sun, 15 Jan 2012 05:58:21 -0800 (PST) Malvin wrote: > So far i've managed to do the program quite well, and I was wondering, can > i close the main form (form1) whils opening form2 and not closing the app? > Is there any way that I can do it? If you mean LCL forms: The MainForm can not be clo

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Mattias Gaertner
Andreas Schneider hat am 17. Januar 2012 um 11:23 geschrieben: > On Sunday, January 15, 2012, at 15:04 Mattias Gaertner wrote: > > On Sun, 15 Jan 2012 05:58:21 -0800 (PST) > > Malvin wrote: > > >> So far i've managed to do the program quite well, and I was wond

[fpc-pascal] MySQL5

2012-01-17 Thread Mattias Gaertner
Hi, I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. There are only examples for 3 and 4, so I started with testdb4.pp and adapted it. It turned out that the MYSQL record is missing some new fields, so the mysql_init overwrites the memory behind. After adding some dummy by

Re: [fpc-pascal] MySQL5

2012-01-17 Thread Mattias Gaertner
michael.vancann...@wisa.be hat am 17. Januar 2012 um 13:28 geschrieben: > > > On Tue, 17 Jan 2012, Mattias Gaertner wrote: > > > Hi, > > > > I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. > > There are only examples for 3 and

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread Mattias Gaertner
Felipe Monteiro de Carvalho hat am 17. Januar 2012 um 13:59 geschrieben: > On Tue, Jan 17, 2012 at 1:40 PM, David Copeland > wrote: > > I had not thought that approach (a non-visual lcl program) to be > > possible, but I will try it. Would I use the Nogui widgetset? > > No, it doesn't implement

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Mattias Gaertner
Andreas Schneider hat am 17. Januar 2012 um 16:08 geschrieben: > On Tuesday, January 17, 2012, at 13:15 Felipe Monteiro de Carvalho wrote: > > If the use case is closing the main form without quitting the > > application, then I would prefer a property > > TApplication.QuitApplicationWhenMainFor

Re: [fpc-pascal] Best practice for getting heap usage summary

2012-01-19 Thread Mattias Gaertner
On Thu, 19 Jan 2012 09:06:46 + Mark Morgan Lloyd wrote: > What is considered "best practice" for getting a summary of heap usage, > in a single-threaded program which doesn't need to be Delphi-compatible? > > In Delphi programs that have had to run for an extended period I've used > Allo

[fpc-pascal] Options -WG -WC -WF -WT

2012-01-29 Thread Mattias Gaertner
Hi, According to fpc -h (2.7.1): Option -WG creates graphic type application (EMX, OS/2, Windows). Option -WC creates console type application (EMX, OS/2, Windows). fpc -h (2.6.1) knows also: Option -WF creates full screen type application (EMX, OS/2) And the "user" documentation knows one more

Re: [fpc-pascal] Options -WG -WC -WF -WT

2012-01-29 Thread Mattias Gaertner
On Sun, 29 Jan 2012 18:03:56 +0100 Sven Barth wrote: > On 29.01.2012 17:04, Mattias Gaertner wrote: > > Hi, > > > > According to fpc -h (2.7.1): > > > > Option -WG creates graphic type application (EMX, OS/2, Windows). > > Option -WC creates conso

Re: [fpc-pascal] Options -WG -WC -WF -WT

2012-01-29 Thread Mattias Gaertner
On Sun, 29 Jan 2012 20:13:36 +0100 Sven Barth wrote: >[...] > >> -WF = {$apptype fs}: Fullscreen application on EMX and OS/2 > > > > For 2.7.1 too? > > The option is missing in the ppcx64 -h help. > > I took this knowledge from the compiler's source directly, so yes. > >[...] > > The "obscure l

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Mattias Gaertner
On Thu, 2 Feb 2012 00:03:15 +0200 Graeme Geldenhuys wrote: > Hi, > > What am I doing wrong in the following code? It always fails on test > number 2. The DataString property is returning garbage, and not the > value equal to the 'Graeme Geldenhuys' string. > > > ---

[fpc-pascal] make rpm

2012-02-02 Thread Mattias Gaertner
Hi, When doing "make rpm NOGDB=1 NODOCS=1" in fpcbuild/trunk I get a lot of unpackaged files under OpenSuse 12.1. In other words: it fails to build. Are there some docs about it? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

[fpc-pascal] How to use pam?

2012-02-06 Thread Mattias Gaertner
Hi, I need to authenticate user name and password under Linux. These are normal accounts so I guess "libpam" is the weapon of choice. But I can't find any pam binding in the FPC sources. Is there a better way or has really no one yet used pam with fpc? thanks, Mattias

Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work

2012-02-06 Thread Mattias Gaertner
On Mon, 06 Feb 2012 18:14:03 +0100 Reinier Olislagers wrote: >[...] > - On Unix/Linux, directories starting with ~ are considered relative > (but where should that be put...) Only in shells the tilde has the special meaning. Linux (the kernel) does not treat tilde special. Mattias _

Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2012-02-06 Thread Mattias Gaertner
On Mon, 19 Dec 2011 10:39:09 +0100 (CET) michael.vancann...@wisa.be wrote: >[...] > What does 'strace' say ? Same happens on fpc wiki: Here is the strace: sendto(3, "GET /index.php?title=Special:Exp"..., 135, 0, NULL, 0) = 135 recvfrom(3, "HTTP/1.1 200 OK\r\nDate: Tue, 07 F"..., 4096, 0, NULL,

Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2012-02-06 Thread Mattias Gaertner
On Tue, 7 Feb 2012 01:47:52 +0100 Mattias Gaertner wrote: > On Mon, 19 Dec 2011 10:39:09 +0100 (CET) > michael.vancann...@wisa.be wrote: > > >[...] > > What does 'strace' say ? > > Same happens on fpc wiki: uses Classes, SysUtils, fphttpclient; ... va

Re: [fpc-pascal] FPCDocs: diff: saving fpdoc gives huge diff

2012-02-08 Thread Mattias Gaertner
On Wed, 8 Feb 2012 09:26:10 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Wed, 8 Feb 2012, Reinier Olislagers wrote: > > > fpdocs Revision 889 > > svn revert --recursive . > > Open FPDocEditor on ExpandFileName, type a space somewhere, click Save > > icon. (Space seems to be automatica

Re: [fpc-pascal] FPCDocs: diff: saving fpdoc gives huge diff

2012-02-08 Thread Mattias Gaertner
On Wed, 8 Feb 2012 11:43:19 +0200 Graeme Geldenhuys wrote: > On 8 February 2012 10:44, Mattias Gaertner wrote: > > > > Yes, but without any indentation it is hard to read. > > Indentation (whitespace), which is purely for human enjoyment, causes > problems in some of

Re: [fpc-pascal] FPCDocs: diff: saving fpdoc gives huge diff

2012-02-08 Thread Mattias Gaertner
On Wed, 8 Feb 2012 16:03:05 +0100 Mattias Gaertner wrote: >[...] > Of course it would be nicer if the used xml readers/writers can be told > to keep the spaces. Especially for version control systems. > I will take a look. The xml reader/writer used by the fpdoc editor now

Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2012-02-08 Thread Mattias Gaertner
On Tue, 7 Feb 2012 10:33:04 +0100 Rainer Stratmann wrote: > Am Monday 19 December 2011 01:22:18 schrieb Mattias Gaertner: > > Hi, > > > > For some reason TFPHTTPClient.Post hangs when accessing a "solr" > > server over "tomcat". It works with "

Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2012-02-09 Thread Mattias Gaertner
On Thu, 9 Feb 2012 09:43:55 +0100 (CET) Michael Van Canneyt wrote: > > > On Thu, 9 Feb 2012, Mattias Gaertner wrote: > > > On Tue, 7 Feb 2012 10:33:04 +0100 > > Rainer Stratmann wrote: > > >[...] > >> If you have no content-length then mostly in the

Re: [fpc-pascal] Re: RE : Re: RE : FPCUp FPC/Lazarus installer/updater: first Linux/Windows version released

2012-02-11 Thread Mattias Gaertner
Reinier Olislagers hat am 11. Februar 2012 um 08:28 geschrieben: > On 10-2-2012 18:23, Ludo Brands wrote: > >>> - (I hesitated to put this in the category "bugs") lazarus is > >>> configured to use (default on ubuntu) ~/fpc/bin/fpc. I have 2.4.4 > >>> installed with a /etc/fpc.cfg and ~/fpc/bin/

[fpc-pascal] fpdoc and tab characters

2012-02-13 Thread Mattias Gaertner
Hi, How are tab characters handled by fpdoc and its output formats? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] make clean / distclean leaves some ppu files

2012-02-15 Thread Mattias Gaertner
Hi, It seems make clean leaves ppu files behind: For example: ./packages/fpmkunit/units_bs/x86_64-linux/zbase.ppu Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] fphttpclient get an url with colon

2012-02-16 Thread Mattias Gaertner
Hi, When I use TFPHTTPClient to fetch a page with a colon in the file name it appends a slash "/". For example: Client:=TFPHTTPClient.Create(nil); Response:=TMemoryStream.Create; Client.Get('http://wiki.lazarus.freepascal.org/Image:Acs_demos.jpg',Response); It fetches "/Image:Acs_demos.jpg

Re: [fpc-pascal] fphttpclient get an url with colon

2012-02-17 Thread Mattias Gaertner
On Fri, 17 Feb 2012 21:20:29 +0200 Alberto Narduzzi wrote: > The fact it appends a slash at the end is probably because it thinks > it's a path... > > But, just out of curiosity... isn't it a malformed *http* url if it > contains a colon? I doubt that mediawiki uses malformed urls. And any br

Re: [fpc-pascal] fphttpclient get an url with colon

2012-02-17 Thread Mattias Gaertner
On Fri, 17 Feb 2012 22:03:25 +0200 Alberto Narduzzi wrote: > > I doubt that mediawiki uses malformed urls. > > And any browser and http client uses it without warning. > > as I said, it was out of curiosity. > > Googling around anyway, shows that there are some special characters out > there (

Re: [fpc-pascal] fphttpclient get an url with colon

2012-02-17 Thread Mattias Gaertner
On Fri, 17 Feb 2012 22:03:25 +0200 Alberto Narduzzi wrote: >[...] > Anyway, "http://wiki.lazarus.freepascal.org?Image=Acs_demos.jpg"; is not > that ugly. Probably it's not so sophisticated, but can do the very same job. No. This does not work with mediawiki. Mattias ___

Re: [fpc-pascal] Re: RE : Re: RE : FPCUp FPC/Lazarusinstaller/updater: first Linux/Windows version released

2012-02-18 Thread Mattias Gaertner
On Sat, 18 Feb 2012 16:14:58 +0100 "Ludo Brands" wrote: > > > > You can use the "-Xp" option to specify a path for FPC to > > search for the > > ppc* binaries. > > > > E.g. > > > > #!/bin/sh > > ~/whereever/we/installed/fpc -n @~/whereever/we/installed/fpc.cfg > > -Xp~/whereever/we/installe

Re: [fpc-pascal] Easy way to install FPC 2.6.x on Mint Linux?

2012-02-20 Thread Mattias Gaertner
On Mon, 20 Feb 2012 16:03:02 +0200 Juha Manninen wrote: > 2012/2/20, Ludo Brands : > > I retract my proposal :) If you haven't installed from a foreign > > distribution repository before then there are too many risks for messing up > > your complete installation. You asked for an easy way: this i

[fpc-pascal] How create a full text search with TChmWriter?

2012-02-20 Thread Mattias Gaertner
Hi, I'm using TChmWriter to pack some html files into a chm file. The index works. I don't have a TOC. Now I want a full text search. I set Writer.FullTextSearch to true, it takes a long time to process and the resulting chm is 30% bigger than the total of all files. So I guess it has created som

<    1   2   3   4   5   6   7   8   9   10   >