X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/9e1c09df3d033bd9a47d25d067f5a42f127b7dba..c36e735af553de4bc1776977341bd95b64483f72:/scan.c diff --git a/scan.c b/scan.c index c29b48b..cd082f5 100644 --- a/scan.c +++ b/scan.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: scan.c,v 1.3 2000/08/01 17:58:10 mdw Exp $ + * $Id: scan.c,v 1.5 2002/01/30 09:29:34 mdw Exp $ * * Character scanners * @@ -29,6 +29,12 @@ /*----- Revision history --------------------------------------------------* * * $Log: scan.c,v $ + * Revision 1.5 2002/01/30 09:29:34 mdw + * Initialize scanner properly. + * + * 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 functions. * @@ -104,7 +110,7 @@ static scansrc_ops fscan_ops = { fscan_scan, fscan_destroy }; 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; @@ -298,6 +304,7 @@ void scan_create(scanner *sc) sc->head = &scan_eof; sc->tail = &sc->head; dstr_create(&sc->d); + sc->wbegin = sc->wcont = 0; } /* --- @scan_destroy@ --- *