"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "base/gsdsrc.h" between
ghostscript-9.26.tar.xz and ghostscript-9.27.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release).

gsdsrc.h  (ghostscript-9.26.tar.xz):gsdsrc.h  (ghostscript-9.27.tar.xz)
/* Copyright (C) 2001-2018 Artifex Software, Inc. /* Copyright (C) 2001-2019 Artifex Software, Inc.
All Rights Reserved. All Rights Reserved.
This software is provided AS-IS with no warranty, either express or This software is provided AS-IS with no warranty, either express or
implied. implied.
This software is distributed under license and may not be copied, This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution. of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact Refer to licensing information at http://www.artifex.com or contact
Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
CA 94945, U.S.A., +1(415)492-9861, for further information. CA 94945, U.S.A., +1(415)492-9861, for further information.
*/ */
/* DataSource definitions */ /* DataSource definitions */
#ifndef gsdsrc_INCLUDED #ifndef gsdsrc_INCLUDED
# define gsdsrc_INCLUDED # define gsdsrc_INCLUDED
#include "gsstruct.h" #include "gsstruct.h"
#include "scommon.h"
/* ---------------- Types and structures ---------------- */ /* ---------------- Types and structures ---------------- */
/* /*
* A gs_data_source_t represents the data source for various constructs. It * A gs_data_source_t represents the data source for various constructs. It
* can be a string (either a gs_string or a byte-type object), a * can be a string (either a gs_string or a byte-type object), a
* positionable, non-procedure-based stream, or an array of floats. An * positionable, non-procedure-based stream, or an array of floats. An
* ordinary positionable file stream will do, as long as the client doesn't * ordinary positionable file stream will do, as long as the client doesn't
* attempt to read past the EOF. * attempt to read past the EOF.
* *
* The handling of floats is anomalous, but we don't see a good alternative * The handling of floats is anomalous, but we don't see a good alternative
* at the moment. * at the moment.
*/ */
#ifndef stream_DEFINED
# define stream_DEFINED
typedef struct stream_s stream;
#endif
/* /*
* Prepare to access a block of data from a source. buf must be a client- * Prepare to access a block of data from a source. buf must be a client-
* supplied buffer of at least length bytes. If ptr == 0, always copy the * supplied buffer of at least length bytes. If ptr == 0, always copy the
* data into buf. If ptr != 0, either copy the data into buf and set *ptr = * data into buf. If ptr != 0, either copy the data into buf and set *ptr =
* buf, or set *ptr to point to the data (which might be invalidated by the * buf, or set *ptr to point to the data (which might be invalidated by the
* next call). Note that this procedure may or may not do bounds checking. * next call). Note that this procedure may or may not do bounds checking.
*/ */
#define data_source_proc_access(proc)\ #define data_source_proc_access(proc)\
int proc(const gs_data_source_t *psrc, ulong start, uint length,\ int proc(const gs_data_source_t *psrc, ulong start, uint length,\
byte *buf, const byte **ptr) byte *buf, const byte **ptr)
typedef enum { typedef enum {
data_source_type_string, data_source_type_string,
data_source_type_bytes, data_source_type_bytes,
data_source_type_floats, data_source_type_floats,
data_source_type_stream data_source_type_stream
} gs_data_source_type_t; } gs_data_source_type_t;
#ifndef gs_data_source_DEFINED
# define gs_data_source_DEFINED
typedef struct gs_data_source_s gs_data_source_t; typedef struct gs_data_source_s gs_data_source_t;
#endif
struct gs_data_source_s { struct gs_data_source_s {
data_source_proc_access((*access)); data_source_proc_access((*access));
gs_data_source_type_t type; gs_data_source_type_t type;
union d_ { union d_ {
gs_const_string str; /* also used for byte objects */ gs_const_string str; /* also used for byte objects */
stream *strm; stream *strm;
} data; } data;
}; };
#define data_source_access_only(psrc, start, length, buf, ptr)\ #define data_source_access_only(psrc, start, length, buf, ptr)\
 End of changes. 5 change blocks. 
9 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)