33 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
35 #define finite _finite
38 #if defined(ENABLE_NLS) && defined(COB_NLS_RUNTIME)
40 #define _(s) gettext(s)
41 #define N_(s) gettext_noop(s)
48 #if defined(_WIN32) || defined(__CYGWIN__)
49 #define COB_HIDDEN extern
50 #elif defined(__GNUC__) && __GNUC__ >= 4
52 #define COB_HIDDEN extern __attribute__ ((visibility("hidden")))
53 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
55 #define COB_HIDDEN extern __hidden
57 #define COB_HIDDEN extern
77 #define COB_DEPTH_LEVEL 32U
80 #define COB_DECIMAL_NAN -32768
83 #define COB_DECIMAL_INF -32767
86 #define COB_MPZ_DEF 1024UL
89 #define COB_MPF_PREC 2048UL
93 #define COB_MPF_CUTOFF 1024UL
97 #ifdef WORDS_BIGENDIAN
98 #define COB_128_MSW(x) x[0]
99 #define COB_128_LSW(x) x[1]
100 #define COB_MPZ_ENDIAN 1
102 #define COB_128_MSW(x) x[1]
103 #define COB_128_LSW(x) x[0]
104 #define COB_MPZ_ENDIAN -1
108 #define COB_DEC_SPECIAL COB_U64_C(0x7800000000000000)
110 #define COB_DEC_EXTEND COB_U64_C(0x6000000000000000)
112 #define COB_DEC_SIGN COB_U64_C(0x8000000000000000)
114 #define COB_64_IS_SPECIAL(x) ((x & COB_DEC_SPECIAL) == COB_DEC_SPECIAL)
115 #define COB_128_IS_SPECIAL(x) \
116 ((COB_128_MSW(x) & COB_DEC_SPECIAL) == COB_DEC_SPECIAL)
117 #define COB_64_IS_EXTEND(x) ((x & COB_DEC_EXTEND) == COB_DEC_EXTEND)
118 #define COB_128_IS_EXTEND(x) \
119 ((COB_128_MSW(x) & COB_DEC_EXTEND) == COB_DEC_EXTEND)
122 #define COB_64_EXPO_1 COB_U64_C(0x7FE0000000000000)
124 #define COB_64_SIGF_1 COB_U64_C(0x001FFFFFFFFFFFFF)
126 #define COB_64_EXPO_2 COB_U64_C(0x1FF8000000000000)
128 #define COB_64_SIGF_2 COB_U64_C(0x0007FFFFFFFFFFFF)
130 #define COB_64_OR_EXTEND COB_U64_C(0x0020000000000000)
133 #define COB_128_EXPO_1 COB_U64_C(0x7FFE000000000000)
135 #define COB_128_SIGF_1 COB_U64_C(0x0001FFFFFFFFFFFF)
137 #define COB_128_EXPO_2 COB_U64_C(0x1FFF800000000000)
139 #define COB_128_SIGF_2 COB_U64_C(0x00007FFFFFFFFFFF)
141 #define COB_128_OR_EXTEND COB_U64_C(0x0002000000000000)
144 #define COB_FIELD_INIT(x,y,z) do { \
150 #define COB_ATTR_INIT(u,v,x,y,z) do { \
158 #define COB_GET_SIGN(f) \
159 (COB_FIELD_HAVE_SIGN (f) ? cob_real_get_sign (f) : 0)
160 #define COB_PUT_SIGN(f,s) \
161 do { if (COB_FIELD_HAVE_SIGN (f)) cob_real_put_sign (f, s); } ONCE_COB
163 #ifdef COB_PARAM_CHECK
164 #define COB_CHK_PARMS(x,z) \
165 cob_parameter_check (#x, z)
167 #define COB_CHK_PARMS(x,z)
171 #if !defined(_OFFSET_OF_) && !defined(offsetof)
173 #define offsetof(s_name,m_name) (int)(long)&(((s_name*)0))->m_name
177 #define COB_D2I(x) ((x) & 0x0F)
179 #define COB_D2I(x) ((x) - '0')
183 #define COB_I2D(x) ((x) + '0')
185 #define COB_MODULE_PTR cobglobptr->cob_current_module
186 #define COB_TERM_BUFF cobglobptr->cob_term_buff
187 #define COB_ACCEPT_STATUS cobglobptr->cob_accept_status
188 #define COB_MAX_Y_COORD cobglobptr->cob_max_y
189 #define COB_MAX_X_COORD cobglobptr->cob_max_x
191 #define COB_DISP_TO_STDERR cobsetptr->cob_disp_to_stderr
192 #define COB_BEEP_VALUE cobsetptr->cob_beep_value
193 #define COB_TIMEOUT_SCALE cobsetptr->cob_timeout_scale
194 #define COB_EXTENDED_STATUS cobsetptr->cob_extended_status
195 #define COB_USE_ESC cobsetptr->cob_use_esc
290 #define ENV_NOT (1 << 1)
291 #define ENV_INT (1 << 2)
292 #define ENV_SIZE (1 << 3)
293 #define ENV_BOOL (1 << 4)
294 #define ENV_CHAR (1 << 5)
295 #define ENV_STR (1 << 6)
296 #define ENV_PATH (1 << 7)
297 #define ENV_ENUM (1 << 8)
298 #define ENV_ENUMVAL (1 << 9)
300 #define STS_ENVSET (1 << 15)
301 #define STS_CNFSET (1 << 16)
302 #define STS_ENVCLR (1 << 17)
303 #define STS_RESET (1 << 18)
304 #define STS_FNCSET (1 << 19)
314 #define SETPOS(member) offsetof(cob_settings,member),sizeof(cobsetptr->member),0,0
struct __cob_settings cob_settings
void cob_init_numeric(cob_global *)
unsigned int cob_varseq_type
char * cob_save_env_value(char *, char *)
void cob_exit_fileio(void)
unsigned int cob_display_warn
void cob_init_intrinsic(cob_global *)
void cob_parameter_check(const char *, const int)
void cob_print_realbin(const cob_field *, FILE *, const int)
void cob_init_fileio(cob_global *, cob_settings *)
unsigned int cob_ls_nulls
void cob_field_to_string(const cob_field *, void *, const size_t)
int cob_check_env_false(char *)
void cob_runtime_error(const char *,...) COB_A_FORMAT12
const char * cob_get_exception_name(void)
unsigned int cob_beep_value
int cob_check_env_true(char *)
int cob_get_exception_code(void)
unsigned int cob_ls_fixed
unsigned int cob_line_trace
void cob_init_strings(void)
unsigned int cob_ls_uses_cr
void cob_print_ieeedec(const cob_field *, FILE *)
void cob_init_call(cob_global *, cob_settings *)
void cob_init_move(cob_global *, cob_settings *)
void cob_decimal_setget_fld(cob_field *, cob_field *, const int)
void cob_init_screenio(cob_global *, cob_settings *)
void cob_exit_screen(void)
cob_settings * cob_get_settings_ptr(void)
void cob_screen_set_mode(const cob_u32_t)
void cob_exit_numeric(void)
struct cob_time cob_get_current_date_and_time(void)
char * cob_strdup(const char *)
unsigned int cob_extended_status
void cob_init_termio(cob_global *, cob_settings *)
void cob_exit_intrinsic(void)
unsigned int cob_disp_to_stderr
unsigned int cob_env_mangle
void cob_exit_strings(void)
unsigned int cob_local_edit
void cob_decimal_move_temp(cob_field *, cob_field *)
char * cob_preload_resolved
unsigned int cob_config_num
struct config_enum * enums
char * cob_trace_filename
void cob_real_put_sign(cob_field *, const int)
unsigned int name_convert
unsigned int cob_physical_cancel
int cob_real_get_sign(cob_field *)
unsigned int cob_config_cur