Commit 6b476208 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

shell32: Make some data static const.

parent 90f4ee83
......@@ -118,7 +118,7 @@ static LPWSTR RunDlg_GetParentDir(LPCWSTR cmdline)
{
const WCHAR *src;
WCHAR *dest, *result, *result_end=NULL;
static WCHAR dotexeW[] = {'.','e','x','e',0};
static const WCHAR dotexeW[] = {'.','e','x','e',0};
result = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(strlenW(cmdline)+5));
......
......@@ -2127,7 +2127,8 @@ static void _SHCreateSymbolicLinks(void)
{
UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEO, IDS_MYMUSIC }, i;
int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_MYMUSIC };
static const char * xdg_dirs[] = { "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
static const char * const xdg_dirs[] = { "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
static const unsigned int num = sizeof(xdg_dirs) / sizeof(xdg_dirs[0]);
WCHAR wszTempPath[MAX_PATH];
char szPersonalTarget[FILENAME_MAX], *pszPersonal;
char szMyStuffTarget[FILENAME_MAX], *pszMyStuff;
......@@ -2135,7 +2136,6 @@ static void _SHCreateSymbolicLinks(void)
struct stat statFolder;
const char *pszHome;
HRESULT hr;
const unsigned int num = sizeof(xdg_dirs) / sizeof(xdg_dirs[0]);
char ** xdg_results;
char * xdg_desktop_dir;
......
......@@ -781,7 +781,7 @@ static HRESULT get_xdg_config_file(char * home_dir, char ** config_file)
* [in/out] p_ptr - pointer to where we are in the buffer
* Returns the index to xdg_dirs if we find the key, or -1 on error.
*/
static int parse_config1(const char ** xdg_dirs, const unsigned int num_dirs, char ** p_ptr)
static int parse_config1(const char * const *xdg_dirs, const unsigned int num_dirs, char ** p_ptr)
{
char *p;
int i;
......@@ -884,7 +884,7 @@ static HRESULT parse_config2(char * p, const char * home_dir, char ** out_ptr)
* [in] num_dirs - number of elements in xdg_dirs
* [out] out_ptr - an array of the xdg directories names
*/
HRESULT XDG_UserDirLookup(const char ** xdg_dirs, const unsigned int num_dirs, char *** out_ptr)
HRESULT XDG_UserDirLookup(const char * const *xdg_dirs, const unsigned int num_dirs, char *** out_ptr)
{
FILE *file;
char **out;
......
......@@ -47,6 +47,6 @@ HRESULT TRASH_UnpackItemID(LPCSHITEMID id, TRASH_ELEMENT *element, WIN32_FIND_DA
HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count);
void TRASH_DisposeElement(TRASH_ELEMENT *element);
HRESULT XDG_UserDirLookup(const char ** xdg_dirs, const unsigned int num_dirs, char *** out_ptr);
HRESULT XDG_UserDirLookup(const char * const *xdg_dirs, const unsigned int num_dirs, char *** out_ptr);
#endif /* ndef __XDG_H__ */
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