Lines Matching refs:ui
43 struct UtfInst *ui; in utfInitialize() local
46 ui = (struct UtfInst*)calloc(sizeof(struct UtfInst), 1); in utfInitialize()
47 ui->iconvToPlatform = (void *)-1; in utfInitialize()
48 ui->iconvFromPlatform = (void *)-1; in utfInitialize()
56 return ui; in utfInitialize()
61 return ui; in utfInitialize()
65 ui->iconvToPlatform = iconv_open(codeset, "UTF-8"); in utfInitialize()
66 if ( ui->iconvToPlatform == (void *)-1 ) { in utfInitialize()
69 ui->iconvFromPlatform = iconv_open("UTF-8", codeset); in utfInitialize()
70 if ( ui->iconvFromPlatform == (void *)-1 ) { in utfInitialize()
73 return ui; in utfInitialize()
80 utfTerminate(struct UtfInst *ui, char *options) in utfTerminate() argument
82 if ( ui->iconvFromPlatform != (void *)-1 ) { in utfTerminate()
83 (void)iconv_close(ui->iconvFromPlatform); in utfTerminate()
85 if ( ui->iconvToPlatform != (void *)-1 ) { in utfTerminate()
86 (void)iconv_close(ui->iconvToPlatform); in utfTerminate()
88 ui->iconvToPlatform = (void *)-1; in utfTerminate()
89 ui->iconvFromPlatform = (void *)-1; in utfTerminate()
90 (void)free(ui); in utfTerminate()
144 utf8ToPlatform(struct UtfInst*ui, jbyte *utf8, int len, char *output, int outputMaxLen) in utf8ToPlatform() argument
157 return iconvConvert(ui->iconvToPlatform, (char*)utf8, len, output, outputMaxLen); in utf8ToPlatform()
165 utf8FromPlatform(struct UtfInst*ui, char *str, int len, jbyte *output, int outputMaxLen) in utf8FromPlatform() argument
178 return iconvConvert(ui->iconvFromPlatform, str, len, (char*)output, outputMaxLen); in utf8FromPlatform()