ztrap.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. This software is provided AS-IS with no warranty, either express or
  3. implied.
  4. This software is distributed under license and may not be copied,
  5. modified or distributed except as expressly authorized under the terms
  6. of the license contained in the file LICENSE in this distribution.
  7. For more information about licensing, please refer to
  8. http://www.ghostscript.com/licensing/. For information on
  9. commercial licensing, go to http://www.artifex.com/licensing/ or
  10. contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  12. */
  13. /* $Id: ztrap.c,v 1.4 2002/02/21 22:24:54 giles Exp $ */
  14. /* Operators for setting trapping parameters and zones */
  15. #include "ghost.h"
  16. #include "oper.h"
  17. #include "ialloc.h"
  18. #include "iparam.h"
  19. #include "gstrap.h"
  20. /* Define the current trap parameters. */
  21. /****** THIS IS BOGUS ******/
  22. gs_trap_params_t i_trap_params;
  23. /* <dict> .settrapparams - */
  24. private int
  25. zsettrapparams(i_ctx_t *i_ctx_p)
  26. {
  27. os_ptr op = osp;
  28. dict_param_list list;
  29. int code;
  30. check_type(*op, t_dictionary);
  31. code = dict_param_list_read(&list, op, NULL, false, iimemory);
  32. if (code < 0)
  33. return code;
  34. code = gs_settrapparams(&i_trap_params, (gs_param_list *) & list);
  35. iparam_list_release(&list);
  36. if (code < 0)
  37. return code;
  38. pop(1);
  39. return 0;
  40. }
  41. /* - settrapzone - */
  42. private int
  43. zsettrapzone(i_ctx_t *i_ctx_p)
  44. {
  45. /****** NYI ******/
  46. return_error(e_undefined);
  47. }
  48. /* ------ Initialization procedure ------ */
  49. const op_def ztrap_op_defs[] =
  50. {
  51. op_def_begin_ll3(),
  52. {"1.settrapparams", zsettrapparams},
  53. {"0settrapzone", zsettrapzone},
  54. op_def_end(0)
  55. };