+
+static int catname_cmp ( const void *p1, const void *p2 ) {
+ mm_category_t *c1 = (mm_category_t*) p1;
+ mm_category_t *c2 = (mm_category_t*) p2;
+ return ( strcasecmp ( c1 -> catname, c2 -> catname ) );
+}
+
+void category_sort ( void ) {
+ // we probably don't want to sort tab categories, since the user may have specified an ordering
+ // But we can sort invisi-cats, to make them easier to find, and ordered by parent category
+
+ qsort ( _categories_invis, _categories_inviscount, sizeof(mm_category_t), catname_cmp );
+
+ return;
+}