summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-29 13:19:39 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-29 13:19:39 +0000
commit7b7497d5ec04f3a154975722b6b2725be6566271 (patch)
tree5a8a1d7c3b262877c81c2051b574e6dd3be308c7 /Build
parent0f81c6717bd7d19eb1e3091b5f18d1f3d988e02c (diff)
More pdftex headers
git-svn-id: svn://tug.org/texlive/trunk@18040 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/Makefile.in12
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog12
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/libpdftex.am2
-rw-r--r--Build/source/texk/web2c/pdftexdir/epdf.h92
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex-common.h63
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex.web2
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc10
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.h51
-rw-r--r--Build/source/texk/web2c/pdftexdir/ptexlib.h6
-rw-r--r--Build/source/texk/web2c/pdftexdir/ptexmac.h2
10 files changed, 139 insertions, 113 deletions
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 5161980b595..51e25cba4ae 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -403,9 +403,9 @@ libpdftex_a_AR = $(AR) $(ARFLAGS)
libpdftex_a_LIBADD =
am__libpdftex_a_SOURCES_DIST = pdftexdir/avl.c pdftexdir/avl.h \
pdftexdir/avlstuff.c pdftexdir/avlstuff.h pdftexdir/epdf.c \
- pdftexdir/epdf.h pdftexdir/image.h pdftexdir/mapfile.c \
- pdftexdir/pdftex.h pdftexdir/pdftex-common.h \
- pdftexdir/pdftoepdf.cc pdftexdir/pkin.c pdftexdir/ptexlib.h \
+ pdftexdir/image.h pdftexdir/mapfile.c pdftexdir/pdftex.h \
+ pdftexdir/pdftex-common.h pdftexdir/pdftoepdf.cc \
+ pdftexdir/pdftoepdf.h pdftexdir/pkin.c pdftexdir/ptexlib.h \
pdftexdir/ptexmac.h pdftexdir/subfont.c pdftexdir/tounicode.c \
pdftexdir/utils.c pdftexdir/vfpacket.c pdftexdir/writeenc.c \
pdftexdir/writefont.c pdftexdir/writeimg.c \
@@ -1701,9 +1701,9 @@ libpdftex_a_CFLAGS = $(WARNING_CFLAGS)
libpdftex_a_CXXFLAGS = # $(WARNING_CXXFLAGS)
libpdftex_a_SOURCES = pdftexdir/avl.c pdftexdir/avl.h \
pdftexdir/avlstuff.c pdftexdir/avlstuff.h pdftexdir/epdf.c \
- pdftexdir/epdf.h pdftexdir/image.h pdftexdir/mapfile.c \
- pdftexdir/pdftex.h pdftexdir/pdftex-common.h \
- pdftexdir/pdftoepdf.cc pdftexdir/pkin.c pdftexdir/ptexlib.h \
+ pdftexdir/image.h pdftexdir/mapfile.c pdftexdir/pdftex.h \
+ pdftexdir/pdftex-common.h pdftexdir/pdftoepdf.cc \
+ pdftexdir/pdftoepdf.h pdftexdir/pkin.c pdftexdir/ptexlib.h \
pdftexdir/ptexmac.h pdftexdir/subfont.c pdftexdir/tounicode.c \
pdftexdir/utils.c pdftexdir/vfpacket.c pdftexdir/writeenc.c \
pdftexdir/writefont.c pdftexdir/writeimg.c \
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index dce43196f03..c7d8f1db271 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -11,8 +11,20 @@
"inc-extra.h", move some prototypes ...
* image.h: Move some prototypes ...
* pdftex-common.h (new): ... to here.
+
+ * epdf.h (deleted): Renamed ...
+ * pdftoepdf.h (new): ... into this.
+ * pdftex.web (pdf_last_byte): Changed type to eight_bits.
+ * pdftoepdf.cc (notdef): Added (char *) cast.
+ * pdftoepdf.h, ptexlib.h: Moved declarations from here ...
+ * pdftex-common.h: ... to here, dropped a few unused ones.
* am/libpdftex.am: Adjusted.
+ * pdftex-common.h: #define pdfosgetosbuf and pdfbeginobj as
+ in pdftexcoerce.h (generated by Web2C).
+ * pdftoepdf.cc: Use pdfbeginobj instead of zpdfbeginobj.
+ * ptexmac.h: Use pdfosgetosbuf instead of zpdfosgetosbuf.
+
2010-04-28 Peter Breitenlohner <peb@mppmu.mpg.de>
* pdftex.web: Adapt to ../etexdir/etex.ch:
diff --git a/Build/source/texk/web2c/pdftexdir/am/libpdftex.am b/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
index e26eb4bfd67..ab801b066f4 100644
--- a/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
+++ b/Build/source/texk/web2c/pdftexdir/am/libpdftex.am
@@ -17,12 +17,12 @@ libpdftex_a_SOURCES = \
pdftexdir/avlstuff.c \
pdftexdir/avlstuff.h \
pdftexdir/epdf.c \
- pdftexdir/epdf.h \
pdftexdir/image.h \
pdftexdir/mapfile.c \
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/epdf.h b/Build/source/texk/web2c/pdftexdir/epdf.h
deleted file mode 100644
index 7c9b787b163..00000000000
--- a/Build/source/texk/web2c/pdftexdir/epdf.h
+++ /dev/null
@@ -1,92 +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.
-
-*/
-
-extern "C" {
-
-#include <kpathsea/c-auto.h>
-
- extern char *xstrdup(const char *);
-
-/* the following code is extremly ugly but needed for including web2c/config.h */
-
- typedef const char *const_string; /* including kpathsea/types.h doesn't work on some systems */
-
-#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 "openbsd-compat.h"
-
-/* #-define pdfbufsize pdfbufmax */
-
- 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 void *epdf_xref;
-
- extern integer pdfboxspecmedia;
- extern integer pdfboxspeccrop;
- extern integer pdfboxspecbleed;
- extern integer pdfboxspectrim;
- extern integer pdfboxspecart;
-
- extern longinteger pdfstreamlength;
- extern longinteger pdfptr;
- extern integer poolptr;
- typedef unsigned char eightbits;
- extern eightbits *pdfbuf;
- extern integer pdfbufsize;
- extern integer pdfosmode;
- extern eightbits pdflastbyte;
- extern integer fixedinclusioncopyfont;
-
- extern char notdef[];
-
- extern struct fm_entry *lookup_fontmap(char *);
- extern integer get_fontfile(struct fm_entry *);
- extern integer get_fontname(struct fm_entry *);
- extern integer pdfnewobjnum(void);
- extern void pdfbeginstream(void);
- extern void pdfendobj(void);
- extern void pdfendstream(void);
- extern void pdfflush(void);
- extern void zpdfbegindict(integer, bool);
- extern void zpdfbeginobj(integer, bool);
- extern void zpdfcreateobj(integer, integer);
- extern void zpdfnewdict(integer, integer, bool);
- extern void zpdfosgetosbuf(integer);
-
-#include "pdftex-common.h"
-}
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex-common.h b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
index a31c6deb1c2..42e42e23379 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex-common.h
+++ b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
@@ -20,12 +20,54 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Whereas the C code uses: #include "ptexlib.h"
- pdftoepdf.cc uses: #include "epdf.h"
+ pdftoepdf.cc uses: #include "pdftoepdf.h"
Unfortunately these to headers are incompatible; thus they
include this file with prototypes required in both cases.
*/
+#ifndef PDFTEX_COMMON_H
+# define PDFTEX_COMMON_H
+
+/* FIXME: from ../../kpathsea/lib.h */
+extern KPSEDLL char *xstrdup (const char *);
+
+/* 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.
+*/
+
+/* pdftexd.h */
+#ifdef __cplusplus
+typedef unsigned char eightbits;
+#endif
+
+extern integer pdfboxspecmedia;
+extern integer pdfboxspeccrop;
+extern integer pdfboxspecbleed;
+extern integer pdfboxspectrim;
+extern integer pdfboxspecart;
+
+extern longinteger pdfstreamlength;
+extern longinteger pdfptr;
+extern integer poolptr;
+extern eightbits *pdfbuf;
+extern integer pdfbufsize;
+extern int pdfosmode; /* Web's boolean */
+extern eightbits pdflastbyte;
+extern integer fixedinclusioncopyfont;
+
+/* pdftexcoerce.h */
+extern integer pdfnewobjnum(void);
+extern void pdfbeginstream(void);
+extern void pdfendobj(void);
+extern void pdfendstream(void);
+extern void pdfflush(void);
+extern void zpdfosgetosbuf(integer);
+#define pdfosgetosbuf(s) zpdfosgetosbuf((integer) (s))
+extern void zpdfbeginobj(integer, integer);
+#define pdfbeginobj(i, pdfoslevel) zpdfbeginobj((integer) (i), (integer) (pdfoslevel))
+
/* epdf.c */
#ifdef __cplusplus
# define fd_entry struct fd_entry
@@ -38,6 +80,12 @@ extern void epdf_mark_glyphs(fd_entry *, char *);
extern int get_fd_objnum(fd_entry *);
extern int get_fn_objnum(fd_entry *);
extern int is_subsetable(fm_entry *);
+
+/* macnames.c */
+extern const char notdef[];
+
+/* mapfile.c */
+extern fm_entry *lookup_fontmap(char *);
#undef fd_entry
#undef fm_entry
@@ -63,3 +111,16 @@ extern void write_epdf(void);
/* writeenc.c */
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;
+
+#endif /* PDFTEX_COMMON_H */
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web
index 995e7a7ff97..b3089f04d9a 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex.web
+++ b/Build/source/texk/web2c/pdftexdir/pdftex.web
@@ -16373,7 +16373,7 @@ so we can use this field for both}
@!pdf_stream_length: longinteger; {length of most recently generated stream}
@!pdf_stream_length_offset: longinteger; {file offset of the last stream length}
@!pdf_seek_write_length: boolean; {flag whether to seek back and write \.{/Length}}
-@!pdf_last_byte: integer; {byte most recently written to PDF file; for \.{endstream} in new line}
+@!pdf_last_byte: eight_bits; {byte most recently written to PDF file; for \.{endstream} in new line}
@!pdf_append_list_arg: integer; {for use with |pdf_append_list|}
@!ff: integer; {for use with |set_ff|}
@!pdf_box_spec_media: integer;
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index 19f06c27dff..6e846b6023a 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -52,7 +52,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "GlobalParams.h"
#include "Error.h"
-#include "epdf.h"
+#include "pdftoepdf.h"
// 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++.
@@ -615,15 +615,15 @@ static void writeRefs()
xref->fetch(r->ref.num, r->ref.gen, &obj1);
if (r->type == objFont) {
assert(!obj1.isStream());
- zpdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this
+ pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this
copyFontDict(&obj1, r);
pdf_puts("\n");
pdfendobj();
} else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor()
if (obj1.isStream())
- zpdfbeginobj(r->num, 0);
+ pdfbeginobj(r->num, 0);
else
- zpdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this
+ pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this
copyObject(&obj1);
pdf_puts("\n");
pdfendobj();
@@ -648,7 +648,7 @@ static void writeEncodings()
if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
glyphNames[i] = s;
else
- glyphNames[i] = notdef;
+ glyphNames[i] = (char *) notdef;
}
epdf_write_enc(glyphNames, r->enc_objnum);
}
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.h b/Build/source/texk/web2c/pdftexdir/pdftoepdf.h
new file mode 100644
index 00000000000..a37ebe87c53
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.h
@@ -0,0 +1,51 @@
+/*
+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 <kpathsea/c-auto.h>
+#include <kpathsea/c-proto.h>
+
+/* the following code is extremly ugly but needed for including web2c/config.h */
+
+ typedef const char *const_string; /* including kpathsea/types.h doesn't work on some systems */
+
+#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 "openbsd-compat.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 82b4806f145..d5c13c4261f 100644
--- a/Build/source/texk/web2c/pdftexdir/ptexlib.h
+++ b/Build/source/texk/web2c/pdftexdir/ptexlib.h
@@ -157,7 +157,6 @@ typedef struct {
extern boolean true_dimen;
extern char **t1_glyph_names, *t1_builtin_glyph_names[];
extern char *cur_file_name;
-extern const char notdef[];
extern integer t1_length1, t1_length2, t1_length3;
extern integer ttf_length;
extern strnumber last_tex_string;
@@ -171,12 +170,7 @@ extern const char *ptexbanner;
/* prototypes used in C code as well as pdftoepdf.cc */
#include "pdftex-common.h"
-/* epdf.c */
-extern integer get_fontfile_num(int);
-extern integer get_fontname_num(int);
-
/* mapfile.c */
-extern fm_entry *lookup_fontmap(char *);
extern boolean hasfmentry(internalfontnumber);
extern void fm_free(void);
extern void fm_read_info(void);
diff --git a/Build/source/texk/web2c/pdftexdir/ptexmac.h b/Build/source/texk/web2c/pdftexdir/ptexmac.h
index 59499953a47..4392f058621 100644
--- a/Build/source/texk/web2c/pdftexdir/ptexmac.h
+++ b/Build/source/texk/web2c/pdftexdir/ptexmac.h
@@ -50,7 +50,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# define pdfroom(n) do { \
if ((unsigned)(n + pdfptr) > (unsigned)pdfbufsize) { \
if (pdfosmode) \
- zpdfosgetosbuf(n); \
+ pdfosgetosbuf(n); \
else { \
if ((unsigned)(n) > (unsigned)pdfbufsize) \
pdftex_fail("PDF output buffer overflowed"); \