TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Wankadia
from: andrew clarke
date: 1996-11-12 18:14:10
subject: Auto string-length deter

24 Oct 96 20:06, Paul Wankadia wrote to Adam Fitzpatrick:

 > Yep.  Borland seems to have MK_FP and stuff like that.

I use the following header file in the VidMgr source code.  The MK_FP macro
below is compatible with at least half a dozen DOS compilers.

#ifndef FAR
#if defined(__POWERC) || (defined(__TURBOC__) && !defined(__BORLANDC__)) || \
  (defined(__ZTC__) && !defined(__SC__))
#define FAR far
#else
#if defined(__MSDOS__) || defined(MSDOS) || defined(DOS)
#define FAR _far
#else
#define FAR
#endif
#endif
#endif

#ifndef MK_FP
#define MK_FP(seg, off) \
  ((void FAR *)(((unsigned long)(seg) << 16) | (unsigned)(off)))
#endif

Regards
Andrew

-- randy{at}zws.com

--- Msged/2 4.00

* Origin: Blizzard of Ozz, Melbourne, Australia (3:635/728.4{at}fidonet)
SEEN-BY: 633/267 270
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.