diff options
author | obrien <obrien@FreeBSD.org> | 2000-01-16 10:10:15 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-01-16 10:10:15 +0000 |
commit | 09391925ee40f4518669f13941550087fd635997 (patch) | |
tree | 1d762f0f06ddbb84f1b889371eb19c2f355e14e1 /contrib | |
parent | 23ef7a8bc955202c448999809e972fd1fef3ec32 (diff) | |
download | FreeBSD-src-09391925ee40f4518669f13941550087fd635997.zip FreeBSD-src-09391925ee40f4518669f13941550087fd635997.tar.gz |
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.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/bc/bc/main.c | 20 |
1 files changed, 14 insertions, 6 deletions
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. */ |