/* * * debugger * */ #include "defs.h" #include "fns.h" Rune line[LINSIZ]; extern int infile; Rune *lp; int peekc,lastc = EOR; int eof; /* input routines */ eol(int c) { return(c==EOR || c==';'); } int rdc(void) { do { readchar(); } while (lastc==SPC || lastc==TB); return(lastc); } void reread(void) { peekc = lastc; } void clrinp(void) { flush(); lp = 0; peekc = 0; } int readrune(int fd, Rune *r) { char buf[UTFmax+1]; int i; for(i=0; i: ... * * we handle this case specially because we have to look ahead * at the token after the colon to decide if it is a file reference * or a colon-command with a symbol name prefix. */ int isfileref(void) { Rune *cp; for (cp = lp-1; *cp && !strchr(CMD_VERBS, *cp); cp++) if (*cp == '\\' && cp[1]) /* escape next char */ cp++; if (*cp && cp > lp-1) { while (*cp == ' ' || *cp == '\t') cp++; if (*cp++ == ':') { while (*cp == ' ' || *cp == '\t') cp++; if (isdigit(*cp)) return 1; } } return 0; }