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
f836995e
Commit
f836995e
authored
Nov 05, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8d0ef952
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
main.c
dlls/cryptui/main.c
+11
-14
No files found.
dlls/cryptui/main.c
View file @
f836995e
...
@@ -7013,32 +7013,32 @@ static void init_columns(HWND lv, DWORD flags)
...
@@ -7013,32 +7013,32 @@ static void init_columns(HWND lv, DWORD flags)
column
.
pszText
=
buf
;
column
.
pszText
=
buf
;
if
(
!
(
flags
&
CRYPTUI_SELECT_ISSUEDTO_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_ISSUEDTO_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_SUBJECT_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_SUBJECT_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_ISSUEDBY_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_ISSUEDBY_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_ISSUER_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_ISSUER_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_INTENDEDUSE_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_INTENDEDUSE_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_INTENDED_USE_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_INTENDED_USE_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_FRIENDLYNAME_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_FRIENDLYNAME_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_FRIENDLY_NAME_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_FRIENDLY_NAME_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_EXPIRATION_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_EXPIRATION_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_EXPIRATION_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_EXPIRATION_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_LOCATION_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_LOCATION_COLUMN
))
{
{
LoadStringW
(
hInstance
,
IDS_LOCATION_COLUMN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_LOCATION_COLUMN
,
buf
,
ARRAY_SIZE
(
buf
));
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
SendMessageW
(
lv
,
LVM_INSERTCOLUMNW
,
i
++
,
(
LPARAM
)
&
column
);
}
}
}
}
...
@@ -7149,11 +7149,9 @@ static void add_cert_to_list(HWND lv, PCCERT_CONTEXT cert, DWORD flags, DWORD *a
...
@@ -7149,11 +7149,9 @@ static void add_cert_to_list(HWND lv, PCCERT_CONTEXT cert, DWORD flags, DWORD *a
}
}
if
(
!
(
flags
&
CRYPTUI_SELECT_EXPIRATION_COLUMN
))
if
(
!
(
flags
&
CRYPTUI_SELECT_EXPIRATION_COLUMN
))
{
{
GetLocaleInfoW
(
LOCALE_SYSTEM_DEFAULT
,
LOCALE_SSHORTDATE
,
dateFmt
,
GetLocaleInfoW
(
LOCALE_SYSTEM_DEFAULT
,
LOCALE_SSHORTDATE
,
dateFmt
,
ARRAY_SIZE
(
dateFmt
));
sizeof
(
dateFmt
)
/
sizeof
(
dateFmt
[
0
]));
FileTimeToSystemTime
(
&
cert
->
pCertInfo
->
NotAfter
,
&
sysTime
);
FileTimeToSystemTime
(
&
cert
->
pCertInfo
->
NotAfter
,
&
sysTime
);
GetDateFormatW
(
LOCALE_SYSTEM_DEFAULT
,
0
,
&
sysTime
,
dateFmt
,
buf
,
GetDateFormatW
(
LOCALE_SYSTEM_DEFAULT
,
0
,
&
sysTime
,
dateFmt
,
buf
,
ARRAY_SIZE
(
buf
));
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]));
item
.
pszText
=
buf
;
item
.
pszText
=
buf
;
if
(
!
item
.
iSubItem
)
if
(
!
item
.
iSubItem
)
SendMessageW
(
lv
,
LVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
item
);
SendMessageW
(
lv
,
LVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
item
);
...
@@ -7167,7 +7165,7 @@ static void add_cert_to_list(HWND lv, PCCERT_CONTEXT cert, DWORD flags, DWORD *a
...
@@ -7167,7 +7165,7 @@ static void add_cert_to_list(HWND lv, PCCERT_CONTEXT cert, DWORD flags, DWORD *a
static
int
show_fixme
;
static
int
show_fixme
;
if
(
!
show_fixme
++
)
if
(
!
show_fixme
++
)
FIXME
(
"showing location is not implemented
\n
"
);
FIXME
(
"showing location is not implemented
\n
"
);
LoadStringW
(
hInstance
,
IDS_NO_IMPL
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_NO_IMPL
,
buf
,
ARRAY_SIZE
(
buf
));
if
(
!
item
.
iSubItem
)
if
(
!
item
.
iSubItem
)
SendMessageW
(
lv
,
LVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
item
);
SendMessageW
(
lv
,
LVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
item
);
else
else
...
@@ -7373,10 +7371,9 @@ static LRESULT CALLBACK select_cert_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPA
...
@@ -7373,10 +7371,9 @@ static LRESULT CALLBACK select_cert_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPA
{
{
WCHAR
buf
[
40
],
title
[
40
];
WCHAR
buf
[
40
],
title
[
40
];
LoadStringW
(
hInstance
,
IDS_SELECT_CERT
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
LoadStringW
(
hInstance
,
IDS_SELECT_CERT
,
buf
,
ARRAY_SIZE
(
buf
));
if
(
!
data
->
title
)
if
(
!
data
->
title
)
LoadStringW
(
hInstance
,
IDS_SELECT_CERT_TITLE
,
title
,
LoadStringW
(
hInstance
,
IDS_SELECT_CERT_TITLE
,
title
,
ARRAY_SIZE
(
title
));
sizeof
(
title
)
/
sizeof
(
title
[
0
]));
MessageBoxW
(
hwnd
,
buf
,
data
->
title
?
data
->
title
:
title
,
MB_OK
|
MB_ICONWARNING
);
MessageBoxW
(
hwnd
,
buf
,
data
->
title
?
data
->
title
:
title
,
MB_OK
|
MB_ICONWARNING
);
break
;
break
;
}
}
...
...
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