From c38afefcecf256234b87107a48bfeb509798fac4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 21 Apr 2007 11:55:20 +0200 Subject: [PATCH] src/liboconfig: Imported liboconfig 0.1.2. --- src/liboconfig/oconfig.c | 8 ++++++-- src/liboconfig/scanner.l | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/liboconfig/oconfig.c b/src/liboconfig/oconfig.c index f8d18499..2bb80cc9 100644 --- a/src/liboconfig/oconfig.c +++ b/src/liboconfig/oconfig.c @@ -24,11 +24,15 @@ #include "oconfig.h" -/* Functions provided by the scanner */ -void yyset_in (FILE *); +extern FILE *yyin; oconfig_item_t *ci_root; +static void yyset_in (FILE *fd) +{ + yyin = fd; +} /* void yyset_in */ + oconfig_item_t *oconfig_parse_fh (FILE *fh) { int status; diff --git a/src/liboconfig/scanner.l b/src/liboconfig/scanner.l index aa111a29..646bbc63 100644 --- a/src/liboconfig/scanner.l +++ b/src/liboconfig/scanner.l @@ -22,6 +22,7 @@ #include "aux_types.h" #include "parser.h" %} +%option yylineno WHITE_SPACE [\ \t\b] QUOTED_STRING \"([^\\"]+|\\.)*\" UNQUOTED_STRING [0-9A-Za-z_]+ -- 2.30.2