- Timestamp:
- Jun 27, 2001, 3:35:47 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/cpu.cpp
r4407 r6129 1 /* $Id: cpu.cpp,v 1.1 1 2000-10-03 17:28:29sandervl Exp $ */1 /* $Id: cpu.cpp,v 1.12 2001-06-27 13:35:45 sandervl Exp $ */ 2 2 /* 3 3 * Odin win32 CPU apis … … 232 232 GetSystemInfo (&si); /* To ensure the information is loaded and cached */ 233 233 234 if (feature < 64) 234 if (feature < 64) { 235 dprintf(("IsProcessorFeaturePresent %x -> %x", feature, PF[feature])); 235 236 return PF[feature]; 237 } 236 238 else 237 239 return FALSE; -
trunk/src/kernel32/initsystem.cpp
r5425 r6129 1 /* $Id: initsystem.cpp,v 1.2 7 2001-04-01 14:33:50sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.28 2001-06-27 13:35:46 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry, directories & environment) … … 67 67 buffer1[12] = 0; 68 68 signature = GetCPUSignature(); 69 sprintf(buffer, "x86 Family %x Model %x Stepping %x, %s", (signature >> 8)&0xf, signature & 0xf, (signature >> 4)&0xf, buffer1);69 sprintf(buffer, "x86 Family %x Model %x Stepping %x, %s", (signature >> 8)&0xf, (signature >> 4) & 0xf, signature & 0xf, buffer1); 70 70 SetEnvironmentVariableA("PROCESSOR_IDENTIFIER", buffer); 71 71 sprintf(buffer, "%x", (signature >> 8)&0xf); -
trunk/src/kernel32/thread.cpp
r5354 r6129 1 /* $Id: thread.cpp,v 1.2 8 2001-03-22 18:16:41sandervl Exp $ */1 /* $Id: thread.cpp,v 1.29 2001-06-27 13:35:46 sandervl Exp $ */ 2 2 3 3 /* … … 132 132 Win32DllBase::attachThreadToAllDlls(); //send DLL_THREAD_ATTACH message to all dlls 133 133 134 // Set default FPU control word (no exceptions); same as in NT135 CONTROL87(0x27F, 0xFFF);134 //Reset FPU to default values (control word 0x27F; same as in NT) 135 _fpreset(); 136 136 rc = AsmCallThreadHandler(winthread, userdata); 137 137 -
trunk/src/kernel32/winexebase.cpp
r5962 r6129 1 /* $Id: winexebase.cpp,v 1.1 5 2001-06-11 09:49:36 phallerExp $ */1 /* $Id: winexebase.cpp,v 1.16 2001-06-27 13:35:46 sandervl Exp $ */ 2 2 3 3 /* … … 110 110 SetWin32TIB(); 111 111 112 //Set default FPU control word (no exceptions); same as in NT 113 CONTROL87(0x27F, 0xFFF); 114 112 //Reset FPU to default values (control word 0x27F; same as in NT) 113 _fpreset(); 115 114 dprintf(("KERNEL32: Win32ExeBase::start exe at %08xh\n", 116 115 (void*)entryPoint )); -
trunk/src/kernel32/winimagepeldr.cpp
r5959 r6129 1 /* $Id: winimagepeldr.cpp,v 1.8 7 2001-06-10 22:32:17 sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.88 2001-06-27 13:35:47 sandervl Exp $ */ 2 2 3 3 /* … … 775 775 } 776 776 } 777 if(fPageCmd == COMPLETE_SECTION && section->type == SECTION_DEBUG) {//ignore 778 return TRUE; 779 } 777 780 //Check range of pages with the same attributes starting at virtAddress 778 781 //(some pages might already have been loaded) -
trunk/src/kernel32/wprocess.cpp
r6022 r6129 1 /* $Id: wprocess.cpp,v 1.12 6 2001-06-15 18:58:39sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.127 2001-06-27 13:35:47 sandervl Exp $ */ 2 2 3 3 /* … … 1660 1660 } 1661 1661 1662 char szAppName[255]; 1662 char szAppName[MAX_PATH]; 1663 char buffer[MAX_PATH]; 1663 1664 DWORD fileAttr; 1664 char *exename = szAppName;1665 strncpy( szAppName, cmdline, sizeof(szAppName));1666 szAppName[254] = 0;1665 char *exename = buffer; 1666 strncpy(buffer, cmdline, sizeof(szAppName)); 1667 buffer[MAX_PATH-1] = 0; 1667 1668 if(*exename == '"') { 1668 1669 exename++; … … 1673 1674 *exename = 0; 1674 1675 } 1675 exename = &szAppName[1]; 1676 exename++; 1677 if (SearchPathA( NULL, &buffer[1], ".exe", sizeof(szAppName), szAppName, NULL ) || 1678 SearchPathA( NULL, &buffer[1], NULL, sizeof(szAppName), szAppName, NULL )) 1679 { 1680 // 1681 } 1676 1682 } 1677 1683 else { … … 1687 1693 fTerminate = TRUE; 1688 1694 } 1689 1690 fileAttr = GetFileAttributesA(szAppName); 1691 if(fileAttr != -1 && !(fileAttr & FILE_ATTRIBUTE_DIRECTORY)) { 1692 break; 1695 dprintf(("Trying '%s'", buffer )); 1696 if (SearchPathA( NULL, buffer, ".exe", sizeof(szAppName), szAppName, NULL ) || 1697 SearchPathA( NULL, buffer, NULL, sizeof(szAppName), szAppName, NULL )) 1698 { 1699 if(fTerminate) exename++; 1700 break; 1693 1701 } 1702 1694 1703 if(fTerminate) { 1695 1704 *exename = ' '; … … 1698 1707 } 1699 1708 } 1700 exename = szAppName; 1701 } 1702 fileAttr = GetFileAttributesA(exename); 1709 } 1710 lpCommandLine = exename; //start of command line parameters 1711 1712 fileAttr = GetFileAttributesA(szAppName); 1703 1713 if(fileAttr == -1 || (fileAttr & FILE_ATTRIBUTE_DIRECTORY)) { 1704 1714 dprintf(("CreateProcess: can't find executable!")); … … 1707 1717 } 1708 1718 1709 dprintf(("KERNEL32: CreateProcess %s \n", cmdline));1719 dprintf(("KERNEL32: CreateProcess %s %s", szAppName, lpCommandLine)); 1710 1720 1711 1721 DWORD Characteristics, SubSystem, fNEExe; 1712 if(Win32ImageBase::isPEImage( exename, &Characteristics, &SubSystem, &fNEExe) == 0) {1722 if(Win32ImageBase::isPEImage(szAppName, &Characteristics, &SubSystem, &fNEExe) == 0) { 1713 1723 char *lpszPE; 1714 1724 if(SubSystem == IMAGE_SUBSYSTEM_WINDOWS_CUI) { … … 1722 1732 char *newcmdline; 1723 1733 1724 newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + strlen( cmdline) + 32);1725 sprintf(newcmdline, "%s /OPT:[CURDIR=%s] %s ", lpszPE, lpCurrentDirectory, cmdline);1734 newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + strlen(szAppName) + strlen(lpCommandLine) + 32); 1735 sprintf(newcmdline, "%s /OPT:[CURDIR=%s] %s %s", lpszPE, lpCurrentDirectory, szAppName, lpCommandLine); 1726 1736 free(cmdline); 1727 1737 cmdline = newcmdline; … … 1730 1740 char *newcmdline; 1731 1741 1732 newcmdline = (char *)malloc(strlen( cmdline) + 16);1733 sprintf(newcmdline, "%s %s ", lpszPE, cmdline);1742 newcmdline = (char *)malloc(strlen(szAppName) + strlen(lpCommandLine) + 16); 1743 sprintf(newcmdline, "%s %s %s", lpszPE, szAppName, lpCommandLine); 1734 1744 free(cmdline); 1735 1745 cmdline = newcmdline; … … 1744 1754 char *newcmdline; 1745 1755 1746 newcmdline = (char *)malloc(strlen( cmdline) + 16);1747 sprintf(newcmdline, "w16odin.exe %s", cmdline);1756 newcmdline = (char *)malloc(strlen(szAppName) + strlen(cmdline) + 16); 1757 sprintf(newcmdline, "w16odin.exe %s", szAppName, lpCommandLine); 1748 1758 free(cmdline); 1749 1759 cmdline = newcmdline; … … 1756 1766 } 1757 1767 else {//os/2 app?? 1758 rc = O32_CreateProcess( NULL, (LPCSTR)cmdline,lpProcessAttributes,1768 rc = O32_CreateProcess(szAppName, (LPCSTR)lpCommandLine, lpProcessAttributes, 1759 1769 lpThreadAttributes, bInheritHandles, dwCreationFlags, 1760 1770 lpEnvironment, lpCurrentDirectory, lpStartupInfo,
Note:
See TracChangeset
for help on using the changeset viewer.