cfgfile.h

来自「GSM猫管理程序」· C头文件 代码 · 共 50 行

H
50
字号
/*SMS Server Tools 3Copyright (C) Keijo Kasvihttp://smstools3.kekekasvi.com/Based on SMS Server Tools 2 from Stefan Fringshttp://www.meinemullemaus.de/This program is free software unless you got it under another license directlyfrom the author. You can redistribute it and/or modify it under the terms ofthe GNU General Public License as published by the Free Software Foundation.Either version 2 of the License, or (at your option) any later version.*/#ifndef CFGFILE_H#define CFGFILE_H#include <stdio.h>/*  Gets a single parameter from a list of parameters wich uses colonsto separate them. Returns 1 if successful. */int getsubparam_delim(char*  parameter,                      int n,                      char*  subparam,  int size_subparam,                       char delim);int getsubparam(char*  parameter,                 int n,                 char*  subparam,  int size_subparam);/* Searches for a section [name] in a config file and goes to the   next line. Return 1 if successful. */   int gotosection(FILE* file,  char*  name);/* Reads the next line from a config file beginning at the actual position.   Returns 1 if successful. If the next section or eof is encountered it    returns 0. If the file contains syntax error it returns -1 and the wrong   line in value.*/int my_getline(FILE* file,             char*  name,  int size_name,	    char*  value,  int size_value);	    #endif

⌨️ 快捷键说明

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