diff options
author | nelson%bolyard.com <devnull@localhost> | 2009-04-28 04:25:03 +0000 |
---|---|---|
committer | nelson%bolyard.com <devnull@localhost> | 2009-04-28 04:25:03 +0000 |
commit | af734937767d295032a58bee9ccaf644d72be353 (patch) | |
tree | c409b7d312a9d174a3afe39e95e89d29ed921fe5 /security/nss/lib/jar/jarnav.c | |
parent | 7acce5e3ea63b4626dfe5fd9e23836f9acf2e311 (diff) | |
download | nss-hg-af734937767d295032a58bee9ccaf644d72be353.tar.gz |
Bug 487007: Make lib/jar conform to NSS coding style, eliminate Win16 hacks,
and fix gross bugs, r=julien.pierre
Diffstat (limited to 'security/nss/lib/jar/jarnav.c')
-rw-r--r-- | security/nss/lib/jar/jarnav.c | 62 |
1 files changed, 23 insertions, 39 deletions
diff --git a/security/nss/lib/jar/jarnav.c b/security/nss/lib/jar/jarnav.c index 58c67df67..63fab59ab 100644 --- a/security/nss/lib/jar/jarnav.c +++ b/security/nss/lib/jar/jarnav.c @@ -45,11 +45,6 @@ #include "jarint.h" /* from proto.h */ -#ifdef MOZILLA_CLIENT_OLD -extern MWContext *XP_FindSomeContext(void); -#endif - -/* sigh */ extern MWContext *FE_GetInitContext(void); /* To return an MWContext for Java */ @@ -62,17 +57,13 @@ static MWContext *(*jar_fn_GetInitContext) (void) = NULL; * J A R _ i n i t * * Initialize the JAR functions. - * + * */ void JAR_init (void) - { -#ifdef MOZILLA_CLIENT_OLD - JAR_init_callbacks (XP_GetString, XP_FindSomeContext, FE_GetInitContext); -#else - JAR_init_callbacks (XP_GetString, NULL, NULL); -#endif - } +{ + JAR_init_callbacks (XP_GetString, NULL, NULL); +} /* * J A R _ s e t _ c o n t e x t @@ -81,30 +72,23 @@ void JAR_init (void) * it may be needed to prompt the user for a password. * */ - -int JAR_set_context (JAR *jar, MWContext *mw) - { - if (mw) - { - jar->mw = mw; +int +JAR_set_context(JAR *jar, MWContext *mw) +{ + if (mw) { + jar->mw = mw; + } else { + /* jar->mw = XP_FindSomeContext(); */ + jar->mw = NULL; + /* + * We can't find a context because we're in startup state and none + * exist yet. go get an FE_InitContext that only works at + * initialization time. + */ + /* Turn on the mac when we get the FE_ function */ + if (jar->mw == NULL) { + jar->mw = jar_fn_GetInitContext(); + } } - else - { - /* jar->mw = XP_FindSomeContext(); */ - jar->mw = NULL; - - /* - * We can't find a context because we're in startup state and none - * exist yet. go get an FE_InitContext that only works at initialization - * time. - */ - - /* Turn on the mac when we get the FE_ function */ - if (jar->mw == NULL) - { - jar->mw = jar_fn_GetInitContext(); - } - } - - return 0; - } + return 0; +} |