patch for cups printers

Michael Cardenas michael.cardenas at lindows.com
Mon Apr 29 14:39:46 CDT 2002


Changelog:
This patch fixes printing on cups systems that don't have complete lpr
implementations. It won't affect non cups systems. 

It changes the device listed in the registry for cups printers to CUPS:
instead of LPR: and uses "lp -d" for a cups printer instead of "lpr -P". 

Files affected: 

dlls/gdi/printdrv.c
dlls/winspool/info.c


-- 
michael cardenas
lead windows compatibility engineer
lindows.com

"Be the change you want to see in the world"
-Mahatma Gandhi
-------------- next part --------------
--- winehq/dlls/winspool/info.c	Sat Mar  9 18:44:34 2002
+++ wine/dlls/winspool/info.c	Mon Apr 29 15:29:08 2002
@@ -147,7 +147,7 @@
 	pinfo2a.pComment	= "WINEPS Printer using CUPS";
 	pinfo2a.pLocation	= "<physical location of printer>";
 	port = HeapAlloc(GetProcessHeap(),0,strlen("LPR:")+strlen(printers[i])+1);
-	sprintf(port,"LPR:%s",printers[i]);
+	sprintf(port,"CUPS:%s",printers[i]);
 	pinfo2a.pPortName	= port;
 	pinfo2a.pParameters	= "<parameters?>";
 	pinfo2a.pShareName	= "<share name?>";
-------------- next part --------------
--- winehq/dlls/gdi/printdrv.c	Thu Mar 28 17:22:05 2002
+++ wine/dlls/gdi/printdrv.c	Mon Apr 29 15:29:42 2002
@@ -482,6 +482,8 @@
 
     if (!strncmp("LPR:",pszOutput,4))
       sprintf(psCmd,"|lpr -P%s",pszOutput+4);
+    if (!strncmp("CUPS:",pszOutput,4))
+      sprintf(psCmd,"|lp -d%s",pszOutput+4);
     else
     {
 	HKEY hkey;


More information about the wine-patches mailing list