This commit is contained in:
2025-07-20 16:46:08 +02:00
parent 939b20abf0
commit 51cae898f8
37 changed files with 7837 additions and 2187 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef BASIC_INCLUDED
#define BASIC_INCLUDED
#define HTTP_STR(X) ((HTTP_String) {(X), sizeof(X)-1})
#define HTTP_CEIL(X, Y) (((X) + (Y) - 1) / (Y))
typedef struct {
char *ptr;
long len;
} HTTP_String;
int http_streq (HTTP_String s1, HTTP_String s2);
int http_streqcase (HTTP_String s1, HTTP_String s2);
HTTP_String http_trim (HTTP_String s);
#define HTTP_COUNT(X) (sizeof(X) / sizeof((X)[0]))
#define HTTP_ASSERT(X) {if (!(X)) { __builtin_trap(); }}
#endif // BASIC_INCLUDED