ZE-Standard-Libraries/include/error/error_file.h

33 lines
613 B
C
Raw Normal View History

#ifndef ERROR_H
#define ERROR_H
2018-08-23 16:57:38 +00:00
#include <type.h>
#include <list/list.h>
#include <error/error.h>
/*
*
*/
typedef struct Log{
FILE *fp;//日志文件的指针
int if_enable;//日志文件是否启用
unsigned long int id;//日志文件的ID
}Log;
2018-08-02 12:59:06 +00:00
Log logfile;
2018-02-18 11:22:12 +00:00
List *error_list = NULL;
2018-08-02 12:59:06 +00:00
List *notice_list = NULL;
2018-02-18 11:22:12 +00:00
int if_error = 0;
2018-08-02 12:59:06 +00:00
int initErrorSystem(void);
int setLogDirectory(const char *path);
int closeLogDirectory(void);
2018-08-03 10:32:20 +00:00
int loadFromFile(FILE *fp,char* number);
2018-08-02 12:59:06 +00:00
2018-08-03 10:32:20 +00:00
int saveError(Error *p_error);
int saveNotice(Notice *p_notice);
2018-08-02 12:59:06 +00:00
2018-08-03 10:32:20 +00:00
#endif