|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 693 (0x2b5) Types: TextFile Names: »discard.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z« └─⟦c75e36ecb⟧ └─⟦this⟧ »mh-6.7/sbr/discard.c«
/* discard.c - discard output on a file pointer */ #include "../h/mh.h" #include <stdio.h> #ifndef SYS5 #include <sgtty.h> #else SYS5 #include <sys/types.h> #include <termio.h> #ifndef NOIOCTLH #include <sys/ioctl.h> #endif NOIOCTLH #endif SYS5 void discard (io) FILE *io; { #ifndef SYS5 struct sgttyb sg; #else SYS5 struct termio sg; #endif SYS5 if (io == NULL) return; #ifndef SYS5 if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK) (void) ioctl (fileno (io), TIOCSETP, (char *) &sg); #else SYS5 if (ioctl (fileno (io), TCGETA, &sg) != NOTOK) (void) ioctl (fileno (io), TCSETA, &sg); #endif SYS5 if (io -> _ptr = io -> _base) io -> _cnt = 0; }