X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcase-source.h;h=833502cdebfe02a494dbe42b514205793132fbd5;hb=f7bc16cbaf850d5c6a1a577ad3fa3f82944de1e4;hp=4da72806de801ea12db44b60f749a0a9e59c99d7;hpb=0d7b430cd1cef60b963a54307622d6f4aa8efeb4;p=pspp-builds.git diff --git a/src/data/case-source.h b/src/data/case-source.h index 4da72806..833502cd 100644 --- a/src/data/case-source.h +++ b/src/data/case-source.h @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -24,9 +23,6 @@ struct ccase; -typedef struct write_case_data *write_case_data; -typedef bool write_case_func (write_case_data); - /* A case source. */ struct case_source { @@ -43,23 +39,23 @@ struct case_source_class WRITE_CASE, if known, or -1 otherwise. */ int (*count) (const struct case_source *); - /* Reads the cases one by one into C and for each one calls - WRITE_CASE passing the given AUX data. - Returns true if successful, false if an I/O error occurred. */ - bool (*read) (struct case_source *, - struct ccase *c, - write_case_func *write_case, write_case_data aux); + /* Reads one case into C. + Returns true if successful, false at end of file or if an + I/O error occurred. */ + bool (*read) (struct case_source *, struct ccase *); - /* Destroys the source. */ - void (*destroy) (struct case_source *); + /* Destroys the source. + Returns true if successful read, false if an I/O occurred + during destruction or previously. */ + bool (*destroy) (struct case_source *); }; struct case_source *create_case_source (const struct case_source_class *, void *); -void free_case_source (struct case_source *); +bool free_case_source (struct case_source *); -int case_source_is_class (const struct case_source *, +bool case_source_is_class (const struct case_source *, const struct case_source_class *); #endif /* case-source.h */