DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: S T

⟦4c547aea2⟧ TextFile

    Length: 1058 (0x422)
    Types: TextFile
    Names: »Sys5diffs«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Ularn/Sys5diffs« 

TextFile

Yes, the author is jumping the gun; the claim seems to be that System V
has "tcflush" and company, but only recent releases have it, i.e. it
must be S5R3.2 or later, since S5R3.1 from AT&T doesn't have that
POSIXism.

The routine "flushall()" is best replaced by something like:

#ifdef BSD
#include <sys/file.h>	/* to get FREAD */
#endif

/*
 *	flushall()	Function to flush all type-ahead in the input buffer
 */
flushall()
{
#ifdef BSD
	static int fread = FREAD;

	ioctl(0, TIOCFLUSH, &fread);
#else /* SYSV */
#  ifdef unix
	ioctl(0, TCFLSH, 0);
#  endif /* unix */
#endif /* BSD */
}

since not only should all System V systems (including Xenix System V, if
it's truly SVID-compatible in its tty driver) have TCFLSH in that form,
even if they don't have POSIX stuff, but BSD has had the ability to
selectively flush the input, output, or both queues since 4.2BSD (if you
have 4.1BSD, you lose here, oh well).  If the intent of the "#ifdef
unix" is to eliminate Xenix (although, if Xenix doesn't define "unix",
somebody screwed up), it can be eliminated.