diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-27 09:19:07 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-27 09:19:07 +0000 |
commit | de9fe826674d80eda2b7a367a0c777f103b40ed0 (patch) | |
tree | 54c2a37ad24fb853035bc8bb99af9bd015d50185 /Build/source | |
parent | e2182e9f9514a90e1a9deae69b6a37d8cc7dc10e (diff) |
texk/dvipdfmx, XeTeX: Use mfgets() parameters as for fgets()
git-svn-id: svn://tug.org/texlive/trunk@36644 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/mfileio.c | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/mfileio.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/mfileio.c | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/image/mfileio.h | 2 |
6 files changed, 13 insertions, 7 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index f57d0a3133b..87263862420 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,7 @@ +2015-03-27 Peter Breitenlohner <peb@mppmu.mpg.de> + + * mfileio.[ch]: Use mfgets() parameters as for fgets(). + 2015-03-24 Peter Breitenlohner <peb@mppmu.mpg.de> * bmpimage.c, dpxcrypt.c, dvi.c, fontmap.[ch], jpegimage.c, diff --git a/Build/source/texk/dvipdfm-x/mfileio.c b/Build/source/texk/dvipdfm-x/mfileio.c index 766801c2b2d..8d17ec526e2 100644 --- a/Build/source/texk/dvipdfm-x/mfileio.c +++ b/Build/source/texk/dvipdfm-x/mfileio.c @@ -126,7 +126,7 @@ off_t xfile_size (FILE *file, const char *name) } /* Unlike fgets, mfgets works with \r, \n, or \r\n end of lines. */ -char *mfgets (char *buffer, unsigned long length, FILE *file) +char *mfgets (char *buffer, int length, FILE *file) { int ch = 0, i = 0; while (i < length-1 && (ch = fgetc (file)) >= 0 && ch != '\n' && ch != '\r') diff --git a/Build/source/texk/dvipdfm-x/mfileio.h b/Build/source/texk/dvipdfm-x/mfileio.h index d45673526d1..e0a3b239b76 100644 --- a/Build/source/texk/dvipdfm-x/mfileio.h +++ b/Build/source/texk/dvipdfm-x/mfileio.h @@ -59,7 +59,7 @@ extern long file_size (FILE *file); extern off_t xfile_size (FILE *file, const char *name); -extern char *mfgets (char *buffer, unsigned long size, FILE *file); +extern char *mfgets (char *buffer, int length, FILE *file); extern char work_buffer[]; diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index ac7eccfafcc..ec767880e07 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,7 @@ +2015-03-27 Peter Breitenlohner <peb@mppmu.mpg.de> + + * image/mfileio.[ch]: Use mfgets() parameters as for fgets(). + 2015-03-26 Peter Breitenlohner <peb@mppmu.mpg.de> * image/jpegimage.c: Drop redundant #include directives. diff --git a/Build/source/texk/web2c/xetexdir/image/mfileio.c b/Build/source/texk/web2c/xetexdir/image/mfileio.c index a12efb130ef..f31f82e4f61 100644 --- a/Build/source/texk/web2c/xetexdir/image/mfileio.c +++ b/Build/source/texk/web2c/xetexdir/image/mfileio.c @@ -112,11 +112,9 @@ long file_size (FILE *file) } /* Unlike fgets, mfgets works with \r, \n, or \r\n end of lines. */ -char *mfgets (char *buffer, unsigned long length, FILE *file) +char *mfgets (char *buffer, int length, FILE *file) { - int ch = 0; - unsigned long i = 0; - + int ch = 0, i = 0; while (i < length-1 && (ch = fgetc (file)) >= 0 && ch != '\n' && ch != '\r') buffer[i++] = ch; buffer[i] = 0; diff --git a/Build/source/texk/web2c/xetexdir/image/mfileio.h b/Build/source/texk/web2c/xetexdir/image/mfileio.h index 039284ff8c5..1081120c356 100644 --- a/Build/source/texk/web2c/xetexdir/image/mfileio.h +++ b/Build/source/texk/web2c/xetexdir/image/mfileio.h @@ -50,7 +50,7 @@ extern long tell_position (FILE *file); extern long file_size (FILE *file); -extern char *mfgets (char *buffer, unsigned long size, FILE *file); +extern char *mfgets (char *buffer, int length, FILE *file); extern char work_buffer[]; |