Return to misc.c CVS log | Up to [local] / src / usr.bin / m4 |
version 1.14, 1999/11/17 15:34:13 | version 1.15, 2000/01/12 17:49:53 | ||
---|---|---|---|
|
|
||
exit(1); | exit(1); | ||
} | } | ||
int | |||
obtain_char(f) | |||
struct input_file *f; | |||
{ | |||
if (f->c == '\n') | |||
f->lineno++; | |||
f->c = fgetc(f->file); | |||
return f->c; | |||
} | |||
void | |||
set_input(f, real, name) | |||
struct input_file *f; | |||
FILE *real; | |||
const char *name; | |||
{ | |||
f->file = real; | |||
f->lineno = 1; | |||
f->c = 0; | |||
f->name = xstrdup(name); | |||
} | |||
void | |||
release_input(f) | |||
struct input_file *f; | |||
{ | |||
if (f->file != stdin) | |||
fclose(f->file); | |||
free(f->name); | |||
} |