From: John Darrington Date: Sat, 28 Mar 2009 12:00:26 +0000 (+0900) Subject: Display a file's encoding in SYSFILE INFO. X-Git-Tag: v0.7.3~194 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=f4768c8822dcce37de6286b2b5acccb69c61de97 Display a file's encoding in SYSFILE INFO. Add a file's encoding to the information given by SYSFILE INFO. --- diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index d6279159..6d033419 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -108,7 +108,7 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) } casereader_destroy (reader); - t = tab_create (2, 10, 0); + t = tab_create (2, 11, 0); tab_vline (t, TAL_GAP, 1, 0, 8); tab_text (t, 0, 0, TAB_LEFT, _("File:")); tab_text (t, 1, 0, TAB_LEFT, fh_get_file_name (h)); @@ -153,6 +153,13 @@ cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) tab_text (t, 0, 9, TAB_LEFT, _("Mode:")); tab_text (t, 1, 9, TAB_LEFT | TAT_PRINTF, _("Compression %s."), info.compressed ? _("on") : _("off")); + + + tab_text (t, 0, 10, TAB_LEFT, _("Charset:")); + tab_text (t, 1, 10, TAB_LEFT | TAT_PRINTF, + dict_get_encoding(d) ? dict_get_encoding(d) : _("Unknown")); + + tab_dim (t, tab_natural_dimensions); tab_submit (t); diff --git a/tests/command/sysfile-info.sh b/tests/command/sysfile-info.sh index 3456fba2..bc11fa3a 100755 --- a/tests/command/sysfile-info.sh +++ b/tests/command/sysfile-info.sh @@ -99,6 +99,7 @@ Cases: 3 Type: System File. Weight: Not weighted. Mode: Compression on. +Charset: Unknown +--------+-------------+---+ |Variable|Description |Pos| | | |iti|