Changeset 3257 for trunk/src/shell32/shellpath.cpp
- Timestamp:
- Mar 28, 2000, 5:28:54 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shellpath.cpp
r3243 r3257 1 /* $Id: shellpath.cpp,v 1. 7 2000-03-26 16:34:52 cbratschi Exp $ */1 /* $Id: shellpath.cpp,v 1.8 2000-03-28 15:28:52 cbratschi Exp $ */ 2 2 3 3 /* … … 555 555 return 0; 556 556 } 557 557 558 static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask) 558 559 { 559 while (*name && *mask && *mask!=';') { 560 if (*mask=='*') { 561 do { 562 if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */ 560 while (*name && *mask && (*mask != ';')) 561 { 562 if (*mask == '*') 563 { 564 do 565 { 566 if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */ 563 567 } while (*name++); 564 return 0;568 return FALSE; 565 569 } 566 if ( towupper(*mask)!=towupper(*name) && *mask!='?') return 0;570 if ((towupper(*mask) != towupper(*name)) && (*mask != '?')) return 0; 567 571 name++; 568 572 mask++; 569 573 } 570 if (!*name) { 571 while (*mask=='*') mask++; 572 if (!*mask || *mask==';') return 1; 574 if (!*name) 575 { 576 while (*mask == '*') mask++; 577 if (!*mask || (*mask == ';')) return TRUE; 573 578 } 574 return 0; 579 580 return FALSE; 575 581 } 576 582 /************************************************************************* … … 586 592 TRACE("%s %s\n",name,mask); 587 593 588 if (!lstrcmpA( mask, "*.*" )) return 1; /* we don't require a period */ 589 590 while (*mask) { 591 if (PathMatchSingleMaskA(name,mask)) return 1; /* helper function */ 594 if (!lstrcmpA( mask, "*.*" )) return TRUE; /* we don't require a period */ 595 596 while (*mask) 597 { 598 if (PathMatchSingleMaskA(name,mask)) return TRUE; /* helper function */ 592 599 while (*mask && *mask!=';') mask++; 593 if (*mask==';') { 600 if (*mask==';') 601 { 594 602 mask++; 595 603 while (*mask==' ') mask++; /* masks may be separated by "; " */ 596 } 597 } 598 return 0; 599 } 604 } 605 } 606 607 return FALSE; 608 } 609 600 610 ODINFUNCTION2(BOOL, PathMatchSpecW, 601 611 LPCWSTR, name, 602 612 LPCWSTR, mask) 603 { WCHAR stemp[4];613 { 604 614 TRACE("%ls %ls\n",name,mask); 605 lstrcpyAtoW(stemp,"*.*"); 606 if (!lstrcmpW( mask, stemp )) return 1; /* we don't require a period */ 607 608 while (*mask) { 609 if (PathMatchSingleMaskW(name,mask)) return 1; /* helper function */ 610 while (*mask && *mask!=';') mask++; 611 if (*mask==';') { 615 616 if (!lstrcmpW( mask, (WCHAR*)L"*.*" )) return TRUE; /* we don't require a period */ 617 618 while (*mask) 619 { 620 if (PathMatchSingleMaskW(name,mask)) return TRUE; /* helper function */ 621 while (*mask && (*mask != ';')) mask++; 622 if (*mask == ';') 623 { 612 624 mask++; 613 625 while (*mask==' ') mask++; /* masks may be separated by "; " */ 614 } 615 } 616 return 0; 626 } 627 } 628 629 return FALSE; 617 630 } 618 631 ODINFUNCTION2(BOOL, PathMatchSpecAW, 619 632 LPVOID, name, 620 633 LPVOID, mask) 621 { if (VERSION_OsIsUnicode()) 634 { 635 if (VERSION_OsIsUnicode()) 622 636 return PathMatchSpecW( (LPWSTR)name, (LPWSTR)mask ); 623 637 return PathMatchSpecA( (LPSTR)name, (LPSTR)mask ); … … 1295 1309 FIXME("(%p),stub!\n", pSubKey); 1296 1310 1297 1311 return ERROR_SUCCESS; /* return success */ 1298 1312 } 1299 1313 … … 1309 1323 FIXME("(%p),stub!\n", pSubKey); 1310 1324 1311 1325 return ERROR_SUCCESS; /* return success */ 1312 1326 } 1313 1327 … … 1327 1341 FIXME("(%p),stub!\n", pSubKey); 1328 1342 1329 1343 return ERROR_SUCCESS; /* return success */ 1330 1344 } 1331 1345 … … 1343 1357 FIXME("(%p),stub!\n", pSubKey); 1344 1358 1345 1346 } 1347 1359 return ERROR_SUCCESS; /* return success */ 1360 } 1361
Note:
See TracChangeset
for help on using the changeset viewer.