38 #ifdef HAVE_ATTRIBUTE_ALIGNED
39 #define COB_ALIGN " __attribute__((aligned))"
44 #define COB_MAX_SUBSCRIPTS 16
46 #define COB_MALLOC_ALIGN 15
48 #define COB_INSIDE_SIZE 64
50 #define INITIALIZE_NONE 0
51 #define INITIALIZE_ONE 1
52 #define INITIALIZE_DEFAULT 2
53 #define INITIALIZE_COMPOUND 3
55 #define CB_NEED_HIGH (1U << 0)
56 #define CB_NEED_LOW (1U << 1)
57 #define CB_NEED_QUOTE (1U << 2)
58 #define CB_NEED_SPACE (1U << 3)
59 #define CB_NEED_ZERO (1U << 4)
181 #undef COB_SYSTEM_GEN
182 #define COB_SYSTEM_GEN(x, y, z) { x, #z },
189 #undef COB_SYSTEM_GEN
195 static
void output_local (const
char *, ...) COB_A_FORMAT12;
207 cb_code_field (cb_tree x)
223 for (stp = string_cache; stp; stp = stp->
next) {
224 if (strcmp (p, stp->
text) == 0) {
241 for (clp = call_cache; clp; clp = clp->
next) {
242 if (strcmp (p, clp->
callname) == 0) {
257 for (clp = func_call_cache; clp; clp = clp->
next) {
258 if (strcmp (p, clp->
callname) == 0) {
265 func_call_cache = clp;
275 for (; p; p =
next) {
290 for (; p; p =
next) {
305 for (; p; p =
next) {
324 return fl1->
f->
id - fl2->
f->
id;
333 return fl1->
f->
id - fl2->
f->
id;
367 for (i = 0; i < insize; i++) {
375 while (psize > 0 || (qsize > 0 && q)) {
382 }
else if (qsize == 0 || !q) {
388 }
else if ((*cmpfunc) (p, q) <= 0) {
421 output (
const char *fmt, ...)
473 for (p = str; *p ==
' '; p++) {
477 if (*p ==
'}' && strcmp (str,
"})") != 0) {
483 if (*p ==
'{' && strcmp (str,
")}") != 0) {
499 for (i = 0; i < size; i++) {
503 }
else if (c ==
'\"') {
505 }
else if ((c ==
'\\' || c ==
'?') && !llit) {
628 local_base_cache = bl;
643 local_base_cache = bl;
688 }
else if (p->
depending && cb_flag_odoslide) {
699 }
else if (f->
offset > 0) {
718 output (
"(cob_u8_ptr)\"%s%s\"", (
char *)l->
data,
719 (l->
sign < 0) ?
"-" : (l->
sign > 0) ?
"+" :
"");
736 for (; f && lsub; f = f->
parent) {
741 for (o = o_slide; o; o = o->
children) {
777 output (
"cob_procedure_params[%u]->data",
856 for (; q != f; q = q->
parent) {
881 const cob_u32_t flags,
unsigned char *
pic,
const int lenstr)
886 for (l = attr_cache; l; l = l->
next) {
887 if (type == l->
type &&
891 ((pic == l->
pic) || (pic && l->
pic && lenstr == l->
lenstr &&
892 memcmp ((
char *)pic, (
char *)(l->
pic), (
size_t)lenstr) == 0))) {
920 for (s = (
unsigned char *)rets; *s; s++) {
921 if (islower ((
int)*s)) {
999 if (cb_binary_truncate &&
1068 for (l = literal_cache; l; l = l->
next) {
1075 (
size_t)literal->
size) == 0) {
1112 output (
"(cob_u8_ptr)NULL");
1131 output (
"cob_get_int (");
1160 output (
"cob_call_field (");
1164 output (
", cob_nest_tab, 0, %d)", cb_fold_call);
1166 output (
", NULL, 0, %d)", cb_fold_call);
1176 f = cb_code_field (x);
1192 #ifdef COB_NON_ALIGNED
1193 output (
"(cob_get_pointer (");
1197 output (
"(*(unsigned char **) (");
1204 #ifdef COB_NON_ALIGNED
1205 output (
"(cob_get_prog_pointer (");
1209 output (
"(*(unsigned char **) (");
1222 output (
"cob_get_numdisp (");
1243 output (
"cob_u8_ptr) (");
1245 output (
"cob_s8_ptr) (");
1251 #ifdef COB_NON_ALIGNED
1253 #ifdef COB_SHORT_BORK
1268 output (
"unsigned short)COB_BSWAP_16(");
1270 output (
"short)COB_BSWAP_16(");
1275 output (
"unsigned int)COB_BSWAP_32(");
1277 output (
"int)COB_BSWAP_32(");
1282 output (
"cob_u64_t)COB_BSWAP_64(");
1284 output (
"cob_s64_t)COB_BSWAP_64(");
1299 output (
"cob_s64_t *)(");
1312 output (
"unsigned short *)(");
1319 output (
"unsigned int *)(");
1326 output (
"cob_u64_ptr)(");
1328 output (
"cob_s64_ptr)(");
1340 output (
"(unsigned int)");
1351 output (
"cob_get_int (");
1377 output (
"(cob_u8_ptr)NULL");
1397 output (
"cob_get_llint (");
1404 output (
"(cob_s64_t) pow (");
1426 output (
"cob_call_field (");
1430 output (
", cob_nest_tab, 0, %d)", cb_fold_call);
1432 output (
", NULL, 0, %d)", cb_fold_call);
1442 f = cb_code_field (x);
1452 output (
"(cob_s64_t)(*(int *) (");
1458 #ifdef COB_NON_ALIGNED
1459 output (
"(cob_get_pointer (");
1463 output (
"(*(unsigned char **) (");
1470 #ifdef COB_NON_ALIGNED
1471 output (
"(cob_get_prog_pointer (");
1475 output (
"(*(void **) (");
1487 output (
"cob_u8_ptr) (");
1489 output (
"cob_s8_ptr) (");
1495 #ifdef COB_NON_ALIGNED
1497 #ifdef COB_SHORT_BORK
1512 output (
"unsigned short)COB_BSWAP_16(");
1514 output (
"short)COB_BSWAP_16(");
1519 output (
"unsigned int)COB_BSWAP_32(");
1521 output (
"int)COB_BSWAP_32(");
1526 output (
"cob_u64_t)COB_BSWAP_64(");
1528 output (
"cob_s64_t)COB_BSWAP_64(");
1543 output (
"cob_s64_t *)(");
1556 output (
"unsigned short *)(");
1563 output (
"unsigned int *)(");
1570 output (
"cob_u64_ptr)(");
1572 output (
"cob_s64_ptr)(");
1585 output (
"(unsigned int)");
1597 output (
"cob_get_llint (");
1681 #ifdef COB_EBCDIC_MACHINE
1683 output (
"cob_ebcdic_ascii");
1696 #ifdef COB_EBCDIC_MACHINE
1704 if (cb_flag_alt_ebcdic) {
1709 output (
"cob_ascii_ebcdic");
1778 cobc_abort_pr (
_(
"Internal statement stack depth exceeded -> %d"),
1791 if (l == r->
check) {
1811 #ifdef COB_EBCDIC_MACHINE
1813 output (
"&f_ebcdic_ascii");
1822 #ifdef COB_EBCDIC_MACHINE
1827 output (
"&f_ascii_ebcdic");
1875 local_field_cache = fl;
1888 output (
"COB_SET_DATA (%s%d, ",
1907 sprintf (fname,
"f%d",
stack_id++);
1915 output (
"COB_SET_FLD(%s, ", fname);
1933 output (
"cob_intr_binop (");
1947 output (
"cob_user_function (func_%s, &cob_dyn_%u, ",
1950 output (
"func_%s.funcfld (&cob_dyn_%u",
2035 if (p->
name[0] ==
'$') {
2036 switch (p->
name[1]) {
2080 for (i = 0; i < p->
argc; i++) {
2100 if (i + 1 < p->
argc) {
2148 output (p->
op ==
'&' ?
" && " :
" || ");
2210 cobc_abort_pr (
_(
"Internal statement stack depth exceeded -> %d"),
2352 return cb_default_byte;
2369 const int init_occurs)
2377 }
else if (f->
size == 1) {
2378 output (
"*(cob_u8_ptr)(");
2380 output (
") = %d;\n", value);
2385 output (
", %d, ", value);
2406 lsize = (int)l->
size;
2408 if (lsize > f->
size) {
2413 lsize = (int)l->
size;
2428 if (lsize >= size) {
2434 output (
", %d);\n", size);
2444 output (
" + (i0 * %d), ", lsize);
2446 output (
", %d);\n", lsize);
2453 output (
" + (i0 * %d), ", lsize);
2473 output (
"{float temp = 0.0;");
2475 output (
"{double temp = 0.0;");
2479 output (
", (void *)&temp, sizeof(temp));}\n");
2487 output (
"*(cob_u8_ptr)(");
2498 output (
", %d, %d);\n", c, size);
2517 unsigned char buffchar;
2519 f = cb_code_field (x);
2524 output (
"cob_chain_setup (");
2542 }
else if (value ==
cb_low) {
2545 }
else if (value ==
cb_high) {
2549 if (cb_flag_apostrophe) {
2606 output (
"*(cob_u8_ptr)(");
2612 buffchar = l->
data[0];
2613 for (lsize = 0; lsize < l->
size; lsize++) {
2614 if (l->
data[lsize] != buffchar) {
2618 if (lsize == l->
size) {
2622 output (
", %u, %d);\n", (
unsigned int)buffchar,
2624 if ((
int)l->
size < (
int)size) {
2628 output (
" + %d, ' ', %d);\n",
2629 (
int)lsize, (
int)(size - lsize));
2643 if ((
int)l->
size >= (
int)size) {
2650 buffchar = *(
litbuff + size - 1);
2652 for (i = size - 1; i >= 0; i--, n++) {
2653 if (*(
litbuff + i) != buffchar) {
2661 output (
", %u, %d);\n", (
unsigned int)buffchar, size);
2673 for (; size > 509; size -= 509, inci += 509) {
2680 output (
" + %u, ", inci);
2692 output (
" + %u, ", inci);
2695 output (
", %d);\n", size);
2701 output (
" + %d, %u, %d);\n",
2702 offset, (
unsigned int)buffchar, n);
2765 ff = cb_code_field (x);
2777 if (last_char != -1) {
2838 f = cb_code_field (p->
var);
2913 p = cb_code_field (table);
2917 "output_search",
"table");
2961 if (var && var != idx) {
2976 p = cb_code_field (table);
3005 output (
" = (head + tail) / 2;\n");
3061 output (
"cob_get_int (");
3077 if (uval > UINT_MAX) {
3107 if (val > INT_MAX) {
3135 f = cb_code_field (x);
3248 output (
"*(long double *)(");
3253 output (
"*(cob_u32_t *)(");
3259 output (
"*(cob_u64_t *)(");
3265 output (
"*(cob_fp_128 *)(");
3306 output_line (
"cob_field\tcontent_fb_%u = { %u, content_%u.data, &%s%d };",
3320 const char *convention;
3325 size_t gen_exit_program;
3326 size_t dynamic_link;
3334 gen_exit_program = 0;
3343 convention =
"_std";
3355 for (psyst = system_tab; psyst->
syst_name; psyst++) {
3356 if (!strcmp((
const char *)lp->
data,
3365 psyst = &system_tab[n];
3377 if (!strcmp((
const char *)lp->
data, ctl->
text)) {
3383 if (!strcmp((
const char *)lp->
data, ctl->
text)) {
3384 gen_exit_program = 1;
3391 #ifdef COB_NON_ALIGNED
3392 if (dynamic_link && retptr) {
3442 output (
"\tunsigned char data[");
3477 output (
"content_%u.dataint = ", n);
3481 output (
"content_%u.dataull = ", n);
3485 output (
"content_%u.datall = ", n);
3493 output (
"content_%u.dataint = ", n);
3513 output (
"content_%u.dataint = ", n);
3517 output (
"content_%u.dataull = ", n);
3521 output (
"content_%u.datall = ", n);
3531 output (
"content_%u.dataint = ", n);
3536 output (
"memcpy (content_%u.data, ", n);
3555 output (
"cob_procedure_params[%u] = ", n);
3560 output (
"&content_fb_%u", n + 1);
3595 output_line (
"memset (&(cob_procedure_params[%u]), 0, %u);",
3601 output (
"cob_glob_ptr->cob_call_params = %u;\n", n);
3611 output (
"cob_unifunc.funcvoid = ");
3616 output (
"cob_unifunc.funcnull");
3617 }
else if (retptr) {
3618 #ifdef COB_NON_ALIGNED
3623 output (
" = cob_unifunc.funcptr");
3626 output (
"(void)cob_unifunc.funcint");
3629 output (
" = cob_unifunc.funcint");
3632 }
else if (!dynamic_link) {
3636 #ifdef COB_NON_ALIGNED
3650 output (
"%s", system_call);
3655 for (; nlp; nlp = nlp->
next) {
3661 output (
"%s_%d__", callp,
3675 for (; nlp; nlp = nlp->
next) {
3680 output (
"if (unlikely(call_%s.funcvoid == NULL || cob_glob_ptr->cob_physical_cancel)) {\n", callp);
3683 output (
" call_%s.funcint = %s_%d__;\n",
3687 output (
" call_%s.funcvoid = ", callp);
3688 output (
"cob_resolve_cobol (");
3690 (
int)strlen (s), 0);
3698 output (
"cob_unifunc.funcvoid = cob_call_field (");
3702 output (
", cob_nest_tab, %d, %d);\n",
3703 !p->
stmt1, cb_fold_call);
3705 output (
", NULL, %d, %d);\n",
3706 !p->
stmt1, cb_fold_call);
3711 output_line (
"if (unlikely(call_%s.funcvoid == NULL))", callp);
3713 output_line (
"if (unlikely(cob_unifunc.funcvoid == NULL))");
3726 output (
"call_%s.funcnull%s", callp, convention);
3728 output (
"cob_unifunc.funcnull%s", convention);
3730 }
else if (retptr) {
3731 #ifdef COB_NON_ALIGNED
3737 output (
" = call_%s.funcptr%s", callp, convention);
3739 output (
" = cob_unifunc.funcptr%s", convention);
3749 output (
"call_%s.funcint%s", callp, convention);
3751 output (
"cob_unifunc.funcint%s", convention);
3764 output (
"content_%u.data", n);
3778 output (
"content_%u.data", n);
3802 }
else if (!retptr) {
3805 #ifdef COB_NON_ALIGNED
3814 if (gen_exit_program) {
3816 output_line (
"if (unlikely(module->flag_exit_program)) {");
3825 if (dynamic_link && p->
stmt1) {
3869 for (; nlp; nlp = nlp->
next) {
3876 output (
"(void)%s_%d_ (-1", callp,
3885 (
int)strlen (s), 0);
3891 output (
"cob_cancel_field (");
3895 output (
", cob_nest_tab");
3911 output_line (
"/* DEBUGGING Callback PERFORM %s */",
3912 (
const char *)lb->
name);
3913 }
else if (lb == le) {
3917 (
const char *)le->
name);
3924 for (; p; p = p->
next) {
3942 for (; p; p = p->
next) {
3959 if (cb_flag_stack_check) {
3960 output_line (
"if (unlikely(frame_ptr == frame_overflow))");
3961 output_line (
" cob_fatal_error (COB_FERROR_STACK);");
3964 if (!cb_flag_computed_goto) {
3968 if (label_cache ==
NULL) {
3978 output_line (
"frame_ptr->return_address_ptr = &&%s%d;",
3990 for (; p; p = p->
next) {
4006 for (; p; p = p->
next) {
4021 output_line (
"/* Implicit GLOBAL DECLARATIVE return */");
4026 output_line (
" cob_free (cob_procedure_params);");
4035 output_line (
"/* Implicit DECLARATIVE return */");
4037 output_line (
"/* Implicit Default Error Handler return */");
4044 (
"for (temp_index = frame_ptr; temp_index->perform_through; temp_index--) {");
4045 output_line (
" if (temp_index->perform_through == %d) {", l->
id);
4047 if (!cb_flag_computed_goto) {
4050 output_line (
" goto *frame_ptr->return_address_ptr;");
4055 output_line (
"if (frame_ptr->perform_through == %d)", l->
id);
4056 if (!cb_flag_computed_goto) {
4059 output_line (
" goto *frame_ptr->return_address_ptr;");
4066 output_line (
"cob_fatal_error (COB_FERROR_GLOBAL);");
4079 if (p->
name[0] ==
'$') {
4082 cb_code_field (z)->flag_field_debug) {
4085 (
const char *)cb_code_field (z)->
name,
NULL));
4089 cb_code_field (z)->debug_section);
4093 cb_code_field (z)->flag_field_debug) {
4096 (
const char *)cb_code_field (z)->
name,
NULL));
4100 cb_code_field (z)->debug_section);
4104 for (i = 0; i < p->
argc; i++) {
4110 cb_code_field (z)->flag_field_debug) {
4113 (
const char *)cb_code_field (z)->
name,
NULL));
4117 cb_code_field (z)->debug_section);
4124 cb_code_field (z)->flag_field_debug) {
4127 (
const char *)cb_code_field (z)->
name,
NULL));
4131 cb_code_field (z)->debug_section);
4172 cb_code_field (x)->flag_field_debug) {
4174 (
const char *)cb_code_field (x)->name,
NULL));
4178 cb_code_field (x)->debug_section);
4333 "USE PROCEDURE",
NULL));
4337 if (!strcmp (pfile->
name, fl->
name)) {
4345 if (!strcmp (pfile->
name, fl->
name)) {
4385 for (; p; p = p->
next) {
4441 if (cb_flag_implicit_init || current_prog->
nested_level ||
4491 output_line (
"if (unlikely(cob_glob_ptr->cob_exception_code != 0))");
4494 if ((code & 0x00ff) == 0) {
4495 output_line (
"if ((cob_glob_ptr->cob_exception_code & 0xff00) == 0x%04x)",
4498 output_line (
"if (cob_glob_ptr->cob_exception_code == 0x%04x)", code);
4548 if (
CB_TREE (lp)->source_file) {
4549 output_line (
"cob_trace_section (%s%d, %s%d, %d);",
4556 output_line (
"cob_trace_section (%s%d, NULL, %d);",
4567 output (
"cob_set_location (%s%d, %d, ",
4604 output_line (
"/* Implicit NEXT SENTENCE label */");
4615 output (
"Section %-24s", (
const char *)lp->
name);
4624 output (
"Paragraph %-24s", (
const char *)lp->
name);
4668 #ifdef COB_NON_ALIGNED
4701 if (cb_flag_source_location) {
4721 output_line (
"cob_glob_ptr->cob_exception_code = 0;");
4741 output_line (
"save_exception_code = cob_glob_ptr->cob_exception_code;");
4747 output_line (
"cob_glob_ptr->cob_exception_code = save_exception_code;");
4758 if ((code & 0x00ff) == 0) {
4759 output_line (
"if (unlikely((cob_glob_ptr->cob_exception_code & 0xff00) == 0x%04x))",
4762 output_line (
"if (unlikely(cob_glob_ptr->cob_exception_code == 0x%04x))", code);
4773 output_line (
"if (!cob_glob_ptr->cob_exception_code)");
4810 if (cb_flag_trace) {
4844 #ifdef COB_NON_ALIGNED
4856 output (
"temp_ptr = 0;\n");
4866 output (
"cob_call_field (");
4870 output (
", cob_nest_tab, 0, %d)",
4873 output (
", NULL, 0, %d)",
4885 output (
"memcpy(&temp_ptr, ");
4887 output (
", sizeof(temp_ptr));\n");
4901 output (
" = temp_ptr;\n");
4906 output (
", &temp_ptr, sizeof(temp_ptr));\n");
5013 if (cb_flag_extra_brace) {
5019 if (cb_flag_extra_brace) {
5042 size = cb_code_field (
CB_DEBUG(x)->target)->size;
5059 code = (int)(size -
CB_DEBUG(x)->size);
5060 output (
" + %d, ' ', %d);\n",
5070 output (
", %d);\n", (
int)size);
5080 code = (int)(size -
CB_DEBUG(x)->size);
5081 output (
" + %d, ' ', %d);\n",
5132 output_local (
"static unsigned char\t%s%s_status[4];\n",
5168 output_line (
"%s%s = cob_external_addr (\"%s\", sizeof(cob_file));",
5170 output_line (
"if (cob_glob_ptr->cob_initial_external)");
5192 output_line (
"%s%s = cob_cache_malloc (sizeof (cob_file_key) * %d);",
5205 cb_code_field (f->
key)->offset);
5220 f->
cname, nkeys, cb_code_field (l->
key)->offset);
5228 output_line (
"%s%s->file_status = cob_external_addr (\"%s%s_status\", 4);",
5272 output (
"lingptr->linage = ");
5276 output (
"lingptr->linage_ctr = ");
5281 output (
"lingptr->latfoot = ");
5289 output (
"lingptr->lattop = ");
5297 output (
"lingptr->latbot = ");
5384 output (
"cob_set_screen (&s_%d, ", p->
id);
5392 if (previous && previous->
level != 1) {
5496 return cb_flag_apostrophe ?
'\'' :
'"';
5520 output_local (
"static const unsigned char %s%s[256] = {\n",
5522 for (i = 0; i < 256; i++) {
5534 output_local (
"static cob_field %s%s = { 256, (cob_u8_ptr)%s%s, &%s%d };\n",
5548 unsigned char *data;
5563 memset (vals, 0,
sizeof(vals));
5569 for (n = lower; n <= upper; ++n) {
5580 if (cb_flag_apostrophe) {
5587 }
else if (x ==
cb_low) {
5594 for (i = 0; i < size; i++) {
5600 for (i = 0; i < 256; ++i) {
5621 for (p = f; p; p = p->
sister) {
5654 output_line (
"switch (cob_glob_ptr->cob_error_file->last_open_mode)");
5677 for (n = 0; n < parmnum; n++) {
5689 output_line (
"if (!(cob_glob_ptr->cob_error_file->flag_select_features & COB_SELECT_FILE_STATUS)) {");
5690 output_line (
"\tcob_fatal_error (COB_FERROR_FILE);");
5700 output_line (
"cob_fatal_error (COB_FERROR_CODEGEN);");
5708 output (
"/* Next pointer, Parameter list pointer, Module name, */\n");
5709 output (
"/* Module formatted date, Module source, */\n");
5710 output (
"/* Module entry, Module cancel, */\n");
5711 output (
"/* Collating, CRT status, CURSOR, */\n");
5712 output (
"/* Module reference count, Module path, Module active, */\n");
5713 output (
"/* Module date, Module time, */\n");
5714 output (
"/* Module type, Number of USING parameters, Return type */\n");
5715 output (
"/* Current parameter count */\n");
5716 output (
"/* Display sign, Decimal point, Currency symbol, */\n");
5717 output (
"/* Numeric separator, File name mapping, Binary truncate, */\n");
5718 output (
"/* Alternate numeric display, Host sign, No physical cancel */\n");
5719 output (
"/* Flag main program, Fold call, Exit after CALL */\n\n");
5723 output_line (
"/* Initialize module structure */");
5725 output_line (
"module->module_formatted_date = COB_MODULE_FORMATTED_DATE;");
5726 output_line (
"module->module_source = COB_SOURCE_FILE;");
5728 output_line (
"module->module_entry.funcptr = (void *(*)())%s;",
5731 output_line (
"module->module_cancel.funcptr = NULL;");
5733 output_line (
"module->module_cancel.funcptr = (void *(*)())%s_;",
5737 output_line (
"module->module_entry.funcvoid = NULL;");
5738 output_line (
"module->module_cancel.funcvoid = NULL;");
5743 output (
"module->collating_sequence = ");
5747 output_line (
"module->collating_sequence = NULL;");
5751 output (
"module->crt_status = ");
5759 output (
"module->cursor_pos = ");
5766 output_line (
"module->module_ref_count = &cob_reference_count;");
5770 output_line (
"module->module_path = &cob_module_path;");
5772 output_line (
"module->module_date = COB_MODULE_DATE;");
5773 output_line (
"module->module_time = COB_MODULE_TIME;");
5777 output_line (
"module->ebcdic_sign = %d;", cb_ebcdic_sign);
5781 output_line (
"module->flag_filename_mapping = %d;", cb_filename_mapping);
5782 output_line (
"module->flag_binary_truncate = %d;", cb_binary_truncate);
5783 output_line (
"module->flag_pretty_display = %d;", cb_pretty_display);
5784 output_line (
"module->flag_host_sign = %d;", cb_host_sign);
5787 output_line (
"module->flag_fold_call = %d;", cb_fold_call);
5816 output (
"static cob_field *\n%s_ (const int entry, cob_field **cob_parms",
5820 output (
"static cob_field *\n%s_ (const int entry",
5824 output (
"static int\n%s_ (const int entry",
5827 output (
"static int\n%s_%d_ (const int entry",
5836 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
5837 if (l == parameter_list) {
5840 if (parmnum && !(parmnum % 2)) {
5843 output (
"cob_u8_t *%s%d",
5867 output_local (
"/* Module initialization indicator */\n");
5868 output_local (
"static unsigned int\tinitialized = 0;\n\n");
5876 output_local (
"static cob_module\t*module = &module_data;\n\n");
5882 output_local (
"static cob_module\t*module = NULL;\n\n");
5962 output_local(
"\n/* BASED WORKING-STORAGE SECTION */\n");
5964 output_local (
"static unsigned char\t*%s%d = NULL; /* %s */\n",
5983 output_local (
"static unsigned char\t*%s%d = NULL; /* %s */\n",
5995 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
6001 output_local (
"unsigned char\t*%s%d = NULL; /* %s */\n",
6016 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
6017 if (f == cb_code_field (
CB_VALUE (l))) {
6024 output_local (
"\n/* LINKAGE SECTION (Items not referenced by USING clause) */\n");
6029 output_local (
"unsigned char\t*%s%d = NULL; /* %s */\n",
6048 for (l = parameter_list; l; l =
CB_CHAIN (l), i++) {
6063 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
6093 output_line (
"/* Allocate cob_module structure */");
6094 output_line (
"module = cob_malloc (sizeof(cob_module));");
6100 output_line (
"/* Check initialized, check module allocated, */");
6102 output_line (
"/* push module stack, save call parameter count */");
6104 output_line (
"cob_module_enter (module, &cob_glob_ptr, %d);",
6105 cb_flag_implicit_init);
6107 output_line (
"cob_module_enter (&module, &cob_glob_ptr, %d);",
6108 cb_flag_implicit_init);
6116 output_line (
"if (unlikely(module->module_active)) {");
6118 output_line (
"\tcob_fatal_error (COB_FERROR_RECURSIVE);");
6127 output_line (
"/* Set address of module parameter list */");
6134 output_line (
"cob_procedure_params = cob_malloc (%dU * sizeof(void *));",
6137 output_line (
"module->cob_procedure_params = cob_procedure_params;");
6143 for (l = parameter_list; l; l =
CB_CHAIN (l), parmnum++) {
6163 output_line (
"frame_stack = cob_malloc (%dU * sizeof(struct cob_frame));",
6166 if (cb_flag_stack_check) {
6167 output_line (
"frame_overflow = frame_ptr + %d - 1;",
6173 if (cb_flag_stack_check) {
6174 output_line (
"frame_overflow = frame_ptr + %d - 1;",
6222 output_line (
"if (unlikely(initialized == 0)) {");
6226 output_line (
"\tcob_fatal_error (COB_FERROR_CHAINING);");
6256 output_line (
"\tcob_local_ptr = cob_local_save;");
6258 for (l2 = parameter_list; l2; l2 =
CB_CHAIN (l2), i++) {
6274 output_line (
"if (unlikely(module->module_active)) {");
6275 output_line (
"\tcob_fatal_error (COB_FERROR_RECURSIVE);");
6285 output_line (
"/* Increment module reference count */");
6292 output_line (
"/* Initialize INITIAL program WORKING-STORAGE */");
6303 output_line (
"/* Set NUMBER-OF-CALL-PARAMETERS */");
6306 output (
" = cob_glob_ptr->cob_call_params;\n");
6312 output_line (
"module->module_num_params = cob_glob_ptr->cob_call_params;");
6319 output_line (
"/* Initialize ANY LENGTH parameters */");
6321 for (l = parameter_list; l; l =
CB_CHAIN (l), i++) {
6330 output_line (
"if (cob_glob_ptr->cob_call_params > %d && %s%d%s)",
6331 i,
"module->next->cob_procedure_params[",
6337 "module->next->cob_procedure_params[",
6343 "module->next->cob_procedure_params[",
6372 output (
" = cob_malloc (");
6379 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
6391 output_line (
"cob_set_locale (NULL, COB_LC_CLASS);");
6394 output (
"cob_set_locale (");
6396 output (
", COB_LC_CTYPE);");
6413 output_line (
"/* This should never be reached */");
6414 output_line (
"cob_fatal_error (COB_FERROR_MODULE);");
6440 output_line (
"/* Decrement module active count */");
6448 output_line (
"/* Decrement module reference count */");
6456 output_line (
"/* Deallocate dynamic FUNCTION-ID fields */");
6460 output_line (
" cob_free (cob_dyn_%u->data);", inc);
6505 output_line (
"/* Free frame stack / call parameters */");
6511 if (cb_flag_trace) {
6514 output_line (
"cob_trace_section (%s%d, NULL, 0);",
6541 for (l = parameter_list; l; l =
CB_CHAIN (l)) {
6570 if (!cb_flag_computed_goto) {
6575 output_line (
" switch (frame_ptr->return_address_num) {");
6576 for (pl = label_cache; pl; pl = pl->
next) {
6583 output_line (
" cob_fatal_error (COB_FERROR_CODEGEN);");
6630 output_line (
"cob_check_version (COB_SOURCE_FILE, COB_PACKAGE_VERSION, COB_PATCH_LEVEL);");
6635 for (clp = func_call_cache; clp; clp = clp->
next) {
6636 output_line (
"func_%s.funcvoid = cob_resolve_func (\"%s\");",
6641 output_line (
"cob_module_path = cob_glob_ptr->cob_main_argv0;");
6653 output_line (
"if ((s = getenv (\"COB_SET_DEBUG\")) && (*s == 'Y' || *s == 'y' || *s == '1'))");
6662 if (!cb_flag_implicit_init) {
6676 if (*p ==
'-' || *p ==
' ') {
6680 output_line (
"%s%d = cob_external_addr (\"%s\", %d);",
6696 output (
" = cob_external_addr (\"%s\", %d);\n",
6730 goto prog_cancel_end;
6741 output_line (
"\tcob_fatal_error (COB_FERROR_CANCEL);");
6752 for (; next_prog; next_prog = next_prog->
next_program) {
6768 output_line (
"cob_close (%s%s, NULL, COB_CLOSE_NORMAL, 1);",
6772 output_line (
"cob_cache_free (%s%s->linorkeyptr);",
6821 for (clp = call_cache; clp; clp = clp->
next) {
6824 for (clp = func_call_cache; clp; clp = clp->
next) {
6829 if (cb_sticky_linkage) {
6867 cb_tree parameter_list,
const int gencode)
6869 const char *entry_name;
6879 const char *s_prefix;
6893 output (
"/* ENTRY '%s' */\n\n", entry_name);
6896 #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__clang__)
6898 output (
"__declspec(dllexport) ");
6904 output (
"cob_field *\n");
6906 output (
"cob_field\t\t*");
6908 output (
"%s (", entry_name);
6910 output (
"cob_field **, const int");
6912 output (
"cob_field **cob_fret, const int cob_pam");
6918 for (l = using_list; l; l =
CB_CHAIN (l), ++n, ++parmnum) {
6922 output (
"cob_field *f%u", n);
6937 output (
" struct cob_func_loc\t*floc;\n\n");
6938 output (
" /* Save environment */\n");
6939 output (
" floc = cob_save_func (cob_fret, cob_pam, %u",
6944 output (
" **cob_fret = *floc->ret_fld;\n");
6945 output (
" cob_restore_func (floc);\n");
6946 output (
" return *cob_fret;\n}\n\n");
6949 output (
" switch (cob_pam) {\n");
6950 for (n = 0; n <= parmnum; ++n) {
6956 output (
" case %u:\n", n);
6960 for (n2 = 0; n2 < n; ++
n2) {
6961 output (
" if (f%u) {\n", n2);
6962 output (
" floc->func_params[%u] = f%u;\n",
6964 output (
" floc->data[%u] = f%u->data;\n",
6971 for (n = 0; n < parmnum; ++n) {
6980 for (n = 0; n < parmnum; ++n) {
6981 output (
"floc->data[%u]", n);
6982 if (n != parmnum - 1) {
6988 output (
" **cob_fret = *floc->ret_fld;\n");
6989 output (
" /* Restore environment */\n");
6990 output (
" cob_restore_func (floc);\n");
6991 output (
" return *cob_fret;\n}\n\n");
7005 output (
"static int\t\t");
7030 output (
"%s (", entry_name);
7034 parameter_list =
NULL;
7036 if (!gencode && !using_list) {
7041 memset (sticky_ids, 0,
sizeof(sticky_ids));
7042 memset (sticky_nonp, 0,
sizeof(sticky_ids));
7045 for (l = using_list; l; l =
CB_CHAIN (l), ++n) {
7056 if (cb_sticky_linkage) {
7059 s_type[n] =
"(cob_u8_ptr)&";
7069 if (cb_sticky_linkage) {
7072 s_type[n] =
"(cob_u8_ptr)&";
7077 output (
"long double %s%d",
7082 if (cb_sticky_linkage) {
7085 s_type[n] =
"(cob_u8_ptr)&";
7090 output (
"cob_u32_t %s%d",
7095 if (cb_sticky_linkage) {
7098 s_type[n] =
"(cob_u8_ptr)&";
7104 output (
"cob_u64_t %s%d",
7109 if (cb_sticky_linkage) {
7112 s_type[n] =
"(cob_u8_ptr)&";
7118 output (
"cob_fp_128 %s%d",
7123 if (cb_sticky_linkage) {
7126 s_type[n] =
"(cob_u8_ptr)&";
7140 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7147 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7154 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7169 if (cb_sticky_linkage) {
7172 s_type[n] =
"(cob_u8_ptr)&";
7180 output (
"cob_u8_t *%s%d",
7211 if (cb_sticky_linkage && using_list) {
7212 for (l = using_list; l; l =
CB_CHAIN (l), parmnum++) {
7214 sticky_ids[parmnum] = f->
id;
7244 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7251 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7258 if (
CB_SIZES(l) & CB_SIZE_UNSIGNED) {
7269 output (
" static %s\tcob_parm_l_%d = %s;\n",
7271 sticky_nonp[parmnum] = 1;
7285 for (l2 = using_list; l2; l2 =
CB_CHAIN (l2)) {
7286 f2 = cb_code_field (
CB_VALUE (l2));
7290 output (
" unsigned char\t\t*ptr_%d;\n", f2->
id);
7295 if (cb_sticky_linkage && using_list) {
7297 output (
" switch (cob_get_global_ptr ()->cob_call_params) {\n");
7298 for (l = using_list; l; l =
CB_CHAIN (l), parmnum++) {
7299 output (
" case %u:\n", parmnum);
7300 for (n = 0; n < parmnum; ++n) {
7301 if (sticky_nonp[n]) {
7302 output (
"\tcob_parm_l_%d = %s%d;\n",
7305 output (
"\tcob_parm_%d = (cob_u8_ptr)&cob_parm_l_%d;\n",
7309 output (
"\tcob_parm_%d = %s%d;\n",
7317 for (n = 0; n < parmnum; ++n) {
7318 if (sticky_nonp[n]) {
7319 output (
"\tcob_parm_l_%d = %s%d;\n",
7322 output (
"\tcob_parm_%d = (cob_u8_ptr)&cob_parm_l_%d;\n",
7326 output (
"\tcob_parm_%d = %s%d;\n",
7335 if (cb_sticky_linkage) {
7336 s_prefix =
"cob_parm_";
7341 for (l2 = using_list; l2; l2 =
CB_CHAIN (l2)) {
7342 f2 = cb_code_field (
CB_VALUE (l2));
7346 output (
" ptr_%d = %s%d;\n",
7347 f2->
id, s_prefix, f2->
id);
7367 if (!using_list && !parameter_list) {
7373 for (l1 = parameter_list; l1; l1 =
CB_CHAIN (l1)) {
7374 f1 = cb_code_field (
CB_VALUE (l1));
7376 for (l2 = using_list; l2; l2 =
CB_CHAIN (l2), ++n) {
7377 f2 = cb_code_field (
CB_VALUE (l2));
7378 if (strcasecmp (f1->
name, f2->
name) == 0) {
7383 output (
", (cob_u8_ptr)&ptr_%d", f2->
id);
7390 s_type[n], s_prefix, f2->
id);
7399 if (cb_sticky_linkage) {
7429 fprintf (fp,
"/* Generated by cobc %s.%d */\n",
7432 fprintf (fp,
"/* Generated at %s */\n", locbuff);
7434 fprintf (fp,
"/* GnuCOBOL package date %s */\n",
COB_TAR_DATE);
7435 fprintf (fp,
"/* Compile command ");
7439 fprintf (fp,
"*/\n\n");
7441 fprintf (fp,
"/* Program local variables for '%s' */\n\n",
7465 const char *prevprog;
7477 current_prog = prog;
7494 last_section =
NULL;
7496 func_call_cache =
NULL;
7498 local_base_cache =
NULL;
7499 local_field_cache =
NULL;
7509 save_sticky = cb_sticky_linkage;
7526 globext_cache =
NULL;
7527 literal_cache =
NULL;
7529 string_cache =
NULL;
7535 sectime = time (
NULL);
7536 loctime = localtime (§ime);
7538 if (loctime->tm_sec >= 60) {
7539 loctime->tm_sec = 59;
7543 "%b %d %Y %H:%M:%S", loctime);
7555 #ifdef _XOPEN_SOURCE_EXTENDED
7556 output (
"#ifndef\t_XOPEN_SOURCE_EXTENDED\n");
7557 output (
"#define\t_XOPEN_SOURCE_EXTENDED 1\n");
7561 output (
"#include <stdio.h>\n");
7562 output (
"#include <stdlib.h>\n");
7563 output (
"#include <stddef.h>\n");
7564 output (
"#include <string.h>\n");
7565 output (
"#include <math.h>\n");
7566 #ifdef WORDS_BIGENDIAN
7567 output (
"#define WORDS_BIGENDIAN 1\n");
7569 #ifdef COB_KEYWORD_INLINE
7570 output (
"#define COB_KEYWORD_INLINE %s\n",
7573 output (
"#include <libcob.h>\n\n");
7575 output (
"#define COB_SOURCE_FILE\t\t\"%s\"\n",
7577 output (
"#define COB_PACKAGE_VERSION\t\t\"%s\"\n",
7579 output (
"#define COB_PATCH_LEVEL\t\t%d\n",
7582 output (
"#define COB_MODULE_FORMATTED_DATE\t\"%s\"\n",
7585 i = ((loctime->tm_year + 1900) * 10000) +
7586 ((loctime->tm_mon + 1) * 100) +
7588 output (
"#define COB_MODULE_DATE\t\t%d\n", i);
7589 i = (loctime->tm_hour * 10000) +
7590 (loctime->tm_min * 100) +
7592 output (
"#define COB_MODULE_TIME\t\t%d\n", i);
7594 output (
"#define COB_MODULE_DATE\t\t0\n");
7595 output (
"#define COB_MODULE_TIME\t\t0\n");
7599 output (
"/* Global variables */\n");
7602 output (
"/* Function prototypes */\n\n");
7608 if (strcasecmp (cb_code_field (
CB_VALUE (l1))->name,
7609 cb_code_field (
CB_VALUE (l2))->name) == 0) {
7620 output (
"static int\t\t%s ();\n",
7623 output (
"int\t\t\t%s ();\n",
7634 output (
"static cob_field\t*%s_ (const int, cob_field **",
7636 output (
"static cob_field\t*%s_ (const int",
7641 output (
"static int\t\t%s_ (const int",
7644 output (
"static int\t\t%s_%d_ (const int",
7645 cp->program_id, cp->toplev_count);
7650 if (!cp->flag_chained) {
7652 for (l = cp->parameter_list; l; l = CB_CHAIN (l)) {
7653 output (
", cob_u8_t *");
7654 if (cb_sticky_linkage) {
7655 output_storage (
"static cob_u8_t\t\t\t*cob_parm_%d = NULL;\n",
7656 cb_code_field (CB_VALUE (l))->id);
7661 if (cb_flag_stack_check) {
7662 output (
") COB_NOINLINE;\n");
7675 output (
"/* Class names */\n");
7688 output (
"/* Functions */\n\n");
7704 output (
"/* End functions */\n\n");
7723 for (clp = call_cache; clp; clp = clp->
next) {
7727 for (clp = func_call_cache; clp; clp = clp->
next) {
7737 output_local (
"static struct cob_call_struct\tcob_nest_tab[] = {\n");
7739 for (; nlp; nlp = nlp->
next) {
7746 output_local (
"\t{ \"%s\", { (void *(*)())%s_%d__ }, { NULL } },\n",
7751 output_local (
"\t{ \"%s\", { (void *(*)())%s_%d__ }, { (void *(*)())%s_%d_ } },\n",
7796 output_local (
"static int\tcob_debugging_mode = 0;\n");
7806 output_local (
"unsigned char\t\t*cob_local_ptr = NULL;\n");
7808 output_local (
"static unsigned char\t*cob_local_save = NULL;\n");
7815 output_local (
"cob_field\t\t**cob_procedure_params;\n");
7822 output_local (
"cob_field\t\t*cob_procedure_params[%d];\n", i);
7830 if (cb_flag_stack_check) {
7837 output_local (
"struct cob_frame\tframe_stack[%d];\n\n",
7842 output_local (
"\n/* Dynamic field FUNCTION-ID pointers */\n");
7849 if (local_base_cache) {
7853 for (blp = local_base_cache; blp; blp = blp->
next) {
7870 if (local_field_cache) {
7876 for (k = local_field_cache; k; k = k->
next) {
7889 output (
";\t/* Implicit FILLER */\n");
7915 output_storage (
"static unsigned int\t\tcob_reference_count = 0;\n");
7919 output_storage (
"static const char\t\t*cob_module_path = NULL;\n");
7921 if (globext_cache) {
7924 for (blp = globext_cache; blp; blp = blp->
next) {
7935 for (blp = base_cache; blp; blp = blp->
next) {
7958 for (j = attr_cache; j; j = j->
next) {
7966 for (s = j->
pic; *s; s += 5) {
7968 s[0], s[1], s[2], s[3], s[4]);
7977 output_storage (
"\nstatic const cob_field_attr cob_all_attr = ");
7988 for (k = field_cache; k; k = k->
next) {
8006 output (
";\t/* Implicit FILLER */\n");
8018 for (m = literal_cache; m; m = m->
next) {
8020 output (
"static const cob_fld_union %s%d\t= ",
8028 (lp->
sign < 0) ?
"-" : (lp->
sign > 0) ?
"+" :
"");
8036 output (
"static const cob_field %s%d\t= ",
8045 output (
"static cob_field cob_all_low\t= ");
8047 output (
"(cob_u8_ptr)\"\\0\", ");
8048 output (
"&cob_all_attr};\n");
8051 output (
"static cob_field cob_all_high\t= ");
8053 output (
"(cob_u8_ptr)\"\\xff\", ");
8054 output (
"&cob_all_attr};\n");
8057 output (
"static cob_field cob_all_quote\t= ");
8059 if (cb_flag_apostrophe) {
8060 output (
"(cob_u8_ptr)\"'\", ");
8062 output (
"(cob_u8_ptr)\"\\\"\", ");
8064 output (
"&cob_all_attr};\n");
8067 output (
"static cob_field cob_all_space\t= ");
8069 output (
"(cob_u8_ptr)\" \", ");
8070 output (
"&cob_all_attr};\n");
8073 output (
"static cob_field cob_all_zero\t= ");
8075 output (
"(cob_u8_ptr)\"0\", ");
8076 output (
"&cob_all_attr};\n");
8084 output_storage (
"\n/* ASCII to EBCDIC translate table (restricted) */\n");
8085 output (
"static const unsigned char\tcob_a2e[256] = {\n");
8087 output (
"\t0x00, 0x01, 0x02, 0x03, 0x1D, 0x19, 0x1A, 0x1B,\n");
8088 output (
"\t0x0F, 0x04, 0x16, 0x06, 0x07, 0x08, 0x09, 0x0A,\n");
8089 output (
"\t0x0B, 0x0C, 0x0D, 0x0E, 0x1E, 0x1F, 0x1C, 0x17,\n");
8090 output (
"\t0x10, 0x11, 0x20, 0x18, 0x12, 0x13, 0x14, 0x15,\n");
8091 output (
"\t0x21, 0x27, 0x3A, 0x36, 0x28, 0x30, 0x26, 0x38,\n");
8092 output (
"\t0x24, 0x2A, 0x29, 0x25, 0x2F, 0x2C, 0x22, 0x2D,\n");
8093 output (
"\t0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,\n");
8094 output (
"\t0x7B, 0x7C, 0x35, 0x2B, 0x23, 0x39, 0x32, 0x33,\n");
8095 output (
"\t0x37, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D,\n");
8096 output (
"\t0x5E, 0x5F, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,\n");
8097 output (
"\t0x67, 0x68, 0x69, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,\n");
8098 output (
"\t0x70, 0x71, 0x72, 0x7D, 0x6A, 0x7E, 0x7F, 0x31,\n");
8099 output (
"\t0x34, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41,\n");
8100 output (
"\t0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,\n");
8101 output (
"\t0x4A, 0x4B, 0x4C, 0x4E, 0x4F, 0x50, 0x51, 0x52,\n");
8102 output (
"\t0x53, 0x54, 0x55, 0x56, 0x2E, 0x60, 0x4D, 0x05,\n");
8103 output (
"\t0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,\n");
8104 output (
"\t0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,\n");
8105 output (
"\t0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,\n");
8106 output (
"\t0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,\n");
8107 output (
"\t0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,\n");
8108 output (
"\t0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,\n");
8109 output (
"\t0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,\n");
8110 output (
"\t0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,\n");
8111 output (
"\t0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,\n");
8112 output (
"\t0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,\n");
8113 output (
"\t0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,\n");
8114 output (
"\t0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,\n");
8115 output (
"\t0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,\n");
8116 output (
"\t0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,\n");
8117 output (
"\t0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,\n");
8118 output (
"\t0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF\n");
8124 output (
"static const unsigned char\tcob_ascii_ebcdic[256] = {\n");
8125 output (
"\t0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F,\n");
8126 output (
"\t0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,\n");
8127 output (
"\t0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26,\n");
8128 output (
"\t0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F,\n");
8129 output (
"\t0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D,\n");
8130 output (
"\t0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,\n");
8131 output (
"\t0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,\n");
8132 output (
"\t0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,\n");
8133 output (
"\t0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,\n");
8134 output (
"\t0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,\n");
8135 output (
"\t0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6,\n");
8136 output (
"\t0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,\n");
8137 output (
"\t0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,\n");
8138 output (
"\t0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,\n");
8139 output (
"\t0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,\n");
8140 output (
"\t0xA7, 0xA8, 0xA9, 0xC0, 0x6A, 0xD0, 0xA1, 0x07,\n");
8141 output (
"\t0x68, 0xDC, 0x51, 0x42, 0x43, 0x44, 0x47, 0x48,\n");
8142 output (
"\t0x52, 0x53, 0x54, 0x57, 0x56, 0x58, 0x63, 0x67,\n");
8143 output (
"\t0x71, 0x9C, 0x9E, 0xCB, 0xCC, 0xCD, 0xDB, 0xDD,\n");
8144 output (
"\t0xDF, 0xEC, 0xFC, 0xB0, 0xB1, 0xB2, 0x3E, 0xB4,\n");
8145 output (
"\t0x45, 0x55, 0xCE, 0xDE, 0x49, 0x69, 0x9A, 0x9B,\n");
8146 output (
"\t0xAB, 0x9F, 0xBA, 0xB8, 0xB7, 0xAA, 0x8A, 0x8B,\n");
8147 output (
"\t0xB6, 0xB5, 0x62, 0x4F, 0x64, 0x65, 0x66, 0x20,\n");
8148 output (
"\t0x21, 0x22, 0x70, 0x23, 0x72, 0x73, 0x74, 0xBE,\n");
8149 output (
"\t0x76, 0x77, 0x78, 0x80, 0x24, 0x15, 0x8C, 0x8D,\n");
8150 output (
"\t0x8E, 0x41, 0x06, 0x17, 0x28, 0x29, 0x9D, 0x2A,\n");
8151 output (
"\t0x2B, 0x2C, 0x09, 0x0A, 0xAC, 0x4A, 0xAE, 0xAF,\n");
8152 output (
"\t0x1B, 0x30, 0x31, 0xFA, 0x1A, 0x33, 0x34, 0x35,\n");
8153 output (
"\t0x36, 0x59, 0x08, 0x38, 0xBC, 0x39, 0xA0, 0xBF,\n");
8154 output (
"\t0xCA, 0x3A, 0xFE, 0x3B, 0x04, 0xCF, 0xDA, 0x14,\n");
8155 output (
"\t0xE1, 0x8F, 0x46, 0x75, 0xFD, 0xEB, 0xEE, 0xED,\n");
8156 output (
"\t0x90, 0xEF, 0xB3, 0xFB, 0xB9, 0xEA, 0xBB, 0xFF\n");
8161 (
"static cob_field f_ascii_ebcdic = { 256, (cob_u8_ptr)cob_ascii_ebcdic, &%s%d };\n",
8168 output (
"static const unsigned char\tcob_ebcdic_ascii[256] = {\n");
8169 output (
"\t0x00, 0x01, 0x02, 0x03, 0xEC, 0x09, 0xCA, 0x7F,\n");
8170 output (
"\t0xE2, 0xD2, 0xD3, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,\n");
8171 output (
"\t0x10, 0x11, 0x12, 0x13, 0xEF, 0xC5, 0x08, 0xCB,\n");
8172 output (
"\t0x18, 0x19, 0xDC, 0xD8, 0x1C, 0x1D, 0x1E, 0x1F,\n");
8173 output (
"\t0xB7, 0xB8, 0xB9, 0xBB, 0xC4, 0x0A, 0x17, 0x1B,\n");
8174 output (
"\t0xCC, 0xCD, 0xCF, 0xD0, 0xD1, 0x05, 0x06, 0x07,\n");
8175 output (
"\t0xD9, 0xDA, 0x16, 0xDD, 0xDE, 0xDF, 0xE0, 0x04,\n");
8176 output (
"\t0xE3, 0xE5, 0xE9, 0xEB, 0x14, 0x15, 0x9E, 0x1A,\n");
8177 output (
"\t0x20, 0xC9, 0x83, 0x84, 0x85, 0xA0, 0xF2, 0x86,\n");
8178 output (
"\t0x87, 0xA4, 0xD5, 0x2E, 0x3C, 0x28, 0x2B, 0xB3,\n");
8179 output (
"\t0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x8B,\n");
8180 output (
"\t0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E,\n");
8181 output (
"\t0x2D, 0x2F, 0xB2, 0x8E, 0xB4, 0xB5, 0xB6, 0x8F,\n");
8182 output (
"\t0x80, 0xA5, 0x7C, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,\n");
8183 output (
"\t0xBA, 0x90, 0xBC, 0xBD, 0xBE, 0xF3, 0xC0, 0xC1,\n");
8184 output (
"\t0xC2, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,\n");
8185 output (
"\t0xC3, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,\n");
8186 output (
"\t0x68, 0x69, 0xAE, 0xAF, 0xC6, 0xC7, 0xC8, 0xF1,\n");
8187 output (
"\t0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,\n");
8188 output (
"\t0x71, 0x72, 0xA6, 0xA7, 0x91, 0xCE, 0x92, 0xA9,\n");
8189 output (
"\t0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,\n");
8190 output (
"\t0x79, 0x7A, 0xAD, 0xA8, 0xD4, 0x5B, 0xD6, 0xD7,\n");
8191 output (
"\t0x9B, 0x9C, 0x9D, 0xFA, 0x9F, 0xB1, 0xB0, 0xAC,\n");
8192 output (
"\t0xAB, 0xFC, 0xAA, 0xFE, 0xE4, 0x5D, 0xBF, 0xE7,\n");
8193 output (
"\t0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,\n");
8194 output (
"\t0x48, 0x49, 0xE8, 0x93, 0x94, 0x95, 0xA2, 0xED,\n");
8195 output (
"\t0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,\n");
8196 output (
"\t0x51, 0x52, 0xEE, 0x96, 0x81, 0x97, 0xA3, 0x98,\n");
8197 output (
"\t0x5C, 0xF0, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,\n");
8198 output (
"\t0x59, 0x5A, 0xFD, 0xF5, 0x99, 0xF7, 0xF6, 0xF9,\n");
8199 output (
"\t0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,\n");
8200 output (
"\t0x38, 0x39, 0xDB, 0xFB, 0x9A, 0xF4, 0xEA, 0xFF\n");
8205 (
"static cob_field f_ebcdic_ascii = { 256, (cob_u8_ptr)cob_ebcdic_ascii, &%s%d };\n",
8212 output (
"static const unsigned char\tcob_native[256] = {\n");
8213 output (
"\t0, 1, 2, 3, 4, 5, 6, 7,\n");
8214 output (
"\t8, 9, 10, 11, 12, 13, 14, 15,\n");
8215 output (
"\t16, 17, 18, 19, 20, 21, 22, 23,\n");
8216 output (
"\t24, 25, 26, 27, 28, 29, 30, 31,\n");
8217 output (
"\t32, 33, 34, 35, 36, 37, 38, 39,\n");
8218 output (
"\t40, 41, 42, 43, 44, 45, 46, 47,\n");
8219 output (
"\t48, 49, 50, 51, 52, 53, 54, 55,\n");
8220 output (
"\t56, 57, 58, 59, 60, 61, 62, 63,\n");
8221 output (
"\t64, 65, 66, 67, 68, 69, 70, 71,\n");
8222 output (
"\t72, 73, 74, 75, 76, 77, 78, 79,\n");
8223 output (
"\t80, 81, 82, 83, 84, 85, 86, 87,\n");
8224 output (
"\t88, 89, 90, 91, 92, 93, 94, 95,\n");
8225 output (
"\t96, 97, 98, 99, 100, 101, 102, 103,\n");
8226 output (
"\t104, 105, 106, 107, 108, 109, 110, 111,\n");
8227 output (
"\t112, 113, 114, 115, 116, 117, 118, 119,\n");
8228 output (
"\t120, 121, 122, 123, 124, 125, 126, 127,\n");
8229 output (
"\t128, 129, 130, 131, 132, 133, 134, 135,\n");
8230 output (
"\t136, 137, 138, 139, 140, 141, 142, 143,\n");
8231 output (
"\t144, 145, 146, 147, 148, 149, 150, 151,\n");
8232 output (
"\t152, 153, 154, 155, 156, 157, 158, 159,\n");
8233 output (
"\t160, 161, 162, 163, 164, 165, 166, 167,\n");
8234 output (
"\t168, 169, 170, 171, 172, 173, 174, 175,\n");
8235 output (
"\t176, 177, 178, 179, 180, 181, 182, 183,\n");
8236 output (
"\t184, 185, 186, 187, 188, 189, 190, 191,\n");
8237 output (
"\t192, 193, 194, 195, 196, 197, 198, 199,\n");
8238 output (
"\t200, 201, 202, 203, 204, 205, 206, 207,\n");
8239 output (
"\t208, 209, 210, 211, 212, 213, 214, 215,\n");
8240 output (
"\t216, 217, 218, 219, 220, 221, 222, 223,\n");
8241 output (
"\t224, 225, 226, 227, 228, 229, 230, 231,\n");
8242 output (
"\t232, 233, 234, 235, 236, 237, 238, 239,\n");
8243 output (
"\t240, 241, 242, 243, 244, 245, 246, 247,\n");
8244 output (
"\t248, 249, 250, 251, 252, 253, 254, 255\n");
8249 (
"static cob_field f_native = { 256, (cob_u8_ptr)cob_native, &%s%d };\n",
8259 for (stp = string_cache; stp; stp = stp->
next) {
8260 output (
"static const char %s%d[]\t= \"%s\";\n",
static int field_cache_cmp(const void *mp1, const void *mp2)
unsigned int flag_justified
struct cb_label * handler_label
unsigned int flag_is_debug_sect
#define CB_NUMERIC_LITERAL_P(x)
struct cb_text_list * next
int cb_field_subordinate(const struct cb_field *pfld, const struct cb_field *f)
static struct cb_field * chk_field_variable_size(struct cb_field *f)
unsigned int flag_is_pointer
unsigned int flag_real_binary
static unsigned int needs_unifunc
#define CB_REFERENCE_P(x)
static void output_initialize_compound(struct cb_initialize *p, cb_tree x)
cob_u64_t cb_get_u_long_long(const cb_tree x)
void * cobc_main_malloc(const size_t size)
struct cb_literal * literal
#define CB_TREE_CATEGORY(x)
struct cb_field * local_storage
void cobc_abort_pr(const char *fmt,...)
static void output_newline(void)
#define COB_SCREEN_TYPE_VALUE
static unsigned int gen_alt_ebcdic
#define CB_CALL_BY_REFERENCE
static void output_perform_once(struct cb_perform *p)
const char * cb_source_file
static void output_error_handler(struct cb_program *prog)
static int lookup_string(const char *p)
static FILE * output_target
unsigned int flag_gen_debug
#define COB_TYPE_NUMERIC_PACKED
static void output_file_initialization(struct cb_file *f)
#define COB_SCREEN_TYPE_FIELD
unsigned int flag_any_length
void * cobc_parse_malloc(const size_t size)
static unsigned int chk_field_variable_address(struct cb_field *fld)
unsigned int flag_initial
static unsigned int gen_custom
static int local_working_mem
struct cb_label * debug_section
static char * user_func_upper(const char *func)
unsigned int flag_local_alloced
unsigned int flag_global_use
static void output(const char *,...)
#define CB_CALL_BY_CONTENT
static void output_long_integer(cb_tree x)
struct cb_field * children
void codegen(struct cb_program *prog, const int nested)
static void output_perform(struct cb_perform *p)
#define COB_TYPE_ALPHANUMERIC
#define INITIALIZE_COMPOUND
static void output_line(const char *fmt,...)
static int lookup_attr(const int type, const cob_u32_t digits, const int scale, const cob_u32_t flags, unsigned char *pic, const int lenstr)
unsigned int flag_odo_relative
static unsigned int i_counters[16]
unsigned int flag_anylen_done
int cb_get_int(const cb_tree x)
static unsigned int gen_ebcdic_ascii
cb_tree cb_build_field_reference(struct cb_field *f, cb_tree ref)
static const char * excp_current_paragraph
unsigned int flag_fatal_check
static struct attr_list * attr_list_reverse(struct attr_list *p)
unsigned int flag_real_label
static struct string_list * string_cache
#define CB_PURPOSE_INT(x)
static void output_entry_function(struct cb_program *prog, cb_tree entry, cb_tree parameter_list, const int gencode)
unsigned int flag_is_returning
#define INITIALIZE_DEFAULT
cb_tree cb_ref(cb_tree x)
static void output_local(const char *fmt,...)
const char * cb_storage_file_name
static void output_func_1(const char *name, cb_tree x)
#define CB_ALPHABET_ASCII
static void output_ferror_stmt(struct cb_statement *p, const int code)
static void output_module_init(struct cb_program *prog)
#define COB_FLAG_REAL_BINARY
unsigned char flag_default
static void output_string(const unsigned char *s, const int size, const cob_u32_t llit)
#define CB_ALPHABET_NATIVE
unsigned int flag_next_sentence
struct nested_list * next
static void output_section_info(struct cb_label *lp)
static void output_class_name_definition(struct cb_class_name *p)
unsigned int flag_field_debug
struct cb_para_label * para_label
struct local_filename * local_include
static unsigned int gen_dynamic
unsigned char flag_init_statement
unsigned char flag_is_global
static void output_index(cb_tree x)
int cb_fits_long_long(const cb_tree x)
static void output_label_info(cb_tree x, struct cb_label *lp)
void * cobc_parse_strdup(const char *dupstr)
unsigned int flag_ext_assign
static void output_initialize_one(struct cb_initialize *p, cb_tree x)
unsigned int flag_vsize_done
#define COB_SELECT_LINAGE
unsigned char flag_local_storage
static void output_funcall(cb_tree x)
static void output_storage(const char *fmt,...)
unsigned int flag_debugging
unsigned int flag_dummy_paragraph
static void output_data(cb_tree x)
static struct label_list * label_cache
static void output_initialize(struct cb_initialize *p)
static void output_initialize_uniform(cb_tree x, const int c, const int size)
static unsigned int gen_native
unsigned int flag_file_global
#define CB_PERFORM_VARYING(x)
static void output_prefix(void)
unsigned int flag_no_field
void * cobc_main_realloc(void *prevptr, const size_t size)
#define COB_FLAG_HAVE_SIGN
static struct literal_list * literal_cache
struct cb_alter_id * alter_gotos
#define COB_FLAG_BINARY_SWAP
static void output_screen_definition(struct cb_field *p)
unsigned int flag_item_78
static struct cb_program * current_prog
static void output_call(struct cb_call *p)
static struct literal_list * literal_list_reverse(struct literal_list *p)
struct cb_intrinsic_table * intr_tab
struct cb_alphabet_name * code_set
#define COB_FLAG_BINARY_TRUNC
static void * list_cache_sort(void *inlist, int(*cmpfunc)(const void *mp1, const void *mp2))
#define CB_BINARY_OP_P(x)
int cb_list_length(cb_tree l)
unsigned int flag_section
struct cb_program * nested_prog
static void output_size(const cb_tree x)
unsigned int flag_all_debug
const unsigned int refmod
strict implicit external value
struct cb_label * section
struct cb_text_list * cb_early_exit_list
unsigned int flag_in_debug
static void output_field(cb_tree x)
static void output_internal_function(struct cb_program *prog, cb_tree parameter_list)
static void output_cond(cb_tree x, const int save_flag)
struct cb_program * handler_prog
static void output_perform_exit(struct cb_label *l)
#define CB_ALPHABET_NAME(x)
unsigned int flag_sign_leading
static void output_main_function(struct cb_program *prog)
#define CB_LOCALE_NAME(x)
static int initialize_type(struct cb_initialize *p, struct cb_field *f, const int topfield)
static void output_search_whens(cb_tree table, cb_tree var, cb_tree stmt, cb_tree whens)
static struct field_list * local_field_cache
unsigned int flag_no_init
static void output_occurs(struct cb_field *p)
static void output_initialize_fp(cb_tree x, struct cb_field *f)
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
unsigned int flag_external
static int non_nested_count
unsigned int flag_default_handler
#define COB_FLAG_IS_POINTER
static const char * excp_current_section
struct cb_label * handler
cb_tree cb_standard_error_handler
#define COB_FLAG_BLANK_ZERO
#define COB_FLAG_SIGN_LEADING
struct cb_program * next_program
static void output_initial_values(struct cb_field *f)
unsigned int flag_debugging_mode
static void lookup_func_call(const char *p)
static void output_trace_info(cb_tree x, struct cb_statement *p)
static const unsigned char hexval[]
#define CB_EXCEPTION_CODE(id)
#define COB_TYPE_NUMERIC_BINARY
cb_tree cb_build_cast_llint(const cb_tree val)
static struct field_list * field_cache
cb_tree alphabet_name_list
unsigned int flag_binary_swap
#define COB_SCREEN_TYPE_ATTRIBUTE
static const char * excp_current_program_id
struct cb_program * handler_prog
int cb_fits_int(const cb_tree x)
#define COB_SCREEN_LOWLIGHT
#define COB_FLAG_SIGN_SEPARATE
#define CB_LOCALE_NAME_P(x)
static void output_bin_field(const cb_tree x, const cob_u32_t id)
struct cb_alter_id * next
#define CB_CONV_STATIC_LINK
#define COB_KEYWORD_INLINE
#define COB_TYPE_NUMERIC_DISPLAY
#define CB_FUNC_PROTOTYPE(x)
static void output_param(cb_tree x, int id)
static void output_goto(struct cb_goto *p)
static cob_u32_t field_iteration
#define COB_TYPE_ALPHANUMERIC_ALL
static void output_alter(struct cb_alter *p)
static void output_perform_call(struct cb_label *lb, struct cb_label *le)
#define CB_ALPHABET_CUSTOM
static void output_alter_check(struct cb_label *lp)
static void output_initialize_fp_bindec(cb_tree x, struct cb_field *f)
unsigned char currency_symbol
static unsigned int inside_check
static struct base_list * local_base_cache
static void output_figurative(cb_tree x, const struct cb_field *f, const int value, const int init_occurs)
static unsigned int nolitcast
unsigned int flag_any_numeric
static int lookup_literal(cb_tree x)
static void output_header(FILE *fp, const char *locbuff, const struct cb_program *cp)
static const struct system_table system_tab[]
static struct call_list * call_cache
static unsigned int gen_nested_tab
static unsigned int gen_figurative
static void output_initialize_literal(cb_tree x, struct cb_field *f, struct cb_literal *l, const int init_occurs)
static void output_goto_1(cb_tree x)
static unsigned int needs_exit_prog
unsigned int flag_segments
unsigned int flag_blank_zero
#define CB_BUILD_CHAIN(x, y)
unsigned int flag_receiving
struct literal_list * next
#define COB_SCREEN_HIGHLIGHT
unsigned int flag_recursive
enum cb_cast_type cast_type
static void lookup_call(const char *p)
struct cb_para_label * next
#define COB_SELECT_FILE_STATUS
unsigned int flag_vaddr_done
unsigned int flag_chained
static void output_search(struct cb_search *p)
char * cb_encode_program_id(const char *)
#define COB_SELECT_EXTERNAL
static int base_cache_cmp(const void *mp1, const void *mp2)
static struct attr_list * attr_cache
if fold fold static computed alternate extra correct stack on syntax debugging line
static struct cb_label * last_section
struct string_list * next
cb_tree cb_build_initialize(const cb_tree var, const cb_tree val, const cb_tree rep, const unsigned int def, const unsigned int is_statement, const unsigned int no_filler_init)
static struct string_list * string_list_reverse(struct string_list *p)
cb_tree collating_sequence
static unsigned int inside_stack[64]
struct handler_struct global_handler[5]
void cob_gen_optim(const enum cb_optim)
#define CB_EXCEPTION_ENABLE(id)
struct cb_alter_id * alter_gotos
static struct base_list * base_cache
static void output_alphabet_name_definition(struct cb_alphabet_name *p)
#define COB_MAX_SUBSCRIPTS
unsigned char flag_no_filler_init
unsigned int flag_sign_separate
static void output_funcall_debug(cb_tree x)
struct nested_list * nested_prog_list
static FILE * cb_local_file
static void output_integer(cb_tree x)
unsigned int flag_declarative_exit
static int output_indent_level
static void output_set_attribute(const struct cb_field *f, int val_on, int val_off)
#define CB_ALPHABET_NAME_P(x)
#define CB_SIZES_INT_UNSIGNED(x)
const char * intr_routine
struct cb_label * all_procedure
struct cb_field * linkage_storage
unsigned int flag_callback
unsigned char numeric_separator
cb_tree cb_build_move(cb_tree, cb_tree)
static unsigned int gen_full_ebcdic
static void output_stmt(cb_tree x)
struct cb_field * working_storage
static void output_attr(const cb_tree x)
static int num_cob_fields
static void output_file_error(struct cb_file *pfile)
static void output_screen_init(struct cb_field *p, struct cb_field *previous)
cob_u32_t optimize_defs[COB_OPTIM_MAX]
cb_tree cb_build_debug(const cb_tree target, const char *str, const cb_tree fld)
unsigned int flag_dummy_exit
#define COB_SCREEN_TYPE_GROUP
static void output_perform_until(struct cb_perform *p, cb_tree l)
unsigned int flag_skip_label
static struct base_list * globext_cache
unsigned int flag_dummy_section
static void output_base(struct cb_field *f, const cob_u32_t no_output)
#define COB_MAX_FIELD_PARAMS
struct cb_field * redefines
cb_tree cb_build_cast_int(const cb_tree val)
static int literal_value(cb_tree x)
static unsigned int need_save_exception
cob_s64_t cb_get_long_long(const cb_tree x)
unsigned int flag_chained
#define CB_PREFIX_SEQUENCE
static int output_file_allocation(struct cb_file *f)
static void output_cancel(struct cb_cancel *p)
static unsigned char * litbuff
struct cb_alt_key * alt_key_list
int cb_tree_type(const cb_tree x, const struct cb_field *f)
static char * string_buffer
#define CB_REF_OR_FIELD_P(x)
static void output_move(cb_tree src, cb_tree dst)
unsigned int alphabet_type
#define COB_FLAG_JUSTIFIED
unsigned int flag_gen_error
static int initialize_uniform_char(const struct cb_field *f, const struct cb_initialize *p)
static struct cb_field * real_field_founder(const struct cb_field *f)
cb_tree cb_debug_contents
#define CB_ALPHABET_EBCDIC
#define CB_CONV_NO_RET_UPD
static void output_cond_debug(cb_tree x)
struct cb_text_list * cb_static_call_list
unsigned char decimal_point
struct cb_field * screen_storage
struct cb_label * debug_section
static void output_call_by_value_args(cb_tree x, cb_tree l)
static struct call_list * func_call_cache
static void output_indent(const char *str)
unsigned char flag_external
cb_tree cb_list_add(cb_tree l, cb_tree x)
#define COB_FLAG_NO_SIGN_NIBBLE
static void output_search_all(cb_tree table, cb_tree stmt, cb_tree cond, cb_tree when)
unsigned int flag_item_based