41 lines
912 B
C
41 lines
912 B
C
/**
|
||
* @brief
|
||
* The only one header file for the other modules to use log module.
|
||
*/
|
||
#ifndef FILE_IO_H
|
||
#define FILE_IO_H
|
||
#ifdef __cplusplus
|
||
extern "C"
|
||
{
|
||
#endif
|
||
|
||
#include "file.h"
|
||
|
||
|
||
void _write_config_file(char *cfgname);
|
||
|
||
//从文件中读取配置
|
||
void __read_config_file(char *cfgName);
|
||
|
||
/**
|
||
*@brief 从给定字符串中提取key和value对。
|
||
*处理字符串data,从中取出第一个key和value并存入key和value
|
||
*@param data 要解析的字符串
|
||
*@param key 保存提取到的KEY串
|
||
*@param value 保存提取到的value串
|
||
*@param maxlen key和value能容忍的最大字符串长度
|
||
*@return 处理完字符串后,指针指向的位置
|
||
*
|
||
*/
|
||
char *sysfunc_get_key_value(char *data, char *key, char *value, int maxlen);
|
||
|
||
//从acData中,查找key的值,保存在value中
|
||
static char *__get_value(char *acData, char *key, char *value, int nMaxLen)
|
||
|
||
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
#endif
|