smtf.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved.
  2. This file is part of AFPL Ghostscript.
  3. AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  4. distributor accepts any responsibility for the consequences of using it, or
  5. for whether it serves any particular purpose or works at all, unless he or
  6. she says so in writing. Refer to the Aladdin Free Public License (the
  7. "License") for full details.
  8. Every copy of AFPL Ghostscript must include a copy of the License, normally
  9. in a plain ASCII text file named PUBLIC. The License grants you the right
  10. to copy, modify and redistribute AFPL Ghostscript, but only under certain
  11. conditions described in the License. Among other things, the License
  12. requires that the copyright notice and this notice be preserved on all
  13. copies.
  14. */
  15. /*$Id: smtf.h,v 1.2 2000/09/19 19:00:51 lpd Exp $ */
  16. /* Definitions for MoveToFront filters */
  17. /* Requires scommon.h; strimpl.h if any templates are referenced */
  18. #ifndef smtf_INCLUDED
  19. # define smtf_INCLUDED
  20. /* MoveToFrontEncode/Decode */
  21. typedef struct stream_MTF_state_s {
  22. stream_state_common;
  23. /* The following change dynamically. */
  24. union _p {
  25. ulong l[256 / sizeof(long)];
  26. byte b[256];
  27. } prev;
  28. } stream_MTF_state;
  29. typedef stream_MTF_state stream_MTFE_state;
  30. typedef stream_MTF_state stream_MTFD_state;
  31. #define private_st_MTF_state() /* in sbwbs.c */\
  32. gs_private_st_simple(st_MTF_state, stream_MTF_state,\
  33. "MoveToFrontEncode/Decode state")
  34. extern const stream_template s_MTFE_template;
  35. extern const stream_template s_MTFD_template;
  36. #endif /* smtf_INCLUDED */