Commit 865ee87b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wineps.drv: Use wide-char string literals.

parent 783d7136
......@@ -227,8 +227,6 @@ typedef struct
static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
static const WCHAR resW[] = {'%','d',0};
static const WCHAR resxyW[] = {'%','d','x','%','d',0};
PSDRV_DLGINFO *di;
int i, Cursel;
PAGESIZE *ps;
......@@ -280,7 +278,7 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
WCHAR buf[256];
res = di->pi->ppd->DefaultResolution;
len = swprintf(buf, ARRAY_SIZE(buf), resW, res);
len = swprintf(buf, ARRAY_SIZE(buf), L"%d", res);
buf[len++] = ' ';
LoadStringW(PSDRV_hInstance, IDS_DPI, buf + len, ARRAY_SIZE(buf) - len);
SendDlgItemMessageW(hwnd, IDD_QUALITY, CB_ADDSTRING, 0, (LPARAM)buf);
......@@ -310,9 +308,9 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
DWORD idx;
if (res->resx == res->resy)
len = swprintf(buf, ARRAY_SIZE(buf), resW, res->resx);
len = swprintf(buf, ARRAY_SIZE(buf), L"%d", res->resx);
else
len = swprintf(buf, ARRAY_SIZE(buf), resxyW, res->resx, res->resy);
len = swprintf(buf, ARRAY_SIZE(buf), L"%dx%d", res->resx, res->resy);
buf[len++] = ' ';
LoadStringW(PSDRV_hInstance, IDS_DPI, buf + len, ARRAY_SIZE(buf) - len);
idx = SendDlgItemMessageW(hwnd, IDD_QUALITY, CB_ADDSTRING, 0, (LPARAM)buf);
......@@ -552,7 +550,6 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
PSDRV_DLGINFO di;
PSDRV_DEVMODE dlgdm;
WCHAR SetupW[64];
static const WCHAR PAPERW[] = {'P','A','P','E','R','\0'};
LoadStringW(PSDRV_hInstance, IDS_SETUP, SetupW, ARRAY_SIZE(SetupW));
hinstComctl32 = LoadLibraryA("comctl32.dll");
......@@ -565,7 +562,7 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
di.dlgdm = &dlgdm;
psp.dwSize = sizeof(psp);
psp.hInstance = PSDRV_hInstance;
psp.u.pszTemplate = PAPERW;
psp.u.pszTemplate = L"PAPER";
psp.u2.pszIcon = NULL;
psp.pfnDlgProc = PSDRV_PaperDlgProc;
psp.lParam = (LPARAM)&di;
......
......@@ -40,7 +40,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
static const PSDRV_DEVMODE DefaultDevmode =
{
{ /* dmPublic */
/* dmDeviceName */ {'W','i','n','e',' ','P','o','s','t','S','c','r','i','p','t',' ','D','r','i','v','e','r',0},
/* dmDeviceName */ L"Wine PostScript Driver",
/* dmSpecVersion */ 0x30a,
/* dmDriverVersion */ 0x001,
/* dmSize */ sizeof(DEVMODEW),
......@@ -66,7 +66,7 @@ static const PSDRV_DEVMODE DefaultDevmode =
/* dmYResolution */ 300,
/* dmTTOption */ DMTT_SUBDEV,
/* dmCollate */ DMCOLLATE_FALSE,
/* dmFormName */ {'L','e','t','t','e','r',0},
/* dmFormName */ L"Letter",
/* dmLogPixels */ 0,
/* dmBitsPerPel */ 0,
/* dmPelsWidth */ 0,
......
......@@ -1093,13 +1093,12 @@ static BOOL BuildAFM(FILE *file)
*/
static BOOL ReadAFMFile(LPCWSTR filename)
{
static const WCHAR rW[] = {'r',0};
FILE *f;
BOOL retval;
TRACE("%s\n", debugstr_w(filename));
f = _wfopen(filename, rW);
f = _wfopen(filename, L"r");
if (f == NULL)
{
WARN("%s: %s\n", debugstr_w(filename), strerror(errno));
......@@ -1120,8 +1119,6 @@ static BOOL ReadAFMFile(LPCWSTR filename)
*/
static BOOL ReadAFMDir(LPCSTR dirname)
{
static const WCHAR starW[] = {'*',0};
static const WCHAR afmW[] = {'.','a','f','m',0};
WCHAR *path = wine_get_dos_file_name( dirname );
struct _wfinddata_t data;
intptr_t handle;
......@@ -1138,7 +1135,7 @@ static BOOL ReadAFMDir(LPCSTR dirname)
HeapFree( GetProcessHeap(), 0, path );
p = filename + lstrlenW(filename);
*p++ = '\\';
lstrcpyW( p, starW );
lstrcpyW( p, L"*" );
handle = _wfindfirst( filename, &data );
if (handle != -1)
......@@ -1146,7 +1143,7 @@ static BOOL ReadAFMDir(LPCSTR dirname)
do
{
WCHAR *ext = wcschr( data.name, '.' );
if (!ext || wcsicmp(ext, afmW)) continue;
if (!ext || wcsicmp(ext, L".afm")) continue;
lstrcpyW( p, data.name );
if (!(ret = ReadAFMFile( filename ))) break;
} while (!_wfindnext( handle, &data ));
......@@ -1170,7 +1167,6 @@ static BOOL ReadAFMDir(LPCSTR dirname)
*/
BOOL PSDRV_GetType1Metrics(void)
{
static const WCHAR pathW[] = {'A','F','M','P','a','t','h',0};
HKEY hkey;
DWORD len;
LPWSTR valueW;
......@@ -1180,11 +1176,11 @@ BOOL PSDRV_GetType1Metrics(void)
if (RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Fonts", &hkey) != ERROR_SUCCESS)
return TRUE;
if (RegQueryValueExW( hkey, pathW, NULL, NULL, NULL, &len ) == ERROR_SUCCESS)
if (RegQueryValueExW( hkey, L"AFMPath", NULL, NULL, NULL, &len ) == ERROR_SUCCESS)
{
len += sizeof(WCHAR);
valueW = HeapAlloc( PSDRV_Heap, 0, len );
if (RegQueryValueExW( hkey, pathW, NULL, NULL, (LPBYTE)valueW, &len ) == ERROR_SUCCESS)
if (RegQueryValueExW( hkey, L"AFMPath", NULL, NULL, (BYTE *)valueW, &len ) == ERROR_SUCCESS)
{
len = WideCharToMultiByte( CP_UNIXCP, 0, valueW, -1, NULL, 0, NULL, NULL );
valueA = HeapAlloc( PSDRV_Heap, 0, len );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment