Skip to content

Commit 675824c

Browse files
committed
On-the-fly BCD normalization
1 parent 16e84a5 commit 675824c

25 files changed

+256
-18
lines changed

cobc/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
2024-12-05 David Declerck <[email protected]>
3+
4+
* config.def: new normalize-bcd dialect option
5+
* codegen.c (output_module_init_function): initialize flag_normalize_bcd
6+
27
2024-10-02 Simon Sobisch <[email protected]>
38

49
* pplex.l (output_line_directive): extracted from other places and

cobc/codegen.c

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

1139511396
output_block_close ();
1139611397
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
@@ -1,4 +1,8 @@
11

2+
2024-12-05 David Declerck <[email protected]>
3+
4+
* general: add the normalize-bcd dialect option (active only for GCOS)
5+
26
2024-08-17 Ammar Almoris <[email protected]>
37

48
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)