| 50 | } |
| 51 | |
| 52 | int nameSortFunction(char*& a, char*& b) |
| 53 | { |
| 54 | // ".." sorts before everything except itself. |
| 55 | bool aIsParent = strcmp(a, "..") == 0; |
| 56 | bool bIsParent = strcmp(b, "..") == 0; |
| 57 | |
| 58 | if (aIsParent && bIsParent) |
| 59 | return 0; |
| 60 | else if (aIsParent) // Sorts before |
| 61 | return -1; |
| 62 | else if (bIsParent) // Sorts after |
| 63 | return 1; |
| 64 | else |
| 65 | return strcasecmp(a, b); |
| 66 | } |
| 67 | |
| 68 | /* |
| 69 | * Determines whether a portion of a vector is sorted. |
nothing calls this directly
no outgoing calls
no test coverage detected