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/dvipdfm-x/ChangeLog | 4 ++++ Build/source/texk/dvipdfm-x/mfileio.c | 2 +- Build/source/texk/dvipdfm-x/mfileio.h | 2 +- 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 +- 6 files changed, 13 insertions(+), 7 deletions(-) (limited to 'Build/source/texk') 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 + + * mfileio.[ch]: Use mfgets() parameters as for fgets(). + 2015-03-24 Peter Breitenlohner * 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 + + * 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