diff options
-rw-r--r-- | src/base64.c | 6 | ||||
-rw-r--r-- | src/env.c | 2 | ||||
-rw-r--r-- | src/n3.c | 24 | ||||
-rw-r--r-- | src/node.c | 4 | ||||
-rw-r--r-- | src/serdi.c | 2 | ||||
-rw-r--r-- | src/string.c | 4 | ||||
-rw-r--r-- | src/writer.c | 10 |
7 files changed, 26 insertions, 26 deletions
diff --git a/src/base64.c b/src/base64.c index bca3dfd3..4a9b4dac 100644 --- a/src/base64.c +++ b/src/base64.c @@ -48,7 +48,7 @@ static const char b64_unmap[] = "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"; /** Encode 3 raw bytes to 4 base64 characters. */ -static inline void +static void encode_chunk(uint8_t out[4], const uint8_t in[3], size_t n_in) { out[0] = b64_map[in[0] >> 2]; @@ -90,14 +90,14 @@ serd_base64_encode(uint8_t* const str, return has_newline; } -static inline uint8_t +static uint8_t unmap(const uint8_t in) { return (uint8_t)(b64_unmap[in] - 47); } /** Decode 4 base64 characters to 3 raw bytes. */ -static inline size_t +static size_t decode_chunk(const uint8_t in[4], uint8_t out[3]) { out[0] = (uint8_t)(((unmap(in[0]) << 2)) | unmap(in[1]) >> 4); @@ -99,7 +99,7 @@ serd_env_set_base_uri(SerdEnv* env, const SerdNode* uri) return SERD_SUCCESS; } -static inline SERD_PURE_FUNC SerdPrefix* +SERD_PURE_FUNC static SerdPrefix* serd_env_find(const SerdEnv* env, const uint8_t* name, size_t name_len) { for (size_t i = 0; i < env->n_prefixes; ++i) { @@ -47,7 +47,7 @@ _Pragma("clang diagnostic ignored \"-Wmissing-declarations\"") } \ } while (0) -static inline bool +static bool fancy_syntax(const SerdReader* reader) { return reader->syntax == SERD_TURTLE || reader->syntax == SERD_TRIG; @@ -59,7 +59,7 @@ read_collection(SerdReader* reader, ReadContext ctx, Ref* dest); static SerdStatus read_predicateObjectList(SerdReader* reader, ReadContext ctx, bool* ate_dot); -static inline uint8_t +static uint8_t read_HEX(SerdReader* reader) { const int c = peek_byte(reader); @@ -72,7 +72,7 @@ read_HEX(SerdReader* reader) } // Read UCHAR escape, initial \ is already eaten by caller -static inline SerdStatus +static SerdStatus read_UCHAR(SerdReader* reader, Ref dest, uint32_t* char_code) { const int b = peek_byte(reader); @@ -152,7 +152,7 @@ read_UCHAR(SerdReader* reader, Ref dest, uint32_t* char_code) } // Read ECHAR escape, initial \ is already eaten by caller -static inline SerdStatus +static SerdStatus read_ECHAR(SerdReader* reader, Ref dest, SerdNodeFlags* flags) { const int c = peek_byte(reader); @@ -189,7 +189,7 @@ read_ECHAR(SerdReader* reader, Ref dest, SerdNodeFlags* flags) } } -static inline SerdStatus +static SerdStatus bad_char(SerdReader* reader, const char* fmt, uint8_t c) { // Skip bytes until the next start byte @@ -257,7 +257,7 @@ read_utf8_code(SerdReader* reader, Ref dest, uint32_t* code, uint8_t c) // Read one character (possibly multi-byte) // The first byte, c, has already been eaten by caller -static inline SerdStatus +static SerdStatus read_character(SerdReader* reader, Ref dest, SerdNodeFlags* flags, uint8_t c) { if (!(c & 0x80)) { @@ -291,7 +291,7 @@ read_comment(SerdReader* reader) } // [24] ws ::= #x9 | #xA | #xD | #x20 | comment -static inline bool +static bool read_ws(SerdReader* reader) { const int c = peek_byte(reader); @@ -310,7 +310,7 @@ read_ws(SerdReader* reader) } } -static inline bool +static bool read_ws_star(SerdReader* reader) { while (read_ws(reader)) { @@ -319,14 +319,14 @@ read_ws_star(SerdReader* reader) return true; } -static inline bool +static bool peek_delim(SerdReader* reader, const uint8_t delim) { read_ws_star(reader); return peek_byte(reader) == delim; } -static inline bool +static bool eat_delim(SerdReader* reader, const uint8_t delim) { if (peek_delim(reader, delim)) { @@ -454,7 +454,7 @@ read_String(SerdReader* reader, Ref node, SerdNodeFlags* flags) return read_STRING_LITERAL_LONG(reader, node, flags, (uint8_t)q1); } -static inline bool +static bool is_PN_CHARS_BASE(const uint32_t c) { return ((c >= 0x00C0 && c <= 0x00D6) || (c >= 0x00D8 && c <= 0x00F6) || @@ -488,7 +488,7 @@ read_PN_CHARS_BASE(SerdReader* reader, Ref dest) return st; } -static inline bool +static bool is_PN_CHARS(const uint32_t c) { return (is_PN_CHARS_BASE(c) || c == 0xB7 || (c >= 0x0300 && c <= 0x036F) || @@ -145,7 +145,7 @@ serd_node_new_uri_from_string(const uint8_t* str, return serd_node_new_uri(&uri, base, out); // Resolve/Serialise } -static inline bool +static bool is_uri_path_char(const uint8_t c) { if (is_alpha(c) || is_digit(c)) { @@ -282,7 +282,7 @@ serd_node_new_relative_uri(const SerdURI* uri, return node; } -static inline unsigned +static unsigned serd_digits(double abs) { const double lg = ceil(log10(floor(abs) + 1.0)); diff --git a/src/serdi.c b/src/serdi.c index 86597cbf..a1d8097e 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -134,7 +134,7 @@ quiet_error_sink(void* handle, const SerdError* e) return SERD_SUCCESS; } -static inline FILE* +static FILE* serd_fopen(const char* path, const char* mode) { FILE* fd = fopen(path, mode); diff --git a/src/string.c b/src/string.c index 55654033..baf01042 100644 --- a/src/string.c +++ b/src/string.c @@ -54,7 +54,7 @@ serd_strerror(SerdStatus status) return (const uint8_t*)"Unknown error"; // never reached } -static inline void +static void serd_update_flags(const uint8_t c, SerdNodeFlags* const flags) { switch (c) { @@ -115,7 +115,7 @@ serd_strlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags) return n_chars; } -static inline double +static double read_sign(const char** sptr) { double sign = 1.0; diff --git a/src/writer.c b/src/writer.c index 94c03f06..aaf2f175 100644 --- a/src/writer.c +++ b/src/writer.c @@ -150,7 +150,7 @@ w_err(SerdWriter* writer, SerdStatus st, const char* fmt, ...) va_end(args); } -static inline SERD_PURE_FUNC WriteContext* +SERD_PURE_FUNC static WriteContext* anon_stack_top(SerdWriter* writer) { assert(!serd_stack_is_empty(&writer->anon_stack)); @@ -173,7 +173,7 @@ copy_node(SerdNode* dst, const SerdNode* src) } } -static inline size_t +static size_t sink(const void* buf, size_t len, SerdWriter* writer) { return serd_byte_sink_write(buf, len, &writer->byte_sink); @@ -211,7 +211,7 @@ write_character(SerdWriter* writer, const uint8_t* utf8, size_t* size) return sink(escape, 10, writer); } -static inline bool +static bool uri_must_escape(const uint8_t c) { switch (c) { @@ -552,7 +552,7 @@ write_literal(SerdWriter* writer, } // Return true iff `buf` is a valid prefixed name suffix -static inline bool +static bool is_name(const uint8_t* buf, const size_t len) { // TODO: This is more strict than it should be @@ -755,7 +755,7 @@ write_node(SerdWriter* writer, return ret; } -static inline bool +static bool is_resource(const SerdNode* node) { return node && node->buf && node->type > SERD_LITERAL; |