From de9fe826674d80eda2b7a367a0c777f103b40ed0 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 27 Mar 2015 09:19:07 +0000 Subject: texk/dvipdfmx, XeTeX: Use mfgets() parameters as for fgets() git-svn-id: svn://tug.org/texlive/trunk@36644 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/xetexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/xetexdir/image/mfileio.c | 6 ++---- Build/source/texk/web2c/xetexdir/image/mfileio.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'Build/source/texk/web2c/xetexdir') 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 + + * image/mfileio.[ch]: Use mfgets() parameters as for fgets(). + 2015-03-26 Peter Breitenlohner * 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[]; -- cgit v1.2.3