From a813727662cbd998c909a854af39e0adae9cb982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=B1=BB=E5=9E=8B=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c302.c | 2 +- c302.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/c302.c b/c302.c index c7bb28d..01da61c 100644 --- a/c302.c +++ b/c302.c @@ -6,7 +6,7 @@ #include #include "c302.h" -static void http_error(ERRCODE code, char* msg) { +static void http_error(errcode_enum_t code, char* msg) { uint32_t len = strlen(msg) + typel[code]; char* str = malloc(len); sprintf(str, types[code], msg); diff --git a/c302.h b/c302.h index 1a0f761..cfff927 100644 --- a/c302.h +++ b/c302.h @@ -14,8 +14,8 @@ #define H500 "HTTP/1.0 500 Internal Server Error\r\nContent-Type: text/html\r\n\r\n

%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; static const char* urls[] = { "https://bocchi.rocks/assets/img/page/character/hitori/main.png", // 後藤ひとり