|
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 t
Length: 572 (0x23c) Types: TextFile Names: »ttyin.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z« └─⟦c75e36ecb⟧ └─⟦this⟧ »mh-6.7/miscellany/less-5.0/ttyin.c«
/* * Routines dealing with getting input from the keyboard (i.e. from the user). */ #include "less.h" static int tty; /* * Open keyboard for input. * (Just use file descriptor 2.) */ public void open_getchr() { tty = 2; } /* * Get a character from the keyboard. */ public int getchr() { char c; int result; do { result = iread(tty, &c, 1); if (result == READ_INTR) return (READ_INTR); if (result < 0) { /* * Don't call error() here, * because error calls getchr! */ quit(); } } while (result != 1); return (c & 0177); }