150276Speter/* 2176187Srafan * Copyright (c) 2003 Matthijs Hollemans 350276Speter * 450276Speter * Permission is hereby granted, free of charge, to any person obtaining a 550276Speter * copy of this software and associated documentation files (the "Software"), 650276Speter * to deal in the Software without restriction, including without limitation 750276Speter * the rights to use, copy, modify, merge, publish, distribute, sublicense, 850276Speter * and/or sell copies of the Software, and to permit persons to whom the 950276Speter * Software is furnished to do so, subject to the following conditions: 1050276Speter * 1150276Speter * The above copyright notice and this permission notice shall be included in 1250276Speter * all copies or substantial portions of the Software. 1350276Speter * 1450276Speter * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1550276Speter * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1650276Speter * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1750276Speter * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1850276Speter * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1950276Speter * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2050276Speter * DEALINGS IN THE SOFTWARE. 2150276Speter */ 2250276Speter 2350276Speter#ifndef PRIVATE_H 2450276Speter#define PRIVATE_H 2550276Speter 2650276Speter#include <list> 2750276Speter#include <stdio.h> 2850276Speter 2950276Spetertypedef std::list<void*> ptr_list_t; 3050276Spetertypedef ptr_list_t::iterator ptr_iter_t; 3150276Speter 32174993Srafan// Configuration options for the (de)compiler. 3350276Speterextern uint32 flags; 3450276Speter 3550276Speter// Where to look for #include files. 3650276Speterextern ptr_list_t include_dirs; 3750276Speter 3850276Speter// The list of input files. 3950276Speterextern ptr_list_t input_files; 4050276Speter 4150276Speter// free()'s all the elements from a list. 4250276Spetervoid free_ptr_list(ptr_list_t& list); 4362449Speter 4450276Speter// Resets the rdef_err_* variables. 4550276Spetervoid clear_error(); 4666963Speter 4750276Speter// Scans all include dirs for the specified file. 4850276Speterbool open_file_from_include_dir(const char* filename, char* outname); 4950276Speter 50166124Srafan#endif // PRIVATE_H 51166124Srafan