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
e4f68323
Commit
e4f68323
authored
Jul 24, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f5b224b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wordpad.c
programs/wordpad/wordpad.c
+7
-7
No files found.
programs/wordpad/wordpad.c
View file @
e4f68323
...
...
@@ -250,7 +250,7 @@ static void set_caption(LPCWSTR wszNewFileName)
memcpy
(
wszCaption
,
wszNewFileName
,
lstrlenW
(
wszNewFileName
)
*
sizeof
(
WCHAR
));
length
+=
lstrlenW
(
wszNewFileName
);
memcpy
(
wszCaption
+
length
,
wszSeparator
,
sizeof
(
wszSeparator
));
length
+=
sizeof
(
wszSeparator
)
/
sizeof
(
WCHAR
);
length
+=
ARRAY_SIZE
(
wszSeparator
);
memcpy
(
wszCaption
+
length
,
wszAppTitle
,
sizeof
(
wszAppTitle
));
SetWindowTextW
(
hMainWnd
,
wszCaption
);
...
...
@@ -398,7 +398,7 @@ static void populate_size_list(HWND hSizeListWnd)
GetDeviceCaps
(
hdc
,
LOGPIXELSY
)));
}
else
{
for
(
i
=
0
;
i
<
sizeof
(
choices
)
/
sizeof
(
choices
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
choices
);
i
++
)
add_size
(
hSizeListWnd
,
choices
[
i
]);
}
...
...
@@ -1124,7 +1124,7 @@ static void dialog_viewproperties(void)
psp
[
0
].
lParam
=
reg_formatindex
(
SF_TEXT
);
psp
[
0
].
pfnCallback
=
NULL
;
psp
[
0
].
pszTitle
=
MAKEINTRESOURCEW
(
STRING_VIEWPROPS_TEXT
);
for
(
i
=
1
;
i
<
sizeof
(
psp
)
/
sizeof
(
psp
[
0
]
);
i
++
)
for
(
i
=
1
;
i
<
ARRAY_SIZE
(
psp
);
i
++
)
{
psp
[
i
].
dwSize
=
psp
[
0
].
dwSize
;
psp
[
i
].
dwFlags
=
psp
[
0
].
dwFlags
;
...
...
@@ -1141,7 +1141,7 @@ static void dialog_viewproperties(void)
psh
.
hwndParent
=
hMainWnd
;
psh
.
hInstance
=
hInstance
;
psh
.
pszCaption
=
MAKEINTRESOURCEW
(
STRING_VIEWPROPS_TITLE
);
psh
.
nPages
=
sizeof
(
psp
)
/
sizeof
(
psp
[
0
]
);
psh
.
nPages
=
ARRAY_SIZE
(
psp
);
U3
(
psh
).
ppsp
=
ppsp
;
U
(
psh
).
pszIcon
=
MAKEINTRESOURCEW
(
IDI_WORDPAD
);
...
...
@@ -1235,7 +1235,7 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
if
(
pFr
->
lpstrFindWhat
!=
custom_data
->
findBuffer
)
{
lstrcpynW
(
custom_data
->
findBuffer
,
pFr
->
lpstrFindWhat
,
sizeof
(
custom_data
->
findBuffer
)
/
sizeof
(
WCHAR
));
ARRAY_SIZE
(
custom_data
->
findBuffer
));
pFr
->
lpstrFindWhat
=
custom_data
->
findBuffer
;
}
...
...
@@ -1885,8 +1885,8 @@ static LRESULT OnCreate( HWND hWnd )
font
=
(
HFONT
)
SendMessageW
(
hFontListWnd
,
WM_GETFONT
,
0
,
0
);
hdc
=
GetDC
(
hFontListWnd
);
font
=
SelectObject
(
hdc
,
font
);
GetTextExtentPointW
(
hdc
,
font_text
,
sizeof
(
font_text
)
/
sizeof
(
font_text
[
0
]
)
-
1
,
&
name_sz
);
GetTextExtentPointW
(
hdc
,
size_text
,
sizeof
(
size_text
)
/
sizeof
(
size_text
[
0
]
)
-
1
,
&
size_sz
);
GetTextExtentPointW
(
hdc
,
font_text
,
ARRAY_SIZE
(
font_text
)
-
1
,
&
name_sz
);
GetTextExtentPointW
(
hdc
,
size_text
,
ARRAY_SIZE
(
size_text
)
-
1
,
&
size_sz
);
font
=
SelectObject
(
hdc
,
font
);
ReleaseDC
(
hFontListWnd
,
hdc
);
rbb
.
hwndChild
=
hFontListWnd
;
...
...
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