Commit ae51135e authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fixes for -Wmissing-declarations and -Wwrite-strings warnings.

parent 44816ceb
...@@ -69,7 +69,7 @@ static void update_comboboxes(HWND dialog) ...@@ -69,7 +69,7 @@ static void update_comboboxes(HWND dialog)
HeapFree(GetProcessHeap(), 0, winver); HeapFree(GetProcessHeap(), 0, winver);
} }
void static void
init_comboboxes (HWND dialog) init_comboboxes (HWND dialog)
{ {
int i; int i;
...@@ -97,14 +97,14 @@ init_comboboxes (HWND dialog) ...@@ -97,14 +97,14 @@ init_comboboxes (HWND dialog)
} }
} }
static void add_listview_item(HWND listview, char *text, void *association) static void add_listview_item(HWND listview, const char *text, void *association)
{ {
LVITEM item; LVITEM item;
ZeroMemory(&item, sizeof(LVITEM)); ZeroMemory(&item, sizeof(LVITEM));
item.mask = LVIF_TEXT | LVIF_PARAM; item.mask = LVIF_TEXT | LVIF_PARAM;
item.pszText = text; item.pszText = (char*) text;
item.cchTextMax = strlen(text); item.cchTextMax = strlen(text);
item.lParam = (LPARAM) association; item.lParam = (LPARAM) association;
item.iItem = ListView_GetItemCount(listview); item.iItem = ListView_GetItemCount(listview);
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winecfg); WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
/* Select the correct entry in the combobox based on drivername */ /* Select the correct entry in the combobox based on drivername */
void selectAudioDriver(HWND hDlg, char *drivername) static void selectAudioDriver(HWND hDlg, const char *drivername)
{ {
int i; int i;
const AUDIO_DRIVER *pAudioDrv = NULL; const AUDIO_DRIVER *pAudioDrv = NULL;
...@@ -64,7 +64,7 @@ void selectAudioDriver(HWND hDlg, char *drivername) ...@@ -64,7 +64,7 @@ void selectAudioDriver(HWND hDlg, char *drivername)
} }
} }
void initAudioDlg (HWND hDlg) static void initAudioDlg (HWND hDlg)
{ {
char *curAudioDriver = get("Winmm", "Drivers", "winealsa.drv"); char *curAudioDriver = get("Winmm", "Drivers", "winealsa.drv");
const AUDIO_DRIVER *pAudioDrv = NULL; const AUDIO_DRIVER *pAudioDrv = NULL;
...@@ -82,14 +82,14 @@ void initAudioDlg (HWND hDlg) ...@@ -82,14 +82,14 @@ void initAudioDlg (HWND hDlg)
} }
} }
char *audioAutoDetect(void) static const char *audioAutoDetect(void)
{ {
struct stat buf; struct stat buf;
const char *argv_new[4]; const char *argv_new[4];
int fd; int fd;
char *driversFound[10]; const char *driversFound[10];
char *name[10]; const char *name[10];
int numFound = 0; int numFound = 0;
argv_new[0] = "/bin/sh"; argv_new[0] = "/bin/sh";
......
...@@ -83,7 +83,7 @@ long drive_available_mask(char letter) ...@@ -83,7 +83,7 @@ long drive_available_mask(char letter)
return result; return result;
} }
BOOL add_drive(char letter, char *targetpath, char *label, char *serial, unsigned int type) BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type)
{ {
int driveIndex = letter_to_index(letter); int driveIndex = letter_to_index(letter);
...@@ -396,7 +396,7 @@ void apply_drive_changes() ...@@ -396,7 +396,7 @@ void apply_drive_changes()
HANDLE hFile; HANDLE hFile;
HKEY hKey; HKEY hKey;
char *typeText; const char *typeText;
char driveValue[256]; char driveValue[256];
/* define this drive */ /* define this drive */
......
...@@ -50,7 +50,7 @@ static DEV_NODES sDeviceNodes[] = { ...@@ -50,7 +50,7 @@ static DEV_NODES sDeviceNodes[] = {
{"",0} {"",0}
}; };
static char *ignored_fstypes[] = { static const char *ignored_fstypes[] = {
"devpts", "devpts",
"tmpfs", "tmpfs",
"proc", "proc",
...@@ -61,7 +61,7 @@ static char *ignored_fstypes[] = { ...@@ -61,7 +61,7 @@ static char *ignored_fstypes[] = {
NULL NULL
}; };
static char *ignored_mnt_dirs[] = { static const char *ignored_mnt_dirs[] = {
"/boot", "/boot",
NULL NULL
}; };
...@@ -82,7 +82,7 @@ static int try_dev_node(char *dev) ...@@ -82,7 +82,7 @@ static int try_dev_node(char *dev)
static BOOL should_ignore_fstype(char *type) static BOOL should_ignore_fstype(char *type)
{ {
char **s; const char **s;
for (s = ignored_fstypes; *s; s++) for (s = ignored_fstypes; *s; s++)
if (!strcmp(*s, type)) return TRUE; if (!strcmp(*s, type)) return TRUE;
...@@ -92,7 +92,7 @@ static BOOL should_ignore_fstype(char *type) ...@@ -92,7 +92,7 @@ static BOOL should_ignore_fstype(char *type)
static BOOL should_ignore_mnt_dir(char *dir) static BOOL should_ignore_mnt_dir(char *dir)
{ {
char **s; const char **s;
for (s = ignored_mnt_dirs; *s; s++) for (s = ignored_mnt_dirs; *s; s++)
if (!strcmp(*s, dir)) return TRUE; if (!strcmp(*s, dir)) return TRUE;
......
...@@ -143,14 +143,15 @@ static const struct drive_typemap type_pairs[] = { ...@@ -143,14 +143,15 @@ static const struct drive_typemap type_pairs[] = {
#define DRIVE_TYPE_DEFAULT 1 #define DRIVE_TYPE_DEFAULT 1
void fill_drive_droplist(long mask, char curletter, HWND dialog) static void fill_drive_droplist(long mask, char curletter, HWND dialog)
{ {
int i; int i;
int selection; int selection;
int count; int count;
int next_letter; int next_letter;
char sName[4] = "A:"; char sName[4];
strcpy(sName, "A:");
for (i = 0, count = 0, selection = -1, next_letter = -1; i <= 'Z'-'A'; ++i) for (i = 0, count = 0, selection = -1, next_letter = -1; i <= 'Z'-'A'; ++i)
{ {
if (mask & DRIVE_MASK_BIT('A' + i)) if (mask & DRIVE_MASK_BIT('A' + i))
...@@ -184,7 +185,7 @@ void fill_drive_droplist(long mask, char curletter, HWND dialog) ...@@ -184,7 +185,7 @@ void fill_drive_droplist(long mask, char curletter, HWND dialog)
} }
void enable_labelserial_box(HWND dialog, int mode) static void enable_labelserial_box(HWND dialog, int mode)
{ {
WINE_TRACE("mode=%d\n", mode); WINE_TRACE("mode=%d\n", mode);
...@@ -232,7 +233,7 @@ void enable_labelserial_box(HWND dialog, int mode) ...@@ -232,7 +233,7 @@ void enable_labelserial_box(HWND dialog, int mode)
} }
} }
int fill_drives_list(HWND dialog) static int fill_drives_list(HWND dialog)
{ {
int count = 0; int count = 0;
BOOL drivec_present = FALSE; BOOL drivec_present = FALSE;
...@@ -306,7 +307,7 @@ int fill_drives_list(HWND dialog) ...@@ -306,7 +307,7 @@ int fill_drives_list(HWND dialog)
return count; return count;
} }
void on_options_click(HWND dialog) static void on_options_click(HWND dialog)
{ {
if (IsDlgButtonChecked(dialog, IDC_SHOW_DIRSYM_LINK) == BST_CHECKED) if (IsDlgButtonChecked(dialog, IDC_SHOW_DIRSYM_LINK) == BST_CHECKED)
set("wine", "ShowDirSymLinks", "Y"); set("wine", "ShowDirSymLinks", "Y");
...@@ -319,7 +320,7 @@ void on_options_click(HWND dialog) ...@@ -319,7 +320,7 @@ void on_options_click(HWND dialog)
set("wine", "ShowDotFiles", "N"); set("wine", "ShowDotFiles", "N");
} }
void on_add_click(HWND dialog) static void on_add_click(HWND dialog)
{ {
/* we should allocate a drive letter automatically. We also need /* we should allocate a drive letter automatically. We also need
some way to let the user choose the mapping point, for now we some way to let the user choose the mapping point, for now we
...@@ -363,7 +364,7 @@ void on_add_click(HWND dialog) ...@@ -363,7 +364,7 @@ void on_add_click(HWND dialog)
update_controls(dialog); update_controls(dialog);
} }
void on_remove_click(HWND dialog) static void on_remove_click(HWND dialog)
{ {
int itemIndex; int itemIndex;
struct drive *drive; struct drive *drive;
...@@ -408,7 +409,7 @@ static void update_controls(HWND dialog) ...@@ -408,7 +409,7 @@ static void update_controls(HWND dialog)
unsigned int type; unsigned int type;
char *label; char *label;
char *serial; char *serial;
char *device; const char *device;
int i, selection = -1; int i, selection = -1;
LVITEM item; LVITEM item;
...@@ -501,7 +502,7 @@ static void update_controls(HWND dialog) ...@@ -501,7 +502,7 @@ static void update_controls(HWND dialog)
return; return;
} }
void on_edit_changed(HWND dialog, WORD id) static void on_edit_changed(HWND dialog, WORD id)
{ {
if (updating_ui) return; if (updating_ui) return;
...@@ -668,14 +669,14 @@ static void init_listview_columns(HWND dialog) ...@@ -668,14 +669,14 @@ static void init_listview_columns(HWND dialog)
width = (viewRect.right - viewRect.left) / 6 - 5; width = (viewRect.right - viewRect.left) / 6 - 5;
listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
listColumn.pszText = "Letter"; listColumn.pszText = (char*) "Letter";
listColumn.cchTextMax = lstrlen(listColumn.pszText); listColumn.cchTextMax = lstrlen(listColumn.pszText);
listColumn.cx = width; listColumn.cx = width;
SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 0, (LPARAM) &listColumn); SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 0, (LPARAM) &listColumn);
listColumn.cx = viewRect.right - viewRect.left - width; listColumn.cx = viewRect.right - viewRect.left - width;
listColumn.pszText = "Drive Mapping"; listColumn.pszText = (char*) "Drive Mapping";
listColumn.cchTextMax = lstrlen(listColumn.pszText); listColumn.cchTextMax = lstrlen(listColumn.pszText);
SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 1, (LPARAM) &listColumn); SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 1, (LPARAM) &listColumn);
......
...@@ -77,7 +77,7 @@ static enum dllmode string_to_mode(char *in) ...@@ -77,7 +77,7 @@ static enum dllmode string_to_mode(char *in)
} }
/* Convert a dllmode to a registry string. */ /* Convert a dllmode to a registry string. */
static char* mode_to_string(enum dllmode mode) static const char* mode_to_string(enum dllmode mode)
{ {
switch( mode ) switch( mode )
{ {
...@@ -91,7 +91,7 @@ static char* mode_to_string(enum dllmode mode) ...@@ -91,7 +91,7 @@ static char* mode_to_string(enum dllmode mode)
} }
/* Convert a dllmode to a pretty string for display. TODO: use translations. */ /* Convert a dllmode to a pretty string for display. TODO: use translations. */
static char* mode_to_label(enum dllmode mode) static const char* mode_to_label(enum dllmode mode)
{ {
WINE_FIXME("translate me"); WINE_FIXME("translate me");
return mode_to_string(mode); return mode_to_string(mode);
...@@ -197,7 +197,8 @@ static void load_library_settings(HWND dialog) ...@@ -197,7 +197,8 @@ static void load_library_settings(HWND dialog)
for (p = overrides; *p != NULL; p++) for (p = overrides; *p != NULL; p++)
{ {
int index; int index;
char *str, *value, *label; char *str, *value;
const char *label;
struct dll *dll; struct dll *dll;
value = get(keypath("DllOverrides"), *p, NULL); value = get(keypath("DllOverrides"), *p, NULL);
...@@ -259,7 +260,7 @@ static void set_dllmode(HWND dialog, DWORD id) ...@@ -259,7 +260,7 @@ static void set_dllmode(HWND dialog, DWORD id)
enum dllmode mode; enum dllmode mode;
struct dll *dll; struct dll *dll;
int sel; int sel;
char *str; const char *str;
mode = id_to_mode(id); mode = id_to_mode(id);
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winecfg); WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
void CALLBACK static void CALLBACK
PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam) PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
{ {
switch (uMsg) switch (uMsg)
...@@ -65,7 +65,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam) ...@@ -65,7 +65,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
} }
} }
INT_PTR CALLBACK static INT_PTR CALLBACK
AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
switch (uMsg) { switch (uMsg) {
...@@ -88,7 +88,7 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -88,7 +88,7 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define NUM_PROPERTY_PAGES 6 #define NUM_PROPERTY_PAGES 6
INT_PTR static INT_PTR
doPropertySheet (HINSTANCE hInstance, HWND hOwner) doPropertySheet (HINSTANCE hInstance, HWND hOwner)
{ {
PROPSHEETPAGE psp[NUM_PROPERTY_PAGES]; PROPSHEETPAGE psp[NUM_PROPERTY_PAGES];
...@@ -202,7 +202,7 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner) ...@@ -202,7 +202,7 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
* no option at all. Has to be reworked, if more options are to * no option at all. Has to be reworked, if more options are to
* be supported. * be supported.
*/ */
BOOL static BOOL
ProcessCmdLine(LPSTR lpCmdLine) ProcessCmdLine(LPSTR lpCmdLine)
{ {
if ((lpCmdLine[0] == '/' || lpCmdLine[0] == '-') && if ((lpCmdLine[0] == '/' || lpCmdLine[0] == '-') &&
......
...@@ -55,7 +55,7 @@ void set_window_title(HWND dialog) ...@@ -55,7 +55,7 @@ void set_window_title(HWND dialog)
/* update the window title */ /* update the window title */
if (current_app) if (current_app)
{ {
char *template = "Wine Configuration for %s"; const char *template = "Wine Configuration for %s";
newtitle = HeapAlloc(GetProcessHeap(), 0, strlen(template) + strlen(current_app) + 1); newtitle = HeapAlloc(GetProcessHeap(), 0, strlen(template) + strlen(current_app) + 1);
sprintf(newtitle, template, current_app); sprintf(newtitle, template, current_app);
} }
...@@ -81,7 +81,7 @@ void set_window_title(HWND dialog) ...@@ -81,7 +81,7 @@ void set_window_title(HWND dialog)
* not. Caller is responsible for releasing the result. * not. Caller is responsible for releasing the result.
* *
*/ */
static char *get_config_key (char *subkey, char *name, char *def) static char *get_config_key (const char *subkey, const char *name, const char *def)
{ {
LPBYTE buffer = NULL; LPBYTE buffer = NULL;
DWORD len; DWORD len;
...@@ -139,7 +139,7 @@ end: ...@@ -139,7 +139,7 @@ end:
* *
* If valueName or value is NULL, an empty section will be created * If valueName or value is NULL, an empty section will be created
*/ */
int set_config_key(const char *subkey, const char *name, const char *value) { static int set_config_key(const char *subkey, const char *name, const char *value) {
DWORD res = 1; DWORD res = 1;
HKEY key = NULL; HKEY key = NULL;
...@@ -236,7 +236,7 @@ static void free_setting(struct setting *setting) ...@@ -236,7 +236,7 @@ static void free_setting(struct setting *setting)
* If already in the list, the contents as given there will be * If already in the list, the contents as given there will be
* returned. You are expected to HeapFree the result. * returned. You are expected to HeapFree the result.
*/ */
char *get(char *path, char *name, char *def) char *get(const char *path, const char *name, const char *def)
{ {
struct list *cursor; struct list *cursor;
struct setting *s; struct setting *s;
...@@ -277,7 +277,7 @@ char *get(char *path, char *name, char *def) ...@@ -277,7 +277,7 @@ char *get(char *path, char *name, char *def)
* *
* These values will be copied when necessary. * These values will be copied when necessary.
*/ */
void set(char *path, char *name, char *value) void set(const char *path, const char *name, const char *value)
{ {
struct list *cursor; struct list *cursor;
struct setting *s; struct setting *s;
...@@ -440,7 +440,7 @@ char **enumerate_values(char *path) ...@@ -440,7 +440,7 @@ char **enumerate_values(char *path)
* returns true if the given key/value pair exists in the registry or * returns true if the given key/value pair exists in the registry or
* has been written to. * has been written to.
*/ */
BOOL exists(char *path, char *name) BOOL exists(const char *path, const char *name)
{ {
char *val = get(path, name, NULL); char *val = get(path, name, NULL);
...@@ -487,7 +487,7 @@ void apply(void) ...@@ -487,7 +487,7 @@ void apply(void)
char *current_app = NULL; /* the app we are currently editing, or NULL if editing global */ char *current_app = NULL; /* the app we are currently editing, or NULL if editing global */
/* returns a registry key path suitable for passing to addTransaction */ /* returns a registry key path suitable for passing to addTransaction */
char *keypath(char *section) char *keypath(const char *section)
{ {
static char *result = NULL; static char *result = NULL;
......
...@@ -48,9 +48,9 @@ extern char *current_app; /* NULL means editing global settings */ ...@@ -48,9 +48,9 @@ extern char *current_app; /* NULL means editing global settings */
be copied, so release them too when necessary. be copied, so release them too when necessary.
*/ */
void set(char *path, char *name, char *value); void set(const char *path, const char *name, const char *value);
char *get(char *path, char *name, char *def); char *get(const char *path, const char *name, const char *def);
BOOL exists(char *path, char *name); BOOL exists(const char *path, const char *name);
void apply(void); void apply(void);
char **enumerate_values(char *path); char **enumerate_values(char *path);
...@@ -59,7 +59,7 @@ char **enumerate_values(char *path); ...@@ -59,7 +59,7 @@ char **enumerate_values(char *path);
no explicit free is needed of the string returned by this function no explicit free is needed of the string returned by this function
*/ */
char *keypath(char *section); char *keypath(const char *section);
int initialize(void); int initialize(void);
extern HKEY config_key; extern HKEY config_key;
...@@ -93,7 +93,7 @@ struct drive ...@@ -93,7 +93,7 @@ struct drive
#define DRIVE_MASK_BIT(B) 1 << (toupper(B) - 'A') #define DRIVE_MASK_BIT(B) 1 << (toupper(B) - 'A')
long drive_available_mask(char letter); long drive_available_mask(char letter);
BOOL add_drive(char letter, char *targetpath, char *label, char *serial, unsigned int type); BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type);
void delete_drive(struct drive *pDrive); void delete_drive(struct drive *pDrive);
void apply_drive_changes(); void apply_drive_changes();
extern struct drive drives[26]; /* one for each drive letter */ extern struct drive drives[26]; /* one for each drive letter */
...@@ -106,7 +106,7 @@ BOOL gui_mode; ...@@ -106,7 +106,7 @@ BOOL gui_mode;
void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastError() */ void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastError() */
/* returns a string in the win32 heap */ /* returns a string in the win32 heap */
static inline char *strdupA(char *s) static inline char *strdupA(const char *s)
{ {
char *r = HeapAlloc(GetProcessHeap(), 0, strlen(s)+1); char *r = HeapAlloc(GetProcessHeap(), 0, strlen(s)+1);
return strcpy(r, s); return strcpy(r, s);
...@@ -121,7 +121,7 @@ static inline char *get_text(HWND dialog, WORD id) ...@@ -121,7 +121,7 @@ static inline char *get_text(HWND dialog, WORD id)
return result; return result;
} }
static inline void set_text(HWND dialog, WORD id, char *text) static inline void set_text(HWND dialog, WORD id, const char *text)
{ {
SetWindowText(GetDlgItem(dialog, id), text); SetWindowText(GetDlgItem(dialog, id), text);
} }
......
...@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg); ...@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
int updating_ui; int updating_ui;
void update_gui_for_desktop_mode(HWND dialog) { static void update_gui_for_desktop_mode(HWND dialog) {
WINE_TRACE("\n"); WINE_TRACE("\n");
updating_ui = TRUE; updating_ui = TRUE;
...@@ -161,7 +161,7 @@ static void set_from_desktop_edits(HWND dialog) { ...@@ -161,7 +161,7 @@ static void set_from_desktop_edits(HWND dialog) {
HeapFree(GetProcessHeap(), 0, new); HeapFree(GetProcessHeap(), 0, new);
} }
void on_enable_desktop_clicked(HWND dialog) { static void on_enable_desktop_clicked(HWND dialog) {
WINE_TRACE("\n"); WINE_TRACE("\n");
if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) { if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) {
......
...@@ -611,9 +611,9 @@ static LPSTR escape(LPCWSTR arg) ...@@ -611,9 +611,9 @@ static LPSTR escape(LPCWSTR arg)
return narg; return narg;
} }
static int fork_and_wait( char *linker, char *link_name, char *path, static int fork_and_wait( const char *linker, const char *link_name, const char *path,
int desktop, char *args, char *icon_name, int desktop, const char *args, const char *icon_name,
char *workdir, char *description ) const char *workdir, const char *description )
{ {
int pos = 0; int pos = 0;
const char *argv[20]; const char *argv[20];
......
...@@ -447,7 +447,7 @@ void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty ) ...@@ -447,7 +447,7 @@ void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty )
} }
} }
void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b) static void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b)
{ {
if (*x < a) { if (*x < a) {
*y += a - *x; *y += a - *x;
...@@ -458,7 +458,8 @@ void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b) ...@@ -458,7 +458,8 @@ void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b)
*y = b; *y = b;
} }
} }
void MoveOnScreen(RECT* rect)
static void MoveOnScreen(RECT* rect)
{ {
HMONITOR hMonitor; HMONITOR hMonitor;
MONITORINFO mi; MONITORINFO mi;
......
...@@ -26,34 +26,24 @@ ...@@ -26,34 +26,24 @@
/* Event object to signal successful window creation to main thread. /* Event object to signal successful window creation to main thread.
*/ */
HANDLE initEvent; static HANDLE initEvent;
/* Dialog handle /* Dialog handle
*/ */
HWND dialog; static HWND dialog;
/* Progress data for the text* functions and for scaling. /* Progress data for the text* functions and for scaling.
*/ */
unsigned int progressMax, progressCurr; static unsigned int progressMax, progressCurr;
double progressScale; static double progressScale;
/* Progress group counter for the gui* functions. /* Progress group counter for the gui* functions.
*/ */
int progressGroup; static int progressGroup;
WNDPROC DefEditProc; static WNDPROC DefEditProc;
char * static int
renderString (va_list ap)
{
const char *fmt = va_arg (ap, char*);
static char buffer[128];
vsnprintf (buffer, sizeof buffer, fmt, ap);
return buffer;
}
int
MBdefault (int uType) MBdefault (int uType)
{ {
static const int matrix[][4] = {{IDOK, 0, 0, 0}, static const int matrix[][4] = {{IDOK, 0, 0, 0},
...@@ -69,7 +59,7 @@ MBdefault (int uType) ...@@ -69,7 +59,7 @@ MBdefault (int uType)
} }
/* report (R_STATUS, fmt, ...) */ /* report (R_STATUS, fmt, ...) */
int static int
textStatus (va_list ap) textStatus (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -80,7 +70,7 @@ textStatus (va_list ap) ...@@ -80,7 +70,7 @@ textStatus (va_list ap)
return 0; return 0;
} }
int static int
guiStatus (va_list ap) guiStatus (va_list ap)
{ {
size_t len; size_t len;
...@@ -93,7 +83,7 @@ guiStatus (va_list ap) ...@@ -93,7 +83,7 @@ guiStatus (va_list ap)
} }
/* report (R_PROGRESS, barnum, steps) */ /* report (R_PROGRESS, barnum, steps) */
int static int
textProgress (va_list ap) textProgress (va_list ap)
{ {
progressGroup = va_arg (ap, int); progressGroup = va_arg (ap, int);
...@@ -102,7 +92,7 @@ textProgress (va_list ap) ...@@ -102,7 +92,7 @@ textProgress (va_list ap)
return 0; return 0;
} }
int static int
guiProgress (va_list ap) guiProgress (va_list ap)
{ {
unsigned int max; unsigned int max;
...@@ -123,7 +113,7 @@ guiProgress (va_list ap) ...@@ -123,7 +113,7 @@ guiProgress (va_list ap)
} }
/* report (R_STEP, fmt, ...) */ /* report (R_STEP, fmt, ...) */
int static int
textStep (va_list ap) textStep (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -135,7 +125,7 @@ textStep (va_list ap) ...@@ -135,7 +125,7 @@ textStep (va_list ap)
return 0; return 0;
} }
int static int
guiStep (va_list ap) guiStep (va_list ap)
{ {
const int pgID = IDC_ST0 + progressGroup * 2; const int pgID = IDC_ST0 + progressGroup * 2;
...@@ -150,7 +140,7 @@ guiStep (va_list ap) ...@@ -150,7 +140,7 @@ guiStep (va_list ap)
} }
/* report (R_DELTA, inc, fmt, ...) */ /* report (R_DELTA, inc, fmt, ...) */
int static int
textDelta (va_list ap) textDelta (va_list ap)
{ {
const int inc = va_arg (ap, int); const int inc = va_arg (ap, int);
...@@ -163,7 +153,7 @@ textDelta (va_list ap) ...@@ -163,7 +153,7 @@ textDelta (va_list ap)
return 0; return 0;
} }
int static int
guiDelta (va_list ap) guiDelta (va_list ap)
{ {
const int inc = va_arg (ap, int); const int inc = va_arg (ap, int);
...@@ -179,7 +169,7 @@ guiDelta (va_list ap) ...@@ -179,7 +169,7 @@ guiDelta (va_list ap)
} }
/* report (R_TAG) */ /* report (R_TAG) */
int static int
textTag (va_list ap) textTag (va_list ap)
{ {
fputs ("Tag: ", stderr); fputs ("Tag: ", stderr);
...@@ -188,7 +178,7 @@ textTag (va_list ap) ...@@ -188,7 +178,7 @@ textTag (va_list ap)
return 0; return 0;
} }
int static int
guiTag (va_list ap) guiTag (va_list ap)
{ {
SetDlgItemText (dialog, IDC_TAG, tag); SetDlgItemText (dialog, IDC_TAG, tag);
...@@ -196,7 +186,7 @@ guiTag (va_list ap) ...@@ -196,7 +186,7 @@ guiTag (va_list ap)
} }
/* report (R_DIR, fmt, ...) */ /* report (R_DIR, fmt, ...) */
int static int
textDir (va_list ap) textDir (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -208,7 +198,7 @@ textDir (va_list ap) ...@@ -208,7 +198,7 @@ textDir (va_list ap)
return 0; return 0;
} }
int static int
guiDir (va_list ap) guiDir (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -219,7 +209,7 @@ guiDir (va_list ap) ...@@ -219,7 +209,7 @@ guiDir (va_list ap)
} }
/* report (R_OUT, fmt, ...) */ /* report (R_OUT, fmt, ...) */
int static int
textOut (va_list ap) textOut (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -231,7 +221,7 @@ textOut (va_list ap) ...@@ -231,7 +221,7 @@ textOut (va_list ap)
return 0; return 0;
} }
int static int
guiOut (va_list ap) guiOut (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -242,7 +232,7 @@ guiOut (va_list ap) ...@@ -242,7 +232,7 @@ guiOut (va_list ap)
} }
/* report (R_WARNING, fmt, ...) */ /* report (R_WARNING, fmt, ...) */
int static int
textWarning (va_list ap) textWarning (va_list ap)
{ {
fputs ("Warning: ", stderr); fputs ("Warning: ", stderr);
...@@ -250,7 +240,7 @@ textWarning (va_list ap) ...@@ -250,7 +240,7 @@ textWarning (va_list ap)
return 0; return 0;
} }
int static int
guiWarning (va_list ap) guiWarning (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -261,7 +251,7 @@ guiWarning (va_list ap) ...@@ -261,7 +251,7 @@ guiWarning (va_list ap)
} }
/* report (R_ERROR, fmt, ...) */ /* report (R_ERROR, fmt, ...) */
int static int
textError (va_list ap) textError (va_list ap)
{ {
fputs ("Error: ", stderr); fputs ("Error: ", stderr);
...@@ -269,7 +259,7 @@ textError (va_list ap) ...@@ -269,7 +259,7 @@ textError (va_list ap)
return 0; return 0;
} }
int static int
guiError (va_list ap) guiError (va_list ap)
{ {
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
...@@ -280,14 +270,14 @@ guiError (va_list ap) ...@@ -280,14 +270,14 @@ guiError (va_list ap)
} }
/* report (R_FATAL, fmt, ...) */ /* report (R_FATAL, fmt, ...) */
int static int
textFatal (va_list ap) textFatal (va_list ap)
{ {
textError (ap); textError (ap);
exit (1); exit (1);
} }
int static int
guiFatal (va_list ap) guiFatal (va_list ap)
{ {
guiError (ap); guiError (ap);
...@@ -295,7 +285,7 @@ guiFatal (va_list ap) ...@@ -295,7 +285,7 @@ guiFatal (va_list ap)
} }
/* report (R_ASK, type, fmt, ...) */ /* report (R_ASK, type, fmt, ...) */
int static int
textAsk (va_list ap) textAsk (va_list ap)
{ {
int uType = va_arg (ap, int); int uType = va_arg (ap, int);
...@@ -308,7 +298,7 @@ textAsk (va_list ap) ...@@ -308,7 +298,7 @@ textAsk (va_list ap)
return ret; return ret;
} }
int static int
guiAsk (va_list ap) guiAsk (va_list ap)
{ {
int uType = va_arg (ap, int); int uType = va_arg (ap, int);
...@@ -320,7 +310,7 @@ guiAsk (va_list ap) ...@@ -320,7 +310,7 @@ guiAsk (va_list ap)
return ret; return ret;
} }
BOOL CALLBACK static BOOL CALLBACK
EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
switch (msg) { switch (msg) {
...@@ -333,7 +323,7 @@ EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -333,7 +323,7 @@ EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return CallWindowProcA (DefEditProc, hwnd, msg, wParam, lParam); return CallWindowProcA (DefEditProc, hwnd, msg, wParam, lParam);
} }
BOOL CALLBACK static BOOL CALLBACK
AskTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) AskTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
int len; int len;
...@@ -368,25 +358,25 @@ guiAskTag (void) ...@@ -368,25 +358,25 @@ guiAskTag (void)
} }
/* Quiet functions */ /* Quiet functions */
int static int
qNoOp (va_list ap) qNoOp (va_list ap)
{ {
return 0; return 0;
} }
int static int
qFatal (va_list ap) qFatal (va_list ap)
{ {
exit (1); exit (1);
} }
int static int
qAsk (va_list ap) qAsk (va_list ap)
{ {
return MBdefault (va_arg (ap, int)); return MBdefault (va_arg (ap, int));
} }
BOOL CALLBACK static BOOL CALLBACK
AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
switch (msg) { switch (msg) {
...@@ -400,7 +390,7 @@ AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -400,7 +390,7 @@ AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE; return FALSE;
} }
BOOL CALLBACK static BOOL CALLBACK
DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
switch (msg) { switch (msg) {
...@@ -435,8 +425,8 @@ DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -435,8 +425,8 @@ DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE; return FALSE;
} }
DWORD WINAPI static DWORD WINAPI
DlgThreadProc () DlgThreadProc (LPVOID param)
{ {
int ret; int ret;
......
...@@ -33,10 +33,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(winhelp); ...@@ -33,10 +33,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(winhelp);
/* Macro table */ /* Macro table */
/**************************************************/ /**************************************************/
struct MacroDesc { struct MacroDesc {
char* name; const char* name;
char* alias; const char* alias;
BOOL isBool; BOOL isBool;
char* arguments; const char* arguments;
FARPROC fn; FARPROC fn;
}; };
......
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