edits to scanner.c