diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:40 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:40 +0000 |
commit | 44999e526a31721b0ed75ad6047948da837be4e0 (patch) | |
tree | afa2e6b416645bc84cbc07f017b26dafc69c14fa /src/bitmap | |
parent | 94817d4f3277d927bf96431c24033d8cd67d9a30 (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
Diffstat (limited to 'src/bitmap')
-rw-r--r-- | src/bitmap/bdfread.c | 8 | ||||
-rw-r--r-- | src/bitmap/bdfutils.c | 3 | ||||
-rw-r--r-- | src/bitmap/bitscale.c | 15 | ||||
-rw-r--r-- | src/bitmap/pcfread.c | 18 | ||||
-rw-r--r-- | src/bitmap/pcfwrite.c | 8 | ||||
-rw-r--r-- | src/bitmap/snfread.c | 18 | ||||
-rw-r--r-- | src/bitmap/snfstr.h | 3 |
7 files changed, 16 insertions, 57 deletions
diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c index 67e4252..813975a 100644 --- a/src/bitmap/bdfread.c +++ b/src/bitmap/bdfread.c @@ -50,7 +50,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.12 2002/09/10 16:14:34 tsi Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.13 2003/05/27 22:26:48 tsi Exp $ */ #ifndef FONTMODULE #include <ctype.h> @@ -82,7 +82,6 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, int i, inLineLen, nextByte; - Bool badbits; unsigned char *pInBits, *picture, *line = NULL; @@ -106,7 +105,6 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, for (i = 0; i < GLYPHPADOPTIONS; i++) sizes[i] += BYTES_PER_ROW(widthBits, (1 << i)) * height; } - badbits = FALSE; nextByte = 0; widthHexChars = BYTES_PER_ROW(widthBits, 1); @@ -149,9 +147,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, mask = 0xff << (8 - (widthBits & 0x7)); if (mask && picture[nextByte - 1] & ~mask) { picture[nextByte - 1] &= mask; - badbits = TRUE; - } else if (inLineLen > widthHexChars) - badbits = TRUE; + } } if (widthBytes > widthHexChars) { diff --git a/src/bitmap/bdfutils.c b/src/bitmap/bdfutils.c index 94a9ff6..c1340af 100644 --- a/src/bitmap/bdfutils.c +++ b/src/bitmap/bdfutils.c @@ -49,7 +49,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.10 2001/12/14 19:56:45 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.11 2003/09/13 21:33:02 dawes Exp $ */ #ifndef FONTMODULE #include <ctype.h> @@ -130,7 +130,6 @@ Atom bdfForceMakeAtom(char *str, int *size) { register int len = strlen(str); - extern Atom MakeAtom(); /* Added this line to be consistent with X.org code */ Atom the_atom; if (size != NULL) diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c index 287bd5c..d30f546 100644 --- a/src/bitmap/bitscale.c +++ b/src/bitmap/bitscale.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.29 2003/01/12 03:55:46 tsi Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.30 2003/05/27 22:26:48 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -94,6 +94,9 @@ ScaleFunc scale[] = #endif #ifdef SNFFORMAT BitmapScaleBitmaps, +#endif +#endif +#ifdef SNFFORMAT BitmapScaleBitmaps, #ifdef X_GZIP_FONT_COMPRESSION BitmapScaleBitmaps, @@ -900,12 +903,10 @@ ScaleFont(FontPtr opf, /* originating font */ opci; int nchars = 0; /* how many characters in the font */ int i; - int glyph; int firstCol, lastCol, firstRow, lastRow; double xform[4], inv_xform[4]; double xmult, ymult; int totalwidth = 0, totalchars = 0; - int inkindex1, inkindex2; #define OLDINDEX(i) (((i)/(lastCol - firstCol + 1) + \ firstRow - opf->info.firstRow) * \ (opf->info.lastCol - opf->info.firstCol + 1) + \ @@ -915,7 +916,6 @@ ScaleFont(FontPtr opf, /* originating font */ *sWidth = 0; opfi = &opf->info; - glyph = opf->glyph; obitmapFont = (BitmapFontPtr) opf->fontPrivate; bitmapFont = 0; @@ -1056,11 +1056,9 @@ ScaleFont(FontPtr opf, /* originating font */ /* Compute the transformation and inverse transformation matrices. Can fail if the determinant is zero. */ - inkindex1 = 0; pci = bitmapFont->metrics; for (i = 0; i < nchars; i++) { - inkindex2 = OLDINDEX(i); if ((opci = ACCESSENCODING(obitmapFont->encoding,OLDINDEX(i)))) { double newlsb, newrsb, newdesc, newasc, point[2]; @@ -1693,8 +1691,7 @@ PrinterScaleBitmaps(FontPtr pf, /* scaled font */ char *glyphBytes; BitmapFontPtr bitmapFont, obitmapFont; - CharInfoPtr pci, - opci; + CharInfoPtr pci; FontInfoPtr pfi; int glyph; unsigned bytestoalloc = 0; @@ -1739,7 +1736,7 @@ PrinterScaleBitmaps(FontPtr pf, /* scaled font */ for (i = 0; i < nchars; i++) { if ((pci = ACCESSENCODING(bitmapFont->encoding, i)) && - (opci = ACCESSENCODING(obitmapFont->encoding, OLDINDEX(i)))) + (ACCESSENCODING(obitmapFont->encoding, OLDINDEX(i)))) { pci->bits = glyphBytes; } diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c index 1e07b09..a7843cb 100644 --- a/src/bitmap/pcfread.c +++ b/src/bitmap/pcfread.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.20 2003/01/12 03:55:46 tsi Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.22 2003/11/18 01:17:04 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -40,28 +40,14 @@ from The Open Group. #define MAX(a,b) (((a)>(b)) ? a : b) #endif -#if NeedVarargsPrototypes #include <stdarg.h> -#else -#include <varargs.h> -#endif void -#if NeedVarargsPrototypes -pcfError(char* message, ...) -#else -pcfError (message, va_alist) - char* message; - va_dcl -#endif +pcfError(const char* message, ...) { va_list args; -#if NeedVarargsPrototypes va_start(args, message); -#else - va_start(args); -#endif fprintf(stderr, "PCF Error: "); vfprintf(stderr, message, args); diff --git a/src/bitmap/pcfwrite.c b/src/bitmap/pcfwrite.c index 74b099e..c02f433 100644 --- a/src/bitmap/pcfwrite.c +++ b/src/bitmap/pcfwrite.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.10 2003/01/12 03:55:46 tsi Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.12 2003/11/18 01:17:04 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -37,12 +37,6 @@ from The Open Group. #include "bitmap.h" #include "pcf.h" -extern void pcfError( -#if NeedVarargsPrototypes - char* message, ... -#endif - ); - /* Write PCF font files */ static CARD32 current_position; diff --git a/src/bitmap/snfread.c b/src/bitmap/snfread.c index 375fa5a..848db90 100644 --- a/src/bitmap/snfread.c +++ b/src/bitmap/snfread.c @@ -49,7 +49,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.11 2003/01/12 03:55:46 tsi Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.13 2003/11/18 01:17:04 dawes Exp $ */ #ifndef FONTMODULE #include <ctype.h> @@ -59,28 +59,14 @@ from The Open Group. #include "bitmap.h" #include "snfstr.h" -#if NeedVarargsPrototypes #include <stdarg.h> -#else -#include <varargs.h> -#endif void -#if NeedVarargsPrototypes -snfError(char* message, ...) -#else -snfError (message, va_alist) - char* message; - va_dcl -#endif +snfError(const char* message, ...) { va_list args; -#if NeedVarargsPrototypes va_start(args, message); -#else - va_start(args); -#endif fprintf(stderr, "SNF Error: "); vfprintf(stderr, message, args); diff --git a/src/bitmap/snfstr.h b/src/bitmap/snfstr.h index 09ecf8a..85f75f2 100644 --- a/src/bitmap/snfstr.h +++ b/src/bitmap/snfstr.h @@ -49,7 +49,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.5 2001/12/14 19:56:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.6 2003/11/18 01:17:04 dawes Exp $ */ #ifndef SNFSTR_H #define SNFSTR_H 1 @@ -180,5 +180,6 @@ extern void SnfSetFormat ( int bit, int byte, int glyph, int scan ); extern int snfReadFont ( FontPtr pFont, FontFilePtr file, int bit, int byte, int glyph, int scan ); extern int snfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file ); +extern void snfError( const char* message, ... ); #endif /* SNFSTR_H */ |