Add lots of comments. Some minor substantive changes too:
[pspp-builds.git] / src / data / case-ordering.h
index f537829d9cc80ae0c22c6c4b6011118c8bc91bb0..841d943f48c30277ab70c6b11aada08899c4120f 100644 (file)
@@ -16,6 +16,8 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA. */
 
+/* Sort order for comparing cases. */
+
 #ifndef DATA_CASE_ORDERING_H
 #define DATA_CASE_ORDERING_H 1
 
@@ -31,18 +33,24 @@ enum sort_direction
     SRT_DESCEND                        /* Z, Y, X, ..., C, B, A. */
   };
 
+/* Creation and destruction. */
 struct case_ordering *case_ordering_create (const struct dictionary *);
 struct case_ordering *case_ordering_clone (const struct case_ordering *);
 void case_ordering_destroy (struct case_ordering *);
 
-size_t case_ordering_get_value_cnt (const struct case_ordering *);
+/* Modification. */
+bool case_ordering_add_var (struct case_ordering *,
+                            const struct variable *, enum sort_direction);
+
+/* Comparing cases. */
 int case_ordering_compare_cases (const struct ccase *, const struct ccase *,
                                  const struct case_ordering *);
 
-bool case_ordering_add_var (struct case_ordering *,
-                            const struct variable *, enum sort_direction);
+/* Inspection. */
+size_t case_ordering_get_value_cnt (const struct case_ordering *);
 size_t case_ordering_get_var_cnt (const struct case_ordering *);
-const struct variable *case_ordering_get_var (const struct case_ordering *, size_t);
+const struct variable *case_ordering_get_var (const struct case_ordering *,
+                                              size_t);
 enum sort_direction case_ordering_get_direction (const struct case_ordering *,
                                                  size_t);
 void case_ordering_get_vars (const struct case_ordering *,