X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcase-ordering.c;h=c4a716e079e81eb42a0d6ab4bf703da5988ca2cc;hb=b32591022aa3ce9b7f74e154d68577d31ae2967f;hp=e9e7095ead9fc1a5916356e87cd4f018cb023c10;hpb=5da5a98055ad574120c3e3922af097411a0dcf3a;p=pspp
diff --git a/src/data/case-ordering.c b/src/data/case-ordering.c
index e9e7095ead..c4a716e079 100644
--- a/src/data/case-ordering.c
+++ b/src/data/case-ordering.c
@@ -1,20 +1,18 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
Copyright (C) 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program 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
- General Public License for more details.
+ This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see . */
#include
@@ -39,8 +37,6 @@ struct sort_key
/* A set of criteria for ordering cases. */
struct case_ordering
{
- size_t value_cnt; /* Number of `union value's per case. */
-
/* Sort keys. */
struct sort_key *keys;
size_t key_cnt;
@@ -51,10 +47,9 @@ struct case_ordering
contains no variables, so that all cases will compare as
equal. */
struct case_ordering *
-case_ordering_create (const struct dictionary *dict)
+case_ordering_create (void)
{
struct case_ordering *co = xmalloc (sizeof *co);
- co->value_cnt = dict_get_next_value_idx (dict);
co->keys = NULL;
co->key_cnt = 0;
return co;
@@ -65,7 +60,6 @@ struct case_ordering *
case_ordering_clone (const struct case_ordering *orig)
{
struct case_ordering *co = xmalloc (sizeof *co);
- co->value_cnt = orig->value_cnt;
co->keys = xmemdup (orig->keys, orig->key_cnt * sizeof *orig->keys);
co->key_cnt = orig->key_cnt;
return co;
@@ -82,15 +76,6 @@ case_ordering_destroy (struct case_ordering *co)
}
}
-/* Returns the number of `union value's in the cases that case
- ordering CO compares (taken from the dictionary used to
- construct it). */
-size_t
-case_ordering_get_value_cnt (const struct case_ordering *co)
-{
- return co->value_cnt;
-}
-
/* Compares cases A and B given case ordering CO and returns a
strcmp()-type result. */
int