WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
-#ifndef SONAME_LIBCUPS
-#define SONAME_LIBCUPS "libcups.so"
-#endif
-
-#ifdef HAVE_CUPS_CUPS_H
+#ifdef SONAME_LIBCUPS
static void *cupshandle = NULL;
#endif
HeapDestroy(PSDRV_Heap);
return FALSE;
}
-#ifdef HAVE_CUPS_CUPS_H
+#ifdef SONAME_LIBCUPS
/* dynamically load CUPS if not yet loaded */
if (!cupshandle) {
cupshandle = wine_dlopen(SONAME_LIBCUPS, RTLD_NOW, NULL, 0);
DeleteObject( PSDRV_DefaultFont );
HeapDestroy( PSDRV_Heap );
-#ifdef HAVE_CUPS_CUPS_H
+#ifdef SONAME_LIBCUPS
if (cupshandle && (cupshandle != (void*)-1)) {
wine_dlclose(cupshandle, NULL, 0);
cupshandle = NULL;
INT width = 0, height = 0;
if(physDev->Devmode->dmPublic.dmFields & DM_PAPERSIZE) {
- for(page = physDev->pi->ppd->PageSizes; page; page = page->next) {
+ LIST_FOR_EACH_ENTRY(page, &physDev->pi->ppd->PageSizes, PAGESIZE, entry) {
if(page->WinPage == physDev->Devmode->dmPublic.u1.s1.dmPaperSize)
break;
}
return MulDiv(physDev->vertSize, 100,
physDev->Devmode->dmPublic.dmScale);
case HORZRES:
+ case DESKTOPHORZRES:
return physDev->horzRes;
case VERTRES:
+ case DESKTOPVERTRES:
return physDev->vertRes;
case BITSPIXEL:
- return physDev->pi->ppd->ColorDevice ? 8 : 1;
+ return (physDev->pi->ppd->ColorDevice != CD_False) ? 8 : 1;
case PLANES:
return 1;
case NUMBRUSHES:
case NUMFONTS:
return 39;
case NUMCOLORS:
- return (physDev->pi->ppd->ColorDevice ? 256 : -1);
+ return (physDev->pi->ppd->ColorDevice != CD_False) ? 256 : -1;
case PDEVICESIZE:
return sizeof(PSDRV_PDEVICE);
case CURVECAPS:
case SCALINGFACTORX:
case SCALINGFACTORY:
case VREFRESH:
- case DESKTOPVERTRES:
- case DESKTOPHORZRES:
case BLTALIGNMENT:
return 0;
default:
goto cleanup;
}
-#ifdef HAVE_CUPS_CUPS_H
+#ifdef SONAME_LIBCUPS
if (cupshandle != (void*)-1) {
typeof(cupsGetPPD) * pcupsGetPPD = NULL;