X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fsys-file-info.c;h=78eaecb47f187b909be3dfddcda79949d15cf098;hb=2c7d1b0285e21571b1e50def87e33095f095ce4e;hp=1e9981fc02063332edc6ecad4243285e9bc42d1b;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index 1e9981fc02..78eaecb47f 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -135,7 +135,8 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) (unsigned int) dict_get_var_cnt (d)); tab_text (t, 0, 6, TAB_LEFT, _("Cases:")); tab_text (t, 1, 6, TAB_LEFT | TAT_PRINTF, - info.case_cnt == -1 ? _("Unknown") : "%d", info.case_cnt); + info.case_cnt == -1 ? _("Unknown") : "%ld", + (long int) info.case_cnt); tab_text (t, 0, 7, TAB_LEFT, _("Type:")); tab_text (t, 1, 7, TAB_LEFT, _("System File.")); tab_text (t, 0, 8, TAB_LEFT, _("Weight:")); @@ -165,7 +166,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) struct variable *v = dict_get_var (d, i); const int nvl = val_labs_count (var_get_value_labels (v)); - if (r + 10 + nvl > nr) + if (r + 13 + nvl > nr) { nr = MAX (nr * dict_get_var_cnt (d) / (i + 1), nr); nr += 10 + nvl; @@ -406,7 +407,7 @@ display_variables (const struct variable **vl, size_t n, int as) { int nvl = val_labs_count (var_get_value_labels (v)); - if (r + 10 + nvl > nr) + if (r + 13 + nvl > nr) { nr = MAX (nr * n / (i + 1), nr); nr += 10 + nvl; @@ -454,6 +455,8 @@ describe_variable (const struct variable *v, struct tab_table *t, int r, int as) { const struct fmt_spec *print = var_get_print_format (v); const struct fmt_spec *write = var_get_write_format (v); + enum measure m = var_get_measure (v); + enum alignment a = var_get_alignment (v); /* Put the name, var label, and position into the first row. */ tab_text (t, 0, r, TAB_LEFT, var_get_name (v)); @@ -484,6 +487,23 @@ describe_variable (const struct variable *v, struct tab_table *t, int r, int as) r++; } + /* Measurement level, display width, alignment. */ + tab_joint_text (t, 1, r, 2, r, TAB_LEFT | TAT_PRINTF, + _("Measure: %s"), + m == MEASURE_NOMINAL ? _("Nominal") + : m == MEASURE_ORDINAL ? _("Ordinal") + : _("Scale")); + r++; + tab_joint_text (t, 1, r, 2, r, TAB_LEFT | TAT_PRINTF, + _("Display Alignment: %s"), + a == ALIGN_LEFT ? _("Left") + : a == ALIGN_CENTRE ? _("Center") + : _("Right")); + r++; + tab_joint_text (t, 1, r, 2, r, TAB_LEFT | TAT_PRINTF, + _("Display Width: %d"), var_get_display_width (v)); + r++; + /* Missing values if any. */ if (var_has_missing_values (v)) {