diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index b89faad17..dd65c1592 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [ gc4 ] push: - branches: [ gc4 ] # manual run in actions tab - for all branches workflow_dispatch: @@ -14,7 +13,8 @@ jobs: fail-fast: false matrix: os: - - macos-latest + # - macos-latest-large # macos 14, amd64 + - macos-latest # macos 14, arm64 isam: - db - visam @@ -60,9 +60,7 @@ jobs: - name: bootstrap run: | sed -i '' 's/-undefined suppress//g' configure.ac - ./autogen.sh - autoconf - autoreconf --install --force + ./build_aux/bootstrap install - name: Build environment setup run: | @@ -76,32 +74,35 @@ jobs: cd _build export CPPFLAGS="-DREAD_WRITE_NEEDS_FLUSH $CPPFLAGS" export CFLAGS="-Wno-deprecated-non-prototype -Wno-parentheses-equality $CFLAGS" - ../configure --with-${{ matrix.isam }} --with-indexed=${{ matrix.isam }} --enable-cobc-internal-checks --enable-hardening --prefix /opt/cobol/gnucobol --exec-prefix /opt/cobol/gnucobol + ../configure --with-${{ matrix.isam }} \ + --with-indexed=${{ matrix.isam }} \ + --enable-cobc-internal-checks \ + --enable-hardening \ + --prefix /opt/cobol/gnucobol - - name: Upload config-${{ matrix.isam }}.log + - name: Upload config-${{ matrix.os }}-${{ matrix.isam }}.log uses: actions/upload-artifact@v4 if: failure() with: - name: config-${{ matrix.isam }}.log + name: config-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/config.log - name: make run: | - cd _build - make --jobs=$((${NPROC}+1)) + make -C _build --jobs=$((${NPROC}+1)) -# make install must be done before make check, otherwise execution of -# generated COBOL files fail for a missing /usr/local/lib/libcob.dylib + # make install must be done before make check, otherwis + # execution of generated COBOL files fail for a missing + # /usr/local/lib/libcob.dylib - name: make install run: | - cd _build - sudo make install - find /opt/cobol > install.log + sudo make -C _build install + find /opt/cobol > _build/install.log - - name: Upload install-${{ matrix.isam }}.log + - name: Upload install-${{ matrix.os }}-${{ matrix.isam }}.log uses: actions/upload-artifact@v4 with: - name: install-${{ matrix.isam }}.log + name: install-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/install.log - name: check @@ -116,32 +117,25 @@ jobs: AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at sed -i '' '/AT_SETUP(\[trace feature with indexed EXTFH\])/a\ AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at - cd _build - make check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))" + make -C _build check \ + TESTSUITEFLAGS="--jobs=$((${NPROC}+1))" - - name: Upload testsuite-${{ matrix.isam }}.log + - name: Upload testsuite-${{ matrix.os }}-${{ matrix.isam }}.log uses: actions/upload-artifact@v4 if: failure() with: - name: testsuite-${{ matrix.isam }}.log + name: testsuite-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/tests/testsuite.log - - name: Cache newcob.val.Z + - name: Cache newcob.val uses: actions/cache@v4 - id: newcob with: - path: _build/tests/cobol85/newcob.val.Z.cached - key: newcob-${{ matrix.isam }} - - - name: Download newcob.val.Z - if: steps.newcob.outputs.cache-hit != 'true' - run: | - cd _build/tests/cobol85 - make newcob.val.Z - ln -f newcob.val.Z newcob.val.Z.cached + path: _build/tests/cobol85/newcob.val + key: newcob-val + save-always: true + enableCrossOsArchive: true - name: NIST85 Test Suite run: | - cd _build/tests/cobol85 - ln -f newcob.val.Z.cached newcob.val.Z - make EXEC85 && make --jobs=$(($(nproc)+1)) test + make -C _build/tests/cobol85 EXEC85 test \ + --jobs=$((${NPROC}+1)) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ded64ce29..b2128280c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [ gc4 ] push: - branches: [ gc4 ] # manual run in actions tab - for all branches workflow_dispatch: @@ -19,9 +18,6 @@ jobs: isam: - db - visam - include: - - os: ubuntu-latest - skip_test: true runs-on: ${{ matrix.os }} @@ -38,7 +34,8 @@ jobs: - name: Install packages run: | sudo apt-get update - sudo apt-get install automake libtool libdb5.3-dev libxml2-dev libcjson-dev bison flex help2man gettext texlive + sudo apt-get install automake libtool libdb5.3-dev libxml2-dev libcjson-dev \ + bison flex help2man gettext texlive - name: Installing VISAM prerequisite if: ${{ matrix.isam == 'visam' }} @@ -53,7 +50,7 @@ jobs: echo "LIBRARY_PATH=/usr/local/visam-2.2/lib" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/usr/local/visam-2.2/lib" >> $GITHUB_ENV - - name: bootstrap + - name: Bootstrap run: | ./build_aux/bootstrap @@ -78,41 +75,43 @@ jobs: echo "TERM=$TERM" >> $GITHUB_ENV echo "INSTALL_PATH=$(pwd)/_install" >> $GITHUB_ENV - - name: configure + - name: Configure run: | cd _build - ../configure --with-${{ matrix.isam }} --with-indexed=${{ matrix.isam }} --enable-cobc-internal-checks --enable-hardening --prefix ${INSTALL_PATH} - echo "VERSION=PACKAGE_VERSION" | cpp -P -imacros config.h | tr -d \" >> $GITHUB_ENV - - - name: Upload config-${{ matrix.isam }}.log + ../configure --with-${{ matrix.isam }} \ + --with-indexed=${{ matrix.isam }} \ + --enable-cobc-internal-checks \ + --enable-hardening \ + --prefix ${INSTALL_PATH} + echo "VERSION=PACKAGE_VERSION" | cpp -P -imacros config.h | tr -d \" \ + >> $GITHUB_ENV + + - name: Upload config-${{ matrix.os }}-${{ matrix.isam }}.log uses: actions/upload-artifact@v4 if: failure() with: - name: config-${{ matrix.isam }}.log + name: config-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/config.log - - name: make + - name: Build run: | - cd _build - make --jobs=$(($(nproc)+1)) - - # - name: check - # run: | - # cd _build - # make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + make -C _build --jobs=$(($(nproc)+1)) # note: distcheck also creates the dist tarball - - name: distcheck + - name: Build distribution archive & run tests run: | - cd _build - make --jobs=$(($(nproc)+1)) distcheck TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + make -C _build distcheck \ + TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" \ + --jobs=$(($(nproc)+1)) || \ + make -C _build/gnucobol-$VERSION/_build/sub/tests check \ + TESTSUITEFLAGS="--recheck --verbose" - - name: Upload testsuite-${{ matrix.isam }}.log + - name: Upload testsuite-${{ matrix.os }}-${{ matrix.isam }}.log uses: actions/upload-artifact@v4 if: failure() with: # Assume there's only one directory matching `_build/gnucobol-*`: - name: testsuite-${{ matrix.isam }}.log + name: testsuite-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/gnucobol-${{ env.VERSION }}/_build/sub/tests/testsuite.log - name: Upload dist tarball @@ -123,52 +122,43 @@ jobs: if-no-files-found: error retention-days: 0 - - name: Cache newcob.val.Z + - name: Cache newcob.val uses: actions/cache@v4 - id: newcob with: - path: _build/tests/cobol85/newcob.val.Z.cached - key: newcob-${{ matrix.isam }} - - - name: Download newcob.val.Z - if: steps.newcob.outputs.cache-hit != 'true' - run: | - cd _build/tests/cobol85 - make newcob.val.Z - ln -f newcob.val.Z newcob.val.Z.cached + path: _build/tests/cobol85/newcob.val + key: newcob-val + save-always: true + enableCrossOsArchive: true - name: NIST85 Test Suite run: | - cd _build/tests/cobol85 - ln -f newcob.val.Z.cached newcob.val.Z - make EXEC85 && make --jobs=$(($(nproc)+1)) test + make -C _build/tests/cobol85 EXEC85 test \ + --jobs=$(($(nproc)+1)) - - uses: actions/upload-artifact@v4 + - name: Upload NIST85 Test Suite results + uses: actions/upload-artifact@v4 with: - name: NIST85 results (${{ matrix.isam }}) + name: NIST85 results on ${{ matrix.os }} (${{ matrix.isam }}) path: | _build/tests/cobol85/**/*.log _build/tests/cobol85/**/*.out - - name: install - run: | - cd _build - make install - coverage: name: Coverage and Warnings runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 # note: less dependencies as we don't generate a dist tarball, one additional for lcov - name: Install dependencies run: | - sudo apt-get install automake libtool libdb5.3-dev libxml2-dev libcjson-dev bison flex help2man gettext lcov + sudo apt-get install automake libtool libdb5.3-dev libxml2-dev \ + libcjson-dev bison flex help2man gettext lcov - - name: bootstrap + - name: Bootstrap run: | ./build_aux/bootstrap @@ -178,44 +168,78 @@ jobs: export TERM="vt100" echo "TERM=$TERM" >> $GITHUB_ENV - # note: w add additional C compiler syntax checks here to not need _another_ CI run - - name: configure + # note: w add additional C compiler syntax checks here to not need + # _another_ CI run + # + # TODO: try and pass -pedantic via CPPFLAGS + - name: Configure run: | cd _build - ../configure --enable-code-coverage CPPFLAGS="-Werror=declaration-after-statement" + ../configure --enable-code-coverage \ + CPPFLAGS="-Werror=declaration-after-statement" \ + CC="gcc -std=c89" - - uses: actions/upload-artifact@v4 + - name: Upload config-${{ matrix.os }}-${{ matrix.isam }}.log + uses: actions/upload-artifact@v4 if: failure() with: - name: config.log + name: config-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/config.log - - name: make + - name: Build run: | - cd _build - make --jobs=$(($(nproc)+1)) + make -C _build --jobs=$(($(nproc)+1)) - - name: coverage + - name: Coverage run: | - cd _build - make check-code-coverage TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + # make -C _build check-code-coverage # <- (ignores errors) + make -C _build check \ + TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + make -C _build code-coverage-capture \ + CODE_COVERAGE_DIRECTORY="$(realpath .)/_build" - - uses: actions/upload-artifact@v4 + - name: Upload testsuite-${{ matrix.os }}-${{ matrix.isam }}.log + uses: actions/upload-artifact@v4 if: failure() with: - name: testsuite.log + name: testsuite-${{ matrix.os }}-${{ matrix.isam }}.log path: _build/tests/testsuite.log - - uses: actions/upload-artifact@v4 + - name: Upload coverage report + uses: actions/upload-artifact@v4 with: - name: coverage + name: coverage-${{ matrix.os }}-${{ matrix.isam }} path: _build/GnuCOBOL-**-coverage/ - - uses: codecov/codecov-action@v2 + - name: Cache newcob.val + uses: actions/cache@v4 + with: + path: _build/tests/cobol85/newcob.val + key: newcob-val + save-always: true + enableCrossOsArchive: true + + - name: Extended coverage + run: | + make -C _build/tests/cobol85 EXEC85 test \ + --jobs=$(($(nproc)+1)) \ + --keep-going + make -C _build code-coverage-capture \ + CODE_COVERAGE_OUTPUT_DIRECTORY=extended-coverage \ + CODE_COVERAGE_OUTPUT_FILE=extended-coverage.info \ + CODE_COVERAGE_DIRECTORY="$(realpath .)/_build" + + - name: Upload extended coverage report + uses: actions/upload-artifact@v4 + with: + name: extended-coverage-${{ matrix.os }}-${{ matrix.isam }} + path: _build/extended-coverage + + - name: Upload coverage to codecov + uses: codecov/codecov-action@v2 with: # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos directory: _build # Shall fail until we have a working account on codecov.io fail_ci_if_error: false # optional (default = false) verbose: true # optional (default = false) - diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index 165b240df..26e5dcf03 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [ gc4 ] push: - branches: [ gc4 ] # manual run in actions tab - for all branches workflow_dispatch: @@ -46,6 +45,7 @@ jobs: - Release runs-on: ${{ matrix.os }} + timeout-minutes: 45 steps: diff --git a/.github/workflows/windows-msys1.yml b/.github/workflows/windows-msys1.yml index ef8a2ecbf..120f51b48 100644 --- a/.github/workflows/windows-msys1.yml +++ b/.github/workflows/windows-msys1.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [ gc4 ] push: - branches: [ gc4 ] # manual run in actions tab - for all branches workflow_dispatch: @@ -45,6 +44,7 @@ jobs: - release runs-on: ${{ matrix.os }} + timeout-minutes: 45 steps: @@ -96,7 +96,7 @@ jobs: bash -lc "cd %MINGW_BISON_VERS% && ./configure --prefix=/mingw && make" bash -lc "cd %MINGW_BISON_VERS% && make install" - # Note: actually unavailable, so skip (works with the GMP alredy provided) + # Note: actually unavailable, so skip (works with the GMP already provided) # - name: Install GMP # if: steps.restore-msys.outputs.cache-hit != 'true' # run: | diff --git a/.github/workflows/windows-msys2.yml b/.github/workflows/windows-msys2.yml index de84a65a5..52ef7dd9d 100644 --- a/.github/workflows/windows-msys2.yml +++ b/.github/workflows/windows-msys2.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [ gc4 ] push: - branches: [ gc4 ] # manual run in actions tab - for all branches workflow_dispatch: @@ -13,17 +12,15 @@ jobs: strategy: fail-fast: false matrix: - os: - - windows-latest - isam: - - db # Purely informative - arch: - - x64 # Purely informative - target: - - debug - - release + include: + - { os: windows-latest, isam: db, target: release, sys: mingw64, env: x86_64 } + - { os: windows-latest, isam: db, target: debug, sys: mingw64, env: x86_64 } + - { os: windows-latest, isam: db, target: debug, sys: ucrt64, env: ucrt-x86_64 } + - { os: windows-latest, isam: db, target: debug, sys: clang64, env: clang-x86_64 } + # - { target: debug, sys: mingw32, env: i686 } runs-on: ${{ matrix.os }} + timeout-minutes: 45 steps: @@ -46,19 +43,24 @@ jobs: echo CFGOPT="--enable-debug --enable-cobc-internal-checks --enable-hardening" >> $env:GITHUB_ENV } - - name: Install MSYS2 packages + - name: Install packages uses: msys2/setup-msys2@v2 with: update: true - msystem: ucrt64 - install: autoconf automake libtool make mingw-w64-ucrt-x86_64-ncurses mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-cjson mingw-w64-ucrt-x86_64-db mingw-w64-ucrt-x86_64-gmp libdb-devel mingw-w64-ucrt-x86_64-gcc flex bison gmp-devel help2man texinfo gettext-devel + msystem: ${{matrix.sys}} + install: autoconf automake libtool make flex bison help2man texinfo + mingw-w64-${{matrix.env}}-cc + mingw-w64-${{matrix.env}}-gmp gmp-devel + mingw-w64-${{matrix.env}}-gettext-runtime gettext-devel + mingw-w64-${{matrix.env}}-ncurses + mingw-w64-${{matrix.env}}-libxml2 + mingw-w64-${{matrix.env}}-cjson + mingw-w64-${{matrix.env}}-db libdb-devel - name: Bootstrap GnuCOBOL shell: msys2 {0} run: | - ./autogen.sh - autoconf - autoreconf --install --force + ./build_aux/bootstrap install - name: Configure GnuCOBOL shell: msys2 {0} @@ -67,56 +69,60 @@ jobs: cd _build ../configure $CFGOPT --with-db --with-indexed=db --prefix=/opt/cobol/gnucobol - - name: Upload config-${{ matrix.target }}.log + - name: Upload config-${{matrix.sys}}-${{matrix.target}}.log uses: actions/upload-artifact@v4 if: failure() with: - name: config-${{ matrix.target }}.log + name: config-${{matrix.sys}}-${{matrix.target}}.log path: ${{ env.GITHUB_WORKSPACE }}/_build/config.log - name: Build GnuCOBOL shell: msys2 {0} run: | - cd _build - make --jobs=$(($(nproc)+1)) - - - name: Install GnuCOBOL - shell: msys2 {0} - run: | - cd _build - make install - find /opt/cobol > install.log + make -C _build --jobs=$(($(nproc)+1)) - - name: Upload install-${{ matrix.target }}.log - uses: actions/upload-artifact@v4 + - name: Cache newcob.val + uses: actions/cache@v4 with: - name: install-${{ matrix.target }}.log - path: ${{ env.GITHUB_WORKSPACE }}/_build/install.log + path: _build/tests/cobol85/newcob.val + key: newcob-val + save-always: true + enableCrossOsArchive: true - name: Run testuite continue-on-error: true shell: msys2 {0} run: | - sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at - sed -i '/AT_SETUP(\[ACCEPT OMITTED (SCREEN)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_accept.at - cd _build/tests - make check - make test - - - name: Upload testsuite-${{ matrix.target }}.log + sed '/AT_SETUP(\[temporary path invalid\])/a \ + AT_SKIP_IF(\[true\])' -i tests/testsuite.src/used_binaries.at + sed '/AT_SETUP(\[ACCEPT OMITTED (SCREEN)\])/a \ + AT_SKIP_IF(\[true\])' -i tests/testsuite.src/run_accept.at + make -C _build/tests checkall \ + --jobs=$(($(nproc)+1)) \ + TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \ + make -C _build/tests check \ + TESTSUITEFLAGS="--recheck --verbose" + + - name: Upload testsuite-${{matrix.sys}}-${{matrix.target}}.log uses: actions/upload-artifact@v4 with: - name: testsuite-${{ matrix.target }}.log + name: testsuite-${{matrix.sys}}-${{matrix.target}}.log path: ${{ env.GITHUB_WORKSPACE }}/_build/tests/testsuite.log - name: Package GnuCOBOL + shell: msys2 {0} + run: | + make -C _build distmingw + + - name: Tar GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}} shell: msys2 {0} run: | cd _build - make distmingw + tar -cvf ../GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}}.tar \ + "${{ env.DISTDIR }}" - - name: Upload GnuCOBOL_mingw-${{ matrix.target }} + - name: Upload GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}}.tar uses: actions/upload-artifact@v4 with: - name: GnuCOBOL_mingw-${{ matrix.target }} - path: ${{ env.GITHUB_WORKSPACE }}/_build/${{ env.DISTDIR }} + name: GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}}.tar + path: GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}}.tar diff --git a/TODO b/TODO index cb5db8424..d2ba1c24e 100644 --- a/TODO +++ b/TODO @@ -197,3 +197,47 @@ GnuCOBOL 4 provides this quite complete at runtime, too. Yes, we should, for now: refer to the GnuCOBOL Programmer's Guide https://sourceforge.net/p/gnucobol/code/HEAD/tree/external-doc/guide/ + +7 Issues raised during forward-porting of 3.x patches + +7.1 General issues + +- Decide what to do about gcdiff, especially under MSVC + +- Correctly implement delay-loading under MSVC + +- Possibly drop usage of external cobxref + +- Fix any remaining failed test case + +- Rework the context-sensitive reserved words handling (or use a bigger type) + +7.2 CHECKMEs, TODOs and #if-0'ed code + +- Investigate the two CHECKMEs about bdb_close_cursor in fbdb.c:ix_bdb_write_internal + +- Investigate the CHECKMEs in typeck.c:validate_move and in particular why it was necessary to add CB_LITERAL_P (checks to add in parser) + +- Investigate the CHECKME about the need for comma in move.c:cob_move_display_to_edited (first in GC 3.x) + +- Investigate the CHECKME about moving cob_set_exception call in common.c:cob_module_global_enter + +- Check the TODO about cb_default_byte in codegen.c:output_initialize + +- Make status an enum instead of an int in fileio.c:cob_file_save_status as per TODO + +- Move the IO status codes from common.h to fileio.h as per TODO + +- Check the #if-0'ed code in field.c:validate_field_value + +- Check the #if-0'ed code for setting last_exception_source in common.c:cob_set_exception + +- Check the #if-0'ed code about EOP exception in fileio.c:cob_file_save_status + +7.3 Other issues + +- Investigate the need to define READ_WRITE_NEEDS_FLUSH under MacOS ("LINE SEQUENTIAL COMMIT / ROLLBACK" test fails if not defined) + +- Check if should use strcpy or memcpy with computed max-length for file_open_name in fileio.c:cob_open + +- Check what we should do about the casts used to remove const on open_mode in fileio.c and others (eg. in cob_file_open) diff --git a/cobc/typeck.c b/cobc/typeck.c index 221f47634..8fc2c99b5 100644 --- a/cobc/typeck.c +++ b/cobc/typeck.c @@ -10883,7 +10883,7 @@ cb_check_overlapping (struct cb_field *src_f, struct cb_field *dst_f, /* Check for same parent field */ #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable: 6011) // cb_field_founder always returns a valid pointer +#pragma warning(disable: 6011) /* cb_field_founder always returns a valid pointer */ #endif ff1 = cb_field_founder (src_f); ff2 = cb_field_founder (dst_f); diff --git a/libcob/common.c b/libcob/common.c index 1d799ac5b..9e37420e0 100644 --- a/libcob/common.c +++ b/libcob/common.c @@ -3363,8 +3363,9 @@ cob_module_global_enter (cob_module **module, cob_global **mglobal, mod_ptr->cob_pointer = *module; mod_ptr->next = cob_module_list; cob_module_list = mod_ptr; - } else if (entry == 0 - && !cobglobptr->cob_call_from_c) { + } else + if (entry == 0 + && !cobglobptr->cob_call_from_c) { register int k = 0; register cob_module *mod; for (mod = COB_MODULE_PTR; mod; mod = mod->next) { @@ -4664,7 +4665,7 @@ static set_cob_time_from_localtime (time_t curtime, static time_t last_time = 0; static struct cob_time last_cobtime; - // FIXME: on reseting appropriate locale set last_time_no_sec = 0 + /* FIXME: on reseting appropriate locale set last_time_no_sec = 0 */ if (curtime == last_time) { memcpy (cb_time, &last_cobtime, sizeof (struct cob_time)); return; @@ -7846,7 +7847,7 @@ set_config_val (char *value, int pos) || *ptr == '+') { if ((data_type & ENV_SINT) == 0) { conf_runtime_error_value (ptr, pos); - conf_runtime_error (1, _("should be unsigned")); // cob_runtime_warning + conf_runtime_error (1, _("should be unsigned")); /* cob_runtime_warning */ return 1; } sign = *ptr; diff --git a/libcob/fileio.c b/libcob/fileio.c index c58318f64..ab27f5169 100644 --- a/libcob/fileio.c +++ b/libcob/fileio.c @@ -41,6 +41,10 @@ #include #endif +#if defined (COB_EXPERIMENTAL) && defined (HAVE_LOCALE_H) +#include +#endif + #ifdef HAVE_SIGNAL_H #include #endif diff --git a/libcob/fileio.h b/libcob/fileio.h index 97b608755..d7677d9a8 100644 --- a/libcob/fileio.h +++ b/libcob/fileio.h @@ -47,10 +47,6 @@ #include #include -#if defined (COB_EXPERIMENTAL) && defined (HAVE_LOCALE_H) -#include -#endif - #ifndef EDEADLK #ifdef EDEADLOCK /* SCO name for EDEADLK */ #define EDEADLK EDEADLOCK diff --git a/libcob/intrinsic.c b/libcob/intrinsic.c index 7fa627699..071c98a89 100644 --- a/libcob/intrinsic.c +++ b/libcob/intrinsic.c @@ -3951,7 +3951,7 @@ cob_intr_hex_to_char (cob_field *srcfield) if (size * 2 != srcfield->size) { /* posibly raise nonfatal exception here -> we only process the valid ones */ - // size--; + /* size--; */ } COB_ATTR_INIT (COB_TYPE_ALPHANUMERIC, 0, 0, 0, NULL); diff --git a/libcob/screenio.c b/libcob/screenio.c index 9984eb1a4..4ea479da6 100644 --- a/libcob/screenio.c +++ b/libcob/screenio.c @@ -2064,7 +2064,7 @@ cob_screen_get_all (const int initial_curs, const int accept_timeout) mevent.bstate &= cob_mask_accept; if (mevent.bstate != 0) { global_return = mouse_to_exception_code (mevent.bstate); - cob_move_cursor (mline, mcolumn); // move cursor to pass position + cob_move_cursor (mline, mcolumn); /* move cursor to pass position */ goto screen_return; } continue; @@ -3015,7 +3015,7 @@ field_accept (cob_field *f, const int sline, const int scolumn, cob_field *fgc, mevent.bstate &= cob_mask_accept; if (mevent.bstate != 0) { fret = mouse_to_exception_code (mevent.bstate); - cob_move_cursor (mline, mcolumn); // move cursor to pass position + cob_move_cursor (mline, mcolumn); /* move cursor to pass position */ goto field_return; } } @@ -3257,7 +3257,7 @@ field_accept (cob_field *f, const int sline, const int scolumn, cob_field *fgc, mevent.bstate &= cob_mask_accept; if (mevent.bstate != 0) { fret = mouse_to_exception_code (mevent.bstate); - cob_move_cursor (mline, mcolumn); // move cursor to pass position + cob_move_cursor (mline, mcolumn); /* move cursor to pass position */ goto field_return; } continue; diff --git a/tests/testsuite.src/run_misc.at b/tests/testsuite.src/run_misc.at index 8303f740b..1bf762e79 100644 --- a/tests/testsuite.src/run_misc.at +++ b/tests/testsuite.src/run_misc.at @@ -7839,7 +7839,7 @@ dump (unsigned char *data) for (i = 0; i < 4; i++) printf ("%02X", data[i]); puts (" ."); - fflush(stdout); + fflush (stdout); return 0; } ]]) @@ -10244,7 +10244,6 @@ CAPI (void *p1, ...) } printf ("CALL with %d parameters\n",nargs); fflush (stdout); - fflush(stdout); for (k=1; k <= nargs; k++) { type = cob_get_param_type (k); digits = cob_get_param_digits (k); @@ -10599,7 +10598,7 @@ CAPI (void *p1, ...) printf("Line%3d: ",k); } printf ("CALL with %d parameters\n",nargs); - fflush(stdout); + fflush (stdout); for (k=1; k <= nargs; k++) { cob_field *fld = cob_get_param_field (k, "CAPI"); type = cob_get_field_type (fld); @@ -10663,7 +10662,7 @@ CAPI (void *p1, ...) cob_put_field_str (fld, wrk); } printf (";\n"); - fflush(stdout); + fflush (stdout); } return 0; }