www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/09/15:46:46

Date: Wed, 9 Sep 1998 19:03:07 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John Burch <john2004 AT bga DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Porting code, FAR PASCAL type ???
In-Reply-To: <35ea2d5f.0@feed1.realtime.net>
Message-ID: <Pine.SUN.3.91.980909185831.2901J-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019