📄 inifileprocess.h
字号:
#ifndef _INI_FILE_OPERATOR_H_
#define _INI_FILE_OPERATOR_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef INIFILEHANDLER_EXPORTS
#define INIFILEHANDLER_API __declspec(dllexport)
#else
#define INIFILEHANDLER_API __declspec(dllimport)
#endif
/*
#define SuccessRet 1
#define FailedRet 0
#define MAX_CFG_BUF 512
#define CFG_OK 0
#define CFG_SECTION_NOT_FOUND -1
#define CFG_KEY_NOT_FOUND -2
#define CFG_ERR -10
#define CFG_ERR_FILE -10
#define CFG_ERR_OPEN_FILE -10
#define CFG_ERR_CREATE_FILE -11
#define CFG_ERR_READ_FILE -12
#define CFG_ERR_WRITE_FILE -13
#define CFG_ERR_FILE_FORMAT -14
#define CFG_ERR_SYSTEM -20
#define CFG_ERR_SYSTEM_CALL -20
#define CFG_ERR_INTERNAL -21
#define CFG_ERR_EXCEED_BUF_SIZE -22
#define COPYF_OK 0
#define COPYF_ERR_OPEN_FILE -10
#define COPYF_ERR_CREATE_FILE -11
#define COPYF_ERR_READ_FILE -12
#define COPYF_ERR_WRITE_FILE -13
#define TXTF_OK 0
#define TXTF_ERR_OPEN_FILE -1
#define TXTF_ERR_READ_FILE -2
#define TXTF_ERR_WRITE_FILE -3
#define TXTF_ERR_DELETE_FILE -4
#define TXTF_ERR_NOT_FOUND -5
*/
char * strtrimr(char * buf);
char * strtriml(char * buf);
int FileGetLine(FILE *fp, char *buffer, int maxlen);
int SplitKeyValue(char *buf, char **key, char **val);
int FileCopy(void *source_file, void *dest_file);
int SplitSectionToNameIndex(char *section, char **name, char **index);
int JoinNameIndexToSection(char **section, char *name, char *index);
INIFILEHANDLER_API int ConfigGetKey(void *CFG_file, void *section, void *key, void *buf);
INIFILEHANDLER_API int ConfigSetKey(void *CFG_file, void *section, void *key, void *buf);
INIFILEHANDLER_API int ConfigGetKeys(void *CFG_file, void *section, char *keys[]);
INIFILEHANDLER_API int ConfigGetSections(void *CFG_file, char *sections[]);
//void INIFileTstmain(void);
#endif //_INI_FILE_OPERATOR_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -