diff --git a/src/ChangeLog b/src/ChangeLog index 2ab8dc797..5c905d6f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-01-07 Roland Illig + + * view.c: Replaced calls to printw() with tty_printf() to get + rid of the str_unconst() function. + 2005-11-10 Pavel Roskin * global.h [!ENABLE_NLS]: Provide replacement for ngettext. diff --git a/src/view.c b/src/view.c index 1fa4c8f64..5e1bc03fb 100644 --- a/src/view.c +++ b/src/view.c @@ -1609,7 +1609,7 @@ view_percent (WView *view, offset_type p) percent = p * 100 / filesize; widget_move (view, top, right - 4); - printw (str_unconst ("%3d%%"), percent); + tty_printf ("%3d%%", percent); } static void @@ -1640,16 +1640,16 @@ view_display_status (WView *view) addstr ((char *) name_trunc (file_name, width)); else { i = (width > 22 ? 22 : width) - file_label_width; - printw (str_unconst (file_label), name_trunc (file_name, i)); + tty_printf (file_label, name_trunc (file_name, i)); if (width > 46) { widget_move (view, top, left + 24); /* FIXME: the format strings need to be changed when offset_type changes */ if (view->hex_mode) - printw (str_unconst (_("Offset 0x%08lx")), view->hex_cursor); + tty_printf (_("Offset 0x%08lx"), (unsigned long) view->hex_cursor); else { offset_type line, col; view_offset_to_coord (view, &line, &col, view->dpy_start); - printw (str_unconst (_("Line %lu Col %lu")), + tty_printf (_("Line %lu Col %lu"), (unsigned long) line + 1, (unsigned long) (view->text_wrap_mode ? col : view->dpy_text_column)); } @@ -1659,9 +1659,9 @@ view_display_status (WView *view) filesize = view_get_filesize (view); widget_move (view, top, left + 43); if (!view_may_still_grow (view)) { - printw (str_unconst (_("%s bytes")), size_trunc (filesize)); + tty_printf (_("%s bytes"), size_trunc (filesize)); } else { - printw (str_unconst (_(">= %s bytes")), size_trunc (filesize)); + tty_printf (_(">= %s bytes"), size_trunc (filesize)); } } if (width > 26) {