Use named indices for the response-entry-array

It was actually sitting right in front of my eyes in the
sighandler-funtion.
This will help sort out ambiguities or mixing up array-indices.
This commit is contained in:
FRIGN 2014-08-07 16:34:46 +02:00
parent 1e23378afd
commit 5ffad8984a

11
quark.c
View file

@ -55,11 +55,12 @@ enum {
}; };
static const char *resentry[] = { static const char *resentry[] = {
"HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n", [HEADER] = "HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n",
"Content-Length: %lu\r\n", [CONTENTLEN] = "Content-Length: %lu\r\n",
"Location: %s%s\r\n", [LOCATION] = "Location: %s%s\r\n",
"Content-Type: %s\r\n", [CONTENTTYPE] = "Content-Type: %s\r\n",
"Last-Modified: %s\r\n" }; [MODIFIED] = "Last-Modified: %s\r\n"
};
static ssize_t writetext(const char *buf); static ssize_t writetext(const char *buf);
static ssize_t writedata(const char *buf, size_t buflen); static ssize_t writedata(const char *buf, size_t buflen);