Commit fe979931 authored by Alexandre Julliard's avatar Alexandre Julliard

winecfg: Build with msvcrt.

parent 01a2b9c6
......@@ -2,6 +2,8 @@ MODULE = winecfg.exe
APPMODE = -mwindows
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
about.c \
appdefaults.c \
......
......@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <assert.h>
#include "wine/heap.h"
#include "wine/unicode.h"
#include "winecfg.h"
#include "resource.h"
......@@ -337,7 +336,7 @@ static void on_add_app_click(HWND dialog)
ARRAY_SIZE(selectExecutableStr));
LoadStringW (GetModuleHandleW(NULL), IDS_EXECUTABLE_FILTER, programsFilter,
ARRAY_SIZE(programsFilter));
snprintfW( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
swprintf( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
ofn.lpstrTitle = selectExecutableStr;
ofn.lpstrFilter = filter;
......
......@@ -22,9 +22,6 @@
#define WIN32_LEAN_AND_MEAN
#define NONAMELESSUNION
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
......@@ -319,7 +316,7 @@ static void initAudioDlg (HWND hDlg)
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETITEMDATA,
i + 1, (LPARAM)&render_devs[i]);
if(reg_out_dev && !lstrcmpW(render_devs[i].id, reg_out_dev)){
if(reg_out_dev && !wcscmp(render_devs[i].id, reg_out_dev)){
SendDlgItemMessageW(hDlg, IDC_AUDIOOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
SendDlgItemMessageW(hDlg, IDC_SPEAKERCONFIG_SPEAKERS, CB_SETCURSEL, render_devs[i].speaker_config, 0);
}
......@@ -328,7 +325,7 @@ static void initAudioDlg (HWND hDlg)
0, (LPARAM)render_devs[i].name.pwszVal);
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETITEMDATA,
i + 1, (LPARAM)&render_devs[i]);
if(reg_vout_dev && !lstrcmpW(render_devs[i].id, reg_vout_dev))
if(reg_vout_dev && !wcscmp(render_devs[i].id, reg_vout_dev))
SendDlgItemMessageW(hDlg, IDC_VOICEOUT_DEVICE, CB_SETCURSEL, i + 1, 0);
lvitem.mask = LVIF_TEXT | LVIF_PARAM;
......@@ -360,14 +357,14 @@ static void initAudioDlg (HWND hDlg)
0, (LPARAM)capture_devs[i].name.pwszVal);
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETITEMDATA,
i + 1, (LPARAM)&capture_devs[i]);
if(reg_in_dev && !lstrcmpW(capture_devs[i].id, reg_in_dev))
if(reg_in_dev && !wcscmp(capture_devs[i].id, reg_in_dev))
SendDlgItemMessageW(hDlg, IDC_AUDIOIN_DEVICE, CB_SETCURSEL, i + 1, 0);
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_ADDSTRING,
0, (LPARAM)capture_devs[i].name.pwszVal);
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETITEMDATA,
i + 1, (LPARAM)&capture_devs[i]);
if(reg_vin_dev && !lstrcmpW(capture_devs[i].id, reg_vin_dev))
if(reg_vin_dev && !wcscmp(capture_devs[i].id, reg_vin_dev))
SendDlgItemMessageW(hDlg, IDC_VOICEIN_DEVICE, CB_SETCURSEL, i + 1, 0);
}
......
......@@ -21,9 +21,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
......
......@@ -33,7 +33,6 @@
#include <shlwapi.h>
#include <shlobj.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "winecfg.h"
......
......@@ -20,26 +20,16 @@
*
*/
#include "config.h"
#include "wine/port.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <commdlg.h>
#include <wine/debug.h>
#include <stdio.h>
#include <dirent.h>
#include <assert.h>
#include <stdlib.h>
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "winecfg.h"
#include "resource.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
......@@ -197,7 +187,7 @@ static DWORD mode_to_id(enum dllmode mode)
}
/* helper for is_builtin_only */
static int compare_dll( const void *ptr1, const void *ptr2 )
static int __cdecl compare_dll( const void *ptr1, const void *ptr2 )
{
const char * const *name1 = ptr1;
const char * const *name2 = ptr2;
......
......@@ -22,9 +22,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
......@@ -39,7 +36,6 @@
#include <shlobj.h>
#include <shlwapi.h>
#include <wine/debug.h>
#include <wine/unicode.h>
#include "resource.h"
#include "winecfg.h"
......@@ -744,13 +740,13 @@ static void init_shell_folder_listview_headers(HWND dialog) {
listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
listColumn.pszText = szShellFolder;
listColumn.cchTextMax = strlenW(listColumn.pszText);
listColumn.cchTextMax = lstrlenW(listColumn.pszText);
listColumn.cx = width;
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 0, (LPARAM) &listColumn);
listColumn.pszText = szLinksTo;
listColumn.cchTextMax = strlenW(listColumn.pszText);
listColumn.cchTextMax = lstrlenW(listColumn.pszText);
listColumn.cx = viewRect.right - viewRect.left - width - 1;
SendDlgItemMessageW(dialog, IDC_LIST_SFPATHS, LVM_INSERTCOLUMNW, 1, (LPARAM) &listColumn);
......
......@@ -34,7 +34,6 @@
#include <limits.h>
#include <windows.h>
#include <winreg.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include <wine/list.h>
......@@ -623,7 +622,7 @@ static void process_setting(struct setting *s)
static const WCHAR softwareW[] = {'S','o','f','t','w','a','r','e','\\'};
HKEY key;
BOOL needs_wow64 = (is_win64 && s->root == HKEY_LOCAL_MACHINE && s->path &&
!strncmpiW(s->path, softwareW, ARRAY_SIZE(softwareW)));
!wcsnicmp(s->path, softwareW, ARRAY_SIZE(softwareW)));
if (s->value)
{
......
......@@ -28,7 +28,6 @@
#include <stdio.h>
#include <windows.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "resource.h"
......@@ -78,7 +77,7 @@ static void update_gui_for_desktop_mode(HWND dialog)
updating_ui = TRUE;
buf = get_reg_keyW(config_key, explorer_desktopsW, desktop_name, NULL);
if (buf && (bufindex = strchrW(buf, 'x')))
if (buf && (bufindex = wcschr(buf, 'x')))
{
*bufindex++ = 0;
......@@ -195,7 +194,7 @@ static void set_from_desktop_edits(HWND dialog)
HeapFree(GetProcessHeap(), 0, width);
width = strdupW(def_width);
}
else if (atoiW(width) < atoiW(min_width))
else if (wcstol(width, NULL, 10) < wcstol(min_width, NULL, 10))
{
HeapFree(GetProcessHeap(), 0, width);
width = strdupW(min_width);
......@@ -204,16 +203,16 @@ static void set_from_desktop_edits(HWND dialog)
HeapFree(GetProcessHeap(), 0, height);
height = strdupW(def_height);
}
else if (atoiW(height) < atoiW(min_height))
else if (wcstol(height, NULL, 10) < wcstol(min_height, NULL, 10))
{
HeapFree(GetProcessHeap(), 0, height);
height = strdupW(min_height);
}
new = HeapAlloc(GetProcessHeap(), 0, (strlenW(width) + strlenW(height) + 2) * sizeof(WCHAR));
strcpyW( new, width );
strcatW( new, x );
strcatW( new, height );
new = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(width) + lstrlenW(height) + 2) * sizeof(WCHAR));
lstrcpyW( new, width );
lstrcatW( new, x );
lstrcatW( new, height );
set_reg_keyW(config_key, explorer_desktopsW, desktop_name, new);
set_reg_keyW(config_key, keypathW(explorerW), desktopW, desktop_name);
......@@ -360,8 +359,8 @@ static void update_font_preview(HWND hDlg)
GetObjectW(hfont, sizeof(lf), &lf);
if (strcmpW(lf.lfFaceName, tahomaW) != 0)
strcpyW(lf.lfFaceName, tahomaW);
if (wcscmp(lf.lfFaceName, tahomaW) != 0)
lstrcpyW(lf.lfFaceName, tahomaW);
else
DeleteObject(hfont);
lf.lfHeight = MulDiv(-10, dpi, 72);
......
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