Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sort_entries(char **entries, int reverse)
- {
- char **next;
- char **previous;
- char *t;
- int value;
- previous = tab;
- while (*(next = previous + 1))
- {
- value = strcasecmp(*previous, *next);
- if ((!reverse && value > 0)
- || (reverse && value < 0))
- {
- t = *previous;
- *previous = *next;
- *next = t;
- previous = entries;
- continue ;
- }
- previous++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement