michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #include "prerror.h" michael@0: #include "secerr.h" michael@0: #include "secport.h" michael@0: #include "prinit.h" michael@0: #include "prprf.h" michael@0: #include "prtypes.h" michael@0: #include "prlog.h" michael@0: #include "plstr.h" michael@0: #include "nssutil.h" michael@0: #include michael@0: michael@0: #define ER3(name, value, str) {#name, str}, michael@0: michael@0: static const struct PRErrorMessage sectext[] = { michael@0: #include "SECerrs.h" michael@0: {0,0} michael@0: }; michael@0: michael@0: static const struct PRErrorTable sec_et = { michael@0: sectext, "secerrstrings", SEC_ERROR_BASE, michael@0: (sizeof sectext)/(sizeof sectext[0]) michael@0: }; michael@0: michael@0: static PRStatus michael@0: nss_InitializePRErrorTableOnce(void) { michael@0: return PR_ErrorInstallTable(&sec_et); michael@0: } michael@0: michael@0: static PRCallOnceType once; michael@0: michael@0: SECStatus michael@0: NSS_InitializePRErrorTable(void) michael@0: { michael@0: return (PR_SUCCESS == PR_CallOnce(&once, nss_InitializePRErrorTableOnce)) michael@0: ? SECSuccess : SECFailure; michael@0: } michael@0: