about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/pamtris/boundaries.h20
-rw-r--r--generator/pamtris/depend.mk15
-rw-r--r--generator/pamtris/framebuffer.h30
-rw-r--r--generator/pamtris/input.h10
-rw-r--r--generator/pamtris/triangle.h4
-rw-r--r--generator/pamtris/utils.h46
6 files changed, 63 insertions, 62 deletions
diff --git a/generator/pamtris/boundaries.h b/generator/pamtris/boundaries.h
index f5306057..d41719cb 100644
--- a/generator/pamtris/boundaries.h
+++ b/generator/pamtris/boundaries.h
@@ -50,22 +50,22 @@ typedef struct boundary_info {
 } boundary_info;
 
 void
-init_boundary_buffer(boundary_info * ,
-                     int16_t         height);
+init_boundary_buffer(boundary_info * const bdi,
+                     int16_t         const height);
 
 void
 free_boundary_buffer(boundary_info *);
 
 bool
-gen_triangle_boundaries(Xy              xy,
-                        boundary_info *,
-                        int16_t         width,
-                        int16_t         height);
+gen_triangle_boundaries(Xy              const xy,
+                        boundary_info * const bdi,
+                        int16_t         const width,
+                        int16_t         const height);
 
 void
-get_triangle_boundaries(uint16_t              row_index,
-                        int32_t *             left,
-                        int32_t *             right,
-                        const boundary_info *);
+get_triangle_boundaries(uint16_t              const row_index,
+                        int32_t *             const left,
+                        int32_t *             const right,
+                        const boundary_info * const bdi);
 
 #endif
diff --git a/generator/pamtris/depend.mk b/generator/pamtris/depend.mk
index 4660b87c..4c12224a 100644
--- a/generator/pamtris/depend.mk
+++ b/generator/pamtris/depend.mk
@@ -1,21 +1,22 @@
 triangle.o: triangle.c importinc/netpbm/mallocvar.h \
- importinc/netpbm/pm_config.h utils.h fract.h boundaries.h framebuffer.h \
- importinc/netpbm/pam.h importinc/netpbm/pm_config.h \
- importinc/netpbm/pm.h importinc/netpbm/pnm.h importinc/netpbm/ppm.h \
- importinc/netpbm/pgm.h importinc/netpbm/pbm.h importinc/netpbm/ppmcmap.h \
- triangle.h limits_pamtris.h
+ importinc/netpbm/pm_config.h utils.h fract.h boundaries.h triangle.h \
+ limits_pamtris.h framebuffer.h importinc/netpbm/pam.h \
+ importinc/netpbm/pm_config.h importinc/netpbm/pm.h \
+ importinc/netpbm/pnm.h importinc/netpbm/ppm.h importinc/netpbm/pgm.h \
+ importinc/netpbm/pbm.h importinc/netpbm/ppmcmap.h
 framebuffer.o: framebuffer.c utils.h fract.h limits_pamtris.h \
  framebuffer.h importinc/netpbm/pam.h importinc/netpbm/pm_config.h \
  importinc/netpbm/pm.h importinc/netpbm/pnm.h importinc/netpbm/ppm.h \
  importinc/netpbm/pgm.h importinc/netpbm/pbm.h importinc/netpbm/ppmcmap.h
 boundaries.o: boundaries.c importinc/netpbm/mallocvar.h \
- importinc/netpbm/pm_config.h utils.h fract.h boundaries.h
+ importinc/netpbm/pm_config.h utils.h fract.h boundaries.h triangle.h \
+ limits_pamtris.h
 pamtris.o: pamtris.c importinc/netpbm/mallocvar.h \
  importinc/netpbm/pm_config.h importinc/netpbm/shhopt.h \
  importinc/netpbm/pam.h importinc/netpbm/pm_config.h \
  importinc/netpbm/pm.h importinc/netpbm/pnm.h importinc/netpbm/ppm.h \
  importinc/netpbm/pgm.h importinc/netpbm/pbm.h importinc/netpbm/ppmcmap.h \
- limits_pamtris.h framebuffer.h fract.h boundaries.h input.h
+ limits_pamtris.h framebuffer.h fract.h boundaries.h triangle.h input.h
 input.o: input.c importinc/netpbm/mallocvar.h \
  importinc/netpbm/pm_config.h limits_pamtris.h framebuffer.h fract.h \
  importinc/netpbm/pam.h importinc/netpbm/pm_config.h \
diff --git a/generator/pamtris/framebuffer.h b/generator/pamtris/framebuffer.h
index 442520ce..73ec96be 100644
--- a/generator/pamtris/framebuffer.h
+++ b/generator/pamtris/framebuffer.h
@@ -46,30 +46,30 @@ set_tupletype(const char * const str,
               char *       const tupletype);
 
 int
-init_framebuffer(framebuffer_info *);
+init_framebuffer(framebuffer_info * const fbi);
 
 void
-free_framebuffer(framebuffer_info *);
+free_framebuffer(framebuffer_info * const fbi);
 
 void
-print_framebuffer(framebuffer_info *);
+print_framebuffer(framebuffer_info * const fbi);
 
 void
-clear_framebuffer(bool               clear_image_buffer,
-                  bool               clear_z_buffer,
-                  framebuffer_info *);
+clear_framebuffer(bool               const clear_image_buffer,
+                  bool               const clear_z_buffer,
+                  framebuffer_info * const fbi);
 
 int
-realloc_image_buffer(int32_t            new_maxval,
-                     int32_t            new_num_attribs,
-                     framebuffer_info *);
+realloc_image_buffer(int32_t            const new_maxval,
+                     int32_t            const new_num_attribs,
+                     framebuffer_info * const fbi);
 
 void
-draw_span(uint32_t           base,
-          uint16_t           length,
-          fract *            attribs_start,
-          const fract *      attribs_steps,
-          int32_t            divisor,
-          framebuffer_info *);
+draw_span(uint32_t           const base,
+          uint16_t           const length,
+          fract *            const attribs_start,
+          const fract *      const attribs_steps,
+          int32_t            const divisor,
+          framebuffer_info * const fbi);
 
 #endif
diff --git a/generator/pamtris/input.h b/generator/pamtris/input.h
index 867cca02..66969bb2 100644
--- a/generator/pamtris/input.h
+++ b/generator/pamtris/input.h
@@ -18,14 +18,14 @@ typedef struct input_info {
 } input_info;
 
 void
-init_input_processor(input_info *);
+init_input_processor(input_info * const ii);
 
 void
-free_input_processor(input_info *);
+free_input_processor(input_info * const ii);
 
 int
-process_next_command(input_info *,
-                     struct boundary_info *,
-                     struct framebuffer_info *);
+process_next_command(input_info *              const ii,
+                     struct boundary_info *    const bdi,
+                     struct framebuffer_info * const fbi);
 
 #endif
diff --git a/generator/pamtris/triangle.h b/generator/pamtris/triangle.h
index bceda54f..79178ad0 100644
--- a/generator/pamtris/triangle.h
+++ b/generator/pamtris/triangle.h
@@ -19,7 +19,7 @@ typedef struct {
 void
 draw_triangle(Xy                        const xy,
               Attribs                   const attribs,
-              struct boundary_info *    const,
-              struct framebuffer_info * const);
+              struct boundary_info *    const bdi,
+              struct framebuffer_info * const fbi);
 
 #endif
diff --git a/generator/pamtris/utils.h b/generator/pamtris/utils.h
index 8b945acd..3b7cfbe4 100644
--- a/generator/pamtris/utils.h
+++ b/generator/pamtris/utils.h
@@ -4,38 +4,38 @@
 #include "fract.h"
 
 void
-gen_steps(const int32_t * begin,
-          const int32_t * end,
-          fract *         out,
-          uint8_t         elements,
-          int32_t         divisor);
+gen_steps(const int32_t * const begin,
+          const int32_t * const end,
+          fract *         const out,
+          uint8_t         const elements,
+          int32_t         const divisor);
 
 void
-step_up(fract *       vars,
-        const fract * steps,
-        uint8_t       elements,
-        int32_t       divisor);
+step_up(fract *       const vars,
+        const fract * const steps,
+        uint8_t       const elements,
+        int32_t       const divisor);
 
 void
-multi_step_up(fract *       vars,
-              const fract * steps,
-              uint8_t       elements,
-              int32_t       times,
-              int32_t       divisor);
+multi_step_up(fract *       const vars,
+              const fract * const steps,
+              uint8_t       const elements,
+              int32_t       const times,
+              int32_t       const divisor);
 
 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);
 
 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);
 
 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);
 
 #endif