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: T g

⟦fcc27bdeb⟧ TextFile

    Length: 804 (0x324)
    Types: TextFile
    Names: »getlet.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Hangman1/getlet.c« 

TextFile

/*  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);
}