X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdata-in.h;h=2a8eedc1aebfe7980c4f747574cbe8cfd1ac63ef;hb=4ec88a3abb859304f42a5905231704b2ecfaf711;hp=287b2fbeda7bf180543c895b483c7cfd2fb82886;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/data/data-in.h b/src/data/data-in.h index 287b2fbeda..2a8eedc1ae 100644 --- a/src/data/data-in.h +++ b/src/data/data-in.h @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. - Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. - Written by Ben Pfaff . + Copyright (C) 1997-9, 2000, 2006 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 @@ -22,31 +21,19 @@ #include #include +#include +#include +#include #include "format.h" -/* Flags. */ -enum - { - DI_IGNORE_ERROR = 01, /* Don't report errors to the user. */ - DI_IMPLIED_DECIMALS = 02 /* Insert decimals if no '.' in input. */ - }; +enum integer_format data_in_get_integer_format (void); +void data_in_set_integer_format (enum integer_format); -/* Information about parsing one data field. */ -struct data_in - { - const char *s; /* Source start. */ - const char *e; /* Source end. */ +enum float_format data_in_get_float_format (void); +void data_in_set_float_format (enum float_format); - union value *v; /* Destination. */ - - int flags; /* Zero or more of DI_*. */ - int f1, f2; /* Columns the field was taken from. */ - struct fmt_spec format; /* Format specification to use. */ - }; - -bool data_in (struct data_in *); - -void data_in_finite_line (struct data_in *di, const char *line, size_t len, - int fc, int lc); +bool data_in (struct substring input, + enum fmt_type, int implied_decimals, int first_column, + union value *output, int width); #endif /* data-in.h */