inifile.hh

来自「Source code for an Numeric Cmputer」· HH 代码 · 共 61 行

HH
61
字号
/********************************************************************* Description: inifile.hh*   Declarations for INI file format functions**   Derived from a work by Fred Proctor & Will Shackleford** Author:* License: GPL Version 2* System: Linux*    * Copyright (c) 2004 All rights reserved.** Last change: * $Revision: 1.11 $* $Author: paul_c $* $Date: 2005/08/08 13:03:33 $********************************************************************/#ifndef INIFILE_HH#define INIFILE_HH#include "config.h"#include <stdio.h>#include <fcntl.h>typedef struct {    char tag[LINELEN];    char rest[LINELEN];} inifile_entry;#ifdef __cplusplusclass Inifile {  public:    Inifile();    Inifile(const char *file);    ~Inifile();    bool open(const char *file);    bool close();    bool valid();    int write();    const char *find(const char *tag, const char *section = NULL, int num = 1);    int section(const char *section, inifile_entry array[], int max);    void tilde(const char *file, char *path);  private:    FILE * fp;    char *after_equal(const char *string);    char *skip_white(char *string);    struct flock lock;};extern "C" {#elseextern const char *iniFind(void *fp, const char *tag, const char *section);#endif#ifdef __cplusplus}#endif#endif /* INIFILE_HH */

⌨️ 快捷键说明

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