Skip to content

Commit 55b73dc

Browse files
committed
On-the-fly BCD normalization
1 parent 6698c4b commit 55b73dc

25 files changed

+269
-18
lines changed

cobc/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
* cobc.c (process_command_line): fix leak for --copy and -include parsing
55

6+
2024-12-05 David Declerck <david.declerck@ocamlpro.com>
7+
8+
* config.def: new normalize-bcd dialect option
9+
* codegen.c (output_module_init_function): initialize flag_normalize_bcd
10+
611
2024-10-30 Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>
712

813
* typeck.c: define [WITH_EXTENDED_SCREENIO] for any curses headers

cobc/codegen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11389,6 +11389,7 @@ output_module_init_function (struct cb_program *prog)
1138911389
} else {
1139011390
output_line ("module->module_sources = NULL;");
1139111391
}
11392+
output_line ("module->flag_normalize_bcd = %d;", cb_normalize_bcd);
1139211393

1139311394
output_block_close ();
1139411395
output_newline ();

cobc/config.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ CB_CONFIG_BOOLEAN (cb_areacheck, "areacheck",
203203
" * statements must not start in Area A; and\n"
204204
" * separator periods must not be within Area A"))
205205

206+
CB_CONFIG_BOOLEAN (cb_normalize_bcd, "normalize-bcd",
207+
_("normalize BCD on-the-fly"))
208+
206209
/* Support flags */
207210

208211
CB_CONFIG_SUPPORT (cb_comment_paragraphs, "comment-paragraphs",

config/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
* gcos-strict.conf: set init-justify to no after testing on GCOS
55

6+
2024-12-05 David Declerck <david.declerck@ocamlpro.com>
7+
8+
* general: add the normalize-bcd dialect option (active only for GCOS)
9+
610
2024-08-17 Ammar Almoris <ammaralmorsi@gmail.com>
711

812
FR #474: add runtime configuration to hide cursor for extended screenio

config/acu-strict.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ subscript-check: max
202202
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
203203
init-justify: no
204204

205+
# Normalize BCD on-the-fly
206+
normalize-bcd: no
207+
205208
# Dialect features
206209
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
207210
# 'unconformable'

config/bs2000-strict.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ subscript-check: max # not verified, may need "record"
200200
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
201201
init-justify: no
202202

203+
# Normalize BCD on-the-fly
204+
normalize-bcd: no
205+
203206
# Dialect features
204207
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
205208
# 'unconformable'

config/cobol2002.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ subscript-check: full
199199
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
200200
init-justify: no
201201

202+
# Normalize BCD on-the-fly
203+
normalize-bcd: no
204+
202205
# Dialect features
203206
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
204207
# 'unconformable'

config/cobol2014.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ subscript-check: full
199199
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
200200
init-justify: no
201201

202+
# Normalize BCD on-the-fly
203+
normalize-bcd: no
204+
202205
# Dialect features
203206
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
204207
# 'unconformable'

config/cobol85.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ subscript-check: full
199199
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
200200
init-justify: no
201201

202+
# Normalize BCD on-the-fly
203+
normalize-bcd: no
204+
202205
# Dialect features
203206
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
204207
# 'unconformable'

config/default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ subscript-check: full
219219
# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
220220
init-justify: no
221221

222+
# Normalize BCD on-the-fly
223+
normalize-bcd: no
224+
222225
# Dialect features
223226
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
224227
# 'unconformable'

0 commit comments

Comments
 (0)