From e321f10fae573978232cf66039f8180e49855eb2 Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Tue, 15 Mar 2005 15:25:08 +0000 Subject: [PATCH] from dev: add MK_PTR and MK_SEG_PTR macros git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1121 6ac86273-5f31-0410-b378-82cca8765d1b --- hdr/portab.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hdr/portab.h b/hdr/portab.h index 161ccf8..1b85b35 100644 --- a/hdr/portab.h +++ b/hdr/portab.h @@ -303,6 +303,14 @@ typedef signed long LONG; typedef VOID (FAR ASMCFUNC * intvec) (void); +#define MK_PTR(type,seg,ofs) ((type FAR*) MK_FP (seg, ofs)) +#if __TURBOC__ > 0x202 +# define MK_SEG_PTR(type,seg) ((type _seg*) (seg)) +#else +# define _seg FAR +# define MK_SEG_PTR(type,seg) MK_PTR (type, seg, 0) +#endif + /* this suppresses the warning unreferenced parameter 'x'