diff --git a/include/ttyio.h b/include/ttyio.h index 8e8722d7c..f3d83b9dc 100644 --- a/include/ttyio.h +++ b/include/ttyio.h @@ -30,9 +30,9 @@ int tty_batchmode( int onoff ); void tty_printf (const char *fmt, ... ); void tty_fprintf (FILE *fp, const char *fmt, ... ); #endif -void tty_print_string( byte *p, size_t n ); -void tty_print_utf8_string( byte *p, size_t n ); -void tty_print_utf8_string2( byte *p, size_t n, size_t max_n ); +void tty_print_string( const byte *p, size_t n ); +void tty_print_utf8_string( const byte *p, size_t n ); +void tty_print_utf8_string2( const byte *p, size_t n, size_t max_n ); char *tty_get( const char *prompt ); char *tty_get_hidden( const char *prompt ); void tty_kill_prompt(void); diff --git a/util/ChangeLog b/util/ChangeLog index 67cbb70c8..94e42cc3f 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2003-10-08 Werner Koch + + * ttyio.c (tty_print_string, tty_print_utf8_string2) + (tty_print_utf8_string): Made string arg const. + 2003-09-28 Timo Schulz * strgutil.c [WIN32] (asprintf): New. diff --git a/util/ttyio.c b/util/ttyio.c index e68c92b17..076ab7c67 100644 --- a/util/ttyio.c +++ b/util/ttyio.c @@ -268,7 +268,7 @@ tty_fprintf (FILE *fp, const char *fmt, ... ) * Print a string, but filter all control characters out. */ void -tty_print_string( byte *p, size_t n ) +tty_print_string( const byte *p, size_t n ) { if (no_terminal) return; @@ -306,7 +306,7 @@ tty_print_string( byte *p, size_t n ) } void -tty_print_utf8_string2( byte *p, size_t n, size_t max_n ) +tty_print_utf8_string2 (const byte *p, size_t n, size_t max_n ) { size_t i; char *buf; @@ -337,7 +337,7 @@ tty_print_utf8_string2( byte *p, size_t n, size_t max_n ) } void -tty_print_utf8_string( byte *p, size_t n ) +tty_print_utf8_string( const byte *p, size_t n ) { tty_print_utf8_string2( p, n, 0 ); }