about summary refs log tree commit diff
path: root/generator/pamtris/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'generator/pamtris/utils.c')
-rw-r--r--generator/pamtris/utils.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/generator/pamtris/utils.c b/generator/pamtris/utils.c
index 1ef7283c..2ce42576 100644
--- a/generator/pamtris/utils.c
+++ b/generator/pamtris/utils.c
@@ -14,10 +14,10 @@
 
 
 void
-step_up(fract *       vars,
-        const fract * steps,
-        uint8_t       elements,
-        int32_t       div) {
+step_up(fract *       const vars,
+        const fract * const steps,
+        uint8_t       const elements,
+        int32_t       const div) {
 /*----------------------------------------------------------------------------
   Apply interpolation steps (see above) to a collection of fract
   variables (also see above) once. This is done by adding the
@@ -52,11 +52,11 @@ step_up(fract *       vars,
 
 
 void
-multi_step_up(fract *       vars,
-              const fract * steps,
-              uint8_t       elements,
-              int32_t       times,
-              int32_t       div) {
+multi_step_up(fract *       const vars,
+              const fract * const steps,
+              uint8_t       const elements,
+              int32_t       const times,
+              int32_t       const div) {
 /*----------------------------------------------------------------------------
   Similar to step_up, but apply the interpolation step an arbitrary number
   of times, instead of just once.
@@ -85,9 +85,11 @@ multi_step_up(fract *       vars,
 
 
 void
-gen_steps(const int32_t * begin,
-          const int32_t * end,
-          fract         * out, uint8_t elements, int32_t div) {
+gen_steps(const int32_t * const begin,
+          const int32_t * const end,
+          fract         * const out,
+          uint8_t         const elements,
+          int32_t         const div) {
 /*----------------------------------------------------------------------------
   Generate the interpolation steps for a collection of initial and final
   values. "begin" points to an array of initial values, "end" points to the
@@ -133,9 +135,9 @@ gen_steps(const int32_t * begin,
 
 
 void
-fract_to_int32_array(const fract * in,
-                     int32_t *     out,
-                     uint8_t       elements) {
+fract_to_int32_array(const fract * const in,
+                     int32_t *     const out,
+                     uint8_t       const elements) {
 
     unsigned int i;
 
@@ -147,9 +149,9 @@ fract_to_int32_array(const fract * in,
 
 
 void
-int32_to_fract_array(const int32_t * in,
-                     fract *         out,
-                     uint8_t         elements) {
+int32_to_fract_array(const int32_t * const in,
+                     fract *         const out,
+                     uint8_t         const elements) {
 
     unsigned int i;
 
@@ -162,8 +164,8 @@ int32_to_fract_array(const int32_t * in,
 
 
 static void
-swap(uint8_t * a,
-     uint8_t * b) {
+swap(uint8_t * const a,
+     uint8_t * const b) {
 /*----------------------------------------------------------------------------
   Swap the contents pointed to by a and b.
 -----------------------------------------------------------------------------*/
@@ -175,9 +177,9 @@ swap(uint8_t * a,
 
 
 void
-sort3(uint8_t *       index_array,
-      const int32_t * y_array,
-      const int32_t * x_array) {
+sort3(uint8_t *       const index_array,
+      const int32_t * const y_array,
+      const int32_t * const x_array) {
 /*----------------------------------------------------------------------------
   Sort an index array of 3 elements. This function is used to sort vertices
   with regard to relative row from top to bottom, but instead of sorting