|
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: 821 (0x335) Types: TextFile Names: »getword.3«
└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen └─⟦this⟧ »cph85dist/stat/doc/man/getword.3«
.TH GETWORD 3 "March 5, 1985" "UNIX|STAT 5.0" "UNIX Programmer's Manual" .SH NAME getword \- get a word from a file pointer .SH SYNOPSIS .nf char * getword (string, ioptr); char *string; FILE *ioptr; .fi .SH DESCRIPTION .PP .I getword is a faster substitute for using scanf(3) for reading strings. It reads whitespace separated strings so that the following cases are equivalent. .nf getword (string, ioptr); fscanf (ioptr, "%s", string); .fi .SH DIAGNOSTICS .I getword returns NULL when no new string is obtained. Otherwise it returns a pointer to the END of the returned string. This can be used to obtain the length of the string or to process the string from the end. .SH EXAMPLE .nf char *string, *eptr; int len; if (eptr = getword (string, stdin)) { len = eptr - string; ... .fi .SH AUTHOR Gary Perlman