summaryrefslogtreecommitdiff
path: root/src/os_mswin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-12 19:37:17 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-12 19:37:17 +0200
commita80faa8930ed5a554beeb2727762538873135e83 (patch)
treee797605e0c781214543fcba103cffede7af611cd /src/os_mswin.c
parent82de464f763d6e6d89229be03ce7c6d02fd5fb59 (diff)
downloadvim-git-a80faa8930ed5a554beeb2727762538873135e83.tar.gz
patch 8.2.0559: clearing a struct is verbosev8.2.0559
Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r--src/os_mswin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index faa4c99db..1c987c2d6 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1338,7 +1338,7 @@ mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
int i;
bUserAbort = &(psettings->user_abort);
- vim_memset(&prt_dlg, 0, sizeof(PRINTDLGW));
+ CLEAR_FIELD(prt_dlg);
prt_dlg.lStructSize = sizeof(PRINTDLGW);
# if !defined(FEAT_GUI) || defined(VIMDLL)
# ifdef VIMDLL
@@ -1467,7 +1467,7 @@ mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
/*
* Initialise the font according to 'printfont'
*/
- vim_memset(&fLogFont, 0, sizeof(fLogFont));
+ CLEAR_FIELD(fLogFont);
if (get_logfont(&fLogFont, p_pfn, prt_dlg.hDC, TRUE) == FAIL)
{
semsg(_("E613: Unknown printer font: %s"), p_pfn);
@@ -1562,7 +1562,7 @@ mch_print_begin(prt_settings_T *psettings)
{
DOCINFOW di;
- vim_memset(&di, 0, sizeof(di));
+ CLEAR_FIELD(di);
di.cbSize = sizeof(di);
di.lpszDocName = wp;
ret = StartDocW(prt_dlg.hDC, &di);
@@ -2881,7 +2881,7 @@ get_logfont(
# if defined(FEAT_GUI_MSWIN)
CHOOSEFONTW cf;
// if name is "*", bring up std font dialog:
- vim_memset(&cf, 0, sizeof(cf));
+ CLEAR_FIELD(cf);
cf.lStructSize = sizeof(cf);
cf.hwndOwner = s_hwnd;
cf.Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY | CF_INITTOLOGFONTSTRUCT;