X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fformat.h;h=da33f5f3abf323a973628c3297256b9ff068c45f;hb=6d7e2826ba9c863f6261e9718e0e822e0ca60aa0;hp=470c45cbf7117308702130afca56223a034098a2;hpb=25fae0555073f526e5d5825133a2f62454a7b4c6;p=pspp diff --git a/src/format.h b/src/format.h index 470c45cbf7..da33f5f3ab 100644 --- a/src/format.h +++ b/src/format.h @@ -14,8 +14,8 @@ 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., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #if !format_h #define format_h 1 @@ -71,6 +71,24 @@ struct fmt_spec int d; /* Number of implied decimal places. */ }; + +enum alignment + { + ALIGN_LEFT = 0, + ALIGN_RIGHT = 1, + ALIGN_CENTRE = 2 + }; + + +enum measure + { + MEASURE_NOMINAL=1, + MEASURE_ORDINAL=2, + MEASURE_SCALE=3 + }; + + + /* Descriptions of all the display formats above. */ extern struct fmt_desc formats[]; @@ -86,6 +104,9 @@ enum fmt_parse_flags FMTP_SUPPRESS_ERRORS = 002 /* 1=Do not emit error messages. */ }; +/* Common formats. */ +extern const struct fmt_spec f8_2; /* F8.2. */ + int parse_format_specifier (struct fmt_spec *input, enum fmt_parse_flags); int parse_format_specifier_name (const char **cp, enum fmt_parse_flags); int check_input_specifier (const struct fmt_spec *spec, int emit_error); @@ -101,5 +122,7 @@ int translate_fmt (int spss); void data_out (char *s, const struct fmt_spec *fp, const union value *v); char *fmt_to_string (const struct fmt_spec *); void num_to_string (double v, char *s, int w, int d); +struct fmt_spec make_input_format (int type, int w, int d); +struct fmt_spec make_output_format (int type, int w, int d); #endif /* !format_h */