diff options
author | David Robillard <d@drobilla.net> | 2021-02-25 12:12:15 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 93323fe97380bad325cac617d06e4df14a27c2e9 (patch) | |
tree | d95055bf7970ff03568805e26b0ddb1867f239a6 | |
parent | f7e265a2be40cda59dab90e0996834234c72da19 (diff) | |
download | serd-93323fe97380bad325cac617d06e4df14a27c2e9.tar.gz serd-93323fe97380bad325cac617d06e4df14a27c2e9.tar.bz2 serd-93323fe97380bad325cac617d06e4df14a27c2e9.zip |
Split up serd_internal.h
-rw-r--r-- | src/byte_sink.h | 2 | ||||
-rw-r--r-- | src/macros.h | 9 | ||||
-rw-r--r-- | src/n3.c | 2 | ||||
-rw-r--r-- | src/namespaces.h (renamed from src/serd_internal.h) | 12 | ||||
-rw-r--r-- | src/node.c | 2 | ||||
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | src/system.c | 1 | ||||
-rw-r--r-- | src/system.h | 2 | ||||
-rw-r--r-- | src/writer.c | 2 |
9 files changed, 19 insertions, 15 deletions
diff --git a/src/byte_sink.h b/src/byte_sink.h index d033f227..ada5e8a9 100644 --- a/src/byte_sink.h +++ b/src/byte_sink.h @@ -4,7 +4,7 @@ #ifndef SERD_SRC_BYTE_SINK_H #define SERD_SRC_BYTE_SINK_H -#include "serd_internal.h" +#include "macros.h" #include "system.h" #include "serd/sink.h" diff --git a/src/macros.h b/src/macros.h new file mode 100644 index 00000000..518ac3e8 --- /dev/null +++ b/src/macros.h @@ -0,0 +1,9 @@ +// Copyright 2019-2020 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#ifndef SERD_SRC_MACROS_H +#define SERD_SRC_MACROS_H + +#define MIN(x, y) ((x) < (y) ? (x) : (y)) + +#endif // SERD_SRC_MACROS_H @@ -1,9 +1,9 @@ // Copyright 2011-2023 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#include "namespaces.h" #include "node.h" #include "reader.h" -#include "serd_internal.h" #include "stack.h" #include "string_utils.h" #include "try.h" diff --git a/src/serd_internal.h b/src/namespaces.h index 49a1cd93..53379168 100644 --- a/src/serd_internal.h +++ b/src/namespaces.h @@ -1,16 +1,10 @@ // Copyright 2011-2023 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -#ifndef SERD_SRC_SERD_INTERNAL_H -#define SERD_SRC_SERD_INTERNAL_H +#ifndef SERD_SRC_NAMESPACES_H +#define SERD_SRC_NAMESPACES_H #define NS_XSD "http://www.w3.org/2001/XMLSchema#" #define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -#define SERD_PAGE_SIZE 4096 - -#ifndef MIN -# define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - -#endif // SERD_SRC_SERD_INTERNAL_H +#endif // SERD_SRC_NAMESPACES_H @@ -3,7 +3,7 @@ #include "node.h" -#include "serd_internal.h" +#include "namespaces.h" #include "string_utils.h" #include "system.h" diff --git a/src/reader.c b/src/reader.c index 4702131e..15c45202 100644 --- a/src/reader.c +++ b/src/reader.c @@ -4,8 +4,8 @@ #include "reader.h" #include "byte_source.h" +#include "namespaces.h" #include "node.h" -#include "serd_internal.h" #include "stack.h" #include "statement.h" #include "system.h" diff --git a/src/system.c b/src/system.c index 567d3e1d..16a292f5 100644 --- a/src/system.c +++ b/src/system.c @@ -4,7 +4,6 @@ #include "system.h" #include "serd_config.h" -#include "serd_internal.h" #ifdef _WIN32 # include <malloc.h> diff --git a/src/system.h b/src/system.h index 1bc19fb9..bfe2c2f0 100644 --- a/src/system.h +++ b/src/system.h @@ -9,6 +9,8 @@ #include <stdint.h> #include <stdio.h> +#define SERD_PAGE_SIZE 4096 + /// Write the message for a system error code (like errno) to a buffer int serd_system_strerror(int errnum, char* buf, size_t buflen); diff --git a/src/writer.c b/src/writer.c index 5b1bf412..0ba90c0b 100644 --- a/src/writer.c +++ b/src/writer.c @@ -3,8 +3,8 @@ #include "byte_sink.h" #include "env.h" +#include "namespaces.h" #include "node.h" -#include "serd_internal.h" #include "sink.h" #include "string_utils.h" #include "system.h" |