The gl_wchar_t data type

The library represents a wide character with the gl_wchar_t data type.

The gls.h header file defines the gl_wchar_t data type, and the ifxgls.h header file includes gls.h. Therefore, you must include ifxgls.h in any file that uses the gl_wchar_t data type (or any function).

Restriction: The gl_wchar_t data type is an opaque structure. Do not access the individual bytes of a wide character directly.
The gl_wchar_t data type is a fixed-length structure. Therefore, you can declare a variable as a pointer to a gl_wchar_t structure or as a gl_wchar_t structure directly. For example, the following declarations create the wc_string variable as a pointer to a wide-character string and wc_string2 as a single wide character:
#include <ifxgls.h>:
...
gl_wchar_t *wc_string;
gl_wchar_t wc_string2;

The declaration of wc_string assumes that the application allocates memory for this wide-character string elsewhere. The declaration of wc_string2 allocates one wide character.

You can compare or assign a single-byte ASCII character or character constant to a single wide character, as in the following code fragment:
gl_wchar_t wc = 'a'; /* assigns an ASCII character */
if (wc=='a') /* compares with an ASCII character */
    ...