# flush - flush the write buffer for a file include ratdef subroutine flush(fd) integer fd include channel if (0 <= fd & fd <= MAXCHNL & channel(fd) ^= ERR) { if (md(fd) == WRITE & ic(fd) > 1) { byte(linebuf(1,fd),ic(fd)) = NULL call wrlin (fd, linebuf(1,fd), nc(fd), ier) call chkio (fd, ier) } ic(fd) = 1 nc(fd) = 0 } return end