summaryrefslogtreecommitdiffstats
path: root/src/windows
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/windows
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/cns/cns.c58
-rw-r--r--src/windows/cns/cns_reg.c6
-rw-r--r--src/windows/cns/debug.c3
-rw-r--r--src/windows/cns/kpasswd.c2
-rw-r--r--src/windows/cns/krbini.h2
-rw-r--r--src/windows/cns/options.c4
-rw-r--r--src/windows/cns/tktlist.c40
-rw-r--r--src/windows/cns/tktlist.h4
-rw-r--r--src/windows/gina/ginastub.c17
-rw-r--r--src/windows/gss/gss-client.c44
-rw-r--r--src/windows/gss/gss-misc.c41
-rw-r--r--src/windows/gss/gss-misc.h4
-rw-r--r--src/windows/gss/gss.c44
-rw-r--r--src/windows/gss/gss.h14
-rw-r--r--src/windows/gss/resource.h2
-rw-r--r--src/windows/identity/config/netidmgr_intver.h.in3
-rw-r--r--src/windows/identity/config/netidmgr_version.h.in1
-rw-r--r--src/windows/identity/doc/cred_aquisition.h2
-rw-r--r--src/windows/identity/doc/cred_data_types.h2
-rw-r--r--src/windows/identity/doc/main_page.h6
-rw-r--r--src/windows/identity/doc/plugin_framework.h2
-rw-r--r--src/windows/identity/doc/plugin_locale.h4
-rw-r--r--src/windows/identity/doc/plugin_main.h2
-rw-r--r--src/windows/identity/doc/ui_context.h2
-rw-r--r--src/windows/identity/include/khdefs.h6
-rw-r--r--src/windows/identity/include/kherror.h2
-rw-r--r--src/windows/identity/include/khmsgtypes.h14
-rw-r--r--src/windows/identity/kconfig/api.c196
-rw-r--r--src/windows/identity/kconfig/kconfig.h118
-rw-r--r--src/windows/identity/kconfig/registry.c1
-rw-r--r--src/windows/identity/kconfig/test/utiltest.c2
-rw-r--r--src/windows/identity/kcreddb/attrib.c110
-rw-r--r--src/windows/identity/kcreddb/buf.c23
-rw-r--r--src/windows/identity/kcreddb/credential.c90
-rw-r--r--src/windows/identity/kcreddb/credset.c96
-rw-r--r--src/windows/identity/kcreddb/credtype.c24
-rw-r--r--src/windows/identity/kcreddb/credtype.h2
-rw-r--r--src/windows/identity/kcreddb/identity.c146
-rw-r--r--src/windows/identity/kcreddb/kcreddb.h472
-rw-r--r--src/windows/identity/kcreddb/langres.h2
-rw-r--r--src/windows/identity/kcreddb/resource.h2
-rw-r--r--src/windows/identity/kcreddb/type.c108
-rw-r--r--src/windows/identity/kcreddb/type.h56
-rw-r--r--src/windows/identity/kherr/kherr.c33
-rw-r--r--src/windows/identity/kherr/kherr.h36
-rw-r--r--src/windows/identity/kmm/kmm.h84
-rw-r--r--src/windows/identity/kmm/kmm_module.c46
-rw-r--r--src/windows/identity/kmm/kmm_plugin.c33
-rw-r--r--src/windows/identity/kmm/kmm_reg.c38
-rw-r--r--src/windows/identity/kmm/kmm_registrar.c44
-rw-r--r--src/windows/identity/kmm/kmminternal.h26
-rw-r--r--src/windows/identity/kmm/kmmmain.c11
-rw-r--r--src/windows/identity/kmm/kplugin.h2
-rw-r--r--src/windows/identity/kmq/consumer.c16
-rw-r--r--src/windows/identity/kmq/init.c4
-rw-r--r--src/windows/identity/kmq/kmq.h100
-rw-r--r--src/windows/identity/kmq/kmqinternal.h8
-rw-r--r--src/windows/identity/kmq/msgtype.c8
-rw-r--r--src/windows/identity/kmq/publisher.c111
-rw-r--r--src/windows/identity/nidmgrdll/dllmain.c2
-rw-r--r--src/windows/identity/plugins/common/dynimport.c12
-rw-r--r--src/windows/identity/plugins/common/krb5common.c68
-rw-r--r--src/windows/identity/plugins/common/krb5common.h6
-rw-r--r--src/windows/identity/plugins/krb4/errorfuncs.c11
-rw-r--r--src/windows/identity/plugins/krb4/errorfuncs.h2
-rw-r--r--src/windows/identity/plugins/krb4/krb4configdlg.c14
-rw-r--r--src/windows/identity/plugins/krb4/krb4funcs.c76
-rw-r--r--src/windows/identity/plugins/krb4/krb4funcs.h6
-rw-r--r--src/windows/identity/plugins/krb4/krb4newcreds.c4
-rw-r--r--src/windows/identity/plugins/krb4/krb4plugin.c32
-rw-r--r--src/windows/identity/plugins/krb4/krbcred.h4
-rw-r--r--src/windows/identity/plugins/krb4/langres.h2
-rw-r--r--src/windows/identity/plugins/krb5/datarep.c13
-rw-r--r--src/windows/identity/plugins/krb5/errorfuncs.c14
-rw-r--r--src/windows/identity/plugins/krb5/errorfuncs.h8
-rw-r--r--src/windows/identity/plugins/krb5/krb5configcc.c8
-rw-r--r--src/windows/identity/plugins/krb5/krb5configdlg.c42
-rw-r--r--src/windows/identity/plugins/krb5/krb5configid.c2
-rw-r--r--src/windows/identity/plugins/krb5/krb5configids.c7
-rw-r--r--src/windows/identity/plugins/krb5/krb5funcs.c124
-rw-r--r--src/windows/identity/plugins/krb5/krb5funcs.h20
-rw-r--r--src/windows/identity/plugins/krb5/krb5identpro.c44
-rw-r--r--src/windows/identity/plugins/krb5/krb5main.c10
-rw-r--r--src/windows/identity/plugins/krb5/krb5newcreds.c186
-rw-r--r--src/windows/identity/plugins/krb5/krb5plugin.c18
-rw-r--r--src/windows/identity/plugins/krb5/krb5props.c15
-rw-r--r--src/windows/identity/plugins/krb5/krbcred.h32
-rw-r--r--src/windows/identity/plugins/krb5/langres.h2
-rw-r--r--src/windows/identity/sample/templates/credprov/langres.h2
-rw-r--r--src/windows/identity/sample/templates/credprov/proppage.c1
-rw-r--r--src/windows/identity/ui/aboutwnd.c2
-rw-r--r--src/windows/identity/ui/addrchange.c2
-rw-r--r--src/windows/identity/ui/cfg_general_wnd.c2
-rw-r--r--src/windows/identity/ui/cfg_identities_wnd.c34
-rw-r--r--src/windows/identity/ui/cfg_notif_wnd.c18
-rw-r--r--src/windows/identity/ui/cfg_plugins_wnd.c10
-rw-r--r--src/windows/identity/ui/configwnd.c26
-rw-r--r--src/windows/identity/ui/configwnd.h2
-rw-r--r--src/windows/identity/ui/credfuncs.c66
-rw-r--r--src/windows/identity/ui/credfuncs.h20
-rw-r--r--src/windows/identity/ui/credwnd.c300
-rw-r--r--src/windows/identity/ui/debugfuncs.c2
-rw-r--r--src/windows/identity/ui/htwnd.c24
-rw-r--r--src/windows/identity/ui/main.c16
-rw-r--r--src/windows/identity/ui/mainmenu.c86
-rw-r--r--src/windows/identity/ui/mainwnd.c88
-rw-r--r--src/windows/identity/ui/mainwnd.h2
-rw-r--r--src/windows/identity/ui/newcredwnd.c146
-rw-r--r--src/windows/identity/ui/notifier.c53
-rw-r--r--src/windows/identity/ui/notifier.h8
-rw-r--r--src/windows/identity/ui/passwnd.c16
-rw-r--r--src/windows/identity/ui/propertywnd.c12
-rw-r--r--src/windows/identity/ui/reqdaemon.c6
-rw-r--r--src/windows/identity/ui/resource.h2
-rw-r--r--src/windows/identity/ui/statusbar.c6
-rw-r--r--src/windows/identity/ui/timer.c46
-rw-r--r--src/windows/identity/ui/timer.h2
-rw-r--r--src/windows/identity/ui/toolbar.c78
-rw-r--r--src/windows/identity/uilib/action.c58
-rw-r--r--src/windows/identity/uilib/alert.c64
-rw-r--r--src/windows/identity/uilib/configui.c36
-rw-r--r--src/windows/identity/uilib/creddlg.c112
-rw-r--r--src/windows/identity/uilib/intalert.h6
-rw-r--r--src/windows/identity/uilib/khaction.h32
-rw-r--r--src/windows/identity/uilib/khactiondef.h2
-rw-r--r--src/windows/identity/uilib/khalerts.h62
-rw-r--r--src/windows/identity/uilib/khconfigui.h16
-rw-r--r--src/windows/identity/uilib/khhtlink.h4
-rw-r--r--src/windows/identity/uilib/khnewcred.h92
-rw-r--r--src/windows/identity/uilib/khprops.h18
-rw-r--r--src/windows/identity/uilib/khremote.h4
-rw-r--r--src/windows/identity/uilib/khrescache.h28
-rw-r--r--src/windows/identity/uilib/khtracker.h2
-rw-r--r--src/windows/identity/uilib/propsheet.c20
-rw-r--r--src/windows/identity/uilib/rescache.c62
-rw-r--r--src/windows/identity/uilib/trackerwnd.c39
-rw-r--r--src/windows/identity/uilib/uibind.c3
-rw-r--r--src/windows/identity/util/hashtable.c8
-rw-r--r--src/windows/identity/util/hashtable.h4
-rw-r--r--src/windows/identity/util/mstring.c44
-rw-r--r--src/windows/identity/util/mstring.h46
-rw-r--r--src/windows/identity/util/perfstat.c2
-rw-r--r--src/windows/identity/util/sync.c4
-rw-r--r--src/windows/kfwlogon/kfwcommon.c86
-rw-r--r--src/windows/kfwlogon/kfwcpcc.c2
-rw-r--r--src/windows/kfwlogon/kfwlogon.c82
-rw-r--r--src/windows/kfwlogon/kfwlogon.h4
-rw-r--r--src/windows/lib/cacheapi.h98
-rw-r--r--src/windows/lib/registry.c4
-rw-r--r--src/windows/lib/vardlg.c6
-rw-r--r--src/windows/ms2mit/mit2ms.c6
-rw-r--r--src/windows/ms2mit/ms2mit.c8
-rw-r--r--src/windows/ntsecapitest.c4
-rw-r--r--src/windows/winlevel.h6
-rw-r--r--src/windows/wintel/auth.c46
-rw-r--r--src/windows/wintel/edit.c58
-rw-r--r--src/windows/wintel/emul.c230
-rw-r--r--src/windows/wintel/enc_des.c6
-rw-r--r--src/windows/wintel/encrypt.c20
-rw-r--r--src/windows/wintel/font.c10
-rw-r--r--src/windows/wintel/intern.c44
-rw-r--r--src/windows/wintel/k5stream.c21
-rw-r--r--src/windows/wintel/negotiat.c46
-rw-r--r--src/windows/wintel/resource.h2
-rw-r--r--src/windows/wintel/screen.c44
-rw-r--r--src/windows/wintel/screen.h6
-rw-r--r--src/windows/wintel/telnet.c190
-rw-r--r--src/windows/wintel/telopts.h8
168 files changed, 3005 insertions, 3041 deletions
diff --git a/src/windows/cns/cns.c b/src/windows/cns/cns.c
index 7a02abba7e..c8ca069379 100644
--- a/src/windows/cns/cns.c
+++ b/src/windows/cns/cns.c
@@ -576,7 +576,7 @@ kwin_init_name(HWND hwnd, char *fullname)
#ifdef KRB5
krb5_error_code code;
char *ptr;
-#endif
+#endif
if (fullname == NULL || fullname[0] == 0) {
#ifdef KRB4
@@ -590,7 +590,7 @@ kwin_init_name(HWND hwnd, char *fullname)
#ifdef KRB5
strcpy(name, cns_res.name);
-
+
*realm = '\0';
code = krb5_get_default_realm(k5_context, &ptr);
if (!code) {
@@ -1046,7 +1046,7 @@ kwin_timer(HWND hwnd, UINT timer_id)
}
if (code == 0 || code == KRB5_CC_END)
krb5_cc_end_seq_get(k5_context, k5_ccache, &cursor);
-
+
#endif
if (!expired) {
@@ -1209,7 +1209,7 @@ kwin_command(HWND hwnd, int cid, HWND hwndCtl, UINT codeNotify)
#ifdef KRB5
principal = NULL;
-
+
/*
* convert the name + realm into a krb5 principal string and parse it into a principal
*/
@@ -1217,7 +1217,7 @@ kwin_command(HWND hwnd, int cid, HWND hwndCtl, UINT codeNotify)
code = krb5_parse_name(k5_context, menuitem, &principal);
if (code)
goto errorpoint;
-
+
/*
* set the various ticket options. First, initialize the structure, then set the ticket
* to be forwardable if desired, and set the lifetime.
@@ -1227,7 +1227,7 @@ kwin_command(HWND hwnd, int cid, HWND hwndCtl, UINT codeNotify)
krb5_get_init_creds_opt_set_tkt_life(&opts, lifetime * 60);
if (noaddresses) {
krb5_get_init_creds_opt_set_address_list(&opts, NULL);
- }
+ }
/*
* get the initial creds using the password and the options we set above
@@ -1235,41 +1235,41 @@ kwin_command(HWND hwnd, int cid, HWND hwndCtl, UINT codeNotify)
gd.hinstance = hinstance;
gd.hwnd = hwnd;
gd.id = ID_VARDLG;
- code = krb5_get_init_creds_password(k5_context, &creds, principal, password,
+ code = krb5_get_init_creds_password(k5_context, &creds, principal, password,
gic_prompter, &gd, 0, NULL, &opts);
if (code)
goto errorpoint;
-
+
/*
* initialize the credential cache
*/
code = krb5_cc_initialize(k5_context, k5_ccache, principal);
if (code)
goto errorpoint;
-
+
/*
* insert the principal into the cache
*/
code = krb5_cc_store_cred(k5_context, k5_ccache, &creds);
-
+
errorpoint:
-
+
if (principal)
krb5_free_principal(k5_context, principal);
end_blocking_hook();
SetCursor(hcursor);
kwin_set_default_focus(hwnd);
-
+
if (code) {
if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY)
- MessageBox(hwnd, "Password incorrect", NULL,
+ MessageBox(hwnd, "Password incorrect", NULL,
MB_OK | MB_ICONEXCLAMATION);
- else
+ else
com_err(NULL, code, "while logging in");
}
#endif /* KRB5 */
-
+
#ifdef KRB4
if (krc != KSUCCESS) {
MessageBox(hwnd, krb_get_err_text(krc), "",
@@ -1449,7 +1449,7 @@ kwin_paint(HWND hwnd)
continue;
expiration = c.times.endtime;
break;
-
+
}
if (code == 0 || code == KRB5_CC_END)
krb5_cc_end_seq_get(k5_context, k5_ccache, &cursor);
@@ -1528,7 +1528,7 @@ kwin_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
HANDLE_MSG(hwnd, WM_TIMER, kwin_timer);
HANDLE_MSG(hwnd, WM_PAINT, kwin_paint);
-
+
case WM_ERASEBKGND:
if (!IsIconic(hwnd))
break;
@@ -1914,7 +1914,7 @@ krb_gethostbyname_wnd_proc(HWND hwnd, UINT message,
iscompleted = TRUE;
return 0;
}
-
+
return DefWindowProc(hwnd, message, wParam, lParam);
}
@@ -1935,7 +1935,7 @@ krb_gethostbyname(
BOOL FARPROC blockinghook;
WNDCLASS wc;
static BOOL isregistered;
-
+
blockinghook = WSASetBlockingHook(NULL);
WSASetBlockingHook(blockinghook);
@@ -2006,11 +2006,11 @@ k5_dest_tkt(void)
}
/*
- *
+ *
* k5_get_num_cred
- *
+ *
* Returns: number of creds in the credential cache, -1 on error
- *
+ *
*/
int
k5_get_num_cred(int verbose)
@@ -2168,19 +2168,19 @@ k5_init_ccache(krb5_ccache *ccache)
/*
- *
+ *
* Function: Reads the name and realm out of the ccache.
- *
+ *
* Parameters:
* ccache - credentials cache to get info from
- *
+ *
* name - buffer to hold user name
- *
+ *
* realm - buffer to hold the realm
- *
- *
+ *
+ *
* Returns: TRUE if read names, FALSE if not
- *
+ *
*/
int
k5_name_from_ccache(krb5_ccache k5_ccache)
diff --git a/src/windows/cns/cns_reg.c b/src/windows/cns/cns_reg.c
index 92255fe4f5..357e5d636f 100644
--- a/src/windows/cns/cns_reg.c
+++ b/src/windows/cns/cns_reg.c
@@ -46,7 +46,7 @@ cns_load_registry(void)
cns_res.lifetime = DEFAULT_TKT_LIFE * 5;
cns_res.forwardable = 1;
cns_res.noaddresses = 0;
-
+
for (i = 1 ; i < FILE_MENU_MAX_LOGINS ; i++)
cns_res.logins[i][0] = '\0';
@@ -60,7 +60,7 @@ cns_load_registry(void)
{
char *s;
s = krb5_cc_default_name(k5_context);
-
+
strcpy(cns_res.def_ccname, s);
}
@@ -119,7 +119,7 @@ cns_load_registry(void)
if (registry_dword_get(key, "noaddresses", &tdw) == 0)
cns_res.noaddresses = tdw;
-
+
if (registry_dword_get(key, "alert", &tdw) == 0)
cns_res.alert = tdw;
diff --git a/src/windows/cns/debug.c b/src/windows/cns/debug.c
index d35e64ed56..052bf4e685 100644
--- a/src/windows/cns/debug.c
+++ b/src/windows/cns/debug.c
@@ -47,7 +47,7 @@ debug_check()
/* _CrtMemDumpAllObjectsSince( NULL ); */
_CrtMemCheckpoint( &s2 );
-
+
if ( _CrtMemDifference( &s3, &s1, &s2 ) )
_CrtMemDumpStatistics( &s3 );
@@ -88,4 +88,3 @@ debug_init()
SET_CRT_DEBUG_FIELD( _CRTDBG_LEAK_CHECK_DF );
}
#endif /* DEBUG */
-
diff --git a/src/windows/cns/kpasswd.c b/src/windows/cns/kpasswd.c
index 3219ea2aa2..09991c3838 100644
--- a/src/windows/cns/kpasswd.c
+++ b/src/windows/cns/kpasswd.c
@@ -17,7 +17,7 @@
/*
* k5_change_password
- *
+ *
* Use the new functions to change the password.
*/
krb5_error_code
diff --git a/src/windows/cns/krbini.h b/src/windows/cns/krbini.h
index 8daf93b730..c6113d1dd2 100644
--- a/src/windows/cns/krbini.h
+++ b/src/windows/cns/krbini.h
@@ -33,5 +33,5 @@
#endif /* KRB5 */
#define INI_KRB_REALMS "krb.realms" /* Location of krb.realms file */
#define DEF_KRB_REALMS "krb.realms" /* Default name for krb.realms file */
-#define INI_RECENT_LOGINS "Recent Logins"
+#define INI_RECENT_LOGINS "Recent Logins"
#define INI_LOGIN "Login"
diff --git a/src/windows/cns/options.c b/src/windows/cns/options.c
index 9e7c30e94e..0992f1a74f 100644
--- a/src/windows/cns/options.c
+++ b/src/windows/cns/options.c
@@ -76,7 +76,7 @@ opts_initdialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
noaddresses = cns_res.noaddresses;
SendDlgItemMessage(hwnd, IDD_NOADDRESSES, BM_SETCHECK, noaddresses, 0);
-
+
return TRUE;
}
@@ -135,7 +135,7 @@ opts_command(HWND hwnd, int cid, HWND hwndCtl, UINT codeNotify)
code = k5_init_ccache(&cctemp);
if (code) { /* Problem opening new one? */
- com_err(NULL, code,
+ com_err(NULL, code,
"while changing ccache.\r\nRestoring old ccache.");
} else {
strcpy(ccname, newname);
diff --git a/src/windows/cns/tktlist.c b/src/windows/cns/tktlist.c
index 68a6f1c629..e3f333251c 100644
--- a/src/windows/cns/tktlist.c
+++ b/src/windows/cns/tktlist.c
@@ -153,9 +153,9 @@ ticket_init_list (HWND hwnd)
}
#endif
-
+
#ifdef KRB5
-
+
ncred = 0;
flags = 0;
if (code = krb5_cc_set_flags(k5_context, k5_ccache, flags)) {
@@ -170,7 +170,7 @@ ticket_init_list (HWND hwnd)
code = krb5_cc_next_cred(k5_context, k5_ccache, &cursor, &c);
if (code != 0)
break;
-
+
ncred++;
strcpy (buf, " ");
strncat(buf, short_date (c.times.starttime - kwin_get_epoch()),
@@ -179,7 +179,7 @@ ticket_init_list (HWND hwnd)
strncat(buf, short_date (c.times.endtime - kwin_get_epoch()),
sizeof(buf) - 1 - strlen(buf));
strncat(buf, " ", sizeof(buf) - 1 - strlen(buf));
-
+
/* Add ticket service name and realm */
code = krb5_unparse_name (k5_context, c.server, &sname);
if (code) {
@@ -189,22 +189,22 @@ ticket_init_list (HWND hwnd)
strncat (buf, sname, sizeof(buf) - 1 - strlen(buf));
strncat (buf, flags_string (&c), sizeof(buf) - 1 - strlen(buf)); /* Add flag info */
-
+
l = strlen(buf);
lpinfo = (LPTICKETINFO) malloc(sizeof(TICKETINFO) + l + 1);
assert(lpinfo != NULL);
-
+
if (lpinfo == NULL)
return -1;
-
+
lpinfo->ticket = TRUE;
lpinfo->issue_time = c.times.starttime - kwin_get_epoch();
lpinfo->lifetime = c.times.endtime - c.times.starttime;
strcpy(lpinfo->buf, buf);
-
+
rc = ListBox_AddItemData(hwnd, lpinfo);
assert(rc >= 0);
-
+
if (rc < 0)
return -1;
}
@@ -221,23 +221,23 @@ ticket_init_list (HWND hwnd)
}
}
#endif
-
+
if (ncred <= 0) {
strcpy(buf, " No Tickets");
lpinfo = (LPTICKETINFO) malloc(sizeof(TICKETINFO) + strlen(buf) + 1);
assert(lpinfo != NULL);
-
+
if (lpinfo == NULL)
return -1;
-
+
lpinfo->ticket = FALSE;
strcpy (lpinfo->buf, buf);
rc = ListBox_AddItemData(hwnd, lpinfo);
assert(rc >= 0);
}
-
+
SetWindowRedraw(hwnd, TRUE);
-
+
return ncred;
}
@@ -396,19 +396,19 @@ ticket_drawitem(HWND hwnd, const DRAWITEMSTRUCT *lpdi)
#ifdef KRB5
/*
- *
+ *
* Flags_string
- *
+ *
* Return buffer with the current flags for the credential
- *
+ *
*/
char *
flags_string(krb5_creds *cred) {
static char buf[32];
int i = 0;
- buf[i++] = ' ';
- buf[i++] = '(';
+ buf[i++] = ' ';
+ buf[i++] = '(';
if (cred->ticket_flags & TKT_FLG_FORWARDABLE)
buf[i++] = 'F';
if (cred->ticket_flags & TKT_FLG_FORWARDED)
@@ -432,7 +432,7 @@ flags_string(krb5_creds *cred) {
if (cred->ticket_flags & TKT_FLG_PRE_AUTH)
buf[i++] = 'A';
- buf[i++] = ')';
+ buf[i++] = ')';
buf[i] = '\0';
if (i <= 3)
buf[0] = '\0';
diff --git a/src/windows/cns/tktlist.h b/src/windows/cns/tktlist.h
index a522f76c7c..6b1e7cd5c4 100644
--- a/src/windows/cns/tktlist.h
+++ b/src/windows/cns/tktlist.h
@@ -3,10 +3,10 @@
*
* Handle all actions of the Kerberos ticket list.
*
- * Copyright 1994 by the Massachusetts Institute of Technology.
+ * Copyright 1994 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * <mit-copyright.h>.
*/
/* Only one time, please */
diff --git a/src/windows/gina/ginastub.c b/src/windows/gina/ginastub.c
index ec4291b2b3..0e807a0263 100644
--- a/src/windows/gina/ginastub.c
+++ b/src/windows/gina/ginastub.c
@@ -1,4 +1,3 @@
-
/*
Copyright (c) 1996 Microsoft Corporation
@@ -183,7 +182,7 @@ WlxInitialize(
PVOID *pWlxContext)
{
pWlxFuncs = (PGWLX_DISPATCH_VERSION) pWinlogonFunctions;
-
+
return (* GWlxInitialize)(
lpWinsta,
hWlx,
@@ -214,7 +213,7 @@ WlxLoggedOutSAS(
PVOID *pProfile)
{
int iRet;
-
+
iRet = (* GWlxLoggedOutSAS)(
pWlxContext,
dwSasType,
@@ -225,16 +224,16 @@ WlxLoggedOutSAS(
pMprNotifyInfo,
pProfile
);
-
+
if (iRet == WLX_SAS_ACTION_LOGON) {
/* copy pMprNotifyInfo and pLogonSid for later use */
-
+
/* pMprNotifyInfo->pszUserName */
/* pMprNotifyInfo->pszDomain */
/* pMprNotifyInfo->pszPassword */
/* pMprNotifyInfo->pszOldPassword */
}
-
+
return iRet;
}
@@ -296,13 +295,13 @@ WlxIsLogoffOk(
)
{
BOOL bSuccess;
-
+
bSuccess = (* GWlxIsLogoffOk)(pWlxContext);
if (bSuccess) {
/* if it's ok to logoff, finish with the stored credentials */
/* and scrub the buffers */
}
-
+
return bSuccess;
}
@@ -337,7 +336,7 @@ BOOL * pSecure
{
if (GWlxScreenSaverNotify)
return (* GWlxScreenSaverNotify)(pWlxContext, pSecure);
-
+
/* if not exported, return something intelligent */
*pSecure = TRUE;
return TRUE;
diff --git a/src/windows/gss/gss-client.c b/src/windows/gss/gss-client.c
index d9c1491c20..35156dec63 100644
--- a/src/windows/gss/gss-client.c
+++ b/src/windows/gss/gss-client.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -81,12 +81,12 @@ static int connect_to_server(host, port)
struct sockaddr_in saddr;
struct hostent *hp;
int s;
-
+
if ((hp = gethostbyname(host)) == NULL) {
printf("Unknown host: %s\r\n", host);
return -1;
}
-
+
saddr.sin_family = hp->h_addrtype;
memcpy((char *)&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
saddr.sin_port = htons(port);
@@ -122,24 +122,24 @@ static int connect_to_server(host, port)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* service_name is imported as a GSS-API name and a GSS-API context is
* established with the corresponding service; the service should be
* listening on the TCP connection s. The default GSS-API mechanism
* is used, and mutual authentication and replay detection are
* requested.
- *
+ *
* If successful, the context handle is returned in context. If
* unsuccessful, the GSS-API error messages are displayed on stderr
* and -1 is returned.
*/
-int client_establish_context( int s,
+int client_establish_context( int s,
char *service_name,
- OM_uint32 gss_flags,
+ OM_uint32 gss_flags,
int auth_flag,
- int v1_format,
- gss_OID oid,
- gss_ctx_id_t *gss_context,
+ int v1_format,
+ gss_OID oid,
+ gss_ctx_id_t *gss_context,
OM_uint32 *ret_flags)
{
if (auth_flag) {
@@ -160,7 +160,7 @@ int client_establish_context( int s,
display_status("parsing name", maj_stat, min_stat);
return -1;
}
-
+
if (!v1_format) {
if (send_token(s, TOKEN_NOOP|TOKEN_CONTEXT_NEXT, empty_token) < 0) {
(void) gss_release_name(&min_stat, &target_name);
@@ -177,7 +177,7 @@ int client_establish_context( int s,
* transmitted to the server; every received token is stored in
* recv_tok, which token_ptr is then set to, to be processed by
* the next call to gss_init_sec_context.
- *
+ *
* GSS-API guarantees that send_tok's length will be non-zero
* if and only if the server is expecting another token from us,
* and that gss_init_sec_context returns GSS_S_CONTINUE_NEEDED if
@@ -257,7 +257,7 @@ static void read_file(file_name, in_buf)
{
int fd, count;
struct stat stat_buf;
-
+
if ((fd = open(file_name, O_RDONLY, 0)) < 0) {
perror("open");
printf("Couldn't open file %s\r\n", file_name);
@@ -315,16 +315,16 @@ static void read_file(file_name, in_buf)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* call_server opens a TCP connection to <host:port> and establishes a
* GSS-API context with service_name over the connection. It then
* seals msg in a GSS-API token with gss_wrap, sends it to the server,
* reads back a GSS-API signature block for msg from the server, and
* verifies it with gss_verify. -1 is returned if any step fails,
* otherwise 0 is returned. */
-int call_server(char *host, u_short port, gss_OID oid, char *service_name,
+int call_server(char *host, u_short port, gss_OID oid, char *service_name,
OM_uint32 gss_flags, int auth_flag,
- int wrap_flag, int encrypt_flag, int mic_flag, int v1_format,
+ int wrap_flag, int encrypt_flag, int mic_flag, int v1_format,
char *msg, int use_file, int mcount)
{
gss_ctx_id_t context;
@@ -445,7 +445,7 @@ int call_server(char *host, u_short port, gss_OID oid, char *service_name,
(void) gss_release_oid_set(&min_stat, &mech_names);
}
}
-
+
if (use_file) {
read_file(msg, &in_buf);
} else {
@@ -542,7 +542,7 @@ static void parse_oid(char *mechanism, gss_OID *oid)
char *mechstr = 0, *cp;
gss_buffer_desc tok;
OM_uint32 maj_stat, min_stat;
-
+
if (isdigit((int) mechanism[0])) {
mechstr = malloc(strlen(mechanism)+5);
if (!mechstr) {
@@ -568,7 +568,7 @@ static void parse_oid(char *mechanism, gss_OID *oid)
int
gss (char *server_host, char *service_name, char *mechanism, char *msg, int port,
- int verbose, int delegate, int mutual, int replay, int sequence,
+ int verbose, int delegate, int mutual, int replay, int sequence,
int v1_format, int auth_flag, int wrap_flag,
int encrypt_flag, int mic_flag, int ccount, int mcount, char *ccache)
{
@@ -610,6 +610,6 @@ gss (char *server_host, char *service_name, char *mechanism, char *msg, int port
if (oid != GSS_C_NULL_OID)
(void) gss_release_oid(&min_stat, &oid);
-
+
return rc;
}
diff --git a/src/windows/gss/gss-misc.c b/src/windows/gss/gss-misc.c
index 28227e2483..74f005ea85 100644
--- a/src/windows/gss/gss-misc.c
+++ b/src/windows/gss/gss-misc.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -155,7 +155,7 @@ int send_token(int s, int flags, gss_buffer_t tok)
return -1;
} else if (ret != 4) {
if (verbose)
- printf("sending token length: %d of %d bytes written\r\n",
+ printf("sending token length: %d of %d bytes written\r\n",
ret, 4);
return -1;
}
@@ -167,7 +167,7 @@ int send_token(int s, int flags, gss_buffer_t tok)
return -1;
} else if (ret != tok->length) {
if (verbose)
- printf("sending token data: %d of %d bytes written\r\n",
+ printf("sending token data: %d of %d bytes written\r\n",
ret, (int) tok->length);
return -1;
}
@@ -189,7 +189,7 @@ int send_token(int s, int flags, gss_buffer_t tok)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* recv_token reads the token flags (a single byte, even though
* they're stored into an integer, then reads the token length (as a
* network long), allocates memory to hold the data, and then reads
@@ -226,7 +226,7 @@ int recv_token(int s, int * flags, gss_buffer_t tok)
return -1;
} else if (ret != 3) {
if (verbose)
- printf("reading token length: %d of %d bytes read\r\n",
+ printf("reading token length: %d of %d bytes read\r\n",
ret, 3);
return -1;
}
@@ -239,7 +239,7 @@ int recv_token(int s, int * flags, gss_buffer_t tok)
return -1;
} else if (ret != 4) {
if (verbose)
- printf("reading token length: %d of %d bytes read\r\n",
+ printf("reading token length: %d of %d bytes read\r\n",
ret, 4);
return -1;
}
@@ -263,7 +263,7 @@ int recv_token(int s, int * flags, gss_buffer_t tok)
free(tok->value);
return -1;
} else if (ret != tok->length) {
- printf("sending token data: %d of %d bytes written\r\n",
+ printf("sending token data: %d of %d bytes written\r\n",
ret, (int) tok->length);
free(tok->value);
return -1;
@@ -272,7 +272,7 @@ int recv_token(int s, int * flags, gss_buffer_t tok)
return 0;
}
-void
+void
free_token(gss_buffer_t tok)
{
if (tok->length <= 0 || tok->value == NULL)
@@ -311,7 +311,7 @@ display_status_1(char *m, OM_uint32 code, int type) {
OM_uint32 maj_stat, min_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
-
+
msg_ctx = 0;
while (1) {
maj_stat = gss_display_status(&min_stat, code,
@@ -319,11 +319,11 @@ display_status_1(char *m, OM_uint32 code, int type) {
&msg_ctx, &msg);
if (verbose)
printf("GSS-API error %s: %s\r\n", m,
- (char *)msg.value);
+ (char *)msg.value);
OkMsgBox ("GSS-API error %s: %s\n", m,
(char *)msg.value);
(void) gss_release_buffer(&min_stat, &msg);
-
+
if (!msg_ctx)
break;
}
@@ -393,11 +393,11 @@ int gettimeofday (struct timeval *tv, void *ignore_tz)
}
/*+*************************************************************************
-**
+**
** OkMsgBox
-**
+**
** A MessageBox version of printf
-**
+**
***************************************************************************/
void
OkMsgBox (char *format, ...) {
@@ -409,11 +409,11 @@ OkMsgBox (char *format, ...) {
MessageBox(NULL, buf, "", MB_OK);
}
/*+*************************************************************************
-**
+**
** My_perror
-**
+**
** A windows conversion of perror displaying the output into a MessageBox.
-**
+**
***************************************************************************/
void
my_perror (char *msg) {
@@ -421,9 +421,8 @@ my_perror (char *msg) {
err = strerror (errno);
- if (msg && *msg != '\0')
+ if (msg && *msg != '\0')
OkMsgBox ("%s: %s", msg, err);
else
MessageBox (NULL, err, "", MB_OK);
}
-
diff --git a/src/windows/gss/gss-misc.h b/src/windows/gss/gss-misc.h
index 35b3b73906..77d8190f94 100644
--- a/src/windows/gss/gss-misc.h
+++ b/src/windows/gss/gss-misc.h
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/src/windows/gss/gss.c b/src/windows/gss/gss.c
index f42d293eaf..fea0253fc4 100644
--- a/src/windows/gss/gss.c
+++ b/src/windows/gss/gss.c
@@ -6,7 +6,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -50,7 +50,7 @@
#define INI_MSG "Message" // INI file line label
#define INI_MECHS "GSSAPI Mechanisms" // INI file section
#define INI_MECH "Mech" // INI file line label
-#define INI_LAST "GSSAPI Most Recent"
+#define INI_LAST "GSSAPI Most Recent"
#define INI_LAST_HOST "Host"
#define INI_LAST_PORT "Port"
#define INI_LAST_SVC "Service"
@@ -132,7 +132,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nC
MB_OK | MB_ICONSTOP);
return FALSE;
}
-
+
rc = DialogBoxParam (hInstance, "GSSAPIDLG", HWND_DESKTOP, OpenGssapiDlg, 0L);
rc = GetLastError();
@@ -153,7 +153,7 @@ do_gssapi_test (void) {
hcursor = SetCursor(LoadCursor(NULL, IDC_WAIT));
n = gss (szHost, szService, szMech, szMessage[0] ? szMessage : "Test Gssapi Message", port,
- verbose, delegate, mutual, replay, sequence,
+ verbose, delegate, mutual, replay, sequence,
gssv1, !noauth, !nowrap, !nocrypt, !nomic, ccount, mcount,
szCCache);
SetCursor(hcursor);
@@ -211,7 +211,7 @@ OpenGssapiDlg(
case WM_HSCROLL:
switch (LOWORD(wParam)) {
case TB_THUMBTRACK:
- case TB_THUMBPOSITION:
+ case TB_THUMBPOSITION:
{
long pos = HIWORD(wParam); // the position of the slider
int ctrlID = GetDlgCtrlID((HWND)lParam);
@@ -313,7 +313,7 @@ OpenGssapiDlg(
//EndDialog(hDlg, TRUE);
break;
-
+
case GSS_NO_AUTH:
if ( IsDlgButtonChecked(hDlg, GSS_NO_AUTH) ) {
// disable the other no_xxx options
@@ -347,7 +347,7 @@ parse_name (char *name) {
char *ptr;
char seps[] = " ,\t";
char tempname[256];
-
+
memset( &tempname[0], '\0', 256 );
strcpy( tempname, name);
ptr = strtok( tempname, seps);
@@ -394,7 +394,7 @@ static void
read_saved (void) {
int i; /* Index */
char buff[32];
-
+
for (i = 0; MAX_SAVED; ++i) { /* Read this many entries */
wsprintf (buff, INI_HOST "%d", i);
GetPrivateProfileString(INI_HOSTS, buff, "", hosts[i], 256, GSSAPI_INI);
@@ -421,47 +421,47 @@ read_saved (void) {
}
GetPrivateProfileString(INI_LAST, INI_LAST_HOST, "", szHost, 256, GSSAPI_INI);
GetPrivateProfileString(INI_LAST, INI_LAST_PORT, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
port = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_SVC, "", szService, 256, GSSAPI_INI);
GetPrivateProfileString(INI_LAST, INI_LAST_MSG, "", szMessage, 256, GSSAPI_INI);
GetPrivateProfileString(INI_LAST, INI_LAST_MECH, "", szMech, 256, GSSAPI_INI);
GetPrivateProfileString(INI_LAST, INI_LAST_CCACHE, "", szCCache, 256, GSSAPI_INI);
GetPrivateProfileString(INI_LAST, INI_LAST_DELEGATE, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
delegate = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_MUTUAL, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
mutual = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_REPLAY, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
replay = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_SEQUENCE, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
sequence = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_VERBOSE, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
verbose = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_CCOUNT, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
ccount = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_MCOUNT, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
mcount = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_VER1, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
gssv1 = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_NOAUTH, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
noauth = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_NOWRAP, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
nowrap = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_NOCRYPT, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
nocrypt = atoi(buff);
GetPrivateProfileString(INI_LAST, INI_LAST_NOMIC, "", buff, 32, GSSAPI_INI);
- if ( buff[0] )
+ if ( buff[0] )
nomic = atoi(buff);
}
@@ -637,7 +637,7 @@ fill_combo (HWND hDlg) {
goto skip_ccache;
retval = cc_get_NC_info(cc_ctx, &pNCi);
- if (retval)
+ if (retval)
goto clean_ccache;
for ( i=0; pNCi[i]; i++ ) {
diff --git a/src/windows/gss/gss.h b/src/windows/gss/gss.h
index 60d91bf6b5..ca00a1a855 100644
--- a/src/windows/gss/gss.h
+++ b/src/windows/gss/gss.h
@@ -1,8 +1,8 @@
/*+*************************************************************************
-**
+**
** gss.h
-**
-**
+**
+**
***************************************************************************/
#include <windows.h>
#include "winsock.h"
@@ -26,16 +26,16 @@ void my_perror (char *msg);
// gss-client.c
int
gss (char *server_host, char *service_name, char *mechanism, char *msg, int port,
- int verbose, int delegate, int mutual, int replay, int sequence,
+ int verbose, int delegate, int mutual, int replay, int sequence,
int v1_format, int auth_flag, int wrap_flag,
int encrypt_flag, int mic_flag, int ccount, int mcount, char * ccache);
-int call_server(char *host, u_short port, gss_OID oid, char *service_name,
+int call_server(char *host, u_short port, gss_OID oid, char *service_name,
OM_uint32 deleg_flag, int auth_flag,
- int wrap_flag, int encrypt_flag, int mic_flag, int v1_format,
+ int wrap_flag, int encrypt_flag, int mic_flag, int v1_format,
char *msg, int use_file, int mcount);
int connect_to_server(char *host, u_short port);
int client_establish_context(int s, char *service_name, OM_uint32 deleg_flag,
- int auth_flag, int v1_format, gss_OID oid,
+ int auth_flag, int v1_format, gss_OID oid,
gss_ctx_id_t *gss_context, OM_uint32 *ret_flags);
diff --git a/src/windows/gss/resource.h b/src/windows/gss/resource.h
index de7b2c127c..c3428f023c 100644
--- a/src/windows/gss/resource.h
+++ b/src/windows/gss/resource.h
@@ -38,7 +38,7 @@
#define IDD_GSSAPIDLG 101
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/src/windows/identity/config/netidmgr_intver.h.in b/src/windows/identity/config/netidmgr_intver.h.in
index e025fde202..b754a08ec8 100644
--- a/src/windows/identity/config/netidmgr_intver.h.in
+++ b/src/windows/identity/config/netidmgr_intver.h.in
@@ -2,7 +2,7 @@ $(VERSIONINT): Makefile Makefile.w32
$(CP) << $(VERSIONINT)
/*
* This is an autogenerated file. Do not modify directly.
- *
+ *
* File generated by running $(MAKE) in $(MAKEDIR)
* To regenerate, run "$(MAKE) clean" and "$(MAKE) all" on $(MAKEDIR)
*/
@@ -44,4 +44,3 @@ $(VERSIONINT): Makefile Makefile.w32
! endif
<<
-
diff --git a/src/windows/identity/config/netidmgr_version.h.in b/src/windows/identity/config/netidmgr_version.h.in
index febbeb3d75..babcc53a93 100644
--- a/src/windows/identity/config/netidmgr_version.h.in
+++ b/src/windows/identity/config/netidmgr_version.h.in
@@ -60,4 +60,3 @@ $(VERSIONEXT): Makefile Makefile.w32
#endif
<<
-
diff --git a/src/windows/identity/doc/cred_aquisition.h b/src/windows/identity/doc/cred_aquisition.h
index 613d5a04ba..0161f74f1e 100644
--- a/src/windows/identity/doc/cred_aquisition.h
+++ b/src/windows/identity/doc/cred_aquisition.h
@@ -212,7 +212,7 @@
For information on how the dialog procedure should be written, see
\ref cred_acq_dlgproc .
-
+
*/
/*! \page cred_acq_dlgproc Writing the dialog procedure for a cred type panel
diff --git a/src/windows/identity/doc/cred_data_types.h b/src/windows/identity/doc/cred_data_types.h
index f2a4122112..b02edf22b3 100644
--- a/src/windows/identity/doc/cred_data_types.h
+++ b/src/windows/identity/doc/cred_data_types.h
@@ -242,7 +242,7 @@
count. It can not be assigned \a KCDB_CBSIZE_AUTO even if the data type
supports it. The \a pcb_dst parameter is used internally to allocate
memory for the object.
-
+
\subsubsection kcdb_pg_cb_iv isValid
\code
diff --git a/src/windows/identity/doc/main_page.h b/src/windows/identity/doc/main_page.h
index 9dd55406a5..dc7d1e3cca 100644
--- a/src/windows/identity/doc/main_page.h
+++ b/src/windows/identity/doc/main_page.h
@@ -57,7 +57,7 @@
Copyright &copy; 2004,2005,2006,2007 Massachusetts Institute of Technology
Copyright &copy; 2005,2006,2007 Secure Endpoints Inc.
-
+
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
@@ -92,8 +92,8 @@
/*! \page bugs Reporting bugs
- Network Identity Manager bugs can be reported to
- <a href="mailto:kfw-bugs@mit.edu">kfw-bugs@mit.edu</a> or
+ Network Identity Manager bugs can be reported to
+ <a href="mailto:kfw-bugs@mit.edu">kfw-bugs@mit.edu</a> or
<a href="mailto:netidmgr@secure-endpoints.com">netidmgr@secure-endpoints.com</a>
When reporting bugs, please include as much information as
diff --git a/src/windows/identity/doc/plugin_framework.h b/src/windows/identity/doc/plugin_framework.h
index cfe40e458c..84ad71c17e 100644
--- a/src/windows/identity/doc/plugin_framework.h
+++ b/src/windows/identity/doc/plugin_framework.h
@@ -177,7 +177,7 @@ following sequence of events occur:
localized libraries will be loaded. See \ref pi_localization
</li>
- <li>
+ <li>
During processing of init_module(), the module registers all the
plug-ins that it is implementing by calling kmm_provide_plugin()
for each.
diff --git a/src/windows/identity/doc/plugin_locale.h b/src/windows/identity/doc/plugin_locale.h
index 3c6a236e69..e6d1e1ef0c 100644
--- a/src/windows/identity/doc/plugin_locale.h
+++ b/src/windows/identity/doc/plugin_locale.h
@@ -74,7 +74,7 @@ See kmm_set_locale_info() and ::kmm_module_locale for more info.
The module manager searches the array of ::kmm_module_locale objects
passed into the kmm_set_locale_info() function for one that matches
the current user locale (as opposed to the current system locale). A
-record matches the locale if it has the same language ID.
+record matches the locale if it has the same language ID.
If a match is found, that library is selected. Otherwise, the list is
searched for one that is compatible with the current user locale. A
@@ -105,5 +105,3 @@ the regular WIN32 API.
- ::kmm_LoadString
*/
-
-
diff --git a/src/windows/identity/doc/plugin_main.h b/src/windows/identity/doc/plugin_main.h
index 9542150a82..bde85558dd 100644
--- a/src/windows/identity/doc/plugin_main.h
+++ b/src/windows/identity/doc/plugin_main.h
@@ -111,5 +111,3 @@ Since credential managers may receive privileged information, the
signature requirements for credential managers are specially strict.
*/
-
-
diff --git a/src/windows/identity/doc/ui_context.h b/src/windows/identity/doc/ui_context.h
index 9799b5c4a0..f5f4e037e9 100644
--- a/src/windows/identity/doc/ui_context.h
+++ b/src/windows/identity/doc/ui_context.h
@@ -92,7 +92,7 @@
Next: \ref khui_context_using "Using Contexts"
*/
-/*! \page khui_context_using Using Contexts
+/*! \page khui_context_using Using Contexts
\section khui_context_using_1 Obtaining the context
diff --git a/src/windows/identity/include/khdefs.h b/src/windows/identity/include/khdefs.h
index c39d6f4ea9..e1246c4ae3 100644
--- a/src/windows/identity/include/khdefs.h
+++ b/src/windows/identity/include/khdefs.h
@@ -120,7 +120,7 @@ typedef __int64 ssize_t;
typedef _W64 int ssize_t;
#endif
#define _SSIZE_T_DEFINED
-#endif
+#endif
typedef ssize_t khm_ssize;
@@ -135,7 +135,7 @@ typedef unsigned __int64 khm_lparm;
#error khm_wparm and khm_lparm need to be defined for this platform
#endif
-/*!\def KHMAPI
+/*!\def KHMAPI
\brief Calling convention for NetIDMgr exported functions
The caling convention for all NetIDMgr exported functions is \b
@@ -204,7 +204,7 @@ typedef unsigned __int64 khm_lparm;
Returns the smallest integer greater than or equal to the
parameter that is a multiple of 4.
-
+
\note Only use with positive integers. */
#define UBOUND32(d) ((((d)-1)&~3) + 4)
diff --git a/src/windows/identity/include/kherror.h b/src/windows/identity/include/kherror.h
index a8ee64505f..1250e9cfd0 100644
--- a/src/windows/identity/include/kherror.h
+++ b/src/windows/identity/include/kherror.h
@@ -41,7 +41,7 @@
/*! \brief Range for error codes
- NetIDMgr errors range from \a KHM_ERROR_BASE to
+ NetIDMgr errors range from \a KHM_ERROR_BASE to
KHM_ERROR_BASE + KHM_ERROR_RANGE.
*/
#define KHM_ERROR_RANGE 256L
diff --git a/src/windows/identity/include/khmsgtypes.h b/src/windows/identity/include/khmsgtypes.h
index cfb43f94e3..d4737f7ff1 100644
--- a/src/windows/identity/include/khmsgtypes.h
+++ b/src/windows/identity/include/khmsgtypes.h
@@ -63,7 +63,7 @@
#define KMSG_KCDB 2
/*! \brief NetIDMgr Module Manager messages
-
+
\see \ref kmq_msg_kmm
*/
#define KMSG_KMM 3
@@ -122,7 +122,7 @@
/*@}*/
-/*! \defgroup kmq_msg_system KMSG_SYSTEM subtypes
+/*! \defgroup kmq_msg_system KMSG_SYSTEM subtypes
@{*/
/*! \brief Generic initialization message
@@ -159,7 +159,7 @@
#define KMSG_SYSTEM_COMPLETION 3
/*@}*/
-/*! \defgroup kmq_msg_kcdb KMSG_KCDB subtypes
+/*! \defgroup kmq_msg_kcdb KMSG_KCDB subtypes
@{*/
#define KMSG_KCDB_IDENT 1
#define KMSG_KCDB_CREDTYPE 2
@@ -248,7 +248,7 @@
/*! \defgroup kmq_msg_cred KMSG_CRED subtypes
@{*/
/*! \brief Root credential set changed
-
+
This message is issued when the root credential set successfully
collected credentials from another credential set.
@@ -553,9 +553,9 @@
*/
#define IS_CRED_ACQ_MSG(msg) ((msg) >= 16 && (msg) <=31)
-/*@}*/ /* /KMSG_CRED subtypes */
+/*@}*/ /* /KMSG_CRED subtypes */
-/*! \defgroup kmq_msg_alert KMSG_ALERT Subtypes
+/*! \defgroup kmq_msg_alert KMSG_ALERT Subtypes
@{*/
/*! \brief Show an alert
@@ -691,7 +691,7 @@
guaranteed to be in canonical form. The return value should be
akin to strcmp().
- Message parameters:
+ Message parameters:
- \b vparam : A pointer to a ::kcdb_ident_name_xfer structure.
The \a name_src member points at the first name, and the \a
diff --git a/src/windows/identity/kconfig/api.c b/src/windows/identity/kconfig/api.c
index 8317e6c9b3..c219a62078 100644
--- a/src/windows/identity/kconfig/api.c
+++ b/src/windows/identity/kconfig/api.c
@@ -193,7 +193,7 @@ khcint_dump_handles(FILE * f) {
#endif
/* obtains cs_conf_handle/cs_conf_global */
-kconf_handle *
+kconf_handle *
khcint_handle_from_space(kconf_conf_space * s, khm_int32 flags)
{
kconf_handle * h;
@@ -218,7 +218,7 @@ khcint_handle_from_space(kconf_conf_space * s, khm_int32 flags)
}
/* obtains cs_conf_handle/cs_conf_global */
-void
+void
khcint_handle_free(kconf_handle * h)
{
kconf_handle * lower;
@@ -259,7 +259,7 @@ khcint_handle_free(kconf_handle * h)
}
/* obains cs_conf_handle/cs_conf_global */
-kconf_handle *
+kconf_handle *
khcint_handle_dup(kconf_handle * o)
{
kconf_handle * h;
@@ -279,7 +279,7 @@ khcint_handle_dup(kconf_handle * o)
}
/* obtains cs_conf_global */
-void
+void
khcint_space_hold(kconf_conf_space * s) {
EnterCriticalSection(&cs_conf_global);
s->refcount ++;
@@ -310,7 +310,7 @@ khcint_try_free_space(kconf_conf_space * s) {
}
/* obtains cs_conf_global */
-void
+void
khcint_space_release(kconf_conf_space * s) {
khm_int32 l;
@@ -345,7 +345,7 @@ khcint_space_release(kconf_conf_space * s) {
}
/* case sensitive replacement for RegOpenKeyEx */
-LONG
+LONG
khcint_RegOpenKeyEx(HKEY hkey, LPCWSTR sSubKey, DWORD ulOptions,
REGSAM samDesired, PHKEY phkResult) {
int i;
@@ -683,7 +683,7 @@ khcint_RegCreateKeyEx(HKEY hKey,
}
/* obtains cs_conf_global */
-HKEY
+HKEY
khcint_space_open_key(kconf_conf_space * s, khm_int32 flags) {
HKEY hk = NULL;
int nflags = 0;
@@ -691,12 +691,12 @@ khcint_space_open_key(kconf_conf_space * s, khm_int32 flags) {
if(flags & KCONF_FLAG_MACHINE) {
if(s->regkey_machine)
return s->regkey_machine;
- if((khcint_RegOpenKeyEx(HKEY_LOCAL_MACHINE, s->regpath, 0,
- KEY_READ | KEY_WRITE, &hk) !=
- ERROR_SUCCESS) &&
+ if((khcint_RegOpenKeyEx(HKEY_LOCAL_MACHINE, s->regpath, 0,
+ KEY_READ | KEY_WRITE, &hk) !=
+ ERROR_SUCCESS) &&
!(flags & KHM_PERM_WRITE)) {
- if(khcint_RegOpenKeyEx(HKEY_LOCAL_MACHINE, s->regpath, 0,
+ if(khcint_RegOpenKeyEx(HKEY_LOCAL_MACHINE, s->regpath, 0,
KEY_READ, &hk) == ERROR_SUCCESS) {
nflags = KHM_PERM_READ;
}
@@ -704,8 +704,8 @@ khcint_space_open_key(kconf_conf_space * s, khm_int32 flags) {
}
if(!hk && (flags & KHM_FLAG_CREATE)) {
- khcint_RegCreateKeyEx(HKEY_LOCAL_MACHINE,
- s->regpath,
+ khcint_RegCreateKeyEx(HKEY_LOCAL_MACHINE,
+ s->regpath,
0,
NULL,
REG_OPTION_NON_VOLATILE,
@@ -725,17 +725,17 @@ khcint_space_open_key(kconf_conf_space * s, khm_int32 flags) {
} else {
if(s->regkey_user)
return s->regkey_user;
- if((khcint_RegOpenKeyEx(HKEY_CURRENT_USER, s->regpath, 0,
- KEY_READ | KEY_WRITE, &hk) !=
- ERROR_SUCCESS) &&
+ if((khcint_RegOpenKeyEx(HKEY_CURRENT_USER, s->regpath, 0,
+ KEY_READ | KEY_WRITE, &hk) !=
+ ERROR_SUCCESS) &&
!(flags & KHM_PERM_WRITE)) {
- if(khcint_RegOpenKeyEx(HKEY_CURRENT_USER, s->regpath, 0,
+ if(khcint_RegOpenKeyEx(HKEY_CURRENT_USER, s->regpath, 0,
KEY_READ, &hk) == ERROR_SUCCESS) {
nflags = KHM_PERM_READ;
}
}
if(!hk && (flags & KHM_FLAG_CREATE)) {
- khcint_RegCreateKeyEx(HKEY_CURRENT_USER,
+ khcint_RegCreateKeyEx(HKEY_CURRENT_USER,
s->regpath, 0, NULL,
REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WRITE,
@@ -753,7 +753,7 @@ khcint_space_open_key(kconf_conf_space * s, khm_int32 flags) {
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_shadow_space(khm_handle upper, khm_handle lower)
{
kconf_handle * h;
@@ -792,7 +792,7 @@ khc_shadow_space(khm_handle upper, khm_handle lower)
}
/* no locks */
-kconf_conf_space *
+kconf_conf_space *
khcint_create_empty_space(void) {
kconf_conf_space * r;
@@ -804,7 +804,7 @@ khcint_create_empty_space(void) {
}
/* called with cs_conf_global */
-void
+void
khcint_free_space(kconf_conf_space * r) {
kconf_conf_space * c;
@@ -833,9 +833,9 @@ khcint_free_space(kconf_conf_space * r) {
}
/* obtains cs_conf_global */
-khm_int32
-khcint_open_space(kconf_conf_space * parent,
- const wchar_t * sname, size_t n_sname,
+khm_int32
+khcint_open_space(kconf_conf_space * parent,
+ const wchar_t * sname, size_t n_sname,
khm_int32 flags, kconf_conf_space **result) {
kconf_conf_space * p;
kconf_conf_space * c;
@@ -890,7 +890,7 @@ khcint_open_space(kconf_conf_space * parent,
/* we are not creating the space, so it must exist in the form of a
registry key in HKLM or HKCU. If it existed as a schema, we
would have already retured it above. */
-
+
if (flags & KCONF_FLAG_USER)
pkey = khcint_space_open_key(p, KHM_PERM_READ | KCONF_FLAG_USER);
@@ -916,7 +916,7 @@ khcint_open_space(kconf_conf_space * parent,
}
c = khcint_create_empty_space();
-
+
/*SAFE: buf: is of known length < KCONF_MAXCCH_NAME */
c->name = PWCSDUP(buf);
@@ -947,8 +947,8 @@ khcint_open_space(kconf_conf_space * parent,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
khm_handle * result) {
kconf_handle * h;
kconf_conf_space * p;
@@ -1042,7 +1042,7 @@ khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_close_space(khm_handle csp) {
if(!khc_is_config_running())
return KHM_ERROR_NOT_READY;
@@ -1059,11 +1059,11 @@ khc_close_space(khm_handle csp) {
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_read_string(khm_handle pconf,
- const wchar_t * pvalue,
- wchar_t * buf,
- khm_size * bufsize)
+KHMEXP khm_int32 KHMAPI
+khc_read_string(khm_handle pconf,
+ const wchar_t * pvalue,
+ wchar_t * buf,
+ khm_size * bufsize)
{
kconf_conf_space * c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1086,9 +1086,9 @@ khc_read_string(khm_handle pconf,
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
goto _shadow;
@@ -1218,7 +1218,7 @@ _exit:
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_read_int32(khm_handle pconf, const wchar_t * pvalue, khm_int32 * buf) {
kconf_conf_space * c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1244,9 +1244,9 @@ khc_read_int32(khm_handle pconf, const wchar_t * pvalue, khm_int32 * buf) {
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
goto _shadow;
free_space = 1;
@@ -1336,7 +1336,7 @@ _exit:
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_read_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 * buf) {
kconf_conf_space * c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1359,9 +1359,9 @@ khc_read_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 * buf) {
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
goto _shadow;
free_space = 1;
@@ -1451,8 +1451,8 @@ _exit:
}
/* obtaincs cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_read_binary(khm_handle pconf, const wchar_t * pvalue,
+KHMEXP khm_int32 KHMAPI
+khc_read_binary(khm_handle pconf, const wchar_t * pvalue,
void * buf, khm_size * bufsize) {
kconf_conf_space * c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1473,9 +1473,9 @@ khc_read_binary(khm_handle pconf, const wchar_t * pvalue,
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
goto _shadow;
free_space = 1;
@@ -1571,10 +1571,10 @@ _exit:
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_write_string(khm_handle pconf,
- const wchar_t * pvalue,
- wchar_t * buf)
+KHMEXP khm_int32 KHMAPI
+khc_write_string(khm_handle pconf,
+ const wchar_t * pvalue,
+ wchar_t * buf)
{
HKEY pk = NULL;
kconf_conf_space * c;
@@ -1628,8 +1628,8 @@ khc_write_string(khm_handle pconf,
}
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
- if(KHM_FAILED(khc_open_space(pconf, pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ if(KHM_FAILED(khc_open_space(pconf, pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
return KHM_ERROR_INVALID_PARAM;
free_space = 1;
@@ -1672,10 +1672,10 @@ _exit:
}
/* obtaincs cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_write_int32(khm_handle pconf,
- const wchar_t * pvalue,
- khm_int32 buf)
+KHMEXP khm_int32 KHMAPI
+khc_write_int32(khm_handle pconf,
+ const wchar_t * pvalue,
+ khm_int32 buf)
{
HKEY pk = NULL;
kconf_conf_space * c;
@@ -1703,9 +1703,9 @@ khc_write_int32(khm_handle pconf,
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
return KHM_ERROR_INVALID_PARAM;
free_space = 1;
@@ -1746,7 +1746,7 @@ khc_write_int32(khm_handle pconf,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_write_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 buf) {
HKEY pk = NULL;
kconf_conf_space * c;
@@ -1774,9 +1774,9 @@ khc_write_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 buf) {
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
return KHM_ERROR_INVALID_PARAM;
free_space = 1;
@@ -1817,9 +1817,9 @@ khc_write_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 buf) {
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_write_binary(khm_handle pconf,
- const wchar_t * pvalue,
+KHMEXP khm_int32 KHMAPI
+khc_write_binary(khm_handle pconf,
+ const wchar_t * pvalue,
void * buf, khm_size bufsize) {
HKEY pk = NULL;
kconf_conf_space * c;
@@ -1838,9 +1838,9 @@ khc_write_binary(khm_handle pconf,
if((value = wcsrchr(pvalue, L'\\')) != NULL) {
if(KHM_FAILED(khc_open_space(
- pconf,
- pvalue,
- KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
+ pconf,
+ pvalue,
+ KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0),
&conf)))
return KHM_ERROR_INVALID_PARAM;
free_space = 1;
@@ -1881,8 +1881,8 @@ khc_write_binary(khm_handle pconf,
}
/* no locks */
-KHMEXP khm_int32 KHMAPI
-khc_get_config_space_name(khm_handle conf,
+KHMEXP khm_int32 KHMAPI
+khc_get_config_space_name(khm_handle conf,
wchar_t * buf, khm_size * bufsize) {
kconf_conf_space * c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1923,7 +1923,7 @@ khc_get_config_space_name(khm_handle conf,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_get_config_space_parent(khm_handle conf, khm_handle * parent) {
kconf_conf_space * c;
@@ -1944,7 +1944,7 @@ khc_get_config_space_parent(khm_handle conf, khm_handle * parent) {
}
/* obtains cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_get_type(khm_handle conf, const wchar_t * value) {
HKEY hkm = NULL;
HKEY hku = NULL;
@@ -2003,7 +2003,7 @@ khc_get_type(khm_handle conf, const wchar_t * value) {
}
/* obtains cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_value_exists(khm_handle conf, const wchar_t * value) {
HKEY hku = NULL;
HKEY hkm = NULL;
@@ -2075,7 +2075,7 @@ khc_remove_value(khm_handle conf, const wchar_t * value, khm_int32 flags) {
if((flags == 0 ||
(flags & KCONF_FLAG_USER)) &&
- hku && (RegQueryValueEx(hku, value, NULL,
+ hku && (RegQueryValueEx(hku, value, NULL,
&t, NULL, NULL) == ERROR_SUCCESS)) {
l = RegDeleteValue(hku, value);
if (l == ERROR_SUCCESS)
@@ -2085,11 +2085,11 @@ khc_remove_value(khm_handle conf, const wchar_t * value, khm_int32 flags) {
}
if((flags == 0 ||
(flags & KCONF_FLAG_MACHINE)) &&
- hkm && (RegQueryValueEx(hkm, value, NULL,
+ hkm && (RegQueryValueEx(hkm, value, NULL,
&t, NULL, NULL) == ERROR_SUCCESS)) {
l = RegDeleteValue(hkm, value);
if (l == ERROR_SUCCESS)
- rv = (rv == KHM_ERROR_UNKNOWN)?KHM_ERROR_PARTIAL:
+ rv = (rv == KHM_ERROR_UNKNOWN)?KHM_ERROR_PARTIAL:
KHM_ERROR_SUCCESS;
else
rv = (rv == KHM_ERROR_SUCCESS)?KHM_ERROR_PARTIAL:
@@ -2222,7 +2222,7 @@ khc_remove_space(khm_handle conf) {
}
/* no locks */
-khm_boolean
+khm_boolean
khcint_is_valid_name(wchar_t * name)
{
size_t cbsize;
@@ -2232,7 +2232,7 @@ khcint_is_valid_name(wchar_t * name)
}
/* no locks */
-khm_int32
+khm_int32
khcint_validate_schema(const kconf_schema * schema,
int begin,
int *end)
@@ -2295,8 +2295,8 @@ khcint_validate_schema(const kconf_schema * schema,
}
/* obtains cs_conf_handle/cs_conf_global; called with cs_conf_global */
-khm_int32
-khcint_load_schema_i(khm_handle parent, const kconf_schema * schema,
+khm_int32
+khcint_load_schema_i(khm_handle parent, const kconf_schema * schema,
int begin, int * end)
{
int i;
@@ -2310,7 +2310,7 @@ khcint_load_schema_i(khm_handle parent, const kconf_schema * schema,
switch(state) {
case 0: /* initial. this record should start a config space */
LeaveCriticalSection(&cs_conf_global);
- if(KHM_FAILED(khc_open_space(parent, schema[i].name,
+ if(KHM_FAILED(khc_open_space(parent, schema[i].name,
KHM_FLAG_CREATE, &h))) {
EnterCriticalSection(&cs_conf_global);
return KHM_ERROR_INVALID_PARAM;
@@ -2366,7 +2366,7 @@ khcint_load_schema_i(khm_handle parent, const kconf_schema * schema,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_load_schema(khm_handle conf, const kconf_schema * schema)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -2381,15 +2381,15 @@ khc_load_schema(khm_handle conf, const kconf_schema * schema)
return KHM_ERROR_INVALID_PARAM;
EnterCriticalSection(&cs_conf_global);
- rv = khcint_load_schema_i(conf, schema, 0, NULL);
+ rv = khcint_load_schema_i(conf, schema, 0, NULL);
LeaveCriticalSection(&cs_conf_global);
return rv;
}
/* obtains cs_conf_handle/cs_conf_global; called with cs_conf_global */
-khm_int32
-khcint_unload_schema_i(khm_handle parent, const kconf_schema * schema,
+khm_int32
+khcint_unload_schema_i(khm_handle parent, const kconf_schema * schema,
int begin, int * end)
{
int i;
@@ -2458,7 +2458,7 @@ khcint_unload_schema_i(khm_handle parent, const kconf_schema * schema,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_unload_schema(khm_handle conf, const kconf_schema * schema)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -2480,7 +2480,7 @@ khc_unload_schema(khm_handle conf, const kconf_schema * schema)
}
/* obtaincs cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_enum_subspaces(khm_handle conf,
khm_handle prev,
khm_handle * next)
@@ -2516,7 +2516,7 @@ khc_enum_subspaces(khm_handle conf,
int idx;
idx = 0;
- while(RegEnumKey(hk_conf, idx,
+ while(RegEnumKey(hk_conf, idx,
name, ARRAYLENGTH(name)) == ERROR_SUCCESS) {
wchar_t * tilde;
tilde = wcschr(name, L'~');
@@ -2540,14 +2540,14 @@ khc_enum_subspaces(khm_handle conf,
int idx;
idx = 0;
- while(RegEnumKey(hk_conf, idx,
+ while(RegEnumKey(hk_conf, idx,
name, ARRAYLENGTH(name)) == ERROR_SUCCESS) {
wchar_t * tilde;
tilde = wcschr(name, L'~');
if (tilde)
*tilde = 0;
- if(KHM_SUCCEEDED(khc_open_space(conf, name,
+ if(KHM_SUCCEEDED(khc_open_space(conf, name,
KCONF_FLAG_MACHINE, &h)))
khc_close_space(h);
idx++;
@@ -2588,7 +2588,7 @@ khc_enum_subspaces(khm_handle conf,
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_write_multi_string(khm_handle conf, const wchar_t * value, wchar_t * buf)
{
size_t cb;
@@ -2620,8 +2620,8 @@ khc_write_multi_string(khm_handle conf, const wchar_t * value, wchar_t * buf)
}
/* obtains cs_conf_handle/cs_conf_global */
-KHMEXP khm_int32 KHMAPI
-khc_read_multi_string(khm_handle conf, const wchar_t * value,
+KHMEXP khm_int32 KHMAPI
+khc_read_multi_string(khm_handle conf, const wchar_t * value,
wchar_t * buf, khm_size * bufsize)
{
wchar_t vbuf[KCONF_MAXCCH_STRING];
diff --git a/src/windows/identity/kconfig/kconfig.h b/src/windows/identity/kconfig/kconfig.h
index 689992c29c..25411eebd3 100644
--- a/src/windows/identity/kconfig/kconfig.h
+++ b/src/windows/identity/kconfig/kconfig.h
@@ -33,7 +33,7 @@
/*! \defgroup kconf NetIDMgr Configuration Provider */
/*@{*/
-/*! \brief Configuration schema descriptor record
+/*! \brief Configuration schema descriptor record
The schema descriptor is a convenient way to provide a default set
of configuration options for a part of an application. It
@@ -94,7 +94,7 @@ typedef struct tag_kconf_schema {
*/
#define KC_INT32 3
-/*! \brief A 64 bit integer
+/*! \brief A 64 bit integer
Specifies a configuration parameter named \a name which is of this
type. Use \a description to provide an optional description of
@@ -104,7 +104,7 @@ typedef struct tag_kconf_schema {
*/
#define KC_INT64 4
-/*! \brief A unicode string
+/*! \brief A unicode string
Specifies a configuration parameter named \a name which is of this
type. Use \a description to provide an optional description of
@@ -116,7 +116,7 @@ typedef struct tag_kconf_schema {
*/
#define KC_STRING 5
-/*! \brief An unparsed binary stream
+/*! \brief An unparsed binary stream
Specifies a configuration parameter named \a name which is of this
type. Use \a description to provide an optional description of
@@ -187,7 +187,7 @@ typedef struct tag_kconf_schema {
*/
#define KCONF_FLAG_NOPARSENAME 0x00000040
-/*! \brief Maximum number of allowed characters (including terminating NULL) in a name
+/*! \brief Maximum number of allowed characters (including terminating NULL) in a name
\note This is a hard limit in Windows, since we are mapping
configuration spaces to registry keys.
@@ -233,7 +233,7 @@ typedef struct tag_kconf_schema {
\param[in] parent The parent configuration space. The path
specified in \a cspace is relative to the parent. Set this to
- NULL to indicate the root configuration space.
+ NULL to indicate the root configuration space.
\param[in] cspace The configuration path. This can be up to
::KCONF_MAXCCH_PATH characters in length. Use backslashes to
@@ -253,8 +253,8 @@ typedef struct tag_kconf_schema {
and settings \a flags to the required flags.
*/
-KHMEXP khm_int32 KHMAPI
-khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
khm_handle * result);
/*! \brief Set the shadow space for a configuration handle
@@ -277,12 +277,12 @@ khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags,
Specify NULL for \a lower to remove any prior shadow.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_shadow_space(khm_handle upper, khm_handle lower);
/*! \brief Close a handle opened with khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_close_space(khm_handle conf);
/*! \brief Read a string value from a configuration space
@@ -321,7 +321,7 @@ khc_close_space(khm_handle conf);
\param[in] buf Buffer to copy the string to. Specify NULL to just
retrieve the number of required bytes.
-
+
\param[in,out] bufsize On entry, specifies the number of bytes of
space available at the location specified by \a buf. On exit
specifies the number of bytes actually copied or the size of
@@ -336,10 +336,10 @@ khc_close_space(khm_handle conf);
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_read_string(khm_handle conf,
- const wchar_t * value_name,
- wchar_t * buf,
+KHMEXP khm_int32 KHMAPI
+khc_read_string(khm_handle conf,
+ const wchar_t * value_name,
+ wchar_t * buf,
khm_size * bufsize);
/*! \brief Read a multi-string value from a configuration space
@@ -386,7 +386,7 @@ khc_read_string(khm_handle conf,
\param[in] buf Buffer to copy the multi-string to. Specify NULL
to just retrieve the number of required bytes.
-
+
\param[in,out] bufsize On entry, specifies the number of bytes of
space available at the location specified by \a buf. On exit
specifies the number of bytes actually copied or the size of
@@ -401,10 +401,10 @@ khc_read_string(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_read_multi_string(khm_handle conf,
- const wchar_t * value_name,
- wchar_t * buf,
+KHMEXP khm_int32 KHMAPI
+khc_read_multi_string(khm_handle conf,
+ const wchar_t * value_name,
+ wchar_t * buf,
khm_size * bufsize);
/*! \brief Read a 32 bit integer value from a configuration space
@@ -452,9 +452,9 @@ khc_read_multi_string(khm_handle conf,
\retval KHM_ERROR_TYPE_MISMATCH The specified value was found but was not of the correct type.
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_read_int32(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_read_int32(khm_handle conf,
+ const wchar_t * value_name,
khm_int32 * buf);
/*! \brief Read a 64 bit integer value from a configuration space
@@ -503,9 +503,9 @@ khc_read_int32(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_read_int64(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_read_int64(khm_handle conf,
+ const wchar_t * value_name,
khm_int64 * buf);
/*! \brief Read a binary value from a configuration space
@@ -542,7 +542,7 @@ khc_read_int64(khm_handle conf,
\param[in] buf Buffer to copy the string to. Specify NULL to just
retrieve the number of required bytes.
-
+
\param[in,out] bufsize On entry, specifies the number of bytes of
space available at the location specified by \a buf. On exit
specifies the number of bytes actually copied or the size of
@@ -554,10 +554,10 @@ khc_read_int64(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_read_binary(khm_handle conf,
- const wchar_t * value_name,
- void * buf,
+KHMEXP khm_int32 KHMAPI
+khc_read_binary(khm_handle conf,
+ const wchar_t * value_name,
+ void * buf,
khm_size * bufsize);
/*! \brief Write a string value to a configuration space
@@ -603,9 +603,9 @@ khc_read_binary(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_write_string(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_write_string(khm_handle conf,
+ const wchar_t * value_name,
wchar_t * buf);
/*! \brief Write a multi-string value to a configuration space
@@ -653,9 +653,9 @@ khc_write_string(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_write_multi_string(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_write_multi_string(khm_handle conf,
+ const wchar_t * value_name,
wchar_t * buf);
/*! \brief Write a 32 bit integer value to a configuration space
@@ -693,9 +693,9 @@ khc_write_multi_string(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_write_int32(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_write_int32(khm_handle conf,
+ const wchar_t * value_name,
khm_int32 buf);
/*! \brief Write a 64 bit integer value to a configuration space
@@ -733,9 +733,9 @@ khc_write_int32(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_write_int64(khm_handle conf,
- const wchar_t * value_name,
+KHMEXP khm_int32 KHMAPI
+khc_write_int64(khm_handle conf,
+ const wchar_t * value_name,
khm_int64 buf);
/*! \brief Write a binary value to a configuration space
@@ -768,10 +768,10 @@ khc_write_int64(khm_handle conf,
\see khc_open_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_write_binary(khm_handle conf,
- const wchar_t * value_name,
- void * buf,
+KHMEXP khm_int32 KHMAPI
+khc_write_binary(khm_handle conf,
+ const wchar_t * value_name,
+ void * buf,
khm_size bufsize);
/*! \brief Get the type of a value in a configuration space
@@ -779,7 +779,7 @@ khc_write_binary(khm_handle conf,
\return The return value is the type of the specified value, or
KC_NONE if the value does not exist.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_get_type(khm_handle conf, const wchar_t * value_name);
/*! \brief Check which configuration stores contain a specific value.
@@ -802,7 +802,7 @@ khc_get_type(khm_handle conf, const wchar_t * value_name);
and ::KCONF_FLAG_SCHEMA indicating which stores contain the
value.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_value_exists(khm_handle conf, const wchar_t * value);
/*! \brief Remove a value from a configuration space
@@ -857,9 +857,9 @@ khc_remove_value(khm_handle conf, const wchar_t * value_name, khm_int32 flags);
pointed to by \a buf. On exit, holds the number of bytes
copied into the buffer including the NULL terminator.
*/
-KHMEXP khm_int32 KHMAPI
-khc_get_config_space_name(khm_handle conf,
- wchar_t * buf,
+KHMEXP khm_int32 KHMAPI
+khc_get_config_space_name(khm_handle conf,
+ wchar_t * buf,
khm_size * bufsize);
/*! \brief Get a handle to the parent space
@@ -870,8 +870,8 @@ khc_get_config_space_name(khm_handle conf,
call succeeds. Receives NULL otherwise. The returned handle
must be closed using khc_close_space()
*/
-KHMEXP khm_int32 KHMAPI
-khc_get_config_space_parent(khm_handle conf,
+KHMEXP khm_int32 KHMAPI
+khc_get_config_space_parent(khm_handle conf,
khm_handle * parent);
/*! \brief Load a configuration schema into the specified configuration space
@@ -884,14 +884,14 @@ khc_get_config_space_parent(khm_handle conf,
\see khc_unload_schema()
*/
-KHMEXP khm_int32 KHMAPI
-khc_load_schema(khm_handle conf,
+KHMEXP khm_int32 KHMAPI
+khc_load_schema(khm_handle conf,
const kconf_schema * schema);
/*! \brief Unload a schema from a configuration space
*/
-KHMEXP khm_int32 KHMAPI
-khc_unload_schema(khm_handle conf,
+KHMEXP khm_int32 KHMAPI
+khc_unload_schema(khm_handle conf,
const kconf_schema * schema);
/*! \brief Enumerate the subspaces of a configuration space
@@ -941,7 +941,7 @@ khc_unload_schema(khm_handle conf,
However, the returned handle has the same domain restrictions
as \a conf.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khc_enum_subspaces(khm_handle conf,
khm_handle prev,
khm_handle * next);
diff --git a/src/windows/identity/kconfig/registry.c b/src/windows/identity/kconfig/registry.c
index d1e4009f2a..3a3f1cd684 100644
--- a/src/windows/identity/kconfig/registry.c
+++ b/src/windows/identity/kconfig/registry.c
@@ -25,4 +25,3 @@
/* $Id$ */
#include<kconfiginternal.h>
-
diff --git a/src/windows/identity/kconfig/test/utiltest.c b/src/windows/identity/kconfig/test/utiltest.c
index f999dfa710..4131d07cfb 100644
--- a/src/windows/identity/kconfig/test/utiltest.c
+++ b/src/windows/identity/kconfig/test/utiltest.c
@@ -130,7 +130,7 @@ int ms_append_test(void)
printf("MS[");
print_ms(wbuf);
printf("] + [foo]=[");
-
+
cbbuf = sizeof(wbuf);
code = khc_multi_string_append(wbuf, &cbbuf, L"foo");
diff --git a/src/windows/identity/kcreddb/attrib.c b/src/windows/identity/kcreddb/attrib.c
index 983e3cc98e..f4291778cd 100644
--- a/src/windows/identity/kcreddb/attrib.c
+++ b/src/windows/identity/kcreddb/attrib.c
@@ -33,27 +33,27 @@ kcdb_attrib_i ** kcdb_attrib_tbl = NULL;
kcdb_attrib_i ** kcdb_property_tbl = NULL;
kcdb_attrib_i * kcdb_attribs = NULL;
-void
+void
kcdb_attrib_add_ref_func(const void * key, void * va)
{
kcdb_attrib_hold((kcdb_attrib_i *) va);
}
-void
+void
kcdb_attrib_del_ref_func(const void * key, void * va)
{
kcdb_attrib_release((kcdb_attrib_i *) va);
}
-void
-kcdb_attrib_msg_completion(kmq_message * m)
+void
+kcdb_attrib_msg_completion(kmq_message * m)
{
if(m && m->vparam) {
kcdb_attrib_release((kcdb_attrib_i *) m->vparam);
}
}
-khm_int32
+khm_int32
kcdb_attrib_hold(kcdb_attrib_i * ai)
{
if(!ai)
@@ -65,7 +65,7 @@ kcdb_attrib_hold(kcdb_attrib_i * ai)
return KHM_ERROR_SUCCESS;
}
-khm_int32
+khm_int32
kcdb_attrib_release(kcdb_attrib_i * ai)
{
if(!ai)
@@ -77,17 +77,17 @@ kcdb_attrib_release(kcdb_attrib_i * ai)
return KHM_ERROR_SUCCESS;
}
-void
+void
kcdb_attrib_post_message(khm_int32 op, kcdb_attrib_i * ai)
{
kcdb_attrib_hold(ai);
kmq_post_message(KMSG_KCDB, KMSG_KCDB_ATTRIB, op, (void *) ai);
}
-khm_int32 KHMAPI
-kcdb_attr_sys_cb(khm_handle vcred,
- khm_int32 attr,
- void * buf,
+khm_int32 KHMAPI
+kcdb_attr_sys_cb(khm_handle vcred,
+ khm_int32 attr,
+ void * buf,
khm_size * pcb_buf)
{
kcdb_cred * c;
@@ -109,7 +109,7 @@ kcdb_attr_sys_cb(khm_handle vcred,
}
case KCDB_ATTR_ID_NAME:
- return kcdb_identity_get_name((khm_handle) c->identity,
+ return kcdb_identity_get_name((khm_handle) c->identity,
(wchar_t *) buf, pcb_buf);
case KCDB_ATTR_TYPE:
@@ -123,7 +123,7 @@ kcdb_attr_sys_cb(khm_handle vcred,
}
case KCDB_ATTR_TYPE_NAME:
- return kcdb_credtype_describe(c->type, buf,
+ return kcdb_credtype_describe(c->type, buf,
pcb_buf, KCDB_TS_SHORT);
case KCDB_ATTR_TIMELEFT:
@@ -148,7 +148,7 @@ kcdb_attr_sys_cb(khm_handle vcred,
iftc = FtToInt(&ftc);
*((FILETIME *) buf) =
- IntToFt(FtToInt((FILETIME *)
+ IntToFt(FtToInt((FILETIME *)
kcdb_cred_buf_get(c,KCDB_ATTR_EXPIRE))
- iftc);
*pcb_buf = sizeof(FILETIME);
@@ -210,36 +210,36 @@ kcdb_attr_sys_cb(khm_handle vcred,
}
}
-void
+void
kcdb_attrib_init(void)
{
kcdb_attrib attrib;
wchar_t sbuf[256];
InitializeCriticalSection(&cs_attrib);
- kcdb_attrib_namemap =
+ kcdb_attrib_namemap =
hash_new_hashtable(KCDB_ATTRIB_HASH_SIZE,
hash_string,
hash_string_comp,
kcdb_attrib_add_ref_func,
kcdb_attrib_del_ref_func);
- kcdb_attrib_tbl =
+ kcdb_attrib_tbl =
PMALLOC(sizeof(kcdb_attrib_i *) * (KCDB_ATTR_MAX_ID + 1));
assert(kcdb_attrib_tbl != NULL);
- ZeroMemory(kcdb_attrib_tbl,
+ ZeroMemory(kcdb_attrib_tbl,
sizeof(kcdb_attrib_i *) * (KCDB_ATTR_MAX_ID + 1));
- kcdb_property_tbl =
+ kcdb_property_tbl =
PMALLOC(sizeof(kcdb_attrib_i *) * KCDB_ATTR_MAX_PROPS);
assert(kcdb_property_tbl != NULL);
- ZeroMemory(kcdb_property_tbl,
+ ZeroMemory(kcdb_property_tbl,
sizeof(kcdb_attrib_i *) * KCDB_ATTR_MAX_PROPS);
kcdb_attribs = NULL;
/* register standard attributes */
-
+
/* Name */
attrib.id = KCDB_ATTR_NAME;
attrib.name = KCDB_ATTRNAME_NAME;
@@ -247,9 +247,9 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_NAME, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
- KCDB_ATTR_FLAG_COMPUTED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
+ KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_SYSTEM;
attrib.compute_cb = kcdb_attr_sys_cb;
attrib.compute_min_cbsize = sizeof(wchar_t);
@@ -264,9 +264,9 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_IDENTITY, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
- KCDB_ATTR_FLAG_COMPUTED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
+ KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_SYSTEM |
KCDB_ATTR_FLAG_HIDDEN;
attrib.compute_cb = kcdb_attr_sys_cb;
@@ -283,9 +283,9 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_IDENTITY, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
- KCDB_ATTR_FLAG_COMPUTED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
+ KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_ALTVIEW |
KCDB_ATTR_FLAG_SYSTEM;
attrib.compute_cb = kcdb_attr_sys_cb;
@@ -301,9 +301,9 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_TYPE, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
- KCDB_ATTR_FLAG_COMPUTED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
+ KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_SYSTEM |
KCDB_ATTR_FLAG_HIDDEN;
attrib.compute_cb = kcdb_attr_sys_cb;
@@ -320,8 +320,8 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_TYPE, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_ALTVIEW |
KCDB_ATTR_FLAG_SYSTEM;
@@ -377,7 +377,7 @@ kcdb_attrib_init(void)
attrib.id = KCDB_ATTR_RENEW_EXPIRE;
attrib.name = KCDB_ATTRNAME_RENEW_EXPIRE;
attrib.type = KCDB_TYPE_DATE;
- LoadString(hinst_kcreddb, IDS_RENEW_EXPIRES,
+ LoadString(hinst_kcreddb, IDS_RENEW_EXPIRES,
sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
@@ -411,7 +411,7 @@ kcdb_attrib_init(void)
attrib.alt_id = KCDB_ATTR_RENEW_EXPIRE;
attrib.name = KCDB_ATTRNAME_RENEW_TIMELEFT;
attrib.type = KCDB_TYPE_INTERVAL;
- LoadString(hinst_kcreddb,
+ LoadString(hinst_kcreddb,
IDS_RENEW_TIMELEFT, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
@@ -457,7 +457,7 @@ kcdb_attrib_init(void)
attrib.id = KCDB_ATTR_RENEW_LIFETIME;
attrib.name = KCDB_ATTRNAME_RENEW_LIFETIME;
attrib.type = KCDB_TYPE_INTERVAL;
- LoadString(hinst_kcreddb,
+ LoadString(hinst_kcreddb,
IDS_RENEW_LIFETIME, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
@@ -475,9 +475,9 @@ kcdb_attrib_init(void)
LoadString(hinst_kcreddb, IDS_FLAGS, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
- attrib.flags =
- KCDB_ATTR_FLAG_REQUIRED |
- KCDB_ATTR_FLAG_COMPUTED |
+ attrib.flags =
+ KCDB_ATTR_FLAG_REQUIRED |
+ KCDB_ATTR_FLAG_COMPUTED |
KCDB_ATTR_FLAG_SYSTEM |
KCDB_ATTR_FLAG_HIDDEN;
attrib.compute_cb = kcdb_attr_sys_cb;
@@ -487,11 +487,11 @@ kcdb_attrib_init(void)
kcdb_attrib_register(&attrib, NULL);
}
-void
+void
kcdb_attrib_exit(void)
{
DeleteCriticalSection(&cs_attrib);
-
+
if(kcdb_attrib_tbl)
PFREE(kcdb_attrib_tbl);
@@ -499,7 +499,7 @@ kcdb_attrib_exit(void)
PFREE(kcdb_property_tbl);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_get_id(const wchar_t *name, khm_int32 * id)
{
kcdb_attrib_i * ai;
@@ -520,7 +520,7 @@ kcdb_attrib_get_id(const wchar_t *name, khm_int32 * id)
}
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_register(const kcdb_attrib * attrib, khm_int32 * new_id)
{
kcdb_attrib_i * ai;
@@ -553,7 +553,7 @@ kcdb_attrib_register(const kcdb_attrib * attrib, khm_int32 * new_id)
} else
cb_long_desc = 0;
- if((attrib->flags & KCDB_ATTR_FLAG_COMPUTED) &&
+ if((attrib->flags & KCDB_ATTR_FLAG_COMPUTED) &&
(!attrib->compute_cb ||
attrib->compute_min_cbsize <= 0 ||
attrib->compute_max_cbsize < attrib->compute_min_cbsize))
@@ -568,15 +568,15 @@ kcdb_attrib_register(const kcdb_attrib * attrib, khm_int32 * new_id)
EnterCriticalSection(&cs_attrib);
- if(!prop &&
- (attrib->id < 0 || attrib->id > KCDB_ATTR_MAX_ID))
+ if(!prop &&
+ (attrib->id < 0 || attrib->id > KCDB_ATTR_MAX_ID))
{
if(KHM_FAILED(kcdb_attrib_next_free_id(&attr_id))) {
LeaveCriticalSection(&cs_attrib);
return KHM_ERROR_NO_RESOURCES;
}
} else if (prop &&
- (attrib->id < KCDB_ATTR_MIN_PROP_ID ||
+ (attrib->id < KCDB_ATTR_MIN_PROP_ID ||
attrib->id > KCDB_ATTR_MAX_PROP_ID)) {
if(KHM_FAILED(kcdb_attrib_next_free_prop_id(&attr_id))) {
@@ -644,7 +644,7 @@ kcdb_attrib_register(const kcdb_attrib * attrib, khm_int32 * new_id)
}
KHMEXP khm_int32 KHMAPI kcdb_attrib_get_info(
- khm_int32 id,
+ khm_int32 id,
kcdb_attrib ** attrib)
{
kcdb_attrib_i * ai;
@@ -692,9 +692,9 @@ KHMEXP khm_int32 KHMAPI kcdb_attrib_unregister(khm_int32 id)
}
KHMEXP khm_int32 KHMAPI kcdb_attrib_describe(
- khm_int32 id,
- wchar_t * buffer,
- khm_size * cbsize,
+ khm_int32 id,
+ wchar_t * buffer,
+ khm_size * cbsize,
khm_int32 flags)
{
kcdb_attrib_i * ai;
@@ -708,7 +708,7 @@ KHMEXP khm_int32 KHMAPI kcdb_attrib_describe(
prop = FALSE;
else if(id >= KCDB_ATTR_MIN_PROP_ID && id <= KCDB_ATTR_MAX_PROP_ID)
prop = TRUE;
- else
+ else
return KHM_ERROR_INVALID_PARAM;
if(prop)
@@ -720,7 +720,7 @@ KHMEXP khm_int32 KHMAPI kcdb_attrib_describe(
return KHM_ERROR_NOT_FOUND;
if((flags & KCDB_TS_SHORT) &&
- ai->attr.short_desc)
+ ai->attr.short_desc)
{
if(FAILED(StringCbLength(ai->attr.short_desc, KCDB_MAXCB_SHORT_DESC, &cb_size)))
return KHM_ERROR_UNKNOWN;
diff --git a/src/windows/identity/kcreddb/buf.c b/src/windows/identity/kcreddb/buf.c
index 521baeb976..14038decff 100644
--- a/src/windows/identity/kcreddb/buf.c
+++ b/src/windows/identity/kcreddb/buf.c
@@ -142,11 +142,11 @@ void kcdb_buf_alloc(kcdb_buf * buf, khm_size slot, khm_ui_2 id, khm_size cbsize)
buf->cb_used - (f->offset + cbold));
for(i=0; i < (int) buf->n_fields; i++) {
- if(i != slot &&
+ if(i != slot &&
(buf->fields[i].flags & KCDB_CREDF_FLAG_ALLOCD) &&
- buf->fields[i].offset > f->offset)
+ buf->fields[i].offset > f->offset)
{
- buf->fields[i].offset =
+ buf->fields[i].offset =
(khm_ui_4)(((khm_ssize) buf->fields[i].offset) + cbdelta);
}
}
@@ -183,7 +183,7 @@ void kcdb_buf_dup(kcdb_buf * dest, const kcdb_buf * src)
#if 0
/* replaced by UBOUNDSS() above */
(src->cb_used <= kcdb_cred_initial_size)? kcdb_cred_initial_size:
- kcdb_cred_initial_size +
+ kcdb_cred_initial_size +
(((src->cb_used - (kcdb_cred_initial_size + 1)) / kcdb_cred_growth_factor + 1) * kcdb_cred_growth_factor);
#endif
@@ -241,7 +241,7 @@ int kcdb_buf_val_exist(kcdb_buf * buf, khm_size slot)
void * kcdb_buf_get(kcdb_buf * buf, khm_size slot)
{
- if(slot >= buf->n_fields ||
+ if(slot >= buf->n_fields ||
!(buf->fields[slot].flags & KCDB_CREDF_FLAG_ALLOCD))
return NULL;
return (((BYTE *) buf->buffer) + buf->fields[slot].offset);
@@ -249,7 +249,7 @@ void * kcdb_buf_get(kcdb_buf * buf, khm_size slot)
khm_size kcdb_buf_size(kcdb_buf * buf, khm_size slot)
{
- if(slot >= buf->n_fields ||
+ if(slot >= buf->n_fields ||
!(buf->fields[slot].flags & KCDB_CREDF_FLAG_ALLOCD))
return 0;
return (buf->fields[slot].cbsize);
@@ -257,7 +257,7 @@ khm_size kcdb_buf_size(kcdb_buf * buf, khm_size slot)
void kcdb_buf_set_value_flag(kcdb_buf * buf, khm_size slot)
{
- if(slot >= buf->n_fields ||
+ if(slot >= buf->n_fields ||
!(buf->fields[slot].flags & KCDB_CREDF_FLAG_ALLOCD))
return;
@@ -282,10 +282,10 @@ khm_size kcdb_buf_slot_by_id(kcdb_buf * buf, khm_ui_2 id)
/* API for accessing generic buffers */
KHMEXP khm_int32 KHMAPI kcdb_buf_get_attr(
- khm_handle record,
- khm_int32 attr_id,
- khm_int32 * attr_type,
- void * buffer,
+ khm_handle record,
+ khm_int32 attr_id,
+ khm_int32 * attr_type,
+ void * buffer,
khm_size * pcb_buf)
{
if(kcdb_cred_is_active_cred(record))
@@ -388,4 +388,3 @@ KHMEXP khm_int32 KHMAPI kcdb_buf_release(khm_handle record)
else
return KHM_ERROR_INVALID_PARAM;
}
-
diff --git a/src/windows/identity/kcreddb/credential.c b/src/windows/identity/kcreddb/credential.c
index c241943d04..12618f237a 100644
--- a/src/windows/identity/kcreddb/credential.c
+++ b/src/windows/identity/kcreddb/credential.c
@@ -59,11 +59,11 @@ void kcdb_cred_exit(void)
can be called by kcdb_cred_dup with a write lock on l_creds and in other
places with a read lock on l_creds. New credentials must be creatable while
holding either lock. */
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_create(const wchar_t * name,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_create(const wchar_t * name,
khm_handle identity,
khm_int32 cred_type,
- khm_handle * result)
+ khm_handle * result)
{
kcdb_cred * cred;
size_t cb_name;
@@ -87,7 +87,7 @@ kcdb_cred_create(const wchar_t * name,
cred->type = cred_type;
cred->refcount = 1; /* initially held */
-
+
LINIT(cred);
kcdb_buf_new(&cred->buf, KCDB_ATTR_MAX_ID + 1);
@@ -218,7 +218,7 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_dup(
if(KHM_FAILED(kcdb_cred_create(cred->name,
cred->identity,
cred->type,
- &vnewcred)))
+ &vnewcred)))
{
code = KHM_ERROR_UNKNOWN;
goto _exit;
@@ -317,9 +317,9 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_type(
}
KHMEXP khm_int32 KHMAPI kcdb_cred_set_attrib(
- khm_handle cred,
- const wchar_t * name,
- void * buffer,
+ khm_handle cred,
+ const wchar_t * name,
+ void * buffer,
khm_size cbbuf)
{
khm_int32 attr_id = -1;
@@ -335,9 +335,9 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_set_attrib(
}
KHMEXP khm_int32 KHMAPI kcdb_cred_set_attr(
- khm_handle vcred,
- khm_int32 attr_id,
- void * buffer,
+ khm_handle vcred,
+ khm_int32 attr_id,
+ void * buffer,
khm_size cbbuf)
{
kcdb_cred * cred;
@@ -400,7 +400,7 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_set_attr(
}
if(KHM_FAILED(code =
- type->dup(buffer, cbbuf, kcdb_cred_buf_get(cred,attr_id), &cbdest)))
+ type->dup(buffer, cbbuf, kcdb_cred_buf_get(cred,attr_id), &cbdest)))
{
kcdb_buf_alloc(&cred->buf, attr_id, (khm_ui_2) attr_id, 0);
goto _exit;
@@ -420,11 +420,11 @@ _exit:
}
KHMEXP khm_int32 KHMAPI kcdb_cred_get_attrib(
- khm_handle cred,
- const wchar_t * name,
+ khm_handle cred,
+ const wchar_t * name,
khm_int32 * attr_type,
- void * buffer,
- khm_size * cbbuf)
+ void * buffer,
+ khm_size * cbbuf)
{
khm_int32 attr_id = -1;
@@ -440,11 +440,11 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_attrib(
}
KHMEXP khm_int32 KHMAPI kcdb_cred_get_attrib_string(
- khm_handle cred,
- const wchar_t * name,
- wchar_t * buffer,
+ khm_handle cred,
+ const wchar_t * name,
+ wchar_t * buffer,
khm_size * cbbuf,
- khm_int32 flags)
+ khm_int32 flags)
{
khm_int32 attr_id = -1;
@@ -459,11 +459,11 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_attrib_string(
flags);
}
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_attr(khm_handle vcred,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_attr(khm_handle vcred,
khm_int32 attr_id,
khm_int32 * attr_type,
- void * buffer,
+ void * buffer,
khm_size * pcbbuf)
{
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -530,9 +530,9 @@ _exit:
}
KHMEXP khm_int32 KHMAPI kcdb_cred_get_attr_string(
- khm_handle vcred,
+ khm_handle vcred,
khm_int32 attr_id,
- wchar_t * buffer,
+ wchar_t * buffer,
khm_size * pcbbuf,
khm_int32 flags)
{
@@ -627,8 +627,8 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_attr_string(
KHMEXP khm_int32 KHMAPI kcdb_cred_get_name(
- khm_handle vcred,
- wchar_t * buffer,
+ khm_handle vcred,
+ wchar_t * buffer,
khm_size * cbbuf)
{
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -639,7 +639,7 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_name(
return KHM_ERROR_INVALID_PARAM;
kcdb_cred_lock_read();
-
+
if(!kcdb_cred_is_active_cred(vcred)) {
code = KHM_ERROR_INVALID_PARAM;
goto _exit;
@@ -671,7 +671,7 @@ _exit:
}
KHMEXP khm_int32 KHMAPI kcdb_cred_get_identity(
- khm_handle vcred,
+ khm_handle vcred,
khm_handle * identity)
{
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -692,7 +692,7 @@ KHMEXP khm_int32 KHMAPI kcdb_cred_get_identity(
kcdb_identity_hold((khm_handle) cred->identity);
*identity = cred->identity;
-
+
_exit:
kcdb_cred_unlock_read();
return code;
@@ -739,7 +739,7 @@ _exit:
kcdb_cred_unlock_write();
kcdb_cred_check_and_delete(vcred);
-
+
return code;
}
@@ -809,9 +809,9 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_creds_comp_attrib(khm_handle cred1,
- khm_handle cred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_creds_comp_attrib(khm_handle cred1,
+ khm_handle cred2,
const wchar_t * name)
{
khm_int32 attr_id;
@@ -822,9 +822,9 @@ kcdb_creds_comp_attrib(khm_handle cred1,
return kcdb_creds_comp_attr(cred1, cred2, attr_id);
}
-KHMEXP khm_int32 KHMAPI
-kcdb_creds_comp_attr(khm_handle vcred1,
- khm_handle vcred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_creds_comp_attr(khm_handle vcred1,
+ khm_handle vcred2,
khm_int32 attr_id)
{
khm_int32 code = 0;
@@ -879,11 +879,11 @@ kcdb_creds_comp_attr(khm_handle vcred1,
code = 0;
- if(attrib->compute_cb(vcred1, attr_id,
+ if(attrib->compute_cb(vcred1, attr_id,
NULL, &cb1) != KHM_ERROR_TOO_LONG)
goto _exit_1;
- if(attrib->compute_cb(vcred2, attr_id,
+ if(attrib->compute_cb(vcred2, attr_id,
NULL, &cb2) != KHM_ERROR_TOO_LONG)
goto _exit_1;
@@ -910,7 +910,7 @@ kcdb_creds_comp_attr(khm_handle vcred1,
code = type->comp(buf1, cb1,
buf2, cb2);
_exit_1:
- if(buf1 && (buf1 < (void *)vbuf ||
+ if(buf1 && (buf1 < (void *)vbuf ||
buf1 >= (void*)(vbuf + sizeof(vbuf))))
PFREE(buf1);
if(buf2 && (buf2 < (void *)vbuf ||
@@ -933,7 +933,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_creds_is_equal(khm_handle vcred1,
khm_handle vcred2)
{
@@ -982,7 +982,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_get_flags(khm_handle vcred,
khm_int32 * pflags)
{
@@ -1006,13 +1006,13 @@ kcdb_cred_get_flags(khm_handle vcred,
/* Update flags if necessary */
- if (!(f & KCDB_CRED_FLAG_EXPIRED) &&
+ if (!(f & KCDB_CRED_FLAG_EXPIRED) &&
kcdb_cred_buf_exist(cred, KCDB_ATTR_EXPIRE)) {
FILETIME ftc;
-
+
GetSystemTimeAsFileTime(&ftc);
- if (CompareFileTime(&ftc, ((FILETIME *)
+ if (CompareFileTime(&ftc, ((FILETIME *)
kcdb_cred_buf_get(cred, KCDB_ATTR_EXPIRE)))
>= 0)
f |= KCDB_CRED_FLAG_EXPIRED;
diff --git a/src/windows/identity/kcreddb/credset.c b/src/windows/identity/kcreddb/credset.c
index 92f6c05194..007a54b239 100644
--- a/src/windows/identity/kcreddb/credset.c
+++ b/src/windows/identity/kcreddb/credset.c
@@ -31,7 +31,7 @@ CRITICAL_SECTION cs_credset;
kcdb_credset * kcdb_credsets = NULL;
kcdb_credset * kcdb_root_credset = NULL;
-void
+void
kcdb_credset_init(void)
{
khm_handle rc;
@@ -44,7 +44,7 @@ kcdb_credset_init(void)
kcdb_root_credset->flags |= KCDB_CREDSET_FLAG_ROOT;
}
-void
+void
kcdb_credset_exit(void)
{
/*TODO: free the credsets */
@@ -52,20 +52,20 @@ kcdb_credset_exit(void)
}
/* called on an unreleased credset, or with credset::cs held */
-void
+void
kcdb_credset_buf_new(kcdb_credset * cs)
{
- cs->clist = PMALLOC(KCDB_CREDSET_INITIAL_SIZE *
+ cs->clist = PMALLOC(KCDB_CREDSET_INITIAL_SIZE *
sizeof(kcdb_credset_credref));
- ZeroMemory(cs->clist,
- KCDB_CREDSET_INITIAL_SIZE *
+ ZeroMemory(cs->clist,
+ KCDB_CREDSET_INITIAL_SIZE *
sizeof(kcdb_credset_credref));
cs->nc_clist = KCDB_CREDSET_INITIAL_SIZE;
cs->nclist = 0;
}
/* called on an unreleased credset, or with credset::cs held */
-void
+void
kcdb_credset_buf_delete(kcdb_credset * cs)
{
PFREE(cs->clist);
@@ -73,14 +73,14 @@ kcdb_credset_buf_delete(kcdb_credset * cs)
cs->nclist = 0;
}
-void
+void
kcdb_credset_buf_assert_size(kcdb_credset * cs, khm_int32 nclist)
{
if(cs->nc_clist < nclist) {
kcdb_credset_credref * new_clist;
-
+
/* nclist had better be greater than KCDB_CREDSET_INITIAL_SIZE */
- nclist = KCDB_CREDSET_INITIAL_SIZE +
+ nclist = KCDB_CREDSET_INITIAL_SIZE +
(((nclist - (KCDB_CREDSET_INITIAL_SIZE + 1)) / KCDB_CREDSET_GROWTH_FACTOR) + 1) *
KCDB_CREDSET_GROWTH_FACTOR;
@@ -94,7 +94,7 @@ kcdb_credset_buf_assert_size(kcdb_credset * cs, khm_int32 nclist)
}
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_create(khm_handle * result)
{
kcdb_credset * cs;
@@ -118,7 +118,7 @@ kcdb_credset_create(khm_handle * result)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_delete(khm_handle vcredset)
{
kcdb_credset * cs;
@@ -163,7 +163,7 @@ cl1 and cl2.
cl1 and cl2 will be modified.
*/
-khm_int32
+khm_int32
kcdb_credset_collect_core(kcdb_credset * cs1,
kcdb_cred ** cl1,
khm_int32 ncl1,
@@ -177,9 +177,9 @@ kcdb_credset_collect_core(kcdb_credset * cs1,
khm_int32 rv;
/* find matching creds and update them */
- for(i=0; i<ncl1; i++)
+ for(i=0; i<ncl1; i++)
if(cl1[i]) {
- for(j=0; j<ncl2; j++)
+ for(j=0; j<ncl2; j++)
if(cl2[j] && kcdb_creds_is_equal((khm_handle) cl1[i], (khm_handle) cl2[j])) {
/* they are equivalent. make them equal */
@@ -234,10 +234,10 @@ kcdb_credset_collect_core(kcdb_credset * cs1,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_collect(khm_handle cs_dest,
- khm_handle cs_src,
- khm_handle identity,
+ khm_handle cs_src,
+ khm_handle identity,
khm_int32 type,
khm_int32 * delta)
{
@@ -328,7 +328,7 @@ kcdb_credset_collect(khm_handle cs_dest,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_collect_filtered(khm_handle cs_dest,
khm_handle cs_src,
kcdb_cred_filter_func filter,
@@ -386,9 +386,9 @@ kcdb_credset_collect_filtered(khm_handle cs_dest,
rcs->flags |= KCDB_CREDSET_FLAG_ENUM;
for(i=0; i<rcs->nclist; i++) {
- if(rcs->clist[i].cred &&
- (*filter)((khm_handle)rcs->clist[i].cred,
- KCDB_CREDCOLL_FILTER_DEST | rcs_f,
+ if(rcs->clist[i].cred &&
+ (*filter)((khm_handle)rcs->clist[i].cred,
+ KCDB_CREDCOLL_FILTER_DEST | rcs_f,
rock))
{
r_sel[nr_sel++] = rcs->clist[i].cred;
@@ -433,7 +433,7 @@ kcdb_credset_collect_filtered(khm_handle cs_dest,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_flush(khm_handle vcredset)
{
int i;
@@ -464,10 +464,10 @@ kcdb_credset_flush(khm_handle vcredset)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_credset_extract(khm_handle destcredset,
- khm_handle sourcecredset,
- khm_handle identity,
+KHMEXP khm_int32 KHMAPI
+kcdb_credset_extract(khm_handle destcredset,
+ khm_handle sourcecredset,
+ khm_handle identity,
khm_int32 type)
{
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -543,7 +543,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_extract_filtered(khm_handle destcredset,
khm_handle sourcecredset,
kcdb_cred_filter_func filter,
@@ -623,7 +623,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_apply(khm_handle vcredset, kcdb_cred_apply_func f,
void * rock)
{
@@ -666,7 +666,7 @@ kcdb_credset_apply(khm_handle vcredset, kcdb_cred_apply_func f,
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_get_cred(khm_handle vcredset,
khm_int32 idx,
khm_handle * cred)
@@ -699,7 +699,7 @@ kcdb_credset_get_cred(khm_handle vcredset,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_find_filtered(khm_handle credset,
khm_int32 idx_start,
kcdb_cred_filter_func f,
@@ -758,7 +758,7 @@ kcdb_credset_find_filtered(khm_handle credset,
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_find_cred(khm_handle vcredset,
khm_handle vcred_src,
khm_handle *cred_dest) {
@@ -800,7 +800,7 @@ kcdb_credset_find_cred(khm_handle vcredset,
}
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_del_cred(khm_handle vcredset,
khm_int32 idx)
{
@@ -827,9 +827,9 @@ kcdb_credset_del_cred(khm_handle vcredset,
if (!(cs->flags & KCDB_CREDSET_FLAG_ENUM)) {
if(idx + 1 < cs->nclist)
- memmove(&(cs->clist[idx]),
- &(cs->clist[idx+1]),
- sizeof(kcdb_credset_credref) *
+ memmove(&(cs->clist[idx]),
+ &(cs->clist[idx+1]),
+ sizeof(kcdb_credset_credref) *
(cs->nclist - (idx + 1)));
cs->nclist--;
@@ -843,7 +843,7 @@ _exit:
return code;
}
-khm_int32
+khm_int32
kcdb_credset_update_cred_ref(khm_handle credset,
khm_handle cred)
{
@@ -873,7 +873,7 @@ kcdb_credset_update_cred_ref(khm_handle credset,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_del_cred_ref(khm_handle credset,
khm_handle cred)
{
@@ -906,7 +906,7 @@ kcdb_credset_del_cred_ref(khm_handle credset,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_add_cred(khm_handle credset,
khm_handle cred,
khm_int32 idx)
@@ -948,7 +948,7 @@ kcdb_credset_add_cred(khm_handle credset,
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_get_size(khm_handle credset,
khm_size * size)
{
@@ -1016,7 +1016,7 @@ kcdb_credset_purge(khm_handle credset)
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_seal(khm_handle credset) {
kcdb_credset * cs;
@@ -1059,15 +1059,15 @@ static void * _creds_comp_rock = NULL;
static kcdb_cred_comp_func _creds_comp_func = NULL;
/* Need cs_credset when calling this function. */
-int __cdecl
+int __cdecl
kcdb_creds_comp_wrapper(const void * a, const void * b)
{
- return (*_creds_comp_func)((khm_handle) ((kcdb_credset_credref *)a)->cred,
- (khm_handle) ((kcdb_credset_credref *)b)->cred,
+ return (*_creds_comp_func)((khm_handle) ((kcdb_credset_credref *)a)->cred,
+ (khm_handle) ((kcdb_credset_credref *)b)->cred,
_creds_comp_rock);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_sort(khm_handle credset,
kcdb_cred_comp_func comp,
void * rock)
@@ -1103,9 +1103,9 @@ kcdb_credset_sort(khm_handle credset,
return code;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_comp_generic(khm_handle cred1,
- khm_handle cred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_comp_generic(khm_handle cred1,
+ khm_handle cred2,
void * rock)
{
kcdb_cred_comp_order * o = (kcdb_cred_comp_order *) rock;
diff --git a/src/windows/identity/kcreddb/credtype.c b/src/windows/identity/kcreddb/credtype.c
index b88852cfcb..176d1b350a 100644
--- a/src/windows/identity/kcreddb/credtype.c
+++ b/src/windows/identity/kcreddb/credtype.c
@@ -72,8 +72,8 @@ void kcdb_credtype_check_and_delete(khm_int32 id)
}
}
-KHMEXP khm_int32 KHMAPI
-kcdb_credtype_register(const kcdb_credtype * type, khm_int32 * new_id)
+KHMEXP khm_int32 KHMAPI
+kcdb_credtype_register(const kcdb_credtype * type, khm_int32 * new_id)
{
khm_int32 id;
kcdb_credtype_i * ict;
@@ -174,7 +174,7 @@ kcdb_credtype_register(const kcdb_credtype * type, khm_int32 * new_id)
}
KHMEXP khm_int32 KHMAPI kcdb_credtype_get_info(
- khm_int32 id,
+ khm_int32 id,
kcdb_credtype ** type)
{
int found = 0;
@@ -183,8 +183,8 @@ KHMEXP khm_int32 KHMAPI kcdb_credtype_get_info(
return KHM_ERROR_INVALID_PARAM;
EnterCriticalSection(&cs_credtype);
- if(kcdb_credtype_tbl[id] &&
- !(kcdb_credtype_tbl[id]->flags & KCDB_CTI_FLAG_DELETED))
+ if(kcdb_credtype_tbl[id] &&
+ !(kcdb_credtype_tbl[id]->flags & KCDB_CTI_FLAG_DELETED))
{
found = 1;
if(type) {
@@ -203,7 +203,7 @@ KHMEXP khm_int32 KHMAPI kcdb_credtype_get_info(
return KHM_ERROR_NOT_FOUND;
}
-KHMEXP khm_int32 KHMAPI kcdb_credtype_release_info(kcdb_credtype * type)
+KHMEXP khm_int32 KHMAPI kcdb_credtype_release_info(kcdb_credtype * type)
{
kcdb_credtype_i * ict;
@@ -214,7 +214,7 @@ KHMEXP khm_int32 KHMAPI kcdb_credtype_release_info(kcdb_credtype * type)
return kcdb_credtype_release(ict);
}
-KHMEXP khm_int32 KHMAPI kcdb_credtype_unregister(khm_int32 id)
+KHMEXP khm_int32 KHMAPI kcdb_credtype_unregister(khm_int32 id)
{
kcdb_credtype_i * ict;
@@ -330,7 +330,7 @@ KHMEXP khm_int32 KHMAPI kcdb_credtype_get_name(
}
KHMEXP khm_int32 KHMAPI kcdb_credtype_get_id(
- const wchar_t * name,
+ const wchar_t * name,
khm_int32 * id)
{
int i;
@@ -353,7 +353,7 @@ KHMEXP khm_int32 KHMAPI kcdb_credtype_get_id(
return KHM_ERROR_NOT_FOUND;
}
-khm_int32 kcdb_credtype_get_next_free_id(khm_int32 * id)
+khm_int32 kcdb_credtype_get_next_free_id(khm_int32 * id)
{
int i;
@@ -374,7 +374,7 @@ khm_int32 kcdb_credtype_get_next_free_id(khm_int32 * id)
}
khm_int32 kcdb_credtype_hold(kcdb_credtype_i * ict) {
-
+
if(!ict)
return KHM_ERROR_INVALID_PARAM;
@@ -385,7 +385,7 @@ khm_int32 kcdb_credtype_hold(kcdb_credtype_i * ict) {
}
khm_int32 kcdb_credtype_release(kcdb_credtype_i * ict) {
-
+
if(!ict)
return KHM_ERROR_INVALID_PARAM;
@@ -396,7 +396,7 @@ khm_int32 kcdb_credtype_release(kcdb_credtype_i * ict) {
return KHM_ERROR_SUCCESS;
}
-void kcdb_credtype_msg_completion(kmq_message * m)
+void kcdb_credtype_msg_completion(kmq_message * m)
{
kcdb_credtype_release((kcdb_credtype_i *) m->vparam);
}
diff --git a/src/windows/identity/kcreddb/credtype.h b/src/windows/identity/kcreddb/credtype.h
index 3bb0a7d5e8..1aeab81f05 100644
--- a/src/windows/identity/kcreddb/credtype.h
+++ b/src/windows/identity/kcreddb/credtype.h
@@ -25,7 +25,7 @@
/* $Id$ */
#ifndef __KHIMAIRA_KCDB_CREDTYPE_H
-#define __KHIMAIRA_KCDB_CREDTYPE_H
+#define __KHIMAIRA_KCDB_CREDTYPE_H
/* credtype */
typedef struct kcdb_credtype_i_t {
diff --git a/src/windows/identity/kcreddb/identity.c b/src/windows/identity/kcreddb/identity.c
index 78cdedbf69..c6d443eedd 100644
--- a/src/windows/identity/kcreddb/identity.c
+++ b/src/windows/identity/kcreddb/identity.c
@@ -34,7 +34,7 @@ khm_int32 kcdb_n_identities = 0;
kcdb_identity * kcdb_identities = NULL;
kcdb_identity * kcdb_def_identity = NULL;
khm_handle kcdb_ident_sub = NULL; /* identity provider */
-khm_int32 kcdb_ident_cred_type = KCDB_CREDTYPE_INVALID;
+khm_int32 kcdb_ident_cred_type = KCDB_CREDTYPE_INVALID;
/* primary credentials type */
khm_ui_4 kcdb_ident_refresh_cycle = 0;
khm_boolean kcdb_checked_config = FALSE;
@@ -49,7 +49,7 @@ kcdb_identity_is_equal(khm_handle identity1,
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_provider(khm_handle sub)
{
EnterCriticalSection(&cs_ident);
@@ -75,7 +75,7 @@ kcdb_identity_set_provider(khm_handle sub)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_provider(khm_handle * sub)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -92,7 +92,7 @@ kcdb_identity_get_provider(khm_handle * sub)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_type(khm_int32 cred_type)
{
EnterCriticalSection(&cs_ident);
@@ -102,7 +102,7 @@ kcdb_identity_set_type(khm_int32 cred_type)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_type(khm_int32 * ptype)
{
if (!ptype)
@@ -119,26 +119,26 @@ kcdb_identity_get_type(khm_int32 * ptype)
}
/* message completion routine */
-void
+void
kcdbint_ident_msg_completion(kmq_message * m) {
kcdb_identity_release(m->vparam);
}
-void
+void
kcdbint_ident_add_ref(const void * key, void * vid) {
/* References in the hashtable are not refcounted */
// kcdb_identity_hold(vid);
}
-void
+void
kcdbint_ident_del_ref(const void * key, void * vid) {
/* References in the hashtable are not refcounted */
// kcdb_identity_release(vid);
}
-void
+void
kcdbint_ident_init(void) {
InitializeCriticalSection(&cs_ident);
kcdb_identities_namemap = hash_new_hashtable(
@@ -149,7 +149,7 @@ kcdbint_ident_init(void) {
kcdbint_ident_del_ref);
}
-void
+void
kcdbint_ident_exit(void) {
EnterCriticalSection(&cs_ident);
hash_del_hashtable(kcdb_identities_namemap);
@@ -158,7 +158,7 @@ kcdbint_ident_exit(void) {
}
/* NOT called with cs_ident held */
-KHMEXP khm_boolean KHMAPI
+KHMEXP khm_boolean KHMAPI
kcdb_identity_is_valid_name(const wchar_t * name)
{
khm_int32 rv;
@@ -177,9 +177,9 @@ kcdb_identity_is_valid_name(const wchar_t * name)
return KHM_SUCCEEDED(rv);
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_create(const wchar_t *name,
- khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_create(const wchar_t *name,
+ khm_int32 flags,
khm_handle * result) {
kcdb_identity * id = NULL;
kcdb_identity * id_tmp = NULL;
@@ -249,12 +249,12 @@ kcdb_identity_create(const wchar_t *name,
khm_handle h_cfg;
kcdb_identity_hold((khm_handle) id);
- hash_add(kcdb_identities_namemap,
- (void *) id->name,
+ hash_add(kcdb_identities_namemap,
+ (void *) id->name,
(void *) id);
LPUSH(&kcdb_identities, id);
- if(KHM_SUCCEEDED(kcdb_identity_get_config((khm_handle) id,
+ if(KHM_SUCCEEDED(kcdb_identity_get_config((khm_handle) id,
0,
&h_cfg))) {
/* don't need to set the KCDB_IDENT_FLAG_CONFIG flags
@@ -282,7 +282,7 @@ kcdb_identity_create(const wchar_t *name,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_delete(khm_handle vid) {
kcdb_identity * id;
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -328,8 +328,8 @@ kcdb_identity_delete(khm_handle vid) {
return code;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_set_flags(khm_handle vid,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_set_flags(khm_handle vid,
khm_int32 flag,
khm_int32 mask) {
kcdb_identity * id;
@@ -400,15 +400,15 @@ kcdb_identity_set_flags(khm_handle vid,
if ((flag ^ id->flags) & KCDB_IDENT_FLAG_STICKY) {
khm_handle h_conf;
- if (KHM_SUCCEEDED(kcdb_identity_get_config(vid,
- KHM_FLAG_CREATE,
+ if (KHM_SUCCEEDED(kcdb_identity_get_config(vid,
+ KHM_FLAG_CREATE,
&h_conf))) {
khc_write_int32(h_conf, L"Sticky",
!!(flag & KCDB_IDENT_FLAG_STICKY));
khc_close_space(h_conf);
}
- id->flags =
+ id->flags =
((id->flags & ~KCDB_IDENT_FLAG_STICKY) |
(flag & KCDB_IDENT_FLAG_STICKY));
@@ -440,13 +440,13 @@ kcdb_identity_set_flags(khm_handle vid,
if((delta & KCDB_IDENT_FLAG_HIDDEN)) {
kcdbint_ident_post_message(
- (newflags & KCDB_IDENT_FLAG_HIDDEN)?KCDB_OP_HIDE:KCDB_OP_UNHIDE,
+ (newflags & KCDB_IDENT_FLAG_HIDDEN)?KCDB_OP_HIDE:KCDB_OP_UNHIDE,
vid);
}
if((delta & KCDB_IDENT_FLAG_SEARCHABLE)) {
kcdbint_ident_post_message(
- (newflags & KCDB_IDENT_FLAG_SEARCHABLE)?KCDB_OP_SETSEARCH:KCDB_OP_UNSETSEARCH,
+ (newflags & KCDB_IDENT_FLAG_SEARCHABLE)?KCDB_OP_SETSEARCH:KCDB_OP_UNSETSEARCH,
vid);
}
@@ -456,8 +456,8 @@ kcdb_identity_set_flags(khm_handle vid,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_get_flags(khm_handle vid,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_get_flags(khm_handle vid,
khm_int32 * flags) {
kcdb_identity * id;
@@ -475,9 +475,9 @@ kcdb_identity_get_flags(khm_handle vid,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_get_name(khm_handle vid,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_get_name(khm_handle vid,
+ wchar_t * buffer,
khm_size * pcbsize) {
size_t namesize;
kcdb_identity * id;
@@ -503,7 +503,7 @@ kcdb_identity_get_name(khm_handle vid,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_default(khm_handle * pvid) {
khm_handle def;
@@ -578,7 +578,7 @@ kcdbint_ident_set_default(khm_handle vid,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_default(khm_handle vid) {
return kcdbint_ident_set_default(vid, TRUE);
}
@@ -588,8 +588,8 @@ kcdb_identity_set_default_int(khm_handle vid) {
return kcdbint_ident_set_default(vid, FALSE);
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_get_config(khm_handle vid,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_get_config(khm_handle vid,
khm_int32 flags,
khm_handle * result) {
khm_handle hkcdb;
@@ -611,7 +611,7 @@ kcdb_identity_get_config(khm_handle vid,
goto _exit;
rv = khc_open_space(hidents,
- id->name,
+ id->name,
flags | KCONF_FLAG_NOPARSENAME,
&hident);
@@ -643,14 +643,14 @@ _exit:
}
/*! \note cs_ident must be available. */
-void
+void
kcdbint_ident_post_message(khm_int32 op, kcdb_identity * id) {
kcdb_identity_hold(id);
kmq_post_message(KMSG_KCDB, KMSG_KCDB_IDENT, op, (void *) id);
}
/*! \note cs_ident must be available. */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_hold(khm_handle vid) {
kcdb_identity * id;
@@ -667,7 +667,7 @@ kcdb_identity_hold(khm_handle vid) {
}
/*! \note cs_ident must be available. */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_release(khm_handle vid) {
kcdb_identity * id;
khm_int32 refcount;
@@ -697,7 +697,7 @@ struct kcdb_idref_result {
khm_size count;
};
-static khm_int32 KHMAPI
+static khm_int32 KHMAPI
kcdbint_idref_proc(khm_handle cred, void * r) {
khm_handle vid;
struct kcdb_idref_result *result;
@@ -736,7 +736,7 @@ kcdbint_idref_proc(khm_handle cred, void * r) {
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_refresh(khm_handle vid) {
kcdb_identity * ident;
khm_int32 code = KHM_ERROR_SUCCESS;
@@ -780,7 +780,7 @@ kcdb_identity_refresh(khm_handle vid) {
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_refresh_all(void) {
kcdb_identity * ident;
kcdb_identity * next;
@@ -799,7 +799,7 @@ kcdb_identity_refresh_all(void) {
do {
hit_count = 0;
- for (ident = kcdb_identities;
+ for (ident = kcdb_identities;
ident != NULL;
ident = next) {
@@ -833,7 +833,7 @@ kcdb_identity_refresh_all(void) {
/*****************************************/
/* Custom property functions */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_attr(khm_handle vid,
khm_int32 attr_id,
void * buffer,
@@ -931,7 +931,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_attrib(khm_handle vid,
const wchar_t * attr_name,
void * buffer,
@@ -949,7 +949,7 @@ kcdb_identity_set_attrib(khm_handle vid,
cbbuf);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attr(khm_handle vid,
khm_int32 attr_id,
khm_int32 * attr_type,
@@ -985,7 +985,7 @@ kcdb_identity_get_attr(khm_handle vid,
if(!(id->flags & KCDB_IDENT_FLAG_ATTRIBS) ||
(slot = kcdb_buf_slot_by_id(&id->buf, (khm_ui_2) attr_id)) == KCDB_BUF_INVALID_SLOT ||
- !kcdb_buf_val_exist(&id->buf, slot))
+ !kcdb_buf_val_exist(&id->buf, slot))
{
code = KHM_ERROR_NOT_FOUND;
goto _exit;
@@ -1026,7 +1026,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attrib(khm_handle vid,
const wchar_t * attr_name,
khm_int32 * attr_type,
@@ -1045,7 +1045,7 @@ kcdb_identity_get_attrib(khm_handle vid,
pcbbuf);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attr_string(khm_handle vid,
khm_int32 attr_id,
wchar_t * buffer,
@@ -1078,7 +1078,7 @@ kcdb_identity_get_attr_string(khm_handle vid,
if(!(id->flags & KCDB_IDENT_FLAG_ATTRIBS) ||
(slot = kcdb_buf_slot_by_id(&id->buf, (khm_ui_2) attr_id)) == KCDB_BUF_INVALID_SLOT ||
- !kcdb_buf_val_exist(&id->buf, slot))
+ !kcdb_buf_val_exist(&id->buf, slot))
{
code = KHM_ERROR_NOT_FOUND;
goto _exit;
@@ -1122,7 +1122,7 @@ _exit:
return code;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attrib_string(khm_handle vid,
const wchar_t * attr_name,
wchar_t * buffer,
@@ -1146,7 +1146,7 @@ kcdb_identity_get_attrib_string(khm_handle vid,
/* Identity provider interface functions */
/* NOT called with cs_ident held */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_validate_name(const wchar_t * name)
{
kcdb_ident_name_xfer namex;
@@ -1165,7 +1165,7 @@ kcdb_identpro_validate_name(const wchar_t * name)
if(wcsspn(name, KCDB_IDENT_VALID_CHARS) != cch)
return KHM_ERROR_INVALID_NAME;
#endif
-
+
EnterCriticalSection(&cs_ident);
if(kcdb_ident_sub != NULL) {
sub = kcdb_ident_sub;
@@ -1189,11 +1189,11 @@ kcdb_identpro_validate_name(const wchar_t * name)
rv = namex.result;
}
-
+
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_validate_identity(khm_handle identity)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1210,7 +1210,7 @@ kcdb_identpro_validate_identity(khm_handle identity)
rv = KHM_ERROR_NO_PROVIDER;
}
LeaveCriticalSection(&cs_ident);
-
+
if(sub != NULL) {
rv = kmq_send_sub_msg(sub,
KMSG_IDENT,
@@ -1222,9 +1222,9 @@ kcdb_identpro_validate_identity(khm_handle identity)
return rv;
}
-KHMEXP khm_int32 KHMAPI
-kcdb_identpro_canon_name(const wchar_t * name_in,
- wchar_t * name_out,
+KHMEXP khm_int32 KHMAPI
+kcdb_identpro_canon_name(const wchar_t * name_in,
+ wchar_t * name_out,
khm_size * cb_name_out)
{
khm_handle sub;
@@ -1260,7 +1260,7 @@ kcdb_identpro_canon_name(const wchar_t * name_in,
KMSG_IDENT_CANON_NAME,
0,
(void *) &namex);
-
+
if(KHM_SUCCEEDED(namex.result)) {
const wchar_t * name_result;
khm_size cb;
@@ -1269,7 +1269,7 @@ kcdb_identpro_canon_name(const wchar_t * name_in,
name_result = name_tmp;
else
name_result = name_in;
-
+
if(FAILED(StringCbLength(name_result, KCDB_IDENT_MAXCB_NAME, &cb)))
rv = KHM_ERROR_UNKNOWN;
else {
@@ -1289,7 +1289,7 @@ kcdb_identpro_canon_name(const wchar_t * name_in,
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_compare_name(const wchar_t * name1,
const wchar_t * name2)
{
@@ -1328,13 +1328,13 @@ kcdb_identpro_compare_name(const wchar_t * name1,
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_set_default(khm_handle identity)
{
khm_handle sub;
khm_int32 rv = KHM_ERROR_SUCCESS;
- if((identity != NULL) &&
+ if((identity != NULL) &&
!kcdb_is_active_identity(identity))
return KHM_ERROR_INVALID_PARAM;
@@ -1358,7 +1358,7 @@ kcdb_identpro_set_default(khm_handle identity)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_set_searchable(khm_handle identity,
khm_boolean searchable)
{
@@ -1390,7 +1390,7 @@ kcdb_identpro_set_searchable(khm_handle identity,
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_update(khm_handle identity)
{
khm_handle sub;
@@ -1419,7 +1419,7 @@ kcdb_identpro_update(khm_handle identity)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_notify_create(khm_handle identity)
{
khm_handle sub;
@@ -1449,7 +1449,7 @@ kcdb_identpro_notify_create(khm_handle identity)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_get_ui_cb(void * rock)
{
khm_handle sub;
@@ -1476,7 +1476,7 @@ kcdb_identpro_get_ui_cb(void * rock)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_enum(khm_int32 and_flags,
khm_int32 eq_flags,
wchar_t * name_buf,
@@ -1550,7 +1550,7 @@ kcdb_identity_enum(khm_int32 and_flags,
for ( id = kcdb_identities;
id != NULL;
id = LNEXT(id) ) {
- if (((id->flags & KCDB_IDENT_FLAG_ACTIVE) ==
+ if (((id->flags & KCDB_IDENT_FLAG_ACTIVE) ==
KCDB_IDENT_FLAG_ACTIVE) &&
((id->flags & and_flags) == eq_flags)) {
n_idents ++;
@@ -1559,7 +1559,7 @@ kcdb_identity_enum(khm_int32 and_flags,
assert(SUCCEEDED(hr));
#endif
cb_req += cb_curr + sizeof(wchar_t);
- }
+ }
}
cb_req += sizeof(wchar_t);
@@ -1577,15 +1577,15 @@ kcdb_identity_enum(khm_int32 and_flags,
for (id = kcdb_identities;
id != NULL;
id = LNEXT(id)) {
- if (((id->flags & KCDB_IDENT_FLAG_ACTIVE) ==
+ if (((id->flags & KCDB_IDENT_FLAG_ACTIVE) ==
KCDB_IDENT_FLAG_ACTIVE) &&
((id->flags & and_flags) == eq_flags)) {
- StringCchLength(id->name, KCDB_IDENT_MAXCCH_NAME,
+ StringCchLength(id->name, KCDB_IDENT_MAXCCH_NAME,
&cch_curr);
cch_curr++;
StringCchCopy(name_buf, cch_left, id->name);
cch_left -= cch_curr;
- name_buf += cch_curr;
+ name_buf += cch_curr;
}
}
diff --git a/src/windows/identity/kcreddb/kcreddb.h b/src/windows/identity/kcreddb/kcreddb.h
index 6621d43cca..e58c8ffa32 100644
--- a/src/windows/identity/kcreddb/kcreddb.h
+++ b/src/windows/identity/kcreddb/kcreddb.h
@@ -34,37 +34,37 @@
/*! \defgroup kcdb NetIDMgr Credentials Database */
/*@{*/
-/*! \brief Maximum length in characters of short description
+/*! \brief Maximum length in characters of short description
The length includes the terminating \a NULL character.
*/
#define KCDB_MAXCCH_SHORT_DESC 256
-/*! \brief Maximum length in bytes of short description
+/*! \brief Maximum length in bytes of short description
The length includes the terminating \a NULL character.
*/
#define KCDB_MAXCB_SHORT_DESC (sizeof(wchar_t) * KCDB_MAXCCH_SHORT_DESC)
-/*! \brief Maximum length in characters of long description
+/*! \brief Maximum length in characters of long description
The length includes the terminating \a NULL character.
*/
#define KCDB_MAXCCH_LONG_DESC 8192
-/*! \brief Maximum length in characters of long description
+/*! \brief Maximum length in characters of long description
The length includes the terminating \a NULL character.
*/
#define KCDB_MAXCB_LONG_DESC (sizeof(wchar_t) * KCDB_MAXCCH_LONG_DESC)
-/*! \brief Maximum length in characters of name
+/*! \brief Maximum length in characters of name
The length includes the terminating \a NULL character.
*/
#define KCDB_MAXCCH_NAME 256
-/*! \brief Maximum length in bytes of short description
+/*! \brief Maximum length in bytes of short description
The length includes the terminating \a NULL character.
*/
@@ -106,7 +106,7 @@ Functions, macros etc. for manipulating identities.
\name Flags for identities */
/*@{*/
-/*! \brief Create the identity if it doesn't already exist.
+/*! \brief Create the identity if it doesn't already exist.
\note Only to be used with kcdb_identity_create() */
#define KCDB_IDENT_FLAG_CREATE 0x10000000L
@@ -131,7 +131,7 @@ Functions, macros etc. for manipulating identities.
*/
#define KCDB_IDENT_FLAG_ATTRIBS 0x08000000L
-/*! \brief This is the default identity.
+/*! \brief This is the default identity.
At most one identity will have this flag set at any given time.
To set or reset the flag, use kcdb_identity_set_default() */
@@ -317,7 +317,7 @@ typedef struct tag_kcdb_ident_info {
\see ::KMSG_IDENT_VALIDATE_NAME
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_validate_name(const wchar_t * name);
/*! \brief Validate an identity
@@ -327,47 +327,47 @@ kcdb_identpro_validate_name(const wchar_t * name);
\see ::KMSG_IDENT_VALIDATE_IDENTITY
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_validate_identity(khm_handle identity);
-/*! \brief Canonicalize the name
+/*! \brief Canonicalize the name
\see ::KMSG_IDENT_CANON_NAME
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_identpro_canon_name(const wchar_t * name_in,
- wchar_t * name_out,
+KHMEXP khm_int32 KHMAPI
+kcdb_identpro_canon_name(const wchar_t * name_in,
+ wchar_t * name_out,
khm_size * cb_name_out);
-/*! \brief Compare two identity names
+/*! \brief Compare two identity names
\see ::KMSG_IDENT_COMPARE_NAME
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_compare_name(const wchar_t * name1,
const wchar_t * name2);
-/*! \brief Set the specified identity as the default
+/*! \brief Set the specified identity as the default
\see ::KMSG_IDENT_SET_DEFAULT
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_set_default(khm_handle identity);
-/*! \brief Set the specified identity as searchable
+/*! \brief Set the specified identity as searchable
\see ::KMSG_IDENT_SET_SEARCHABLE
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_set_searchable(khm_handle identity,
khm_boolean searchable);
-/*! \brief Update the specified identity
+/*! \brief Update the specified identity
\see ::KMSG_IDENT_UPDATE
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_update(khm_handle identity);
/*! \brief Obtain the UI callback
@@ -377,14 +377,14 @@ kcdb_identpro_update(khm_handle identity);
\see ::KMSG_IDENT_GET_UI_CALLBACK
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_get_ui_cb(void * rock);
-/*! \brief Notify an identity provider of the creation of a new identity
+/*! \brief Notify an identity provider of the creation of a new identity
\see ::KMSG_IDENT_NOTIFY_CREATE
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identpro_notify_create(khm_handle identity);
/*@}*/
@@ -393,7 +393,7 @@ kcdb_identpro_notify_create(khm_handle identity);
\return TRUE or FALSE to the question, is this valid?
*/
-KHMEXP khm_boolean KHMAPI
+KHMEXP khm_boolean KHMAPI
kcdb_identity_is_valid_name(const wchar_t * name);
/*! \brief Create or open an identity.
@@ -416,9 +416,9 @@ kcdb_identity_is_valid_name(const wchar_t * name);
kcdb_identity_release() to release the identity once it is no
longer needed.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_create(const wchar_t *name,
- khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_create(const wchar_t *name,
+ khm_int32 flags,
khm_handle * result);
/*! \brief Mark an identity for deletion.
@@ -428,7 +428,7 @@ kcdb_identity_create(const wchar_t *name,
identity. Once all references to the identity are released, it
will be removed from memory. All associated credentials will also
be removed. */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_delete(khm_handle id);
/*! \brief Set or unset the specified flags in the specified identity.
@@ -464,8 +464,8 @@ kcdb_identity_delete(khm_handle id);
check the flags in the identity using kcdb_identity_get_flags() to
check which flags have been set and which have failed.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_set_flags(khm_handle id,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_set_flags(khm_handle id,
khm_int32 flags,
khm_int32 mask);
@@ -473,11 +473,11 @@ kcdb_identity_set_flags(khm_handle id,
The returned flags may include internal flags.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_get_flags(khm_handle id,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_get_flags(khm_handle id,
khm_int32 * flags);
-/*! \brief Return the name of the identity
+/*! \brief Return the name of the identity
\param[out] buffer Buffer to copy the identity name into. The
maximum size of an identity name is \a KCDB_IDENT_MAXCB_NAME.
@@ -485,9 +485,9 @@ kcdb_identity_get_flags(khm_handle id,
is returned in \a pcbsize.
\param[in,out] pcbsize Size of buffer in bytes. */
-KHMEXP khm_int32 KHMAPI
-kcdb_identity_get_name(khm_handle id,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_identity_get_name(khm_handle id,
+ wchar_t * buffer,
khm_size * pcbsize);
/*! \brief Set the specified identity as the default.
@@ -497,7 +497,7 @@ kcdb_identity_get_name(khm_handle id,
\see kcdb_identity_set_flags()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_default(khm_handle id);
/*! \brief Mark the specified identity as the default.
@@ -505,7 +505,7 @@ kcdb_identity_set_default(khm_handle id);
This API is reserved for use by identity providers as a means of
specifying which identity is default. The difference between
kcdb_identity_set_default() and kcdb_identity_set_default_int() is
- in semantics.
+ in semantics.
- kcdb_identity_set_default() is used to request the KCDB to
designate the specified identity as the default. When
@@ -529,10 +529,10 @@ kcdb_identity_set_default_int(khm_handle id);
If there is no default identity, then the handle pointed to by \a
pvid is set to \a NULL and the function returns
KHM_ERROR_NOT_FOUND. */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_default(khm_handle * pvid);
-/*! \brief Get the configuration space for the identity.
+/*! \brief Get the configuration space for the identity.
If the configuration space for the identity does not exist and the
flags parameter does not specify ::KHM_FLAG_CREATE, then the
@@ -551,7 +551,7 @@ kcdb_identity_get_default(khm_handle * pvid);
successful, this receives a handle to the configuration space.
Use khc_close_space() to close the handle.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_config(khm_handle id,
khm_int32 flags,
khm_handle * result);
@@ -562,12 +562,12 @@ kcdb_identity_get_config(khm_handle id,
held. \note Once the handle is released, it can not be
revalidated by calling kcdb_identity_hold(). Doing so would lead
to unpredictable consequences. */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_hold(khm_handle id);
/*! \brief Release a reference to an identity.
\see kcdb_identity_hold() */
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_release(khm_handle id);
/*! \brief Set the identity provider subscription
@@ -577,7 +577,7 @@ kcdb_identity_release(khm_handle id);
\param[in] sub New identity provider subscription
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_provider(khm_handle sub);
/*! \brief Set the primary credentials type
@@ -586,7 +586,7 @@ kcdb_identity_set_provider(khm_handle sub);
provider. As such, this function should only be called by an
identity provider.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_type(khm_int32 cred_type);
/*! \brief Retrieve the identity provider subscription
@@ -602,7 +602,7 @@ kcdb_identity_set_type(khm_int32 cred_type);
identity provider. If \a sub was not NULL, the handle it
points to has been set to NULL.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_provider(khm_handle * sub);
/*! \brief Retrieve the identity provider credentials type
@@ -610,7 +610,7 @@ kcdb_identity_get_provider(khm_handle * sub);
This is the credentials type that the identity provider has
designated as the primary credentials type.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_type(khm_int32 * ptype);
/*! \brief Returns TRUE if the two identities are equal
@@ -633,7 +633,7 @@ kcdb_identity_is_equal(khm_handle identity1,
individual data type handlers may copy in less than this many
bytes in to the credential.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_attr(khm_handle identity,
khm_int32 attr_id,
void * buffer,
@@ -648,7 +648,7 @@ kcdb_identity_set_attr(khm_handle identity,
individual data type handlers may copy in less than this many
bytes in to the credential.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_set_attrib(khm_handle identity,
const wchar_t * attr_name,
void * buffer,
@@ -672,7 +672,7 @@ kcdb_identity_set_attrib(khm_handle identity,
exists in this identity then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attr(khm_handle identity,
khm_int32 attr_id,
khm_int32 * attr_type,
@@ -694,7 +694,7 @@ kcdb_identity_get_attr(khm_handle identity,
exists in this identity then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attrib(khm_handle identity,
const wchar_t * attr_name,
khm_int32 * attr_type,
@@ -729,7 +729,7 @@ kcdb_identity_get_attrib(khm_handle identity,
\retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
supplied buffer was insufficient
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attr_string(khm_handle identity,
khm_int32 attr_id,
wchar_t * buffer,
@@ -759,7 +759,7 @@ kcdb_identity_get_attr_string(khm_handle identity,
\see kcdb_identity_get_attr_string()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_get_attrib_string(khm_handle identity,
const wchar_t * attr_name,
wchar_t * buffer,
@@ -817,7 +817,7 @@ kcdb_identity_get_attrib_string(khm_handle identity,
guaranteed to work since the list of identities may change
between the two calls.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_enum(khm_int32 and_flags,
khm_int32 eq_flags,
wchar_t * name_buf,
@@ -835,7 +835,7 @@ kcdb_identity_enum(khm_int32 and_flags,
\see kcdb_identity_refresh()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_refresh(khm_handle vid);
/*! \brief Refresh all identities
@@ -845,7 +845,7 @@ kcdb_identity_refresh(khm_handle vid);
\see kcdb_identityt_refresh()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_identity_refresh_all(void);
/* KSMG_KCDB_IDENT notifications are structured as follows:
@@ -876,8 +876,8 @@ kcdb_identity_refresh_all(void);
\see kcdb_credset_apply()
*/
-typedef khm_int32
-(KHMAPI *kcdb_cred_apply_func)(khm_handle cred,
+typedef khm_int32
+(KHMAPI *kcdb_cred_apply_func)(khm_handle cred,
void * rock);
/*! \brief Credentials filter function.
@@ -893,9 +893,9 @@ typedef khm_int32
\see kcdb_credset_collect_filtered()
\see kcdb_credset_extract_filtered()
*/
-typedef khm_int32
-(KHMAPI *kcdb_cred_filter_func)(khm_handle cred,
- khm_int32 flags,
+typedef khm_int32
+(KHMAPI *kcdb_cred_filter_func)(khm_handle cred,
+ khm_int32 flags,
void * rock);
/*! \brief Credentials compare function.
@@ -909,9 +909,9 @@ typedef khm_int32
\see kcdb_credset_sort()
\see ::kcdb_credtype
*/
-typedef khm_int32
-(KHMAPI *kcdb_cred_comp_func)(khm_handle cred1,
- khm_handle cred2,
+typedef khm_int32
+(KHMAPI *kcdb_cred_comp_func)(khm_handle cred1,
+ khm_handle cred2,
void * rock);
/*! \defgroup kcdb_credset Credential sets */
@@ -936,14 +936,14 @@ typedef khm_int32
\see kcdb_credset_delete()
\see kcdb_credset_collect()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_create(khm_handle * result);
/** \brief Delete a credential set
\see kcdb_credset_create()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_delete(khm_handle credset);
/** \brief Collect credentials from a credential set to another credential set.
@@ -1024,10 +1024,10 @@ kcdb_credset_delete(khm_handle credset);
\note The destination credential set cannot be sealed.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_collect(khm_handle cs_dest,
khm_handle cs_src,
- khm_handle identity,
+ khm_handle identity,
khm_int32 type,
khm_int32 * delta);
@@ -1035,7 +1035,7 @@ kcdb_credset_collect(khm_handle cs_dest,
\see kcdb_credset_collect() */
#define KCDB_DELTA_ADD 1
-/*! \brief Credentials were deleted
+/*! \brief Credentials were deleted
\see kcdb_credset_collect() */
#define KCDB_DELTA_DEL 2
@@ -1050,14 +1050,14 @@ kcdb_credset_collect(khm_handle cs_dest,
#define KCDB_CREDCOLL_FILTER_ROOT 1
/*! \brief Indicates that the credential to be filtered is from the source
- credential set
-
+ credential set
+
\see kcdb_credset_collect_filtered() */
#define KCDB_CREDCOLL_FILTER_SRC 2
/*! \brief Indicates that the credential to be filtered is from the destination
- credential set
-
+ credential set
+
\see kcdb_credset_collect_filtered() */
#define KCDB_CREDCOLL_FILTER_DEST 4
@@ -1086,7 +1086,7 @@ kcdb_credset_collect(khm_handle cs_dest,
\see kcdb_credset_collect()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_collect_filtered(khm_handle cs_dest,
khm_handle cs_src,
kcdb_cred_filter_func filter,
@@ -1101,7 +1101,7 @@ kcdb_credset_collect_filtered(khm_handle cs_dest,
\note The credential set cannot be sealed
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_flush(khm_handle credset);
/*! \brief Extract credentials from one credential set to another
@@ -1130,10 +1130,10 @@ kcdb_credset_flush(khm_handle credset);
\note The destination credential set cannot be sealed.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_credset_extract(khm_handle destcredset,
- khm_handle sourcecredset,
- khm_handle identity,
+KHMEXP khm_int32 KHMAPI
+kcdb_credset_extract(khm_handle destcredset,
+ khm_handle sourcecredset,
+ khm_handle identity,
khm_int32 type);
/*! \brief Extract credentials from one credential set to another using a filter.
@@ -1145,7 +1145,7 @@ kcdb_credset_extract(khm_handle destcredset,
\note The destination credential set cannot be sealed.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_extract_filtered(khm_handle destcredset,
khm_handle sourcecredset,
kcdb_cred_filter_func filter,
@@ -1156,7 +1156,7 @@ kcdb_credset_extract_filtered(khm_handle destcredset,
\param[in] idx The index of the credential to retrieve. This is a
zero based index which goes from 0 ... (size of credset - 1).
- \param[out] cred The held reference to a credential. Call
+ \param[out] cred The held reference to a credential. Call
kcdb_cred_release() to release the credential.
\retval KHM_ERROR_SUCCESS Success. \a cred has a held reference to the credential.
@@ -1165,7 +1165,7 @@ kcdb_credset_extract_filtered(khm_handle destcredset,
\see kcdb_cred_release()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_get_cred(khm_handle credset,
khm_int32 idx,
khm_handle * cred);
@@ -1217,7 +1217,7 @@ kcdb_credset_get_cred(khm_handle credset,
matches are possible if the order of the credentials in the
set was changed.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_find_filtered(khm_handle credset,
khm_int32 idx_start,
kcdb_cred_filter_func f,
@@ -1231,7 +1231,7 @@ kcdb_credset_find_filtered(khm_handle credset,
specified credential. For a credential to be a match, it must
have the same identity, credential type and name.
- \param[in] credset Credential set to search
+ \param[in] credset Credential set to search
\param[in] cred_src Credetial to search on
@@ -1245,11 +1245,11 @@ kcdb_credset_find_filtered(khm_handle credset,
\retval KHM_ERROR_NOT_FOUND A matching credential was not found.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_find_cred(khm_handle credset,
khm_handle cred_src,
khm_handle *cred_dest);
-
+
/*! \brief Delete a credential from a credential set.
@@ -1273,7 +1273,7 @@ kcdb_credset_find_cred(khm_handle credset,
\see kcdb_credset_del_cred_ref()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_del_cred(khm_handle credset,
khm_int32 idx);
@@ -1286,7 +1286,7 @@ kcdb_credset_del_cred(khm_handle credset,
\see kcdb_credset_del_cred()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_del_cred_ref(khm_handle credset,
khm_handle cred);
@@ -1302,7 +1302,7 @@ kcdb_credset_del_cred_ref(khm_handle credset,
\note The credential set cannot be sealed.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_add_cred(khm_handle credset,
khm_handle cred,
khm_int32 idx);
@@ -1324,7 +1324,7 @@ kcdb_credset_add_cred(khm_handle credset,
\see kcdb_credset_purge()
\see kcdb_credset_get_cred()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_get_size(khm_handle credset,
khm_size * size);
@@ -1339,7 +1339,7 @@ kcdb_credset_get_size(khm_handle credset,
\see kcdb_credset_get_size()
\see kcdb_credset_get_cred()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_purge(khm_handle credset);
/*! \brief Applies a function to all the credentials in a credentials set
@@ -1365,9 +1365,9 @@ kcdb_credset_purge(khm_handle credset);
\retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_credset_apply(khm_handle credset,
- kcdb_cred_apply_func f,
+KHMEXP khm_int32 KHMAPI
+kcdb_credset_apply(khm_handle credset,
+ kcdb_cred_apply_func f,
void * rock);
/*! \brief Sort the contents of a credential set.
@@ -1378,7 +1378,7 @@ kcdb_credset_apply(khm_handle credset,
\see kcdb_cred_comp_generic()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_sort(khm_handle credset,
kcdb_cred_comp_func comp,
void * rock);
@@ -1400,7 +1400,7 @@ kcdb_credset_sort(khm_handle credset,
\see kcdb_credset_unseal()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credset_seal(khm_handle credset);
/*! \brief Unseal a credential set
@@ -1425,7 +1425,7 @@ typedef struct tag_kcdb_cred_comp_field {
with either. */
} kcdb_cred_comp_field;
-/*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field
+/*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field
Sorts lexicographically ascending by string representation of field.
*/
@@ -1438,7 +1438,7 @@ typedef struct tag_kcdb_cred_comp_field {
*/
#define KCDB_CRED_COMP_DECREASING 1
-/*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field
+/*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field
Any credentials which have the ::KCDB_CRED_FLAG_INITIAL will be
grouped above any that don't.
@@ -1478,9 +1478,9 @@ typedef struct tag_kcdb_cred_comp_order {
\param[in] rock a pointer to a ::kcdb_cred_comp_order object
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_comp_generic(khm_handle cred1,
- khm_handle cred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_comp_generic(khm_handle cred1,
+ khm_handle cred2,
void * rock);
/*@}*/
@@ -1542,7 +1542,7 @@ kcdb_cred_comp_generic(khm_handle cred1,
*/
#define KCDB_CRED_FLAGMASK_EXT (KCDB_CRED_FLAG_INITIAL | KCDB_CRED_FLAG_EXPIRED | KCDB_CRED_FLAG_INVALID | KCDB_CRED_FLAG_RENEWABLE)
-/*! \brief Bitmask indicating dditive flags
+/*! \brief Bitmask indicating dditive flags
Additive flags are special flags which are added to exiting
credentials based on new credentials when doing a collect
@@ -1611,17 +1611,17 @@ typedef struct tag_kcdb_cred_request {
/*! \brief Create a new credential
\param[in] name Name of credential. \a name cannot be NULL and cannot
- exceed \a KCDB_CRED_MAXCCH_NAME unicode characters including the
+ exceed \a KCDB_CRED_MAXCCH_NAME unicode characters including the
\a NULL terminator.
\param[in] identity A reference to an identity.
\param[in] cred_type A credentials type identifier for the credential.
\param[out] result Gets a held reference to the newly created credential.
- Call kcdb_cred_release() or kcdb_cred_delete() to release the
+ Call kcdb_cred_release() or kcdb_cred_delete() to release the
reference.
\see kcdb_cred_release()
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_create(const wchar_t * name,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_create(const wchar_t * name,
khm_handle identity,
khm_int32 cred_type,
khm_handle * result);
@@ -1631,7 +1631,7 @@ kcdb_cred_create(const wchar_t * name,
\param[out] newcred A held reference to the new credential if the call
succeeds.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_dup(khm_handle cred,
khm_handle * newcred);
@@ -1645,13 +1645,13 @@ kcdb_cred_dup(khm_handle cred,
\retval KHM_ERROR_SUCCESS vdest was successfully updated
\retval KHM_ERROR_EQUIVALENT all fields in vsrc were present and equivalent in vdest
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_update(khm_handle vdest,
khm_handle vsrc);
/*! \brief Set an attribute in a credential by name
-
+
\param[in] cbbuf Number of bytes of data in \a buffer. The
individual data type handlers may copy in less than this many
@@ -1660,10 +1660,10 @@ kcdb_cred_update(khm_handle vdest,
contents, you can specify ::KCDB_CBSIZE_AUTO for this
parameter.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_set_attrib(khm_handle cred,
- const wchar_t * name,
- void * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_set_attrib(khm_handle cred,
+ const wchar_t * name,
+ void * buffer,
khm_size cbbuf);
/*! \brief Set an attribute in a credential by attribute id
@@ -1678,10 +1678,10 @@ kcdb_cred_set_attrib(khm_handle cred,
individual data type handlers may copy in less than this many
bytes in to the credential.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_set_attr(khm_handle cred,
- khm_int32 attr_id,
- void * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_set_attr(khm_handle cred,
+ khm_int32 attr_id,
+ void * buffer,
khm_size cbbuf);
/*! \brief Get an attribute from a credential by name.
@@ -1699,11 +1699,11 @@ kcdb_cred_set_attr(khm_handle cred,
exists in this credential then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_attrib(khm_handle cred,
- const wchar_t * name,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_attrib(khm_handle cred,
+ const wchar_t * name,
khm_int32 * attr_type,
- void * buffer,
+ void * buffer,
khm_size * cbbuf);
/*! \brief Get an attribute from a credential by attribute id.
@@ -1724,11 +1724,11 @@ kcdb_cred_get_attrib(khm_handle cred,
exists in this credential then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_attr(khm_handle cred,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_attr(khm_handle cred,
khm_int32 attr_id,
khm_int32 * attr_type,
- void * buffer,
+ void * buffer,
khm_size * cbbuf);
/*! \brief Get the name of a credential.
@@ -1741,9 +1741,9 @@ kcdb_cred_get_attr(khm_handle cred,
If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
sets this to the required buffer size.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_name(khm_handle cred,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_name(khm_handle cred,
+ wchar_t * buffer,
khm_size * cbbuf);
/*! \brief Get the string representation of a credential attribute.
@@ -1774,10 +1774,10 @@ kcdb_cred_get_name(khm_handle cred,
\retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
supplied buffer was insufficient
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_attr_string(khm_handle vcred,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_attr_string(khm_handle vcred,
khm_int32 attr_id,
- wchar_t * buffer,
+ wchar_t * buffer,
khm_size * pcbbuf,
khm_int32 flags);
@@ -1804,10 +1804,10 @@ kcdb_cred_get_attr_string(khm_handle vcred,
\see kcdb_cred_get_attr_string()
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_attrib_string(khm_handle cred,
- const wchar_t * name,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_attrib_string(khm_handle cred,
+ const wchar_t * name,
+ wchar_t * buffer,
khm_size * cbbuf,
khm_int32 flags) ;
@@ -1819,8 +1819,8 @@ kcdb_cred_get_attrib_string(khm_handle cred,
\see kcdb_identity_relase()
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_cred_get_identity(khm_handle cred,
+KHMEXP khm_int32 KHMAPI
+kcdb_cred_get_identity(khm_handle cred,
khm_handle * identity);
/*! \brief Set the identity of a credential
@@ -1831,7 +1831,7 @@ kcdb_cred_get_identity(khm_handle cred,
credential that is not placed in a credential set or placed in a
credential set that is only used by a single entity.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_set_identity(khm_handle vcred,
khm_handle id);
@@ -1842,7 +1842,7 @@ kcdb_cred_set_identity(khm_handle vcred,
\param[out] pserial Receives the serial number. Cannot be NULL.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_get_serial(khm_handle cred,
khm_ui_8 * pserial);
@@ -1852,7 +1852,7 @@ kcdb_cred_get_serial(khm_handle cred,
\param[out] type Receives the type. Cannot be NULL.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_get_type(khm_handle cred,
khm_int32 * type);
@@ -1863,7 +1863,7 @@ kcdb_cred_get_type(khm_handle cred,
credential for the operation to succeed. This means the
::KCDB_CRED_FLAG_DELETED will never be retured by this function.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_get_flags(khm_handle cred,
khm_int32 * flags);
@@ -1879,7 +1879,7 @@ kcdb_cred_get_flags(khm_handle cred,
\see ::KCDB_CRED_FLAGMASK_ALL
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_set_flags(khm_handle cred,
khm_int32 flags,
khm_int32 mask);
@@ -1890,12 +1890,12 @@ kcdb_cred_set_flags(khm_handle cred,
\see kcdb_cred_release()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_hold(khm_handle cred);
/*! \brief Release a held reference to a credential.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_release(khm_handle cred);
/*! \brief Delete a credential.
@@ -1905,7 +1905,7 @@ kcdb_cred_release(khm_handle cred);
is bound to a credential set or the root credential store, it will
be removed from the respective container.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_cred_delete(khm_handle cred);
/*! \brief Compare an attribute of two credentials by name.
@@ -1916,9 +1916,9 @@ kcdb_cred_delete(khm_handle cred);
attribute, the return value is 0, which signifies that no ordering
can be determined.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_creds_comp_attrib(khm_handle cred1,
- khm_handle cred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_creds_comp_attrib(khm_handle cred1,
+ khm_handle cred2,
const wchar_t * name);
/*! \brief Compare an attribute of two credentials by attribute id.
@@ -1929,9 +1929,9 @@ kcdb_creds_comp_attrib(khm_handle cred1,
attribute, the return value is 0, which signifies that no ordering
can be determined.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_creds_comp_attr(khm_handle cred1,
- khm_handle cred2,
+KHMEXP khm_int32 KHMAPI
+kcdb_creds_comp_attr(khm_handle cred1,
+ khm_handle cred2,
khm_int32 attr_id);
/*! \brief Compare two credentials for equivalence
@@ -1942,7 +1942,7 @@ kcdb_creds_comp_attr(khm_handle cred1,
- Both have the same name.
- Both have the same type.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_creds_is_equal(khm_handle cred1,
khm_handle cred2);
@@ -2006,7 +2006,7 @@ kcdb_creds_is_equal(khm_handle cred1,
\see ::kcdb_type
*/
-typedef khm_int32
+typedef khm_int32
(KHMAPI *kcdb_dtf_toString)(const void * data,
khm_size cb_data,
wchar_t * s_buf,
@@ -2036,7 +2036,7 @@ typedef khm_int32
\see ::kcdb_type
*/
-typedef khm_boolean
+typedef khm_boolean
(KHMAPI *kcdb_dtf_isValid)(const void * data,
khm_size cb_data);
@@ -2075,7 +2075,7 @@ typedef khm_boolean
\see ::kcdb_type
*/
-typedef khm_int32
+typedef khm_int32
(KHMAPI *kcdb_dtf_comp)(const void * data_l,
khm_size cb_data_l,
const void * data_r,
@@ -2121,7 +2121,7 @@ typedef khm_int32
\see ::kcdb_type
*/
-typedef khm_int32
+typedef khm_int32
(KHMAPI *kcdb_dtf_dup)(const void * data_src,
khm_size cb_data_src,
void * data_dst,
@@ -2156,7 +2156,7 @@ typedef struct tag_kcdb_type {
/*! \name Flags for kcdb_type::toString
@{*/
-/*! \brief Specify that the short form of the string representation should be returned.
+/*! \brief Specify that the short form of the string representation should be returned.
Flags for #kcdb_type::toString. The flag specifies how long the
string representation should be. The specific length of a short
@@ -2166,11 +2166,11 @@ typedef struct tag_kcdb_type {
Usually, KCDB_TS_SHORT is specified when the amount of space that
is available to display the string is very restricted. It may be
the case that the string is truncated to facilitate displaying in
- a constrainted space.
+ a constrainted space.
*/
#define KCDB_TS_SHORT 1
-/*! \brief Specify that the long form of the string representation should be returned
+/*! \brief Specify that the long form of the string representation should be returned
Flags for #kcdb_type::toString. The flag specifies how long the
string representation should be. The specific length of a short
@@ -2206,7 +2206,7 @@ typedef struct tag_kcdb_type {
\note If this flag is used in conjunction with \a
KCDB_TYPE_FLAG_CB_MAX then, \a cb_min must be less than or equal
- to \a cb_max.
+ to \a cb_max.
*/
#define KCDB_TYPE_FLAG_CB_MIN 128
@@ -2233,7 +2233,7 @@ typedef struct tag_kcdb_type {
/*@}*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_type_get_id(const wchar_t *name, khm_int32 * id);
/*! \brief Return the type descriptor for a given type id
@@ -2246,7 +2246,7 @@ kcdb_type_get_id(const wchar_t *name, khm_int32 * id);
\see kcdb_type_release_info()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_type_get_info(khm_int32 id, kcdb_type ** info);
/*! \brief Release a reference to a type info structure
@@ -2254,16 +2254,16 @@ kcdb_type_get_info(khm_int32 id, kcdb_type ** info);
Releases the reference to the type information obtained with a
prior call to kcdb_type_get_info().
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_type_release_info(kcdb_type * info);
/*! \brief Get the name of a type
Retrieves the non-localized name of the specified type.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_type_get_name(khm_int32 id,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_type_get_name(khm_int32 id,
+ wchar_t * buffer,
khm_size * cbbuf);
/*! \brief Register a credentials attribute type
@@ -2276,8 +2276,8 @@ kcdb_type_get_name(khm_int32 id,
\param[in] type The type descriptor
\param[out] new_id Receives the identifier for the credential attribute type.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_type_register(const kcdb_type * type,
+KHMEXP khm_int32 KHMAPI
+kcdb_type_register(const kcdb_type * type,
khm_int32 * new_id);
/*! \brief Unregister a credential attribute type
@@ -2285,32 +2285,32 @@ kcdb_type_register(const kcdb_type * type,
Removes the registration for the specified credentials attribute
type.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_type_unregister(khm_int32 id);
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_type_get_next_free(khm_int32 * id);
/*! \name Conversion functions
@{*/
/*! \brief Convert a time_t value to FILETIME
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
TimetToFileTime( time_t t, LPFILETIME pft );
/*! \brief Convert a time_t interval to a FILETIME interval
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
TimetToFileTimeInterval(time_t t, LPFILETIME pft);
/*! \brief Convert a FILETIME interval to seconds
*/
-KHMEXP long KHMAPI
+KHMEXP long KHMAPI
FtIntervalToSeconds(LPFILETIME pft);
/*! \brief Convert a FILETIME interval to milliseconds
*/
-KHMEXP long KHMAPI
+KHMEXP long KHMAPI
FtIntervalToMilliseconds(LPFILETIME pft);
/*! \brief Compare two FILETIME values
@@ -2318,7 +2318,7 @@ FtIntervalToMilliseconds(LPFILETIME pft);
The return value is similar to the return value of strcmp(), based
on the comparison of the two FILETIME values.
*/
-KHMEXP long KHMAPI
+KHMEXP long KHMAPI
FtCompare(LPFILETIME pft1, LPFILETIME pft2);
/*! \brief Convert a FILETIME to a 64 bit int
@@ -2343,9 +2343,9 @@ KHMEXP FILETIME KHMAPI FtAdd(LPFILETIME ft1, LPFILETIME ft2);
/*! \brief Convert a FILETIME inverval to a string
*/
-KHMEXP khm_int32 KHMAPI
-FtIntervalToString(LPFILETIME data,
- wchar_t * buffer,
+KHMEXP khm_int32 KHMAPI
+FtIntervalToString(LPFILETIME data,
+ wchar_t * buffer,
khm_size * cb_buf);
/*! \brief Parse a string representing an interval into a FILETIME interval
@@ -2378,7 +2378,7 @@ FtIntervalToString(LPFILETIME data,
\retval KHM_ERROR_SUCCESS The string was successfully parsed and
the result was placed in \a pft.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
IntervalStringToFt(FILETIME * pft, wchar_t * str);
/*! \brief Return number of milliseconds till next representation change
@@ -2389,7 +2389,7 @@ IntervalStringToFt(FILETIME * pft, wchar_t * str);
Returns 0 if the representation is not expected to change.
*/
-KHMEXP long KHMAPI
+KHMEXP long KHMAPI
FtIntervalMsToRepChange(LPFILETIME pft);
/*! \brief Convert a safe ANSI string to a Unicode string
@@ -2403,7 +2403,7 @@ FtIntervalMsToRepChange(LPFILETIME pft);
\return the number of characters converted. This is always either
the length of the string \a astr or 0.
*/
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
AnsiStrToUnicode( wchar_t * wstr, size_t cbwstr, const char * astr);
/*! \brief Convert a Unicode string to ANSI
@@ -2414,11 +2414,11 @@ AnsiStrToUnicode( wchar_t * wstr, size_t cbwstr, const char * astr);
\return the number of characters converted. This is always either
the length of the string \a src or 0.
*/
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
UnicodeStrToAnsi( char * dest, size_t cbdest, const wchar_t * src);
/*@}*/
-/*! \name Standard type identifiers and names
+/*! \name Standard type identifiers and names
@{*/
/*! Maximum identifier number */
@@ -2507,8 +2507,8 @@ UnicodeStrToAnsi( char * dest, size_t cbdest, const wchar_t * src);
buffer is \a NULL, then the required buffer size should be placed
in \a cbsize.
*/
-typedef khm_int32
-(KHMAPI *kcdb_attrib_compute_cb)(khm_handle cred,
+typedef khm_int32
+(KHMAPI *kcdb_attrib_compute_cb)(khm_handle cred,
khm_int32 id,
void * buffer,
khm_size * cbsize);
@@ -2559,8 +2559,8 @@ typedef struct tag_kcdb_attrib {
} kcdb_attrib;
/*! \brief Retrieve the ID of a named attribute */
-KHMEXP khm_int32 KHMAPI
-kcdb_attrib_get_id(const wchar_t *name,
+KHMEXP khm_int32 KHMAPI
+kcdb_attrib_get_id(const wchar_t *name,
khm_int32 * id);
/*! \brief Register an attribute
@@ -2568,11 +2568,11 @@ kcdb_attrib_get_id(const wchar_t *name,
\param[out] new_id Receives the ID of the newly registered
attribute. If the \a id member of the ::kcdb_attrib object is
set to KCDB_ATTR_INVALID, then a unique ID is generated. */
-KHMEXP khm_int32 KHMAPI
-kcdb_attrib_register(const kcdb_attrib * attrib,
+KHMEXP khm_int32 KHMAPI
+kcdb_attrib_register(const kcdb_attrib * attrib,
khm_int32 * new_id);
-/*! \brief Retrieve the attribute descriptor for an attribute
+/*! \brief Retrieve the attribute descriptor for an attribute
The descriptor that is returned must be released through a call to
kcdb_attrib_release_info()
@@ -2581,35 +2581,35 @@ kcdb_attrib_register(const kcdb_attrib * attrib,
checked, you can pass in NULL for \a attrib. In this case, if the
identifier is valid, then the funciton will return
KHM_ERROR_SUCCESS, otherwise it will return KHM_ERROR_NOT_FOUND.
-
+
\see kcdb_attrib_release_info()
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_attrib_get_info(khm_int32 id,
+KHMEXP khm_int32 KHMAPI
+kcdb_attrib_get_info(khm_int32 id,
kcdb_attrib ** attrib);
/*! \brief Release an attribute descriptor
\see kcdb_attrib_get_info()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_release_info(kcdb_attrib * attrib);
-/*! \brief Unregister an attribute
+/*! \brief Unregister an attribute
Once an attribute ID has been unregistered, it may be reclaimed by
a subsequent call to kcdb_attrib_register().
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_unregister(khm_int32 id);
-/*! \brief Retrieve the description of an attribute
+/*! \brief Retrieve the description of an attribute
\param[in] flags Specify \a KCDB_TS_SHORT to retrieve the short description. */
-KHMEXP khm_int32 KHMAPI
-kcdb_attrib_describe(khm_int32 id,
- wchar_t * buffer,
- khm_size * cbsize,
+KHMEXP khm_int32 KHMAPI
+kcdb_attrib_describe(khm_int32 id,
+ wchar_t * buffer,
+ khm_size * cbsize,
khm_int32 flags);
/*! \brief Count attributes
@@ -2624,7 +2624,7 @@ kcdb_attrib_describe(khm_int32 id,
The number of attributes that match are returned in \a pcount.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_get_count(khm_int32 and_flags,
khm_int32 eq_flags,
khm_size * pcount);
@@ -2665,7 +2665,7 @@ kcdb_attrib_get_count(khm_int32 and_flags,
array. This is different from the usual size parameters used
in the NetIDMgr API.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_attrib_get_ids(khm_int32 and_flags,
khm_int32 eq_flags,
khm_int32 * plist,
@@ -2792,7 +2792,7 @@ kcdb_attrib_get_ids(khm_int32 and_flags,
*/
#define KCDB_ATTR_ID 1
-/*! \brief The name of the identity
+/*! \brief The name of the identity
- \b Type: STRING
- \b Flags: REQUIRED, COMPUTED, SYSTEM
@@ -2806,42 +2806,42 @@ kcdb_attrib_get_ids(khm_int32 and_flags,
*/
#define KCDB_ATTR_TYPE 3
-/*! \brief Type name for the credential
+/*! \brief Type name for the credential
- \b Type: STRING
- \b Flags: REQUIRED, COMPUTED, SYSTEM
*/
#define KCDB_ATTR_TYPE_NAME 4
-/*! \brief Name of the parent credential
+/*! \brief Name of the parent credential
- \b Type: STRING
- \b Flags: SYSTEM
*/
#define KCDB_ATTR_PARENT_NAME 5
-/*! \brief Issed on
+/*! \brief Issed on
- \b Type: DATE
- \b Flags: SYSTEM
*/
#define KCDB_ATTR_ISSUE 6
-/*! \brief Expires on
+/*! \brief Expires on
- \b Type: DATE
- \b Flags: SYSTEM
*/
#define KCDB_ATTR_EXPIRE 7
-/*! \brief Renewable period expires on
+/*! \brief Renewable period expires on
- \b Type: DATE
- \b Flags: SYSTEM
*/
#define KCDB_ATTR_RENEW_EXPIRE 8
-/*! \brief Time left till expiration
+/*! \brief Time left till expiration
- \b Type: INTERVAL
- \b Flags: SYSTEM, COMPUTED, VOLATILE
@@ -2857,7 +2857,7 @@ kcdb_attrib_get_ids(khm_int32 and_flags,
*/
#define KCDB_ATTR_LOCATION 11
-/*! \brief Lifetime of the credential
+/*! \brief Lifetime of the credential
- \b Type: INTERVAL
- \b Flags: SYSTEM
@@ -3024,8 +3024,8 @@ typedef struct tag_kcdb_credtype {
\retval KHM_ERROR_DUPLICATE The \a name or \a id that was
specified is already in use.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_credtype_register(const kcdb_credtype * type,
+KHMEXP khm_int32 KHMAPI
+kcdb_credtype_register(const kcdb_credtype * type,
khm_int32 * new_id);
/*! \brief Return a held reference to a \a kcdb_credtype object describing the credential type.
@@ -3049,8 +3049,8 @@ kcdb_credtype_register(const kcdb_credtype * type,
\see kcdb_credtype_release_info()
\see kcdb_credtype_register()
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_credtype_get_info(khm_int32 id,
+KHMEXP khm_int32 KHMAPI
+kcdb_credtype_get_info(khm_int32 id,
kcdb_credtype ** type);
/*! \brief Release a reference to a \a kcdb_credtype object
@@ -3060,7 +3060,7 @@ kcdb_credtype_get_info(khm_int32 id,
\see kcdb_credtype_get_info()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credtype_release_info(kcdb_credtype * type);
/*! \brief Unregister a credentials type
@@ -3070,7 +3070,7 @@ kcdb_credtype_release_info(kcdb_credtype * type);
This should only be done when the credentials provider is being
unloaded.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credtype_unregister(khm_int32 id);
/*! \brief Retrieve the name of a credentials type
@@ -3094,7 +3094,7 @@ kcdb_credtype_unregister(khm_int32 id);
\retval KHM_ERROR_INVALID_PARAM Invalid parameter.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credtype_get_name(khm_int32 id,
wchar_t * buf,
khm_size * cbbuf);
@@ -3105,7 +3105,7 @@ kcdb_credtype_get_name(khm_int32 id,
type specific subcription. It may return NULL if the subscription
is not available.
*/
-KHMEXP khm_handle KHMAPI
+KHMEXP khm_handle KHMAPI
kcdb_credtype_get_sub(khm_int32 id);
/*! \brief Get the description of a credentials type
@@ -3129,7 +3129,7 @@ kcdb_credtype_get_sub(khm_int32 id);
\retval KHM_ERROR_TOO_LONG Either \a buf was NULL or the supplied buffer was insufficient. The required size is specified in \a cbbuf.
\retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_credtype_describe(khm_int32 id,
wchar_t * buf,
khm_size * cbbuf,
@@ -3143,15 +3143,15 @@ kcdb_credtype_describe(khm_int32 id,
\param[out] id Receives the identifier if the call succeeds
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_credtype_get_id(const wchar_t * name,
+KHMEXP khm_int32 KHMAPI
+kcdb_credtype_get_id(const wchar_t * name,
khm_int32 * id);
/*@}*/
/*********************************************************************/
-/*! \defgroup kcdb_buf Generic access to buffer
+/*! \defgroup kcdb_buf Generic access to buffer
Currently, credentials and identities both hold record data types.
This set of API's allow an application to access fields in the
@@ -3182,11 +3182,11 @@ kcdb_credtype_get_id(const wchar_t * name,
exists in this record then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
-kcdb_buf_get_attr(khm_handle record,
- khm_int32 attr_id,
- khm_int32 * attr_type,
- void * buffer,
+KHMEXP khm_int32 KHMAPI
+kcdb_buf_get_attr(khm_handle record,
+ khm_int32 attr_id,
+ khm_int32 * attr_type,
+ void * buffer,
khm_size * pcb_buf);
/*! \brief Get an attribute from a record by name.
@@ -3204,7 +3204,7 @@ kcdb_buf_get_attr(khm_handle record,
exists in this record then the function will return
KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_get_attrib(khm_handle record,
const wchar_t * attr_name,
khm_int32 * attr_type,
@@ -3239,7 +3239,7 @@ kcdb_buf_get_attrib(khm_handle record,
\retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
supplied buffer was insufficient
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_get_attr_string(khm_handle record,
khm_int32 attr_id,
wchar_t * buffer,
@@ -3269,7 +3269,7 @@ kcdb_buf_get_attr_string(khm_handle record,
\see kcdb_cred_get_attr_string()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_get_attrib_string(khm_handle record,
const wchar_t * attr_name,
wchar_t * buffer,
@@ -3282,7 +3282,7 @@ kcdb_buf_get_attrib_string(khm_handle record,
individual data type handlers may copy in less than this many
bytes in to the record.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_set_attr(khm_handle record,
khm_int32 attr_id,
void * buffer,
@@ -3294,16 +3294,16 @@ kcdb_buf_set_attr(khm_handle record,
individual data type handlers may copy in less than this many
bytes in to the record.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_set_attrib(khm_handle record,
const wchar_t * attr_name,
void * buffer,
khm_size cbbuf);
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_hold(khm_handle record);
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kcdb_buf_release(khm_handle record);
/*@}*/
diff --git a/src/windows/identity/kcreddb/langres.h b/src/windows/identity/kcreddb/langres.h
index 1c3258b3d9..8f03240db3 100644
--- a/src/windows/identity/kcreddb/langres.h
+++ b/src/windows/identity/kcreddb/langres.h
@@ -37,7 +37,7 @@
#define IDS_RENEW_LIFETIME 132
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
diff --git a/src/windows/identity/kcreddb/resource.h b/src/windows/identity/kcreddb/resource.h
index bc587b2781..56739331fd 100644
--- a/src/windows/identity/kcreddb/resource.h
+++ b/src/windows/identity/kcreddb/resource.h
@@ -16,7 +16,7 @@
#define IDS_MUTEX_TIMEOUT 401
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
diff --git a/src/windows/identity/kcreddb/type.c b/src/windows/identity/kcreddb/type.c
index e4fd2df2c4..5e23b5e1a2 100644
--- a/src/windows/identity/kcreddb/type.c
+++ b/src/windows/identity/kcreddb/type.c
@@ -37,10 +37,10 @@ kcdb_type_i * kcdb_types = NULL;
#define GENERIC_VOID_STR L"(Void)"
khm_int32 KHMAPI kcdb_type_void_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -98,10 +98,10 @@ khm_int32 KHMAPI kcdb_type_void_dup(
/* String */
khm_int32 KHMAPI kcdb_type_string_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -189,10 +189,10 @@ khm_int32 KHMAPI kcdb_type_string_dup(
khm_int32 KHMAPI kcdb_type_date_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -315,7 +315,7 @@ khm_int32 KHMAPI kcdb_type_date_dup(
/* returns the number of milliseconds that must elapse away from the
interval specified in pft for the representation of pft to change
from whatever it is right now */
-KHMEXP long KHMAPI
+KHMEXP long KHMAPI
FtIntervalMsToRepChange(LPFILETIME pft)
{
__int64 ms,s,m,h,d;
@@ -324,7 +324,7 @@ FtIntervalMsToRepChange(LPFILETIME pft)
ift = FtToInt(pft);
ms = ift / 10000i64;
-
+
if(ms < 0 || ift == _I64_MAX)
return -1;
@@ -350,7 +350,7 @@ FtIntervalMsToRepChange(LPFILETIME pft)
return l;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
FtIntervalToString(LPFILETIME data, wchar_t * buffer, khm_size * cb_buf)
{
size_t cbsize;
@@ -469,11 +469,11 @@ FtIntervalToString(LPFILETIME data, wchar_t * buffer, khm_size * cb_buf)
return KHM_ERROR_SUCCESS;
}
-khm_int32 KHMAPI
-kcdb_type_interval_toString(const void * data,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+khm_int32 KHMAPI
+kcdb_type_interval_toString(const void * data,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
return FtIntervalToString((LPFILETIME) data, buffer, cb_buf);
@@ -524,10 +524,10 @@ khm_int32 KHMAPI kcdb_type_interval_dup(
/* Int32 */
khm_int32 KHMAPI kcdb_type_int32_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -586,10 +586,10 @@ khm_int32 KHMAPI kcdb_type_int32_dup(
/* Int64 */
khm_int32 KHMAPI kcdb_type_int64_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -650,10 +650,10 @@ khm_int32 KHMAPI kcdb_type_int64_dup(
#define GENERIC_DATA_STR L"(Data)"
khm_int32 KHMAPI kcdb_type_data_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags)
{
size_t cbsize;
@@ -729,7 +729,7 @@ khm_int32 KHMAPI kcdb_type_data_dup(
}
-void kcdb_type_msg_completion(kmq_message * m)
+void kcdb_type_msg_completion(kmq_message * m)
{
kcdb_type_release((kcdb_type_i *) m->vparam);
}
@@ -990,11 +990,11 @@ KHMEXP khm_int32 KHMAPI kcdb_type_register(const kcdb_type * type, khm_int32 * n
size_t cbsize;
khm_int32 type_id;
- if(!type ||
- !type->comp ||
- !type->dup ||
- !type->isValid ||
- !type->toString ||
+ if(!type ||
+ !type->comp ||
+ !type->dup ||
+ !type->isValid ||
+ !type->toString ||
!type->name)
return KHM_ERROR_INVALID_PARAM;
@@ -1084,8 +1084,8 @@ KHMEXP khm_int32 KHMAPI kcdb_type_unregister(khm_int32 id)
/* we are going to remove t from the hash table. If no one is holding
a reference to it, then we can free it (actually, the del_ref code
will take care of that anyway). If there is a hold, then it will
- get freed when they release it.
-
+ get freed when they release it.
+
Actually, the post_message call above pretty much guarantees that
the type has a hold on it.*/
t->type.flags |= KCDB_TYPE_FLAG_DELETED;
@@ -1141,7 +1141,7 @@ KHMEXP void KHMAPI TimetToFileTime( time_t t, LPFILETIME pft )
KHMEXP void KHMAPI TimetToFileTimeInterval(time_t t, LPFILETIME pft)
{
LONGLONG ll;
-
+
if ( sizeof(time_t) == 4 )
ll = Int32x32To64(t, 10000000);
else {
@@ -1224,11 +1224,11 @@ KHMEXP int KHMAPI AnsiStrToUnicode( wchar_t * wstr, size_t cbwstr, const char *
nc = strlen(astr);
if(nc == MultiByteToWideChar(
- CP_ACP,
- 0,
- astr,
- (int) nc,
- wstr,
+ CP_ACP,
+ 0,
+ astr,
+ (int) nc,
+ wstr,
(int)(cbwstr / sizeof(wchar_t) - 1))) {
wstr[nc] = L'\0';
} else {
@@ -1253,13 +1253,13 @@ KHMEXP int KHMAPI UnicodeStrToAnsi( char * dest, size_t cbdest, const wchar_t *
return 0;
nc = WideCharToMultiByte(
- CP_ACP,
- WC_NO_BEST_FIT_CHARS,
- src,
- (int) nc,
- dest,
- (int) cbdest,
- NULL,
+ CP_ACP,
+ WC_NO_BEST_FIT_CHARS,
+ src,
+ (int) nc,
+ dest,
+ (int) cbdest,
+ NULL,
NULL);
dest[nc] = 0;
@@ -1296,7 +1296,7 @@ int _iv_is_in_spec(wchar_t *s, int n, wchar_t * spec)
e = wcschr(b, L',');
if(!e)
e = b + wcslen(b);
-
+
if((e - b) == n && !_wcsnicmp(b, s, n)) {
return TRUE;
}
diff --git a/src/windows/identity/kcreddb/type.h b/src/windows/identity/kcreddb/type.h
index 698e5f3863..5b30e54221 100644
--- a/src/windows/identity/kcreddb/type.h
+++ b/src/windows/identity/kcreddb/type.h
@@ -53,10 +53,10 @@ void kcdb_type_check_and_delete(khm_int32 id);
void kcdb_type_post_message(khm_int32 op, kcdb_type_i * t);
khm_int32 KHMAPI kcdb_type_void_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_void_isValid(
@@ -76,10 +76,10 @@ khm_int32 KHMAPI kcdb_type_void_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_string_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_string_isValid(
@@ -99,10 +99,10 @@ khm_int32 KHMAPI kcdb_type_string_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_date_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_date_isValid(
@@ -122,10 +122,10 @@ khm_int32 KHMAPI kcdb_type_date_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_interval_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_interval_isValid(
@@ -145,10 +145,10 @@ khm_int32 KHMAPI kcdb_type_interval_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_int32_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_int32_isValid(
@@ -168,10 +168,10 @@ khm_int32 KHMAPI kcdb_type_int32_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_int64_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_int64_isValid(
@@ -191,10 +191,10 @@ khm_int32 KHMAPI kcdb_type_int64_dup(
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_data_toString(
- const void * d,
- khm_size cbd,
- wchar_t * buffer,
- khm_size * cb_buf,
+ const void * d,
+ khm_size cbd,
+ wchar_t * buffer,
+ khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_data_isValid(
diff --git a/src/windows/identity/kherr/kherr.c b/src/windows/identity/kherr/kherr.c
index 006feb3af1..cd5cbc50f1 100644
--- a/src/windows/identity/kherr/kherr.c
+++ b/src/windows/identity/kherr/kherr.c
@@ -44,7 +44,7 @@ kherr_serial ctx_serial = 0;
#ifdef DEBUG
#define DEBUG_CONTEXT
-KHMEXP void
+KHMEXP void
kherr_debug_printf(wchar_t * fmt, ...)
{
va_list vl;
@@ -57,7 +57,7 @@ kherr_debug_printf(wchar_t * fmt, ...)
}
#endif
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
kherr_add_ctx_handler(kherr_ctx_handler h,
khm_int32 filter,
kherr_serial serial)
@@ -114,7 +114,7 @@ kherr_add_ctx_handler(kherr_ctx_handler h,
LeaveCriticalSection(&cs_error);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
kherr_remove_ctx_handler(kherr_ctx_handler h,
kherr_serial serial)
{
@@ -134,7 +134,7 @@ kherr_remove_ctx_handler(kherr_ctx_handler h,
ctx_handlers[i] = ctx_handlers[i + 1];
}
}
-
+
LeaveCriticalSection(&cs_error);
}
@@ -182,7 +182,7 @@ attach_this_thread(void)
if (t)
return;
- t = PMALLOC(sizeof(kherr_thread) +
+ t = PMALLOC(sizeof(kherr_thread) +
sizeof(kherr_context *) * THREAD_STACK_SIZE);
t->nc_ctx = THREAD_STACK_SIZE;
t->n_ctx = 0;
@@ -247,7 +247,7 @@ push_context(kherr_context * c)
kherr_thread * nt;
nc_new = t->nc_ctx + THREAD_STACK_SIZE;
- cb_new = sizeof(kherr_thread) +
+ cb_new = sizeof(kherr_thread) +
sizeof(kherr_context *) * nc_new;
nt = PMALLOC(cb_new);
@@ -399,7 +399,7 @@ get_empty_context(void)
else {
c = PMALLOC(sizeof(kherr_context));
}
-
+
ZeroMemory(c,sizeof(*c));
c->severity = KHERR_NONE;
c->flags = KHERR_CF_UNBOUND;
@@ -409,7 +409,7 @@ get_empty_context(void)
LPUSH(&ctx_root_list, c);
LeaveCriticalSection(&cs_error);
-
+
return c;
}
@@ -497,7 +497,7 @@ pick_err_event(kherr_context * c)
EnterCriticalSection(&cs_error);
e = QTOP(c);
while(e) {
- if(!(e->flags & KHERR_RF_INERT) &&
+ if(!(e->flags & KHERR_RF_INERT) &&
s >= e->severity) {
ce = e;
s = e->severity;
@@ -589,7 +589,7 @@ resolve_string_resource(kherr_event * e,
if(e->flags & if_flag) {
if(e->h_module != NULL)
- chars = LoadString(e->h_module, (UINT)(INT_PTR) *str,
+ chars = LoadString(e->h_module, (UINT)(INT_PTR) *str,
tfmt, ARRAYLENGTH(tbuf));
if(e->h_module == NULL || chars == 0)
*str = NULL;
@@ -867,7 +867,7 @@ kherr_reportf_ex(enum kherr_severity severity,
return e;
}
-KHMEXP kherr_event * KHMAPI
+KHMEXP kherr_event * KHMAPI
kherr_report(enum kherr_severity severity,
const wchar_t * short_desc,
const wchar_t * facility,
@@ -938,7 +938,7 @@ kherr_report(enum kherr_severity severity,
}
KHMEXP void KHMAPI
-kherr_suggest(wchar_t * suggestion,
+kherr_suggest(wchar_t * suggestion,
enum kherr_suggestion suggestion_id,
khm_int32 flags)
{
@@ -1005,7 +1005,7 @@ _exit:
}
KHMEXP void KHMAPI
-kherr_facility(wchar_t * facility,
+kherr_facility(wchar_t * facility,
khm_int32 facility_id)
{
kherr_context * c;
@@ -1118,7 +1118,7 @@ kherr_push_context(kherr_context * c)
}
KHMEXP void KHMAPI
-kherr_push_new_context(khm_int32 flags)
+kherr_push_new_context(khm_int32 flags)
{
kherr_context * p = NULL;
kherr_context * c;
@@ -1405,8 +1405,8 @@ get_progress(kherr_context * c, khm_ui_4 * pnum, khm_ui_4 * pdenom)
}
KHMEXP void KHMAPI
-kherr_get_progress_i(kherr_context * c,
- khm_ui_4 * num,
+kherr_get_progress_i(kherr_context * c,
+ khm_ui_4 * num,
khm_ui_4 * denom)
{
if (num == NULL || denom == NULL)
@@ -1577,4 +1577,3 @@ kherr_dup_string(const wchar_t * s)
return _tstr(dest);
}
-
diff --git a/src/windows/identity/kherr/kherr.h b/src/windows/identity/kherr/kherr.h
index 90a72a35a7..a4ab68d066 100644
--- a/src/windows/identity/kherr/kherr.h
+++ b/src/windows/identity/kherr/kherr.h
@@ -54,7 +54,7 @@
If left undefined, the convenience macros will leave the facility
value undefined.
- */
+ */
#define KHERR_FACILITY NULL
#endif
@@ -177,13 +177,13 @@ typedef struct tag_kherr_event {
const wchar_t * suggestion; /*!< A suggested way to fix it
(localized,formatted) */
- kherr_severity severity;
+ kherr_severity severity;
/*!< Severity level. One of the
severity levels listed in
enumeration ::kherr_severity */
khm_int32 facility_id; /*!< Left to the application to
interpret */
- kherr_suggestion suggestion_id;
+ kherr_suggestion suggestion_id;
/*!< One of the suggestion ID's from
the enumeration
::kherr_suggestion */
@@ -217,44 +217,44 @@ typedef struct tag_kherr_event {
is mutually exclusive.
*/
enum kherr_event_flags {
- KHERR_RF_CSTR_SHORT_DESC= 0x00000000,
+ KHERR_RF_CSTR_SHORT_DESC= 0x00000000,
/*!< Short description is a constant
string */
- KHERR_RF_RES_SHORT_DESC = 0x00000001,
+ KHERR_RF_RES_SHORT_DESC = 0x00000001,
/*!< Short description is a string
resource */
- KHERR_RF_MSG_SHORT_DESC = 0x00000002,
+ KHERR_RF_MSG_SHORT_DESC = 0x00000002,
/*!< Short description is a message
resource */
- KHERR_RF_FREE_SHORT_DESC= 0x00000004,
+ KHERR_RF_FREE_SHORT_DESC= 0x00000004,
/*!< Short description is an allocated
string */
KHERR_RFMASK_SHORT_DESC = 0x00000007,
- KHERR_RF_CSTR_LONG_DESC = 0x00000000,
+ KHERR_RF_CSTR_LONG_DESC = 0x00000000,
/*!< Long description is a constant
string */
- KHERR_RF_RES_LONG_DESC = 0x00000008,
+ KHERR_RF_RES_LONG_DESC = 0x00000008,
/*!< Long description is a string
resource */
- KHERR_RF_MSG_LONG_DESC = 0x00000010,
+ KHERR_RF_MSG_LONG_DESC = 0x00000010,
/*!< Long description is a message
resouce */
- KHERR_RF_FREE_LONG_DESC = 0x00000020,
+ KHERR_RF_FREE_LONG_DESC = 0x00000020,
/*!< Long description is an allocated
string */
KHERR_RFMASK_LONG_DESC = 0x00000038,
- KHERR_RF_CSTR_SUGGEST = 0x00000000,
+ KHERR_RF_CSTR_SUGGEST = 0x00000000,
/*!< Suggestion is a constant
string */
- KHERR_RF_RES_SUGGEST = 0x00000040,
+ KHERR_RF_RES_SUGGEST = 0x00000040,
/*!< Suggestion is a string
resource */
- KHERR_RF_MSG_SUGGEST = 0x00000080,
+ KHERR_RF_MSG_SUGGEST = 0x00000080,
/*!< Suggestion is a message
resource */
- KHERR_RF_FREE_SUGGEST = 0x00000100,
+ KHERR_RF_FREE_SUGGEST = 0x00000100,
/*!< Suggestion is an allocated
string */
KHERR_RFMASK_SUGGEST = 0x000001C0,
@@ -298,7 +298,7 @@ typedef struct tag_kherr_context {
number as well as the pointer to the
context object. */
- kherr_severity severity;
+ kherr_severity severity;
/*!< Severity level. One of the
severity levels listed below. This
is the severity level of the context
@@ -406,7 +406,7 @@ enum kherr_ctx_event {
\see kherr_add_ctx_handler()
*/
-typedef void (KHMAPI * kherr_ctx_handler)(enum kherr_ctx_event,
+typedef void (KHMAPI * kherr_ctx_handler)(enum kherr_ctx_event,
kherr_context *);
/*! \brief Add a context event handler
@@ -468,7 +468,7 @@ typedef void (KHMAPI * kherr_ctx_handler)(enum kherr_ctx_event,
should be tracked. If this is zero, all error contexts can
trigger the handler.
*/
-KHMEXP void KHMAPI kherr_add_ctx_handler(kherr_ctx_handler h,
+KHMEXP void KHMAPI kherr_add_ctx_handler(kherr_ctx_handler h,
khm_int32 filter,
kherr_serial serial);
diff --git a/src/windows/identity/kmm/kmm.h b/src/windows/identity/kmm/kmm.h
index 56d43984bc..58e9e1b24e 100644
--- a/src/windows/identity/kmm/kmm.h
+++ b/src/windows/identity/kmm/kmm.h
@@ -171,7 +171,7 @@ typedef struct tag_kmm_plugin_info {
*/
#define KHM_PITYPE_CRED 1
-/*! \brief A identity provider
+/*! \brief A identity provider
\see \ref pi_pt_cred for more information
*/
@@ -330,14 +330,14 @@ enum KMM_MODULE_STATES {
\note Only called by the NetIDMgr core.
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
kmm_init(void);
/*! \brief Stop the Module Manager
\note Only called by the NetIDMgr core.
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
kmm_exit(void);
/*! \brief Return the plugin handle for the current plugin
@@ -347,7 +347,7 @@ kmm_exit(void);
kmm_release_plugin(). Returns NULL if the current thread is not
owned by any plugin.
*/
-KHMEXP kmm_plugin KHMAPI
+KHMEXP kmm_plugin KHMAPI
kmm_this_plugin(void);
/*! \brief Return the module handle for the current module
@@ -356,7 +356,7 @@ kmm_this_plugin(void);
thread. The returned handle must be released by calling
kmm_release_module()
*/
-KHMEXP kmm_module KHMAPI
+KHMEXP kmm_module KHMAPI
kmm_this_module(void);
/*! \name Flags for kmm_load_module()
@@ -446,22 +446,22 @@ kmm_this_module(void);
\see \ref pi_fw_pm_load
\see ::KMM_LM_FLAG_SYNC, ::KMM_LM_FLAG_NOLOAD
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_load_module(wchar_t * modname, khm_int32 flags, kmm_module * result);
/*! \brief Hold a handle to a module
Use kmm_release_module() to release the hold.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_hold_module(kmm_module module);
/*! \brief Release a handle to a module
- Release a held referece to a module that was returned in a call to
+ Release a held referece to a module that was returned in a call to
kmm_load_module().
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_release_module(kmm_module m);
/*! \brief Query the state of a module
@@ -473,7 +473,7 @@ kmm_release_module(kmm_module m);
\return The return value is one of the ::KMM_MODULE_STATES
enumerations.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_module_state(kmm_module m);
/*! \brief Unload a module
@@ -483,7 +483,7 @@ kmm_get_module_state(kmm_module m);
\see \ref pi_fw_pm_unload
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unload_module(kmm_module module);
/*! \brief Loads the default modules as specified in the configuration
@@ -492,7 +492,7 @@ kmm_unload_module(kmm_module module);
This function dispatches the necessary message for loading these
modules and reutnrs.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_load_default_modules(void);
/*! \brief Checks whether there are any pending loads
@@ -511,7 +511,7 @@ kmm_load_pending(void);
change in ways which are inconsistent from the internal data
structures that kmm maintains.
*/
-KHMEXP HMODULE KHMAPI
+KHMEXP HMODULE KHMAPI
kmm_get_hmodule(kmm_module m);
#endif
@@ -521,7 +521,7 @@ kmm_get_hmodule(kmm_module m);
until the hold is released with a call to kmm_release_plugin().
No guarantees are made on the handle once the handle is released.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_hold_plugin(kmm_plugin p);
/*! \brief Release a plugin
@@ -530,7 +530,7 @@ kmm_hold_plugin(kmm_plugin p);
kmm_hold_plugin(). The plugin handle should no longer be
considered valied once this is called.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_release_plugin(kmm_plugin p);
/*! \brief Provide a plugin
@@ -571,14 +571,14 @@ kmm_release_plugin(kmm_plugin p);
\note This can only be called when handing init_module()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_provide_plugin(kmm_module module, kmm_plugin_reg * plugin);
/*! \brief Query the state of a plugin.
\return One of ::_kmm_plugin_states
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_plugin_state(wchar_t * plugin);
/*! \defgroup kmm_reg Registration
@@ -612,7 +612,7 @@ kmm_get_plugin_state(wchar_t * plugin);
\see khc_open_space()
\see khc_close_space()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_plugin_config(wchar_t * plugin, khm_int32 flags, khm_handle * result);
/*! \brief Obtain the configuration space for a named module
@@ -633,7 +633,7 @@ kmm_get_plugin_config(wchar_t * plugin, khm_int32 flags, khm_handle * result);
\see khc_open_space()
\see khc_close_space()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_module_config(wchar_t * module, khm_int32 flags, khm_handle * result);
/*! \brief Retrieve a handle to the configuration space for plugins
@@ -653,7 +653,7 @@ kmm_get_module_config(wchar_t * module, khm_int32 flags, khm_handle * result);
\see khc_open_space()
\see khc_close_space()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_plugins_config(khm_int32 flags, khm_handle * result);
/*! \brief Retrieve the handle to the configuration space for modules
@@ -672,7 +672,7 @@ kmm_get_plugins_config(khm_int32 flags, khm_handle * result);
\see khc_open_space()
\see khc_close_space()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_modules_config(khm_int32 flags, khm_handle * result);
/*! \brief Return information about a loaded module
@@ -707,8 +707,8 @@ kmm_get_modules_config(khm_int32 flags, khm_handle * result);
\retval KHM_ERROR_NOT_FOUND The specified module is not a
registered module.
*/
-KHMEXP khm_int32 KHMAPI
-kmm_get_module_info(wchar_t * module_name, khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+kmm_get_module_info(wchar_t * module_name, khm_int32 flags,
kmm_module_info * buffer, khm_size * cb_buffer);
/*! \brief Get information about a module
@@ -765,9 +765,9 @@ kmm_release_module_info_i(kmm_module_info * info);
\retval KHM_ERROR_NOT_FOUND The specified plugin was not found
among the registered plugins.
*/
-KHMEXP khm_int32 KHMAPI
-kmm_get_plugin_info(wchar_t * plugin_name,
- kmm_plugin_info * buffer,
+KHMEXP khm_int32 KHMAPI
+kmm_get_plugin_info(wchar_t * plugin_name,
+ kmm_plugin_info * buffer,
khm_size * cb_buffer);
/*! \brief Obtain information about a plugin using a plugin handle
@@ -862,7 +862,7 @@ kmm_enable_plugin(kmm_plugin p, khm_boolean enable);
\see kmm_register_module()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags);
/*! \brief Register a module
@@ -883,7 +883,7 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags);
can be used to choose the configuration store in which the
module registration will be performed.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_register_module(kmm_module_reg * module, khm_int32 config_flags);
/*! \brief Unregister a plugin
@@ -902,7 +902,7 @@ kmm_register_module(kmm_module_reg * module, khm_int32 config_flags);
is unloaded and the associated module is either also unloaded
or in a state where the plugin can be unregistered.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unregister_plugin(wchar_t * plugin, khm_int32 config_flags);
/*! \brief Unregister a module
@@ -921,7 +921,7 @@ kmm_unregister_plugin(wchar_t * plugin, khm_int32 config_flags);
the module. The caller should make sure that the module is
unloaded and in a state where it can be unregistered.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unregister_module(wchar_t * module, khm_int32 config_flags);
/*@}*/ /* kmm_reg */
@@ -982,9 +982,9 @@ typedef struct tag_kmm_module_locale {
\note This can only be called when handing init_module()
*/
-KHMEXP khm_int32 KHMAPI
-kmm_set_locale_info(kmm_module module,
- kmm_module_locale * locales,
+KHMEXP khm_int32 KHMAPI
+kmm_set_locale_info(kmm_module module,
+ kmm_module_locale * locales,
khm_int32 n_locales);
#ifdef _WIN32
@@ -994,21 +994,21 @@ kmm_set_locale_info(kmm_module module,
NetIDMgr allows the specification of an alternate resource library
that will be used to load localized resources from. This function
returns a handle to this library.
-
+
While you can use the convenience macros to access resources in a
localization library using the module handle, it is recommended,
for performance reasons, to use this function to obtain the handle
to the resource library and then use that handle in calls to
LoadString, LoadImage etc. directly.
*/
-KHMEXP HMODULE KHMAPI
+KHMEXP HMODULE KHMAPI
kmm_get_resource_hmodule(kmm_module m);
/*! \name Convenience Macros
@{*/
/*! \brief Convenience macro for using calling LoadAccelerators using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadAccelerators(module, lpTableName) \
@@ -1016,7 +1016,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadBitmap using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadBitmap(module, lpBitmapName) \
@@ -1024,7 +1024,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadImage using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadImage(module, lpszName, uType, cxDesired, cyDesired, fuLoad) \
@@ -1032,7 +1032,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadCursor using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadCursor(module, lpCursorName) \
@@ -1040,7 +1040,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadIcon using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadIcon(module, lpIconName) \
@@ -1048,7 +1048,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadMenu using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadMenu(module, lpMenuName) \
@@ -1056,7 +1056,7 @@ kmm_get_resource_hmodule(kmm_module m);
/*! \brief Convenience macro for using calling LoadString using a module handle
- \param[in] module A handle to a loaded module. The corresponding resource
+ \param[in] module A handle to a loaded module. The corresponding resource
module will be located through a call to kmm_get_resource_hmodule()
*/
#define kmm_LoadString(module, uID, lpBuffer, nBufferMax) \
diff --git a/src/windows/identity/kmm/kmm_module.c b/src/windows/identity/kmm/kmm_module.c
index 13fae87d3f..bfa984af50 100644
--- a/src/windows/identity/kmm/kmm_module.c
+++ b/src/windows/identity/kmm/kmm_module.c
@@ -120,7 +120,7 @@ KHMEXP khm_int32 KHMAPI kmm_release_module(kmm_module vm)
EnterCriticalSection(&cs_kmm);
m = kmm_module_from_handle(vm);
- if(! --(m->refcount))
+ if(! --(m->refcount))
{
/* note that a 0 ref count means that there are no active
plugins */
@@ -264,7 +264,7 @@ kmmint_read_module_info(kmm_module_i * m) {
if (!VerQueryValue(m->version_info,
resname, (LPVOID *) &r, &c)) {
rv = KHM_ERROR_INVALID_PARAM;
- _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
+ _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
_cstr(TEXT(NIMV_MODULE)));
goto _cleanup;
}
@@ -293,7 +293,7 @@ kmmint_read_module_info(kmm_module_i * m) {
if (!VerQueryValue(m->version_info,
resname, (LPVOID *) &r, &c)) {
rv = KHM_ERROR_INVALID_PARAM;
- _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
+ _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
_cstr(TEXT(NIMV_APIVER)));
goto _cleanup;
}
@@ -331,7 +331,7 @@ kmmint_read_module_info(kmm_module_i * m) {
if (!VerQueryValue(m->version_info,
resname, (LPVOID *) &r, &c)) {
rv = KHM_ERROR_INVALID_PARAM;
- _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
+ _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
_cstr(L"FileDescription"));
goto _cleanup;
}
@@ -401,7 +401,7 @@ kmmint_read_module_info(kmm_module_i * m) {
if (!VerQueryValue(m->version_info,
resname, (LPVOID *) &r, &c)) {
rv = KHM_ERROR_INVALID_PARAM;
- _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
+ _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
_cstr(L"LegalCopyright"));
goto _cleanup;
}
@@ -428,7 +428,7 @@ kmmint_read_module_info(kmm_module_i * m) {
c != sizeof(*vff)) {
rv = KHM_ERROR_INVALID_PARAM;
- _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
+ _report_mr1(KHERR_WARNING, MSG_RMI_RES_MISSING,
_cstr(L"Fixed Version Info"));
goto _cleanup;
}
@@ -456,8 +456,8 @@ kmmint_read_module_info(kmm_module_i * m) {
return rv;
}
-KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
- khm_int32 flags,
+KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
+ khm_int32 flags,
kmm_module * result)
{
kmm_module_i * m = NULL;
@@ -477,8 +477,8 @@ KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
/* check if the module has either failed to load either or if
it has been terminated. If so, we try once again to load the
module. */
- if(!(flags & KMM_LM_FLAG_NOLOAD) &&
- (mi->state < 0 || mi->state == KMM_MODULE_STATE_EXITED))
+ if(!(flags & KMM_LM_FLAG_NOLOAD) &&
+ (mi->state < 0 || mi->state == KMM_MODULE_STATE_EXITED))
{
mi->state = KMM_MODULE_STATE_PREINIT;
}
@@ -517,9 +517,9 @@ KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
if(flags & KMM_LM_FLAG_SYNC) {
kmm_hold_module(kmm_handle_from_module(m));
- kmq_send_message(KMSG_KMM,
- KMSG_KMM_I_REG,
- KMM_REG_INIT_MODULE,
+ kmq_send_message(KMSG_KMM,
+ KMSG_KMM_I_REG,
+ KMM_REG_INIT_MODULE,
(void*) m);
if(m->state <= 0) {
/* failed to load ? */
@@ -541,9 +541,9 @@ KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
}
} else {
kmm_hold_module(kmm_handle_from_module(m));
- kmq_post_message(KMSG_KMM,
- KMSG_KMM_I_REG,
- KMM_REG_INIT_MODULE,
+ kmq_post_message(KMSG_KMM,
+ KMSG_KMM_I_REG,
+ KMM_REG_INIT_MODULE,
(void*) m);
if(result)
*result = kmm_handle_from_module(m);
@@ -554,7 +554,7 @@ KHMEXP khm_int32 KHMAPI kmm_load_module(wchar_t * modname,
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_module_state(kmm_module m)
{
if(!kmm_is_module(m))
@@ -608,22 +608,22 @@ kmm_release_module_info_i(kmm_module_info * info) {
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unload_module(kmm_module module) {
if(!kmm_is_module(module))
return KHM_ERROR_INVALID_PARAM;
kmm_hold_module(module);
- kmq_post_message(KMSG_KMM,
- KMSG_KMM_I_REG,
- KMM_REG_EXIT_MODULE,
+ kmq_post_message(KMSG_KMM,
+ KMSG_KMM_I_REG,
+ KMM_REG_EXIT_MODULE,
(void *) kmm_module_from_handle(module));
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_load_default_modules(void) {
khm_handle csm = NULL;
khm_handle cs_mod = NULL;
@@ -665,7 +665,7 @@ kmm_load_default_modules(void) {
}
#ifdef _WIN32
-KHMEXP HMODULE KHMAPI
+KHMEXP HMODULE KHMAPI
kmm_get_hmodule(kmm_module m)
{
if(!kmm_is_module(m))
diff --git a/src/windows/identity/kmm/kmm_plugin.c b/src/windows/identity/kmm/kmm_plugin.c
index 89e31ad844..e44d598628 100644
--- a/src/windows/identity/kmm/kmm_plugin.c
+++ b/src/windows/identity/kmm/kmm_plugin.c
@@ -31,7 +31,7 @@
if one isn't found, we create an empty one.
*/
-kmm_plugin_i *
+kmm_plugin_i *
kmmint_get_plugin_i(wchar_t * name)
{
kmm_plugin_i * p;
@@ -60,7 +60,7 @@ kmmint_get_plugin_i(wchar_t * name)
return p;
}
-kmm_plugin_i *
+kmm_plugin_i *
kmmint_find_plugin_i(wchar_t * name)
{
kmm_plugin_i * p;
@@ -77,12 +77,12 @@ kmmint_find_plugin_i(wchar_t * name)
}
/* the plugin must be delisted before calling this */
-void
+void
kmmint_list_plugin(kmm_plugin_i * p)
{
EnterCriticalSection(&cs_kmm);
if((p->flags & KMM_PLUGIN_FLAG_IN_MODLIST) ||
- (p->flags & KMM_PLUGIN_FLAG_IN_LIST))
+ (p->flags & KMM_PLUGIN_FLAG_IN_LIST))
{
RaiseException(2, EXCEPTION_NONCONTINUABLE, 0, NULL);
}
@@ -91,7 +91,7 @@ kmmint_list_plugin(kmm_plugin_i * p)
LeaveCriticalSection(&cs_kmm);
}
-void
+void
kmmint_delist_plugin(kmm_plugin_i * p)
{
EnterCriticalSection(&cs_kmm);
@@ -106,7 +106,7 @@ kmmint_delist_plugin(kmm_plugin_i * p)
LeaveCriticalSection(&cs_kmm);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_hold_plugin(kmm_plugin p)
{
kmm_plugin_i * pi;
@@ -123,7 +123,7 @@ kmm_hold_plugin(kmm_plugin p)
}
/* called with cs_kmm held */
-void
+void
kmmint_free_plugin(kmm_plugin_i * pi)
{
int i;
@@ -314,7 +314,7 @@ kmm_get_next_plugin(kmm_plugin p, kmm_plugin * p_next) {
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_release_plugin(kmm_plugin p)
{
kmm_plugin_i * pi;
@@ -333,7 +333,7 @@ kmm_release_plugin(kmm_plugin p)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_provide_plugin(kmm_module module, kmm_plugin_reg * plugin)
{
kmm_module_i * m;
@@ -348,15 +348,15 @@ kmm_provide_plugin(kmm_module module, kmm_plugin_reg * plugin)
if(m->state != KMM_MODULE_STATE_INIT)
return KHM_ERROR_INVALID_OPERATION;
- if(!plugin ||
- FAILED(StringCbLength(plugin->name, KMM_MAXCB_NAME - sizeof(wchar_t),
+ if(!plugin ||
+ FAILED(StringCbLength(plugin->name, KMM_MAXCB_NAME - sizeof(wchar_t),
&cb_name)) ||
- (plugin->description &&
- FAILED(StringCbLength(plugin->description,
- KMM_MAXCB_DESC - sizeof(wchar_t),
+ (plugin->description &&
+ FAILED(StringCbLength(plugin->description,
+ KMM_MAXCB_DESC - sizeof(wchar_t),
&cb_desc))) ||
- (plugin->dependencies &&
- KHM_FAILED(multi_string_length_cb(plugin->dependencies,
+ (plugin->dependencies &&
+ KHM_FAILED(multi_string_length_cb(plugin->dependencies,
KMM_MAXCB_DEPS, &cb_dep)))) {
return KHM_ERROR_INVALID_PARAM;
}
@@ -411,4 +411,3 @@ kmm_provide_plugin(kmm_module module, kmm_plugin_reg * plugin)
/* leave the plugin held because it is in the module's plugin list */
return KHM_ERROR_SUCCESS;
}
-
diff --git a/src/windows/identity/kmm/kmm_reg.c b/src/windows/identity/kmm/kmm_reg.c
index e1adaa0c31..00626550fa 100644
--- a/src/windows/identity/kmm/kmm_reg.c
+++ b/src/windows/identity/kmm/kmm_reg.c
@@ -27,23 +27,23 @@
#include<kmminternal.h>
-KHMEXP khm_int32 KHMAPI
-kmm_get_module_info(wchar_t * module_name, khm_int32 flags,
+KHMEXP khm_int32 KHMAPI
+kmm_get_module_info(wchar_t * module_name, khm_int32 flags,
kmm_module_info * buffer, khm_size * cb_buffer)
{
/*TODO:Implement this */
return KHM_ERROR_NOT_IMPLEMENTED;
}
-KHMEXP khm_int32 KHMAPI
-kmm_get_plugin_info(wchar_t * plugin_name,
+KHMEXP khm_int32 KHMAPI
+kmm_get_plugin_info(wchar_t * plugin_name,
kmm_plugin_info * buffer, khm_size * cb_buffer)
{
/*TODO:Implement this */
return KHM_ERROR_NOT_IMPLEMENTED;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_plugins_config(khm_int32 flags, khm_handle * result) {
khm_handle csp_root;
khm_handle csp_plugins;
@@ -66,7 +66,7 @@ kmm_get_plugins_config(khm_int32 flags, khm_handle * result) {
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_modules_config(khm_int32 flags, khm_handle * result) {
khm_handle croot;
khm_handle kmm_all_modules;
@@ -89,7 +89,7 @@ kmm_get_modules_config(khm_int32 flags, khm_handle * result) {
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_plugin_config(wchar_t * plugin, khm_int32 flags, khm_handle * result)
{
khm_handle csplugins;
@@ -111,7 +111,7 @@ kmm_get_plugin_config(wchar_t * plugin, khm_int32 flags, khm_handle * result)
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_get_module_config(wchar_t * module, khm_int32 flags, khm_handle * result)
{
khm_handle csmodules;
@@ -132,7 +132,7 @@ kmm_get_module_config(wchar_t * module, khm_int32 flags, khm_handle * result)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -144,8 +144,8 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
config_flags &= ~KHM_FLAG_CREATE;
if((plugin == NULL) ||
- (plugin->dependencies &&
- KHM_FAILED(multi_string_length_cch(plugin->dependencies,
+ (plugin->dependencies &&
+ KHM_FAILED(multi_string_length_cch(plugin->dependencies,
KMM_MAXCCH_DEPS, &cch))) ||
FAILED(StringCchLength(plugin->module, KMM_MAXCCH_NAME, &cch)) ||
(plugin->description &&
@@ -162,7 +162,7 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
#define CKRV if(KHM_FAILED(rv)) goto _exit
- rv = kmm_get_plugin_config(plugin->name,
+ rv = kmm_get_plugin_config(plugin->name,
config_flags | KHM_FLAG_CREATE, &csp_plugin);
CKRV;
@@ -182,7 +182,7 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
}
if(plugin->dependencies) {
- rv = khc_write_multi_string(csp_plugin, L"Dependencies",
+ rv = khc_write_multi_string(csp_plugin, L"Dependencies",
plugin->dependencies);
CKRV;
}
@@ -248,7 +248,7 @@ _exit:
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_register_module(kmm_module_reg * module, khm_int32 config_flags)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -258,8 +258,8 @@ kmm_register_module(kmm_module_reg * module, khm_int32 config_flags)
if((module == NULL) ||
FAILED(StringCchLength(module->name, KMM_MAXCCH_NAME, &cch)) ||
- (module->description &&
- FAILED(StringCchLength(module->description,
+ (module->description &&
+ FAILED(StringCchLength(module->description,
KMM_MAXCCH_DESC, &cch))) ||
FAILED(StringCchLength(module->path, MAX_PATH, &cch)) ||
(module->n_plugins > 0 && module->plugin_reg_info == NULL)) {
@@ -268,7 +268,7 @@ kmm_register_module(kmm_module_reg * module, khm_int32 config_flags)
#define CKRV if(KHM_FAILED(rv)) goto _exit
- rv = kmm_get_module_config(module->name, config_flags | KHM_FLAG_CREATE,
+ rv = kmm_get_module_config(module->name, config_flags | KHM_FLAG_CREATE,
&csp_module);
CKRV;
@@ -294,7 +294,7 @@ _exit:
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unregister_plugin(wchar_t * plugin, khm_int32 config_flags)
{
khm_handle csp_plugin = NULL;
@@ -315,7 +315,7 @@ kmm_unregister_plugin(wchar_t * plugin, khm_int32 config_flags)
return rv;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmm_unregister_module(wchar_t * module, khm_int32 config_flags)
{
khm_handle csp_module = NULL;
diff --git a/src/windows/identity/kmm/kmm_registrar.c b/src/windows/identity/kmm/kmm_registrar.c
index 75f3b782ae..c3bcdb9a9f 100644
--- a/src/windows/identity/kmm/kmm_registrar.c
+++ b/src/windows/identity/kmm/kmm_registrar.c
@@ -92,8 +92,8 @@ kmm_load_pending(void) {
/*! \internal
\brief Message handler for the registrar thread. */
-khm_boolean KHMAPI kmmint_reg_cb(khm_int32 msg_type,
- khm_int32 msg_sub_type,
+khm_boolean KHMAPI kmmint_reg_cb(khm_int32 msg_type,
+ khm_int32 msg_sub_type,
khm_ui_4 uparam,
void *vparam)
{
@@ -173,7 +173,7 @@ DWORD WINAPI kmmint_plugin_broker(LPVOID lpParameter)
p->tid_thread = GetCurrentThreadId();
- rv = (*p->p.msg_proc)(KMSG_SYSTEM, KMSG_SYSTEM_INIT,
+ rv = (*p->p.msg_proc)(KMSG_SYSTEM, KMSG_SYSTEM_INIT,
0, (void *) &(p->p));
_report_mr1(KHERR_INFO, MSG_PB_INIT_RV, _int32(rv));
@@ -282,7 +282,7 @@ DWORD WINAPI kmmint_plugin_broker(LPVOID lpParameter)
p->state = KMM_PLUGIN_STATE_EXITED;
/* the following call will automatically release the plugin */
- kmq_post_message(KMSG_KMM, KMSG_KMM_I_REG,
+ kmq_post_message(KMSG_KMM, KMSG_KMM_I_REG,
KMM_REG_EXIT_PLUGIN, (void *) p);
TlsSetValue(tls_kmm, (LPVOID) 0);
@@ -353,7 +353,7 @@ void kmmint_init_plugin(kmm_plugin_i * p) {
p->state = KMM_PLUGIN_STATE_FAIL_NOT_REGISTERED;
goto _exit;
}
-
+
if(KHM_FAILED(kmm_get_plugin_config(p->p.name, 0, &csp_plugin))) {
_report_mr0(KHERR_ERROR, MSG_IP_NOT_REGISTERED);
@@ -378,18 +378,18 @@ void kmmint_init_plugin(kmm_plugin_i * p) {
p->n_depends = 0;
p->n_unresolved = 0;
-
+
do {
wchar_t * deps = NULL;
wchar_t * d;
khm_size sz = 0;
- if(khc_read_multi_string(csp_plugin, L"Dependencies",
+ if(khc_read_multi_string(csp_plugin, L"Dependencies",
NULL, &sz) != KHM_ERROR_TOO_LONG)
break;
deps = PMALLOC(sz);
- if(KHM_FAILED(khc_read_multi_string(csp_plugin, L"Dependencies",
+ if(KHM_FAILED(khc_read_multi_string(csp_plugin, L"Dependencies",
deps, &sz))) {
if(deps)
PFREE(deps);
@@ -473,11 +473,11 @@ _exit_post:
if(csp_plugins != NULL)
khc_close_space(csp_plugins);
- _report_mr2(KHERR_INFO, MSG_IP_STATE,
+ _report_mr2(KHERR_INFO, MSG_IP_STATE,
_dupstr(p->p.name), _int32(p->state));
_end_task();
-
+
return;
/* jump here if an error condition happens before the plugin
@@ -489,7 +489,7 @@ _exit:
if(csp_plugins != NULL)
khc_close_space(csp_plugins);
- _report_mr2(KHERR_WARNING, MSG_IP_EXITING,
+ _report_mr2(KHERR_WARNING, MSG_IP_EXITING,
_dupstr(p->p.name), _int32(p->state));
_end_task();
@@ -512,7 +512,7 @@ _exit:
In addition to terminating the thread, and removing p from the
linked list and hashtable, it also frees up p.
-
+
\note Should only be called from the context of the registrar thread. */
void kmmint_exit_plugin(kmm_plugin_i * p) {
int np;
@@ -654,7 +654,7 @@ void kmmint_init_module(kmm_module_i * m) {
ct = (FtToInt(&fct) - tm) / 10000000i64;
- if(tm > 0 &&
+ if(tm > 0 &&
ct > fail_reset_time) {
i = 0;
khc_write_int32(csp_mod, L"FailureCount", 0);
@@ -666,7 +666,7 @@ void kmmint_init_module(kmm_module_i * m) {
/* did we exceed the max failure count? However, we ignore
the max failure count if the reason why it didn't load the
last time was because the module wasn't found. */
- if(i > max_fail_count &&
+ if(i > max_fail_count &&
last_reason != KMM_MODULE_STATE_FAIL_NOT_FOUND) {
/* failed too many times */
_report_mr0(KHERR_INFO, MSG_IM_MAX_FAIL);
@@ -676,15 +676,15 @@ void kmmint_init_module(kmm_module_i * m) {
}
}
- if(khc_read_string(csp_mod, KMM_VALNAME_IMAGEPATH, NULL, &sz) ==
+ if(khc_read_string(csp_mod, KMM_VALNAME_IMAGEPATH, NULL, &sz) ==
KHM_ERROR_TOO_LONG) {
if(m->path)
PFREE(m->path);
m->path = PMALLOC(sz);
khc_read_string(csp_mod, KMM_VALNAME_IMAGEPATH, m->path, &sz);
} else {
- /*
- * If there is no image path, then the module has not been
+ /*
+ * If there is no image path, then the module has not been
* installed. Do not report an error and bother the user.
* _report_mr0(KHERR_ERROR, MSG_IM_NOT_REGISTERED);
*/
@@ -831,7 +831,7 @@ void kmmint_init_module(kmm_module_i * m) {
if(csp_mods)
khc_close_space(csp_mods);
- _report_mr2(KHERR_INFO, MSG_IM_MOD_STATE,
+ _report_mr2(KHERR_INFO, MSG_IM_MOD_STATE,
_dupstr(m->name), _int32(m->state));
kmmint_remove_from_module_queue();
@@ -900,7 +900,7 @@ void kmmint_init_module(kmm_module_i * m) {
void kmmint_exit_module(kmm_module_i * m) {
kmm_plugin_i * p;
- /* Exiting a module happens in two stages.
+ /* Exiting a module happens in two stages.
If the module state is running (there are active plugins) then
those plugins must be exited. This has to be done from the
@@ -942,7 +942,7 @@ void kmmint_exit_module(kmm_module_i * m) {
(p->flags & KMM_PLUGIN_FLAG_IN_MODCOUNT)) {
kmm_hold_plugin(kmm_handle_from_plugin(p));
- kmq_post_message(KMSG_KMM, KMSG_KMM_I_REG,
+ kmq_post_message(KMSG_KMM, KMSG_KMM_I_REG,
KMM_REG_EXIT_PLUGIN, (void *) p);
np++;
@@ -986,8 +986,8 @@ void kmmint_exit_module(kmm_module_i * m) {
if(m->state > 0)
m->state = KMM_MODULE_STATE_EXIT;
- p_exit_module =
- (exit_module_t) GetProcAddress(m->h_module,
+ p_exit_module =
+ (exit_module_t) GetProcAddress(m->h_module,
EXP_EXIT_MODULE);
if(p_exit_module) {
LeaveCriticalSection(&cs_kmm);
diff --git a/src/windows/identity/kmm/kmminternal.h b/src/windows/identity/kmm/kmminternal.h
index 96f8ac24aa..c4109495e3 100644
--- a/src/windows/identity/kmm/kmminternal.h
+++ b/src/windows/identity/kmm/kmminternal.h
@@ -123,7 +123,7 @@ typedef struct kmm_plugin_i_t {
khm_int32 state;
khm_int32 flags;
-
+
int refcount;
int n_depends;
@@ -193,9 +193,9 @@ extern kconf_schema schema_kmmconfig[];
/* Registrar */
-khm_boolean KHMAPI
-kmmint_reg_cb(khm_int32 msg_type,
- khm_int32 msg_sub_type,
+khm_boolean KHMAPI
+kmmint_reg_cb(khm_int32 msg_type,
+ khm_int32 msg_sub_type,
khm_ui_4 uparam,
void *vparam);
@@ -209,35 +209,35 @@ void kmmint_init_module(kmm_module_i * m);
void kmmint_exit_module(kmm_module_i * m);
/* Modules */
-kmm_module_i *
+kmm_module_i *
kmmint_get_module_i(wchar_t * name);
-kmm_module_i *
+kmm_module_i *
kmmint_find_module_i(wchar_t * name);
-void
+void
kmmint_free_module(kmm_module_i * m);
khm_int32
kmmint_read_module_info(kmm_module_i * m);
/* Plugins */
-kmm_plugin_i *
+kmm_plugin_i *
kmmint_get_plugin_i(wchar_t * name);
-kmm_plugin_i *
+kmm_plugin_i *
kmmint_find_plugin_i(wchar_t * name);
-void
+void
kmmint_free_plugin(kmm_plugin_i * pi);
-void
+void
kmmint_list_plugin(kmm_plugin_i * p);
-void
+void
kmmint_delist_plugin(kmm_plugin_i * p);
-khm_boolean
+khm_boolean
kmmint_load_locale_lib(kmm_module_i * m, kmm_module_locale * l);
#define KMM_CSNAME_ROOT L"PluginManager"
diff --git a/src/windows/identity/kmm/kmmmain.c b/src/windows/identity/kmm/kmmmain.c
index 49384ccdb7..598c10507b 100644
--- a/src/windows/identity/kmm/kmmmain.c
+++ b/src/windows/identity/kmm/kmmmain.c
@@ -57,10 +57,10 @@ KHMEXP void KHMAPI kmm_init(void)
tls_kmm = TlsAlloc();
hash_plugins = hash_new_hashtable(
- KMM_HASH_SIZE,
- hash_string,
- hash_string_comp,
- NULL,
+ KMM_HASH_SIZE,
+ hash_string,
+ hash_string_comp,
+ NULL,
NULL);
hash_modules = hash_new_hashtable(
@@ -148,7 +148,7 @@ void kmm_dll_exit(void)
evt_startup = NULL;
}
-void
+void
kmm_process_attach(HINSTANCE hinstDLL) {
kmm_hInstance = hinstDLL;
kmm_dll_init();
@@ -158,4 +158,3 @@ void
kmm_process_detach(void) {
kmm_dll_exit();
}
-
diff --git a/src/windows/identity/kmm/kplugin.h b/src/windows/identity/kmm/kplugin.h
index a5b7a088a9..00e3e06edd 100644
--- a/src/windows/identity/kmm/kplugin.h
+++ b/src/windows/identity/kmm/kplugin.h
@@ -34,7 +34,7 @@
@{*/
/*! \defgroup kplugin NetIDMgr Plugin Callbacks
-See the following related documentation pages for more information
+See the following related documentation pages for more information
about NetIDMgr plugins.
These are prototypes of functions that must be implemented by a NetIDMgr
diff --git a/src/windows/identity/kmq/consumer.c b/src/windows/identity/kmq/consumer.c
index dd21834c6b..87d24130f1 100644
--- a/src/windows/identity/kmq/consumer.c
+++ b/src/windows/identity/kmq/consumer.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2005 Massachusetts Institute of Technology
- *
+ *
* Copyright (c) 2007 Secure Endpoints Inc.
*
* Permission is hereby granted, free of charge, to any person
@@ -219,7 +219,7 @@ void kmqint_post(kmq_msg_subscription * s, kmq_message * m, khm_boolean try_send
the message queue. */
m->refcount++;
m->nSent++;
- rv = s->recipient.cb(m->type, m->subtype,
+ rv = s->recipient.cb(m->type, m->subtype,
m->uparam, m->vparam);
m->refcount--;
if(KHM_SUCCEEDED(rv))
@@ -254,8 +254,8 @@ void kmqint_post(kmq_msg_subscription * s, kmq_message * m, khm_boolean try_send
#ifdef _WIN32
else if(s->rcpt_type == KMQ_RCPTTYPE_HWND) {
- if(try_send &&
- GetCurrentThreadId() == GetWindowThreadProcessId(s->recipient.hwnd,
+ if(try_send &&
+ GetCurrentThreadId() == GetWindowThreadProcessId(s->recipient.hwnd,
NULL)) {
/* kmqint_post does not know whether there are any other
messages waiting to be posted at this point. Hence,
@@ -270,7 +270,7 @@ void kmqint_post(kmq_msg_subscription * s, kmq_message * m, khm_boolean try_send
/* the kmq_wm_begin()/kmq_wm_end() and kmq_wm_dispatch()
handlers decrement the reference count on the message
when they are done. */
- SendMessage(s->recipient.hwnd, KMQ_WM_DISPATCH,
+ SendMessage(s->recipient.hwnd, KMQ_WM_DISPATCH,
m->type, (LPARAM) m);
m->nSent++;
@@ -282,7 +282,7 @@ void kmqint_post(kmq_msg_subscription * s, kmq_message * m, khm_boolean try_send
/* the kmq_wm_begin()/kmq_wm_end() and kmq_wm_dispatch()
handlers decrement the reference count on the message
when they are done. */
- PostMessage(s->recipient.hwnd, KMQ_WM_DISPATCH,
+ PostMessage(s->recipient.hwnd, KMQ_WM_DISPATCH,
m->type, (LPARAM) m);
}
}
@@ -360,7 +360,7 @@ KHMEXP khm_int32 KHMAPI kmq_create_hwnd_subscription(HWND hw,
/*! \internal
\note Obtains ::cs_kmq_global
*/
-KHMEXP khm_int32 KHMAPI kmq_create_subscription(kmq_callback_t cb,
+KHMEXP khm_int32 KHMAPI kmq_create_subscription(kmq_callback_t cb,
khm_handle * result)
{
kmq_msg_subscription * s;
@@ -498,7 +498,7 @@ KHMEXP khm_boolean KHMAPI kmq_is_call_aborted(void) {
/*! \internal
- \note Obtains ::cs_kmq_global, kmq_queue::cs, ::cs_kmq_msg_ref, ::cs_kmq_msg,
+ \note Obtains ::cs_kmq_global, kmq_queue::cs, ::cs_kmq_msg_ref, ::cs_kmq_msg,
*/
KHMEXP khm_int32 KHMAPI kmq_dispatch(kmq_timer timeout) {
kmq_queue * q;
diff --git a/src/windows/identity/kmq/init.c b/src/windows/identity/kmq/init.c
index 1c2023fc87..f73fd01a5a 100644
--- a/src/windows/identity/kmq/init.c
+++ b/src/windows/identity/kmq/init.c
@@ -158,7 +158,7 @@ void kmqint_detach_this_thread(void) {
q->wait_o = NULL;
q->flags &= ~KMQ_QUEUE_FLAG_DETACHING;
-
+
LeaveCriticalSection(&q->cs);
/* For now, we don't free the queue. */
@@ -190,7 +190,7 @@ DWORD WINAPI kmqint_completion_thread_proc(LPVOID p) {
EnterCriticalSection(&cs_compl);
do {
-
+
if (QTOP(&kmq_completion_xfer) == NULL) {
LeaveCriticalSection(&cs_compl);
WaitForSingleObject(compl_wx, INFINITE);
diff --git a/src/windows/identity/kmq/kmq.h b/src/windows/identity/kmq/kmq.h
index db6d5b2622..046ec0d719 100644
--- a/src/windows/identity/kmq/kmq.h
+++ b/src/windows/identity/kmq/kmq.h
@@ -29,7 +29,7 @@
#ifndef __KHIMAIRA_KMQ_H__
#define __KHIMAIRA_KMQ_H__
-/*! \defgroup kmq NetIDMgr Message Queue
+/*! \defgroup kmq NetIDMgr Message Queue
The Network Identity Manager Message Queue handles all the
messaging within the application and all loaded plug-ins.
@@ -67,9 +67,9 @@ typedef DWORD kmq_timer;
Should return TRUE if the message is properly handled. Otherwise
return FALSE */
-typedef khm_int32 (KHMAPI *kmq_callback_t)(khm_int32 msg_type,
- khm_int32 msg_sub_type,
- khm_ui_4 uparam,
+typedef khm_int32 (KHMAPI *kmq_callback_t)(khm_int32 msg_type,
+ khm_int32 msg_sub_type,
+ khm_ui_4 uparam,
void * vparam);
/* message */
@@ -97,7 +97,7 @@ typedef struct tag_kmq_message {
khm_ui_4 uparam; /*!< Integer parameter */
void * vparam; /*!< Pointer to parameter blob */
-
+
khm_int32 nSent; /*!< Number of instances of message
sent (for broadcast messages) */
@@ -393,7 +393,7 @@ KHMEXP khm_int32 KHMAPI kmq_unsubscribe_hwnd(khm_int32 type, HWND hwnd);
kmq_delete_subscription()
*/
KHMEXP khm_int32 KHMAPI kmq_create_subscription(
- kmq_callback_t cb,
+ kmq_callback_t cb,
khm_handle * result);
/*! \brief Create an ad-hoc subscription for a window
@@ -422,20 +422,20 @@ KHMEXP khm_int32 KHMAPI kmq_delete_subscription(khm_handle sub);
specified subscription.
*/
KHMEXP khm_int32 KHMAPI kmq_post_sub_msg(
- khm_handle sub,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_handle sub,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam);
/*! \brief Post a message to a subscription and acquire a handle to the call
*/
KHMEXP khm_int32 KHMAPI kmq_post_sub_msg_ex(
- khm_handle sub,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
- void * vparam,
+ khm_handle sub,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
+ void * vparam,
kmq_call * call);
/*! \brief Send a synchronous message to a subscription
@@ -444,10 +444,10 @@ KHMEXP khm_int32 KHMAPI kmq_post_sub_msg_ex(
\retval KHM_ERROR_PARTIAL The call succeeded, but at least one subscriber reported errors
*/
KHMEXP khm_int32 KHMAPI kmq_send_sub_msg(
- khm_handle sub,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_handle sub,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam);
/*! \brief Post a message to a group of subscriptions
@@ -458,11 +458,11 @@ KHMEXP khm_int32 KHMAPI kmq_send_sub_msg(
be dispatched to all of the subscription points in the array.
*/
KHMEXP khm_int32 KHMAPI kmq_post_subs_msg(
- khm_handle * subs,
- khm_size n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_handle * subs,
+ khm_size n_subs,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam);
/*! \brief Post a message to a group of subscriptions and acquire a handle to the call
@@ -477,12 +477,12 @@ KHMEXP khm_int32 KHMAPI kmq_post_subs_msg(
were made.
*/
KHMEXP khm_int32 KHMAPI kmq_post_subs_msg_ex(
- khm_handle * subs,
- khm_int32 n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
- void * vparam,
+ khm_handle * subs,
+ khm_int32 n_subs,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
+ void * vparam,
kmq_call * call);
/*! \brief Send a synchronous message to a group of subscriptions
@@ -497,11 +497,11 @@ KHMEXP khm_int32 KHMAPI kmq_post_subs_msg_ex(
\retval KHM_ERROR_PARTIAL The call succeeded, but at least one subscriber reported errors
*/
KHMEXP khm_int32 KHMAPI kmq_send_subs_msg(
- khm_handle *subs,
+ khm_handle *subs,
khm_int32 n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam);
/*! \brief Dispatch a message for the current thread.
@@ -530,7 +530,7 @@ KHMEXP khm_int32 KHMAPI kmq_dispatch(kmq_timer timeout);
The specified message will be posted to all the subscribers of the
message type. Then the function will wait for all the subscribers
to finish processing the message before returning.
-
+
\param[in] type The type of the message
\param[in] subtype The subtype
\param[in] uparam The khm_ui_4 parameter for the message
@@ -544,16 +544,16 @@ KHMEXP khm_int32 KHMAPI kmq_dispatch(kmq_timer timeout);
\retval KHM_ERROR_PARTIAL The call succeeded but at least one subscriber returned an error
*/
KHMEXP khm_int32 KHMAPI kmq_send_message(
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * blob);
/*! \brief Post a message
The specified message will be posted to all the subscribers of the
message type. The function returns immediately.
-
+
If you want to be able to wait for all the subscribers to finish
processing the message, you should use kmq_post_message_ex()
instead.
@@ -564,9 +564,9 @@ KHMEXP khm_int32 KHMAPI kmq_send_message(
\param[in] blob The parameter blob for the message
*/
KHMEXP khm_int32 KHMAPI kmq_post_message(
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * blob);
/*! \brief Post a message and acquire a handle to the call.
@@ -586,10 +586,10 @@ KHMEXP khm_int32 KHMAPI kmq_post_message(
\see kmq_free_call()
*/
KHMEXP khm_int32 KHMAPI kmq_post_message_ex(
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
- void * blob,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
+ void * blob,
kmq_call * call);
/*! \brief Free a handle to a call obtained through kmq_post_message_ex()
@@ -611,7 +611,7 @@ KHMEXP khm_int32 KHMAPI kmq_free_call(kmq_call call);
\a thread parameter.
*/
KHMEXP khm_int32 KHMAPI kmq_send_thread_quit_message(
- kmq_thread_id thread,
+ kmq_thread_id thread,
khm_ui_4 uparam);
/*! \brief Post a <KMSG_SYSTEM,KMSG_SYSTEM_EXIT> message to the specified thread.
@@ -622,8 +622,8 @@ KHMEXP khm_int32 KHMAPI kmq_send_thread_quit_message(
kmq_post_thread_quit_message() will return immediately.
*/
KHMEXP khm_int32 KHMAPI kmq_post_thread_quit_message(
- kmq_thread_id thread,
- khm_ui_4 uparam,
+ kmq_thread_id thread,
+ khm_ui_4 uparam,
kmq_call * call);
KHMEXP khm_int32 KHMAPI kmq_get_next_response(kmq_call call, void ** resp);
@@ -706,7 +706,7 @@ KHMEXP khm_boolean KHMAPI kmq_is_call_aborted(void);
handler.
*/
KHMEXP khm_int32 KHMAPI kmq_set_completion_handler(
- khm_int32 type,
+ khm_int32 type,
kmq_msg_completion_handler hander);
/*@}*/
diff --git a/src/windows/identity/kmq/kmqinternal.h b/src/windows/identity/kmq/kmqinternal.h
index 8ae0ab67e1..fe42e5c65c 100644
--- a/src/windows/identity/kmq/kmqinternal.h
+++ b/src/windows/identity/kmq/kmqinternal.h
@@ -212,10 +212,10 @@ void kmqint_attach_this_thread(void);
void kmqint_detach_this_thread(void);
khm_int32 kmqint_post_message_ex(
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
- void * blob,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
+ void * blob,
kmq_call * call,
khm_boolean try_send);
diff --git a/src/windows/identity/kmq/msgtype.c b/src/windows/identity/kmq/msgtype.c
index b5b23e9201..3a529a07bd 100644
--- a/src/windows/identity/kmq/msgtype.c
+++ b/src/windows/identity/kmq/msgtype.c
@@ -132,7 +132,7 @@ void kmqint_msg_type_create(int t) {
LeaveCriticalSection(&cs_kmq_types);
}
-KHMEXP khm_int32 KHMAPI kmq_register_type(wchar_t * name,
+KHMEXP khm_int32 KHMAPI kmq_register_type(wchar_t * name,
khm_int32 * new_id)
{
int i;
@@ -154,7 +154,7 @@ KHMEXP khm_int32 KHMAPI kmq_register_type(wchar_t * name,
/* continue searching since we might find that this type
is already registered. */
} else {
- if(msg_types[i]->name != NULL &&
+ if(msg_types[i]->name != NULL &&
!wcscmp(msg_types[i]->name, name)) {
registered = TRUE;
@@ -318,8 +318,8 @@ kmq_msg_subscription * kmqint_msg_type_del_sub_cb(khm_int32 t, kmq_callback_t cb
s = msg_types[t]->subs;
while(s) {
kmq_msg_subscription * n = LNEXT(s);
- if(s->rcpt_type == KMQ_RCPTTYPE_CB &&
- s->recipient.cb == cb &&
+ if(s->rcpt_type == KMQ_RCPTTYPE_CB &&
+ s->recipient.cb == cb &&
s->queue == q) {
/*TODO: do more here? */
LDELETE(&msg_types[t]->subs, s);
diff --git a/src/windows/identity/kmq/publisher.c b/src/windows/identity/kmq/publisher.c
index 7542888118..5876f00c60 100644
--- a/src/windows/identity/kmq/publisher.c
+++ b/src/windows/identity/kmq/publisher.c
@@ -95,7 +95,7 @@ kmqint_dump_publisher(FILE * f) {
/*! \internal
\brief Get a message object
\note called with ::cs_kmq_msg held */
-kmq_message *
+kmq_message *
kmqint_get_message(void) {
kmq_message * m;
@@ -115,7 +115,7 @@ kmqint_get_message(void) {
\brief Frees a message object
\note called with ::cs_kmq_msg held
*/
-void
+void
kmqint_put_message(kmq_message *m) {
int queued;
/* we can only free a message if the refcount is zero.
@@ -144,8 +144,8 @@ kmqint_put_message(kmq_message *m) {
/*! \internal
\note Obtains ::cs_kmq_msg, ::cs_kmq_types, ::cs_kmq_msg_ref, kmq_queue::cs
*/
-KHMEXP khm_int32 KHMAPI
-kmq_send_message(khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_send_message(khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * blob) {
kmq_call c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -166,8 +166,8 @@ kmq_send_message(khm_int32 type, khm_int32 subtype,
/*! \internal
\note Obtains ::cs_kmq_msg, ::cs_kmq_types, ::cs_kmq_msg_ref, kmq_queue::cs
*/
-KHMEXP khm_int32 KHMAPI
-kmq_post_message(khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_post_message(khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * blob) {
return kmqint_post_message_ex(type, subtype, uparam, blob, NULL, FALSE);
}
@@ -176,7 +176,7 @@ kmq_post_message(khm_int32 type, khm_int32 subtype,
\brief Frees a call
\note Obtains ::cs_kmq_msg
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmq_free_call(kmq_call call) {
kmq_message * m;
@@ -193,11 +193,11 @@ kmq_free_call(kmq_call call) {
}
/*! \internal
- \note Obtains ::cs_kmq_msg, ::cs_kmq_types, ::cs_kmq_msg_ref, kmq_queue::cs
+ \note Obtains ::cs_kmq_msg, ::cs_kmq_types, ::cs_kmq_msg_ref, kmq_queue::cs
*/
-khm_int32
-kmqint_post_message_ex(khm_int32 type, khm_int32 subtype, khm_ui_4 uparam,
- void * blob, kmq_call * call, khm_boolean try_send)
+khm_int32
+kmqint_post_message_ex(khm_int32 type, khm_int32 subtype, khm_ui_4 uparam,
+ void * blob, kmq_call * call, khm_boolean try_send)
{
kmq_message * m;
kherr_context * ctx;
@@ -236,8 +236,8 @@ kmqint_post_message_ex(khm_int32 type, khm_int32 subtype, khm_ui_4 uparam,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kmq_post_message_ex(khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_post_message_ex(khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * blob, kmq_call * call)
{
return kmqint_post_message_ex(type, subtype, uparam, blob, call, FALSE);
@@ -252,8 +252,8 @@ kmq_abort_call(kmq_call call)
/*! \internal
*/
-KHMEXP khm_int32 KHMAPI
-kmq_post_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_post_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * vparam)
{
return kmq_post_sub_msg_ex(sub, type, subtype, uparam, vparam, NULL);
@@ -261,9 +261,9 @@ kmq_post_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
/*! \internal
*/
-khm_int32
-kmqint_post_sub_msg_ex(khm_handle sub, khm_int32 type, khm_int32 subtype,
- khm_ui_4 uparam, void * vparam,
+khm_int32
+kmqint_post_sub_msg_ex(khm_handle sub, khm_int32 type, khm_int32 subtype,
+ khm_ui_4 uparam, void * vparam,
kmq_call * call, khm_boolean try_send)
{
kmq_message * m;
@@ -313,17 +313,17 @@ kmqint_post_sub_msg_ex(khm_handle sub, khm_int32 type, khm_int32 subtype,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kmq_post_sub_msg_ex(khm_handle sub, khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_post_sub_msg_ex(khm_handle sub, khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * vparam, kmq_call * call)
{
- return kmqint_post_sub_msg_ex(sub, type, subtype,
+ return kmqint_post_sub_msg_ex(sub, type, subtype,
uparam, vparam, call, FALSE);
}
-khm_int32
-kmqint_post_subs_msg_ex(khm_handle * subs, khm_size n_subs, khm_int32 type,
- khm_int32 subtype, khm_ui_4 uparam, void * vparam,
+khm_int32
+kmqint_post_subs_msg_ex(khm_handle * subs, khm_size n_subs, khm_int32 type,
+ khm_int32 subtype, khm_ui_4 uparam, void * vparam,
kmq_call * call, khm_boolean try_send)
{
kmq_message * m;
@@ -379,12 +379,12 @@ kmqint_post_subs_msg_ex(khm_handle * subs, khm_size n_subs, khm_int32 type,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-kmq_post_subs_msg(khm_handle * subs,
- khm_size n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+KHMEXP khm_int32 KHMAPI
+kmq_post_subs_msg(khm_handle * subs,
+ khm_size n_subs,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam)
{
return kmqint_post_subs_msg_ex(subs,
@@ -397,25 +397,25 @@ kmq_post_subs_msg(khm_handle * subs,
FALSE);
}
-KHMEXP khm_int32 KHMAPI
-kmq_post_subs_msg_ex(khm_handle * subs,
- khm_int32 n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
- void * vparam,
+KHMEXP khm_int32 KHMAPI
+kmq_post_subs_msg_ex(khm_handle * subs,
+ khm_int32 n_subs,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
+ void * vparam,
kmq_call * call)
{
- return kmqint_post_subs_msg_ex(subs, n_subs, type, subtype,
+ return kmqint_post_subs_msg_ex(subs, n_subs, type, subtype,
uparam, vparam, call, FALSE);
}
-KHMEXP khm_int32 KHMAPI
-kmq_send_subs_msg(khm_handle *subs,
+KHMEXP khm_int32 KHMAPI
+kmq_send_subs_msg(khm_handle *subs,
khm_int32 n_subs,
- khm_int32 type,
- khm_int32 subtype,
- khm_ui_4 uparam,
+ khm_int32 type,
+ khm_int32 subtype,
+ khm_ui_4 uparam,
void * vparam)
{
kmq_call c;
@@ -437,8 +437,8 @@ kmq_send_subs_msg(khm_handle *subs,
/*! \internal
*/
-KHMEXP khm_int32 KHMAPI
-kmq_send_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
+KHMEXP khm_int32 KHMAPI
+kmq_send_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
khm_ui_4 uparam, void * vparam)
{
kmq_call c;
@@ -460,7 +460,7 @@ kmq_send_sub_msg(khm_handle sub, khm_int32 type, khm_int32 subtype,
/*! \internal
\note Obtains ::cs_kmq_global, ::cs_kmq_msg, ::cs_kmq_msg_ref, kmq_queue::cs
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmq_send_thread_quit_message(kmq_thread_id thread, khm_ui_4 uparam) {
kmq_call c;
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -478,9 +478,9 @@ kmq_send_thread_quit_message(kmq_thread_id thread, khm_ui_4 uparam) {
/*! \internal
\note Obtains ::cs_kmq_global, ::cs_kmq_msg, ::cs_kmq_msg_ref, kmq_queue::cs
- */
-KHMEXP khm_int32 KHMAPI
-kmq_post_thread_quit_message(kmq_thread_id thread,
+ */
+KHMEXP khm_int32 KHMAPI
+kmq_post_thread_quit_message(kmq_thread_id thread,
khm_ui_4 uparam, kmq_call * call) {
kmq_message * m;
kmq_queue * q;
@@ -521,13 +521,13 @@ kmq_post_thread_quit_message(kmq_thread_id thread,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmq_get_next_response(kmq_call call, void ** resp) {
/* TODO: Implement this */
return 0;
}
-KHMEXP khm_boolean KHMAPI
+KHMEXP khm_boolean KHMAPI
kmq_has_completed(kmq_call call) {
khm_boolean completed;
@@ -538,7 +538,7 @@ kmq_has_completed(kmq_call call) {
return completed;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
kmq_wait(kmq_call call, kmq_timer timeout) {
kmq_message * m = call;
DWORD rv;
@@ -557,11 +557,8 @@ kmq_wait(kmq_call call, kmq_timer timeout) {
/*! \internal
\note Obtains ::cs_kmq_types
*/
-KHMEXP khm_int32 KHMAPI
-kmq_set_completion_handler(khm_int32 type,
+KHMEXP khm_int32 KHMAPI
+kmq_set_completion_handler(khm_int32 type,
kmq_msg_completion_handler handler) {
return kmqint_msg_type_set_handler(type, handler);
}
-
-
-
diff --git a/src/windows/identity/nidmgrdll/dllmain.c b/src/windows/identity/nidmgrdll/dllmain.c
index 696911df4d..647a23f341 100644
--- a/src/windows/identity/nidmgrdll/dllmain.c
+++ b/src/windows/identity/nidmgrdll/dllmain.c
@@ -63,7 +63,7 @@ kcdb_process_attach(HINSTANCE);
void
kcdb_process_detach(void);
-void
+void
kmm_process_attach(HINSTANCE);
void
diff --git a/src/windows/identity/plugins/common/dynimport.c b/src/windows/identity/plugins/common/dynimport.c
index 99a93dd256..bb1bb0412d 100644
--- a/src/windows/identity/plugins/common/dynimport.c
+++ b/src/windows/identity/plugins/common/dynimport.c
@@ -36,8 +36,8 @@ HINSTANCE hSecur32 = 0;
HINSTANCE hComErr = 0;
HINSTANCE hService = 0;
HINSTANCE hProfile = 0;
-HINSTANCE hPsapi = 0;
-HINSTANCE hToolHelp32 = 0;
+HINSTANCE hPsapi = 0;
+HINSTANCE hToolHelp32 = 0;
HINSTANCE hCCAPI = 0;
DWORD AfsAvailable = 0;
@@ -158,9 +158,9 @@ DECL_FUNC_PTR(com_err);
DECL_FUNC_PTR(error_message);
// Profile functions
-DECL_FUNC_PTR(profile_init);
+DECL_FUNC_PTR(profile_init);
DECL_FUNC_PTR(profile_flush);
-DECL_FUNC_PTR(profile_release);
+DECL_FUNC_PTR(profile_release);
DECL_FUNC_PTR(profile_get_subsection_names);
DECL_FUNC_PTR(profile_free_list);
DECL_FUNC_PTR(profile_get_string);
@@ -311,7 +311,7 @@ FUNC_INFO k524_fi[] = {
FUNC_INFO profile_fi[] = {
MAKE_FUNC_INFO(profile_init),
MAKE_FUNC_INFO(profile_flush),
- MAKE_FUNC_INFO(profile_release),
+ MAKE_FUNC_INFO(profile_release),
MAKE_FUNC_INFO(profile_get_subsection_names),
MAKE_FUNC_INFO(profile_free_list),
MAKE_FUNC_INFO(profile_get_string),
@@ -428,7 +428,7 @@ khm_int32 init_imports(void) {
CKRV(TOOLHELPDLL);
hPsapi = 0;
- }
+ }
else if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
// Windows NT
diff --git a/src/windows/identity/plugins/common/krb5common.c b/src/windows/identity/plugins/common/krb5common.c
index 36d647cc77..f3a5e988e1 100644
--- a/src/windows/identity/plugins/common/krb5common.c
+++ b/src/windows/identity/plugins/common/krb5common.c
@@ -36,9 +36,9 @@
/**************************************/
/* khm_krb5_error(): */
/**************************************/
-int
-khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
- int FreeContextFlag, krb5_context * ctx,
+int
+khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
+ int FreeContextFlag, krb5_context * ctx,
krb5_ccache * cache)
{
#ifdef NO_KRB5
@@ -48,17 +48,17 @@ khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
#ifdef SHOW_MESSAGE_IN_AN_ANNOYING_WAY
char message[256];
const char *errText;
- int krb5Error = ((int)(rc & 255));
+ int krb5Error = ((int)(rc & 255));
- errText = perror_message(rc);
- _snprintf(message, sizeof(message),
- "%s\n(Kerberos error %ld)\n\n%s failed",
- errText,
- krb5Error,
+ errText = perror_message(rc);
+ _snprintf(message, sizeof(message),
+ "%s\n(Kerberos error %ld)\n\n%s failed",
+ errText,
+ krb5Error,
FailedFunctionName);
- MessageBoxA(NULL, message, "Kerberos Five", MB_OK | MB_ICONERROR |
- MB_TASKMODAL |
+ MessageBoxA(NULL, message, "Kerberos Five", MB_OK | MB_ICONERROR |
+ MB_TASKMODAL |
MB_SETFOREGROUND);
#endif
@@ -81,9 +81,9 @@ khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
#endif //!NO_KRB5
}
-int
-khm_krb5_initialize(khm_handle ident,
- krb5_context *ctx,
+int
+khm_krb5_initialize(khm_handle ident,
+ krb5_context *ctx,
krb5_ccache *cache)
{
#ifdef NO_KRB5
@@ -161,7 +161,7 @@ khm_krb5_initialize(khm_handle ident,
if ((rc = (*pkrb5_cc_set_flags)(*ctx, *cache, flags)))
{
if (rc != KRB5_FCC_NOFILE && rc != KRB5_CC_NOTFOUND)
- khm_krb5_error(rc, "krb5_cc_set_flags()", 0, ctx,
+ khm_krb5_error(rc, "krb5_cc_set_flags()", 0, ctx,
cache);
else if ((rc == KRB5_FCC_NOFILE || rc == KRB5_CC_NOTFOUND) && *ctx != NULL) {
if (*cache != NULL) {
@@ -181,8 +181,8 @@ on_error:
#define TIMET_TOLERANCE (60*5)
khm_int32 KHMAPI
-khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
- khm_handle ident,
+khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
+ khm_handle ident,
krb5_timestamp * pexpiration)
{
krb5_principal principal = 0;
@@ -238,20 +238,20 @@ khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
krb5_data * c1 = krb5_princ_component(ctx, creds.server, 1);
krb5_data * r = krb5_princ_realm(ctx, creds.server);
- if ( c0 && c1 && r && c1->length == r->length &&
+ if ( c0 && c1 && r && c1->length == r->length &&
!strncmp(c1->data,r->data,r->length) &&
!strncmp("krbtgt",c0->data,c0->length) ) {
/* we have a TGT, check for the expiration time.
- * if it is valid and renewable, use the renew time
+ * if it is valid and renewable, use the renew time
*/
if (!(creds.ticket_flags & TKT_FLG_INVALID) &&
- creds.times.starttime < (now + TIMET_TOLERANCE) &&
+ creds.times.starttime < (now + TIMET_TOLERANCE) &&
(creds.times.endtime + TIMET_TOLERANCE) > now) {
expiration = creds.times.endtime;
- if ((creds.ticket_flags & TKT_FLG_RENEWABLE) &&
+ if ((creds.ticket_flags & TKT_FLG_RENEWABLE) &&
(creds.times.renew_till > creds.times.endtime)) {
expiration = creds.times.renew_till;
}
@@ -304,7 +304,7 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
code = pcc_get_NC_info(cc_ctx, &pNCi);
- if (code)
+ if (code)
goto _exit;
for(i=0; pNCi[i]; i++) {
@@ -316,22 +316,22 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
continue;
/* need a function to check the cache for the identity
- * and determine if it has valid tickets. If it has
- * the right identity and valid tickets, store the
+ * and determine if it has valid tickets. If it has
+ * the right identity and valid tickets, store the
* expiration time and the cache name. If it has the
* right identity but no valid tickets, store the ccache
* name and an expiration time of zero. if it does not
* have the right identity don't save the name.
- *
+ *
* Keep searching to find the best cache available.
*/
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
- StringCbCopyA(best_match_ccname,
+ StringCbCopyA(best_match_ccname,
sizeof(best_match_ccname),
"API:");
StringCbCatA(best_match_ccname,
@@ -364,8 +364,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
KHM_SUCCEEDED(khc_read_int32(csp_params, L"MsLsaList", &t)) && t) {
code = (*pkrb5_cc_resolve)(ctx, "MSLSA:", &cache);
if (code == 0 && cache) {
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
@@ -405,8 +405,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
if (code)
continue;
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
@@ -435,8 +435,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
(*pcc_shutdown)(&cc_ctx);
if (best_match_ccname[0]) {
-
- if (*pcbbuf = AnsiStrToUnicode((wchar_t *)buffer,
+
+ if (*pcbbuf = AnsiStrToUnicode((wchar_t *)buffer,
*pcbbuf,
best_match_ccname)) {
diff --git a/src/windows/identity/plugins/common/krb5common.h b/src/windows/identity/plugins/common/krb5common.h
index 29cae71ee9..b01e0d5cec 100644
--- a/src/windows/identity/plugins/common/krb5common.h
+++ b/src/windows/identity/plugins/common/krb5common.h
@@ -32,7 +32,7 @@
#include<krb5.h>
#ifndef NO_KRB5
-int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
+int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
int FreeContextFlag, krb5_context *ctx,
krb5_ccache *cache);
@@ -48,8 +48,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
void * buffer, khm_size * pcbbuf);
khm_int32 KHMAPI
-khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
- khm_handle ident,
+khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
+ khm_handle ident,
krb5_timestamp * pexpiration);
#endif /* NO_KRB5 */
diff --git a/src/windows/identity/plugins/krb4/errorfuncs.c b/src/windows/identity/plugins/krb4/errorfuncs.c
index f436a40a7e..3441316e54 100644
--- a/src/windows/identity/plugins/krb4/errorfuncs.c
+++ b/src/windows/identity/plugins/krb4/errorfuncs.c
@@ -156,7 +156,7 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
case GT_PW_NULLTKT: /* 55 Null tkt returned by KDC */
/* no error msg yet */
break;
-
+
/* Values returned by send_to_kdc */
case SKDC_RETRY : /* 56 Retry count exceeded */
case SKDC_CANT : /* 57 Can't send request */
@@ -187,9 +187,9 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
* message box is too small for VGA screens.
* It does work well if we only have to support 1024x768
*/
-
+
com_err_msg = "You have entered an insecure or weak password.";
-
+
default:
/* no extra error msg */
break;
@@ -216,11 +216,10 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
#endif
")", etype, offset
//")\nPress F1 for help on this error.", etype, offset
-#ifdef DEBUG_COM_ERR
+#ifdef DEBUG_COM_ERR
, code
#endif
);
-
+
return (LPSTR)buf;
}
-
diff --git a/src/windows/identity/plugins/krb4/errorfuncs.h b/src/windows/identity/plugins/krb4/errorfuncs.h
index d760c62595..0d4d75f1e7 100644
--- a/src/windows/identity/plugins/krb4/errorfuncs.h
+++ b/src/windows/identity/plugins/krb4/errorfuncs.h
@@ -35,7 +35,7 @@
/*
* This is a hack needed because the real com_err.h does
* not define err_func. We need it in the case where
- * we pull in the real com_err instead of the krb4
+ * we pull in the real com_err instead of the krb4
* impostor.
*/
#ifndef _DCNS_MIT_COM_ERR_H
diff --git a/src/windows/identity/plugins/krb4/krb4configdlg.c b/src/windows/identity/plugins/krb4/krb4configdlg.c
index c2ab3f5622..f13f9ad9e4 100644
--- a/src/windows/identity/plugins/krb4/krb4configdlg.c
+++ b/src/windows/identity/plugins/krb4/krb4configdlg.c
@@ -259,7 +259,7 @@ k4_id_write_params(HWND hwnd, k4_id_data * d) {
if (csp_ident)
khc_close_space(csp_ident);
-
+
if (csp_idk4)
khc_close_space(csp_idk4);
@@ -409,7 +409,7 @@ krb4_confg_proc(HWND hwnd,
in_init = TRUE;
- // Set KRB.CON
+ // Set KRB.CON
memset(krb_path, '\0', sizeof(krb_path));
if (!pkrb_get_krbconf2(krb_path, &krb_path_sz)) {
// Error has happened
@@ -419,9 +419,9 @@ krb4_confg_proc(HWND hwnd,
StringCbCopyA(d->krb_path, sizeof(d->krb_path), krb_path);
}
- // Set KRBREALM.CON
+ // Set KRBREALM.CON
memset(krbrealm_path, '\0', sizeof(krbrealm_path));
- if (!pkrb_get_krbrealm2(krbrealm_path, &krbrealm_path_sz)) {
+ if (!pkrb_get_krbrealm2(krbrealm_path, &krbrealm_path_sz)) {
// Error has happened
} else {
AnsiStrToUnicode(wbuf, sizeof(wbuf), krbrealm_path);
@@ -442,13 +442,13 @@ krb4_confg_proc(HWND hwnd,
// Set TICKET.KRB file Editbox
*ticketName = 0;
pkrb_set_tkt_string(0);
-
- pticketName = ptkt_string();
+
+ pticketName = ptkt_string();
if (pticketName)
StringCbCopyA(ticketName, sizeof(ticketName), pticketName);
}
-
+
if (!*ticketName) {
// error
} else {
diff --git a/src/windows/identity/plugins/krb4/krb4funcs.c b/src/windows/identity/plugins/krb4/krb4funcs.c
index e5287ca9f9..33a94996e1 100644
--- a/src/windows/identity/plugins/krb4/krb4funcs.c
+++ b/src/windows/identity/plugins/krb4/krb4funcs.c
@@ -44,7 +44,7 @@ int com_addr(void)
{
long ipAddr;
char loc_addr[ADDR_SZ];
- CREDENTIALS cred;
+ CREDENTIALS cred;
char service[40];
char instance[40];
// char addr[40];
@@ -71,11 +71,11 @@ int com_addr(void)
break;
} // while()
return 0;
-}
+}
-long
-khm_krb4_list_tickets(void)
+long
+khm_krb4_list_tickets(void)
{
char ptktname[MAX_PATH + 5];
char pname[ANAME_SZ];
@@ -103,15 +103,15 @@ khm_krb4_list_tickets(void)
goto collect;
com_addr();
-
+
// Open ticket file
if ((k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL)))
{
goto cleanup;
}
- // Close ticket file
+ // Close ticket file
(void) (*ptf_close)();
-
+
// We must find the realm of the ticket file here before calling
// tf_init because since the realm of the ticket file is not
// really stored in the principal section of the file, the
@@ -121,9 +121,9 @@ khm_krb4_list_tickets(void)
{
goto cleanup;
}
-
- // Open ticket file
- if (k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL))
+
+ // Open ticket file
+ if (k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL))
{
goto cleanup;
}
@@ -132,12 +132,12 @@ khm_krb4_list_tickets(void)
open = 1;
- // Get principal name and instance
- if ((k_errno = (*ptf_get_pname)(pname)) || (k_errno = (*ptf_get_pinst)(pinst)))
+ // Get principal name and instance
+ if ((k_errno = (*ptf_get_pname)(pname)) || (k_errno = (*ptf_get_pinst)(pinst)))
{
goto cleanup;
}
-
+
// You may think that this is the obvious place to get the
// realm of the ticket file, but it can't be done here as the
// routine to do this must open the ticket file. This is why
@@ -189,7 +189,7 @@ khm_krb4_list_tickets(void)
return(KSUCCESS);
if (open)
- (*ptf_close)(); //close ticket file
+ (*ptf_close)(); //close ticket file
if (k_errno == EOF)
k_errno = 0;
@@ -211,7 +211,7 @@ khm_krb4_list_tickets(void)
{
CHAR message[256];
CHAR errBuf[256];
- LPCSTR errText;
+ LPCSTR errText;
if (!Lerror_message)
return -1;
@@ -219,7 +219,7 @@ khm_krb4_list_tickets(void)
errText = err_describe(errBuf, KRBERR(k_errno));
sprintf(message, "%s\n\n%s failed", errText, functionName);
- MessageBox(NULL, message, "Kerberos Four",
+ MessageBox(NULL, message, "Kerberos Four",
MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND);
}
#endif
@@ -234,11 +234,11 @@ khm_krb4_list_tickets(void)
#define KRBREALM_FILE "KRBREALM.CON"
#define KRB5_FILE "KRB5.INI"
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
{
char **configFile = NULL;
- if (pkrb5_get_default_config_files(&configFile))
+ if (pkrb5_get_default_config_files(&configFile))
{
GetWindowsDirectoryA(confname,szConfname);
confname[szConfname-1] = '\0';
@@ -248,15 +248,15 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
return FALSE;
}
-
+
*confname = 0;
-
+
if (configFile)
{
StringCchCopyA(confname, szConfname, *configFile);
- pkrb5_free_config_files(configFile);
+ pkrb5_free_config_files(configFile);
}
-
+
if (!*confname)
{
GetWindowsDirectoryA(confname,szConfname);
@@ -265,7 +265,7 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
StringCchCatA(confname, szConfname, "\\");
StringCchCatA(confname, szConfname, KRB5_FILE);
}
-
+
return FALSE;
}
@@ -296,7 +296,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
}
StringCchCopyA(confname, szConfname, krbConFile);
- } else if (hKrb4) {
+ } else if (hKrb4) {
size_t size = szConfname;
memset(confname, '\0', szConfname);
if (!pkrb_get_krbconf2(confname, &size)) {
@@ -316,7 +316,7 @@ readstring(FILE * file, char * buf, int len)
int c,i;
memset(buf, '\0', sizeof(buf));
for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++)
- {
+ {
if (i < sizeof(buf)) {
if (c == '\n') {
buf[i] = '\0';
@@ -346,7 +346,7 @@ readstring(FILE * file, char * buf, int len)
/*! \internal
\brief Return a list of configured realms
- The string that is returned is a set of null terminated unicode strings,
+ The string that is returned is a set of null terminated unicode strings,
each of which denotes one realm. The set is terminated by a zero length
null terminated string.
@@ -354,7 +354,7 @@ readstring(FILE * file, char * buf, int len)
\return The string with the list of realms or NULL if the operation fails.
*/
-wchar_t * khm_krb5_get_realm_list(void)
+wchar_t * khm_krb5_get_realm_list(void)
{
wchar_t * rlist = NULL;
@@ -383,7 +383,7 @@ wchar_t * khm_krb5_get_realm_list(void)
{
/* first figure out how much space to allocate */
cbsize = 0;
- for (cpp = sections; *cpp; cpp++)
+ for (cpp = sections; *cpp; cpp++)
{
cbsize += sizeof(wchar_t) * (strlen(*cpp) + 1);
}
@@ -420,7 +420,7 @@ wchar_t * khm_krb5_get_realm_list(void)
size_t cbsize, t;
wchar_t * d;
- if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
+ if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
#if _MSC_VER >= 1400
!fopen_s(&file, krb_conf, "rt")
#else
@@ -492,7 +492,7 @@ wchar_t * khm_krb5_get_default_realm(void)
pkrb5_init_context(&ctx);
pkrb5_get_default_realm(ctx,&def);
-
+
if (def) {
cch = strlen(def) + 1;
realm = PMALLOC(sizeof(wchar_t) * cch);
@@ -570,7 +570,7 @@ khm_krb4_set_def_tkt_string(void) {
UnicodeStrToAnsi(tkt_string, sizeof(tkt_string),
wtkt_string);
- pkrb_set_tkt_string(tkt_string);
+ pkrb_set_tkt_string(tkt_string);
}
}
@@ -618,7 +618,7 @@ khm_krb4_changepwd(char * principal,
k_errno = make_temp_cache_v4("_chgpwd");
if (k_errno) return k_errno;
- k_errno = pkadm_change_your_password(principal, password, newpassword,
+ k_errno = pkadm_change_your_password(principal, password, newpassword,
error_str);
make_temp_cache_v4(0);
return k_errno;
@@ -674,7 +674,7 @@ khm_krb4_find_tgt(khm_handle credset, khm_handle identity) {
idname,
&cb)))
return NULL;
-
+
t = wcsrchr(idname, L'@');
if (t == NULL)
return NULL;
@@ -747,7 +747,7 @@ khm_convert524(khm_handle identity)
NULL))) {
goto cleanup;
}
-
+
increds.client = me;
increds.server = server;
increds.times.endtime = 0;
@@ -814,7 +814,7 @@ khm_convert524(khm_handle identity)
}
return (code || icode);
-#endif /* NO_KRB5 */
+#endif /* NO_KRB5 */
}
long
@@ -862,11 +862,11 @@ khm_krb4_kinit(char * aname,
khm_krb4_set_def_tkt_string();
- err_context = L"fetching ticket";
- rc4 = (*pkrb_get_pw_in_tkt)(aname, inst, realm, "krbtgt", realm,
+ err_context = L"fetching ticket";
+ rc4 = (*pkrb_get_pw_in_tkt)(aname, inst, realm, "krbtgt", realm,
lifetime, password);
- if (rc4) /* XXX: do we want: && (rc != NO_TKT_FIL) as well? */ {
+ if (rc4) /* XXX: do we want: && (rc != NO_TKT_FIL) as well? */ {
functionName = L"krb_get_pw_in_tkt()";
msg = IDS_ERR_PWINTKT;
goto cleanup;
diff --git a/src/windows/identity/plugins/krb4/krb4funcs.h b/src/windows/identity/plugins/krb4/krb4funcs.h
index 05ed3e75dc..1328b4136d 100644
--- a/src/windows/identity/plugins/krb4/krb4funcs.h
+++ b/src/windows/identity/plugins/krb4/krb4funcs.h
@@ -68,15 +68,15 @@ khm_krb4_kinit(char * aname,
char * inst,
char * realm,
long lifetime,
- char * password);
+ char * password);
-long
+long
khm_krb4_list_tickets(void);
int khm_krb4_kdestroy(void);
khm_handle
-khm_krb4_find_tgt(khm_handle credset,
+khm_krb4_find_tgt(khm_handle credset,
khm_handle identity);
LONG
diff --git a/src/windows/identity/plugins/krb4/krb4newcreds.c b/src/windows/identity/plugins/krb4/krb4newcreds.c
index 9c200b618d..bcc3bc745a 100644
--- a/src/windows/identity/plugins/krb4/krb4newcreds.c
+++ b/src/windows/identity/plugins/krb4/krb4newcreds.c
@@ -188,7 +188,7 @@ void k4_read_identity_data(k4_dlg_data * d) {
&csp_ident))) {
khc_open_space(csp_ident, CSNAME_KRB4CRED, 0, &csp_k4);
-
+
if (csp_k4) {
if (KHM_SUCCEEDED(khc_read_int32(csp_k4, L"Krb4NewCreds", &t)))
d->k4_enabled = !!t;
@@ -741,7 +741,7 @@ krb4_msg_newcred(khm_int32 msg_type, khm_int32 msg_subtype,
/* only supported for new credentials */
if (method == K4_METHOD_AUTO ||
method == K4_METHOD_PASSWORD) {
-
+
khm_size n_prompts = 0;
khm_size idx;
khm_size cb;
diff --git a/src/windows/identity/plugins/krb4/krb4plugin.c b/src/windows/identity/plugins/krb4/krb4plugin.c
index 9a50249f7a..168a0f8a7b 100644
--- a/src/windows/identity/plugins/krb4/krb4plugin.c
+++ b/src/windows/identity/plugins/krb4/krb4plugin.c
@@ -40,8 +40,8 @@ khm_boolean krb4_initialized = FALSE;
khm_handle krb4_credset = NULL;
/* Kerberos IV stuff */
-khm_int32 KHMAPI
-krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -65,7 +65,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
ct.id = KCDB_CREDTYPE_AUTO;
ct.name = KRB4_CREDTYPE_NAME;
- if(LoadString(hResModule, IDS_KRB4_SHORT_DESC,
+ if(LoadString(hResModule, IDS_KRB4_SHORT_DESC,
buf, ARRAYLENGTH(buf)))
{
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
@@ -77,7 +77,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
/* even though ideally we should be setting limits
based KCDB_MAXCB_LONG_DESC, our long description
actually fits nicely in KCDB_MAXCB_SHORT_DESC */
- if(LoadString(hResModule, IDS_KRB4_LONG_DESC,
+ if(LoadString(hResModule, IDS_KRB4_LONG_DESC,
buf, ARRAYLENGTH(buf)))
{
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
@@ -95,7 +95,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
rv = kcdb_credset_create(&krb4_credset);
if (KHM_SUCCEEDED(rv))
- rv = kcdb_credtype_get_id(KRB5_CREDTYPE_NAME,
+ rv = kcdb_credtype_get_id(KRB5_CREDTYPE_NAME,
&credtype_id_krb5);
if(ct.short_desc)
@@ -165,38 +165,38 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
}
/* Lookup common data types */
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ENCTYPE,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ENCTYPE,
&type_id_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ADDR_LIST,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ADDR_LIST,
&type_id_addr_list))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_FLAGS,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_FLAGS,
&type_id_krb5_flags))) {
rv = KHM_ERROR_UNKNOWN;
}
/* Lookup common attributes */
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KEY_ENCTYPE,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KEY_ENCTYPE,
&attr_id_key_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_TKT_ENCTYPE,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_TKT_ENCTYPE,
&attr_id_tkt_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_ADDR_LIST,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_ADDR_LIST,
&attr_id_addr_list))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KRB5_FLAGS,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KRB5_FLAGS,
&attr_id_krb5_flags))) {
rv = KHM_ERROR_UNKNOWN;
}
@@ -230,8 +230,8 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
return rv;
}
-khm_int32 KHMAPI
-krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -283,8 +283,8 @@ krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
return rv;
}
-khm_int32 KHMAPI
-krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
switch(msg_type) {
diff --git a/src/windows/identity/plugins/krb4/krbcred.h b/src/windows/identity/plugins/krb4/krbcred.h
index 0b6a148eeb..834d3f9a3d 100644
--- a/src/windows/identity/plugins/krb4/krbcred.h
+++ b/src/windows/identity/plugins/krb4/krbcred.h
@@ -106,8 +106,8 @@ extern khm_boolean krb4_initialized;
extern khm_handle krb4_credset;
/* plugin callbacks */
-khm_int32 KHMAPI
-krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam);
INT_PTR CALLBACK
diff --git a/src/windows/identity/plugins/krb4/langres.h b/src/windows/identity/plugins/krb4/langres.h
index 5c0e46f9aa..b4f911874d 100644
--- a/src/windows/identity/plugins/krb4/langres.h
+++ b/src/windows/identity/plugins/krb4/langres.h
@@ -38,7 +38,7 @@
#define IDC_CFG_GETTIX 1037
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 108
diff --git a/src/windows/identity/plugins/krb5/datarep.c b/src/windows/identity/plugins/krb5/datarep.c
index 5c292e4780..d0478a070c 100644
--- a/src/windows/identity/plugins/krb5/datarep.c
+++ b/src/windows/identity/plugins/krb5/datarep.c
@@ -33,7 +33,7 @@
#include<strsafe.h>
#include<assert.h>
-khm_int32 KHMAPI
+khm_int32 KHMAPI
enctype_toString(const void * data, khm_size cbdata,
wchar_t *destbuf, khm_size *pcbdestbuf,
khm_int32 flags)
@@ -214,10 +214,10 @@ addr_list_toString(const void *d, khm_size cb_d,
}
khm_int32 KHMAPI
-krb5flags_toString(const void *d,
- khm_size cb_d,
- wchar_t *buf,
- khm_size *pcb_buf,
+krb5flags_toString(const void *d,
+ khm_size cb_d,
+ wchar_t *buf,
+ khm_size *pcb_buf,
khm_int32 f)
{
wchar_t sbuf[32];
@@ -348,7 +348,7 @@ one_addr(k5_serial_address *a, wchar_t * buf, khm_size cbbuf)
#ifdef AF_INET6
|| (a->addrtype == ADDRTYPE_INET6 && a->length == 16)
#endif
- )
+ )
{
int af = AF_INET;
#ifdef AF_INET6
@@ -404,4 +404,3 @@ one_addr(k5_serial_address *a, wchar_t * buf, khm_size cbbuf)
_copy_string:
StringCbCopy(buf, cbbuf, retstr);
}
-
diff --git a/src/windows/identity/plugins/krb5/errorfuncs.c b/src/windows/identity/plugins/krb5/errorfuncs.c
index 4c2d78c630..d99c4bf6d2 100644
--- a/src/windows/identity/plugins/krb5/errorfuncs.c
+++ b/src/windows/identity/plugins/krb5/errorfuncs.c
@@ -54,7 +54,7 @@ HWND GetRootParent (HWND Child)
}
#endif
-void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
+void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
DWORD * suggestion,
kherr_suggestion * suggest_code)
{
@@ -163,7 +163,7 @@ void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
/* no error msg yet */
sugg_code = KHERR_SUGGEST_RETRY;
break;
-
+
/* Values returned by send_to_kdc */
case SKDC_RETRY : /* 56 Retry count exceeded */
case SKDC_CANT : /* 57 Can't send request */
@@ -199,7 +199,7 @@ void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
msg_id = MSG_ERR_INSECURE_PW;
sugg_code = KHERR_SUGGEST_RETRY;
break;
-
+
default:
/* no extra error msg */
break;
@@ -260,18 +260,18 @@ int lsh_com_err_proc (LPSTR whoami, long code,
HWND hOldFocus;
char buf[1024], *cp;
WORD mbformat = MB_OK | MB_ICONEXCLAMATION;
-
+
cp = buf;
memset(buf, '\0', sizeof(buf));
cp[0] = '\0';
-
+
if (code)
{
err_describe(buf, code);
while (*cp)
cp++;
}
-
+
if (fmt)
{
if (fmt[0] == '%' && fmt[1] == 'b')
@@ -289,7 +289,7 @@ int lsh_com_err_proc (LPSTR whoami, long code,
wvsprintfA((LPSTR)cp, fmt, args);
}
hOldFocus = GetFocus();
- retval = MessageBoxA(/*GetRootParent(hOldFocus)*/NULL, buf, whoami,
+ retval = MessageBoxA(/*GetRootParent(hOldFocus)*/NULL, buf, whoami,
mbformat | MB_ICONHAND | MB_TASKMODAL);
SetFocus(hOldFocus);
return retval;
diff --git a/src/windows/identity/plugins/krb5/errorfuncs.h b/src/windows/identity/plugins/krb5/errorfuncs.h
index 4b1d2e2b52..c03eba5758 100644
--- a/src/windows/identity/plugins/krb5/errorfuncs.h
+++ b/src/windows/identity/plugins/krb5/errorfuncs.h
@@ -35,7 +35,7 @@
/*
* This is a hack needed because the real com_err.h does
* not define err_func. We need it in the case where
- * we pull in the real com_err instead of the krb4
+ * we pull in the real com_err instead of the krb4
* impostor.
*/
#ifndef _DCNS_MIT_COM_ERR_H
@@ -54,7 +54,7 @@ typedef LPSTR (*err_func)(int, long);
#endif
/*! \internal
- \brief Describe an error
+ \brief Describe an error
\param[in] code Error code returned by Kerberos
\param[out] buf Receives the error string
@@ -62,8 +62,8 @@ typedef LPSTR (*err_func)(int, long);
\param[out] suggestion Message ID of suggestion
\param[out] suggest_code Suggestion ID
*/
-void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
- DWORD * suggestion,
+void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
+ DWORD * suggestion,
kherr_suggestion * suggest_code);
/* */
diff --git a/src/windows/identity/plugins/krb5/krb5configcc.c b/src/windows/identity/plugins/krb5/krb5configcc.c
index 13c5ac86b8..8b0286f0fe 100644
--- a/src/windows/identity/plugins/krb5/krb5configcc.c
+++ b/src/windows/identity/plugins/krb5/krb5configcc.c
@@ -296,7 +296,7 @@ void k5_ccc_update_data(HWND hwnd, k5_ccc_data * d) {
/* everything else is controlled by buttons */
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ccconfig_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -345,7 +345,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
ListView_InsertColumn(lv, 0, &lvc);
}
- SendDlgItemMessage(hwnd, IDC_CFG_FCNAME, EM_SETLIMITTEXT,
+ SendDlgItemMessage(hwnd, IDC_CFG_FCNAME, EM_SETLIMITTEXT,
MAX_PATH - 1, 0);
k5_ccc_update_ui(hwnd, d);
@@ -365,7 +365,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
wchar_t cpath[MAX_PATH];
khm_size i;
- GetDlgItemText(hwnd, IDC_CFG_FCNAME,
+ GetDlgItemText(hwnd, IDC_CFG_FCNAME,
cpath, ARRAYLENGTH(cpath));
PathCanonicalize(path, cpath);
@@ -520,7 +520,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
#endif
lv_idx = -1;
- while((lv_idx = ListView_GetNextItem(lv, lv_idx,
+ while((lv_idx = ListView_GetNextItem(lv, lv_idx,
LVNI_SELECTED)) != -1) {
ListView_GetItemText(lv, lv_idx, 0, buf, ARRAYLENGTH(buf));
for (i=0; i < d->work.n_file_ccs; i++) {
diff --git a/src/windows/identity/plugins/krb5/krb5configdlg.c b/src/windows/identity/plugins/krb5/krb5configdlg.c
index ed11f7ec82..d6221123ce 100644
--- a/src/windows/identity/plugins/krb5/krb5configdlg.c
+++ b/src/windows/identity/plugins/krb5/krb5configdlg.c
@@ -364,7 +364,7 @@ k5_read_config_data(k5_config_data * d) {
/* now go through each and fish out the kdcs, admin_server
and master_kdc. */
for (s=0; sections[s] && sections[s][0]; s++) {
- const char * sec_kdcs[] =
+ const char * sec_kdcs[] =
{ "realms", sections[s], "kdc", NULL };
const char * sec_admin[] =
@@ -562,7 +562,7 @@ k5_write_config_data(k5_config_data * d) {
applied = TRUE;
}
- if (!(d->flags &
+ if (!(d->flags &
(K5_CDFLAG_MOD_DEF_REALM |
K5_CDFLAG_MOD_CONF_FILE |
K5_CDFLAG_MOD_DNS_FALLBACK |
@@ -616,7 +616,7 @@ k5_write_config_data(k5_config_data * d) {
s > 0) {
char defrealm[K5_MAXCCH_REALM];
- UnicodeStrToAnsi(defrealm, sizeof(defrealm),
+ UnicodeStrToAnsi(defrealm, sizeof(defrealm),
d->def_realm);
khm_krb5_set_default_realm(d->def_realm);
@@ -697,7 +697,7 @@ k5_write_config_data(k5_config_data * d) {
char realm[K5_MAXCCH_REALM];
char host[K5_MAXCCH_HOST];
- const char * sec_kdcs[] =
+ const char * sec_kdcs[] =
{ "realms", realm, "kdc", NULL };
const char * sec_admin[] =
@@ -811,9 +811,9 @@ k5_write_config_data(k5_config_data * d) {
if (!rv) {
if (!strcmp(maprealm, realm)) {
- StringCbCopyA(host, sizeof(host),
+ StringCbCopyA(host, sizeof(host),
values[v]);
- pprofile_clear_relation(profile,
+ pprofile_clear_relation(profile,
sec_domain_map);
applied = TRUE;
}
@@ -973,7 +973,7 @@ k5_write_config_data(k5_config_data * d) {
khui_alert_set_title(alert, title);
khui_alert_set_message(alert, msg);
khui_alert_set_suggestion(alert, sugg);
-
+
khui_alert_show(alert);
}
@@ -992,7 +992,7 @@ k5_write_config_data(k5_config_data * d) {
static k5_config_data k5_config_dlg_data;
static khm_boolean k5_dlg_data_valid = FALSE;
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_config_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1073,7 +1073,7 @@ k5_config_dlgproc(HWND hwnd,
#endif
SendMessage(hw, CB_RESETCONTENT, 0, 0);
- for (t=importopts;
+ for (t=importopts;
t && *t && *t != L' ' &&
t < importopts + ARRAYLENGTH(importopts);
t = multi_string_next(t)) {
@@ -1607,7 +1607,7 @@ k5_delete_realms(HWND hwnd, k5_config_data * d) {
lvi.iItem = idx;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
-
+
ListView_GetItem(hw_rlm, &lvi);
if (lvi.lParam != -1 &&
@@ -1619,7 +1619,7 @@ k5_delete_realms(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
-
+
k5_purge_config_data(d, TRUE, TRUE, TRUE);
k5_update_realms_display(hw_rlm, d);
k5_update_dmap_display(GetDlgItem(hwnd, IDC_CFG_DMAP), NULL, 0);
@@ -1638,7 +1638,7 @@ k5_delete_servers(HWND hwnd, k5_config_data * d) {
hw_kdc = GetDlgItem(hwnd, IDC_CFG_KDC);
r = d->c_realm;
-
+
idx = -1;
while((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED))
@@ -1660,7 +1660,7 @@ k5_delete_servers(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
d->realms[r].flags |= K5_RDFLAG_MODIFED;
-
+
k5_purge_config_data(d, TRUE, TRUE, TRUE);
k5_update_realms_display(GetDlgItem(hwnd, IDC_CFG_REALMS), d);
k5_update_kdcs_display(hw_kdc, d, r);
@@ -1687,7 +1687,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
lvi.iItem = idx;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
-
+
ListView_GetItem(hw_dmp, &lvi);
if (lvi.lParam != -1 &&
@@ -1700,7 +1700,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
k5_purge_config_data(d, FALSE, FALSE, TRUE);
-
+
if (!(d->realms[r].flags & K5_RDFLAG_MODIFED)) {
d->realms[r].flags |= K5_RDFLAG_MODIFED;
@@ -1711,7 +1711,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
}
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_realms_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1846,7 +1846,7 @@ k5_realms_dlgproc(HWND hwnd,
SetMenuItemInfo(hm, CMD_DEL_REALM, FALSE, &mii);
}
-
+
} else if (id == IDC_CFG_KDC) {
HWND hw_kdc;
int n;
@@ -1883,7 +1883,7 @@ k5_realms_dlgproc(HWND hwnd,
mii.fState = MFS_ENABLED;
SetMenuItemInfo(hm, CMD_DEL_SERVER, FALSE, &mii);
-
+
mii.fState = MFS_DISABLED;
SetMenuItemInfo(hm, CMD_MAKE_ADMIN, FALSE, &mii);
@@ -2562,7 +2562,7 @@ k5_realms_dlgproc(HWND hwnd,
if (ListView_GetSelectedCount(hw_kdc) != 1)
return TRUE;
-
+
idx = -1;
while ((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED)) != -1) {
@@ -2613,7 +2613,7 @@ k5_realms_dlgproc(HWND hwnd,
if (ListView_GetSelectedCount(hw_kdc) != 1)
return TRUE;
-
+
idx = -1;
while ((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED)) != -1) {
@@ -2850,7 +2850,7 @@ k5_unregister_config_panels(void) {
#endif
}
- if (KHM_SUCCEEDED(khui_cfg_open(node_main, L"KerberosRealms",
+ if (KHM_SUCCEEDED(khui_cfg_open(node_main, L"KerberosRealms",
&node_realms))) {
khui_cfg_remove(node_realms);
khui_cfg_release(node_realms);
diff --git a/src/windows/identity/plugins/krb5/krb5configid.c b/src/windows/identity/plugins/krb5/krb5configid.c
index 2f3fe62c84..b0dff3cb99 100644
--- a/src/windows/identity/plugins/krb5/krb5configid.c
+++ b/src/windows/identity/plugins/krb5/krb5configid.c
@@ -273,7 +273,7 @@ k5_id_write_params(HWND hw, k5_id_dlg_data * d) {
KHUI_CNFLAG_APPLIED | KHUI_CNFLAG_MODIFIED);
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_id_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
diff --git a/src/windows/identity/plugins/krb5/krb5configids.c b/src/windows/identity/plugins/krb5/krb5configids.c
index 4699f056a2..70af857163 100644
--- a/src/windows/identity/plugins/krb5/krb5configids.c
+++ b/src/windows/identity/plugins/krb5/krb5configids.c
@@ -101,7 +101,7 @@ k5_ids_write_params(k5_ids_dlg_data * d) {
rv = khc_write_int32(csp_params, vn, (khm_int32) po); \
assert(KHM_SUCCEEDED(rv)); \
}
-
+
WRITEPARAM(d->life,d->tc_life.current, L"DefaultLifetime");
WRITEPARAM(d->renew_life,d->tc_renew.current, L"DefaultRenewLifetime");
WRITEPARAM(d->life_max,d->tc_life_max.current, L"MaxLifetime");
@@ -170,7 +170,7 @@ k5_ids_read_params(k5_ids_dlg_data * d) {
d->tc_renew_max.max = d->tc_renew.max;
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ids_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -279,6 +279,3 @@ k5_ids_tab_dlgproc(HWND hwnd,
}
return FALSE;
}
-
-
-
diff --git a/src/windows/identity/plugins/krb5/krb5funcs.c b/src/windows/identity/plugins/krb5/krb5funcs.c
index efab36e5ea..a78ed45d7e 100644
--- a/src/windows/identity/plugins/krb5/krb5funcs.c
+++ b/src/windows/identity/plugins/krb5/krb5funcs.c
@@ -96,7 +96,7 @@ khm_convert524(krb5_context alt_ctx)
krb5_princ_realm(ctx, me)->data,
"krbtgt",
krb5_princ_realm(ctx, me)->data,
- NULL)))
+ NULL)))
{
goto cleanup;
}
@@ -108,21 +108,21 @@ khm_convert524(krb5_context alt_ctx)
if ((code = pkrb5_get_credentials(ctx, 0,
cc,
&increds,
- &v5creds)))
+ &v5creds)))
{
goto cleanup;
}
if ((icode = pkrb524_convert_creds_kdc(ctx,
v5creds,
- v4creds)))
+ v4creds)))
{
goto cleanup;
}
/* initialize ticket cache */
if ((icode = pkrb_in_tkt(v4creds->pname, v4creds->pinst, v4creds->realm)
- != KSUCCESS))
+ != KSUCCESS))
{
goto cleanup;
}
@@ -134,7 +134,7 @@ khm_convert524(krb5_context alt_ctx)
v4creds->lifetime,
v4creds->kvno,
&(v4creds->ticket_st),
- v4creds->issue_date)))
+ v4creds->issue_date)))
{
goto cleanup;
}
@@ -170,7 +170,7 @@ int com_addr(void)
{
long ipAddr;
char loc_addr[ADDR_SZ];
- CREDENTIALS cred;
+ CREDENTIALS cred;
char service[40];
char instance[40];
// char addr[40];
@@ -197,7 +197,7 @@ int com_addr(void)
break;
} // while()
return 0;
-}
+}
#endif
/* we use these structures to keep track of identities that we find
@@ -492,7 +492,7 @@ tc_free_idlist(identlist * idlist) {
#define MAX_ADDRS 256
-static long get_tickets_from_cache(krb5_context ctx,
+static long get_tickets_from_cache(krb5_context ctx,
krb5_ccache cache,
identlist * idlist)
{
@@ -564,8 +564,8 @@ static long get_tickets_from_cache(krb5_context ctx,
PrincipalName = NULL;
ClientName = NULL;
sServerName = NULL;
- if ((code = (*pkrb5_unparse_name)(ctx, KRBv5Principal,
- (char **)&PrincipalName)))
+ if ((code = (*pkrb5_unparse_name)(ctx, KRBv5Principal,
+ (char **)&PrincipalName)))
{
if (PrincipalName != NULL)
(*pkrb5_free_unparsed_name)(ctx, PrincipalName);
@@ -586,7 +586,7 @@ static long get_tickets_from_cache(krb5_context ctx,
}
AnsiStrToUnicode(wbuf, sizeof(wbuf), PrincipalName);
- if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
+ if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
&ident))) {
/* something bad happened */
code = 1;
@@ -597,9 +597,9 @@ static long get_tickets_from_cache(krb5_context ctx,
(*pkrb5_free_principal)(ctx, KRBv5Principal);
- if ((code = (*pkrb5_cc_start_seq_get)(ctx, cache, &KRBv5Cursor)))
+ if ((code = (*pkrb5_cc_start_seq_get)(ctx, cache, &KRBv5Cursor)))
{
- goto _exit;
+ goto _exit;
}
memset(&KRBv5Credentials, '\0', sizeof(KRBv5Credentials));
@@ -608,8 +608,8 @@ static long get_tickets_from_cache(krb5_context ctx,
sServerName = NULL;
cred = NULL;
- while (!(code = pkrb5_cc_next_cred(ctx, cache, &KRBv5Cursor,
- &KRBv5Credentials)))
+ while (!(code = pkrb5_cc_next_cred(ctx, cache, &KRBv5Cursor,
+ &KRBv5Credentials)))
{
khm_handle tident = NULL;
khm_int32 cred_flags = 0;
@@ -643,7 +643,7 @@ static long get_tickets_from_cache(krb5_context ctx,
reason, we need to create a new identity */
if(strcmp(ClientName, PrincipalName)) {
AnsiStrToUnicode(wbuf, sizeof(wbuf), ClientName);
- if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
+ if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
&tident))) {
(*pkrb5_free_cred_contents)(ctx, &KRBv5Credentials);
continue;
@@ -653,7 +653,7 @@ static long get_tickets_from_cache(krb5_context ctx,
}
AnsiStrToUnicode(wbuf, sizeof(wbuf), sServerName);
- if(KHM_FAILED(kcdb_cred_create(wbuf, tident, credtype_id_krb5,
+ if(KHM_FAILED(kcdb_cred_create(wbuf, tident, credtype_id_krb5,
&cred))) {
(*pkrb5_free_cred_contents)(ctx, &KRBv5Credentials);
continue;
@@ -682,12 +682,12 @@ static long get_tickets_from_cache(krb5_context ctx,
tt = KRBv5Credentials.times.renew_till;
TimetToFileTime(tt, &eft);
- kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_EXPIRE, &eft,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_EXPIRE, &eft,
sizeof(eft));
ftl = FtSub(&eft, &ft);
- kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_LIFETIME, &ftl,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_LIFETIME, &ftl,
sizeof(ftl));
}
@@ -710,7 +710,7 @@ static long get_tickets_from_cache(krb5_context ctx,
c1 = krb5_princ_component(ctx,KRBv5Credentials.server,1);
r = krb5_princ_realm(ctx,KRBv5Credentials.server);
- if ( c0 && c1 && r && c1->length == r->length &&
+ if ( c0 && c1 && r && c1->length == r->length &&
!strncmp(c1->data,r->data,r->length) &&
!strncmp("krbtgt",c0->data,c0->length) )
nflags |= KCDB_CRED_FLAG_INITIAL;
@@ -733,7 +733,7 @@ static long get_tickets_from_cache(krb5_context ctx,
ti = KRBv5Credentials.keyblock.enctype;
kcdb_cred_set_attr(cred, attr_id_key_enctype, &ti, sizeof(ti));
- kcdb_cred_set_attr(cred, KCDB_ATTR_LOCATION, wcc_name,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_LOCATION, wcc_name,
KCDB_CBSIZE_AUTO);
if ( KRBv5Credentials.addresses && KRBv5Credentials.addresses[0] ) {
@@ -843,7 +843,7 @@ static long get_tickets_from_cache(krb5_context ctx,
if ((code == KRB5_CC_END) || (code == KRB5_CC_NOTFOUND))
{
- if ((code = pkrb5_cc_end_seq_get(ctx, cache, &KRBv5Cursor)))
+ if ((code = pkrb5_cc_end_seq_get(ctx, cache, &KRBv5Cursor)))
{
goto _exit;
}
@@ -852,12 +852,12 @@ static long get_tickets_from_cache(krb5_context ctx,
#ifdef KRB5_TC_NOTICKET
flags |= KRB5_TC_NOTICKET;
#endif
- if ((code = pkrb5_cc_set_flags(ctx, cache, flags)))
+ if ((code = pkrb5_cc_set_flags(ctx, cache, flags)))
{
goto _exit;
}
}
- else
+ else
{
goto _exit;
}
@@ -901,7 +901,7 @@ khm_krb5_list_tickets(krb5_context *krbv5Context)
goto _exit;
code = pcc_get_NC_info(cc_ctx, &pNCi);
- if (code)
+ if (code)
goto _exit;
for(i=0; pNCi[i]; i++) {
@@ -1038,7 +1038,7 @@ khm_krb5_renew_cred(khm_handle cred)
goto cleanup;
code = pkrb5_cc_get_principal(ctx, cc, &me);
- if (code)
+ if (code)
goto cleanup;
cbname = sizeof(wname);
@@ -1058,7 +1058,7 @@ khm_krb5_renew_cred(khm_handle cred)
pkrb5_cc_set_flags(ctx, cc, ccflags);
if (strlen("krbtgt") != krb5_princ_name(ctx, server)->length ||
- strncmp("krbtgt", krb5_princ_name(ctx, server)->data, krb5_princ_name(ctx, server)->length))
+ strncmp("krbtgt", krb5_princ_name(ctx, server)->data, krb5_princ_name(ctx, server)->length))
{
code = pkrb5_get_renewed_creds(ctx, &cc_creds, me, cc, name);
if (code) {
@@ -1110,7 +1110,7 @@ khm_krb5_renew_cred(khm_handle cred)
pkrb5_free_principal(ctx, server);
pkrb5_free_cred_contents(ctx, &in_creds);
- pkrb5_free_cred_contents(ctx, &cc_creds);
+ pkrb5_free_cred_contents(ctx, &cc_creds);
if (out_creds)
pkrb5_free_creds(ctx, out_creds);
@@ -1280,11 +1280,11 @@ khm_krb5_renew_ident(khm_handle identity)
}
code = khm_krb5_initialize(identity, &ctx, &cc);
- if (code)
+ if (code)
goto cleanup;
code = pkrb5_cc_get_principal(ctx, cc, &me);
- if (code)
+ if (code)
goto cleanup;
realm = krb5_princ_realm(ctx, me);
@@ -1295,7 +1295,7 @@ khm_krb5_renew_ident(khm_handle identity)
realm->length,realm->data,
0);
- if (code)
+ if (code)
goto cleanup;
my_creds.client = me;
@@ -1635,7 +1635,7 @@ khm_krb5_canon_cc_name(wchar_t * wcc_name,
size_t cb_len;
wchar_t * colon;
- if (FAILED(StringCbLength(wcc_name,
+ if (FAILED(StringCbLength(wcc_name,
cb_cc_name,
&cb_len))) {
#ifdef DEBUG
@@ -1672,7 +1672,7 @@ khm_krb5_canon_cc_name(wchar_t * wcc_name,
return 0;
}
-int
+int
khm_krb5_cc_name_cmp(const wchar_t * cc_name_1,
const wchar_t * cc_name_2) {
if (!wcsncmp(cc_name_1, L"API:", 4))
@@ -2026,7 +2026,7 @@ khm_krb5_destroy_by_credset(khm_handle p_cs)
}
goto _del_this_cred;
}
-
+
_done_with_this_set:
pkrb5_free_principal(ctx, princ);
@@ -2297,10 +2297,10 @@ khm_krb5_ms2mit(char * match_princ, BOOL match_realm, BOOL save_creds,
} else {
/* Enumerate tickets from cache looking for an initial ticket */
- if ((code = pkrb5_cc_start_seq_get(kcontext, mslsa_ccache, &cursor)))
+ if ((code = pkrb5_cc_start_seq_get(kcontext, mslsa_ccache, &cursor)))
goto cleanup;
- while (!(code = pkrb5_cc_next_cred(kcontext, mslsa_ccache,
+ while (!(code = pkrb5_cc_next_cred(kcontext, mslsa_ccache,
&cursor, &creds))) {
if ( creds.ticket_flags & TKT_FLG_INITIAL ) {
rc = TRUE;
@@ -2337,7 +2337,7 @@ cleanup:
#define KRB5_FILE "KRB5.INI"
#define KRB5_TMP_FILE "KRB5.INI.TMP"
-BOOL
+BOOL
khm_krb5_get_temp_profile_file(LPSTR confname, UINT szConfname)
{
GetTempPathA(szConfname, confname);
@@ -2368,11 +2368,11 @@ khm_krb5_set_profile_file(krb5_context ctx, LPSTR confname)
}
#endif
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
{
char **configFile = NULL;
- if (pkrb5_get_default_config_files(&configFile))
+ if (pkrb5_get_default_config_files(&configFile))
{
GetWindowsDirectoryA(confname,szConfname);
confname[szConfname-1] = '\0';
@@ -2382,15 +2382,15 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
return FALSE;
}
-
+
*confname = 0;
-
+
if (configFile)
{
StringCchCopyA(confname, szConfname, *configFile);
- pkrb5_free_config_files(configFile);
+ pkrb5_free_config_files(configFile);
}
-
+
if (!*confname)
{
GetWindowsDirectoryA(confname,szConfname);
@@ -2398,7 +2398,7 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
StringCchCatA(confname, szConfname, "\\");
StringCchCatA(confname, szConfname, KRB5_FILE);
}
-
+
return FALSE;
}
@@ -2415,7 +2415,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
krbConFile[MAX_PATH-1] = '\0';
StringCchCatA(confname, szConfname, "\\");
}
-
+
pFind = strrchr(krbConFile, '\\');
if (pFind) {
*pFind = '\0';
@@ -2427,7 +2427,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
StringCchCopyA(confname, szConfname, krbConFile);
}
- else if (hKrb4) {
+ else if (hKrb4) {
size_t size = szConfname;
memset(confname, '\0', szConfname);
if (!pkrb_get_krbconf2(confname, &size))
@@ -2446,7 +2446,7 @@ readstring(FILE * file, char * buf, int len)
{
int c,i;
memset(buf, '\0', sizeof(buf));
- for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++) {
+ for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++) {
if (i < sizeof(buf)) {
if (c == '\n') {
buf[i] = '\0';
@@ -2485,8 +2485,8 @@ readstring(FILE * file, char * buf, int len)
\return The string with the list of realms or NULL if the
operation fails.
*/
-wchar_t *
-khm_krb5_get_realm_list(void)
+wchar_t *
+khm_krb5_get_realm_list(void)
{
wchar_t * rlist = NULL;
@@ -2509,14 +2509,14 @@ khm_krb5_get_realm_list(void)
filenames[1] = NULL;
retval = pprofile_init(filenames, &profile);
if (!retval) {
- retval = pprofile_get_subsection_names(profile, rootsec,
+ retval = pprofile_get_subsection_names(profile, rootsec,
&sections);
if (!retval)
{
/* first figure out how much space to allocate */
cbsize = 0;
- for (cpp = sections; *cpp; cpp++)
+ for (cpp = sections; *cpp; cpp++)
{
cbsize += sizeof(wchar_t) * (strlen(*cpp) + 1);
}
@@ -2553,7 +2553,7 @@ khm_krb5_get_realm_list(void)
size_t cbsize, t;
wchar_t * d;
- if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
+ if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
#if _MSC_VER >= 1400 && __STDC_WANT_SECURE_LIB__
!fopen_s(&file, krb_conf, "rt")
#else
@@ -2616,7 +2616,7 @@ khm_krb5_get_realm_list(void)
Returns NULL if the operation fails.
*/
-wchar_t *
+wchar_t *
khm_krb5_get_default_realm(void)
{
wchar_t * realm;
@@ -2630,7 +2630,7 @@ khm_krb5_get_default_realm(void)
return NULL;
pkrb5_get_default_realm(ctx,&def);
-
+
if (def) {
cch = strlen(def) + 1;
realm = PMALLOC(sizeof(wchar_t) * cch);
@@ -2670,7 +2670,7 @@ khm_krb5_set_default_realm(wchar_t * realm) {
return rv;
}
-wchar_t *
+wchar_t *
khm_get_realm_from_princ(wchar_t * princ) {
wchar_t * t;
@@ -2727,8 +2727,8 @@ khm_krb5_changepwd(char * principal,
pkrb5_get_init_creds_opt_set_proxiable(&opts, 0);
pkrb5_get_init_creds_opt_set_address_list(&opts,NULL);
- if (rc = pkrb5_get_init_creds_password(context, &creds, princ,
- password, 0, 0, 0,
+ if (rc = pkrb5_get_init_creds_password(context, &creds, princ,
+ password, 0, 0, 0,
"kadmin/changepw", &opts)) {
if (rc == KRB5KRB_AP_ERR_BAD_INTEGRITY) {
#if 0
@@ -2753,7 +2753,7 @@ khm_krb5_changepwd(char * principal,
}
if (result_code) {
- int len = result_code_string.length +
+ int len = result_code_string.length +
(result_string.length ? (sizeof(": ") - 1) : 0) +
result_string.length;
if (len && error_str) {
@@ -2761,10 +2761,10 @@ khm_krb5_changepwd(char * principal,
if (*error_str)
StringCchPrintfA(*error_str, len+1,
"%.*s%s%.*s",
- result_code_string.length,
+ result_code_string.length,
result_code_string.data,
result_string.length?": ":"",
- result_string.length,
+ result_string.length,
result_string.data);
}
rc = result_code;
@@ -3036,7 +3036,7 @@ get_libdefault_string(profile_t profile, const char * realm,
* [libdefaults]
* option = <boolean>
*/
-
+
names[1] = option;
names[2] = 0;
code = pprofile_get_values(profile, names, &nameval);
@@ -3044,7 +3044,7 @@ get_libdefault_string(profile_t profile, const char * realm,
goto goodbye;
goodbye:
- if (!nameval)
+ if (!nameval)
return(ENOENT);
if (!nameval[0]) {
diff --git a/src/windows/identity/plugins/krb5/krb5funcs.h b/src/windows/identity/plugins/krb5/krb5funcs.h
index 62e4bd5362..d41ffb6b2f 100644
--- a/src/windows/identity/plugins/krb5/krb5funcs.h
+++ b/src/windows/identity/plugins/krb5/krb5funcs.h
@@ -102,10 +102,10 @@ typedef struct tag_k5params {
#define K5PARAM_FM_ALL 0x000007ff
#define K5PARAM_FM_PROF 0x0000007f
-
+
/* Credential and principal operations */
-BOOL
+BOOL
khm_krb5_ms2mit(char * match_princ,
BOOL match_realm,
BOOL save_creds,
@@ -144,10 +144,10 @@ khm_convert524(krb5_context ctx);
int
khm_krb5_renew_cred(khm_handle cred);
-int
+int
khm_krb5_renew_ident(khm_handle identity);
-long
+long
khm_krb5_list_tickets(krb5_context *krbv5Context);
long
@@ -165,19 +165,19 @@ khm_krb5_creds_is_equal(khm_handle vcred1, khm_handle vcred2, void * dummy);
/* Configuration */
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname);
-BOOL
+BOOL
khm_krb5_get_temp_profile_file(LPSTR confname, UINT szConfname);
-wchar_t *
+wchar_t *
khm_krb5_get_default_realm(void);
long
khm_krb5_set_default_realm(wchar_t * realm);
-wchar_t *
+wchar_t *
khm_krb5_get_realm_list(void);
khm_int32
@@ -207,14 +207,14 @@ khm_krb5_get_identity_default_ccacheA(khm_handle ident, char * buf, khm_size * p
/* Utility */
-wchar_t *
+wchar_t *
khm_get_realm_from_princ(wchar_t * princ);
long
khm_krb5_canon_cc_name(wchar_t * wcc_name,
size_t cb_cc_name);
-int
+int
khm_krb5_cc_name_cmp(const wchar_t * cc_name_1,
const wchar_t * cc_name_2);
diff --git a/src/windows/identity/plugins/krb5/krb5identpro.c b/src/windows/identity/plugins/krb5/krb5identpro.c
index 996918351f..1b1ec403ef 100644
--- a/src/windows/identity/plugins/krb5/krb5identpro.c
+++ b/src/windows/identity/plugins/krb5/krb5identpro.c
@@ -80,9 +80,9 @@ trim_str(wchar_t * s, khm_size cch) {
}
/* Runs in the UI thread */
-int
-k5_get_realm_from_nc(khui_new_creds * nc,
- wchar_t * buf,
+int
+k5_get_realm_from_nc(khui_new_creds * nc,
+ wchar_t * buf,
khm_size cch_buf) {
k5_new_cred_data * d;
khm_size s;
@@ -102,7 +102,7 @@ k5_get_realm_from_nc(khui_new_creds * nc,
Runs in the UI thread
*/
-static void
+static void
set_identity_from_ui(khui_new_creds * nc,
k5_new_cred_data * d) {
wchar_t un[KCDB_IDENT_MAXCCH_NAME];
@@ -328,13 +328,13 @@ update_crossfeed(khui_new_creds * nc,
SetWindowText(d->hw_username, un);
- return TRUE;
+ return TRUE;
}
/* Handle window messages for the identity specifiers
runs in UI thread */
-static LRESULT
+static LRESULT
handle_wnd_msg(khui_new_creds * nc,
HWND hwnd,
UINT uMsg,
@@ -351,7 +351,7 @@ handle_wnd_msg(khui_new_creds * nc,
/* the username has changed. Instead of handling this
for every keystroke, set a timer that elapses some
time afterwards and then handle the event. */
- SetTimer(hwnd, NC_UNCHANGE_TIMER,
+ SetTimer(hwnd, NC_UNCHANGE_TIMER,
NC_UNCHANGE_TIMEOUT, NULL);
return TRUE;
@@ -400,7 +400,7 @@ handle_wnd_msg(khui_new_creds * nc,
/* UI Callback
runs in UI thread */
-static LRESULT KHMAPI
+static LRESULT KHMAPI
ui_cb(khui_new_creds * nc,
UINT cmd,
HWND hwnd,
@@ -443,7 +443,7 @@ ui_cb(khui_new_creds * nc,
nc->ident_aux = (LPARAM) d;
khui_cw_unlock_nc(nc);
- LoadString(hResModule, IDS_NC_USERNAME,
+ LoadString(hResModule, IDS_NC_USERNAME,
wbuf, ARRAYLENGTH(wbuf));
d->hw_username_label = CreateWindow
@@ -460,7 +460,7 @@ ui_cb(khui_new_creds * nc,
d->hw_username = CreateWindow
(L"COMBOBOX",
L"",
- CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
+ CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL,
0, 0, 100, 100, /* bogus values */
hw_parent,
@@ -501,7 +501,7 @@ ui_cb(khui_new_creds * nc,
d->hw_realm = CreateWindow
(L"COMBOBOX",
L"",
- CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
+ CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL,
0, 0, 100, 100, /* bogus */
hw_parent,
@@ -741,7 +741,7 @@ ui_cb(khui_new_creds * nc,
khui_cw_lock_nc(nc);
nc->ident_aux = 0;
khui_cw_unlock_nc(nc);
-
+
/* since we created all the windows as child windows of
the new creds window, they will be destroyed when that
window is destroyed. */
@@ -869,7 +869,7 @@ k5_ident_set_default_int(khm_handle def_ident) {
khm_krb5_cc_name_cmp(reg_ccname, id_ccname)) {
/* we have to write the new value in */
-
+
l = RegSetValueEx(hk_ccname, L"ccname", 0, REG_SZ, (BYTE *) id_ccname,
(DWORD) cb);
}
@@ -892,7 +892,7 @@ k5_ident_set_default(khm_int32 msg_type,
khm_ui_4 uparam,
void * vparam) {
- /*
+ /*
Currently, setting the default identity simply sets the
"ccname" registry value at "Software\MIT\kerberos5".
*/
@@ -1262,7 +1262,7 @@ k5_refresh_default_identity(krb5_context ctx) {
_reportf(L"Can't open default ccache. code=%d", code);
goto _nc_cleanup;
}
-
+
code = pkrb5_cc_get_principal(ctx, cc, &princ);
if (code) {
/* try to determine the identity from the ccache name */
@@ -1499,10 +1499,10 @@ k5_ident_(khm_int32 msg_type,
}
#endif
-khm_int32 KHMAPI
-k5_msg_ident(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_ident(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam)
{
switch(msg_subtype) {
@@ -1654,7 +1654,7 @@ DWORD WINAPI k5_ccname_monitor_thread(LPVOID lpParameter) {
}
dwSize = sizeof(reg_ccname);
-
+
l = RegQueryValueEx(hk_ccname,
L"ccname",
NULL,
@@ -1701,7 +1701,7 @@ DWORD WINAPI k5_ccname_monitor_thread(LPVOID lpParameter) {
wchar_t new_ccname[KRB5_MAXCCH_CCNAME];
dwSize = sizeof(new_ccname);
-
+
l = RegQueryValueEx(hk_ccname,
L"ccname",
NULL,
@@ -1756,7 +1756,7 @@ k5_msg_system_idpro(khm_int32 msg_type, khm_int32 msg_subtype,
pkrb5_init_context(&k5_identpro_ctx);
kcdb_identity_set_type(credtype_id_krb5);
- if (KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_PRINC,
+ if (KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_PRINC,
&type_id_krb5_princ))) {
kcdb_type dt;
kcdb_type * pstr;
diff --git a/src/windows/identity/plugins/krb5/krb5main.c b/src/windows/identity/plugins/krb5/krb5main.c
index 4875a80f81..fc64e27f32 100644
--- a/src/windows/identity/plugins/krb5/krb5main.c
+++ b/src/windows/identity/plugins/krb5/krb5main.c
@@ -245,7 +245,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KEY_ENCTYPE_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_key_enctype);
if(KHM_FAILED(rv))
@@ -271,7 +271,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_TKT_ENCTYPE_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_tkt_enctype);
if(KHM_FAILED(rv))
@@ -297,7 +297,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_ADDR_LIST_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_addr_list);
if(KHM_FAILED(rv))
@@ -322,7 +322,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KRB5_FLAGS_SHORT_DESC, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_krb5_flags);
if(KHM_FAILED(rv))
@@ -350,7 +350,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KRB5_CCNAME_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_krb5_ccname);
if(KHM_FAILED(rv))
diff --git a/src/windows/identity/plugins/krb5/krb5newcreds.c b/src/windows/identity/plugins/krb5/krb5newcreds.c
index 48c10a4d78..7f2b93198f 100644
--- a/src/windows/identity/plugins/krb5/krb5newcreds.c
+++ b/src/windows/identity/plugins/krb5/krb5newcreds.c
@@ -67,7 +67,7 @@ k5_handle_wm_initdialog(HWND hwnd,
HWND hw;
k5_dlg_data * d;
khui_new_creds_by_type * nct;
-
+
d = PMALLOC(sizeof(*d));
ZeroMemory(d, sizeof(*d));
/* lParam is a pointer to a khui_new_creds structure */
@@ -174,7 +174,7 @@ k5_force_password_change(k5_dlg_data * d) {
INT_PTR
k5_handle_wmnc_notify(HWND hwnd,
- WPARAM wParam,
+ WPARAM wParam,
LPARAM lParam)
{
switch(HIWORD(wParam)) {
@@ -182,7 +182,7 @@ k5_handle_wmnc_notify(HWND hwnd,
{
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
@@ -202,7 +202,7 @@ k5_handle_wmnc_notify(HWND hwnd,
k5_dlg_data * d;
BOOL old_sync;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
@@ -217,17 +217,17 @@ k5_handle_wmnc_notify(HWND hwnd,
old_sync = d->sync;
/* need to update the controls with d->* */
- SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
+ SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
BM_SETCHECK,
- (d->renewable? BST_CHECKED : BST_UNCHECKED),
+ (d->renewable? BST_CHECKED : BST_UNCHECKED),
0);
- EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT),
+ EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT),
!!d->renewable);
khui_tracker_refresh(&d->tc_lifetime);
khui_tracker_refresh(&d->tc_renew);
- SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
+ SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
BM_SETCHECK,
(d->forwardable ? BST_CHECKED : BST_UNCHECKED),
0);
@@ -286,7 +286,7 @@ k5_handle_wmnc_notify(HWND hwnd,
size_t cbsize;
khm_int32 flags;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
return TRUE;
@@ -304,7 +304,7 @@ k5_handle_wmnc_notify(HWND hwnd,
tbuf[0] = L'\0';
if (nc->n_identities > 0 &&
- KHM_SUCCEEDED(kcdb_identity_get_flags(nc->identities[0],
+ KHM_SUCCEEDED(kcdb_identity_get_flags(nc->identities[0],
&flags)) &&
(flags & KCDB_IDENT_FLAG_VALID) &&
nc->subtype == KMSG_CRED_NEW_CREDS &&
@@ -313,14 +313,14 @@ k5_handle_wmnc_notify(HWND hwnd,
if (is_k5_identpro)
k5_get_realm_from_nc(nc, tbuf, ARRAYLENGTH(tbuf));
else
- GetDlgItemText(hwnd, IDC_NCK5_REALM, tbuf,
+ GetDlgItemText(hwnd, IDC_NCK5_REALM, tbuf,
ARRAYLENGTH(tbuf));
/*TODO: if additional realms were specified, then those
must be listed as well */
- LoadString(hResModule, IDS_KRB5_CREDTEXT_0,
+ LoadString(hResModule, IDS_KRB5_CREDTEXT_0,
fbuf, ARRAYLENGTH(fbuf));
- StringCbPrintf(sbuf, sizeof(sbuf), fbuf,
+ StringCbPrintf(sbuf, sizeof(sbuf), fbuf,
tbuf);
StringCbLength(sbuf, sizeof(sbuf), &cbsize);
@@ -364,13 +364,13 @@ k5_handle_wmnc_notify(HWND hwnd,
/* There has been a change of identity */
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
break;
- kmq_post_sub_msg(k5_sub, KMSG_CRED,
- KMSG_CRED_DIALOG_NEW_IDENTITY,
+ kmq_post_sub_msg(k5_sub, KMSG_CRED,
+ KMSG_CRED_DIALOG_NEW_IDENTITY,
0, (void *) d->nc);
}
break;
@@ -379,14 +379,14 @@ k5_handle_wmnc_notify(HWND hwnd,
{
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
break;
if(!d->sync && d->nc->result == KHUI_NC_RESULT_PROCESS) {
- kmq_post_sub_msg(k5_sub, KMSG_CRED,
- KMSG_CRED_DIALOG_NEW_OPTIONS,
+ kmq_post_sub_msg(k5_sub, KMSG_CRED,
+ KMSG_CRED_DIALOG_NEW_OPTIONS,
0, (void *) d->nc);
}
}
@@ -474,7 +474,7 @@ k5_handle_wm_command(HWND hwnd,
if(notif == BN_CLICKED && cid == IDC_NCK5_RENEWABLE) {
int c;
- c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
+ c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
BM_GETCHECK, 0, 0);
if(c==BST_CHECKED) {
EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT), TRUE);
@@ -487,7 +487,7 @@ k5_handle_wm_command(HWND hwnd,
d->sync = FALSE;
} else if(notif == BN_CLICKED && cid == IDC_NCK5_FORWARDABLE) {
int c;
- c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
+ c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
BM_GETCHECK, 0, 0);
if(c==BST_CHECKED) {
d->forwardable = TRUE;
@@ -515,8 +515,8 @@ k5_handle_wm_command(HWND hwnd,
cid == IDC_NCK5_LIFETIME_EDIT)) {
d->dirty = TRUE;
d->sync = FALSE;
- } else if((notif == CBN_SELCHANGE ||
- notif == CBN_KILLFOCUS) &&
+ } else if((notif == CBN_SELCHANGE ||
+ notif == CBN_KILLFOCUS) &&
cid == IDC_NCK5_REALM &&
!is_k5_identpro) {
/* find out what the realm of the current identity
@@ -531,16 +531,16 @@ k5_handle_wm_command(HWND hwnd,
if(d->nc->n_identities > 0) {
if(notif == CBN_SELCHANGE) {
- idx = (int) SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ idx = (int) SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_GETCURSEL, 0, 0);
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_GETLBTEXT, idx, (LPARAM) realm);
} else {
- GetDlgItemText(hwnd, IDC_NCK5_REALM,
+ GetDlgItemText(hwnd, IDC_NCK5_REALM,
realm, ARRAYLENGTH(realm));
}
cbsize = sizeof(idname);
- if(KHM_SUCCEEDED(kcdb_identity_get_name(d->nc->identities[0],
+ if(KHM_SUCCEEDED(kcdb_identity_get_name(d->nc->identities[0],
idname, &cbsize))) {
r = wcschr(idname, L'@');
if(r && !wcscmp(realm, r+1))
@@ -553,11 +553,11 @@ k5_handle_wm_command(HWND hwnd,
}
/* if we get here, we have a new user */
- StringCchCopy(r+1,
- ARRAYLENGTH(idname) - ((r+1) - idname),
+ StringCchCopy(r+1,
+ ARRAYLENGTH(idname) - ((r+1) - idname),
realm);
- if(KHM_SUCCEEDED(kcdb_identity_create(idname,
- KCDB_IDENT_FLAG_CREATE,
+ if(KHM_SUCCEEDED(kcdb_identity_create(idname,
+ KCDB_IDENT_FLAG_CREATE,
&ident))) {
khui_cw_set_primary_id(d->nc, ident);
kcdb_identity_release(ident);
@@ -568,26 +568,26 @@ k5_handle_wm_command(HWND hwnd,
/* if we get here, we have a new realm, but there is no
identity */
- PostMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
}
return 0;
}
-
+
/* Dialog procedure for the Krb5 credentials type panel.
NOTE: Runs in the context of the UI thread
*/
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_nc_dlg_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch(uMsg) {
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
return k5_handle_wm_initdialog(hwnd, wParam, lParam);
case WM_COMMAND:
@@ -606,7 +606,7 @@ k5_nc_dlg_proc(HWND hwnd,
}
/* forward dcl */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code KRB5_CALLCONV
k5_kinit_prompter(krb5_context context,
void *data,
const char *name,
@@ -618,7 +618,7 @@ k5_kinit_prompter(krb5_context context,
fiber_job g_fjob; /* global fiber job object */
-static BOOL
+static BOOL
k5_cached_kinit_prompter(void);
static BOOL
@@ -627,7 +627,7 @@ k5_cp_check_continue(void);
/*
Runs in the context of the krb5 plugin's slave fiber
*/
-VOID CALLBACK
+VOID CALLBACK
k5_kinit_fiber_proc(PVOID lpParameter)
{
while(TRUE)
@@ -775,7 +775,7 @@ k5_cp_check_continue(void) {
}
/* returns true if we find cached prompts */
-static BOOL
+static BOOL
k5_cached_kinit_prompter(void) {
BOOL rv = FALSE;
khm_handle ident;
@@ -836,7 +836,7 @@ k5_cached_kinit_prompter(void) {
/* check if there are any prompts currently showing. If there are
we check if they are the same as the ones we are going to show.
In which case we just reuse the exisitng prompts */
- if (KHM_FAILED(khui_cw_get_prompt_count(g_fjob.nc,
+ if (KHM_FAILED(khui_cw_get_prompt_count(g_fjob.nc,
&n_cur_prompts)) ||
n_prompts != (khm_int32) n_cur_prompts)
goto _show_new_prompts;
@@ -858,7 +858,7 @@ k5_cached_kinit_prompter(void) {
break;
cb = sizeof(wprompt);
- if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
+ if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
wprompt, &cb))) {
khc_close_space(csp_p);
break;
@@ -896,7 +896,7 @@ k5_cached_kinit_prompter(void) {
break;
}
-
+
khc_close_space(csp_p);
}
@@ -915,7 +915,7 @@ k5_cached_kinit_prompter(void) {
wchar_t wpname[KHUI_MAXCCH_PNAME];
cb = sizeof(wbanner);
- if (KHM_FAILED(khc_read_string(csp_prcache, L"Banner",
+ if (KHM_FAILED(khc_read_string(csp_prcache, L"Banner",
wbanner, &cb)))
wbanner[0] = 0;
@@ -943,7 +943,7 @@ k5_cached_kinit_prompter(void) {
break;
cb = sizeof(wprompt);
- if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
+ if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
wprompt, &cb))) {
khc_close_space(csp_p);
break;
@@ -965,7 +965,7 @@ k5_cached_kinit_prompter(void) {
} else {
rv = TRUE;
}
-
+
_cleanup:
if (csp_prcache)
@@ -981,7 +981,7 @@ k5_cached_kinit_prompter(void) {
}
/* Runs in the context of the Krb5 plugin's slave fiber */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code KRB5_CALLCONV
k5_kinit_prompter(krb5_context context,
void *data,
const char *name,
@@ -1040,7 +1040,7 @@ k5_kinit_prompter(krb5_context context,
khui_new_creds_prompt * p;
if(prompts[i].prompt) {
- AnsiStrToUnicode(wprompt, sizeof(wprompt),
+ AnsiStrToUnicode(wprompt, sizeof(wprompt),
prompts[i].prompt);
} else {
wprompt[0] = 0;
@@ -1176,8 +1176,8 @@ k5_kinit_prompter(krb5_context context,
khui_cw_clear_prompts(nc);
khui_cw_begin_custom_prompts(
- nc,
- num_prompts,
+ nc,
+ num_prompts,
(banner)?wbanner:NULL,
(name)?wname:NULL);
@@ -1228,7 +1228,7 @@ k5_kinit_prompter(krb5_context context,
wchar_t wprompt[KHUI_MAXCCH_PROMPT];
if(prompts[i].prompt) {
- AnsiStrToUnicode(wprompt, sizeof(wprompt),
+ AnsiStrToUnicode(wprompt, sizeof(wprompt),
prompts[i].prompt);
} else {
wprompt[0] = 0;
@@ -1249,7 +1249,7 @@ k5_kinit_prompter(krb5_context context,
wnum[0] = 0;
StringCbPrintf(wnum, sizeof(wnum), L"%d", i);
- khc_open_space(csp_prcache, wnum,
+ khc_open_space(csp_prcache, wnum,
KHM_FLAG_CREATE, &csp_p);
if (csp_p) {
@@ -1309,7 +1309,7 @@ k5_kinit_prompter(krb5_context context,
d->length = 0;
}
- if (ptypes &&
+ if (ptypes &&
ptypes[i] == KRB5_PROMPT_TYPE_PASSWORD &&
d->length == 0)
@@ -1328,7 +1328,7 @@ k5_kinit_prompter(krb5_context context,
}
-void
+void
k5_read_dlg_params(k5_dlg_data * d, khm_handle identity)
{
k5_params p;
@@ -1463,7 +1463,7 @@ k5_ensure_identity_ccache_is_watched(khm_handle identity, char * ccache)
} while(FALSE);
}
-void
+void
k5_write_dlg_params(k5_dlg_data * d, khm_handle identity, char * ccache)
{
@@ -1498,7 +1498,7 @@ k5_write_dlg_params(k5_dlg_data * d, khm_handle identity, char * ccache)
d->dirty = FALSE;
}
-void
+void
k5_free_kinit_job(void)
{
if (g_fjob.principal)
@@ -1519,7 +1519,7 @@ k5_free_kinit_job(void)
ZeroMemory(&g_fjob, sizeof(g_fjob));
}
-void
+void
k5_prep_kinit_job(khui_new_creds * nc)
{
khui_new_creds_by_type * nct;
@@ -1534,7 +1534,7 @@ k5_prep_kinit_job(khui_new_creds * nc)
if (!nct)
return;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (!d)
@@ -1642,7 +1642,7 @@ k5_prep_kinit_job(khui_new_creds * nc)
/* leave identity held, since we added a reference above */
}
-static khm_int32 KHMAPI
+static khm_int32 KHMAPI
k5_find_tgt_filter(khm_handle cred,
khm_int32 flags,
void * rock) {
@@ -1777,7 +1777,7 @@ k5_update_LRU(khm_handle identity)
} else if (rv == KHM_ERROR_SUCCESS) {
if (multi_string_find(wbuf, realm, KHM_CASE_SENSITIVE) != NULL) {
/* remove the realm and add it at the top later. */
- multi_string_delete(wbuf, realm, KHM_CASE_SENSITIVE);
+ multi_string_delete(wbuf, realm, KHM_CASE_SENSITIVE);
}
} else {
multi_string_init(wbuf, cb_ms);
@@ -1795,7 +1795,7 @@ k5_update_LRU(khm_handle identity)
}
rv = khc_write_multi_string(csp_params, L"LRURealms", wbuf);
-
+
assert(KHM_SUCCEEDED(rv));
_done_with_LRU:
@@ -1812,10 +1812,10 @@ k5_update_LRU(khm_handle identity)
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_cred_dialog(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_cred_dialog(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1838,7 +1838,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
nct->type = credtype_id_krb5;
nct->ordinal = 1;
- LoadString(hResModule, IDS_KRB5_NC_NAME,
+ LoadString(hResModule, IDS_KRB5_NC_NAME,
wbuf, ARRAYLENGTH(wbuf));
StringCbLength(wbuf, sizeof(wbuf), &cbsize);
cbsize += sizeof(wchar_t);
@@ -1891,7 +1891,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
break;
hwnd = nct->hwnd_panel;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
/* this can be NULL if the dialog was closed while the
@@ -1902,14 +1902,14 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (!is_k5_identpro) {
/* enumerate all realms and place in realms combo box */
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
- CB_RESETCONTENT,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ CB_RESETCONTENT,
0, 0);
realms = khm_krb5_get_realm_list();
if(realms) {
for (t = realms; t && *t; t = multi_string_next(t)) {
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_ADDSTRING,
0, (LPARAM) t);
}
@@ -1924,8 +1924,8 @@ k5_msg_cred_dialog(khm_int32 msg_type,
(WPARAM) -1,
(LPARAM) defrealm);
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
- WM_SETTEXT,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ WM_SETTEXT,
0, (LPARAM) defrealm);
PFREE(defrealm);
}
@@ -1946,24 +1946,24 @@ k5_msg_cred_dialog(khm_int32 msg_type,
k5_read_dlg_params(d, NULL);
}
- PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
}
break;
-
+
case KMSG_CRED_DIALOG_NEW_IDENTITY:
{
khui_new_creds * nc;
khui_new_creds_by_type * nct;
k5_dlg_data * d;
-
+
nc = (khui_new_creds *) vparam;
khui_cw_find_type(nc, credtype_id_krb5, &nct);
if (!nct)
break;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (d == NULL)
@@ -1980,7 +1980,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
k5_read_dlg_params(d, nc->identities[0]);
- PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY,
+ PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
}
@@ -2004,7 +2004,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (!nct)
break;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (d == NULL)
break;
@@ -2028,7 +2028,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
LoadString(hResModule, IDS_NC_PWD_PWD,
wbuf, ARRAYLENGTH(wbuf));
- khui_cw_add_prompt(nc, KHUI_NCPROMPT_TYPE_PASSWORD,
+ khui_cw_add_prompt(nc, KHUI_NCPROMPT_TYPE_PASSWORD,
wbuf, NULL, KHUI_NCPROMPT_FLAG_HIDDEN);
LoadString(hResModule, IDS_NC_PWD_NPWD,
@@ -2121,7 +2121,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
}
- if(g_fjob.code == KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN &&
+ if(g_fjob.code == KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN &&
is_k5_identpro) {
kcdb_identity_set_flags(ident,
KCDB_IDENT_FLAG_INVALID,
@@ -2212,7 +2212,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
/* this is what we want. Leave the fiber there. */
if(is_k5_identpro)
- kcdb_identity_set_flags(ident,
+ kcdb_identity_set_flags(ident,
KCDB_IDENT_FLAG_VALID,
KCDB_IDENT_FLAG_VALID);
} else {
@@ -2226,7 +2226,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
we should update the cred text as well */
kcdb_identity_release(ident);
khui_cw_lock_nc(nc);
- PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
} else {
khui_cw_unlock_nc(nc);
@@ -2434,7 +2434,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
pkrb5_free_context(ctx);
} else if (g_fjob.state == FIBER_STATE_NONE) {
/* the user cancelled the operation */
- r = KHUI_NC_RESPONSE_EXIT |
+ r = KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS;
}
@@ -2456,7 +2456,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
}
} else {
khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_NOEXIT |
+ KHUI_NC_RESPONSE_NOEXIT |
KHUI_NC_RESPONSE_PENDING | r);
}
@@ -2518,15 +2518,15 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (code == 0) {
_reportf(L"Tickets successfully renewed");
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
} else if (nc->ctx.identity == 0) {
_report_mr0(KHERR_ERROR, MSG_ERR_NO_IDENTITY);
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_FAILED);
} else if (CompareFileTime(&ftcurrent, &ftidexp) < 0) {
wchar_t tbuf[1024];
@@ -2548,7 +2548,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
} else {
@@ -2565,13 +2565,13 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
((sug_id == KHERR_SUGGEST_RETRY)?KHUI_NC_RESPONSE_NOEXIT:KHUI_NC_RESPONSE_EXIT) |
KHUI_NC_RESPONSE_FAILED);
}
} else {
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
}
@@ -2833,7 +2833,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
}
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
KHUI_NC_RESPONSE_NOEXIT|
KHUI_NC_RESPONSE_FAILED);
} else {
@@ -2862,7 +2862,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
break;
khui_cw_del_type(nc, credtype_id_krb5);
-
+
if (nct->name)
PFREE(nct->name);
if (nct->credtext)
diff --git a/src/windows/identity/plugins/krb5/krb5plugin.c b/src/windows/identity/plugins/krb5/krb5plugin.c
index 61331f3844..d8877a9c05 100644
--- a/src/windows/identity/plugins/krb5/krb5plugin.c
+++ b/src/windows/identity/plugins/krb5/krb5plugin.c
@@ -51,8 +51,8 @@ krb5_context k5_identpro_ctx = NULL;
/* The system message handler.
Runs in the context of the plugin thread */
-khm_int32 KHMAPI
-k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -70,7 +70,7 @@ k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
ct.id = KCDB_CREDTYPE_AUTO;
ct.name = KRB5_CREDTYPE_NAME;
- if(LoadString(hResModule, IDS_KRB5_SHORT_DESC,
+ if(LoadString(hResModule, IDS_KRB5_SHORT_DESC,
buf, ARRAYLENGTH(buf))) {
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
cbsize += sizeof(wchar_t);
@@ -81,7 +81,7 @@ k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
/* even though ideally we should be setting limits
based KCDB_MAXCB_LONG_DESC, our long description
actually fits nicely in KCDB_MAXCB_SHORT_DESC */
- if(LoadString(hResModule, IDS_KRB5_LONG_DESC,
+ if(LoadString(hResModule, IDS_KRB5_LONG_DESC,
buf, ARRAYLENGTH(buf))) {
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
cbsize += sizeof(wchar_t);
@@ -191,8 +191,8 @@ k5_msg_kcdb(khm_int32 msg_type, khm_int32 msg_subtype,
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -237,7 +237,7 @@ k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
default:
if(IS_CRED_ACQ_MSG(msg_subtype))
- return k5_msg_cred_dialog(msg_type, msg_subtype,
+ return k5_msg_cred_dialog(msg_type, msg_subtype,
uparam, vparam);
}
@@ -249,8 +249,8 @@ k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_callback(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_callback(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
switch(msg_type) {
diff --git a/src/windows/identity/plugins/krb5/krb5props.c b/src/windows/identity/plugins/krb5/krb5props.c
index 312b576fd1..d1553e6d6d 100644
--- a/src/windows/identity/plugins/krb5/krb5props.c
+++ b/src/windows/identity/plugins/krb5/krb5props.c
@@ -42,7 +42,7 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
- )
+ )
{
switch(uMsg) {
case WM_INITDIALOG:
@@ -72,8 +72,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_NAME, buf);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_ISSUE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_ISSUE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_ISSUE, buf);
@@ -81,8 +81,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_ISSUE, unavailable);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_EXPIRE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_EXPIRE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_VALID, buf);
@@ -90,8 +90,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_VALID, unavailable);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_RENEW_EXPIRE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_RENEW_EXPIRE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_RENEW, buf);
@@ -173,4 +173,3 @@ void k5_pp_end(khui_property_sheet * s)
p->p_page = NULL;
}
}
-
diff --git a/src/windows/identity/plugins/krb5/krbcred.h b/src/windows/identity/plugins/krb5/krbcred.h
index ddc745c935..d90a39e461 100644
--- a/src/windows/identity/plugins/krb5/krbcred.h
+++ b/src/windows/identity/plugins/krb5/krbcred.h
@@ -190,30 +190,30 @@ extern fiber_job g_fjob; /* global fiber job object */
#define K5_SET_CRED_MSG WMNC_USER
-void
+void
k5_pp_begin(khui_property_sheet * s);
-void
+void
k5_pp_end(khui_property_sheet * s);
-khm_int32 KHMAPI
-k5_msg_cred_dialog(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_cred_dialog(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam);
-khm_int32 KHMAPI
-k5_msg_ident(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_ident(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam);
khm_int32
k5_remove_from_LRU(khm_handle identity);
-int
-k5_get_realm_from_nc(khui_new_creds * nc,
- wchar_t * buf,
+int
+k5_get_realm_from_nc(khui_new_creds * nc,
+ wchar_t * buf,
khm_size cch_buf);
void
@@ -222,19 +222,19 @@ k5_register_config_panels(void);
void
k5_unregister_config_panels(void);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ccconfig_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_id_tab_dlgproc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ids_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
diff --git a/src/windows/identity/plugins/krb5/langres.h b/src/windows/identity/plugins/krb5/langres.h
index 117754b3e8..2c6566d787 100644
--- a/src/windows/identity/plugins/krb5/langres.h
+++ b/src/windows/identity/plugins/krb5/langres.h
@@ -205,7 +205,7 @@
#define ID_FOO_BAR 40001
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 219
diff --git a/src/windows/identity/sample/templates/credprov/langres.h b/src/windows/identity/sample/templates/credprov/langres.h
index 962c4cb223..f59404a8db 100644
--- a/src/windows/identity/sample/templates/credprov/langres.h
+++ b/src/windows/identity/sample/templates/credprov/langres.h
@@ -23,7 +23,7 @@
#define IDS_CFG_ID_LONG_DESC 120
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 116
diff --git a/src/windows/identity/sample/templates/credprov/proppage.c b/src/windows/identity/sample/templates/credprov/proppage.c
index eaffde23e0..dc6148ae1d 100644
--- a/src/windows/identity/sample/templates/credprov/proppage.c
+++ b/src/windows/identity/sample/templates/credprov/proppage.c
@@ -56,4 +56,3 @@ pp_cred_dlg_proc(HWND hwnd,
return FALSE;
}
-
diff --git a/src/windows/identity/ui/aboutwnd.c b/src/windows/identity/ui/aboutwnd.c
index cc88705d74..a9efcfbffb 100644
--- a/src/windows/identity/ui/aboutwnd.c
+++ b/src/windows/identity/ui/aboutwnd.c
@@ -54,7 +54,7 @@ about_dlg_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_BUILDINFO,
TEXT(KH_VERSTR_BUILDINFO_1033));
- hsnap =
+ hsnap =
CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,
0);
diff --git a/src/windows/identity/ui/addrchange.c b/src/windows/identity/ui/addrchange.c
index 3953e4f10c..9058ebec7e 100644
--- a/src/windows/identity/ui/addrchange.c
+++ b/src/windows/identity/ui/addrchange.c
@@ -65,7 +65,7 @@ addr_change_thread(LPVOID dummy) {
goto _end_thread;
}
} while(TRUE);
-
+
_end_thread:
ExitThread(0);
}
diff --git a/src/windows/identity/ui/cfg_general_wnd.c b/src/windows/identity/ui/cfg_general_wnd.c
index f4dfa77126..bb26358551 100644
--- a/src/windows/identity/ui/cfg_general_wnd.c
+++ b/src/windows/identity/ui/cfg_general_wnd.c
@@ -364,7 +364,7 @@ khm_cfg_general_proc(HWND hwnd,
StringCbPrintf(msg, sizeof(msg), fmt, buf);
MessageBox(hwnd, title, msg, MB_OK);
-
+
} else {
wchar_t cmdline[550];
STARTUPINFO si;
diff --git a/src/windows/identity/ui/cfg_identities_wnd.c b/src/windows/identity/ui/cfg_identities_wnd.c
index 02eb442122..d419e28379 100644
--- a/src/windows/identity/ui/cfg_identities_wnd.c
+++ b/src/windows/identity/ui/cfg_identities_wnd.c
@@ -46,7 +46,7 @@ set_window_node(HWND hwnd, khui_config_node node) {
}
static void
-add_subpanels(HWND hwnd,
+add_subpanels(HWND hwnd,
khui_config_node ctx_node,
khui_config_node ref_node) {
@@ -128,7 +128,7 @@ add_subpanels(HWND hwnd,
}
static void
-apply_all(HWND hwnd,
+apply_all(HWND hwnd,
HWND hw_tab,
khui_config_node noderef) {
TCITEM tci;
@@ -271,7 +271,7 @@ handle_notify(HWND hwnd,
case TCN_SELCHANGING:
i = TabCtrl_GetCurSel(lpnm->hwndFrom);
- show_tab_panel(hwnd,
+ show_tab_panel(hwnd,
node,
lpnm->hwndFrom,
i,
@@ -619,12 +619,12 @@ init_idents_data(void) {
goto _cleanup;
}
- cfg_idents.idents = PMALLOC(sizeof(*cfg_idents.idents) *
+ cfg_idents.idents = PMALLOC(sizeof(*cfg_idents.idents) *
cfg_idents.n_idents);
#ifdef DEBUG
assert(cfg_idents.idents);
#endif
- ZeroMemory(cfg_idents.idents,
+ ZeroMemory(cfg_idents.idents,
sizeof(*cfg_idents.idents) * cfg_idents.n_idents);
cfg_idents.nc_idents = cfg_idents.n_idents;
@@ -1067,7 +1067,7 @@ khm_cfg_add_ident_proc(HWND hwnd,
break;
}
break;
-
+
} else if (LOWORD(wParam) == IDCANCEL) {
EndDialog(hwnd, 1);
} else {
@@ -1107,9 +1107,9 @@ khm_cfg_ids_tab_proc(HWND hwnd,
if (cfg_idents.hi_status)
goto _done_with_icons;
- cfg_idents.hi_status =
+ cfg_idents.hi_status =
ImageList_Create(GetSystemMetrics(SM_CXSMICON),
- GetSystemMetrics(SM_CYSMICON),
+ GetSystemMetrics(SM_CYSMICON),
ILC_COLOR8 | ILC_MASK,
4,4);
@@ -1125,37 +1125,37 @@ khm_cfg_ids_tab_proc(HWND hwnd,
DestroyIcon(hicon);
hicon = LoadImage(khm_hInstance, MAKEINTRESOURCE(IDI_CFG_DEFAULT),
- IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
+ IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
- cfg_idents.idx_default = ImageList_AddIcon(cfg_idents.hi_status,
+ cfg_idents.idx_default = ImageList_AddIcon(cfg_idents.hi_status,
hicon) + 1;
DestroyIcon(hicon);
hicon = LoadImage(khm_hInstance, MAKEINTRESOURCE(IDI_CFG_MODIFIED),
- IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
+ IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
- cfg_idents.idx_modified = ImageList_AddIcon(cfg_idents.hi_status,
+ cfg_idents.idx_modified = ImageList_AddIcon(cfg_idents.hi_status,
hicon) + 1;
DestroyIcon(hicon);
hicon = LoadImage(khm_hInstance, MAKEINTRESOURCE(IDI_CFG_APPLIED),
- IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
+ IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
- cfg_idents.idx_applied = ImageList_AddIcon(cfg_idents.hi_status,
+ cfg_idents.idx_applied = ImageList_AddIcon(cfg_idents.hi_status,
hicon) + 1;
DestroyIcon(hicon);
hicon = LoadImage(khm_hInstance, MAKEINTRESOURCE(IDI_CFG_DELETED),
- IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
+ IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
- cfg_idents.idx_deleted = ImageList_AddIcon(cfg_idents.hi_status,
+ cfg_idents.idx_deleted = ImageList_AddIcon(cfg_idents.hi_status,
hicon) + 1;
DestroyIcon(hicon);
@@ -1508,7 +1508,7 @@ khm_cfg_id_tab_proc(HWND hwnd,
*cont = FALSE;
} else {
khui_cfg_set_flags_inst(idata, KHUI_CNFLAG_APPLIED,
- KHUI_CNFLAG_APPLIED |
+ KHUI_CNFLAG_APPLIED |
KHUI_CNFLAG_MODIFIED);
}
break;
diff --git a/src/windows/identity/ui/cfg_notif_wnd.c b/src/windows/identity/ui/cfg_notif_wnd.c
index 846d41714f..5bb2d6667e 100644
--- a/src/windows/identity/ui/cfg_notif_wnd.c
+++ b/src/windows/identity/ui/cfg_notif_wnd.c
@@ -43,7 +43,7 @@ typedef struct tag_notif_data {
khui_tracker tc_warn2;
} notif_data;
-static void
+static void
read_params(notif_data * d) {
khm_handle csp_cw;
khm_int32 rv;
@@ -118,7 +118,7 @@ check_for_modification(notif_data * d) {
d->tc_warn1.current != t.tc_warn1.current ||
d->tc_warn2.current != t.tc_warn2.current) {
- khui_cfg_set_flags(d->node,
+ khui_cfg_set_flags(d->node,
KHUI_CNFLAG_MODIFIED,
KHUI_CNFLAG_MODIFIED);
@@ -160,15 +160,15 @@ write_params(notif_data * d) {
assert(KHM_SUCCEEDED(rv));
- rv = khc_write_int32(csp_cw, L"AutoRenewThreshold",
+ rv = khc_write_int32(csp_cw, L"AutoRenewThreshold",
(khm_int32) d->tc_renew.current);
assert(KHM_SUCCEEDED(rv));
- rv = khc_write_int32(csp_cw, L"WarnThreshold",
+ rv = khc_write_int32(csp_cw, L"WarnThreshold",
(khm_int32) d->tc_warn1.current);
assert(KHM_SUCCEEDED(rv));
- rv = khc_write_int32(csp_cw, L"CriticalThreshold",
+ rv = khc_write_int32(csp_cw, L"CriticalThreshold",
(khm_int32) d->tc_warn2.current);
assert(KHM_SUCCEEDED(rv));
@@ -183,15 +183,15 @@ write_params(notif_data * d) {
static void
refresh_view(HWND hwnd, notif_data * d) {
- CheckDlgButton(hwnd, IDC_NOTIF_MONITOR,
+ CheckDlgButton(hwnd, IDC_NOTIF_MONITOR,
(d->monitor?BST_CHECKED:BST_UNCHECKED));
- CheckDlgButton(hwnd, IDC_NOTIF_RENEW,
+ CheckDlgButton(hwnd, IDC_NOTIF_RENEW,
(d->renew?BST_CHECKED:BST_UNCHECKED));
CheckDlgButton(hwnd, IDC_NOTIF_HALFLIFE,
(d->halflife?BST_CHECKED:BST_UNCHECKED));
- CheckDlgButton(hwnd, IDC_NOTIF_WARN1,
+ CheckDlgButton(hwnd, IDC_NOTIF_WARN1,
(d->warn1?BST_CHECKED:BST_UNCHECKED));
- CheckDlgButton(hwnd, IDC_NOTIF_WARN2,
+ CheckDlgButton(hwnd, IDC_NOTIF_WARN2,
(d->warn2?BST_CHECKED:BST_UNCHECKED));
khui_tracker_refresh(&d->tc_renew);
khui_tracker_refresh(&d->tc_warn1);
diff --git a/src/windows/identity/ui/cfg_plugins_wnd.c b/src/windows/identity/ui/cfg_plugins_wnd.c
index f0789e8d00..dc26f097b9 100644
--- a/src/windows/identity/ui/cfg_plugins_wnd.c
+++ b/src/windows/identity/ui/cfg_plugins_wnd.c
@@ -61,7 +61,7 @@ void update_dialog_fields(HWND hwnd,
StringCbPrintf(buf, sizeof(buf), fmt, info->plugin.reg.name);
SetDlgItemText(hwnd, IDC_CFG_DESC, buf);
}
-
+
switch(info->plugin.state) {
case KMM_PLUGIN_STATE_FAIL_INIT:
resid = IDS_PISTATE_FAILINIT;
@@ -369,7 +369,7 @@ khm_cfg_plugins_proc(HWND hwnd,
LPNMHDR lpnm;
HWND hw;
- d = (plugin_dlg_data *) (LONG_PTR)
+ d = (plugin_dlg_data *) (LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
return FALSE;
@@ -393,7 +393,7 @@ khm_cfg_plugins_proc(HWND hwnd,
EnableWindow(GetDlgItem(hwnd, IDC_CFG_ENABLE), FALSE);
EnableWindow(GetDlgItem(hwnd, IDC_CFG_DISABLE), FALSE);
EnableWindow(GetDlgItem(hwnd, IDC_CFG_UNREGISTER), FALSE);
- SendDlgItemMessage(hwnd, IDC_CFG_DEPS,
+ SendDlgItemMessage(hwnd, IDC_CFG_DEPS,
LB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hwnd, IDC_CFG_ICON, STM_SETICON,
(WPARAM) d->plugin_ico, 0);
@@ -615,7 +615,7 @@ khm_cfg_plugins_proc(HWND hwnd,
case MAKEWPARAM(IDC_CFG_REGISTER, BN_CLICKED):
{
-
+
}
break;
}
@@ -626,7 +626,7 @@ khm_cfg_plugins_proc(HWND hwnd,
{
khm_size i;
- d = (plugin_dlg_data *) (LONG_PTR)
+ d = (plugin_dlg_data *) (LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
#ifdef DEBUG
assert(d);
diff --git a/src/windows/identity/ui/configwnd.c b/src/windows/identity/ui/configwnd.c
index f97dc6a4eb..cf3cdfdd08 100644
--- a/src/windows/identity/ui/configwnd.c
+++ b/src/windows/identity/ui/configwnd.c
@@ -45,7 +45,7 @@ typedef struct tag_cfgui_wnd_data {
static cfgui_wnd_data *
cfgui_get_wnd_data(HWND hwnd) {
- return (cfgui_wnd_data *)(LONG_PTR)
+ return (cfgui_wnd_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
}
@@ -132,7 +132,7 @@ cfgui_add_node(cfgui_wnd_data * d,
}
}
-static void
+static void
cfgui_initialize_dialog(HWND hwnd) {
cfgui_wnd_data * d;
HWND hwtv;
@@ -147,7 +147,7 @@ cfgui_initialize_dialog(HWND hwnd) {
/* create and fill the image list for the treeview */
- d->hi_status = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+ d->hi_status = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
ILC_COLOR8 | ILC_MASK,
4,4);
@@ -184,8 +184,8 @@ cfgui_initialize_dialog(HWND hwnd) {
cfgui_add_node(d, hwtv, NULL, NULL, FALSE);
hdc = GetDC(hwnd);
- hf = CreateFont(-MulDiv(12,
- GetDeviceCaps(hdc, LOGPIXELSY),
+ hf = CreateFont(-MulDiv(12,
+ GetDeviceCaps(hdc, LOGPIXELSY),
72),
0, /* nWidth */
0, /* nEscapement */
@@ -633,7 +633,7 @@ cfgui_sync_node_list(cfgui_wnd_data * d, HWND hwnd) {
}
static void
-cfgui_update_state(HWND hwnd,
+cfgui_update_state(HWND hwnd,
khm_int32 flags,
khui_config_node node) {
cfgui_wnd_data * d;
@@ -739,7 +739,7 @@ cfgui_dlgproc_generic(HWND hwnd,
return FALSE;
}
-static INT_PTR CALLBACK
+static INT_PTR CALLBACK
cfgui_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -761,7 +761,7 @@ cfgui_dlgproc(HWND hwnd,
d->hbr_white = CreateSolidBrush(RGB(255,255,255));
- d->hw_generic_pane =
+ d->hw_generic_pane =
CreateDialogParam(khm_hInstance,
MAKEINTRESOURCE(IDD_CFG_GENERIC),
hwnd,
@@ -825,7 +825,7 @@ cfgui_dlgproc(HWND hwnd,
case TVN_SELCHANGED:
lptv = (LPNMTREEVIEW) lParam;
cfgui_activate_node(hwnd,
- (khui_config_node)
+ (khui_config_node)
lptv->itemNew.lParam);
return TRUE;
@@ -893,7 +893,7 @@ cfgui_dlgproc(HWND hwnd,
break;
case WMCFG_UPDATE_STATE:
- cfgui_update_state(hwnd, LOWORD(wParam),
+ cfgui_update_state(hwnd, LOWORD(wParam),
(khui_config_node) lParam);
break;
@@ -912,7 +912,7 @@ cfgui_dlgproc(HWND hwnd,
return FALSE;
}
-static void
+static void
cfgui_create_window(khui_config_node node) {
#ifdef DEBUG
assert(cfgui_hwnd == NULL);
@@ -931,14 +931,14 @@ cfgui_create_window(khui_config_node node) {
ShowWindow(cfgui_hwnd,SW_SHOW);
}
-static void
+static void
cfgui_destroy_window(void) {
if (cfgui_hwnd)
DestroyWindow(cfgui_hwnd);
/* cfgui_hwnd will be set to NULL in the dialog proc */
}
-void
+void
khm_show_config_pane(khui_config_node node) {
if (cfgui_hwnd != NULL) {
SendMessage(cfgui_hwnd, KHUI_WM_CFG_NOTIFY,
diff --git a/src/windows/identity/ui/configwnd.h b/src/windows/identity/ui/configwnd.h
index 712805fc14..c1bacb21cd 100644
--- a/src/windows/identity/ui/configwnd.h
+++ b/src/windows/identity/ui/configwnd.h
@@ -29,7 +29,7 @@
#define CFGACTION_MAGIC 0x38f8
-void
+void
khm_show_config_pane(khui_config_node node);
void khm_init_config(void);
diff --git a/src/windows/identity/ui/credfuncs.c b/src/windows/identity/ui/credfuncs.c
index c8b6727b8a..af03863133 100644
--- a/src/windows/identity/ui/credfuncs.c
+++ b/src/windows/identity/ui/credfuncs.c
@@ -58,7 +58,7 @@ dialog_sync_init(void) {
}
}
-BOOL
+BOOL
khm_cred_begin_dialog(void) {
BOOL rv;
@@ -97,7 +97,7 @@ khm_cred_begin_dialog(void) {
return rv;
}
-void
+void
khm_cred_end_dialog(khui_new_creds * nc) {
dialog_sync_init();
@@ -185,7 +185,7 @@ khm_cred_wait_for_dialog(DWORD timeout, khm_int32 * result,
credentials operation is triggered, each successive message
completion notification will be used to dispatch the messages for
the next step in processing the operation. */
-void KHMAPI
+void KHMAPI
kmsg_cred_completion(kmq_message *m)
{
khui_new_creds * nc;
@@ -203,7 +203,7 @@ kmsg_cred_completion(kmq_message *m)
case KMSG_CRED_NEW_CREDS:
/* Cred types have attached themselves. Trigger the next
phase. */
- kmq_post_message(KMSG_CRED, KMSG_CRED_DIALOG_SETUP, 0,
+ kmq_post_message(KMSG_CRED, KMSG_CRED_DIALOG_SETUP, 0,
m->vparam);
break;
@@ -220,17 +220,17 @@ kmsg_cred_completion(kmq_message *m)
nc = (khui_new_creds *) m->vparam;
khm_prep_newcredwnd(nc->hwnd);
-
+
/* all the controls have been created. Now initialize them */
if (nc->n_types > 0) {
- kmq_post_subs_msg(nc->type_subs,
- nc->n_types,
- KMSG_CRED,
- KMSG_CRED_DIALOG_PRESTART,
- 0,
+ kmq_post_subs_msg(nc->type_subs,
+ nc->n_types,
+ KMSG_CRED,
+ KMSG_CRED_DIALOG_PRESTART,
+ 0,
m->vparam);
} else {
- PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_PROCESS_COMPLETE), 0);
}
break;
@@ -239,12 +239,12 @@ kmsg_cred_completion(kmq_message *m)
/* all prestart stuff is done. Now to activate the dialog */
nc = (khui_new_creds *) m->vparam;
khm_show_newcredwnd(nc->hwnd);
-
+
kmq_post_subs_msg(nc->type_subs,
nc->n_types,
- KMSG_CRED,
- KMSG_CRED_DIALOG_START,
- 0,
+ KMSG_CRED,
+ KMSG_CRED_DIALOG_START,
+ 0,
m->vparam);
/* at this point, the dialog window takes over. We let it run
the show until KMSG_CRED_DIALOG_END is posted by the dialog
@@ -418,10 +418,10 @@ kmsg_cred_completion(kmq_message *m)
done_with_op:
if (nc->subtype == KMSG_CRED_RENEW_CREDS) {
- kmq_post_message(KMSG_CRED, KMSG_CRED_END, 0,
+ kmq_post_message(KMSG_CRED, KMSG_CRED_END, 0,
m->vparam);
} else {
- PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_PROCESS_COMPLETE),
0);
}
@@ -471,12 +471,12 @@ kmsg_cred_completion(kmq_message *m)
case KMSG_CRED_PP_BEGIN:
/* all the pages should have been added by now. Just send out
the precreate message */
- kmq_post_message(KMSG_CRED, KMSG_CRED_PP_PRECREATE, 0,
+ kmq_post_message(KMSG_CRED, KMSG_CRED_PP_PRECREATE, 0,
m->vparam);
break;
case KMSG_CRED_PP_END:
- kmq_post_message(KMSG_CRED, KMSG_CRED_PP_DESTROY, 0,
+ kmq_post_message(KMSG_CRED, KMSG_CRED_PP_DESTROY, 0,
m->vparam);
break;
@@ -577,18 +577,18 @@ void khm_cred_destroy_creds(khm_boolean sync, khm_boolean quiet)
wchar_t title[256];
wchar_t message[256];
- LoadString(khm_hInstance,
- IDS_ALERT_NOSEL_TITLE,
- title,
+ LoadString(khm_hInstance,
+ IDS_ALERT_NOSEL_TITLE,
+ title,
ARRAYLENGTH(title));
- LoadString(khm_hInstance,
- IDS_ALERT_NOSEL,
- message,
+ LoadString(khm_hInstance,
+ IDS_ALERT_NOSEL,
+ message,
ARRAYLENGTH(message));
- khui_alert_show_simple(title,
- message,
+ khui_alert_show_simple(title,
+ message,
KHERR_WARNING);
khui_context_release(pctx);
@@ -964,7 +964,7 @@ void khm_cred_obtain_new_creds(wchar_t * title)
_report_sr0(KHERR_NONE, IDS_CTX_NEW_CREDS);
_describe();
- kmq_post_message(KMSG_CRED, KMSG_CRED_NEW_CREDS, 0,
+ kmq_post_message(KMSG_CRED, KMSG_CRED_NEW_CREDS, 0,
(void *) nc);
_end_task();
@@ -979,7 +979,7 @@ void khm_cred_obtain_new_creds(wchar_t * title)
/* this is called by khm_cred_dispatch_process_message and the
kmsg_cred_completion to initiate and continue checked broadcasts of
KMSG_CRED_DIALOG_PROCESS messages.
-
+
Returns TRUE if more KMSG_CRED_DIALOG_PROCESS messages were
posted. */
BOOL khm_cred_dispatch_process_level(khui_new_creds *nc)
@@ -1040,7 +1040,7 @@ BOOL khm_cred_dispatch_process_level(khui_new_creds *nc)
return cont;
}
-void
+void
khm_cred_dispatch_process_message(khui_new_creds *nc)
{
khm_size i;
@@ -1085,7 +1085,7 @@ khm_cred_dispatch_process_message(khui_new_creds *nc)
kcdb_identity_get_name(nc->ctx.identity, wsinsert, &cbsize);
else if (nc->ctx.scope == KHUI_SCOPE_CREDTYPE) {
if (nc->ctx.identity != NULL)
- kcdb_identity_get_name(nc->ctx.identity, wsinsert,
+ kcdb_identity_get_name(nc->ctx.identity, wsinsert,
&cbsize);
else
kcdb_credtype_get_name(nc->ctx.cred_type, wsinsert,
@@ -1096,7 +1096,7 @@ khm_cred_dispatch_process_message(khui_new_creds *nc)
StringCbCopy(wsinsert, sizeof(wsinsert), L"(?)");
}
- _report_sr1(KHERR_NONE, IDS_CTX_PROC_RENEW_CREDS,
+ _report_sr1(KHERR_NONE, IDS_CTX_PROC_RENEW_CREDS,
_cstr(wsinsert));
_resolve();
} else if (nc->subtype == KMSG_CRED_PASSWORD) {
@@ -1125,7 +1125,7 @@ khm_cred_dispatch_process_message(khui_new_creds *nc)
if (nc->subtype == KMSG_CRED_RENEW_CREDS)
kmq_post_message(KMSG_CRED, KMSG_CRED_END, 0, (void *) nc);
else
- PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_PROCESS_COMPLETE), 0);
}
diff --git a/src/windows/identity/ui/credfuncs.h b/src/windows/identity/ui/credfuncs.h
index 9bc2890896..0516796472 100644
--- a/src/windows/identity/ui/credfuncs.h
+++ b/src/windows/identity/ui/credfuncs.h
@@ -28,10 +28,10 @@
#ifndef __KHIMAIRA_CREDFUNCS_H
#define __KHIMAIRA_CREDFUNCS_H
-void KHMAPI
+void KHMAPI
kmsg_cred_completion(kmq_message *m);
-void
+void
khm_cred_destroy_creds(khm_boolean sync,
khm_boolean quiet);
@@ -41,33 +41,33 @@ khm_cred_destroy_identity(khm_handle identity);
void
khm_cred_renew_all_identities(void);
-void
+void
khm_cred_renew_identity(khm_handle identity);
-void
+void
khm_cred_renew_cred(khm_handle cred);
-void
+void
khm_cred_renew_creds(void);
-void
+void
khm_cred_obtain_new_creds(wchar_t * window_title);
void
khm_cred_obtain_new_creds_for_ident(khm_handle ident, wchar_t * title);
-void
+void
khm_cred_set_default(void);
void khm_cred_set_default_identity(khm_handle identity);
-void
+void
khm_cred_change_password(wchar_t * window_title);
-void
+void
khm_cred_dispatch_process_message(khui_new_creds *nc);
-BOOL
+BOOL
khm_cred_dispatch_process_level(khui_new_creds *nc);
BOOL
diff --git a/src/windows/identity/ui/credwnd.c b/src/windows/identity/ui/credwnd.c
index c5eb0d1477..f7d7ca15eb 100644
--- a/src/windows/identity/ui/credwnd.c
+++ b/src/windows/identity/ui/credwnd.c
@@ -38,16 +38,16 @@ khm_int32 attr_to_action[KCDB_ATTR_MAX_ID + 1];
static void
cw_select_row_creds(khui_credwnd_tbl * tbl, int row, int selected);
-static void
+static void
cw_set_row_context(khui_credwnd_tbl * tbl, int row);
static void
cw_update_outline(khui_credwnd_tbl * tbl);
-static void
+static void
cw_update_selection_state(khui_credwnd_tbl * tbl);
-static void
+static void
cw_select_row(khui_credwnd_tbl * tbl, int row, WPARAM wParam);
@@ -273,7 +273,7 @@ cw_refresh_attribs(HWND hwnd) {
}
}
-khm_int32
+khm_int32
cw_get_custom_attr_id(wchar_t * s)
{
if(!wcscmp(s, CW_CANAME_FLAGS))
@@ -481,7 +481,7 @@ cw_get_theme_color(khm_handle hc, const wchar_t * name, COLORREF ref_color) {
return cw_mix_colors(ref_color, c, alpha);
}
-void
+void
cw_load_view(khui_credwnd_tbl * tbl, wchar_t * view, HWND hwnd) {
khm_handle hc_cw = NULL;
khm_handle hc_vs = NULL;
@@ -779,7 +779,7 @@ _skip_col:
} else {
#ifdef DEBUG
assert(FALSE);
-#endif
+#endif
}
if (hc_theme)
@@ -1001,7 +1001,7 @@ cw_credset_iter_func(khm_handle cred, void * rock) {
return KHM_ERROR_SUCCESS;
}
-void
+void
cw_update_creds(khui_credwnd_tbl * tbl)
{
kcdb_cred_comp_field * fields;
@@ -1043,8 +1043,8 @@ cw_update_creds(khui_credwnd_tbl * tbl)
if(si < 0 || si >= (int) tbl->n_cols)
{
/* this shouldn't happen */
- tbl->cols[i].flags &= ~(KHUI_CW_COL_SORT_INC |
- KHUI_CW_COL_SORT_DEC |
+ tbl->cols[i].flags &= ~(KHUI_CW_COL_SORT_INC |
+ KHUI_CW_COL_SORT_DEC |
KHUI_CW_COL_GROUP);
continue;
}
@@ -1077,8 +1077,8 @@ cw_update_creds(khui_credwnd_tbl * tbl)
comp_order.nFields = n;
comp_order.fields = fields;
- kcdb_credset_sort(tbl->credset,
- kcdb_cred_comp_generic,
+ kcdb_credset_sort(tbl->credset,
+ kcdb_cred_comp_generic,
(void *) &comp_order);
/* also, if new credentials were added, initialize the UI flag
@@ -1091,7 +1091,7 @@ cw_update_creds(khui_credwnd_tbl * tbl)
if(KHM_FAILED(kcdb_credset_get_cred(tbl->credset,
(khm_int32) i, &hc)))
continue; /* lost a race */
- if(KHM_FAILED(kcdb_cred_get_attr(hc, khui_cw_flag_id, NULL,
+ if(KHM_FAILED(kcdb_cred_get_attr(hc, khui_cw_flag_id, NULL,
NULL, NULL))) {
flags = 0;
kcdb_cred_set_attr(hc, khui_cw_flag_id, &flags, sizeof(flags));
@@ -1116,7 +1116,7 @@ cw_update_creds(khui_credwnd_tbl * tbl)
PFREE(fields);
}
-void
+void
cw_del_outline(khui_credwnd_outline *o) {
khui_credwnd_outline * c;
if(!o)
@@ -1147,14 +1147,14 @@ cw_del_outline(khui_credwnd_outline *o) {
PFREE(o);
}
-khui_credwnd_outline *
+khui_credwnd_outline *
cw_new_outline_node(wchar_t * heading) {
khui_credwnd_outline * o;
size_t cblen;
o = PMALLOC(sizeof(khui_credwnd_outline));
ZeroMemory(o, sizeof(khui_credwnd_outline));
-
+
if(SUCCEEDED(StringCbLength(heading, KHUI_MAXCB_HEADING, &cblen))) {
cblen += sizeof(wchar_t);
o->header = PMALLOC(cblen);
@@ -1167,7 +1167,7 @@ cw_new_outline_node(wchar_t * heading) {
/* buf is a handle to a credential or an identity. the kcdb_buf_*
functions work with either. */
-khm_int32
+khm_int32
cw_get_buf_exp_flags(khui_credwnd_tbl * tbl, khm_handle buf)
{
khm_int32 flags;
@@ -1200,7 +1200,7 @@ cw_get_buf_exp_flags(khui_credwnd_tbl * tbl, khm_handle buf)
return flags;
}
-VOID CALLBACK
+VOID CALLBACK
cw_timer_proc(HWND hwnd,
UINT uMsg,
UINT_PTR idEvent,
@@ -1320,10 +1320,10 @@ cw_timer_proc(HWND hwnd,
}
}
-void
-cw_set_tbl_row_cred(khui_credwnd_tbl * tbl,
- int row,
- khm_handle cred,
+void
+cw_set_tbl_row_cred(khui_credwnd_tbl * tbl,
+ int row,
+ khm_handle cred,
int col)
{
FILETIME ft;
@@ -1358,9 +1358,9 @@ cw_set_tbl_row_cred(khui_credwnd_tbl * tbl,
}
}
-void
-cw_set_tbl_row_header(khui_credwnd_tbl * tbl,
- int row, int col,
+void
+cw_set_tbl_row_header(khui_credwnd_tbl * tbl,
+ int row, int col,
khui_credwnd_outline * o)
{
if((int) tbl->n_total_rows <= row) {
@@ -1415,7 +1415,7 @@ cw_set_tbl_row_header(khui_credwnd_tbl * tbl,
}
}
-static int
+static int
iwcscmp(const void * p1, const void * p2) {
const wchar_t * s1 = *(wchar_t **) p1;
const wchar_t * s2 = *(wchar_t **) p2;
@@ -1425,7 +1425,7 @@ iwcscmp(const void * p1, const void * p2) {
#define MAX_GROUPING 256
-static void
+static void
cw_update_outline(khui_credwnd_tbl * tbl)
{
int i,j,n_rows;
@@ -1511,7 +1511,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
tbl->rows = PMALLOC(sizeof(khui_credwnd_row) * tbl->n_total_rows);
} else {
/* kill any pending timers */
- for(i=0; i < (int) tbl->n_rows; i++)
+ for(i=0; i < (int) tbl->n_rows; i++)
if(tbl->rows[i].flags & KHUI_CW_ROW_TIMERSET) {
KillTimer(tbl->hwnd, (UINT_PTR) &(tbl->rows[i]));
tbl->rows[i].flags &= ~KHUI_CW_ROW_TIMERSET;
@@ -1577,7 +1577,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
}
if(ol) {
- visible = (ol->flags & KHUI_CW_O_VISIBLE) &&
+ visible = (ol->flags & KHUI_CW_O_VISIBLE) &&
(ol->flags & KHUI_CW_O_EXPAND);
selected = !!(ol->flags & KHUI_CW_O_SELECTED);
} else {
@@ -1595,8 +1595,8 @@ cw_update_outline(khui_credwnd_tbl * tbl)
cbbuf = sizeof(buf);
buf[0] = L'\0';
if(KHM_FAILED
- (kcdb_cred_get_attr_string(thiscred,
- tbl->cols[grouping[j]].attr_id,
+ (kcdb_cred_get_attr_string(thiscred,
+ tbl->cols[grouping[j]].attr_id,
buf, &cbbuf, 0))) {
cbbuf = sizeof(wchar_t);
buf[0] = L'\0';
@@ -1642,7 +1642,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
}
else
ol->data = 0;
- } else if(tbl->cols[grouping[j]].attr_id ==
+ } else if(tbl->cols[grouping[j]].attr_id ==
KCDB_ATTR_TYPE_NAME) {
khm_int32 t;
@@ -1656,7 +1656,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
khm_int32 alt_id;
kcdb_attrib * attrib;
- rv =
+ rv =
kcdb_attrib_get_info(tbl->cols[grouping[j]].attr_id,
&attrib);
assert(KHM_SUCCEEDED(rv));
@@ -1753,7 +1753,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
grouping[n_grouping - 1] < tbl->n_cols - 1) {
khm_int32 c_flags;
- cw_set_tbl_row_cred(tbl, n_rows, thiscred,
+ cw_set_tbl_row_cred(tbl, n_rows, thiscred,
grouping[n_grouping-1]);
flags = cw_get_buf_exp_flags(tbl, thiscred);
@@ -1800,7 +1800,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
/* Add any default identities with no credentials and sticky
identities that we haven't seen yet */
- if (n_grouping > 0 &&
+ if (n_grouping > 0 &&
tbl->cols[grouping[0]].attr_id == KCDB_ATTR_ID_NAME) {
khui_credwnd_outline * o;
@@ -1916,7 +1916,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
khm_int32 f_sticky;
khm_int32 flags;
- if (KHM_FAILED(kcdb_identity_create(idarray[i],
+ if (KHM_FAILED(kcdb_identity_create(idarray[i],
KCDB_IDENT_FLAG_CREATE, &h)))
continue;
@@ -2022,7 +2022,7 @@ _exit:
}
}
-void
+void
cw_unload_view(khui_credwnd_tbl * tbl)
{
#define SafeDeleteObject(o) \
@@ -2126,7 +2126,7 @@ cw_unload_view(khui_credwnd_tbl * tbl)
}
}
-void
+void
cw_hditem_from_tbl_col(khui_credwnd_col * col, HDITEM *phi)
{
size_t cchsize;
@@ -2205,8 +2205,8 @@ cw_update_header_column_width(khui_credwnd_tbl * tbl, int c) {
}
/* returns a bitmask indicating which measures were changed */
-int
-cw_update_extents(khui_credwnd_tbl * tbl,
+int
+cw_update_extents(khui_credwnd_tbl * tbl,
khm_boolean update_scroll) {
int ext_x = 0;
int ext_y = 0;
@@ -2356,12 +2356,12 @@ cw_update_extents(khui_credwnd_tbl * tbl,
tbl->header_height = pw.cy;
SetWindowPos(
- tbl->hwnd_header,
- pw.hwndInsertAfter,
- pw.x,
- pw.y,
- pw.cx,
- pw.cy,
+ tbl->hwnd_header,
+ pw.hwndInsertAfter,
+ pw.x,
+ pw.y,
+ pw.cx,
+ pw.cy,
pw.flags);
si.cbSize = sizeof(si);
@@ -2384,14 +2384,14 @@ cw_update_extents(khui_credwnd_tbl * tbl,
return 0;
}
-void
+void
cw_insert_header_cols(khui_credwnd_tbl * tbl) {
HWND hdr;
HDITEM hi;
int i;
hdr = tbl->hwnd_header;
-
+
for(i=0; i < (int) tbl->n_cols; i++) {
cw_hditem_from_tbl_col(&(tbl->cols[i]), &hi);
Header_InsertItem(hdr, 512, &hi);
@@ -2404,11 +2404,11 @@ cw_insert_header_cols(khui_credwnd_tbl * tbl) {
#pragma warning(push)
#pragma warning(disable: 4701)
-void
-cw_erase_rect(HDC hdc,
- khui_credwnd_tbl * tbl,
- RECT * r_wnd,
- RECT * r_erase,
+void
+cw_erase_rect(HDC hdc,
+ khui_credwnd_tbl * tbl,
+ RECT * r_wnd,
+ RECT * r_erase,
int type)
{
RECT rlogo;
@@ -2452,10 +2452,10 @@ cw_erase_rect(HDC hdc,
} else {
HDC hdcb = CreateCompatibleDC(hdc);
HBITMAP hbmold = SelectObject(hdcb, tbl->kbm_logo_shade.hbmp);
-
+
BitBlt(hdc, ri.left, ri.top, ri.right - ri.left, ri.bottom - ri.top,
hdcb, ri.left - rlogo.left, ri.top - rlogo.top, SRCCOPY);
-
+
SelectObject(hdcb, hbmold);
DeleteDC(hdcb);
@@ -2486,10 +2486,10 @@ cw_erase_rect(HDC hdc,
}
#pragma warning(pop)
-void
-cw_draw_header(HDC hdc,
- khui_credwnd_tbl * tbl,
- int row,
+void
+cw_draw_header(HDC hdc,
+ khui_credwnd_tbl * tbl,
+ int row,
RECT * r)
{
int colattr;
@@ -2502,7 +2502,7 @@ cw_draw_header(HDC hdc,
/* each header consists of a couple of widgets and some text */
/* we need to figure out the background color first */
-
+
cr = &(tbl->rows[row]);
o = (khui_credwnd_outline *) cr->data;
@@ -2528,7 +2528,7 @@ cw_draw_header(HDC hdc,
else if ((o->flags & CW_EXPSTATE_MASK) == CW_EXPSTATE_WARN)
hbr = tbl->hb_hdr_bg_warn_s;
else if ((colattr == KCDB_ATTR_ID_NAME) && !(o->flags & KHUI_CW_O_EMPTY) &&
- cwi && cwi->id_credcount > 0)
+ cwi && cwi->id_credcount > 0)
hbr = tbl->hb_hdr_bg_cred_s;
else
hbr = tbl->hb_hdr_bg_s;
@@ -2559,7 +2559,7 @@ cw_draw_header(HDC hdc,
if (!(o->flags & KHUI_CW_O_NOOUTLINE) &&
!(o->flags & KHUI_CW_O_EMPTY)) {
- if((tbl->mouse_state & CW_MOUSE_WOUTLINE) &&
+ if((tbl->mouse_state & CW_MOUSE_WOUTLINE) &&
tbl->mouse_row == row) {
if(o->flags & KHUI_CW_O_EXPAND) {
khui_ilist_draw_id(tbl->ilist, IDB_WDG_EXPAND_HI,
@@ -2616,11 +2616,11 @@ cw_draw_header(HDC hdc,
r->left += cx + KHUI_SMICON_CX / 2;
} else {
- khui_ilist_draw_id(tbl->ilist,
+ khui_ilist_draw_id(tbl->ilist,
(((o->flags & KHUI_CW_O_EMPTY) ||
cwi == NULL || cwi->id_credcount == 0)?
IDB_ID_DIS_SM:
- IDB_ID_SM),
+ IDB_ID_SM),
hdc,
r->left,
(r->top + r->bottom - KHUI_SMICON_CY) / 2, 0);
@@ -2653,7 +2653,7 @@ cw_draw_header(HDC hdc,
r->left += size.cx + KHUI_SMICON_CX * 2;
- TextOut(hdc, r->left, r->bottom - tbl->vpad,
+ TextOut(hdc, r->left, r->bottom - tbl->vpad,
defstr, (int) wcslen(defstr));
}
} else {
@@ -2782,7 +2782,7 @@ cw_draw_header(HDC hdc,
}
}
-LRESULT
+LRESULT
cw_handle_header_msg(khui_credwnd_tbl * tbl, LPNMHEADER ph) {
HDITEM hi;
@@ -2862,7 +2862,7 @@ cw_handle_header_msg(khui_credwnd_tbl * tbl, LPNMHEADER ph) {
if (drag_end_index <= i)
return TRUE;
-
+
tcol = tbl->cols[drag_start_index];
if (drag_end_index < drag_start_index) {
MoveMemory(&tbl->cols[drag_end_index + 1],
@@ -3118,7 +3118,7 @@ cw_handle_header_msg(khui_credwnd_tbl * tbl, LPNMHEADER ph) {
return 0;
}
-LRESULT
+LRESULT
cw_wm_create(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -3174,12 +3174,12 @@ cw_wm_create(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Header_Layout(tbl->hwnd_header, &hdl);
SetWindowPos(
- tbl->hwnd_header,
- pw.hwndInsertAfter,
- pw.x,
- pw.y,
- pw.cx,
- pw.cy,
+ tbl->hwnd_header,
+ pw.hwndInsertAfter,
+ pw.x,
+ pw.y,
+ pw.cx,
+ pw.cy,
pw.flags | SWP_SHOWWINDOW);
}
@@ -3209,7 +3209,7 @@ cw_wm_destroy(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
/* handles WM_PAINT and WM_PRINTCLIENT */
-LRESULT
+LRESULT
cw_wm_paint(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -3488,7 +3488,7 @@ cw_wm_paint(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
-LRESULT
+LRESULT
cw_wm_size(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
RECT rect;
@@ -3513,7 +3513,7 @@ cw_wm_size(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
-LRESULT
+LRESULT
cw_wm_notify(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -3537,14 +3537,14 @@ static void cw_pp_precreate(khui_property_sheet * s);
static void cw_pp_end(khui_property_sheet * s);
static void cw_pp_destroy(khui_property_sheet *ps);
-LRESULT
+LRESULT
cw_kmq_wm_dispatch(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
kmq_message * m;
khm_int32 rv = KHM_ERROR_SUCCESS;
khui_credwnd_tbl * tbl;
- tbl = (khui_credwnd_tbl *)(LONG_PTR) GetWindowLongPtr(hwnd, 0);
+ tbl = (khui_credwnd_tbl *)(LONG_PTR) GetWindowLongPtr(hwnd, 0);
kmq_wm_begin(lParam, &m);
@@ -3589,7 +3589,7 @@ cw_kmq_wm_dispatch(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
InvalidateRect(hwnd, NULL, FALSE);
}
- else if (m->subtype == KMSG_KCDB_IDENT &&
+ else if (m->subtype == KMSG_KCDB_IDENT &&
m->uparam == KCDB_OP_NEW_DEFAULT) {
wchar_t idname[KCDB_IDENT_MAXCCH_NAME];
khm_size cb;
@@ -3795,7 +3795,7 @@ cw_kmq_wm_dispatch(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return kmq_wm_end(m, rv);
}
-static void
+static void
cw_select_outline_level(khui_credwnd_outline * o,
BOOL select)
{
@@ -3859,7 +3859,7 @@ cw_select_row_creds(khui_credwnd_tbl * tbl, int row, int selected) {
}
}
-static void
+static void
cw_unselect_all(khui_credwnd_tbl * tbl)
{
int i;
@@ -3969,7 +3969,7 @@ cw_update_outline_selection_state(khui_credwnd_tbl * tbl,
}
}
-static void
+static void
cw_update_selection_state(khui_credwnd_tbl * tbl)
{
int i;
@@ -3990,7 +3990,7 @@ cw_update_selection_state(khui_credwnd_tbl * tbl)
}
/* Examine the current row and set the UI context */
-static void
+static void
cw_set_row_context(khui_credwnd_tbl * tbl, int row)
{
khui_credwnd_outline * o;
@@ -4094,11 +4094,11 @@ cw_set_row_context(khui_credwnd_tbl * tbl, int row)
do {
headers[n_headers].attr_id =
o->attr_id;
- if (tbl->cols[o->col].attr_id ==
+ if (tbl->cols[o->col].attr_id ==
KCDB_ATTR_ID_NAME) {
headers[n_headers].data = &(o->data);
headers[n_headers].cb_data = sizeof(khm_handle);
- } else if (tbl->cols[o->col].attr_id ==
+ } else if (tbl->cols[o->col].attr_id ==
KCDB_ATTR_TYPE_NAME) {
headers[n_headers].data = &(o->data);
headers[n_headers].cb_data = sizeof(khm_int32);
@@ -4155,7 +4155,7 @@ cw_select_all(khui_credwnd_tbl * tbl)
InvalidateRect(tbl->hwnd, NULL, FALSE);
}
-static void
+static void
cw_select_row(khui_credwnd_tbl * tbl, int row, WPARAM wParam)
{
int i;
@@ -4290,7 +4290,7 @@ cw_toggle_outline_state(khui_credwnd_tbl * tbl,
LRESULT cw_properties(HWND hwnd);
-LRESULT
+LRESULT
cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -4356,7 +4356,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (!(o->flags & KHUI_CW_O_NOOUTLINE)) {
if(x >= 0 && x < KHUI_SMICON_CX) /* hit */ {
nm_state |= CW_MOUSE_WOUTLINE | CW_MOUSE_WIDGET;
- } else if (tbl->cols[tbl->rows[row].col].attr_id ==
+ } else if (tbl->cols[tbl->rows[row].col].attr_id ==
KCDB_ATTR_ID_NAME &&
col == tbl->rows[row].col &&
x >= KHUI_SMICON_CX * 3 / 2 &&
@@ -4391,7 +4391,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
nm_state &= ~CW_MOUSE_WMASK;
}
- if(!(nm_state & CW_MOUSE_LDOWN) &&
+ if(!(nm_state & CW_MOUSE_LDOWN) &&
(tbl->mouse_state & CW_MOUSE_LDOWN) &&
tbl->mouse_row == nm_row) {
@@ -4455,7 +4455,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if(tbl->mouse_state & CW_MOUSE_WOUTLINE) {
r.left = tbl->cols[tbl->mouse_col].x - tbl->scr_left;
- r.top = tbl->mouse_row * tbl->cell_height +
+ r.top = tbl->mouse_row * tbl->cell_height +
tbl->header_height - tbl->scr_top;
r.right = r.left + KHUI_SMICON_CX;
r.bottom = r.top + tbl->cell_height;
@@ -4472,9 +4472,9 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
} else {
- r.left = KHUI_SMICON_CX * 3 / 2 +
+ r.left = KHUI_SMICON_CX * 3 / 2 +
tbl->cols[tbl->mouse_col].x - tbl->scr_left;
- r.top = tbl->mouse_row * tbl->cell_height +
+ r.top = tbl->mouse_row * tbl->cell_height +
tbl->header_height - tbl->scr_top;
r.right = r.left + KHUI_SMICON_CX;
r.bottom = r.top + tbl->cell_height;
@@ -4494,7 +4494,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* same code block as above */
if(tbl->mouse_state & CW_MOUSE_WOUTLINE) {
r.left = tbl->cols[tbl->mouse_col].x - tbl->scr_left;
- r.top = tbl->mouse_row * tbl->cell_height +
+ r.top = tbl->mouse_row * tbl->cell_height +
tbl->header_height - tbl->scr_top;
r.right = r.left + KHUI_SMICON_CX;
r.bottom = r.top + tbl->cell_height;
@@ -4511,9 +4511,9 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
} else {
- r.left = KHUI_SMICON_CX * 3 / 2 +
+ r.left = KHUI_SMICON_CX * 3 / 2 +
tbl->cols[tbl->mouse_col].x - tbl->scr_left;
- r.top = tbl->mouse_row * tbl->cell_height +
+ r.top = tbl->mouse_row * tbl->cell_height +
tbl->header_height - tbl->scr_top;
r.right = r.left + KHUI_SMICON_CX;
r.bottom = r.top + tbl->cell_height;
@@ -4543,7 +4543,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
}
-LRESULT
+LRESULT
cw_wm_hscroll(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -4618,13 +4618,13 @@ cw_wm_hscroll(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
sr.top = cr.top;
sr.bottom = lr.top;
ScrollWindowEx(
- hwnd,
- dx,
- 0,
- &sr,
- &sr,
- NULL,
- NULL,
+ hwnd,
+ dx,
+ 0,
+ &sr,
+ &sr,
+ NULL,
+ NULL,
SW_INVALIDATE | SW_SCROLLCHILDREN);
}
@@ -4634,13 +4634,13 @@ cw_wm_hscroll(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
sr.top = lr.top;
sr.bottom = lr.bottom;
ScrollWindowEx(
- hwnd,
- dx,
- 0,
- &sr,
- &sr,
- NULL,
- NULL,
+ hwnd,
+ dx,
+ 0,
+ &sr,
+ &sr,
+ NULL,
+ NULL,
SW_INVALIDATE | SW_SCROLLCHILDREN);
}
@@ -4679,13 +4679,13 @@ cw_vscroll_to_pos(HWND hwnd, khui_credwnd_tbl * tbl, int newpos) {
sr.top = cr.top;
sr.bottom = cr.bottom;
ScrollWindowEx(
- hwnd,
- 0,
- dy,
- &sr,
- &sr,
- NULL,
- NULL,
+ hwnd,
+ 0,
+ dy,
+ &sr,
+ &sr,
+ NULL,
+ NULL,
SW_INVALIDATE);
}
@@ -4695,13 +4695,13 @@ cw_vscroll_to_pos(HWND hwnd, khui_credwnd_tbl * tbl, int newpos) {
sr.top = cr.top;
sr.bottom = lr.top;
ScrollWindowEx(
- hwnd,
- 0,
- dy,
- &sr,
- &sr,
- NULL,
- NULL,
+ hwnd,
+ 0,
+ dy,
+ &sr,
+ &sr,
+ NULL,
+ NULL,
SW_INVALIDATE);
}
@@ -4710,7 +4710,7 @@ cw_vscroll_to_pos(HWND hwnd, khui_credwnd_tbl * tbl, int newpos) {
}
}
-LRESULT
+LRESULT
cw_wm_vscroll(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -4793,7 +4793,7 @@ cw_ensure_row_visible(HWND hwnd, khui_credwnd_tbl * tbl, int row) {
cw_vscroll_to_pos(hwnd, tbl, newpos);
}
-static INT_PTR CALLBACK
+static INT_PTR CALLBACK
cw_pp_ident_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -4849,7 +4849,7 @@ cw_pp_ident_proc(HWND hwnd,
return TRUE;
case WM_COMMAND:
- s = (khui_property_sheet *) (LONG_PTR)
+ s = (khui_property_sheet *) (LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (s == NULL)
return 0;
@@ -4909,7 +4909,7 @@ cw_pp_ident_proc(HWND hwnd,
khm_int32 flags;
lpp = (LPPSHNOTIFY) lParam;
- s = (khui_property_sheet *) (LONG_PTR)
+ s = (khui_property_sheet *) (LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (s == NULL)
return 0;
@@ -4931,8 +4931,8 @@ cw_pp_ident_proc(HWND hwnd,
case PSN_RESET:
kcdb_identity_get_flags(s->identity, &flags);
- CheckDlgButton(hwnd,
- IDC_PP_IDDEF,
+ CheckDlgButton(hwnd,
+ IDC_PP_IDDEF,
((flags & KCDB_IDENT_FLAG_DEFAULT)?BST_CHECKED:
BST_UNCHECKED));
@@ -4954,7 +4954,7 @@ cw_pp_ident_proc(HWND hwnd,
return FALSE;
}
-static INT_PTR CALLBACK
+static INT_PTR CALLBACK
cw_pp_cred_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -4987,7 +4987,7 @@ cw_pp_cred_proc(HWND hwnd,
return FALSE;
}
-static void
+static void
cw_pp_begin(khui_property_sheet * s)
{
PROPSHEETPAGE *p;
@@ -5021,7 +5021,7 @@ cw_pp_begin(khui_property_sheet * s)
}
}
-static void
+static void
cw_pp_precreate(khui_property_sheet * s)
{
khui_ps_show_sheet(khm_hwnd_main, s);
@@ -5029,7 +5029,7 @@ cw_pp_precreate(khui_property_sheet * s)
khm_add_property_sheet(s);
}
-static void
+static void
cw_pp_end(khui_property_sheet * s)
{
khui_property_page * p = NULL;
@@ -5049,7 +5049,7 @@ cw_pp_end(khui_property_sheet * s)
}
}
-static void
+static void
cw_pp_destroy(khui_property_sheet *ps)
{
if(ps->ctx.scope == KHUI_SCOPE_CRED) {
@@ -5203,7 +5203,7 @@ cw_properties(HWND hwnd)
return TRUE;
}
-LRESULT
+LRESULT
cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
khui_credwnd_tbl * tbl;
@@ -5212,7 +5212,7 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (tbl == NULL)
return 0;
- if(HIWORD(wParam) == BN_CLICKED &&
+ if(HIWORD(wParam) == BN_CLICKED &&
LOWORD(wParam) == KHUI_HTWND_CTLID) {
wchar_t wid[256];
@@ -5223,13 +5223,13 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
wid[l->id_len] = 0;
if(!wcscmp(wid, L"NewCreds")) {
- PostMessage(khm_hwnd_main, WM_COMMAND,
+ PostMessage(khm_hwnd_main, WM_COMMAND,
MAKEWPARAM(KHUI_ACTION_NEW_CRED,0), 0);
}
return TRUE;
}
- switch(LOWORD(wParam))
+ switch(LOWORD(wParam))
{
case KHUI_PACTION_ENTER:
/* enter key is a synonym for the default action, on the
@@ -5524,10 +5524,10 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
- for(r = tbl->cursor_row;
+ for(r = tbl->cursor_row;
(r >= 0 && !(tbl->rows[r].flags & KHUI_CW_ROW_HEADER));
r--);
-
+
if(r < 0)
break;
@@ -5563,7 +5563,7 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
khui_credwnd_outline * o;
int r;
- if(tbl->cursor_row < 0 ||
+ if(tbl->cursor_row < 0 ||
tbl->cursor_row >= (int) tbl->n_rows) {
cw_select_row(tbl, 0, 0);
break;
@@ -5589,7 +5589,7 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
-LRESULT
+LRESULT
cw_wm_contextmenu(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
RECT r;
@@ -5629,7 +5629,7 @@ cw_wm_contextmenu(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
x = r.left;
y = y + r.top + tbl->header_height - tbl->scr_top;
-
+
goto have_row;
}
@@ -5688,18 +5688,18 @@ cw_wm_contextmenu(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* copy and paste template */
#if 0
-LRESULT
+LRESULT
cw_wm_msg(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
#endif
-LRESULT CALLBACK
+LRESULT CALLBACK
khm_credwnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
- LPARAM lParam)
+ LPARAM lParam)
{
switch(uMsg) {
case WM_COMMAND:
@@ -5884,7 +5884,7 @@ khm_draw_identity_menu_item(HWND hwnd, LPDRAWITEMSTRUCT lpd, khui_action * act)
}
}
-void
+void
khm_register_credwnd_class(void) {
WNDCLASSEX wcx;
kcdb_attrib attrib;
@@ -5920,12 +5920,12 @@ khm_register_credwnd_class(void) {
khui_cw_flag_id = attr_id;
}
-void
+void
khm_unregister_credwnd_class(void) {
UnregisterClass(MAKEINTATOM(khui_credwnd_cls), khm_hInstance);
}
-HWND
+HWND
khm_create_credwnd(HWND parent) {
RECT r;
HWND hwnd;
diff --git a/src/windows/identity/ui/debugfuncs.c b/src/windows/identity/ui/debugfuncs.c
index 384f40ea6a..ad478e5fd0 100644
--- a/src/windows/identity/ui/debugfuncs.c
+++ b/src/windows/identity/ui/debugfuncs.c
@@ -140,7 +140,7 @@ debug_event_handler(enum kherr_ctx_event e,
kherr_evaluate_event(evt);
FileTimeToSystemTime(&evt->time_ft, &systime);
-
+
fprintf(logfile,
"%d[%d](%S)\t",
c->serial,
diff --git a/src/windows/identity/ui/htwnd.c b/src/windows/identity/ui/htwnd.c
index 7586b3e87d..29c4221a71 100644
--- a/src/windows/identity/ui/htwnd.c
+++ b/src/windows/identity/ui/htwnd.c
@@ -75,7 +75,7 @@ ATOM khui_htwnd_cls;
struct tx_tbl_t {
wchar_t * string;
LONG value;
-}
+}
htw_color_table[] = {
{L"black", RGB(0,0,0)},
@@ -278,7 +278,7 @@ static wchar_t * skip_ws(wchar_t * s) {
return s;
}
-/* s points to something like " = \"value\""
+/* s points to something like " = \"value\""
start and len will point to the start and
length of value. return value will point to the
character following the last double quote. */
@@ -332,14 +332,14 @@ We currently support the following tags:
*/
static int htw_parse_tag(
- wchar_t * start,
- wchar_t ** end,
- int * align,
- khui_htwnd_data * d,
- format_stack * s,
+ wchar_t * start,
+ wchar_t ** end,
+ int * align,
+ khui_htwnd_data * d,
+ format_stack * s,
PPOINT p_abs,
PPOINT p_rel,
- int lh,
+ int lh,
BOOL dry_run)
{
wchar_t * c;
@@ -454,7 +454,7 @@ static int htw_parse_tag(
c = wcschr(c, L'>');
if(!c)
c = c + wcslen(c);
-
+
if(align_s)
*align = table_lookup(htw_align_table, ARRAYLENGTH(htw_align_table), align_s, align_len);
@@ -489,7 +489,7 @@ static int htw_parse_tag(
*align = ALIGN_CENTER;
n = 1;
} else if(!_wcsnicmp(start, L"left", c - start) ||
- !_wcsnicmp(start, L"p", c - start))
+ !_wcsnicmp(start, L"p", c - start))
{
c = wcschr(c, L'>');
if(!c)
@@ -1048,7 +1048,7 @@ LRESULT CALLBACK khui_htwnd_proc(HWND hwnd,
if(hwnd != (HWND)wParam)
break;
-
+
d = (khui_htwnd_data *)(LONG_PTR) GetWindowLongPtr(hwnd, 0);
if (d == NULL)
break;
@@ -1221,7 +1221,7 @@ LRESULT CALLBACK khui_htwnd_proc(HWND hwnd,
p.x = GET_X_LPARAM(lParam) + d->scroll_left;
p.y = GET_Y_LPARAM(lParam) + d->scroll_top;
-
+
for(i=0; i<d->n_links; i++) {
if(d->links && d->links[i] && PtInRect(&(d->links[i]->r), p))
break;
diff --git a/src/windows/identity/ui/main.c b/src/windows/identity/ui/main.c
index f8bcde8829..d1d3ecdcab 100644
--- a/src/windows/identity/ui/main.c
+++ b/src/windows/identity/ui/main.c
@@ -177,9 +177,9 @@ khm_cmdline_dlg_proc(HWND hwnd,
return TRUE;
case WM_CLOSE:
-
+
EndDialog(hwnd, KHM_ERROR_EXIT);
-
+
return TRUE;
}
@@ -192,7 +192,7 @@ void khm_show_commandline_help(void) {
hm_richedit = LoadLibrary(L"riched20.dll");
if (hm_richedit == NULL)
return;
-
+
DialogBox(khm_hInstance, MAKEINTRESOURCE(IDD_CMDLINE),
NULL, khm_cmdline_dlg_proc);
@@ -302,7 +302,7 @@ void khm_register_window_classes(void) {
ZeroMemory(&ics, sizeof(ics));
ics.dwSize = sizeof(ics);
- ics.dwICC =
+ ics.dwICC =
ICC_COOL_CLASSES |
ICC_BAR_CLASSES |
ICC_DATE_CLASSES |
@@ -481,7 +481,7 @@ void khm_del_dialog(HWND dlg) {
if(khui_dialogs[i].hwnd == dlg)
break;
}
-
+
if(i < n_khui_dialogs)
n_khui_dialogs--;
else
@@ -696,7 +696,7 @@ int khm_compare_version(const khm_version * v1, const khm_version * v2) {
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
- int nCmdShow)
+ int nCmdShow)
{
int rv = 0;
HANDLE h_appmutex;
@@ -741,7 +741,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
khm_commctl_version = khm_get_commctl_version(NULL);
- /* we only open a main window if this is the only instance
+ /* we only open a main window if this is the only instance
of the application that is running. */
kmq_init();
khm_init_gui();
@@ -888,7 +888,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
MessageBox(NULL, error_msg, error_title,
MB_OK);
-
+
goto done_with_remote;
}
diff --git a/src/windows/identity/ui/mainmenu.c b/src/windows/identity/ui/mainmenu.c
index 8645dc7bc6..d61b8d7cc0 100644
--- a/src/windows/identity/ui/mainmenu.c
+++ b/src/windows/identity/ui/mainmenu.c
@@ -44,8 +44,8 @@ int il_icon_id[MAX_ILIST];
void khui_init_menu(void) {
int i;
- il_icon = khui_create_ilist(ILIST_ICON_X,
- ILIST_ICON_Y,
+ il_icon = khui_create_ilist(ILIST_ICON_X,
+ ILIST_ICON_Y,
MAX_ILIST, 5, 0);
for(i=0;i<MAX_ILIST;i++)
il_icon_id[i] = -1;
@@ -66,10 +66,10 @@ int khui_get_icon_index(int id) {
return i;
}
- hbm = LoadImage(khm_hInstance,
- MAKEINTRESOURCE(id),
- IMAGE_BITMAP,
- ILIST_ICON_X, ILIST_ICON_Y,
+ hbm = LoadImage(khm_hInstance,
+ MAKEINTRESOURCE(id),
+ IMAGE_BITMAP,
+ ILIST_ICON_X, ILIST_ICON_Y,
LR_DEFAULTCOLOR);
i = khui_ilist_add_masked(il_icon, hbm, KHUI_TOOLBAR_BGCOLOR);
il_icon_id[i] = id;
@@ -122,7 +122,7 @@ void khm_get_action_tooltip(khm_int32 action, wchar_t * buf, khm_size cb_buf) {
khui_action_unlock();
}
-void add_action_to_menu(HMENU hm, khui_action * act,
+void add_action_to_menu(HMENU hm, khui_action * act,
int idx, int flags) {
MENUITEMINFO mii;
wchar_t buf[MAX_RES_STRING] = L"";
@@ -148,7 +148,7 @@ void add_action_to_menu(HMENU hm, khui_action * act,
} else {
khm_get_action_caption(act->cmd, buf, sizeof(buf));
- if(khui_get_cmd_accel_string(act->cmd, accel,
+ if(khui_get_cmd_accel_string(act->cmd, accel,
ARRAYLENGTH(accel))) {
StringCbCat(buf, sizeof(buf), L"\t");
StringCbCat(buf, sizeof(buf), accel);
@@ -170,7 +170,7 @@ void add_action_to_menu(HMENU hm, khui_action * act,
mii.fState = 0;
}
- if((act->type & KHUI_ACTIONTYPE_TOGGLE) &&
+ if((act->type & KHUI_ACTIONTYPE_TOGGLE) &&
(act->state & KHUI_ACTIONSTATE_CHECKED)) {
mii.fMask |= MIIM_STATE;
mii.fState |= MFS_CHECKED;
@@ -200,7 +200,7 @@ void add_action_to_menu(HMENU hm, khui_action * act,
static void refresh_menu(HMENU hm, khui_menu_def * def);
-static int refresh_menu_item(HMENU hm, khui_action * act,
+static int refresh_menu_item(HMENU hm, khui_action * act,
int idx, int flags) {
MENUITEMINFO mii;
khui_menu_def * def;
@@ -339,9 +339,9 @@ static void mm_show_panel_def(khui_menu_def * def, LONG x, LONG y)
if (mm_hot_track)
mm_begin_hot_track();
- TrackPopupMenuEx(hm,
- TPM_LEFTALIGN | TPM_TOPALIGN |
- TPM_VERPOSANIMATION,
+ TrackPopupMenuEx(hm,
+ TPM_LEFTALIGN | TPM_TOPALIGN |
+ TPM_VERPOSANIMATION,
x, y, khm_hwnd_main, NULL);
mm_last_hot_item = -1;
@@ -377,17 +377,17 @@ LRESULT khm_menu_activate(int menu_id) {
else
menu_id = 0;
} else if(menu_id == MENU_ACTIVATE_LEFT) {
- menu_id = (mm_last_hot_item > 0)?
- mm_last_hot_item - 1:
+ menu_id = (mm_last_hot_item > 0)?
+ mm_last_hot_item - 1:
((mm_last_hot_item == 0)? nmm - 1: 0);
} else if(menu_id == MENU_ACTIVATE_RIGHT) {
- menu_id = (mm_last_hot_item >=0 && mm_last_hot_item < nmm - 1)?
- mm_last_hot_item + 1:
+ menu_id = (mm_last_hot_item >=0 && mm_last_hot_item < nmm - 1)?
+ mm_last_hot_item + 1:
0;
} else if(menu_id == MENU_ACTIVATE_NONE) {
menu_id = -1;
}
-
+
SendMessage(khui_main_menu_toolbar,
TB_SETHOTITEM,
menu_id,
@@ -438,7 +438,7 @@ LRESULT khm_menu_draw_item(WPARAM wParam, LPARAM lParam) {
if(!resid) /* nothing to draw */
return TRUE;
-
+
iidx = khui_get_icon_index(resid);
if(iidx == -1)
return TRUE;
@@ -448,10 +448,10 @@ LRESULT khm_menu_draw_item(WPARAM wParam, LPARAM lParam) {
if(lpd->itemState & ODS_HOTLIGHT || lpd->itemState & ODS_SELECTED) {
style |= ILD_SELECTED;
}
-
- khui_ilist_draw(il_icon,
- iidx,
- lpd->hDC,
+
+ khui_ilist_draw(il_icon,
+ iidx,
+ lpd->hDC,
lpd->rcItem.left, lpd->rcItem.top, style);
}
@@ -487,7 +487,7 @@ void khm_track_menu(int menu) {
mm_last_hot_item = mm_next_hot_item;
mm_next_hot_item = -1;
- PostMessage(khm_hwnd_main, WM_COMMAND,
+ PostMessage(khm_hwnd_main, WM_COMMAND,
MAKEWPARAM(KHUI_PACTION_MENU,0),
MAKELPARAM(mm_last_hot_item,1));
}
@@ -499,7 +499,7 @@ void khm_menu_track_current(void) {
}
LRESULT khm_menu_handle_select(WPARAM wParam, LPARAM lParam) {
- if((HIWORD(wParam) == 0xffff && lParam == 0) ||
+ if((HIWORD(wParam) == 0xffff && lParam == 0) ||
(HIWORD(wParam) & MF_POPUP)) {
/* the menu was closed */
khm_statusbar_set_part(KHUI_SBPART_INFO, NULL, NULL);
@@ -602,8 +602,8 @@ LRESULT khm_menu_notify_main(LPNMHDR notice) {
case TBN_DROPDOWN:
khm_track_menu(-1);
/*
- khm_menu_show_panel(nmt->iItem,
- r.left + nmt->rcButton.left,
+ khm_menu_show_panel(nmt->iItem,
+ r.left + nmt->rcButton.left,
r.top + nmt->rcButton.bottom);
*/
ret = TBDDRET_DEFAULT;
@@ -628,7 +628,7 @@ LRESULT khm_menu_notify_main(LPNMHDR notice) {
}
}
- if (mm_hot_track &&
+ if (mm_hot_track &&
new_item != mm_last_hot_item &&
new_item != -1 &&
mm_last_hot_item != -1) {
@@ -1156,8 +1156,8 @@ void khm_menu_create_main(HWND parent) {
,
TOOLBARCLASSNAME,
(LPWSTR) NULL,
- WS_CHILD |
- CCS_ADJUSTABLE |
+ WS_CHILD |
+ CCS_ADJUSTABLE |
TBSTYLE_FLAT |
TBSTYLE_AUTOSIZE |
TBSTYLE_LIST |
@@ -1183,18 +1183,18 @@ void khm_menu_create_main(HWND parent) {
0);
for(i=0; i<nmm; i++) {
- khui_add_action_to_toolbar(hwtb,
- khui_find_action(mm[i].action),
- KHUI_TOOLBAR_ADD_TEXT |
- KHUI_TOOLBAR_ADD_DROPDOWN |
- KHUI_TOOLBAR_VARSIZE,
+ khui_add_action_to_toolbar(hwtb,
+ khui_find_action(mm[i].action),
+ KHUI_TOOLBAR_ADD_TEXT |
+ KHUI_TOOLBAR_ADD_DROPDOWN |
+ KHUI_TOOLBAR_VARSIZE,
NULL);
}
SendMessage(hwtb,
TB_AUTOSIZE,
0,0);
-
+
SendMessage(hwtb,
TB_GETMAXSIZE,
0,
@@ -1204,15 +1204,15 @@ void khm_menu_create_main(HWND parent) {
rbi.cbSize = sizeof(rbi);
- rbi.fMask =
+ rbi.fMask =
RBBIM_ID |
- RBBIM_STYLE |
- RBBIM_CHILD |
- RBBIM_CHILDSIZE |
- RBBIM_SIZE |
- RBBIM_IDEALSIZE;
+ RBBIM_STYLE |
+ RBBIM_CHILD |
+ RBBIM_CHILDSIZE |
+ RBBIM_SIZE |
+ RBBIM_IDEALSIZE;
- rbi.fStyle =
+ rbi.fStyle =
RBBS_USECHEVRON;
rbi.hwndChild = hwtb;
diff --git a/src/windows/identity/ui/mainwnd.c b/src/windows/identity/ui/mainwnd.c
index 6802cd2570..9d1556798e 100644
--- a/src/windows/identity/ui/mainwnd.c
+++ b/src/windows/identity/ui/mainwnd.c
@@ -187,7 +187,7 @@ khm_ui_cb(LPARAM lParam) {
}
-static void
+static void
main_wnd_save_sizepos() {
RECT r;
khm_handle csp_cw;
@@ -218,7 +218,7 @@ main_wnd_save_sizepos() {
khc_write_int32(csp_mw, L"Width", r.right - r.left);
khc_write_int32(csp_mw, L"Height", r.bottom - r.top);
- if (KHM_SUCCEEDED(khc_read_int32(csp_mw, L"Dock", &t)) &&
+ if (KHM_SUCCEEDED(khc_read_int32(csp_mw, L"Dock", &t)) &&
t != KHM_DOCK_NONE) {
khc_write_int32(csp_mw, L"Dock", KHM_DOCK_AUTO);
}
@@ -230,11 +230,11 @@ main_wnd_save_sizepos() {
}
}
-LRESULT CALLBACK
+LRESULT CALLBACK
khm_main_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
- LPARAM lParam)
+ LPARAM lParam)
{
LPNMHDR lpnm;
@@ -399,7 +399,7 @@ khm_main_wnd_proc(HWND hwnd,
/* properties are not handled by the main window.
Just bounce it to credwnd. However, use SendMessage
instead of PostMessage so we don't lose context */
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
case KHUI_ACTION_UICB:
@@ -409,7 +409,7 @@ khm_main_wnd_proc(HWND hwnd,
/* layout control */
case KHUI_ACTION_VIEW_ALL_IDS:
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
case KHUI_ACTION_LAYOUT_MINI:
@@ -419,11 +419,11 @@ khm_main_wnd_proc(HWND hwnd,
} else {
khm_set_main_window_mode(KHM_MAIN_WND_MINI);
}
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
case KHUI_ACTION_LAYOUT_RELOAD:
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
case KHUI_ACTION_LAYOUT_ID:
@@ -431,7 +431,7 @@ khm_main_wnd_proc(HWND hwnd,
case KHUI_ACTION_LAYOUT_LOC:
case KHUI_ACTION_LAYOUT_CUST:
khm_set_main_window_mode(KHM_MAIN_WND_NORMAL);
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
/* menu commands */
@@ -490,7 +490,7 @@ khm_main_wnd_proc(HWND hwnd,
case KHUI_PACTION_SELALL:
/* otherwise fallthrough and bounce to the creds window */
- return SendMessage(khm_hwnd_main_cred, uMsg,
+ return SendMessage(khm_hwnd_main_cred, uMsg,
wParam, lParam);
default:
@@ -533,7 +533,7 @@ khm_main_wnd_proc(HWND hwnd,
case WM_DRAWITEM:
/* sent to draw a menu item */
- if(!wParam)
+ if(!wParam)
return khm_menu_draw_item(wParam, lParam);
break;
@@ -543,8 +543,8 @@ khm_main_wnd_proc(HWND hwnd,
return TRUE;
break;
- case WM_SIZE:
- if(hwnd == khm_hwnd_main &&
+ case WM_SIZE:
+ if(hwnd == khm_hwnd_main &&
(wParam == SIZE_MAXIMIZED || wParam == SIZE_RESTORED)) {
int cwidth, cheight;
RECT r_rebar, r_status;
@@ -556,15 +556,15 @@ khm_main_wnd_proc(HWND hwnd,
SendMessage(khm_hwnd_rebar, WM_SIZE, 0, 0);
khm_update_statusbar(hwnd);
-
+
GetWindowRect(khm_hwnd_rebar, &r_rebar);
GetWindowRect(khm_hwnd_statusbar, &r_status);
/* the cred window fills the area between the rebar
and the status bar */
- MoveWindow(khm_hwnd_main_cred, 0,
- r_rebar.bottom - r_rebar.top,
- r_status.right - r_status.left,
+ MoveWindow(khm_hwnd_main_cred, 0,
+ r_rebar.bottom - r_rebar.top,
+ r_status.right - r_status.left,
r_status.top - r_rebar.bottom, TRUE);
SetTimer(hwnd,
@@ -820,7 +820,7 @@ khm_main_wnd_proc(HWND hwnd,
xfer = MapViewOfFile(hmap, FILE_MAP_WRITE, 0, 0,
sizeof(khm_query_app_version));
-
+
if (xfer) {
khm_process_query_app_ver((khm_query_app_version *) xfer);
@@ -835,7 +835,7 @@ khm_main_wnd_proc(HWND hwnd,
return DefWindowProc(hwnd,uMsg,wParam,lParam);
}
-LRESULT CALLBACK
+LRESULT CALLBACK
khm_null_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -843,7 +843,7 @@ khm_null_wnd_proc(HWND hwnd,
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
-LRESULT
+LRESULT
khm_rebar_notify(LPNMHDR lpnm) {
switch(lpnm->code) {
#if (_WIN32_WINNT >= 0x0501)
@@ -873,20 +873,20 @@ khm_rebar_notify(LPNMHDR lpnm) {
return 1;
}
-void
+void
khm_create_main_window_controls(HWND hwnd_main) {
REBARINFO rbi;
HWND hwRebar;
khm_menu_create_main(hwnd_main);
- hwRebar =
+ hwRebar =
CreateWindowEx(WS_EX_TOOLWINDOW,
REBARCLASSNAME,
L"Rebar",
- WS_CHILD |
- WS_VISIBLE|
- WS_CLIPSIBLINGS |
+ WS_CHILD |
+ WS_VISIBLE|
+ WS_CLIPSIBLINGS |
WS_CLIPCHILDREN |
CCS_NODIVIDER |
RBS_VARHEIGHT |
@@ -1116,10 +1116,10 @@ khm_set_main_window_mode(int mode) {
khui_refresh_actions();
- /*
- * set the window position before the global khm_main_wnd_mode
+ /*
+ * set the window position before the global khm_main_wnd_mode
* is updated. otherwise, the windows position for the wrong
- * mode will be set. Do not set the window position if the
+ * mode will be set. Do not set the window position if the
* main application window has not yet been created.
*/
if (khm_hwnd_main)
@@ -1148,13 +1148,13 @@ khm_set_main_window_mode(int mode) {
khm_cred_refresh();
}
-void
+void
khm_create_main_window(void) {
wchar_t buf[1024];
khm_handle csp_cw = NULL;
RECT r;
- LoadString(khm_hInstance, IDS_MAIN_WINDOW_TITLE,
+ LoadString(khm_hInstance, IDS_MAIN_WINDOW_TITLE,
buf, ARRAYLENGTH(buf));
khm_hwnd_null =
@@ -1185,11 +1185,11 @@ khm_create_main_window(void) {
khm_get_main_window_rect(&r);
- khm_hwnd_main =
+ khm_hwnd_main =
CreateWindowEx(WS_EX_OVERLAPPEDWINDOW | WS_EX_APPWINDOW,
MAKEINTATOM(khm_main_window_class),
buf,
- WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN |
+ WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN |
WS_CLIPSIBLINGS,
r.left, r.top,
r.right - r.left,
@@ -1202,7 +1202,7 @@ khm_create_main_window(void) {
khui_set_main_window(khm_hwnd_main);
}
-void
+void
khm_show_main_window(void) {
if (khm_nCmdShow == SW_RESTORE) {
@@ -1214,11 +1214,11 @@ khm_show_main_window(void) {
}
/*
* We test for the values of khm_nCmdShow that
- * can be set at process startup. They will
- * only be seen the first time this function is
+ * can be set at process startup. They will
+ * only be seen the first time this function is
* called. After the first time, the value of
* khm_nCmdShow will always be SW_RESTORE.
- * When one of the minimized values is set,
+ * When one of the minimized values is set,
* khm_show_main_window() will not be called
* unless the user initiates a request to show
* the window.
@@ -1232,7 +1232,7 @@ khm_show_main_window(void) {
ShowWindow(khm_hwnd_main, khm_nCmdShow);
UpdateWindow(khm_hwnd_main);
-
+
khm_cred_refresh();
khm_nCmdShow = SW_RESTORE;
@@ -1257,7 +1257,7 @@ khm_activate_main_window(void) {
}
}
-void
+void
khm_close_main_window(void) {
khm_handle csp_cw;
BOOL keep_running = FALSE;
@@ -1266,7 +1266,7 @@ khm_close_main_window(void) {
KHM_PERM_READ, &csp_cw))) {
khm_int32 t;
- if (KHM_SUCCEEDED(khc_read_int32(csp_cw, L"KeepRunning",
+ if (KHM_SUCCEEDED(khc_read_int32(csp_cw, L"KeepRunning",
&t))) {
keep_running = t;
} else {
@@ -1288,7 +1288,7 @@ khm_close_main_window(void) {
DestroyWindow(khm_hwnd_main);
}
-void
+void
khm_hide_main_window(void) {
khm_handle csp_notices = NULL;
khm_int32 show_warning = FALSE;
@@ -1324,12 +1324,12 @@ khm_hide_main_window(void) {
ShowWindow(khm_hwnd_main, SW_HIDE);
}
-BOOL
+BOOL
khm_is_main_window_visible(void) {
return IsWindowVisible(khm_hwnd_main);
}
-BOOL
+BOOL
khm_is_main_window_active(void) {
if (!IsWindowVisible(khm_hwnd_main))
return FALSE;
@@ -1338,7 +1338,7 @@ khm_is_main_window_active(void) {
return khm_is_dialog_active();
}
-void
+void
khm_register_main_wnd_class(void) {
WNDCLASSEX wc;
@@ -1373,7 +1373,7 @@ khm_register_main_wnd_class(void) {
khm_main_window_class = RegisterClassEx(&wc);
}
-void
+void
khm_unregister_main_wnd_class(void) {
UnregisterClass(MAKEINTATOM(khm_main_window_class),khm_hInstance);
UnregisterClass(MAKEINTATOM(khm_null_window_class),khm_hInstance);
diff --git a/src/windows/identity/ui/mainwnd.h b/src/windows/identity/ui/mainwnd.h
index 5a00631c1a..7916697be5 100644
--- a/src/windows/identity/ui/mainwnd.h
+++ b/src/windows/identity/ui/mainwnd.h
@@ -57,7 +57,7 @@ LRESULT khm_rebar_notify(LPNMHDR lpnm);
void
khm_set_dialog_result(HWND hwnd, LRESULT lr);
-LRESULT CALLBACK
+LRESULT CALLBACK
khm_main_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
diff --git a/src/windows/identity/ui/newcredwnd.c b/src/windows/identity/ui/newcredwnd.c
index e40e9da9a7..e0c60f5c0a 100644
--- a/src/windows/identity/ui/newcredwnd.c
+++ b/src/windows/identity/ui/newcredwnd.c
@@ -50,7 +50,7 @@ nc_layout_main_panel(khui_nc_wnd_data * d);
static void
nc_layout_new_cred_window(khui_nc_wnd_data * d);
-static INT_PTR CALLBACK
+static INT_PTR CALLBACK
nc_common_dlg_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -94,7 +94,7 @@ nc_common_dlg_proc(HWND hwnd,
case KHUI_WM_NC_NOTIFY:
{
khui_nc_wnd_data * d;
- d = (khui_nc_wnd_data *)(LONG_PTR)
+ d = (khui_nc_wnd_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
break;
@@ -128,7 +128,7 @@ nc_common_dlg_proc(HWND hwnd,
originated or pertain to the identity selection
controls. */
if (d && d->nc && d->nc->ident_cb) {
- return d->nc->ident_cb(d->nc, WMNC_IDENT_WMSG, hwnd, uMsg,
+ return d->nc->ident_cb(d->nc, WMNC_IDENT_WMSG, hwnd, uMsg,
wParam, lParam);
}
}
@@ -678,7 +678,7 @@ nc_layout_main_panel(khui_nc_wnd_data * d)
d->r_credtext.top, /* y */
d->r_n_input.right - d->r_n_input.left, /* width */
d->r_credtext.bottom - d->r_credtext.top, /* height */
- SWP_NOACTIVATE | SWP_NOOWNERZORDER |
+ SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOZORDER | SWP_SHOWWINDOW);
DeferWindowPos(hdwp,
@@ -750,7 +750,7 @@ nc_tab_sort_func(const void * v1, const void * v2)
}
}
-static void
+static void
nc_notify_types(khui_new_creds * c, UINT uMsg,
WPARAM wParam, LPARAM lParam, BOOL sync)
{
@@ -829,8 +829,8 @@ nc_enable_controls(khui_nc_wnd_data * d, khm_boolean enable)
#define NC_MAXCCH_CREDTEXT 16384
#define NC_MAXCB_CREDTEXT (NC_MAXCCH_CREDTEXT * sizeof(wchar_t))
-static void
-nc_update_credtext(khui_nc_wnd_data * d)
+static void
+nc_update_credtext(khui_nc_wnd_data * d)
{
wchar_t * ctbuf = NULL;
wchar_t * buf;
@@ -846,7 +846,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
LoadString(khm_hInstance, IDS_NC_CREDTEXT_TABS, ctbuf, NC_MAXCCH_CREDTEXT);
StringCchLength(ctbuf, NC_MAXCCH_CREDTEXT, &cch);
buf = ctbuf + cch;
- nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY,
+ nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), (LPARAM) d->nc, TRUE);
/* hopefully all the types have updated their credential texts */
@@ -894,7 +894,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
password, we don't expect the identity provider to
validate the identity in real time. As such, we
assume that the identity is valid. */
-
+
/* identity is valid */
if (d->notif_type != NC_NOTIFY_NONE) {
nc_notify_clear(d);
@@ -940,7 +940,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
khm_size cbbuf;
khm_int32 flags;
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_ONE,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_ONE,
main_fmt, (int) ARRAYLENGTH(main_fmt));
cbbuf = sizeof(id_name);
@@ -949,25 +949,25 @@ nc_update_credtext(khui_nc_wnd_data * d)
kcdb_identity_get_flags(d->nc->identities[0], &flags);
if (flags & KCDB_IDENT_FLAG_INVALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else if(flags & KCDB_IDENT_FLAG_VALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else if(flags & KCDB_IDENT_FLAG_UNKNOWN) {
LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else if(d->nc->subtype == KMSG_CRED_NEW_CREDS) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_CHECKING,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_CHECKING,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
id_fmt, (int) ARRAYLENGTH(id_fmt));
}
StringCbPrintf(id_string, sizeof(id_string), id_fmt, id_name);
- StringCbPrintf(buf, NC_MAXCB_CREDTEXT - cch*sizeof(wchar_t),
+ StringCbPrintf(buf, NC_MAXCB_CREDTEXT - cch*sizeof(wchar_t),
main_fmt, id_string);
if (flags & KCDB_IDENT_FLAG_VALID) {
@@ -996,17 +996,17 @@ nc_update_credtext(khui_nc_wnd_data * d)
wchar_t main_fmt[256];
khm_size cbbuf;
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_MANY,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_MANY,
main_fmt, (int) ARRAYLENGTH(main_fmt));
/* we are going to concatenate all the identity names into
a comma separated string */
/* d->nc->n_identities is at least 2 */
- ids_string = PMALLOC((KCDB_IDENT_MAXCB_NAME + sizeof(id_fmt)) *
+ ids_string = PMALLOC((KCDB_IDENT_MAXCB_NAME + sizeof(id_fmt)) *
(d->nc->n_identities - 1));
- cb_ids_string =
- (KCDB_IDENT_MAXCB_NAME + sizeof(id_fmt)) *
+ cb_ids_string =
+ (KCDB_IDENT_MAXCB_NAME + sizeof(id_fmt)) *
(d->nc->n_identities - 1);
assert(ids_string != NULL);
@@ -1028,13 +1028,13 @@ nc_update_credtext(khui_nc_wnd_data * d)
kcdb_identity_get_name(d->nc->identities[i], id_name, &cbbuf);
kcdb_identity_get_flags(d->nc->identities[i], &flags);
if(flags & KCDB_IDENT_FLAG_INVALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else if(flags & KCDB_IDENT_FLAG_VALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
id_fmt, (int) ARRAYLENGTH(id_fmt));
}
@@ -1046,24 +1046,24 @@ nc_update_credtext(khui_nc_wnd_data * d)
kcdb_identity_get_name(d->nc->identities[0], id_name, &cbbuf);
kcdb_identity_get_flags(d->nc->identities[0], &flags);
if(flags & KCDB_IDENT_FLAG_INVALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_INVALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else if(flags & KCDB_IDENT_FLAG_VALID) {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_VALID,
id_fmt, (int) ARRAYLENGTH(id_fmt));
} else {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_UNCHECKED,
id_fmt, (int) ARRAYLENGTH(id_fmt));
}
StringCbPrintf(id_string, sizeof(id_string), id_fmt, id_name);
- StringCbPrintf(buf, NC_MAXCB_CREDTEXT - cch*sizeof(wchar_t),
+ StringCbPrintf(buf, NC_MAXCB_CREDTEXT - cch*sizeof(wchar_t),
main_fmt, id_string, ids_string);
PFREE(ids_string);
}
} else {
- LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_NONE,
+ LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_NONE,
buf, (int)(NC_MAXCCH_CREDTEXT - cch));
}
@@ -1078,7 +1078,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
for(i=0; i<d->nc->n_types; i++) {
if(d->nc->types[i]->credtext != NULL) {
- StringCbCatEx(buf, cb,
+ StringCbCatEx(buf, cb,
d->nc->types[i]->credtext,
&buf, &cb,
0);
@@ -1097,7 +1097,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
if(d->nc->n_identities > 0) {
khm_int32 flags = 0;
- if(KHM_SUCCEEDED(kcdb_identity_get_flags(d->nc->identities[0],
+ if(KHM_SUCCEEDED(kcdb_identity_get_flags(d->nc->identities[0],
&flags)) &&
(flags & KCDB_IDENT_FLAG_VALID)) {
validId = TRUE;
@@ -1117,7 +1117,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
LoadString(khm_hInstance, IDS_WTPOST_PASSWORD,
wpostfix, (int) ARRAYLENGTH(wpostfix));
else
- LoadString(khm_hInstance, IDS_WTPOST_NEW_CREDS,
+ LoadString(khm_hInstance, IDS_WTPOST_NEW_CREDS,
wpostfix, (int) ARRAYLENGTH(wpostfix));
StringCbCat(wtitle, sizeof(wtitle), wpostfix);
@@ -1130,7 +1130,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
LoadString(khm_hInstance, IDS_WT_PASSWORD,
wtitle, (int) ARRAYLENGTH(wtitle));
else
- LoadString(khm_hInstance, IDS_WT_NEW_CREDS,
+ LoadString(khm_hInstance, IDS_WT_NEW_CREDS,
wtitle, (int) ARRAYLENGTH(wtitle));
SetWindowText(d->nc->hwnd, wtitle);
@@ -1336,7 +1336,7 @@ nc_layout_new_cred_window(khui_nc_wnd_data * ncd) {
#define CW_PARAM DWLP_USER
-static LRESULT
+static LRESULT
nc_handle_wm_create(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1415,7 +1415,7 @@ nc_handle_wm_create(HWND hwnd,
RECT r_area;
RECT r_row;
HWND hw;
-
+
/* During the operation of the new credentials window, we will
need to dynamically change the layout of the controls as a
result of custom prompting from credentials providers and
@@ -1616,7 +1616,7 @@ nc_handle_wm_create(HWND hwnd,
/* add a control row supplied by an identity provider */
static void
-nc_add_control_row(khui_nc_wnd_data * d,
+nc_add_control_row(khui_nc_wnd_data * d,
HWND label,
HWND input,
khui_control_size size)
@@ -1697,7 +1697,7 @@ nc_add_control_row(khui_nc_wnd_data * d,
}
-static LRESULT
+static LRESULT
nc_handle_wm_destroy(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1733,7 +1733,7 @@ nc_handle_wm_destroy(HWND hwnd,
return TRUE;
}
-static LRESULT
+static LRESULT
nc_handle_wm_command(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1761,9 +1761,9 @@ nc_handle_wm_command(HWND hwnd,
nc_enable_controls(d, FALSE);
- nc_notify_types(d->nc,
- KHUI_WM_NC_NOTIFY,
- MAKEWPARAM(0,WMNC_DIALOG_PREPROCESS),
+ nc_notify_types(d->nc,
+ KHUI_WM_NC_NOTIFY,
+ MAKEWPARAM(0,WMNC_DIALOG_PREPROCESS),
(LPARAM) d->nc,
TRUE);
@@ -1795,10 +1795,10 @@ nc_handle_wm_command(HWND hwnd,
return FALSE;
case IDC_NC_BASIC:
- case IDC_NC_ADVANCED:
+ case IDC_NC_ADVANCED:
/* the Options button in the main window was clicked. we
respond by expanding the dialog. */
- PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_EXPAND), 0);
return FALSE;
@@ -1818,7 +1818,7 @@ nc_handle_wm_command(HWND hwnd,
StringCchCopyN(sid, ARRAYLENGTH(sid), l->id, l->id_len);
sid[l->id_len] = L'\0'; /* just make sure */
- if(l->param != NULL &&
+ if(l->param != NULL &&
l->param_len < ARRAYLENGTH(sparam) &&
l->param_len > 0) {
@@ -1870,7 +1870,7 @@ nc_handle_wm_command(HWND hwnd,
khm_int32 credtype;
khui_new_creds_by_type * t;
- if (KHM_SUCCEEDED(kcdb_credtype_get_id(sparam,
+ if (KHM_SUCCEEDED(kcdb_credtype_get_id(sparam,
&credtype)) &&
KHM_SUCCEEDED(khui_cw_find_type(d->nc,
credtype, &t))) {
@@ -1918,7 +1918,7 @@ static LRESULT nc_handle_wm_moving(HWND hwnd,
if (d == NULL)
return FALSE;
- nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY,
+ nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_MOVE), (LPARAM) d->nc, TRUE);
return FALSE;
@@ -1996,7 +1996,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
d->nc->types[i]->hwnd_panel = NULL;
} else {
/* Create the dialog panel */
- d->nc->types[i]->hwnd_panel =
+ d->nc->types[i]->hwnd_panel =
CreateDialogParam(d->nc->types[i]->h_module,
d->nc->types[i]->dlg_template,
d->nc->hwnd,
@@ -2035,7 +2035,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
tabitem.mask = TCIF_PARAM | TCIF_TEXT;
- LoadString(khm_hInstance, IDS_NC_IDENTITY,
+ LoadString(khm_hInstance, IDS_NC_IDENTITY,
wname, ARRAYLENGTH(wname));
tabitem.pszText = wname;
@@ -2050,9 +2050,9 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
/* We should sort the tabs first. See
nc_tab_sort_func() for sort criteria. */
- qsort(d->nc->types,
- d->nc->n_types,
- sizeof(*(d->nc->types)),
+ qsort(d->nc->types,
+ d->nc->n_types,
+ sizeof(*(d->nc->types)),
nc_tab_sort_func);
for(i=0; i < d->nc->n_types;i++) {
@@ -2068,9 +2068,9 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
if(KHM_FAILED
(kcdb_credtype_describe
- (d->nc->types[i]->type,
- wname,
- &cbsize,
+ (d->nc->types[i]->type,
+ wname,
+ &cbsize,
KCDB_TS_SHORT))) {
#ifdef DEBUG
@@ -2207,7 +2207,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
}
for(i=0;i<d->nc->n_prompts;i++) {
- if(!(d->nc->prompts[i]->flags &
+ if(!(d->nc->prompts[i]->flags &
KHUI_NCPROMPT_FLAG_STOCK)) {
if(d->nc->prompts[i]->hwnd_static != NULL)
DestroyWindow(d->nc->prompts[i]->hwnd_static);
@@ -2251,7 +2251,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
#if 0
/* special case, we have one prompt and it is a password
prompt. very common */
- if(d->nc->n_prompts == 1 &&
+ if(d->nc->n_prompts == 1 &&
d->nc->prompts[0]->type == KHUI_NCPROMPT_TYPE_PASSWORD) {
hw = GetDlgItem(d->dlg_main, IDC_NC_PASSWORD);
@@ -2283,7 +2283,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
d->nc->pname,
SS_SUNKEN | WS_CHILD,
d->r_area.left, y,
- d->r_row.right,
+ d->r_row.right,
d->r_n_label.bottom - d->r_n_label.top,
d->dlg_main,
NULL,
@@ -2301,7 +2301,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
}
if (d->nc->banner != NULL) {
- hw =
+ hw =
CreateWindowEx
(0,
L"STATIC",
@@ -2334,8 +2334,8 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
if (d->nc->prompts[i]->prompt != NULL) {
SIZE s;
- GetTextExtentPoint32(hdc,
- d->nc->prompts[i]->prompt,
+ GetTextExtentPoint32(hdc,
+ d->nc->prompts[i]->prompt,
(int) wcslen(d->nc->prompts[i]->prompt),
&s);
@@ -2352,8 +2352,8 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
int dy;
if(d->nc->prompts[i]->prompt != NULL) {
- GetTextExtentPoint32(hdc,
- d->nc->prompts[i]->prompt,
+ GetTextExtentPoint32(hdc,
+ d->nc->prompts[i]->prompt,
(int) wcslen(d->nc->prompts[i]->prompt),
&s);
if(s.cx < d->r_n_label.right - d->r_n_label.left &&
@@ -2372,11 +2372,11 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
pr.left = 0;
pr.right = d->r_row.right;
pr.top = 0;
- pr.bottom = d->r_n_label.bottom -
+ pr.bottom = d->r_n_label.bottom -
d->r_n_label.top;
CopyRect(&er, &d->r_n_input);
OffsetRect(&er, 0, pr.bottom);
- dy = er.bottom + (d->r_row.bottom -
+ dy = er.bottom + (d->r_row.bottom -
d->r_n_input.bottom);
}
} else {
@@ -2405,7 +2405,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
assert(hw);
#endif
- SendMessage(hw, WM_SETFONT,
+ SendMessage(hw, WM_SETFONT,
(WPARAM) hf, (LPARAM) TRUE);
SetWindowPos(hw, hw_prev,
@@ -2423,11 +2423,11 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
hw = CreateWindowEx
(0,
L"EDIT",
- (d->nc->prompts[i]->def ?
+ (d->nc->prompts[i]->def ?
d->nc->prompts[i]->def : L""),
WS_CHILD | WS_TABSTOP |
WS_BORDER | ES_AUTOHSCROLL |
- ((d->nc->prompts[i]->flags &
+ ((d->nc->prompts[i]->flags &
KHUI_NCPROMPT_FLAG_HIDDEN)? ES_PASSWORD:0),
er.left, er.top,
er.right - er.left, er.bottom - er.top,
@@ -2440,13 +2440,13 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
assert(hw);
#endif
- SendMessage(hw, WM_SETFONT,
+ SendMessage(hw, WM_SETFONT,
(WPARAM) hf, (LPARAM) TRUE);
SetWindowPos(hw, hw_prev,
- 0, 0, 0, 0,
- SWP_NOACTIVATE | SWP_NOMOVE |
- SWP_NOOWNERZORDER | SWP_NOSIZE |
+ 0, 0, 0, 0,
+ SWP_NOACTIVATE | SWP_NOMOVE |
+ SWP_NOOWNERZORDER | SWP_NOSIZE |
SWP_SHOWWINDOW);
SendMessage(hw, EM_SETLIMITTEXT,
@@ -2984,12 +2984,12 @@ HWND khm_create_newcredwnd(HWND parent, khui_new_creds * c)
if (c->window_title == NULL) {
if (c->subtype == KMSG_CRED_PASSWORD)
- LoadString(khm_hInstance,
+ LoadString(khm_hInstance,
IDS_WT_PASSWORD,
wtitle,
ARRAYLENGTH(wtitle));
else
- LoadString(khm_hInstance,
+ LoadString(khm_hInstance,
IDS_WT_NEW_CREDS,
wtitle,
ARRAYLENGTH(wtitle));
@@ -3022,13 +3022,13 @@ HWND khm_create_newcredwnd(HWND parent, khui_new_creds * c)
void khm_prep_newcredwnd(HWND hwnd)
{
- SendMessage(hwnd, KHUI_WM_NC_NOTIFY,
+ SendMessage(hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_SETUP), 0);
}
void khm_show_newcredwnd(HWND hwnd)
{
/* add all the panels in and prep UI */
- PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_DIALOG_ACTIVATE), 0);
}
diff --git a/src/windows/identity/ui/notifier.c b/src/windows/identity/ui/notifier.c
index 84db735c06..fe057c78f7 100644
--- a/src/windows/identity/ui/notifier.c
+++ b/src/windows/identity/ui/notifier.c
@@ -62,10 +62,10 @@ typedef struct tag_alerter_wnd_data alerter_wnd_data;
struct tag_alert_list;
typedef struct tag_alert_list alert_list;
-static khm_int32
+static khm_int32
alert_show(khui_alert * a);
-static khm_int32
+static khm_int32
alert_show_minimized(khui_alert * a);
static khm_int32
@@ -145,7 +145,7 @@ khm_int32 alert_queue_tail = 0;
/* NOTE: the alert queue functions are unsafe to call from any thread
other than the UI thread. */
-static void
+static void
alert_queue_put_alert(khui_alert * a) {
if (is_alert_queue_full()) return;
alert_queue[alert_queue_tail++] = a;
@@ -154,7 +154,7 @@ alert_queue_put_alert(khui_alert * a) {
}
/* the caller needs to release the alert that's returned */
-static khui_alert *
+static khui_alert *
alert_queue_get_alert(void) {
khui_alert * a;
@@ -228,7 +228,7 @@ alert_queue_delete_alert(khui_alert * a) {
}
/* the caller needs to release the alert that's returned */
-static khui_alert *
+static khui_alert *
alert_queue_peek(void) {
khui_alert * a;
@@ -321,7 +321,7 @@ alert_list_destroy(alert_list * alist) {
#endif
-static LRESULT CALLBACK
+static LRESULT CALLBACK
notifier_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -410,7 +410,7 @@ notifier_wnd_proc(HWND hwnd,
/* wParam is the identifier of the notify icon, but we only
have one. */
switch(lParam) {
- case WM_CONTEXTMENU:
+ case WM_CONTEXTMENU:
{
POINT pt;
int menu_id;
@@ -497,10 +497,10 @@ notifier_wnd_proc(HWND hwnd,
!(a->flags & KHUI_ALERT_FLAG_REQUEST_WINDOW) &&
a->n_alert_commands > 0) {
PostMessage(khm_hwnd_main, WM_COMMAND,
- MAKEWPARAM(a->alert_commands[0],
+ MAKEWPARAM(a->alert_commands[0],
0),
0);
- } else if (a->flags &
+ } else if (a->flags &
KHUI_ALERT_FLAG_REQUEST_WINDOW) {
khm_show_main_window();
alert_show_normal(a);
@@ -545,7 +545,7 @@ notifier_wnd_proc(HWND hwnd,
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
-ATOM
+ATOM
khm_register_notifier_wnd_class(void)
{
WNDCLASSEX wcx;
@@ -1984,7 +1984,7 @@ alert_check_consolidate_window(alerter_wnd_data * d, khui_alert * a) {
return n_added;
}
-static khm_int32
+static khm_int32
alert_show_minimized(khui_alert * a) {
wchar_t tbuf[64]; /* corresponds to NOTIFYICONDATA::szInfoTitle[] */
wchar_t mbuf[256]; /* corresponds to NOTIFYICONDATA::szInfo[] */
@@ -2060,7 +2060,7 @@ alert_show_minimized(khui_alert * a) {
return KHM_ERROR_SUCCESS;
}
-static khm_int32
+static khm_int32
alert_show_normal(khui_alert * a) {
wchar_t buf[256];
wchar_t * title;
@@ -2069,7 +2069,7 @@ alert_show_normal(khui_alert * a) {
khui_alert_lock(a);
if(a->title == NULL) {
- LoadString(khm_hInstance, IDS_ALERT_DEFAULT,
+ LoadString(khm_hInstance, IDS_ALERT_DEFAULT,
buf, ARRAYLENGTH(buf));
title = buf;
} else
@@ -2096,7 +2096,7 @@ alert_show_list(alert_list * alist) {
because the window procedure adds it to the dialog
list automatically */
- hwa =
+ hwa =
CreateWindowEx(ALERT_WINDOW_EX_SYLES,
MAKEINTATOM(atom_alerter),
alist->title,
@@ -2112,7 +2112,7 @@ alert_show_list(alert_list * alist) {
return (hwa != NULL);
}
-static khm_int32
+static khm_int32
alert_show(khui_alert * a) {
khm_boolean show_normal = FALSE;
khm_boolean show_mini = FALSE;
@@ -2309,7 +2309,7 @@ alert_enqueue(khui_alert * a) {
}
/* the alerter window is actually a dialog */
-static LRESULT CALLBACK
+static LRESULT CALLBACK
alerter_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -2356,7 +2356,7 @@ alerter_wnd_proc(HWND hwnd,
//khm_leave_modal();
khm_del_dialog(hwnd);
- d = (alerter_wnd_data *)(LONG_PTR)
+ d = (alerter_wnd_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, NTF_PARAM);
if (d) {
@@ -2372,7 +2372,7 @@ alerter_wnd_proc(HWND hwnd,
{
alerter_wnd_data * d;
- d = (alerter_wnd_data *)(LONG_PTR)
+ d = (alerter_wnd_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, NTF_PARAM);
if(HIWORD(wParam) == BN_CLICKED) {
@@ -2404,7 +2404,7 @@ alerter_wnd_proc(HWND hwnd,
return DefDlgProc(hwnd, uMsg, wParam, lParam);
}
-static LRESULT CALLBACK
+static LRESULT CALLBACK
alert_bin_wnd_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -2576,8 +2576,8 @@ alert_bin_wnd_proc(HWND hwnd,
else
iid = OIC_NOTE;
- hicon = (HICON) LoadImage(NULL,
- MAKEINTRESOURCE(iid),
+ hicon = (HICON) LoadImage(NULL,
+ MAKEINTRESOURCE(iid),
IMAGE_ICON,
GetSystemMetrics(SM_CXICON),
GetSystemMetrics(SM_CYICON),
@@ -2850,7 +2850,7 @@ void khm_notify_icon_add(void) {
Shell_NotifyIcon(NIM_SETVERSION, &ni);
}
-void
+void
khm_notify_icon_balloon(khm_int32 severity,
wchar_t * title,
wchar_t * msg,
@@ -2886,16 +2886,16 @@ khm_notify_icon_balloon(khm_int32 severity,
if (FAILED(StringCbCopy(ni.szInfo, sizeof(ni.szInfo), msg))) {
/* too long? */
StringCchCopyN(ni.szInfo, ARRAYLENGTH(ni.szInfo),
- msg,
+ msg,
ARRAYLENGTH(ni.szInfo) - ARRAYLENGTH(ELLIPSIS));
StringCchCat(ni.szInfo, ARRAYLENGTH(ni.szInfo),
ELLIPSIS);
}
- if (FAILED(StringCbCopy(ni.szInfoTitle, sizeof(ni.szInfoTitle),
+ if (FAILED(StringCbCopy(ni.szInfoTitle, sizeof(ni.szInfoTitle),
title))) {
StringCchCopyN(ni.szInfoTitle, ARRAYLENGTH(ni.szInfoTitle),
- title,
+ title,
ARRAYLENGTH(ni.szInfoTitle) - ARRAYLENGTH(ELLIPSIS));
StringCchCat(ni.szInfoTitle, ARRAYLENGTH(ni.szInfoTitle),
ELLIPSIS);
@@ -3051,7 +3051,7 @@ void khm_notify_icon_activate(void) {
(a->n_alert_commands > 0)) {
PostMessage(khm_hwnd_main, WM_COMMAND,
- MAKEWPARAM(a->alert_commands[0],
+ MAKEWPARAM(a->alert_commands[0],
0),
0);
alert_done = TRUE;
@@ -3171,4 +3171,3 @@ void khm_exit_notifier(void)
notifier_ready = FALSE;
}
-
diff --git a/src/windows/identity/ui/notifier.h b/src/windows/identity/ui/notifier.h
index 2bdbdf701b..4366fcb07a 100644
--- a/src/windows/identity/ui/notifier.h
+++ b/src/windows/identity/ui/notifier.h
@@ -39,19 +39,19 @@ enum khm_notif_expstate {
extern khm_int32 khm_notifier_actions[];
extern khm_size n_khm_notifier_actions;
-void
+void
khm_init_notifier(void);
-void
+void
khm_exit_notifier(void);
-void
+void
khm_notify_icon_change(khm_int32 severity);
void
khm_notify_icon_tooltip(wchar_t * s);
-void
+void
khm_notify_icon_balloon(khm_int32 severity,
wchar_t * title,
wchar_t * msg,
diff --git a/src/windows/identity/ui/passwnd.c b/src/windows/identity/ui/passwnd.c
index 65cc06fe76..e9c266051b 100644
--- a/src/windows/identity/ui/passwnd.c
+++ b/src/windows/identity/ui/passwnd.c
@@ -4,8 +4,8 @@ static ATOM sAtom = 0;
static HINSTANCE shInstance = 0;
/* Callback for the MITPasswordControl
-This is a replacement for the normal edit control. It does not show the
-annoying password char in the edit box so that the number of chars in the
+This is a replacement for the normal edit control. It does not show the
+annoying password char in the edit box so that the number of chars in the
password are not known.
*/
@@ -25,10 +25,10 @@ MITPasswordEditProc(
{
static SIZE pwdcharsz;
BOOL pass_the_buck = FALSE;
-
+
if (message > WM_USER && message < 0x7FFF)
pass_the_buck = TRUE;
-
+
switch(message)
{
case WM_GETTEXT:
@@ -41,7 +41,7 @@ MITPasswordEditProc(
HDC hdc;
PAINTSTRUCT ps;
RECT r;
-
+
hdc = BeginPaint(hWnd, &ps);
GetClientRect(hWnd, &r);
Rectangle(hdc, 0, 0, r.right, r.bottom);
@@ -69,7 +69,7 @@ MITPasswordEditProc(
hdc = GetDC(hWnd);
GetTextExtentPoint32(hdc, &pwdchar, 1, &pwdcharsz);
ReleaseDC(hWnd, hdc);
-
+
heditchild =
CreateWindow(L"edit", L"", WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL |
ES_LEFT | ES_PASSWORD | WS_TABSTOP,
@@ -82,7 +82,7 @@ MITPasswordEditProc(
}
break;
}
-
+
if (pass_the_buck)
return SendMessage(GetDlgItem(hWnd, 1), message, wParam, lParam);
return DefWindowProc(hWnd, message, wParam, lParam);
@@ -106,7 +106,7 @@ khm_register_passwnd_class(void)
wndclass.hbrBackground = (void *)(COLOR_WINDOW + 1);
wndclass.lpszClassName = MIT_PWD_DLL_CLASS;
wndclass.hCursor = LoadCursor((HINSTANCE)NULL, IDC_IBEAM);
-
+
sAtom = RegisterClass(&wndclass);
}
diff --git a/src/windows/identity/ui/propertywnd.c b/src/windows/identity/ui/propertywnd.c
index 340684889a..5f3030e591 100644
--- a/src/windows/identity/ui/propertywnd.c
+++ b/src/windows/identity/ui/propertywnd.c
@@ -123,7 +123,7 @@ LRESULT CALLBACK khui_property_wnd_proc(
pw_data * child;
switch(msg) {
- case WM_CREATE:
+ case WM_CREATE:
{
CREATESTRUCT * cs;
LVCOLUMN lvc;
@@ -140,18 +140,18 @@ LRESULT CALLBACK khui_property_wnd_proc(
#pragma warning(pop)
child->hwnd_lv = CreateWindow(
- WC_LISTVIEW,
+ WC_LISTVIEW,
L"",
WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
LVS_REPORT | LVS_SORTASCENDING,
0, 0,
cs->cx, cs->cy,
- hwnd,
- (HMENU) ID_LISTVIEW,
- khm_hInstance,
+ hwnd,
+ (HMENU) ID_LISTVIEW,
+ khm_hInstance,
NULL);
- ListView_SetExtendedListViewStyle(child->hwnd_lv,
+ ListView_SetExtendedListViewStyle(child->hwnd_lv,
LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
ZeroMemory(&lvc, sizeof(lvc));
diff --git a/src/windows/identity/ui/reqdaemon.c b/src/windows/identity/ui/reqdaemon.c
index 20b126e275..ce3e0f9ed8 100644
--- a/src/windows/identity/ui/reqdaemon.c
+++ b/src/windows/identity/ui/reqdaemon.c
@@ -281,7 +281,7 @@ reqdaemonwnd_proc(HWND hwnd,
dlginfo.size = NETID_DLGINFO_V1_SZ;
dlginfo.dlgtype = NETID_DLGTYPE_TGT;
-
+
if (title)
StringCbCopy(dlginfo.in.title, sizeof(dlginfo.in.title),
wtitle);
@@ -415,7 +415,7 @@ khm_register_reqdaemonwnd_class(void) {
#ifdef DEBUG
assert(reqdaemon_atom != 0);
-#endif
+#endif
}
void
@@ -441,7 +441,7 @@ khm_init_request_daemon(void) {
#ifdef DEBUG
assert(reqdaemon_thread != NULL);
-#endif
+#endif
}
void
diff --git a/src/windows/identity/ui/resource.h b/src/windows/identity/ui/resource.h
index 19cd49de6e..d14a95fde1 100644
--- a/src/windows/identity/ui/resource.h
+++ b/src/windows/identity/ui/resource.h
@@ -410,7 +410,7 @@
#define IDA_ENTER 40009
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 214
diff --git a/src/windows/identity/ui/statusbar.c b/src/windows/identity/ui/statusbar.c
index b785dfdd03..51b7ad3023 100644
--- a/src/windows/identity/ui/statusbar.c
+++ b/src/windows/identity/ui/statusbar.c
@@ -43,7 +43,7 @@ int khm_n_statusbar_parts = sizeof(khm_statusbar_parts) / sizeof(khm_statusbar_p
HWND khm_hwnd_statusbar = NULL;
-LRESULT
+LRESULT
khm_statusbar_notify(LPNMHDR nmhdr) {
LPNMMOUSE pnmm;
@@ -66,7 +66,7 @@ khm_statusbar_notify(LPNMHDR nmhdr) {
return FALSE;
}
-void
+void
khui_statusbar_set_parts(HWND parent) {
int i;
int fillerwidth;
@@ -204,5 +204,3 @@ void khm_statusbar_set_part(int id, HICON icon, wchar_t * text) {
idx,
(LPARAM) text);
}
-
-
diff --git a/src/windows/identity/ui/timer.c b/src/windows/identity/ui/timer.c
index 9a270c3eed..b481ead379 100644
--- a/src/windows/identity/ui/timer.c
+++ b/src/windows/identity/ui/timer.c
@@ -57,7 +57,7 @@ CRITICAL_SECTION cs_timers;
#define KHUI_TIMER_ALLOC_INCR 16
-void
+void
khm_timer_init(void) {
#ifdef DEBUG
assert(khui_timers == NULL);
@@ -118,7 +118,7 @@ tmr_fire_timer(void) {
ZeroMemory(tmr_offset, sizeof(tmr_offset));
for (i=0; i < (int) khui_n_timers; i++) {
- if (!(khui_timers[i].flags &
+ if (!(khui_timers[i].flags &
(KHUI_TE_FLAG_STALE | KHUI_TE_FLAG_EXPIRED)) &&
khui_timers[i].type != KHUI_TTYPE_ID_MARK &&
khui_timers[i].expire < curtime + err) {
@@ -157,7 +157,7 @@ tmr_fire_timer(void) {
tmr_offset[t] > khui_timers[i].offset)
tmr_offset[t] = khui_timers[i].offset;
if (next_event == 0 ||
- next_event >
+ next_event >
khui_timers[i].expire + khui_timers[i].offset)
next_event = khui_timers[i].expire +
khui_timers[i].offset;
@@ -245,7 +245,7 @@ tmr_fire_timer(void) {
LoadString(khm_hInstance, IDS_WARN_EXPIRED,
wmsg, ARRAYLENGTH(wmsg));
} else {
- LoadString(khm_hInstance, IDS_WARN_EXPIRE,
+ LoadString(khm_hInstance, IDS_WARN_EXPIRE,
fmt, ARRAYLENGTH(fmt));
StringCbPrintf(wmsg, sizeof(wmsg), fmt, wtime);
@@ -279,7 +279,7 @@ tmr_fire_timer(void) {
}
-void
+void
khm_timer_fire(HWND hwnd) {
EnterCriticalSection(&cs_timers);
tmr_fire_timer();
@@ -608,7 +608,7 @@ tmr_cred_apply_proc(khm_handle cred, void * rock) {
/* already expired */
goto _done_with_ident;
- rv = khc_open_space(NULL, L"CredWindow", KHM_PERM_READ,
+ rv = khc_open_space(NULL, L"CredWindow", KHM_PERM_READ,
&csp_cw);
assert(KHM_SUCCEEDED(rv));
@@ -631,7 +631,7 @@ tmr_cred_apply_proc(khm_handle cred, void * rock) {
do_warn = t;
rv = khc_read_int32(csp_id, L"AllowCritical", &t);
- if (KHM_SUCCEEDED(rv))
+ if (KHM_SUCCEEDED(rv))
do_crit = t;
rv = khc_read_int32(csp_id, L"AllowAutoRenew", &t);
@@ -683,7 +683,7 @@ tmr_cred_apply_proc(khm_handle cred, void * rock) {
if (CompareFileTime(&fte, &ft_current) < 0)
fte = ft_current;
- tmr_update(ident, KHUI_TTYPE_ID_RENEW,
+ tmr_update(ident, KHUI_TTYPE_ID_RENEW,
FtToInt(&fte), FtToInt(&ft), 0,
CompareFileTime(&fte,&ft_creinst) > 0);
renew_done = TRUE;
@@ -725,7 +725,7 @@ tmr_cred_apply_proc(khm_handle cred, void * rock) {
if (monitor && !renew_done) {
if (CompareFileTime(&ft_expiry, &ft_current) > 0)
- tmr_update(ident, KHUI_TTYPE_ID_EXP,
+ tmr_update(ident, KHUI_TTYPE_ID_EXP,
FtToInt(&ft_expiry), 0, 0,
CompareFileTime(&fte, &ft_creinst) > 0);
}
@@ -784,7 +784,7 @@ tmr_cred_apply_proc(khm_handle cred, void * rock) {
fte = IntToFt(FtToInt(&ft_cred_expiry) - khui_timers[idx].offset);
if (CompareFileTime(&fte, &ft_current) > 0) {
tmr_update(cred, KHUI_TTYPE_CRED_WARN,
- FtToInt(&fte),
+ FtToInt(&fte),
khui_timers[idx].offset, 0,
CompareFileTime(&fte, &ft_creinst) > 0);
kcdb_cred_hold(cred);
@@ -877,28 +877,28 @@ tmr_purge(void) {
{
int idx;
- idx = tmr_find(khui_timers[i].key,
+ idx = tmr_find(khui_timers[i].key,
KHUI_TTYPE_ID_CRIT, 0, 0);
- assert(idx < 0 ||
- (khui_timers[idx].flags &
+ assert(idx < 0 ||
+ (khui_timers[idx].flags &
KHUI_TE_FLAG_STALE));
- idx = tmr_find(khui_timers[i].key,
+ idx = tmr_find(khui_timers[i].key,
KHUI_TTYPE_ID_RENEW, 0, 0);
- assert(idx < 0 ||
- (khui_timers[idx].flags &
+ assert(idx < 0 ||
+ (khui_timers[idx].flags &
KHUI_TE_FLAG_STALE));
- idx = tmr_find(khui_timers[i].key,
+ idx = tmr_find(khui_timers[i].key,
KHUI_TTYPE_ID_WARN, 0, 0);
- assert(idx < 0 ||
- (khui_timers[idx].flags &
+ assert(idx < 0 ||
+ (khui_timers[idx].flags &
KHUI_TE_FLAG_STALE));
- idx = tmr_find(khui_timers[i].key,
+ idx = tmr_find(khui_timers[i].key,
KHUI_TTYPE_ID_EXP, 0, 0);
- assert(idx < 0 ||
- (khui_timers[idx].flags &
+ assert(idx < 0 ||
+ (khui_timers[idx].flags &
KHUI_TE_FLAG_STALE));
}
#endif
@@ -920,7 +920,7 @@ tmr_purge(void) {
/* go through all the credentials and set timers as appropriate. hwnd
is the window that will receive the timer events.*/
-void
+void
khm_timer_refresh(HWND hwnd) {
int i;
khm_int64 next_event = 0;
diff --git a/src/windows/identity/ui/timer.h b/src/windows/identity/ui/timer.h
index af4ece7234..91ca520324 100644
--- a/src/windows/identity/ui/timer.h
+++ b/src/windows/identity/ui/timer.h
@@ -35,7 +35,7 @@ typedef enum tag_khui_timer_type {
KHUI_TTYPE_ID_CRIT, /* Identity critical */
KHUI_TTYPE_ID_WARN, /* Identity warning */
KHUI_TTYPE_CRED_EXP, /* Credential expiration */
- KHUI_TTYPE_CRED_CRIT, /* Credential critical */
+ KHUI_TTYPE_CRED_CRIT, /* Credential critical */
KHUI_TTYPE_CRED_WARN, /* Credential warning */
KHUI_N_TTYPES, /* Count of the timers that we
diff --git a/src/windows/identity/ui/toolbar.c b/src/windows/identity/ui/toolbar.c
index c543e69236..4a3c61f7fb 100644
--- a/src/windows/identity/ui/toolbar.c
+++ b/src/windows/identity/ui/toolbar.c
@@ -142,17 +142,17 @@ LRESULT khm_toolbar_notify(LPNMHDR notice) {
HBITMAP hbmp;
RECT r;
- khui_action * act =
+ khui_action * act =
khui_find_action((int) nmcd->nmcd.dwItemSpec);
if(!act || !act->ib_normal)
return CDRF_DODEFAULT;
- if((act->state & KHUI_ACTIONSTATE_DISABLED) &&
+ if((act->state & KHUI_ACTIONSTATE_DISABLED) &&
act->ib_disabled) {
ibmp = act->ib_disabled;
- } else if(act->ib_hot &&
- ((nmcd->nmcd.uItemState & CDIS_HOT) ||
+ } else if(act->ib_hot &&
+ ((nmcd->nmcd.uItemState & CDIS_HOT) ||
(nmcd->nmcd.uItemState & CDIS_SELECTED))){
ibmp = act->ib_hot;
} else {
@@ -161,15 +161,15 @@ LRESULT khm_toolbar_notify(LPNMHDR notice) {
iidx = khui_ilist_lookup_id(ilist_toolbar, ibmp);
if(iidx < 0) {
- hbmp = LoadImage(khm_hInstance,
- MAKEINTRESOURCE(ibmp),
- IMAGE_BITMAP,
- KHUI_TOOLBAR_IMAGE_WIDTH,
+ hbmp = LoadImage(khm_hInstance,
+ MAKEINTRESOURCE(ibmp),
+ IMAGE_BITMAP,
+ KHUI_TOOLBAR_IMAGE_WIDTH,
KHUI_TOOLBAR_IMAGE_HEIGHT, 0);
- iidx =
- khui_ilist_add_masked_id(ilist_toolbar,
- hbmp,
- KHUI_TOOLBAR_BGCOLOR,
+ iidx =
+ khui_ilist_add_masked_id(ilist_toolbar,
+ hbmp,
+ KHUI_TOOLBAR_BGCOLOR,
ibmp);
DeleteObject(hbmp);
}
@@ -183,14 +183,14 @@ LRESULT khm_toolbar_notify(LPNMHDR notice) {
r.top += ((r.bottom - r.top) -
KHUI_TOOLBAR_IMAGE_HEIGHT) / 2;
#if 0
- r.left += ((r.right - r.left) -
+ r.left += ((r.right - r.left) -
KHUI_TOOLBAR_IMAGE_WIDTH) / 2;
#endif
- khui_ilist_draw(ilist_toolbar,
- iidx,
- nmcd->nmcd.hdc,
+ khui_ilist_draw(ilist_toolbar,
+ iidx,
+ nmcd->nmcd.hdc,
r.left,
- r.top,
+ r.top,
0);
return CDRF_DODEFAULT;
@@ -231,15 +231,15 @@ void khui_add_action_to_toolbar(HWND tb, khui_action *a, int opt, HIMAGELIST hiL
if(opt & KHUI_TOOLBAR_ADD_TEXT) {
int sid = 0;
- if((opt & KHUI_TOOLBAR_ADD_LONGTEXT) ==
+ if((opt & KHUI_TOOLBAR_ADD_LONGTEXT) ==
KHUI_TOOLBAR_ADD_LONGTEXT) {
sid = a->is_tooltip;
}
if(!sid)
sid = a->is_caption;
if(sid) {
- LoadString(khm_hInstance,
- sid,
+ LoadString(khm_hInstance,
+ sid,
buf, ARRAYLENGTH(buf));
buf[wcslen(buf) + 1] = L'\0';
idx_caption = (int) SendMessage(tb,
@@ -312,8 +312,8 @@ void khm_update_standard_toolbar(void)
BOOL enable;
enable = !(act->state & KHUI_ACTIONSTATE_DISABLED);
- SendMessage(khui_hwnd_standard_toolbar,
- TB_ENABLEBUTTON,
+ SendMessage(khui_hwnd_standard_toolbar,
+ TB_ENABLEBUTTON,
(WPARAM) act->cmd,
MAKELPARAM(enable, 0));
}
@@ -347,9 +347,9 @@ void khm_create_standard_toolbar(HWND rebar) {
(LPWSTR) NULL,
WS_CHILD |
TBSTYLE_FLAT |
- TBSTYLE_AUTOSIZE |
+ TBSTYLE_AUTOSIZE |
TBSTYLE_TOOLTIPS |
- CCS_NORESIZE |
+ CCS_NORESIZE |
CCS_NOPARENTALIGN |
CCS_ADJUSTABLE |
CCS_NODIVIDER,
@@ -376,10 +376,10 @@ void khm_create_standard_toolbar(HWND rebar) {
(int) khui_action_list_length(def->items),
3);
- hbm_blank = LoadImage(khm_hInstance,
- MAKEINTRESOURCE(IDB_TB_BLANK),
- IMAGE_BITMAP,
- KHUI_TOOLBAR_IMAGE_WIDTH,
+ hbm_blank = LoadImage(khm_hInstance,
+ MAKEINTRESOURCE(IDB_TB_BLANK),
+ IMAGE_BITMAP,
+ KHUI_TOOLBAR_IMAGE_WIDTH,
KHUI_TOOLBAR_IMAGE_HEIGHT, 0);
idx_blank = ImageList_AddMasked(hiList, hbm_blank, RGB(0,0,0));
@@ -412,14 +412,14 @@ void khm_create_standard_toolbar(HWND rebar) {
while(aref && aref->action != KHUI_MENU_END) {
if(aref->action == KHUI_MENU_SEP) {
- khui_add_action_to_toolbar(hwtb,
- NULL,
- KHUI_TOOLBAR_ADD_SEP,
+ khui_add_action_to_toolbar(hwtb,
+ NULL,
+ KHUI_TOOLBAR_ADD_SEP,
hiList);
} else {
act = khui_find_action(aref->action);
- khui_add_action_to_toolbar(hwtb,
- act,
+ khui_add_action_to_toolbar(hwtb,
+ act,
KHUI_TOOLBAR_ADD_BITMAP |
((aref->flags & KHUI_ACTIONREF_SUBMENU)?
KHUI_TOOLBAR_ADD_DROPDOWN: 0),
@@ -442,14 +442,14 @@ void khm_create_standard_toolbar(HWND rebar) {
ZeroMemory(&rbi, sizeof(rbi));
rbi.cbSize = sizeof(rbi);
- rbi.fMask =
+ rbi.fMask =
RBBIM_ID |
- RBBIM_CHILD |
- RBBIM_CHILDSIZE |
- RBBIM_IDEALSIZE |
- RBBIM_SIZE |
+ RBBIM_CHILD |
+ RBBIM_CHILDSIZE |
+ RBBIM_IDEALSIZE |
+ RBBIM_SIZE |
RBBIM_STYLE;
- rbi.fStyle =
+ rbi.fStyle =
RBBS_USECHEVRON |
RBBS_BREAK;
rbi.hwndChild = hwtb;
diff --git a/src/windows/identity/uilib/action.c b/src/windows/identity/uilib/action.c
index 04fb52a849..50a72ef371 100644
--- a/src/windows/identity/uilib/action.c
+++ b/src/windows/identity/uilib/action.c
@@ -275,12 +275,12 @@ HWND khui_hwnd_main; /* main window, for notifying
dispatching messages to the
application. */
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_init_actions(void) {
InitializeCriticalSection(&cs_actions);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_exit_actions(void) {
DeleteCriticalSection(&cs_actions);
}
@@ -441,7 +441,7 @@ khui_action_delete(khm_int32 action) {
#define MENU_NC_ITEMS 8
-KHMEXP khui_menu_def * KHMAPI
+KHMEXP khui_menu_def * KHMAPI
khui_menu_create(khm_int32 action)
{
khui_menu_def * d;
@@ -512,7 +512,7 @@ khui_action_trigger(khm_int32 action, khui_action_context * ctx) {
}
}
-KHMEXP khui_menu_def * KHMAPI
+KHMEXP khui_menu_def * KHMAPI
khui_menu_dup(khui_menu_def * src)
{
khui_menu_def * d;
@@ -541,7 +541,7 @@ khui_menu_dup(khui_menu_def * src)
return d;
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_menu_delete(khui_menu_def * d)
{
int i;
@@ -1019,9 +1019,9 @@ khui_create_global_accel_table(void) {
return ha;
}
-KHMEXP khm_boolean KHMAPI
-khui_get_cmd_accel_string(khm_int32 cmd,
- wchar_t * buf,
+KHMEXP khm_boolean KHMAPI
+khui_get_cmd_accel_string(khm_int32 cmd,
+ wchar_t * buf,
khm_size bufsiz) {
int i;
khui_accel_def * def;
@@ -1127,9 +1127,9 @@ khui_get_cmd_accel_string(khm_int32 cmd,
break;
default:
- if((def->key >= '0' &&
- def->key <= '9') ||
- (def->key >= 'A' &&
+ if((def->key >= '0' &&
+ def->key <= '9') ||
+ (def->key >= 'A' &&
def->key <= 'Z')) {
ap = mbuf;
mbuf[0] = (wchar_t) def->key;
@@ -1241,13 +1241,13 @@ khuiint_copy_context(khui_action_context * ctxdest,
ctxdest->headers[i].attr_id = ctxsrc->headers[i].attr_id;
ctxdest->headers[i].cb_data = ctxsrc->headers[i].cb_data;
if (ctxsrc->headers[i].cb_data > 0) {
- ctxdest->headers[i].data =
+ ctxdest->headers[i].data =
BYTEOFFSET(ctxdest->int_buf,
ctxdest->int_cb_used);
memcpy(ctxdest->headers[i].data,
ctxsrc->headers[i].data,
ctxsrc->headers[i].cb_data);
- ctxdest->int_cb_used +=
+ ctxdest->int_cb_used +=
UBOUND32(ctxsrc->headers[i].cb_data);
} else {
ctxdest->headers[i].data = NULL;
@@ -1264,7 +1264,7 @@ khuiint_copy_context(khui_action_context * ctxdest,
#endif
kcdb_credset_flush(ctxdest->credset);
-
+
kcdb_credset_extract_filtered(ctxdest->credset,
ctxsrc->credset,
khuiint_filter_selected,
@@ -1298,7 +1298,7 @@ khuiint_copy_context(khui_action_context * ctxdest,
#endif
}
-static void
+static void
khuiint_context_init(khui_action_context * ctx) {
ctx->magic = KHUI_ACTION_CONTEXT_MAGIC;
ctx->scope = KHUI_SCOPE_NONE;
@@ -1319,8 +1319,8 @@ khuiint_context_init(khui_action_context * ctx) {
khui_action_context khui_ctx = {
KHUI_ACTION_CONTEXT_MAGIC,
KHUI_SCOPE_NONE,
- NULL,
- KCDB_CREDTYPE_INVALID,
+ NULL,
+ KCDB_CREDTYPE_INVALID,
NULL,
{
{KCDB_ATTR_INVALID,NULL,0},
@@ -1402,10 +1402,10 @@ khui_context_create(khui_action_context * ctx,
khuiint_copy_context(ctx, &tctx);
}
-KHMEXP void KHMAPI
-khui_context_set(khui_scope scope,
- khm_handle identity,
- khm_int32 cred_type,
+KHMEXP void KHMAPI
+khui_context_set(khui_scope scope,
+ khm_handle identity,
+ khm_int32 cred_type,
khm_handle cred,
khui_header *headers,
khm_size n_headers,
@@ -1422,10 +1422,10 @@ khui_context_set(khui_scope scope,
0);
}
-KHMEXP void KHMAPI
-khui_context_set_ex(khui_scope scope,
- khm_handle identity,
- khm_int32 cred_type,
+KHMEXP void KHMAPI
+khui_context_set_ex(khui_scope scope,
+ khm_handle identity,
+ khm_int32 cred_type,
khm_handle cred,
khui_header *headers,
khm_size n_headers,
@@ -1482,7 +1482,7 @@ khui_context_set_indirect(khui_action_context * ctx)
LeaveCriticalSection(&cs_actions);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_refresh(void) {
khm_int32 flags;
@@ -1515,7 +1515,7 @@ khui_context_refresh(void) {
kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_get(khui_action_context * ctx)
{
EnterCriticalSection(&cs_actions);
@@ -1530,7 +1530,7 @@ khui_context_get(khui_action_context * ctx)
LeaveCriticalSection(&cs_actions);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_release(khui_action_context * ctx)
{
#ifdef DEBUG
@@ -1558,7 +1558,7 @@ khui_context_release(khui_action_context * ctx)
#endif
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_reset(void)
{
EnterCriticalSection(&cs_actions);
diff --git a/src/windows/identity/uilib/alert.c b/src/windows/identity/uilib/alert.c
index 02df7a1e39..62861eff9a 100644
--- a/src/windows/identity/uilib/alert.c
+++ b/src/windows/identity/uilib/alert.c
@@ -41,19 +41,19 @@
khui_alert * kh_alerts = NULL;
CRITICAL_SECTION cs_alerts;
-void
+void
alert_init(void)
{
InitializeCriticalSection(&cs_alerts);
}
-void
+void
alert_exit(void)
{
DeleteCriticalSection(&cs_alerts);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_create_empty(khui_alert ** result)
{
khui_alert * a;
@@ -81,10 +81,10 @@ khui_alert_create_empty(khui_alert ** result)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_alert_create_simple(const wchar_t * title,
- const wchar_t * message,
- khm_int32 severity,
+KHMEXP khm_int32 KHMAPI
+khui_alert_create_simple(const wchar_t * title,
+ const wchar_t * message,
+ khm_int32 severity,
khui_alert ** result)
{
khui_alert * a;
@@ -99,7 +99,7 @@ khui_alert_create_simple(const wchar_t * title,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_set_title(khui_alert * alert, const wchar_t * title)
{
size_t cb = 0;
@@ -107,8 +107,8 @@ khui_alert_set_title(khui_alert * alert, const wchar_t * title)
assert(alert->magic == KHUI_ALERT_MAGIC);
if(title) {
- if(FAILED(StringCbLength(title,
- KHUI_MAXCB_TITLE,
+ if(FAILED(StringCbLength(title,
+ KHUI_MAXCB_TITLE,
&cb))) {
return KHM_ERROR_INVALID_PARAM;
}
@@ -132,7 +132,7 @@ khui_alert_set_title(khui_alert * alert, const wchar_t * title)
}
KHMEXP khm_int32 KHMAPI
-khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags)
+khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
@@ -140,7 +140,7 @@ khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags)
return KHM_ERROR_INVALID_PARAM;
EnterCriticalSection(&cs_alerts);
- alert->flags =
+ alert->flags =
(alert->flags & ~mask) |
(flags & mask);
LeaveCriticalSection(&cs_alerts);
@@ -148,7 +148,7 @@ khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_set_severity(khui_alert * alert, khm_int32 severity)
{
@@ -160,7 +160,7 @@ khui_alert_set_severity(khui_alert * alert, khm_int32 severity)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_set_suggestion(khui_alert * alert,
const wchar_t * suggestion) {
size_t cb = 0;
@@ -168,8 +168,8 @@ khui_alert_set_suggestion(khui_alert * alert,
assert(alert->magic == KHUI_ALERT_MAGIC);
if(suggestion) {
- if(FAILED(StringCbLength(suggestion,
- KHUI_MAXCB_MESSAGE - sizeof(wchar_t),
+ if(FAILED(StringCbLength(suggestion,
+ KHUI_MAXCB_MESSAGE - sizeof(wchar_t),
&cb))) {
return KHM_ERROR_INVALID_PARAM;
}
@@ -177,7 +177,7 @@ khui_alert_set_suggestion(khui_alert * alert,
}
EnterCriticalSection(&cs_alerts);
- if(alert->suggestion &&
+ if(alert->suggestion &&
(alert->flags & KHUI_ALERT_FLAG_FREE_SUGGEST)) {
PFREE(alert->suggestion);
@@ -196,7 +196,7 @@ khui_alert_set_suggestion(khui_alert * alert,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_set_message(khui_alert * alert, const wchar_t * message)
{
size_t cb = 0;
@@ -204,8 +204,8 @@ khui_alert_set_message(khui_alert * alert, const wchar_t * message)
assert(alert->magic == KHUI_ALERT_MAGIC);
if(message) {
- if(FAILED(StringCbLength(message,
- KHUI_MAXCB_MESSAGE - sizeof(wchar_t),
+ if(FAILED(StringCbLength(message,
+ KHUI_MAXCB_MESSAGE - sizeof(wchar_t),
&cb))) {
return KHM_ERROR_INVALID_PARAM;
}
@@ -213,7 +213,7 @@ khui_alert_set_message(khui_alert * alert, const wchar_t * message)
}
EnterCriticalSection(&cs_alerts);
- if(alert->message &&
+ if(alert->message &&
(alert->flags & KHUI_ALERT_FLAG_FREE_MESSAGE)) {
PFREE(alert->message);
@@ -232,7 +232,7 @@ khui_alert_set_message(khui_alert * alert, const wchar_t * message)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_clear_commands(khui_alert * alert)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
@@ -243,7 +243,7 @@ khui_alert_clear_commands(khui_alert * alert)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_add_command(khui_alert * alert, khm_int32 command_id)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -312,7 +312,7 @@ khui_alert_get_response(khui_alert * alert)
return response;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_show(khui_alert * alert)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
@@ -349,9 +349,9 @@ khui_alert_queue(khui_alert * alert)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_alert_show_simple(const wchar_t * title,
- const wchar_t * message,
+KHMEXP khm_int32 KHMAPI
+khui_alert_show_simple(const wchar_t * title,
+ const wchar_t * message,
khm_int32 severity)
{
khui_alert * a = NULL;
@@ -369,8 +369,8 @@ khui_alert_show_simple(const wchar_t * title,
return rv;
}
-KHMEXP khm_int32 KHMAPI
-khui_alert_hold(khui_alert * alert)
+KHMEXP khm_int32 KHMAPI
+khui_alert_hold(khui_alert * alert)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
@@ -381,7 +381,7 @@ khui_alert_hold(khui_alert * alert)
}
/* called with cs_alert held */
-static void
+static void
free_alert(khui_alert * alert)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
@@ -416,8 +416,8 @@ free_alert(khui_alert * alert)
}
}
-KHMEXP khm_int32 KHMAPI
-khui_alert_release(khui_alert * alert)
+KHMEXP khm_int32 KHMAPI
+khui_alert_release(khui_alert * alert)
{
assert(alert->magic == KHUI_ALERT_MAGIC);
diff --git a/src/windows/identity/uilib/configui.c b/src/windows/identity/uilib/configui.c
index 6f4f940a87..a87ea72ca8 100644
--- a/src/windows/identity/uilib/configui.c
+++ b/src/windows/identity/uilib/configui.c
@@ -59,7 +59,7 @@ cfgui_create_new_node(void) {
}
/* called with cs_cfgui held */
-static void
+static void
cfgui_free_node(khui_config_node_i * node) {
if (!cfgui_is_valid_node(node))
return;
@@ -111,7 +111,7 @@ cfgui_release_node(khui_config_node_i * node) {
LeaveCriticalSection(&cs_cfgui);
}
-static void
+static void
cfgui_init_once(void) {
if (init_once == 0 &&
InterlockedIncrement(&init_once) == 1) {
@@ -431,7 +431,7 @@ khui_cfg_get_next(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
for(nxt_node = LNEXT(node);
nxt_node &&
- ((node->reg.flags ^ nxt_node->reg.flags) &
+ ((node->reg.flags ^ nxt_node->reg.flags) &
KHUI_CNFLAG_SUBPANEL);
nxt_node = LNEXT(nxt_node));
if (nxt_node)
@@ -455,7 +455,7 @@ khui_cfg_get_next_release(khui_config_node * pvnode) {
khui_config_node_i * node;
khui_config_node_i * nxt_node;
- if (!pvnode ||
+ if (!pvnode ||
!cfgui_is_valid_node_handle(*pvnode))
return KHM_ERROR_INVALID_PARAM;
@@ -464,7 +464,7 @@ khui_cfg_get_next_release(khui_config_node * pvnode) {
node = cfgui_node_i_from_handle(*pvnode);
for(nxt_node = LNEXT(node);
nxt_node &&
- (((node->reg.flags ^ nxt_node->reg.flags) &
+ (((node->reg.flags ^ nxt_node->reg.flags) &
KHUI_CNFLAG_SUBPANEL) ||
(nxt_node->flags & KHUI_CN_FLAG_DELETED));
nxt_node = LNEXT(nxt_node));
@@ -531,7 +531,7 @@ khui_cfg_get_hwnd(khui_config_node vnode) {
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node)
@@ -559,7 +559,7 @@ khui_cfg_get_param(khui_config_node vnode) {
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node)
@@ -624,7 +624,7 @@ clear_node_data(khui_config_node_i * node) {
static cfg_node_data *
get_node_data(khui_config_node_i * node,
- void * key,
+ void * key,
khm_boolean create) {
khm_size i;
@@ -686,7 +686,7 @@ khui_cfg_get_hwnd_inst(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node) {
@@ -720,7 +720,7 @@ khui_cfg_get_param_inst(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node) {
@@ -737,7 +737,7 @@ khui_cfg_get_param_inst(khui_config_node vnode,
}
KHMEXP void KHMAPI
-khui_cfg_set_hwnd_inst(khui_config_node vnode,
+khui_cfg_set_hwnd_inst(khui_config_node vnode,
khui_config_node noderef,
HWND hwnd) {
khui_config_node_i * node;
@@ -754,7 +754,7 @@ khui_cfg_set_hwnd_inst(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node) {
@@ -766,7 +766,7 @@ khui_cfg_set_hwnd_inst(khui_config_node vnode,
}
KHMEXP void KHMAPI
-khui_cfg_set_param_inst(khui_config_node vnode,
+khui_cfg_set_param_inst(khui_config_node vnode,
khui_config_node noderef,
LPARAM param) {
khui_config_node_i * node;
@@ -783,7 +783,7 @@ khui_cfg_set_param_inst(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
else if (!vnode)
node = cfgui_root_config;
- else
+ else
node = NULL;
if (node) {
@@ -796,7 +796,7 @@ khui_cfg_set_param_inst(khui_config_node vnode,
/* called with cs_cfgui held */
-static void
+static void
cfgui_clear_params(khui_config_node_i * node) {
khui_config_node_i * c;
@@ -830,7 +830,7 @@ khui_cfg_set_configui_handle(HWND hwnd) {
}
KHMEXP void KHMAPI
-khui_cfg_set_flags(khui_config_node vnode,
+khui_cfg_set_flags(khui_config_node vnode,
khm_int32 flags,
khm_int32 mask) {
khui_config_node_i * node;
@@ -847,7 +847,7 @@ khui_cfg_set_flags(khui_config_node vnode,
node = cfgui_node_i_from_handle(vnode);
- newflags =
+ newflags =
(flags & mask) |
(node->flags & ~mask);
@@ -933,7 +933,7 @@ khui_cfg_set_flags_inst(khui_config_init_data * d,
EnterCriticalSection(&cs_cfgui);
if (cfgui_is_valid_node_handle(d->this_node))
node = cfgui_node_i_from_handle(d->this_node);
- else
+ else
node = NULL;
if (node) {
diff --git a/src/windows/identity/uilib/creddlg.c b/src/windows/identity/uilib/creddlg.c
index e78ced68c6..f975be1e39 100644
--- a/src/windows/identity/uilib/creddlg.c
+++ b/src/windows/identity/uilib/creddlg.c
@@ -37,7 +37,7 @@ static void cw_free_prompts(khui_new_creds * c);
static void cw_free_prompt(khui_new_creds_prompt * p);
-static khui_new_creds_prompt *
+static khui_new_creds_prompt *
cw_create_prompt(
khm_size idx,
khm_int32 type,
@@ -45,7 +45,7 @@ cw_create_prompt(
wchar_t * def,
khm_int32 flags);
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_create_cred_blob(khui_new_creds ** ppnc)
{
khui_new_creds * c;
@@ -65,7 +65,7 @@ khui_cw_create_cred_blob(khui_new_creds ** ppnc)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_destroy_cred_blob(khui_new_creds *c)
{
khm_size i;
@@ -102,14 +102,14 @@ khui_cw_destroy_cred_blob(khui_new_creds *c)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_lock_nc(khui_new_creds * c)
{
EnterCriticalSection(&c->cs);
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_unlock_nc(khui_new_creds * c)
{
LeaveCriticalSection(&c->cs);
@@ -118,8 +118,8 @@ khui_cw_unlock_nc(khui_new_creds * c)
#define NC_N_IDENTITIES 4
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_identity(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_identity(khui_new_creds * c,
khm_handle id)
{
if(id == NULL)
@@ -130,17 +130,17 @@ khui_cw_add_identity(khui_new_creds * c,
if(c->identities == NULL) {
c->nc_identities = NC_N_IDENTITIES;
- c->identities = PMALLOC(sizeof(*(c->identities)) *
+ c->identities = PMALLOC(sizeof(*(c->identities)) *
c->nc_identities);
c->n_identities = 0;
} else if(c->n_identities + 1 > c->nc_identities) {
khm_handle * ni;
- c->nc_identities = UBOUNDSS(c->n_identities + 1,
- NC_N_IDENTITIES,
+ c->nc_identities = UBOUNDSS(c->n_identities + 1,
+ NC_N_IDENTITIES,
NC_N_IDENTITIES);
ni = PMALLOC(sizeof(*(c->identities)) * c->nc_identities);
- memcpy(ni, c->identities,
+ memcpy(ni, c->identities,
sizeof(*(c->identities)) * c->n_identities);
PFREE(c->identities);
c->identities = ni;
@@ -153,8 +153,8 @@ khui_cw_add_identity(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_set_primary_id(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_set_primary_id(khui_new_creds * c,
khm_handle id)
{
khm_size i;
@@ -177,14 +177,14 @@ khui_cw_set_primary_id(khui_new_creds * c,
LeaveCriticalSection(&(c->cs));
rv = khui_cw_add_identity(c,id);
if(c->hwnd != NULL) {
- PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_IDENTITY_CHANGE), 0);
}
return rv;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_type(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_type(khui_new_creds * c,
khui_new_creds_by_type * t)
{
EnterCriticalSection(&c->cs);
@@ -227,8 +227,8 @@ khui_cw_add_type(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_del_type(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_del_type(khui_new_creds * c,
khm_int32 type_id)
{
khm_size i;
@@ -251,9 +251,9 @@ khui_cw_del_type(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_find_type(khui_new_creds * c,
- khm_int32 type,
+KHMEXP khm_int32 KHMAPI
+khui_cw_find_type(khui_new_creds * c,
+ khm_int32 type,
khui_new_creds_by_type **t)
{
khm_size i;
@@ -274,7 +274,7 @@ khui_cw_find_type(khui_new_creds * c,
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_enable_type(khui_new_creds * c,
khm_int32 type,
khm_boolean enable)
@@ -301,7 +301,7 @@ khui_cw_enable_type(khui_new_creds * c,
return (t)?KHM_ERROR_SUCCESS:KHM_ERROR_NOT_FOUND;
}
-KHMEXP khm_boolean KHMAPI
+KHMEXP khm_boolean KHMAPI
khui_cw_type_succeeded(khui_new_creds * c,
khm_int32 type)
{
@@ -319,7 +319,7 @@ khui_cw_type_succeeded(khui_new_creds * c,
return s;
}
-static khui_new_creds_prompt *
+static khui_new_creds_prompt *
cw_create_prompt(khm_size idx,
khm_int32 type,
wchar_t * prompt,
@@ -360,7 +360,7 @@ cw_create_prompt(khm_size idx,
return p;
}
-static void
+static void
cw_free_prompt(khui_new_creds_prompt * p) {
size_t cb;
@@ -385,7 +385,7 @@ cw_free_prompt(khui_new_creds_prompt * p) {
PFREE(p);
}
-static void
+static void
cw_free_prompts(khui_new_creds * c)
{
khm_size i;
@@ -416,13 +416,13 @@ cw_free_prompts(khui_new_creds * c)
c->n_prompts = 0;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_clear_prompts(khui_new_creds * c)
{
/* the WMNC_CLEAR_PROMPT message needs to be sent before freeing
the prompts, because the prompts structure still holds the
window handles for the custom prompt controls. */
- SendMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ SendMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_CLEAR_PROMPTS), (LPARAM) c);
EnterCriticalSection(&c->cs);
@@ -432,15 +432,15 @@ khui_cw_clear_prompts(khui_new_creds * c)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_begin_custom_prompts(khui_new_creds * c,
- khm_size n_prompts,
- wchar_t * banner,
+KHMEXP khm_int32 KHMAPI
+khui_cw_begin_custom_prompts(khui_new_creds * c,
+ khm_size n_prompts,
+ wchar_t * banner,
wchar_t * pname)
{
size_t cb;
- PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_CLEAR_PROMPTS), (LPARAM) c);
EnterCriticalSection(&c->cs);
@@ -449,7 +449,7 @@ khui_cw_begin_custom_prompts(khui_new_creds * c,
#endif
cw_free_prompts(c);
- if(SUCCEEDED(StringCbLength(banner, KHUI_MAXCB_BANNER, &cb)) &&
+ if(SUCCEEDED(StringCbLength(banner, KHUI_MAXCB_BANNER, &cb)) &&
cb > 0) {
cb += sizeof(wchar_t);
c->banner = PMALLOC(cb);
@@ -458,7 +458,7 @@ khui_cw_begin_custom_prompts(khui_new_creds * c,
c->banner = NULL;
}
- if(SUCCEEDED(StringCbLength(pname, KHUI_MAXCB_PNAME, &cb)) &&
+ if(SUCCEEDED(StringCbLength(pname, KHUI_MAXCB_PNAME, &cb)) &&
cb > 0) {
cb += sizeof(wchar_t);
@@ -483,7 +483,7 @@ khui_cw_begin_custom_prompts(khui_new_creds * c,
c->n_prompts = 0;
c->nc_prompts = 0;
- PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_SET_PROMPTS), (LPARAM) c);
}
@@ -492,11 +492,11 @@ khui_cw_begin_custom_prompts(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_prompt(khui_new_creds * c,
- khm_int32 type,
- wchar_t * prompt,
- wchar_t * def,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_prompt(khui_new_creds * c,
+ khm_int32 type,
+ wchar_t * prompt,
+ wchar_t * def,
khm_int32 flags)
{
khui_new_creds_prompt * p;
@@ -519,7 +519,7 @@ khui_cw_add_prompt(khui_new_creds * c,
LeaveCriticalSection(&c->cs);
if(c->n_prompts == c->nc_prompts) {
- PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_SET_PROMPTS), (LPARAM) c);
/* once we are done adding prompts, switch to the auth
panel */
@@ -527,8 +527,8 @@ khui_cw_add_prompt(khui_new_creds * c,
/* Actually, don't. Doing so can mean an unexpected panel
switch if fiddling on some other panel causes a change in
custom prompts. */
- SendMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
- MAKEWPARAM(0, WMNC_DIALOG_SWITCH_PANEL),
+ SendMessage(c->hwnd, KHUI_WM_NC_NOTIFY,
+ MAKEWPARAM(0, WMNC_DIALOG_SWITCH_PANEL),
(LPARAM) c);
#endif
}
@@ -536,7 +536,7 @@ khui_cw_add_prompt(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_get_prompt_count(khui_new_creds * c,
khm_size * np) {
@@ -547,9 +547,9 @@ khui_cw_get_prompt_count(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_get_prompt(khui_new_creds * c,
- khm_size idx,
+KHMEXP khm_int32 KHMAPI
+khui_cw_get_prompt(khui_new_creds * c,
+ khm_size idx,
khui_new_creds_prompt ** prompt)
{
khm_int32 rv;
@@ -599,7 +599,7 @@ khuiint_trim_str(wchar_t * s, khm_size cch) {
*last_ws = L'\0';
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_sync_prompt_values(khui_new_creds * c)
{
khm_size i;
@@ -634,10 +634,10 @@ khui_cw_sync_prompt_values(khui_new_creds * c)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_get_prompt_value(khui_new_creds * c,
- khm_size idx,
- wchar_t * buf,
+KHMEXP khm_int32 KHMAPI
+khui_cw_get_prompt_value(khui_new_creds * c,
+ khm_size idx,
+ wchar_t * buf,
khm_size *cbbuf)
{
khui_new_creds_prompt * p;
@@ -672,9 +672,9 @@ khui_cw_get_prompt_value(khui_new_creds * c,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-khui_cw_set_response(khui_new_creds * c,
- khm_int32 type,
+KHMEXP khm_int32 KHMAPI
+khui_cw_set_response(khui_new_creds * c,
+ khm_int32 type,
khm_int32 response)
{
khui_new_creds_by_type * t = NULL;
diff --git a/src/windows/identity/uilib/intalert.h b/src/windows/identity/uilib/intalert.h
index dc4fbc6ef3..498c8488f8 100644
--- a/src/windows/identity/uilib/intalert.h
+++ b/src/windows/identity/uilib/intalert.h
@@ -88,14 +88,14 @@ typedef struct tag_khui_alert {
::khui_alert_flags. Do not modify
directly. */
- kherr_context * err_context;
+ kherr_context * err_context;
/*!< If non-NULL at the time the alert
window is shown, this indicates that
the alert window should provide an
error viewer for the given error
context. */
- kherr_event * err_event;
+ kherr_event * err_event;
/*!< If non-NULL at the time the alert
window is shown, this indicates that
the alert window should provide an
@@ -110,7 +110,7 @@ typedef struct tag_khui_alert {
khui_action_context ctx; /*!< Context to which this alert
applies to. */
- khm_int32 response;
+ khm_int32 response;
/*!< Once the alert is displayed to
the user, when the user clicks one
of the command buttons, the command
diff --git a/src/windows/identity/uilib/khaction.h b/src/windows/identity/uilib/khaction.h
index cd6ad8e5e4..479e392305 100644
--- a/src/windows/identity/uilib/khaction.h
+++ b/src/windows/identity/uilib/khaction.h
@@ -470,7 +470,7 @@ khui_menu_get_size(khui_menu_def * d);
KHMEXP khui_action_ref *
khui_menu_get_action(khui_menu_def * d, khm_size idx);
-/*! \brief Action scope identifiers
+/*! \brief Action scope identifiers
The scope identifier is a value which describes the scope of the
cursor context. See documentation on individual scope identifiers
@@ -485,7 +485,7 @@ khui_menu_get_action(khui_menu_def * d, khm_size idx);
selected.
Note that the scope typically only apply to cursor contexts and
- not the selection context. Please see
+ not the selection context. Please see
\ref khui_context "UI Contexts" for more information.
\see \ref khui_context "UI Contexts"
@@ -494,11 +494,11 @@ typedef enum tag_khui_scope {
KHUI_SCOPE_NONE,
/*!< No context. Nothing is selected. */
- KHUI_SCOPE_IDENT,
+ KHUI_SCOPE_IDENT,
/*!< Identity. The selection is the entire identity specified in
the \a identity field of the context. */
- KHUI_SCOPE_CREDTYPE,
+ KHUI_SCOPE_CREDTYPE,
/*!< A credentials type. The selection is an entire credentials
type. If \a identity is non-NULL, then the scope is all the
credentials of type \a cred_type which belong to \a identity.
@@ -627,10 +627,10 @@ typedef struct tag_khui_action_context {
\note This function should only be called from the UI thread.
*/
-KHMEXP void KHMAPI
-khui_context_set(khui_scope scope,
- khm_handle identity,
- khm_int32 cred_type,
+KHMEXP void KHMAPI
+khui_context_set(khui_scope scope,
+ khm_handle identity,
+ khm_int32 cred_type,
khm_handle cred,
khui_header *headers,
khm_size n_headers,
@@ -685,10 +685,10 @@ khui_context_set(khui_scope scope,
\note This function should only be called from the UI thread.
*/
-KHMEXP void KHMAPI
-khui_context_set_ex(khui_scope scope,
- khm_handle identity,
- khm_int32 cred_type,
+KHMEXP void KHMAPI
+khui_context_set_ex(khui_scope scope,
+ khm_handle identity,
+ khm_int32 cred_type,
khm_handle cred,
khui_header *headers,
khm_size n_headers,
@@ -717,7 +717,7 @@ khui_context_set_indirect(khui_action_context * ctx);
\note The returned context should not be modified prior to calling
khui_context_release().
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_get(khui_action_context * ctx);
/*! \brief Create a new UI context
@@ -745,7 +745,7 @@ khui_context_create(khui_action_context * ctx,
\note The context should not have been modified between calling
khui_context_get() and khui_context_release()
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_release(khui_action_context * ctx);
/*! \brief Reset the UI context
@@ -753,7 +753,7 @@ khui_context_release(khui_action_context * ctx);
Nullifies the current UI context and releases any holds obtained
on objects related to the previous context.
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_reset(void);
/*! \brief Refresh context data
@@ -770,7 +770,7 @@ khui_context_reset(void);
khui_context_refresh() should be called to adjust the state of the
::KHUI_ACTION_SET_DEF_ID action.
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_context_refresh(void);
/*! \brief A filter function that filters for credentials in the cursor context
diff --git a/src/windows/identity/uilib/khactiondef.h b/src/windows/identity/uilib/khactiondef.h
index 33d8347ebf..f159771a10 100644
--- a/src/windows/identity/uilib/khactiondef.h
+++ b/src/windows/identity/uilib/khactiondef.h
@@ -73,7 +73,7 @@
#define KHUI_ACTION_VIEW_ALL_IDS (KHUI_ACTION_BASE + 37)
/*@}*/
-/*! \name Pseudo actions
+/*! \name Pseudo actions
Pseudo actions do not trigger any specific function, but acts as a
signal of some generic event which will be interpreted based on
diff --git a/src/windows/identity/uilib/khalerts.h b/src/windows/identity/uilib/khalerts.h
index 751abce013..d4e44d8de5 100644
--- a/src/windows/identity/uilib/khalerts.h
+++ b/src/windows/identity/uilib/khalerts.h
@@ -66,7 +66,7 @@ typedef struct tag_khui_alert khui_alert;
/*! \brief Flags for an alert */
enum khui_alert_flags {
- KHUI_ALERT_FLAG_FREE_STRUCT =0x00000001,
+ KHUI_ALERT_FLAG_FREE_STRUCT =0x00000001,
/*!< Internal. Free the structure once the alert is done. */
KHUI_ALERT_FLAG_FREE_TITLE =0x00000002,
@@ -144,7 +144,7 @@ typedef enum tag_khui_alert_types {
The returned result is a held pointer to a ::khui_alert object.
Use khui_alert_release() to release the object.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_create_empty(khui_alert ** result);
/*! \brief Create a simple alert object
@@ -163,33 +163,33 @@ khui_alert_create_empty(khui_alert ** result);
\param[out] result Receives a held pointer to a ::khui_alert
object upon successful completion.
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_create_simple(const wchar_t * title,
- const wchar_t * message,
- khm_int32 severity,
+KHMEXP khm_int32 KHMAPI
+khui_alert_create_simple(const wchar_t * title,
+ const wchar_t * message,
+ khm_int32 severity,
khui_alert ** result);
/*! \brief Set the title of an alert object
The title is limited by ::KHUI_MAXCCH_TITLE.
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_set_title(khui_alert * alert,
+KHMEXP khm_int32 KHMAPI
+khui_alert_set_title(khui_alert * alert,
const wchar_t * title);
/*! \brief Set the message of an alert object
The message is limited by ::KHUI_MAXCCH_MESSAGE.
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_set_message(khui_alert * alert,
+KHMEXP khm_int32 KHMAPI
+khui_alert_set_message(khui_alert * alert,
const wchar_t * message);
-/*! \brief Set the suggestion of an alert object
+/*! \brief Set the suggestion of an alert object
The suggestion is limited by ::KHUI_MAXCCH_SUGGESTION
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_set_suggestion(khui_alert * alert,
const wchar_t * suggestion);
@@ -197,8 +197,8 @@ khui_alert_set_suggestion(khui_alert * alert,
The severity value is one of ::tag_kherr_severity
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_set_severity(khui_alert * alert,
+KHMEXP khm_int32 KHMAPI
+khui_alert_set_severity(khui_alert * alert,
khm_int32 severity);
/*! \brief Sets the flags of the alert
@@ -215,15 +215,15 @@ khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags);
\see khui_alert_add_command()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_clear_commands(khui_alert * alert);
/*! \brief Add a command to an alert object
The command ID should be a valid registered action.
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_add_command(khui_alert * alert,
+KHMEXP khm_int32 KHMAPI
+khui_alert_add_command(khui_alert * alert,
khm_int32 command_id);
/*! \brief Set the type of alert
@@ -261,15 +261,15 @@ khui_alert_get_response(khui_alert * alert);
The method used to display the alert is as follows:
- - A balloon alert will be shown if one of the following is true:
- - The NetIDMgr application is minimized or in the background.
- - ::KHUI_ALERT_FLAG_REQUEST_BALLOON is specified in \a flags.
+ - A balloon alert will be shown if one of the following is true:
+ - The NetIDMgr application is minimized or in the background.
+ - ::KHUI_ALERT_FLAG_REQUEST_BALLOON is specified in \a flags.
- Otherwise an alert window will be shown.
If the message, title of the alert is too long to fit in a balloon
prompt, there's a suggestion or if there are custom commands then
a placeholder balloon prompt will be shown which when clicked on,
- shows the actual alert in an alert window.
+ shows the actual alert in an alert window.
An exception is when ::KHUI_ALERT_FLAG_DEFACTION is specified in
flags. In this case instead of a placeholder balloon prompt, one
@@ -312,7 +312,7 @@ khui_alert_get_response(khui_alert * alert);
retrieved via a call to khui_alert_get_response().
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_show(khui_alert * alert);
/*! \brief Display a modal alert
@@ -341,9 +341,9 @@ khui_alert_queue(khui_alert * alert);
\see khui_alert_show()
*/
-KHMEXP khm_int32 KHMAPI
-khui_alert_show_simple(const wchar_t * title,
- const wchar_t * message,
+KHMEXP khm_int32 KHMAPI
+khui_alert_show_simple(const wchar_t * title,
+ const wchar_t * message,
khm_int32 severity);
/*! \brief Obtain a hold on the alert
@@ -353,7 +353,7 @@ khui_alert_show_simple(const wchar_t * title,
Use khui_alert_release() to release the hold.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_hold(khui_alert * alert);
/*! \brief Release the hold on the alert
@@ -362,10 +362,10 @@ khui_alert_hold(khui_alert * alert);
return a held pointer to an alert or implicitly obtains a hold on
it need to be undone through a call to khui_alert_release().
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_alert_release(khui_alert * alert);
-/*! \brief Lock an alert
+/*! \brief Lock an alert
Locking an alert disallows any other thread from accessing the
alert at the same time. NetIDMgr keeps a global list of all alert
@@ -387,14 +387,14 @@ khui_alert_release(khui_alert * alert);
require obtaining a lock, as they perform synchronization
internally.
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_alert_lock(khui_alert * alert);
-/*! \brief Unlock an alert
+/*! \brief Unlock an alert
\see khui_alert_lock()
*/
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_alert_unlock(khui_alert * alert);
/*!@}*/
diff --git a/src/windows/identity/uilib/khconfigui.h b/src/windows/identity/uilib/khconfigui.h
index bbc712a367..16a83c024b 100644
--- a/src/windows/identity/uilib/khconfigui.h
+++ b/src/windows/identity/uilib/khconfigui.h
@@ -204,7 +204,7 @@ typedef struct tag_khui_config_node_reg {
*/
#define CFGDLG_WIDTH 255
-/*! \brief Height of a configuration dialog in dialog units
+/*! \brief Height of a configuration dialog in dialog units
\see ::CFGDLG_WIDTH
*/
@@ -231,7 +231,7 @@ typedef struct tag_khui_config_node_reg {
*/
typedef khm_handle khui_config_node;
-/*! \brief Initialization data passed in to a subpanel
+/*! \brief Initialization data passed in to a subpanel
When creating a subpanel, a pointer to the following strucutred
will be passed in as the creation parameter for the dialog.
@@ -415,7 +415,7 @@ khui_cfg_get_next(khui_config_node node,
KHMEXP khm_int32 KHMAPI
khui_cfg_get_next_release(khui_config_node * node);
-/*! \brief Get the name of a configuration node
+/*! \brief Get the name of a configuration node
Gets the name (not the short description or the long description)
of the given configuration node.
@@ -464,7 +464,7 @@ khui_cfg_get_param_inst(khui_config_node node,
This function is used internally by NetIDMgr. Do not use.
*/
KHMEXP void KHMAPI
-khui_cfg_set_hwnd_inst(khui_config_node node,
+khui_cfg_set_hwnd_inst(khui_config_node node,
khui_config_node noderef,
HWND hwnd);
@@ -473,7 +473,7 @@ khui_cfg_set_hwnd_inst(khui_config_node node,
This function is used internally by NetIDMgr. Do not use.
*/
KHMEXP void KHMAPI
-khui_cfg_set_param_inst(khui_config_node node,
+khui_cfg_set_param_inst(khui_config_node node,
khui_config_node noderef,
LPARAM param);
@@ -581,16 +581,16 @@ khui_cfg_init_dialog_data(HWND hwnd_dlg,
khui_config_init_data ** new_data,
void ** extra);
-/*! \brief Utility function: Retrieves dialog data
+/*! \brief Utility function: Retrieves dialog data
Retrieves the dialog data previoulsy stored using
khui_cfg_init_dialog_data().
- \param[in] hwnd_dlg Handle to the dialog box
+ \param[in] hwnd_dlg Handle to the dialog box
\param[out] data Receives a pointer to the ::khui_config_init_data
block.
-
+
\param[out] extra Receives a pointer to the extra memory
allocated. Optional (set to NULL if this value is not needed).
*/
diff --git a/src/windows/identity/uilib/khhtlink.h b/src/windows/identity/uilib/khhtlink.h
index be6abb21c0..5cae476821 100644
--- a/src/windows/identity/uilib/khhtlink.h
+++ b/src/windows/identity/uilib/khhtlink.h
@@ -27,10 +27,10 @@
#ifndef __KHIMAIRA_KHHTLINK_H
#define __KHIMAIRA_KHHTLINK_H
-/*! \addtogroup khui
+/*! \addtogroup khui
@{ */
-/*! \defgroup khui_hyperlink Hyperlink
+/*! \defgroup khui_hyperlink Hyperlink
@{*/
/*! \brief A hyperlink
diff --git a/src/windows/identity/uilib/khnewcred.h b/src/windows/identity/uilib/khnewcred.h
index db70b41f88..67531c1178 100644
--- a/src/windows/identity/uilib/khnewcred.h
+++ b/src/windows/identity/uilib/khnewcred.h
@@ -34,7 +34,7 @@
/*! \addtogroup khui
@{ */
-/*! \defgroup khui_cred Credentials acquisition
+/*! \defgroup khui_cred Credentials acquisition
Declarations associated with credentials acquisition.
@@ -68,7 +68,7 @@
window as a ::KHUI_WM_NC_NOTIFY message.
*/
enum khui_wm_nc_notifications {
- WMNC_DIALOG_EXPAND = 1,
+ WMNC_DIALOG_EXPAND = 1,
/*!< The dialog is switching from basic to advanced mode or vice
versa.
@@ -82,7 +82,7 @@ enum khui_wm_nc_notifications {
WMNC_DIALOG_SETUP,
/*!< Sent to the new creds window to notify it that the dialog
should create all the type configuration panels.
-
+
Until this message is issued, none of the credentials type
panels exist. The credentials type panels will receive
WM_INITDIALOG etc as per the normal dialog creation process.
@@ -258,7 +258,7 @@ enum khui_wm_nc_notifications {
/*!< Sent to the new creds window to set custom prompts.
Only sent to the new credentials window. */
-
+
WMNC_DIALOG_PREPROCESS,
/*!< The credentials acquisition process is about to start.
@@ -311,7 +311,7 @@ enum khui_wm_nc_notifications {
the callback.
*/
enum khui_wm_nc_ident_notify {
- WMNC_IDENT_INIT,
+ WMNC_IDENT_INIT,
/*!< Initialize an identity selector for a new credentials
dialog. The \a lParam parameter contains a handle to the
dialog window which will contain the identity selector
@@ -341,7 +341,7 @@ enum khui_wm_nc_ident_notify {
@{*/
/*! \brief Switch the panel
-
+
The \a id attribute of the link specifies the ordinal of the panel
to switch to.
*/
@@ -465,7 +465,7 @@ typedef struct tag_khui_new_creds {
/*!\brief No known response */
#define KHUI_NC_RESPONSE_NONE 0
-/*!\brief It is okay to exit the dialog now
+/*!\brief It is okay to exit the dialog now
This is the default, which is why it has a value of zero. In
order to prevent the dialog from exiting, set the
@@ -691,7 +691,7 @@ typedef struct tag_khui_new_creds_by_type {
/*!\name Flags for khui_new_creds_by_type
Note that KHUI_NC_RESPONSE_SUCCESS, KHUI_NC_RESPONSE_FAILED,
- KHUI_NC_RESPONSE_PENDING are also stored in the flags.
+ KHUI_NC_RESPONSE_PENDING are also stored in the flags.
@{*/
#define KHUI_NCT_FLAG_PROCESSED 1024
@@ -817,7 +817,7 @@ typedef struct tag_khui_control_row {
\see khui_cw_destroy_cred_blob()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_create_cred_blob(khui_new_creds ** c);
/*! \brief Destroy a ::khui_new_creds object
@@ -831,7 +831,7 @@ khui_cw_create_cred_blob(khui_new_creds ** c);
\see khui_cw_create_cred_blob()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_destroy_cred_blob(khui_new_creds *c);
/*! \brief Lock the new_creds object
@@ -847,17 +847,17 @@ khui_cw_destroy_cred_blob(khui_new_creds *c);
It is not necessary to lock a new credentials object when
modifying it using the NetIDMgr API.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_lock_nc(khui_new_creds * c);
/*! \brief Unlock a new_creds object
\see khui_cw_lock_nc()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_unlock_nc(khui_new_creds * c);
-/*! \brief Add a new panel to a new credentials acquisition window
+/*! \brief Add a new panel to a new credentials acquisition window
See the description of ::khui_new_cred_panel for information on
how to populate it to describe a credentials type panel.
@@ -883,16 +883,16 @@ khui_cw_unlock_nc(khui_new_creds * c);
\see ::khui_new_cred_panel
\see ::khui_new_creds
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_type(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_type(khui_new_creds * c,
khui_new_creds_by_type * t);
/*! \brief Remove a panel from a new credentials acquisition window
\see khui_cw_add_type()
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_del_type(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_del_type(khui_new_creds * c,
khm_int32 type);
/*! \brief Find the panel belonging to a particular credentials type
@@ -902,9 +902,9 @@ khui_cw_del_type(khui_new_creds * c,
\see khui_cw_add_type()
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_find_type(khui_new_creds * c,
- khm_int32 type,
+KHMEXP khm_int32 KHMAPI
+khui_cw_find_type(khui_new_creds * c,
+ khm_int32 type,
khui_new_creds_by_type **t);
/*! \brief Enable/disable a particular credentials type
@@ -914,7 +914,7 @@ khui_cw_find_type(khui_new_creds * c,
participating in the new credentials acquisition. However, the
user will be prevented from interacting with the specific panel.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_enable_type(khui_new_creds * c,
khm_int32 type,
khm_boolean enable);
@@ -935,8 +935,8 @@ khui_cw_enable_type(khui_new_creds * c,
identities associated with the new credentials acquisition dialog
will also be discarded.
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_set_primary_id(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_set_primary_id(khui_new_creds * c,
khm_handle id);
/*! \brief Add an additional identity to the new credentials acquisition
@@ -949,15 +949,15 @@ khui_cw_set_primary_id(khui_new_creds * c,
Calling this function with \a id of NULL does nothing.
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_identity(khui_new_creds * c,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_identity(khui_new_creds * c,
khm_handle id);
/*! \brief Clear all custom prompts
Removes all the custom prompts from the new credentials dialog.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_clear_prompts(khui_new_creds * c);
/*! \brief Synchronize custom prompt values
@@ -967,7 +967,7 @@ khui_cw_clear_prompts(khui_new_creds * c);
values in the ::khui_new_creds object periodically. However, the
values may lose sync intermittently.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_sync_prompt_values(khui_new_creds * c);
/*! \brief Begin custom prompting
@@ -982,10 +982,10 @@ khui_cw_sync_prompt_values(khui_new_creds * c);
khui_cw_add_prompt(). The number of promtps that can be added
will be exactly \a n_prompts.
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_begin_custom_prompts(khui_new_creds * c,
- khm_size n_prompts,
- wchar_t * banner,
+KHMEXP khm_int32 KHMAPI
+khui_cw_begin_custom_prompts(khui_new_creds * c,
+ khm_size n_prompts,
+ wchar_t * banner,
wchar_t * name);
/*! \brief Add a custom prompt
@@ -1016,11 +1016,11 @@ khui_cw_begin_custom_prompts(khui_new_creds * c,
\param[in] flags Flags. Combination of
::KHUI_NCPROMPT_FLAG_HIDDEN
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_add_prompt(khui_new_creds * c,
- khm_int32 type,
- wchar_t * prompt,
- wchar_t * def,
+KHMEXP khm_int32 KHMAPI
+khui_cw_add_prompt(khui_new_creds * c,
+ khm_int32 type,
+ wchar_t * prompt,
+ wchar_t * def,
khm_int32 flags);
/*! \brief Retrieve a custom prompt
@@ -1029,9 +1029,9 @@ khui_cw_add_prompt(khui_new_creds * c,
zero-based index of the prompt to retrieve. The ordering is the
same as the order in which khui_cw_add_prompt() was called.
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_get_prompt(khui_new_creds * c,
- khm_size idx,
+KHMEXP khm_int32 KHMAPI
+khui_cw_get_prompt(khui_new_creds * c,
+ khm_size idx,
khui_new_creds_prompt ** prompt);
/*! \brief Get the number of custom prompts
@@ -1043,7 +1043,7 @@ khui_cw_get_prompt(khui_new_creds * c,
be registered (i.e. the \a n_prompts parameter passed to
khui_cw_begin_custom_prompts()).
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_get_prompt_count(khui_new_creds * c,
khm_size * np);
@@ -1060,10 +1060,10 @@ khui_cw_get_prompt_count(khui_new_creds * c,
starting to call khui_cw_get_prompt_value() so that the values
returned are up-to-date.
*/
-KHMEXP khm_int32 KHMAPI
-khui_cw_get_prompt_value(khui_new_creds * c,
- khm_size idx,
- wchar_t * buf,
+KHMEXP khm_int32 KHMAPI
+khui_cw_get_prompt_value(khui_new_creds * c,
+ khm_size idx,
+ wchar_t * buf,
khm_size *cbbuf);
/*! \brief Set the response for a plugin
@@ -1082,7 +1082,7 @@ khui_cw_get_prompt_value(khui_new_creds * c,
- ::KHUI_NC_RESPONSE_NOEXIT
- ::KHUI_NC_RESPONSE_EXIT
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_cw_set_response(khui_new_creds * c,
khm_int32 type,
khm_int32 response);
@@ -1099,7 +1099,7 @@ khui_cw_set_response(khui_new_creds * c,
\return TRUE iff the queried type has reported that it successfully
completed the credentials acquision operation.
*/
-KHMEXP khm_boolean KHMAPI
+KHMEXP khm_boolean KHMAPI
khui_cw_type_succeeded(khui_new_creds * c,
khm_int32 type);
diff --git a/src/windows/identity/uilib/khprops.h b/src/windows/identity/uilib/khprops.h
index a00c65f7fc..181183cbbe 100644
--- a/src/windows/identity/uilib/khprops.h
+++ b/src/windows/identity/uilib/khprops.h
@@ -33,7 +33,7 @@
Property sheets
**********************************************************************/
-/*! \addtogroup khui
+/*! \addtogroup khui
@{*/
@@ -122,7 +122,7 @@ typedef struct tag_khui_property_page {
\note Only called by the NetIDMgr application.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_create_sheet(khui_property_sheet ** sheet);
/*! \brief Add a page to a property sheet
@@ -163,7 +163,7 @@ khui_ps_create_sheet(khui_property_sheet ** sheet);
khui_ps_find_page() to retrieve a pointer to the structure
later.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_add_page(khui_property_sheet * sheet,
khm_int32 credtype,
khm_int32 ordinal,
@@ -181,26 +181,26 @@ khui_ps_find_page(khui_property_sheet * sheet,
\note Only called by the NetIDMgr application
*/
-KHMEXP HWND KHMAPI
-khui_ps_show_sheet(HWND parent,
+KHMEXP HWND KHMAPI
+khui_ps_show_sheet(HWND parent,
khui_property_sheet * sheet);
/*! \brief Check if the given message belongs to the property sheet
\note Only called by the NetIDMgr application
*/
-KHMEXP LRESULT KHMAPI
-khui_ps_check_message(khui_property_sheet * sheet,
+KHMEXP LRESULT KHMAPI
+khui_ps_check_message(khui_property_sheet * sheet,
PMSG msg);
/*! \brief Destroy a property sheet and all associated data structures.
\note Only called by the NetIDMgr application.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_destroy_sheet(khui_property_sheet * sheet);
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_property_wnd_set_record(HWND hwnd_pwnd, khm_handle record);
/*!@}*/
diff --git a/src/windows/identity/uilib/khremote.h b/src/windows/identity/uilib/khremote.h
index 3a79d65552..74e71a3d11 100644
--- a/src/windows/identity/uilib/khremote.h
+++ b/src/windows/identity/uilib/khremote.h
@@ -44,7 +44,7 @@
#define NETID_REALM_SZ 192
#define NETID_TITLE_SZ 256
#define NETID_CCACHE_NAME_SZ 264
-
+
#define NETID_DLGTYPE_TGT 0
#define NETID_DLGTYPE_CHPASSWD 1
typedef struct {
@@ -72,7 +72,7 @@ typedef struct {
} out;
// Version 1 of this structure ends here
} NETID_DLGINFO, *LPNETID_DLGINFO;
-
+
#define NETID_DLGINFO_V1_SZ (10 * sizeof(DWORD) \
+ sizeof(WCHAR) * (NETID_TITLE_SZ + \
2 * NETID_USERNAME_SZ + 2 * NETID_REALM_SZ + \
diff --git a/src/windows/identity/uilib/khrescache.h b/src/windows/identity/uilib/khrescache.h
index 63baa1f722..2f0ba275b6 100644
--- a/src/windows/identity/uilib/khrescache.h
+++ b/src/windows/identity/uilib/khrescache.h
@@ -29,16 +29,16 @@
#include<khdefs.h>
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_init_rescache(void);
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_exit_rescache(void);
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_cache_bitmap(UINT id, HBITMAP hbm);
-KHMEXP HBITMAP KHMAPI
+KHMEXP HBITMAP KHMAPI
khui_get_cached_bitmap(UINT id);
typedef struct khui_ilist_t {
@@ -58,7 +58,7 @@ typedef struct khui_bitmap_t {
int cy;
} khui_bitmap;
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_bitmap_from_hbmp(khui_bitmap * kbm, HBITMAP hbm);
KHMEXP void KHMAPI
@@ -68,27 +68,27 @@ KHMEXP void KHMAPI
khui_draw_bitmap(HDC hdc, int x, int y, khui_bitmap * kbm);
/* image lists */
-KHMEXP khui_ilist * KHMAPI
+KHMEXP khui_ilist * KHMAPI
khui_create_ilist(int cx, int cy, int n, int ng, int opt);
-KHMEXP BOOL KHMAPI
+KHMEXP BOOL KHMAPI
khui_delete_ilist(khui_ilist * il);
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
khui_ilist_add_masked(khui_ilist * il, HBITMAP hbm, COLORREF cbkg);
-KHMEXP int KHMAPI
-khui_ilist_add_masked_id(khui_ilist *il, HBITMAP hbm,
+KHMEXP int KHMAPI
+khui_ilist_add_masked_id(khui_ilist *il, HBITMAP hbm,
COLORREF cbkg, int id);
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
khui_ilist_lookup_id(khui_ilist *il, int id);
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_ilist_draw(khui_ilist * il, int idx, HDC dc, int x, int y, int opt);
-KHMEXP void KHMAPI
-khui_ilist_draw_bg(khui_ilist * il, int idx, HDC dc, int x, int y,
+KHMEXP void KHMAPI
+khui_ilist_draw_bg(khui_ilist * il, int idx, HDC dc, int x, int y,
int opt, COLORREF bgcolor);
#define khui_ilist_draw_id(il, id, dc, x, y, opt) \
diff --git a/src/windows/identity/uilib/khtracker.h b/src/windows/identity/uilib/khtracker.h
index 38be29a134..86adb344a1 100644
--- a/src/windows/identity/uilib/khtracker.h
+++ b/src/windows/identity/uilib/khtracker.h
@@ -29,7 +29,7 @@
#include<time.h>
-/*! \addtogroup khui
+/*! \addtogroup khui
@{ */
diff --git a/src/windows/identity/uilib/propsheet.c b/src/windows/identity/uilib/propsheet.c
index 068bcf00c0..76e74043d2 100644
--- a/src/windows/identity/uilib/propsheet.c
+++ b/src/windows/identity/uilib/propsheet.c
@@ -44,7 +44,7 @@ ps_exit(void) {
DeleteCriticalSection(&cs_props);
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_create_sheet(khui_property_sheet ** sheet)
{
khui_property_sheet * ps;
@@ -61,7 +61,7 @@ khui_ps_create_sheet(khui_property_sheet ** sheet)
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_add_page(khui_property_sheet * sheet,
khm_int32 credtype,
khm_int32 ordinal,
@@ -77,7 +77,7 @@ khui_ps_add_page(khui_property_sheet * sheet,
p->ordinal = ordinal;
p->p_page = ppage;
- EnterCriticalSection(&cs_props);
+ EnterCriticalSection(&cs_props);
QPUT(sheet, p);
sheet->n_pages++;
LeaveCriticalSection(&cs_props);
@@ -88,7 +88,7 @@ khui_ps_add_page(khui_property_sheet * sheet,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_find_page(khui_property_sheet * sheet,
khm_int32 credtype,
khui_property_page ** page)
@@ -114,7 +114,7 @@ khui_ps_find_page(khui_property_sheet * sheet,
}
}
-int __cdecl
+int __cdecl
ps_order_func(const void *l, const void * r) {
khui_property_page * lp;
khui_property_page * rp;
@@ -128,7 +128,7 @@ ps_order_func(const void *l, const void * r) {
return lp->ordinal - rp->ordinal;
}
-KHMEXP HWND KHMAPI
+KHMEXP HWND KHMAPI
khui_ps_show_sheet(HWND parent, khui_property_sheet * s)
{
khui_property_page * p;
@@ -188,8 +188,8 @@ khui_ps_show_sheet(HWND parent, khui_property_sheet * s)
return hw;
}
-KHMEXP LRESULT KHMAPI
-khui_ps_check_message(khui_property_sheet * sheet,
+KHMEXP LRESULT KHMAPI
+khui_ps_check_message(khui_property_sheet * sheet,
PMSG pmsg)
{
LRESULT lr;
@@ -200,7 +200,7 @@ khui_ps_check_message(khui_property_sheet * sheet,
lr = PropSheet_IsDialogMessage(sheet->hwnd, pmsg);
if(lr) {
sheet->hwnd_page = PropSheet_GetCurrentPageHwnd(sheet->hwnd);
- if(sheet->hwnd_page == NULL &&
+ if(sheet->hwnd_page == NULL &&
sheet->status == KHUI_PS_STATUS_RUNNING)
sheet->status = KHUI_PS_STATUS_DONE;
@@ -209,7 +209,7 @@ khui_ps_check_message(khui_property_sheet * sheet,
return lr;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
khui_ps_destroy_sheet(khui_property_sheet * sheet)
{
khui_property_page * p;
diff --git a/src/windows/identity/uilib/rescache.c b/src/windows/identity/uilib/rescache.c
index 7715cfdeed..7b770b3e36 100644
--- a/src/windows/identity/uilib/rescache.c
+++ b/src/windows/identity/uilib/rescache.c
@@ -32,7 +32,7 @@
hashtable * h_bitmaps;
-khm_int32
+khm_int32
hash_id(const void *p) {
#pragma warning(push)
#pragma warning(disable: 4311)
@@ -40,7 +40,7 @@ hash_id(const void *p) {
#pragma warning(pop)
}
-khm_int32
+khm_int32
comp_id(const void *p1, const void *p2) {
#pragma warning(push)
#pragma warning(disable: 4311)
@@ -48,33 +48,33 @@ comp_id(const void *p1, const void *p2) {
#pragma warning(pop)
}
-void
+void
del_ref_object(const void *k, void * data) {
DeleteObject((HGDIOBJ) data);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_init_rescache(void) {
- h_bitmaps = hash_new_hashtable(127, hash_id, comp_id, NULL,
+ h_bitmaps = hash_new_hashtable(127, hash_id, comp_id, NULL,
del_ref_object);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_exit_rescache(void) {
hash_del_hashtable(h_bitmaps);
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_cache_bitmap(UINT id, HBITMAP hbm) {
hash_add(h_bitmaps, (void *)(size_t) id, (void *) hbm);
}
-KHMEXP HBITMAP KHMAPI
+KHMEXP HBITMAP KHMAPI
khui_get_cached_bitmap(UINT id) {
return (HBITMAP) hash_lookup(h_bitmaps, (void *)(size_t) id);
}
-KHMEXP khui_ilist * KHMAPI
+KHMEXP khui_ilist * KHMAPI
khui_create_ilist(int cx, int cy, int n, int ng, int opt) {
BITMAPV5HEADER head;
HDC hdc;
@@ -110,7 +110,7 @@ khui_create_ilist(int cx, int cy, int n, int ng, int opt) {
return il;
}
-KHMEXP BOOL KHMAPI
+KHMEXP BOOL KHMAPI
khui_delete_ilist(khui_ilist * il) {
DeleteObject(il->img);
DeleteObject(il->mask);
@@ -120,10 +120,10 @@ khui_delete_ilist(khui_ilist * il) {
return TRUE;
}
-KHMEXP int KHMAPI
-khui_ilist_add_masked_id(khui_ilist *il,
- HBITMAP hbm,
- COLORREF cbkg,
+KHMEXP int KHMAPI
+khui_ilist_add_masked_id(khui_ilist *il,
+ HBITMAP hbm,
+ COLORREF cbkg,
int id) {
int idx;
@@ -135,7 +135,7 @@ khui_ilist_add_masked_id(khui_ilist *il,
return idx;
}
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
khui_ilist_lookup_id(khui_ilist *il, int id) {
int i;
@@ -147,7 +147,7 @@ khui_ilist_lookup_id(khui_ilist *il, int id) {
return -1;
}
-KHMEXP int KHMAPI
+KHMEXP int KHMAPI
khui_ilist_add_masked(khui_ilist * il, HBITMAP hbm, COLORREF cbkg) {
HDC dcr,dci,dct,dcb;
HBITMAP hb_oldb, hb_oldi, hb_oldt;
@@ -194,12 +194,12 @@ khui_ilist_add_masked(khui_ilist * il, HBITMAP hbm, COLORREF cbkg) {
return i;
}
-KHMEXP void KHMAPI
-khui_ilist_draw(khui_ilist * il,
- int idx,
- HDC dc,
- int x,
- int y,
+KHMEXP void KHMAPI
+khui_ilist_draw(khui_ilist * il,
+ int idx,
+ HDC dc,
+ int x,
+ int y,
int opt) {
HDC dci;
HBITMAP hb_oldi;
@@ -220,13 +220,13 @@ khui_ilist_draw(khui_ilist * il,
DeleteDC(dci);
}
-KHMEXP void KHMAPI
-khui_ilist_draw_bg(khui_ilist * il,
- int idx,
- HDC dc,
- int x,
- int y,
- int opt,
+KHMEXP void KHMAPI
+khui_ilist_draw_bg(khui_ilist * il,
+ int idx,
+ HDC dc,
+ int x,
+ int y,
+ int opt,
COLORREF bgcolor) {
HDC dcm;
HBITMAP hb_oldm, hb_mem;
@@ -253,7 +253,7 @@ khui_ilist_draw_bg(khui_ilist * il,
BitBlt(dc,x,y,il->cx,il->cy,dcm,0,0,SRCCOPY);
SelectObject(dcm, hb_oldm);
-
+
DeleteObject(hb_mem);
DeleteObject(hbr);
@@ -261,7 +261,7 @@ khui_ilist_draw_bg(khui_ilist * il,
}
-KHMEXP void KHMAPI
+KHMEXP void KHMAPI
khui_bitmap_from_hbmp(khui_bitmap * kbm, HBITMAP hbm)
{
HDC hdc;
diff --git a/src/windows/identity/uilib/trackerwnd.c b/src/windows/identity/uilib/trackerwnd.c
index cc434d95fc..70c3137f73 100644
--- a/src/windows/identity/uilib/trackerwnd.c
+++ b/src/windows/identity/uilib/trackerwnd.c
@@ -105,8 +105,8 @@ time_t ticks_to_time_t(int ticks, time_t tmin)
NOTE: Runs in the context of the UI thread
*/
-void
-initialize_tracker(HWND hwnd,
+void
+initialize_tracker(HWND hwnd,
khui_tracker * tc)
{
RECT r;
@@ -142,7 +142,7 @@ initialize_tracker(HWND hwnd,
NOTE: Runs in the context of the UI thread
*/
-LRESULT CALLBACK
+LRESULT CALLBACK
duration_tracker_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -184,7 +184,7 @@ duration_tracker_proc(HWND hwnd,
SetTextAlign(hdc, TA_LEFT | TA_TOP | TA_NOUPDATECP);
TextOut(hdc, tc->lbl_lx, tc->lbl_y, buf, (int) wcslen(buf));
-
+
TimetToFileTimeInterval(tc->max, &ft);
cbbuf = sizeof(buf);
FtIntervalToString(&ft, buf, &cbbuf);
@@ -195,7 +195,7 @@ duration_tracker_proc(HWND hwnd,
((HFONT) SelectObject((hdc), (HGDIOBJ)(HFONT)(hfold)));
ReleaseDC(hwnd, hdc);
-
+
return lr;
}
break;
@@ -240,9 +240,9 @@ duration_tracker_proc(HWND hwnd,
/* Create the subclassed duration slider on behalf of an edit control */
-void
-create_edit_sliders(HWND hwnd,
- HWND hwnd_dlg,
+void
+create_edit_sliders(HWND hwnd,
+ HWND hwnd_dlg,
khui_tracker * tc)
{
RECT r;
@@ -258,19 +258,19 @@ create_edit_sliders(HWND hwnd,
rs.right -= rs.left;
rs.bottom -= rs.top;
- tc->hw_slider =
+ tc->hw_slider =
CreateWindowEx(WS_EX_OVERLAPPEDWINDOW,
TRACKBAR_CLASS,
L"NetIDMgrTimeTickerTrackbar",
WS_POPUP | TBS_AUTOTICKS | TBS_BOTTOM |
#if (_WIN32_IE >= 0x0501)
- TBS_DOWNISLEFT |
+ TBS_DOWNISLEFT |
#endif
TBS_HORZ | WS_CLIPCHILDREN,
r.left,r.bottom,rs.right,rs.bottom,
hwnd,
NULL,
- (HINSTANCE)(DWORD_PTR)
+ (HINSTANCE)(DWORD_PTR)
GetWindowLongPtr(hwnd, GWLP_HINSTANCE),
NULL);
@@ -288,7 +288,7 @@ create_edit_sliders(HWND hwnd,
NOTE: Runs in the context of the UI thread
*/
-LRESULT CALLBACK
+LRESULT CALLBACK
duration_edit_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -425,8 +425,8 @@ khui_tracker_install(HWND hwnd_edit, khui_tracker * tc) {
#pragma warning(push)
#pragma warning(disable: 4244)
- tc->fn_edit = (WNDPROC)(LONG_PTR)
- SetWindowLongPtr(hwnd_edit, GWLP_WNDPROC,
+ tc->fn_edit = (WNDPROC)(LONG_PTR)
+ SetWindowLongPtr(hwnd_edit, GWLP_WNDPROC,
(LONG_PTR) duration_edit_proc);
#pragma warning(pop)
}
@@ -439,9 +439,9 @@ khui_tracker_reposition(khui_tracker * tc) {
GetWindowRect(tc->hw_edit, &r);
SetWindowPos(tc->hw_slider,
NULL,
- r.left, r.bottom,
- 0, 0,
- SWP_NOOWNERZORDER | SWP_NOSIZE |
+ r.left, r.bottom,
+ 0, 0,
+ SWP_NOOWNERZORDER | SWP_NOSIZE |
SWP_NOZORDER | SWP_NOACTIVATE);
}
}
@@ -457,7 +457,7 @@ khui_tracker_refresh(khui_tracker * tc) {
return;
SendMessage(tc->hw_edit,
- KHUI_WM_NC_NOTIFY,
+ KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
}
@@ -472,6 +472,3 @@ khui_tracker_kill_controls(khui_tracker * tc) {
tc->fn_edit = NULL;
tc->fn_tracker = NULL;
}
-
-
-
diff --git a/src/windows/identity/uilib/uibind.c b/src/windows/identity/uilib/uibind.c
index f2f44cc3e4..a03b35da3a 100644
--- a/src/windows/identity/uilib/uibind.c
+++ b/src/windows/identity/uilib/uibind.c
@@ -57,6 +57,3 @@ khui_request_UI_callback(khm_ui_callback cb, void * rock) {
return cbdata.rv;
}
-
-
-
diff --git a/src/windows/identity/util/hashtable.c b/src/windows/identity/util/hashtable.c
index 7836179d6f..9d3b42cf4a 100644
--- a/src/windows/identity/util/hashtable.c
+++ b/src/windows/identity/util/hashtable.c
@@ -30,11 +30,11 @@
#include<hashtable.h>
#include<stdlib.h>
-KHMEXP hashtable * KHMAPI hash_new_hashtable(khm_int32 n,
- hash_function_t hash,
+KHMEXP hashtable * KHMAPI hash_new_hashtable(khm_int32 n,
+ hash_function_t hash,
comp_function_t comp,
add_ref_function_t addr,
- del_ref_function_t delr)
+ del_ref_function_t delr)
{
hashtable * h;
@@ -160,7 +160,7 @@ KHMEXP khm_int32 hash_string(const void *vs) {
khm_int32 hv = 13331;
wchar_t * c;
-
+
for(c = (wchar_t *) vs; *c; c++) {
hv = ((hv<<5) + hv) + (khm_int32) *c;
}
diff --git a/src/windows/identity/util/hashtable.h b/src/windows/identity/util/hashtable.h
index 72fff2294b..c9647b5da0 100644
--- a/src/windows/identity/util/hashtable.h
+++ b/src/windows/identity/util/hashtable.h
@@ -106,8 +106,8 @@ typedef struct hashtable_t {
\param[in] delr A del-ref function. Optional; can be NULL.
*/
-KHMEXP hashtable * KHMAPI hash_new_hashtable(khm_int32 n,
- hash_function_t hash,
+KHMEXP hashtable * KHMAPI hash_new_hashtable(khm_int32 n,
+ hash_function_t hash,
comp_function_t comp,
add_ref_function_t addr,
del_ref_function_t delr);
diff --git a/src/windows/identity/util/mstring.c b/src/windows/identity/util/mstring.c
index 176afc46c6..0d5c861785 100644
--- a/src/windows/identity/util/mstring.c
+++ b/src/windows/identity/util/mstring.c
@@ -45,7 +45,7 @@ multi_string_init(wchar_t * ms,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_append(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * str)
@@ -91,7 +91,7 @@ multi_string_append(wchar_t * ms,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_prepend(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * str)
@@ -129,7 +129,7 @@ multi_string_prepend(wchar_t * ms,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_delete(wchar_t * ms,
const wchar_t * str,
const khm_int32 flags)
@@ -168,7 +168,7 @@ multi_string_delete(wchar_t * ms,
return KHM_ERROR_SUCCESS;
}
-KHMEXP wchar_t * KHMAPI
+KHMEXP wchar_t * KHMAPI
multi_string_find(const wchar_t * ms,
const wchar_t * str,
const khm_int32 flags)
@@ -207,7 +207,7 @@ multi_string_find(const wchar_t * ms,
return NULL;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_to_csv(wchar_t * csvbuf,
khm_size * pcb_csvbuf,
const wchar_t * ms)
@@ -298,7 +298,7 @@ multi_string_to_csv(wchar_t * csvbuf,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
csv_to_multi_string(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * csv)
@@ -389,7 +389,7 @@ csv_to_multi_string(wchar_t * ms,
return KHM_ERROR_SUCCESS;
}
-KHMEXP wchar_t * KHMAPI
+KHMEXP wchar_t * KHMAPI
multi_string_next(const wchar_t * str)
{
size_t cch;
@@ -407,7 +407,7 @@ multi_string_next(const wchar_t * str)
}
}
-KHMEXP khm_size KHMAPI
+KHMEXP khm_size KHMAPI
multi_string_length_n(const wchar_t * str)
{
size_t n = 0;
@@ -421,28 +421,28 @@ multi_string_length_n(const wchar_t * str)
return n;
}
-KHMEXP khm_int32 KHMAPI
-multi_string_length_cb(const wchar_t * str,
- khm_size max_cb,
+KHMEXP khm_int32 KHMAPI
+multi_string_length_cb(const wchar_t * str,
+ khm_size max_cb,
khm_size * len_cb)
{
khm_size cch;
khm_int32 rv;
rv = multi_string_length_cch(str, max_cb / sizeof(wchar_t), &cch);
-
+
if(KHM_FAILED(rv))
return rv;
-
+
if(len_cb)
*len_cb = cch * sizeof(wchar_t);
return rv;
}
-KHMEXP khm_int32 KHMAPI
-multi_string_length_cch(const wchar_t * str,
- khm_size max_cch,
+KHMEXP khm_int32 KHMAPI
+multi_string_length_cch(const wchar_t * str,
+ khm_size max_cch,
khm_size * len_cch)
{
const wchar_t * s;
@@ -471,9 +471,9 @@ multi_string_length_cch(const wchar_t * str,
return KHM_ERROR_SUCCESS;
}
-KHMEXP khm_int32 KHMAPI
-multi_string_copy_cb(wchar_t * s_dest,
- khm_size max_cb_dest,
+KHMEXP khm_int32 KHMAPI
+multi_string_copy_cb(wchar_t * s_dest,
+ khm_size max_cb_dest,
const wchar_t * src)
{
khm_size cb_dest;
@@ -491,9 +491,9 @@ multi_string_copy_cb(wchar_t * s_dest,
return rv;
}
-KHMEXP khm_int32 KHMAPI
-multi_string_copy_cch(wchar_t * s_dest,
- khm_size max_cch_dest,
+KHMEXP khm_int32 KHMAPI
+multi_string_copy_cch(wchar_t * s_dest,
+ khm_size max_cch_dest,
const wchar_t * src)
{
khm_size cch_dest;
diff --git a/src/windows/identity/util/mstring.h b/src/windows/identity/util/mstring.h
index 497cb777d4..3eebb4317e 100644
--- a/src/windows/identity/util/mstring.h
+++ b/src/windows/identity/util/mstring.h
@@ -66,7 +66,7 @@ multi_string_init(wchar_t * ms,
longer than KHM_MAXCCH_STRING in characters including the
terminating NULL.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_prepend(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * str);
@@ -97,7 +97,7 @@ multi_string_prepend(wchar_t * ms,
\retval KHM_ERROR_INVALID_PARAM One of more of the parameters were invalid.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_append(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * str);
@@ -111,7 +111,7 @@ multi_string_append(wchar_t * ms,
\param[in] ms The multi string to modify. The length of the multi
string in characters cannot exceed KHM_MAXCCH_STRING.
-
+
\param[in] str The string to search for
\param[in] flags How \a str is to be matched to existing strings
@@ -132,7 +132,7 @@ multi_string_append(wchar_t * ms,
\note The search for the existing string is done with
multi_string_find()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_delete(wchar_t * ms,
const wchar_t * str,
const khm_int32 flags);
@@ -163,7 +163,7 @@ multi_string_delete(wchar_t * ms,
NULL if no matches were found.
*/
-KHMEXP wchar_t * KHMAPI
+KHMEXP wchar_t * KHMAPI
multi_string_find(const wchar_t * ms,
const wchar_t * str,
const khm_int32 flags);
@@ -173,9 +173,9 @@ multi_string_find(const wchar_t * ms,
Converts a multi string to a comma separated value string based on
the following rules.
- - Each string in the multi string is treated an individual field
+ - Each string in the multi string is treated an individual field
- - A field is quoted if it has double quotes or commas
+ - A field is quoted if it has double quotes or commas
- Double quotes within quoted fields are escaped by two
consecutive double quotes.
@@ -213,7 +213,7 @@ multi_string_find(const wchar_t * ms,
\see csv_to_multi_string()
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
multi_string_to_csv(wchar_t * csvbuf,
khm_size * pcb_csvbuf,
const wchar_t * ms);
@@ -243,7 +243,7 @@ multi_string_to_csv(wchar_t * csvbuf,
\retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
*/
-KHMEXP khm_int32 KHMAPI
+KHMEXP khm_int32 KHMAPI
csv_to_multi_string(wchar_t * ms,
khm_size * pcb_ms,
const wchar_t * csv);
@@ -266,7 +266,7 @@ csv_to_multi_string(wchar_t * ms,
\return A pointer to the start of the next string in the multi
string or NULL if there is no more strings.
*/
-KHMEXP wchar_t * KHMAPI
+KHMEXP wchar_t * KHMAPI
multi_string_next(const wchar_t * str);
/*! \brief Get the length of a multi string in bytes
@@ -285,9 +285,9 @@ multi_string_next(const wchar_t * str);
\retval KHM_ERROR_TOO_LONG The multi string is longer than \a
max_cb bytes.
*/
-KHMEXP khm_int32 KHMAPI
-multi_string_length_cb(const wchar_t * str,
- khm_size max_cb,
+KHMEXP khm_int32 KHMAPI
+multi_string_length_cb(const wchar_t * str,
+ khm_size max_cb,
khm_size * len_cb);
/*! \brief Get the length of a multi string in characters
@@ -306,14 +306,14 @@ multi_string_length_cb(const wchar_t * str,
\retval KHM_ERROR_TOO_LONG The multi string is longer than \a
max_cch characters.
*/
-KHMEXP khm_int32 KHMAPI
-multi_string_length_cch(const wchar_t * str,
- khm_size max_cch,
+KHMEXP khm_int32 KHMAPI
+multi_string_length_cch(const wchar_t * str,
+ khm_size max_cch,
khm_size * len_cch);
/*! \brief Get the number of strings in a multi string
*/
-KHMEXP khm_size KHMAPI
+KHMEXP khm_size KHMAPI
multi_string_length_n(const wchar_t * str);
/*! \brief Copy a multi string with byte counts
@@ -331,9 +331,9 @@ multi_string_length_n(const wchar_t * str);
\retval KHM_ERROR_TOO_LONG The size of the destination buffer was
insufficient.
*/
-KHMEXP khm_int32 KHMAPI
-multi_string_copy_cb(wchar_t * s_dest,
- khm_size max_cb_dest,
+KHMEXP khm_int32 KHMAPI
+multi_string_copy_cb(wchar_t * s_dest,
+ khm_size max_cb_dest,
const wchar_t * src);
/*! \brief Copy a multi string with character count
@@ -351,9 +351,9 @@ multi_string_copy_cb(wchar_t * s_dest,
\retval KHM_ERROR_TOO_LONG The size of the destination buffer was
insufficient.
*/
-KHMEXP khm_int32 KHMAPI
-multi_string_copy_cch(wchar_t * s_dest,
- khm_size max_cch_dest,
+KHMEXP khm_int32 KHMAPI
+multi_string_copy_cch(wchar_t * s_dest,
+ khm_size max_cch_dest,
const wchar_t * src);
/*@}*/
diff --git a/src/windows/identity/util/perfstat.c b/src/windows/identity/util/perfstat.c
index aece7e273d..6eddb46975 100644
--- a/src/windows/identity/util/perfstat.c
+++ b/src/windows/identity/util/perfstat.c
@@ -209,7 +209,7 @@ perf_calloc(const char * file, int line, size_t num, size_t size) {
return ptr;
}
-KHMEXP void *
+KHMEXP void *
perf_malloc(const char * file, int line, size_t s) {
allocation * a;
void * ptr;
diff --git a/src/windows/identity/util/sync.c b/src/windows/identity/util/sync.c
index ba20424c42..23465ce564 100644
--- a/src/windows/identity/util/sync.c
+++ b/src/windows/identity/util/sync.c
@@ -39,7 +39,7 @@ KHMEXP void KHMAPI InitializeRwLock(PRWLOCK pLock)
pLock->locks = 0;
pLock->status = LOCK_OPEN;
InitializeCriticalSection(&(pLock->cs));
- pLock->writewx = CreateEvent(NULL,
+ pLock->writewx = CreateEvent(NULL,
FALSE, /* Manual reset */
TRUE, /* Initial state */
NULL);
@@ -95,7 +95,7 @@ KHMEXP void KHMAPI LockReleaseRead(PRWLOCK pLock)
KHMEXP void KHMAPI LockObtainWrite(PRWLOCK pLock)
{
EnterCriticalSection(&(pLock->cs));
- if(pLock->status == LOCK_WRITING &&
+ if(pLock->status == LOCK_WRITING &&
pLock->writer == GetCurrentThreadId()) {
pLock->locks++;
LeaveCriticalSection(&(pLock->cs));
diff --git a/src/windows/kfwlogon/kfwcommon.c b/src/windows/kfwlogon/kfwcommon.c
index c07bd81c3f..bd09fcd4ba 100644
--- a/src/windows/kfwlogon/kfwcommon.c
+++ b/src/windows/kfwlogon/kfwcommon.c
@@ -301,12 +301,12 @@ BOOL IsDebugLogging(void)
HKEY NPKey;
DWORD dwDebug = FALSE;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- "System\\CurrentControlSet\\Services\\MIT Kerberos\\NetworkProvider",
- 0, KEY_QUERY_VALUE, &NPKey) == ERROR_SUCCESS)
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ "System\\CurrentControlSet\\Services\\MIT Kerberos\\NetworkProvider",
+ 0, KEY_QUERY_VALUE, &NPKey) == ERROR_SUCCESS)
{
LSPsize=sizeof(dwDebug);
- if (RegQueryValueEx(NPKey, "Debug", NULL, NULL, (LPBYTE)&dwDebug, &LSPsize) != ERROR_SUCCESS)
+ if (RegQueryValueEx(NPKey, "Debug", NULL, NULL, (LPBYTE)&dwDebug, &LSPsize) != ERROR_SUCCESS)
{
dwDebug = FALSE;
}
@@ -316,10 +316,10 @@ BOOL IsDebugLogging(void)
return(dwDebug ? TRUE : FALSE);
}
-void DebugEvent0(char *a)
+void DebugEvent0(char *a)
{
HANDLE h; char *ptbuf[1];
-
+
if (IsDebugLogging()) {
h = RegisterEventSource(NULL, KFW_LOGON_EVENT_NAME);
if (h) {
@@ -331,7 +331,7 @@ void DebugEvent0(char *a)
}
#define MAXBUF_ 512
-void DebugEvent(char *b,...)
+void DebugEvent(char *b,...)
{
HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
va_list marker;
@@ -352,7 +352,7 @@ void DebugEvent(char *b,...)
void
UnloadFuncs(
- FUNC_INFO fi[],
+ FUNC_INFO fi[],
HINSTANCE h
)
{
@@ -365,8 +365,8 @@ UnloadFuncs(
int
LoadFuncs(
- const char* dll_name,
- FUNC_INFO fi[],
+ const char* dll_name,
+ FUNC_INFO fi[],
HINSTANCE* ph, // [out, optional] - DLL handle
int* pindex, // [out, optional] - index of last func loaded (-1 if none)
int cleanup, // cleanup function pointers and unload on error
@@ -433,7 +433,7 @@ KFW_initialize(void)
HANDLE hMutex = NULL;
sprintf(mutexName, "AFS KFW Init pid=%d", getpid());
-
+
hMutex = CreateMutex( NULL, TRUE, mutexName );
if ( GetLastError() == ERROR_ALREADY_EXISTS ) {
if ( WaitForSingleObject( hMutex, INFINITE ) != WAIT_OBJECT_0 ) {
@@ -480,13 +480,13 @@ KFW_cleanup(void)
}
-int
+int
KFW_is_available(void)
{
KFW_initialize();
- if ( hKrb5 && hComErr && hService &&
+ if ( hKrb5 && hComErr && hService &&
#ifdef USE_MS2MIT
- hSecur32 &&
+ hSecur32 &&
#endif /* USE_MS2MIT */
hProfile && hLeash && hCCAPI )
return TRUE;
@@ -581,16 +581,16 @@ KFW_kinit( krb5_context alt_ctx,
if ( alt_cc ) {
cc = alt_cc;
} else {
- code = pkrb5_cc_default(ctx, &cc);
+ code = pkrb5_cc_default(ctx, &cc);
if (code) goto cleanup;
}
code = pkrb5_parse_name(ctx, principal_name, &me);
- if (code)
+ if (code)
goto cleanup;
code = pkrb5_unparse_name(ctx, me, &name);
- if (code)
+ if (code)
goto cleanup;
if (lifetime == 0)
@@ -664,14 +664,14 @@ KFW_kinit( krb5_context alt_ctx,
netIPAddr = htonl(publicIP);
memcpy(addrs[i]->contents,&netIPAddr,4);
-
+
pkrb5_get_init_creds_opt_set_address_list(&options,addrs);
}
}
- code = pkrb5_get_init_creds_password(ctx,
- &my_creds,
+ code = pkrb5_get_init_creds_password(ctx,
+ &my_creds,
me,
password, // password
NULL, // no prompter
@@ -679,15 +679,15 @@ KFW_kinit( krb5_context alt_ctx,
0, // start time
0, // service name
&options);
- if (code)
+ if (code)
goto cleanup;
code = pkrb5_cc_initialize(ctx, cc, me);
- if (code)
+ if (code)
goto cleanup;
code = pkrb5_cc_store_cred(ctx, cc, &my_creds);
- if (code)
+ if (code)
goto cleanup;
cleanup:
@@ -716,7 +716,7 @@ KFW_kinit( krb5_context alt_ctx,
int
-KFW_get_cred( char * username,
+KFW_get_cred( char * username,
char * password,
int lifetime,
char ** reasonP )
@@ -748,7 +748,7 @@ KFW_get_cred( char * username,
} else {
goto cleanup;
}
-
+
DebugEvent0(realm);
DebugEvent0(pname);
@@ -766,8 +766,8 @@ KFW_get_cred( char * username,
DebugEvent0("got lifetime");
- code = KFW_kinit( ctx, cc, HWND_DESKTOP,
- pname,
+ code = KFW_kinit( ctx, cc, HWND_DESKTOP,
+ pname,
password,
lifetime,
pLeash_get_default_forwardable(),
@@ -802,7 +802,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
PTOKEN_USER pTokenUser = NULL;
DWORD retLen;
DWORD gle;
- int ret = 0;
+ int ret = 0;
if (!filename) {
DebugEvent0("KFW_set_ccache_dacl - invalid parms");
@@ -833,13 +833,13 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
{
DebugEvent("GetTokenInformation failed: GLE = %lX", GetLastError());
}
- }
+ }
}
if (pTokenUser) {
UserSIDlength = GetLengthSid(pTokenUser->User.Sid);
- ccacheACLlength += sizeof(ACCESS_ALLOWED_ACE) + UserSIDlength
+ ccacheACLlength += sizeof(ACCESS_ALLOWED_ACE) + UserSIDlength
- sizeof(DWORD);
}
}
@@ -862,7 +862,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
NULL,
- NULL,
+ NULL,
ccacheACL,
NULL)) {
gle = GetLastError();
@@ -873,7 +873,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION,
pTokenUser->User.Sid,
- NULL,
+ NULL,
NULL,
NULL)) {
gle = GetLastError();
@@ -885,7 +885,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
NULL,
- NULL,
+ NULL,
ccacheACL,
NULL)) {
gle = GetLastError();
@@ -913,7 +913,7 @@ int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)
PACL ccacheACL = NULL;
DWORD ccacheACLlength = 0;
DWORD gle;
- int ret = 0;
+ int ret = 0;
if (!filename) {
DebugEvent0("KFW_set_ccache_dacl_with_user_sid - invalid parms");
@@ -937,7 +937,7 @@ int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)
if (pUserSID) {
UserSIDlength = GetLengthSid(pUserSID);
- ccacheACLlength += sizeof(ACCESS_ALLOWED_ACE) + UserSIDlength
+ ccacheACLlength += sizeof(ACCESS_ALLOWED_ACE) + UserSIDlength
- sizeof(DWORD);
}
@@ -959,7 +959,7 @@ int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
NULL,
- NULL,
+ NULL,
ccacheACL,
NULL)) {
gle = GetLastError();
@@ -970,7 +970,7 @@ int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION,
pUserSID,
- NULL,
+ NULL,
NULL,
NULL)) {
gle = GetLastError();
@@ -982,7 +982,7 @@ int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)
if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
NULL,
- NULL,
+ NULL,
ccacheACL,
NULL)) {
gle = GetLastError();
@@ -1031,7 +1031,7 @@ KFW_copy_cache_to_system_file(const char * user, const char * filename)
krb5_ccache cc = 0;
krb5_ccache ncc = 0;
PSECURITY_ATTRIBUTES pSA = NULL;
-
+
if (!pkrb5_init_context || !user || !filename)
return;
@@ -1107,7 +1107,7 @@ KFW_copy_file_cache_to_default_cache(char * filename)
DebugEvent0("kfwcpcc krb5_cc_resolve failed");
goto cleanup;
}
-
+
code = pkrb5_cc_get_principal(ctx, cc, &princ);
if (code) {
DebugEvent0("kfwcpcc krb5_cc_get_principal failed");
@@ -1184,7 +1184,7 @@ KFW_copy_file_cache_to_api_cache(char * filename)
DebugEvent0("kfwcpcc krb5_cc_resolve failed");
goto cleanup;
}
-
+
code = pkrb5_cc_get_principal(ctx, cc, &princ);
if (code) {
DebugEvent0("kfwcpcc krb5_cc_get_principal failed");
@@ -1244,7 +1244,7 @@ KFW_copy_file_cache_to_api_cache(char * filename)
}
-int
+int
KFW_destroy_tickets_for_principal(char * user)
{
krb5_context ctx = 0;
@@ -1285,7 +1285,7 @@ KFW_destroy_tickets_for_principal(char * user)
/* There are scenarios in which an interactive logon will not
* result in the LogonScript being executed. This will result
* in orphaned cache files being left in the Temp directory.
- * This function will search for cache files in the Temp
+ * This function will search for cache files in the Temp
* directory and delete any that are older than five minutes.
*/
void
diff --git a/src/windows/kfwlogon/kfwcpcc.c b/src/windows/kfwlogon/kfwcpcc.c
index fb0861e474..0ddd0a1903 100644
--- a/src/windows/kfwlogon/kfwcpcc.c
+++ b/src/windows/kfwlogon/kfwcpcc.c
@@ -35,5 +35,3 @@ int main(int argc, char *argv[])
return KFW_copy_file_cache_to_api_cache(argv[1]);
}
-
-
diff --git a/src/windows/kfwlogon/kfwlogon.c b/src/windows/kfwlogon/kfwlogon.c
index 54d7a5a1d6..d851c4685a 100644
--- a/src/windows/kfwlogon/kfwlogon.c
+++ b/src/windows/kfwlogon/kfwlogon.c
@@ -77,7 +77,7 @@ DWORD APIENTRY NPGetCaps(DWORD index)
default:
return 0;
}
-}
+}
static BOOL
@@ -91,7 +91,7 @@ UnicodeStringToANSI(UNICODE_STRING uInputString, LPSTR lpszOutputString, int nOu
if (CodePageInfo.MaxCharSize > 1)
// Only supporting non-Unicode strings
return FALSE;
-
+
if (uInputString.Buffer && ((LPBYTE) uInputString.Buffer)[1] == '\0')
{
// Looks like unicode, better translate it
@@ -134,16 +134,16 @@ is_windows_vista(void)
/* Construct a Logon Script that will cause the LogonEventHandler to be executed
- * under in the logon session
+ * under in the logon session
*/
#define RUNDLL32_CMDLINE "rundll32.exe kfwlogon.dll,LogonEventHandler "
-VOID
+VOID
ConfigureLogonScript(LPWSTR *lpLogonScript, char * filename) {
DWORD dwLogonScriptLen;
LPWSTR lpScript;
LPSTR lpTemp;
-
+
if (!lpLogonScript)
return;
*lpLogonScript = NULL;
@@ -152,7 +152,7 @@ ConfigureLogonScript(LPWSTR *lpLogonScript, char * filename) {
return;
dwLogonScriptLen = strlen(RUNDLL32_CMDLINE) + strlen(filename) + 2;
- lpTemp = (LPSTR) malloc(dwLogonScriptLen);
+ lpTemp = (LPSTR) malloc(dwLogonScriptLen);
if (!lpTemp)
return;
@@ -208,10 +208,10 @@ DWORD APIENTRY NPLogonNotify(
DebugEvent0("NPLogonNotify start");
- /* Remote Desktop / Terminal Server connections to existing sessions
+ /* Remote Desktop / Terminal Server connections to existing sessions
* are interactive logons. Unfortunately, because the session already
- * exists the logon script does not get executed and this prevents
- * us from being able to execute the rundll32 entrypoint
+ * exists the logon script does not get executed and this prevents
+ * us from being able to execute the rundll32 entrypoint
* LogonEventHandlerA which would process the credential cache this
* routine will produce. Therefore, we must cleanup orphaned cache
* files from this routine. We will take care of it before doing
@@ -228,9 +228,9 @@ DWORD APIENTRY NPLogonNotify(
DWORD rv;
SetLastError(0);
- rv = WideCharToMultiByte(CP_UTF8, 0, lpStationName, -1,
+ rv = WideCharToMultiByte(CP_UTF8, 0, lpStationName, -1,
station, sizeof(station), NULL, NULL);
- DebugEvent("Skipping NPLogonNotify- LoginId(%d,%d) - Interactive(%d:%s) - gle %d",
+ DebugEvent("Skipping NPLogonNotify- LoginId(%d,%d) - Interactive(%d:%s) - gle %d",
lpLogonId->HighPart, lpLogonId->LowPart, interactive, rv != 0 ? station : "failure", GetLastError());
return 0;
} else
@@ -238,15 +238,15 @@ DWORD APIENTRY NPLogonNotify(
/* Initialize Logon Script to none */
*lpLogonScript=NULL;
-
+
/* MSV1_0_INTERACTIVE_LOGON and KERB_INTERACTIVE_LOGON are equivalent for
* our purposes */
- if ( wcsicmp(lpAuthentInfoType,L"MSV1_0:Interactive") &&
+ if ( wcsicmp(lpAuthentInfoType,L"MSV1_0:Interactive") &&
wcsicmp(lpAuthentInfoType,L"Kerberos:Interactive") )
{
char msg[64];
- WideCharToMultiByte(CP_ACP, 0, lpAuthentInfoType, -1,
+ WideCharToMultiByte(CP_ACP, 0, lpAuthentInfoType, -1,
msg, sizeof(msg), NULL, NULL);
msg[sizeof(msg)-1]='\0';
DebugEvent("NPLogonNotify - Unsupported Authentication Info Type: %s", msg);
@@ -277,9 +277,9 @@ DWORD APIENTRY NPLogonNotify(
code = KFW_get_cred(uname, password, 0, &reason);
DebugEvent("NPLogonNotify - KFW_get_cred uname=[%s] code=[%d]",uname, code);
-
+
/* remove any kerberos 5 tickets currently held by the SYSTEM account
- * for this user
+ * for this user
*/
if (!code) {
char filename[MAX_PATH+1] = "";
@@ -301,7 +301,7 @@ DWORD APIENTRY NPLogonNotify(
}
if (_snprintf(filename, sizeof(filename), "%s\\kfwlogon-%x.%x",
- filename, lpLogonId->HighPart, lpLogonId->LowPart) < 0)
+ filename, lpLogonId->HighPart, lpLogonId->LowPart) < 0)
{
code = -1;
goto cleanup;
@@ -328,7 +328,7 @@ DWORD APIENTRY NPLogonNotify(
pReferencedDomainName = (LPTSTR) malloc (dwDomainLen * sizeof(TCHAR));
memset(pReferencedDomainName,0,dwDomainLen * sizeof(TCHAR));
}
-
+
//Now get the SID and the domain name
if (pUserSid && LookupAccountName( NULL,
acctname,
@@ -336,14 +336,14 @@ DWORD APIENTRY NPLogonNotify(
&dwSidLen,
pReferencedDomainName,
&dwDomainLen,
- &eUse))
+ &eUse))
{
DebugEvent("LookupAccountName obtained user %s sid in domain %s", acctname, pReferencedDomainName);
code = KFW_set_ccache_dacl_with_user_sid(filename, pUserSid);
#ifdef USE_WINLOGON_EVENT
- /* If we are on Vista, setup a LogonScript
- * that will execute the LogonEventHandler entry point via rundll32.exe
+ /* If we are on Vista, setup a LogonScript
+ * that will execute the LogonEventHandler entry point via rundll32.exe
*/
if (is_windows_vista()) {
ConfigureLogonScript(lpLogonScript, filename);
@@ -356,7 +356,7 @@ DWORD APIENTRY NPLogonNotify(
ConfigureLogonScript(lpLogonScript, filename);
if (*lpLogonScript)
DebugEvent0("LogonScript assigned");
- else
+ else
DebugEvent0("No Logon Script");
#endif
} else {
@@ -394,7 +394,7 @@ DWORD APIENTRY NPLogonNotify(
DebugEvent0("NPLogonNotify success");
return code;
-}
+}
DWORD APIENTRY NPPasswordChangeNotify(
@@ -413,14 +413,14 @@ DWORD APIENTRY NPPasswordChangeNotify(
#include <Winwlx.h>
#ifdef COMMENT
-typedef struct _WLX_NOTIFICATION_INFO {
- ULONG Size;
- ULONG Flags;
- PWSTR UserName;
- PWSTR Domain;
- PWSTR WindowStation;
- HANDLE hToken;
- HDESK hDesktop;
+typedef struct _WLX_NOTIFICATION_INFO {
+ ULONG Size;
+ ULONG Flags;
+ PWSTR UserName;
+ PWSTR Domain;
+ PWSTR WindowStation;
+ HANDLE hToken;
+ HDESK hDesktop;
PFNMSGECALLBACK pStatusCallback;
} WLX_NOTIFICATION_INFO, *PWLX_NOTIFICATION_INFO;
#endif
@@ -511,9 +511,9 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
}
strcat(filename, "\\");
- strcat(filename, szLogonId);
+ strcat(filename, szLogonId);
- hf = CreateFile(filename, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING,
+ hf = CreateFile(filename, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
if (hf == INVALID_HANDLE_VALUE) {
DebugEvent0("KFW_Logon_Event - file cannot be opened");
@@ -538,9 +538,9 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
}
strcat(newfilename, "\\");
- strcat(newfilename, szLogonId);
+ strcat(newfilename, szLogonId);
- if (!MoveFileEx(filename, newfilename,
+ if (!MoveFileEx(filename, newfilename,
MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH)) {
DebugEvent("KFW_Logon_Event - MoveFileEx failed GLE = 0x%x", GetLastError());
return;
@@ -559,7 +559,7 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
NULL,
NULL,
&startupinfo,
- &procinfo))
+ &procinfo))
{
DebugEvent("KFW_Logon_Event - CommandLine %s", commandline);
@@ -578,8 +578,8 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
}
-/* Documentation on the use of RunDll32 entrypoints can be found
- * at http://support.microsoft.com/kb/164787
+/* Documentation on the use of RunDll32 entrypoints can be found
+ * at http://support.microsoft.com/kb/164787
*/
void CALLBACK
LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
@@ -592,7 +592,7 @@ LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
DebugEvent0("LogonEventHandler - Start");
/* Validate lpszCmdLine as a file */
- hf = CreateFile(lpszCmdLine, GENERIC_READ | DELETE, 0, NULL, OPEN_EXISTING,
+ hf = CreateFile(lpszCmdLine, GENERIC_READ | DELETE, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
if (hf == INVALID_HANDLE_VALUE) {
DebugEvent("LogonEventHandler - \"%s\" cannot be opened", lpszCmdLine);
@@ -614,7 +614,7 @@ LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
NULL,
NULL,
&startupinfo,
- &procinfo))
+ &procinfo))
{
DebugEvent("KFW_Logon_Event - CommandLine %s", commandline);
@@ -623,7 +623,7 @@ LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)
CloseHandle(procinfo.hThread);
CloseHandle(procinfo.hProcess);
} else {
- DebugEvent("KFW_Logon_Event - CreateProcessFailed \"%s\" GLE 0x%x",
+ DebugEvent("KFW_Logon_Event - CreateProcessFailed \"%s\" GLE 0x%x",
commandline, GetLastError());
DebugEvent("KFW_Logon_Event PATH %s", getenv("PATH"));
}
diff --git a/src/windows/kfwlogon/kfwlogon.h b/src/windows/kfwlogon/kfwlogon.h
index 2f1a62b6ed..141b9c36ba 100644
--- a/src/windows/kfwlogon/kfwlogon.h
+++ b/src/windows/kfwlogon/kfwlogon.h
@@ -28,13 +28,13 @@ SOFTWARE.
#pragma once
/* _WIN32_WINNT must be 0x0501 or greater to pull in definition of
- * all required LSA data types when the Vista SDK NtSecAPI.h is used.
+ * all required LSA data types when the Vista SDK NtSecAPI.h is used.
*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#else
#if _WIN32_WINNT < 0x0501
-#undef _WIN32_WINNT
+#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif
diff --git a/src/windows/lib/cacheapi.h b/src/windows/lib/cacheapi.h
index 722eb7e54a..42189ee69d 100644
--- a/src/windows/lib/cacheapi.h
+++ b/src/windows/lib/cacheapi.h
@@ -3,34 +3,34 @@
*
* Copyright 1997 by the Regents of the University of Michigan
*
- * This software is being provided to you, the LICENSEE, by the
- * Regents of the University of Michigan (UM) under the following
- * license. By obtaining, using and/or copying this software, you agree
- * that you have read, understood, and will comply with these terms and
- * conditions:
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation for any purpose and without fee or royalty is hereby
- * granted, provided that you agree to comply with the following copyright
- * notice and statements, including the disclaimer, and that the same
- * appear on ALL copies of the software and documentation, including
+ * This software is being provided to you, the LICENSEE, by the
+ * Regents of the University of Michigan (UM) under the following
+ * license. By obtaining, using and/or copying this software, you agree
+ * that you have read, understood, and will comply with these terms and
+ * conditions:
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation for any purpose and without fee or royalty is hereby
+ * granted, provided that you agree to comply with the following copyright
+ * notice and statements, including the disclaimer, and that the same
+ * appear on ALL copies of the software and documentation, including
* modifications that you make for internal use or for distribution:
- *
- * Copyright 1997 by the Regents of the University of Michigan.
- * All rights reserved.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", AND UM MAKES NO REPRESENTATIONS
- * OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
- * limitation, UM MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY
- * OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED
- * SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
- * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
- *
- * The name of the University of Michigan or UM may NOT be used in
+ *
+ * Copyright 1997 by the Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", AND UM MAKES NO REPRESENTATIONS
+ * OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
+ * limitation, UM MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY
+ * OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED
+ * SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
+ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+ *
+ * The name of the University of Michigan or UM may NOT be used in
* advertising or publicity pertaining to distribution of the software.
- * Title to copyright in this software and any associated documentation
+ * Title to copyright in this software and any associated documentation
* shall at all times remain with UM, and USER agrees to preserve same.
- *
+ *
* The University of Michigan
* c/o Steve Rothwell <sgr@umich.edu>
* 535 W. William Street
@@ -39,7 +39,7 @@
*/
/*
-** CacheAPI.h
+** CacheAPI.h
**
** The externally visible functions and data structures
** for the Kerberos Common Cache DLL
@@ -105,11 +105,11 @@ typedef struct opaque_ccache_pointer_type* ccache_p;
typedef struct opaque_credential_iterator_type* ccache_cit;
#if 0
-enum _cc_data_type {
+enum _cc_data_type {
type_ticket = 0, /* 0 for ticket, second_ticket */
- /* Ted's draft spec says these are to be
+ /* Ted's draft spec says these are to be
"as defined in the Kerberos V5 protocol"
- all I can find are typdefs,
+ all I can find are typdefs,
can't find an enumerated type or #define
*/
type_address, /* = <"as defined in the Kerberos V5 protocol"> */
@@ -122,7 +122,7 @@ enum _cc_data_type {
typedef struct _cc_data
{
cc_uint32 type; // should be one of _cc_data_type
- cc_uint32 length;
+ cc_uint32 length;
unsigned char* data; // the proverbial bag-o-bits
} cc_data;
@@ -219,7 +219,7 @@ extern "C" /* this entire list of functions */
*/
CCACHE_API
cc_initialize(
- apiCB** cc_ctx, // < DLL's primary control structure.
+ apiCB** cc_ctx, // < DLL's primary control structure.
// returned here, passed everywhere else
cc_int32 api_version, // > ver supported by caller (use CC_API_VER_1)
cc_int32* api_supported, // < if ~NULL, max ver supported by DLL
@@ -240,7 +240,7 @@ cc_get_change_time(
/*
** Named Cache (NC) routines
-** create, open, close, destroy, get_principal, get_cred_version, &
+** create, open, close, destroy, get_principal, get_cred_version, &
** lock_request
**
** Multiple NCs are allowed within the main cache. Each has a Name
@@ -284,13 +284,13 @@ cc_destroy(
CCACHE_API
cc_seq_fetch_NCs_begin(
- apiCB* cc_ctx,
+ apiCB* cc_ctx,
ccache_cit** itNCs
);
CCACHE_API
cc_seq_fetch_NCs_end(
- apiCB* cc_ctx,
+ apiCB* cc_ctx,
ccache_cit** itNCs
);
@@ -305,7 +305,7 @@ CCACHE_API
cc_seq_fetch_NCs(
apiCB* cc_ctx, // > DLL's primary control structure
ccache_p** ccache_ptr, // < NC control structure (free via cc_close())
- ccache_cit** itNCs // <> iterator used by DLL,
+ ccache_cit** itNCs // <> iterator used by DLL,
// set to NULL before first call
// returned NULL at CC_END
);
@@ -313,14 +313,14 @@ cc_seq_fetch_NCs(
CCACHE_API
cc_get_NC_info(
apiCB* cc_ctx, // > DLL's primary control structure
- struct _infoNC*** ppNCi // < (NULL before call) null terminated,
+ struct _infoNC*** ppNCi // < (NULL before call) null terminated,
// list of a structs (free via cc_free_infoNC())
);
CCACHE_API
cc_free_NC_info(
apiCB* cc_ctx,
- struct _infoNC*** ppNCi // < free list of structs returned by
+ struct _infoNC*** ppNCi // < free list of structs returned by
// cc_get_cache_names(). set to NULL on return
);
@@ -332,7 +332,7 @@ CCACHE_API
cc_get_name(
apiCB* cc_ctx, // > DLL's primary control structure
const ccache_p* ccache_ptr, // > NC control structure
- char** name // < name of NC associated with ccache_ptr
+ char** name // < name of NC associated with ccache_ptr
// (free via cc_free_name())
);
@@ -343,8 +343,8 @@ cc_set_principal(
const cc_int32 vers,
const char* principal // > name of principal associated with NC
// Free via cc_free_principal()
- );
-
+ );
+
CCACHE_API
cc_get_principal(
apiCB* cc_ctx, // > DLL's primary control structure
@@ -369,14 +369,14 @@ CCACHE_API
cc_lock_request(
apiCB* cc_ctx, // > DLL's primary control structure
const ccache_p* ccache_ptr, // > NC control structure
- const cc_int32 lock_type // > one (or combination) of above defined
+ const cc_int32 lock_type // > one (or combination) of above defined
// lock types
);
/*
** Credentials routines (work within an NC)
-** store, remove_cred, seq_fetch_creds
+** store, remove_cred, seq_fetch_creds
*/
CCACHE_API
cc_store(
@@ -397,33 +397,33 @@ cc_seq_fetch_creds(
apiCB* cc_ctx, // > DLL's primary control structure
const ccache_p* ccache_ptr, // > NC control structure
cred_union** creds, // < filled in by DLL, free via cc_free_creds()
- ccache_cit** itCreds // <> iterator used by DLL, set to NULL
+ ccache_cit** itCreds // <> iterator used by DLL, set to NULL
// before first call -- Also NULL for final
// call if loop ends before CC_END
);
CCACHE_API
cc_seq_fetch_creds_begin(
- apiCB* cc_ctx,
- const ccache_p* ccache_ptr,
+ apiCB* cc_ctx,
+ const ccache_p* ccache_ptr,
ccache_cit** itCreds
);
CCACHE_API
cc_seq_fetch_creds_end(
- apiCB* cc_ctx,
+ apiCB* cc_ctx,
ccache_cit** itCreds
);
CCACHE_API
cc_seq_fetch_creds_next(
- apiCB* cc_ctx,
- cred_union** cred,
+ apiCB* cc_ctx,
+ cred_union** cred,
ccache_cit* itCreds
);
/*
-** methods of liberation,
+** methods of liberation,
** or freeing space via the free that goes with the malloc used to get it
** It's important to use the free carried in the DLL, not the one supplied
** by your compiler vendor.
diff --git a/src/windows/lib/registry.c b/src/windows/lib/registry.c
index 7dfbb5bffd..5b7ff1e828 100644
--- a/src/windows/lib/registry.c
+++ b/src/windows/lib/registry.c
@@ -84,7 +84,7 @@ registry_string_get(HKEY hkey, char *sub, char **val)
*val = NULL;
return -1;
}
-
+
return 0;
}
@@ -106,7 +106,7 @@ registry_dword_get(HKEY hkey, char *sub, DWORD *val)
*val = 0;
return -1;
}
-
+
return 0;
}
diff --git a/src/windows/lib/vardlg.c b/src/windows/lib/vardlg.c
index dae8cdbbcf..3bec6e4e60 100644
--- a/src/windows/lib/vardlg.c
+++ b/src/windows/lib/vardlg.c
@@ -54,7 +54,7 @@ ADD_UNICODE_STRING(unsigned char *p, const char *s)
w = (WORD *)p;
len = strlen(s) + 1; /* copy the null, too */
-
+
for (i = 0 ; i < len ; i++)
*w++ = *s++;
@@ -112,7 +112,7 @@ ADD_DLGITEM(unsigned char *dlg, short x, short y, short cx, short cy,
{
unsigned char *p;
DLGITEMTEMPLATE dit;
-
+
p = dlg;
dit.style = style;
@@ -429,7 +429,7 @@ vardlg_config(HWND hwnd, WORD width, const char *banner, WORD num_prompts,
* button is IDCANCEL, as usual.
*
* After calling bld_dlg, the banner will have ID "id", and the labels
- * will be "1 + id + i * 2" (i is the entry number, starting with zero) and
+ * will be "1 + id + i * 2" (i is the entry number, starting with zero) and
* the entries will be "2 + id + i * 2".
*
* unsigned char *dlg = vardlg_build(minwidth, banner, num_prompts,
diff --git a/src/windows/ms2mit/mit2ms.c b/src/windows/ms2mit/mit2ms.c
index 6f30d9f6db..ac36cba6d0 100644
--- a/src/windows/ms2mit/mit2ms.c
+++ b/src/windows/ms2mit/mit2ms.c
@@ -36,7 +36,7 @@ extern char *optarg;
static char *prog;
-static void
+static void
xusage(void)
{
fprintf(stderr, "xusage: %s [-c ccache]\n", prog);
@@ -79,7 +79,7 @@ main(
com_err(argv[0], code, "while initializing kerberos library");
exit(1);
}
-
+
if (ccachestr)
code = krb5_cc_resolve(kcontext, ccachestr, &ccache);
else
@@ -99,7 +99,7 @@ main(
exit(1);
}
- while (!(code = krb5_cc_next_cred(kcontext, ccache, &cursor, &creds)))
+ while (!(code = krb5_cc_next_cred(kcontext, ccache, &cursor, &creds)))
{
if ( creds.ticket_flags & TKT_FLG_INITIAL ) {
krb5_free_cred_contents(kcontext, &creds);
diff --git a/src/windows/ms2mit/ms2mit.c b/src/windows/ms2mit/ms2mit.c
index 5999a18471..3d73d0adfc 100644
--- a/src/windows/ms2mit/ms2mit.c
+++ b/src/windows/ms2mit/ms2mit.c
@@ -36,7 +36,7 @@ extern char *optarg;
static char *prog;
-static void
+static void
xusage(void)
{
fprintf(stderr, "xusage: %s [-c ccache]\n", prog);
@@ -74,12 +74,12 @@ main(
break;
}
}
-
+
if (code = krb5_init_context(&kcontext)) {
com_err(argv[0], code, "while initializing kerberos library");
exit(1);
}
-
+
if (code = krb5_cc_resolve(kcontext, "MSLSA:", &mslsa_ccache)) {
com_err(argv[0], code, "while opening MS LSA ccache");
krb5_free_context(kcontext);
@@ -101,7 +101,7 @@ main(
exit(1);
}
- while (!(code = krb5_cc_next_cred(kcontext, mslsa_ccache, &cursor, &creds)))
+ while (!(code = krb5_cc_next_cred(kcontext, mslsa_ccache, &cursor, &creds)))
{
if ( creds.ticket_flags & TKT_FLG_INITIAL ) {
krb5_free_cred_contents(kcontext, &creds);
diff --git a/src/windows/ntsecapitest.c b/src/windows/ntsecapitest.c
index 7fbbacbaa5..459e5dbd7f 100644
--- a/src/windows/ntsecapitest.c
+++ b/src/windows/ntsecapitest.c
@@ -4,8 +4,8 @@
#include "ntsecapi.h"
-#ifdef TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS
+#ifdef TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS
VISTA_SDK_VERSION
#else
NT_SDK_VERSION
-#endif \ No newline at end of file
+#endif
diff --git a/src/windows/winlevel.h b/src/windows/winlevel.h
index fc8f4c6d83..7f56b569bf 100644
--- a/src/windows/winlevel.h
+++ b/src/windows/winlevel.h
@@ -25,9 +25,9 @@
*/
/*
- * This is the slave file for Windows version stamping purposes.
-/* This value should be an ever increasing number that is
+ * This is the slave file for Windows version stamping purposes.
+/* This value should be an ever increasing number that is
* updated for each alpha, beta, final release. This will ensure
* that file identifiers are unique
- */
+ */
#define KRB5_BUILDLEVEL 0
diff --git a/src/windows/wintel/auth.c b/src/windows/wintel/auth.c
index 28f515b6c6..433bce38c3 100644
--- a/src/windows/wintel/auth.c
+++ b/src/windows/wintel/auth.c
@@ -99,10 +99,10 @@ Data(kstream ks, int type, void *d, int c)
{
unsigned char *p = str_data + 4;
unsigned char *cd = (unsigned char *)d;
-
+
if (c == -1)
c = strlen((char *)cd);
-
+
*p++ = AUTHTYPE_KERBEROS_V5;
*p = AUTH_WHO_CLIENT|AUTH_HOW_MUTUAL;
#ifdef ENCRYPTION
@@ -144,16 +144,16 @@ static void
auth_abort(kstream ks, char *errmsg, long r)
{
char buf[9];
-
+
wsprintf(buf, "%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_AUTHENTICATION,
TELQUAL_IS, AUTHTYPE_NULL,
AUTHTYPE_NULL, IAC, SE);
TelnetSend(ks, (LPSTR)buf, 8, 0);
-
+
if (errmsg != NULL) {
strTmp[sizeof(strTmp) - 1] = '\0';
strncpy(strTmp, errmsg, sizeof(strTmp) - 1);
-
+
if (r != KSUCCESS) {
strncat(strTmp, "\n", sizeof(strTmp) - 1 - strlen(strTmp));
#ifdef KRB4
@@ -163,7 +163,7 @@ auth_abort(kstream ks, char *errmsg, long r)
lstrcat(strTmp, error_message(r));
#endif
}
-
+
MessageBox(HWND_DESKTOP, strTmp, "Kerberos authentication failed!",
MB_OK | MB_ICONEXCLAMATION);
}
@@ -234,7 +234,7 @@ auth_send(kstream ks, unsigned char *parsedat, int end_sub)
#ifdef KRB4
r = k4_auth_send(ks);
#endif /* KRB4 */
-
+
#ifdef KRB5
r = k5_auth_send(ks, auth_how);
#endif /* KRB5 */
@@ -400,9 +400,9 @@ auth_decrypt(struct kstream_data_block *out,
#ifdef KRB4
/*
- *
+ *
* K4_auth_send - gets authentication bits we need to send to KDC.
- *
+ *
* Result is left in auth
*
* Returns: 0 on failure, 1 on success
@@ -482,7 +482,7 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub)
if (end_sub < 4)
return KFAILURE;
-
+
if (parsedat[2] != KERBEROS_V4)
return KFAILURE;
@@ -552,7 +552,7 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub)
return KSUCCESS;
}
-
+
return KFAILURE;
}
@@ -562,18 +562,18 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub)
#ifdef KRB5
/*
- *
+ *
* K5_auth_send - gets authentication bits we need to send to KDC.
- *
+ *
* Code lifted from telnet sample code in the appl directory.
- *
+ *
* Result is left in auth
*
* Returns: 0 on failure, 1 on success
- *
+ *
*/
-static int
+static int
k5_auth_send(kstream ks, int how)
{
krb5_error_code r;
@@ -652,14 +652,14 @@ k5_auth_send(kstream ks, int how)
r = krb5_mk_req_extended(k5_context, &auth_context, ap_opts,
NULL, new_creds, &auth);
-
+
#ifdef ENCRYPTION
krb5_auth_con_getlocalsubkey(k5_context, auth_context, &newkey);
if (session_key) {
krb5_free_keyblock(k5_context, session_key);
session_key = 0;
}
-
+
if (newkey) {
/*
* keep the key in our private storage, but don't use it
@@ -682,7 +682,7 @@ k5_auth_send(kstream ks, int how)
krb5_free_cred_contents(k5_context, &creds);
krb5_free_creds(k5_context, new_creds);
-
+
if (r) {
com_err(NULL, r, "while authorizing.");
return(0);
@@ -692,11 +692,11 @@ k5_auth_send(kstream ks, int how)
}
/*
- *
+ *
* K5_auth_reply -- checks the reply for mutual authentication.
*
* Code lifted from telnet sample code in the appl directory.
- *
+ *
*/
static int
k5_auth_reply(kstream ks, int how, unsigned char *data, int cnt)
@@ -843,14 +843,14 @@ kerberos5_forward(kstream ks)
com_err(NULL, r, "Kerberos V5: error getting forwarded creds");
goto cleanup;
}
-
+
/* Send forwarded credentials */
if (!Data(ks, KRB_FORWARD, forw_creds.data, forw_creds.length)) {
MessageBox(HWND_DESKTOP,
"Not enough room for authentication data", "",
MB_OK | MB_ICONEXCLAMATION);
}
-
+
cleanup:
if (client)
krb5_free_principal(k5_context, client);
diff --git a/src/windows/wintel/edit.c b/src/windows/wintel/edit.c
index aa230cfc9d..b275850343 100644
--- a/src/windows/wintel/edit.c
+++ b/src/windows/wintel/edit.c
@@ -28,11 +28,11 @@ void Edit_LbuttonDown(
assert(pScr != NULL);
hDC = GetDC(hWnd);
- for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
+ for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, iTmp % pScr->width * pScr->cxChar,
(int) (iTmp / pScr->width) * pScr->cyChar,
- pScr->cxChar, pScr->cyChar, DSTINVERT);
+ pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp] = 0;
}
}
@@ -82,7 +82,7 @@ void Edit_LbuttonUp(
else {
hMenu = GetMenu(hWnd);
EnableMenuItem(hMenu, IDM_COPY, MF_ENABLED);
- }
+ }
} /* Edit_LbuttonUp */
@@ -113,7 +113,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
iYlocCurr = pScr->height - 1;
iLocCurr = iXlocCurr + (iYlocCurr * pScr->width);
if (iLocCurr > iLocStart) {
- for (iTmp=0; iTmp < iLocStart; iTmp++) {
+ for (iTmp=0; iTmp < iLocStart; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar,
(int) (iTmp / pScr->width) * pScr->cyChar,
@@ -134,7 +134,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2];
}
}
- }
+ }
else {
pScrLine = GetScreenLineFromY(pScr, iY);
@@ -164,24 +164,24 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
PatBlt(hDC, iTmp2 * pScr->cxChar, iY2 * pScr->cyChar,
pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp2 + (pScr->width * iY2)] = pScrLine->text[iTmp2];
- }
- }
- }
+ }
+ }
+ }
}
- for (iTmp = iLocCurr; iTmp < pScr->width * pScr->height; iTmp++) {
+ for (iTmp = iLocCurr; iTmp < pScr->width * pScr->height; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar,
- pScr->cxChar, pScr->cyChar, DSTINVERT);
+ pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp] = 0;
}
}
}
else { /* going backwards */
- for (iTmp = 0; iTmp < iLocCurr; iTmp++) {
+ for (iTmp = 0; iTmp < iLocCurr; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar,
- pScr->cxChar, pScr->cyChar, DSTINVERT);
+ pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp] = 0;
}
}
@@ -198,7 +198,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2];
}
}
- }
+ }
else {
pScrLine = GetScreenLineFromY(pScr, iY);
for (iTmp2 = iX; iTmp2 < pScr->width; iTmp2++) {
@@ -206,8 +206,8 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
PatBlt(hDC, iTmp2 * pScr->cxChar, iY * pScr->cyChar,
pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2];
- }
- }
+ }
+ }
for (iTmp = iY + 1; iTmp < iY2; iTmp++) {
pScrLine = GetScreenLineFromY(pScr, iTmp);
for (iTmp2 = 0; iTmp2 < pScr->width; iTmp2++) {
@@ -225,18 +225,18 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){
PatBlt(hDC, iTmp2 * pScr->cxChar, iY2 * pScr->cyChar,
pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp2 + (pScr->width * iY2)] = pScrLine->text[iTmp2];
- }
- }
- }
- }
- for (iTmp = iLocStart; iTmp < pScr->width * pScr->height; iTmp++) {
+ }
+ }
+ }
+ }
+ for (iTmp = iLocStart; iTmp < pScr->width * pScr->height; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar,
pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp] = 0;
- }
+ }
}
- }
+ }
ReleaseDC(hWnd, hDC);
} /* Edit_MouseMove */
@@ -259,7 +259,7 @@ void Edit_ClearSelection(
}
bSelection = FALSE;
hMenu=GetMenu(pScr->hWnd);
- EnableMenuItem(hMenu, IDM_COPY, MF_GRAYED);
+ EnableMenuItem(hMenu, IDM_COPY, MF_GRAYED);
ReleaseDC(pScr->hWnd, hDC);
} /* Edit_ClearSelection */
@@ -311,7 +311,7 @@ void Edit_Paste(
static HGLOBAL hMyClipBuffer;
LPSTR lpClipMemory;
LPSTR lpMyClipBuffer;
- SCREEN *pScr;
+ SCREEN *pScr;
if (hMyClipBuffer)
GlobalFree(hMyClipBuffer);
@@ -329,9 +329,9 @@ void Edit_Paste(
OutputDebugString(lpMyClipBuffer);
#endif
PostMessage(pScr->hwndTel, WM_MYSCREENBLOCK, (WPARAM) hMyClipBuffer, (LPARAM) pScr);
- CloseClipboard();
+ CloseClipboard();
GlobalUnlock(hClipMemory);
- GlobalUnlock(hMyClipBuffer);
+ GlobalUnlock(hMyClipBuffer);
} /* Edit_Paste */
@@ -352,7 +352,7 @@ void Edit_LbuttonDblclk(
assert(pScr != NULL);
hDC = GetDC(hWnd);
- for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
+ for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar,
(int) (iTmp / pScr->width) * pScr->cyChar,
@@ -411,13 +411,13 @@ void Edit_TripleClick(
assert(pScr != NULL);
hDC = GetDC(hWnd);
- for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
+ for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) {
if (cInvertedArray[iTmp]) {
PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar,
(int) (iTmp / pScr->width) * pScr->cyChar,
pScr->cxChar, pScr->cyChar, DSTINVERT);
cInvertedArray[iTmp] = 0;
- }
+ }
}
bSelection = FALSE;
iYloc = (int) HIWORD(lParam) / pScr->cyChar;
diff --git a/src/windows/wintel/emul.c b/src/windows/wintel/emul.c
index 18547ab807..2a7ef4cd05 100644
--- a/src/windows/wintel/emul.c
+++ b/src/windows/wintel/emul.c
@@ -13,12 +13,12 @@ ScreenEmChars(SCREEN *pScr, char *c, int len)
* control chracters or cause wrapping to another line. When a control
* character is encountered or wrapping occurs, display stops and a
* count of the number of characters is returned.
- *
+ *
* Parameters:
* pScr - the screen to place the characters on.
* c - the string of characters to place on the screen.
* len - the number of characters contained in the string
- *
+ *
* Returns: The number of characters actually placed on the screen.
*/
@@ -31,10 +31,10 @@ ScreenEmChars(SCREEN *pScr, char *c, int len)
char *current; /* place to put characters */
char *start;
SCREENLINE *pScrLine;
-
+
if (len <= 0)
return(0);
-
+
if (pScr->x != pScr->width - 1)
pScr->bWrapPending = FALSE;
else {
@@ -44,24 +44,24 @@ ScreenEmChars(SCREEN *pScr, char *c, int len)
ScreenIndex(pScr);
}
}
-
+
pScrLine = GetScreenLineFromY(pScr, pScr->y);
if (pScrLine == NULL)
return(0);
-
+
current = &pScrLine->text[pScr->x];
acurrent = &pScrLine->attrib[pScr->x];
start = current;
ocount = pScr->x;
extra = 0;
-
+
attrib = pScr->attrib;
insert = pScr->IRM;
-
+
for (nchars = 0; nchars < len && *c >= 32; nchars++) {
if (insert)
ScreenInsChar(pScr, 1);
-
+
*current = *c;
*acurrent = (char) attrib;
c++;
@@ -79,10 +79,10 @@ ScreenEmChars(SCREEN *pScr, char *c, int len)
}
}
}
-
+
ScreenDraw(pScr, ocount, pScr->y, pScr->attrib,
pScr->x - ocount + extra, start);
-
+
return(nchars);
}
@@ -96,16 +96,16 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
char stat[20];
int i;
int nchars;
-
+
if (pScr->screen_bottom != pScr->buffer_bottom) {
ScreenUnscroll(pScr);
InvalidateRect(pScr->hWnd, NULL, TRUE);
SetScrollPos(pScr->hWnd, SB_VERT, pScr->numlines, TRUE);
}
-
+
ScreenCursorOff(pScr);
escflg = pScr->escflg;
-
+
#ifdef UM
if (pScr->localprint && len > 0) { /* see if printer needs anything */
pcount = send_localprint(c, len);
@@ -113,7 +113,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
c += pcount;
}
#endif
-
+
while (len > 0) {
/*
* look at first character in the vt100 string, if it is a
@@ -121,43 +121,43 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
*/
while((*c < 32) && (escflg == 0) && (len > 0)) {
switch(*c) {
-
+
case 0x1b: /* ESC found (begin vt100 control sequence) */
escflg++;
break;
-
+
case -1: /* IAC from telnet session */
escflg = 6;
break;
-
+
#ifdef CISB
case 0x05: /* CTRL-E found (answerback) */
bp_ENQ();
break;
#endif
-
+
case 0x07: /* CTRL-G found (bell) */
ScreenBell(pScr);
break;
-
+
case 0x08: /* CTRL-H found (backspace) */
ScreenBackspace(pScr);
break;
-
+
case 0x09: /* CTRL-I found (tab) */
ScreenTab(pScr); /* Later change for versatile tabbing */
break;
-
+
case 0x0a: /* CTRL-J found (line feed) */
case 0x0b: /* CTRL-K found (treat as line feed) */
case 0x0c: /* CTRL-L found (treat as line feed) */
ScreenIndex(pScr);
break;
-
+
case 0x0d: /* CTRL-M found (carriage feed) */
ScreenCarriageFeed(pScr);
break;
-
+
#if 0
case 0x0e: /* CTRL-N found (invoke Graphics (G1) character set) */
if (pScr->G1)
@@ -166,7 +166,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->attrib = VSnotgraph(pScr->attrib);
pScr->charset = 1;
break;
-
+
case 0x0f: /* CTRL-O found (invoke 'normal' (G0) character set) */
if(pScr->G0)
pScr->attrib = VSgraph(pScr->attrib);
@@ -175,14 +175,14 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->charset = 0;
break;
#endif
-
+
#ifdef CISB
case 0x10: /* CTRL-P found (undocumented in vt100) */
bp_DLE(c, len);
len = 0;
break;
#endif
-
+
#if 0
case 0x11: /* CTRL-Q found (XON) (unused presently) */
case 0x13: /* CTRL-S found (XOFF) (unused presently) */
@@ -191,24 +191,24 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
break;
#endif
}
-
+
c++; /* advance to the next character in the string */
len--; /* decrement the counter */
}
-
+
if (escflg == 0) { /* check for normal character to print */
nchars = ScreenEmChars(pScr, c, len);
c += nchars;
len -= nchars;
}
-
+
while ((len > 0) && (escflg == 1)) { /* ESC character was found */
switch(*c) {
-
+
case 0x08: /* CTRL-H found (backspace) */
ScreenBackspace(pScr);
break;
-
+
/*
* mostly cursor movement options, and DEC private stuff following
*/
@@ -216,77 +216,77 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
ScreenApClear(pScr);
escflg = 2;
break;
-
+
case '#': /* various screen adjustments */
escflg = 3;
break;
-
+
case '(': /* G0 character set options */
escflg = 4;
break;
-
+
case ')': /* G1 character set options */
escflg = 5;
break;
-
+
case '>': /* keypad numeric mode (DECKPAM) */
pScr->DECPAM = 0;
escflg = 0;
break;
-
+
case '=': /* keypad application mode (DECKPAM) */
pScr->DECPAM = 1;
escflg = 0;
break;
-
+
case '7': /* save cursor (DECSC) */
ScreenSaveCursor(pScr);
escflg = 0;
break;
-
+
case '8': /* restore cursor (DECRC) */
ScreenRestoreCursor(pScr);
escflg = 0;
break;
-
+
#if 0
case 'c': /* reset to initial state (RIS) */
ScreenReset(pScr);
escflg = 0;
break;
#endif
-
+
case 'D': /* index (move down one line) (IND) */
ScreenIndex(pScr);
escflg = 0;
break;
-
+
case 'E': /* next line (move down one line and to first column) (NEL) */
pScr->x = 0;
ScreenIndex(pScr);
escflg = 0;
break;
-
+
case 'H': /* horizontal tab set (HTS) */
pScr->tabs[pScr->x] = 'x';
escflg = 0;
break;
-
+
#ifdef CISB
case 'I': /* undoumented in vt100 */
bp_ESC_I();
break;
#endif
-
+
case 'M': /* reverse index (move up one line) (RI) */
ScreenRevIndex(pScr);
escflg = 0;
break;
-
+
case 'Z': /* identify terminal (DECID) */
escflg = 0;
break;
-
+
default:
/* put the ESC character into the Screen */
ScreenEmChars(pScr, "\033", 1);
@@ -294,20 +294,20 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
ScreenEmChars(pScr, c, 1);
escflg = 0;
break;
-
+
} /* end switch */
-
+
c++;
len--;
}
-
- while((escflg == 2) && (len > 0)) { /* '[' handling */
+
+ while((escflg == 2) && (len > 0)) { /* '[' handling */
switch(*c) {
-
+
case 0x08: /* backspace */
ScreenBackspace(pScr);
break;
-
+
case '0':
case '1':
case '2':
@@ -323,15 +323,15 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->parms[pScr->parmptr] *= 10;
pScr->parms[pScr->parmptr] += *c - '0';
break;
-
+
case '?': /* vt100 mode change */
pScr->parms[pScr->parmptr++] = -2;
break;
-
+
case ';': /* parameter divider */
pScr->parmptr++;
break;
-
+
case 'A': /* cursor up (CUU) */
pScr->bWrapPending = FALSE;
rc.left = pScr->x * pScr->cxChar;
@@ -349,7 +349,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
SendMessage(pScr->hWnd, WM_PAINT, 0, 0);
break;
-
+
case 'B': /* cursor down (CUD) */
pScr->bWrapPending = FALSE;
rc.left = pScr->x * pScr->cxChar;
@@ -367,7 +367,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
SendMessage(pScr->hWnd, WM_PAINT, 0, 0);
break;
-
+
case 'C': /* cursor forward (right) (CUF) */
pScr->bWrapPending = FALSE;
rc.left = pScr->x * pScr->cxChar;
@@ -385,7 +385,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
SendMessage(pScr->hWnd, WM_PAINT, 0, 0);
break;
-
+
case 'D': /* cursor backward (left) (CUB) */
pScr->bWrapPending = FALSE;
rc.left = pScr->x * pScr->cxChar;
@@ -401,7 +401,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
SendMessage(pScr->hWnd, WM_PAINT, 0, 0);
break;
-
+
case 'f': /* horizontal & vertical position (HVP) */
case 'H': /* cursor position (CUP) */
pScr->bWrapPending = FALSE;
@@ -416,10 +416,10 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
SendMessage(pScr->hWnd, WM_PAINT, 0, 0);
break;
-
+
case 'J': /* erase in display (ED) */
switch(pScr->parms[0]) {
-
+
case -1:
case 0: /* erase from active position to end of screen */
ScreenEraseToEndOfScreen(pScr);
@@ -429,73 +429,73 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
ScreenEraseToPosition(pScr);
#endif
break;
-
+
case 2: /* erase whole screen */
ScreenEraseScreen(pScr);
break;
-
+
default:
break;
}
-
+
escflg = 0;
break;
-
+
case 'K': /* erase in line (EL) */
switch(pScr->parms[0]) {
case -1:
case 0: /* erase to end of line */
ScreenEraseToEOL(pScr);
break;
-
+
case 1: /* erase to beginning of line */
ScreenEraseToBOL(pScr);
break;
-
+
case 2: /* erase whole line */
ScreenEraseLine(pScr, -1);
break;
-
+
default:
break;
}
-
+
escflg = 0;
break;
-
+
case 'L': /* insert n lines preceding current line (IL) */
if (pScr->parms[0] < 1)
pScr->parms[0] = 1;
ScreenInsLines(pScr, pScr->parms[0], -1);
escflg = 0;
break;
-
+
case 'M': /* delete n lines from current position downward (DL) */
if (pScr->parms[0] < 1)
pScr->parms[0] = 1;
ScreenDelLines(pScr, pScr->parms[0], -1);
escflg = 0;
break;
-
+
case 'P': /* delete n chars from cursor to the left (DCH) */
if (pScr->parms[0] < 1)
pScr->parms[0] = 1;
ScreenDelChars(pScr, pScr->parms[0]);
escflg = 0;
break;
-
+
#if 0
case 'R': /* receive cursor position status from host */
break;
#endif
-
+
#if 0
case 'c': /* device attributes (DA) */
ScreenSendIdent();
escflg = 0;
break;
#endif
-
+
case 'g': /* tabulation clear (TBC) */
if (pScr->parms[0] == 3)/* clear all tabs */
ScreenTabClear(pScr);
@@ -504,12 +504,12 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->tabs[pScr->x] = ' ';
escflg = 0;
break;
-
+
case 'h': /* set mode (SM) */
ScreenSetOption(pScr,1);
escflg = 0;
break;
-
+
case 'i': /* toggle printer */
#if 0
if(pScr->parms[pScr->parmptr] == 5)
@@ -519,16 +519,16 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
#endif
escflg = 0;
break;
-
+
case 'l': /* reset mode (RM) */
ScreenSetOption(pScr,0);
escflg = 0;
break;
-
+
case 'm': /* select graphics rendition (SGR) */
{
int temp = 0;
-
+
while (temp <= pScr->parmptr) {
if (pScr->parms[temp] < 1)
pScr->attrib &= 128;
@@ -539,7 +539,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
}
escflg = 0;
break;
-
+
case 'n': /* device status report (DSR) */
switch (pScr->parms[0]) {
#if 0
@@ -556,11 +556,11 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
} /* end switch */
escflg = 0;
break;
-
+
case 'q': /* load LEDs (unsupported) (DECLL) */
escflg = 0;
break;
-
+
case 'r': /* set top & bottom margins (DECSTBM) */
if (pScr->parms[0] < 0)
pScr->top = 0;
@@ -596,23 +596,23 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
#endif
escflg = 0;
break;
-
-#if 0
+
+#if 0
case 'x': /* request/report terminal parameters
(DECREQTPARM/DECREPTPARM) */
case 'y': /* invoke confidence test (DECTST) */
break;
#endif
-
+
default:
escflg = 0;
break;
-
+
}
-
+
c++;
len--;
-
+
#if 0
if (pScr->localprint && (len > 0)) { /* see if printer needs anything */
pcount = send_localprint(c, len);
@@ -621,13 +621,13 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
}
#endif
}
-
+
while ((escflg == 3) && (len > 0)) { /* # Handling */
switch (*c) {
case 0x08: /* backspace */
ScreenBackspace(pScr);
break;
-
+
#if 0
case '3': /* top half of double line (DECDHL) */
case '4': /* bottom half of double line (DECDHL) */
@@ -635,29 +635,29 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
case '6': /* double width line (DECDWL) */
break;
#endif
-
+
case '8': /* screen alignment display (DECALN) */
ScreenAlign(pScr);
escflg = 0;
break;
-
+
default:
escflg = 0;
break;
-
+
}
-
+
c++;
len--;
}
-
+
while ((escflg == 4) && (len > 0)) { /* ( Handling (GO character set) */
switch (*c) {
-
+
case 0x08: /* backspace */
ScreenBackspace(pScr);
break;
-
+
#if 0
case 'A': /* united kingdom character set (unsupported) */
case 'B': /* ASCII character set */
@@ -667,7 +667,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->attrib = ScreenNotGraph(pScr->attrib);
escflg = 0;
break;
-
+
case '0': /* choose special graphics set */
case '2': /* alternate character set (special graphics) */
pScr->G0 = 1;
@@ -676,24 +676,24 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
break;
#endif
-
+
default:
escflg = 0;
break;
}
-
+
c++;
len--;
-
+
} /* end while */
-
+
while((escflg == 5) && (len > 0)) { /* ) Handling (G1 handling) */
switch (*c) {
-
+
case 0x08: /* backspace */
ScreenBackspace(pScr);
break;
-
+
#if 0
case 'A': /* united kingdom character set (unsupported) */
case 'B': /* ASCII character set */
@@ -703,7 +703,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
pScr->attrib = ScreenNotGraph(pScr->attrib);
escflg = 0;
break;
-
+
case '0': /* choose special graphics set */
case '2': /* alternate character set (special graphics) */
pScr->G1 = 1;
@@ -712,20 +712,20 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
escflg = 0;
break;
#endif
-
+
default:
escflg = 0;
break;
} /* end switch */
-
+
c++;
len--;
} /* end while */
-
+
while ((escflg >= 6) && (escflg <= 10) && (len > 0)) { /* Handling IAC */
ic = (unsigned char) *c;
switch (escflg) {
-
+
case 6: /* Handling IAC xx */
if (ic == 255) /* if IAC */
escflg = 0;
@@ -734,19 +734,19 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
else
escflg = 9;
break;
-
+
case 7: /* Handling IAC SB xx */
if (ic == 255) /* if IAC */
escflg = 8;
break;
-
+
case 8: /* Handling IAC SB IAC xx */
if (ic == 255) /* if IAC IAC */
escflg = 7;
else if (ic == 240) /* if IAC SE */
escflg = 0;
break;
-
+
case 9: /* IAC xx xx */
escflg = 0;
break;
@@ -754,7 +754,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr)
c++; /* advance to the next character in the string */
len--; /* decrement the counter */
}
-
+
if (escflg > 2 && escflg < 6 && len > 0) {
escflg = 0;
c++;
diff --git a/src/windows/wintel/enc_des.c b/src/windows/wintel/enc_des.c
index 7bf72f4880..33472ecd67 100644
--- a/src/windows/wintel/enc_des.c
+++ b/src/windows/wintel/enc_des.c
@@ -582,7 +582,7 @@ fb64_stream_key(key, stp)
* INPUT --(--------->(+)+---> DATA
* | |
* +-------------+
- *
+ *
*
* Given:
* iV: Initial vector, 64 bits (8 bytes) long.
@@ -643,7 +643,7 @@ cfb64_decrypt(data)
des_ecb_encrypt(stp->str_output, b, stp->str_sched, 1);
memcpy((void *)stp->str_feed, (void *)b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
- index = 0; /* But now use 0 */
+ index = 0; /* But now use 0 */
}
/* On decryption we store (data) which is cypher. */
@@ -716,7 +716,7 @@ ofb64_decrypt(data)
des_ecb_encrypt(stp->str_feed, b, stp->str_sched, 1);
memcpy((void *)stp->str_feed, (void *)b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
- index = 0; /* But now use 0 */
+ index = 0; /* But now use 0 */
}
return(data ^ stp->str_feed[index]);
diff --git a/src/windows/wintel/encrypt.c b/src/windows/wintel/encrypt.c
index 6d97ccd5d3..a26674d4ca 100644
--- a/src/windows/wintel/encrypt.c
+++ b/src/windows/wintel/encrypt.c
@@ -110,20 +110,20 @@ kstream EncryptKSGlobalHack = NULL;
static long i_support_encrypt =
typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64);
-static long i_support_decrypt =
+static long i_support_decrypt =
typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64);
static long i_wont_support_encrypt = 0;
static long i_wont_support_decrypt = 0;
#define I_SUPPORT_ENCRYPT (i_support_encrypt & ~i_wont_support_encrypt)
#define I_SUPPORT_DECRYPT (i_support_decrypt & ~i_wont_support_decrypt)
-
+
static long remote_supports_encrypt = 0;
static long remote_supports_decrypt = 0;
static Encryptions encryptions[] = {
{ "DES_CFB64",
ENCTYPE_DES_CFB64,
- cfb64_encrypt,
+ cfb64_encrypt,
cfb64_decrypt,
cfb64_init,
cfb64_start,
@@ -134,7 +134,7 @@ static Encryptions encryptions[] = {
NULL },
{ "DES_OFB64",
ENCTYPE_DES_OFB64,
- ofb64_encrypt,
+ ofb64_encrypt,
ofb64_decrypt,
ofb64_init,
ofb64_start,
@@ -311,7 +311,7 @@ Encryptions *
finddecryption(int type)
{
Encryptions *ep = encryptions;
-
+
if (!(I_SUPPORT_DECRYPT & remote_supports_encrypt & typemask(type)))
return(0);
while (ep->type && ep->type != type)
@@ -336,18 +336,18 @@ void
encrypt_init(kstream iks, kstream_ptr data)
{
Encryptions *ep = encryptions;
-
+
i_support_encrypt = i_support_decrypt = 0;
remote_supports_encrypt = remote_supports_decrypt = 0;
encrypt_mode = 0;
decrypt_mode = 0;
encrypt_output = NULL;
decrypt_input = NULL;
-
+
str_suplen = 4;
EncryptKSGlobalHack = iks;
-
+
while (ep->type) {
#ifdef DEBUG
if (encrypt_debug_mode) {
@@ -671,7 +671,7 @@ encrypt_request_end()
* Called when ENCRYPT REQUEST-START is received. If we receive
* this before a type is picked, then that indicates that the
* other side wants us to start encrypting data as soon as we
- * can.
+ * can.
*/
void
encrypt_request_start(data, cnt)
@@ -688,7 +688,7 @@ static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT };
void
encrypt_keyid();
-
+
void
encrypt_enc_keyid(keyid, len)
unsigned char *keyid;
diff --git a/src/windows/wintel/font.c b/src/windows/wintel/font.c
index d2858cd104..9224c41f7b 100644
--- a/src/windows/wintel/font.c
+++ b/src/windows/wintel/font.c
@@ -16,7 +16,7 @@ void ProcessFontChange(
TEXTMETRIC tm;
char buf[16];
char szStyle[LF_FACESIZE];
-
+
pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE);
assert(pScr != NULL);
@@ -32,7 +32,7 @@ void ProcessFontChange(
cf.Flags |= CF_FORCEFONTEXIST;
cf.Flags |= CF_FIXEDPITCHONLY;
cf.Flags |= CF_NOSIMULATIONS;
-
+
if (ChooseFont(&cf)) {
if (pScr->hSelectedFont)
DeleteObject(pScr->hSelectedFont);
@@ -47,7 +47,7 @@ void ProcessFontChange(
pScr->cxChar = tm.tmAveCharWidth;
pScr->cyChar = tm.tmHeight + tm.tmExternalLeading;
ReleaseDC(hWnd, hDC);
- SetWindowPos(hWnd, NULL, 0, 0, pScr->cxChar * pScr->width +
+ SetWindowPos(hWnd, NULL, 0, 0, pScr->cxChar * pScr->width +
FRAME_WIDTH, pScr->cyChar * pScr->height +
FRAME_HEIGHT, SWP_NOMOVE | SWP_NOZORDER);
@@ -78,13 +78,13 @@ void InitializeStruct(
HWND hWnd)
{
LPCHOOSEFONT lpFontChunk;
-
+
if (wCommDlgType == IDC_FONT) {
lpFontChunk = (LPCHOOSEFONT) lpStruct;
lpFontChunk->lStructSize = sizeof(CHOOSEFONT);
lpFontChunk->hwndOwner = hWnd;
- lpFontChunk->Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY
+ lpFontChunk->Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY
| CF_INITTOLOGFONTSTRUCT | CF_APPLY;
lpFontChunk->rgbColors = RGB(0, 0, 255);
lpFontChunk->lCustData = 0L;
diff --git a/src/windows/wintel/intern.c b/src/windows/wintel/intern.c
index 0cdd5537d0..8ff8605569 100644
--- a/src/windows/wintel/intern.c
+++ b/src/windows/wintel/intern.c
@@ -84,16 +84,16 @@ ScreenELO(SCREEN *pScr, int s)
{
SCREENLINE *pScrLine;
RECT rc;
-
- if (s < 0)
+
+ if (s < 0)
s = pScr->y;
-
+
pScrLine = GetScreenLineFromY(pScr,s);
memset(pScrLine->attrib, ScreenClearAttrib, pScr->width);
memset(pScrLine->text, ' ', pScr->width);
rc.left = 0;
rc.right = pScr->width * pScr->cxChar;
- rc.top = pScr->cyChar * s;
+ rc.top = pScr->cyChar * s;
rc.bottom = pScr->cyChar * (s+1);
InvalidateRect(pScr->hWnd, &rc, TRUE);
}
@@ -107,7 +107,7 @@ ScreenEraseScreen(SCREEN *pScr)
int x2 = pScr->width;
int y2 = pScr->height;
int n = -1;
-
+
for(i = 0; i < pScr->height; i++)
ScreenELO(pScr,i);
@@ -135,7 +135,7 @@ ScreenTabInit(SCREEN *pScr)
ScreenTabClear(pScr);
- while(x <= pScr->width) {
+ while(x <= pScr->width) {
pScr->tabs[x] = 'x';
x += 8;
}
@@ -185,10 +185,10 @@ ScreenListMove(SCREENLINE *TD, SCREENLINE *BD, SCREENLINE *TI, SCREENLINE *BI)
TD->prev = TI; /* Place the node in its new home */
BD->next = BI;
- if (TI != NULL)
+ if (TI != NULL)
TI->next = TD; /* Ditto prev->prev */
- if (BI != NULL)
+ if (BI != NULL)
BI->prev = BD;
}
@@ -204,10 +204,10 @@ ScreenDelLines(SCREEN *pScr, int n, int s)
int idx;
RECT rc;
HDC hDC;
-
+
pScr->bWrapPending = FALSE;
- if (s < 0)
+ if (s < 0)
s = pScr->y;
if (s + n - 1 > pScr->bottom)
@@ -289,13 +289,13 @@ ScreenInsLines(SCREEN *pScr, int n, int s)
int idx;
RECT rc;
HDC hDC;
-
+
pScr->bWrapPending = FALSE;
if (s < 0)
s = pScr->y;
- if (s + n - 1 > pScr->bottom)
+ if (s + n - 1 > pScr->bottom)
n = pScr->bottom - s + 1;
/*
@@ -400,7 +400,7 @@ ScreenEraseToEOL(SCREEN *pScr)
int n = -1;
SCREENLINE *pScrLine;
RECT rc;
-
+
ScreenWrapNow(pScr, &x1, &y1);
y2 = y1;
@@ -428,7 +428,7 @@ ScreenDelChars(SCREEN *pScr, int n)
int width;
SCREENLINE *pScrLine;
RECT rc;
-
+
pScr->bWrapPending = FALSE;
pScrLine = GetScreenLineFromY(pScr, y);
@@ -442,7 +442,7 @@ ScreenDelChars(SCREEN *pScr, int n)
memset(&pScrLine->attrib[pScr->width - n], ScreenClearAttrib, n);
memset(&pScrLine->text[pScr->width - n], ' ', n);
-
+
rc.left = x * pScr->cxChar;
rc.right = pScr->width * pScr->cxChar;
rc.top = pScr->cyChar * y;
@@ -459,12 +459,12 @@ ScreenRevIndex(SCREEN *pScr)
{
SCREENLINE *pScrLine;
SCREENLINE *pTopLine;
-
+
pScr->bWrapPending = FALSE;
pScrLine = GetScreenLineFromY(pScr, pScr->y);
pTopLine = GetScreenLineFromY(pScr, pScr->top);
- if(pScrLine == pTopLine)
+ if(pScrLine == pTopLine)
ScreenInsertLine(pScr, pScr->y);
else
pScr->y--;
@@ -500,7 +500,7 @@ ScreenEraseLine(SCREEN *pScr, int s)
int n = -1;
SCREENLINE *pScrLine;
RECT rc;
-
+
if (s < 0) {
ScreenWrapNow(pScr, &x1, &y1);
s = y2 = y1;
@@ -566,7 +566,7 @@ ScreenAlign(SCREEN *pScr) /* vt100 alignment, fill screen with 'E's */
int i;
int j;
SCREENLINE *pScrLine;
-
+
pScrLine = GetScreenLineFromY(pScr, pScr->top);
ScreenEraseScreen(pScr);
@@ -685,7 +685,7 @@ ScreenInsChar(SCREEN *pScr, int x)
int i;
SCREENLINE *pScrLine;
RECT rc;
-
+
pScrLine = GetScreenLineFromY(pScr, pScr->y);
if (pScrLine == NULL)
return(FALSE);
@@ -732,9 +732,9 @@ ScreenDraw(SCREEN *pScr, int x, int y, int a, int len, char *c)
SCREENLINE *pScrLine;
RECT rc;
- pScrLine = GetScreenLineFromY(pScr, y);
+ pScrLine = GetScreenLineFromY(pScr, y);
assert(pScrLine != NULL);
-
+
for(idx = x; idx < x + len; idx++) {
pScrLine->text[idx] = c[idx - x];
pScrLine->attrib[idx - x] = a;
diff --git a/src/windows/wintel/k5stream.c b/src/windows/wintel/k5stream.c
index a315385188..f39daa8615 100644
--- a/src/windows/wintel/k5stream.c
+++ b/src/windows/wintel/k5stream.c
@@ -1,9 +1,9 @@
/*
- *
+ *
* K5stream
- *
+ *
* Emulates the kstream package in Kerberos 4
- *
+ *
*/
#include <stdio.h>
@@ -13,7 +13,7 @@
#include "k5stream.h"
#include "auth.h"
-int
+int
kstream_destroy(kstream ks)
{
if (ks != NULL) {
@@ -25,13 +25,13 @@ kstream_destroy(kstream ks)
return 0;
}
-void
+void
kstream_set_buffer_mode(kstream ks, int mode)
{
}
-kstream
+kstream
kstream_create_from_fd(int fd,
const struct kstream_crypt_ctl_block *ctl,
kstream_ptr data)
@@ -60,7 +60,7 @@ kstream_create_from_fd(int fd,
return ks;
}
-int
+int
kstream_write(kstream ks, void *p_data, size_t p_len)
{
int n;
@@ -80,12 +80,12 @@ kstream_write(kstream ks, void *p_data, size_t p_len)
}
n = send(ks->fd, p_data, p_len, 0); /* Write the data */
-
+
return n; /* higher layer does retries */
}
-int
+int
kstream_read(kstream ks, void *p_data, size_t p_len)
{
int n;
@@ -113,7 +113,6 @@ kstream_read(kstream ks, void *p_data, size_t p_len)
hexdump("decrypted data:", p_data, n);
#endif
}
-
+
return n; /* higher layer does retries */
}
-
diff --git a/src/windows/wintel/negotiat.c b/src/windows/wintel/negotiat.c
index 685092df59..28f23b1dea 100644
--- a/src/windows/wintel/negotiat.c
+++ b/src/windows/wintel/negotiat.c
@@ -147,7 +147,7 @@ static char *SLCflags[]={ /* ascii strings for Linemode SLC flags */
};
/* Linemode default character for each function */
-static unsigned char LMdefaults[NTELOPTS + 1]={
+static unsigned char LMdefaults[NTELOPTS + 1]={
(unsigned char)-1, /* zero isn't used */
(unsigned char)-1, /* we don't support SYNCH */
3, /* ^C is default for BRK */
@@ -197,7 +197,7 @@ void
start_negotiation(kstream ks)
{
char buf[128];
-
+
/* Send the initial telnet negotiations */
#ifdef ENCRYPTION /* XXX */
if (encrypt_flag)
@@ -220,7 +220,7 @@ start_negotiation(kstream ks)
#ifdef NOT
/* check whether we are going to be output mapping */
- if(tw->mapoutput) {
+ if(tw->mapoutput) {
netprintf(tw->pnum,"%c%c%c",IAC,DO,TELOPT_BINARY);
/* set the flag indicating we wanted server to start transmitting binary */
tw->uwantbinary=1;
@@ -247,7 +247,7 @@ start_negotiation(kstream ks)
teloptions[BINARY]);
tprintf(cvs,"SEND: %s %s\r\n",telstates[WILL - TELCMD_FIRST],
teloptions[BINARY]);
-#endif
+#endif
#endif
} /* end start_negotiation() */
@@ -269,13 +269,13 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
unsigned char *mark, *orig;
char buf[256];
kstream ks;
-
+
ks = con->ks;
-
+
#ifdef PRINT_EVERYTHING
hexdump("Options to process:", st, cnt);
#endif /* PRINT_EVERYTHING */
-
+
orig = st; /* remember beginning point */
mark = st + cnt; /* set to end of input string */
@@ -289,7 +289,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
*/
while(st < mark) {
- while(con->telstate != STNORM && st < mark) {
+ while(con->telstate != STNORM && st < mark) {
switch(con->telstate) {
case IACFOUND: /* telnet option negotiation */
if(*st == IAC) { /* real data=255 */
@@ -306,7 +306,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
#ifdef NEGOTIATEDEBUG
wsprintf(buf, "\r\n strange telnet option");
OutputDebugString(buf);
-#endif
+#endif
orig=++st;
con->telstate=STNORM;
break;
@@ -352,7 +352,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
#ifdef NOT
case TELOPT_BINARY: /* DO: binary transmission */
if(!tw->ibinary) { /* binary */
- if(!tw->iwantbinary) {
+ if(!tw->iwantbinary) {
netprintf(tw->pnum,"%c%c%c",
IAC,WILL,BINARY);
if(tw->condebug>0)
@@ -428,7 +428,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
* its default character set
*/
netprintf(tw->pnum,"%c%c%c%c",
- IAC,SB,TELOPT_LINEMODE,SLC,0,SLC_DEFAULT,0,IAC,SE);
+ IAC,SB,TELOPT_LINEMODE,SLC,0,SLC_DEFAULT,0,IAC,SE);
if(tw->condebug>0) {
tprintf(cv,"SEND: %s %s\r\n",
telstates[WILL - TELCMD_FIRST],
@@ -498,7 +498,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
#ifdef NOT
case BINARY: /* DONT: check for binary neg. */
if(tw->ibinary) { /* binary */
- if(!tw->iwantbinary) {
+ if(!tw->iwantbinary) {
netprintf(tw->pnum,"%c%c%c",IAC,WONT,BINARY);
if(tw->condebug>0)
tprintf(cv,"SEND: %s %s\r\n",
@@ -523,13 +523,13 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
break;
#endif
}
-
+
/* all these just fall through to here... */
con->telstate=STNORM;
orig=++st;
break;
-
+
case WILL: /* received a telnet WILL option */
#ifdef NEGOTIATEDEBUG
wsprintf(strTmp,"RECV: %s %s\r\n",
@@ -554,7 +554,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
tw->ubinary=1;
} /* end if */
else {
- if(tw->condebug>0)
+ if(tw->condebug>0)
tprintf(cv,"NO REPLY NEEDED: %s %s\r\n",
telstates[DO - TELCMD_FIRST],
teloptions[TELOPT_BINARY]);
@@ -609,7 +609,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
#endif
break;
#endif
-
+
default:
wsprintf(buf,"%c%c%c",IAC,DONT,*st);
TelnetSend(ks,buf,lstrlen(buf),0);
@@ -649,7 +649,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
tw->mapoutput=0; /* turn output mapping off */
} /* end if */
else {
- if(tw->condebug>0)
+ if(tw->condebug>0)
tprintf(cv,"NO REPLY NEEDED: %s %s\r\n",
telstates[DONT-TELCMD_FIRST],
teloptions[BINARY]);
@@ -680,7 +680,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
case TELOPT_ENCRYPT: /* WONT: don't encrypt our input */
break;
#endif
-
+
default:
break;
} /* end switch */
@@ -698,7 +698,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
case NEGOTIATE:
/* until we change sub-negotiation states, accumulate bytes */
- if(con->substate==0) {
+ if(con->substate==0) {
if(*st==IAC) { /* check if we found an IAC byte */
if(*(st+1)==IAC) { /* skip over double IAC's */
st++;
@@ -715,7 +715,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
else {
con->substate=*st++;
/* check if we've really ended the sub-negotiations */
- if(con->substate==SE)
+ if(con->substate==SE)
parse_subnegotiat(ks,end_sub);
orig=st;
@@ -753,7 +753,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt)
st++;
} /* end while */
#if 0
- if(!tw->timing)
+ if(!tw->timing)
parsewrite(tw,orig,st-orig);
#endif
orig=st; /* forget what we have sent already */
@@ -803,8 +803,8 @@ parse_subnegotiat(kstream ks, int end_sub)
"SEND: SB TERMINAL-TYPE IS vt100 \r\n len=%d \r\n",
lstrlen((LPSTR)buf));
OutputDebugString(strTmp);
-#endif
- }
+#endif
+ }
break;
case TELOPT_AUTHENTICATION:
diff --git a/src/windows/wintel/resource.h b/src/windows/wintel/resource.h
index 0d39d5ca09..db79dee148 100644
--- a/src/windows/wintel/resource.h
+++ b/src/windows/wintel/resource.h
@@ -6,7 +6,7 @@
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
diff --git a/src/windows/wintel/screen.c b/src/windows/wintel/screen.c
index 206c97c89e..91de8dd8bd 100644
--- a/src/windows/wintel/screen.c
+++ b/src/windows/wintel/screen.c
@@ -87,7 +87,7 @@ GetNewScreen(void)
}
SCREENLINE *
-ScreenNewLine(void)
+ScreenNewLine(void)
{
SCREENLINE *pScrLine;
@@ -185,7 +185,7 @@ InitNewScreen(CONFIG *Config)
scr->width = Config->width;
scr->height = Config->height;
scr->ID = id;
- scr->x = 0;
+ scr->x = 0;
scr->y = 0;
scr->Oldx = 0;
scr->Oldy = 0;
@@ -296,19 +296,19 @@ int ScreenScroll(
pNext = pScrollTop->next;
pPrev = pScrollTop->prev;
- pPrev->next = pNext;
+ pPrev->next = pNext;
pNext->prev = pPrev;
pScrLine = pScrollTop;
ScreenClearLine(pScr, pScrLine);
}
else {
- pScr->numlines++;
- pScrLine = ScreenNewLine();
+ pScr->numlines++;
+ pScrLine = ScreenNewLine();
if (pScrLine == NULL)
return(0);
pScr->screen_top = pScrollTop->next;
- }
+ }
if (pScrLine == NULL)
return(0);
@@ -347,7 +347,7 @@ int ScreenScroll(
if (bFullScreen)
ScrollDC(hDC, 0, -pScr->cyChar, NULL, NULL, NULL, NULL);
- else
+ else
ScrollDC(hDC, 0, -pScr->cyChar, &rc, &rc, NULL, NULL);
PatBlt(hDC, 0, pScr->bottom * pScr->cyChar,
@@ -387,7 +387,7 @@ int DrawTextScreen(
if (!pScrLine)
continue;
- if (YPOS >= rcInvalid.top - pScr->cyChar &&
+ if (YPOS >= rcInvalid.top - pScr->cyChar &&
YPOS <= rcInvalid.bottom + pScr->cyChar) {
if (y < 0)
@@ -415,12 +415,12 @@ int DrawTextScreen(
}
if (SCR_isrev(pScrLine->attrib[x])) {
- SelectObject(hDC, pScr->hSelectedFont);
+ SelectObject(hDC, pScr->hSelectedFont);
SetTextColor(hDC, RGB(255, 255, 255));
SetBkColor(hDC, RGB(0, 0, 0));
}
else if (SCR_isblnk(pScrLine->attrib[x])) {
- SelectObject(hDC, pScr->hSelectedFont);
+ SelectObject(hDC, pScr->hSelectedFont);
SetTextColor(hDC, RGB(255, 0, 0));
SetBkColor(hDC, RGB(255, 255, 255));
}
@@ -446,7 +446,7 @@ int DrawTextScreen(
TextOut(hDC, x*pScr->cxChar, y*pScr->cyChar, &pScrLine->text[x], len);
x += len;
}
- }
+ }
pScrLineTmp = pScrLine->next;
pScrLine = pScrLineTmp;
}
@@ -638,9 +638,9 @@ long PASCAL ScreenWndProc(
LPARAM lParam)
{
MINMAXINFO *lpmmi;
- SCREEN *pScr;
+ SCREEN *pScr;
HMENU hMenu;
- PAINTSTRUCT ps;
+ PAINTSTRUCT ps;
int x = 0;
int y = 0;
int ScrollPos;
@@ -657,7 +657,7 @@ long PASCAL ScreenWndProc(
pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE);
assert (pScr != NULL);
- switch (wParam) {
+ switch (wParam) {
case IDM_EXIT:
if (MessageBox(hWnd, "Terminate this connection?", "Telnet", MB_OKCANCEL) == IDOK) {
@@ -690,7 +690,7 @@ long PASCAL ScreenWndProc(
case IDM_COPY:
Edit_Copy(hWnd);
hMenu=GetMenu(hWnd);
- Edit_ClearSelection(pScr);
+ Edit_ClearSelection(pScr);
break;
case IDM_PASTE:
@@ -730,7 +730,7 @@ long PASCAL ScreenWndProc(
CheckScreen(pScr);
break;
#endif
- }
+ }
break;
@@ -860,7 +860,7 @@ long PASCAL ScreenWndProc(
case WM_KEYDOWN:
if (wParam == VK_INSERT) {
- if (GetKeyState(VK_SHIFT) < 0)
+ if (GetKeyState(VK_SHIFT) < 0)
PostMessage(hWnd, WM_COMMAND, IDM_PASTE, 0);
else if (GetKeyState(VK_CONTROL) < 0)
PostMessage(hWnd, WM_COMMAND, IDM_COPY, 0);
@@ -933,7 +933,7 @@ long PASCAL ScreenWndProc(
lpmmi->ptMinTrackSize.y = FRAME_HEIGHT + 4 * pScr->cyChar;
break;
- case WM_LBUTTONDOWN:
+ case WM_LBUTTONDOWN:
if (bDoubleClick)
Edit_TripleClick(hWnd, lParam);
else
@@ -972,13 +972,13 @@ long PASCAL ScreenWndProc(
#if 0
pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE);
assert (pScr != NULL);
- wsprintf(strTmp,"fp->x=%d fp->y=%d text=%s \r\n",
+ wsprintf(strTmp,"fp->x=%d fp->y=%d text=%s \r\n",
pScr->screen_top->x, pScr->screen_top->y, pScr->screen_top->text);
OutputDebugString(strTmp);
#endif
break;
- case WM_PAINT:
+ case WM_PAINT:
pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE);
assert (pScr != NULL);
BeginPaint (hWnd, &ps);
@@ -988,7 +988,7 @@ long PASCAL ScreenWndProc(
else
OutputDebugString("screen_bottom is NULL.\r\n");
EndPaint(hWnd, &ps);
- break;
+ break;
case WM_CLOSE:
if (MessageBox(hWnd, "Terminate this connection?", "Telnet", MB_OKCANCEL) == IDOK) {
@@ -996,7 +996,7 @@ long PASCAL ScreenWndProc(
assert (pScr != NULL);
SendMessage(pScr->hwndTel, WM_MYSCREENCLOSE, 0, (LPARAM) pScr);
return (DefWindowProc(hWnd, message, wParam, lParam));
- }
+ }
break;
case WM_DESTROY:
diff --git a/src/windows/wintel/screen.h b/src/windows/wintel/screen.h
index 7cba678ce2..e3e7460c85 100644
--- a/src/windows/wintel/screen.h
+++ b/src/windows/wintel/screen.h
@@ -4,7 +4,7 @@ extern long PASCAL ScreenWndProc(HWND,UINT,WPARAM,LPARAM);
* Definition of attribute bits in the Virtual Screen
*
* 0 - Bold
-* 1 -
+* 1 -
* 2 -
* 3 - Underline
* 4 - Blink
@@ -81,7 +81,7 @@ typedef struct SCREEN {
int DECCKM; /* Cursor key mode */
int DECPAM; /* keyPad Application mode */
int IRM; /* Insert/Replace mode */
- int escflg; /* Current Escape level */
+ int escflg; /* Current Escape level */
int top; /* Vertical bounds of screen */
int bottom;
int parmptr;
@@ -242,7 +242,7 @@ intern.c
void ScreenSetOption(
SCREEN *pScr,
int toggle);
-
+
BOOL ScreenInsChar(
SCREEN *pScr,
int x);
diff --git a/src/windows/wintel/telnet.c b/src/windows/wintel/telnet.c
index 449471b7bd..a2f5083ca5 100644
--- a/src/windows/wintel/telnet.c
+++ b/src/windows/wintel/telnet.c
@@ -1,23 +1,23 @@
/****************************************************************************
-
+
Program: telnet.c
-
+
PURPOSE: Windows networking kernel - Telnet
-
+
FUNCTIONS:
-
+
WinMain() - calls initialization function, processes message loop
InitApplication() - initializes window data and registers window
InitInstance() - saves instance handle and creates main window
MainWndProc() - processes messages
About() - processes messages for "About" dialog box
-
+
COMMENTS:
-
+
Windows can have several copies of your application running at the
same time. The variable hInst keeps track of which instance this
application is so that processing will be to the correct window.
-
+
****************************************************************************/
#include <windows.h>
@@ -36,7 +36,7 @@ static SCREEN *pScr;
static int debug = 1;
char strTmp[1024]; /* Scratch buffer */
-BOOL bAutoConnection = FALSE;
+BOOL bAutoConnection = FALSE;
short port_no = 23;
char szUserName[64]; /* Used in auth.c */
char szHostName[64];
@@ -53,22 +53,22 @@ krb5_context k5_context;
/*
*
* FUNCTION: WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
- *
+ *
* PURPOSE: calls initialization function, processes message loop
- *
+ *
* COMMENTS:
- *
- * Windows recognizes this function by name as the initial entry point
- * for the program. This function calls the application initialization
- * routine, if no other instance of the program is running, and always
- * calls the instance initialization routine. It then executes a message
- * retrieval and dispatch loop that is the top-level control structure
- * for the remainder of execution. The loop is terminated when a WM_QUIT
- * message is received, at which time this function exits the application
- * instance by returning the value passed by PostQuitMessage().
- *
- * If this function must abort before entering the message loop, it
- * returns the conventional value NULL.
+ *
+ * Windows recognizes this function by name as the initial entry point
+ * for the program. This function calls the application initialization
+ * routine, if no other instance of the program is running, and always
+ * calls the instance initialization routine. It then executes a message
+ * retrieval and dispatch loop that is the top-level control structure
+ * for the remainder of execution. The loop is terminated when a WM_QUIT
+ * message is received, at which time this function exits the application
+ * instance by returning the value passed by PostQuitMessage().
+ *
+ * If this function must abort before entering the message loop, it
+ * returns the conventional value NULL.
*/
int PASCAL
@@ -79,12 +79,12 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
if (!hPrevInstance)
if (!InitApplication(hInstance))
return(FALSE);
-
+
/*
* Perform initializations that apply to a specific instance
*/
bAutoConnection = parse_cmdline(lpCmdLine);
-
+
if (!InitInstance(hInstance, nCmdShow))
return(FALSE);
@@ -105,7 +105,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
{
if (msg.message == WM_QUIT) // Special case: WM_QUIT -- return
return msg.wParam; // the value from PostQuitMessage
-
+
TranslateMessage(&msg);
DispatchMessage(&msg);
}
@@ -116,35 +116,35 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
/*
* FUNCTION: InitApplication(HINSTANCE)
- *
+ *
* PURPOSE: Initializes window data and registers window class
- *
+ *
* COMMENTS:
- *
- * This function is called at initialization time only if no other
- * instances of the application are running. This function performs
- * initialization tasks that can be done once for any number of running
- * instances.
- *
- * In this case, we initialize a window class by filling out a data
- * structure of type WNDCLASS and calling the Windows RegisterClass()
- * function. Since all instances of this application use the same window
- * class, we only need to do this when the first instance is initialized.
+ *
+ * This function is called at initialization time only if no other
+ * instances of the application are running. This function performs
+ * initialization tasks that can be done once for any number of running
+ * instances.
+ *
+ * In this case, we initialize a window class by filling out a data
+ * structure of type WNDCLASS and calling the Windows RegisterClass()
+ * function. Since all instances of this application use the same window
+ * class, we only need to do this when the first instance is initialized.
*/
BOOL
InitApplication(HINSTANCE hInstance)
{
WNDCLASS wc;
-
+
ScreenInit(hInstance);
-
+
/*
* Fill in window class structure with parameters that describe the
* main window.
*/
wc.style = CS_HREDRAW | CS_VREDRAW; /* Class style(s). */
- wc.lpfnWndProc = MainWndProc; /* Function to retrieve messages for
+ wc.lpfnWndProc = MainWndProc; /* Function to retrieve messages for
* windows of this class.
*/
wc.cbClsExtra = 0; /* No per-class extra data. */
@@ -155,24 +155,24 @@ InitApplication(HINSTANCE hInstance)
wc.hbrBackground = NULL; /* GetStockObject(WHITE_BRUSH); */
wc.lpszMenuName = NULL; /* Name of menu resource in .RC file. */
wc.lpszClassName = WINDOW_CLASS; /* Name used in call to CreateWindow. */
-
+
return(RegisterClass(&wc));
}
/*
* FUNCTION: InitInstance(HANDLE, int)
- *
+ *
* PURPOSE: Saves instance handle and creates main window
- *
+ *
* COMMENTS:
- *
- * This function is called at initialization time for every instance of
- * this application. This function performs initialization tasks that
- * cannot be shared by multiple instances.
- *
- * In this case, we save the instance handle in a static variable and
- * create and display the main program window.
+ *
+ * This function is called at initialization time for every instance of
+ * this application. This function performs initialization tasks that
+ * cannot be shared by multiple instances.
+ *
+ * In this case, we save the instance handle in a static variable and
+ * create and display the main program window.
*/
BOOL
InitInstance(HINSTANCE hInstance, int nCmdShow)
@@ -180,15 +180,15 @@ InitInstance(HINSTANCE hInstance, int nCmdShow)
int xScreen = 0;
int yScreen = 0;
WSADATA wsaData;
-
+
SetScreenInstance(hInstance);
-
+
/*
* Save the instance handle in static variable, which will be used in
* many subsequence calls from this application to Windows.
*/
hInst = hInstance;
-
+
/*
* Create a main window for this application instance.
*/
@@ -207,12 +207,12 @@ InitInstance(HINSTANCE hInstance, int nCmdShow)
if (!hWnd)
return (FALSE);
-
+
if (WSAStartup(0x0101, &wsaData) != 0) { /* Initialize the network */
MessageBox(NULL, "Couldn't initialize Winsock!", NULL,
MB_OK | MB_ICONEXCLAMATION);
return(FALSE);
- }
+ }
if (!OpenTelnetConnection()) {
WSACleanup();
@@ -242,12 +242,12 @@ LRESULT CALLBACK
MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HGLOBAL hBuffer;
- LPSTR lpBuffer;
+ LPSTR lpBuffer;
int iEvent, cnt, ret;
char *tmpCommaLoc;
struct sockaddr_in remote_addr;
struct hostent *remote_host;
-
+
switch (message) {
case WM_MYSCREENCHANGEBKSP:
if (!con)
@@ -255,12 +255,12 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
con->backspace = wParam;
if (con->backspace == VK_BACK) {
con->ctrl_backspace = 0x7f;
- WritePrivateProfileString(INI_TELNET, INI_BACKSPACE,
+ WritePrivateProfileString(INI_TELNET, INI_BACKSPACE,
INI_BACKSPACE_BS, TELNET_INI);
}
else {
con->ctrl_backspace = VK_BACK;
- WritePrivateProfileString(INI_TELNET, INI_BACKSPACE,
+ WritePrivateProfileString(INI_TELNET, INI_BACKSPACE,
INI_BACKSPACE_DEL, TELNET_INI);
}
GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", buf, 128, TELNET_INI);
@@ -323,7 +323,7 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
#endif
DestroyWindow(hWnd);
- break;
+ break;
case WM_QUERYOPEN:
return(0);
@@ -339,10 +339,10 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
PostQuitMessage(0);
break;
- case WM_NETWORKEVENT:
+ case WM_NETWORKEVENT:
iEvent = WSAGETSELECTEVENT(lParam);
- switch (iEvent) {
+ switch (iEvent) {
case FD_READ:
if (con == NULL)
@@ -373,10 +373,10 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
}
start_negotiation(con->ks);
- break;
+ break;
}
- break;
+ break;
case WM_HOSTNAMEFOUND:
ret = WSAGETASYNCERROR(lParam);
@@ -408,7 +408,7 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
wsprintf(buf, "%d", con->width);
WritePrivateProfileString(INI_TELNET, INI_WIDTH, buf, TELNET_INI);
break;
-
+
default: /* Passes it on if unproccessed */
return(DefWindowProc(hWnd, message, wParam, lParam));
}
@@ -447,7 +447,7 @@ SaveHostName(char *host, int port)
comma = NULL;
for (i = 0; i < 10; i++) {
wsprintf(buf, INI_HOST "%d", i); /* INI item to fetch */
- GetPrivateProfileString(INI_HOSTS, buf, "", hostName[i],
+ GetPrivateProfileString(INI_HOSTS, buf, "", hostName[i],
128, TELNET_INI);
if (!hostName[i][0])
@@ -467,7 +467,7 @@ SaveHostName(char *host, int port)
bs = 0x7f;
}
else { /* No matching entry */
- GetPrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_BS,
+ GetPrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_BS,
buf, sizeof(buf), TELNET_INI);
bs = VK_BACK; /* Default value */
if (_stricmp(buf, INI_BACKSPACE_DEL) == 0)
@@ -505,7 +505,7 @@ OpenTelnetConnection(void)
char buf[128];
tmpConfig = calloc(sizeof(CONFIG), 1);
-
+
if (bAutoConnection) {
tmpConfig->title = calloc(lstrlen(szHostName), 1);
lstrcpy(tmpConfig->title, (char *) szHostName);
@@ -514,7 +514,7 @@ OpenTelnetConnection(void)
if (nReturn == FALSE)
return(FALSE);
}
-
+
con = (CONNECTION *) GetNewConnection();
if (con == NULL)
return(0);
@@ -548,7 +548,7 @@ OpenTelnetConnection(void)
}
ret = (SOCKET) socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-
+
if (ret == SOCKET_ERROR) {
wsprintf(buf, "Socket error on socket = %d!", WSAGetLastError());
MessageBox(NULL, buf, NULL, MB_OK | MB_ICONEXCLAMATION);
@@ -557,17 +557,17 @@ OpenTelnetConnection(void)
free(con);
free(tmpConfig);
return(-1);
- }
-
+ }
+
con->socket = ret;
-
- sockaddr.sin_family = AF_INET;
+
+ sockaddr.sin_family = AF_INET;
sockaddr.sin_addr.s_addr = htonl(INADDR_ANY);
sockaddr.sin_port = htons(0);
-
- ret = bind(con->socket, (struct sockaddr *) &sockaddr,
+
+ ret = bind(con->socket, (struct sockaddr *) &sockaddr,
(int) sizeof(struct sockaddr_in));
-
+
if (ret == SOCKET_ERROR) {
wsprintf(buf, "Socket error on bind!");
MessageBox(NULL, buf, NULL, MB_OK | MB_ICONEXCLAMATION);
@@ -589,7 +589,7 @@ OpenTelnetConnection(void)
strcpy(szHostName, ++p);
}
- WSAAsyncGetHostByName(hWnd, WM_HOSTNAMEFOUND, szHostName, hostdata,
+ WSAAsyncGetHostByName(hWnd, WM_HOSTNAMEFOUND, szHostName, hostdata,
MAXGETHOSTSTRUCT);
ctl.encrypt = auth_encrypt;
@@ -626,7 +626,7 @@ int
DoDialog(char *szDialog, DLGPROC lpfnDlgProc)
{
int nReturn;
-
+
nReturn = DialogBox(hInst, szDialog, hWnd, lpfnDlgProc);
return (nReturn);
}
@@ -655,31 +655,31 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
char tmpName[128];
char tmpBuf[80];
char *tmpCommaLoc;
-
+
switch (message) {
case WM_INITDIALOG:
hDC = GetDC(hDlg);
Ext = GetDialogBaseUnits();
xExt = (190 *LOWORD(Ext)) /4 ;
yExt = (72 * HIWORD(Ext)) /8 ;
- GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", tmpName,
+ GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", tmpName,
128, TELNET_INI);
if (tmpName[0]) {
tmpCommaLoc = strchr(tmpName, ',');
if (tmpCommaLoc)
*tmpCommaLoc = '\0';
SetDlgItemText(hDlg, TEL_CONNECT_NAME, tmpName);
- }
+ }
hEdit = GetWindow(GetDlgItem(hDlg, TEL_CONNECT_NAME), GW_CHILD);
while (TRUE) {
wsprintf(tmpBuf, INI_HOST "%d", iHostNum++);
- GetPrivateProfileString(INI_HOSTS, tmpBuf, "", tmpName,
+ GetPrivateProfileString(INI_HOSTS, tmpBuf, "", tmpName,
128, TELNET_INI);
- tmpCommaLoc = strchr(tmpName, ',');
+ tmpCommaLoc = strchr(tmpName, ',');
if (tmpCommaLoc)
*tmpCommaLoc = '\0';
if (tmpName[0])
- SendDlgItemMessage(hDlg, TEL_CONNECT_NAME, CB_ADDSTRING, 0,
+ SendDlgItemMessage(hDlg, TEL_CONNECT_NAME, CB_ADDSTRING, 0,
(LPARAM) ((LPSTR) tmpName));
else
break;
@@ -707,7 +707,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
(GetSystemMetrics(SM_CXSCREEN)/2)-(xExt/2),
(GetSystemMetrics(SM_CYSCREEN)/2)-(yExt/2),
0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
- ReleaseDC(hDlg, hDC);
+ ReleaseDC(hDlg, hDC);
SendMessage(hEdit, WM_USER + 1, 0, 0);
SendMessage(hDlg, WM_SETFOCUS, 0, 0);
return (TRUE);
@@ -728,7 +728,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
else
EnableWindow(GetDlgItem(hDlg, IDC_FORWARDFORWARD), 0);
break;
-
+
case IDC_FORWARDFORWARD:
forwardable_flag = (BOOL)SendDlgItemMessage(hDlg, IDC_FORWARDFORWARD,
BM_GETCHECK, 0, 0);
@@ -747,7 +747,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
case TEL_OK:
GetDlgItemText(hDlg, TEL_CONNECT_NAME, szConnectName, 256);
-
+
n = parse_cmdline (szConnectName);
if (! n) {
MessageBox(hDlg, "You must enter a session name!",
@@ -758,8 +758,8 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
lstrcpy(tmpConfig->title, szConnectName);
EndDialog(hDlg, TRUE);
break;
- }
- return (FALSE);
+ }
+ return (FALSE);
}
return(FALSE);
}
@@ -773,7 +773,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
* send a buffer of characters to an output socket. It differs
* by retrying endlessly if sending the bytes would cause
* the send() to block. <gnu@cygnus.com> observed EWOULDBLOCK
- * errors when running using TCP Software's PC/TCP 3.0 stack,
+ * errors when running using TCP Software's PC/TCP 3.0 stack,
* even when writing as little as 109 bytes into a socket
* that had no more than 9 bytes queued for output. Note also
* that a kstream is used during output rather than a socket
@@ -839,9 +839,9 @@ trim(char *s)
/*
- *
+ *
* Parse_cmdline
- *
+ *
* Reads hostname and port number off the command line.
*
* Formats: telnet
@@ -855,7 +855,7 @@ BOOL
parse_cmdline(char *cmdline)
{
char *ptr;
-
+
*szHostName = '\0'; /* Nothing yet */
if (*cmdline == '\0') /* Empty command line? */
return(FALSE);
@@ -896,7 +896,7 @@ hexdump(char *msg, unsigned char *st, int cnt)
if (j == 8)
OutputDebugString("| ");
OutputDebugString(strTmp);
- }
+ }
i += j - 1;
OutputDebugString("\r\n");
} /* end for */
diff --git a/src/windows/wintel/telopts.h b/src/windows/wintel/telopts.h
index 54d67cde3d..d8b6a06d25 100644
--- a/src/windows/wintel/telopts.h
+++ b/src/windows/wintel/telopts.h
@@ -97,7 +97,7 @@
#define FORWARDMASK 2
-#define SLC 3
+#define SLC 3
#define SLC_DEFAULT 3
#define SLC_VALUE 2
#define SLC_CANTCHANGE 1
@@ -147,7 +147,7 @@
#define XOPTIONS 255
#define LINEMODE_MODES_SUPPORTED 0x1B
-/*
+/*
* set this flag for linemode special functions which are supported by
* Telnet, even though they are not currently active. This is to allow
* the other side to negotiate to a "No Support" state for an option
@@ -155,8 +155,8 @@
* our "No Support" state to something else ("Can't Change", "Value",
* whatever)
*/
-#define SLC_SUPPORTED 0x10
-
+#define SLC_SUPPORTED 0x10
+
#define ESCFOUND 5
#define IACFOUND 6
#define NEGOTIATE 1