2011-12-20 09:22:19 +00:00
|
|
|
/*
|
2014-09-22 08:55:46 +00:00
|
|
|
* cfgfile.h -- misc reads from the config file
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008-2012 O.Sezer <sezero@users.sourceforge.net>
|
|
|
|
*
|
|
|
|
* This program 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 2 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2011-12-20 09:22:19 +00:00
|
|
|
|
|
|
|
#ifndef __CFGFILE_H
|
|
|
|
#define __CFGFILE_H
|
|
|
|
|
|
|
|
int CFG_OpenConfig (const char *cfg_name);
|
2011-12-27 19:40:14 +00:00
|
|
|
// opens the given config file. only one open config file is
|
|
|
|
// kept: previosly opened one, if any, will be closed.
|
2011-12-20 09:22:19 +00:00
|
|
|
|
|
|
|
void CFG_CloseConfig (void);
|
2011-12-27 19:40:14 +00:00
|
|
|
// closes the currently open config file.
|
2011-12-20 09:22:19 +00:00
|
|
|
|
|
|
|
void CFG_ReadCvars (const char **vars, int num_vars);
|
2011-12-27 19:40:14 +00:00
|
|
|
// reads the values of cvars in the given list from the opened
|
|
|
|
// config file.
|
2011-12-20 09:22:19 +00:00
|
|
|
|
|
|
|
void CFG_ReadCvarOverrides (const char **vars, int num_vars);
|
2011-12-27 19:40:14 +00:00
|
|
|
// convenience function, reading the "+" command line override
|
|
|
|
// values of cvars in the given list. doesn't do anything with
|
|
|
|
// the config file. call this after CFG_ReadCvars() and before
|
|
|
|
// locking your cvars.
|
2011-12-20 09:22:19 +00:00
|
|
|
|
|
|
|
#endif /* __CFGFILE_H */
|