diff options
author | David Robillard <d@drobilla.net> | 2021-02-25 12:12:15 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:04:20 -0500 |
commit | fb98f65ba7cef9f3a66043d6f75cea0ccf6adb79 (patch) | |
tree | db046bc1691a546c24e1e677decf5b7afde3d452 | |
parent | dc77dc04689254730de428e75a1da6f7a893c9e6 (diff) | |
download | serd-fb98f65ba7cef9f3a66043d6f75cea0ccf6adb79.tar.gz serd-fb98f65ba7cef9f3a66043d6f75cea0ccf6adb79.tar.bz2 serd-fb98f65ba7cef9f3a66043d6f75cea0ccf6adb79.zip |
Split up serd_internal.h
-rw-r--r-- | src/macros.h | 22 | ||||
-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/static_nodes.h | 2 | ||||
-rw-r--r-- | src/system.c | 1 | ||||
-rw-r--r-- | src/system.h | 2 | ||||
-rw-r--r-- | src/world.c | 2 | ||||
-rw-r--r-- | src/writer.c | 1 |
10 files changed, 32 insertions, 16 deletions
diff --git a/src/macros.h b/src/macros.h new file mode 100644 index 00000000..ac5af149 --- /dev/null +++ b/src/macros.h @@ -0,0 +1,22 @@ +/* + Copyright 2019-2020 David Robillard <d@drobilla.net> + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + +#ifndef SERD_MACROS_H +#define SERD_MACROS_H + +#define MIN(x, y) ((x) < (y) ? (x) : (y)) + +#endif // SERD_MACROS_H @@ -15,9 +15,9 @@ */ #include "byte_source.h" +#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 91ba509c..e98eb5e1 100644 --- a/src/serd_internal.h +++ b/src/namespaces.h @@ -14,16 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef SERD_INTERNAL_H -#define SERD_INTERNAL_H +#ifndef SERD_NAMESPACES_H +#define SERD_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_INTERNAL_H +#endif // SERD_NAMESPACES_H @@ -16,7 +16,7 @@ #include "node.h" -#include "serd_internal.h" +#include "namespaces.h" #include "static_nodes.h" #include "string_utils.h" #include "system.h" diff --git a/src/reader.c b/src/reader.c index e88234ac..cfea1b87 100644 --- a/src/reader.c +++ b/src/reader.c @@ -17,8 +17,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/static_nodes.h b/src/static_nodes.h index adbb5849..467d846f 100644 --- a/src/static_nodes.h +++ b/src/static_nodes.h @@ -19,8 +19,8 @@ #include "serd/serd.h" +#include "namespaces.h" #include "node.h" -#include "serd_internal.h" typedef struct StaticNode { SerdNode node; diff --git a/src/system.c b/src/system.c index 4a70c204..c02f2d3c 100644 --- a/src/system.c +++ b/src/system.c @@ -17,7 +17,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 dbff890a..27087bde 100644 --- a/src/system.h +++ b/src/system.h @@ -22,6 +22,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/world.c b/src/world.c index 0887cfe1..e0ce9201 100644 --- a/src/world.c +++ b/src/world.c @@ -17,9 +17,9 @@ #include "world.h" #include "caret.h" +#include "namespaces.h" #include "node.h" #include "serd_config.h" -#include "serd_internal.h" #include "system.h" #if defined(USE_POSIX_FADVISE) diff --git a/src/writer.c b/src/writer.c index 55136b98..2cee09c5 100644 --- a/src/writer.c +++ b/src/writer.c @@ -17,7 +17,6 @@ #include "byte_sink.h" #include "env.h" #include "node.h" -#include "serd_internal.h" #include "sink.h" #include "string_utils.h" #include "system.h" |