C to D, HtoD fails

BCS none at nowher.not
Fri Sep 8 19:54:03 PDT 2006


== Quote from BLS (nanali at wanadoo.fr)'s article
> Hi folks,
> due to my very limited C(pp) knowledge I would like to know how to
> translate :
> typedef DWORD PCTXHF;
> typedef PCTXHF far * PPCTXHF;
> into D.
> Unfortunately HtoD seems to have some problems with : far *

Far is an old hack (part of the standard but ugly as watever) to allow a 16 bit
computer to access a 32bit address space without wasting lots of time. What was
done is to use a 16bit "section" address for the upper half of the address. then
all htta is need is a 16bit pointer for the lower half. This is called a near
pointer and avoids the need to load the whole thing each time. A far pointer use
when that isn't good enough. It is just a full 32bit pointer.

You should be able to ignore it. If you find a near pointer... you will have problems.



More information about the Digitalmars-d-learn mailing list