From 5f88f362ea74f3355fb497cd1c228119281f9f38 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Tue, 20 Dec 2011 09:12:07 +0100 Subject: [PATCH] dlls: Standardize on 'static const WCHAR' for our Unicode string literals. Do the same for the corresponding Ansi strings. --- dlls/qedit/samplegrabber.c | 6 ++--- dlls/quartz/filesource.c | 4 ++-- dlls/quartz/regsvr.c | 34 +++++++++++++-------------- dlls/strmbase/dllfunc.c | 8 +++---- dlls/windowscodecs/info.c | 8 +++---- dlls/windowscodecs/regsvr.c | 46 ++++++++++++++++++------------------- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index c22c6ce8951..2d15ca34877 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -32,9 +32,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); -static WCHAR const vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; -static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; -static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; +static const WCHAR vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; +static const WCHAR pin_in_name[] = { 'I', 'n', 0 }; +static const WCHAR pin_out_name[] = { 'O', 'u', 't', 0 }; static IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); static IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype); diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 6d3e554a5ad..79c70a494c2 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -60,9 +60,9 @@ static inline AsyncReader *impl_from_IFileSourceFilter( IFileSourceFilter *iface return (AsyncReader *)((char*)iface - FIELD_OFFSET(AsyncReader, lpVtblFSF)); } -static WCHAR const mediatype_name[] = { +static const WCHAR mediatype_name[] = { 'M', 'e', 'd', 'i', 'a', ' ', 'T', 'y', 'p', 'e', 0 }; -static WCHAR const subtype_name[] = { +static const WCHAR subtype_name[] = { 'S', 'u', 'b', 't', 'y', 'p', 'e', 0 }; static HRESULT process_extensions(HKEY hkeyExtensions, LPCOLESTR pszFileName, GUID * majorType, GUID * minorType) diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index db5428e8023..2bf139ef801 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -124,43 +124,43 @@ static HRESULT unregister_filters(struct regsvr_filter const *list); /*********************************************************************** * static string constants */ -static WCHAR const interface_keyname[] = { +static const WCHAR interface_keyname[] = { 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[] = { +static const WCHAR base_ifa_keyname[] = { 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const num_methods_keyname[] = { +static const WCHAR num_methods_keyname[] = { 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[] = { +static const WCHAR ps_clsid_keyname[] = { 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[] = { +static const WCHAR ps_clsid32_keyname[] = { 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[] = { +static const WCHAR clsid_keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[] = { +static const WCHAR curver_keyname[] = { 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[] = { +static const WCHAR ips_keyname[] = { 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', 0 }; -static WCHAR const ips32_keyname[] = { +static const WCHAR ips32_keyname[] = { 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', '3', '2', 0 }; -static WCHAR const progid_keyname[] = { +static const WCHAR progid_keyname[] = { 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[] = { +static const WCHAR viprogid_keyname[] = { 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; -static WCHAR const mediatype_name[] = { +static const char tmodel_valuename[] = "ThreadingModel"; +static const WCHAR mediatype_name[] = { 'M', 'e', 'd', 'i', 'a', ' ', 'T', 'y', 'p', 'e', 0 }; -static WCHAR const subtype_valuename[] = { +static const WCHAR subtype_valuename[] = { 'S', 'u', 'b', 't', 'y', 'p', 'e', 0 }; -static WCHAR const sourcefilter_valuename[] = { +static const WCHAR sourcefilter_valuename[] = { 'S', 'o', 'u', 'r', 'c', 'e', ' ', 'F', 'i', 'l', 't', 'e', 'r', 0 }; -static WCHAR const extensions_keyname[] = { +static const WCHAR extensions_keyname[] = { 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', 0 }; /*********************************************************************** @@ -209,7 +209,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list) } if (0 <= list->num_methods) { - static WCHAR const fmt[] = { '%', 'd', 0 }; + static const WCHAR fmt[] = { '%', 'd', 0 }; HKEY key; res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, diff --git a/dlls/strmbase/dllfunc.c b/dlls/strmbase/dllfunc.c index 41d8b6bafb9..44b115ee1b6 100644 --- a/dlls/strmbase/dllfunc.c +++ b/dlls/strmbase/dllfunc.c @@ -53,10 +53,10 @@ static LONG server_locks = 0; */ #define MAX_KEY_LEN 260 -static WCHAR const clsid_keyname[] = {'C','L','S','I','D',0 }; -static WCHAR const ips32_keyname[] = {'I','n','P','r','o','c','S','e','r','v','e','r','3','2',0}; -static WCHAR const tmodel_keyname[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0}; -static WCHAR const tmodel_both[] = {'B','o','t','h',0}; +static const WCHAR clsid_keyname[] = {'C','L','S','I','D',0 }; +static const WCHAR ips32_keyname[] = {'I','n','P','r','o','c','S','e','r','v','e','r','3','2',0}; +static const WCHAR tmodel_keyname[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0}; +static const WCHAR tmodel_both[] = {'B','o','t','h',0}; /* * SetupRegisterClass() diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index a90e75021ac..50b520fb658 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -36,8 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); -static WCHAR const mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0}; -static WCHAR const pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; +static const WCHAR mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0}; +static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size) @@ -975,8 +975,8 @@ static HRESULT FormatConverterInfo_Constructor(HKEY classkey, REFCLSID clsid, IW return S_OK; } -static WCHAR const clsid_keyname[] = {'C','L','S','I','D',0}; -static WCHAR const instance_keyname[] = {'I','n','s','t','a','n','c','e',0}; +static const WCHAR clsid_keyname[] = {'C','L','S','I','D',0}; +static const WCHAR instance_keyname[] = {'I','n','s','t','a','n','c','e',0}; struct category { WICComponentType type; diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index 9b7baeac425..5bb4854ebd5 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -99,39 +99,39 @@ static HRESULT unregister_converters(struct regsvr_converter const *list); /*********************************************************************** * static string constants */ -static WCHAR const clsid_keyname[] = { +static const WCHAR clsid_keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[] = { +static const WCHAR curver_keyname[] = { 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[] = { +static const WCHAR ips_keyname[] = { 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', 0 }; -static WCHAR const ips32_keyname[] = { +static const WCHAR ips32_keyname[] = { 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', '3', '2', 0 }; -static WCHAR const progid_keyname[] = { +static const WCHAR progid_keyname[] = { 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[] = { +static const WCHAR viprogid_keyname[] = { 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; -static char const author_valuename[] = "Author"; -static char const friendlyname_valuename[] = "FriendlyName"; -static WCHAR const vendor_valuename[] = {'V','e','n','d','o','r',0}; -static char const version_valuename[] = "Version"; -static char const mimetypes_valuename[] = "MimeTypes"; -static char const extensions_valuename[] = "FileExtensions"; -static WCHAR const formats_keyname[] = {'F','o','r','m','a','t','s',0}; -static WCHAR const patterns_keyname[] = {'P','a','t','t','e','r','n','s',0}; -static WCHAR const instance_keyname[] = {'I','n','s','t','a','n','c','e',0}; -static WCHAR const clsid_valuename[] = {'C','L','S','I','D',0}; -static char const length_valuename[] = "Length"; -static char const position_valuename[] = "Position"; -static char const pattern_valuename[] = "Pattern"; -static char const mask_valuename[] = "Mask"; -static char const endofstream_valuename[] = "EndOfStream"; -static WCHAR const pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; +static const char tmodel_valuename[] = "ThreadingModel"; +static const char author_valuename[] = "Author"; +static const char friendlyname_valuename[] = "FriendlyName"; +static const WCHAR vendor_valuename[] = {'V','e','n','d','o','r',0}; +static const char version_valuename[] = "Version"; +static const char mimetypes_valuename[] = "MimeTypes"; +static const char extensions_valuename[] = "FileExtensions"; +static const WCHAR formats_keyname[] = {'F','o','r','m','a','t','s',0}; +static const WCHAR patterns_keyname[] = {'P','a','t','t','e','r','n','s',0}; +static const WCHAR instance_keyname[] = {'I','n','s','t','a','n','c','e',0}; +static const WCHAR clsid_valuename[] = {'C','L','S','I','D',0}; +static const char length_valuename[] = "Length"; +static const char position_valuename[] = "Position"; +static const char pattern_valuename[] = "Pattern"; +static const char mask_valuename[] = "Mask"; +static const char endofstream_valuename[] = "EndOfStream"; +static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; /*********************************************************************** * register_decoders