ifx_gl_init - initialize the processing locale for the current process

SYNOPSIS


#include <ifxgls.h>
int ifx_gl_init(void)

DESCRIPTION

This function initializes the processing locale for the current process. ESQL/C programs need to call this function at the beginning of main() to ensure that the locale, based on environment variables, has been established before calling any other ifx_gl_ functions. This also applies to other client-side programs that use the ifx_gl_ functions. However, it is not necessary to call ifx_gl_init from functions running on the server.

RETURN VALUES

This function returns 0 if it's successful, and -1 if it fails.

ERRORS

If an error has occurred, this function returns -1 and ifx_gl_lc_errno() returns one of the following,
[IFX_GL_PARAMERR]
Either locale or code set conversion specifiers, i.e., GLS or NLS environment variables, is incorrect, or the codeset name registy file could not be found.
[IFX_GL_ENOMEM]
Not enough memory to allocate a new locale object or a new codeset conversion object.
[IFX_GL_FILEERR]
The locale or codeset conversion file could not be found, is not readable, or has the wrong format.
[IFX_GL_INVALIDLOC]
An attempt to create a locale with incompatible code sets has occured.
[IFX_GL_ELOCTOOWIDE]
The locale contains characters that are wider than the library allows.
[IFX_GL_BADOBJVER]
The locale object version is not compatible with the current library.
[IFX_GL_BADFILEFORM]
Bad format found in the codeset registry file.

ACKNOWLEDGEMENT

Portions of this description were derived from the X/Open CAE Specification: "System Interfaces and Headers, Issue 4"; X/Open Document Number: C202; ISBN: 1-872630-47-2; Published by X/Open Company Ltd., U.K.