Return to msgs.c CVS log | Up to [local] / src / usr.bin / msgs |
version 1.23, 2002/08/08 11:55:07 | version 1.24, 2003/03/13 09:09:33 | ||
---|---|---|---|
|
|
||
void onintr(int); | void onintr(int); | ||
void onsusp(int); | void onsusp(int); | ||
int linecnt(FILE *); | int linecnt(FILE *); | ||
int next(char *); | int next(char *, int); | ||
void ask(char *); | void ask(char *); | ||
void gfrsub(FILE *); | void gfrsub(FILE *); | ||
char *nxtfld(char *); | char *nxtfld(char *); | ||
|
|
||
break; | break; | ||
} | } | ||
if (isdigit(*in)) { | if (isdigit(*in)) { | ||
msg = next(in); | msg = next(in, sizeof inbuf); | ||
sep = in; | sep = in; | ||
break; | break; | ||
} | } | ||
|
|
||
} | } | ||
int | int | ||
next(buf) | next(buf, len) | ||
char *buf; | char *buf; | ||
int len; | |||
{ | { | ||
int i; | int i; | ||
sscanf(buf, "%d", &i); | sscanf(buf, "%d", &i); | ||
sprintf(buf, "Goto %d", i); | snprintf(buf, len, "Goto %d", i); | ||
return(--i); | return(--i); | ||
} | } | ||