Changeset 194 for trunk/src/helpers/dosh2.c
- Timestamp:
- Jul 28, 2002, 11:48:47 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/dosh2.c
r170 r194 2046 2046 2047 2047 // skip extra asterisks 2048 /* 2048 2049 do 2049 2050 { 2050 2051 ++pMask; 2051 2052 } while (*pMask == '*'); 2053 */ 2054 2055 while (*(++pMask) == '*') // V0.9.20 (2002-07-25) [umoeller] 2056 ; 2052 2057 2053 2058 // pMask points to after '*'; … … 2089 2094 2090 2095 /* 2091 *@@ doshMatch :2096 *@@ doshMatchCase: 2092 2097 * this matches '*' and '?' wildcards, similar to what 2093 * DosEditName does. It returns TRUE if the given name 2094 * matches the given mask. 2095 * 2096 * However, this does not require a file to be present, but 2097 * works on strings only. 2098 * DosEditName does. However, this does not require a 2099 * file to be present, but works on strings only. 2100 * 2101 * Returns TRUE if the given name matches the given mask. 2098 2102 * 2099 2103 * This accepts both short and fully qualified masks and … … 2106 2110 * wildcards. 2107 2111 * 2108 * -- This compares without respect to case always. 2112 * -- This compares WITH respect to case always. Upper-case 2113 * both the mask and the name before calling this, or 2114 * use doshMatch instead. 2109 2115 * 2110 2116 * -- As opposed to the WPS, this handles multiple dots in … … 2113 2119 * one will. 2114 2120 * 2115 * -- THIS COMPARES WITH RESPECT TO CASE.2116 *2117 2121 * This replaces strhMatchOS2 which has been removed with 2118 2122 * V0.9.16 and is a lot faster than the old code, which has … … 2127 2131 BOOL brc = FALSE; 2128 2132 2129 int iMaskDrive = -1,2130 iNameDrive = -1;2131 2132 2133 PCSZ pLastMaskComponent, 2133 2134 pLastNameComponent; … … 2135 2136 ULONG cbMaskPath = 0, 2136 2137 cbNamePath = 0; 2137 2138 CHAR c;2139 2138 2140 2139 if (pLastMaskComponent = strrchr(pcszMask, '\\')) … … 2176 2175 2177 2176 /* 2177 *@@ doshMatchCaseNoPath: 2178 * like doshMatchCase, but is faster if you are sure that 2179 * neither pcszMask nor pcszName contain path separators 2180 * ("\" characters). In other words, this is for short 2181 * filenames. 2182 * 2183 *@@added V0.9.20 (2002-07-25) [umoeller] 2184 */ 2185 2186 BOOL doshMatchCaseNoPath(const char *pcszMask, // in: mask (e.g. "*.TXT") 2187 const char *pcszName) // in: string to check (e.g. "TEST.TXT") 2188 { 2189 return PerformMatch(pcszMask, 2190 pcszName, 2191 // has dot? 2192 (strchr(pcszName, '.') != NULL)); 2193 } 2194 2195 /* 2178 2196 *@@ doshMatch: 2179 2197 * like doshMatchCase, but compares without respect … … 2192 2210 2193 2211 memcpy(pszMask, pcszMask, cbMask + 1); 2194 nlsUpper(pszMask , cbMask);2212 nlsUpper(pszMask); 2195 2213 memcpy(pszName, pcszName, cbName + 1); 2196 nlsUpper(pszName , cbName);2197 2198 return (doshMatchCase(pszMask,2199 pszName));2200 } 2214 nlsUpper(pszName); 2215 2216 return doshMatchCase(pszMask, 2217 pszName); 2218 }
Note:
See TracChangeset
for help on using the changeset viewer.