General functions and Generic TI charset <=> UTF-16 conversions

ticonv_version_get

TIEXPORT4 const char *TICALL ticonv_version_get(void)

This function returns the library version like "X.Y.Z".

Return value :
a constant string.

ticonv_utf16_strlen

TIEXPORT4 size_t TICALL ticonv_utf16_strlen(const unsigned short *str)

UTF-16 version of strlen (same as wcslen if wchar_t is UTF-16, but portable).

str :
null terminated UTF-16 string
Return value :
number of characters. Surrogate pairs are counted as 2 characters each.

ticonv_utf8_to_utf16

TIEXPORT4 unsigned short* ticonv_utf8_to_utf16(const char *str)

UTF-8 to UTF-16 conversion.

src :
null terminated UTF-8 string
Return value :
a newly allocated string or NULL if error.

ticonv_utf16_to_utf8

TIEXPORT4 char* ticonv_utf16_to_utf8(const unsigned short *str)

UTF-16 to UTF-8 conversion.

src :
null terminated UTF-16 string
Return value :
a newly allocated string or NULL if error.

ticonv_charset_utf16_to_ti_s

TIEXPORT4 char* TICALL ticonv_charset_utf16_to_ti_s(CalcModel model, const unsigned short *utf16, char *ti)

UTF-16 to TI charset conversion.

model :
calculator model
utf16 :
null terminated string (input)
ti :
null terminated string (output)
Return value :
the %ti string.

ticonv_charset_utf16_to_ti

TIEXPORT4 char* TICALL ticonv_charset_utf16_to_ti(CalcModel model, const unsigned short *utf16)

UTF-16 to TI charset conversion.

model :
calculator model
utf16 :
null terminated string (input)
ti :
null terminated string (output)
Return value :
a newly allocated string or NULL if error.

ticonv_charset_ti_to_utf16_s

TIEXPORT4 unsigned short* TICALL ticonv_charset_ti_to_utf16_s(CalcModel model, const char *ti, unsigned short *utf16)

TI charset to UTF-16 conversion. The %utf16 destination buffer will hold the result. It must be big enough.

ti :
null terminated string (input)
utf16 :
null terminated string (output)
Return value :
the %utf16 string.

ticonv_charset_ti_to_utf16

TIEXPORT4 unsigned short* TICALL ticonv_charset_ti_to_utf16(CalcModel model, const char *ti)

TI charset to UTF-16 conversion.

ti :
null terminated string (input)
utf16 :
null terminated string (output)
Return value :
a newly allocated string or NULL if error.

ticonv_varname_to_utf16

TIEXPORT4 unsigned short* TICALL ticonv_varname_to_utf16(CalcModel model, const char *src, unsigned char type)

Some calculators (like TI73/82/83/83+/84+) does not return the real name of the variable (like L1) but uses a special encoded way. This functions expands the name and converts it to UTF-16.

model :
a calculator model.
src :
a name of variable to detokenize and translate (17 chars max).
vartype :
the type of variable.
Return value :
a newly allocated string or NULL if error.

ticonv_varname_to_utf16_s

TIEXPORT4 unsigned short* TICALL ticonv_varname_to_utf16_s(CalcModel model, const char *src, unsigned short *dst, unsigned char type)

Some calculators (like TI73/82/83/83+/84+) does not return the real name of the variable (like L1) but uses a special encoded way. This functions expands the name and converts it to UTF-16.

model :
a calculator model.
src :
a name of variable to detokenize and translate (17 chars max).
dst :
a buffer where to placed the result (big enough).
vartype :
the type of variable.
Return value :
the %dst string.

ticonv_varname_to_utf8

TIEXPORT4 char* TICALL ticonv_varname_to_utf8(CalcModel model, const char *src, unsigned char type)

Some calculators (like TI73/82/83/83+/84+) does not return the real name of the variable (like L1) but uses a special encoded way. This functions expands the name and converts it to UTF-16.

model :
a calculator model.
src :
a name of variable to detokenize and translate.
vartype :
the type of variable.
Return value :
a newly allocated string or NULL if error.

ticonv_varname_to_utf8_s

TIEXPORT4 char* TICALL ticonv_varname_to_utf8_s(CalcModel model, const char *src, char *dst, unsigned char type)

Some calculators (like TI73/82/83/83+/84+) does not return the real name of the variable (like L1) but uses a special encoded way. This functions expands the name and converts it to UTF-16.

model :
a calculator model.
src :
a name of variable to detokenize and translate (17 chars max).
dst :
a buffer where to placed the result (big enough).
vartype :
the type of variable.
Return value :
the %dst string.

ticonv_varname_to_filename

TIEXPORT4 char* TICALL ticonv_varname_to_filename(CalcModel model, const char *src, unsigned char type)

This function converts a varname into a valid filename (depends on locale). Example: 'foobar' => foobar, 'alpha' => _alpha_/alpha.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
Return value :
%dst as a newly allocated string.

ticonv_varname_to_filename_s

TIEXPORT4 char* TICALL ticonv_varname_to_filename_s(CalcModel model, const char *src, char *dst, unsigned char type)

This function converts a varname into a valid filename (depends on locale). Example: 'foobar' => foobar, 'alpha' => _alpha_/alpha.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
dst :
a buffer to place result in the GLib filename encoding (64 bytes max).
Return value :
%dst.

ticonv_varname_to_tifile

TIEXPORT4 char* TICALL ticonv_varname_to_tifile(CalcModel model, const char *src, unsigned char type)

This function converts a raw varname into a TI file varname. Needed because USB hand-helds use TI-UTF-8 while TI files are still encoded in raw varname encoding.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
Return value :
%dst as a newly allocated string.

ticonv_varname_to_tifile_s

TIEXPORT4 char* TICALL ticonv_varname_to_tifile_s(CalcModel model, const char *src, char *dst, unsigned char type)

This function converts a raw varname into a TI file varname. Needed because USB hand-helds use TI-UTF-8 while TI files are still encoded in raw varname encoding.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
dst :
the location where to place the result (big enough).
Return value :
%dst as a newly allocated string.

ticonv_varname_from_tifile

TIEXPORT4 char* TICALL ticonv_varname_from_tifile(CalcModel model, const char *src, unsigned char type)

This function converts a raw varname into a TI file varname. Needed because USB hand-helds use TI-UTF-8 while TI files are still encoded in raw varname encoding.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
Return value :
%dst as a newly allocated string.

ticonv_varname_from_tifile_s

TIEXPORT4 char* TICALL ticonv_varname_from_tifile_s(CalcModel model, const char *src, char *dst, unsigned char type)

This function converts a raw varname into a TI file varname. Needed because USB hand-helds use TI-UTF-8 while TI files are still encoded in raw varname encoding.

model :
a calculator model taken in #CalcModel.
src :
the name of variable to convert (raw/binary name).
dst :
the location where to place the result (big enough).
Return value :
%dst as a newly allocated string.

Return to the main index