| Igor Schein on Fri, 12 Mar 1999 10:02:25 -0500 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| logfile patch |
Hi,
I'd like to propose the following patch. It keeps the logfile in
synch with a screen output, which wasn't happening with \g on. I find
this very useful.
--- src/gp/gp.c~ Fri Mar 5 12:51:06 1999
+++ src/gp/gp.c Thu Mar 11 14:56:58 1999
@@ -520,7 +520,7 @@
{
if (vlog)
{
- logfile = fopen(current_logfile, "a");
+ logfile = fopen(current_logfile, "a"); setbuf(logfile,(char *)NULL);
if (!logfile) err(openfiler,"logfile",current_logfile);
}
else
@@ -606,7 +606,7 @@
GEN r = sd_filename(v, flag, "logfile", ¤t_logfile);
if (*v && logfile)
{
- fclose(logfile); logfile = fopen(current_logfile, "a");
+ fclose(logfile); logfile = fopen(current_logfile, "a"); setbuf(logfile,(char *)NULL);
if (!logfile) err(openfiler,"logfile",current_logfile);
}
return r;
--- src/language/es.c~ Fri Mar 5 03:07:58 1999
+++ src/language/es.c Thu Mar 11 15:03:57 1999
@@ -144,7 +144,7 @@
normalOutS(char *s)
{
fputs(s, pari_outfile);
- if (logfile) { fputs(s, logfile); fflush(logfile); }
+ if (logfile) { fputs(s, logfile); }
}
static void
normalOutF(void)
Igor