about summary refs log tree commit diff
path: root/editor/pamperspective.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-12-27 22:32:59 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-12-27 22:32:59 +0000
commit9deaf47f30991c299239a5d3b53be3003cba5517 (patch)
tree450c9e58345e8ecae5879b0c94c2c767387a38c9 /editor/pamperspective.c
parent2c5122b9fe73102e713a74e6ad6a86d579cb4400 (diff)
downloadnetpbm-mirror-9deaf47f30991c299239a5d3b53be3003cba5517.tar.gz
netpbm-mirror-9deaf47f30991c299239a5d3b53be3003cba5517.tar.xz
netpbm-mirror-9deaf47f30991c299239a5d3b53be3003cba5517.zip
Release 10.35.36
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@501 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamperspective.c')
-rw-r--r--editor/pamperspective.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/editor/pamperspective.c b/editor/pamperspective.c
index 7bcc74fb..d460ffcf 100644
--- a/editor/pamperspective.c
+++ b/editor/pamperspective.c
@@ -44,7 +44,10 @@ const char *const unit_token[3] = {"image", "pixel", NULL};
 typedef enum {lattice, pixel_s} coord_system;
 const char *const system_token[3] = {"lattice", "pixel", NULL};
 
-typedef enum {nearest, linear} interpolation;
+/* Note that 'nearest' is a function in AIX's math.h.  So don't use
+   that as a symbol.
+*/
+typedef enum {interp_nearest, interp_linear} interpolation;
 const char *const interpolation_token[3] = {"nearest", "linear", NULL};
 
 typedef enum {free_, fixed} proportion;
@@ -233,7 +236,7 @@ static void set_command_line_defaults (option *const options)
   options->enums[0] = lattice;          /* --input_system         */
   options->enums[1] = lattice;          /* --output_system        */
   options->enums[2] = pixel_u;          /* --input_unit           */
-  options->enums[3] = nearest;          /* --interpolation        */
+  options->enums[3] = interp_nearest;   /* --interpolation        */
   options->enums[4] = free_;            /* --proportion           */
   options->bools[0] = TRUE;             /* --frame_include        */
 }
@@ -1100,9 +1103,9 @@ static void init_buffer (buffer *const b, const world_data *const world,
                        diff (clean_y(yur,outpam), clean_y(y_min,outpam))))
     + 2;
   switch (options->enums[3]) {  /* --interpolation */
-  case nearest:
+  case interp_nearest:
     break;
-  case linear:
+  case interp_linear:
     num_rows += 1;
     break;
   };
@@ -1308,10 +1311,10 @@ int main (int argc, char* argv[])
   outrow = pnm_allocpamrow (&outpam);
   init_interpolation_global_vars (&inbuffer,&inpam,&outpam);
   switch (options.enums[3]) {   /* --interpolation */
-  case nearest:
+  case interp_nearest:
     interpolate = take_nearest;
     break;
-  case linear:
+  case interp_linear:
     interpolate = linear_interpolation;
     break;
   };