summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/texmfmp.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-16 23:53:26 +0000
committerKarl Berry <karl@freefriends.org>2006-06-16 23:53:26 +0000
commitf5e0b65756bd1f791c91935b0eeba0352a2d95f9 (patch)
tree73e1a79c01ec3c918ee44dc24d121cb3e8750f30 /Build/source/texk/web2c/texmfmp.h
parenta70eca31896304d624bb5f9473a7a258e0d806e0 (diff)
allow pipes as input or output files; from Taco
git-svn-id: svn://tug.org/texlive/trunk@1688 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/texmfmp.h')
-rw-r--r--Build/source/texk/web2c/texmfmp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h
index 45fca14d140..d000afc7cd7 100644
--- a/Build/source/texk/web2c/texmfmp.h
+++ b/Build/source/texk/web2c/texmfmp.h
@@ -89,6 +89,13 @@ extern int tfmtemp, texinputtype;
extern boolean openinnameok P1H(const_string);
extern boolean openoutnameok P1H(const_string);
+/* pdfTeX uses these for pipe support */
+#if defined(pdfTeX) || defined(pdfeTeX)
+extern boolean open_in_or_pipe P3H(FILE **, int, const_string fopen_mode);
+extern boolean open_out_or_pipe P2H(FILE **, const_string fopen_mode);
+extern void close_file_or_pipe P1H(FILE *);
+#endif
+
/* All but the Omega family use this. */
#if !defined(Omega) && !defined(eOmega) && !defined(Aleph)
extern void readtcxfile P1H(void);
@@ -171,6 +178,18 @@ extern void topenin P1H(void);
/* Set an array size from texmf.cnf. */
extern void setupboundvariable P3H(integer *, const_string, integer);
+/* These defines reroute the file i/o calls to the new pipe-enabled
+ functions in texmfmp.c*/
+
+#if defined(pdfTeX) || defined(pdfeTeX)
+#undef aopenin
+#undef aopenout
+#undef aclose
+#define aopenin(f,p) open_in_or_pipe(&(f),p,FOPEN_RBIN_MODE)
+#define aopenout(f) open_out_or_pipe(&(f),FOPEN_W_MODE)
+#define aclose(f) close_file_or_pipe(f)
+#endif
+
/* `bopenin' (and out) is used only for reading (and writing) .tfm
files; `wopenin' (and out) only for dump files. The filenames are
passed in as a global variable, `nameoffile'. */