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/texk/web2c/xetexdir | |
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/texk/web2c/xetexdir')
-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 |
3 files changed, 7 insertions, 5 deletions
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[]; |