Re: [fpc-pascal] RE: Problem translating c code to pascal

2006-09-30 Thread Marc Santhoff
Am Samstag, den 30.09.2006, 11:48 -0300 schrieb Felipe Monteiro de Carvalho: > Ok, after a lot of headaches and making questions on ##c freenode > channel I found out what that is. > > The structure is a NULL-terminated array / table. It was declared like this: > > static const handler_rec hw_han

Re: [fpc-pascal] RE: Problem translating c code to pascal

2006-09-30 Thread Felipe Monteiro de Carvalho
Ok, after a lot of headaches and making questions on ##c freenode channel I found out what that is. The structure is a NULL-terminated array / table. It was declared like this: static const handler_rec hw_handlers[] = { { "hw-app", hw_handle_req }, { NULL } }; But that is just the short d

[fpc-pascal] RE: Problem translating c code to pascal

2006-09-25 Thread Jeff Pohlmeyer
Maybe you can create the array dynamically at run-time, in the unit's initialization section... type p_handler_rec=^handler_rec; pp_handler_rec=^p_handler_rec; var hw_handlers:pp_handler_rec; initialization hw_handlers:=getmem(sizeof(p_handler_rec)*2); new(hw_handlers[0]); hw_handlers[0]^