hunting/utils/FileIo/include/file_io.h
2023-09-04 00:50:55 +08:00

41 lines
912 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @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