/* -*-c-*-
*
- * $Id: scan.c,v 1.2 1999/07/26 23:24:33 mdw Exp $
+ * $Id: scan.c,v 1.4 2001/02/03 20:30:03 mdw Exp $
*
* Character scanners
*
/*----- Revision history --------------------------------------------------*
*
* $Log: scan.c,v $
+ * Revision 1.4 2001/02/03 20:30:03 mdw
+ * Support re-reading config files on SIGHUP.
+ *
+ * Revision 1.3 2000/08/01 17:58:10 mdw
+ * Fix subtleties with <ctype.h> functions.
+ *
* Revision 1.2 1999/07/26 23:24:33 mdw
* Complete rewrite. Allow a list of character sources to enable changes
* during parsing of syntactic constructs.
scansrc *scan_file(FILE *fp, char *name, unsigned f)
{
- fscan *fs = CREATE(fs);
+ fscan *fs = CREATE(fscan);
fs->ss.ops = &fscan_ops;
fs->ss.src = name;
fs->ss.line = 1;
int ch;
if (!as->p)
ch = EOF;
- else if ((ch = *as->p++) == 0) {
+ else if ((ch = (unsigned char)*as->p++) == 0) {
as->ss.line++;
as->p = *as->av++;
ch = '\n';