Browse Source

Sort includes from local to standard and fix exposed issues

This order is better because it ensures that headers can stand alone and
include everything they need.  Several missing includes were exposed by this,
and are also fixed in this commit.
zrythm_meson
David Robillard 4 years ago
parent
commit
8459739952
  1. 10
      lv2/atom/atom-test.c
  2. 6
      lv2/atom/forge.h
  3. 4
      lv2/atom/util.h
  4. 4
      lv2/core/lv2_util.h
  5. 4
      lv2/dynmanifest/dynmanifest.h
  6. 6
      lv2/event/event-helpers.h
  7. 4
      lv2/event/event.h
  8. 4
      lv2/log/log.h
  9. 4
      lv2/log/logger.h
  10. 4
      lv2/options/options.h
  11. 4
      lv2/state/state.h
  12. 4
      lv2/ui/ui.h
  13. 4
      lv2/uri-map/uri-map.h
  14. 4
      lv2/worker/worker.h
  15. 10
      plugins/eg-amp.lv2/amp.c
  16. 10
      plugins/eg-fifths.lv2/fifths.c
  17. 1
      plugins/eg-fifths.lv2/uris.h
  18. 14
      plugins/eg-metro.lv2/metro.c
  19. 12
      plugins/eg-midigate.lv2/midigate.c
  20. 12
      plugins/eg-params.lv2/params.c
  21. 4
      plugins/eg-params.lv2/state_map.h
  22. 2
      plugins/eg-sampler.lv2/atom_sink.h
  23. 5
      plugins/eg-sampler.lv2/peaks.h
  24. 22
      plugins/eg-sampler.lv2/sampler.c
  25. 26
      plugins/eg-sampler.lv2/sampler_ui.c
  26. 2
      plugins/eg-sampler.lv2/uris.h
  27. 12
      plugins/eg-scope.lv2/examploscope.c
  28. 28
      plugins/eg-scope.lv2/examploscope_ui.c

10
lv2/atom/atom-test.c

@ -14,6 +14,11 @@ @@ -14,6 +14,11 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
#include "lv2/atom/util.h"
#include "lv2/urid/urid.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
@ -21,11 +26,6 @@ @@ -21,11 +26,6 @@
#include <stdlib.h>
#include <string.h>
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
#include "lv2/atom/util.h"
#include "lv2/urid/urid.h"
char** uris = NULL;
uint32_t n_uris = 0;

6
lv2/atom/forge.h

@ -48,14 +48,14 @@ @@ -48,14 +48,14 @@
#ifndef LV2_ATOM_FORGE_H
#define LV2_ATOM_FORGE_H
#include <assert.h>
#include <stdbool.h>
#include "lv2/atom/atom.h"
#include "lv2/atom/util.h"
#include "lv2/core/attributes.h"
#include "lv2/urid/urid.h"
#include <assert.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/atom/util.h

@ -31,13 +31,13 @@ @@ -31,13 +31,13 @@
#ifndef LV2_ATOM_UTIL_H
#define LV2_ATOM_UTIL_H
#include "lv2/atom/atom.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "lv2/atom/atom.h"
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/core/lv2_util.h

@ -20,12 +20,12 @@ @@ -20,12 +20,12 @@
@{
*/
#include "lv2/core/lv2.h"
#include <stdarg.h>
#include <stdbool.h>
#include <string.h>
#include "lv2/core/lv2.h"
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/dynmanifest/dynmanifest.h

@ -27,10 +27,10 @@ @@ -27,10 +27,10 @@
#ifndef LV2_DYN_MANIFEST_H_INCLUDED
#define LV2_DYN_MANIFEST_H_INCLUDED
#include <stdio.h>
#include "lv2/core/lv2.h"
#include <stdio.h>
#define LV2_DYN_MANIFEST_URI "http://lv2plug.in/ns/ext/dynmanifest" ///< http://lv2plug.in/ns/ext/dynmanifest
#define LV2_DYN_MANIFEST_PREFIX LV2_DYN_MANIFEST_URI "#" ///< http://lv2plug.in/ns/ext/dynmanifest#

6
lv2/event/event-helpers.h

@ -22,14 +22,14 @@ @@ -22,14 +22,14 @@
#ifndef LV2_EVENT_HELPERS_H
#define LV2_EVENT_HELPERS_H
#include "lv2/core/attributes.h"
#include "lv2/event/event.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "lv2/core/attributes.h"
#include "lv2/event/event.h"
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/event/event.h

@ -43,10 +43,10 @@ @@ -43,10 +43,10 @@
#define LV2_EVENT_AUDIO_STAMP 0 ///< Special timestamp type for audio frames
#include <stdint.h>
#include "lv2/core/attributes.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/log/log.h

@ -36,10 +36,10 @@ @@ -36,10 +36,10 @@
#define LV2_LOG__Warning LV2_LOG_PREFIX "Warning" ///< http://lv2plug.in/ns/ext/log#Warning
#define LV2_LOG__log LV2_LOG_PREFIX "log" ///< http://lv2plug.in/ns/ext/log#log
#include <stdarg.h>
#include "lv2/urid/urid.h"
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/log/logger.h

@ -28,11 +28,11 @@ @@ -28,11 +28,11 @@
#ifndef LV2_ATOM_LOGGER_H
#define LV2_ATOM_LOGGER_H
#include "lv2/log/log.h"
#include <stdio.h>
#include <string.h>
#include "lv2/log/log.h"
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/options/options.h

@ -26,11 +26,11 @@ @@ -26,11 +26,11 @@
#ifndef LV2_OPTIONS_H
#define LV2_OPTIONS_H
#include <stdint.h>
#include "lv2/core/lv2.h"
#include "lv2/urid/urid.h"
#include <stdint.h>
#define LV2_OPTIONS_URI "http://lv2plug.in/ns/ext/options" ///< http://lv2plug.in/ns/ext/options
#define LV2_OPTIONS_PREFIX LV2_OPTIONS_URI "#" ///< http://lv2plug.in/ns/ext/options#

4
lv2/state/state.h

@ -27,12 +27,12 @@ @@ -27,12 +27,12 @@
#ifndef LV2_STATE_H
#define LV2_STATE_H
#include "lv2/core/lv2.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "lv2/core/lv2.h"
#define LV2_STATE_URI "http://lv2plug.in/ns/ext/state" ///< http://lv2plug.in/ns/ext/state
#define LV2_STATE_PREFIX LV2_STATE_URI "#" ///< http://lv2plug.in/ns/ext/state#

4
lv2/ui/ui.h

@ -28,11 +28,11 @@ @@ -28,11 +28,11 @@
#ifndef LV2_UI_H
#define LV2_UI_H
#include "lv2/core/lv2.h"
#include <stdbool.h>
#include <stdint.h>
#include "lv2/core/lv2.h"
#define LV2_UI_URI "http://lv2plug.in/ns/extensions/ui" ///< http://lv2plug.in/ns/extensions/ui
#define LV2_UI_PREFIX LV2_UI_URI "#" ///< http://lv2plug.in/ns/extensions/ui#

4
lv2/uri-map/uri-map.h

@ -36,10 +36,10 @@ @@ -36,10 +36,10 @@
#define LV2_URI_MAP_URI "http://lv2plug.in/ns/ext/uri-map" ///< http://lv2plug.in/ns/ext/uri-map
#define LV2_URI_MAP_PREFIX LV2_URI_MAP_URI "#" ///< http://lv2plug.in/ns/ext/uri-map#
#include <stdint.h>
#include "lv2/core/attributes.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif

4
lv2/worker/worker.h

@ -26,10 +26,10 @@ @@ -26,10 +26,10 @@
#ifndef LV2_WORKER_H
#define LV2_WORKER_H
#include <stdint.h>
#include "lv2/core/lv2.h"
#include <stdint.h>
#define LV2_WORKER_URI "http://lv2plug.in/ns/ext/worker" ///< http://lv2plug.in/ns/ext/worker
#define LV2_WORKER_PREFIX LV2_WORKER_URI "#" ///< http://lv2plug.in/ns/ext/worker#

10
plugins/eg-amp.lv2/amp.c

@ -15,11 +15,6 @@ @@ -15,11 +15,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/** Include standard C headers */
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
/**
LV2 headers are based on the URI of the specification they come from, so a
consistent convention can be used even for unofficial extensions. The URI
@ -29,6 +24,11 @@ @@ -29,6 +24,11 @@
*/
#include "lv2/core/lv2.h"
/** Include standard C headers */
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
/**
The URI is the identifier for a plugin, and how the host associates this
implementation in code with its description in data. In this plugin it is

10
plugins/eg-fifths.lv2/fifths.c

@ -15,10 +15,7 @@ @@ -15,10 +15,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "./uris.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/util.h"
@ -29,7 +26,10 @@ @@ -29,7 +26,10 @@
#include "lv2/midi/midi.h"
#include "lv2/urid/urid.h"
#include "./uris.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
enum {
FIFTHS_IN = 0,

1
plugins/eg-fifths.lv2/uris.h

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#ifndef FIFTHS_URIS_H
#define FIFTHS_URIS_H
#include "lv2/atom/atom.h"
#include "lv2/log/log.h"
#include "lv2/midi/midi.h"
#include "lv2/patch/patch.h"

14
plugins/eg-metro.lv2/metro.c

@ -15,13 +15,6 @@ @@ -15,13 +15,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lv2/atom/atom.h"
#include "lv2/atom/util.h"
#include "lv2/core/lv2.h"
@ -31,6 +24,13 @@ @@ -31,6 +24,13 @@
#include "lv2/time/time.h"
#include "lv2/urid/urid.h"
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef M_PI
# define M_PI 3.14159265
#endif

12
plugins/eg-midigate.lv2/midigate.c

@ -14,12 +14,6 @@ @@ -14,12 +14,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lv2/atom/atom.h"
#include "lv2/atom/util.h"
#include "lv2/core/lv2.h"
@ -29,6 +23,12 @@ @@ -29,6 +23,12 @@
#include "lv2/midi/midi.h"
#include "lv2/urid/urid.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MIDIGATE_URI "http://lv2plug.in/plugins/eg-midigate"
typedef enum {

12
plugins/eg-params.lv2/params.c

@ -15,11 +15,7 @@ @@ -15,11 +15,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "state_map.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
@ -33,7 +29,11 @@ @@ -33,7 +29,11 @@
#include "lv2/state/state.h"
#include "lv2/urid/urid.h"
#include "state_map.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_STRING 1024

4
plugins/eg-params.lv2/state_map.h

@ -15,6 +15,10 @@ @@ -15,6 +15,10 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "lv2/atom/atom.h"
#include "lv2/urid/urid.h"
#include <stdarg.h>
#include <stdlib.h>
/** Entry in an array that serves as a dictionary of properties. */

2
plugins/eg-sampler.lv2/atom_sink.h

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "lv2/atom/forge.h"
/**
A forge sink that writes to an atom buffer.

5
plugins/eg-sampler.lv2/peaks.h

@ -28,10 +28,11 @@ @@ -28,10 +28,11 @@
#ifndef PEAKS_H_INCLUDED
#define PEAKS_H_INCLUDED
#include <math.h>
#include "lv2/atom/forge.h"
#include <math.h>
#include <stdlib.h>
#define PEAKS_URI "http://lv2plug.in/ns/peaks#"
#define PEAKS__PeakUpdate PEAKS_URI "PeakUpdate"
#define PEAKS__magnitudes PEAKS_URI "magnitudes"

22
plugins/eg-sampler.lv2/sampler.c

@ -17,14 +17,9 @@ @@ -17,14 +17,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sndfile.h>
#include "atom_sink.h"
#include "peaks.h"
#include "uris.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
@ -38,9 +33,14 @@ @@ -38,9 +33,14 @@
#include "lv2/urid/urid.h"
#include "lv2/worker/worker.h"
#include "atom_sink.h"
#include "peaks.h"
#include "uris.h"
#include <sndfile.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
enum {
SAMPLER_CONTROL = 0,

26
plugins/eg-sampler.lv2/sampler_ui.c

@ -15,17 +15,8 @@ @@ -15,17 +15,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <glib.h>
#include <gobject/gclosure.h>
#include <gtk/gtk.h>
#include "peaks.h"
#include "uris.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
@ -38,8 +29,17 @@ @@ -38,8 +29,17 @@
#include "lv2/ui/ui.h"
#include "lv2/urid/urid.h"
#include "peaks.h"
#include "uris.h"
#include <cairo.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <glib.h>
#include <gobject/gclosure.h>
#include <gtk/gtk.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define SAMPLER_UI_URI "http://lv2plug.in/plugins/eg-sampler#ui"

2
plugins/eg-sampler.lv2/uris.h

@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
#include "lv2/patch/patch.h"
#include "lv2/state/state.h"
#include <stdio.h>
#define EG_SAMPLER_URI "http://lv2plug.in/plugins/eg-sampler"
#define EG_SAMPLER__applySample EG_SAMPLER_URI "#applySample"
#define EG_SAMPLER__freeSample EG_SAMPLER_URI "#freeSample"

12
plugins/eg-scope.lv2/examploscope.c

@ -15,11 +15,7 @@ @@ -15,11 +15,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./uris.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
@ -31,7 +27,11 @@ @@ -31,7 +27,11 @@
#include "lv2/state/state.h"
#include "lv2/urid/urid.h"
#include "./uris.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
==== Private Plugin Instance Structure ====

28
plugins/eg-scope.lv2/examploscope_ui.c

@ -14,19 +14,7 @@ @@ -14,19 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <glib.h>
#include <gobject/gclosure.h>
#include <gtk/gtk.h>
#include "./uris.h"
#include "lv2/atom/atom.h"
#include "lv2/atom/forge.h"
@ -35,7 +23,19 @@ @@ -35,7 +23,19 @@
#include "lv2/ui/ui.h"
#include "lv2/urid/urid.h"
#include "./uris.h"
#include <cairo.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <glib.h>
#include <gobject/gclosure.h>
#include <gtk/gtk.h>
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Drawing area size
#define DAWIDTH (640)

Loading…
Cancel
Save