All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact
Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
CA 94129, USA, for further information.
*/
#ifndef ifilter_INCLUDED
# define ifilter_INCLUDED
#include "istream.h"
#include "ivmspace.h"
* Define the utility procedures for creating filters.
* Note that a filter will be allocated in global VM iff the source/target
* and all relevant parameters (if any) are in global VM.
*/
int filter_read(
i_ctx_t *i_ctx_p,
int npop,
const stream_template * templat,
stream_state * st,
uint space
);
int filter_write(i_ctx_t *i_ctx_p, int npop,
const stream_template * templat,
stream_state * st, uint space);
* Define a simplified interface for streams with no parameters (except
* an optional dictionary) or state.
*/
int filter_read_simple(i_ctx_t *i_ctx_p,
const stream_template * templat);
int filter_write_simple(i_ctx_t *i_ctx_p,
const stream_template * templat);
void filter_mark_temp(const ref * fop, int is_temp);
void filter_mark_strm_temp(const ref * fop, int is_temp);
stream_proc_report_error(filter_report_error);
* Define the state of a procedure-based stream.
* Note that procedure-based streams are defined at the Ghostscript
* interpreter level, unlike all other stream types which depend only
* on the stream package and the memory manager.
*/
typedef struct stream_proc_state_s {
stream_state_common;
bool eof;
uint index;
ref proc;
ref data;
} stream_proc_state;
#define private_st_stream_proc_state() \
gs_private_st_complex_only(st_sproc_state, stream_proc_state,\
"procedure stream state", sproc_clear_marks, sproc_enum_ptrs, sproc_reloc_ptrs, 0)
bool s_is_proc(const stream *s);
#endif