Go to the source code of this file.
Define Documentation
#define COB_ATTR_INIT |
( |
|
v, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: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 |
|
) |
| |
Function Documentation
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 * |
| ) |
|
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
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 |
| ) |
|
COB_HIDDEN void cob_init_move |
( |
void |
| ) |
|
COB_HIDDEN void cob_init_numeric |
( |
void |
| ) |
|
COB_HIDDEN void cob_init_strings |
( |
void |
| ) |
|
COB_HIDDEN void cob_init_termio |
( |
void |
| ) |
|
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 |
| ) |
|
Variable Documentation