local/toolchest/ksh/sh/io.c
/*
 * sync_io - flushes output buffer and positions stdin if necessary
 */
flushes output buffer and positions stdin if necessary
flushes output buffer and positions stdin if necessary
void sync_io()
{
	register FILE *fp = stdin;
	p_flush();
	if(fp->_cnt)
	{
		lseek(fileno(fp),-((long)(fp->_cnt)),1);
		setbuf(fp,(char*)fp->_base);
	}
}
void sync_io ( ) { register FILE * fp = stdin ; p_flush ( ) ; if ( fp -> _cnt ) { lseek ( fileno ( fp ) , - ( ( long ) ( fp -> _cnt ) ) , 1 ) ; setbuf ( fp , ( char * ) fp -> _base ) ; } }
sync_io - flushes output buffer and positions stdin if necessary
sync_io - flushes output buffer and positions stdin if necessary
/* position back the read-ahead characters */