[fpc-pascal] re-opening stdout and sdterr

2008-11-12 Thread Marc Santhoff
Hi, long time ago I had problems with stdxxx being in non-blocking i/o mode. The suggestion was to close and re-open the channels from the system units init code. I ran into this problem again and would like to know: How can I close and reopen stderr and sdtout from my program? I want to have s

Re: [fpc-pascal] dynamic arrays behaving funny

2008-11-12 Thread Jonas Maebe
On 12 Nov 2008, at 22:46, Marc Santhoff wrote: Am Mittwoch, den 12.11.2008, 22:30 +0100 schrieb Jonas Maebe: On 12 Nov 2008, at 21:53, Marc Santhoff wrote: Getmem allocates memory, but does not perform any initialisation. Use new() for record types containing fields that must be initialised

Re: [fpc-pascal] dynamic arrays behaving funny

2008-11-12 Thread Marc Santhoff
Am Mittwoch, den 12.11.2008, 22:30 +0100 schrieb Jonas Maebe: > On 12 Nov 2008, at 21:53, Marc Santhoff wrote: > > > constructor TTableDescriptor.create; > > begin > > inherited create; > > GetMem(fInfo, sizeof(TTableInfo)); > > Getmem allocates memory, but does not perform any initialisation.

Re: [fpc-pascal] dynamic arrays behaving funny

2008-11-12 Thread Jonas Maebe
On 12 Nov 2008, at 21:53, Marc Santhoff wrote: constructor TTableDescriptor.create; begin inherited create; GetMem(fInfo, sizeof(TTableInfo)); Getmem allocates memory, but does not perform any initialisation. Use new() for record types containing fields that must be initialised (such as

Re: Re[2]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Marc Santhoff
Am Mittwoch, den 12.11.2008, 22:55 +0200 schrieb KES: > Здравствуйте, Marc. > > Вы писали 12 ноября 2008 г., 22:13:32: > > MS> Another observation: > > MS> In any case you get the error message: > > >> function FNTEST2 is not defined > >> module name or entrypoint could not be found > > MS> If

[fpc-pascal] dynamic arrays behaving funny

2008-11-12 Thread Marc Santhoff
Hi, I'm trying to assing dynamic array variables to a record type on the heap and handing that record over to the caller: type TCompoundInfo = record Id: hid_t; Name: string; TotalSize: longword; ElementNames: array of PChar;

Re[2]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread KES
Здравствуйте, Marc. Вы писали 12 ноября 2008 г., 22:13:32: MS> Another observation: MS> In any case you get the error message: >> function FNTEST2 is not defined >> module name or entrypoint could not be found MS> If the function name is there and written correctly, make sure the MS> module (=

Re: Re[4]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Marc Santhoff
Am Mittwoch, den 12.11.2008, 21:40 +0200 schrieb KES: > Здравствуйте, Marc. > > Вы писали 12 ноября 2008 г., 21:20:23: > > MS> Am Mittwoch, den 12.11.2008, 20:00 +0100 schrieb Marc Santhoff: > >> Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: > >> > I have tryed in C: > >> > > >> > extern

Re: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Marc Santhoff
Another observation: In any case you get the error message: > function FNTEST2 is not defined > module name or entrypoint could not be found If the function name is there and written correctly, make sure the module (= your library) is found. I'm not used to making UDFs, but somehow the search pa

Re[4]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread KES
Здравствуйте, Marc. Вы писали 12 ноября 2008 г., 21:20:23: MS> Am Mittwoch, den 12.11.2008, 20:00 +0100 schrieb Marc Santhoff: >> Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: >> > I have tryed in C: >> > >> > extern int fntest(); >> > >> > int fntest() >> > { >> > return 8; >> > } >> >

Re[4]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread KES
Здравствуйте, Marc. Вы писали 12 ноября 2008 г., 21:20:23: MS> Am Mittwoch, den 12.11.2008, 20:00 +0100 schrieb Marc Santhoff: >> Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: >> > I have tryed in C: >> > >> > extern int fntest(); >> > >> > int fntest() >> > { >> > return 8; >> > } >> >

Re: Re[2]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Marc Santhoff
Am Mittwoch, den 12.11.2008, 20:00 +0100 schrieb Marc Santhoff: > Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: > > I have tryed in C: > > > > extern int fntest(); > > > > int fntest() > > { > > return 8; > > } > > > > this work, but fpc does not ((( > > Maybe looking at the .o with nm

Re: Re[2]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Marc Santhoff
Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: > I have tryed in C: > > extern int fntest(); > > int fntest() > { > return 8; > } > > this work, but fpc does not ((( Maybe looking at the .o with nm helps to show you how the function name is mangled. Or use "fpc -s ..." and "gcc -S -fver

Re[2]: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread KES
Здравствуйте, Jon. No, I just trying to write UDF in FPC on FreeBSD platform. this is my first try, there is no any 'uses'; I have tryed in C: extern int fntest(); int fntest() { return 8; } this work, but fpc does not ((( I need fpc because of I have many functions in delphi on Win32 platform

Re: [fpc-pascal] Web-Server not available

2008-11-12 Thread Dainius Sakalinskas
Hi, for me (Lithuania/Europe) all works. [EMAIL PROTECTED] ~]$ ping -c 10 -q www.freepascal.org PING www.freepascal.org (62.166.198.202) 56(84) bytes of data. --- www.freepascal.org ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9036ms rtt min/avg/max/mdev = 203.87

Re: [fpc-pascal] UDF+FREEBSD+FIREBIRD

2008-11-12 Thread Jon
Should there be a 'uses' line somewhere? > > library tkes2; > > {$mode objfpc} > {$PACKRECORDS C} > > > function somefn: integer; cdecl; export; > begin > somefn:= 3; > end; > > exports > //I do not do as: > // somefn name 'somefn'; // because of this cause > error tkes2(17,1) Error: Asm: