+static int sessioncmp(const void *av, const void *bv) {
+ const char *a = *(const char *const *)av;
+ const char *b = *(const char *const *)bv;
+
+ /*
+ * Alphabetical order, except that "Default Settings" is a
+ * special case and comes first.
+ */
+ if (!strcmp(a, "Default Settings"))
+ return -1; /* a comes first */
+ if (!strcmp(b, "Default Settings"))
+ return +1; /* b comes first */
+ return strcmp(a, b); /* otherwise, compare normally */
+}
+