Fossil SCM
Amend [9919dfbbaa]: fix a comment typo and rename a variable.
Commit
d7d106227fad4ae365daa9c309f23daeb231bc0f40e67135dc335cb7e75381d6
Parent
3bb9cbe8cc1fdf8…
1 file changed
+4
-4
+4
-4
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -300,15 +300,15 @@ | ||
| 300 | 300 | int win32_compare_filenames_nocase( |
| 301 | 301 | const wchar_t *fn1, |
| 302 | 302 | const wchar_t *fn2 |
| 303 | 303 | ){ |
| 304 | 304 | static FARPROC fnCompareStringOrdinal; |
| 305 | - static int try_fnCompareStringOrdinal; | |
| 306 | - if( !try_fnCompareStringOrdinal ){ | |
| 305 | + static int tried_CompareStringOrdinal; | |
| 306 | + if( !tried_CompareStringOrdinal ){ | |
| 307 | 307 | fnCompareStringOrdinal = |
| 308 | 308 | GetProcAddress(GetModuleHandleA("kernel32"),"CompareStringOrdinal"); |
| 309 | - try_fnCompareStringOrdinal = 1; | |
| 309 | + tried_CompareStringOrdinal = 1; | |
| 310 | 310 | } |
| 311 | 311 | if( fnCompareStringOrdinal ){ |
| 312 | 312 | return -2 + fnCompareStringOrdinal(fn1,-1,fn2,-1,1); |
| 313 | 313 | }else{ |
| 314 | 314 | return lstrcmpiW(fn1,fn2); |
| @@ -319,11 +319,11 @@ | ||
| 319 | 319 | #define IS_DIRSEP(s,i) ( s[i]=='/' || s[i]=='\\' ) |
| 320 | 320 | #define NEXT_DIRSEP(s,i) while( s[i] && s[i]!='/' && s[i]!='\\' ){i++;} |
| 321 | 321 | |
| 322 | 322 | /* The Win32 version of file_case_preferred_name() from file.c, which is able to |
| 323 | 323 | ** find case-preserved file names containing non-ASCII characters. The result is |
| 324 | -** allocated by fossil_malloc() and *should* be free'd by tha caller. While this | |
| 324 | +** allocated by fossil_malloc() and *should* be free'd by the caller. While this | |
| 325 | 325 | ** function usually gets canonicalized paths, it is able to handle any input and |
| 326 | 326 | ** figure out more cases than the original: |
| 327 | 327 | ** |
| 328 | 328 | ** fossil test-case-filename C:/ .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 329 | 329 | ** → Original: .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 330 | 330 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -300,15 +300,15 @@ | |
| 300 | int win32_compare_filenames_nocase( |
| 301 | const wchar_t *fn1, |
| 302 | const wchar_t *fn2 |
| 303 | ){ |
| 304 | static FARPROC fnCompareStringOrdinal; |
| 305 | static int try_fnCompareStringOrdinal; |
| 306 | if( !try_fnCompareStringOrdinal ){ |
| 307 | fnCompareStringOrdinal = |
| 308 | GetProcAddress(GetModuleHandleA("kernel32"),"CompareStringOrdinal"); |
| 309 | try_fnCompareStringOrdinal = 1; |
| 310 | } |
| 311 | if( fnCompareStringOrdinal ){ |
| 312 | return -2 + fnCompareStringOrdinal(fn1,-1,fn2,-1,1); |
| 313 | }else{ |
| 314 | return lstrcmpiW(fn1,fn2); |
| @@ -319,11 +319,11 @@ | |
| 319 | #define IS_DIRSEP(s,i) ( s[i]=='/' || s[i]=='\\' ) |
| 320 | #define NEXT_DIRSEP(s,i) while( s[i] && s[i]!='/' && s[i]!='\\' ){i++;} |
| 321 | |
| 322 | /* The Win32 version of file_case_preferred_name() from file.c, which is able to |
| 323 | ** find case-preserved file names containing non-ASCII characters. The result is |
| 324 | ** allocated by fossil_malloc() and *should* be free'd by tha caller. While this |
| 325 | ** function usually gets canonicalized paths, it is able to handle any input and |
| 326 | ** figure out more cases than the original: |
| 327 | ** |
| 328 | ** fossil test-case-filename C:/ .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 329 | ** → Original: .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 330 |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -300,15 +300,15 @@ | |
| 300 | int win32_compare_filenames_nocase( |
| 301 | const wchar_t *fn1, |
| 302 | const wchar_t *fn2 |
| 303 | ){ |
| 304 | static FARPROC fnCompareStringOrdinal; |
| 305 | static int tried_CompareStringOrdinal; |
| 306 | if( !tried_CompareStringOrdinal ){ |
| 307 | fnCompareStringOrdinal = |
| 308 | GetProcAddress(GetModuleHandleA("kernel32"),"CompareStringOrdinal"); |
| 309 | tried_CompareStringOrdinal = 1; |
| 310 | } |
| 311 | if( fnCompareStringOrdinal ){ |
| 312 | return -2 + fnCompareStringOrdinal(fn1,-1,fn2,-1,1); |
| 313 | }else{ |
| 314 | return lstrcmpiW(fn1,fn2); |
| @@ -319,11 +319,11 @@ | |
| 319 | #define IS_DIRSEP(s,i) ( s[i]=='/' || s[i]=='\\' ) |
| 320 | #define NEXT_DIRSEP(s,i) while( s[i] && s[i]!='/' && s[i]!='\\' ){i++;} |
| 321 | |
| 322 | /* The Win32 version of file_case_preferred_name() from file.c, which is able to |
| 323 | ** find case-preserved file names containing non-ASCII characters. The result is |
| 324 | ** allocated by fossil_malloc() and *should* be free'd by the caller. While this |
| 325 | ** function usually gets canonicalized paths, it is able to handle any input and |
| 326 | ** figure out more cases than the original: |
| 327 | ** |
| 328 | ** fossil test-case-filename C:/ .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 329 | ** → Original: .//..\WINDOWS\/.//.\SYSTEM32\.\NOTEPAD.EXE |
| 330 |