summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dimension/parse.c3
-rw-r--r--dimension/tokenize.c1
-rw-r--r--libdimension/ambient.c1
-rw-r--r--libdimension/camera.c1
-rw-r--r--libdimension/csg.c1
-rw-r--r--libdimension/diffuse.c1
-rw-r--r--libdimension/dimension/array.h2
-rw-r--r--libdimension/finish_combination.c1
-rw-r--r--libdimension/interior.c1
-rw-r--r--libdimension/light.c1
-rw-r--r--libdimension/malloc.c1
-rw-r--r--libdimension/object.c1
-rw-r--r--libdimension/perspective.c1
-rw-r--r--libdimension/phong.c2
-rw-r--r--libdimension/plane.c1
-rw-r--r--libdimension/point_light.c1
-rw-r--r--libdimension/raytrace.c1
-rw-r--r--libdimension/reflective.c1
-rw-r--r--libdimension/scene.c1
-rw-r--r--libdimension/solid_pigment.c1
-rw-r--r--libdimension/texture.c1
-rw-r--r--tests/libdimension/cxx.cpp1
-rw-r--r--tests/libdimension/tests.c1
23 files changed, 24 insertions, 3 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index e4f3bf3..c50d03f 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -19,8 +19,9 @@
#include "parse.h"
#include "utility.h"
-#include <math.h>
#include <fenv.h>
+#include <math.h>
+#include <stdlib.h>
/*
* Symbol table
diff --git a/dimension/tokenize.c b/dimension/tokenize.c
index f46c450..707d0df 100644
--- a/dimension/tokenize.c
+++ b/dimension/tokenize.c
@@ -22,6 +22,7 @@
#include "utility.h"
#include <libgen.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <string.h>
typedef struct dmnsn_buffered_token {
diff --git a/libdimension/ambient.c b/libdimension/ambient.c
index b646902..70d776b 100644
--- a/libdimension/ambient.c
+++ b/libdimension/ambient.c
@@ -20,6 +20,7 @@
#include "dimension.h"
#include <math.h>
+#include <stdlib.h>
/*
* Ambient finish
diff --git a/libdimension/camera.c b/libdimension/camera.c
index 58887b0..888e96e 100644
--- a/libdimension/camera.c
+++ b/libdimension/camera.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/* Allocate a new dummy camera */
dmnsn_camera *
diff --git a/libdimension/csg.c b/libdimension/csg.c
index 1c5f15a..fc214a2 100644
--- a/libdimension/csg.c
+++ b/libdimension/csg.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
static void
dmnsn_csg_free_fn(void *ptr)
diff --git a/libdimension/diffuse.c b/libdimension/diffuse.c
index 06cce53..112a22e 100644
--- a/libdimension/diffuse.c
+++ b/libdimension/diffuse.c
@@ -20,6 +20,7 @@
#include "dimension.h"
#include <math.h>
+#include <stdlib.h>
/*
* Diffuse finish
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h
index 13ee636..f840e58 100644
--- a/libdimension/dimension/array.h
+++ b/libdimension/dimension/array.h
@@ -27,7 +27,7 @@
#ifndef DIMENSION_ARRAY_H
#define DIMENSION_ARRAY_H
-#include <stddef.h> /* For size_t */
+#include <stdlib.h> /* For size_t */
#include <string.h> /* For memcpy */
typedef struct {
diff --git a/libdimension/finish_combination.c b/libdimension/finish_combination.c
index de60851..12eefa8 100644
--- a/libdimension/finish_combination.c
+++ b/libdimension/finish_combination.c
@@ -20,6 +20,7 @@
#include "dimension.h"
#include <math.h>
+#include <stdlib.h>
/*
* Finish combinations
diff --git a/libdimension/interior.c b/libdimension/interior.c
index 3bf857f..9f9201d 100644
--- a/libdimension/interior.c
+++ b/libdimension/interior.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/* Allocate an interior */
dmnsn_interior *
diff --git a/libdimension/light.c b/libdimension/light.c
index 91c1995..9e85fbc 100644
--- a/libdimension/light.c
+++ b/libdimension/light.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/* Allocate a new dummy light */
dmnsn_light *
diff --git a/libdimension/malloc.c b/libdimension/malloc.c
index f1f234e..746f9ab 100644
--- a/libdimension/malloc.c
+++ b/libdimension/malloc.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
#include <string.h>
void *
diff --git a/libdimension/object.c b/libdimension/object.c
index 981e535..d68abe6 100644
--- a/libdimension/object.c
+++ b/libdimension/object.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
dmnsn_vector
dmnsn_transform_normal(dmnsn_matrix trans, dmnsn_vector normal)
diff --git a/libdimension/perspective.c b/libdimension/perspective.c
index 017d215..aba3a97 100644
--- a/libdimension/perspective.c
+++ b/libdimension/perspective.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/*
* Perspective camera
diff --git a/libdimension/phong.c b/libdimension/phong.c
index b4a902b..10d8928 100644
--- a/libdimension/phong.c
+++ b/libdimension/phong.c
@@ -19,7 +19,7 @@
*************************************************************************/
#include "dimension.h"
-#include <math.h>
+#include <stdlib.h>
/*
* Phong finish
diff --git a/libdimension/plane.c b/libdimension/plane.c
index 1680aa0..08da44c 100644
--- a/libdimension/plane.c
+++ b/libdimension/plane.c
@@ -20,6 +20,7 @@
#include "dimension.h"
#include <math.h>
+#include <stdlib.h>
/*
* Plane
diff --git a/libdimension/point_light.c b/libdimension/point_light.c
index 58b1958..8e20610 100644
--- a/libdimension/point_light.c
+++ b/libdimension/point_light.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/*
* Point light source
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 59ad1b3..eb2f052 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension_impl.h"
+#include <stdlib.h>
/*
* Boilerplate for multithreading
diff --git a/libdimension/reflective.c b/libdimension/reflective.c
index 03c09df..806d2f6 100644
--- a/libdimension/reflective.c
+++ b/libdimension/reflective.c
@@ -20,6 +20,7 @@
#include "dimension.h"
#include <math.h>
+#include <stdlib.h>
/*
* Reflective finish
diff --git a/libdimension/scene.c b/libdimension/scene.c
index 0b7e5e9..48ca702 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
#include <unistd.h> /* For sysconf */
/* Allocate an empty scene */
diff --git a/libdimension/solid_pigment.c b/libdimension/solid_pigment.c
index 7cd9370..1d9bd39 100644
--- a/libdimension/solid_pigment.c
+++ b/libdimension/solid_pigment.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/* Solid color pigment callback */
static dmnsn_color dmnsn_solid_pigment_fn(const dmnsn_pigment *pigment,
diff --git a/libdimension/texture.c b/libdimension/texture.c
index d1047b7..3590bc2 100644
--- a/libdimension/texture.c
+++ b/libdimension/texture.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <stdlib.h>
/* Allocate a dummy pigment */
dmnsn_pigment *
diff --git a/tests/libdimension/cxx.cpp b/tests/libdimension/cxx.cpp
index 50df178..f38831a 100644
--- a/tests/libdimension/cxx.cpp
+++ b/tests/libdimension/cxx.cpp
@@ -18,6 +18,7 @@
*************************************************************************/
#include "tests.h"
+#include <cstdlib>
/*
* Ensure that dimension.h can be included in a C++ program and behave properly.
diff --git a/tests/libdimension/tests.c b/tests/libdimension/tests.c
index 154d00b..0684861 100644
--- a/tests/libdimension/tests.c
+++ b/tests/libdimension/tests.c
@@ -18,6 +18,7 @@
*************************************************************************/
#include "tests.h"
+#include <stdlib.h>
dmnsn_scene *
dmnsn_new_default_scene()