summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog15
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/libpdftex.am1
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex-common.h35
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc26
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.h48
-rw-r--r--Build/source/texk/web2c/pdftexdir/ptexlib.h2
-rw-r--r--Build/source/texk/web2c/pdftexdir/writeimg.c6
7 files changed, 50 insertions, 83 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 183a72a8296..27ca59cde55 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,11 +1,18 @@
2010-04-30 Peter Breitenlohner <peb@mppmu.mpg.de>
- * pdftoepdf.h: #include "openbsd-compat.h" as early as possible.
- Add #include <kpathsea/lib.h> and drop decl of const_string.
* pdftex-common.h (xstrdup): Remove decl (in <kpathsea/lib.h>).
(pdfosmode): Declare as boolean as generated by Web2C.
- * pdftoepdf.cc: Avoid MINGW32's typedef of boolean, conflicting
- with <kpathsea/types.h>.
+ * pdftoepdf.h (deleted): Moved contents ...
+ * pdftoepdf.cc: ... to here.
+ #include "openbsd-compat.h" as early as possible.
+ Add #include <kpathsea/lib.h> and drop decl of const_string.
+ Avoid MINGW32's typedef of boolean, conflicting with the
+ definition in <kpathsea/types.h>.
+ * am/libpdftex.am: Adjusted.
+
+ * pdftex-common.h, writeimg.c (epdf_selected_page,
+ epdf_num_pages, epdf_page_box): Change from integer to int.
+ * pdftoepdf.cc: Remove '(int)' casts.
2010-04-29 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/pdftexdir/am/libpdftex.am b/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
index ab801b066f4..21d09127ee2 100644
--- a/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
+++ b/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
@@ -22,7 +22,6 @@ libpdftex_a_SOURCES = \
pdftexdir/pdftex.h \
pdftexdir/pdftex-common.h \
pdftexdir/pdftoepdf.cc \
- pdftexdir/pdftoepdf.h \
pdftexdir/pkin.c \
pdftexdir/ptexlib.h \
pdftexdir/ptexmac.h \
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex-common.h b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
index 4ddac5f39cf..58625d0b20e 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex-common.h
+++ b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
@@ -19,22 +19,17 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* Whereas the C code uses: #include "ptexlib.h"
- pdftoepdf.cc uses: #include "pdftoepdf.h"
-
- Unfortunately these to headers are incompatible; thus they
- include this file with prototypes required in both cases.
+/* This file contains declarations used in C code (via ptexlib.h) as
+ well as in pdftoepdf.cc (where we can not #include "ptexlib.h").
*/
#ifndef PDFTEX_COMMON_H
# define PDFTEX_COMMON_H
-/* Generated from pdftex.web:
- these declarations are included in ptexlib.h via pdftexd.h,
- we repeat them here for pdftoepdf.h and as consistency check.
-*/
+/* Declarations generated from pdftex.web are included in ptexlib.h via pdftexd.h,
+ we repeat them here for pdftoepdf.cc and as consistency check.
-/* pdftexd.h */
+ pdftexd.h - generated from pdftex.web */
#ifdef __cplusplus
typedef unsigned char eightbits;
#endif
@@ -54,7 +49,7 @@ extern boolean pdfosmode;
extern eightbits pdflastbyte;
extern integer fixedinclusioncopyfont;
-/* pdftexcoerce.h */
+/* pdftexcoerce.h - generated from pdftex.web */
extern integer pdfnewobjnum(void);
extern void pdfbeginstream(void);
extern void pdfendobj(void);
@@ -110,14 +105,14 @@ extern void write_epdf(void);
extern void epdf_write_enc(char **, int);
/* writeimg.c */
- extern float epdf_width;
- extern float epdf_height;
- extern float epdf_orig_x;
- extern float epdf_orig_y;
- extern float epdf_rotate;
- extern integer epdf_selected_page;
- extern integer epdf_num_pages;
- extern integer epdf_page_box;
- extern void *epdf_doc;
+extern float epdf_width;
+extern float epdf_height;
+extern float epdf_orig_x;
+extern float epdf_orig_y;
+extern float epdf_rotate;
+extern int epdf_selected_page;
+extern int epdf_num_pages;
+extern int epdf_page_box;
+extern void *epdf_doc;
#endif /* PDFTEX_COMMON_H */
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index 40a1102046b..c48676579c9 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -1,5 +1,5 @@
/*
-Copyright 1996-2007 Han The Thanh, <thanh@pdftex.org>
+Copyright 1996-2010 Han The Thanh, <thanh@pdftex.org>
This file is part of pdfTeX.
@@ -46,8 +46,6 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <assert.h>
#endif
-#undef boolean
-
#include "Object.h"
#include "Stream.h"
#include "Array.h"
@@ -61,11 +59,27 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "GlobalParams.h"
#include "Error.h"
-#include "pdftoepdf.h"
+#undef boolean
// This file is mostly C and not very much C++; it's just used to interface
// the functions of xpdf, which happens to be written in C++.
+extern "C" {
+
+#include <openbsd-compat.h>
+
+#include <kpathsea/c-auto.h>
+#include <kpathsea/c-proto.h>
+#include <kpathsea/lib.h>
+
+#include <c-auto.h> /* define SIZEOF_LONG */
+#include <config.h> /* define type integer */
+
+#include <pdftexdir/ptexmac.h>
+#include <pdftexdir/pdftex-common.h>
+
+}
+
// The prefix "PTEX" for the PDF keys is special to pdfTeX;
// this has been registered with Adobe by Hans Hagen.
@@ -768,7 +782,7 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
// get page by number
if (page_num <= 0 || page_num > epdf_num_pages)
pdftex_fail("PDF inclusion: required page does not exist <%i>",
- (int) epdf_num_pages);
+ epdf_num_pages);
}
// get the required page
page = pdf_doc->doc->getCatalog()->getPage(page_num);
@@ -846,7 +860,7 @@ void write_epdf(void)
pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix,
convertStringToPDFString(pdf_doc->file_name,
strlen(pdf_doc->file_name)));
- pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page);
+ pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, epdf_selected_page);
pdf_doc->doc->getDocInfoNF(&info);
if (info.isRef()) {
// the info dict must be indirect (PDF Ref p. 61)
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.h b/Build/source/texk/web2c/pdftexdir/pdftoepdf.h
deleted file mode 100644
index a8d753aefa5..00000000000
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-Copyright (c) 1996-2008 Han The Thanh, <thanh@pdftex.org>
-
-This file is part of pdfTeX.
-
-pdfTeX is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-pdfTeX is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with pdfTeX; if not, write to the Free Software Foundation, Inc., 51
-Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#ifndef PDFTOEPDF_H
-# define PDFTOEPDF_H
-
-extern "C" {
-
-#include "openbsd-compat.h"
-
-#include <kpathsea/c-auto.h>
-#include <kpathsea/c-proto.h>
-#include <kpathsea/lib.h>
-
-#define KPATHSEA_CONFIG_H /* avoid including other kpathsea header files */
- /* from web2c/config.h */
-
-#ifdef CONFIG_H /* CONFIG_H has been defined by some xpdf */
-# undef CONFIG_H /* header file */
-#endif
-
-#include <c-auto.h> /* define SIZEOF_LONG */
-#include <config.h> /* define type integer */
-
-#include <pdftexdir/ptexmac.h>
-
-#include "pdftex-common.h"
-}
-
-#endif /* PDFTOEPDF_H */
diff --git a/Build/source/texk/web2c/pdftexdir/ptexlib.h b/Build/source/texk/web2c/pdftexdir/ptexlib.h
index d5c13c4261f..9fcc17f19ce 100644
--- a/Build/source/texk/web2c/pdftexdir/ptexlib.h
+++ b/Build/source/texk/web2c/pdftexdir/ptexlib.h
@@ -168,7 +168,7 @@ extern const char *ptexbanner;
/* pdftexlib function prototypes */
/* prototypes used in C code as well as pdftoepdf.cc */
-#include "pdftex-common.h"
+#include <pdftexdir/pdftex-common.h>
/* mapfile.c */
extern boolean hasfmentry(internalfontnumber);
diff --git a/Build/source/texk/web2c/pdftexdir/writeimg.c b/Build/source/texk/web2c/pdftexdir/writeimg.c
index de3889da13f..c9772135c24 100644
--- a/Build/source/texk/web2c/pdftexdir/writeimg.c
+++ b/Build/source/texk/web2c/pdftexdir/writeimg.c
@@ -37,9 +37,9 @@ float epdf_height;
float epdf_orig_x;
float epdf_orig_y;
float epdf_rotate;
-integer epdf_selected_page;
-integer epdf_num_pages;
-integer epdf_page_box;
+int epdf_selected_page;
+int epdf_num_pages;
+int epdf_page_box;
void *epdf_doc;
static integer new_image_entry(void)