- Timestamp:
- Feb 21, 2010, 5:32:45 PM (16 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r21332 r21355 542 542 GetUserDefaultLCID = _GetUserDefaultLCID@0 @425 543 543 GetUserDefaultLangID = _GetUserDefaultLangID@0 @426 544 GetVDMCurrentDirectories = _GetVDMCurrentDirectories@4 ;NT544 ; GetVDMCurrentDirectories = _GetVDMCurrentDirectories@4 ;NT 545 545 GetVersion = _GetVersion@0 @427 546 546 GetVersionExA = _GetVersionExA@4 @428 -
trunk/src/kernel32/codepage.c
r10191 r21355 97 97 if (!ansi_cptable) init_codepages(); /* just in case */ 98 98 99 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTANSICODEPAGE )) ) ansi_cptable = table;100 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTMACCODEPAGE )) ) mac_cptable = table;101 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTCODEPAGE )) ) oem_cptable = table;99 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTANSICODEPAGE )) != NULL) ansi_cptable = table; 100 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTMACCODEPAGE )) != NULL) mac_cptable = table; 101 if ((table = get_locale_cp( lcid, LOCALE_IDEFAULTCODEPAGE )) != NULL) oem_cptable = table; 102 102 103 103 TRACE( "ansi=%03d oem=%03d mac=%03d\n", ansi_cptable->info.codepage, … … 501 501 502 502 countW = MultiByteToWideChar(cp, 0, src, count, NULL, 0); 503 if((srcW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )503 if((srcW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 504 504 { 505 505 MultiByteToWideChar(cp, 0, src, count, srcW, countW); -
trunk/src/kernel32/dosdevice.cpp
r9663 r21355 169 169 strcpy(buffer,"\\DEV\\"); 170 170 strcat(buffer,devname); 171 if ((s=strchr(buffer,':')) ) *s='\0';171 if ((s=strchr(buffer,':')) != NULL) *s='\0'; 172 172 lstrcpynA(target,buffer,bufsize); 173 173 return strlen(buffer)+1; -
trunk/src/kernel32/environ.cpp
r21302 r21355 245 245 if (*src != '%') 246 246 { 247 if ((p = strchr( src, '%' )) ) len = p - src;247 if ((p = strchr( src, '%' )) != NULL) len = p - src; 248 248 else len = strlen(src); 249 249 var = src; … … 252 252 else /* we are at the start of a variable */ 253 253 { 254 if ((p = strchr( src + 1, '%' )) )254 if ((p = strchr( src + 1, '%' )) != NULL) 255 255 { 256 256 len = p - src - 1; /* Length of the variable name */ 257 257 if ((var = ENV_FindVariable( GetEnvironmentStringsA(), 258 src + 1, len )) )258 src + 1, len )) != NULL) 259 259 { 260 260 src += len + 2; /* Skip the variable name */ -
trunk/src/kernel32/heapstring.cpp
r10539 r21355 348 348 349 349 WCHAR *p = dest; 350 while ((*p++ = *src++) );350 while ((*p++ = *src++) != 0); 351 351 352 352 return dest; -
trunk/src/kernel32/ole2nls.c
r21302 r21355 779 779 char acRealKey[128]; 780 780 781 if ( (pacKey = GetLocaleSubkeyName(lctype)) )781 if ( (pacKey = GetLocaleSubkeyName(lctype)) != NULL) 782 782 { 783 783 sprintf( acRealKey, "Control Panel\\International\\%s", pacKey ); … … 786 786 { 787 787 if ( RegSetValueExA( hKey, NULL, 0, REG_SZ, 788 data, strlen(data)+1 ) != ERROR_SUCCESS )788 (LPSTR)data, strlen(data)+1 ) != ERROR_SUCCESS ) 789 789 { 790 790 ERR("SetLocaleInfoA: %s did not work\n", pacKey ); … … 1359 1359 } 1360 1360 1361 /****************************************************************************** 1362 * identityW [Internal] 1363 */ 1364 static WCHAR identityW(WCHAR c) 1365 { 1366 return c; 1367 } 1368 1361 1369 /************************************************************************* 1362 1370 * LCMapStringA [KERNEL32.492] … … 1902 1910 else 1903 1911 { 1912 #ifdef __WIN32OS2__ 1913 WCHAR (*f)(WCHAR)=identityW; 1914 #else 1904 1915 int (*f)(int)=identity; 1916 #endif 1905 1917 1906 1918 if (dstlen==0) … … 2150 2162 its possible that it fails when the time looks like ss:mm:hh as example*/ 2151 2163 if (tflags & (TIME_NOMINUTESORSECONDS)) 2152 { if ((pos = strstr ( format, ":mm")) )2164 { if ((pos = strstr ( format, ":mm")) != NULL) 2153 2165 { memcpy ( pos, pos+3, strlen(format)-(pos-format)-2 ); 2154 2166 } 2155 2167 } 2156 2168 if (tflags & (TIME_NOSECONDS)) 2157 { if ((pos = strstr ( format, ":ss")) )2169 { if ((pos = strstr ( format, ":ss")) != NULL) 2158 2170 { memcpy ( pos, pos+3, strlen(format)-(pos-format)-2 ); 2159 2171 } … … 3745 3757 } 3746 3758 else 3747 { thistime = xtime;3759 { thistime = (LPSYSTEMTIME)xtime; 3748 3760 /* Check that hour,min and sec is in range */ 3749 3761 } … … 3794 3806 } 3795 3807 else 3796 { thistime = xtime;3808 { thistime = (LPSYSTEMTIME)xtime; 3797 3809 } 3798 3810 -
trunk/src/kernel32/profile.cpp
r10574 r21355 986 986 InitializeCriticalSection( &PROFILE_CritSect ); 987 987 MakeCriticalSectionGlobal( &PROFILE_CritSect ); 988 return 1; 988 989 } 989 990 … … 1404 1405 while(*string) { 1405 1406 LPSTR buf=HEAP_strdupA( GetProcessHeap(), 0, string ); 1406 if((p=strchr( buf, '=')) ){1407 if((p=strchr( buf, '=')) != NULL){ 1407 1408 *p='\0'; 1408 1409 ret = PROFILE_SetString( section, buf, p+1 ); -
trunk/src/kernel32/winimagepeldr.cpp
r10397 r21355 503 503 if(!(dwFlags & FLAG_PELDR_LOADASDATAFILE)) 504 504 { 505 if( tlsDir = (IMAGE_TLS_DIRECTORY *)ImageDirectoryOffset(peview, IMAGE_DIRECTORY_ENTRY_TLS))505 if((tlsDir = (IMAGE_TLS_DIRECTORY *)ImageDirectoryOffset(peview, IMAGE_DIRECTORY_ENTRY_TLS)) != NULL) 506 506 { 507 507 Section *sect;
Note:
See TracChangeset
for help on using the changeset viewer.