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

Jeff Pohlmeyer yetanothergeek at gmail.com
Mon Sep 25 22:40:20 CEST 2006


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]^.content_type:='hw-app';
  hw_handlers[0]^.handler:=@hw_handle_req;
  hw_handlers[1]:=nil;
end.


 - Jeff



More information about the fpc-pascal mailing list