Changeset 3409 for trunk/src/comctl32/CCBase.cpp
- Timestamp:
- Apr 16, 2000, 8:26:59 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/CCBase.cpp
r3369 r3409 1 /* $Id: CCBase.cpp,v 1. 7 2000-04-12 16:38:58cbratschi Exp $ */1 /* $Id: CCBase.cpp,v 1.8 2000-04-16 18:26:55 cbratschi Exp $ */ 2 2 /* 3 3 * COMCTL32 Base Functions and Macros for all Controls … … 346 346 } 347 347 348 //NOTE for lstrcmpni*: both buffers must be at least shortLen+1 characters long! 349 350 INT lstrcmpniA(CHAR *textA,CHAR *textB,INT len) 351 { 352 CHAR tmp1,tmp2; 353 INT res; 354 355 tmp1 = textA[len]; 356 textA[len] = 0; 357 tmp2 = textB[len]; 358 textB[len] = 0; 359 360 res = lstrcmpiA(textA,textB); 361 362 textA[len] = tmp1; 363 textB[len] = tmp2; 364 return res; 365 } 366 367 INT lstrcmpniAtoW(CHAR *textA,WCHAR* textB,INT len) 368 { 369 WCHAR *tmp; 370 INT res; 371 372 tmp = (WCHAR*)COMCTL32_Alloc((len+1)*sizeof(WCHAR)); 373 lstrcpynAtoW(tmp,textA,len+1); 374 375 res = lstrcmpniW(tmp,textB,len); 376 377 COMCTL32_Free(tmp); 378 return res; 379 } 380 381 382 INT lstrcmpniW(WCHAR *textA,WCHAR *textB,INT len) 383 { 384 WCHAR tmp1,tmp2; 385 INT res; 386 387 tmp1 = textA[len]; 388 textA[len] = 0; 389 tmp2 = textB[len]; 390 textB[len] = 0; 391 392 res = lstrcmpiW(textA,textB); 393 394 textA[len] = tmp1; 395 textB[len] = tmp2; 396 return res; 397 } 398 399 INT lstrcmpniAW(WCHAR *textA,BOOL unicodeA,WCHAR *textB,BOOL unicodeB,INT len) 400 { 401 if (unicodeA) 402 { 403 if (unicodeB) 404 { 405 return lstrcmpniW(textA,textB,len); 406 } else 407 { 408 return lstrcmpniAtoW((LPSTR)textB,textA,len); 409 } 410 } else 411 { 412 if (unicodeB) 413 { 414 return lstrcmpniAtoW((LPSTR)textA,textB,len); 415 } else 416 { 417 return lstrcmpniA((LPSTR)textA,(LPSTR)textB,len); 418 } 419 } 420 } 421 348 422 CHAR* lstrstrA(CHAR *text,CHAR *subtext) 349 423 {
Note:
See TracChangeset
for help on using the changeset viewer.