- Timestamp:
- Oct 28, 1999, 2:01:12 PM (26 years ago)
- Location:
- trunk/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r1481 r1490 1 /* $Id: KERNEL32.CPP,v 1.2 5 1999-10-27 18:11:38sandervl Exp $ */1 /* $Id: KERNEL32.CPP,v 1.26 1999-10-28 12:01:11 sandervl Exp $ */ 2 2 3 3 /* … … 840 840 841 841 // return(WIN32OS2_VERSION); 842 return (0x00000 400);842 return (0x0000004); 843 843 } 844 844 //****************************************************************************** -
trunk/src/kernel32/KERNEL32.DEF
r1476 r1490 1 ; $Id: KERNEL32.DEF,v 1.4 6 1999-10-27 12:38:44 phallerExp $1 ; $Id: KERNEL32.DEF,v 1.47 1999-10-28 12:01:11 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 1040 1040 PROFILE_SetOdinIniBool = _PROFILE_SetOdinIniBool@12 @1269 1041 1041 PROFILE_SaveOdinIni = _PROFILE_SaveOdinIni@0 @1270 1042 1043 ;shared memory allocation 1044 _smalloc__FUi @1271 -
trunk/src/kernel32/directory.cpp
r1410 r1490 1 /* $Id: directory.cpp,v 1. 7 1999-10-23 12:34:46sandervl Exp $ */1 /* $Id: directory.cpp,v 1.8 1999-10-28 12:01:12 sandervl Exp $ */ 2 2 3 3 /* … … 189 189 len = PROFILE_GetOdinIniString(ODINDIRECTORIES,"SYSTEM","",lpBuffer,uSize); 190 190 if (len > 2) { 191 if(lpBuffer[len-1] == '\\') { 192 lpBuffer[len-1] = 0; 193 len--; 194 } 191 195 return len; 192 196 } 193 197 else {//SvL: Use path of kernel32.dll instead of calling Open32 api (which returns \OS2\SYSTEM) 194 198 lstrcpynA(lpBuffer, kernel32Path, uSize); 195 return lstrlenA(lpBuffer); 199 len = lstrlenA(lpBuffer);; 200 if(lpBuffer[len-1] == '\\') { 201 lpBuffer[len-1] = 0; 202 len--; 203 } 204 return len; 196 205 } 197 206 } … … 247 256 uSize); 248 257 return (lstrlenA(lpBuffer)); /* return number of copies bytes */ 249 } else 258 } 259 else 250 260 { 251 261 int len; 252 262 253 263 len = PROFILE_GetOdinIniString(ODINDIRECTORIES,"WINDOWS","",lpBuffer,uSize); 254 if (len > 2) return len; 264 if (len > 2) { 265 if(lpBuffer[len-1] == '\\') { 266 lpBuffer[len-1] = 0; 267 len--; 268 } 269 return len; 270 } 255 271 else 256 257 /* if no override by environment is available */ 258 return O32_GetWindowsDirectory(lpBuffer,uSize); 272 /* if no override by environment is available */ 273 return O32_GetWindowsDirectory(lpBuffer,uSize); 259 274 } 260 275 } -
trunk/src/kernel32/heapshared.cpp
r1432 r1490 1 /* $Id: heapshared.cpp,v 1. 1 1999-10-24 22:53:24sandervl Exp $ */1 /* $Id: heapshared.cpp,v 1.2 1999-10-28 12:01:12 sandervl Exp $ */ 2 2 /* 3 3 * Shared heap functions for OS/2 … … 5 5 * Initially commit 16 kb, add more when required 6 6 * 7 * NOTE: Hardcoded limit of 256 KB per process(increase when required)7 * NOTE: Hardcoded limit of 256 KB (increase when required) 8 8 * 9 9 * TODO: Not process/thread safe (initializing/destroying heap) … … 19 19 #include <os2wrap.h> 20 20 #include <misc.h> 21 #include "heapshared.h"21 #include <heapshared.h> 22 22 23 23 //Global DLL Data … … 69 69 return FALSE; 70 70 } 71 if(_uopen(sharedHeap) != 0) { 72 dprintf(("InitializeSharedHeap: unable to open shared heap!")); 73 return FALSE; 74 } 71 75 } 72 76 refCount++; … … 88 92 pSharedMem = NULL; 89 93 } 94 } 95 else { 96 _uclose(sharedHeap); 90 97 } 91 98 } -
trunk/src/kernel32/initterm.cpp
r1481 r1490 1 /* $Id: initterm.cpp,v 1.1 8 1999-10-27 18:11:39sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.19 1999-10-28 12:01:12 sandervl Exp $ */ 2 2 3 3 /* … … 41 41 #include <odinlx.h> 42 42 #include "oslibmisc.h" 43 #include "heapshared.h"43 #include <heapshared.h> 44 44 #include "mmap.h" 45 45 … … 155 155 WriteOutProfiles(); 156 156 DestroyTIB(); 157 DestroySharedHeap(); 157 158 //NOTE: Must be done after DestroyTIB 158 159 CloseLogFile(); -
trunk/src/kernel32/makefile
r1481 r1490 1 # $Id: makefile,v 1. 49 1999-10-27 18:11:39sandervl Exp $1 # $Id: makefile,v 1.50 1999-10-28 12:01:12 sandervl Exp $ 2 2 3 3 # … … 132 132 os2heap.h 133 133 134 initterm.OBJ: .\initterm.cpp initterm.h heapshared.h mmap.h134 initterm.OBJ: .\initterm.cpp initterm.h $(PDWIN32_INCLUDE)\heapshared.h mmap.h 135 135 136 136 thunk.OBJ: \ … … 310 310 .\hmopen32.h 311 311 312 hmmmap.obj: hmmmap.cpp hmdevice.h hmopen32.h mmap.h heapshared.h312 hmmmap.obj: hmmmap.cpp hmdevice.h hmopen32.h mmap.h $(PDWIN32_INCLUDE)\heapshared.h 313 313 314 314 conprop.OBJ: \ … … 327 327 328 328 virtual.obj: virtual.cpp $(PDWIN32_INCLUDE)\win\virtual.h $(PDWIN32_INCLUDE)\handlemanager.h mmap.h 329 mmap.obj: mmap.cpp mmap.h $(PDWIN32_INCLUDE)\vmutex.h oslibdos.h heapshared.h329 mmap.obj: mmap.cpp mmap.h $(PDWIN32_INCLUDE)\vmutex.h oslibdos.h $(PDWIN32_INCLUDE)\heapshared.h 330 330 331 331 pefile.OBJ: pefile.cpp $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winres.h … … 362 362 toolhelp.obj: toolhelp.cpp 363 363 364 heapshared.obj: heapshared.cpp heapshared.h364 heapshared.obj: heapshared.cpp $(PDWIN32_INCLUDE)\heapshared.h 365 365 366 366 -
trunk/src/user32/Makefile
r1453 r1490 1 # $Id: Makefile,v 1.3 7 1999-10-26 11:14:51sandervl Exp $1 # $Id: Makefile,v 1.38 1999-10-28 12:00:33 sandervl Exp $ 2 2 3 3 # … … 25 25 26 26 OBJS = user32.obj loadres.obj \ 27 dde.obj heapshared.objwin32wndhandle.obj \27 dde.obj win32wndhandle.obj \ 28 28 icon.obj hook.obj hooks.obj winmenu.obj \ 29 29 defwndproc.obj syscolor.obj char.obj initterm.obj \ … … 91 91 defwndproc.obj: defwndproc.cpp syscolor.h win32wmdiclient.h win32wbase.h win32wnd.h win32dlg.h 92 92 hooks.obj: hooks.cpp hooks.h 93 initterm.obj: initterm.cpp $(PDWIN32_INCLUDE)\spy.h pmwindow.h heapshared.hinitterm.h93 initterm.obj: initterm.cpp $(PDWIN32_INCLUDE)\spy.h pmwindow.h initterm.h 94 94 uitools.obj: uitools.cpp win32wbase.h 95 95 unknown.obj: unknown.cpp … … 121 121 pmwindow.obj: pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h dc.h 122 122 pmframe.obj: pmframe.cpp win32class.h win32wbase.h pmframe.h win32wndchild.h 123 win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h124 win32wbase.obj: win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h125 win32wbasepos.obj: win32wbasepos.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h126 win32wnd.obj: win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h127 win32dlg.obj: win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h controls.h123 win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h 124 win32wbase.obj: win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h 125 win32wbasepos.obj: win32wbasepos.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h 126 win32wnd.obj: win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h 127 win32dlg.obj: win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h oslibmsg.h controls.h 128 128 win32wndchild.obj: win32wndchild.cpp win32wndchild.h gen_object.h 129 129 win32wmdiclient.obj: win32wmdiclient.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h 130 130 win32wmdichild.obj: win32wmdichild.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h 131 131 win32wdesktop.obj: win32wdesktop.cpp win32wbase.h win32wdesktop.h gen_object.h 132 gen_object.obj: gen_object.cpp gen_object.h heapshared.h132 gen_object.obj: gen_object.cpp gen_object.h $(PDWIN32_INCLUDE)\heapshared.h 133 133 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h $(PDWIN32_INCLUDE)\winconst.h 134 134 oslibutil.obj: oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h … … 145 145 dib.obj: dib.cpp dib.h 146 146 147 heapshared.obj: heapshared.cpp heapshared.h148 149 147 clean: 150 148 $(RM) *.obj *.lib *.dll *.map *.pch *.res -
trunk/src/user32/gen_object.h
r949 r1490 1 /* $Id: gen_object.h,v 1. 1 1999-09-15 23:18:50sandervl Exp $ */1 /* $Id: gen_object.h,v 1.2 1999-10-28 12:00:33 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 … … 9 9 #define __GEN_OBJECT_H__ 10 10 11 #include "heapshared.h"11 #include <heapshared.h> 12 12 13 13 #define OBJTYPE_WINDOW 0 … … 43 43 void *operator new(size_t size, const char *filename, size_t lineno) 44 44 { 45 return _ umalloc(sharedHeap,size);45 return _smalloc(size); 46 46 } 47 47 void operator delete(void *location, const char *filename, size_t lineno) … … 52 52 void *operator new(size_t size) 53 53 { 54 return _ umalloc(sharedHeap,size);54 return _smalloc(size); 55 55 } 56 56 void operator delete(void *location) -
trunk/src/user32/initterm.cpp
r1425 r1490 1 /* $Id: initterm.cpp,v 1.1 3 1999-10-23 23:04:34 sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.14 1999-10-28 12:00:34 sandervl Exp $ */ 2 2 3 3 /* … … 38 38 #include <spy.h> 39 39 #include "pmwindow.h" 40 #include "heapshared.h"41 40 #include "win32wdesktop.h" 42 41 #include "syscolor.h" … … 108 107 InitSpyQueue(); 109 108 110 if(InitializeSharedHeap() == FALSE)111 return 0UL;112 113 109 //SvL: Init win32 PM classes 114 110 if(InitPM() == FALSE) { … … 151 147 DestroyDesktopWindow(); 152 148 UnregisterSystemClasses(); 153 DestroySharedHeap();154 149 _ctordtorTerm(); 155 150 dprintf(("user32 exit done\n")); -
trunk/src/user32/pmframe.cpp
r1425 r1490 1 /* $Id: pmframe.cpp,v 1.1 1 1999-10-23 23:04:36sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.12 1999-10-28 12:00:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 377 377 378 378 PosChangedEnd: 379 RestoreOS2TIB(); 379 380 return rc; 380 381 } -
trunk/src/user32/win32class.cpp
r1433 r1490 1 /* $Id: win32class.cpp,v 1. 3 1999-10-24 22:56:09sandervl Exp $ */1 /* $Id: win32class.cpp,v 1.4 1999-10-28 12:00:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Managment Code for OS/2 … … 123 123 Win32WndClass::~Win32WndClass() 124 124 { 125 if(classNameA && (windowStyle & CS_GLOBALCLASS)) { 125 //SvL: Don't delete global classes 126 if(classNameA && !(windowStyle & CS_GLOBALCLASS)) { 126 127 GlobalDeleteAtom(classAtom); 127 128 } -
trunk/src/user32/win32wbase.cpp
r1425 r1490 1 /* $Id: win32wbase.cpp,v 1.6 2 1999-10-23 23:04:38sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.63 1999-10-28 12:00:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 35 35 #include "syscolor.h" 36 36 #include "win32wndhandle.h" 37 #include "heapshared.h"38 37 #include "dc.h" 39 38 #include "pmframe.h" … … 508 507 DWORD dwOSWinStyle, dwOSFrameStyle; 509 508 510 OSLibWinConvertStyle(cs->style, &cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight); 511 dwExStyle = cs->dwExStyle; 509 OSLibWinConvertStyle(dwStyle, &dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight); 512 510 513 511 rectWindow.left = cs->x; … … 576 574 } 577 575 if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) { 578 dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));579 SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error580 return FALSE;581 }582 //SvL: Need to store the shared memory base, or else other apps can map it into their memory space583 if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {584 576 dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd)); 585 577 SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error … … 594 586 } 595 587 if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) { 596 dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));597 SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error598 return FALSE;599 }600 //SvL: Need to store the shared memory base, or else other apps can map it into their memory space601 if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {602 588 dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame)); 603 589 SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error … … 2314 2300 2315 2301 if(wnd) { 2316 LPVOID sharedmembase = (LPVOID)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_SHAREDMEM);2317 2318 if(OSLibDosGetSharedMem(sharedmembase, MAX_HEAPSIZE, OSLIB_PAG_READ) != 0) {2319 dprintf(("OSLibDosGetSharedMem returned error for %x", wnd));2320 break;2321 }2322 2302 if(wnd->getWindowClass()->hasClassName(lpszClass, fUnicode) && 2323 2303 (!lpszWindow || wnd->hasWindowName(lpszWindow, fUnicode))) -
trunk/src/user32/win32wbase.h
r1425 r1490 1 /* $Id: win32wbase.h,v 1.3 4 1999-10-23 23:04:39sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.35 1999-10-28 12:00:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 28 28 #define OFFSET_WIN32WNDPTR 0 29 29 #define OFFSET_WIN32PM_MAGIC 4 30 #define OFFSET_WIN32PM_SHAREDMEM 8 31 #define NROF_WIN32WNDBYTES 12 30 #define NROF_WIN32WNDBYTES 8 32 31 33 32 #define WIN32PM_MAGIC 0x12345678 -
trunk/src/user32/win32wbasepos.cpp
r1391 r1490 1 /* $Id: win32wbasepos.cpp,v 1. 5 1999-10-21 12:19:29sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.6 1999-10-28 12:00:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 24 24 #include <assert.h> 25 25 #include <misc.h> 26 #include <heapstring.h>27 26 #include <win32wbase.h> 28 27 #include <winres.h> … … 38 37 #include "syscolor.h" 39 38 #include "win32wndhandle.h" 40 #include "heapshared.h"41 39 #include "dc.h" 42 40 #include "pmframe.h" -
trunk/src/user32/win32wmdichild.cpp
r1433 r1490 1 /* $Id: win32wmdichild.cpp,v 1. 7 1999-10-24 22:56:10sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.8 1999-10-28 12:00:36 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 39 39 #include "syscolor.h" 40 40 #include "win32wndhandle.h" 41 #include "heapshared.h"42 41 43 42 -
trunk/src/user32/win32wmdiclient.cpp
r1433 r1490 1 /* $Id: win32wmdiclient.cpp,v 1.1 0 1999-10-24 22:56:10sandervl Exp $ */1 /* $Id: win32wmdiclient.cpp,v 1.11 1999-10-28 12:00:36 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 35 35 #include "syscolor.h" 36 36 #include "win32wndhandle.h" 37 #include "heapshared.h"38 37 39 38 -
trunk/src/user32/win32wnd.cpp
r949 r1490 1 /* $Id: win32wnd.cpp,v 1. 1 1999-09-15 23:19:01sandervl Exp $ */1 /* $Id: win32wnd.cpp,v 1.2 1999-10-28 12:00:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class for OS/2 … … 21 21 #include <assert.h> 22 22 #include <misc.h> 23 #include <win32wnd.h> 23 24 #include <heapstring.h> 24 #include <win32wnd.h>25 25 #include <spy.h> 26 26 #include "wndmsg.h" … … 34 34 #include "syscolor.h" 35 35 #include "win32wndhandle.h" 36 #include "heapshared.h"37 36 38 37
Note:
See TracChangeset
for help on using the changeset viewer.