|
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 g
Length: 804 (0x324) Types: TextFile Names: »getlet.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Hangman1/getlet.c«
/* getlet.c * gets 1 letter of input. does error stuff also * written by: ritcv!jxs7451 */ #include "hangman.h" #include<stdio.h> getlet() { int ch; ch = getchar(); putchar(ch); if ((ch < 'a') || (ch > 'z')) switch(ch) { case '!': /* shell escape */ case 'G': /* string guess */ case 'Q': /* Quit */ case '?': /* help command */ case 18 : /* refresh screen */ break; default: clbtm(); setcur(ERROR,1); printf("Illegal command, try again."); setcur(ERROR - 1,1); erasel(0,0); printf(PROMPT); ch = getlet(); break; } return(ch); }