#: 9057 S3/Languages
08-Jan-91 00:31:56
Sb: #9045-#'C' help
Fm: Jim Peasley 72726,1153
To: James Jones 76257,562 (X)
JJ;
Originally, I had a \n after printing the date and name strings due to
the difference in the way DOS and OS-9 handle flushing the buffer. With
the newline, all the data is positioned at the left side of the screen
-- only when redirecting. I have since added a fflush(stdout); statement
after the name and date, and again, in an active window, things work fine,
but redirecting causes the cursor positioning to get "eaten" and the following
data is positioned right after the name string.
-------- code fragment from pgm. ----------
#define CURSOR pos_cur
...
...
CURSOR(1,curline);
printf("%s %s",date,name);
fflush(stdout);
if (span > 0)
{
CURSOR(45,curline);
printf("%2d%s %s\n",span,suff,eptr);
}
else
{
CURSOR(50,curline);
printf("%s\n",eptr);
}
Any ideas on why redirecting stdout would cause cursor positioning to be hosed?
...Jim
There is 1 Reply.
|