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

⟦66cc83b63⟧ TextFile

    Length: 429 (0x1ad)
    Types: TextFile
    Names: »prmptrd.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Empire.V/V1.1/EMPSUBS/prmptrd.c« 

TextFile

#include        <stdio.h>

prmptrd(prompt, bufp, len)
char    *prompt, *bufp;
int     len;
{
        register        char    *cp;
        register        i;

        printf("%s", prompt);
        fflush(stdout);
        cp = bufp;
        for( i=0; i < len; i++ ) {
                if( read(0, cp++, 1) != 1 ) return(0);
                if( *(cp-1) == '\n' ) break;
        }
        *(cp-1) = '\0';
        return(cp - bufp);
}