From 46df83483bca72b9da1ff4515c266197a94b3dc6 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 13 Apr 2004 11:02:36 +0000 Subject: [PATCH] Make unnecessary far pointers near. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@870 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/memmgr.c | 5 ++--- kernel/proto.h | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/memmgr.c b/kernel/memmgr.c index 7b6670c..00bbc80 100644 --- a/kernel/memmgr.c +++ b/kernel/memmgr.c @@ -112,8 +112,7 @@ void FAR * adjust_far(const void FAR * fp) size is the minimum size of the block to search for, even if mode == LARGEST. */ -COUNT DosMemAlloc(UWORD size, COUNT mode, seg FAR * para, - UWORD FAR * asize) +COUNT DosMemAlloc(UWORD size, COUNT mode, seg *para, UWORD *asize) { REG mcb FAR *p; mcb FAR *foundSeg; @@ -265,7 +264,7 @@ stopIt: /* reached from FIRST_FIT on match */ * Known bug: a memory area with a size of the data area of 0 (zero) is * not considered a "largest" block. <> */ -COUNT DosMemLargest(UWORD FAR * size) +COUNT DosMemLargest(UWORD *size) { seg dummy; *size = 0; diff --git a/kernel/proto.h b/kernel/proto.h index baee0d1..cbd2ff1 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -241,14 +241,13 @@ seg far2para(VOID FAR * p); seg long2para(ULONG size); void FAR *add_far(void FAR * fp, unsigned off); VOID FAR *adjust_far(const void FAR * fp); -COUNT DosMemAlloc(UWORD size, COUNT mode, seg FAR * para, - UWORD FAR * asize); -COUNT DosMemLargest(UWORD FAR * size); +COUNT DosMemAlloc(UWORD size, COUNT mode, seg * para, UWORD * asize); +COUNT DosMemLargest(UWORD * size); COUNT DosMemFree(UWORD para); COUNT DosMemChange(UWORD para, UWORD size, UWORD * maxSize); COUNT DosMemCheck(void); COUNT FreeProcessMem(UWORD ps); -COUNT DosGetLargestBlock(UWORD FAR * block); +COUNT DosGetLargestBlock(UWORD * block); VOID show_chain(void); VOID DosUmbLink(BYTE n); VOID mcb_print(mcb FAR * mcbp); @@ -257,7 +256,7 @@ VOID mcb_print(mcb FAR * mcbp); COUNT lfn_allocate_inode(VOID); COUNT lfn_free_inode(COUNT handle); -COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, ULONG diroff); +COUNT lfn_setup_inode(COUNT handle, ULONG dirstart, UWORD diroff); COUNT lfn_create_entries(COUNT handle, lfn_inode_ptr lip); COUNT lfn_remove_entries(COUNT handle);