Modefied and added

Modefied list_easy.h and add error.h and error.c.
This commit is contained in:
Saturneric 2018-02-18 14:32:58 +08:00
parent 8287d51451
commit ef34fa2d84
3 changed files with 50 additions and 0 deletions

6
error/error.c Normal file
View File

@ -0,0 +1,6 @@
#include "error.h"
int main(int argc, char **argv){
return 0;
}

42
error/error.h Normal file
View File

@ -0,0 +1,42 @@
#include "../list/list_easy.h"
#include <time.h>
#ifndef ERROR_H
#define ERROR_H
#define HIGH 0x3
#define STANDARD 0x2
#define LOW 0x1
typedef struct Info{
char *head;
char *body;
char *tail;
}Info;
typedef struct Error{
unsigned int type;
int pri;
Info info;
time_t time;
}Error;
typedef struct Notice{
unsigned int type;
Info info;
time_t time;
}Notice;
typedef struct Log{
FILE *fp;
int if_enable;
unsigned long int id;
unsigned int type;
}Log;
List *error_list;
List *log_list;
#endif

View File

@ -67,4 +67,6 @@ int list_through(List *p_list, int (*p_func)(void *, const char *)){
}
return 0;
}
#endif