OpenCOBOL 1.1pre-rel
Data Structures | Defines | Typedefs | Functions | Variables
common.c File Reference
#include "config.h"
#include "defaults.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <signal.h>
#include <locale.h>
#include "common.h"
#include "coblocal.h"
#include "move.h"
#include "numeric.h"
#include "termio.h"
#include "fileio.h"
#include "call.h"
#include "screenio.h"
#include "intrinsic.h"
#include "lib/gettext.h"
#include "exception.def"
Include dependency graph for common.c:

Go to the source code of this file.

Data Structures

struct  cob_exception
struct  cob_alloc_cache
struct  exit_handlerlist
struct  handlerlist

Defines

#define COB_ERRBUF_SIZE   256
#define COB_EXCEPTION(code, tag, name, critical)   name,
#define COB_EXCEPTION(code, tag, name, critical)   0x##code,
#define EXCEPTION_TAB_SIZE   sizeof(cob_exception_tab_code) / sizeof(int)

Typedefs

typedef void(* cob_sighandler_t )(int)

Functions

static void COB_NOINLINE cob_sig_handler (int sig)

Variables

static int cob_argc = 0
static char ** cob_argv = NULL
static struct cob_alloc_cachecob_alloc_base = NULL
static char * cob_local_env = NULL
static int current_arg = 1
static unsigned char * commlnptr = NULL
static size_t commlncnt = 0
static char * locale_save = NULL
static size_t sort_nkeys
static struct cob_file_keysort_keys
static const unsigned char * sort_collate
static const char * cob_current_program_id = NULL
static const char * cob_current_section = NULL
static const char * cob_current_paragraph = NULL
static const char * cob_source_file = NULL
static const char * cob_source_statement = NULL
static unsigned int cob_source_line = 0
static size_t cob_line_trace = 0
static cob_sighandler_t hupsig = NULL
static cob_sighandler_t intsig = NULL
static cob_sighandler_t qutsig = NULL
static const char *const cob_exception_tab_name []
static const int cob_exception_tab_code []
static int cob_switch [8]
static struct exit_handlerlistexit_hdlrs
static struct handlerlisthdlrs
static char * runtime_err_str
static cob_field_attr all_attr = { COB_TYPE_ALPHANUMERIC_ALL, 0, 0, 0, NULL }
static cob_field_attr one_attr = { COB_TYPE_NUMERIC, 1, 0, 0, NULL }
struct cob_modulecob_current_module = NULL
int cob_initialized = 0
int cob_exception_code = 0
int cob_call_params = 0
int cob_save_call_params = 0
int cob_initial_external = 0
int cob_got_exception = 0
const char * cob_orig_statement = NULL
const char * cob_orig_program_id = NULL
const char * cob_orig_section = NULL
const char * cob_orig_paragraph = NULL
unsigned int cob_orig_line = 0
cob_field cob_zero = { 1, (ucharptr)"0", &all_attr }
cob_field cob_space = { 1, (ucharptr)" ", &all_attr }
cob_field cob_high = { 1, (ucharptr)"\xff", &all_attr }
cob_field cob_low = { 1, (ucharptr)"\0", &all_attr }
cob_field cob_quote = { 1, (ucharptr)"\"", &all_attr }
cob_field cob_one = { 1, (ucharptr)"1", &one_attr }

Define Documentation

#define COB_ERRBUF_SIZE   256

Definition at line 75 of file common.c.

#define COB_EXCEPTION (   code,
  tag,
  name,
  critical 
)    name,

Definition at line 122 of file common.c.

#define COB_EXCEPTION (   code,
  tag,
  name,
  critical 
)    0x##code,

Definition at line 122 of file common.c.

#define EXCEPTION_TAB_SIZE   sizeof(cob_exception_tab_code) / sizeof(int)

Definition at line 131 of file common.c.


Typedef Documentation

typedef void(* cob_sighandler_t)(int)

Definition at line 103 of file common.c.


Function Documentation

static void COB_NOINLINE cob_sig_handler ( int  sig) [static]

Definition at line 185 of file common.c.

Here is the call graph for this function:


Variable Documentation

cob_field_attr all_attr = { COB_TYPE_ALPHANUMERIC_ALL, 0, 0, 0, NULL } [static]

Definition at line 153 of file common.c.

struct cob_alloc_cache* cob_alloc_base = NULL [static]

Definition at line 81 of file common.c.

int cob_argc = 0 [static]

Definition at line 79 of file common.c.

char** cob_argv = NULL [static]

Definition at line 80 of file common.c.

int cob_call_params = 0

Definition at line 163 of file common.c.

Definition at line 158 of file common.c.

const char* cob_current_paragraph = NULL [static]

Definition at line 96 of file common.c.

const char* cob_current_program_id = NULL [static]

Definition at line 94 of file common.c.

const char* cob_current_section = NULL [static]

Definition at line 95 of file common.c.

Definition at line 161 of file common.c.

const int cob_exception_tab_code[] [static]

Definition at line 123 of file common.c.

const char* const cob_exception_tab_name[] [static]

Definition at line 115 of file common.c.

Definition at line 166 of file common.c.

cob_field cob_high = { 1, (ucharptr)"\xff", &all_attr }

Definition at line 176 of file common.c.

Definition at line 165 of file common.c.

int cob_initialized = 0

Definition at line 160 of file common.c.

size_t cob_line_trace = 0 [static]

Definition at line 100 of file common.c.

char* cob_local_env = NULL [static]

Definition at line 83 of file common.c.

cob_field cob_low = { 1, (ucharptr)"\0", &all_attr }

Definition at line 177 of file common.c.

Definition at line 179 of file common.c.

unsigned int cob_orig_line = 0

Definition at line 172 of file common.c.

const char* cob_orig_paragraph = NULL

Definition at line 171 of file common.c.

const char* cob_orig_program_id = NULL

Definition at line 169 of file common.c.

const char* cob_orig_section = NULL

Definition at line 170 of file common.c.

const char* cob_orig_statement = NULL

Definition at line 168 of file common.c.

cob_field cob_quote = { 1, (ucharptr)"\"", &all_attr }

Definition at line 178 of file common.c.

Definition at line 164 of file common.c.

const char* cob_source_file = NULL [static]

Definition at line 97 of file common.c.

unsigned int cob_source_line = 0 [static]

Definition at line 99 of file common.c.

const char* cob_source_statement = NULL [static]

Definition at line 98 of file common.c.

Definition at line 175 of file common.c.

int cob_switch[8] [static]

Definition at line 137 of file common.c.

Definition at line 174 of file common.c.

size_t commlncnt = 0 [static]

Definition at line 86 of file common.c.

unsigned char* commlnptr = NULL [static]

Definition at line 85 of file common.c.

int current_arg = 1 [static]

Definition at line 84 of file common.c.

struct exit_handlerlist * exit_hdlrs [static]
struct handlerlist * hdlrs [static]
cob_sighandler_t hupsig = NULL [static]

Definition at line 104 of file common.c.

cob_sighandler_t intsig = NULL [static]

Definition at line 105 of file common.c.

char* locale_save = NULL [static]

Definition at line 88 of file common.c.

cob_field_attr one_attr = { COB_TYPE_NUMERIC, 1, 0, 0, NULL } [static]

Definition at line 154 of file common.c.

cob_sighandler_t qutsig = NULL [static]

Definition at line 106 of file common.c.

char* runtime_err_str [static]

Definition at line 151 of file common.c.

const unsigned char* sort_collate [static]

Definition at line 92 of file common.c.

struct cob_file_key* sort_keys [static]

Definition at line 91 of file common.c.

size_t sort_nkeys [static]

Definition at line 90 of file common.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines