Francois Gouget : winemenubuilder: Avoid a couple of forward declarations.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 17 11:01:58 CDT 2015
Module: wine
Branch: master
Commit: d4b9ac46a0a474d6f2cd3514db7ef07e7a3e6178
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4b9ac46a0a474d6f2cd3514db7ef07e7a3e6178
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Mar 16 17:44:39 2015 +0100
winemenubuilder: Avoid a couple of forward declarations.
---
programs/winemenubuilder/winemenubuilder.c | 46 ++++++++++++++----------------
1 file changed, 22 insertions(+), 24 deletions(-)
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index d902e93..2bdbdbf 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -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;
More information about the wine-cvs
mailing list