Changeset 9667 for trunk/src/kernel32/oslibmisc.cpp
- Timestamp:
- Jan 13, 2003, 5:51:40 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibmisc.cpp
r9582 r9667 1 /* $Id: oslibmisc.cpp,v 1.1 4 2003-01-02 11:50:46sandervl Exp $ */1 /* $Id: oslibmisc.cpp,v 1.15 2003-01-13 16:51:39 sandervl Exp $ */ 2 2 /* 3 3 * Misc OS/2 util. procedures … … 135 135 ULONG OSLibAllocSel(ULONG size, USHORT *selector) 136 136 { 137 #if 1 138 PVOID pSelMem; 139 ULONG sel; 140 APIRET rc; 141 142 rc = DosAllocMem(&pSelMem, size, PAG_COMMIT|PAG_READ|PAG_WRITE|OBJ_TILE); 143 if(rc != NO_ERROR) { 144 dprintf(("OSLibAllocSel: DosAllocMem failed with %d", rc)); 145 DebugInt3(); 146 return FALSE; 147 } 148 *selector = (DosFlatToSel((ULONG)pSelMem) >> 16); 149 return *selector != 0; 150 #else 137 151 return (Dos16AllocSeg(size, selector, SEG_NONSHARED) == 0); 152 #endif 138 153 } 139 154 //****************************************************************************** … … 142 157 ULONG OSLibFreeSel(USHORT selector) 143 158 { 159 #if 1 160 PVOID pSelMem; 161 APIRET rc; 162 163 pSelMem = (PVOID)((ULONG)selector * 64*1024); 164 rc = DosFreeMem(pSelMem); 165 return rc == NO_ERROR; 166 #else 144 167 return (Dos16FreeSeg(selector) == 0); 168 #endif 145 169 } 146 170 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.