Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d73dad66
Commit
d73dad66
authored
Jun 04, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for -Wmissing-declarations and -Wwrite-strings warnings.
parent
2ea56681
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
106 additions
and
99 deletions
+106
-99
cmdlgtst.c
programs/cmdlgtst/cmdlgtst.c
+38
-36
edit.c
programs/regedit/edit.c
+5
-5
framewnd.c
programs/regedit/framewnd.c
+4
-4
listview.c
programs/regedit/listview.c
+1
-1
main.c
programs/regedit/main.c
+3
-3
regedit.c
programs/regedit/regedit.c
+2
-2
regproc.c
programs/regedit/regproc.c
+12
-12
regproc.h
programs/regedit/regproc.h
+4
-2
treeview.c
programs/regedit/treeview.c
+1
-1
regsvr32.c
programs/regsvr32/regsvr32.c
+5
-5
rpcss_main.c
programs/rpcss/rpcss_main.c
+7
-7
dbg.y
programs/winedbg/dbg.y
+4
-1
main.c
programs/winetest/main.c
+16
-16
send.c
programs/winetest/send.c
+4
-4
No files found.
programs/cmdlgtst/cmdlgtst.c
View file @
d73dad66
...
...
@@ -101,13 +101,14 @@ static COLORREF txtColor = RGB(0, 0, 0); /* settable if one enables CF_EFFECTS *
/* Utility routines. */
void
nyi
(
HWND
hWnd
)
static
void
nyi
(
HWND
hWnd
)
{
/* "Hi there! I'm not yet implemented!" */
MessageBox
(
hWnd
,
"Not yet implemented!"
,
"NYI"
,
MB_ICONEXCLAMATION
|
MB_OK
);
}
UINT
CALLBACK
dummyfnHook
(
HWND
hWnd
,
UINT
msg
,
UINT
wParam
,
UINT
lParam
)
#if 0
static UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
{
/*
* If the user specifies something that needs an awfully stupid hook function,
...
...
@@ -123,6 +124,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
return 0;
}
#endif
/*
* Initialization code. This code simply shoves in predefined
...
...
@@ -131,7 +133,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
* if Microsoft decides to change the field ordering, I'd be screwed.
*/
void
mwi_Print
(
HWND
hWnd
)
static
void
mwi_Print
(
HWND
hWnd
)
{
pd
.
lStructSize
=
sizeof
(
PRINTDLG
);
pd
.
hwndOwner
=
hWnd
;
...
...
@@ -151,7 +153,7 @@ void mwi_Print(HWND hWnd)
pd
.
hSetupTemplate
=
0
;
}
void
mwi_Color
(
HWND
hWnd
)
static
void
mwi_Color
(
HWND
hWnd
)
{
int
i
;
...
...
@@ -171,7 +173,7 @@ void mwi_Color(HWND hWnd)
cc
.
lpTemplateName
=
0
;
}
void
mwi_Font
(
HWND
hWnd
)
static
void
mwi_Font
(
HWND
hWnd
)
{
cf
.
lStructSize
=
sizeof
(
CHOOSEFONT
);
cf
.
hwndOwner
=
hWnd
;
...
...
@@ -191,7 +193,7 @@ void mwi_Font(HWND hWnd)
cf_lf
.
lfHeight
=
-
18
;
/* this can be positive or negative, but negative is usually used. */
}
void
mwi_File
(
HWND
hWnd
)
static
void
mwi_File
(
HWND
hWnd
)
{
ofn
.
lStructSize
=
sizeof
(
OPENFILENAME
);
ofn
.
hwndOwner
=
hWnd
;
...
...
@@ -217,7 +219,7 @@ void mwi_File(HWND hWnd)
ofn_result
[
0
]
=
'\0'
;
}
void
mwi_FindReplace
(
HWND
hWnd
)
static
void
mwi_FindReplace
(
HWND
hWnd
)
{
frS
.
lStructSize
=
sizeof
(
FINDREPLACE
);
frS
.
hwndOwner
=
hWnd
;
...
...
@@ -236,7 +238,7 @@ void mwi_FindReplace(HWND hWnd)
findMessageId
=
RegisterWindowMessage
(
FINDMSGSTRING
);
}
void
mwi_InitAll
(
HWND
hWnd
)
static
void
mwi_InitAll
(
HWND
hWnd
)
{
mwi_Print
(
hWnd
);
mwi_Font
(
hWnd
);
...
...
@@ -254,7 +256,7 @@ void mwi_InitAll(HWND hWnd)
* there might be a problem.
*/
void
paintMainWindow
(
HWND
hWnd
,
UINT
iMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
static
void
paintMainWindow
(
HWND
hWnd
,
UINT
iMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
{
PAINTSTRUCT
ps
;
RECT
rect
;
...
...
@@ -322,7 +324,7 @@ void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
* consult cderr.h to see what was returned.
*/
void
mw_checkError
(
HWND
hWnd
,
BOOL
explicitcancel
)
static
void
mw_checkError
(
HWND
hWnd
,
BOOL
explicitcancel
)
{
DWORD
errval
=
CommDlgExtendedError
();
if
(
errval
)
{
...
...
@@ -343,7 +345,7 @@ void mw_checkError(HWND hWnd, BOOL explicitcancel)
* various values specified in the dialog.
*/
void
mw_ColorSetup
(
HWND
hWnd
)
static
void
mw_ColorSetup
(
HWND
hWnd
)
{
if
(
ChooseColor
(
&
cc
))
{
RECT
rect
;
...
...
@@ -355,7 +357,7 @@ void mw_ColorSetup(HWND hWnd)
else
mw_checkError
(
hWnd
,
FALSE
);
}
void
mw_FontSetup
(
HWND
hWnd
)
static
void
mw_FontSetup
(
HWND
hWnd
)
{
if
(
ChooseFont
(
&
cf
))
{
RECT
rect
;
...
...
@@ -366,7 +368,7 @@ void mw_FontSetup(HWND hWnd)
else
mw_checkError
(
hWnd
,
FALSE
);
}
void
mw_FindSetup
(
HWND
hWnd
)
static
void
mw_FindSetup
(
HWND
hWnd
)
{
if
(
findDialogBox
==
0
)
{
findDialogBox
=
FindText
(
&
frS
);
...
...
@@ -374,7 +376,7 @@ void mw_FindSetup(HWND hWnd)
}
}
void
mw_ReplaceSetup
(
HWND
hWnd
)
static
void
mw_ReplaceSetup
(
HWND
hWnd
)
{
if
(
findDialogBox
==
0
)
{
findDialogBox
=
ReplaceText
(
&
frS
);
...
...
@@ -382,7 +384,7 @@ void mw_ReplaceSetup(HWND hWnd)
}
}
void
mw_OpenSetup
(
HWND
hWnd
)
static
void
mw_OpenSetup
(
HWND
hWnd
)
{
if
(
GetOpenFileName
(
&
ofn
))
{
RECT
rect
;
...
...
@@ -392,7 +394,7 @@ void mw_OpenSetup(HWND hWnd)
else
mw_checkError
(
hWnd
,
FALSE
);
}
void
mw_SaveSetup
(
HWND
hWnd
)
static
void
mw_SaveSetup
(
HWND
hWnd
)
{
if
(
GetSaveFileName
(
&
ofn
))
{
RECT
rect
;
...
...
@@ -407,12 +409,12 @@ void mw_SaveSetup(HWND hWnd)
* exist at all, or is it merely a subdialog of Print?
*/
void
mw_PSetupSetup
(
HWND
hWnd
)
static
void
mw_PSetupSetup
(
HWND
hWnd
)
{
nyi
(
hWnd
);
}
void
mw_PrintSetup
(
HWND
hWnd
)
static
void
mw_PrintSetup
(
HWND
hWnd
)
{
if
(
PrintDlg
(
&
pd
))
{
/*
...
...
@@ -453,7 +455,7 @@ void mw_PrintSetup(HWND hWnd)
* In particular, we have to set things properly, and get the flags back.
*/
void
mwcd_SetFlags
(
HWND
hWnd
,
struct
FlagTableEntry
*
table
,
unsigned
long
flags
)
static
void
mwcd_SetFlags
(
HWND
hWnd
,
struct
FlagTableEntry
*
table
,
unsigned
long
flags
)
{
int
i
;
...
...
@@ -463,7 +465,7 @@ void mwcd_SetFlags(HWND hWnd, struct FlagTableEntry *table, unsigned long flags)
}
}
unsigned
long
mwcd_GetFlags
(
HWND
hWnd
,
struct
FlagTableEntry
*
table
)
static
unsigned
long
mwcd_GetFlags
(
HWND
hWnd
,
struct
FlagTableEntry
*
table
)
{
int
i
;
unsigned
long
l
=
0
;
...
...
@@ -484,7 +486,7 @@ unsigned long mwcd_GetFlags(HWND hWnd, struct FlagTableEntry * table)
* not the handlers. I'll fix that later; this works as of right now.
*/
BOOL
mwcd_Setup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
static
BOOL
mwcd_Setup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
struct
FlagTableEntry
*
table
,
unsigned
long
*
flags
)
{
(
void
)
lParam
;
...
...
@@ -523,7 +525,7 @@ BOOL mwcd_Setup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
}
}
BOOL
CALLBACK
mwcd_ColorSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_ColorSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
struct
FlagTableEntry
flagTable
[]
=
{
{
I_CC_RGBINIT
,
CC_RGBINIT
},
...
...
@@ -539,7 +541,7 @@ BOOL CALLBACK mwcd_ColorSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return
mwcd_Setup
(
hWnd
,
uMsg
,
wParam
,
lParam
,
flagTable
,
&
cc
.
Flags
);
}
BOOL
CALLBACK
mwcd_FontSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_FontSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
struct
FlagTableEntry
flagTable
[]
=
{
{
I_CF_APPLY
,
CF_APPLY
},
...
...
@@ -570,7 +572,7 @@ BOOL CALLBACK mwcd_FontSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
mwcd_Setup
(
hWnd
,
uMsg
,
wParam
,
lParam
,
flagTable
,
&
cf
.
Flags
);
}
BOOL
CALLBACK
mwcd_FindSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_FindSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
struct
FlagTableEntry
flagTable
[]
=
{
...
...
@@ -597,7 +599,7 @@ BOOL CALLBACK mwcd_FindSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
mwcd_Setup
(
hWnd
,
uMsg
,
wParam
,
lParam
,
flagTable
,
&
frS
.
Flags
);
}
BOOL
CALLBACK
mwcd_PrintSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_PrintSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
struct
FlagTableEntry
flagTable
[]
=
{
{
I_PD_ALLPAGES
,
PD_ALLPAGES
},
...
...
@@ -628,7 +630,7 @@ BOOL CALLBACK mwcd_PrintSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return
mwcd_Setup
(
hWnd
,
uMsg
,
wParam
,
lParam
,
flagTable
,
&
pd
.
Flags
);
}
BOOL
CALLBACK
mwcd_FileSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_FileSetup
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
struct
FlagTableEntry
flagTable
[]
=
{
{
I_OFN_ALLOWMULTISELECT
,
OFN_ALLOWMULTISELECT
},
...
...
@@ -654,7 +656,7 @@ BOOL CALLBACK mwcd_FileSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
mwcd_Setup
(
hWnd
,
uMsg
,
wParam
,
lParam
,
flagTable
,
&
ofn
.
Flags
);
}
BOOL
CALLBACK
mwcd_About
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
BOOL
CALLBACK
mwcd_About
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
(
void
)
wParam
;
(
void
)
lParam
;
...
...
@@ -673,31 +675,31 @@ BOOL CALLBACK mwcd_About(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
* the CommDlg structures initialized by the mwi_xxx() routines.
*/
void
mwc_ColorSetup
(
HWND
hWnd
)
static
void
mwc_ColorSetup
(
HWND
hWnd
)
{
int
r
=
DialogBox
(
g_hInstance
,
"Color_Flags_Dialog"
,
hWnd
,
(
DLGPROC
)
mwcd_ColorSetup
);
if
(
r
<
0
)
{
MessageBox
(
hWnd
,
"Failure opening Color_Flags_Dialog box"
,
"Error"
,
MB_ICONASTERISK
|
MB_OK
);
}
}
void
mwc_FontSetup
(
HWND
hWnd
)
static
void
mwc_FontSetup
(
HWND
hWnd
)
{
int
r
=
DialogBox
(
g_hInstance
,
"Font_Flags_Dialog"
,
hWnd
,
(
DLGPROC
)
mwcd_FontSetup
);
if
(
r
<
0
)
{
MessageBox
(
hWnd
,
"Failure opening Font_Flags_Dialog box"
,
"Error"
,
MB_ICONASTERISK
|
MB_OK
);
}
}
void
mwc_FindReplaceSetup
(
HWND
hWnd
)
static
void
mwc_FindReplaceSetup
(
HWND
hWnd
)
{
int
r
=
DialogBox
(
g_hInstance
,
"Find_Flags_Dialog"
,
hWnd
,
(
DLGPROC
)
mwcd_FindSetup
);
if
(
r
<
0
)
{
MessageBox
(
hWnd
,
"Failure opening Find_Flags_Dialog box"
,
"Error"
,
MB_ICONASTERISK
|
MB_OK
);
}
}
void
mwc_PrintSetup
(
HWND
hWnd
)
static
void
mwc_PrintSetup
(
HWND
hWnd
)
{
int
r
=
DialogBox
(
g_hInstance
,
"Print_Flags_Dialog"
,
hWnd
,
(
DLGPROC
)
mwcd_PrintSetup
);
if
(
r
<
0
)
{
MessageBox
(
hWnd
,
"Failure opening Print_Flags_Dialog box"
,
"Error"
,
MB_ICONASTERISK
|
MB_OK
);
}
}
void
mwc_FileSetup
(
HWND
hWnd
)
static
void
mwc_FileSetup
(
HWND
hWnd
)
{
int
r
=
DialogBox
(
g_hInstance
,
"File_Flags_Dialog"
,
hWnd
,
(
DLGPROC
)
mwcd_FileSetup
);
if
(
r
<
0
)
{
MessageBox
(
hWnd
,
"Failure opening File_Flags_Dialog box"
,
"Error"
,
MB_ICONASTERISK
|
MB_OK
);
}
...
...
@@ -710,7 +712,7 @@ void mwc_FileSetup(HWND hWnd)
* dangling from Windows like a loose muffler. Sigh.
*/
LRESULT
CALLBACK
EXPORT
mainWindowDispatcher
(
static
LRESULT
CALLBACK
EXPORT
mainWindowDispatcher
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
...
...
@@ -834,7 +836,7 @@ LRESULT CALLBACK EXPORT mainWindowDispatcher(
/* Class registration. One might call this a Windowsism. */
int
registerMainWindowClass
(
HINSTANCE
hInstance
)
static
int
registerMainWindowClass
(
HINSTANCE
hInstance
)
{
WNDCLASS
wndClass
;
...
...
@@ -862,7 +864,7 @@ int registerMainWindowClass(HINSTANCE hInstance)
* can get messy; at least here we don't have to worry about that).
*/
HWND
createMainWindow
(
HINSTANCE
hInstance
,
int
show
)
static
HWND
createMainWindow
(
HINSTANCE
hInstance
,
int
show
)
{
HWND
hWnd
;
...
...
@@ -888,7 +890,7 @@ HWND createMainWindow(HINSTANCE hInstance, int show)
return
hWnd
;
}
int
messageLoop
(
HINSTANCE
hInstance
,
HWND
hWnd
)
static
int
messageLoop
(
HINSTANCE
hInstance
,
HWND
hWnd
)
{
MSG
msg
;
...
...
programs/regedit/edit.c
View file @
d73dad66
...
...
@@ -46,7 +46,7 @@ struct edit_params
LONG
cbData
;
};
INT
vmessagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
va_list
ap
)
static
INT
vmessagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
va_list
ap
)
{
TCHAR
title
[
256
];
TCHAR
errfmt
[
1024
];
...
...
@@ -63,7 +63,7 @@ INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap)
return
MessageBox
(
hwnd
,
errstr
,
title
,
buttons
);
}
INT
messagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
...)
static
INT
messagebox
(
HWND
hwnd
,
INT
buttons
,
INT
titleId
,
INT
resId
,
...)
{
va_list
ap
;
INT
result
;
...
...
@@ -75,7 +75,7 @@ INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...)
return
result
;
}
void
error
(
HWND
hwnd
,
INT
resId
,
...)
static
void
error
(
HWND
hwnd
,
INT
resId
,
...)
{
va_list
ap
;
...
...
@@ -101,7 +101,7 @@ static void error_code_messagebox(HWND hwnd, DWORD error_code)
LocalFree
(
lpMsgBuf
);
}
BOOL
change_dword_base
(
HWND
hwndDlg
,
BOOL
toHex
)
static
BOOL
change_dword_base
(
HWND
hwndDlg
,
BOOL
toHex
)
{
TCHAR
buf
[
128
];
DWORD
val
;
...
...
@@ -112,7 +112,7 @@ BOOL change_dword_base(HWND hwndDlg, BOOL toHex)
return
SetDlgItemText
(
hwndDlg
,
IDC_VALUE_DATA
,
buf
);
}
INT_PTR
CALLBACK
modify_dlgproc
(
HWND
hwndDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
INT_PTR
CALLBACK
modify_dlgproc
(
HWND
hwndDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TCHAR
*
valueData
;
HWND
hwndValue
;
...
...
programs/regedit/framewnd.c
View file @
d73dad66
...
...
@@ -61,7 +61,7 @@ static void resize_frame_rect(HWND hWnd, PRECT prect)
MoveWindow
(
g_pChildWnd
->
hWnd
,
prect
->
left
,
prect
->
top
,
prect
->
right
,
prect
->
bottom
,
TRUE
);
}
void
resize_frame_client
(
HWND
hWnd
)
static
void
resize_frame_client
(
HWND
hWnd
)
{
RECT
rect
;
...
...
@@ -183,7 +183,7 @@ static BOOL CheckCommDlgError(HWND hWnd)
return
TRUE
;
}
UINT_PTR
CALLBACK
ImportRegistryFile_OFNHookProc
(
HWND
hdlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT_PTR
CALLBACK
ImportRegistryFile_OFNHookProc
(
HWND
hdlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
OPENFILENAME
*
pOpenFileName
;
OFNOTIFY
*
pOfNotify
;
...
...
@@ -319,7 +319,7 @@ static BOOL ExportRegistryFile(HWND hWnd)
return
TRUE
;
}
BOOL
PrintRegistryHive
(
HWND
hWnd
,
LP
TSTR
path
)
static
BOOL
PrintRegistryHive
(
HWND
hWnd
,
LPC
TSTR
path
)
{
#if 1
PRINTDLG
pd
;
...
...
@@ -384,7 +384,7 @@ BOOL PrintRegistryHive(HWND hWnd, LPTSTR path)
return
TRUE
;
}
BOOL
CopyKeyName
(
HWND
hWnd
,
LP
TSTR
keyName
)
static
BOOL
CopyKeyName
(
HWND
hWnd
,
LPC
TSTR
keyName
)
{
BOOL
result
;
...
...
programs/regedit/listview.c
View file @
d73dad66
...
...
@@ -58,7 +58,7 @@ static HKEY g_currentRootKey;
static
int
default_column_widths
[
MAX_LIST_COLUMNS
]
=
{
200
,
175
,
400
};
static
int
column_alignment
[
MAX_LIST_COLUMNS
]
=
{
LVCFMT_LEFT
,
LVCFMT_LEFT
,
LVCFMT_LEFT
};
LPTSTR
get_item_text
(
HWND
hwndLV
,
int
item
)
static
LPTSTR
get_item_text
(
HWND
hwndLV
,
int
item
)
{
LPTSTR
newStr
,
curStr
;
unsigned
int
maxLen
=
128
;
...
...
programs/regedit/main.c
View file @
d73dad66
...
...
@@ -66,7 +66,7 @@ TCHAR szChildClass[MAX_LOADSTRING];
* create and display the main program window.
*/
BOOL
InitInstance
(
HINSTANCE
hInstance
,
int
nCmdShow
)
static
BOOL
InitInstance
(
HINSTANCE
hInstance
,
int
nCmdShow
)
{
WNDCLASSEX
wcFrame
=
{
sizeof
(
WNDCLASSEX
),
...
...
@@ -142,12 +142,12 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
/******************************************************************************/
void
ExitInstance
(
void
)
static
void
ExitInstance
(
void
)
{
DestroyMenu
(
hMenuFrame
);
}
BOOL
TranslateChildTabMessage
(
MSG
*
msg
)
static
BOOL
TranslateChildTabMessage
(
MSG
*
msg
)
{
if
(
msg
->
message
!=
WM_KEYDOWN
)
return
FALSE
;
if
(
msg
->
wParam
!=
VK_TAB
)
return
FALSE
;
...
...
programs/regedit/regedit.c
View file @
d73dad66
...
...
@@ -23,7 +23,7 @@
#include <windows.h>
#include "regproc.h"
static
char
*
usage
=
static
c
onst
c
har
*
usage
=
"Usage:
\n
"
" regedit filename
\n
"
" regedit /E filename [regpath]
\n
"
...
...
@@ -68,7 +68,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s);
* chu - the switch character in upper-case.
* s - the command line string where s points to the switch character.
*/
void
error_unknown_switch
(
char
chu
,
char
*
s
)
static
void
error_unknown_switch
(
char
chu
,
char
*
s
)
{
if
(
isalpha
(
chu
))
{
fprintf
(
stderr
,
"%s: Undefined switch /%c!
\n
"
,
getAppName
(),
chu
);
...
...
programs/regedit/regproc.c
View file @
d73dad66
...
...
@@ -43,9 +43,9 @@ static HKEY currentKeyClass = 0;
static
HKEY
currentKeyHandle
=
0
;
static
BOOL
bTheKeyIsOpen
=
FALSE
;
static
CHAR
*
app_name
=
"UNKNOWN"
;
static
const
CHAR
*
app_name
=
"UNKNOWN"
;
static
CHAR
*
reg_class_names
[]
=
{
static
const
CHAR
*
reg_class_names
[]
=
{
"HKEY_LOCAL_MACHINE"
,
"HKEY_USERS"
,
"HKEY_CLASSES_ROOT"
,
"HKEY_CURRENT_CONFIG"
,
"HKEY_CURRENT_USER"
,
"HKEY_DYN_DATA"
};
...
...
@@ -343,7 +343,7 @@ LPSTR getArg( LPSTR arg)
/******************************************************************************
* Replaces escape sequences with the characters.
*/
void
REGPROC_unescape_string
(
LPSTR
str
)
static
void
REGPROC_unescape_string
(
LPSTR
str
)
{
int
str_idx
=
0
;
/* current character under analysis */
int
val_idx
=
0
;
/* the last character of the unescaped string */
...
...
@@ -1044,7 +1044,7 @@ void doUnregisterDLL(LPSTR stdInput)
* Print the message for GetLastError
*/
void
REGPROC_print_error
(
)
static
void
REGPROC_print_error
(
void
)
{
LPVOID
lpMsgBuf
;
DWORD
error_code
;
...
...
@@ -1073,7 +1073,7 @@ void REGPROC_print_error()
* required_len - length of the string to place to the buffer in characters.
* The length does not include the terminating null character.
*/
void
REGPROC_resize_char_buffer
(
CHAR
**
buffer
,
DWORD
*
len
,
DWORD
required_len
)
static
void
REGPROC_resize_char_buffer
(
CHAR
**
buffer
,
DWORD
*
len
,
DWORD
required_len
)
{
required_len
++
;
if
(
required_len
>
*
len
)
{
...
...
@@ -1089,7 +1089,7 @@ void REGPROC_resize_char_buffer(CHAR **buffer, DWORD *len, DWORD required_len)
/******************************************************************************
* Prints string str to file
*/
void
REGPROC_export_string
(
FILE
*
file
,
CHAR
*
str
)
static
void
REGPROC_export_string
(
FILE
*
file
,
CHAR
*
str
)
{
size_t
len
=
strlen
(
str
);
size_t
i
;
...
...
@@ -1130,7 +1130,7 @@ void REGPROC_export_string(FILE *file, CHAR *str)
* Is resized if necessary.
* val_size - size of the buffer for storing values in bytes.
*/
void
export_hkey
(
FILE
*
file
,
HKEY
key
,
static
void
export_hkey
(
FILE
*
file
,
HKEY
key
,
CHAR
**
reg_key_name_buf
,
DWORD
*
reg_key_name_len
,
CHAR
**
val_name_buf
,
DWORD
*
val_name_len
,
BYTE
**
val_buf
,
DWORD
*
val_size
)
...
...
@@ -1214,7 +1214,7 @@ void export_hkey(FILE *file, HKEY key,
/* falls through */
case
REG_BINARY
:
{
DWORD
i1
;
CHAR
*
hex_prefix
;
const
CHAR
*
hex_prefix
;
CHAR
buf
[
20
];
int
cur_pos
;
...
...
@@ -1284,7 +1284,7 @@ void export_hkey(FILE *file, HKEY key,
/******************************************************************************
* Open file for export.
*/
FILE
*
REGPROC_open_export_file
(
CHAR
*
file_name
)
static
FILE
*
REGPROC_open_export_file
(
CHAR
*
file_name
)
{
FILE
*
file
=
fopen
(
file_name
,
"w"
);
if
(
!
file
)
{
...
...
@@ -1405,7 +1405,7 @@ BOOL import_registry_file(LPTSTR filename)
/******************************************************************************
* Recursive function which removes the registry key with all subkeys.
*/
void
delete_branch
(
HKEY
key
,
static
void
delete_branch
(
HKEY
key
,
CHAR
**
reg_key_name_buf
,
DWORD
*
reg_key_name_len
)
{
HKEY
branch_key
;
...
...
@@ -1492,12 +1492,12 @@ void delete_registry_key(CHAR *reg_key_name)
* Sets the application name. Then application name is used in the error
* reporting.
*/
void
setAppName
(
CHAR
*
name
)
void
setAppName
(
const
CHAR
*
name
)
{
app_name
=
name
;
}
CHAR
*
getAppName
(
)
const
CHAR
*
getAppName
(
void
)
{
return
app_name
;
}
programs/regedit/regproc.h
View file @
d73dad66
...
...
@@ -40,8 +40,8 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name);
BOOL
import_registry_file
(
LPTSTR
filename
);
void
delete_registry_key
(
CHAR
*
reg_key_name
);
void
setAppName
(
CHAR
*
name
);
CHAR
*
getAppName
();
void
setAppName
(
const
CHAR
*
name
);
const
CHAR
*
getAppName
();
void
processRegLines
(
FILE
*
in
,
CommandAPI
command
);
...
...
@@ -71,3 +71,5 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data);
* api queryValue prototypes
*/
void
processQueryValue
(
LPSTR
cmdline
);
extern
BOOL
ProcessCmdLine
(
LPSTR
lpCmdLine
);
programs/regedit/treeview.c
View file @
d73dad66
...
...
@@ -136,7 +136,7 @@ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, HK
return
TreeView_InsertItem
(
hwndTV
,
&
tvins
);
}
BOOL
RefreshTreeItem
(
HWND
hwndTV
,
HTREEITEM
hItem
)
static
BOOL
RefreshTreeItem
(
HWND
hwndTV
,
HTREEITEM
hItem
)
{
HKEY
hRoot
,
hKey
,
hSubKey
;
HTREEITEM
childItem
;
...
...
programs/regsvr32/regsvr32.c
View file @
d73dad66
...
...
@@ -58,7 +58,7 @@ typedef HRESULT (*DLLINSTALL) (BOOL,LPCWSTR);
int
Silent
=
0
;
int
Usage
(
)
static
int
Usage
(
void
)
{
printf
(
"regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ...
\n
"
);
printf
(
"
\t
[/u] unregister server
\n
"
);
...
...
@@ -78,7 +78,7 @@ int Usage()
* procName - name of the procedure to load from dll
* pDllHanlde - output variable receives handle of the loaded dll.
*/
VOID
*
LoadProc
(
char
*
strDll
,
char
*
procName
,
HMODULE
*
DllHandle
)
static
VOID
*
LoadProc
(
const
char
*
strDll
,
const
char
*
procName
,
HMODULE
*
DllHandle
)
{
VOID
*
(
*
proc
)(
void
);
...
...
@@ -101,7 +101,7 @@ VOID *LoadProc(char* strDll, char* procName, HMODULE* DllHandle)
return
proc
;
}
int
RegisterDll
(
char
*
strDll
)
static
int
RegisterDll
(
const
char
*
strDll
)
{
HRESULT
hr
;
DLLREGISTER
pfRegister
;
...
...
@@ -125,7 +125,7 @@ int RegisterDll(char* strDll)
return
0
;
}
int
UnregisterDll
(
char
*
strDll
)
static
int
UnregisterDll
(
char
*
strDll
)
{
HRESULT
hr
;
DLLUNREGISTER
pfUnregister
;
...
...
@@ -148,7 +148,7 @@ int UnregisterDll(char* strDll)
return
0
;
}
int
InstallDll
(
BOOL
install
,
char
*
strDll
,
WCHAR
*
command_line
)
static
int
InstallDll
(
BOOL
install
,
char
*
strDll
,
WCHAR
*
command_line
)
{
HRESULT
hr
;
DLLINSTALL
pfInstall
;
...
...
programs/rpcss/rpcss_main.c
View file @
d73dad66
...
...
@@ -155,12 +155,12 @@ void RPCSS_SetLazyTimeRemaining(long seconds)
#undef ULARGEINT_TO_FILETIME
#undef TEN_MIL
BOOL
RPCSS_work
(
void
)
static
BOOL
RPCSS_work
(
void
)
{
return
RPCSS_NPDoWork
();
}
BOOL
RPCSS_Empty
(
void
)
static
BOOL
RPCSS_Empty
(
void
)
{
BOOL
rslt
=
TRUE
;
...
...
@@ -177,7 +177,7 @@ BOOL RPCSS_ReadyToDie(void)
return
(
empty
&&
(
ltr
<=
0
)
&&
(
stc
==
0
)
);
}
BOOL
RPCSS_Initialize
(
void
)
static
BOOL
RPCSS_Initialize
(
void
)
{
WINE_TRACE
(
"
\n
"
);
...
...
@@ -201,7 +201,7 @@ BOOL RPCSS_Initialize(void)
/* returns false if we discover at the last moment that we
aren't ready to terminate */
BOOL
RPCSS_Shutdown
(
void
)
static
BOOL
RPCSS_Shutdown
(
void
)
{
if
(
!
RPCSS_UnBecomePipeServer
())
return
FALSE
;
...
...
@@ -214,7 +214,7 @@ BOOL RPCSS_Shutdown(void)
return
TRUE
;
}
void
RPCSS_MainLoop
(
void
)
static
void
RPCSS_MainLoop
(
void
)
{
BOOL
did_something_new
;
...
...
@@ -234,7 +234,7 @@ void RPCSS_MainLoop(void)
}
}
BOOL
RPCSS_ProcessArgs
(
int
argc
,
char
**
argv
)
static
BOOL
RPCSS_ProcessArgs
(
int
argc
,
char
**
argv
)
{
int
i
;
char
*
c
,
*
c1
;
...
...
@@ -280,7 +280,7 @@ BOOL RPCSS_ProcessArgs( int argc, char **argv )
return
TRUE
;
}
void
RPCSS_Usage
(
void
)
static
void
RPCSS_Usage
(
void
)
{
printf
(
"
\n
Wine RPCSS
\n
"
);
printf
(
"
\n
syntax: rpcss [-t timeout]
\n\n
"
);
...
...
programs/winedbg/dbg.y
View file @
d73dad66
...
...
@@ -461,8 +461,11 @@ int input_fetch_entire_line(const char* pfx, char** line, size_t* alloc, BO
size_t len;
if (arg_command) {
/* we only run one command before exiting */
const char q[] = "quit\n";
*line = arg_command;
arg_command = "quit\n"; /* we only run one command before exiting */
arg_command = HeapAlloc(GetProcessHeap(), 0, sizeof q);
lstrcpyA(arg_command, q);
return 1;
}
...
...
programs/winetest/main.c
View file @
d73dad66
...
...
@@ -60,7 +60,7 @@ static struct wine_test *wine_tests;
static
struct
rev_info
*
rev_infos
=
NULL
;
static
const
char
whitespace
[]
=
"
\t\r\n
"
;
static
int
running_under_wine
()
static
int
running_under_wine
(
void
)
{
HMODULE
module
=
GetModuleHandleA
(
"ntdll.dll"
);
...
...
@@ -68,7 +68,7 @@ static int running_under_wine ()
return
(
GetProcAddress
(
module
,
"wine_server_call"
)
!=
NULL
);
}
static
int
running_on_visible_desktop
()
static
int
running_on_visible_desktop
(
void
)
{
HWND
desktop
;
HMODULE
huser32
=
GetModuleHandle
(
"user32.dll"
);
...
...
@@ -92,7 +92,7 @@ static int running_on_visible_desktop ()
return
IsWindowVisible
(
desktop
);
}
void
print_version
(
)
static
void
print_version
(
void
)
{
OSVERSIONINFOEX
ver
;
BOOL
ext
;
...
...
@@ -125,7 +125,7 @@ static inline int is_dot_dir(const char* x)
return
((
x
[
0
]
==
'.'
)
&&
((
x
[
1
]
==
0
)
||
((
x
[
1
]
==
'.'
)
&&
(
x
[
2
]
==
0
))));
}
void
remove_dir
(
const
char
*
dir
)
static
void
remove_dir
(
const
char
*
dir
)
{
HANDLE
hFind
;
WIN32_FIND_DATA
wfd
;
...
...
@@ -156,7 +156,7 @@ void remove_dir (const char *dir)
dir
,
GetLastError
());
}
const
char
*
get_test_source_file
(
const
char
*
test
,
const
char
*
subtest
)
static
const
char
*
get_test_source_file
(
const
char
*
test
,
const
char
*
subtest
)
{
static
const
char
*
special_dirs
[][
2
]
=
{
{
"gdi32"
,
"gdi"
},
{
"kernel32"
,
"kernel"
},
...
...
@@ -178,7 +178,7 @@ const char* get_test_source_file(const char* test, const char* subtest)
return
buffer
;
}
const
char
*
get_file_rev
(
const
char
*
file
)
static
const
char
*
get_file_rev
(
const
char
*
file
)
{
const
struct
rev_info
*
rev
;
...
...
@@ -189,7 +189,7 @@ const char* get_file_rev(const char* file)
return
"-"
;
}
void
extract_rev_infos
(
)
static
void
extract_rev_infos
(
void
)
{
char
revinfo
[
256
],
*
p
;
int
size
=
0
,
i
;
...
...
@@ -215,7 +215,7 @@ void extract_rev_infos ()
}
}
void
*
extract_rcdata
(
int
id
,
int
type
,
DWORD
*
size
)
static
void
*
extract_rcdata
(
int
id
,
int
type
,
DWORD
*
size
)
{
HRSRC
rsrc
;
HGLOBAL
hdl
;
...
...
@@ -230,7 +230,7 @@ void* extract_rcdata (int id, int type, DWORD* size)
}
/* Fills in the name and exename fields */
void
static
void
extract_test
(
struct
wine_test
*
test
,
const
char
*
dir
,
int
id
)
{
BYTE
*
code
;
...
...
@@ -268,7 +268,7 @@ extract_test (struct wine_test *test, const char *dir, int id)
Return the exit status, -2 if can't create process or the return
value of WaitForSingleObject.
*/
int
static
int
run_ex
(
char
*
cmd
,
const
char
*
out
,
DWORD
ms
)
{
STARTUPINFO
si
;
...
...
@@ -345,7 +345,7 @@ run_ex (char *cmd, const char *out, DWORD ms)
return
status
;
}
void
static
void
get_subtests
(
const
char
*
tempdir
,
struct
wine_test
*
test
,
int
id
)
{
char
*
subname
,
*
cmd
;
...
...
@@ -410,7 +410,7 @@ get_subtests (const char *tempdir, struct wine_test *test, int id)
free
(
subname
);
}
void
static
void
run_test
(
struct
wine_test
*
test
,
const
char
*
subtest
)
{
int
status
;
...
...
@@ -424,7 +424,7 @@ run_test (struct wine_test* test, const char* subtest)
xprintf
(
"%s:%s done (%d)
\n
"
,
test
->
name
,
subtest
,
status
);
}
BOOL
CALLBACK
static
BOOL
CALLBACK
EnumTestFileProc
(
HMODULE
hModule
,
LPCTSTR
lpszType
,
LPTSTR
lpszName
,
LONG_PTR
lParam
)
{
...
...
@@ -432,7 +432,7 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
return
TRUE
;
}
char
*
static
char
*
run_tests
(
char
*
logname
)
{
int
nr_of_files
=
0
,
nr_of_tests
=
0
,
i
;
...
...
@@ -542,8 +542,8 @@ run_tests (char *logname)
return
logname
;
}
void
usage
()
static
void
usage
(
void
)
{
fprintf
(
stderr
,
"\
Usage: winetest [OPTION]...
\n\n
\
...
...
programs/winetest/send.c
View file @
d73dad66
...
...
@@ -24,7 +24,7 @@
#include "winetest.h"
SOCKET
static
SOCKET
open_http
(
const
char
*
server
)
{
WSADATA
wsad
;
...
...
@@ -61,7 +61,7 @@ open_http (const char *server)
return
INVALID_SOCKET
;
}
int
static
int
close_http
(
SOCKET
s
)
{
int
ret
;
...
...
@@ -70,7 +70,7 @@ close_http (SOCKET s)
return
(
WSACleanup
()
||
ret
);
}
int
static
int
send_buf
(
SOCKET
s
,
const
char
*
buf
,
size_t
length
)
{
int
sent
;
...
...
@@ -84,7 +84,7 @@ send_buf (SOCKET s, const char *buf, size_t length)
return
0
;
}
int
static
int
send_str
(
SOCKET
s
,
...)
{
va_list
ap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment