X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fsort.h;h=63054413f539a0238f1efd7594faeb648a195869;hb=c87fb686f323f651a1d3f3892c31bf66788916d9;hp=4f8659e68d5de7100a431ee940c2e595a24506d7;hpb=37597beca4a11edba50b847932fdfeca3a648fa2;p=pspp diff --git a/src/sort.h b/src/sort.h index 4f8659e68d..63054413f5 100644 --- a/src/sort.h +++ b/src/sort.h @@ -20,37 +20,19 @@ #if !sort_h #define sort_h 1 -#include "vfm.h" - -/* Sort direction. */ -enum sort_direction - { - SRT_ASCEND, /* A, B, C, ..., X, Y, Z. */ - SRT_DESCEND /* Z, Y, X, ..., C, B, A. */ - }; - -/* SORT CASES input program. */ -struct sort_cases_pgm - { - int ref_cnt; /* Reference count. */ - - struct variable **vars; /* Variables to sort. */ - enum sort_direction *dirs; /* Sort directions. */ - int var_cnt; /* Number of variables to sort. */ - - struct internal_sort *isrt; /* Internal sort output. */ - struct external_sort *xsrt; /* External sort output. */ - size_t case_size; /* Number of bytes in case. */ - }; - -/* SORT CASES programmatic interface. */ - -typedef int read_sort_output_func (const struct ccase *, void *aux); - -struct sort_cases_pgm *parse_sort (void); -int sort_cases (struct sort_cases_pgm *, int separate); -void read_sort_output (struct sort_cases_pgm *, - read_sort_output_func, void *aux); -void destroy_sort_cases_pgm (struct sort_cases_pgm *); +#include + +struct casereader; +struct dictionary; +struct variable; + +struct sort_criteria *sort_parse_criteria (const struct dictionary *, + struct variable ***, int *); +void sort_destroy_criteria (struct sort_criteria *); + +struct casefile *sort_execute (struct casereader *, + const struct sort_criteria *); +int sort_active_file_in_place (const struct sort_criteria *); +struct casefile *sort_active_file_to_casefile (const struct sort_criteria *); #endif /* !sort_h */