summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorHan The Thanh <hanthethanh@gmail.com>2008-07-13 09:48:46 +0000
committerHan The Thanh <hanthethanh@gmail.com>2008-07-13 09:48:46 +0000
commit364d55944724166ba0e66c88795cf1d1902dffad (patch)
treee70b83fa7a5b2e50c8293578a5d86bf19c9d25e1 /Build/source
parent561de1e9b6cf14cee2447c30ce667af102d3787b (diff)
pdftex bugfix for incompatible format
git-svn-id: svn://tug.org/texlive/trunk@9505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex.web6
-rw-r--r--Build/source/texk/web2c/pdftexdir/ptexmac.h68
-rw-r--r--Build/source/texk/web2c/pdftexdir/writeimg.c16
3 files changed, 47 insertions, 43 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web
index 61daf1807af..a17d42883bb 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex.web
+++ b/Build/source/texk/web2c/pdftexdir/pdftex.web
@@ -288,8 +288,8 @@ known as `\eTeX'.
{printed when \eTeX\ starts}
@#
@d pdftex_version==140 { \.{\\pdftexversion} }
-@d pdftex_revision=="8" { \.{\\pdftexrevision} }
-@d pdftex_version_string=='-1.40.8' {current \pdfTeX\ version}
+@d pdftex_revision=="9" { \.{\\pdftexrevision} }
+@d pdftex_version_string=='-1.40.9-rc1' {current \pdfTeX\ version}
@#
@d pdfeTeX_banner=='This is pdfeTeX, Version 3.1415926',pdftex_version_string,eTeX_version_string
{printed when \pdfeTeX\ starts}
@@ -32559,7 +32559,7 @@ already in an earlier module.
@<Undump pdftex data@>=
begin
undumpimagemeta(pdf_minor_version,pdf_inclusion_errorlevel); {the image information array }
-undump_int(pdf_mem_size);
+undump_int(pdf_mem_size);
pdf_mem := xrealloc_array(pdf_mem, integer, pdf_mem_size);
undump_int(pdf_mem_ptr);
for k:=1 to pdf_mem_ptr-1 do begin
diff --git a/Build/source/texk/web2c/pdftexdir/ptexmac.h b/Build/source/texk/web2c/pdftexdir/ptexmac.h
index dcd3c0aeb8d..18cd5dc6453 100644
--- a/Build/source/texk/web2c/pdftexdir/ptexmac.h
+++ b/Build/source/texk/web2c/pdftexdir/ptexmac.h
@@ -48,7 +48,7 @@ $Id$
# define objinfo(n) objtab[n].int0
-# define pdfroom(n) do { \
+# define pdfroom(n) do { \
if ((unsigned)(n + pdfptr) > (unsigned)pdfbufsize) { \
if (pdfosmode) \
zpdfosgetosbuf(n); \
@@ -62,8 +62,8 @@ $Id$
} while (0)
# define pdfout(c) do { \
- pdfroom(1); \
- pdfbuf[pdfptr++] = c; \
+ pdfroom(1); \
+ pdfbuf[pdfptr++] = c; \
} while (0)
# define pdfoffset() (pdfgone + pdfptr)
@@ -79,63 +79,63 @@ $Id$
# define pdftex_debug tex_printf
-# define check_buf(size, buf_size) \
- if ((unsigned)(size) > (unsigned)(buf_size)) \
+# define check_buf(size, buf_size) \
+ if ((unsigned)(size) > (unsigned)(buf_size)) \
pdftex_fail("buffer overflow at file %s, line %d", __FILE__, __LINE__ )
-# define append_char_to_buf(c, p, buf, buf_size) do { \
- if (c == 9) \
- c = 32; \
- if (c == 13 || c == EOF) \
- c = 10; \
- if (c != ' ' || (p > buf && p[-1] != 32)) { \
- check_buf(p - buf + 1, (buf_size)); \
- *p++ = c; \
- } \
+# define append_char_to_buf(c, p, buf, buf_size) do { \
+ if (c == 9) \
+ c = 32; \
+ if (c == 13 || c == EOF) \
+ c = 10; \
+ if (c != ' ' || (p > buf && p[-1] != 32)) { \
+ check_buf(p - buf + 1, (buf_size)); \
+ *p++ = c; \
+ } \
} while (0)
-# define append_eol(p, buf, buf_size) do { \
- check_buf(p - buf + 2, (buf_size)); \
- if (p - buf > 1 && p[-1] != 10) \
- *p++ = 10; \
- if (p - buf > 2 && p[-2] == 32) { \
- p[-2] = 10; \
- p--; \
- } \
- *p = 0; \
+# define append_eol(p, buf, buf_size) do { \
+ check_buf(p - buf + 2, (buf_size)); \
+ if (p - buf > 1 && p[-1] != 10) \
+ *p++ = 10; \
+ if (p - buf > 2 && p[-2] == 32) { \
+ p[-2] = 10; \
+ p--; \
+ } \
+ *p = 0; \
} while (0)
-# define remove_eol(p, buf) do { \
- p = strend(buf) - 1; \
- if (*p == 10) \
- *p = 0; \
+# define remove_eol(p, buf) do { \
+ p = strend(buf) - 1; \
+ if (*p == 10) \
+ *p = 0; \
} while (0)
# define skip(p, c) if (*p == c) p++
-# define alloc_array(T, n, s) do { \
+# define alloc_array(T, n, s) do { \
if (T##_array == NULL) { \
T##_limit = (s); \
- if ((unsigned)(n) > T##_limit) \
+ if ((unsigned)(n) > (unsigned)(T##_limit)) \
T##_limit = (n); \
T##_array = xtalloc(T##_limit, T##_entry); \
T##_ptr = T##_array; \
} \
- else if ((unsigned)(T##_ptr - T##_array + (n)) > T##_limit) { \
+ else if ((unsigned)(T##_ptr - T##_array + (n)) > (unsigned)(T##_limit)) { \
last_ptr_index = T##_ptr - T##_array; \
T##_limit *= 2; \
- if ((unsigned)(T##_ptr - T##_array + (n)) > T##_limit) \
+ if ((unsigned)(T##_ptr - T##_array + (n)) > (unsigned)(T##_limit)) \
T##_limit = T##_ptr - T##_array + (n); \
xretalloc(T##_array, T##_limit, T##_entry); \
T##_ptr = T##_array + last_ptr_index; \
} \
} while (0)
-# define is_cfg_comment(c) \
+# define is_cfg_comment(c) \
(c == 10 || c == '*' || c == '#' || c == ';' || c == '%')
-# define define_array(T) \
-T##_entry *T##_ptr, *T##_array = NULL; \
+# define define_array(T) \
+T##_entry *T##_ptr, *T##_array = NULL; \
size_t T##_limit
# define xfree(p) do { if (p != NULL) free(p); p = NULL; } while (0)
diff --git a/Build/source/texk/web2c/pdftexdir/writeimg.c b/Build/source/texk/web2c/pdftexdir/writeimg.c
index 9a1caf40ae2..2908c57a328 100644
--- a/Build/source/texk/web2c/pdftexdir/writeimg.c
+++ b/Build/source/texk/web2c/pdftexdir/writeimg.c
@@ -24,12 +24,16 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <kpathsea/c-memstr.h>
static const char _svn_version[] =
- "$Id$ $URL: http://scm.foundry.supelec.fr/svn/pdftex/branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c $";
+ "$Id$ $URL: svn://192.168.0.1/svnroot/pdftex/branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c $";
#define bp2int(p) round(p*(onehundredbp/100.0))
/* define image_ptr, image_array & image_limit */
-define_array(image);
+/* define_array(image); */
+
+/* avoid use of size_t */
+image_entry *image_ptr, *image_array = NULL;
+integer image_limit;
float epdf_width;
float epdf_height;
@@ -429,10 +433,10 @@ void img_free()
* does not matter.
*/
-#define dumpsizet generic_dump
+/* #define dumpsizet generic_dump */
#define dumpinteger generic_dump
-#define undumpsizet generic_undump
+/* #define undumpsizet generic_undump */
#define undumpinteger generic_undump
/* (un)dumping a string means dumping the allocation size, followed
@@ -469,7 +473,7 @@ void dumpimagemeta()
{
int cur_image, img;
- dumpsizet(image_limit);
+ dumpinteger(image_limit);
cur_image = (image_ptr - image_array);
dumpinteger(cur_image);
@@ -503,7 +507,7 @@ void undumpimagemeta(integer pdfversion, integer pdfinclusionerrorlevel)
{
int cur_image, img;
- undumpsizet(image_limit);
+ undumpinteger(image_limit);
image_array = xtalloc(image_limit, image_entry);
undumpinteger(cur_image);