[Wine-patches] gdi32: Add default print job name (for eterbug #929)
Konstantin Kondratyuk
=?iso-8859-1?q?kondratyuk_=CE=C1_etersoft=2Eru?=
Пт Янв 16 15:36:44 MSK 2009
Исправление проблемы с пустым именем задачи (на lprng Debian 5.0)
--
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From 1504af342babc25b85efa4f1727a2bcdb83a24b2 Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Fri, 16 Jan 2009 15:22:18 +0300
Subject: [PATCH] gdi32: Add default print job name (for eterbug #929)
---
dlls/gdi32/printdrv16.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/printdrv16.c b/dlls/gdi32/printdrv16.c
index 78d76ae..bb6ee73 100644
--- a/dlls/gdi32/printdrv16.c
+++ b/dlls/gdi32/printdrv16.c
@@ -305,6 +305,8 @@ static PPRINTJOB FindPrintJobFromHandle(HANDLE16 hHandle)
static int CreateSpoolFile(LPCSTR pszOutput, LPCSTR pszTitle)
{
+ const char defaultname[]="Etersoft print job";
+
int fd=-1;
char psCmd[1024];
const char *psCmdP = psCmd;
@@ -328,10 +330,15 @@ static int CreateSpoolFile(LPCSTR pszOutput, LPCSTR pszTitle)
char* ch;
char* buffer;
- buffer = strdup(pszTitle);
- ch = buffer;
- while((ch = strchr(ch, '\'')))
- *ch = '_';
+ if(pszTitle)
+ {
+ buffer = strdup(pszTitle);
+ ch = buffer;
+ while((ch = strchr(ch, '\'')))
+ *ch = '_';
+ }
+ else
+ buffer = strdup(defaultname);
sprintf(psCmd,"|lpr -T'%s' -P'%s'", buffer, pszOutput+4);
free(buffer);
--
1.6.0.2.GIT
Подробная информация о списке рассылки Wine-patches