123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- /*
- * Licensed Materials - Property of IBM and/or HCL
- *
- * IBM Informix Dynamic Server
- * Copyright IBM Corporation 1996, 2011
- * (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
- *
- ***************************************************************************
- *
- * Title: ifxgls.h
- * Description: UDS interface to GLS API
- *
- ***************************************************************************/
- #ifndef _IFXGLS_API_HEADER_INCLUDED
- #define _IFXGLS_API_HEADER_INCLUDED
- #include "ifxtypes.h"
- #include "gls.h"
- #include "datetime.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*
- * The following defines determine whether gl_locale implies a session
- * locale or a db_locale/client_locale combination depending on server/client
- * initialisation.
- */
- #ifdef NT_MI_SAPI /* NT Server/Blade */
- #ifdef MI_SERVBUILD
- #ifdef NT_SERVER /* NT Server */
- #else /* NT Blade */
- __declspec(dllimport) gl_lc_t ** mi_get_locale();
- #define gl_locale ** mi_get_locale()
- #endif /* NT_SERVER */
- #endif /* MI_SERVBUILD */
- #else /* UNIX/Win32 Client - Default */
- #ifdef MI_SERVBUILD
- MI_EXT_DECL gl_lc_t *scb;
- #define gl_locale (*scb)
- #else
- MI_EXT_DECL gl_lc_t gls_env;
- #define gl_locale (gls_env)
- #endif /* MI_SERVBUILD */
- #endif /* NT_MI_SAPI */
- /*
- * Locale initialisation function.
- */
- MI_EXT_DECL mint ifx_gl_init(void);
- /*
- * Codeset conversion functions.
- */
- /*
- * The four functions ifx_gl_cv_mconv(), ifx_gl_cv_outbuflen(),
- * ifx_gl_conv_needed() and ifx_gl_cv_sb2sb_table() are declared
- * in both ifxgls.h and gcvsrv.h (and defined in gcvsrv.c).
- */
- MI_EXT_DECL mint ifx_gl_cv_mconv(gl_cv_state_t *state,
- gl_mchar_t **dst,
- mint *dstbytes,
- char *dst_codeset,
- gl_mchar_t **src,
- mint *srcbytes,
- char *src_codeset);
- MI_EXT_DECL mint ifx_gl_cv_outbuflen(char *dst_codeset,
- char *src_codeset,
- mint srcbytes);
- MI_EXT_DECL mint ifx_gl_conv_needed(char *dst_codeset,
- char *src_codeset);
- MI_EXT_DECL mint ifx_gl_cv_sb2sb_table(char *dstcs,
- char *srccs,
- unsigned char **array);
- /*
- * Built-in Data Type Conversion.
- */
- MI_EXT_DECL mint ifx_gl_convert_date(int4 *date,
- char *datestr,
- char *format);
- MI_EXT_DECL mint ifx_gl_format_date(char *datestr,
- mint len,
- int4 *date,
- char *format);
- MI_EXT_DECL mint ifx_gl_convert_datetime(dtime_t *dt,
- char *datetimestr,
- char *format);
- MI_EXT_DECL mint ifx_gl_format_datetime(char *datetimestr,
- mint len,
- dtime_t *dt,
- char *format);
- MI_EXT_DECL mint ifx_gl_convert_double(double *d,
- char *dstr,
- char *format);
- MI_EXT_DECL mint ifx_gl_format_double(char *dstr,
- mint len,
- double d,
- char *format);
- MI_EXT_DECL mint ifx_gl_convert_money(dec_t *mon,
- char *monstr,
- char *format);
- MI_EXT_DECL mint ifx_gl_format_money(char *monstr,
- mint len,
- dec_t *mon,
- char *format);
- MI_EXT_DECL mint ifx_gl_convert_number(dec_t *dec,
- char *decstr,
- char *format);
- MI_EXT_DECL mint ifx_gl_format_number(char *decstr,
- mint len,
- dec_t *dec,
- char *format);
- #ifdef __cplusplus
- }
- #endif
- #endif /* _IFXGLS_API_HEADER_INCLUDED */
|