1999-07-12 20:08:42 +00:00
|
|
|
/*
|
2018-02-23 09:53:12 +01:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2000-08-01 01:33:37 +00:00
|
|
|
*
|
2016-06-27 14:56:38 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 09:53:12 +01:00
|
|
|
*
|
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
|
|
* information regarding copyright ownership.
|
1999-07-12 20:08:42 +00:00
|
|
|
*/
|
|
|
|
|
2005-04-27 04:57:32 +00:00
|
|
|
/*! \file */
|
|
|
|
|
1999-07-12 20:08:42 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2000-08-30 01:24:20 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
1999-07-12 20:08:42 +00:00
|
|
|
#include <isc/once.h>
|
|
|
|
#include <isc/msgcat.h>
|
2000-04-28 01:12:23 +00:00
|
|
|
#include <isc/util.h>
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
#include <dst/lib.h>
|
|
|
|
|
|
|
|
/***
|
|
|
|
*** Globals
|
|
|
|
***/
|
|
|
|
|
2001-11-19 03:08:44 +00:00
|
|
|
LIBDNS_EXTERNAL_DATA isc_msgcat_t * dst_msgcat = NULL;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
*** Private
|
|
|
|
***/
|
|
|
|
|
|
|
|
static isc_once_t msgcat_once = ISC_ONCE_INIT;
|
|
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
*** Functions
|
|
|
|
***/
|
|
|
|
|
|
|
|
static void
|
|
|
|
open_msgcat(void) {
|
|
|
|
isc_msgcat_open("libdst.cat", &dst_msgcat);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dst_lib_initmsgcat(void) {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize the DST library's message catalog, dst_msgcat, if it
|
|
|
|
* has not already been initialized.
|
|
|
|
*/
|
|
|
|
|
|
|
|
RUNTIME_CHECK(isc_once_do(&msgcat_once, open_msgcat) == ISC_R_SUCCESS);
|
|
|
|
}
|