[fpc-pascal] More doubts on C to pascal header translations:

2011-04-24 Thread Paulo Costa
I saw that h2pas translated: typedef void(*callback)(int pos, void* userdata); to callback = procedure (pos:cint; var userdata:pointer);cdecl; shouldn't it be? callback = procedure (pos:cint; userdata:pointer);cdecl; Paulo Costa ___ fpc-pascal mail

Re: [fpc-pascal] FPImage and GetDataLineStart

2011-04-24 Thread Michael Van Canneyt
On Sun, 24 Apr 2011, Marco van de Voort wrote: In each case, I think I have an approach which should speed things up, and still sticks to the design principles of fpImage. The only design I see in fpimage is a general effort to try to support anything at once. Nevermind the costs. Not "nev

Re: [fpc-pascal] find return adress of a procedure/function

2011-04-24 Thread Sven Barth
On 24.04.2011 13:49, Rainer Stratmann wrote: Am Sunday 24 April 2011 12:45:50 schrieb Sven Barth: On 24.04.2011 12:14, Rainer Stratmann wrote: Am Sunday 24 April 2011 11:44:18 schrieb Rainer Stratmann: How to find the return adress of the calling code of a procedure/function? Where in the sta

Re: [fpc-pascal] nested macros in C headers

2011-04-24 Thread Bernd
2011/4/24 Paulo Costa : > the TSdpoVideo4L2 component has the V4L2 translated... Thanks. This is interesting. I saw this before but didn't look deeper into it after I read "UVC compliant USB cameras" in the wiki, this seemed to imply for me that it would only work with the subset of cameras that

Re: [fpc-pascal] A few doubts about C to pascal header translations:

2011-04-24 Thread Marco van de Voort
In our previous episode, Paulo Costa said: > I've come across some constructs that I'm not sure how to translate: > > A procedure where one of the arguments is declared as: > size_t arg; > > also a macro where appears: > sizeof(size_t) > > I replaced size_t by PtrUInt, is there a better alternat

[fpc-pascal] A few doubts about C to pascal header translations:

2011-04-24 Thread Paulo Costa
I've come across some constructs that I'm not sure how to translate: A procedure where one of the arguments is declared as: size_t arg; also a macro where appears: sizeof(size_t) I replaced size_t by PtrUInt, is there a better alternative? Paulo Costa

Re: [fpc-pascal] nested macros in C headers

2011-04-24 Thread Paulo Costa
On 24/04/2011 11:24, Bernd wrote: 2011/4/24 Sven Barth: Hi! I did convert the V4L2 headers some time ago, but did not publish them yet. If you want to, I can send you the Pascal file. I tested it with a radio tuner, so it should work mostly. This would surely be helpful. Please consider also

Re: [fpc-pascal] FPImage and GetDataLineStart

2011-04-24 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Ah, I don't considered those languages. At least not where any discussions > > about performance or efficiency apply ;_) > > The topic was the availability of generics. > In that field, all languages are viewed. If you say so. Anyway, while

Re: [fpc-pascal] find return adress of a procedure/function

2011-04-24 Thread Rainer Stratmann
Am Sunday 24 April 2011 12:45:50 schrieb Sven Barth: > On 24.04.2011 12:14, Rainer Stratmann wrote: > > Am Sunday 24 April 2011 11:44:18 schrieb Rainer Stratmann: > >> How to find the return adress of the calling code of a > >> procedure/function? > >> > >> Where in the stack is the information to

Re: [fpc-pascal] nested macros in C headers

2011-04-24 Thread Sven Barth
On 24.04.2011 12:24, Bernd wrote: 2011/4/24 Sven Barth: Hi! I did convert the V4L2 headers some time ago, but did not publish them yet. If you want to, I can send you the Pascal file. I tested it with a radio tuner, so it should work mostly. This would surely be helpful. Please consider also

Re: [fpc-pascal] find return adress of a procedure/function

2011-04-24 Thread Sven Barth
On 24.04.2011 12:14, Rainer Stratmann wrote: Am Sunday 24 April 2011 11:44:18 schrieb Rainer Stratmann: How to find the return adress of the calling code of a procedure/function? Where in the stack is the information to the return adress? stack + - x? asm mov eax , [ ebp + 4 ] end; eax i

Re: [fpc-pascal] nested macros in C headers

2011-04-24 Thread Bernd
2011/4/24 Sven Barth : > Hi! > > I did convert the V4L2 headers some time ago, but did not publish them yet. > If you want to, I can send you the Pascal file. I tested it with a radio > tuner, so it should work mostly. This would surely be helpful. Please consider also releasing them with an FPC c

Re: [fpc-pascal] find return adress of a procedure/function

2011-04-24 Thread Rainer Stratmann
Am Sunday 24 April 2011 11:44:18 schrieb Rainer Stratmann: > How to find the return adress of the calling code of a procedure/function? > > Where in the stack is the information to the return adress? > > stack + - x? asm mov eax , [ ebp + 4 ] end; eax is the return adress > How to acess to th

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

2011-04-24 Thread Michael Van Canneyt
On Sun, 24 Apr 2011, Mattias Gaertner wrote: 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 2011, Mattias Gaertner wrote: I wrote

[fpc-pascal] find return adress of a procedure/function

2011-04-24 Thread Rainer Stratmann
How to find the return adress of the calling code of a procedure/function? Where in the stack is the information to the return adress? stack + - x? How to acess to the information in assembler? Is it in every processor architecture possible, for example ARM? (actually 80x86). Is it different in

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 2011, Mattias Gaertner wrote: > >> > >>> I wrote a little to

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

2011-04-24 Thread Michael Van Canneyt
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 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 the utils ? A

Re: [fpc-pascal] nested macros in C headers

2011-04-24 Thread Sven Barth
Hi! I did convert the V4L2 headers some time ago, but did not publish them yet. If you want to, I can send you the Pascal file. I tested it with a radio tuner, so it should work mostly. Regards, Sven On 23.04.2011 22:50, Bernd wrote: Hi, I found this: http://pastebin.com/T4jkeE6F in a zi