- Timestamp:
- Jul 3, 2000, 2:12:38 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r3746 r3794 1 /* $Id: KERNEL32.CPP,v 1.4 7 2000-06-23 19:02:36 sandervlExp $ */1 /* $Id: KERNEL32.CPP,v 1.48 2000-07-03 12:12:37 bird Exp $ */ 2 2 3 3 /* … … 731 731 732 732 dprintf(("KERNEL32: GetStringTypeW, not properly implemented\n")); 733 if((DWORD)lpSrcStr == (DWORD)lpCharType || 734 !lpSrcStr || 735 !lpCharType) 733 if((DWORD)lpSrcStr == (DWORD)lpCharType || 734 !lpSrcStr || 735 !lpCharType) 736 736 { 737 737 O32_SetLastError(ERROR_INVALID_PARAMETER); 738 738 return(FALSE); 739 739 } 740 740 741 741 if(cchSrc == -1) 742 742 cchSrc = UniStrlen((UniChar*)lpSrcStr); … … 761 761 return TRUE; 762 762 break; 763 763 764 764 case CT_CTYPE2: 765 765 case CT_CTYPE3: //not supported right now … … 767 767 break; 768 768 } 769 769 770 770 return FALSE; 771 771 } … … 801 801 { 802 802 int i; 803 804 if ((src==NULL) || 805 (chartype==NULL) || 803 804 if ((src==NULL) || 805 (chartype==NULL) || 806 806 (src==(LPSTR)chartype)) 807 807 { … … 809 809 return FALSE; 810 810 } 811 811 812 812 if (cchSrc==-1) 813 813 cchSrc=lstrlenA(src)+1; 814 815 switch (dwInfoType) 814 815 switch (dwInfoType) 816 816 { 817 817 case CT_CTYPE1: … … 832 832 } 833 833 return TRUE; 834 834 835 835 case CT_CTYPE2: 836 836 for (i=0;i<cchSrc;i++) … … 839 839 } 840 840 return TRUE; 841 841 842 842 case CT_CTYPE3: 843 843 for (i=0;i<cchSrc;i++) … … 846 846 } 847 847 return TRUE; 848 848 849 849 default: 850 850 dprintf(("Unknown dwInfoType:%ld\n", … … 1017 1017 1018 1018 if(lpString1 == NULL || lpString2 == NULL) 1019 { 1019 { 1020 1020 dprintf(("CompareStringA: (s1=%s,s2=%s): Invalid NULL string\n", lpString1, lpString2)); 1021 1021 SetLastError(ERROR_INVALID_PARAMETER); … … 1065 1065 1066 1066 if(lpString1 == NULL || lpString2 == NULL) 1067 { 1067 { 1068 1068 dprintf(("CompareStringW: (s1=%s,s2=%s): Invalid NULL string\n", lpString1, lpString2)); 1069 1069 SetLastError(ERROR_INVALID_PARAMETER); … … 1206 1206 } 1207 1207 //****************************************************************************** 1208 //SvL: 26-6-'97 - Added1209 //******************************************************************************1210 VOID WIN32API OutputDebugStringW(LPCWSTR arg1)1211 {1212 char *astring;1213 1214 astring = UnicodeToAsciiString((LPWSTR)arg1);1215 dprintf(("KERNEL32: OS2OutputDebugStringW %s\n", astring));1216 FreeAsciiString(astring);1217 }1218 //******************************************************************************1219 //******************************************************************************1220 VOID WIN32API OutputDebugStringA(LPCSTR lpszOutputString)1221 {1222 dprintf(("KERNEL32: OutputDebugStringA: %s\n", lpszOutputString));1223 return;1224 }1225 //******************************************************************************1226 1208 //****************************************************************************** 1227 1209 BOOL WIN32API FlushInstructionCache( /*PLF Mon 98-02-09 23:56:49 : STUB STUB STUB STUB STUB */ -
trunk/src/kernel32/debug.cpp
r3793 r3794 1 /* $Id: debug.cpp,v 1. 3 2000-07-03 11:20:52bird Exp $ */1 /* $Id: debug.cpp,v 1.4 2000-07-03 12:12:38 bird Exp $ */ 2 2 3 3 /* … … 86 86 * being debugged, so that it can change behaviour and for example 87 87 * provide more debug information using functions like OutputDebugString. 88 * 89 * You could change the result of this by SET ODIN32.DEBUGGERPRESENT=1 on 90 * the commandline. 88 91 */ 89 92 BOOL WIN32API IsDebuggerPresent(VOID) 90 93 { 91 94 dprintf(("KERNEL32: IsDebuggerPresent() -> FALSE\n")); 92 return FALSE;95 return (getenv("ODIN32.DEBUGGERPRESENT") != NULL); 93 96 } 97 98 99 /** 100 * Send a string to the debugger for the current application. 101 * @param lpszOutputString Pointer to the string to send to the debugger. (intput) 102 * @sketch Convert and log the string. 103 * @status STUB 104 * @author Sander van Leeuwen 105 * @remark The string is send to the system debugger if there is no 106 * debugger available for this application. 107 * If the application has not debugger and the system debugger 108 * is not active this API does nothing. 109 */ 110 VOID WIN32API OutputDebugStringW(LPCWSTR lpszOutputString) 111 { 112 char *pszAscii = UnicodeToAsciiString((LPWSTR)lpszOutputString); 113 dprintf(("KERNEL32: OS2OutputDebugStringW %s\n", pszAscii)); 114 FreeAsciiString(pszAscii); 115 } 116 117 118 /** 119 * Send a string to the debugger for the current application. 120 * @param lpszOutputString Pointer to the string to send to the debugger. (input) 121 * @sketch Log the string. 122 * @status STUB 123 * @author Sander van Leeuwen 124 * @remark The string is send to the system debugger if there is no 125 * debugger available for this application. 126 * If the application has not debugger and the system debugger 127 * is not active this API does nothing. 128 */ 129 VOID WIN32API OutputDebugStringA(LPCSTR lpszOutputString) 130 { 131 dprintf(("KERNEL32: OutputDebugStringA: %s\n", lpszOutputString)); 132 } 133
Note:
See TracChangeset
for help on using the changeset viewer.