Commit b7503eb3 authored by Oliver Sander's avatar Oliver Sander Committed by Albert Astals Cid

Replace Gushort by unsigned short

parent 51bb4676
...@@ -945,7 +945,7 @@ const char *fofiType1CStdStrings[391] = { ...@@ -945,7 +945,7 @@ const char *fofiType1CStdStrings[391] = {
"Semibold" "Semibold"
}; };
Gushort fofiType1CISOAdobeCharset[229] = { unsigned short fofiType1CISOAdobeCharset[229] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
...@@ -971,7 +971,7 @@ Gushort fofiType1CISOAdobeCharset[229] = { ...@@ -971,7 +971,7 @@ Gushort fofiType1CISOAdobeCharset[229] = {
220, 221, 222, 223, 224, 225, 226, 227, 228 220, 221, 222, 223, 224, 225, 226, 227, 228
}; };
Gushort fofiType1CExpertCharset[166] = { unsigned short fofiType1CExpertCharset[166] = {
0, 1, 229, 230, 231, 232, 233, 234, 235, 236, 0, 1, 229, 230, 231, 232, 233, 234, 235, 236,
237, 238, 13, 14, 15, 99, 239, 240, 241, 242, 237, 238, 13, 14, 15, 99, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 27, 28, 249, 250, 243, 244, 245, 246, 247, 248, 27, 28, 249, 250,
...@@ -991,7 +991,7 @@ Gushort fofiType1CExpertCharset[166] = { ...@@ -991,7 +991,7 @@ Gushort fofiType1CExpertCharset[166] = {
373, 374, 375, 376, 377, 378 373, 374, 375, 376, 377, 378
}; };
Gushort fofiType1CExpertSubsetCharset[87] = { unsigned short fofiType1CExpertSubsetCharset[87] = {
0, 1, 231, 232, 235, 236, 237, 238, 13, 14, 0, 1, 231, 232, 235, 236, 237, 238, 13, 14,
15, 99, 239, 240, 241, 242, 243, 244, 245, 246, 15, 99, 239, 240, 241, 242, 243, 244, 245, 246,
247, 248, 27, 28, 249, 250, 251, 253, 254, 255, 247, 248, 27, 28, 249, 250, 251, 253, 254, 255,
......
...@@ -37,8 +37,8 @@ extern const char * const fofiType1ExpertEncoding[256]; ...@@ -37,8 +37,8 @@ extern const char * const fofiType1ExpertEncoding[256];
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern const char *fofiType1CStdStrings[391]; extern const char *fofiType1CStdStrings[391];
extern Gushort fofiType1CISOAdobeCharset[229]; extern unsigned short fofiType1CISOAdobeCharset[229];
extern Gushort fofiType1CExpertCharset[166]; extern unsigned short fofiType1CExpertCharset[166];
extern Gushort fofiType1CExpertSubsetCharset[87]; extern unsigned short fofiType1CExpertSubsetCharset[87];
#endif #endif
...@@ -1199,7 +1199,7 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf, ...@@ -1199,7 +1199,7 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
Type1CIndexVal val; Type1CIndexVal val;
bool ok, dFP; bool ok, dFP;
double d, dx, dy; double d, dx, dy;
Gushort r2; unsigned short r2;
unsigned char byte; unsigned char byte;
int pos, subrBias, start, i, k; int pos, subrBias, start, i, k;
...@@ -2502,15 +2502,15 @@ bool FoFiType1C::readCharset() { ...@@ -2502,15 +2502,15 @@ bool FoFiType1C::readCharset() {
if (topDict.charsetOffset == 0) { if (topDict.charsetOffset == 0) {
charset = fofiType1CISOAdobeCharset; charset = fofiType1CISOAdobeCharset;
charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(Gushort); charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(unsigned short);
} else if (topDict.charsetOffset == 1) { } else if (topDict.charsetOffset == 1) {
charset = fofiType1CExpertCharset; charset = fofiType1CExpertCharset;
charsetLength = sizeof(fofiType1CExpertCharset) / sizeof(Gushort); charsetLength = sizeof(fofiType1CExpertCharset) / sizeof(unsigned short);
} else if (topDict.charsetOffset == 2) { } else if (topDict.charsetOffset == 2) {
charset = fofiType1CExpertSubsetCharset; charset = fofiType1CExpertSubsetCharset;
charsetLength = sizeof(fofiType1CExpertSubsetCharset) / sizeof(Gushort); charsetLength = sizeof(fofiType1CExpertSubsetCharset) / sizeof(unsigned short);
} else { } else {
charset = (Gushort *)gmallocn(nGlyphs, sizeof(Gushort)); charset = (unsigned short *)gmallocn(nGlyphs, sizeof(unsigned short));
charsetLength = nGlyphs; charsetLength = nGlyphs;
for (i = 0; i < nGlyphs; ++i) { for (i = 0; i < nGlyphs; ++i) {
charset[i] = 0; charset[i] = 0;
...@@ -2519,7 +2519,7 @@ bool FoFiType1C::readCharset() { ...@@ -2519,7 +2519,7 @@ bool FoFiType1C::readCharset() {
charsetFormat = getU8(pos++, &parsedOk); charsetFormat = getU8(pos++, &parsedOk);
if (charsetFormat == 0) { if (charsetFormat == 0) {
for (i = 1; i < nGlyphs; ++i) { for (i = 1; i < nGlyphs; ++i) {
charset[i] = (Gushort)getU16BE(pos, &parsedOk); charset[i] = (unsigned short)getU16BE(pos, &parsedOk);
pos += 2; pos += 2;
if (!parsedOk) { if (!parsedOk) {
break; break;
...@@ -2535,7 +2535,7 @@ bool FoFiType1C::readCharset() { ...@@ -2535,7 +2535,7 @@ bool FoFiType1C::readCharset() {
break; break;
} }
for (j = 0; j <= nLeft && i < nGlyphs; ++j) { for (j = 0; j <= nLeft && i < nGlyphs; ++j) {
charset[i++] = (Gushort)c++; charset[i++] = (unsigned short)c++;
} }
} }
} else if (charsetFormat == 2) { } else if (charsetFormat == 2) {
...@@ -2549,7 +2549,7 @@ bool FoFiType1C::readCharset() { ...@@ -2549,7 +2549,7 @@ bool FoFiType1C::readCharset() {
break; break;
} }
for (j = 0; j <= nLeft && i < nGlyphs; ++j) { for (j = 0; j <= nLeft && i < nGlyphs; ++j) {
charset[i++] = (Gushort)c++; charset[i++] = (unsigned short)c++;
} }
} }
} }
......
...@@ -133,7 +133,7 @@ struct Type1CEexecBuf { ...@@ -133,7 +133,7 @@ struct Type1CEexecBuf {
FoFiOutputFunc outputFunc; FoFiOutputFunc outputFunc;
void *outputStream; void *outputStream;
bool ascii; // ASCII encoding? bool ascii; // ASCII encoding?
Gushort r1; // eexec encryption key unsigned short r1; // eexec encryption key
int line; // number of eexec chars left on current line int line; // number of eexec chars left on current line
}; };
...@@ -247,8 +247,8 @@ private: ...@@ -247,8 +247,8 @@ private:
int nGlyphs; int nGlyphs;
int nFDs; int nFDs;
unsigned char *fdSelect; unsigned char *fdSelect;
Gushort *charset; unsigned short *charset;
Gushort charsetLength; unsigned short charsetLength;
int gsubrBias; int gsubrBias;
bool parsedOk; bool parsedOk;
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
* These have stupid names to avoid conflicts with <sys/types.h>, * These have stupid names to avoid conflicts with <sys/types.h>,
* which on various systems defines some random subset of these. * which on various systems defines some random subset of these.
*/ */
typedef unsigned short Gushort;
typedef unsigned int Guint; typedef unsigned int Guint;
typedef unsigned long Gulong; typedef unsigned long Gulong;
......
...@@ -35,7 +35,7 @@ BuiltinFontWidths::~BuiltinFontWidths() { ...@@ -35,7 +35,7 @@ BuiltinFontWidths::~BuiltinFontWidths() {
gfree(tab); gfree(tab);
} }
bool BuiltinFontWidths::getWidth(const char *name, Gushort *width) { bool BuiltinFontWidths::getWidth(const char *name, unsigned short *width) {
int h; int h;
BuiltinFontWidth *p; BuiltinFontWidth *p;
......
...@@ -43,7 +43,7 @@ struct BuiltinFont { ...@@ -43,7 +43,7 @@ struct BuiltinFont {
struct BuiltinFontWidth { struct BuiltinFontWidth {
const char *name; const char *name;
Gushort width; unsigned short width;
BuiltinFontWidth *next; BuiltinFontWidth *next;
}; };
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
BuiltinFontWidths(const BuiltinFontWidths &) = delete; BuiltinFontWidths(const BuiltinFontWidths &) = delete;
BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete; BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete;
bool getWidth(const char *name, Gushort *width); bool getWidth(const char *name, unsigned short *width);
private: private:
......
...@@ -419,7 +419,7 @@ static char *type1CStdStrings[391] = { ...@@ -419,7 +419,7 @@ static char *type1CStdStrings[391] = {
"Semibold" "Semibold"
}; };
static Gushort type1CISOAdobeCharset[229] = { static unsigned short type1CISOAdobeCharset[229] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
...@@ -445,7 +445,7 @@ static Gushort type1CISOAdobeCharset[229] = { ...@@ -445,7 +445,7 @@ static Gushort type1CISOAdobeCharset[229] = {
220, 221, 222, 223, 224, 225, 226, 227, 228 220, 221, 222, 223, 224, 225, 226, 227, 228
}; };
static const Gushort type1CExpertCharset[166] = { static const unsigned short type1CExpertCharset[166] = {
0, 1, 229, 230, 231, 232, 233, 234, 235, 236, 0, 1, 229, 230, 231, 232, 233, 234, 235, 236,
237, 238, 13, 14, 15, 99, 239, 240, 241, 242, 237, 238, 13, 14, 15, 99, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 27, 28, 249, 250, 243, 244, 245, 246, 247, 248, 27, 28, 249, 250,
...@@ -465,7 +465,7 @@ static const Gushort type1CExpertCharset[166] = { ...@@ -465,7 +465,7 @@ static const Gushort type1CExpertCharset[166] = {
373, 374, 375, 376, 377, 378 373, 374, 375, 376, 377, 378
}; };
static Gushort type1CExpertSubsetCharset[87] = { static unsigned short type1CExpertSubsetCharset[87] = {
0, 1, 231, 232, 235, 236, 237, 238, 13, 14, 0, 1, 231, 232, 235, 236, 237, 238, 13, 14,
15, 99, 239, 240, 241, 242, 243, 244, 245, 246, 15, 99, 239, 240, 241, 242, 243, 244, 245, 246,
247, 248, 27, 28, 249, 250, 251, 253, 254, 255, 247, 248, 27, 28, 249, 250, 251, 253, 254, 255,
......
...@@ -960,7 +960,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA ...@@ -960,7 +960,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
Unicode uBuf[8]; Unicode uBuf[8];
double mul; double mul;
int firstChar, lastChar; int firstChar, lastChar;
Gushort w; unsigned short w;
Object obj1; Object obj1;
int n, i, a, b, m; int n, i, a, b, m;
...@@ -2089,9 +2089,9 @@ const GooString *GfxCIDFont::getCollection() const { ...@@ -2089,9 +2089,9 @@ const GooString *GfxCIDFont::getCollection() const {
int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi, int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi,
Unicode unicode, bool wmode) { Unicode unicode, bool wmode) {
Gushort gid = ff->mapCodeToGID(cmapi,unicode); unsigned short gid = ff->mapCodeToGID(cmapi,unicode);
if (wmode) { if (wmode) {
Gushort vgid = ff->mapToVertGID(gid); unsigned short vgid = ff->mapToVertGID(gid);
if (vgid != 0) gid = vgid; if (vgid != 0) gid = vgid;
} }
return gid; return gid;
......
...@@ -129,8 +129,8 @@ static inline unsigned char colToByte(GfxColorComp x) { ...@@ -129,8 +129,8 @@ static inline unsigned char colToByte(GfxColorComp x) {
return (unsigned char)(((x << 8) - x + 0x8000) >> 16); return (unsigned char)(((x << 8) - x + 0x8000) >> 16);
} }
static inline Gushort colToShort(GfxColorComp x) { static inline unsigned short colToShort(GfxColorComp x) {
return (Gushort)(x); return (unsigned short)(x);
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
......
...@@ -118,7 +118,7 @@ struct JPXCodeBlock { ...@@ -118,7 +118,7 @@ struct JPXCodeBlock {
//----- coefficient data //----- coefficient data
int *coeffs; int *coeffs;
char *touched; // coefficient 'touched' flags char *touched; // coefficient 'touched' flags
Gushort len; // coefficient length unsigned short len; // coefficient length
JArithmeticDecoder // arithmetic decoder JArithmeticDecoder // arithmetic decoder
*arithDecoder; *arithDecoder;
JArithmeticDecoderStats // arithmetic decoder stats JArithmeticDecoderStats // arithmetic decoder stats
......
...@@ -81,7 +81,7 @@ class Movie { ...@@ -81,7 +81,7 @@ class Movie {
const GooString* getFileName() const { return fileName; } const GooString* getFileName() const { return fileName; }
Gushort getRotationAngle() const { return rotationAngle; } unsigned short getRotationAngle() const { return rotationAngle; }
void getAspect (int *widthA, int *heightA) const { *widthA = width; *heightA = height; } void getAspect (int *widthA, int *heightA) const { *widthA = width; *heightA = height; }
Object getPoster() const { return poster.copy(); } Object getPoster() const { return poster.copy(); }
...@@ -97,7 +97,7 @@ class Movie { ...@@ -97,7 +97,7 @@ class Movie {
bool ok; bool ok;
Gushort rotationAngle; // 0 unsigned short rotationAngle; // 0
int width; // Aspect int width; // Aspect
int height; // Aspect int height; // Aspect
......
...@@ -1223,8 +1223,8 @@ private: ...@@ -1223,8 +1223,8 @@ private:
//------------------------------------------------------------------------ //------------------------------------------------------------------------
struct T3FontCacheTag { struct T3FontCacheTag {
Gushort code; unsigned short code;
Gushort mru; // valid bit (0x8000) and MRU index unsigned short mru; // valid bit (0x8000) and MRU index
}; };
class T3FontCache { class T3FontCache {
...@@ -1314,7 +1314,7 @@ T3FontCache::~T3FontCache() { ...@@ -1314,7 +1314,7 @@ T3FontCache::~T3FontCache() {
} }
struct T3GlyphStack { struct T3GlyphStack {
Gushort code; // character code unsigned short code; // character code
bool haveDx; // set after seeing a d0/d1 operator bool haveDx; // set after seeing a d0/d1 operator
bool doNotCache; // set if we see a gsave/grestore before bool doNotCache; // set if we see a gsave/grestore before
......
...@@ -3052,7 +3052,7 @@ bool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable, ...@@ -3052,7 +3052,7 @@ bool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable,
void DCTStream::decodeImage() { void DCTStream::decodeImage() {
int dataIn[64]; int dataIn[64];
unsigned char dataOut[64]; unsigned char dataOut[64];
Gushort *quantTable; unsigned short *quantTable;
int pY, pCb, pCr, pR, pG, pB; int pY, pCb, pCr, pR, pG, pB;
int x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i; int x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i;
int h, v, horiz, vert, hSub, vSub; int h, v, horiz, vert, hSub, vSub;
...@@ -3191,7 +3191,7 @@ void DCTStream::decodeImage() { ...@@ -3191,7 +3191,7 @@ void DCTStream::decodeImage() {
// 988-991. // 988-991.
// The stage numbers mentioned in the comments refer to Figure 1 in this // The stage numbers mentioned in the comments refer to Figure 1 in this
// paper. // paper.
void DCTStream::transformDataUnit(Gushort *quantTable, void DCTStream::transformDataUnit(unsigned short *quantTable,
int dataIn[64], unsigned char dataOut[64]) { int dataIn[64], unsigned char dataOut[64]) {
int v0, v1, v2, v3, v4, v5, v6, v7, t; int v0, v1, v2, v3, v4, v5, v6, v7, t;
int *p; int *p;
...@@ -3350,7 +3350,7 @@ void DCTStream::transformDataUnit(Gushort *quantTable, ...@@ -3350,7 +3350,7 @@ void DCTStream::transformDataUnit(Gushort *quantTable,
} }
int DCTStream::readHuffSym(DCTHuffTable *table) { int DCTStream::readHuffSym(DCTHuffTable *table) {
Gushort code; unsigned short code;
int bit; int bit;
int codeBits; int codeBits;
...@@ -3672,7 +3672,7 @@ bool DCTStream::readHuffmanTables() { ...@@ -3672,7 +3672,7 @@ bool DCTStream::readHuffmanTables() {
DCTHuffTable *tbl; DCTHuffTable *tbl;
int length; int length;
int index; int index;
Gushort code; unsigned short code;
unsigned char sym; unsigned char sym;
int i; int i;
int c; int c;
...@@ -4893,8 +4893,8 @@ void FlateStream::compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab) { ...@@ -4893,8 +4893,8 @@ void FlateStream::compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab) {
// fill in the table entries // fill in the table entries
for (i = code2; i < tabSize; i += skip) { for (i = code2; i < tabSize; i += skip) {
tab->codes[i].len = (Gushort)len; tab->codes[i].len = (unsigned short)len;
tab->codes[i].val = (Gushort)val; tab->codes[i].val = (unsigned short)val;
} }
++code; ++code;
......
...@@ -958,8 +958,8 @@ struct DCTScanInfo { ...@@ -958,8 +958,8 @@ struct DCTScanInfo {
// DCT Huffman decoding table // DCT Huffman decoding table
struct DCTHuffTable { struct DCTHuffTable {
unsigned char firstSym[17]; // first symbol for this bit length unsigned char firstSym[17]; // first symbol for this bit length
Gushort firstCode[17]; // first code for this bit length unsigned short firstCode[17]; // first code for this bit length
Gushort numCodes[17]; // number of codes of this bit length unsigned short numCodes[17]; // number of codes of this bit length
unsigned char sym[256]; // symbols unsigned char sym[256]; // symbols
}; };
...@@ -995,7 +995,7 @@ private: ...@@ -995,7 +995,7 @@ private:
bool gotJFIFMarker; // set if APP0 JFIF marker was present bool gotJFIFMarker; // set if APP0 JFIF marker was present
bool gotAdobeMarker; // set if APP14 Adobe marker was present bool gotAdobeMarker; // set if APP14 Adobe marker was present
int restartInterval; // restart interval, in MCUs int restartInterval; // restart interval, in MCUs
Gushort quantTables[4][64]; // quantization tables unsigned short quantTables[4][64]; // quantization tables
int numQuantTables; // number of quantization tables int numQuantTables; // number of quantization tables
DCTHuffTable dcHuffTables[4]; // DC Huffman tables DCTHuffTable dcHuffTables[4]; // DC Huffman tables
DCTHuffTable acHuffTables[4]; // AC Huffman tables DCTHuffTable acHuffTables[4]; // AC Huffman tables
...@@ -1020,7 +1020,7 @@ private: ...@@ -1020,7 +1020,7 @@ private:
DCTHuffTable *acHuffTable, DCTHuffTable *acHuffTable,
int *prevDC, int data[64]); int *prevDC, int data[64]);
void decodeImage(); void decodeImage();
void transformDataUnit(Gushort *quantTable, void transformDataUnit(unsigned short *quantTable,
int dataIn[64], unsigned char dataOut[64]); int dataIn[64], unsigned char dataOut[64]);
int readHuffSym(DCTHuffTable *table); int readHuffSym(DCTHuffTable *table);
int readAmp(int size); int readAmp(int size);
...@@ -1055,8 +1055,8 @@ private: ...@@ -1055,8 +1055,8 @@ private:
// Huffman code table entry // Huffman code table entry
struct FlateCode { struct FlateCode {
Gushort len; // code length, in bits unsigned short len; // code length, in bits
Gushort val; // value represented by this code unsigned short val; // value represented by this code
}; };
struct FlateHuffmanTab { struct FlateHuffmanTab {
......
...@@ -694,7 +694,7 @@ void ArthurOutputDev::updateFont(GfxState *state) ...@@ -694,7 +694,7 @@ void ArthurOutputDev::updateFont(GfxState *state)
if (n) { if (n) {
codeToGID = (int *)gmallocn(n, sizeof(int)); codeToGID = (int *)gmallocn(n, sizeof(int));
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
n * sizeof(Gushort)); n * sizeof(unsigned short));
} }
} else { } else {
if (fileName) if (fileName)
......
...@@ -50,7 +50,7 @@ static inline int splashFloor(SplashCoord x) { ...@@ -50,7 +50,7 @@ static inline int splashFloor(SplashCoord x) {
// floor() and (int)() are implemented separately, which results // floor() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with // in changing the FPCW multiple times - so we optimize it with
// some inline assembly // some inline assembly
Gushort oldCW, newCW, t; unsigned short oldCW, newCW, t;
int result; int result;
__asm__ volatile("fldl %4\n" __asm__ volatile("fldl %4\n"
...@@ -69,7 +69,7 @@ static inline int splashFloor(SplashCoord x) { ...@@ -69,7 +69,7 @@ static inline int splashFloor(SplashCoord x) {
// floor() and (int)() are implemented separately, which results // floor() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with // in changing the FPCW multiple times - so we optimize it with
// some inline assembly // some inline assembly
Gushort oldCW, newCW; unsigned short oldCW, newCW;
int result; int result;
__asm fld QWORD PTR x __asm fld QWORD PTR x
...@@ -97,7 +97,7 @@ static inline int splashCeil(SplashCoord x) { ...@@ -97,7 +97,7 @@ static inline int splashCeil(SplashCoord x) {
// ceil() and (int)() are implemented separately, which results // ceil() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with // in changing the FPCW multiple times - so we optimize it with
// some inline assembly // some inline assembly
Gushort oldCW, newCW, t; unsigned short oldCW, newCW, t;
int result; int result;
__asm__ volatile("fldl %4\n" __asm__ volatile("fldl %4\n"
...@@ -116,7 +116,7 @@ static inline int splashCeil(SplashCoord x) { ...@@ -116,7 +116,7 @@ static inline int splashCeil(SplashCoord x) {
// ceil() and (int)() are implemented separately, which results // ceil() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with // in changing the FPCW multiple times - so we optimize it with
// some inline assembly // some inline assembly
Gushort oldCW, newCW; unsigned short oldCW, newCW;
int result; int result;
__asm fld QWORD PTR x __asm fld QWORD PTR x
...@@ -141,7 +141,7 @@ static inline int splashRound(SplashCoord x) { ...@@ -141,7 +141,7 @@ static inline int splashRound(SplashCoord x) {
// this could use round-to-nearest mode and avoid the "+0.5", // this could use round-to-nearest mode and avoid the "+0.5",
// but that produces slightly different results (because i+0.5 // but that produces slightly different results (because i+0.5
// sometimes rounds up and sometimes down using the even rule) // sometimes rounds up and sometimes down using the even rule)
Gushort oldCW, newCW, t; unsigned short oldCW, newCW, t;
int result; int result;
x += 0.5; x += 0.5;
...@@ -161,7 +161,7 @@ static inline int splashRound(SplashCoord x) { ...@@ -161,7 +161,7 @@ static inline int splashRound(SplashCoord x) {
// this could use round-to-nearest mode and avoid the "+0.5", // this could use round-to-nearest mode and avoid the "+0.5",
// but that produces slightly different results (because i+0.5 // but that produces slightly different results (because i+0.5
// sometimes rounds up and sometimes down using the even rule) // sometimes rounds up and sometimes down using the even rule)
Gushort oldCW, newCW; unsigned short oldCW, newCW;
int result; int result;
x += 0.5; x += 0.5;
......
...@@ -428,7 +428,7 @@ void ImageOutputDev::writeImageFile(ImgWriter *writer, ImageFormat format, const ...@@ -428,7 +428,7 @@ void ImageOutputDev::writeImageFile(ImgWriter *writer, ImageFormat format, const
case imgRGB48: { case imgRGB48: {
p = imgStr->getLine(); p = imgStr->getLine();
Gushort *rowp16 = (Gushort*)row; unsigned short *rowp16 = (unsigned short*)row;
for (int x = 0; x < width; ++x) { for (int x = 0; x < width; ++x) {
if (p) { if (p) {
colorMap->getRGB(p, &rgb); colorMap->getRGB(p, &rgb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment