From: Michael Stefaniuc Subject: [PATCH] gdi32: Reformat some strings to improve readability Message-Id: <20190401073518.27827-1-mstefani@winehq.org> Date: Mon, 1 Apr 2019 09:35:18 +0200 Signed-off-by: Michael Stefaniuc --- No-op as gcc generates the exact same object files. Only gdiobj.c, font.c and freetype.c need "CFLAGS=-O2 -g0 -DNDEBUG" as they use asserts and the line count changes. dlls/gdi32/dc.c | 2 +- dlls/gdi32/driver.c | 12 +-- dlls/gdi32/enhmetafile.c | 2 +- dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/font.c | 34 +++----- dlls/gdi32/freetype.c | 165 +++++++++++++++---------------------- dlls/gdi32/gdiobj.c | 128 ++++++++++++++-------------- dlls/gdi32/opengl.c | 2 +- dlls/gdi32/region.c | 2 +- 9 files changed, 151 insertions(+), 198 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 8ee8a52d94..159e8436f0 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dc); -static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 }; +static const WCHAR displayW[] = u"display"; static BOOL DC_DeleteObject( HGDIOBJ handle ); diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 054d7cf418..7dd025813c 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -125,8 +125,8 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name ) { HMODULE module; struct graphics_driver *driver, *new_driver; - static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 }; - static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0}; + static const WCHAR displayW[] = u"display"; + static const WCHAR display1W[] = u"\\\\.\\DISPLAY1"; /* display driver is a special case */ if (!strcmpiW( name, displayW ) || !strcmpiW( name, display1W )) return get_display_driver(); @@ -858,10 +858,10 @@ const struct gdi_dc_funcs null_driver = */ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ) { - static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 }; - static const WCHAR devicesW[] = { 'd','e','v','i','c','e','s',0 }; - static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0}; - static const WCHAR empty_strW[] = { 0 }; + static const WCHAR displayW[] = u"display"; + static const WCHAR devicesW[] = u"devices"; + static const WCHAR display1W[] = u"\\\\.\\DISPLAY1"; + static const WCHAR empty_strW[] = u""; WCHAR *p; /* display is a special case */ diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index a3360c269a..ff669470d1 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -2810,7 +2810,7 @@ typedef struct wmf_in_emf_comment HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer, const BYTE *lpbBuffer, HDC hdcRef, const METAFILEPICT *lpmfp) { - static const WCHAR szDisplayW[] = { 'D','I','S','P','L','A','Y','\0' }; + static const WCHAR szDisplayW[] = u"DISPLAY"; HMETAFILE hmf = NULL; HENHMETAFILE ret = NULL; HDC hdc = NULL, hdcdisp = NULL; diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 51133705a5..2e47455bdc 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -329,7 +329,7 @@ HDC WINAPI CreateEnhMetaFileW( LPCWSTR description /* [in] optional description */ ) { - static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0}; + static const WCHAR displayW[] = u"DISPLAY"; HDC ret, ref_dc; DC *dc; EMFDRV_PDEVICE *physDev; diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index b3d67ff624..14f432f34c 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -278,8 +278,7 @@ static DWORD get_key_value( HKEY key, const WCHAR *name, DWORD *value ) static UINT get_subpixel_orientation( HKEY key ) { - static const WCHAR smoothing_orientation[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g', - 'O','r','i','e','n','t','a','t','i','o','n',0}; + static const WCHAR smoothing_orientation[] = u"FontSmoothingOrientation"; DWORD orient; /* FIXME: handle vertical orientations even though Windows doesn't */ @@ -297,8 +296,8 @@ static UINT get_subpixel_orientation( HKEY key ) static UINT get_default_smoothing( HKEY key ) { - static const WCHAR smoothing[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g',0}; - static const WCHAR smoothing_type[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g','T','y','p','e',0}; + static const WCHAR smoothing[] = u"FontSmoothing"; + static const WCHAR smoothing_type[] = u"FontSmoothingType"; DWORD enabled, type; if (get_key_value( key, smoothing, &enabled )) return 0; @@ -635,14 +634,11 @@ static DWORD get_associated_charset_info(void) if (associated_charset == -1) { - static const WCHAR assoc_charset_reg_keyW[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','F','o','n','t','A','s','s','o','c','\\', - 'A','s','s','o','c','i','a','t','e','d',' ','C','h','a','r','s','e','t','\0'}; - static const WCHAR ansiW[] = {'A','N','S','I','(','0','0',')','\0'}; - static const WCHAR oemW[] = {'O','E','M','(','F','F',')','\0'}; - static const WCHAR symbolW[] = {'S','Y','M','B','O','L','(','0','2',')','\0'}; - static const WCHAR yesW[] = {'Y','E','S','\0'}; + static const WCHAR assoc_charset_reg_keyW[] = u"System\\CurrentControlSet\\Control\\FontAssoc\\Associated Charset"; + static const WCHAR ansiW[] = u"ANSI(00)"; + static const WCHAR oemW[] = u"OEM(FF)"; + static const WCHAR symbolW[] = u"SYMBOL(02)"; + static const WCHAR yesW[] = u"YES"; HKEY hkey; WCHAR dataW[32]; DWORD type, data_len; @@ -731,10 +727,8 @@ static void update_font_code_page( DC *dc, HANDLE font ) static struct font_gamma_ramp *get_font_gamma_ramp( void ) { - static const WCHAR desktopW[] = { 'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\', - 'D','e','s','k','t','o','p',0 }; - static const WCHAR smoothing_gamma[] = { 'F','o','n','t','S','m','o','o','t','h','i','n','g', - 'G','a','m','m','a',0 }; + static const WCHAR desktopW[] = u"Control Panel\\Desktop"; + static const WCHAR smoothing_gamma[] = u"FontSmoothingGamma"; const DWORD gamma_default = 1400; struct font_gamma_ramp *ramp; DWORD i, gamma; @@ -863,8 +857,7 @@ static BOOL FONT_DeleteObject( HGDIOBJ handle ) */ HFONT nulldrv_SelectFont( PHYSDEV dev, HFONT font, UINT *aa_flags ) { - static const WCHAR desktopW[] = { 'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\', - 'D','e','s','k','t','o','p',0 }; + static const WCHAR desktopW[] = u"Control Panel\\Desktop"; static int orientation = -1, smoothing = -1; LOGFONTW lf; HKEY key; @@ -3810,10 +3803,7 @@ UINT WINAPI GetTextCharset(HDC hdc) LONG WINAPI GdiGetCharDimensions(HDC hdc, LPTEXTMETRICW lptm, LONG *height) { SIZE sz; - static const WCHAR alphabet[] = { - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q', - 'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H', - 'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',0}; + static const WCHAR alphabet[] = u"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; if(lptm && !GetTextMetricsW(hdc, lptm)) return 0; diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 333856e325..0ada635fea 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -484,21 +484,13 @@ static inline struct freetype_physdev *get_freetype_dev( PHYSDEV dev ) static const struct gdi_dc_funcs freetype_funcs; -static const WCHAR fontsW[] = {'\\','f','o','n','t','s','\0'}; -static const WCHAR win9x_font_reg_key[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'F','o','n','t','s','\0'}; - -static const WCHAR winnt_font_reg_key[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'F','o','n','t','s','\0'}; - -static const WCHAR system_fonts_reg_key[] = {'S','o','f','t','w','a','r','e','\\','F','o','n','t','s','\0'}; -static const WCHAR FixedSys_Value[] = {'F','I','X','E','D','F','O','N','.','F','O','N','\0'}; -static const WCHAR System_Value[] = {'F','O','N','T','S','.','F','O','N','\0'}; -static const WCHAR OEMFont_Value[] = {'O','E','M','F','O','N','T','.','F','O','N','\0'}; +static const WCHAR fontsW[] = u"\\fonts"; +static const WCHAR win9x_font_reg_key[] = u"Software\\Microsoft\\Windows\\CurrentVersion\\Fonts"; +static const WCHAR winnt_font_reg_key[] = u"Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"; +static const WCHAR system_fonts_reg_key[] = u"Software\\Fonts"; +static const WCHAR FixedSys_Value[] = u"FIXEDFON.FON"; +static const WCHAR System_Value[] = u"FONTS.FON"; +static const WCHAR OEMFont_Value[] = u"OEMFONT.FON"; static const WCHAR * const SystemFontValues[] = { System_Value, @@ -507,29 +499,27 @@ static const WCHAR * const SystemFontValues[] = { NULL }; -static const WCHAR external_fonts_reg_key[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\', - 'F','o','n','t','s','\\','E','x','t','e','r','n','a','l',' ','F','o','n','t','s','\0'}; +static const WCHAR external_fonts_reg_key[] = u"Software\\Wine\\Fonts\\External Fonts"; /* Interesting and well-known (frequently-assumed!) font names */ -static const WCHAR Lucida_Sans_Unicode[] = {'L','u','c','i','d','a',' ','S','a','n','s',' ','U','n','i','c','o','d','e',0}; -static const WCHAR Microsoft_Sans_Serif[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0 }; -static const WCHAR Tahoma[] = {'T','a','h','o','m','a',0}; -static const WCHAR MS_UI_Gothic[] = {'M','S',' ','U','I',' ','G','o','t','h','i','c',0}; -static const WCHAR SimSun[] = {'S','i','m','S','u','n',0}; -static const WCHAR Gulim[] = {'G','u','l','i','m',0}; -static const WCHAR PMingLiU[] = {'P','M','i','n','g','L','i','U',0}; -static const WCHAR Batang[] = {'B','a','t','a','n','g',0}; - -static const WCHAR arial[] = {'A','r','i','a','l',0}; -static const WCHAR bitstream_vera_sans[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',0}; -static const WCHAR bitstream_vera_sans_mono[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','a','n','s',' ','M','o','n','o',0}; -static const WCHAR bitstream_vera_serif[] = {'B','i','t','s','t','r','e','a','m',' ','V','e','r','a',' ','S','e','r','i','f',0}; -static const WCHAR courier_new[] = {'C','o','u','r','i','e','r',' ','N','e','w',0}; -static const WCHAR liberation_mono[] = {'L','i','b','e','r','a','t','i','o','n',' ','M','o','n','o',0}; -static const WCHAR liberation_sans[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','a','n','s',0}; -static const WCHAR liberation_serif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f',0}; -static const WCHAR times_new_roman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0}; -static const WCHAR SymbolW[] = {'S','y','m','b','o','l','\0'}; +static const WCHAR Lucida_Sans_Unicode[] = u"Lucida Sans Unicode"; +static const WCHAR Microsoft_Sans_Serif[] = u"Microsoft Sans Serif"; +static const WCHAR Tahoma[] = u"Tahoma"; +static const WCHAR MS_UI_Gothic[] = u"MS UI Gothic"; +static const WCHAR SimSun[] = u"SimSun"; +static const WCHAR Gulim[] = u"Gulim"; +static const WCHAR PMingLiU[] = u"PMingLiU"; +static const WCHAR Batang[] = u"Batang"; +static const WCHAR arial[] = u"Arial"; +static const WCHAR bitstream_vera_sans[] = u"Bitstream Vera Sans"; +static const WCHAR bitstream_vera_sans_mono[] = u"Bitstream Vera Sans Mono"; +static const WCHAR bitstream_vera_serif[] = u"Bitstream Vera Serif"; +static const WCHAR courier_new[] = u"Courier New"; +static const WCHAR liberation_mono[] = u"Liberation Mono"; +static const WCHAR liberation_sans[] = u"Liberation Sans"; +static const WCHAR liberation_serif[] = u"Liberation Serif"; +static const WCHAR times_new_roman[] = u"Times New Roman"; +static const WCHAR SymbolW[] = u"Symbol"; static const WCHAR *default_serif_list[] = { @@ -571,23 +561,22 @@ typedef struct tagFontSubst { } FontSubst; /* Registry font cache key and value names */ -static const WCHAR wine_fonts_key[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\', - 'F','o','n','t','s',0}; -static const WCHAR wine_fonts_cache_key[] = {'C','a','c','h','e',0}; -static const WCHAR english_name_value[] = {'E','n','g','l','i','s','h',' ','N','a','m','e',0}; -static const WCHAR face_index_value[] = {'I','n','d','e','x',0}; -static const WCHAR face_ntmflags_value[] = {'N','t','m','f','l','a','g','s',0}; -static const WCHAR face_version_value[] = {'V','e','r','s','i','o','n',0}; -static const WCHAR face_height_value[] = {'H','e','i','g','h','t',0}; -static const WCHAR face_width_value[] = {'W','i','d','t','h',0}; -static const WCHAR face_size_value[] = {'S','i','z','e',0}; -static const WCHAR face_x_ppem_value[] = {'X','p','p','e','m',0}; -static const WCHAR face_y_ppem_value[] = {'Y','p','p','e','m',0}; -static const WCHAR face_flags_value[] = {'F','l','a','g','s',0}; -static const WCHAR face_internal_leading_value[] = {'I','n','t','e','r','n','a','l',' ','L','e','a','d','i','n','g',0}; -static const WCHAR face_font_sig_value[] = {'F','o','n','t',' ','S','i','g','n','a','t','u','r','e',0}; -static const WCHAR face_file_name_value[] = {'F','i','l','e',' ','N','a','m','e','\0'}; -static const WCHAR face_full_name_value[] = {'F','u','l','l',' ','N','a','m','e','\0'}; +static const WCHAR wine_fonts_key[] = u"Software\\Wine\\Fonts"; +static const WCHAR wine_fonts_cache_key[] = u"Cache"; +static const WCHAR english_name_value[] = u"English Name"; +static const WCHAR face_index_value[] = u"Index"; +static const WCHAR face_ntmflags_value[] = u"Ntmflags"; +static const WCHAR face_version_value[] = u"Version"; +static const WCHAR face_height_value[] = u"Height"; +static const WCHAR face_width_value[] = u"Width"; +static const WCHAR face_size_value[] = u"Size"; +static const WCHAR face_x_ppem_value[] = u"Xppem"; +static const WCHAR face_y_ppem_value[] = u"Yppem"; +static const WCHAR face_flags_value[] = u"Flags"; +static const WCHAR face_internal_leading_value[] = u"Internal Leading"; +static const WCHAR face_font_sig_value[] = u"Font Signature"; +static const WCHAR face_file_name_value[] = u"File Name"; +static const WCHAR face_full_name_value[] = u"Full Name"; struct font_mapping @@ -615,9 +604,9 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION freetype_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; -static const WCHAR font_mutex_nameW[] = {'_','_','W','I','N','E','_','F','O','N','T','_','M','U','T','E','X','_','_','\0'}; +static const WCHAR font_mutex_nameW[] = u"__WINE_FONT_MUTEX__"; -static const WCHAR szDefaultFallbackLink[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}; +static const WCHAR szDefaultFallbackLink[] = u"Microsoft Sans Serif"; static BOOL use_default_fallback = FALSE; static BOOL get_glyph_index_linked(GdiFont *font, UINT c, GdiFont **linked_font, FT_UInt *glyph, BOOL *vert); @@ -626,10 +615,7 @@ static BOOL get_bitmap_text_metrics(GdiFont *font); static BOOL get_text_metrics(GdiFont *font, LPTEXTMETRICW ptm); static void remove_face_from_cache( Face *face ); -static const WCHAR system_link[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','F','o','n','t','L','i','n','k','\\', - 'S','y','s','t','e','m','L','i','n','k',0}; +static const WCHAR system_link[] = u"Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink"; /**************************************** * Notes on .fon files @@ -1835,7 +1821,7 @@ static void add_face_to_cache(Face *face) face_key_name = face->StyleName; else { - static const WCHAR fmtW[] = {'%','s','\\','%','d',0}; + static const WCHAR fmtW[] = u"%s\\%d"; face_key_name = HeapAlloc(GetProcessHeap(), 0, (strlenW(face->StyleName) + 10) * sizeof(WCHAR)); sprintfW(face_key_name, fmtW, face->StyleName, face->size.y_ppem); } @@ -1882,7 +1868,7 @@ static void remove_face_from_cache( Face *face ) } else { - static const WCHAR fmtW[] = {'%','s','\\','%','d',0}; + static const WCHAR fmtW[] = u"%s\\%d"; WCHAR *face_key_name = HeapAlloc(GetProcessHeap(), 0, (strlenW(face->StyleName) + 10) * sizeof(WCHAR)); sprintfW(face_key_name, fmtW, face->StyleName, face->size.y_ppem); RegDeleteKeyW( hkey_family, face_key_name ); @@ -2576,9 +2562,9 @@ static void init_system_links(void) WCHAR *entry, *next; SYSTEM_LINKS *font_link, *system_font_link; CHILD_FONT *child_font; - static const WCHAR tahoma_ttf[] = {'t','a','h','o','m','a','.','t','t','f',0}; - static const WCHAR System[] = {'S','y','s','t','e','m',0}; - static const WCHAR MS_Shell_Dlg[] = {'M','S',' ','S','h','e','l','l',' ','D','l','g',0}; + static const WCHAR tahoma_ttf[] = u"tahoma.ttf"; + static const WCHAR System[] = u"System"; + static const WCHAR MS_Shell_Dlg[] = u"MS Shell Dlg"; Face *face; FontSubst *psub; UINT i, j; @@ -3067,7 +3053,7 @@ static BOOL load_font_from_data_dir(LPCWSTR file) static char *get_winfonts_dir_path(LPCWSTR file) { - static const WCHAR slashW[] = {'\\','\0'}; + static const WCHAR slashW[] = u"\\"; WCHAR windowsdir[MAX_PATH]; GetWindowsDirectoryW(windowsdir, ARRAY_SIZE(windowsdir)); @@ -3083,7 +3069,7 @@ static void load_system_fonts(void) WCHAR data[MAX_PATH], windowsdir[MAX_PATH], pathW[MAX_PATH]; const WCHAR * const *value; DWORD dlen, type; - static const WCHAR fmtW[] = {'%','s','\\','%','s','\0'}; + static const WCHAR fmtW[] = u"%s\\%s"; char *unixname; if(RegOpenKeyW(HKEY_CURRENT_CONFIG, system_fonts_reg_key, &hkey) == ERROR_SUCCESS) { @@ -3123,7 +3109,7 @@ static void update_reg_entries(void) Family *family; Face *face; WCHAR *file, *path; - static const WCHAR TrueType[] = {' ','(','T','r','u','e','T','y','p','e',')','\0'}; + static const WCHAR TrueType[] = u" (TrueType)"; if(RegCreateKeyExW(HKEY_LOCAL_MACHINE, winnt_font_reg_key, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &winnt_key, NULL) != ERROR_SUCCESS) { @@ -3931,35 +3917,15 @@ static void set_multi_value_key(HKEY hkey, const WCHAR *name, const WCHAR *value static void update_font_system_link_info(UINT current_ansi_codepage) { static const WCHAR system_link_simplified_chinese[] = - {'S','I','M','S','U','N','.','T','T','C',',','S','i','m','S','u','n','\0', - 'M','I','N','G','L','I','U','.','T','T','C',',','P','M','i','n','g','L','i','u','\0', - 'M','S','G','O','T','H','I','C','.','T','T','C',',','M','S',' ','U','I',' ','G','o','t','h','i','c','\0', - 'B','A','T','A','N','G','.','T','T','C',',','B','a','t','a','n','g','\0', - '\0'}; + u"SIMSUN.TTC,SimSun\0MINGLIU.TTC,PMingLiu\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang\0"; static const WCHAR system_link_traditional_chinese[] = - {'M','I','N','G','L','I','U','.','T','T','C',',','P','M','i','n','g','L','i','u','\0', - 'S','I','M','S','U','N','.','T','T','C',',','S','i','m','S','u','n','\0', - 'M','S','G','O','T','H','I','C','.','T','T','C',',','M','S',' ','U','I',' ','G','o','t','h','i','c','\0', - 'B','A','T','A','N','G','.','T','T','C',',','B','a','t','a','n','g','\0', - '\0'}; + u"MINGLIU.TTC,PMingLiu\0SIMSUN.TTC,SimSun\0MSGOTHIC.TTC,MS UI Gothic\0BATANG.TTC,Batang\0"; static const WCHAR system_link_japanese[] = - {'M','S','G','O','T','H','I','C','.','T','T','C',',','M','S',' ','U','I',' ','G','o','t','h','i','c','\0', - 'M','I','N','G','L','I','U','.','T','T','C',',','P','M','i','n','g','L','i','U','\0', - 'S','I','M','S','U','N','.','T','T','C',',','S','i','m','S','u','n','\0', - 'G','U','L','I','M','.','T','T','C',',','G','u','l','i','m','\0', - '\0'}; + u"MSGOTHIC.TTC,MS UI Gothic\0MINGLIU.TTC,PMingLiU\0SIMSUN.TTC,SimSun\0GULIM.TTC,Gulim\0"; static const WCHAR system_link_korean[] = - {'G','U','L','I','M','.','T','T','C',',','G','u','l','i','m','\0', - 'M','S','G','O','T','H','I','C','.','T','T','C',',','M','S',' ','U','I',' ','G','o','t','h','i','c','\0', - 'M','I','N','G','L','I','U','.','T','T','C',',','P','M','i','n','g','L','i','U','\0', - 'S','I','M','S','U','N','.','T','T','C',',','S','i','m','S','u','n','\0', - '\0'}; + u"GULIM.TTC,Gulim\0MSGOTHIC.TTC,MS UI Gothic\0MINGLIU.TTC,PMingLiU\0SIMSUN.TTC,SimSun\0"; static const WCHAR system_link_non_cjk[] = - {'M','S','G','O','T','H','I','C','.','T','T','C',',','M','S',' ','U','I',' ','G','o','t','h','i','c','\0', - 'M','I','N','G','L','I','U','.','T','T','C',',','P','M','i','n','g','L','i','U','\0', - 'S','I','M','S','U','N','.','T','T','C',',','S','i','m','S','u','n','\0', - 'G','U','L','I','M','.','T','T','C',',','G','u','l','i','m','\0', - '\0'}; + u"MSGOTHIC.TTC,MS UI Gothic\0MINGLIU.TTC,PMingLiU\0SIMSUN.TTC,SimSun\0GULIM.TTC,Gulim\0"; HKEY hkey; if (RegCreateKeyW(HKEY_LOCAL_MACHINE, system_link, &hkey) == ERROR_SUCCESS) @@ -3998,7 +3964,7 @@ static void update_font_system_link_info(UINT current_ansi_codepage) static void update_font_info(void) { - static const WCHAR logpixels[] = { 'L','o','g','P','i','x','e','l','s',0 }; + static const WCHAR logpixels[] = u"LogPixels"; char buf[40], cpbuf[40]; DWORD len, type; HKEY hkey = 0; @@ -4199,8 +4165,8 @@ sym_not_found: static void init_font_list(void) { - static const WCHAR dot_fonW[] = {'.','f','o','n','\0'}; - static const WCHAR pathW[] = {'P','a','t','h',0}; + static const WCHAR dot_fonW[] = u".fon"; + static const WCHAR pathW[] = u"Path"; HKEY hkey; DWORD valuelen, datalen, i = 0, type, dlen, vlen; WCHAR windowsdir[MAX_PATH]; @@ -4260,7 +4226,7 @@ static void init_font_list(void) else if(dlen / 2 >= 6 && !strcmpiW(data + dlen / 2 - 5, dot_fonW)) { WCHAR pathW[MAX_PATH]; - static const WCHAR fmtW[] = {'%','s','\\','%','s','\0'}; + static const WCHAR fmtW[] = u"%s\\%s"; BOOL added = FALSE; sprintfW(pathW, fmtW, windowsdir, data); @@ -4391,9 +4357,8 @@ BOOL WineEngInit(void) if (!RegOpenKeyExW(HKEY_CURRENT_USER, wine_fonts_key, 0, KEY_READ, &hkey)) { - static const WCHAR antialias_fake_bold_or_italic[] = { 'A','n','t','i','a','l','i','a','s','F','a','k','e', - 'B','o','l','d','O','r','I','t','a','l','i','c',0 }; - static const WCHAR true_options[] = { 'y','Y','t','T','1',0 }; + static const WCHAR antialias_fake_bold_or_italic[] = u"AntialiasFakeBoldOrItalic"; + static const WCHAR true_options[] = u"yYtT1"; DWORD type, size; WCHAR buffer[20]; @@ -7934,7 +7899,7 @@ static BOOL get_outline_text_metrics(GdiFont *font) full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); if (!full_nameW) { - static const WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; + static const WCHAR fake_nameW[] = u"fake name"; FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w(font->name)); full_nameW = strdupW(fake_nameW); } diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index 083a504569..0daa426111 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -128,17 +128,15 @@ static CRITICAL_SECTION gdi_section = { &critsect_debug, -1, 0, 0, 0, 0 }; static const LOGFONTW OEMFixedFont = { 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, {'\0'} }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, u""}; static const LOGFONTW AnsiFixedFont = { 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, u"Courier"}; static const LOGFONTW AnsiVarFont = { 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'} }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, u"MS Sans Serif"}; /****************************************************************************** * @@ -173,308 +171,308 @@ static const struct DefaultFontInfo default_fonts[] = { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { EASTEUROPE_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, EASTEUROPE_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { RUSSIAN_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, RUSSIAN_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, RUSSIAN_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, RUSSIAN_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, RUSSIAN_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { GREEK_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GREEK_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GREEK_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GREEK_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GREEK_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { TURKISH_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, TURKISH_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, TURKISH_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, TURKISH_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, TURKISH_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { HEBREW_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, HEBREW_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, HEBREW_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HEBREW_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HEBREW_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { ARABIC_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ARABIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, ARABIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ARABIC_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ARABIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { BALTIC_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, BALTIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, BALTIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, BALTIC_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, BALTIC_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { THAI_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, THAI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, THAI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, THAI_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, THAI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { SHIFTJIS_CHARSET, { /* System */ 18, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { GB2312_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GB2312_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, GB2312_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GB2312_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, GB2312_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { HANGEUL_CHARSET, { /* System */ 16, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, HANGEUL_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { CHINESEBIG5_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, CHINESEBIG5_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, { JOHAB_CHARSET, { /* System */ 16, 7, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, JOHAB_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* Device Default */ 16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, JOHAB_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'S','y','s','t','e','m','\0'} + u"System" }, { /* System Fixed */ 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, JOHAB_CHARSET, 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, - {'C','o','u','r','i','e','r','\0'} + u"Courier" }, { /* DefaultGuiFont */ -12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, JOHAB_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - {'M','S',' ','S','h','e','l','l',' ','D','l','g','\0'} + u"MS Shell Dlg" }, }, }; @@ -598,9 +596,9 @@ BOOL GDI_dec_ref_count( HGDIOBJ handle ) return entry != NULL; } -static const WCHAR dpi_key_name[] = {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p','\0'}; -static const WCHAR def_dpi_key_name[] = {'S','o','f','t','w','a','r','e','\\','F','o','n','t','s','\0'}; -static const WCHAR dpi_value_name[] = {'L','o','g','P','i','x','e','l','s','\0'}; +static const WCHAR dpi_key_name[] = u"Control Panel\\Desktop"; +static const WCHAR def_dpi_key_name[] = u"Software\\Fonts"; +static const WCHAR dpi_value_name[] = u"LogPixels"; /****************************************************************************** * get_reg_dword @@ -653,7 +651,7 @@ DWORD get_system_dpi(void) if (!pGetDpiForSystem) { - static const WCHAR user32W[] = {'u','s','e','r','3','2','.','d','l','l',0}; + static const WCHAR user32W[] = u"user32.dll"; HMODULE user = GetModuleHandleW( user32W ); if (user) pGetDpiForSystem = (void *)GetProcAddress( user, "GetDpiForSystem" ); } diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c index 578737994a..dd23538b82 100644 --- a/dlls/gdi32/opengl.c +++ b/dlls/gdi32/opengl.c @@ -36,7 +36,7 @@ #include "gdi_private.h" -static const WCHAR opengl32W[] = {'o','p','e','n','g','l','3','2','.','d','l','l',0}; +static const WCHAR opengl32W[] = u"opengl32.dll"; static HMODULE opengl32; static INT (WINAPI *wglChoosePixelFormat)(HDC,const PIXELFORMATDESCRIPTOR *); static INT (WINAPI *wglDescribePixelFormat)(HDC,INT,UINT,PIXELFORMATDESCRIPTOR*); diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index cad6428dc9..b2c3882ad9 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -1437,7 +1437,7 @@ INT mirror_region( HRGN dst, HRGN src, INT width ) */ BOOL WINAPI MirrorRgn( HWND hwnd, HRGN hrgn ) { - static const WCHAR user32W[] = {'u','s','e','r','3','2','.','d','l','l',0}; + static const WCHAR user32W[] = u"user32.dll"; static BOOL (WINAPI *pGetWindowRect)( HWND hwnd, LPRECT rect ); RECT rect; -- 2.20.1