Modefied and added
Modefied list_easy.h and add error.h and error.c.
This commit is contained in:
parent
8287d51451
commit
ef34fa2d84
6
error/error.c
Normal file
6
error/error.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "error.h"
|
||||
|
||||
int main(int argc, char **argv){
|
||||
|
||||
return 0;
|
||||
}
|
42
error/error.h
Normal file
42
error/error.h
Normal 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
|
@ -67,4 +67,6 @@ int list_through(List *p_list, int (*p_func)(void *, const char *)){
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user