diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-07-15 07:06:38 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-07-15 07:06:38 +0000 |
commit | 15a3c5c0dc3253647bbf40b2826fbbbb8474fab3 (patch) | |
tree | 710e89852ecf9dd53be67344408954ca21ca4a72 /Build/source/texk/dvipdfm-x/cmap_read.c | |
parent | 12488878f1c86fcf3f6be3364da9761036213135 (diff) |
Avoid cast from pointer to integer of different size on 64-bit Windows
git-svn-id: svn://tug.org/texlive/trunk@34615 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/cmap_read.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/cmap_read.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Build/source/texk/dvipdfm-x/cmap_read.c b/Build/source/texk/dvipdfm-x/cmap_read.c index 35be2629f33..f6c8d4c36c5 100644 --- a/Build/source/texk/dvipdfm-x/cmap_read.c +++ b/Build/source/texk/dvipdfm-x/cmap_read.c @@ -53,17 +53,17 @@ typedef struct { unsigned char *endptr; unsigned char *buf; - long max; + size_t max; FILE *fp; - long unread; + size_t unread; } ifreader; -static ifreader *ifreader_create (FILE *fp, long remain, long bufsize); -static long ifreader_read (ifreader *reader, long size); +static ifreader *ifreader_create (FILE *fp, size_t remain, size_t bufsize); +static size_t ifreader_read (ifreader *reader, size_t size); static void ifreader_destroy (ifreader *reader); static ifreader * -ifreader_create (FILE *fp, long size, long bufsize) +ifreader_create (FILE *fp, size_t size, size_t bufsize) { ifreader *reader; @@ -89,13 +89,13 @@ ifreader_destroy (ifreader *reader) } -static long -ifreader_read (ifreader *reader, long size) +static size_t +ifreader_read (ifreader *reader, size_t size) { - long bytesread = 0, bytesrem = 0; + size_t bytesread = 0, bytesrem = 0; ASSERT(reader); - bytesrem = (long) reader->endptr - (long) reader->cursor; + bytesrem = (size_t) reader->endptr - (size_t) reader->cursor; if (size > reader->max) { if (__verbose) MESG("\nExtending buffer (%ld bytes)...\n", size); |