- Timestamp:
- Dec 9, 1999, 1:52:21 AM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r1986 r2032 1 ; $Id: KERNEL32.DEF,v 1.5 5 1999-12-05 21:11:40sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.56 1999-12-09 00:52:19 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 1052 1052 _smalloc__FUi @1271 1053 1053 1054 ;code memory allocation 1055 _cmalloc__FUi @1272 1056 1054 1057 ;Export for MSACM32 1055 1058 _wsnprintfA @2000 -
trunk/src/kernel32/heap.cpp
r1718 r2032 1 /* $Id: heap.cpp,v 1.1 6 1999-11-13 14:21:30 sandervl Exp $ */1 /* $Id: heap.cpp,v 1.17 1999-12-09 00:52:20 sandervl Exp $ */ 2 2 3 3 /* 4 * Project Odin Software License can be found in LICENSE.TXT5 *6 4 * Win32 heap API functions for OS/2 7 5 * 8 * Copyright 1998 Sander van Leeuwen 6 * Copyright 1999 Sander van Leeuwen 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 9 * 10 10 */ -
trunk/src/kernel32/heapstring.cpp
r1997 r2032 1 /* $Id: heapstring.cpp,v 1.2 1 1999-12-06 20:39:38sandervl Exp $ */1 /* $Id: heapstring.cpp,v 1.22 1999-12-09 00:52:20 sandervl Exp $ */ 2 2 3 3 /* … … 552 552 astring[unilen] = 0; //terminate 553 553 554 return unilen; 555 554 return unilen; //length of string (excluding terminator) 556 555 } 557 556 else … … 628 627 //SvL: Determine length of ascii string 629 628 in_bytes_left = strlen(in_buf)+1; 630 in_bytes_left = min(in_bytes_left, asciilen); //buffer size in bytes629 in_bytes_left = asciilen = min(in_bytes_left, asciilen); //buffer size in bytes 631 630 632 631 out_buf = (UniChar*)unicode; … … 639 638 &num_subs ); 640 639 641 //@@@PH what's this? 642 //unicode[asciilen-1-in_bytes_left] = 0; 643 644 //@@@PH what's this? 645 //return asciilen - 1; 646 return asciilen; 640 asciilen -= 1+uni_chars_left; //end + left bytes 641 642 unicode[asciilen] = 0; // always terminate string 643 return asciilen; //length of string (excluding terminator) 647 644 } 648 645 else -
trunk/src/kernel32/initterm.cpp
r1820 r2032 1 /* $Id: initterm.cpp,v 1.2 8 1999-11-23 20:01:18sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.29 1999-12-09 00:52:20 sandervl Exp $ */ 2 2 3 3 /* … … 42 42 #include "oslibmisc.h" 43 43 #include <heapshared.h> 44 #include <heapcode.h> 44 45 #include "mmap.h" 45 46 #include "directory.h" … … 111 112 return 0UL; 112 113 114 if(InitializeCodeHeap() == FALSE) 115 return 0UL; 116 113 117 PROFILE_LoadOdinIni(); 114 118 if(RegisterLxDll(hModule, 0, 0) == FALSE) … … 171 175 DestroyTIB(); 172 176 DestroySharedHeap(); 177 DestroyCodeHeap(); 173 178 _ctordtorTerm(); 174 179 -
trunk/src/kernel32/makefile
r1924 r2032 1 # $Id: makefile,v 1.6 6 1999-12-01 18:40:48sandervl Exp $1 # $Id: makefile,v 1.67 1999-12-09 00:52:20 sandervl Exp $ 2 2 3 3 # … … 32 32 CONBUFFER.OBJ CONOUT.OBJ UNICODE.OBJ network.OBJ HMDEVIO.OBJ \ 33 33 profile.obj THREAD.OBJ virtual.obj THUNK.OBJ OBSOLETE.OBJ COMM.OBJ\ 34 MESSAGE.OBJ RESOURCE.OBJ EXCEPTIONS.OBJ heapshared.obj cpuhlp.obj \34 MESSAGE.OBJ RESOURCE.OBJ EXCEPTIONS.OBJ heapshared.obj cpuhlp.obj heapcode.obj \ 35 35 LFILE.OBJ NPIPE.OBJ oslibdos.obj oslibmisc.obj MISC.OBJ EXCEPTUTIL.OBJ \ 36 36 LANG.OBJ ICCIO.OBJ MAP.OBJ WIN32UTIL.OBJ heap.OBJ heapstring.obj \ … … 151 151 initterm.h 152 152 153 initterm.OBJ: .\initterm.cpp initterm.h $(PDWIN32_INCLUDE)\heapshared.h mmap.h directory.h hmdevio.h cpuhlp.h 153 initterm.OBJ: .\initterm.cpp initterm.h $(PDWIN32_INCLUDE)\heapshared.h mmap.h directory.h hmdevio.h cpuhlp.h $(PDWIN32_INCLUDE)\heapcode.h 154 154 155 155 thunk.OBJ: \ … … 387 387 388 388 heapshared.obj: heapshared.cpp $(PDWIN32_INCLUDE)\heapshared.h 389 heapcode.obj: heapcode.cpp $(PDWIN32_INCLUDE)\heapshared.h $(PDWIN32_INCLUDE)\heapcode.h 389 390 cpu.obj: cpu.cpp cpuhlp.h 390 391 cpuhlp.obj: cpuhlp.asm -
trunk/src/kernel32/mmap.cpp
r2007 r2032 1 /* $Id: mmap.cpp,v 1.2 5 1999-12-07 12:28:41 sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.26 1999-12-09 00:52:21 sandervl Exp $ */ 2 2 3 3 /* … … 327 327 goto fail; 328 328 } 329 if(hMemFile == -1 && !image ) {//commit memory329 if(hMemFile == -1 && !image && (mProtFlags & SEC_COMMIT)) {//commit memory 330 330 VirtualAlloc(pMapping, mSize, MEM_COMMIT, PAGE_READWRITE); 331 331 } … … 336 336 } 337 337 if(mapview->everythingOk() == FALSE) { 338 dprintf(("Win32MemMap::mapFileView: !mapview->everythingOk")); 338 339 delete mapview; 339 340 goto fail; -
trunk/src/kernel32/winres.cpp
r2007 r2032 1 /* $Id: winres.cpp,v 1.2 3 1999-12-07 12:28:41 sandervl Exp $ */1 /* $Id: winres.cpp,v 1.24 1999-12-09 00:52:21 sandervl Exp $ */ 2 2 3 3 /* … … 71 71 this->type = type; 72 72 this->ressize = size; 73 winresdata = (char *)malloc(size+sizeof(WCHAR)); //+2 for 0 terminator (string res)73 winresdata = (char *)malloc(size+sizeof(WCHAR)); 74 74 if(winresdata == NULL) { 75 75 DebugInt3(); … … 80 80 if(type == NTRT_STRING) { 81 81 memcpy(winresdata, resdata, size); 82 ((USHORT *)winresdata)[size/sizeof(WCHAR)] = 0;82 ((USHORT *)winresdata)[size/sizeof(WCHAR)-1] = 0; 83 83 } 84 84 else memcpy(winresdata, resdata, size);
Note:
See TracChangeset
for help on using the changeset viewer.