From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/gki/gkifflush.x | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sys/gio/gki/gkifflush.x (limited to 'sys/gio/gki/gkifflush.x') diff --git a/sys/gio/gki/gkifflush.x b/sys/gio/gki/gkifflush.x new file mode 100644 index 00000000..9eebf406 --- /dev/null +++ b/sys/gio/gki/gkifflush.x @@ -0,0 +1,24 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include + +# GKI_FFLUSH -- Flush a graphics stream. This does not issue the GKI_FLUSH +# graphics instruction to the graphics kernel, it merely flushes any buffered +# data in the output stream, and is a no-op in the case of an inline kernel. + +procedure gki_fflush (fd) + +int fd # output file + +errchk seek +include "gki.com" + +begin + if (IS_SUBKERNEL(fd)) { + call seek (fd, BOFL) + call zcall3 (gk_prpsio, KERNEL_PID(fd), fd, FF_WRITE) + } else if (!IS_INLINE(fd)) + call flush (gk_fd[fd]) +end -- cgit