diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-23 18:06:56 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-23 18:06:56 +0200 |
commit | 5c5f845370223bb9350aed8a8241546ccc8fdcd9 (patch) | |
tree | 163114fd2399f4319a0e1547db617566ad5f374c /src | |
parent | improve makefile (diff) | |
download | libpassphrase-5c5f845370223bb9350aed8a8241546ccc8fdcd9.tar.gz libpassphrase-5c5f845370223bb9350aed8a8241546ccc8fdcd9.tar.bz2 libpassphrase-5c5f845370223bb9350aed8a8241546ccc8fdcd9.tar.xz |
missed the putchar:s
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/passphrase.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/passphrase.c b/src/passphrase.c index 6496701..0054091 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -57,7 +57,7 @@ static inline char* xrealloc(char* array, size_t cur_size, size_t new_size) # define xprintf(...) /* do nothing */ # define xflush() /* do nothing */ #elif defined(PASSPHRASE_MOVE) || defined(PASSPHRASE_STAR) -# define xprintf(format, ...) fprintf(stderr, format, __VA_ARGS__) +# define xprintf(FORMAT, ...) fprintf(stderr, FORMAT, __VA_ARGS__) # define xflush() fflush(stderr) #else # define xflush() fflush(stderr) @@ -66,9 +66,9 @@ static inline char* xrealloc(char* array, size_t cur_size, size_t new_size) #ifdef PASSPHRASE_MOVE # if defined(PASSPHRASE_STAR) -# define xputchar(C) ({ if ((C & 0xC0) != 0x80) putchar('*'); }) +# define xputchar(C) ({ if ((C & 0xC0) != 0x80) fputc('*', stderr); }) # elif defined(PASSPHRASE_ECHO) -# define xputchar(C) putchar(C) +# define xputchar(C) fputc(C, stderr) # else # define xputchar(C) ({ /* be silent */ }) # endif @@ -298,7 +298,7 @@ char* passphrase_read(void) { if (len == 0) continue; - xprintf("\033[D \033[D"); + xprintf("%s", "\033[D \033[D"); xflush(); *(rc + --len) = 0; #ifdef DEBUG @@ -308,7 +308,7 @@ char* passphrase_read(void) #endif } if ((c & 0xC0) != 0x80) - putchar('*'); + fputc('*', stderr); *(rc + len++) = c; #else *(rc + len++) = c; |