winemenubuilder: Avoid a couple of forward declarations.

This commit is contained in:
Francois Gouget 2015-03-16 17:44:39 +01:00 committed by Alexandre Julliard
parent 8fa8a23684
commit d4b9ac46a0
1 changed files with 22 additions and 24 deletions

View File

@ -195,8 +195,6 @@ static char *xdg_config_dir;
static char *xdg_data_dir;
static char *xdg_desktop_dir;
static WCHAR* assoc_query(ASSOCSTR assocStr, LPCWSTR name, LPCWSTR extra);
static HRESULT open_icon(LPCWSTR filename, int index, BOOL bWait, IStream **ppStream);
/* Utility routines */
static unsigned short crc16(const char* string)
@ -1004,6 +1002,28 @@ end:
return hr;
}
static WCHAR* assoc_query(ASSOCSTR assocStr, LPCWSTR name, LPCWSTR extra)
{
HRESULT hr;
WCHAR *value = NULL;
DWORD size = 0;
hr = AssocQueryStringW(0, assocStr, name, extra, NULL, &size);
if (SUCCEEDED(hr))
{
value = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
if (value)
{
hr = AssocQueryStringW(0, assocStr, name, extra, value, &size);
if (FAILED(hr))
{
HeapFree(GetProcessHeap(), 0, value);
value = NULL;
}
}
}
return value;
}
static HRESULT open_file_type_icon(LPCWSTR szFileName, IStream **ppStream)
{
static const WCHAR openW[] = {'o','p','e','n',0};
@ -1939,28 +1959,6 @@ static HRESULT get_cmdline( IShellLinkW *sl, LPWSTR szPath, DWORD pathSize,
return hr;
}
static WCHAR* assoc_query(ASSOCSTR assocStr, LPCWSTR name, LPCWSTR extra)
{
HRESULT hr;
WCHAR *value = NULL;
DWORD size = 0;
hr = AssocQueryStringW(0, assocStr, name, extra, NULL, &size);
if (SUCCEEDED(hr))
{
value = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
if (value)
{
hr = AssocQueryStringW(0, assocStr, name, extra, value, &size);
if (FAILED(hr))
{
HeapFree(GetProcessHeap(), 0, value);
value = NULL;
}
}
}
return value;
}
static char *slashes_to_minuses(const char *string)
{
int i;