Commit ceb06647 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

wineps.drv: Enable compilation with long types.

parent 71189f62
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wineps.drv MODULE = wineps.drv
IMPORTS = user32 gdi32 winspool advapi32 IMPORTS = user32 gdi32 winspool advapi32
......
...@@ -60,7 +60,7 @@ BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, struct bitblt_coords *dst, DWORD dwRop) ...@@ -60,7 +60,7 @@ BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, struct bitblt_coords *dst, DWORD dwRop)
return TRUE; return TRUE;
} }
default: default:
FIXME("Unsupported rop %06x\n", dwRop); FIXME("Unsupported rop %06lx\n", dwRop);
return FALSE; return FALSE;
} }
} }
...@@ -68,7 +68,7 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font, ...@@ -68,7 +68,7 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font,
USHORT usUnitsPerEm, usWinAscent, usWinDescent; USHORT usUnitsPerEm, usWinAscent, usWinDescent;
SHORT sAscender, sDescender, sLineGap, sAvgCharWidth; SHORT sAscender, sDescender, sLineGap, sAvgCharWidth;
TRACE("'%s' %i\n", afm->FontName, lfHeight); TRACE("'%s' %li\n", afm->FontName, lfHeight);
if (lfHeight < 0) /* match em height */ if (lfHeight < 0) /* match em height */
{ {
...@@ -142,9 +142,9 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font, ...@@ -142,9 +142,9 @@ static VOID ScaleFont(const AFM *afm, LONG lfHeight, PSFONT *font,
font->strikeoutPosition = tm->tmAscent / 2; font->strikeoutPosition = tm->tmAscent / 2;
font->strikeoutThickness = font->underlineThickness; font->strikeoutThickness = font->underlineThickness;
TRACE("Selected PS font '%s' size %d weight %d.\n", afm->FontName, TRACE("Selected PS font '%s' size %d weight %ld.\n", afm->FontName,
font->size.xx, tm->tmWeight ); font->size.xx, tm->tmWeight );
TRACE("H = %d As = %d Des = %d IL = %d EL = %d\n", tm->tmHeight, TRACE("H = %ld As = %ld Des = %ld IL = %ld EL = %ld\n", tm->tmHeight,
tm->tmAscent, tm->tmDescent, tm->tmInternalLeading, tm->tmAscent, tm->tmDescent, tm->tmInternalLeading,
tm->tmExternalLeading); tm->tmExternalLeading);
} }
...@@ -308,7 +308,7 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm) ...@@ -308,7 +308,7 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
if (needle == NULL) if (needle == NULL)
{ {
WARN("No glyph for U+%.4X in %s\n", UV, afm->FontName); WARN("No glyph for U+%.4lX in %s\n", UV, afm->FontName);
needle = afm->Metrics; needle = afm->Metrics;
} }
......
...@@ -73,7 +73,7 @@ void PSDRV_CreateColor( PHYSDEV dev, PSCOLOR *pscolor, COLORREF wincolor ) ...@@ -73,7 +73,7 @@ void PSDRV_CreateColor( PHYSDEV dev, PSCOLOR *pscolor, COLORREF wincolor )
float r, g, b; float r, g, b;
if(ctype != 0 && ctype != 2) if(ctype != 0 && ctype != 2)
FIXME("Colour is %08x\n", wincolor); FIXME("Colour is %08lx\n", wincolor);
r = (wincolor & 0xff) / 256.0; r = (wincolor & 0xff) / 256.0;
g = ((wincolor >> 8) & 0xff) / 256.0; g = ((wincolor >> 8) & 0xff) / 256.0;
......
...@@ -655,14 +655,14 @@ static void get_post2_custom_glyph_name(BYTE *post2header, DWORD size, WORD inde ...@@ -655,14 +655,14 @@ static void get_post2_custom_glyph_name(BYTE *post2header, DWORD size, WORD inde
name_offset += name_length; name_offset += name_length;
if(name_offset + sizeof(BYTE) > size) if(name_offset + sizeof(BYTE) > size)
{ {
FIXME("Pascal name offset '%d' exceeds PostScript Format 2 table size (%d)\n", FIXME("Pascal name offset '%d' exceeds PostScript Format 2 table size (%ld)\n",
name_offset + 1, size); name_offset + 1, size);
return; return;
} }
name_length = (post2header + name_offset)[0]; name_length = (post2header + name_offset)[0];
if(name_offset + name_length > size) if(name_offset + name_length > size)
{ {
FIXME("Pascal name offset '%d' exceeds PostScript Format 2 table size (%d)\n", FIXME("Pascal name offset '%d' exceeds PostScript Format 2 table size (%ld)\n",
name_offset + name_length, size); name_offset + name_length, size);
return; return;
} }
......
...@@ -456,7 +456,7 @@ INT WINAPI DrvDocumentProperties(HWND hwnd, const WCHAR *device, DEVMODEW *outpu ...@@ -456,7 +456,7 @@ INT WINAPI DrvDocumentProperties(HWND hwnd, const WCHAR *device, DEVMODEW *outpu
{ {
PRINTERINFO *pi; PRINTERINFO *pi;
TRACE("(hwnd=%p, Device='%s', devOut=%p, devIn=%p, Mode=%04x)\n", TRACE("(hwnd=%p, Device='%s', devOut=%p, devIn=%p, Mode=%04lx)\n",
hwnd, debugstr_w(device), output, input, mode); hwnd, debugstr_w(device), output, input, mode);
if (!(pi = PSDRV_FindPrinterInfo(device))) return -1; if (!(pi = PSDRV_FindPrinterInfo(device))) return -1;
...@@ -468,7 +468,7 @@ INT WINAPI DrvDocumentProperties(HWND hwnd, const WCHAR *device, DEVMODEW *outpu ...@@ -468,7 +468,7 @@ INT WINAPI DrvDocumentProperties(HWND hwnd, const WCHAR *device, DEVMODEW *outpu
/* If DM_MODIFY is set, change settings in accordance with lpdmInput */ /* If DM_MODIFY is set, change settings in accordance with lpdmInput */
if ((mode & DM_MODIFY) && input) if ((mode & DM_MODIFY) && input)
{ {
TRACE("DM_MODIFY set. devIn->dmFields = %08x\n", input->dmFields); TRACE("DM_MODIFY set. devIn->dmFields = %08lx\n", input->dmFields);
PSDRV_MergeDevmodes(pi->Devmode, (PSDRV_DEVMODE *)input, pi); PSDRV_MergeDevmodes(pi->Devmode, (PSDRV_DEVMODE *)input, pi);
} }
...@@ -681,7 +681,7 @@ DWORD WINAPI DrvDeviceCapabilities(HANDLE printer, WCHAR *device_name, WORD capa ...@@ -681,7 +681,7 @@ DWORD WINAPI DrvDeviceCapabilities(HANDLE printer, WCHAR *device_name, WORD capa
ret = 0; ret = 0;
if(pi->ppd->DefaultDuplex && pi->ppd->DefaultDuplex->WinDuplex != 0) if(pi->ppd->DefaultDuplex && pi->ppd->DefaultDuplex->WinDuplex != 0)
ret = 1; ret = 1;
TRACE("DC_DUPLEX: returning %d\n", ret); TRACE("DC_DUPLEX: returning %ld\n", ret);
break; break;
case DC_EMF_COMPLIANT: case DC_EMF_COMPLIANT:
......
...@@ -69,7 +69,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat ...@@ -69,7 +69,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat
return 0; return 0;
} else { } else {
DWORD num = (cbInput < sizeof(DWORD)) ? *(const USHORT *)in_data : *(const DWORD *)in_data; DWORD num = (cbInput < sizeof(DWORD)) ? *(const USHORT *)in_data : *(const DWORD *)in_data;
TRACE("QUERYESCSUPPORT for %d\n", num); TRACE("QUERYESCSUPPORT for %ld\n", num);
switch(num) { switch(num) {
case NEXTBAND: case NEXTBAND:
...@@ -112,7 +112,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat ...@@ -112,7 +112,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat
return FALSE; /* suppress the FIXME below */ return FALSE; /* suppress the FIXME below */
default: default:
FIXME("QUERYESCSUPPORT(%d) - not supported.\n", num); FIXME("QUERYESCSUPPORT(%ld) - not supported.\n", num);
return FALSE; return FALSE;
} }
} }
...@@ -149,7 +149,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat ...@@ -149,7 +149,7 @@ INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_dat
{ {
DRAWPATRECT *dpr = (DRAWPATRECT*)in_data; DRAWPATRECT *dpr = (DRAWPATRECT*)in_data;
FIXME("DRAWPATTERNRECT(pos (%d,%d), size %dx%d, style %d, pattern %x), stub!\n", FIXME("DRAWPATTERNRECT(pos (%ld,%ld), size %ldx%ld, style %d, pattern %x), stub!\n",
dpr->ptPosition.x, dpr->ptPosition.y, dpr->ptPosition.x, dpr->ptPosition.y,
dpr->ptSize.x, dpr->ptSize.y, dpr->ptSize.x, dpr->ptSize.y,
dpr->wStyle, dpr->wPattern dpr->wStyle, dpr->wPattern
...@@ -453,7 +453,7 @@ INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) ...@@ -453,7 +453,7 @@ INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc )
if (!OpenPrinterW( physDev->pi->friendly_name, &physDev->job.hprinter, &prn_def )) if (!OpenPrinterW( physDev->pi->friendly_name, &physDev->job.hprinter, &prn_def ))
{ {
WARN("OpenPrinter(%s, ...) failed: %d\n", WARN("OpenPrinter(%s, ...) failed: %ld\n",
debugstr_w(physDev->pi->friendly_name), GetLastError()); debugstr_w(physDev->pi->friendly_name), GetLastError());
return 0; return 0;
} }
...@@ -474,7 +474,7 @@ INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) ...@@ -474,7 +474,7 @@ INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc )
is done during winspool.drv,ScheduleJob */ is done during winspool.drv,ScheduleJob */
physDev->job.id = StartDocPrinterW(physDev->job.hprinter, 1, (LPBYTE) &di); physDev->job.id = StartDocPrinterW(physDev->job.hprinter, 1, (LPBYTE) &di);
if(!physDev->job.id) { if(!physDev->job.id) {
WARN("StartDocPrinter() failed: %d\n", GetLastError()); WARN("StartDocPrinter() failed: %ld\n", GetLastError());
ClosePrinter(physDev->job.hprinter); ClosePrinter(physDev->job.hprinter);
return 0; return 0;
} }
......
...@@ -50,7 +50,7 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags ) ...@@ -50,7 +50,7 @@ HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
*aa_flags = GGO_BITMAP; /* no anti-aliasing on printer devices */ *aa_flags = GGO_BITMAP; /* no anti-aliasing on printer devices */
TRACE("FaceName = %s Height = %d Italic = %d Weight = %d\n", TRACE("FaceName = %s Height = %ld Italic = %d Weight = %ld\n",
debugstr_w(lf.lfFaceName), lf.lfHeight, lf.lfItalic, debugstr_w(lf.lfFaceName), lf.lfHeight, lf.lfItalic,
lf.lfWeight); lf.lfWeight);
......
...@@ -110,7 +110,7 @@ BOOL CDECL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT botto ...@@ -110,7 +110,7 @@ BOOL CDECL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT botto
{ {
char buf[256]; char buf[256];
sprintf(buf, "N %d %d %d %d B\n", rect.right - rect.left, rect.bottom - rect.top, rect.left, rect.top); sprintf(buf, "N %ld %ld %ld %ld B\n", rect.right - rect.left, rect.bottom - rect.top, rect.left, rect.top);
write_spool(dev, buf, strlen(buf)); write_spool(dev, buf, strlen(buf));
physDev->job.passthrough_state = passthrough_had_rect; physDev->job.passthrough_state = passthrough_had_rect;
return TRUE; return TRUE;
......
...@@ -108,7 +108,7 @@ static const struct gdi_dc_funcs psdrv_funcs; ...@@ -108,7 +108,7 @@ static const struct gdi_dc_funcs psdrv_funcs;
*/ */
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{ {
TRACE("(%p, %d, %p)\n", hinst, reason, reserved); TRACE("(%p, %ld, %p)\n", hinst, reason, reserved);
switch(reason) { switch(reason) {
...@@ -187,7 +187,7 @@ while (0) ...@@ -187,7 +187,7 @@ while (0)
CHECK_FIELD(DM_DITHERTYPE); CHECK_FIELD(DM_DITHERTYPE);
CHECK_FIELD(DM_PANNINGWIDTH); CHECK_FIELD(DM_PANNINGWIDTH);
CHECK_FIELD(DM_PANNINGHEIGHT); CHECK_FIELD(DM_PANNINGHEIGHT);
if (fields) TRACE(" %#x", fields); if (fields) TRACE(" %#lx", fields);
TRACE("\n"); TRACE("\n");
#undef CHECK_FIELD #undef CHECK_FIELD
} }
...@@ -205,7 +205,7 @@ static void dump_devmode(const DEVMODEW *dm) ...@@ -205,7 +205,7 @@ static void dump_devmode(const DEVMODEW *dm)
TRACE("dmDriverVersion: 0x%04x\n", dm->dmDriverVersion); TRACE("dmDriverVersion: 0x%04x\n", dm->dmDriverVersion);
TRACE("dmSize: 0x%04x\n", dm->dmSize); TRACE("dmSize: 0x%04x\n", dm->dmSize);
TRACE("dmDriverExtra: 0x%04x\n", dm->dmDriverExtra); TRACE("dmDriverExtra: 0x%04x\n", dm->dmDriverExtra);
TRACE("dmFields: 0x%04x\n", dm->dmFields); TRACE("dmFields: 0x%04lx\n", dm->dmFields);
dump_fields(dm->dmFields); dump_fields(dm->dmFields);
TRACE("dmOrientation: %d\n", dm->dmOrientation); TRACE("dmOrientation: %d\n", dm->dmOrientation);
TRACE("dmPaperSize: %d\n", dm->dmPaperSize); TRACE("dmPaperSize: %d\n", dm->dmPaperSize);
...@@ -222,9 +222,9 @@ static void dump_devmode(const DEVMODEW *dm) ...@@ -222,9 +222,9 @@ static void dump_devmode(const DEVMODEW *dm)
TRACE("dmCollate: %d\n", dm->dmCollate); TRACE("dmCollate: %d\n", dm->dmCollate);
TRACE("dmFormName: %s\n", debugstr_w(dm->dmFormName)); TRACE("dmFormName: %s\n", debugstr_w(dm->dmFormName));
TRACE("dmLogPixels %u\n", dm->dmLogPixels); TRACE("dmLogPixels %u\n", dm->dmLogPixels);
TRACE("dmBitsPerPel %u\n", dm->dmBitsPerPel); TRACE("dmBitsPerPel %lu\n", dm->dmBitsPerPel);
TRACE("dmPelsWidth %u\n", dm->dmPelsWidth); TRACE("dmPelsWidth %lu\n", dm->dmPelsWidth);
TRACE("dmPelsHeight %u\n", dm->dmPelsHeight); TRACE("dmPelsHeight %lu\n", dm->dmPelsHeight);
} }
static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev ) static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev )
...@@ -307,13 +307,13 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev ) ...@@ -307,13 +307,13 @@ static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev )
physDev->ImageableArea.top = physDev->PageSize.cy = physDev->ImageableArea.top = physDev->PageSize.cy =
physDev->Devmode->dmPublic.dmPaperLength * physDev->logPixelsY / 254; physDev->Devmode->dmPublic.dmPaperLength * physDev->logPixelsY / 254;
} else { } else {
FIXME("Odd dmFields %x\n", physDev->Devmode->dmPublic.dmFields); FIXME("Odd dmFields %lx\n", physDev->Devmode->dmPublic.dmFields);
SetRectEmpty(&physDev->ImageableArea); SetRectEmpty(&physDev->ImageableArea);
physDev->PageSize.cx = 0; physDev->PageSize.cx = 0;
physDev->PageSize.cy = 0; physDev->PageSize.cy = 0;
} }
TRACE("ImageableArea = %s: PageSize = %dx%d\n", wine_dbgstr_rect(&physDev->ImageableArea), TRACE("ImageableArea = %s: PageSize = %ldx%ld\n", wine_dbgstr_rect(&physDev->ImageableArea),
physDev->PageSize.cx, physDev->PageSize.cy); physDev->PageSize.cx, physDev->PageSize.cy);
/* these are in device units */ /* these are in device units */
...@@ -671,7 +671,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name) ...@@ -671,7 +671,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
lstrcpyW( pi->friendly_name, name ); lstrcpyW( pi->friendly_name, name );
if (OpenPrinterW( pi->friendly_name, &hPrinter, NULL ) == 0) { if (OpenPrinterW( pi->friendly_name, &hPrinter, NULL ) == 0) {
ERR ("OpenPrinter failed with code %i\n", GetLastError ()); ERR ("OpenPrinter failed with code %li\n", GetLastError ());
goto fail; goto fail;
} }
......
...@@ -60,7 +60,7 @@ HPEN CDECL PSDRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern * ...@@ -60,7 +60,7 @@ HPEN CDECL PSDRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *
logpen.lopnColor = elp->elpColor; logpen.lopnColor = elp->elpColor;
} }
TRACE("hpen = %p colour = %08x\n", hpen, logpen.lopnColor); TRACE("hpen = %p colour = %08lx\n", hpen, logpen.lopnColor);
physDev->pen.width = logpen.lopnWidth.x; physDev->pen.width = logpen.lopnWidth.x;
if ((logpen.lopnStyle & PS_GEOMETRIC) || (physDev->pen.width > 1)) if ((logpen.lopnStyle & PS_GEOMETRIC) || (physDev->pen.width > 1))
......
...@@ -758,7 +758,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer ) ...@@ -758,7 +758,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
SIZE sz; SIZE sz;
if(parse_resolution(tuple.value, &sz)) if(parse_resolution(tuple.value, &sz))
{ {
TRACE("DefaultResolution %dx%d\n", sz.cx, sz.cy); TRACE("DefaultResolution %ldx%ld\n", sz.cx, sz.cy);
ppd->DefaultResolution = sz.cx; ppd->DefaultResolution = sz.cx;
} }
else else
...@@ -772,7 +772,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer ) ...@@ -772,7 +772,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
{ {
RESOLUTION *res; RESOLUTION *res;
TRACE("Resolution %dx%d, invocation %s\n", sz.cx, sz.cy, tuple.value); TRACE("Resolution %ldx%ld, invocation %s\n", sz.cx, sz.cy, tuple.value);
res = HeapAlloc( GetProcessHeap(), 0, sizeof(*res) ); res = HeapAlloc( GetProcessHeap(), 0, sizeof(*res) );
res->resx = sz.cx; res->resx = sz.cx;
......
...@@ -168,7 +168,7 @@ static const char psarc[] = /* x, y, w, h, ang1, ang2 */ ...@@ -168,7 +168,7 @@ static const char psarc[] = /* x, y, w, h, ang1, ang2 */
"tmpmtrx setmatrix\n"; "tmpmtrx setmatrix\n";
static const char pscurveto[] = /* x1, y1, x2, y2, x3, y3 */ static const char pscurveto[] = /* x1, y1, x2, y2, x3, y3 */
"%d %d %d %d %d %d curveto\n"; "%ld %ld %ld %ld %ld %ld curveto\n";
static const char psgsave[] = static const char psgsave[] =
"gsave\n"; "gsave\n";
...@@ -207,7 +207,7 @@ static const char psrotate[] = /* ang */ ...@@ -207,7 +207,7 @@ static const char psrotate[] = /* ang */
"%.1f rotate\n"; "%.1f rotate\n";
static const char psarrayput[] = static const char psarrayput[] =
"%s %d %d put\n"; "%s %d %ld put\n";
static const char psarraydef[] = static const char psarraydef[] =
"/%s %d array def\n"; "/%s %d array def\n";
...@@ -680,7 +680,7 @@ BOOL PSDRV_WriteSetPen(PHYSDEV dev) ...@@ -680,7 +680,7 @@ BOOL PSDRV_WriteSetPen(PHYSDEV dev)
if (physDev->pen.dash_len) if (physDev->pen.dash_len)
{ {
for (i = pos = 0; i < physDev->pen.dash_len; i++) for (i = pos = 0; i < physDev->pen.dash_len; i++)
pos += sprintf( buf + pos, " %u", physDev->pen.dash[i] ); pos += sprintf( buf + pos, " %lu", physDev->pen.dash[i] );
buf[0] = '['; buf[0] = '[';
sprintf(buf + pos, "] %u setdash\n", 0); sprintf(buf + pos, "] %u setdash\n", 0);
} }
...@@ -963,7 +963,7 @@ BOOL PSDRV_WriteDIBPatternDict(PHYSDEV dev, const BITMAPINFO *bmi, BYTE *bits, U ...@@ -963,7 +963,7 @@ BOOL PSDRV_WriteDIBPatternDict(PHYSDEV dev, const BITMAPINFO *bmi, BYTE *bits, U
INT w, h, x, y, w_mult, h_mult, abs_height = abs( bmi->bmiHeader.biHeight ); INT w, h, x, y, w_mult, h_mult, abs_height = abs( bmi->bmiHeader.biHeight );
COLORREF map[2]; COLORREF map[2];
TRACE( "size %dx%dx%d\n", TRACE( "size %ldx%ldx%d\n",
bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight, bmi->bmiHeader.biBitCount); bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight, bmi->bmiHeader.biBitCount);
if(bmi->bmiHeader.biBitCount != 1) { if(bmi->bmiHeader.biBitCount != 1) {
......
...@@ -77,8 +77,8 @@ TYPE1 *T1_download_header(PHYSDEV dev, char *ps_name, RECT *bbox, UINT emsize) ...@@ -77,8 +77,8 @@ TYPE1 *T1_download_header(PHYSDEV dev, char *ps_name, RECT *bbox, UINT emsize)
" /FontName /%s def\n" " /FontName /%s def\n"
" /Encoding 256 array 0 1 255{1 index exch /.notdef put} for def\n" " /Encoding 256 array 0 1 255{1 index exch /.notdef put} for def\n"
" /PaintType 0 def\n" " /PaintType 0 def\n"
" /FontMatrix [1 %d div 0 0 1 %d div 0 0] def\n" " /FontMatrix [1 %ld div 0 0 1 %ld div 0 0] def\n"
" /FontBBox [%d %d %d %d] def\n" " /FontBBox [%ld %ld %ld %ld] def\n"
" /FontType 1 def\n" " /FontType 1 def\n"
" /Private 7 dict begin\n" " /Private 7 dict begin\n"
" /RD {string currentfile exch readhexstring pop} def\n" " /RD {string currentfile exch readhexstring pop} def\n"
...@@ -545,12 +545,12 @@ BOOL T1_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, char *glyph_name ...@@ -545,12 +545,12 @@ BOOL T1_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, char *glyph_name
"/%s findfont dup\n" "/%s findfont dup\n"
"/Private get begin\n" "/Private get begin\n"
"/CharStrings get begin\n" "/CharStrings get begin\n"
"/%s %d RD\n"; "/%s %ld RD\n";
static const char glyph_def_end[] = static const char glyph_def_end[] =
"ND\n" "ND\n"
"end end\n"; "end end\n";
TRACE("%d %s\n", index, glyph_name); TRACE("%ld %s\n", index, glyph_name);
assert(pdl->type == Type1); assert(pdl->type == Type1);
t1 = pdl->typeinfo.Type1; t1 = pdl->typeinfo.Type1;
...@@ -649,7 +649,7 @@ BOOL T1_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, char *glyph_name ...@@ -649,7 +649,7 @@ BOOL T1_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, char *glyph_name
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(glyph_def_begin) + buf = HeapAlloc(GetProcessHeap(), 0, sizeof(glyph_def_begin) +
strlen(pdl->ps_name) + strlen(glyph_name) + 100); strlen(pdl->ps_name) + strlen(glyph_name) + 100);
sprintf(buf, "%%%%glyph %04x\n", index); sprintf(buf, "%%%%glyph %04lx\n", index);
PSDRV_WriteSpool(dev, buf, strlen(buf)); PSDRV_WriteSpool(dev, buf, strlen(buf));
len = str_get_bytes(charstring, &bytes); len = str_get_bytes(charstring, &bytes);
......
...@@ -157,13 +157,13 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name, ...@@ -157,13 +157,13 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name,
" currentdict end def\n" " currentdict end def\n"
" /sfnts [\n"; " /sfnts [\n";
static const char TT_offset_table[] = "<00010000%04x%04x%04x%04x\n"; static const char TT_offset_table[] = "<00010000%04x%04x%04x%04x\n";
static const char TT_table_dir_entry[] = "%08x%08x%08x%08x\n"; static const char TT_table_dir_entry[] = "%08lx%08lx%08lx%08lx\n";
static const char storage[] ="]\nhavetype42gdir{pop}{{string} forall}ifelse\n"; static const char storage[] ="]\nhavetype42gdir{pop}{{string} forall}ifelse\n";
static const char end[] = "] def\n" static const char end[] = "] def\n"
"havetype42gdir{/GlyphDirectory 256 dict def\n" "havetype42gdir{/GlyphDirectory 256 dict def\n"
" sfnts 0 get dup\n" " sfnts 0 get dup\n"
" %d <6c6f6378000000000000000000000000> putinterval\n" /* replace loca entry with dummy locx */ " %ld <6c6f6378000000000000000000000000> putinterval\n" /* replace loca entry with dummy locx */
" %d <676c6678000000000000000000000000> putinterval\n" /* replace glyf entry with dummy glfx */ " %ld <676c6678000000000000000000000000> putinterval\n" /* replace glyf entry with dummy glfx */
" }if\n" " }if\n"
"currentdict end dup /FontName get exch definefont pop\n"; "currentdict end dup /FontName get exch definefont pop\n";
...@@ -190,7 +190,7 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name, ...@@ -190,7 +190,7 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name,
t42->maxp_tab = i; t42->maxp_tab = i;
} }
if(i < num_of_tables) { if(i < num_of_tables) {
TRACE("Table %d has length %d. Will use Type 1 font instead.\n", i, t42->tables[i].len); TRACE("Table %ld has length %ld. Will use Type 1 font instead.\n", i, t42->tables[i].len);
T42_free(t42); T42_free(t42);
return NULL; return NULL;
} }
...@@ -265,7 +265,7 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name, ...@@ -265,7 +265,7 @@ TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name,
PSDRV_WriteSpool(dev, "[ ", 2); PSDRV_WriteSpool(dev, "[ ", 2);
for(i = 1; t42->glyf_blocks[i]; i++) { for(i = 1; t42->glyf_blocks[i]; i++) {
sprintf(buf,"%d ", t42->glyf_blocks[i] - t42->glyf_blocks[i-1] + 1); sprintf(buf,"%ld ", t42->glyf_blocks[i] - t42->glyf_blocks[i-1] + 1);
/* again add one byte for old PostScript rips */ /* again add one byte for old PostScript rips */
PSDRV_WriteSpool(dev, buf, strlen(buf)); PSDRV_WriteSpool(dev, buf, strlen(buf));
if(i % 8 == 0) if(i % 8 == 0)
...@@ -291,16 +291,16 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, ...@@ -291,16 +291,16 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index,
static const char glyph_def[] = static const char glyph_def[] =
"/%s findfont exch 1 index\n" "/%s findfont exch 1 index\n"
"havetype42gdir\n" "havetype42gdir\n"
"{/GlyphDirectory get begin %d exch def end}\n" "{/GlyphDirectory get begin %ld exch def end}\n"
"{/sfnts get 4 index get 3 index 2 index putinterval pop}\n" "{/sfnts get 4 index get 3 index 2 index putinterval pop}\n"
"ifelse\n" "ifelse\n"
"/CharStrings get\n" "/CharStrings get\n"
"begin\n" "begin\n"
" /%s %d def\n" " /%s %ld def\n"
"end\n" "end\n"
"pop pop\n"; "pop pop\n";
TRACE("%d %s\n", index, glyph_name); TRACE("%ld %s\n", index, glyph_name);
assert(pdl->type == Type42); assert(pdl->type == Type42);
t42 = pdl->typeinfo.Type42; t42 = pdl->typeinfo.Type42;
...@@ -315,7 +315,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, ...@@ -315,7 +315,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index,
} }
if(!get_glyf_pos(t42, index, &start, &end)) return FALSE; if(!get_glyf_pos(t42, index, &start, &end)) return FALSE;
TRACE("start = %x end = %x\n", start, end); TRACE("start = %lx end = %lx\n", start, end);
if(GET_BE_WORD(t42->tables[t42->glyf_tab].data + start) == 0xffff) { if(GET_BE_WORD(t42->tables[t42->glyf_tab].data + start) == 0xffff) {
/* Composite glyph */ /* Composite glyph */
...@@ -327,7 +327,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, ...@@ -327,7 +327,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index,
sg_flags = GET_BE_WORD(sg_start); sg_flags = GET_BE_WORD(sg_start);
sg_index = GET_BE_WORD(sg_start + 2); sg_index = GET_BE_WORD(sg_start + 2);
TRACE("Sending subglyph %04x for glyph %04x\n", sg_index, index); TRACE("Sending subglyph %04lx for glyph %04lx\n", sg_index, index);
get_glyph_name(dev->hdc, sg_index, sg_name); get_glyph_name(dev->hdc, sg_index, sg_name);
T42_download_glyph(dev, pdl, sg_index, sg_name); T42_download_glyph(dev, pdl, sg_index, sg_name);
sg_start += 4; sg_start += 4;
...@@ -352,7 +352,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index, ...@@ -352,7 +352,7 @@ BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl, DWORD index,
/* we don't have a string for the gdir and glyf tables, but we do have a /* we don't have a string for the gdir and glyf tables, but we do have a
string for the TT header. So the offset we need is tables - 2 */ string for the TT header. So the offset we need is tables - 2 */
sprintf(buf, "%d %d\n", t42->num_of_written_tables - 2 + i, start - t42->glyf_blocks[i-1]); sprintf(buf, "%ld %ld\n", t42->num_of_written_tables - 2 + i, start - t42->glyf_blocks[i-1]);
PSDRV_WriteSpool(dev, buf, strlen(buf)); PSDRV_WriteSpool(dev, buf, strlen(buf));
PSDRV_WriteSpool(dev, "<", 1); PSDRV_WriteSpool(dev, "<", 1);
......
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