home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / UsingPDF / GhostScript / source / gs5.10 / gxfunc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-27  |  2.1 KB  |  56 lines

  1. /* Copyright (C) 1997 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gxfunc.h */
  20. /* Internal definitions for Functions */
  21.  
  22. #ifndef gxfunc_INCLUDED
  23. #  define gxfunc_INCLUDED
  24.  
  25. #include "gsfunc.h"
  26. #include "gsstruct.h"
  27.  
  28. /* ---------------- Types and structures ---------------- */
  29.  
  30. /* Define the generic Function structure type.  This is never instantiated. */
  31. extern_st(st_function);
  32. #define public_st_function()    /* in gsfunc.c */\
  33.   gs_public_st_ptrs2(st_function, gs_function_t, "gs_function_t",\
  34.     function_enum_ptrs, function_reloc_ptrs, params.Domain, params.Range)
  35.  
  36. /* ---------------- Internal procedures ---------------- */
  37.  
  38. /* Generic free_params implementation. */
  39. void fn_common_free_params(P2(gs_function_params_t *params, gs_memory_t *mem));
  40.  
  41. /* Generic free implementation. */
  42. void fn_common_free(P3(gs_function_t *pfn, bool free_params, gs_memory_t *mem));
  43.  
  44. /* Free an array of subsidiary Functions. */
  45. void fn_free_functions(P3(gs_function_t **Functions, int count, gs_memory_t *mem));
  46.  
  47. /* Check the values of m, n, Domain, and (if supplied) Range. */
  48. int fn_check_mnDR_proc(P3(const gs_function_params_t *params, int m, int n));
  49. #define fn_check_mnDR(params, m, n)\
  50.   do {\
  51.     int code = fn_check_mnDR_proc((const gs_function_params_t *)(params), m, n);\
  52.     if ( code < 0 ) return code;\
  53.   } while ( 0 )
  54.  
  55. #endif                    /* gxfunc_INCLUDED */
  56.