1 /* $NetBSD: result.c,v 1.4 2014/12/10 04:38:01 christos Exp $ */
4 * Portions Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
5 * Portions Copyright (C) 2001, 2003 Internet Software Consortium.
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
13 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
14 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 * Portions Copyright (C) 2001 Nominum, Inc.
21 * Permission to use, copy, modify, and/or distribute this software for any
22 * purpose with or without fee is hereby granted, provided that the above
23 * copyright notice and this permission notice appear in all copies.
25 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
26 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
28 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
29 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
30 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
31 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 /* Id: result.c,v 1.10 2007/08/28 07:20:43 tbox Exp */
43 #include <isccc/result.h>
44 #include <isccc/lib.h>
46 static const char *text
[ISCCC_R_NRESULTS
] = {
47 "unknown version", /* 1 */
48 "syntax error", /* 2 */
55 #define ISCCC_RESULT_RESULTSET 2
57 static isc_once_t once
= ISC_ONCE_INIT
;
60 initialize_action(void) {
63 result
= isc_result_register(ISC_RESULTCLASS_ISCCC
, ISCCC_R_NRESULTS
,
65 ISCCC_RESULT_RESULTSET
);
66 if (result
!= ISC_R_SUCCESS
)
67 UNEXPECTED_ERROR(__FILE__
, __LINE__
,
68 "isc_result_register() failed: %u", result
);
73 isccc_lib_initmsgcat();
74 RUNTIME_CHECK(isc_once_do(&once
, initialize_action
) == ISC_R_SUCCESS
);
78 isccc_result_totext(isc_result_t result
) {
81 return (isc_result_totext(result
));
85 isccc_result_register(void) {