diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pamperspective.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/editor/pamperspective.c b/editor/pamperspective.c index 8ce746db..543f72c3 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; @@ -242,7 +245,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 */ } @@ -1111,9 +1114,9 @@ init_buffer(buffer * const bufferP, diff(clean_y(yur, outpamP), clean_y(y_min, outpamP)))) + 2; switch (optionsP->enums[3]) { /* --interpolation */ - case nearest: + case interp_nearest: break; - case linear: + case interp_linear: num_rows += 1; break; } @@ -1352,10 +1355,10 @@ main(int argc, char* argv[]) { init_buffer(&inbuffer, &world, &options, &inpam, &outpam); init_interpolation_global_vars(&inbuffer, &inpam, &outpam); switch (options.enums[3]) { /* --interpolation */ - case nearest: + case interp_nearest: interpolater = take_nearest; break; - case linear: + case interp_linear: interpolater = linear_interpolation; break; }; |