(tty_print_string, tty_print_utf8_string2)

(tty_print_utf8_string): Made string arg const.
This commit is contained in:
Werner Koch 2003-10-08 15:20:58 +00:00
parent b7bd594c8c
commit fcbd46e070
3 changed files with 11 additions and 6 deletions

View File

@ -30,9 +30,9 @@ int tty_batchmode( int onoff );
void tty_printf (const char *fmt, ... ); void tty_printf (const char *fmt, ... );
void tty_fprintf (FILE *fp, const char *fmt, ... ); void tty_fprintf (FILE *fp, const char *fmt, ... );
#endif #endif
void tty_print_string( byte *p, size_t n ); void tty_print_string( const byte *p, size_t n );
void tty_print_utf8_string( byte *p, size_t n ); void tty_print_utf8_string( const byte *p, size_t n );
void tty_print_utf8_string2( byte *p, size_t n, size_t max_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( const char *prompt );
char *tty_get_hidden( const char *prompt ); char *tty_get_hidden( const char *prompt );
void tty_kill_prompt(void); void tty_kill_prompt(void);

View File

@ -1,3 +1,8 @@
2003-10-08 Werner Koch <wk@gnupg.org>
* ttyio.c (tty_print_string, tty_print_utf8_string2)
(tty_print_utf8_string): Made string arg const.
2003-09-28 Timo Schulz <twoaday@freakmail.de> 2003-09-28 Timo Schulz <twoaday@freakmail.de>
* strgutil.c [WIN32] (asprintf): New. * strgutil.c [WIN32] (asprintf): New.

View File

@ -268,7 +268,7 @@ tty_fprintf (FILE *fp, const char *fmt, ... )
* Print a string, but filter all control characters out. * Print a string, but filter all control characters out.
*/ */
void void
tty_print_string( byte *p, size_t n ) tty_print_string( const byte *p, size_t n )
{ {
if (no_terminal) if (no_terminal)
return; return;
@ -306,7 +306,7 @@ tty_print_string( byte *p, size_t n )
} }
void 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; size_t i;
char *buf; char *buf;
@ -337,7 +337,7 @@ tty_print_utf8_string2( byte *p, size_t n, size_t max_n )
} }
void 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 ); tty_print_utf8_string2( p, n, 0 );
} }