diff options
author | Werner Koch <[email protected]> | 2000-01-24 11:55:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2000-01-24 11:55:49 +0000 |
commit | 0070faa0ffd5c366bc20f477a4838b701c20b063 (patch) | |
tree | 4fb8a63c5f2b7cb4b33a51247bdc8961caa89720 /util/ttyio.c | |
parent | See ChangeLog: Fri Dec 31 14:06:56 CET 1999 Werner Koch (diff) | |
download | gnupg-0070faa0ffd5c366bc20f477a4838b701c20b063.tar.gz gnupg-0070faa0ffd5c366bc20f477a4838b701c20b063.zip |
See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner Koch
Diffstat (limited to 'util/ttyio.c')
-rw-r--r-- | util/ttyio.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/ttyio.c b/util/ttyio.c index 35e0d318f..8dacb555e 100644 --- a/util/ttyio.c +++ b/util/ttyio.c @@ -161,19 +161,19 @@ tty_printf( const char *fmt, ... ) * it, so we use a static buffer for now */ do { if( n == -1 || !buf ) { - m_free(buf); + gcry_free(buf); bufsize += 200; /* better check the new size; (we use M$ functions) */ if( bufsize > 50000 ) log_bug("vsnprintf probably failed\n"); - buf = m_alloc( bufsize ); + buf = gcry_xmalloc( bufsize ); } n = _vsnprintf(buf, bufsize-1, fmt, arg_ptr); } while( n == -1 ); #else if( !buf ) { bufsize += 1000; - buf = m_alloc( bufsize ); + buf = gcry_xmalloc( bufsize ); } n = vsprintf(buf, fmt, arg_ptr); if( n == -1 ) @@ -252,7 +252,7 @@ tty_print_utf8_string( byte *p, size_t n ) if( i < n ) { buf = utf8_to_native( p, n ); tty_printf("%s", buf ); - m_free( buf ); + gcry_free( buf ); } else tty_print_string( p, n ); @@ -284,7 +284,7 @@ do_get( const char *prompt, int hidden ) last_prompt_len = 0; tty_printf( prompt ); - buf = m_alloc(n=50); + buf = gcry_xmalloc(n=50); i = 0; #ifdef __MINGW32__ /* windoze version */ @@ -313,7 +313,7 @@ do_get( const char *prompt, int hidden ) continue; if( !(i < n-1) ) { n += 50; - buf = m_realloc( buf, n ); + buf = gcry_xrealloc( buf, n ); } buf[i++] = c; } @@ -353,7 +353,7 @@ do_get( const char *prompt, int hidden ) continue; if( !(i < n-1) ) { n += 50; - buf = m_realloc( buf, n ); + buf = gcry_xrealloc( buf, n ); } buf[i++] = c; } @@ -425,7 +425,7 @@ tty_get_answer_is_yes( const char *prompt ) char *p = tty_get( prompt ); tty_kill_prompt(); yes = answer_is_yes(p); - m_free(p); + gcry_free(p); return yes; } |