lcfg_static.h

来自「The configuration file reading samples f」· C头文件 代码 · 共 56 行

H
56
字号
/* * liblcfg - lightweight configuration file library * Copyright (C) 2007  Paul Baecher *  *  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. * *    $Id: lcfg.h 995 2007-05-07 01:49:42Z dp $ *  */#ifndef LCFG_H#define LCFG_Hstruct lcfg;enum lcfg_status { lcfg_status_ok, lcfg_status_error };typedef enum lcfg_status (*lcfg_visitor_function)(const char *key, void *data, size_t size, void *user_data);/* open a new config file */struct lcfg *        lcfg_new(const char *filename);/* parse config into memory */enum lcfg_status     lcfg_parse(struct lcfg *);/* visit all configuration elements */enum lcfg_status     lcfg_accept(struct lcfg *, lcfg_visitor_function, void *);/* access a value by path */enum lcfg_status     lcfg_value_get(struct lcfg *, const char *, void **, size_t *);/* return the last error message */const char *         lcfg_error_get(struct lcfg *);/* set error */void                 lcfg_error_set(struct lcfg *, const char *fmt, ...);/* destroy lcfg context */void                 lcfg_delete(struct lcfg *);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?