SHARE
TWEET

Untitled

a guest Jun 27th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void         sort_entries(char **entries, int reverse)
  2. {
  3.     char     **next;
  4.     char     **previous;
  5.     char     *t;
  6.     int      value;
  7.  
  8.     previous = tab;
  9.     while (*(next = previous + 1))
  10.     {
  11.         value = strcasecmp(*previous, *next);
  12.         if ((!reverse && value > 0)
  13.             || (reverse && value < 0))
  14.         {
  15.             t = *previous;
  16.             *previous = *next;
  17.             *next = t;
  18.             previous = entries;
  19.             continue ;
  20.         }
  21.         previous++;
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top