[Wine-patches] gdi32: change quote symbol in print job name (for eterbug #929)
Konstantin Kondratyuk
=?iso-8859-1?q?kondratyuk_=CE=C1_etersoft=2Eru?=
Ср Окт 22 17:26:04 MSD 2008
--
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From 290e67da6d60c1a0ca08e9486565cb33a50f0f0f Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Wed, 22 Oct 2008 17:21:11 +0400
Subject: [PATCH] gdi32: change quote symbol in print job name (for eterbug #929)
---
dlls/gdi32/printdrv16.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/printdrv16.c b/dlls/gdi32/printdrv16.c
index 8545829..d2708cd 100644
--- a/dlls/gdi32/printdrv16.c
+++ b/dlls/gdi32/printdrv16.c
@@ -324,7 +324,18 @@ static int CreateSpoolFile(LPCSTR pszOutput, LPCSTR pszTitle)
RegCloseKey(hkey);
}
if (!psCmd[0] && !strncmp("LPR:",pszOutput,4))
- sprintf(psCmd,"|lpr -T'%s' -P'%s'", pszTitle, pszOutput+4);
+ {
+ char* ch;
+ char* buffer;
+
+ buffer = strdup(pszTitle);
+ ch = buffer;
+ while((ch = strchr(ch, '\'')))
+ *ch = '_';
+
+ sprintf(psCmd,"|lpr -T'%s' -P'%s'", buffer, pszOutput+4);
+ free(buffer);
+ }
else
/* Hack for print to lpr default if output device is empty. TODO: write test and use Windows default device */
if (*pszOutput == '\0')
--
1.5.6.5.GIT
Подробная информация о списке рассылки Wine-patches