Skip to content

Commit

Permalink
gixpp PICTURE clauses are now also handled in lower-case
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch authored Aug 21, 2024
1 parent 69e2671 commit 18547fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
15 changes: 8 additions & 7 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Added some features and fixes
- The size of indicator for VARYING fields can be set at runtime with an environment variable (GIXSQL_VARYING_LEN_SZ_SHORT) that must coincide with the size specifying when preprocessing (a new parameter -N/--varying-length-size has been added to gixpp). See here: https://github.com/mridoni/gixsql/issues/54#issuecomment-1712474368
- The handling of continuation lines has been fixed
- Several pull requests by @GitMensch have been merged (thanks!!) that fix some memory bugs here and there
- PICTURE clauses are now also handled in lower-case (fixes #188)

=== v1.0.20b ======================================================
- Added SSL connection support for PostgreSQL
Expand Down Expand Up @@ -76,16 +77,16 @@ Added some features and fixes

=== v1.0.17 ======================================================
- Added support for "smart" cursor initialization (#88)
- Added support for EXECUTE prepared-statement INTO�#(87)
- Fixed a logging problem�(#84)
- Fixed "wrong generated COBOL in 1.0.16"�(#83)
- Fixed "missing "close" for spdlog?"�(#82)
- Added support for EXECUTE prepared-statement INTO�#(87)
- Fixed a logging problem�(#84)
- Fixed "wrong generated COBOL in 1.0.16"�(#83)
- Fixed "missing "close" for spdlog?"�(#82)
- Added support for using prepared statements in cursors (#81)
- Variable length fields indicators are now 32-bit long by default (#80)
- Added support for using variable length fields with prepared statements (#79)
- Added upport for using group fields in INSERT and SELECT..INTO statements�(#6)
- Added support for more connection string formats (including ocesql compatibility)�(#16)
- Added Support for�DISCONNECT ALL�(#89)
- Added upport for using group fields in INSERT and SELECT..INTO statements�(#6)
- Added support for more connection string formats (including ocesql compatibility)�(#16)
- Added Support for�DISCONNECT ALL�(#89)
- Performed some refactoring to improve code size
- Fixed a few memory leaks

Expand Down
12 changes: 8 additions & 4 deletions libgixpp/gix_esql_driver.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
This file is part of Gix-IDE, an IDE and platform for GnuCOBOL
Copyright (C) 2021,2022 Marco Ridoni
This file is part of GixSQL, an ESQL preprocessor to enable GnuCOBOL
to access databases.
Copyright (C) 2021-2024 Marco Ridoni
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -574,11 +576,13 @@ int gix_esql_driver::build_picture(const std::string str, cb_field_ptr pic)
{
if (pic == NULL || str.length() > 50) {
/* arbitrary limit; note on implementation limits: COBOL85 (30),
COBOL2002 and most others (50), COBOL2014 (63), GC (255) */
COBOL2002 and most others (50), COBOL2014+2024 (63), GC (255) */
return 0;
}

const char *p = str.c_str();
std::string str_u = str;
std::transform(str_u.begin(), str_u.end(), str_u.begin(), ::toupper);
const char *p = str_u.c_str();

int i;
int n;
Expand Down

0 comments on commit 18547fa

Please sign in to comment.