Skip to content

Commit

Permalink
Merge SVN 5022, 5023
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Oct 2, 2024
1 parent c6ea0f0 commit e22046b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions libcob/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@

2023-04-13 Simon Sobisch <[email protected]>

performance adjustments for HEX-OF and HEX-TO-CHAR
* intrinsic.c (test_digit, cob_intr_hex_to_char, cob_intr_locale_date,
cob_intr_locale_time), move.c (cob_move_alphanum_to_display,
cob_get_s64_pic9): prefer range check over isdigit for improved speed
Expand All @@ -88,6 +89,13 @@
* intrinsic.c (cob_intr_hex_of): rewritten to use hex value table instead
of sprintf, saving around 80% of cpu instructions

performance adjustments for location code compatibility for old modules
* common.c (get_stmt_from_name): extracted from cob_set_location and
cob_trace_stmt to remove duplication
* common.c (get_stmt_from_name): rewritten to store the last statements,
which heavily reduces the use of strcmp and the hashing function
* common.c (do_trace_statement): extracted from cob_trace_statement

2023-03-03 Simon Sobisch <[email protected]>

* common.c, common.h: new external field + define COB_ZEROES_ALPHABETIC /
Expand Down
11 changes: 5 additions & 6 deletions libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ cob_get_last_exception_name (void)
}
for (n = EXCEPTION_TAB_SIZE - 1; n != 0; --n) {
if ((last_exception_code & cob_exception_tab_code[n])
== cob_exception_tab_code[n]) {
== cob_exception_tab_code[n]) {
return cob_exception_tab_name[n];
}
}
Expand Down Expand Up @@ -2808,7 +2808,6 @@ cob_set_exception (const int id)
}
#endif
}
/* if no current module is available fall-through */
} else {
cobglobptr->cob_got_exception = 0;
#if 0 /* consider addition for 4.x */
Expand Down Expand Up @@ -4373,8 +4372,8 @@ cob_is_numeric (const cob_field *f)
int sign;
/* Check digits */
for (i = 0; i < f->size - 1; ++i) {
if ((f->data[i] & 0xF0) > 0x90 ||
(f->data[i] & 0x0F) > 0x09) {
if ((f->data[i] & 0xF0) > 0x90
|| (f->data[i] & 0x0F) > 0x09) {
return 0;
}
}
Expand All @@ -4397,8 +4396,8 @@ cob_is_numeric (const cob_field *f)
if (sign == 0x0C || sign == 0x0D) {
return 1;
}
if (COB_MODULE_PTR->flag_host_sign &&
sign == 0x0F) {
if (COB_MODULE_PTR->flag_host_sign
&& sign == 0x0F) {
return 1;
}
} else if (sign == 0x0F) {
Expand Down

0 comments on commit e22046b

Please sign in to comment.