aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/bitmap/snfread.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-05 09:59:38 +0100
committermarha <marha@users.sourceforge.net>2012-03-05 09:59:38 +0100
commitffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a (patch)
tree233b818e67de2073647e46e91ac688c6b43d5917 /libXfont/src/bitmap/snfread.c
parent15a500d3edb03668b43cc6898fafcda024d0f006 (diff)
downloadvcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.tar.gz
vcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.tar.bz2
vcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.zip
libfontenc xserver pixman mesa git update 5 Mar 2012
font-util-1.3.0 xclock-1.0.6 libXfont-1.4.5 inputproto-2.2
Diffstat (limited to 'libXfont/src/bitmap/snfread.c')
-rw-r--r--libXfont/src/bitmap/snfread.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libXfont/src/bitmap/snfread.c b/libXfont/src/bitmap/snfread.c
index d003cc5a5..da362c81a 100644
--- a/libXfont/src/bitmap/snfread.c
+++ b/libXfont/src/bitmap/snfread.c
@@ -60,7 +60,7 @@ from The Open Group.
#include <stdarg.h>
-static void
+static void _X_ATTRIBUTE_PRINTF(1, 2)
snfError(const char* message, ...)
{
va_list args;
@@ -71,7 +71,7 @@ snfError(const char* message, ...)
vfprintf(stderr, message, args);
va_end(args);
}
-
+
static void snfUnloadFont(FontPtr pFont);
static int
@@ -211,7 +211,7 @@ SnfGetFormat (int *bit, int *byte, int *glyph, int *scan)
}
int
-snfReadFont(FontPtr pFont, FontFilePtr file,
+snfReadFont(FontPtr pFont, FontFilePtr file,
int bit, int byte, int glyph, int scan)
{
snfFontInfoRec fi;
@@ -239,7 +239,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
/*
* we'll allocate one chunk of memory and split it among the various parts
* of the font:
- *
+ *
* BitmapFontRec CharInfoRec's Glyphs Encoding DIX Properties Ink CharInfoRec's
*
* If the glyphpad is not the same as the font file, then the glyphs
@@ -253,7 +253,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
metrics_off = bytestoalloc;
bytestoalloc += num_chars * sizeof(CharInfoRec); /* metrics */
encoding_off = bytestoalloc;
- bytestoalloc += NUM_SEGMENTS(num_chars) * sizeof(CharInfoPtr**);
+ bytestoalloc += NUM_SEGMENTS(num_chars) * sizeof(CharInfoPtr**);
/* encoding */
props_off = bytestoalloc;
bytestoalloc += fi.nProps * sizeof(FontPropRec); /* props */
@@ -299,7 +299,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
*/
ret = Successful;
- memset(bitmapFont->encoding, 0,
+ memset(bitmapFont->encoding, 0,
NUM_SEGMENTS(num_chars)*sizeof(CharInfoPtr*));
for (i = 0; ret == Successful && i < num_chars; i++) {
ret = snfReadCharInfo(file, &bitmapFont->metrics[i], bitmaps);
@@ -454,12 +454,14 @@ snfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file)
pFontInfo->props = malloc(fi.nProps * sizeof(FontPropRec));
if (!pFontInfo->props) {
- snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n", fi.nProps, sizeof(FontPropRec));
+ snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n",
+ fi.nProps, (int) sizeof(FontPropRec));
return AllocError;
}
pFontInfo->isStringProp = malloc(fi.nProps * sizeof(char));
if (!pFontInfo->isStringProp) {
- snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n", fi.nProps, sizeof(char));
+ snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n",
+ fi.nProps, (int) sizeof(char));
free(pFontInfo->props);
return AllocError;
}