Converted nxtMCBsize back to a macro. There is no need to use far2para;
FP_SEG works fine since MCBs always have offset 0. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@875 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
e9716d990d
commit
c899541e2e
@ -34,14 +34,7 @@ static BYTE *memmgrRcsId =
|
||||
"$Id$";
|
||||
#endif
|
||||
|
||||
/*#define nxtMCBsize(mcb,size) \
|
||||
MK_FP(far2para((VOID FAR *) (mcb)) + (size) + 1, 0) */
|
||||
|
||||
void FAR *nxtMCBsize(mcb FAR * Mcb, int size)
|
||||
{
|
||||
return MK_FP(far2para((VOID FAR *) (Mcb)) + (size) + 1, 0);
|
||||
}
|
||||
|
||||
#define nxtMCBsize(mcb,size) MK_FP(FP_SEG(mcb) + (size) + 1, 0)
|
||||
#define nxtMCB(mcb) nxtMCBsize((mcb), (mcb)->m_size)
|
||||
|
||||
#define mcbFree(mcb) ((mcb)->m_psp == FREE_PSP)
|
||||
@ -75,11 +68,6 @@ STATIC COUNT joinMCBs(mcb FAR * p)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
seg far2para(VOID FAR * p)
|
||||
{
|
||||
return FP_SEG(p) + (FP_OFF(p) >> 4);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a normalized far pointer
|
||||
*/
|
||||
@ -252,7 +240,7 @@ stopIt: /* reached from FIRST_FIT on match */
|
||||
foundSeg->m_psp = cu_psp; /* the new block is for current process */
|
||||
foundSeg->m_name[0] = '\0';
|
||||
|
||||
*para = far2para((VOID FAR *) (BYTE FAR *) foundSeg);
|
||||
*para = FP_SEG(foundSeg);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user