Compare commits

...

3 Commits

Author SHA1 Message Date
22a121383f Allow for overriding feature test macros 2022-09-11 00:44:14 +02:00
0e89bb9f46 Add some consts to function arguments 2022-09-01 12:44:58 +02:00
63aed8f0fd Fix up the PEG change from the last commit
This is not a regular expression.
2022-08-14 19:09:52 +02:00

View File

@@ -16,8 +16,13 @@
*
*/
#define _POSIX_C_SOURCE 199309L
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L
#endif
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <stdio.h>
#include <stddef.h>
@@ -2450,7 +2455,7 @@ write_queue_processed (struct write_queue *self, size_t len)
}
static bool
write_queue_is_empty (struct write_queue *self)
write_queue_is_empty (const struct write_queue *self)
{
return self->head == NULL;
}
@@ -2545,7 +2550,7 @@ msg_unpacker_make (const void *data, size_t len)
}
static size_t
msg_unpacker_get_available (struct msg_unpacker *self)
msg_unpacker_get_available (const struct msg_unpacker *self)
{
return self->len - self->offset;
}
@@ -4412,8 +4417,8 @@ socket_io_try_write (int socket_fd, struct str *wb)
// object = lws '{' entries endobj
// endobj = lws '}'
//
// quoted = lws '"' ('\\' escape / ![\\"] char)* '"'
// / lws '`' ![`]* '`'
// quoted = lws '"' (!["\\] char / '\\' escape)* '"'
// / lws '`' (![`] char)* '`'
// string = (quoted)+
// char = [\0-\177] # or any Unicode codepoint in the UTF-8 encoding
// escape = [\\"abfnrtv] / [xX][0-9A-Fa-f][0-9A-Fa-f]? / [0-7][0-7]?[0-7]?