diff options
Diffstat (limited to 'gs/base/gstrap.c')
-rw-r--r-- | gs/base/gstrap.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/gs/base/gstrap.c b/gs/base/gstrap.c index 94faba4a9..393e54b18 100644 --- a/gs/base/gstrap.c +++ b/gs/base/gstrap.c @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2006 Artifex Software, Inc. All Rights Reserved. - + This software is provided AS-IS with no warranty, either express or implied. @@ -32,21 +32,21 @@ check_positive(float *pval) } static int trap_put_float_param(gs_param_list * plist, gs_param_name param_name, - float *pval, bool(*check) (float *pval), int ecode) + float *pval, bool(*check) (float *pval), int ecode) { int code; switch (code = param_read_float(plist, param_name, pval)) { - case 0: - if ((*check) (pval)) - return 0; - code = gs_error_rangecheck; - default: - ecode = code; - param_signal_error(plist, param_name, ecode); - break; - case 1: - break; + case 0: + if ((*check) (pval)) + return 0; + code = gs_error_rangecheck; + default: + ecode = code; + param_signal_error(plist, param_name, ecode); + break; + case 1: + break; } return ecode; } @@ -58,47 +58,47 @@ gs_settrapparams(gs_trap_params_t * pparams, gs_param_list * plist) gs_trap_params_t params; int ecode = 0; static const char *const trap_placement_names[] = { - gs_trap_placement_names, 0 + gs_trap_placement_names, 0 }; params = *pparams; ecode = trap_put_float_param(plist, "BlackColorLimit", - ¶ms.BlackColorLimit, check_unit, ecode); + ¶ms.BlackColorLimit, check_unit, ecode); ecode = trap_put_float_param(plist, "BlackDensityLimit", - ¶ms.BlackDensityLimit, - check_positive, ecode); + ¶ms.BlackDensityLimit, + check_positive, ecode); ecode = trap_put_float_param(plist, "BlackWidth", - ¶ms.BlackWidth, check_positive, ecode); + ¶ms.BlackWidth, check_positive, ecode); ecode = param_put_bool(plist, "Enabled", - ¶ms.Enabled, ecode); + ¶ms.Enabled, ecode); ecode = param_put_bool(plist, "ImageInternalTrapping", - ¶ms.ImageInternalTrapping, ecode); + ¶ms.ImageInternalTrapping, ecode); ecode = param_put_bool(plist, "ImagemaskTrapping", - ¶ms.ImagemaskTrapping, ecode); + ¶ms.ImagemaskTrapping, ecode); ecode = param_put_int(plist, "ImageResolution", - ¶ms.ImageResolution, ecode); + ¶ms.ImageResolution, ecode); if (params.ImageResolution <= 0) - param_signal_error(plist, "ImageResolution", - ecode = gs_error_rangecheck); + param_signal_error(plist, "ImageResolution", + ecode = gs_error_rangecheck); ecode = param_put_bool(plist, "ImageToObjectTrapping", - ¶ms.ImageToObjectTrapping, ecode); + ¶ms.ImageToObjectTrapping, ecode); { - int placement = params.ImageTrapPlacement; + int placement = params.ImageTrapPlacement; - ecode = param_put_enum(plist, "ImageTrapPlacement", - &placement, trap_placement_names, ecode); - params.ImageTrapPlacement = placement; + ecode = param_put_enum(plist, "ImageTrapPlacement", + &placement, trap_placement_names, ecode); + params.ImageTrapPlacement = placement; } ecode = trap_put_float_param(plist, "SlidingTrapLimit", - ¶ms.SlidingTrapLimit, check_unit, ecode); + ¶ms.SlidingTrapLimit, check_unit, ecode); ecode = trap_put_float_param(plist, "StepLimit", - ¶ms.StepLimit, check_unit, ecode); + ¶ms.StepLimit, check_unit, ecode); ecode = trap_put_float_param(plist, "TrapColorScaling", - ¶ms.TrapColorScaling, check_unit, ecode); + ¶ms.TrapColorScaling, check_unit, ecode); ecode = trap_put_float_param(plist, "TrapWidth", - ¶ms.TrapWidth, check_positive, ecode); + ¶ms.TrapWidth, check_positive, ecode); if (ecode < 0) - return ecode; + return ecode; *pparams = params; return 0; } |