X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=conffile_internal.h;h=c2127ab011c540f00d2d1399569fc7a6e9e9b11f;hb=147b444d6faa9a621e33d653b7a72c29724203c3;hp=710fd965245aff592a3cb8805b51016c9115f724;hpb=2fe58dfd10216a37f1ece081f926971882de112e;p=secnet.git diff --git a/conffile_internal.h b/conffile_internal.h index 710fd96..c2127ab 100644 --- a/conffile_internal.h +++ b/conffile_internal.h @@ -1,5 +1,20 @@ /* - * $Log$ + * This file is part of secnet. + * See README for full list of copyright holders. + * + * secnet is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * secnet is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * version 3 along with secnet; if not, see + * https://www.gnu.org/licenses/gpl.html. */ #ifndef conffile_internal_h @@ -8,9 +23,7 @@ #include #include "secnet.h" -extern FILE *yyin; - -typedef string_t atom_t; +typedef cstring_t atom_t; /* Parse tree for configuration file */ @@ -29,6 +42,8 @@ typedef string_t atom_t; #define T_ALIST 17 #define T_ERROR 20 +#define T_IS_PRIMITIVE(NTYPE) ((NTYPE) < T_ASSIGNMENT) + struct p_node { uint32_t type; struct cloc loc; @@ -41,13 +56,13 @@ struct p_node { struct p_node *r; }; -extern int yylex(void); -extern string_t config_file; -extern uint32_t config_lineno; +extern cstring_t config_file; +extern int config_lineno; +extern int yynerrs; /* Keys in dictionaries are 'atoms', which are constructed from strings using this call. Atoms may be compared using '=='. */ -extern atom_t intern(string_t string); +extern atom_t intern(cstring_t string); extern struct p_node *parse_conffile(FILE *conffile);