Re: [fpc-pascal] Where does Write(Ln) actually write to?

2009-05-13 Thread Tomas Hajny
On Wed, May 13, 2009 07:07, leledumbo wrote:

 It works... but only for the first call, after that IOResult gives 103.
 Does
 rtl closes stdout handle after every write or what?

No, certainly not. As suggested yesterday, you need to implement some of
the other Do_* functions, at least Do_Open, otherwise some of the fields
in the TextRec/FileRec are not initialized properly (e.g. the input/output
mode). Just have a look at one of the existing implementations.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] PostgreSQL server side functions with FPC

2009-05-13 Thread fpclist
Does anyone have experience in developing PostgreSQL server side functions 
using fpc?  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to use OpenGL 2.0 features

2009-05-13 Thread dmitry boyarintsev
 OpenGL 3.x also deprecates many OpenGL 1.1 functions (for example immediate 
 mode). OpenGL 1.1 is not loaded (as there is no need even on windows) so how 
 does the 'flexibility' help us there?

Binding flexibility is required, if application is to be distributed.
There's no way to say, what kind of OpenGL drivers is installed on the
next machine.

for example, an application uses some 2.0 features (that're available
in earlier gl versions as some extensions)
The application will run fine with OpenGL 2.0 drives installed, but if
there's older drivers it will probably fail.

The most robust code is the following:

if not Load_SomeFunc_asCore and
   not Load_SomeFunc_asExtension then begin
  writeln('Please, update OpenGL drivers');
  Halt;
end;

I know, it's easy, to say: My application requirement is GL 2.0 or
higher, but, personally, i prefer to care about the user, rather
making him/her to install latests drivers.

thanks,
dmitry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Daemon question

2009-05-13 Thread Koenraad Lelong
Hi,
I wrote a daemon monitoring my solar powerstation. It works fine but I
want to extend it.
At the moment I log everything to file, and I put some data into rrdtool.
I would like to be able to ask the daemon some information, but I don't
know how to do this.
I made some signals : sigterm to terminate gracefully, sighup to
restart, sigusr0 to get the uptime and sigusr1 to get some device-info.
Except, sigusr0 and sigusr1 use writeln's to output the data which I
never see when I ask for them (kill -10 processid). Where do these
writeln's write to ? Sigterm and sighup do work fine, so I think my
handler is OK.
How can I get that info ? It should be software-independent, because I
would like to use php to get that information.
I thought of writing the info to a file, but that info is updated every
15 seconds. I think it's not good to write a new file every time.
Now I'm writing this, I could write to a file after receiving a signal,
and then reading this with php.
Thinking about it, does php support sending signals ? Back to the books.

Before you ask, I'm running Linux.

Thanks for any pointers,
Koenraad Lelong.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Link libglx library.

2009-05-13 Thread Guillermo Martínez Jiménez
Hello.

I'm working on a project that needs the GLX library. It compiles but
when running it returns that error:

./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
symbol: glXQueryExtension

In other forum a colleague suggest that it doesn't links with the
libglx.so . I'm trying to force it using the command line but it
returns that error on compiling time:

fpc -02 -Sh -kglx examples/agl/exbasic.pp -oexamples/agl/exbasic
...
Target OS: Linux for i386
Compiling examples/agl/exbasic.pp
Linking examples/agl/exbasic
/usr/bin/ld: glx: No such file: No such file or directory

How should I do it?

Guillermo Ñuño Martínez
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Link libglx library.

2009-05-13 Thread Guillermo Martínez Jiménez
Hello.

I'm working on a project that needs the GLX library. It compiles but
when running it returns that error:

./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
symbol: glXQueryExtension

In other forum a colleague suggest that it doesn't links with the
libglx.so . I'm trying to force it using the command line but it
returns that error on compiling time:
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Sourceforge Lazarus DEB Fails on Ubuntu Hardy Heron

2009-05-13 Thread Prince Riley
The current .DEB lazarus-ide_0.9.26.2-0_i386.deb available from  the
Sourceforge repository reports a dependency error when I attempt to run it
on Ubuntu 8.04. The error reads, Error: Dependency is not satisfiable:
libxi6

What makes this vexing is the installer reports a dependency error when in
fact I checked the Ubuntu install with Synaptic and it reports that libxi6
is present and up to date.

Can anyone explain why the .DEB package is reporting a missing library when
that library is present on the Ubuntu system? Is this a version issue? Can I
just force the files onto the system and ignore this error. It appears to
be  a problem with the deb package and not the file it says is missing.




 ---
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal