Changeset 10606 for trunk/src/kernel32/oslibmisc.cpp
- Timestamp:
- May 24, 2004, 10:56:07 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibmisc.cpp
r9890 r10606 1 /* $Id: oslibmisc.cpp,v 1.1 8 2003-03-03 16:38:20sandervl Exp $ */1 /* $Id: oslibmisc.cpp,v 1.19 2004-05-24 08:56:07 sandervl Exp $ */ 2 2 /* 3 3 * Misc OS/2 util. procedures … … 17 17 #define INCL_DOSSEL 18 18 #define INCL_DOSNLS /* National Language Support values */ 19 #include <os2wrap.h> 19 #include <os2wrap.h> //Odin32 OS/2 api wrappers 20 20 #include <string.h> 21 21 #include <stdlib.h> … … 24 24 #include "oslibmisc.h" 25 25 #include <misc.h> 26 27 #define DBG_LOCALLOG DBG_oslibmisc 26 #include <heapstring.h> 27 28 #define DBG_LOCALLOG DBG_oslibmisc 28 29 #include "dbglocal.h" 29 30 31 typedef APIRET ( APIENTRY *PFN_IMSETMSGQUEUEPROPERTY )( HMQ, ULONG ); 32 33 PFN_IMSETMSGQUEUEPROPERTY pfnImSetMsgQueueProperty = NULL; 34 30 35 //****************************************************************************** 31 36 //TODO: not reentrant! … … 36 41 37 42 if(DosQueryModuleName(hModule, CCHMAXPATH, modname) != 0) { 38 43 return NULL; 39 44 } 40 45 return(modname); … … 187 192 rc = DosGetInfoBlocks(&ptib, &ppib); 188 193 if(rc) { 189 194 return 0; 190 195 } 191 196 switch(tiboff) 192 197 { 193 194 195 196 197 198 198 case TIB_STACKTOP: 199 return (ULONG)ptib->tib_pstacklimit; 200 case TIB_STACKLOW: 201 return (ULONG)ptib->tib_pstack; 202 default: 203 return 0; 199 204 } 200 205 } … … 217 222 if (rc) 218 223 { 219 224 dprintf(("KERNEL32: OSLibGetPIB(%d): DosGetInfoBlocks failed with rc=%d\n", iPIB, rc)); 220 225 return 0; 221 226 } … … 248 253 rc = DosAllocThreadLocalMemory(nrdwords, &thrdaddr); 249 254 if(rc) { 250 251 255 dprintf(("DosAllocThreadLocalMemory failed %d", rc)); 256 return 0; 252 257 } 253 258 return (ULONG)thrdaddr; … … 335 340 BOOL OSLibDisablePopups() 336 341 { 337 return DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR) == NO_ERROR; 338 } 339 //****************************************************************************** 340 //****************************************************************************** 342 return DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR) == NO_ERROR; 343 } 344 //****************************************************************************** 345 //****************************************************************************** 346 ULONG OSLibImSetMsgQueueProperty( ULONG hmq, ULONG ulFlag ) 347 { 348 USHORT sel; 349 APIRET rc; 350 351 if( !pfnImSetMsgQueueProperty ) 352 return 1; 353 354 sel = RestoreOS2FS(); 355 rc = pfnImSetMsgQueueProperty( hmq, ulFlag ); 356 SetFS( sel ); 357 358 return rc; 359 } 360 //****************************************************************************** 361 //****************************************************************************** 362
Note:
See TracChangeset
for help on using the changeset viewer.