|
|
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 - download
Length: 429 (0x1ad)
Types: TextFile
Names: »prmptrd.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Empire.V/V1.1/EMPSUBS/prmptrd.c«
#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);
}