Browse Source

Clean up includes

zrythm_meson
David Robillard 3 years ago
parent
commit
8353731836
  1. 9
      src/byte_source.c
  2. 7
      src/env.c
  3. 9
      src/n3.c
  4. 8
      src/node.c
  5. 3
      src/reader.c
  6. 6
      src/reader.h
  7. 15
      src/serd_internal.h
  8. 11
      src/serdi.c
  9. 6
      src/string.c
  10. 7
      src/uri.c
  11. 7
      src/writer.c
  12. 9
      tests/serd_test.c
  13. 8
      wscript

9
src/byte_source.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,6 +16,13 @@ @@ -16,6 +16,13 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
SerdStatus
serd_byte_source_page(SerdByteSource* source)
{

7
src/env.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2016 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -14,8 +14,11 @@ @@ -14,8 +14,11 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "serd_internal.h"
#include "serd/serd.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

9
src/n3.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -14,18 +14,19 @@ @@ -14,18 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "reader.h"
#include "serd_internal.h"
#include "serd/serd.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "reader.h"
#define TRY_THROW(exp) if (!(exp)) goto except;
#define TRY_RET(exp) if (!(exp)) return 0;

8
src/node.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2016 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,8 +16,14 @@ @@ -16,8 +16,14 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

3
src/reader.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
#include "reader.h"
#include "serd_internal.h"
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdint.h>

6
src/reader.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,7 +16,11 @@ @@ -16,7 +16,11 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
static inline int

15
src/serd_internal.h

@ -19,20 +19,21 @@ @@ -19,20 +19,21 @@
#define _POSIX_C_SOURCE 200809L /* for posix_memalign and posix_fadvise */
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "serd_config.h"
#include "serd/serd.h"
#include "serd_config.h"
#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO)
# include <fcntl.h>
#endif
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

11
src/serdi.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -14,16 +14,19 @@ @@ -14,16 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "serd_config.h"
#include "serd_internal.h"
#include "serd/serd.h"
#ifdef _WIN32
#include <fcntl.h>
#include <io.h>
#endif
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define SERDI_ERROR(msg) fprintf(stderr, "serdi: " msg);

6
src/string.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2016 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,7 +16,11 @@ @@ -16,7 +16,11 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
void
serd_free(void* ptr)

7
src/uri.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2014 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,6 +16,11 @@ @@ -16,6 +16,11 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

7
src/writer.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,7 +16,12 @@ @@ -16,7 +16,12 @@
#include "serd_internal.h"
#include "serd/serd.h"
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

9
tests/serd_test.c

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
Copyright 2011-2017 David Robillard <http://drobilla.net>
Copyright 2011-2020 David Robillard <http://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
@ -16,16 +16,17 @@ @@ -16,16 +16,17 @@
#undef NDEBUG
#include "serd/serd.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "serd/serd.h"
#define USTR(s) ((const uint8_t*)(s))
#ifndef INFINITY

8
wscript

@ -44,6 +44,9 @@ def configure(conf): @@ -44,6 +44,9 @@ def configure(conf):
conf.load('autowaf', cache=True)
autowaf.set_c_lang(conf, 'c99')
if Options.options.strict and not conf.env.MSVC_COMPILER:
conf.env.append_unique('CFLAGS', '-Wno-cast-align')
conf.env.update({
'BUILD_UTILS': not Options.options.no_utils,
'BUILD_SHARED': not Options.options.no_shared,
@ -212,6 +215,11 @@ def lint(ctx): @@ -212,6 +215,11 @@ def lint(ctx):
"../src/*.c")
subprocess.call(cmd, cwd='build', shell=True)
try:
subprocess.call(["iwyu_tool.py", "-o", "clang", "-p", "build"])
except Exception:
Logs.warn("Failed to call iwyu_tool.py")
def amalgamate(ctx):
"builds single-file amalgamated source"

Loading…
Cancel
Save