[fpc-pascal] Designing socket agnostic library

2011-05-09 Thread ik
Hello, This question is a bit off topic, but not completely. I decided to create my own SIP (and other VoIP) library that is open source (Dual license of both Mozilla and GPL). I want that the only thing that the library will do is to have implementation of the VoIP protocols such as SIP, RTP etc.

Re: [fpc-pascal] FPC 2.4.2 source

2011-05-09 Thread Jonas Maebe
On 10 May 2011, at 00:14, Juha (gmail) wrote: > Maybe I am stupid but I don't know how to download FPC 2.4.2 sources, without > using SVN repository. http://www.freepascal.org/download.var -> Source (under the links to the Binaries) Jonas___ fpc-pa

[fpc-pascal] FPC 2.4.2 source

2011-05-09 Thread Juha (gmail)
Hi Maybe I am stupid but I don't know how to download FPC 2.4.2 sources, without using SVN repository. I am testing on Windows and the default installation package does not contain sources. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Rainer Stratmann
Am Monday 09 May 2011 21:37:03 schrieb Jonas Maebe: > If people don't like a language (any language, not just one or other Pascal > dialect) and want to criticise it, they will always find bad things to say. > The FPC manual is not the place to get involved into such petty debates. I did not say o

Re: [fpc-pascal] What is the syntax for generating fpc.cfg from a new compiler stored at location xxxx with fpcmkcfg ?

2011-05-09 Thread Jonas Maebe
On 09 May 2011, at 21:43, Frank Church wrote: > It looks like it will be better if the samplecfg uses the fpcmkcfg created > with the new build. The intention for FPC trunk is to replace samplecfg with fpcmkcfg > Has it been updated since the 2005 date it was created? I'm not sure what you mea

[fpc-pascal] What is the syntax for generating fpc.cfg from a new compiler stored at location xxxx with fpcmkcfg ?

2011-05-09 Thread Frank Church
I am currently generating my fpc.cfg in the build script with this command mkdir -p ${FPC_SETTINGS_DIR} > ${FPC_INSTALL_DIR}/lib/fpc/${FPCVER}/samplecfg > ${FPC_INSTALL_DIR}/lib/fpc/${FPCVER} ${FPC_SETTINGS_DIR} > cp ${FPC_SETTINGS_DIR}/fpc.cfg ${HOMEDIR}/.fpc.cfg > based on (with some new modifi

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Jonas Maebe
On 09 May 2011, at 21:24, Rainer Stratmann wrote: > Am Monday 09 May 2011 21:17:17 schrieb Jonas Maebe: >> On 09 May 2011, at 21:14, Rainer Stratmann wrote: >>> I did not find it in the documentation. May be it can be added there. >>> >>> http://www.freepascal.org/docs-html/ref/refse10.html >>

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Rainer Stratmann
Am Monday 09 May 2011 21:17:17 schrieb Jonas Maebe: > On 09 May 2011, at 21:14, Rainer Stratmann wrote: > > Am Monday 09 May 2011 20:54:42 schrieb Jonas Maebe: > >> On 09 May 2011, at 20:48, Rainer Stratmann wrote: > >>> Is this possible like in C ? > >> > >> A typed constant declared inside a proc

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Jonas Maebe
On 09 May 2011, at 21:14, Rainer Stratmann wrote: > Am Monday 09 May 2011 20:54:42 schrieb Jonas Maebe: >> On 09 May 2011, at 20:48, Rainer Stratmann wrote: >>> Is this possible like in C ? >> >> A typed constant declared inside a procedure/function will behave like >> that. > Ah, thanks. Does D

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Rainer Stratmann
Am Monday 09 May 2011 20:54:42 schrieb Jonas Maebe: > On 09 May 2011, at 20:48, Rainer Stratmann wrote: > > Is this possible like in C ? > > A typed constant declared inside a procedure/function will behave like > that. Ah, thanks. Does Delphi also behave like this? I did not find it in the docume

Re: [fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Jonas Maebe
On 09 May 2011, at 20:48, Rainer Stratmann wrote: > Is this possible like in C ? A typed constant declared inside a procedure/function will behave like that. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.or

[fpc-pascal] Global static vars in a procedure or function

2011-05-09 Thread Rainer Stratmann
Is this possible like in C ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: RE : RE : RE : RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Henry Vermaak
On 09/05/11 12:04, Anton Shepelev wrote: Ludo Brands: If you need these handles from the child process use: InHnd:=GetStdHandle(STD_INPUT_HANDLE); OutHnd:=GetStdHandle(STD_OUTPUT_HANDLE); ErrHnd:=GetStdHandle(STD_ERROR_HANDLE); Thank you, that's what I need. By the way, it does work in a sim

RE : RE : RE : RE : RE : [fpc-pascal] Redirecting input to a childprocess

2011-05-09 Thread Ludo Brands
> It is interesting to note that even this code reads input only after Enter is > pressed. Sounds logical. Stdin from console supports line editing (BackSpace, arrows, F3, F1, ...). This can only be accomplished by buffering complete lines. Ludo -Message d'origine- De : fpc-pascal-b

Re: RE : RE : RE : RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Anton Shepelev
Ludo Brands: > If you need these handles from the child process use: > InHnd:=GetStdHandle(STD_INPUT_HANDLE); > OutHnd:=GetStdHandle(STD_OUTPUT_HANDLE); > ErrHnd:=GetStdHandle(STD_ERROR_HANDLE); Thank you, that's what I need. By the way, it does work in a simple single-process applica- tion:

[fpc-pascal] Re: Shootout: k-nucleotide implementation (was: Which programming language is fastest?)

2011-05-09 Thread Lukasz Sokol
On 09/05/2011 11:06, Lukasz Sokol wrote: > On 08/05/2011 21:25, Bernd wrote: >> Ok, I have looked at the example that was the slowest: 5 times slower than >> gcc. >> >> k-nucleitide: >> http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&lang=all >> >> The C++ code is giving me h

Re: RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Anton Shepelev
Ludo Brands: > You can file a bug at http://bugs.freepascal.org/ OK. > Dupicating handles isn't apparently the only solution. The > msdn sample creates non-inheritable pipes and hands these > handles simply over to createprocess, without duplicating. There are two solutions, but only of them

[fpc-pascal] Re: Shootout: k-nucleotide implementation (was: Which programming language is fastest?)

2011-05-09 Thread Lukasz Sokol
On 08/05/2011 21:25, Bernd wrote: > Ok, I have looked at the example that was the slowest: 5 times slower than > gcc. > > k-nucleitide: > http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&lang=all > > The C++ code is giving me headaches from only looking at it. I am > still n

RE : RE : RE : RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Ludo Brands
If you need these handles from the child process use: InHnd:=GetStdHandle(STD_INPUT_HANDLE); OutHnd:=GetStdHandle(STD_OUTPUT_HANDLE); ErrHnd:=GetStdHandle(STD_ERROR_HANDLE); Ludo -Message d'origine- De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.

RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Ludo Brands
> Yes. It works now. Great. > Does this mean that the Windows implementation of TProcess should be rewritten > using DuplicateHandle? You can file a bug at http://bugs.freepascal.org/ . Dupicating handles isn't apparently the only solution. The msdn sample creates non-inheritable pipes and

RE : RE : RE : [fpc-pascal] Redirecting input to a child process

2011-05-09 Thread Ludo Brands
Pipe handles can be used directly with readfile: Var BytesRead:Longword; windows.Readfile(mProcess.Output.Handle,str1[1],BytesAvailable,BytesRead,nil ); can replace mProcess.OutPut.Read(str1[1], BytesAvailable); Ludo -Message d'origine- De : fpc-pascal-boun...@lists.freepascal