Commit 57a579ff authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Make more arrays const.

parent 2d3bd3e4
......@@ -25,7 +25,7 @@
static HWND hComboExParentWnd;
static HINSTANCE hMainHinst;
static char ComboExTestClass[] = "ComboExTestClass";
static const char ComboExTestClass[] = "ComboExTestClass";
#define MAX_CHARS 100
static char *textBuffer = NULL;
......@@ -73,11 +73,11 @@ static void test_comboboxex() {
LONG res = -1;
COMBOBOXEXITEM cbexItem;
#define FIRST_ITEM "First Item"
#define SECOND_ITEM "Second Item"
#define THIRD_ITEM "Third Item"
#define MIDDLE_ITEM "Between First and Second Items"
#define REPLACEMENT_ITEM "Between First and Second Items"
#define FIRST_ITEM "First Item"
#define SECOND_ITEM "Second Item"
#define THIRD_ITEM "Third Item"
#define MIDDLE_ITEM "Between First and Second Items"
#define REPLACEMENT_ITEM "Between First and Second Items"
/* Allocate space for result */
textBuffer = malloc(MAX_CHARS);
......
......@@ -30,7 +30,7 @@
HWND hProgressParentWnd, hProgressWnd;
static char progressTestClass[] = "ProgressBarTestClass";
static const char progressTestClass[] = "ProgressBarTestClass";
LRESULT CALLBACK ProgressTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
......
......@@ -1285,7 +1285,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR DecoratedName, LPSTR UnDecoratedName,
{
/* undocumented from msvcrt */
static char* (*p_undname)(char*, const char*, int, void* (*)(size_t), void (*)(void*), unsigned short);
static WCHAR szMsvcrt[] = {'m','s','v','c','r','t','.','d','l','l',0};
static const WCHAR szMsvcrt[] = {'m','s','v','c','r','t','.','d','l','l',0};
TRACE("(%s, %p, %ld, 0x%08lx)\n",
debugstr_a(DecoratedName), UnDecoratedName, UndecoratedLength, Flags);
......
......@@ -2207,7 +2207,7 @@ BOOL WINAPI GetCommProperties(
* The DLL should be loaded when the COMM port is opened, and closed
* when the COMM port is closed. - MJM 20 June 2000
***********************************************************************/
static WCHAR lpszSerialUI[] = {
static const WCHAR lpszSerialUI[] = {
's','e','r','i','a','l','u','i','.','d','l','l',0 };
......
......@@ -171,8 +171,8 @@ int decode_header(struct frame *fr,unsigned long newhead)
#if 0
void print_header(struct frame *fr)
{
static char *modes[4] = { "Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel" };
static char *layers[4] = { "Unknown" , "I", "II", "III" };
static const char * const modes[4] = { "Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel" };
static const char * const layers[4] = { "Unknown" , "I", "II", "III" };
fprintf(stderr,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n",
fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"),
......@@ -188,8 +188,8 @@ void print_header(struct frame *fr)
void print_header_compact(struct frame *fr)
{
static char *modes[4] = { "stereo", "joint-stereo", "dual-channel", "mono" };
static char *layers[4] = { "Unknown" , "I", "II", "III" };
static const char * const modes[4] = { "stereo", "joint-stereo", "dual-channel", "mono" };
static const char * const layers[4] = { "Unknown" , "I", "II", "III" };
fprintf(stderr,"MPEG %s layer %s, %d kbit/s, %ld Hz %s\n",
fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"),
......
......@@ -493,7 +493,7 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
static void msi_dialog_map_events(msi_dialog* dialog, LPCWSTR control)
{
static WCHAR Query[] = {
static const WCHAR Query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','E','v','e','n','t','M','a','p','p','i','n','g','`',' ',
'W','H','E','R','E',' ',
......
......@@ -850,8 +850,8 @@ LPWSTR create_component_advertise_string(MSIPACKAGE* package,
* Ok it appears that the > is used if there is a guid for the compoenent
* and the < is used if not.
*/
static WCHAR fmt1[] = {'%','s','%','s','<',0,0};
static WCHAR fmt2[] = {'%','s','%','s','>','%','s',0,0};
static const WCHAR fmt1[] = {'%','s','%','s','<',0,0};
static const WCHAR fmt2[] = {'%','s','%','s','>','%','s',0,0};
LPWSTR output = NULL;
DWORD sz = 0;
......
......@@ -104,7 +104,7 @@ NTSTATUS WINAPI RtlDeleteAtomFromAtomTable( RTL_ATOM_TABLE table, RTL_ATOM atom
*/
static ULONG integral_atom_name(WCHAR* buffer, ULONG len, RTL_ATOM atom)
{
static WCHAR fmt[] = {'#','%','u',0};
static const WCHAR fmt[] = {'#','%','u',0};
WCHAR tmp[16];
int ret;
......
......@@ -446,8 +446,8 @@ void WINAPI SetOaNoCache(void)
BSTR_bCache = FALSE;
}
static WCHAR _delimiter[2] = {'!',0}; /* default delimiter apparently */
static WCHAR *pdelimiter = &_delimiter[0];
static const WCHAR _delimiter[2] = {'!',0}; /* default delimiter apparently */
static const WCHAR *pdelimiter = &_delimiter[0];
/***********************************************************************
* RegisterActiveObject (OLEAUT32.33)
......
......@@ -67,7 +67,7 @@ static void test_TypeComp(void)
DESCKIND desckind;
BINDPTR bindptr;
ITypeInfo *pTypeInfo;
static WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
static WCHAR wszStdFunctions[] = {'S','t','d','F','u','n','c','t','i','o','n','s',0};
static WCHAR wszSavePicture[] = {'S','a','v','e','P','i','c','t','u','r','e',0};
static WCHAR wszOLE_TRISTATE[] = {'O','L','E','_','T','R','I','S','T','A','T','E',0};
......
......@@ -312,7 +312,7 @@ void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor,
ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars);
}
static WCHAR wszSpace[] = {' ', 0};
static const WCHAR wszSpace[] = {' ', 0};
/* FIXME this is temporary, just to have something to test how bad graphics handler is */
void ME_InsertGraphicsFromCursor(ME_TextEditor *editor, int nCursor)
......
......@@ -988,10 +988,10 @@ void ME_DestroyEditor(ME_TextEditor *editor)
FREE_OBJ(editor);
}
static WCHAR wszClassName[] = {'R', 'i', 'c', 'h', 'E', 'd', 'i', 't', '2', '0', 'W', 0};
static WCHAR wszClassName50[] = {'R', 'i', 'c', 'h', 'E', 'd', 'i', 't', '5', '0', 'W', 0};
static WCHAR wszClassNameListBox[] = {'R','E','L','i','s','t','B','o','x','2','0','W', 0};
static WCHAR wszClassNameComboBox[] = {'R','E','C','o','m','b','o','B','o','x','2','0','W', 0};
static const WCHAR wszClassName[] = {'R', 'i', 'c', 'h', 'E', 'd', 'i', 't', '2', '0', 'W', 0};
static const WCHAR wszClassName50[] = {'R', 'i', 'c', 'h', 'E', 'd', 'i', 't', '5', '0', 'W', 0};
static const WCHAR wszClassNameListBox[] = {'R','E','L','i','s','t','B','o','x','2','0','W', 0};
static const WCHAR wszClassNameComboBox[] = {'R','E','C','o','m','b','o','B','o','x','2','0','W', 0};
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
......
......@@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
static WCHAR wszParagraphSign[] = {0xB6, 0};
static const WCHAR wszParagraphSign[] = {0xB6, 0};
void ME_MakeFirstParagraph(HDC hDC, ME_TextBuffer *text)
{
......
......@@ -391,7 +391,7 @@ static SECURITY_STATUS SEC_ENTRY nego_VerifySignature(PCtxtHandle phContext,
static SecurityFunctionTableA negoTableA = {
static const SecurityFunctionTableA negoTableA = {
1,
NULL, /* EnumerateSecurityPackagesA */
nego_QueryCredentialsAttributesA, /* QueryCredentialsAttributesA */
......@@ -422,7 +422,7 @@ static SecurityFunctionTableA negoTableA = {
NULL, /* SetContextAttributesA */
};
static SecurityFunctionTableW negoTableW = {
static const SecurityFunctionTableW negoTableW = {
1,
NULL, /* EnumerateSecurityPackagesW */
nego_QueryCredentialsAttributesW, /* QueryCredentialsAttributesW */
......@@ -481,11 +481,10 @@ void SECUR32_initNegotiateSP(void)
static const USHORT version = 1;
static const USHORT rpcid = 15;
static const ULONG max_token = 12000;
const SecPkgInfoW infoW = { caps, version, rpcid, max_token, nego_name_W,
const SecPkgInfoW infoW = { caps, version, rpcid, max_token, nego_name_W,
negotiate_comment_W};
const SecPkgInfoA infoA = { caps, version, rpcid, max_token, nego_name_A,
negotiate_comment_A};
SECUR32_addPackages(provider, 1L, &infoA, &infoW);
}
......@@ -222,8 +222,8 @@ PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str)
}
static void _makeFnTableA(PSecurityFunctionTableA fnTableA,
const PSecurityFunctionTableA inFnTableA,
const PSecurityFunctionTableW inFnTableW)
const SecurityFunctionTableA *inFnTableA,
const SecurityFunctionTableW *inFnTableW)
{
if (fnTableA)
{
......@@ -293,8 +293,8 @@ static void _makeFnTableA(PSecurityFunctionTableA fnTableA,
}
static void _makeFnTableW(PSecurityFunctionTableW fnTableW,
const PSecurityFunctionTableA inFnTableA,
const PSecurityFunctionTableW inFnTableW)
const SecurityFunctionTableA *inFnTableA,
const SecurityFunctionTableW *inFnTableW)
{
if (fnTableW)
{
......@@ -385,8 +385,8 @@ static void _copyPackageInfo(PSecPkgInfoW info, const SecPkgInfoA *inInfoA,
}
}
SecureProvider *SECUR32_addProvider(PSecurityFunctionTableA fnTableA,
PSecurityFunctionTableW fnTableW, PWSTR moduleName)
SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA,
const SecurityFunctionTableW *fnTableW, const PWSTR moduleName)
{
SecureProvider *ret;
......
......@@ -78,8 +78,8 @@ typedef struct _NegoHelper {
* Otherwise moduleName must not be NULL.
* Returns a pointer to the stored provider entry, for use adding packages.
*/
SecureProvider *SECUR32_addProvider(PSecurityFunctionTableA fnTableA,
PSecurityFunctionTableW fnTableW, PWSTR moduleName);
SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA,
const SecurityFunctionTableW *fnTableW, const PWSTR moduleName);
/* Allocates space for and adds toAdd packages with the given provider.
* provider must not be NULL, and either infoA or infoW may be NULL, but not
......
......@@ -259,7 +259,7 @@ static void Binding_FinishedDownload(Binding *This, HRESULT hr)
0, NULL);
if (!pwchError)
{
static WCHAR achFormat[] = { '%', '0', '8', 'x', 0 };
static const WCHAR achFormat[] = { '%', '0', '8', 'x', 0 };
pwchError =(WCHAR *) LocalAlloc(LMEM_FIXED, sizeof(WCHAR) * 9);
wsprintfW(pwchError, achFormat, hr);
......
......@@ -40,9 +40,9 @@ static struct edit_notify notifications;
static HINSTANCE hinst;
static HWND hwndET2;
static char szEditTest2Class[] = "EditTest2Class";
static char szEditTest3Class[] = "EditTest3Class";
static char szEditTextPositionClass[] = "EditTextPositionWindowClass";
static const char szEditTest2Class[] = "EditTest2Class";
static const char szEditTest3Class[] = "EditTest3Class";
static const char szEditTextPositionClass[] = "EditTextPositionWindowClass";
static HWND create_editcontrol (DWORD style, DWORD exstyle)
{
......
......@@ -1350,7 +1350,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
}
} else if (!(wmd = MCI_GetDriver(mciGetDeviceIDW(dev)))) {
/* auto open */
static WCHAR wszOpenWait[] = {'o','p','e','n',' ','%','s',' ','w','a','i','t',0};
static const WCHAR wszOpenWait[] = {'o','p','e','n',' ','%','s',' ','w','a','i','t',0};
WCHAR buf[128];
sprintfW(buf, wszOpenWait, dev);
......
......@@ -147,8 +147,8 @@ int WINAPI WinMain(HINSTANCE hinstance,
PROCESS_INFORMATION info;
parameters_struct parameters;
BOOL rc;
static WCHAR winefile[] = {'w','i','n','e','f','i','l','e','.','e','x','e',0};
static WCHAR space[] = {' ',0};
static const WCHAR winefile[] = {'w','i','n','e','f','i','l','e','.','e','x','e',0};
static const WCHAR space[] = {' ',0};
LPWSTR winefile_commandline = NULL;
DWORD len = 0;
......
......@@ -74,25 +74,25 @@
* The 'Codepages' keyword is a wmc extension.
*/
static WCHAR ustr_application[] = { 'A', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 0 };
static WCHAR ustr_codepages[] = { 'C', 'o', 'd', 'e', 'p', 'a', 'g', 'e', 's', 0 };
static WCHAR ustr_english[] = { 'E', 'n', 'g', 'l', 'i', 's', 'h', 0 };
static WCHAR ustr_error[] = { 'E', 'r', 'r', 'o', 'r', 0 };
static WCHAR ustr_facility[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 0 };
static WCHAR ustr_facilitynames[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 };
static WCHAR ustr_informational[] = { 'I', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', 'a', 'l', 0 };
static WCHAR ustr_language[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 0};
static WCHAR ustr_languagenames[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'N', 'a', 'm', 'e', 's', 0};
static WCHAR ustr_messageid[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 0 };
static WCHAR ustr_messageidtypedef[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 'T', 'y', 'p', 'e', 'd', 'e', 'f', 0 };
static WCHAR ustr_outputbase[] = { 'O', 'u', 't', 'p', 'u', 't', 'B', 'a', 's', 'e', 0 };
static WCHAR ustr_severity[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 0 };
static WCHAR ustr_severitynames[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 };
static WCHAR ustr_success[] = { 'S', 'u', 'c', 'c', 'e', 's', 's', 0 };
static WCHAR ustr_symbolicname[] = { 'S', 'y', 'm', 'b', 'o', 'l', 'i', 'c', 'N', 'a', 'm', 'e', 0 };
static WCHAR ustr_system[] = { 'S', 'y', 's', 't', 'e', 'm', 0 };
static WCHAR ustr_warning[] = { 'W', 'a', 'r', 'n', 'i', 'n', 'g', 0 };
static WCHAR ustr_msg00001[] = { 'm', 's', 'g', '0', '0', '0', '0', '1', 0 };
static const WCHAR ustr_application[] = { 'A', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 0 };
static const WCHAR ustr_codepages[] = { 'C', 'o', 'd', 'e', 'p', 'a', 'g', 'e', 's', 0 };
static const WCHAR ustr_english[] = { 'E', 'n', 'g', 'l', 'i', 's', 'h', 0 };
static const WCHAR ustr_error[] = { 'E', 'r', 'r', 'o', 'r', 0 };
static const WCHAR ustr_facility[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 0 };
static const WCHAR ustr_facilitynames[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 };
static const WCHAR ustr_informational[] = { 'I', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', 'a', 'l', 0 };
static const WCHAR ustr_language[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 0};
static const WCHAR ustr_languagenames[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'N', 'a', 'm', 'e', 's', 0};
static const WCHAR ustr_messageid[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 0 };
static const WCHAR ustr_messageidtypedef[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 'T', 'y', 'p', 'e', 'd', 'e', 'f', 0 };
static const WCHAR ustr_outputbase[] = { 'O', 'u', 't', 'p', 'u', 't', 'B', 'a', 's', 'e', 0 };
static const WCHAR ustr_severity[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 0 };
static const WCHAR ustr_severitynames[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 };
static const WCHAR ustr_success[] = { 'S', 'u', 'c', 'c', 'e', 's', 's', 0 };
static const WCHAR ustr_symbolicname[] = { 'S', 'y', 'm', 'b', 'o', 'l', 'i', 'c', 'N', 'a', 'm', 'e', 0 };
static const WCHAR ustr_system[] = { 'S', 'y', 's', 't', 'e', 'm', 0 };
static const WCHAR ustr_warning[] = { 'W', 'a', 'r', 'n', 'i', 'n', 'g', 0 };
static const WCHAR ustr_msg00001[] = { 'm', 's', 'g', '0', '0', '0', '0', '1', 0 };
/*
* This table is to beat any form of "expression building" to check for
* correct filename characters. It is also used for ident checks.
......
......@@ -54,7 +54,7 @@
#define ENDIAN "little"
#endif
static char usage[] =
static const char usage[] =
"Usage: wrc [options...] [infile[.rc|.res]] [outfile]\n"
" -D id[=val] Define preprocessor identifier id=val\n"
" -E Preprocess only\n"
......
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