printer connections on Suns

Robert Perlberg step!number1!perl at philabs.philips.com
Thu Feb 16 05:21:00 AEST 1989


In my HP filter, I wait for the output to flush with this code:

#include <stdio.h>
#include <sgtty.h>

outputwait(fd)
int fd;
{
	int outchars;

	while(ioctl(fd, TIOCOUTQ, &outchars) == 0 && outchars > 0)
	{
		sleep(1);
	}
}

Robert Perlberg
Dean Witter Reynolds Inc., New York
phri!{dasys1 | philabs | mancol}!step!perl



More information about the Comp.sys.sun mailing list