OpenCOBOL 1.1pre-rel
|
Go to the source code of this file.
Defines | |
#define | COB_HIDDEN |
#define | COB_ATTR_INIT(v, w, x, y, z) |
#define | COB_CHK_PARMS(x, z) |
Functions | |
COB_HIDDEN void | cob_memcpy (cob_field *, unsigned char *, const int) |
COB_HIDDEN void | cob_exit_fileio (void) |
COB_HIDDEN void | cob_field_to_string (const cob_field *, char *) |
COB_HIDDEN void | cob_init_numeric (void) |
COB_HIDDEN void | cob_init_termio (void) |
COB_HIDDEN void | cob_init_fileio (void) |
COB_HIDDEN void | cob_init_call (void) |
COB_HIDDEN void | cob_init_intrinsic (void) |
COB_HIDDEN void | cob_init_strings (void) |
COB_HIDDEN void | cob_init_move (void) |
COB_HIDDEN void | cob_screen_terminate (void) |
COB_HIDDEN void | cob_screen_set_mode (size_t) |
COB_HIDDEN int | cob_real_get_sign (cob_field *) |
COB_HIDDEN void | cob_real_put_sign (cob_field *, const int) |
COB_HIDDEN long long | cob_get_long_long (cob_field *) |
Variables | |
COB_HIDDEN int | cob_screen_initialized |
COB_HIDDEN int | cob_got_exception |
COB_HIDDEN unsigned int | cob_orig_line |
COB_HIDDEN const char * | cob_orig_statement |
COB_HIDDEN const char * | cob_orig_program_id |
COB_HIDDEN const char * | cob_orig_section |
COB_HIDDEN const char * | cob_orig_paragraph |
#define COB_ATTR_INIT | ( | v, | |
w, | |||
x, | |||
y, | |||
z | |||
) |
do { \ attr.type = v; \ attr.digits = w; \ attr.scale = x; \ attr.flags = y; \ attr.pic = z; \ } while (0)
Definition at line 33 of file coblocal.h.
#define COB_CHK_PARMS | ( | x, | |
z | |||
) |
Definition at line 50 of file coblocal.h.
#define COB_HIDDEN |
Definition at line 30 of file coblocal.h.
COB_HIDDEN void cob_exit_fileio | ( | void | ) |
Definition at line 4426 of file fileio.c.
{ struct file_list *l; for (l = file_cache; l; l = l->next) { if (l->file->open_mode != COB_OPEN_CLOSED && l->file->open_mode != COB_OPEN_LOCKED) { cob_field_to_string (l->file->assign, runtime_buffer); cob_close (l->file, 0, NULL); fprintf (stderr, "WARNING - Implicit CLOSE of %s (\"%s\")\n", l->file->select_name, runtime_buffer); fflush (stderr); } } #ifdef USE_DB41 free (record_lock_object); if (bdb_env) { bdb_env->lock_id_free (bdb_env, bdb_lock_id); bdb_env->close (bdb_env, 0); } #endif #if defined(WITH_INDEX_EXTFH) || defined(WITH_SEQRA_EXTFH) extfh_cob_exit_fileio (); #endif }
COB_HIDDEN void cob_field_to_string | ( | const cob_field * | , |
char * | |||
) |
COB_HIDDEN long long cob_get_long_long | ( | cob_field * | ) |
Definition at line 1329 of file move.c.
{ long long n; cob_field temp; cob_field_attr attr; switch (COB_FIELD_TYPE (f)) { case COB_TYPE_NUMERIC_DISPLAY: return cob_display_get_long_long (f); case COB_TYPE_NUMERIC_BINARY: return cob_binary_mget_int64 (f); case COB_TYPE_NUMERIC_PACKED: return cob_packed_get_long_long (f); default: COB_ATTR_INIT (COB_TYPE_NUMERIC_BINARY, 18, 0, COB_FLAG_HAVE_SIGN, NULL); temp.size = 8; temp.data = (unsigned char *)&n; temp.attr = &attr; cob_move (f, &temp); return n; } }
COB_HIDDEN void cob_init_call | ( | void | ) |
Definition at line 514 of file call.c.
{ char *buff; char *s; char *p; const struct system_table *psyst; #if defined (_WIN32) || !defined (RTLD_DEFAULT) lt_dlhandle libhandle; #endif size_t i; struct stat st; #ifndef USE_LIBDL lt_dlinit (); #endif /* big enough for anything from libdl/libltdl */ resolve_error_buff = cob_malloc (CALL_BUFF_SIZE); #ifndef COB_ALT_HASH call_table = cob_malloc (sizeof (struct call_hash *) * HASH_SIZE); #endif call_filename_buff = cob_malloc (CALL_FILEBUFF_SIZE); call_entry_buff = cob_malloc (COB_SMALL_BUFF); call_entry2_buff = cob_malloc (COB_SMALL_BUFF); s = getenv ("COB_LOAD_CASE"); if (s != NULL) { if (strcasecmp (s, "LOWER") == 0) { name_convert = 1; } else if (strcasecmp (s, "UPPER") == 0) { name_convert = 2; } } buff = cob_malloc (COB_MEDIUM_BUFF); s = getenv ("COB_LIBRARY_PATH"); if (s == NULL) { snprintf (buff, COB_MEDIUM_MAX, ".%s%s", PATHSEPS, COB_LIBRARY_PATH); } else { snprintf (buff, COB_MEDIUM_MAX, "%s%s.%s%s", s, PATHSEPS, PATHSEPS, COB_LIBRARY_PATH); } cob_set_library_path (buff); #ifndef COB_BORKED_DLOPEN mainhandle = lt_dlopen (NULL); #endif s = getenv ("COB_PRE_LOAD"); if (s != NULL) { p = cob_strdup (s); s = strtok (p, PATHSEPS); for (; s; s = strtok (NULL, PATHSEPS)) { for (i = 0; i < resolve_size; ++i) { buff[COB_MEDIUM_MAX] = 0; snprintf (buff, COB_MEDIUM_MAX, "%s/%s.%s", resolve_path[i], s, COB_MODULE_EXT); if (stat (buff, &st) == 0) { #if defined (_WIN32) || !defined (RTLD_DEFAULT) if ((libhandle = lt_dlopen (buff)) != NULL) { cache_handle (libhandle); #else if (lt_dlopen (buff) != NULL) { #endif break; } } } } free (p); } free (buff); call_buffer = cob_malloc (CALL_BUFF_SIZE); call_lastsize = CALL_BUFF_SIZE; for (psyst = (struct system_table *)&system_tab[0]; psyst->syst_name; ++psyst) { insert (psyst->syst_name, psyst->syst_call, NULL); } }
COB_HIDDEN void cob_init_fileio | ( | void | ) |
Definition at line 4379 of file fileio.c.
{ char *s; int n; if ((s = getenv ("COB_SYNC")) != NULL) { if (*s == 'Y' || *s == 'y') { cob_do_sync = 1; } if (*s == 'P' || *s == 'p') { cob_do_sync = 2; } } if ((s = getenv ("COB_SORT_MEMORY")) != NULL) { n = atoi (s); if (n >= 1024*1024) { cob_sort_memory = n; } } cob_file_path = getenv ("COB_FILE_PATH"); if (cob_file_path) { if (!*cob_file_path || *cob_file_path == ' ') { cob_file_path = NULL; } } cob_ls_nulls = getenv ("COB_LS_NULLS"); cob_ls_fixed = getenv ("COB_LS_FIXED"); file_open_env = cob_malloc (COB_SMALL_BUFF); file_open_name = cob_malloc (COB_SMALL_BUFF); file_open_buff = cob_malloc (COB_SMALL_BUFF); #ifdef USE_DB41 bdb_home = getenv ("DB_HOME"); join_environment (); record_lock_object = cob_malloc (1024); bdb_buff = cob_malloc (COB_SMALL_BUFF); rlo_size = 1024; #endif #if defined(WITH_INDEX_EXTFH) || defined(WITH_SEQRA_EXTFH) extfh_cob_init_fileio (&sequential_funcs, &lineseq_funcs, &relative_funcs, &cob_file_write_opt); #endif }
COB_HIDDEN void cob_init_intrinsic | ( | void | ) |
Definition at line 3269 of file intrinsic.c.
{ size_t i; cob_decimal_init (&d1); cob_decimal_init (&d2); cob_decimal_init (&d3); cob_decimal_init (&d4); cob_decimal_init (&d5); /* mpz_init2 (mp, 256); */ memset ((char *)&calc_field[0], 0, sizeof (calc_field)); memset ((char *)&calc_attr[0], 0, sizeof (calc_attr)); for (i = 0; i < DEPTH_LEVEL; ++i) { calc_field[i].data = cob_malloc (256); calc_field[i].size = 256; calc_size[i] = 256; } locale_buff = cob_malloc (COB_SMALL_BUFF); }
COB_HIDDEN void cob_init_move | ( | void | ) |
Definition at line 1354 of file move.c.
{ lastdata = cob_malloc (COB_SMALL_BUFF); lastsize = COB_SMALL_BUFF; }
COB_HIDDEN void cob_init_numeric | ( | void | ) |
Definition at line 1396 of file numeric.c.
{ size_t i; cob_decimal_init (&cob_d1); cob_decimal_init (&cob_d2); cob_decimal_init (&cob_d3); cob_decimal_init (&cob_d4); mpz_init2 (cob_mpzt, 256); mpz_init2 (cob_mexp, 512); for (i = 0; i < COB_MAX_BINARY; i++) { mpz_init (cob_mpze10[i]); mpz_ui_pow_ui (cob_mpze10[i], 10, i); } num_buff_ptr = cob_malloc (2048); memset (packed_value, 0, sizeof(packed_value)); }
COB_HIDDEN void cob_init_strings | ( | void | ) |
Definition at line 595 of file strings.c.
{ inspect_mark = cob_malloc (COB_MEDIUM_BUFF); lastsize = COB_MEDIUM_BUFF; alpha_attr.type = COB_TYPE_ALPHANUMERIC; alpha_attr.digits = 0; alpha_attr.scale = 0; alpha_attr.flags = 0; alpha_attr.pic = NULL; alpha_fld.size = 0; alpha_fld.data = NULL; alpha_fld.attr = &alpha_attr; }
COB_HIDDEN void cob_init_termio | ( | void | ) |
Definition at line 279 of file termio.c.
{ term_buff = cob_malloc (COB_MEDIUM_BUFF); }
COB_HIDDEN void cob_memcpy | ( | cob_field * | , |
unsigned char * | , | ||
const int | |||
) |
COB_HIDDEN int cob_real_get_sign | ( | cob_field * | ) |
COB_HIDDEN void cob_real_put_sign | ( | cob_field * | , |
const int | |||
) |
COB_HIDDEN void cob_screen_set_mode | ( | size_t | ) |
Definition at line 1058 of file screenio.c.
{ if (!smode) { refresh (); def_prog_mode (); endwin (); } else { reset_prog_mode (); refresh (); } }
COB_HIDDEN void cob_screen_terminate | ( | void | ) |
Definition at line 297 of file screenio.c.
{ if (cob_screen_initialized) { cob_screen_initialized = 0; endwin (); } }
COB_HIDDEN int cob_got_exception |
COB_HIDDEN unsigned int cob_orig_line |
COB_HIDDEN const char* cob_orig_paragraph |
COB_HIDDEN const char* cob_orig_program_id |
COB_HIDDEN const char* cob_orig_section |
COB_HIDDEN const char* cob_orig_statement |
COB_HIDDEN int cob_screen_initialized |
Definition at line 51 of file screenio.c.