diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-09-30 18:27:02 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-09-30 18:27:02 +0000 |
commit | 88a72857d93404b78081f9247cb1d1ef76e030c5 (patch) | |
tree | 31821369350e182ab127e3be9338076c22ee4574 /usr.bin/dc/bcode.c | |
parent | 9dc04f238ee7a2fd151ee8259ff9369c92f2c762 (diff) |
Flush stdout after P operator. Improves interaction with bc(1).
Diffstat (limited to 'usr.bin/dc/bcode.c')
-rw-r--r-- | usr.bin/dc/bcode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c index 8948abfd780..e3c34d48850 100644 --- a/usr.bin/dc/bcode.c +++ b/usr.bin/dc/bcode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcode.c,v 1.6 2003/09/28 19:15:53 otto Exp $ */ +/* $OpenBSD: bcode.c,v 1.7 2003/09/30 18:27:01 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -17,7 +17,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: bcode.c,v 1.6 2003/09/28 19:15:53 otto Exp $"; +static const char rcsid[] = "$OpenBSD: bcode.c,v 1.7 2003/09/30 18:27:01 otto Exp $"; #endif /* not lint */ #include <ssl/ssl.h> @@ -452,9 +452,11 @@ pop_print(void) case BCODE_NUMBER: normalize(value->u.num, 0); print_ascii(stdout, value->u.num); + fflush(stdout); break; case BCODE_STRING: - printf("%s", value->u.string); + fputs(value->u.string, stdout); + fflush(stdout); break; } stack_free_value(value); |