summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ident.c13
-rw-r--r--mkfontscale.c17
2 files changed, 16 insertions, 14 deletions
diff --git a/ident.c b/ident.c
index f7fe9e1..bbe1687 100644
--- a/ident.c
+++ b/ident.c
@@ -76,12 +76,12 @@ typedef struct {
gzFile gz;
BZFILE *bz2;
} f;
- unsigned pos;
+ unsigned long pos;
} fontFile;
static inline void *
fontFileOpen(fontFile *ff, const char *filename) {
- int n = strlen(filename);
+ size_t n = strlen(filename);
if (n > 4 && strcmp(filename + n - 4, ".bz2") == 0) {
ff->type = bz2FontFile;
@@ -123,7 +123,7 @@ fontFileGetc(fontFile *ff)
}
}
-static int
+static long
fontFileSeek(fontFile *ff, z_off_t offset, int whence)
{
if (ff->type == gzFontFile) {
@@ -132,7 +132,7 @@ fontFileSeek(fontFile *ff, z_off_t offset, int whence)
/* bzlib has no easy equivalent so we have to fake it,
* fortunately, we only have to handle a couple of cases
*/
- int n;
+ z_off_t n;
char buf[BUFSIZ];
switch (whence) {
@@ -151,7 +151,7 @@ fontFileSeek(fontFile *ff, z_off_t offset, int whence)
return -1;
n -= BUFSIZ;
}
- if (BZ2_bzread(ff->f.bz2, buf, n) != n)
+ if (BZ2_bzread(ff->f.bz2, buf, (int) n) != n)
return -1;
ff->pos = offset;
return offset;
@@ -247,7 +247,8 @@ pcfIdentify(fontFile *f, char **name)
{
int prop_position;
PropPtr props = NULL;
- int format, count, nprops, i, string_size, rc;
+ int format, count, nprops, i, string_size;
+ long rc;
char *strings = NULL, *s;
count = getLSB32(f);
diff --git a/mkfontscale.c b/mkfontscale.c
index 6423867..4083e28 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -701,7 +701,7 @@ makeXLFD(char *filename, FT_Face face, int isBitmap)
static int
readFontScale(HashTablePtr entries, char *dirname)
{
- int n = strlen(dirname);
+ size_t n = strlen(dirname);
char *filename;
FILE *in;
int rc, count, i;
@@ -745,7 +745,7 @@ readFontScale(HashTablePtr entries, char *dirname)
static int
filePrio(char *filename)
{
- int n = strlen(filename);
+ size_t n = strlen(filename);
if(n < 4)
return 0;
if(strcmp(filename + n - 4, ".otf") == 0)
@@ -788,15 +788,16 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
HashTablePtr entries;
HashBucketPtr *array;
int i, n, dirn, diri, found, rc;
- int isBitmap=0,xl=0;
+ int isBitmap=0;
+ size_t d, xl=0;
if (exclusionSuffix)
xl = strlen (exclusionSuffix);
- i = strlen(dirname_given);
- if(i == 0)
+ d = strlen(dirname_given);
+ if(d == 0)
dirname = dsprintf("./");
- else if(dirname_given[i - 1] != '/')
+ else if(dirname_given[d - 1] != '/')
dirname = dsprintf("%s/", dirname_given);
else
dirname = strdup(dirname_given);
@@ -855,7 +856,7 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
xlfd = NULL;
if (xl) {
- int dl = strlen (entry->d_name);
+ size_t dl = strlen (entry->d_name);
if (strcmp (entry->d_name + dl - xl, exclusionSuffix) == 0)
continue;
}
@@ -927,7 +928,7 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
if(xlfd_name) {
/* We know it's a bitmap font, and we know its XLFD */
- int l = strlen(xlfd_name);
+ size_t l = strlen(xlfd_name);
if(reencodeLegacy &&
l >= 12 && strcasecmp(xlfd_name + l - 11, "-iso10646-1") == 0) {
char *s;