stdio.h defines BUFSIZ
[unix-history] / usr / src / usr.bin / window / xxflush.c
index d286e39..9fa8407 100644 (file)
@@ -2,21 +2,14 @@
  * Copyright (c) 1989 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1989 Regents of the University of California.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * This code is derived from software contributed to Berkeley by
+ * Edward Wang at The University of California, Berkeley.
+ *
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)xxflush.c  3.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)xxflush.c  3.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "ww.h"
 #endif /* not lint */
 
 #include "ww.h"
@@ -64,10 +57,7 @@ xxflush(intr)
                case xc_write:
                        (*tt.tt_move)(xp->arg0, xp->arg1);
                        tt.tt_nmodes = xp->arg3;
                case xc_write:
                        (*tt.tt_move)(xp->arg0, xp->arg1);
                        tt.tt_nmodes = xp->arg3;
-                       if (tt.tt_ntoken > 0)
-                               xcwrite(xp->buf, xp->arg2, xp->buf - xxbuf);
-                       else
-                               (*tt.tt_write)(xp->buf, xp->arg2);
+                       (*tt.tt_write)(xp->buf, xp->arg2);
                        break;
                }
                xq = xp->link;
                        break;
                }
                xq = xp->link;
@@ -76,10 +66,8 @@ xxflush(intr)
        if ((xx_head = xp) == 0) {
                xx_tail = 0;
                xxbufp = xxbuf;
        if ((xx_head = xp) == 0) {
                xx_tail = 0;
                xxbufp = xxbuf;
-               if (tt.tt_ntoken > 0)
-                       xcreset();
        }
        }
-       ttflush();
+       (*tt.tt_flush)();
 }
 
 xxflush_scroll(xp)
 }
 
 xxflush_scroll(xp)