📄 defines.h
字号:
#ifndef __DEFINES_H__
#define __DEFINES_H__
#define ERROR 0
#define SUCCESS 1
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
#endif
// define IPv6 hex string length
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif
typedef struct _Rmail Rmail;
struct _Rmail {
char *sender;
char *receiver;
char *date;
char *subject;
char *messageid;
char *content;
char *attach_file;
Rmail *next;
};
struct RmailList{
int total;
Rmail *mail;
};
struct _server_
{
char hostname[32];
char ip[INET_ADDRSTRLEN + 1]; // IPv4 dotted decimal -> 16 chars + NULL
struct sockaddr_in sin;
unsigned int port;
};
typedef struct _server_ Server;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -