fix to do writes in memory properly
[unix-history] / usr / src / old / adb / adb.vax / output.c
index 58cfb1a..f29d90c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "defs.h"
  */
 
 #include "defs.h"
-static char sccsid[] = "@(#)output.c 4.1 %G%";
+static char sccsid[] = "@(#)output.c 4.2 %G%";
 #include <stdio.h>
 
 
 #include <stdio.h>
 
 
@@ -79,6 +79,10 @@ printc(c)
        ELIF c
        THEN printptr++;
        FI
        ELIF c
        THEN printptr++;
        FI
+       IF printptr >= &printbuf[MAXLIN-9] THEN
+               write(outfile, printbuf, printptr - printbuf);
+               printptr = printbuf;
+       FI
 }
 
 charpos()
 }
 
 charpos()