Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jul 26, 2024
1 parent 3b0f236 commit 67716c1
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 33 deletions.
1 change: 0 additions & 1 deletion cobc/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,6 @@ set_record_size (cb_tree min, cb_tree max)
%token V
%token VALID
%token VALIDATE
%token VAL_STATUS "VAL-STATUS"
%token VALIDATE_STATUS "VALIDATE-STATUS"
%token VALIDATING
%token VALUE
Expand Down
37 changes: 15 additions & 22 deletions libcob/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

2024-07-25 David Declerck <[email protected]>

* fbdb.c, fextfh.c, fisam.c, flmdb.c, focextfh.c, foci.c, fodbc.c:
adjusted to use cob_open_mode where possible while
merging 2022-10-04

2023-07-12 Simon Sobisch <[email protected]>

* numeric.c (cob_decimal_set_binar): C89 fix
Expand Down Expand Up @@ -196,8 +202,8 @@
backport of adjusted struct indexed_file with new file_lock_set
from rw-branch together with related changes
* fileio.c [WITH_DB] (unlock_file): extracted to match other functions
* fileio.c [WITH_DB]: added extra parameters to DB_PUT, DB_GET, DB_SEQ,
DB_CPUT to show what is actually used
* fileio.c [WITH_DB]->fbdb.c: added extra parameters to DB_PUT, DB_GET,
DB_SEQ, DB_CPUT to show what is actually used
* fileio.c: fixed some memory leaks related to filename handling
* fileio.c (cob_file_free): file was not removed from cache which
led to double-free scenarios on cleanup
Expand Down Expand Up @@ -1016,7 +1022,7 @@

2021-07-01 Ron Norman <[email protected]>

* fbdb.c->fileio.c [WITH_DB]: checks if filename is actually a directory
* fileio.c [WITH_DB]->fbdb.c: checks if filename is actually a directory

2021-06-28 Ron Norman <[email protected]> and Christian Lademann

Expand Down Expand Up @@ -3581,18 +3587,12 @@

2016-12-30 Ron Norman <[email protected]>

* fileio.c,common.h
* fileio.c, common.h:
Complete work on BDB use of SHARING & RETRY
Problems solved by closing BDB cursor as soon/often as possible
as the BDB cursor seems to create some internal locks
Retry interval reduced to 100ms

* INDEXED file test case added and uses a file to synchronize tests
* RELATIVE file test case added and uses a file to synchronize tests

2016-12-30 Ron Norman <[email protected]>

* fileio.c: [WITH_DB] fixed BDB locking issues by closing BDB cursor as
* fileio.c [WITH_DB]->fbdb.c: fixed BDB locking issues by closing BDB cursor as
soon/often as possible as the BDB cursor seems to create some internal
locks

Expand Down Expand Up @@ -3624,7 +3624,7 @@

2016-12-24 Ron Norman <[email protected]>

* fileio.c,common.c,common.h,coblocal.h
* fileio.c, common.c, common.h, coblocal.h:
Extensive updates for fileio.c to handle OPEN SHARING
and RETRY clauses on all I/O statements.
Relative files use sigaction/alarm/fcntl to wait for
Expand All @@ -3633,18 +3633,11 @@
a wait/retry loop. each loop happens at 125ms interval.
BDB code updated to use none deprecated functions, use some
subroutines instead of inline code and changes for SHARING/RETRY

* At present there are no test cases but these will come in a while
I need to come up with a better way to synchronize separate
processes so I can reliably recreate the test cases

2016-12-24 Ron Norman <[email protected]>

* fileio.c [WITH_DB]: reordered struct indexed_file, adding file_lock_set
* fileio.c [WITH_DB]->fbdb.c: reordered struct indexed_file, adding file_lock_set
and use it to fix multiple unlocking
* fileio.c [WITH_DB]: extracted bdb_open_cursor, bdb_close_cursor,
* fileio.c [WITH_DB]->fbdb.c: extracted bdb_open_cursor, bdb_close_cursor,
bdb_close_index, lock_file
* fileio.c [WITH_DB]: added code for BDB < 4.6
* fileio.c [WITH_DB]->fbdb.c: added code for BDB < 4.6

2016-12-23 Simon Sobisch <[email protected]>

Expand Down
15 changes: 11 additions & 4 deletions libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2604,16 +2604,19 @@ cob_set_exception (const int id)
static char excp_para[COB_MAX_WORDLEN + 1];
cob_module *mod = COB_MODULE_PTR;
cobglobptr->cob_got_exception = 1;
cobglobptr->last_exception_source = cob_source_file; /* needs to be strdup'd */
cobglobptr->last_exception_line = cob_source_line;
if (mod) {
if (mod->module_sources
&& mod->module_stmt != 0) {
/* note: it is likely best to not copy name + line but store the name+line
together, maybe even comma-separated when we have copy->copy-prog */
cobglobptr->last_exception_source = mod->module_sources
[COB_GET_FILE_NUM (mod->module_stmt)]; /* needs to be strdup'd */
cobglobptr->last_exception_source = cob_strdup (mod->module_sources
[COB_GET_FILE_NUM (mod->module_stmt)]);
cobglobptr->last_exception_line = COB_GET_LINE_NUM (mod->module_stmt);
} else {
if (cob_source_file != NULL) {
cobglobptr->last_exception_source = cob_strdup (cob_source_file);
}
}
cobglobptr->last_exception_statement = mod->statement;
if (mod->module_name) {
Expand All @@ -2629,13 +2632,17 @@ cob_set_exception (const int id)
cobglobptr->last_exception_paragraph = excp_para;
}
return;
} else {
if (cob_source_file != NULL) {
cobglobptr->last_exception_source = cob_strdup (cob_source_file);
}
}
/* if no current module is available fall-through */
} else {
cobglobptr->cob_got_exception = 0;
if (cobglobptr->last_exception_source) {
cobglobptr->last_exception_source = NULL;
cob_free ((void *)cobglobptr->last_exception_source);
cobglobptr->last_exception_source = NULL;
}
cobglobptr->last_exception_line = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion libcob/fbdb.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
2 changes: 1 addition & 1 deletion libcob/fextfh.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
2 changes: 1 addition & 1 deletion libcob/flmdb.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
2 changes: 1 addition & 1 deletion libcob/focextfh.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
2 changes: 1 addition & 1 deletion libcob/foci.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
2 changes: 1 addition & 1 deletion libcob/fodbc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2002-2012, 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2012, 2014-2022, 2024 Free Software Foundation, Inc.
Written by Keisuke Nishida, Roger While, Simon Sobisch, Ron Norman
This file is part of GnuCOBOL.
Expand Down
3 changes: 3 additions & 0 deletions tests/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@
run concurrent test cases. There is also several C$SLEEP
calls to setup the test scenarios.
So these tests appear to run for a long time
* INDEXED file test case added and uses a file to synchronize tests
* RELATIVE file test case added and uses a file to synchronize tests


2016-12-06 Simon Sobisch <[email protected]>

Expand Down

0 comments on commit 67716c1

Please sign in to comment.