1214571Sdim/* windmc.h -- header file for windmc program. 2214571Sdim Copyright 2007 3214571Sdim Free Software Foundation, Inc. 4214571Sdim Written by Kai Tietz, Onevision. 5214571Sdim 6214571Sdim This file is part of GNU Binutils. 7214571Sdim 8214571Sdim This program is free software; you can redistribute it and/or modify 9214571Sdim it under the terms of the GNU General Public License as published by 10214571Sdim the Free Software Foundation; either version 2 of the License, or 11214571Sdim (at your option) any later version. 12214571Sdim 13214571Sdim This program is distributed in the hope that it will be useful, 14214571Sdim but WITHOUT ANY WARRANTY; without even the implied warranty of 15214571Sdim MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16214571Sdim GNU General Public License for more details. 17214571Sdim 18214571Sdim You should have received a copy of the GNU General Public License 19214571Sdim along with this program; if not, write to the Free Software 20214571Sdim Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 21214571Sdim 02110-1301, USA. */ 22214571Sdim 23214571Sdim#include "ansidecl.h" 24214571Sdim 25214571Sdim/* This is the header file for the windmc program. It defines 26214571Sdim structures and declares functions used within the program. */ 27214571Sdim 28214571Sdim#include "winduni.h" 29214571Sdim 30214571Sdim#ifndef WINDMC_HXX 31214571Sdim#define WINDMC_HXX 32214571Sdim 33214571Sdim/* Global flag variables (set by windmc.c file. */ 34214571Sdimextern int mcset_custom_bit; 35214571Sdimextern int mcset_out_values_are_decimal; 36214571Sdimextern rc_uint_type mcset_max_message_length; 37214571Sdimextern unichar *mcset_msg_id_typedef; 38214571Sdim 39214571Sdim/* Lexer keyword definition and internal memory structures. */ 40214571Sdim 41214571Sdimtypedef struct mc_keyword 42214571Sdim{ 43214571Sdim struct mc_keyword *next; 44214571Sdim const char *group_name; 45214571Sdim size_t len; 46214571Sdim unichar *usz; 47214571Sdim int rid; 48214571Sdim rc_uint_type nval; 49214571Sdim unichar *sval; 50214571Sdim wind_language_t lang_info; 51214571Sdim} mc_keyword; 52214571Sdim 53214571Sdimtypedef struct mc_node_lang 54214571Sdim{ 55214571Sdim struct mc_node_lang *next; 56214571Sdim rc_uint_type vid; 57214571Sdim const mc_keyword *lang; 58214571Sdim unichar *message; 59214571Sdim} mc_node_lang; 60214571Sdim 61214571Sdimtypedef struct mc_node 62214571Sdim{ 63214571Sdim struct mc_node *next; 64214571Sdim unichar *user_text; 65214571Sdim const mc_keyword *facility; 66214571Sdim const mc_keyword *severity; 67214571Sdim unichar *symbol; 68214571Sdim rc_uint_type id; 69214571Sdim rc_uint_type vid; 70214571Sdim mc_node_lang *sub; 71214571Sdim} mc_node; 72214571Sdim 73214571Sdimextern mc_node *mc_nodes; 74214571Sdim 75214571Sdimvoid mc_add_keyword (unichar *, int, const char *, rc_uint_type, unichar *); 76214571Sdimconst mc_keyword *enum_facility (int); 77214571Sdimconst mc_keyword *enum_severity (int); 78214571Sdim 79214571Sdimmc_node_lang *mc_add_node_lang (mc_node *, const mc_keyword *, rc_uint_type); 80214571Sdimmc_node *mc_add_node (void); 81214571Sdim 82214571Sdim/* Standard yacc/flex stuff. */ 83214571Sdimint yyerror (const char *, ...); 84214571Sdimint yylex (void); 85214571Sdimint yyparse (void); 86214571Sdim 87214571Sdim/* mclex.c */ 88214571Sdimvoid mc_set_inputfile (const char *); 89214571Sdimvoid mc_set_content (const unichar *); 90214571Sdim 91214571Sdim/* Lexer control variables. Used by mcparser.y file. */ 92214571Sdimextern bfd_boolean mclex_want_nl; 93214571Sdimextern bfd_boolean mclex_want_line; 94214571Sdimextern bfd_boolean mclex_want_filename; 95214571Sdim 96214571Sdimvoid mc_fatal (const char *, ...); 97214571Sdimvoid mc_warn (const char *, ...); 98214571Sdim 99214571Sdim#endif 100