summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-05-06 07:34:34 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-05-06 07:34:34 +0000
commit526582da8c8fabccfebea407a9da54822daa4f88 (patch)
tree6a43246601863a43f773d3ac3f3228223f52958a /Build/source/texk/web2c/eptexdir
parentdab66ac6e4a0df1662c67937c13535fcbd1148b3 (diff)
pdfTeX, e-(u)pTeX: Slightly reorganize to avoid duplicat code
git-svn-id: svn://tug.org/texlive/trunk@33876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/eptexdir')
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/eptexdir/eptexextra.c55
2 files changed, 3 insertions, 57 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog
index 8326d308181..436bc76ce11 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog
@@ -1,7 +1,8 @@
2014-05-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+2014-05-06 Peter Breitenlohner <peb@mppmu.mpg.de>
- * pdfutils.ch, eptexextra.c, and eptex.defines: Add a primitive
- \pdffiledump for eptex.
+ * pdfutils.ch, eptex.defines: Add a primitive \pdffiledump for
+ eptex.
2014-05-02 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/eptexdir/eptexextra.c b/Build/source/texk/web2c/eptexdir/eptexextra.c
index 22a72b9fad9..c60bb42922a 100644
--- a/Build/source/texk/web2c/eptexdir/eptexextra.c
+++ b/Build/source/texk/web2c/eptexdir/eptexextra.c
@@ -10,58 +10,3 @@
/* Hand-coded routines for TeX or Metafont in C. */
#include <lib/texmfmp.c>
-
-void getfiledump(int s, int offset, int length)
-{
- FILE *f;
- int read, i;
- poolpointer data_ptr;
- poolpointer data_end;
- char *file_name;
-
- if (length == 0) {
- /* empty result string */
- return;
- }
-
- if (poolptr + 2 * length + 1 >= poolsize) {
- /* no place for result */
- poolptr = poolsize;
- /* error by str_toks that calls str_room(1) */
- return;
- }
-
- file_name = kpse_find_tex(makecfilename(s));
- if (file_name == NULL) {
- return; /* empty string */
- }
-
- /* read file data */
- f = fopen(file_name, FOPEN_RBIN_MODE);
- if (f == NULL) {
- xfree(file_name);
- return;
- }
- recorder_record_input(file_name);
- if (fseek(f, offset, SEEK_SET) != 0) {
- xfree(file_name);
- return;
- }
- /* there is enough space in the string pool, the read
- data are put in the upper half of the result, thus
- the conversion to hex can be done without overwriting
- unconverted bytes. */
- data_ptr = poolptr + length;
- read = fread(&strpool[data_ptr], sizeof(char), length, f);
- fclose(f);
-
- /* convert to hex */
- data_end = data_ptr + read;
- for (; data_ptr < data_end; data_ptr++) {
- i = snprintf((char *) &strpool[poolptr], 3,
- "%.2X", (unsigned int) strpool[data_ptr]);
- check_nprintf(i, 3);
- poolptr += i;
- }
- xfree(file_name);
-}