From 639b5957d9c7b6d8bef6784e3467ccc055ddeea4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 15 Sep 2011 18:09:49 -0400 Subject: [PATCH] Minor --- util/options.cc | 5 +++-- util/options.hh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/util/options.cc b/util/options.cc index eb3ce69..561b6aa 100644 --- a/util/options.cc +++ b/util/options.cc @@ -435,7 +435,7 @@ font_options_t::get_font (void) const GMappedFile *mf = g_mapped_file_new (font_file, FALSE, NULL); if (!mf) - fail (FALSE, "Failed opening font file `%s'", font_file); + fail (FALSE, "Failed opening font file `%s'", g_filename_display_name (font_file)); font_data = g_mapped_file_get_contents (mf); len = g_mapped_file_get_length (mf); destroy = (hb_destroy_func_t) g_mapped_file_unref; @@ -473,9 +473,10 @@ text_options_t::get_line (unsigned int *len) GMappedFile *mf = g_mapped_file_new (text_file, FALSE, NULL); if (!mf) - fail (FALSE, "Failed opening text file `%s'", text_file); + fail (FALSE, "Failed opening text file `%s'", g_filename_display_name (text_file)); text = g_mapped_file_get_contents (mf); text_len = g_mapped_file_get_length (mf); + printf ("%d\n", text_len); } if (text_len == (unsigned int) -1) diff --git a/util/options.hh b/util/options.hh index 48a3ff7..b213872 100644 --- a/util/options.hh +++ b/util/options.hh @@ -245,8 +245,8 @@ struct output_options_t : option_group_t fp = output_file ? fopen (output_file, "wb") : stdout; if (!fp) - fail (FALSE, "Cannot open output file '%s': %s", - output_file, strerror (errno)); + fail (FALSE, "Cannot open output file `%s': %s", + g_filename_display_name (output_file), strerror (errno)); return fp; } -- 2.7.4