Patch fot the bug 690660
Alex Cherepanov <[email protected]> Tue, 28 Jul 2009 13:32:13 -0400
| Newsgroups | gmane.comp.printing.ghostscript.patches,gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------090609030300020905080700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Change the operand types of encode_binary_token() to match the
the type of PostScript integers in the ref structure.
I'm still running regression tests.
--------------090609030300020905080700
Content-Type: text/plain;
name="690660.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="690660.diff"
Index: gs/psi/iscanbin.c
===================================================================
--- gs/psi/iscanbin.c (revision 9871)
+++ gs/psi/iscanbin.c (working copy)
@@ -853,13 +853,13 @@
* but it always write bytes 0 and 2-7.
*/
int
-encode_binary_token(i_ctx_t *i_ctx_p, const ref *obj, long *ref_offset,
- long *char_offset, byte *str)
+encode_binary_token(i_ctx_t *i_ctx_p, const ref *obj, int *ref_offset,
+ int *char_offset, byte *str)
{
bin_seq_type_t type;
uint size = 0;
int format = (int)ref_binary_object_format.value.intval;
- long value = 0;
+ int value = 0;
ref nstr;
switch (r_type(obj)) {
@@ -899,7 +899,7 @@
type = BS_TYPE_DICTIONARY;
size = dict_length(obj) << 1;
aod:value = *ref_offset;
- *ref_offset += size * (ulong) SIZEOF_BIN_SEQ_OBJ;
+ *ref_offset += size * SIZEOF_BIN_SEQ_OBJ;
break;
case t_string:
type = BS_TYPE_STRING;
Index: gs/psi/btoken.h
===================================================================
--- gs/psi/btoken.h (revision 9871)
+++ gs/psi/btoken.h (working copy)
@@ -30,8 +30,8 @@
client_name_t cname); /* in zbseq.c */
/* Convert an object to its representation in a binary object sequence. */
-int encode_binary_token(i_ctx_t *i_ctx_p, const ref *obj, long *ref_offset,
- long *char_offset, byte *str); /* in iscanbin.c */
+int encode_binary_token(i_ctx_t *i_ctx_p, const ref *obj, int *ref_offset,
+ int *char_offset, byte *str); /* in iscanbin.c */
/* Define the current binary object format for operators. */
/* This is a ref so that it can be managed properly by save/restore. */
--------------090609030300020905080700
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
--------------090609030300020905080700--