1
0
mirror of https://github.com/fumiama/CMoe-Counter.git synced 2026-06-12 14:10:44 +08:00

优化类型名

This commit is contained in:
源文雨
2022-11-23 14:45:39 +08:00
parent 40a60f1aeb
commit dc4f8648a3
2 changed files with 13 additions and 13 deletions

8
cmoe.h
View File

@@ -4,11 +4,11 @@
#include <stdint.h>
#define COUNTER_NAME_LEN 64
struct COUNTER {
struct counter_t {
char name[COUNTER_NAME_LEN];
uint32_t count;
};
typedef struct COUNTER COUNTER;
typedef struct counter_t counter_t;
#define SERVER_STRING "Server: CMoe Counter by Fumiama/1.0\r\n"
@@ -18,8 +18,8 @@ typedef struct COUNTER COUNTER;
#define H500 "HTTP/1.0 500 Internal Server Error\r\nContent-Type: text/html\r\n\r\n<P>%s\r\n"
const char* types[] = {H400, H404, H500};
const uint8_t typel[] = {59, 111, 69};
enum ERRCODE {HTTP400, HTTP404, HTTP500};
typedef enum ERRCODE ERRCODE;
enum errcode_enum_t {HTTP400, HTTP404, HTTP500};
typedef enum errcode_enum_t errcode_enum_t;
#define CONTENT_TYPE(x) "Content-Type: " #x "\r\n"
#define CONTENT_LEN "Content-Length: %d\r\n"