16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /* Routines for various UTF conversions */
27
28 #ifndef _UTF_H
29 #define _UTF_H
30
31 #include <stdio.h>
32
33 #include "jni.h"
34 #include "utf_md.h"
35
36 /* Error and assert macros */
37 #define UTF_ERROR(m) utfError(__FILE__, __LINE__, m)
38 #define UTF_ASSERT(x) ( (x)==0 ? UTF_ERROR("ASSERT ERROR " #x) : (void)0 )
39
40 void utfError(char *file, int line, char *message);
41
42 struct UtfInst* JNICALL utfInitialize
43 (char *options);
44 void JNICALL utfTerminate
45 (struct UtfInst *ui, char *options);
46 int JNICALL utf8ToPlatform
47 (struct UtfInst *ui, jbyte *utf8,
48 int len, char *output, int outputMaxLen);
49 int JNICALL utf8FromPlatform
50 (struct UtfInst *ui, char *str, int len,
51 jbyte *output, int outputMaxLen);
52 int JNICALL utf8ToUtf16
53 (struct UtfInst *ui, jbyte *utf8, int len,
54 jchar *output, int outputMaxLen);
55 int JNICALL utf16ToUtf8m
56 (struct UtfInst *ui, jchar *utf16, int len,
57 jbyte *output, int outputMaxLen);
|
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /* Routines for various UTF conversions */
27
28 #ifndef _UTF_H
29 #define _UTF_H
30
31 #include <stdio.h>
32
33 #include "jni.h"
34 #include "utf_md.h"
35
36 /* Use THIS_FILE when it is available. */
37 #ifndef THIS_FILE
38 #define THIS_FILE __FILE__
39 #endif
40
41 /* Error and assert macros */
42 #define UTF_ERROR(m) utfError(THIS_FILE, __LINE__, m)
43 #define UTF_ASSERT(x) ( (x)==0 ? UTF_ERROR("ASSERT ERROR " #x) : (void)0 )
44
45 void utfError(char *file, int line, char *message);
46
47 struct UtfInst* JNICALL utfInitialize
48 (char *options);
49 void JNICALL utfTerminate
50 (struct UtfInst *ui, char *options);
51 int JNICALL utf8ToPlatform
52 (struct UtfInst *ui, jbyte *utf8,
53 int len, char *output, int outputMaxLen);
54 int JNICALL utf8FromPlatform
55 (struct UtfInst *ui, char *str, int len,
56 jbyte *output, int outputMaxLen);
57 int JNICALL utf8ToUtf16
58 (struct UtfInst *ui, jbyte *utf8, int len,
59 jchar *output, int outputMaxLen);
60 int JNICALL utf16ToUtf8m
61 (struct UtfInst *ui, jchar *utf16, int len,
62 jbyte *output, int outputMaxLen);
|