X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fconfig.h;h=f248b3c4eeff2057ef0723adbf107f34fdf22a62;hb=ef16dea09f87b15fc6d58fae0aa0832e0648c00e;hp=1961ebeb55aabe7b9cc9bd8b5a1a87d648d68257;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3;p=flatwaifu.git diff --git a/src/config.h b/src/config.h index 1961ebe..f248b3c 100644 --- a/src/config.h +++ b/src/config.h @@ -1,30 +1,32 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - Copyright (C) 2011 - - This file is part of the Doom2D:Rembo project. - - Doom2D:Rembo is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - Doom2D:Rembo 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, see or - write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// Configuration - -void CFG_args(int argc, char *argv[]); -void CFG_load(void); -void CFG_save(void); - -extern char cfg_file[]; - +/* Copyright (C) 2020 SovietPony + * + * 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, version 3 of the License ONLY. + * + * 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, see . + */ + +#ifndef CONFIG_H_INCLUDED +#define CONFIG_H_INCLUDED + +#include "glob.h" +#include "system.h" + +const cfg_t *CFG_find_entry (const char *key, const cfg_t *cfg); +int CFG_update_key (const char *key, const char *value, const cfg_t *cfg); + +int CFG_open_iterator (const char *name); +int CFG_scan_iterator (char *key, int keylen, char *value, int valuelen); +void CFG_close_iterator (void); + +int CFG_read_config (const char *name, int n, const cfg_t **cfg); +int CFG_update_config (const char *old, const char *new, int n, const cfg_t **cfg, const char *msg); + +#endif /* CONFIG_H_INCLUDED */