From 09391925ee40f4518669f13941550087fd635997 Mon Sep 17 00:00:00 2001 From: obrien Date: Sun, 16 Jan 2000 10:10:15 +0000 Subject: GNU has figured out they should fix the bug we fixed in rev 1.2 themselves. So return this file back to the stock version. --- contrib/bc/bc/main.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'contrib/bc') diff --git a/contrib/bc/bc/main.c b/contrib/bc/bc/main.c index 46f3c92..bd4efcb 100644 --- a/contrib/bc/bc/main.c +++ b/contrib/bc/bc/main.c @@ -1,7 +1,7 @@ /* main.c: The main program for bc. */ /* This file is part of GNU bc. - Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ Computer Science Department, 9062 Western Washington University Bellingham, WA 98226-9062 + +$FreeBSD$ *************************************************************************/ @@ -150,6 +152,11 @@ main (argc, argv) quiet = FALSE; file_names = NULL; +#ifdef HAVE_SETVBUF + /* attempt to simplify interaction with applications such as emacs */ + (void) setvbuf(stdout, NULL, _IOLBF, 0); +#endif + /* Environment arguments. */ env_value = getenv ("BC_ENV_ARGS"); if (env_value != NULL) @@ -209,11 +216,12 @@ main (argc, argv) exit (1); #ifdef READLINE - /* Readline support. Set both application name and input file. */ - rl_readline_name = "bc"; - if (interactive) - rl_instream = stdin; - using_history (); + if (interactive) { + /* Readline support. Set both application name and input file. */ + rl_readline_name = "bc"; + rl_instream = stdin; + using_history (); + } #endif /* Do the parse. */ -- cgit v1.1