Re: patch for cups printers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is a correction for yesterday's lame printing patch. 

This corrects the string length errors and the LPR else case. 

On Tue, Apr 30, 2002 at 06:43:11AM +0200, Marcus Meissner wrote:
> > --- 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;
> 
> 
> This is wrong, the else { } is handled in the LPR: case too so you break
> /etc/printcap based printing.
> 
> Ciao, Marcus
> 
> 
> 

-- 
michael cardenas
lead windows compatibility engineer
lindows.com

"Be the change you want to see in the world"
-Mahatma Gandhi
--- winehq/dlls/gdi/printdrv.c	Thu Mar 28 17:22:05 2002
+++ wine/dlls/gdi/printdrv.c	Tue Apr 30 10:41:32 2002
@@ -480,7 +480,9 @@
     if (pszOutput == NULL || *pszOutput == '\0')
       return -1;
 
-    if (!strncmp("LPR:",pszOutput,4))
+    if (!strncmp("CUPS:",pszOutput,5))
+      sprintf(psCmd,"|lp -d%s",pszOutput+5);
+    else if (!strncmp("LPR:",pszOutput,4))
       sprintf(psCmd,"|lpr -P%s",pszOutput+4);
     else
     {

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux