Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e9e96bc3
Commit
e9e96bc3
authored
Jul 09, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
view: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
56c4c7c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
view.c
programs/view/view.c
+6
-6
No files found.
programs/view/view.c
View file @
e9e96bc3
...
...
@@ -214,12 +214,12 @@ static void UpdateWindowCaption(void)
WCHAR
szView
[
MAX_PATH
];
static
const
WCHAR
hyphenW
[]
=
{
' '
,
'-'
,
' '
,
0
};
LoadStringW
(
hInst
,
IDS_DESCRIPTION
,
szView
,
sizeof
(
szView
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_DESCRIPTION
,
szView
,
ARRAY_SIZE
(
szView
));
if
(
szFileTitle
[
0
]
!=
'\0'
)
{
lstrcpyW
(
szCaption
,
szFileTitle
);
LoadStringW
(
hInst
,
IDS_DESCRIPTION
,
szView
,
sizeof
(
szView
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInst
,
IDS_DESCRIPTION
,
szView
,
ARRAY_SIZE
(
szView
));
lstrcatW
(
szCaption
,
hyphenW
);
lstrcatW
(
szCaption
,
szView
);
}
...
...
@@ -260,10 +260,10 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM
case
IDM_OPEN
:
{
WCHAR
filename
[
MAX_PATH
];
if
(
FileOpen
(
hwnd
,
filename
,
sizeof
(
filename
)
/
sizeof
(
WCHAR
)))
if
(
FileOpen
(
hwnd
,
filename
,
ARRAY_SIZE
(
filename
)))
{
szFileTitle
[
0
]
=
0
;
GetFileTitleW
(
filename
,
szFileTitle
,
sizeof
(
szFileTitle
)
/
sizeof
(
WCHAR
));
GetFileTitleW
(
filename
,
szFileTitle
,
ARRAY_SIZE
(
szFileTitle
));
DoOpenFile
(
filename
);
UpdateWindowCaption
();
}
...
...
@@ -323,7 +323,7 @@ static BOOL InitApplication(HINSTANCE hInstance)
WNDCLASSEXW
wc
;
/* Load the application description strings */
LoadStringW
(
hInstance
,
IDS_DESCRIPTION
,
szTitle
,
sizeof
(
szTitle
)
/
sizeof
(
WCHAR
));
LoadStringW
(
hInstance
,
IDS_DESCRIPTION
,
szTitle
,
ARRAY_SIZE
(
szTitle
));
/* Fill in window class structure with parameters that describe the
main window */
...
...
@@ -390,7 +390,7 @@ static void HandleCommandLine(LPWSTR cmdline)
cmdline
[
lstrlenW
(
cmdline
)
-
1
]
=
0
;
}
szFileTitle
[
0
]
=
0
;
GetFileTitleW
(
cmdline
,
szFileTitle
,
sizeof
(
szFileTitle
)
/
sizeof
(
WCHAR
));
GetFileTitleW
(
cmdline
,
szFileTitle
,
ARRAY_SIZE
(
szFileTitle
));
DoOpenFile
(
cmdline
);
UpdateWindowCaption
();
}
...
...
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