| 6296 | |
| 6297 | |
| 6298 | int SortByNakedFilename(const void *a1, const void *a2) |
| 6299 | // See comments in prior function for details. |
| 6300 | { |
| 6301 | LPTSTR sort_item1 = *(LPTSTR *)a1; |
| 6302 | LPTSTR sort_item2 = *(LPTSTR *)a2; |
| 6303 | LPTSTR cp; |
| 6304 | if (cp = _tcsrchr(sort_item1, '\\')) // Assign |
| 6305 | sort_item1 = cp + 1; |
| 6306 | if (cp = _tcsrchr(sort_item2, '\\')) // Assign |
| 6307 | sort_item2 = cp + 1; |
| 6308 | // v1.0.43.03: Added support the new locale-insensitive mode. |
| 6309 | int result = (g_SortCaseSensitive != SCS_INSENSITIVE_LOGICAL) |
| 6310 | ? tcscmp2(sort_item1, sort_item2, g_SortCaseSensitive) // Resolve large macro only once for code size reduction. |
| 6311 | : StrCmpLogicalW(sort_item1, sort_item2); |
| 6312 | if (!result) |
| 6313 | result = (sort_item1 > sort_item2) ? 1 : -1; // Stable sort. |
| 6314 | return g_SortReverse ? -result : result; |
| 6315 | } |
| 6316 | |
| 6317 | |
| 6318 |
nothing calls this directly
no outgoing calls
no test coverage detected