📄 inioper.h
字号:
#ifndef __INIOPER_H
#define __INIOPER_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef VOS_WINNT
/*#define VOS_WINNT
#ifdef VOS_WINNT
#define INIFileTstmain main
#endif */
#define SuccessRet 1;
#define FailedRet 0;
#define MAX_CFG_BUF 100
#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
static char * strtrimr(char * buf);
static char * strtriml(char * buf);
//static int FileGetLine(unsigned int fhandle, long curpos, char *buffer, int maxlen);
extern int FileGetLine(unsigned int fhandle, long curpos, char *buffer, int maxlen);
static int SplitKeyValue(char *buf, char **key, char **val);
//extern int FileCopy(void *source_file, void *dest_file);
//extern int SplitSectionToNameIndex(char *section, char **name, char **index);
//extern int JoinNameIndexToSection(char **section, char *name, char *index);
extern int ConfigGetKey(unsigned int fhandle, void *section, void *key, void *buf);
//extern int ConfigSetKey(void *CFG_file, void *section, void *key, void *buf);
//extern int ConfigGetSections(void *CFG_file, char *sections[]);
//extern int ConfigGetKeys(void *CFG_file, void *section, char *keys[]);
//extern void INIFileTstmain(void);
extern void testfun(void);
//读取配置文件并启动
extern void config(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -