-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
42 lines (39 loc) · 770 Bytes
/
Copy pathmain.h
File metadata and controls
42 lines (39 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef __MAIN_H__
#define __MAIN_H__
#include "menu.h"
#include<stdlib.h>
#include<string.h>
#define LEN_BUFFER 50
#define LEN_FILE_NAME 20
#define LEN_BOOK_NAME 20
#define LEN_AUTHOR_NAME 10
#define LEN_PUBLISHER_NAME 20
#define len 100
#ifdef LOG_ENABLE
#define LOG_ERROR(msg)\
log_error(__LINE__,__FILE__,msg)
#define LOG_ACTIVITY(msg)\
log_activity(__TIME__,__FILE__,msg)
#else
#define LOG_ERROR(msg)\
{}
#define LOG_ACTIVITY(msg)\
{}
#endif
//时间信息
typedef struct{
unsigned year:16;
unsigned month:8;
unsigned day:8;
}TimeInfor;
//图书信息
typedef struct{
char name[LEN_BOOK_NAME];
char author[LEN_AUTHOR_NAME];
char publisher[LEN_PUBLISHER_NAME];
int serial; //编号
int page;
TimeInfor time_pub;
TimeInfor time_in;
}BookInfor;
#endif