X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fsys-file-info.c;h=bb990c79d9e093aa28d292e2368faa34eaccdc13;hb=261869b71aa60b8974c4a6b98e35b74af5d11de5;hp=84a4d8e87c604cf64040ad2805ddb2a36b4f41e3;hpb=cf5e75010ed9fa9b8eb75a71d1419d40e1a8ddd8;p=pspp diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index 84a4d8e87c..bb990c79d9 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012 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 @@ -77,7 +77,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) lex_match_id (lexer, "FILE"); lex_match (lexer, T_EQUALS); - h = fh_parse (lexer, FH_REF_FILE); + h = fh_parse (lexer, FH_REF_FILE, NULL); if (!h) return CMD_FAILURE; @@ -138,8 +138,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) tab_text (t, 0, 10, TAB_LEFT, _("Charset:")); - tab_text (t, 1, 10, TAB_LEFT, - dict_get_encoding(d) ? dict_get_encoding(d) : _("Unknown")); + tab_text (t, 1, 10, TAB_LEFT, dict_get_encoding (d)); tab_submit (t); @@ -164,6 +163,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) dict_destroy (d); fh_unref (h); + sfm_read_info_destroy (&info); return CMD_SUCCESS; } @@ -197,10 +197,8 @@ cmd_display (struct lexer *lexer, struct dataset *ds) tab_output_text (TAB_LEFT, _("The active dataset does not have a file label.")); else - { - tab_output_text (TAB_LEFT | TAT_TITLE, _("File label:")); - tab_output_text (TAB_LEFT | TAB_FIX, dict_get_label (dataset_dict (ds))); - } + tab_output_text_format (TAB_LEFT, _("File label: %s"), + dict_get_label (dataset_dict (ds))); } else { @@ -396,7 +394,7 @@ display_attributes (struct tab_table *t, const struct attrset *set, int flags, for (i = 0; i < n_values; i++) { if (n_values > 1) - tab_text_format (t, c, r, TAB_LEFT, "%s[%d]", name, i + 1); + tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, i + 1); else tab_text (t, c, r, TAB_LEFT, name); tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, i));