Mail Archives: djgpp/1998/09/09/15:46:46
On Mon, 31 Aug 1998, John Burch wrote:
> typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR,
> LPVOID);
>
> I believe the FAR can be thrown away, but what do I do with the PASCAL ?
If you are porting the entire code, including the functions that are
defined using this typedef, and the code that calls those functions, then
you can throw away PASCAL as well.
PASCAL means that the arguments to functions (the above is a typedef of a
pointer to a function) are passed the Pascal way (in a reverse order),
and that the called function pops the stack. This only makes sense when
you are interfacing to a library that wasn't written in C, or used the
Pascal calling conventions as well. GCC has a keyword for that as well
(stdcall), but I don't think you'll need it.
- Raw text -