Detect FPU by checking CPUID features.
[dragonfly.git] / contrib / bind-9.5.2 / lib / isccc / include / isccc / base64.h
blob795b0449dcefd09d424a104a60d554dfa50e184e
1 /*
2 * Portions Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
3 * Portions Copyright (C) 2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
11 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
12 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * Portions Copyright (C) 2001 Nominum, Inc.
19 * Permission to use, copy, modify, and/or distribute this software for any
20 * purpose with or without fee is hereby granted, provided that the above
21 * copyright notice and this permission notice appear in all copies.
23 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
24 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
26 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
28 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
32 /* $Id: base64.h,v 1.10 2007/08/28 07:20:43 tbox Exp $ */
34 #ifndef ISCCC_BASE64_H
35 #define ISCCC_BASE64_H 1
37 /*! \file isccc/base64.h */
39 #include <isc/lang.h>
40 #include <isccc/types.h>
42 ISC_LANG_BEGINDECLS
44 /***
45 *** Functions
46 ***/
48 isc_result_t
49 isccc_base64_encode(isccc_region_t *source, int wordlength,
50 const char *wordbreak, isccc_region_t *target);
51 /*%<
52 * Convert data into base64 encoded text.
54 * Notes:
55 *\li The base64 encoded text in 'target' will be divided into
56 * words of at most 'wordlength' characters, separated by
57 * the 'wordbreak' string. No parentheses will surround
58 * the text.
60 * Requires:
61 *\li 'source' is a region containing binary data.
62 *\li 'target' is a text region containing available space.
63 *\li 'wordbreak' points to a null-terminated string of
64 * zero or more whitespace characters.
67 isc_result_t
68 isccc_base64_decode(const char *cstr, isccc_region_t *target);
69 /*%<
70 * Decode a null-terminated base64 string.
72 * Requires:
73 *\li 'cstr' is non-null.
74 *\li 'target' is a valid region.
76 * Returns:
77 *\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
78 * fit in 'target'.
79 *\li #ISC_R_BADBASE64 -- 'cstr' is not a valid base64 encoding.
80 *\li #ISC_R_NOSPACE -- 'target' is not big enough.
83 ISC_LANG_ENDDECLS
85 #endif /* ISCCC_BASE64_H */