* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02110-1301, USA.
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02110-1301, USA.
- if (!list) {
- return NULL;
- }
- if (!list->next) {
- return list;
- }
-
- l1 = list;
- l2 = list->next;
-
- while ((l2 = l2->next) != NULL) {
- if ((l2 = l2->next) == NULL)
- break;
- l1=l1->next;
- }
- l2 = l1->next;
- l1->next = NULL;
-
- return fluid_list_sort_merge(fluid_list_sort(list, compare_func),
- fluid_list_sort(l2, compare_func),
- compare_func);
+ if(!list)
+ {
+ return NULL;
+ }
+
+ if(!list->next)
+ {
+ return list;
+ }
+
+ l1 = list;
+ l2 = list->next;
+
+ while((l2 = l2->next) != NULL)
+ {
+ if((l2 = l2->next) == NULL)
+ {
+ break;
+ }
+
+ l1 = l1->next;
+ }
+
+ l2 = l1->next;
+ l1->next = NULL;
+
+ return fluid_list_sort_merge(fluid_list_sort(list, compare_func),
+ fluid_list_sort(l2, compare_func),
+ compare_func);
}
/* Compare function to sort strings alphabetically,
* for use with fluid_list_sort(). */
int
}
/* Compare function to sort strings alphabetically,
* for use with fluid_list_sort(). */
int