From 53836a44fa83d6476c2950d13375991216923c4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:56:48 +0900 Subject: [PATCH 001/188] Bump org.xerial:sqlite-jdbc from 3.46.0.0 to 3.46.0.1 in /libcobj (#463) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.0.0 to 3.46.0.1. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.0.0...3.46.0.1) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d317d07f..fe9f03eb 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.2.1-jre") - implementation("org.xerial:sqlite-jdbc:3.46.0.0") + implementation("org.xerial:sqlite-jdbc:3.46.0.1") implementation("commons-cli:commons-cli:1.8.0") testImplementation("org.junit.jupiter:junit-jupiter:5.10.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From d694a93173f4e4fe104b382a8be4879275ec5e7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 10 Aug 2024 14:17:39 +0900 Subject: [PATCH 002/188] Bump com.github.spotbugs from 6.0.19 to 6.0.20 in /libcobj (#470) Bumps com.github.spotbugs from 6.0.19 to 6.0.20. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index fe9f03eb..1e3e4cae 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.19" + id("com.github.spotbugs") version "6.0.20" } repositories { From 388dd4d3c1437d7e58a2d38f5e8b0ee845c9e18a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:21:55 +0900 Subject: [PATCH 003/188] Bump org.slf4j:slf4j-api from 2.0.13 to 2.0.16 in /libcobj (#472) Bumps org.slf4j:slf4j-api from 2.0.13 to 2.0.16. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 1e3e4cae..9c9d898d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") - implementation("org.slf4j:slf4j-api:2.0.13") + implementation("org.slf4j:slf4j-api:2.0.16") implementation("org.slf4j:slf4j-simple:2.0.13") } From 2022a777e10cd008455c2ae25f232e4da2e895e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:38:45 +0900 Subject: [PATCH 004/188] Bump org.slf4j:slf4j-simple from 2.0.13 to 2.0.16 in /libcobj (#471) Bumps org.slf4j:slf4j-simple from 2.0.13 to 2.0.16. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 9c9d898d..50e99d7c 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -40,7 +40,7 @@ dependencies { spotbugs("com.github.spotbugs:spotbugs:4.8.6") implementation("org.slf4j:slf4j-api:2.0.16") - implementation("org.slf4j:slf4j-simple:2.0.13") + implementation("org.slf4j:slf4j-simple:2.0.16") } java { From ce62683ab7d1f503c72f957fe400f462cbd1ab1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:32:31 +0900 Subject: [PATCH 005/188] Bump org.junit.jupiter:junit-jupiter from 5.10.3 to 5.11.0 in /libcobj (#473) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 50e99d7c..24d705d0 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.2.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.0.1") implementation("commons-cli:commons-cli:1.8.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.10.3") + testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From f9252236eb3c9ea9f256bc42a4ed39ba8fb78b80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:25:51 +0900 Subject: [PATCH 006/188] Bump commons-cli:commons-cli from 1.8.0 to 1.9.0 in /libcobj (#474) Bumps commons-cli:commons-cli from 1.8.0 to 1.9.0. --- updated-dependencies: - dependency-name: commons-cli:commons-cli dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 24d705d0..6486c65a 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -33,7 +33,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.2.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.0.1") - implementation("commons-cli:commons-cli:1.8.0") + implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") From 0208eea957998975092bbfea77c55726ba7b26da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:27:55 +0900 Subject: [PATCH 007/188] Bump com.google.guava:guava from 33.2.1-jre to 33.3.0-jre in /libcobj (#476) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 6486c65a..b60f9756 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.2.1-jre") + implementation("com.google.guava:guava:33.3.0-jre") implementation("org.xerial:sqlite-jdbc:3.46.0.1") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") From 088de9106e75f8259f7eb9b686d7d68fbfe99684 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:04:00 +0900 Subject: [PATCH 008/188] Bump org.xerial:sqlite-jdbc from 3.46.0.1 to 3.46.1.0 in /libcobj (#475) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.0.1 to 3.46.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.0.1...3.46.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index b60f9756..6d65d22d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.3.0-jre") - implementation("org.xerial:sqlite-jdbc:3.46.0.1") + implementation("org.xerial:sqlite-jdbc:3.46.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From b996f403f390bb1c2f27a159264b98319340648f Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 28 Aug 2024 00:19:11 +0900 Subject: [PATCH 009/188] Add detailed descriptions of CLASSPATH settings (#477) --- README.md | 5 +++++ README_JP.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 3dc8b582..70e6794b 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ sudo make install ### Set $CLASSPATH Add /usr/lib/opensourcecobol4j/libcobj.jar to the environment variable $CLASSPATH. +For instance, run the following code in Unix-like systems. + +```bash +export CLASSPATH="$CLASSPATH:/usr/lib/opensourcecobol4j/libcobj.jar" +``` If you want to check installations of older versions, see [doc/installation/](./doc/installation) directory respectively. diff --git a/README_JP.md b/README_JP.md index 5adc8cbb..e502d53e 100644 --- a/README_JP.md +++ b/README_JP.md @@ -68,6 +68,11 @@ sudo make install ### $CLASSPATHの設定 /usr/lib/opensourcecobol4j/libcobj.jar を 環境変数$CLASSPATH に追加する. +たとえば下記のコードを実行する。 + +```bash +export CLASSPATH="$CLASSPATH:/usr/lib/opensourcecobol4j/libcobj.jar" +``` 古いバージョンのインストール方法は、[doc/installation_jp](./doc/installation_jp)をご覧ください. From 47dd008f3a184c04293900401c656d46c68017f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:50:05 +0900 Subject: [PATCH 010/188] Bump com.github.spotbugs from 6.0.20 to 6.0.21 in /libcobj (#478) Bumps com.github.spotbugs from 6.0.20 to 6.0.21. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 6d65d22d..e803cc30 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.20" + id("com.github.spotbugs") version "6.0.21" } repositories { From 20e98a62695ac03638a9191e66f7db256a8522d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 19:14:58 +0900 Subject: [PATCH 011/188] Bump com.github.spotbugs from 6.0.21 to 6.0.22 in /libcobj (#479) Bumps com.github.spotbugs from 6.0.21 to 6.0.22. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index e803cc30..490eede3 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.21" + id("com.github.spotbugs") version "6.0.22" } repositories { From 319b4686471d9b1fba5a65b3353367a89d037f81 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:28:31 +0900 Subject: [PATCH 012/188] Delete unnecessary file (#480) --- .github/workflows/windows-test.yml | 2 +- opensourcecobol4j.sln | 25 ------------------------- win/x64/Release/cobj.exe | Bin 539648 -> 0 bytes 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 opensourcecobol4j.sln delete mode 100644 win/x64/Release/cobj.exe diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index e1801a10..917b88ff 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -24,7 +24,7 @@ jobs: uses: actions/download-artifact@v4 with: name: cobj.exe - path: win/cobj.exe + path: win/x64/Release/ - name: Install Java uses: actions/setup-java@v4 diff --git a/opensourcecobol4j.sln b/opensourcecobol4j.sln deleted file mode 100644 index 1c8de1d9..00000000 --- a/opensourcecobol4j.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.9.34728.123 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "opensourcecobol4j", "opensourcecobol4j\opensourcecobol4j.vbproj", "{FA5DE185-53AB-4630-A7BD-6BA0732385D6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FA5DE185-53AB-4630-A7BD-6BA0732385D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FA5DE185-53AB-4630-A7BD-6BA0732385D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FA5DE185-53AB-4630-A7BD-6BA0732385D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FA5DE185-53AB-4630-A7BD-6BA0732385D6}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {90D1E2AE-DF84-42DA-BD60-5CF828763604} - EndGlobalSection -EndGlobal diff --git a/win/x64/Release/cobj.exe b/win/x64/Release/cobj.exe deleted file mode 100644 index bea24018072f1d8415ec07a3ddbe6999dea0a00b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539648 zcmd?Sd3aRC(!f1ghJwc-~@(6Q9wjMqbQ1sIKv`aU=n3K zj>ZLX!S#AYuX^1Pa0`nBWXBCeMO@DqQ9wbKEA#!T`^+RP-uJ%m^L>APd7k9-Qe9nL zU0q#WUFT%bs47R2!{JEgHyU*~mhzOJLiP85_>T9~YT#Yhq)DK_&<8xo0 zA37TQ{kTu7qwC4Hdwc$oUFzvSxwvx|nD8 zrE`ybq@GibexaV`5qVxbq3k;8I30G!j zsN$dJl1@{}LWZr=i4I2tRaEzMWOvZaq&&$nZf>lR-PUec_mJiqt)v`|sxML;>8gVc zj<4mprM=_2?y5@vN$cSF-Q#e)@>q&vQoZ66lam&uI5eSlO;xfZO(yv-e!BawndYbN z#ToWEW$Y)wdmWB(-6vmtrT@5oH$Pu)+U^gH>Qi8li%JaWJ* z$LTyfp9I&ZuGRm)Q%2aCu%NwT)du_LqZO>w4I+-rmjGU?iFtN?lL*fCdVHvJWA>gXS(I)HcvQCd@d9R0eJsHf?vnWOkWIx|(~&uZ@vD}j!d%Ul>?S0F1Du$N~iJ7R)jKMRLxTssVNt37e; z=YXQJI?yLHk92f4=UbB;2nZGz@|UD+>a`1EH;5 ztovh-Tx5RAK<_$J2D)Yzoi9gwIAkgd4RdqUvz)T!SyE(fHcTt(d7c8Ja*w|uow+O5 zL5Gq5r@NwBB@VeO-Xh@(U7a};Aa_L%DYmC8T3y~d%Mtj)2p&pu&sz^p-IsLJSFq+= z?us`k_JyxWP*tVohNvf3s%loK8IP_g@0|*Y()>;CJ3@eV{ne<929k63)Lt&4Z5TCc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Tr}MD70IyA$T^?437W}Ra>%#^tZ^82jrcdE|4BHd< zp2GMQoL6Ce4&LWsegW>Au)hrdEh3;s3^a&>7I6>}2~%PrCK?jrAtfSK#Dq#zC%eMNFx#=H^`8&AWzMaEq?_p^mcR|D3Dy zWa~n^*fz=8<#wfQk-2N_db>gXZnd3uL>8a6XYH6=p0pS3l#IS=E1?={VJ_6eJlVYv z7DJO9Uk)pwMW(NX^{_#{Z-q`6k@ctHER4zhNw^48PJo+vK)IO*-di3}Zc$$2Ou3l{ z)c2`oyO{@!8@e8lLh-o5|MsVpZuokK7s=nIdQJL_wJKKQv^6+sOVqM9b!?Lwc0&C+ zr*>UZw`$a^2K8!*TGggbZBnC7s88qArc3HljhfV;9xYLe+SH*0B1nrV4ebPEA^*9<5M|)~Q1sYS7sY*vV9=_3H0;H=`)} zaYfB?vi1)BjCPX=H%L$WfiS^1o@orqJNC8jjt3^)t4%&=(XmQ4Na<2_I#V;t1Fb9v zBxo3t0rEis&7u<2&?+SQWAq87ou|GnQPoPs$62(i)UFciW$IOl^oSaDL0zg6;U@j4 zO()u-2c6M+h!Km4Z2H->V%F`p_j~aYEG6tD96WlF1?}mqhB8>%RUA DqPu4@ From 9be11c70281caeb5174b83226bf37dcca1363606 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:09:15 +0900 Subject: [PATCH 013/188] Fix config file setting for "binary-byteorder" (#481) --- cobj/cobj.h | 5 ++++- cobj/config.c | 4 ++-- tests/data-rep.src/binary.at | 18 +++++++++--------- tests/run.src/miscellaneous.at | 4 ++-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/cobj/cobj.h b/cobj/cobj.h index 76be035e..21456ca1 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -244,7 +244,10 @@ enum cb_assign_clause { CB_ASSIGN_JPH1 /* JP compatibility */ }; -enum cb_binary_byteorder { CB_BYTEORDER_NATIVE, CB_BYTEORDER_BIG_ENDIAN }; +enum cb_binary_byteorder { + CB_BYTEORDER_LITTLE_ENDIAN, + CB_BYTEORDER_BIG_ENDIAN +}; enum cb_binary_size { CB_BINARY_SIZE_2_4_8, /* 2,4,8 bytes */ diff --git a/cobj/config.c b/cobj/config.c index 4f0bf3b6..a30025d8 100644 --- a/cobj/config.c +++ b/cobj/config.c @@ -229,8 +229,8 @@ int cb_load_conf(const char *fname, const int check_nodef, ret = -1; } } else if (strcmp(name, "binary-byteorder") == 0) { - if (strcmp(val, "native") == 0) { - cb_binary_byteorder = CB_BYTEORDER_NATIVE; + if (strcmp(val, "little-endian") == 0) { + cb_binary_byteorder = CB_BYTEORDER_LITTLE_ENDIAN; } else if (strcmp(val, "big-endian") == 0) { cb_binary_byteorder = CB_BYTEORDER_BIG_ENDIAN; } else { diff --git a/tests/data-rep.src/binary.at b/tests/data-rep.src/binary.at index 6a3dab9a..7ffcf7f4 100644 --- a/tests/data-rep.src/binary.at +++ b/tests/data-rep.src/binary.at @@ -215,9 +215,9 @@ AT_CHECK([java prog], [0], AT_CLEANUP -# 2-4-8 native +# 2-4-8 little-endian -AT_SETUP([BINARY: 2-4-8 native]) +AT_SETUP([BINARY: 2-4-8 little-endian]) AT_CHECK([${SKIP_TEST}]) if test "x$COB_BIGENDIAN" = "xyes"; then @@ -227,7 +227,7 @@ else AT_DATA([test.conf], [ include "cobol2002.conf" binary-size: 2-4-8 -binary-byteorder: native +binary-byteorder: little-endian ]) AT_DATA([dump.java], [ @@ -616,9 +616,9 @@ AT_CHECK([java prog], [0], AT_CLEANUP -# 1-2-4-8 native +# 1-2-4-8 little-endian -AT_SETUP([BINARY: 1-2-4-8 native]) +AT_SETUP([BINARY: 1-2-4-8 little-endian]) AT_CHECK([${SKIP_TEST}]) if test "x$COB_BIGENDIAN" = "xyes"; then @@ -628,7 +628,7 @@ else AT_DATA([test.conf], [ include "cobol2002.conf" binary-size: 1-2-4-8 -binary-byteorder: native +binary-byteorder: little-endian ]) AT_DATA([dump.java], [ @@ -1019,9 +1019,9 @@ AT_CHECK([java prog], [0], AT_CLEANUP -# 1--8 native +# 1--8 little-endian -AT_SETUP([BINARY: 1--8 native]) +AT_SETUP([BINARY: 1--8 little-endian]) AT_CHECK([${SKIP_TEST}]) if test "x$COB_BIGENDIAN" = "xyes"; then @@ -1031,7 +1031,7 @@ else AT_DATA([test.conf], [ include "cobol2002.conf" binary-size: 1--8 -binary-byteorder: native +binary-byteorder: little-endian ]) AT_DATA([dump.java], [ diff --git a/tests/run.src/miscellaneous.at b/tests/run.src/miscellaneous.at index 2bedb199..0c18e283 100644 --- a/tests/run.src/miscellaneous.at +++ b/tests/run.src/miscellaneous.at @@ -602,7 +602,7 @@ AT_CHECK([test $SHREXT != "dll" || exit 77]) AT_DATA([test.conf], [ include "default.conf" -binary-byteorder: native +binary-byteorder: little-endian ]) AT_DATA([dump.c], [ @@ -656,7 +656,7 @@ AT_CHECK([test $SHREXT = "dll" || exit 77]) AT_DATA([test.conf], [ include "default.conf" -binary-byteorder: native +binary-byteorder: little-endian ]) AT_DATA([dump.c], [ From 3682718367a803c0027d977cca4944f235a34468 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:00:44 +0900 Subject: [PATCH 014/188] Bump com.google.guava:guava from 33.3.0-jre to 33.3.1-jre in /libcobj (#482) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 490eede3..3d3729f0 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.3.0-jre") + implementation("com.google.guava:guava:33.3.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") From aa9d4c7b7ca071bdb24ab33ce1fa1d0877ff38d4 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:35:29 +0900 Subject: [PATCH 015/188] Fix cobj-api options and add cobj-api/SpringBoot instructions (#483) --- README.md | 27 ++- README_JP.md | 25 ++- doc/cobj-api_SpringBoot.md | 199 ++++++++++++++++++ doc/cobj-api_SpringBoot_JP.md | 199 ++++++++++++++++++ image/doc1.png | Bin 0 -> 118737 bytes image/doc2.png | Bin 0 -> 104818 bytes image/doc3.png | Bin 0 -> 40512 bytes image/doc4.png | Bin 0 -> 54778 bytes image/doc5.png | Bin 0 -> 7051 bytes image/doc6.png | Bin 0 -> 7002 bytes image/doc7.png | Bin 0 -> 7001 bytes image/doc8.png | Bin 0 -> 42922 bytes image/doc9.png | Bin 0 -> 129553 bytes .../libcobj/user_util/cobj_api/ApiFiles.java | 64 +++--- .../user_util/cobj_api/ApiFilesOptions.java | 92 +++++--- .../libcobj/user_util/cobj_api/testRecord.txt | 6 +- 16 files changed, 538 insertions(+), 74 deletions(-) create mode 100755 doc/cobj-api_SpringBoot.md create mode 100755 doc/cobj-api_SpringBoot_JP.md create mode 100644 image/doc1.png create mode 100644 image/doc2.png create mode 100644 image/doc3.png create mode 100644 image/doc4.png create mode 100644 image/doc5.png create mode 100644 image/doc6.png create mode 100644 image/doc7.png create mode 100644 image/doc8.png create mode 100644 image/doc9.png mode change 100644 => 100755 libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java diff --git a/README.md b/README.md index 70e6794b..e25d82a6 100644 --- a/README.md +++ b/README.md @@ -89,22 +89,29 @@ After the build is completed, "cobj.exe" will be created in `win/x64/Debug` or ` 1. Install JDK. https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows 2. Open PowerShell. -3. Move to "libcobj" directory and execute `./gradlew shadowJar` -![alt text](image/readme3.png) -Then, libcobj.jar will be created in `libcobj/app/build/libs/`. +3. Move to "libcobj" directory and execute `.\gradlew shadowJar` + ``` + cd libcobj + .\gradlew shadowJar + ``` + + Then, libcobj.jar will be created in `libcobj\app\build\libs\`. ### Place files in the appropriate location 1. If you build in Debug mode, change the 5th line of win/make-install.ps1 from `\x64\Release\cobj.exe` to `\x64\Debug\cobj.exe`. 2. Open PowerShell 3. Move to "win" directory and execute make-install.ps1. -![alt text](image/readme4.png) + ``` + cd win + .\make-install.ps1 + ``` * Each file is placed in the following location. -| File name | Location | -|---|---| -| cobj.exe | C:\opensourcecobol4j\bin | -| libcobj.jar | C:\opensourcecobol4j\lib | -| config files | C:\opensourcecobol4j\config | + | File name | Location | + |---|---| + | cobj.exe | C:\opensourcecobol4j\bin | + | libcobj.jar | C:\opensourcecobol4j\lib | + | config files | C:\opensourcecobol4j\config | * If you want to change the location of the files, modify make-install.ps1. @@ -267,6 +274,8 @@ Options: -v, --version Prints the version of the cobj-api ``` +For information on how to create a Spring Boot application using cobj-api, see [here](./doc/cobj-api_SpringBoot.md). + ## Contributing Guidelines for contributing to opensource COBOL 4J can be found in [CONTRIBUTING.md](./CONTRIBUTING.md). diff --git a/README_JP.md b/README_JP.md index e502d53e..d5b5119d 100644 --- a/README_JP.md +++ b/README_JP.md @@ -85,9 +85,12 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ 1. JDKをインストールする. https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows 2. PowerShellを開く. -3. libcobjディレクトリに移動し、`./gradlew shadowJar`を実行する. -![alt text](image/readme3.png) -これにより、"libcobj.jar"が`libcobj/app/build/libs/`に作成される. +3. libcobjディレクトリに移動し、`.\gradlew shadowJar`を実行する. + ``` + cd libcobj + .\gradlew shadowJar + ``` + これにより、"libcobj.jar"が`libcobj\app\build\libs\`に作成される. ### ソリューションファイルのビルド 1. opensource COBOL 4Jのファイル一式をダウンロードする. @@ -102,15 +105,18 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows 1. Debugモードでビルドした場合、win/make-install.ps1の5行目を`\x64\Release\cobj.exe`から`\x64\Debug\cobj.exe`に変更する. 2. PowerShellを開く. 3. ”win”ディレクトリに移動し、make-install.ps1を実行する. -![alt text](image/readme4.png) + ``` + cd win + .\make-install.ps1 + ``` * ファイルは下記の場所にそれぞれ配置される. * ファイルの配置場所を変更したい場合は、make-install.ps1に記載してあるパスを編集する. -| ファイル名 | 配置場所 | -|---|---| -| cobj.exe | C:\opensourcecobol4j\bin | -| libcobj.jar | C:\opensourcecobol4j\lib | -| configファイル | C:\opensourcecobol4j\config | + | ファイル名 | 配置場所 | + |---|---| + | cobj.exe | C:\opensourcecobol4j\bin | + | libcobj.jar | C:\opensourcecobol4j\lib | + | configファイル | C:\opensourcecobol4j\config | ### 環境変数の設定 1. 環境変数PATHに`C:\opensourcecobol4j\bin`を追加する. @@ -271,6 +277,7 @@ Options: -o=, --output-dir= Set the output destination of the java file to an arbitrary destination -v, --version Prints the version of the cobj-api ``` +cobj-apiを用いたSpring Bootアプリケーションの作成方法については、[こちら](./doc/cobj-api_SpringBoot_JP.md)を参照してください。 ## コントリビューㇳ diff --git a/doc/cobj-api_SpringBoot.md b/doc/cobj-api_SpringBoot.md new file mode 100755 index 00000000..1bcfcfa2 --- /dev/null +++ b/doc/cobj-api_SpringBoot.md @@ -0,0 +1,199 @@ +# Build a Spring Boot project using Visual Studio Code +1. Install the "Spring Boot Extension Pack", a Visual Studio Code extension. + ![alt text](../image/doc1.png) + +1. Install the "Java Extension Pack", a Visual Studio Code extension. +![alt text](../image/doc2.png) + +1. Select "Explorer" in the left sidebar and click "Create Java Project". +![alt text](../image/doc3.png) + +1. Select Spring Boot as the project type. +![alt text](../image/doc4.png) + +1. Select the build tool from Maven or Gradle. + +1. Select Spring Boot version. + +1. Select Java as the language. +![alt text](../image/doc5.png) + +1. Enter any Group ID. In this step, enter "com.example". +![alt text](../image/doc6.png) + +1. Enter any Artifact ID. In this step, enter "cobj_api_test". +![alt text](../image/doc7.png) + +1. Select the packaging type from jar or war. +1. Select the Java version. + +1. Select the dependent libraries. In this step, only Spring Web is selected, but other libraries can be selected as needed. +![alt text](../image/doc8.png) + +1. Select the directory to create the project in and press enter. +The project will be created according to the above steps. +![alt text](../image/doc9.png) + +# Create an API using Spring Boot/cobj-api +1. Prepare a COBOL program with a `LINKAGE SECTION`. In this procedure, the following sample program will be used. + + sample.cbl + ``` cobol + IDENTIFICATION DIVISION. + PROGRAM-ID. sample. + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. + DATA DIVISION. + WORKING-STORAGE SECTION. + LINKAGE SECTION. + 01 DATA1 PIC 9(09). + 01 DATA2 PIC 9(09). + 01 DATA3 PIC 9(09). + 01 SUM-DATA PIC 9(09). + PROCEDURE DIVISION + USING DATA1, + DATA2, + DATA3, + SUM-DATA. + MAIN-SECTION. + ADD DATA1 DATA2 DATA3 TO SUM-DATA. + GOBACK. + + ``` + +2. Generate a JSON file from the COBOL program using `cobj` command. + ``` + cobj -info-json-dir=./ -java-package=com.example.cobj_api_test sample.cbl + ``` + * `-info-json-dir`:Option to generate a JSON file from the COBOL program. Specify the destination directory after "=". + * `-java-package`:Option to specify the package name of the generated Java file. Specify the package name after "=". + + This will generate sample.java and info_sample.json. + + info_sample.json describes the variables defined in the "LINKAGE SECTION" and their type names. + ``` + { + "opensourcecobol4j_version": "1.1.1", + "program_id": "sample", + "procedure_division_using_parameters": [ + { + "variable_name": "DATA1", + "java_type": "int" + }, + { + "variable_name": "DATA2", + "java_type": "int" + }, + { + "variable_name": "DATA3", + "java_type": "int" + }, + { + "variable_name": "SUM-DATA", + "java_type": "int" + } + ] + } + ``` +3. Generate Spring Boot Java files from the JSON file using `cobj-api` command. + ``` + cobj-api -java-package=com.example.cobj_api_test info_sample.json + ``` + * `-java-package`:生成されるJavaファイルのパッケージ名を指定するオプション。 + + This will generate sampleController.java and sampleRecord.java. +4. Place sample.java, sampleController.java, and sampleRecord.java in the created Spring Boot project. +In this procedure, they will be placed in "src/main/java/com/example/cobj_api_test". + + File structure + ``` + . + ├── HELP.md + ├── mvnw + ├── mvnw.cmd + ├── pom.xml + ├── src + │ ├── main + │ │ ├── java + │ │ │ └── com + │ │ │ └── example + │ │ │ └── cobj_api_test + │ │ │ ├── CobjApiTestApplication.java + │ │ │ ├── sample.java + │ │ │ ├── sampleController.java + │ │ │ └── sampleRecord.java + │ │ └── resources + │ └── test + └── target + ``` + + +5. Place libcobj.jar anywhere in the project. + + File structure + ``` + . + ├── HELP.md + |── lib + | └── libcobj.jar + ├── mvnw + ├── mvnw.cmd + ├── pom.xml + ├── src + │ ├── main + │ │ ├── java + │ │ │ └── com + │ │ │ └── example + │ │ │ └── cobj_api_test + │ │ │ ├── CobjApiTestApplication.java + │ │ │ ├── sample.java + │ │ │ ├── sampleController.java + │ │ │ └── sampleRecord.java + │ │ └── resources + │ └── test + └── target + ``` + * libcobj.jar is a jar file that is generated under "opensourcecobol4j/libcobj/app/build/lib/" when opensource COBOL 4J is installed. + +6. 依存関係の追加 +* For Gradle + Modify build.gradle as follows. + ``` + dependencies { + implementation files('lib/libcobj.jar') + implementation('org.springframework.boot:spring-boot-starter-web') { + exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' + } + } + ``` + * "spring-boot-starter-web" is a dependency that has been added by default in the previous steps. + * The provider included in "spring-boot-starter-web" conflicts with the provider included in libocbj.jar, so it needs to be excluded with `exclude group`. +* For Maven + Add the following dependency to pom.xml. + ``` + + libcobj + libcobj + 1.1.0(version of cobj) + system + ${basedir}/lib/libcobj.jar + + ``` +7. Build and launch the Spring Boot project. + Run the following command in the root directory of the project. +* For Gradle + ``` + ./gradlew bootRun + ``` +* For Maven + ``` + mvn spring-boot:run + ``` + +8. You can call the API by accessing `http://localhost:8080/?=&=&...` in your browser. + + In the case of the sample program used this time, if you access `http://localhost:8080/sample?DATA1=1&DATA2=2&DATA3=3`, you will get the following JSON: + ``` + {"statuscode":200,"DATA1":1,"DATA2":2,"DATA3":3,"SUM_DATA":6} + ``` + diff --git a/doc/cobj-api_SpringBoot_JP.md b/doc/cobj-api_SpringBoot_JP.md new file mode 100755 index 00000000..f24884b4 --- /dev/null +++ b/doc/cobj-api_SpringBoot_JP.md @@ -0,0 +1,199 @@ +# Visual Studio Code を用いた Spring Bootプロジェクトの構築方法 +1. Visual Studio Codeの拡張機能である、"Spring Boot Extension Pack"をインストールする. +![alt text](../image/doc1.png) + +1. Visual Studio Codeの拡張機能である、"Java Extension Pack"をインストールする. +![alt text](../image/doc2.png) + +1. 左側のサイドバーにある、"Explorer"を選択し、"Create Java Project"をクリックする。 +![alt text](../image/doc3.png) + +1. プロジェクトタイプはSpring Bootを選択する。 +![alt text](../image/doc4.png) + +1. ビルドツールをMavenかGradleから選択する。 + +1. Spring Bootのバージョンを選択する。 + +1. 使用言語はJavaを選択する。 +![alt text](../image/doc5.png) + +1. 任意の Group ID を入力する。この手順では、"com.example"を入力する。 +![alt text](../image/doc6.png) + +1. 任意の Artifact ID を入力する。この手順では、"cobj_api_test"を入力する。 +![alt text](../image/doc7.png) + +1. パッケージングタイプをJarかWarから選択する。 + +1. Javaのバージョンを選択する。 + +1. 依存するライブラリを選択する。この手順ではSpring Webのみを選択するが、必要に応じて他のライブラリを選択することもできる。 +![alt text](../image/doc8.png) + +1. プロジェクトを作成するディレクトリを選択し、enterを押す。 +上記の手順により、プロジェクトが作成される。 +![alt text](../image/doc9.png) + +# Spring Boot/cobj-api を用いたAPIの作成方法 +1. `LINKAGE SECTION`が記述されたCOBOLプログラムを用意する。 + 本手順では下記のサンプルプログラムを使用する。 + + sample.cbl + ``` cobol + IDENTIFICATION DIVISION. + PROGRAM-ID. sample. + ENVIRONMENT DIVISION. + CONFIGURATION SECTION. + DATA DIVISION. + WORKING-STORAGE SECTION. + LINKAGE SECTION. + 01 DATA1 PIC 9(09). + 01 DATA2 PIC 9(09). + 01 DATA3 PIC 9(09). + 01 SUM-DATA PIC 9(09). + PROCEDURE DIVISION + USING DATA1, + DATA2, + DATA3, + SUM-DATA. + MAIN-SECTION. + ADD DATA1 DATA2 DATA3 TO SUM-DATA. + GOBACK. + + ``` + +2. `cobj`コマンドでCOBOLプログラムからJSONファイルを生成する。 + ``` + cobj -info-json-dir=./ -java-package=com.example.cobj_api_test sample.cbl + ``` + * `-info-json-dir`:COBOLプログラムからJSONファイルを生成するオプション。"="の後ろに生成先のディレクトリを指定する。 + * `-java-package`:生成されるJavaファイルのパッケージ名を指定するオプション。"="の後ろにパッケージ名を指定する。 + + これにより、sample.java、info_sample.jsonが生成される。 + + info_sample.jsonには、"LINKAGE SECTION"で定義された変数と、その型名が記述される。 + ``` + { + "opensourcecobol4j_version": "1.1.1", + "program_id": "sample", + "procedure_division_using_parameters": [ + { + "variable_name": "DATA1", + "java_type": "int" + }, + { + "variable_name": "DATA2", + "java_type": "int" + }, + { + "variable_name": "DATA3", + "java_type": "int" + }, + { + "variable_name": "SUM-DATA", + "java_type": "int" + } + ] + } + ``` +3. `cobj-api`コマンドで、JSONファイルからSpring Boot向けのJavaファイルを生成する。 + ``` + cobj-api -java-package=com.example.cobj_api_test info_sample.json + ``` + * `-java-package`:生成されるJavaファイルのパッケージ名を指定するオプション。 + + これにより、sampleController.java、sampleRecord.javaが生成される。 +4. sample.java、sampleController.java、sampleRecord.javaを、作成したSpring Bootプロジェクトに配置する。 +本手順では、"src/main/java/com/example/cobj_api_test"に配置する。 + + ファイル構成: + ``` + . + ├── HELP.md + ├── mvnw + ├── mvnw.cmd + ├── pom.xml + ├── src + │ ├── main + │ │ ├── java + │ │ │ └── com + │ │ │ └── example + │ │ │ └── cobj_api_test + │ │ │ ├── CobjApiTestApplication.java + │ │ │ ├── sample.java + │ │ │ ├── sampleController.java + │ │ │ └── sampleRecord.java + │ │ └── resources + │ └── test + └── target + ``` + + +5. プロジェクトの任意の場所に、libcobj.jarを配置する。 + ファイル構成: + ``` + . + ├── HELP.md + |── lib + | └── libcobj.jar + ├── mvnw + ├── mvnw.cmd + ├── pom.xml + ├── src + │ ├── main + │ │ ├── java + │ │ │ └── com + │ │ │ └── example + │ │ │ └── cobj_api_test + │ │ │ ├── CobjApiTestApplication.java + │ │ │ ├── sample.java + │ │ │ ├── sampleController.java + │ │ │ └── sampleRecord.java + │ │ └── resources + │ └── test + └── target + ``` + * libcobj.jarは、opensource COBOL 4Jをインストールすると、"opensourcecobol4j/libcobj/app/build/lib/"配下に生成されるjarファイルである。 + +6. 依存関係の追加 +* Gradleの場合 + build.gradleを以下のように修正する。 + ``` + dependencies { + implementation files('lib/libcobj.jar') + implementation('org.springframework.boot:spring-boot-starter-web') { + exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' + } + } + ``` + * "spring-boot-starter-web"は、これまでの手順によりデフォルトで追加されている依存関係である。 + * "spring-boot-starter-web"に含まれているプロバイダーが、libocbj.jarに含まれているプロバイダーと競合するため、`exclude group`で除外する必要がある。 +* Mavenの場合 +pom.xmlに以下の依存関係を追加する。 + ``` + + libcobj + libcobj + 1.1.0(cobjのバージョン) + system + ${basedir}/lib/libcobj.jar + + ``` +7. Spring Bootプロジェクトをビルド及び起動する。 + プロジェクトのルートディレクトリで、以下のコマンドを実行する。 +* Gradleの場合 + ``` + ./gradlew bootRun + ``` +* Mavenの場合 + ``` + mvn spring-boot:run + ``` + +8. ブラウザで、`http://localhost:8080/?<データ名1>=<データ値1>&<データ名2>=<データ値2>&...`にアクセスすることで、APIを呼び出すことができる。 + + 今回使用したサンプルプログラムの場合、`http://localhost:8080/sample?DATA1=1&DATA2=2&DATA3=3`にアクセスすると、下記のようなJSONが返される。 + ``` + {"statuscode":200,"DATA1":1,"DATA2":2,"DATA3":3,"SUM_DATA":6} + ``` diff --git a/image/doc1.png b/image/doc1.png new file mode 100644 index 0000000000000000000000000000000000000000..31c306b033f6a248774deba88eeeaf708301ff3a GIT binary patch literal 118737 zcmce7WmH^S(`FJRxCfWuZVkaDI6;HEyF0-NuEE{4ad(2d1#8@0gL@NTn%w(-@2r_0 z^KaHV(7n&ur*_qrlBcS}zRF1;Bj6*vdGiMOi=?RHn>Wx#Z{ED4fP;nHY5ll&1o?RD zq$nZ$rgEI{5Ym7)6Ot8r^QI;m@s9xvqz!K`sp0hI4NC9p-`hdEV&gY&UJAd63Msqk z{?3Hgms113bS@@yl0{Gm`!jsdD$Ys5CY5R!DQ*O6Dzk!Aes%Jk%$PS2fyR}6Rdmc) zN+VQxEem)wZKR|lay5m+;%F2o;5I3LzIc!G-+7;TH?=J`?e`AzFZ186?COl)d5=5s zao8+5?}Fq7`$I^4;DQZs|K|eQUbtOPNmNy%^|By=+TalpMeOZa{`~o~vAId=ga_#d zG-z?$MF@|GP*7J7tuvb#(GE69*^8DKj3TNU;(C2+?EL0N?5FEVU$PE3PfJxbI6NFd zV}u2%mjyYZsEE3)y?v_H#VYpsW?oN0QITv5^57Sqe2WQ$i!@S-zJ#Qtt?NV3)+i$) zE98-kk-tFl!4<8bpq}-iQv`$o$}Yp#`)ol#s;Ptmr~UC^!dLz++A;)vb-iq-_HiIj zor?AhW$Y=KZaNXwDm!u1ykr6Kubs??B#^voUdKuSzLPB}oM3)sU+$OJKw$q?GC}q` zCY;=>YUNm!>vfZ^ZzMh2D-N-ykly&g1qBotTn_JccXt6H2AWJe$%cKQ=*{4xGITVw zk3jJl^%nOl(?93EsI}M-Ns%9-EtVS@YinzbQIxb|X3^VGQE*whY|Nf_oKAgT9!WT? z7d~#CPOe1tvbcyf^rz6rhH-g3ZCmCQ;AXx@RoO;Ri!#pJc{z=teVugDgXu!VC?Z}e zB_xm|YpP81)9rG<>-NBpg(kafG&4m-#hA3T@TbSSZOE!7HsC=7H8e7E*ywtjYG{d= z_Wa3aiTy&ic+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sz48xSw|(FsyQsNQQT_A4L@ zTrsl#s0;40Q1DsBEko#PvKQRlM3AklwPTiapl1L(>kqvG#Gf|Hp$v3Wc`ohf`sxh@ zyXJ-xU;e4WPH-olVRX2Vmf4=>hFC;b$}Yh7g4=K@)ueftZ!bW9Ca_i#?s=m`k4;oB j*BAf5OleYLn@rI`HN5g9_V5Du?Q)0g5eF*{oVxKZ|8c4$ literal 0 HcmV?d00001 diff --git a/image/doc4.png b/image/doc4.png new file mode 100644 index 0000000000000000000000000000000000000000..2f3c2faf936dbfc50d46335400def9695640ad49 GIT binary patch literal 54778 zcmZ^KbyU<{)GkPgbT=p{-Q9?!N+?K4GXf&r%>W}^BHbb-f^-isbi;^rH$$f|z%aud ze80Qa_s6|^E!Ggj@66d}=d+&^^+rpL=n?%R3=9mSm+Hzo7#P?93=GVHhq&n9>}het zqhB!Hb<|#9RE#n1qJO})Rn%0(z^G0jxV6MV|BUaVZsd-ELEL%&h1ry7e~5uGmGDwo z@tu#^!4g4$-c*jjNnUU;_Jhw7XAd#M)I+}KM}NouSgrq@jVfAK)h^u5E=7w+snUDT zaa&qMi)%XLV}xt^JEk^n!zkIwS25U~c+aAPY2Pk$IzPbeLb$@6bK10~=cHhpPoF;d zveKBhRJ-DTSg&n0op<*hQ4`N3lM9NRd<`253%cD1Z1_0-U^GiYtw1%-WzIS+T>NSTU7U~Ebbz8K3Mz%UZdgLpFuF)7_iaM-hbVp?8yOj? zPIcnUiQ?;plpZL!8I7ZGDH3lAhC0)S-+OhGK1uq0(trqIA4S%)x(U?+39IbMVcOY} zmZ>V}jM*F=8X%m1h01c5Jbn$+;tBl!-5ku+H>UqZ#eX*b-PbIVG;; zW%W!$;05QvN^+z<_dX|aXmhiv-ajR?YFKBZFRt2trou&{XnyDCWR<1TZROns#07aV zQ=kayLGk4RNh(a5$rI#nehlut>?!hMO3c*1w$O+ut3q7fQDiFkJ}_936%{>}0$cON z-|ia%Un=i$qwogTTTL6zO~GC&FJDF(aonqRicLz2PR8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^`jtpMe4oO2X34b=lnMJx8OR>LX1q7L5cB4bsyw)~>wi H`1HR3LUFw> literal 0 HcmV?d00001 diff --git a/image/doc6.png b/image/doc6.png new file mode 100644 index 0000000000000000000000000000000000000000..57b9c9f0bf893da53d6a184bee1554a08137d52f GIT binary patch literal 7002 zcmdsc_di@)8?SQ+QpGFL4N;>+?`=3DAzBcxuAVE~gi7!=K$7T?q-h(GzK{Y+D5_eC{;$kJ&8yH=ich zWo{yGDVTe)fO*rw=Ytk(b`)|2^UHs~6@TX@tpKH%{UD`& zk!D1fWx($JV)b~=lKRWv__m>Gr`}i=o7J9} zmxPyxR}1Tg49vR)aZeuxp3FG>Q|QK}9^b=QeP6_|j19(qEq6$%wn@Lh_qI6DPaZa1 zI&CWdUMxc&m&L#LF;Mj1PClKV^^slN!TpNq@to?VBX;4RPtp|vPA(-ZQB@ekx!193 zZi#+zC>7!$Wcg!$?2R&`O1J2w7hyCy@* zwcv((QZJ>%#qSBW9CS`oL5I>MVyeH`f`?_WnNB!8 z1@5t>1Kg8K!U%H3xh4auwvTIDT}UM2G2qbg#}m-@mF}q3sROwVt&PC_04wQ>gRZWt zuskqOAk< z5x9&;qyu@DDcfWng80IHI986-%BNyHkS$m7=o<&qzNPQ?i-R!mEuVSMr?!LBx#kb$ zsIH5HFP5poFuzY4Z7sE-?0#pP#a*-Y&a2xIAV)*Qc8flFnw|sYO03*olgE(6)LT^G zj_q>IfM67Ou`B|$vmZnOqDRT}W-m{*{q{lZ5(g?D4$ts%}XkUU(co2Q*Bq8ytXGLuw2hSsHfc;KiQpIt@qxk?(Gp^ z+-T^mF^_uf*Ozi_fc5ov<-_Av{34U(VWd%_{n?RdJhe-`<>Y5S-1=#o`MugYGF^dy zIoHN+P2=pL{EI0oWZ=Aa_H8@N*fx!}w9Vras!#akFxFU{{NY!cd*4V?UfjEq^lFwsK6uK5zl8qn?SV>Ox)wsyD>KuP< z@@Cko+pAg479PRjS5BQ-#TG~HdzyYl}Dj}w8&k*TO{tE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%d}HLM|C(ZwL*zjE!oZ92 z%8bCW)sSFuljy6NNSA@Ff91Y;#yX1U4UE?ew0G>kDj}|>ylMK@p%sc&5YKoa!F#ls zg)sMP;|68IIhwYfjEK&E)f2lR)$!wAe^-i7f5G}=*@AJ*!(KR9qb5(>v%pBx2M>!f zp{-=>&Xb>@ny!@wX>uKi_qx_gUSsYSb>mtVUd^b)s7?2Pxw#dq(ANmz7$J|UM?Emh zgKO8n`@~XE&GZ_Y2To$tEJ*<2LNl#@{rVX#K5Mqnudh2tYOFx1 zT?g5ls0?z~!x0@N9CUT;UclKj5-5oIefEG)ZWZ~S`S$d!HjVC=J+c5k(WsI>{>#n$ z=4uvnyBJ7pD&D_~LIZ66td%L@kEieZSKt0m=^T(65jXVqzkIYf=}-#|AE^~3U`NKR zscrACRz&cTr$gjU2gOF-0`=7|huXj?B6|aS4`2Gnj`bg_YPi{^ zESMhNu^z6NzGKaJdg)0RxP$;cso?ir{WTFoM(!HwKyg?LD+qKaV7J~VRR&fxv;mB$ zz!u7$%wELaz!&xT6%FrcW)0xYPRnzCf&Wfw&6aRB6r0XelM@1p89XZw&+Nv`vqjUE z+-IDBR`!0O4zfRV_hder0>&vdq*YoEf=pl{@)#WR=#7CoNj&GVAQiLRbwS(|O-CY^ zMzTDs+#X2H@LCGN84&vhWjEM)RN^A&9gp(H+sCe4L5W!RQZ-*yX1FqUdJy;QwIuR1 zVCV(teV3Pc&Q)>3|w=Zy78C2=n9g&U-z$s!v6sF z_eqysR3#tj5T}9K3}9Od-uJ&O64#VW(!v6l>w#zgc%lN!|Eg5{-?feZN7>{5=Tqbl bE~v_?FqKvyms#L_7>T;7_T!3wtb_jtYH9}| literal 0 HcmV?d00001 diff --git a/image/doc7.png b/image/doc7.png new file mode 100644 index 0000000000000000000000000000000000000000..39ebd1244405a27bb3c564a44b36183c0ec7c4ca GIT binary patch literal 7001 zcmZ8m2{@GB+g6gDR4B_3$vTuoC58~PRb(Gz31RGpY{gH6tj(xwWeM5E80*-w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8J)v#LfdPeVUpDX|}w+XoeWW@KPY6DH{4h`;Uv1oMiIEOKp*607D3{qt+IP zc<3HAaDe{$RYb}yh;R@DQ$TTsxj`7OSAz5AD_KLxsK;8VKH*OCgN%#7w z#<|b+jN#zX#BUYvohfEMOG%L&-C*jLv$31gUTklc^`C$9fv0QU)>rH03~ZOj89Hc~ z#O^DF3lCV_Uq{yT1FsZRq{msJ*cKRro(dSnpT*tE&|?rZr*9+xq11Nc^;X zTzq_G4jZL%>Qrngq$#&%=i=vRMG7$J@?%e6`+rYiz=iDcS1^(dY__DWJrCgR+?r>$ zKN0kiOhVzAZB2ilMZ9M|JOzuzy0!vGMMF=F0pJ-uQWI_sfO}5g>08WsVA3vyvw`i8 z0O3cNk@tJ_v(Cf)N~)P@ddu{ykarJ6`*9}(#taE|V}(cCvzvg9=rcmrFP4)5rV4#R zIA3=%boSCs)><4WUM7pFK&Qi2ReiBl72nY1V4A^kcF5ZGw$vhPt40@hWgFA?{dU|! zRukOt4PaN+q8e#kym+y5Yh?gUw+x;17uTJf4g-(AZmXEBM0+`t@8diDq!3uLA||C_m=Ju8Hz{XC3laM|`JJRoR9aP|mO zUh!n{KKclth)#z#|KrF{+hI2e0&si{X8_iZG&3{1x7Ox{rru*}A>N5fP9vT?d*<0B zJmOp0%kEzXfQ0+O!FbuJBIA*_7Zz2q-A}onln7X!Vu5=BR#^^_GVv1Xag`%sssc7= zj25s<`Ry24CkY%BgPk1r?n=MWs`bgja`vmMd7e~tM2B{7!>hbZ89{emcSeqW~L=hYFcoD@o`S7s{5c?K{Y zC4H+9@*|s=`DZ?rcWEcl0&9Xgy4WtE&c&!LVje-;QZyV?qoe-vwT_)c&iOy*2J&{8 z@Io%a`AL{A|08Gp*69DwmCx;7l8DIv-!tpWi{UERecord.javaのコードを記述する * * @param rcdFile Record.javaのファイル情報を保持する - * @param programId PROGRAM-IDに記述されているプログラム名 * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 */ private static void writeRecord(FileWriter rcdFile, JSONArray params) { + JSONObject param; PrintWriter rcdWriter = new PrintWriter(rcdFile); + String defaultValue; + String type; + int i; - rcdWriter.print( - "package com.example.restservice;\n" - + "public record " - + programId - + "Record(int statuscode, "); + if (ApiFilesOptions.packageName != null) { + rcdWriter.println("package " + ApiFilesOptions.packageName + ";"); + } else { + rcdWriter.println("package com.example.restservice;"); + } + + rcdWriter.print("public record " + programId + "Record(int statuscode, "); argPrint(rcdWriter, params, true, false); - rcdWriter.println(") {}"); + rcdWriter.print(") {\n" + " public LOANSUBRecord(){\n" + " this(200, "); + for (i = 0; i < params.length(); ++i) { + param = params.getJSONObject(i); + type = param.getString("java_type"); + + if ("String".equals(type)) { + defaultValue = "\"\""; + } else { + defaultValue = "0"; + } + + rcdWriter.print(defaultValue); + if (i < params.length() - 1) { + rcdWriter.print(", "); + } + } + + rcdWriter.println(");\n" + " }\n" + "}"); rcdWriter.close(); } @@ -255,6 +266,9 @@ private static void writeRecord(FileWriter rcdFile, JSONArray params) { */ private static void argPrint( PrintWriter writer, JSONArray params, boolean isType, boolean isRecord) { + JSONObject param; + String name; + String type; int i; for (i = 0; i < params.length(); ++i) { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java old mode 100644 new mode 100755 index fedff8f8..054cc03f --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -3,6 +3,7 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; @@ -13,6 +14,8 @@ class ApiFilesOptions { /** cobj-apiコマンドによって生成されるJavaファイルが配置されるディレクトリ名 */ static String outputDir; + static String filePath; + /** * 入力されたオプションを取得する * @@ -20,42 +23,71 @@ class ApiFilesOptions { */ static void getOptions(String[] args) { Options options = new Options(); - options.addOption("h", "help", false, "Prints the help message"); - options.addOption( - "jp", "java-package", true, "Specify the package name of the generated source code"); - options.addOption( - "o", - "output-dir", - true, - "Set the output destination of the java file to an arbitrary destination"); - options.addOption("v", "version", false, "Prints the version of the cobj-api"); + + options.addOption(Option.builder("h").longOpt("help").build()); + options.addOption(Option.builder("java-package").longOpt("java-package").hasArgs().build()); + options.addOption(Option.builder("o").hasArgs().build()); + options.addOption(Option.builder("output-dir").longOpt("output-dir").hasArgs().build()); + options.addOption(Option.builder("v").longOpt("version").build()); + CommandLineParser parser = new DefaultParser(); - CommandLine cmd; try { - cmd = parser.parse(options, args); + CommandLine cmd = parser.parse(options, args); + int optionCount = 0; + String outputDir; + + if (cmd.getOptions().length != 0) { + for (Option option : cmd.getOptions()) { + switch (option.getOpt()) { + case "h": + printHelpMessage(); + System.exit(0); + break; + case "v": + System.out.println("1.1.2"); + System.exit(0); + break; + case "java-package": + if (!args[optionCount].contains("=")) { + System.err.println("error: Please check the usage of options.\n"); + printHelpMessage(); + System.exit(1); + } + String packageName = option.getValue(); + setJavaPackage(packageName); + break; + case "output-dir": + if (!args[optionCount].contains("=")) { + System.err.println("error: Please check the usage of options.\n"); + printHelpMessage(); + System.exit(1); + } + outputDir = option.getValue(); + setOutputDir(outputDir); + break; + case "o": + outputDir = option.getValue(); + setOutputDir(outputDir); + optionCount++; + break; + default: + break; + } + optionCount++; + } + filePath = args[optionCount]; + } else { + filePath = args[0]; + } } catch (ParseException e) { + System.err.println("error: " + e.getMessage() + "\n"); printHelpMessage(); System.exit(1); - return; - } - - if (cmd.hasOption("h")) { + } catch (ArrayIndexOutOfBoundsException e) { + System.err.println("error: Please check the usage of options.\n"); printHelpMessage(); - System.exit(0); - return; - } else if (cmd.hasOption("v")) { - System.out.println("1.1.2"); - System.exit(0); - return; - } else if (cmd.getOptionValue("java-package") != null) { - String packageName = cmd.getOptionValue("java-package"); - setJavaPackage(packageName); - return; - } else if (cmd.getOptionValue("output-dir") != null) { - String outputDir = cmd.getOptionValue("output-dir"); - setOutputDir(outputDir); - return; + System.exit(1); } } @@ -71,7 +103,7 @@ private static void printHelpMessage() { System.out.println( " -java-package=\t\tSpecify the package name of the generated source code"); System.out.println( - " -o=, --output-dir=\t\tSet the output destination of the java file to an arbitrary destination"); + " -o , --output-dir=\t\tSet the output destination of the java file to an arbitrary destination"); System.out.println(" -v, --version\t\t\t\tPrints the version of the cobj-api"); } diff --git a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt index 93bfe2f0..c210a9ee 100644 --- a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt +++ b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt @@ -1,2 +1,6 @@ package com.example.restservice; -public record testRecord(int statuscode, int param1, double param2, String param3) {} +public record testRecord(int statuscode, int param1, double param2, String param3) { + public LOANSUBRecord(){ + this(200, 0, 0, ""); + } +} From c31c7818929a452406be11e8ef56157fe9e4ecfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:46:37 +0900 Subject: [PATCH 016/188] Bump org.xerial:sqlite-jdbc from 3.46.1.0 to 3.46.1.1 in /libcobj (#484) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.0 to 3.46.1.1. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.0...3.46.1.1) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 3d3729f0..b3a83fbd 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.3.1-jre") - implementation("org.xerial:sqlite-jdbc:3.46.1.0") + implementation("org.xerial:sqlite-jdbc:3.46.1.1") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 677dcfad74fdb908b527fe18699ccb10f2127993 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:46:47 +0900 Subject: [PATCH 017/188] Bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.1 in /libcobj (#485) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index b3a83fbd..3ec6fb77 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.3.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.1.1") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.11.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.11.1") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From dddb58b4836f9ca43007e82f597f783717af25be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:46:56 +0900 Subject: [PATCH 018/188] Bump com.github.spotbugs from 6.0.22 to 6.0.23 in /libcobj (#486) Bumps com.github.spotbugs from 6.0.22 to 6.0.23. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 3ec6fb77..99bd0582 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.22" + id("com.github.spotbugs") version "6.0.23" } repositories { From 98d6df0a2d76c8d9fa35740ab3c12247e07b4aef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:49:17 +0900 Subject: [PATCH 019/188] Bump org.xerial:sqlite-jdbc from 3.46.1.1 to 3.46.1.3 in /libcobj (#487) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.1 to 3.46.1.3. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.1...3.46.1.3) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 99bd0582..8c4d4783 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.3.1-jre") - implementation("org.xerial:sqlite-jdbc:3.46.1.1") + implementation("org.xerial:sqlite-jdbc:3.46.1.3") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.1") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From f1c24724e2ad27edf41009c3d7a2eef246e123fa Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:49:09 +0900 Subject: [PATCH 020/188] Change GetTempPath2A to GetTempPathA (#488) --- cobj/cobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobj/cobj.c b/cobj/cobj.c index 366196f0..b8cfef34 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -1359,7 +1359,7 @@ static char *cobc_temp_name(const char *ext) { #ifdef _WIN32 char temp[MAX_PATH]; - GetTempPath2A(MAX_PATH, temp); + GetTempPathA(MAX_PATH, temp); GetTempFileNameA(temp, "cob", 0, buff); DeleteFile(buff); strcpy(buff + strlen(buff) - 4, ext); /* replace ".tmp" by EXT */ From 8aadedbd008fc939eec7ea375cc5c96dc68452cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:57:20 +0900 Subject: [PATCH 021/188] Bump com.github.spotbugs from 6.0.23 to 6.0.24 in /libcobj (#489) Bumps com.github.spotbugs from 6.0.23 to 6.0.24. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 8c4d4783..f3c7847b 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.23" + id("com.github.spotbugs") version "6.0.24" } repositories { From a233081ed7d011ff8d3096bd55091b999065ba58 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:57:24 +0900 Subject: [PATCH 022/188] Add doc/converted_Java_file_JP.md (#492) * [Doc]: add doc/converted_Java_file_JP.md * [Doc]: improve READMEs and change the title of converted_Java_file_JP.md --- README.md | 5 +- README_JP.md | 5 +- doc/converted_Java_file_JP.md | 455 ++++++++++++++++++++++++++++++++++ 3 files changed, 461 insertions(+), 4 deletions(-) create mode 100644 doc/converted_Java_file_JP.md diff --git a/README.md b/README.md index e25d82a6..6611de5f 100644 --- a/README.md +++ b/README.md @@ -154,9 +154,10 @@ Run. java [PROGRAM-ID] ``` -## API reference of the runtime library +## Documentation -The API reference of the runtime library `libcobj.jar` is available [here](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) +* [The API reference of the runtime library `libcobj.jar`](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) +* [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) ## Development Progress diff --git a/README_JP.md b/README_JP.md index d5b5119d..f991a642 100644 --- a/README_JP.md +++ b/README_JP.md @@ -156,9 +156,10 @@ cobj [COBOL source file] ```bash java [PROGRAM-ID] ``` -## ランタイムライブラリのAPIリファレンス +## ドキュメント -ランタイムライブラリである`libcobj.jar`のAPIリファレンスは[こちら](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html)から確認できます。 +* [ランタイムライブラリ`libcobj.jar`のAPIリファレンス](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) +* [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) ## 実装状況 diff --git a/doc/converted_Java_file_JP.md b/doc/converted_Java_file_JP.md new file mode 100644 index 00000000..3dddf1c0 --- /dev/null +++ b/doc/converted_Java_file_JP.md @@ -0,0 +1,455 @@ +# opensource COBOL 4J: Java変換解説 + +## はじめに + +opensource COBOL 4Jは、COBOLプログラムをJavaプログラムに変換して実行するコンパイラである。 +本文書ではopensource COBOL 4JのCOBOLからJavaへの変換方法について、重要な箇所を解説する。 + +## 変数・集団項目 + +COBOLで定義された変数は、AbstractCobolFieldクラスのインスタンスへ変換される。 +**PICTURE句に応じて、各変数はAbstractCobolFieldクラスの派生クラスへと変換される。** +例えば、`PIC 9(5)`の変数はCobolNumericFieldクラスのインスタンスへ変換され、`PIC X(3)`の変数はCobolAlphanumericFieldに変換される。 + +また、AbstractCobolFieldは実際のデータをバイト配列として保持するCobolDataStorageクラスと、その他の情報を格納するCobolFieldAttributeクラスを持つ。 + +```mermaid +classDiagram + class AbstractCobolField { + - CobolDataStorage data + - CobolFieldAttribute attr + } +``` + +### CobolDataStorageクラス + +```mermaid +classDiagram + class CobolDataStorage { + - byte[] data + - int index + } +``` + +CobolDataStorageクラスはバイト配列dataと、そのバイト配列内でのデータの格納されている先頭位置を保持するindexを持つ。 + +```cobol + WORKING-STORAGE SECTION. + 01 REC. + 05 FIELD-A PIC X(10). + 05 FIELD-B PIC (5). + 05 FIELD-B PIC X(10). +``` + +上記の変数定義に対して、概ね下記のようなコードを生成することで、集団項目の機能を実現している。 +ただし、下記は説明のためのコードであり、実際に生成されるコードとは異なることに注意すること。 + +```java +byte[] bytes = new byte[25]; +// 集団項目RECに対応するCobolDataStorageクラスのインスタンス。 +// バイト配列dataを保持し、データの開始位置は0 +CobolDataStorage rec_storage = new CobolDataStorage(/* data= */ bytes, /* index= */ 0); +// 集団項目FIELD_Aに対応するCobolDataStorageクラスのインスタンス。 +// バイト配列dataを保持し、データの開始位置は0 +CobolDataStorage field_a_storage = rec_storage.getSubDataStorage(/* data= */ bytes, /* index= */ 0); +// 集団項目FIELD_Bに対応するCobolDataStorageクラスのインスタンス。 +// バイト配列dataを保持し、データの開始位置は10 +CobolDataStorage field_b_storage = rec_storage.getSubDataStorage(/* data= */ bytes, /* index= */ 10); +// 集団項目FIELD_Cに対応するCobolDataStorageクラスのインスタンス。 +// バイト配列dataを保持し、データの開始位置は15 +CobolDataStorage field_b_storage = rec_storage.getSubDataStorage(/* data= */ bytes, /* index= */ 15); +``` + +### CobolFieldAttributeクラス + +CobolFieldAttributeクラスは変数に関する様々な情報を保持するクラスである。 +CobolFieldAttributeクラスのメンバ変数に格納される情報は以下の通りである。 +#### type +typeは文字列型、数値型、集団項目等の情報を表すメンバ変数である。 +typeの保持する値に応じて、決まったAbstractCobolFieldクラスの派生クラスが使用される。 + +| 定数名 | 値 | AbstractCobolFieldの派生クラス | 説明 | +| --- | --- | --- | --- | +| COB_TYPE_UNKNOWN | 0x00 | なし | 未使用 | +| COB_TYPE_GROUP | 0x01 | CobolGroupField | 集団項目 | +| COB_TYPE_BOOLEAN | 0x02 | なし | 未使用 | +| COB_TYPE_NUMERIC_DISPLAY | 0x10 | CobolNumericField | 数値型(`PIC 9`, `PIC 99V9`等) | +| COB_TYPE_NUMERIC_BINARY | 0x11 | CobolNumericBinaryField | バイナリの数値型(`PIC 9 COMP`, `PIC 9 COMP-5`等) | +| COB_TYPE_NUMERIC_PACKED | 0x12 | CobolNumericPackedField | パック10進数(`PIC 9 COMP-3`)| +| COB_TYPE_NUMERIC_FLOAT | 0x13 | なし | COMP-1が指定されていることを示す。COMP-1は未実装。 | +| COB_TYPE_NUMERIC_DOUBLE | 0x14 | なし | COMP-2が指定されていることを示す。COMP-2は未実装。 | +| COB_TYPE_ALPHANUMERIC | 0x21 | CobolAlphanumericField |文字列型(`PIC X`, `PIC X(10)`等) | +| COB_TYPE_ALPHANUMERIC_ALL | 0x22 | CobolAlphanumericAllField | 文字列定数(SPACE等)に割り当てられる。 | +| COB_TYPE_ALPHANUMERIC_EDITED | 0x23 | CobolAlphanumericEditedField | 文字列編集項目 | +| COB_TYPE_NUMERIC_EDITED | 0x24 | CobolNumericEditedField | 数値編集項目 | +| COB_TYPE_NATIONAL | 0x40 | CobolNationalField |日本語型(`PIC N`, `PIC N(10)`等) | +| COB_TYPE_NATIONAL_EDITED | 0x41 | CobolNationalEditedField | 日本語編集項目 | +| COB_TYPE_NATIONAL_ALL | 0x42 | CobolNationalAllField | 日本語項目に代入する文字列定数(SPACE等)に割り当てられる。 | + +#### digits +digitsは`PIC 9(5)`等の数値型の変数のときに使われる、変数の桁数を表すメンバ変数である。 +例えば、`PIC 9(5)`の場合digitsには5が格納され、`PIC 9(3)V9(4)`の場合は7が格納される。 + +#### scale +scaleは小数点の位置を表すためのメンバ変数である。 +例えば`PIC 9(5)`の場合は`0`が格納され、`PIC 9(3)V9(4)`の場合は`4`が格納され、`PIC 9(3)PP`の場合は`-2`が格納される。 + +#### flag +flagはその他の情報を格納するためのメンバ変数である。 +下記の表に示す値をもとに、ビットごとの論理和を計算してflagに値を格納する。 + +例えば、`PIC S9(5) SIGN LEADING SEPARATE`の場合を考える。 +この場合は、下記の表のCOB_FLAG_SIGN, COB_FLAG_SIGN_SEPARATE, COB_FLAG_SIGN_LEADINGの3つの条件に合致するため、flagには0x01 | 0x02 | 0x04 (=0x07)が格納される。 + +| 定数名 | 値 | 説明 | +| --- | --- | --- | +| COB_FLAG_HAVE_SIGN | 0x01 | `PIC S9`等の符号付きの数値型であることを示す。 | +| COB_FLAG_SIGN_SEPARATE | 0x02 | `PIC S9 SIGN TRAILING SEPARATE`または`PIC S9 SIGN LEADING SEPARATE`のように符号の分離が指定されていることを示す。 | +| COB_FLAG_SIGN_LEADING | 0x04 | `PIC S9(2) SIGN LEADING`のように符号が先頭側に格納されることを示す。 | +| COB_FLAG_BLANK_ZERO | 0x08 | `PIC 9 BLANK WHEN ZERO`のようにBLANK WHEN ZERO指定されたことを示す。 | +| COB_FLAG_JUSTIFIED | 0x10 | `PIC X(3) JUSTIFIED RIGHT`のようにJUSTIFIED RIGHTが指定されたことを示す。 | +| COB_FLAG_BINARY_SWAP | 0x20 | COMP,COMP-4,BINARYのいずれかが指定されていることを示す。 | +| COB_FLAG_REAL_BINARY | 0x40 | SIGNED-SHORT,SIGNED-INT,SIGNED-LONG,UNSIGNED-SHORT,UNSIGNED-INT,UNSIGNED-LONGのいずれかが指定されていることを示す。 | +| COB_FLAG_IS_POINTER | 0x80 | POINTERが指定されていることを示す。POINTERは未実装。 | + +#### pic + +picはPICTURE句に書かれた文字列を保持するメンバ変数であるが、コンパイラが実行時に不要と判定した場合はnullが格納される。 + +編集項目の場合は特別なフォーマットのデータが格納される。 +例えば、PICTURE句が`PIC ++9(3),9(2)`の数値編集項目を考える。 +このPICTURE句は+が2文字、9が3文字、,が1文字、9が2文字の合計8文字の文字列であるため、picには +"+<<<2を示す4バイト整数>>>9<<<3を示す4バイト整数>>>,<<<1を示す4バイト整数>>>9<<<2を示す4バイト整数>>>" +が格納される。 + +## PROCEDURE DIVISION + +PROCEDURE DIVISIONの各命令は、その命令に対応するlibcobj.jarに定義されたメソッドの呼び出しに変換される。 +以下に代表的な命令の変換例を示す。 + +### DISPLAY文 + +COBOLのDISPLAY文は、CobolTerminalクラスのdisplayメソッドの呼び出すコードに変換される。 + +```cobol +DISPLAY "HELLO". +``` + +```java +/* a.cbl:6: DISPLAY */ +{ + CobolTerminal.display (0, 1, 1, c_1); +} +``` + +このように各文はブロック`{}`で囲まれ、その上にコメントで元のCOBOLソースコードのファイル名・行番号と、変換されたメソッドの呼び出しを示すコメントが付けられる。 + +### 制御文 +IF文やPERFORM VARYING文は、それぞれJavaのif文やfor文に変換される。 + +以下はIF文の変換例。 +```cobol + IF 1 = 1 THEN + DISPLAY "HELLO" + ELSE + DISPLAY "WORLD" + END-IF. +``` + +```java + /* a.cbl:6: IF */ + { + if (((long)c_1.cmpInt (1) == 0L)) + { + /* a.cbl:7: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, c_2); + } + } + else + { + /* a.cbl:9: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, c_3); + } + } + } +``` + +以下はPERFORM VARYING文の変換例。 + +```cobol + PERFORM VARYING C FROM 1 BY 1 UNTIL C > 5 + DISPLAY C + END-PERFORM. +``` + +```java +for (;;) + { + if (((long)b_C.cmpNumdisp (1, 5) > 0L)) + break; + { + /* a.cbl:8: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, f_C); + } + } + f_C.addInt (1); + } +``` + +### CALL文 + +CALL文も、libcobj.jarに定義されたメソッドの呼び出しに変換される。 + +```cobol + CALL "sub". +``` + +```java +/* a.cbl:6: CALL */ +{ + CobolModule.getCurrentModule ().setParameters (); + call_sub = CobolResolve.resolve("sub", call_sub); + b_RETURN_CODE.set (call_sub.run ()); +} +``` + +opensource COBOL 4Jにおいて、CALL文で指定されたモジュール名は原則として実行時に解決される。 + +## プログラム全体の制御構造 + +COBOLでは、PROCEDURE DIVISION内はSECTIONやPARAGRAPHによって、分割される。 +分割された部分を指定して、PERFORM文で処理を呼び出したり、GO TO文で特定の箇所へジャンプしたりできる。 +これらの機能をJavaへ変換した際に、どのように実現されるかを解説する。 +以下のプログラムを例に、詳細を説明する。 + +```cobol + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + MAIN SECTION. + PERFORM A-01. + PERFORM A-02. + PERFORM SUB. + GO TO LAST-PROC. + SUB SECTION. + A-01. + DISPLAY "A-01 START". + DISPLAY "A-01 END". + A-02. + DISPLAY "SECT-02". + LAST-PROC SECTION. + LAST-MESSAGE. + DISPLAY "END". +``` + +opensouce COBOL 4Jでは、SECTION内やPARAGRAPHで分割された処理を切り出し、それらをCobolControlクラスから派生した無名クラスに変換する。 +変換後の無名クラスは、PROCEDURE DIVISION内で記述された順番通りに、CobolControlクラスの配列に格納される。 + +```java +public CobolControl[] contList = { + //... + //... + new CobolControl(l_MAIN_SECTION__DEFAULT_PARAGRAPH, CobolControl.LabelType.label) { + // MAIN SECTIONの処理 + //... + }, + new CobolControl(l_SUB, CobolControl.LabelType.section) { + // SUB SECTIONの処理 + //... + }, + new CobolControl(l_SUB__A_01, CobolControl.LabelType.label) { + // A-01の処理 + //... + }, + new CobolControl(l_SUB__A_01, CobolControl.LabelType.label) { + // A-02の処理 + //... + }, + new CobolControl(l_LAST_PROC, CobolControl.LabelType.section) { + // LAST-PROC SECTIONの処理 + //... + }, + new CobolControl(l_LAST_PROC__LAST_MESSAGE, CobolControl.LabelType.paragraph) { + // LAST-MESSAGEの処理 + //... + } +} + +``` + +例えば、COBOLソースコード中のA-01の処理は以下のように変換される。 + +```java +new CobolControl(l_SUB__A_01, CobolControl.LabelType.label) { + public Optional run() throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { + /* prog.cbl:13: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, c_1); + } + /* prog.cbl:14: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, c_2); + } + + return Optional.of(contList[l_SUB__A_02]); + } +} +``` + +A-02の処理は以下のように変換される。 + +```java +new CobolControl(l_SUB__A_02, CobolControl.LabelType.label) { + public Optional run() throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { + /* prog.cbl:16: DISPLAY */ + { + CobolTerminal.display (0, 1, 1, c_3); + } + + return Optional.of(contList[l_LAST_PROC]); + } +} +``` + +CobolControlクラスは、opensource COBOL 4Jが提供するランタイムであるlibcobj.jarに含まれるクラスである。 +runメソッドに、実際の処理が記述され、その他必要な情報はメンバ変数に格納される。 + +CobolControlの配列contListを使って、PROCEDURE DIVISION内の処理を実行する。 + +opensource COBOL 4Jでは、PERFORM文やGO TO文はCobolControlクラスの機能を利用して呼び出しやジャンプを実現するメソッドを用意している。 +PERFORM文やGO TO文はこれらのメソッドを呼び出すコードへと変換される。 +```java +CobolControl.perform(contList, l_SUB__A_01).run(); + +CobolControl.perform(contList, l_SUB__A_02).run(); + +CobolControl.perform(contList, l_SUB).run(); + +{ + if(true) return Optional.of(contList[l_LAST_PROC ]); + +} +``` + +※ Javaコンパイラは明らかに到達不可能なコードをエラーとして扱う。上記のコードの`if(true)`はこのコンパイルエラーを回避するために生成されている。 + +## libcobj/の解説 +libcobj.jarはopensource COBOL 4Jのランタイムであり、 +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj`に格納されているJavaソースコードよりビルドされる。 +これらのソースコードの概要を以下に示す。 + +### callディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/call`に格納されているソースコードについて説明する。 +このディレクトリには、CALL文に関連するクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| CobolCallDataContent.java | CALL文呼び出しの際に使用されるクラス。 | +| CobolResolve.java | 動的にJavaのクラスをロードする処理が定義されるクラス。 | +| CobolRunnable.java | CALL文で呼び出すJavaクラスが実装すべきインターフェース。 | +| CobolSystemRoutine.java | 一部の組み込み関数を実装するクラス。 | + +### commonディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/common`に格納されているソースコードについて説明する。 +このディレクトリには、その他のクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| CobolCallParams.java | 未使用のクラス。 | +| CobolCheck.java | 実行時チェックに関する処理を実装するクラス。 | +| CobolConstant.java | 様々な定数を定義するクラス。 | +| CobolControl.java | セクションやラベル等の制御構造を実装するクラス。 | +| CobolExternal.java | EXTERNAL句実装のためのクラス。(実装は未完成) | +| CobolFrame.java | 未使用のクラス。 | +| CobolInspect.java | INSPECT文向けの機能を実装するクラス。 | +| CobolIntrinsic.java | 組み込み関数を定義するクラス。 | +| CobolModule.java | 実行時に様々な情報を保持するクラス。 | +| CobolString.java | STRING文やUNSTRING文に関する処理を定義するクラス。 | +| CobolUtil.java | 雑多な処理を定義するクラス。 | +| GetAbstractCobolField.java | AbstractCobolFieldを返すメソッドrunを実装したインターフェース。 | +| GetInt.java | AbstractCobolFieldを返すメソッドrunを実装したインターフェース。 | + +### dataディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/data`に格納されているソースコードについて説明する。 +このディレクトリには、COBOLプログラムで使用される変数に関するクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| AbstractCobolField.java | 各COBOL変数のためのクラスの親クラス。 | +| CobolAlphanumericAllField.java | 文字列項目の定数のためのクラス。 | +| CobolAlphanumericEditedField.java | 文字列編集項目のためのクラス。 | +| CobolAlphanumericField.java | 文字列項目のためのクラス。 | +| CobolDataStorage.java | 変数のデータをbyte型データの配列として保持するクラス。 | +| CobolDecimal.java | 数値計算をするために使用するクラス。 | +| CobolFieldAttribute.java | COBOL変数の各種情報を保持するクラス。 | +| CobolFieldFactory.java | 動的にCOBOL変数のインスタンスを生成するためのクラス。 | +| CobolGroupField.java | 集団項目のためのクラス。 | +| CobolNationalAllField.java | 日本語文字列の定数のためのクラス。 | +| CobolNationalEditedField.java | 日本語編集項目のためのクラス。 | +| CobolNationalField.java | 日本語項目のためのクラス。 | +| CobolNumericBinaryField.java | COMP-5等のためのクラス。 | +| CobolNumericDoubleField.java | Javaのdouble型変数のためのクラス。 | +| CobolNumericEditedField.java | 数値編集項目のためのクラス。 | +| CobolNumericField.java | 数値型のためのクラス。 | +| CobolNumericPackedField.java | COMP-3のためのクラス。 | + +### exceptionsディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/exceptions`に格納されているソースコードについて説明する。 +このディレクトリには、COBOLプログラムの実行時に発生する例外を表すクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| CobolExceptionId.java | 例外IDを定義するクラス。 | +| CobolException.java | 例外を示すクラスの親クラス。 | +| CobolExceptionTabCode.java | 例外コードを管理するクラス。 | +| CobolGoBackException.java | GO BACK実行時に使用する例外のためのクラス。 | +| CobolRuntimeException.java | 実行時エラーに関するクラス。 | +| CobolStopRunException.java | STOP RUN実行時に使用する例外のためのクラス。 | +| CobolUndefinedException.java | 未使用のクラス。 | +| RuntimeErrorHandler.java | 例外発生時のハンドラのためのインターフェース。 | +| RuntimeExitHandler.java | プログラム終了時のハンドラのためのインターフェース。 | + + +### fileディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/file`に格納されているソースコードについて説明する。 +このディレクトリには、COBOLプログラムが扱うファイルに関連するクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| CobolFileFactory.java | ファイルに関するインスタンスを生成するクラス。 | +| CobolFile.java | ファイルに関する共通処理を実装するクラス。 | +| CobolFileKey.java | ファイルのキーに関する処理を実装するクラス。 | +| CobolFileSort.java | ソート処理を実装するクラス。 | +| CobolIndexedFile.java | INDEXEDファイルを実装するクラス。 | +| CobolItem.java | レコード等の情報を保持するクラス。| +| CobolLineSequentialFile.java | LINCE SEQUENTCIALファイルを実装するクラス。| +| CobolRelativeFile.java | RELATIVEファイルを実装するクラス。 | +| CobolSequentialFile.java | SEQUENCIALやLINCE SEQUENTCIALファイルを実装するクラス。 | +| CobolSort.java | SORTに関する情報を保持するクラス。 | +| FileIO.java | 索引ファイル以外のファイルで入出力に使用するクラス。 | +| FileStruct.java | ファイルに関する情報を保持するクラス。 | +| IndexedCursor.java | 索引ファイルの処理で使用するクラス。 | +| IndexedFile.java | 索引ファイルに関する情報を保持するクラス。 | +| KeyComponent.java | ファイルのキーに関連するクラス。 | +| Linage.java | LINAGEに関するクラス。 | +| MemoryStruct.java | ソート処理で使用するクラス。 | + +### termioディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/termio`に格納されているソースコードについて説明する。 +このディレクトリには、DISPLAY文やACCEPT文に関連するクラスが定義される。 + +| ファイル名 | 説明 | +| --- | --- | +| CobolTerminal.java | DISPLAY文やACCEPT文に関する処理を定義するクラス。 | + +### トップレベルディレクトリ +`opensourcecobol4j/libcobj/src/jp/osscons/opensourcecobol/libcobj/`の直下に格納されているソースコードについて説明する。 + +| ファイル名 | 説明 | +| --- | --- | +| Const.java | libcobj内部で使用する定数を定義するクラス。 | \ No newline at end of file From 41016e61d9168f5dad5fb8f6830aaed5457ed0cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:59:11 +0900 Subject: [PATCH 023/188] Bump org.junit.jupiter:junit-jupiter from 5.11.1 to 5.11.2 in /libcobj (#494) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.1 to 5.11.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f3c7847b..f7f47580 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.3.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.1.3") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.11.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.11.2") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From c8cbb8a0b5693b4d0b0afd20249401362ff80ccf Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:35:33 +0900 Subject: [PATCH 024/188] Reduce indent levels of for loops (#495) * [Update]: indent of for loops of PERFORM * [Update]: reduce indent levels of for loops --- cobj/codegen.c | 76 +++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index d6dcebd9..a22cf98c 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -2216,13 +2216,13 @@ static void joutput_initialize_literal(cb_tree x, struct cb_field *f, i_counters[0] = 1; joutput_line("for (int i0 = 0; i0 < %u; i0++)", (unsigned int)i); - joutput_indent(" {"); + joutput_indent("{"); joutput_prefix(); joutput_data(x); joutput(".memcpy(i0 * %u, ", (unsigned int)l->size); joutput_string(l->data, l->size); joutput(", %u);\n", (unsigned int)l->size); - joutput_indent(" }"); + joutput_indent("}"); n = f->size % l->size; if (n) { @@ -2560,7 +2560,7 @@ static void joutput_initialize_compound(struct cb_initialize *p, cb_tree x) { i_counters[i] = 1; joutput_line("for (int i%d = 1; i%d <= %d; i%d++)", i, i, f->occurs_max, i); - joutput_indent(" {"); + joutput_indent("{"); CB_REFERENCE(c)->subs = cb_cons(cb_i[i], CB_REFERENCE(c)->subs); } @@ -2574,7 +2574,7 @@ static void joutput_initialize_compound(struct cb_initialize *p, cb_tree x) { if (f->flag_occurs) { /* Close loop */ CB_REFERENCE(c)->subs = CB_CHAIN(CB_REFERENCE(c)->subs); - joutput_indent(" }"); + joutput_indent("}"); } } if (f == ff) @@ -2647,7 +2647,7 @@ static void joutput_search_whens(cb_tree table, cb_tree var, cb_tree stmt, /* Start loop */ joutput_line("for (;;)"); - joutput_indent(" {"); + joutput_indent("{"); /* End test */ joutput_prefix(); @@ -2663,17 +2663,17 @@ static void joutput_search_whens(cb_tree table, cb_tree var, cb_tree stmt, joutput(" > "); joutput_occurs(p); joutput(")\n"); - joutput_indent(" {"); + joutput_indent("{"); if (stmt) { joutput_stmt(stmt, JOUTPUT_STMT_DEFAULT); } joutput_line("break;"); - joutput_indent(" }"); + joutput_indent("}"); /* WHEN test */ joutput_stmt(whens, JOUTPUT_STMT_DEFAULT); joutput_line("else"); - joutput_indent(" {"); + joutput_indent("{"); joutput_prefix(); int tmp_flag = integer_reference_flag; @@ -2689,9 +2689,9 @@ static void joutput_search_whens(cb_tree table, cb_tree var, cb_tree stmt, joutput_move(idx, var); } joutput_line("continue;"); - joutput_indent(" }"); + joutput_indent("}"); joutput_line("break;"); - joutput_indent(" }"); + joutput_indent("}"); } static void joutput_search_all(cb_tree table, cb_tree stmt, cb_tree cond, @@ -2717,16 +2717,16 @@ static void joutput_search_all(cb_tree table, cb_tree stmt, cb_tree cond, /* Start loop */ joutput_line("for (;;)"); - joutput_indent(" {"); + joutput_indent("{"); /* End test */ joutput_line("if (head >= tail - 1)"); - joutput_indent(" {"); + joutput_indent("{"); if (stmt) { joutput_stmt(stmt, JOUTPUT_STMT_DEFAULT); } joutput_line("break;"); - joutput_indent(" }"); + joutput_indent("}"); /* Next index */ joutput_prefix(); @@ -2745,7 +2745,7 @@ static void joutput_search_all(cb_tree table, cb_tree stmt, cb_tree cond, joutput_stmt(when, JOUTPUT_STMT_DEFAULT); joutput_indent_level -= 2; joutput_line("else"); - joutput_indent(" {"); + joutput_indent("{"); joutput_line("if (ret < 0)"); joutput_prefix(); joutput(" head = "); @@ -2757,9 +2757,9 @@ static void joutput_search_all(cb_tree table, cb_tree stmt, cb_tree cond, joutput_integer(idx); joutput(";\n"); joutput_line("continue;"); - joutput_indent(" }"); + joutput_indent("}"); joutput_line("break;"); - joutput_indent(" }"); + joutput_indent("}"); joutput_indent("}"); } @@ -3240,7 +3240,7 @@ static void joutput_goto(struct cb_goto *p) { joutput("switch ((int)"); joutput_param(cb_build_cast_integer(p->depending), 0); joutput(")\n"); - joutput_indent(" {"); + joutput_indent("{"); cb_tree l; for (l = p->target; l; l = CB_CHAIN(l)) { joutput_indent_level -= 2; @@ -3248,7 +3248,7 @@ static void joutput_goto(struct cb_goto *p) { joutput_indent_level += 2; joutput_goto_1(CB_VALUE(l)); } - joutput_indent(" }"); + joutput_indent("}"); } else if (p->target == NULL) { needs_exit_prog = 1; if (cb_flag_implicit_init) { @@ -3323,7 +3323,7 @@ static void joutput_perform_until(struct cb_perform *p, cb_tree l) { } else { joutput_line("for (;;)"); } - joutput_indent(" {"); + joutput_indent("{"); if (next && CB_PERFORM_VARYING(CB_VALUE(next))->name) { joutput_move(CB_PERFORM_VARYING(CB_VALUE(next))->from, @@ -3348,7 +3348,7 @@ static void joutput_perform_until(struct cb_perform *p, cb_tree l) { joutput_perform_until(p, next); } - joutput_indent(" }"); + joutput_indent("}"); } static void joutput_perform(struct cb_perform *p) { @@ -3369,9 +3369,9 @@ static void joutput_perform(struct cb_perform *p) { joutput_param(cb_build_cast_integer(p->data), 0); joutput("; n%d > 0; n%d--)\n", loop_counter, loop_counter); loop_counter++; - joutput_indent(" {"); + joutput_indent("{"); joutput_perform_once(p); - joutput_indent(" }"); + joutput_indent("}"); break; case CB_PERFORM_UNTIL: v = CB_PERFORM_VARYING(CB_VALUE(p->varying)); @@ -3383,9 +3383,9 @@ static void joutput_perform(struct cb_perform *p) { case CB_PERFORM_FOREVER: joutput_prefix(); joutput("for (;;)\n"); - joutput_indent(" {"); + joutput_indent("{"); joutput_perform_once(p); - joutput_indent(" }"); + joutput_indent("}"); break; } if (p->exit_label) { @@ -3509,7 +3509,7 @@ static void joutput_file_error(struct cb_file *pfile) { static void joutput_ferror_stmt(struct cb_statement *p, int code) { joutput_line("if (CobolRuntimeException.code != 0)"); - joutput_indent(" {"); + joutput_indent("{"); if (p->handler1) { if ((code & 0x00ff) == 0) { joutput_line("if ((CobolRuntimeException.code & 0xff00) == 0x%04x)", @@ -3517,27 +3517,27 @@ static void joutput_ferror_stmt(struct cb_statement *p, int code) { } else { joutput_line("if (CobolRuntimeException.code == 0x%04x)", code); } - joutput_indent(" {"); + joutput_indent("{"); joutput_stmt(p->handler1, JOUTPUT_STMT_DEFAULT); - joutput_indent(" }"); + joutput_indent("}"); joutput_line("else"); - joutput_indent(" {"); + joutput_indent("{"); } joutput_file_error(CB_FILE(p->file)); - joutput_indent(" }"); + joutput_indent("}"); if (p->handler1) { - joutput_indent(" }"); + joutput_indent("}"); } if (p->handler2 || p->handler3) { joutput_line("else"); - joutput_indent(" {"); + joutput_indent("{"); if (p->handler3) { joutput_stmt(p->handler3, JOUTPUT_STMT_DEFAULT); } if (p->handler2) { joutput_stmt(p->handler2, JOUTPUT_STMT_DEFAULT); } - joutput_indent(" }"); + joutput_indent("}"); } } @@ -3670,9 +3670,9 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { } else { joutput_line("if (CobolRuntimeException.code == 0x%04x)", code); } - joutput_indent(" {"); + joutput_indent("{"); joutput_stmt(p->handler1, output_type); - joutput_indent(" }"); + joutput_indent("}"); if (p->handler2) { joutput_line("else"); } @@ -3681,9 +3681,9 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { if (p->handler1 == NULL) { joutput_line("if (CobolRuntimeException.code == 0)"); } - joutput_indent(" {"); + joutput_indent("{"); joutput_stmt(p->handler2, output_type); - joutput_indent(" }"); + joutput_indent("}"); } } } @@ -4898,7 +4898,7 @@ static void joutput_internal_function(struct cb_program *prog, joutput_line("//multiple entry dispatch is not implemented"); joutput_newline(); joutput_line("switch (entry)"); - joutput_line(" {"); + joutput_line("{"); for (i = 0, l = prog->entry_list; l; l = CB_CHAIN(l)) { joutput_line(" case %d:", i++); joutput_prefix(); @@ -4906,7 +4906,7 @@ static void joutput_internal_function(struct cb_program *prog, joutput_label_variable(CB_LABEL(CB_PURPOSE(l))); joutput(");\n"); } - joutput_line(" }"); + joutput_line("}"); joutput_line("/* This should never be reached */"); joutput_line("CobolUtil.fatalError (CobolUtil.FERROR_CHAINING);"); joutput_newline(); From a70fa1f03235a6592a381e0f925fb5548ae0dd73 Mon Sep 17 00:00:00 2001 From: Momoko YOKOGAWA Date: Tue, 8 Oct 2024 09:38:31 +0900 Subject: [PATCH 025/188] =?UTF-8?q?=E6=97=A5=E6=9C=AC=E8=AA=9E=E7=89=88REA?= =?UTF-8?q?DME=E4=BF=AE=E6=AD=A3=20(#493)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_JP.md | 146 ++++++++++++++++++++++----------------------------- 1 file changed, 63 insertions(+), 83 deletions(-) diff --git a/README_JP.md b/README_JP.md index f991a642..a41be9c3 100644 --- a/README_JP.md +++ b/README_JP.md @@ -2,60 +2,49 @@ [English version README](./README.md) -opensource COBOL 4JはCOBOLソースコードをJavaソースコードに変換するCOBOLコンパイラです. -opensource COBOL 4JはCOBOLからCに変換するCOBOLコンパイラ["opensource COBOL"](https://github.com/opensourcecobol/opensource-cobol)をもとに開発されています. +"opensource COBOL 4J"は、COBOLソースコードをJavaソースコードに変換するCOBOLコンパイラです。 +"opensource COBOL 4J"は、COBOLからCソースコードに変換するCOBOLコンパイラ["opensource COBOL"](https://github.com/opensourcecobol/opensource-cobol)をもとに開発されています。 +(実際、このリポジトリには多くの["opensource COBOL"](https://github.com/opensourcecobol/opensource-cobol)のソースファイルが含まれています。) -変更履歴は[CHANGELOG.md](./CHANGELOG.md)を参照してください. +変更履歴は[CHANGELOG.md](./CHANGELOG.md)をご覧ください。 ## ライセンス -ランタイムライブラリであるlibcobjはLGPL 3,それ以外のソフトウェアやライブラリはGPL 3の下で配布されています. +ランタイムライブラリであるlibcobjはLGPL 3、それ以外のソフトウェアやライブラリはGPL 3の下で配布されています。 ## 動作環境 - -opensource COBOL 4J は下記の環境でテストされています. +opensource COBOL 4Jは、下記の環境でテストされています: * Ubuntu 24.04 と OpenJDK 21 * AlmaLinux 9 と OpenJDK 11 * Amazon Linux 2023 と OpenJDK 21 -古いバージョンの動作環境については、[doc/requirements-all.md](./doc/requirements-all.md)をご覧ください. - - -## インストール +古いバージョンの動作環境については、[doc/requirements-all.md](./doc/requirements-all.md)をご覧ください。 -opensource COBOL 4J v1.1.2はUbuntuとAlmaLinuxで動作を確認しています. -## 手動インストール +## インストール(Linux) ### 依存ライブラリのインストール - -下記のコマンドを実行する. +下記のコマンドを実行します。 #### Ubuntu 24.04 - ``` sudo apt-get update sudo apt-get install -y default-jdk build-essential bison flex gettext texinfo libgmp-dev autoconf ``` #### AlmaLinux 9 - ``` dnf -y update dnf install -y java-11-openjdk-devel gcc make bison flex automake autoconf diffutils gettext ``` #### Amazon Linux 2023 - ``` dnf -y update dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoconf diffutils gettext tar gzip ``` -### opensource COBOL 4Jのインストール (Linux) - -下記のコマンドを実行する - +### opensource COBOL 4Jのインストール ``` curl -L -o opensourcecobol4j-v1.1.2.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.2.tar.gz tar zxvf opensourcecobol4j-v1.1.2.tar.gz @@ -66,123 +55,115 @@ sudo make install ``` ### $CLASSPATHの設定 - -/usr/lib/opensourcecobol4j/libcobj.jar を 環境変数$CLASSPATH に追加する. -たとえば下記のコードを実行する。 +/usr/lib/opensourcecobol4j/libcobj.jarを環境変数$CLASSPATHに追加します。 +例えば、Unix系システムで次のコードを実行します。 ```bash export CLASSPATH="$CLASSPATH:/usr/lib/opensourcecobol4j/libcobj.jar" ``` -古いバージョンのインストール方法は、[doc/installation_jp](./doc/installation_jp)をご覧ください. +古いバージョンのインストール方法は、[doc/installation_jp](./doc/installation_jp)をご覧ください。 -## opensource COBOL 4Jのインストール (Windows) +## インストール (Windows) ### Visual Studioのインストール -Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラを使用します. -そのため、まずは[Visual Studio](https://visualstudio.microsoft.com/)をインストールしてください. +Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラを使用します。 +そのため、まずは[Visual Studio](https://visualstudio.microsoft.com/)をインストールする必要があります。 + +### ソリューションファイルのビルド +1. opensource COBOL 4Jのファイル一式をダウンロードする。 +2. Visual Studioでwin/opensourcecobol4j.slnを開く。 +3. ”Debug”または”Release”モードを選択する。 + ![alt text](image/readme1.png) +4. ”ビルド” -> ”ソリューションのビルド” を選択する。 + ![alt text](image/readme2.png) + ビルドが完了すると、`win/x64/Debug`または`win/x64/Release`に"cobj.exe"が作成される。 ### Javaファイルのビルド -1. JDKをインストールする. -https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows -2. PowerShellを開く. -3. libcobjディレクトリに移動し、`.\gradlew shadowJar`を実行する. +1. JDKをインストールする。 + https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows +2. PowerShellを開く。 +3. "libcobj"ディレクトリに移動し、`.\gradlew shadowJar`を実行する。 ``` cd libcobj .\gradlew shadowJar ``` - これにより、"libcobj.jar"が`libcobj\app\build\libs\`に作成される. + これにより、`libcobj\app\build\libs\`に"libcobj.jar"が作成される。 -### ソリューションファイルのビルド -1. opensource COBOL 4Jのファイル一式をダウンロードする. -2. win/opensourcecobol4j.slnをVisual Studioで開く. -3. ”Debug”または”Release”モードを選択する. -![alt text](image/readme1.png) -4. ”ビルド” -> ”ソリューションのビルド” を選択する. -![alt text](image/readme2.png) -ビルドが完了したら、`win/x64/Debug`または`win/x64/Release`に"cobj.exe"が生成される. - -### ファイルの配置 -1. Debugモードでビルドした場合、win/make-install.ps1の5行目を`\x64\Release\cobj.exe`から`\x64\Debug\cobj.exe`に変更する. -2. PowerShellを開く. -3. ”win”ディレクトリに移動し、make-install.ps1を実行する. +### ファイルを適切な位置に配置 +1. Debugモードでビルドした場合、`win/make-install.ps1`の5行目を`\x64\Release\cobj.exe`から`\x64\Debug\cobj.exe`に変更する。 +2. PowerShellを開く。 +3. ”win”ディレクトリに移動し、`make-install.ps1`を実行する。 ``` cd win .\make-install.ps1 ``` -* ファイルは下記の場所にそれぞれ配置される. -* ファイルの配置場所を変更したい場合は、make-install.ps1に記載してあるパスを編集する. - +* 各ファイルは以下の場所に配置されます。 | ファイル名 | 配置場所 | |---|---| | cobj.exe | C:\opensourcecobol4j\bin | | libcobj.jar | C:\opensourcecobol4j\lib | | configファイル | C:\opensourcecobol4j\config | + +* ファイルの配置場所を変更したい場合は、`make-install.ps1`に記載してあるパスを編集してください。 ### 環境変数の設定 -1. 環境変数PATHに`C:\opensourcecobol4j\bin`を追加する. -2. 環境変数CLASSPATHに`C:\opensourcecobol4j\lib\libcobj.jar`を追加する. +1. `C:\opensourcecobol4j\bin`を環境変数PATHに追加する。 +2. `C:\opensourcecobol4j\lib\libcobj.jar`を環境変数CLASSPATHに追加する。 -## Dockerによるインストール - -opensource COBOL 4J v1.1.2をインストールしたDockerイメージを利用できます. +## Dockerを使ったインストール +opensource COBOL 4JのDockerコンテナを利用できます。 ```bash docker pull opensourcecobol/opensourcecobol4j:1.1.2 ``` -コンテナ内で下記のコマンドを実行すると、Hello Worldプログラムをコンパイル&実行できる. +以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 ``` bash -# Move to the sample directory +# サンプルディレクトリに移動 $ cd /root/cobol_sample -# Translate COBOL to Java and compile the Java source file. +# COBOLをJavaに変換し、Javaソースファイルをコンパイル $ cobj HELLO.cbl -# Run "Hello World" +# "Hello World"を実行 $ java HELLO HELLO WORLD! ``` ## 使い方 - -コンパイル. +コンパイルします。 ```bash cobj [COBOL source file] ``` -(cobjコマンドにより,カレントディレクトリに[PROGRAM-ID].javaと[PROGRAM-ID].classが生成されます.) +(cobjコマンドにより、カレントディレクトリに[PROGRAM-ID].javaと[PROGRAM-ID].classが生成されます。) -実行. +実行します。 ```bash java [PROGRAM-ID] ``` + ## ドキュメント * [ランタイムライブラリ`libcobj.jar`のAPIリファレンス](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) ## 実装状況 - -実装済み - -* 基本的なデータ操作 (MOVE, COMPUTE, ... ) -* 制御文 (IF, PERFORM, GO TO, ...) -* DISPLAY文, ACCEPT文 +実装済み機能: +* 基本的なデータ操作 (MOVE, COMPUTEなど) +* 制御文 (IF, PERFORM, GO TOなど) +* 一部のI/O機能 (DISPLAY, ACCEPTなど) * CALLによる呼び出し * SEQUENTIALファイルの入出力機能 * RELATIVEファイルの入出力機能 * INDEXEDファイルの入出力機能 * SORT文 -* 組み込み関数 (ACOS, LENGTH, MAX, ...) - -## テストのステータス +* 組み込み関数 (ACOS, LENGTH, MAXなど) -### NIST COBOL85 test suite +## NIST85テストの状況 +opensource COBOL 4Jは[NIST COBOL85 test suite](https://www.itl.nist.gov/div897/ctg/cobol_form.htm)によりテストされています。 -opensource COBOL 4Jは[NIST COBOL85 test suite](https://www.itl.nist.gov/div897/ctg/cobol_fo -rm.htm)によりテストされています. - -主要テスト結果 +主要テスト結果: ``` ------ Directory Information ------- --- Total Tests Information --- @@ -202,7 +183,7 @@ RL 32 32 0 0 1827 0 5 0 1832 Relativ Total 361 361 0 0 8804 0 21 93 8918 ``` -その他のテストの結果 +追加テストの結果: ``` ------ directory information ------- --- total tests information --- @@ -215,7 +196,7 @@ rw 4 0 4 0 0 0 0 0 0 REPORT total 21 0 21 0 0 0 0 0 0 ``` ## cobj-idx -`cobj-idx` コマンドはINDEXEDファイルを扱うためのユーティリティで、opensource COBOL 4Jの一部としてインストールされます. +`cobj-idx`コマンドはINDEXEDファイルを扱うためのユーティリティで、opensource COBOL 4Jをインストールする際に、一緒にインストールされます。 ``` cobj-idx - A utility tool to handle an indexed file of opensource COBOL 4J @@ -264,7 +245,7 @@ Options: ``` ## cobj-api -cobj-apiコマンドを使用することで、`cobj`で生成されたプログラムを呼び出すSpring boot向けのJavaファイルを簡単に生成できます. +`cobj-api`コマンドを使用することで、`cobj`で生成されたプログラムを呼び出すSpring boot向けのJavaファイルを簡単に生成できます。 ``` Usage: cobj-api [options] @@ -278,9 +259,8 @@ Options: -o=, --output-dir= Set the output destination of the java file to an arbitrary destination -v, --version Prints the version of the cobj-api ``` -cobj-apiを用いたSpring Bootアプリケーションの作成方法については、[こちら](./doc/cobj-api_SpringBoot_JP.md)を参照してください。 +cobj-apiを用いたSpring Bootアプリケーションの作成方法については、[こちら](./doc/cobj-api_SpringBoot_JP.md)をご覧ください。 ## コントリビューㇳ - -コントリビュータの一覧は https://github.com/opensourcecobol/opensourcecobol4j/graphs/contributors に掲載されています. -コントリビュータ向けのガイドラインは[CONTRIBUTING_JP.md](./CONTRIBUTING_JP.md)を参照してください. +コントリビュータ向けのガイドラインは[CONTRIBUTING_JP.md](./CONTRIBUTING_JP.md)を参照してください。 +コントリビュータの一覧は https://github.com/opensourcecobol/opensourcecobol4j/graphs/contributors に掲載されています。 From 8398c5e19c5f249f43e4884a5f473c90ffff6826 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:44:53 +0900 Subject: [PATCH 026/188] Add a new option `-fvar-name-hex` (#501) --- cobj/codegen.c | 61 ++++++++++++----- cobj/flag-help.def | 3 + cobj/flag.def | 3 + tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/command-line-options.at | 1 + .../command-line-options.src/fvar-name-hex.at | 68 +++++++++++++++++++ 7 files changed, 120 insertions(+), 18 deletions(-) create mode 100644 tests/command-line-options.src/fvar-name-hex.at diff --git a/cobj/codegen.c b/cobj/codegen.c index a22cf98c..7262ea0c 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -234,31 +234,56 @@ static void get_java_identifier_helper(struct cb_field *f, char *buf) { } static void strcpy_identifier_cobol_to_java(char *buf, const char *identifier) { - int all_ascii = 1; - unsigned char *p = (unsigned char *)identifier; - for (; *p; ++p) { - unsigned char c = *p; - if (c < 0x0A || 0x80 <= c) { - all_ascii = 0; - break; + if (cb_flag_var_name_hex) { + int all_ascii = 1; + unsigned char *p = (unsigned char *)identifier; + for (; *p; ++p) { + unsigned char c = *p; + if (c < 0x0A || 0x80 <= c) { + all_ascii = 0; + break; + } } - } - if (all_ascii) { - for (; *identifier; ++identifier, ++buf) { - if (*identifier == '-') { - *buf = '_'; - } else { - *buf = *identifier; + if (all_ascii) { + for (; *identifier; ++identifier, ++buf) { + if (*identifier == '-') { + *buf = '_'; + } else { + *buf = *identifier; + } + } + } else { + for (; *identifier; ++identifier) { + sprintf(buf, "%02x", (unsigned char)*identifier); + buf += 2; } } + *buf = '\0'; } else { - for (; *identifier; ++identifier) { - sprintf(buf, "%02x", (unsigned char)*identifier); - buf += 2; + unsigned char *src = (unsigned char *)identifier; + unsigned char *dst = (unsigned char *)buf; + while (*src) { + // ASCII characters + if (*src < 0x80) { + *dst = (*src == '-') ? '_' : *src; + ++dst; + ++src; + // Shift_JIS characters + } else { + if (src[0] == 0x81 && src[1] == 0x7C) { + dst[0] = 0x81; + dst[1] = 0x51; + } else { + dst[0] = src[0]; + dst[1] = src[1]; + } + dst += 2; + src += 2; + } } + *dst = '\0'; } - *buf = '\0'; } struct cb_label_id_map { diff --git a/cobj/flag-help.def b/cobj/flag-help.def index 5e99e057..2dc068f6 100644 --- a/cobj/flag-help.def +++ b/cobj/flag-help.def @@ -56,5 +56,8 @@ CB_FLAG (cb_flag_functions_all, "functions-all", CB_FLAG (cb_flag_mfcomment, "mfcomment", N_("'*' or '/' in column 1 treated as comment (FIXED only)")) +CB_FLAG (cb_flag_var_name_hex, "var-name-hex", + N_("Use hexdecimal representation for variable names that contains non-ASCII characters")) + //CB_FLAG (cb_flag_no_cobol_comment, "no-cobol-comment", // N_("Do not generate COBOL comments into Java programs")) \ No newline at end of file diff --git a/cobj/flag.def b/cobj/flag.def index f1685a1a..02bf0e61 100644 --- a/cobj/flag.def +++ b/cobj/flag.def @@ -81,5 +81,8 @@ CB_FLAG (cb_flag_serial_variable, "serial-variable", CB_FLAG (cb_flag_short_variable, "short-variable", N_("Use short variable names in Java source code. This feature may cause compilation errors")) +CB_FLAG (cb_flag_var_name_hex, "var-name-hex", + N_("Use hexdecimal representation for variable names that contains non-ASCII characters")) + //CB_FLAG (cb_flag_no_cobol_comment, "no-cobol-comment", // N_("Do not generate COBOL comments into Java programs")) \ No newline at end of file diff --git a/tests/Makefile.am b/tests/Makefile.am index c3934445..3fb827d3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -163,6 +163,7 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/Wtruncate.at \ command-line-options.src/Wunreachable.at \ command-line-options.src/ftrace-ftraceall.at \ + command-line-options.src/fvar-name-hex.at \ command-line-options.src/fsyntax-only.at \ command-line-options.src/fserial-variable.at \ command-line-options.src/fshort-variable.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a84a5a63..7881d2bb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -704,6 +704,7 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/Wtruncate.at \ command-line-options.src/Wunreachable.at \ command-line-options.src/ftrace-ftraceall.at \ + command-line-options.src/fvar-name-hex.at \ command-line-options.src/fsyntax-only.at \ command-line-options.src/fserial-variable.at \ command-line-options.src/fshort-variable.at \ diff --git a/tests/command-line-options.at b/tests/command-line-options.at index b057fd5b..8ca2d2fc 100644 --- a/tests/command-line-options.at +++ b/tests/command-line-options.at @@ -23,6 +23,7 @@ m4_include([Wterminator.at]) m4_include([Wtruncate.at]) m4_include([Wunreachable.at]) m4_include([ftrace-ftraceall.at]) +m4_include([fvar-name-hex.at]) m4_include([fsyntax-only.at]) m4_include([fserial-variable.at]) m4_include([ffold-copy.at]) diff --git a/tests/command-line-options.src/fvar-name-hex.at b/tests/command-line-options.src/fvar-name-hex.at new file mode 100644 index 00000000..bac09192 --- /dev/null +++ b/tests/command-line-options.src/fvar-name-hex.at @@ -0,0 +1,68 @@ +AT_SETUP([-fvar-name-hex]) + +AT_DATA([prog.cbl], [ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 Vh PIC x(5) VALUE "00000". + 01 l|P PIC x(5) VALUE "11111". + 01 b{|2 PIC x(5) VALUE "22222". + 01 Fs{P PIC x(5) VALUE "33333". + 01 2 PIC x(5) VALUE "44444". + PROCEDURE DIVISION. + x. + DISPLAY Vh. + _ސ|Px. + DISPLAY l|P. + R|2x. + DISPLAY b{|2. + Ȗ؂Px. + DISPLAY Fs{P. + {2x. + DISPLAY 2. +]) + + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[00000 +11111 +22222 +33333 +44444 +]) +AT_CHECK([cat prog.java | grep "Vh" > /dev/null]) +AT_CHECK([cat prog.java | grep "l|P" > /dev/null]) +AT_CHECK([cat prog.java | grep "b{|2" > /dev/null]) +AT_CHECK([cat prog.java | grep "Fs{P" > /dev/null]) +AT_CHECK([cat prog.java | grep "2" > /dev/null]) + +AT_CHECK([cat prog.java | grep "x" > /dev/null]) +AT_CHECK([cat prog.java | grep "_ސ|Px" > /dev/null]) +AT_CHECK([cat prog.java | grep "R|2x" > /dev/null]) +AT_CHECK([cat prog.java | grep "Ȗ؂Px" > /dev/null]) +AT_CHECK([cat prog.java | grep "{2x" > /dev/null]) + +AT_CHECK([${COMPILE} -fvar-name-hex prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[00000 +11111 +22222 +33333 +44444 +]) + +AT_CHECK([cat prog.java | grep "90568f68" > /dev/null]) +AT_CHECK([cat prog.java | grep "89a1956c817c8250" > /dev/null]) +AT_CHECK([cat prog.java | grep "8d62957b817c32" > /dev/null]) +AT_CHECK([cat prog.java | grep "894693738b7b8250" > /dev/null]) +AT_CHECK([cat prog.java | grep "90e591e432" > /dev/null]) + +AT_CHECK([cat prog.java | grep "938c8b9e83898378838b" > /dev/null]) +AT_CHECK([cat prog.java | grep "905f93de90ec817c825083898378838b" > /dev/null]) +AT_CHECK([cat prog.java | grep "8e52979c817c3283898378838b" > /dev/null]) +AT_CHECK([cat prog.java | grep "93c896d8825083898378838b" > /dev/null]) +AT_CHECK([cat prog.java | grep "8b7b8fe93283898378838b" > /dev/null]) + +AT_CLEANUP From ad6ec018938a33da51b936f49c3fa1948d0ebbe7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:47:40 +0900 Subject: [PATCH 027/188] Remove a option -fvar-name-hex (#502) --- cobj/codegen.c | 63 ++++++------------- cobj/flag-help.def | 3 - cobj/flag.def | 3 - tests/Makefile.am | 4 +- tests/Makefile.in | 4 +- tests/command-line-options.at | 1 - tests/misc.at | 1 + .../japanese-char-section-var.at} | 23 +------ 8 files changed, 24 insertions(+), 78 deletions(-) rename tests/{command-line-options.src/fvar-name-hex.at => misc.src/japanese-char-section-var.at} (62%) diff --git a/cobj/codegen.c b/cobj/codegen.c index 7262ea0c..cd217577 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -234,56 +234,29 @@ static void get_java_identifier_helper(struct cb_field *f, char *buf) { } static void strcpy_identifier_cobol_to_java(char *buf, const char *identifier) { - if (cb_flag_var_name_hex) { - int all_ascii = 1; - unsigned char *p = (unsigned char *)identifier; - for (; *p; ++p) { - unsigned char c = *p; - if (c < 0x0A || 0x80 <= c) { - all_ascii = 0; - break; - } - } - - if (all_ascii) { - for (; *identifier; ++identifier, ++buf) { - if (*identifier == '-') { - *buf = '_'; - } else { - *buf = *identifier; - } - } + unsigned char *src = (unsigned char *)identifier; + unsigned char *dst = (unsigned char *)buf; + while (*src) { + // ASCII characters + if (*src < 0x80) { + *dst = (*src == '-') ? '_' : *src; + ++dst; + ++src; + // Shift_JIS characters } else { - for (; *identifier; ++identifier) { - sprintf(buf, "%02x", (unsigned char)*identifier); - buf += 2; - } - } - *buf = '\0'; - } else { - unsigned char *src = (unsigned char *)identifier; - unsigned char *dst = (unsigned char *)buf; - while (*src) { - // ASCII characters - if (*src < 0x80) { - *dst = (*src == '-') ? '_' : *src; - ++dst; - ++src; - // Shift_JIS characters + // convert zenkaku hyphen to zenkaku underscore + if (src[0] == 0x81 && src[1] == 0x7C) { + dst[0] = 0x81; + dst[1] = 0x51; } else { - if (src[0] == 0x81 && src[1] == 0x7C) { - dst[0] = 0x81; - dst[1] = 0x51; - } else { - dst[0] = src[0]; - dst[1] = src[1]; - } - dst += 2; - src += 2; + dst[0] = src[0]; + dst[1] = src[1]; } + dst += 2; + src += 2; } - *dst = '\0'; } + *dst = '\0'; } struct cb_label_id_map { diff --git a/cobj/flag-help.def b/cobj/flag-help.def index 2dc068f6..5e99e057 100644 --- a/cobj/flag-help.def +++ b/cobj/flag-help.def @@ -56,8 +56,5 @@ CB_FLAG (cb_flag_functions_all, "functions-all", CB_FLAG (cb_flag_mfcomment, "mfcomment", N_("'*' or '/' in column 1 treated as comment (FIXED only)")) -CB_FLAG (cb_flag_var_name_hex, "var-name-hex", - N_("Use hexdecimal representation for variable names that contains non-ASCII characters")) - //CB_FLAG (cb_flag_no_cobol_comment, "no-cobol-comment", // N_("Do not generate COBOL comments into Java programs")) \ No newline at end of file diff --git a/cobj/flag.def b/cobj/flag.def index 02bf0e61..f1685a1a 100644 --- a/cobj/flag.def +++ b/cobj/flag.def @@ -81,8 +81,5 @@ CB_FLAG (cb_flag_serial_variable, "serial-variable", CB_FLAG (cb_flag_short_variable, "short-variable", N_("Use short variable names in Java source code. This feature may cause compilation errors")) -CB_FLAG (cb_flag_var_name_hex, "var-name-hex", - N_("Use hexdecimal representation for variable names that contains non-ASCII characters")) - //CB_FLAG (cb_flag_no_cobol_comment, "no-cobol-comment", // N_("Do not generate COBOL comments into Java programs")) \ No newline at end of file diff --git a/tests/Makefile.am b/tests/Makefile.am index 3fb827d3..88ea25ed 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -163,7 +163,6 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/Wtruncate.at \ command-line-options.src/Wunreachable.at \ command-line-options.src/ftrace-ftraceall.at \ - command-line-options.src/fvar-name-hex.at \ command-line-options.src/fsyntax-only.at \ command-line-options.src/fserial-variable.at \ command-line-options.src/fshort-variable.at \ @@ -217,7 +216,8 @@ misc_DEPENDENCIES = \ misc.src/validate-indexed-file-keys.at \ misc.src/record-key-duplicates-error.at \ misc.src/copy-comments.at \ - misc.src/read_prev_after_start.at + misc.src/read_prev_after_start.at \ + misc.src/japanese-char-section-var.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 7881d2bb..6f23695a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -704,7 +704,6 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/Wtruncate.at \ command-line-options.src/Wunreachable.at \ command-line-options.src/ftrace-ftraceall.at \ - command-line-options.src/fvar-name-hex.at \ command-line-options.src/fsyntax-only.at \ command-line-options.src/fserial-variable.at \ command-line-options.src/fshort-variable.at \ @@ -758,7 +757,8 @@ misc_DEPENDENCIES = \ misc.src/validate-indexed-file-keys.at \ misc.src/record-key-duplicates-error.at \ misc.src/copy-comments.at \ - misc.src/read_prev_after_start.at + misc.src/read_prev_after_start.at \ + misc.src/japanese-char-section-var.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/command-line-options.at b/tests/command-line-options.at index 8ca2d2fc..b057fd5b 100644 --- a/tests/command-line-options.at +++ b/tests/command-line-options.at @@ -23,7 +23,6 @@ m4_include([Wterminator.at]) m4_include([Wtruncate.at]) m4_include([Wunreachable.at]) m4_include([ftrace-ftraceall.at]) -m4_include([fvar-name-hex.at]) m4_include([fsyntax-only.at]) m4_include([fserial-variable.at]) m4_include([ffold-copy.at]) diff --git a/tests/misc.at b/tests/misc.at index b6a182bf..8012e6cc 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -46,3 +46,4 @@ m4_include([validate-indexed-file-keys.at]) m4_include([record-key-duplicates-error.at]) #m4_include([copy-comments.at]) m4_include([read_prev_after_start.at]) +m4_include([japanese-char-section-var.at]) diff --git a/tests/command-line-options.src/fvar-name-hex.at b/tests/misc.src/japanese-char-section-var.at similarity index 62% rename from tests/command-line-options.src/fvar-name-hex.at rename to tests/misc.src/japanese-char-section-var.at index bac09192..9d4a4c2c 100644 --- a/tests/command-line-options.src/fvar-name-hex.at +++ b/tests/misc.src/japanese-char-section-var.at @@ -1,4 +1,4 @@ -AT_SETUP([-fvar-name-hex]) +AT_SETUP([japanese word section variable]) AT_DATA([prog.cbl], [ IDENTIFICATION DIVISION. PROGRAM-ID. prog. @@ -44,25 +44,4 @@ AT_CHECK([cat prog.java | grep " AT_CHECK([cat prog.java | grep "Ȗ؂Px" > /dev/null]) AT_CHECK([cat prog.java | grep "{2x" > /dev/null]) -AT_CHECK([${COMPILE} -fvar-name-hex prog.cbl]) -AT_CHECK([${RUN_MODULE} prog], [0], -[00000 -11111 -22222 -33333 -44444 -]) - -AT_CHECK([cat prog.java | grep "90568f68" > /dev/null]) -AT_CHECK([cat prog.java | grep "89a1956c817c8250" > /dev/null]) -AT_CHECK([cat prog.java | grep "8d62957b817c32" > /dev/null]) -AT_CHECK([cat prog.java | grep "894693738b7b8250" > /dev/null]) -AT_CHECK([cat prog.java | grep "90e591e432" > /dev/null]) - -AT_CHECK([cat prog.java | grep "938c8b9e83898378838b" > /dev/null]) -AT_CHECK([cat prog.java | grep "905f93de90ec817c825083898378838b" > /dev/null]) -AT_CHECK([cat prog.java | grep "8e52979c817c3283898378838b" > /dev/null]) -AT_CHECK([cat prog.java | grep "93c896d8825083898378838b" > /dev/null]) -AT_CHECK([cat prog.java | grep "8b7b8fe93283898378838b" > /dev/null]) - AT_CLEANUP From 04f66a964d3db5edf21d268dab790381d988fbc2 Mon Sep 17 00:00:00 2001 From: Roy Date: Fri, 11 Oct 2024 08:12:05 +0800 Subject: [PATCH 028/188] fix: change typos of cobj-idx cmd (#503) --- README.md | 16 ++++++++-------- README_JP.md | 10 +++++----- .../indexed_file/IndexedFileUtilMain.java | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6611de5f..720da38e 100644 --- a/README.md +++ b/README.md @@ -86,26 +86,26 @@ The Windows version of opensource COBOL 4J uses the CL compiler included in Visu After the build is completed, "cobj.exe" will be created in `win/x64/Debug` or `win/x64/Release`. ### Build Java Files -1. Install JDK. +1. Install JDK. https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows 2. Open PowerShell. 3. Move to "libcobj" directory and execute `.\gradlew shadowJar` ``` cd libcobj .\gradlew shadowJar - ``` + ``` Then, libcobj.jar will be created in `libcobj\app\build\libs\`. ### Place files in the appropriate location 1. If you build in Debug mode, change the 5th line of win/make-install.ps1 from `\x64\Release\cobj.exe` to `\x64\Debug\cobj.exe`. 2. Open PowerShell -3. Move to "win" directory and execute make-install.ps1. +3. Move to "win" directory and execute make-install.ps1. ``` cd win .\make-install.ps1 ``` -* Each file is placed in the following location. +* Each file is placed in the following location. | File name | Location | |---|---| @@ -154,7 +154,7 @@ Run. java [PROGRAM-ID] ``` -## Documentation +## Documentation * [The API reference of the runtime library `libcobj.jar`](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) @@ -226,11 +226,11 @@ cobj-idx info cobj-idx load Load the data from stdin into the indexed file. - The default format of the input data is SQUENTIAL of COBOL. + The default format of the input data is SEQUENTIAL of COBOL. cobj-idx load - Load data from the input fiile into the indexed file. - The default format of the input data is SQUENTIAL of COBOL. + Load data from the input file into the indexed file. + The default format of the input data is SEQUENTIAL of COBOL. cobj-idx unload Write the records stored in the indexed file into stdout. diff --git a/README_JP.md b/README_JP.md index a41be9c3..b714ccef 100644 --- a/README_JP.md +++ b/README_JP.md @@ -86,7 +86,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ ``` cd libcobj .\gradlew shadowJar - ``` + ``` これにより、`libcobj\app\build\libs\`に"libcobj.jar"が作成される。 ### ファイルを適切な位置に配置 @@ -103,7 +103,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ | cobj.exe | C:\opensourcecobol4j\bin | | libcobj.jar | C:\opensourcecobol4j\lib | | configファイル | C:\opensourcecobol4j\config | - + * ファイルの配置場所を変更したい場合は、`make-install.ps1`に記載してあるパスを編集してください。 ### 環境変数の設定 @@ -211,11 +211,11 @@ cobj-idx info cobj-idx load Load the data from stdin into the indexed file. - The default format of the input data is SQUENTIAL of COBOL. + The default format of the input data is SEQUENTIAL of COBOL. cobj-idx load - Load data from the input fiile into the indexed file. - The default format of the input data is SQUENTIAL of COBOL. + Load data from the input file into the indexed file. + The default format of the input data is SEQUENTIAL of COBOL. cobj-idx unload Write the records stored in the indexed file into stdout. diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 59370914..80b9f407 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -179,11 +179,11 @@ private static void printHelpMessage() { System.out.println(); System.out.println("cobj-idx load "); System.out.println(" Load the data from stdin into the indexed file."); - System.out.println(" The default format of the input data is SQUENTIAL of COBOL."); + System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); System.out.println(); System.out.println("cobj-idx load "); - System.out.println(" Load data from the input fiile into the indexed file."); - System.out.println(" The default format of the input data is SQUENTIAL of COBOL."); + System.out.println(" Load data from the input file into the indexed file."); + System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); System.out.println(); System.out.println("cobj-idx unload "); System.out.println(" Write the records stored in the indexed file into stdout."); From 676f9f212c56001bf865bc46fc0e59fe54c11c3c Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:50:52 +0900 Subject: [PATCH 029/188] Convert some EVALUATE statements to switch statement (#504) --- cobj/codegen.c | 44 ++ cobj/tree.c | 13 + cobj/tree.h | 20 + cobj/typeck.c | 148 ++++- tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/evaluate-switch.at | 1034 +++++++++++++++++++++++++++++ 8 files changed, 1263 insertions(+), 3 deletions(-) create mode 100644 tests/misc.src/evaluate-switch.at diff --git a/cobj/codegen.c b/cobj/codegen.c index cd217577..cbafab1b 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -3549,6 +3549,47 @@ static void joutput_ferror_stmt(struct cb_statement *p, int code) { // joutput_line("// %s:%d: %s", p->file, p->line, p->comment); // } +static void joutput_switch(struct cb_switch *sw, + enum joutput_stmt_type output_type) { + joutput_prefix(); + joutput("switch("); + joutput_param(sw->test, -1); + joutput(".getInt()) {"); + joutput_newline(); + joutput_indent_level += 2; + cb_tree case_tree; + for (case_tree = sw->case_list; case_tree; case_tree = CB_CHAIN(case_tree)) { + cb_tree whens = CB_VALUE(case_tree); + cb_tree stmt = CB_VALUE(whens); + int flag_other_exists = 1; + for (; whens; whens = CB_CHAIN(whens)) { + cb_tree objs = CB_VALUE(whens); + for (; objs; objs = CB_CHAIN(objs)) { + cb_tree obj = CB_VALUE(objs); + if (obj && CB_LIST_P(obj)) { + flag_other_exists = 0; + } + if (obj && CB_PAIR_P(obj)) { + cb_tree when_target = CB_PAIR_Y(obj); + struct cb_literal *primary_target = + CB_LITERAL(CB_PAIR_X(when_target)); + int dummy; + int label = + cb_literal_to_int_for_switch_label(primary_target, &dummy); + joutput_line("case %d:", label); + } + } + } + if (flag_other_exists) { + joutput_line("default:"); + } + joutput_stmt(stmt, output_type); + joutput_line("break;"); + } + joutput_indent_level -= 2; + joutput_line("}"); +} + static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { struct cb_statement *p; struct cb_label *lp; @@ -3948,6 +3989,9 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { joutput_prefix(); joutput(";\n"); break; + case CB_TAG_SWITCH: + joutput_switch(CB_SWITCH(x), output_type); + break; case CB_TAG_LIST: if (x && CB_TREE_TAG(CB_VALUE(x)) == CB_TAG_PERFORM) { putParen = 0; diff --git a/cobj/tree.c b/cobj/tree.c index a7298644..16f0b64d 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -2511,6 +2511,19 @@ cb_tree cb_build_continue(void) { return CB_TREE(p); } +/* + * SWITCH + */ + +cb_tree cb_build_switch(cb_tree test, cb_tree case_list) { + struct cb_switch *p; + + p = make_tree(CB_TAG_SWITCH, CB_CATEGORY_UNKNOWN, sizeof(struct cb_switch)); + p->test = test; + p->case_list = case_list; + return CB_TREE(p); +} + /* * FUNCTION */ diff --git a/cobj/tree.h b/cobj/tree.h index 4e79b45a..1f124408 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -85,6 +85,8 @@ enum cb_tag { CB_TAG_JAVA_CONTINUE, CB_TAG_JAVA_BREAK, + + CB_TAG_SWITCH, }; enum cb_alphabet_name_type { @@ -1118,6 +1120,24 @@ extern cb_tree cb_build_perform(int type); extern cb_tree cb_build_perform_varying(cb_tree name, cb_tree from, cb_tree step, cb_tree until); +/* + * switch (evaluate) + */ + +struct cb_switch { + struct cb_tree_common common; + cb_tree test; + cb_tree case_list; +}; + +#define CB_SWITCH(x) (CB_TREE_CAST(CB_TAG_SWITCH, struct cb_switch, x)) +#define CB_SWITCH_P(x) (CB_TREE_TAG(x) == CB_TAG_SWITCH) + +extern cb_tree cb_build_switch(cb_tree test, cb_tree case_tree); + +extern int cb_literal_to_int_for_switch_label(struct cb_literal *lit, + int *result); + /* * SORT */ diff --git a/cobj/typeck.c b/cobj/typeck.c index 95db7b33..e94577ea 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -3673,8 +3673,154 @@ static cb_tree build_evaluate(cb_tree subject_list, cb_tree case_list) { } } +int cb_literal_to_int_for_switch_label(struct cb_literal *lit, int *result) { + const char *min_num_abs = + "2147483648"; // -1 * (the minimum value of int of Java) + const char *max_num = "2147483647"; // the maximum value of int of Java + const int len_boundary = + 10; // string length of min_num_abs (== string length of max_num) + if (lit->size > len_boundary) { + // the value of the literal is out of range + *result = 0; + return 0; + } + + size_t i; + const char *boundary = lit->sign < 0 ? min_num_abs : max_num; + if (lit->size == len_boundary) { + for (i = 0; i < len_boundary; ++i) { + if (boundary[i] < lit->data[i]) { + // the value of the literal is out of range + *result = 0; + return 0; + } + } + } + + int ret = 0; + for (i = 0; i < lit->size; ++i) { + ret = ret * 10 + lit->data[i] - '0'; + } + *result = 1; + return lit->sign < 0 ? -ret : ret; +} + +// Determine a given label exists in the list of existing labels +// If a given label exists in the list, return 1. Otherwise return 0; +static int is_switch_label_duplicate(int label, const int *existing_label_list, + int list_len) { + int i = 0; + for (; i < list_len; ++i) { + if (existing_label_list[i] == label) { + return 1; + } + } + return 0; +} + +static cb_tree convert_evaluate_stmt_to_switch_stmt(cb_tree subject_list, + cb_tree case_list) { + cb_tree subjs; + cb_tree whens; + cb_tree objs; + + cb_tree case_tree = case_list; + int when_count = 0; + int other_exists = 0; + + // The length of subject_list must be 1 + if (subject_list == NULL || CB_CHAIN(subject_list)) { + return NULL; + } + + // Determine if a given evaluate statement can be converted to a switch + // statement + int case_count = 0; + for (; case_tree; case_tree = CB_CHAIN(case_tree), ++case_count) { + whens = CB_VALUE(case_tree); + /* for each WHEN sequence */ + int flag_other_exists = 1; + for (; whens; whens = CB_CHAIN(whens)) { + for (subjs = subject_list, objs = CB_VALUE(whens); subjs && objs; + subjs = CB_CHAIN(subjs), objs = CB_CHAIN(objs)) { + cb_tree subj = CB_VALUE(subjs); + cb_tree obj = CB_VALUE(objs); + if (!subj || CB_TREE_CATEGORY(subj) != CB_CATEGORY_NUMERIC) { + return NULL; + } + if (obj) { + if (CB_LIST_P(obj)) { + flag_other_exists = 0; + } + if (CB_STATEMENT_P(obj)) { + continue; + } + if (CB_PAIR_P(obj)) { + // WHEN NOT + if (CB_PURPOSE_INT(obj)) { + return NULL; + } + cb_tree when_target = CB_PAIR_Y(obj); + if (CB_PAIR_P(when_target)) { + cb_tree primary_target = CB_PAIR_X(when_target); + cb_tree thru_target = CB_PAIR_Y(when_target); + if (!CB_LITERAL_P(primary_target) || thru_target) { + return NULL; + } + struct cb_literal *lit = CB_LITERAL(primary_target); + if (lit->data == NULL || lit->scale != 0) { + return NULL; + } + ++when_count; + } + } + } + } + } + other_exists |= flag_other_exists; + } + // Build Switch statement + int *cases = malloc(when_count * sizeof(int)); + int case_index = 0; + for (case_tree = case_list; case_tree; case_tree = CB_CHAIN(case_tree)) { + whens = CB_VALUE(case_tree); + /* for each WHEN sequence */ + for (; whens; whens = CB_CHAIN(whens)) { + for (objs = CB_VALUE(whens); objs; objs = CB_CHAIN(objs)) { + cb_tree obj = CB_VALUE(objs); + if (obj && CB_PAIR_P(obj)) { + cb_tree when_target = CB_PAIR_Y(obj); + struct cb_literal *primary_target = + CB_LITERAL(CB_PAIR_X(when_target)); + int result; + int label = + cb_literal_to_int_for_switch_label(primary_target, &result); + // If calculating a switch label fails, the evaluate statement cannot + // be converted to switch statement + if (!result) { + return NULL; + } + // If a duplicate label is found, the evaluate statement cannot be + // converted to switch statement + if (is_switch_label_duplicate(label, cases, case_index)) { + return NULL; + } + cases[case_index++] = label; + } + } + } + } + return cb_build_switch(CB_VALUE(subject_list), case_list); +} + void cb_emit_evaluate(cb_tree subject_list, cb_tree case_list) { - cb_emit(build_evaluate(subject_list, case_list)); + cb_tree switch_stmt = + convert_evaluate_stmt_to_switch_stmt(subject_list, case_list); + if (switch_stmt) { + cb_emit(switch_stmt); + } else { + cb_emit(build_evaluate(subject_list, case_list)); + } } /* diff --git a/tests/Makefile.am b/tests/Makefile.am index 88ea25ed..fcc50f85 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -217,7 +217,8 @@ misc_DEPENDENCIES = \ misc.src/record-key-duplicates-error.at \ misc.src/copy-comments.at \ misc.src/read_prev_after_start.at \ - misc.src/japanese-char-section-var.at + misc.src/japanese-char-section-var.at \ + misc.src/evaluate-switch.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 6f23695a..f5377a88 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -758,7 +758,8 @@ misc_DEPENDENCIES = \ misc.src/record-key-duplicates-error.at \ misc.src/copy-comments.at \ misc.src/read_prev_after_start.at \ - misc.src/japanese-char-section-var.at + misc.src/japanese-char-section-var.at \ + misc.src/evaluate-switch.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 8012e6cc..2aba485d 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -47,3 +47,4 @@ m4_include([record-key-duplicates-error.at]) #m4_include([copy-comments.at]) m4_include([read_prev_after_start.at]) m4_include([japanese-char-section-var.at]) +m4_include([evaluate-switch.at]) diff --git a/tests/misc.src/evaluate-switch.at b/tests/misc.src/evaluate-switch.at new file mode 100644 index 00000000..ac57e172 --- /dev/null +++ b/tests/misc.src/evaluate-switch.at @@ -0,0 +1,1034 @@ +AT_SETUP([Convert EVALUATE to switch]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + DATA DIVISION. + WORKING-STORAGE SECTION. + 78 STATUS-1 VALUE 1. + 78 STATUS--1 VALUE -1. + 78 STATUS-2 VALUE 2. + + 01 TEST-9-1 PIC 9(3) VALUE 1. + 01 TEST-9-2 PIC 9(3) VALUE 2. + 01 TEST-S9-1 PIC S9(3) VALUE 1. + 01 TEST-S9-2 PIC S9(3) VALUE 2. + 01 TEST-9-1-COMP3 PIC 9(3) COMP-3 VALUE 1. + 01 TEST-9-2-COMP3 PIC 9(3) COMP-3 VALUE 2. + 01 TEST-S9-1-COMP3 PIC S9(3) COMP-3 VALUE 1. + 01 TEST-S9-2-COMP3 PIC S9(3) COMP-3 VALUE 2. + 01 TEST-9-1-COMP5 PIC 9(3) COMP-5 VALUE 1. + 01 TEST-9-2-COMP5 PIC 9(3) COMP-5 VALUE 2. + 01 TEST-S9-1-COMP5 PIC 9(3) COMP-5 VALUE 1. + 01 TEST-S9-2-COMP5 PIC 9(3) COMP-5 VALUE 2. + PROCEDURE DIVISION. + MAIN-PROC SECTION. + + EVALUATE 1 + WHEN 1 + DISPLAY "OK". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE 1 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE 1 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE 1 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE 2 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE 2 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE 1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE 1 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE 1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE 1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-9-1 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-9-1 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-2 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-2 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-S9-1 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-S9-1 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-9-1-COMP3 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-2-COMP3 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-2-COMP3 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-S9-1-COMP3 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2-COMP3 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2-COMP3 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP3 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-9-1-COMP5 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-2-COMP5 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK22222". + + EVALUATE TEST-9-2-COMP5 + WHEN STATUS-1 + DISPLAY "NG11111111" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "N". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** + + EVALUATE TEST-S9-1-COMP5 + WHEN 1 + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN -1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS--1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2-COMP5 + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-2-COMP5 + WHEN STATUS-1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + EVALUATE TEST-S9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN -1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS--1 + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN 1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN 2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + + EVALUATE TEST-S9-1-COMP5 + WHEN STATUS-1 + DISPLAY "OK" + WHEN STATUS-2 + DISPLAY "NG" + WHEN OTHER + DISPLAY "NG". + *************************** +]) + +AT_DATA([test.sh], +[#!/bin/bash +# Compile a COBOL source file +cobj prog.cbl +# The number of OK in the program output +OK_COUNT=$(java prog | tee result.txt | grep OK | wc -l) +# The number of EVALUATE statements in a COBOL source file +EVALUATE_COUNT=$(grep EVALUATE prog.cbl | wc -l) +# The number of switch statements corresponding to EVALUATE statements +SWITCH_COUNT=$(grep -A 2 '/\* prog.cbl:@<:@0-9@:>@*: EVALUATE \*/' prog.java | grep 'switch' | wc -l) +# Check the numbers +test "$OK_COUNT" = "$EVALUATE_COUNT" && test "$OK_COUNT" = "$SWITCH_COUNT" +]) + +AT_CHECK([chmod +x test.sh]) +AT_CHECK([./test.sh]) + +AT_DATA([prog2.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog2. + + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + MAIN-PROC SECTION. + + EVALUATE 1 + WHEN NOT 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK". + + + EVALUATE 1 + WHEN 3 + DISPLAY "NG" + WHEN NOT 2 + DISPLAY "OK" + WHEN OTHER + DISPLAY "NG". +]) + +AT_DATA([test2.sh], +[#!/bin/bash +# Compile a COBOL source file +cobj prog2.cbl +# The number of OK in the program output +OK_COUNT=$(java prog2 | tee result.txt | grep OK | wc -l) +# The number of EVALUATE statements in a COBOL source file +EVALUATE_COUNT=$(grep EVALUATE prog2.cbl | wc -l) +# The number of switch statements corresponding to EVALUATE statements +SWITCH_COUNT=$(grep -A 2 '/\* prog2.cbl:@<:@0-9@:>@*: EVALUATE \*/' prog2.java | grep 'switch' | wc -l) +# Check the numbers +test "$OK_COUNT" = "$EVALUATE_COUNT" && test "$SWITCH_COUNT" = 0 +]) + +AT_CHECK([chmod +x test2.sh]) +AT_CHECK([./test2.sh]) + +AT_DATA([pp.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. pp. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A PIC 9 VALUE 0. + PROCEDURE DIVISION. + EVALUATE A + WHEN 1 + WHEN 2 + DISPLAY "NG" + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + EVALUATE A + WHEN 1 + WHEN 2 + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + EVALUATE A + WHEN 1 + DISPLAY "NG" + WHEN 2 + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + GOBACK. + +]) +AT_CHECK([cobj pp.cbl]) +AT_CHECK([java pp], [0], +[OK +OK +OK +]) + +AT_DATA([qq.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. qq. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A PIC 9 VALUE 0. + PROCEDURE DIVISION. + EVALUATE A + WHEN 1 + WHEN 2 + DISPLAY "NG" + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + EVALUATE A + WHEN 1 + WHEN 2 + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + EVALUATE A + WHEN 1 + DISPLAY "NG" + WHEN 2 + WHEN 3 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + + EVALUATE A + WHEN 1 + WHEN 2 + WHEN 3 + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + + EVALUATE A + WHEN 1 + WHEN 2 + DISPLAY "NG" + WHEN 3 + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + + EVALUATE A + WHEN 1 + DISPLAY "NG" + WHEN 2 + WHEN 3 + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + + EVALUATE A + WHEN 1 + DISPLAY "NG" + WHEN 2 + DISPLAY "NG" + WHEN 3 + WHEN OTHER + DISPLAY "OK" + END-EVALUATE. + GOBACK. + +]) +AT_CHECK([cobj ${CONF_JP_COMPAT} qq.cbl]) +AT_CHECK([java qq], [0], +[OK +OK +OK +OK +OK +OK +OK +]) + +AT_DATA([rr.cbl], +[ IDENTIFICATION DIVISION. + PROGRAM-ID. rr. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO 'sample-file' + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD F. + 01 REC PIC X. + WORKING-STORAGE SECTION. + 01 A PIC 9 VALUE 0. + 01 C PIC 9 VALUE 0. + PROCEDURE DIVISION. + EVALUATE A + WHEN 0 + DISPLAY "OK1" + IF 1 = 1 THEN + DISPLAY "OK2" + END-IF + PERFORM VARYING C FROM 3 BY 1 UNTIL C >= 4 + DISPLAY "OK" C + END-PERFORM + OPEN OUTPUT F + MOVE 'A' TO REC + WRITE REC + MOVE 'B' TO REC + WRITE REC + CLOSE F + OPEN INPUT F + PERFORM FOREVER + READ F + AT END + DISPLAY "READ END" + EXIT PERFORM + NOT AT END + DISPLAY "READ DATA:" REC + END-READ + END-PERFORM + CLOSE F + END-EVALUATE. + EVALUATE A + WHEN 1 + DISPLAY "NG" + WHEN OTHER + DISPLAY "OK1" + IF 1 = 1 THEN + DISPLAY "OK2" + END-IF + PERFORM VARYING C FROM 3 BY 1 UNTIL C >= 4 + DISPLAY "OK" C + END-PERFORM + OPEN INPUT F + PERFORM FOREVER + READ F + AT END + DISPLAY "READ END" + EXIT PERFORM + NOT AT END + DISPLAY "READ DATA:" REC + END-READ + END-PERFORM + CLOSE F + END-EVALUATE. + GOBACK. +]) + +AT_CHECK([cobj rr.cbl]) +AT_CHECK([java rr], [0], +[OK1 +OK2 +OK3 +READ DATA:A +READ DATA:B +READ END +OK1 +OK2 +OK3 +READ DATA:A +READ DATA:B +READ END +]) + +AT_CLEANUP From 996f66f17f67f589f521c5f98ab3b0e370b621d0 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:56:12 +0900 Subject: [PATCH 030/188] Simplify configure.ac slightly (#506) --- config.h.in | 6 ------ configure | 7 ------- configure.ac | 3 +-- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/config.h.in b/config.h.in index 6fbf66ec..5fdfd0db 100644 --- a/config.h.in +++ b/config.h.in @@ -60,9 +60,6 @@ the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE -/* curses has color_set function */ -#undef HAVE_COLOR_SET - /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT @@ -85,9 +82,6 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV diff --git a/configure b/configure index ab62668d..f6b06a19 100755 --- a/configure +++ b/configure @@ -3549,7 +3549,6 @@ fi - printf "%s\n" "#define __USE_STRING_INLINES 1" >>confdefs.h @@ -20251,12 +20250,6 @@ then : printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes -then : - printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h - -fi # Check for timezone diff --git a/configure.ac b/configure.ac index 77876630..099e4993 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,6 @@ AH_TEMPLATE([COB_HAS_INLINE], [Can use inline keyword]) AH_TEMPLATE([COB_NO_SELFOPEN], [Can not dlopen self]) AH_TEMPLATE([COB_STRFTIME], [Can use strftime for timezone]) AH_TEMPLATE([COB_LI_IS_LL], [long int is long long]) -AH_TEMPLATE([HAVE_COLOR_SET], [curses has color_set function]) AC_DEFINE(__USE_STRING_INLINES) @@ -179,7 +178,7 @@ fi AC_FUNC_ALLOCA AC_FUNC_VPRINTF AC_CHECK_FUNCS([memmove memset setlocale fcntl strerror \ - strcasecmp strchr strrchr strdup strstr strtol gettimeofday]) + strcasecmp strchr strrchr strdup strstr strtol]) # Check for timezone AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[timezone = 3600;]])], From e71f80e36e7da216bad5aaebe35e0636632e391b Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:29:15 +0900 Subject: [PATCH 031/188] Remove COB_NON_ALIGNED and related code (#511) * [Fix]: remove COB_NON_ALIGNED and related code * [Refactor]: refactor C files to resolve cpp-check warnings * [Refactor]: refactor codegen.c * [Update]: run static analysis on Ubuntu 22.04 * [Update]: `runs-on: ubuntu-22.04` --- .github/workflows/static-analysis.yml | 2 +- cobj/cobj.h | 9 -- cobj/codegen.c | 136 +---------------------- cobj/typeck.c | 151 +++----------------------- 4 files changed, 18 insertions(+), 280 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 23b6c0f9..36280658 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -8,7 +8,7 @@ permissions: jobs: static_analysis: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: # Checkout opensource COBOL - name: Checkout opensource COBOL 4J diff --git a/cobj/cobj.h b/cobj/cobj.h index 21456ca1..792f8b52 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -36,15 +36,6 @@ #include "lib/gettext.h" #endif -#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && \ - !defined(__powerpc64__) && !defined(__ppc__) && !defined(__amd64__) -#define COB_NON_ALIGNED -/* Some DEC Alphas can only directly load shorts at 4-byte aligned addresses */ -#ifdef __alpha -#define COB_SHORT_BORK -#endif -#endif - #define ABORT() cobc_abort(__FILE__, __LINE__) #define CB_FORMAT_FIXED 0 diff --git a/cobj/codegen.c b/cobj/codegen.c index cbafab1b..b580fd58 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -1288,25 +1288,13 @@ static void joutput_integer(cb_tree x) { return; case CB_USAGE_POINTER: -#ifdef COB_NON_ALIGNED - joutput("(cob_get_pointer ("); - joutput_data(x); - joutput("))"); -#else joutput("(*(unsigned char **) ("); joutput_data(x); joutput("))"); -#endif return; case CB_USAGE_PROGRAM_POINTER: -#ifdef COB_NON_ALIGNED - joutput("(cob_get_prog_pointer ("); joutput_data(x); - joutput("))"); -#else - joutput_data(x); -#endif return; case CB_USAGE_DISPLAY: @@ -1337,19 +1325,7 @@ static void joutput_integer(cb_tree x) { } return; } -#ifdef COB_NON_ALIGNED - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - ( -#ifdef COB_SHORT_BORK - (f->size == 2 && (f->offset % 4 == 0)) || -#else - (f->size == 2 && (f->offset % 2 == 0)) || -#endif - (f->size == 4 && (f->offset % 4 == 0)) || - (f->size == 8 && (f->offset % 8 == 0)))) { -#else if (f->size == 2 || f->size == 4 || f->size == 8) { -#endif if (f->flag_binary_swap) { joutput_data(x); if (!integer_reference_flag) { @@ -1998,13 +1974,6 @@ static void joutput_cond(cb_tree x, int save_flag) { if (save_flag) { joutput("(ret = "); } - //#ifdef __GNUC__ - // joutput_indent ("({"); - //#else - // inside_stack[inside_check] = 0; - // ++inside_check; - // joutput ("(\n"); - //#endif joutput_indent("(new GetInt() {"); joutput_indent_level += 2; joutput_indent("public int run(){"); @@ -2016,12 +1985,6 @@ static void joutput_cond(cb_tree x, int save_flag) { } joutput_stmt(CB_VALUE(x), JOUTPUT_STMT_DEFAULT); } - //#ifdef __GNUC__ - // joutput_indent ("})"); - //#else - // --inside_check; - // joutput (")"); - //#endif joutput_indent_level -= 2; joutput_indent("}"); joutput_indent_level -= 2; @@ -2777,11 +2740,8 @@ static void joutput_search(struct cb_search *p) { static void joutput_call(struct cb_call *p) { cb_tree x; cb_tree l; - struct cb_literal *lp; - char *callp; struct cb_field *f; char *system_call = NULL; - struct system_table *psyst; size_t n; size_t retptr; int dynamic_link = 1; @@ -2793,8 +2753,9 @@ static void joutput_call(struct cb_call *p) { } /* System routine entry points */ if (p->is_system) { - lp = CB_LITERAL(p->name); - psyst = (struct system_table *)&system_tab[0]; + struct cb_literal *lp = CB_LITERAL(p->name); + + struct system_table *psyst = (struct system_table *)&system_tab[0]; for (; psyst->syst_name; psyst++) { if (!strcmp((const char *)lp->data, (const char *)psyst->syst_name)) { system_call = (char *)psyst->syst_call; @@ -2809,12 +2770,6 @@ static void joutput_call(struct cb_call *p) { } /* Local variables */ -#ifdef COB_NON_ALIGNED - if (dynamic_link && retptr) { - // output_line ("void *temptr;"); - } -#endif - if (CB_REFERENCE_P(p->name) && CB_FIELD_P(CB_REFERENCE(p->name)->value) && CB_FIELD(CB_REFERENCE(p->name)->value)->usage == CB_USAGE_PROGRAM_POINTER) { @@ -2984,6 +2939,7 @@ static void joutput_call(struct cb_call *p) { } } } else { + char *callp; /* Dynamic link */ if (CB_LITERAL_P(p->name)) { callp = cb_encode_program_id((char *)(CB_LITERAL(p->name)->data)); @@ -3205,13 +3161,6 @@ static void joutput_call(struct cb_call *p) { joutput_stmt(cb_build_move(current_prog->cb_return_code, p->returning), JOUTPUT_STMT_DEFAULT); suppress_warn = 0; -#ifdef COB_NON_ALIGNED - } else { - // output_prefix (); - // output ("memcpy ("); - // output_data (p->returning); - // output (", &temptr, %d);\n", sizeof (void *)); -#endif } } if (p->stmt2) { @@ -3595,9 +3544,6 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { struct cb_label *lp; struct cb_assign *ap; struct cb_if *ip; -#ifdef COB_NON_ALIGNED - struct cb_cast *cp; -#endif int code; int putParen = 0; @@ -3818,80 +3764,7 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { break; case CB_TAG_ASSIGN: ap = CB_ASSIGN(x); -#ifdef COB_NON_ALIGNED - /* Nonaligned */ - if (CB_TREE_CLASS(ap->var) == CB_CLASS_POINTER || - CB_TREE_CLASS(ap->val) == CB_CLASS_POINTER) { - /* Pointer assignment */ - joutput_indent("{"); - joutput_line("void *temp_ptr;"); - /* temp_ptr = source address; */ - joutput_prefix(); - if (ap->val == cb_null || ap->val == cb_zero) { - /* MOVE NULL ... */ - joutput("temp_ptr = 0;\n"); - } else if (CB_TREE_TAG(ap->val) == CB_TAG_CAST) { - /* MOVE ADDRESS OF val ... */ - cp = CB_CAST(ap->val); - joutput("temp_ptr = "); - switch (cp->type) { - case CB_CAST_ADDRESS: - joutput_data(cp->val); - break; - case CB_CAST_PROGRAM_POINTER: - joutput_func_1("CobolResolve.resolveToPointer", ap->val); - break; - default: - fprintf(stderr, "Unexpected cast type %d\n", cp->type); - ABORT(); - } - joutput(";\n"); - } else { - /* MOVE val ... */ - joutput("LIBCOB.memcpy(&temp_ptr, "); - joutput_data(ap->val); - joutput(", sizeof(temp_ptr));\n"); - } - - /* destination address = temp_ptr; */ - joutput_prefix(); - if (CB_TREE_TAG(ap->var) == CB_TAG_CAST) { - /* SET ADDRESS OF var ... */ - cp = CB_CAST(ap->var); - if (cp->type != CB_CAST_ADDRESS) { - fprintf(stderr, "Unexpected tree type %d\n", cp->type); - ABORT(); - } - joutput_data(cp->val); - joutput(" = temp_ptr;\n"); - } else { - /* MOVE ... TO var */ - joutput("LIBCOB.memcpy("); - joutput_data(ap->var); - joutput(", &temp_ptr, sizeof(temp_ptr));\n"); - } - - joutput_indent("}"); - } else { - /* Numeric assignment */ - joutput_prefix(); - - int tmp_flag = integer_reference_flag; - integer_reference_flag = 1; - joutput_integer(ap->var); - integer_reference_flag = tmp_flag; - joutput(".set("); - ++index_read_flag; - joutput_integer(ap->val); - --index_read_flag; - if (output_type == JOUTPUT_STMT_TRIM) { - joutput(")\n"); - } else { - joutput(");\n"); - } - } -#else /* Nonaligned */ joutput_prefix(); int tmp_flag = integer_reference_flag; @@ -3923,7 +3796,6 @@ static void joutput_stmt(cb_tree x, enum joutput_stmt_type output_type) { } else { joutput(");\n"); } -#endif /* Nonaligned */ break; case CB_TAG_INITIALIZE: joutput_initialize(CB_INITIALIZE(x)); diff --git a/cobj/typeck.c b/cobj/typeck.c index e94577ea..0de8269d 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -2239,13 +2239,9 @@ static cb_tree build_cond_88(cb_tree x) { } static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { - struct cb_field *f; - struct cb_field *fy; - const char *s; - size_t n; if (CB_REF_OR_FIELD_P(p->y)) { - fy = cb_field(p->y); + struct cb_field *fy = cb_field(p->y); if (!fy->pic->have_sign && (fy->usage == CB_USAGE_BINARY || fy->usage == CB_USAGE_COMP_5 || fy->usage == CB_USAGE_COMP_X)) { @@ -2254,7 +2250,7 @@ static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { } } if (CB_REF_OR_FIELD_P(p->x)) { - f = cb_field(p->x); + struct cb_field *f = cb_field(p->x); if (!f->pic->scale && f->usage == CB_USAGE_PACKED) { if (f->pic->digits < 10) { return cb_build_method_call_2("cmpInt", p->x, @@ -2291,31 +2287,9 @@ static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { if (!f->pic->scale && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || f->usage == CB_USAGE_INDEX || f->usage == CB_USAGE_COMP_X)) { - n = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + - (16 * (f->flag_binary_swap ? 1 : 0)); -#if defined(COB_NON_ALIGNED) && !defined(_MSC_VER) - switch (f->size) { - case 2: -#ifdef COB_SHORT_BORK - s = bin_compare_funcs[n]; - break; -#endif - case 4: - case 8: - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % f->size) == 0) { - s = align_bin_compare_funcs[n]; - } else { - s = bin_compare_funcs[n]; - } - break; - default: - s = bin_compare_funcs[n]; - break; - } -#else - s = bin_compare_funcs[n]; -#endif + size_t n = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + + (16 * (f->flag_binary_swap ? 1 : 0)); + const char *s = bin_compare_funcs[n]; if (s) { return cb_build_method_call_2(s, cb_build_cast_address(p->x), cb_build_cast_integer(p->y)); @@ -2562,38 +2536,13 @@ cb_tree cb_build_cond(cb_tree x) { */ static cb_tree cb_build_optim_add(cb_tree v, cb_tree n) { - size_t z; - const char *s; - struct cb_field *f; - if (CB_REF_OR_FIELD_P(v)) { - f = cb_field(v); + struct cb_field *f = cb_field(v); if (!f->pic->scale && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || f->usage == CB_USAGE_COMP_X)) { - z = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + - (16 * (f->flag_binary_swap ? 1 : 0)); -#if defined(COB_NON_ALIGNED) && !defined(_MSC_VER) - switch (f->size) { - case 2: -#ifdef COB_SHORT_BORK - s = bin_add_funcs[z]; - break; -#endif - case 4: - case 8: - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % f->size) == 0) { - s = align_bin_add_funcs[z]; - } else { - s = bin_add_funcs[z]; - } - break; - default: - s = bin_add_funcs[z]; - break; - } -#else + size_t z = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + + (16 * (f->flag_binary_swap ? 1 : 0)); if (f->usage == CB_USAGE_COMP_5) { switch (f->size) { case 1: @@ -2603,8 +2552,7 @@ static cb_tree cb_build_optim_add(cb_tree v, cb_tree n) { return cb_build_assign(v, cb_build_binary_op(v, '+', n)); } } - s = bin_add_funcs[z]; -#endif + const char *s = bin_add_funcs[z]; if (s) { return cb_build_method_call_2(s, cb_build_cast_address(v), cb_build_cast_integer(n)); @@ -2619,38 +2567,14 @@ static cb_tree cb_build_optim_add(cb_tree v, cb_tree n) { } static cb_tree cb_build_optim_sub(cb_tree v, cb_tree n) { - size_t z; - const char *s; - struct cb_field *f; if (CB_REF_OR_FIELD_P(v)) { - f = cb_field(v); + struct cb_field *f = cb_field(v); if (!f->pic->scale && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || f->usage == CB_USAGE_COMP_X)) { - z = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + - (16 * (f->flag_binary_swap ? 1 : 0)); -#if defined(COB_NON_ALIGNED) && !defined(_MSC_VER) - switch (f->size) { - case 2: -#ifdef COB_SHORT_BORK - s = bin_sub_funcs[z]; - break; -#endif - case 4: - case 8: - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % f->size) == 0) { - s = align_bin_sub_funcs[z]; - } else { - s = bin_sub_funcs[z]; - } - break; - default: - s = bin_sub_funcs[z]; - break; - } -#else + size_t z = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + + (16 * (f->flag_binary_swap ? 1 : 0)); if (f->usage == CB_USAGE_COMP_5) { switch (f->size) { case 1: @@ -2660,8 +2584,7 @@ static cb_tree cb_build_optim_sub(cb_tree v, cb_tree n) { return cb_build_assign(v, cb_build_binary_op(v, '-', n)); } } - s = bin_sub_funcs[z]; -#endif + const char *s = bin_sub_funcs[z]; if (s) { return cb_build_method_call_2(s, cb_build_cast_address(v), cb_build_cast_integer(n)); @@ -2675,19 +2598,9 @@ cb_tree cb_build_add(cb_tree v, cb_tree n, cb_tree round_opt) { cb_tree opt; struct cb_field *f; -#ifdef COB_NON_ALIGNED - if (CB_INDEX_P(v)) { - return cb_build_move(cb_build_binary_op(v, '+', n), v); - } - if (CB_TREE_CLASS(v) == CB_CLASS_POINTER) { - current_program->gen_ptrmanip = 1; - return cb_build_funcall_3("cob_pointer_manip", v, n, cb_int0); - } -#else if (CB_INDEX_P(v) || CB_TREE_CLASS(v) == CB_CLASS_POINTER) { return cb_build_move(cb_build_binary_op(v, '+', n), v); } -#endif if (CB_REF_OR_FIELD_P(v)) { f = cb_field(v); @@ -2715,19 +2628,9 @@ cb_tree cb_build_sub(cb_tree v, cb_tree n, cb_tree round_opt) { cb_tree opt; struct cb_field *f; -#ifdef COB_NON_ALIGNED - if (CB_INDEX_P(v)) { - return cb_build_move(cb_build_binary_op(v, '-', n), v); - } - if (CB_TREE_CLASS(v) == CB_CLASS_POINTER) { - current_program->gen_ptrmanip = 1; - return cb_build_funcall_3("cob_pointer_manip", v, n, cb_int1); - } -#else if (CB_INDEX_P(v) || CB_TREE_CLASS(v) == CB_CLASS_POINTER) { return cb_build_move(cb_build_binary_op(v, '-', n), v); } -#endif if (CB_REF_OR_FIELD_P(v)) { f = cb_field(v); @@ -5123,31 +5026,11 @@ static cb_tree cb_build_move_num_zero(cb_tree x) { return cb_build_memset(x, 0); } switch (f->size) { -#ifdef COB_NON_ALIGNED - case 1: - return cb_build_assign(x, cb_int0); - case 2: -#ifdef COB_SHORT_BORK - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % 4 == 0)) { - return cb_build_assign(x, cb_int0); - } - break; -#endif - case 4: - case 8: - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % f->size == 0)) { - return cb_build_assign(x, cb_int0); - } - break; -#else case 1: case 2: case 4: case 8: return cb_build_assign(x, cb_int0); -#endif } return cb_build_memset(x, 0); case CB_USAGE_DISPLAY: @@ -5520,15 +5403,7 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { #endif case 4: case 8: -#ifdef COB_NON_ALIGNED - if (f->storage != CB_STORAGE_LINKAGE && f->indexes == 0 && - (f->offset % f->size == 0)) { - return cb_build_assign(dst, cb_int(val)); - } - break; -#else return cb_build_assign(dst, cb_int(val)); -#endif } return cb_build_move_call(src, dst); } else if (cb_fits_int(src) && f->usage == CB_USAGE_PACKED) { From 3dcaa5c3349cef838dc65ab6e967401befc18ce3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:07:27 +0900 Subject: [PATCH 032/188] Bump com.github.spotbugs from 6.0.24 to 6.0.25 in /libcobj (#510) Bumps com.github.spotbugs from 6.0.24 to 6.0.25. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f7f47580..1b834b6b 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.24" + id("com.github.spotbugs") version "6.0.25" } repositories { From 927be3ef048cdeab6a03d5886a3af0997ca9f51c Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:35:13 +0900 Subject: [PATCH 033/188] Add option to allow writing after the 72nd digit (#513) --- cobj/cobj.c | 3 ++ cobj/cobj.h | 1 + cobj/pplex.c | 15 ++++++-- cobj/pplex.l | 15 ++++++-- cobj/pplex.l.m4 | 15 ++++++-- tests/command-line-options.src/free.at | 53 ++++++++++++++++++++++++++ 6 files changed, 93 insertions(+), 9 deletions(-) diff --git a/cobj/cobj.c b/cobj/cobj.c index b8cfef34..0373efdd 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -303,6 +303,7 @@ static const struct option long_options[] = { {"free", no_argument, &cb_source_format, CB_FORMAT_FREE}, {"free_1col_aster", no_argument, &cb_source_format, CB_FORMAT_FREE_1COL_ASTER}, + {"variable", no_argument, &cb_source_format, CB_FORMAT_VARIABLE}, {"fixed", no_argument, &cb_source_format, CB_FORMAT_FIXED}, {"static", no_argument, &cb_flag_static_call, 1}, {"dynamic", no_argument, &cb_flag_static_call, 0}, @@ -802,6 +803,8 @@ static void cobc_print_usage(void) { puts(_(" -free Use free source format")); puts(_(" -free_1col_aster Use free(1col_aster) source " "format")); + puts(_(" -variable Allow codes after 72 digits not " + "to be ignored")); puts(_(" -g Enable Java compiler debug")); puts(_(" -debug Enable all run-time error " "checking")); diff --git a/cobj/cobj.h b/cobj/cobj.h index 792f8b52..686a3953 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -41,6 +41,7 @@ #define CB_FORMAT_FIXED 0 #define CB_FORMAT_FREE 1 #define CB_FORMAT_FREE_1COL_ASTER 2 +#define CB_FORMAT_VARIABLE 3 extern int cb_source_format; extern int cb_source_format1; diff --git a/cobj/pplex.c b/cobj/pplex.c index 56d6be46..3be62fbb 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -3707,6 +3707,9 @@ static void check_directive(char *buff, int *line_size) { cb_source_format1 = 1; return; } + if (!strcasecmp(sbuff[2], "VARIABLE")) { + cb_source_format = CB_FORMAT_VARIABLE; + } break; default: if (strcasecmp(sbuff[1], "FORMAT")) { @@ -3728,6 +3731,9 @@ static void check_directive(char *buff, int *line_size) { cb_source_format1 = 1; return; } + if (!strcasecmp(sbuff[3], "VARIABLE")) { + cb_source_format = CB_FORMAT_VARIABLE; + } break; } cb_warning(_("Invalid directive - ignored")); @@ -3905,6 +3911,8 @@ static void check_dollar_directive(char *buff, int *line_size) { cb_source_format = CB_FORMAT_FREE_1COL_ASTER; cb_source_format1 = 1; return; + } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0) { + cb_source_format = CB_FORMAT_VARIABLE; } else { cb_compile_status = CB_COMPILE_STATUS_ERROR; cb_error(_("Invalid $SET")); @@ -3968,7 +3976,7 @@ static int ppinput(char *buff, int max_size) { return strlen(buff); } if (n == 0 && cb_source_format != CB_FORMAT_FIXED && - cb_source_format1 != 1) { + cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE) { if (ipchar != ' ' && ipchar != '\n') { buff[n++] = ' '; } @@ -4029,7 +4037,8 @@ static int ppinput(char *buff, int max_size) { } /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED) { + if (cb_source_format != CB_FORMAT_FIXED && + cb_source_format != CB_FORMAT_VARIABLE) { return n; } @@ -4117,7 +4126,7 @@ static int ppinput(char *buff, int max_size) { } /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1) { + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { /* show warning if it is not whitespaces */ if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { diff --git a/cobj/pplex.l b/cobj/pplex.l index 5d80e3f7..76bd67c9 100644 --- a/cobj/pplex.l +++ b/cobj/pplex.l @@ -722,6 +722,9 @@ check_directive (char *buff, int *line_size) cb_source_format1 = 1; return; } + if (!strcasecmp (sbuff[2], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } break; default: if (strcasecmp (sbuff[1], "FORMAT")) { @@ -743,6 +746,9 @@ check_directive (char *buff, int *line_size) cb_source_format1 = 1; return; } + if (!strcasecmp (sbuff[3], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } break; } cb_warning (_("Invalid directive - ignored")); @@ -908,6 +914,8 @@ check_dollar_directive (char *buff, int *line_size) cb_source_format = CB_FORMAT_FREE_1COL_ASTER; cb_source_format1 = 1; return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ + cb_source_format = CB_FORMAT_VARIABLE; } else { cb_compile_status = CB_COMPILE_STATUS_ERROR; cb_error (_("Invalid $SET")); @@ -972,7 +980,8 @@ start: newline_count = 0; return strlen (buff); } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1) { + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 + && cb_source_format != CB_FORMAT_VARIABLE) { if (ipchar != ' ' && ipchar != '\n') { buff[n++] = ' '; } @@ -1033,7 +1042,7 @@ start: } /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED) { + if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { return n; } @@ -1121,7 +1130,7 @@ start: } /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1) { + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { /* show warning if it is not whitespaces */ if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { diff --git a/cobj/pplex.l.m4 b/cobj/pplex.l.m4 index 8a5d4a60..52edf9be 100644 --- a/cobj/pplex.l.m4 +++ b/cobj/pplex.l.m4 @@ -737,6 +737,9 @@ check_directive (char *buff, int *line_size) cb_source_format1 = 1; return; } + if (!strcasecmp (sbuff[2], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } break; default: if (strcasecmp (sbuff[1], "FORMAT")) { @@ -758,6 +761,9 @@ check_directive (char *buff, int *line_size) cb_source_format1 = 1; return; } + if (!strcasecmp (sbuff[3], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } break; } cb_warning (_("Invalid directive - ignored")); @@ -923,6 +929,8 @@ check_dollar_directive (char *buff, int *line_size) cb_source_format = CB_FORMAT_FREE_1COL_ASTER; cb_source_format1 = 1; return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ + cb_source_format = CB_FORMAT_VARIABLE; } else { cb_compile_status = CB_COMPILE_STATUS_ERROR; cb_error (_("Invalid $SET")); @@ -987,7 +995,8 @@ start: newline_count = 0; return strlen (buff); } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1) { + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 + && cb_source_format != CB_FORMAT_VARIABLE) { if (ipchar != ' ' && ipchar != '\n') { buff[n++] = ' '; } @@ -1048,7 +1057,7 @@ start: } /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED) { + if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { return n; } @@ -1136,7 +1145,7 @@ start: } /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1) { + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { /* show warning if it is not whitespaces */ if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { diff --git a/tests/command-line-options.src/free.at b/tests/command-line-options.src/free.at index 2eedccec..8c6033cf 100644 --- a/tests/command-line-options.src/free.at +++ b/tests/command-line-options.src/free.at @@ -35,4 +35,57 @@ HELLO WORLD ]) +AT_CLEANUP + +AT_SETUP([-variable]) + +AT_DATA([prog.cbl], [ +000001 IDENTIFICATION DIVISION. +000002 PROGRAM-ID. prog. +000003 DATA DIVISION. +000004 WORKING-STORAGE SECTION. +000005 PROCEDURE DIVISION. +000006 DISPLAY "HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO". +]) + +AT_CHECK([${COBJ} -variable prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO +]) + +AT_DATA([prog2.cbl], [ +000001 IDENTIFICATION DIVISION. +000002 PROGRAM-ID. prog2. +000003 DATA DIVISION. +000004 WORKING-STORAGE SECTION. +000005PROCEDURE DIVISION. +000006 STOP RUN. +]) + +AT_CHECK([${COBJ} -variable prog2.cbl], [1], [], +[prog2.cbl:5: Error: Invalid indicator 'P' at column 7 +]) + +AT_DATA([prog3.cbl], [ +000001 IDENTIFICATION DIVISION. +000002 PROGRAM-ID. prog3. +000003 DATA DIVISION. +000004 WORKING-STORAGE SECTION. +000005 COPY inc. +000006 PROCEDURE DIVISION. +000007 DISPLAY AFTER-72. +000008 DISPLAY "HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO". +000009 STOP RUN. +]) + +AT_DATA([inc.cpy], [ +000001 01 AFTER-72 PIC X(119) VALUE "HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO". +]) + +AT_CHECK([${COBJ} -variable prog3.cbl]) +AT_CHECK([${RUN_MODULE} prog3], [0], +[HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO +HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO HELLO +]) + AT_CLEANUP \ No newline at end of file From cfaaaa08a1888b011f3dfd8e77c7fd183457dfb6 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:35:54 +0900 Subject: [PATCH 034/188] Fix numericCompareTo() (#516) --- .../libcobj/data/CobolNumericField.java | 4 +-- tests/misc.src/compare-9.at | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index 64edd2d4..2f655a8a 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -911,7 +911,7 @@ public int numericCompareTo(AbstractCobolField field) { final int i1 = firstIndex1 + i + pointIndex1; final int i2 = firstIndex2 + i + pointIndex2; byte b1; - if (i1 < 0 || i1 > lastIndex1) { + if (i1 < firstIndex1 || i1 > lastIndex1) { b1 = (byte) '0'; } else { b1 = d1.getByte(i1); @@ -920,7 +920,7 @@ public int numericCompareTo(AbstractCobolField field) { } } byte b2; - if (i2 < 0 || i2 > lastIndex2) { + if (i2 < firstIndex2 || i2 > lastIndex2) { b2 = (byte) '0'; } else { b2 = d2.getByte(i2); diff --git a/tests/misc.src/compare-9.at b/tests/misc.src/compare-9.at index 41499d7a..55f8118c 100644 --- a/tests/misc.src/compare-9.at +++ b/tests/misc.src/compare-9.at @@ -57,3 +57,34 @@ AT_CHECK([${COBJ} prog.cbl]) AT_CHECK([java prog]) AT_CLEANUP + +AT_SETUP([compare 9(n), S9(n) SEPARATE]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 N10 PIC 9(10). + 01 S9-L PIC S9(9) SIGN LEADING SEPARATE. + 01 S9-T PIC S9(9) SIGN TRAILING SEPARATE. + PROCEDURE DIVISION. + MAIN-PROC. + ************************************************************* + MOVE 800 TO N10. + MOVE 900 TO S9-L. + MOVE 900 TO S9-T. + + IF N10 >= S9-L + DISPLAY "NG (N10 >= S9-L)" + END-IF. + + IF N10 >= S9-T + DISPLAY "NG (N10 >= S9-T)" + END-IF. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([java prog]) + +AT_CLEANUP \ No newline at end of file From a00370c940e723584c57c6cb10eb010c1ba1fdb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 21:07:09 +0900 Subject: [PATCH 035/188] Bump org.junit.jupiter:junit-jupiter from 5.11.2 to 5.11.3 in /libcobj (#517) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.2 to 5.11.3. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 1b834b6b..b3ad4adb 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.3.1-jre") implementation("org.xerial:sqlite-jdbc:3.46.1.3") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.11.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.11.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From f34d16cea2678ed6ad33454cca9fdf2db11dcbeb Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:27:49 +0900 Subject: [PATCH 036/188] Disable cppcheck and clang-format (#518) --- .github/workflows/static-analysis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 36280658..7e39ae68 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -31,9 +31,9 @@ jobs: make sudo make install - - name: Check format with google-java-format and clang-format - run: | - ./check-format + #- name: Check format with google-java-format and clang-format + # run: | + # ./check-format - name: Run SpotBugs working-directory: libcobj @@ -45,7 +45,7 @@ jobs: run: | ./gradlew pmdMain - - name: Run cppcheck - working-directory: cobj - run: | - ./cpp-check \ No newline at end of file + #- name: Run cppcheck + # working-directory: cobj + # run: | + # ./cpp-check \ No newline at end of file From 8958b2b99520bcd45b63da38313e7544d2d7bb64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:45:11 +0900 Subject: [PATCH 037/188] Bump org.xerial:sqlite-jdbc from 3.46.1.3 to 3.47.0.0 in /libcobj (#520) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.3 to 3.47.0.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.3...3.47.0.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index b3ad4adb..733b4f49 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.3.1-jre") - implementation("org.xerial:sqlite-jdbc:3.46.1.3") + implementation("org.xerial:sqlite-jdbc:3.47.0.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 112e5604abc95a3654a7c261d92cd04bfdbfa902 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:33:25 +0900 Subject: [PATCH 038/188] fix doc/cobj-api_SpringBoot.md (#521) --- doc/cobj-api_SpringBoot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/cobj-api_SpringBoot.md b/doc/cobj-api_SpringBoot.md index 1bcfcfa2..0a041045 100755 --- a/doc/cobj-api_SpringBoot.md +++ b/doc/cobj-api_SpringBoot.md @@ -99,7 +99,7 @@ The project will be created according to the above steps. ``` cobj-api -java-package=com.example.cobj_api_test info_sample.json ``` - * `-java-package`:生成されるJavaファイルのパッケージ名を指定するオプション。 + * `-java-package`: An option to specify the package name of the generated Java file. This will generate sampleController.java and sampleRecord.java. 4. Place sample.java, sampleController.java, and sampleRecord.java in the created Spring Boot project. From 9da72a6873aa84f8cf47248ed44363127cbe60ae Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Thu, 24 Oct 2024 13:18:03 +0900 Subject: [PATCH 039/188] Fix CI `update-github-pages.yml` (#525) --- .github/workflows/update-github-pages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-github-pages.yml b/.github/workflows/update-github-pages.yml index 1e55431f..013259cf 100644 --- a/.github/workflows/update-github-pages.yml +++ b/.github/workflows/update-github-pages.yml @@ -26,6 +26,7 @@ jobs: # Single deploy job since we're just deploying deploy: + if: github.repository == 'opensourcecobol/opensourcecobol4j' needs: check-workflows environment: name: github-pages @@ -39,7 +40,7 @@ jobs: with: distribution: 'temurin' java-version: '21' - + - name: Build Javadoc working-directory: libcobj run: | From ab6977462a4739b0ccfbe862fc7e4ff3e3d3ff9e Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:53:46 +0900 Subject: [PATCH 040/188] Fix CI to upload files to Release page (#527) --- .github/workflows/create-release.yml | 33 ++++++++++++++++++++++++++-- .github/workflows/pull-request.yml | 2 ++ .github/workflows/push.yml | 2 ++ .github/workflows/windows-build.yml | 7 ++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 49d8a2b8..a88b07bb 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -6,8 +6,20 @@ on: - v*.*.* jobs: + check-workflows: + uses: ./.github/workflows/check-workflows.yml + + build-artifacts: + needs: check-workflows + uses: ./.github/workflows/windows-build.yml + with: + upload-artifacts: true + create-release: - runs-on: windows-latest + needs: build-artifacts + runs-on: ubuntu-latest + permissions: + contents: write env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -15,4 +27,21 @@ jobs: - uses: actions/checkout@v4 - name: Create a Release - run: gh release create ${{ github.ref }} -F ReleaseNote.md \ No newline at end of file + run: gh release create ${{ github.ref }} -F ReleaseNote.md + + - name: Download cobj.exe + uses: actions/download-artifact@v4 + with: + name: cobj.exe + + - name: Download libcobj.jar + uses: actions/download-artifact@v4 + with: + name: libcobj.jar + + - name: Publish artifacts + run: | + gh release upload ${{ github.ref_name }} cobj.exe --clobber + gh release upload ${{ github.ref_name }} libcobj.jar --clobber + gh release upload ${{ github.ref_name }} config/default.conf --clobber + \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c59a163b..3cb4d291 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -103,6 +103,8 @@ jobs: strategy: fail-fast: false uses: ./.github/workflows/windows-build.yml + with: + upload-artifacts: true windows-test: needs: windows-build diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ae1b0de1..6a1dc22b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -101,6 +101,8 @@ jobs: strategy: fail-fast: false uses: ./.github/workflows/windows-build.yml + with: + upload-artifacts: true windows-test: needs: windows-build diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index a0ecad63..c6780e00 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -2,6 +2,11 @@ name: build opensource COBOL 4J on Windows on: workflow_call: + inputs: + upload-artifacts: + description: 'Upload artifacts' + required: true + type: boolean permissions: contents: read @@ -32,12 +37,14 @@ jobs: run: msbuild /p:Configuration=Release /p:AdditionalIncludePaths=./:./cobj/:./win:./lib win/opensourcecobol4j.sln - name: Upload libcobj.jar + if: ${{inputs.upload-artifacts}} uses: actions/upload-artifact@v4 with: name: libcobj.jar path: libcobj/app/build/libs/libcobj.jar - name: Upload cobj.exe + if: ${{inputs.upload-artifacts}} uses: actions/upload-artifact@v4 with: name: cobj.exe From 92fa351662e5191e665525976513e8eda35d8002 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:40:44 +0900 Subject: [PATCH 041/188] Fix invalid constructors in record constructors (#528) --- .../opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java | 2 +- .../opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java index b0c6a6e8..8446f70c 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java @@ -235,7 +235,7 @@ private static void writeRecord(FileWriter rcdFile, JSONArray params) { argPrint(rcdWriter, params, true, false); - rcdWriter.print(") {\n" + " public LOANSUBRecord(){\n" + " this(200, "); + rcdWriter.print(") {\n" + " public " + programId + "Record(){\n" + " this(200, "); for (i = 0; i < params.length(); ++i) { param = params.getJSONObject(i); type = param.getString("java_type"); diff --git a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt index c210a9ee..77f80344 100644 --- a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt +++ b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt @@ -1,6 +1,6 @@ package com.example.restservice; public record testRecord(int statuscode, int param1, double param2, String param3) { - public LOANSUBRecord(){ + public testRecord(){ this(200, 0, 0, ""); } } From c6aed742d8adfd8b27446973b6ed1d6d258cf453 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:44:02 +0900 Subject: [PATCH 042/188] Add devcontainer (#529) --- .devcontainer/Dockerfile | 12 + .devcontainer/boot.sh | 12 + .devcontainer/devcontainer.json | 7 + .devcontainer/term_settings/extra_bashrc.sh | 11 + .devcontainer/term_settings/pre-commit | 4 + .github/workflows/static-analysis.yml | 25 +- CONTRIBUTING.md | 20 +- CONTRIBUTING_JP.md | 21 +- check-format | 2 +- cobj/codegen.c | 18 +- cobj/cpp-check | 5 +- cobj/ppparse.c | 2 +- cobj/tree.h | 2 +- format | 2 +- libcobj/app/build.gradle.kts | 8 +- .../opensourcecobol/libcobj/Const.java | 54 +- .../libcobj/call/CobolResolve.java | 900 +-- .../libcobj/call/CobolRunnable.java | 30 +- .../libcobj/call/CobolSystemRoutine.java | 1827 +++--- .../libcobj/common/CobolCallParams.java | 50 +- .../libcobj/common/CobolCheck.java | 221 +- .../libcobj/common/CobolConstant.java | 346 +- .../libcobj/common/CobolControl.java | 211 +- .../libcobj/common/CobolExternal.java | 154 +- .../libcobj/common/CobolInspect.java | 827 +-- .../libcobj/common/CobolIntrinsic.java | 5619 +++++++++-------- .../libcobj/common/CobolModule.java | 410 +- .../libcobj/common/CobolString.java | 1186 ++-- .../libcobj/common/CobolUtil.java | 1387 ++-- .../libcobj/common/GetAbstractCobolField.java | 66 +- .../libcobj/common/GetInt.java | 58 +- .../libcobj/data/AbstractCobolField.java | 3491 +++++----- .../data/CobolAlphanumericAllField.java | 68 +- .../data/CobolAlphanumericEditedField.java | 379 +- .../libcobj/data/CobolAlphanumericField.java | 492 +- .../libcobj/data/CobolDataStorage.java | 5272 ++++++++-------- .../libcobj/data/CobolDecimal.java | 1514 ++--- .../libcobj/data/CobolFieldAttribute.java | 881 +-- .../libcobj/data/CobolFieldFactory.java | 281 +- .../libcobj/data/CobolGroupField.java | 148 +- .../libcobj/data/CobolNationalAllField.java | 68 +- .../data/CobolNationalEditedField.java | 302 +- .../libcobj/data/CobolNationalField.java | 2175 +++---- .../libcobj/data/CobolNumericBinaryField.java | 542 +- .../libcobj/data/CobolNumericDoubleField.java | 372 +- .../libcobj/data/CobolNumericEditedField.java | 768 +-- .../libcobj/data/CobolNumericField.java | 1908 +++--- .../libcobj/data/CobolNumericPackedField.java | 1752 ++--- .../libcobj/exceptions/CobolExceptionId.java | 785 ++- .../exceptions/CobolExceptionInfo.java | 68 +- .../exceptions/CobolExceptionTabCode.java | 87 +- .../exceptions/CobolGoBackException.java | 108 +- .../exceptions/CobolRuntimeException.java | 318 +- .../exceptions/CobolStopRunException.java | 142 +- .../libcobj/file/CobolFile.java | 4118 ++++++------ .../libcobj/file/CobolFileFactory.java | 440 +- .../libcobj/file/CobolFileKey.java | 264 +- .../libcobj/file/CobolFileSort.java | 2306 +++---- .../libcobj/file/CobolIndexedFile.java | 1575 ++--- .../libcobj/file/CobolItem.java | 290 +- .../libcobj/file/CobolLineSequentialFile.java | 516 +- .../libcobj/file/CobolRelativeFile.java | 1015 +-- .../libcobj/file/CobolSequentialFile.java | 420 +- .../libcobj/file/CobolSort.java | 638 +- .../opensourcecobol/libcobj/file/FileIO.java | 861 +-- .../libcobj/file/FileStruct.java | 122 +- .../libcobj/file/IndexedCursor.java | 1451 ++--- .../libcobj/file/IndexedFile.java | 127 +- .../libcobj/file/KeyComponent.java | 59 +- .../opensourcecobol/libcobj/file/Linage.java | 392 +- .../libcobj/file/MemoryStruct.java | 172 +- .../libcobj/termio/CobolTerminal.java | 657 +- .../libcobj/ui/CobolCallResult.java | 54 +- .../libcobj/ui/CobolResultDouble.java | 28 +- .../libcobj/ui/CobolResultInt.java | 28 +- .../libcobj/ui/CobolResultSet.java | 114 +- .../libcobj/ui/CobolResultSetException.java | 16 +- .../libcobj/ui/CobolResultString.java | 28 +- .../libcobj/user_util/cobj_api/ApiFiles.java | 529 +- .../user_util/cobj_api/ApiFilesOptions.java | 212 +- .../user_util/indexed_file/ErrorLib.java | 97 +- .../indexed_file/FileLineSeqRecordReader.java | 95 +- .../indexed_file/FileSeqRecordReader.java | 100 +- .../indexed_file/IndexedFileUtilMain.java | 951 +-- .../user_util/indexed_file/LoadResult.java | 16 +- .../user_util/indexed_file/RecordReader.java | 66 +- .../user_util/indexed_file/RecordWriter.java | 22 +- .../indexed_file/StdinRecordReader.java | 195 +- .../indexed_file/UserDataFormat.java | 20 +- .../user_util/cobj_api/ApiFilesTest.java | 46 +- 90 files changed, 27142 insertions(+), 26316 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100755 .devcontainer/boot.sh create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/term_settings/extra_bashrc.sh create mode 100755 .devcontainer/term_settings/pre-commit diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..3b967bb9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,12 @@ +FROM almalinux:9 + +SHELL ["/bin/bash", "-c"] + +# classpath settings +ENV CLASSPATH :/usr/lib/opensourcecobol4j/libcobj.jar +RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar' >> ~/.bashrc + +# install dependencies +RUN dnf update -y +RUN dnf install -y epel-release +RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck diff --git a/.devcontainer/boot.sh b/.devcontainer/boot.sh new file mode 100755 index 00000000..ff3b253e --- /dev/null +++ b/.devcontainer/boot.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Build and Install +./configure --prefix=/usr/ +make +make install + +# Set up pre-commit hook +cp .devcontainer/term_settings/pre-commit .git/hooks/pre-commit + +# Set up ~/.bashrc +cat .devcontainer/term_settings/extra_bashrc.sh >> ~/.bashrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..eeaa6983 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "opensource COBOL 4J development", + "build": { + "dockerfile": "Dockerfile" + }, + "postCreateCommand": ".devcontainer/boot.sh && source ~/.bashrc" +} \ No newline at end of file diff --git a/.devcontainer/term_settings/extra_bashrc.sh b/.devcontainer/term_settings/extra_bashrc.sh new file mode 100644 index 00000000..f1d4274b --- /dev/null +++ b/.devcontainer/term_settings/extra_bashrc.sh @@ -0,0 +1,11 @@ +alias ls='ls --color=auto' +alias ll='ls -l' +alias la='ls -a' + +alias g='git' + +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} + +export PS1="\e[0;32m[\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\e[0;32m]\033[00m " diff --git a/.devcontainer/term_settings/pre-commit b/.devcontainer/term_settings/pre-commit new file mode 100755 index 00000000..07646e42 --- /dev/null +++ b/.devcontainer/term_settings/pre-commit @@ -0,0 +1,4 @@ +#!/bin/bash + +git add -u +./format diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7e39ae68..8cef3aef 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -9,8 +9,9 @@ permissions: jobs: static_analysis: runs-on: ubuntu-22.04 + container: + image: almalinux:9 steps: - # Checkout opensource COBOL - name: Checkout opensource COBOL 4J uses: actions/checkout@v4 @@ -21,19 +22,19 @@ jobs: - name: Install static analysis tools run: | - sudo apt-get update -y - sudo apt-get install -y clang-format cppcheck + dnf update -y + dnf install -y epel-release + dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck - name: Install opensource COBOL 4J run: | - sudo apt-get install -y build-essential bison flex gettext texinfo autoconf ./configure --prefix=/usr/ make - sudo make install + make install - #- name: Check format with google-java-format and clang-format - # run: | - # ./check-format + - name: Check format with google-java-format and clang-format + run: | + ./check-format - name: Run SpotBugs working-directory: libcobj @@ -45,7 +46,7 @@ jobs: run: | ./gradlew pmdMain - #- name: Run cppcheck - # working-directory: cobj - # run: | - # ./cpp-check \ No newline at end of file + - name: Run cppcheck + working-directory: cobj + run: | + ./cpp-check \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf552d4a..c3b2fb9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,12 +12,28 @@ The static analysis checks whether C and Java source files are formatted using [ The below sections describe how to setup and run static code analysis. -## Setup static analysis tools +## Setup Development Environment -Run `sudo apt install clang-format` in Ubuntu to install `clang-format`. +We strongly recommend using [Visual Studio Code with Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) for a consistent development environment. Follow the steps below to set up your development environment. + +1. Install [Docker](https://www.docker.com/get-started) on your machine. +1. Install [Visual Studio Code](https://code.visualstudio.com/). +1. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in Visual Studio Code. +1. Clone the repository. +1. Open the repository in Visual Studio Code. +1. Press `Ctrl+Shift+P` and Select `Dev Containers: Reopen in Container`. +1. Wait for the DevContainer to start up and the build to complete. It may take several minutes to complete this process. +1. (Optional) Press `Ctrl+Shift+@` to open a new terminal of Visual Studio code. +1. (Optional) [Setup credentials for git](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials). + +> [!CAUTION] +> In the dev container, [Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks) executes code formatters when starting `git commit` command. It may take a minutes when you run `git commit` for the first time. ## Run static analysis +> [!CAUTION] +> CI executes formatters and static analysis tools in Almalinux 9. The behavior of these tools may differ from the one in other operatins systems. + ### check with clang-format and google-java-format Run `./format` in the top directory of opensource COBOL 4J. diff --git a/CONTRIBUTING_JP.md b/CONTRIBUTING_JP.md index a191d350..d9733c87 100644 --- a/CONTRIBUTING_JP.md +++ b/CONTRIBUTING_JP.md @@ -12,12 +12,29 @@ CIの静的解析はCとJavaのソースコードがそれぞれ[clang-format](h 下記にそれぞれのツールのセットアップと使用方法を説明します。 -## セットアップ +## 開発環境のセットアップ + +一貫した開発環境を確保するために、[Visual Studio Code with Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)の使用を強く推奨します。以下の手順に従って開発環境をセットアップしてください。 + +1. [Docker](https://www.docker.com/get-started)をインストールします。 +1. [Visual Studio Code](https://code.visualstudio.com/)をインストールします。 +1. Visual Studio Codeに[Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)拡張機能をインストールします。 +1. リポジトリをクローンします。 +1. Visual Studio Codeでリポジトリを開きます。 +1. `Ctrl+Shift+P`を押して、`Dev Containers: Reopen in Container`を選択します。 +1. DevContainerの起動とビルドが完了するまで待ちます。このプロセスは数分かかることがあります。 +1. (オプション)`Ctrl+Shift+@`を押して、Visual Studio Codeの新しいターミナルを開きます。 +1. (オプション)[gitの認証情報を設定](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials)します。 + +> [!CAUTION] +> Dev container内では、[Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks)が`git commit`コマンドを開始する際にコードフォーマッタを実行します。初めて`git commit`を実行する際には数分かかることがあります。 -Ubuntuでは`sudo apt install clang-format`コマンドを実行すれば`clang-format`をインストールできます。 ## 静的解析の実行 +> [!CAUTION] +> CIはAlmalinux 9でフォーマッタと静的解析ツールを実行します。これらのツールの動作は他のオペレーティングシステムとは異なる場合があります。 + ### clang-formatとgoogle-java-format opensource COBOL 4Jのトップディレクトリで`./format`を実行してください。 diff --git a/check-format b/check-format index 8a2c7174..505b1662 100755 --- a/check-format +++ b/check-format @@ -1,3 +1,3 @@ #!/bin/bash -cd libcobj && ./gradlew verGJF +cd libcobj && ./gradlew spotlessCheck cd ../cobj && ./check-format diff --git a/cobj/codegen.c b/cobj/codegen.c index b580fd58..e4239832 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -87,7 +87,7 @@ extern unsigned char cb_default_byte; static int index_read_flag = 0; static struct label_list { - struct label_list *next; + // struct label_list *next; int id; int call_num; } *label_cache = NULL; @@ -1416,10 +1416,8 @@ static void joutput_param(cb_tree x, int id) { cb_tree l; struct literal_list *ll; int n; - int extrefs; int sav_stack_id; char fname[12]; - COB_UNUSED(extrefs); param_id = id; @@ -1506,7 +1504,6 @@ static void joutput_param(cb_tree x, int id) { break; case CB_TAG_REFERENCE: r = CB_REFERENCE(x); - extrefs = 0; if (r->check) { joutput("(new GetAbstractCobolField() {"); joutput_newline(); @@ -1578,7 +1575,6 @@ static void joutput_param(cb_tree x, int id) { } f = CB_FIELD(r->value); if (f->redefines && f->redefines->flag_external) { - extrefs = 1; f->flag_item_external = 1; f->flag_external = 1; } @@ -1587,12 +1583,10 @@ static void joutput_param(cb_tree x, int id) { } for (pechk = f->parent; pechk; pechk = pechk->parent) { if (pechk->flag_external) { - extrefs = 1; f->flag_item_external = 1; break; } if (pechk->redefines && pechk->redefines->flag_external) { - extrefs = 1; f->flag_item_external = 1; f->flag_external = 1; break; @@ -1979,7 +1973,7 @@ static void joutput_cond(cb_tree x, int save_flag) { joutput_indent("public int run(){"); joutput_indent_level += 2; for (; x; x = CB_CHAIN(x)) { - //最後の文ならreturn文を書く + // 最後の文ならreturn文を書く if (!CB_CHAIN(x)) { joutput_indent("return "); } @@ -6236,20 +6230,20 @@ void codegen(struct cb_program *prog, const int nested, char **program_id_list, /* Program local stuff */ - //コンストラクタの実装コードを出力 - //メンバ変数の初期化を行う + // コンストラクタの実装コードを出力 + // メンバ変数の初期化を行う joutput_line("public %s()", prog->program_id); joutput_line("{"); joutput_line(" init();"); joutput_line("}"); joutput_newline(); - //メンバ変数の初期化メソッドを出力 + // メンバ変数の初期化メソッドを出力 create_sorted_data_storage_cache(); joutput_init_method(prog); joutput_newline(); - //メンバ変数の出力 + // メンバ変数の出力 joutput_declare_member_variables(prog, prog->parameter_list); joutput("\n"); diff --git a/cobj/cpp-check b/cobj/cpp-check index 9fa70161..23e31699 100755 --- a/cobj/cpp-check +++ b/cobj/cpp-check @@ -5,4 +5,7 @@ cppcheck --error-exitcode=1 \ --enable=performance \ --enable=portability \ --suppress=unusedFunctions \ - --suppress=toomanyconfigs + --suppress=toomanyconfigs \ + --suppress=unusedStructMember \ + --suppress=leakNoVarFunctionCall \ + --suppress=unreadVariable diff --git a/cobj/ppparse.c b/cobj/ppparse.c index 1ae5a9c2..5b7832e7 100644 --- a/cobj/ppparse.c +++ b/cobj/ppparse.c @@ -436,7 +436,7 @@ void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ #ifndef YYFREE #define YYFREE free #if !defined free && !defined EXIT_SUCCESS -void free(void *); /* INFRINGES ON USER NAME SPACE */ +void free(void *); /* INFRINGES ON USER NAME SPACE */ #endif #endif #endif diff --git a/cobj/tree.h b/cobj/tree.h index 1f124408..b251eb23 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -515,7 +515,7 @@ struct cb_field { cb_tree key; /* KEY */ cb_tree ref; /* reference used in SEARCH ALL */ cb_tree val; /* value to be compared in SEARCH ALL */ - } * keys; + } *keys; int nkeys; /* the number of keys */ int param_num; /* CHAINING param number */ struct cb_picture *pic; /* PICTURE */ diff --git a/format b/format index b473f5f7..ba27e3fc 100755 --- a/format +++ b/format @@ -1,3 +1,3 @@ #!/bin/bash -cd libcobj && ./gradlew goJF +cd libcobj && ./gradlew spotlessApply cd ../cobj && ./format diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 733b4f49..13cf57b9 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,8 +3,8 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" + id("com.diffplug.spotless") version "7.0.0.BETA4" id("java") - id("com.github.sherter.google-java-format") version "0.9" id("maven-publish") pmd id("com.github.spotbugs") version "6.0.25" @@ -59,6 +59,12 @@ spotbugs { excludeFilter.set(project.file("${rootDir}/config/spotbugsFilter.xml")) } +spotless { + java { + googleJavaFormat("1.17.0").aosp().reflowLongStrings().skipJavadocFormatting() + } +} + publishing { repositories { maven { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index b308ad9e..3b4eb1d1 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -1,27 +1,27 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ - -package jp.osscons.opensourcecobol.libcobj; - -/** TODO: 準備中 */ -public class Const { - - /** TODO: 準備中 */ - public static final String version = "1.1.2"; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ + +package jp.osscons.opensourcecobol.libcobj; + +/** TODO: 準備中 */ +public class Const { + + /** TODO: 準備中 */ + public static final String version = "1.1.2"; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java index 0e0e82b9..e0930bf0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java @@ -34,477 +34,479 @@ /** 動的にクラスファイルを読み込んでCALL文のような機能を実装するためのクラス */ public class CobolResolve { - /** プログラム名とCobolRunnableインスタンスの対応表 */ - private static Map callTable; - - /** 例外コードと例外名の対応を表現する */ - public static Map cobException; - - /** 名前の変換方法(小文字か大文字)を示す変数 */ - private static int name_convert; - - // TODO resolve_pathsの利用方法 - /** システムで設定された区切り文字で区切られた0個以上のパス 動的に読み込むクラスファイルを検索する場所を示す. */ - private static List resolve_paths; - - /** システムで設定された区切り文字で区切られた0個以上のパス 動的に読み込むクラスファイルを検索するパッケージ名を示す. */ - private static List package_paths; - - static { - callTable = new HashMap<>(); - name_convert = 0; - resolve_paths = new ArrayList(); - package_paths = new ArrayList(); - cobException = new HashMap<>(); - - cobException.put(0xFFFF, "EC-ALL"); - cobException.put(0x0100, "EC-ARGUMENT"); - cobException.put(0x0101, "EC-ARGUMENT-FUNCTION"); - cobException.put(0x0102, "EC-ARGUMENT-IMP"); - cobException.put(0x0200, "EC-BOUND"); - cobException.put(0x0201, "EC-BOUND-IMP"); - cobException.put(0x0202, "EC-BOUND-ODO"); - cobException.put(0x0203, "EC-BOUND-OVERFLOW"); - cobException.put(0x0204, "EC-BOUND-PTR"); - cobException.put(0x0205, "EC-BOUND-REF-MOD"); - cobException.put(0x0206, "EC-BOUND-SET"); - cobException.put(0x0207, "EC-BOUND-SUBSCRIPT"); - cobException.put(0x0208, "EC-BOUND-TABLE-LIMIT"); - cobException.put(0x0300, "EC-DATA"); - cobException.put(0x0301, "EC-DATA-CONVERSION"); - cobException.put(0x0302, "EC-DATA-IMP"); - cobException.put(0x0303, "EC-DATA-INCOMPATIBLE"); - cobException.put(0x0304, "EC-DATA-INTEGRITY"); - cobException.put(0x0305, "EC-DATA-PTR-NULL"); - cobException.put(0x0306, "EC-DATA-INFINITY"); - cobException.put(0x0307, "EC-DATA-NEGATIVE-INFINITY"); - cobException.put(0x0308, "EC-DATA-NOT_A_NUMBER"); - cobException.put(0x0400, "EC-FLOW"); - cobException.put(0x0401, "EC-FLOW-GLOBAL-EXIT"); - cobException.put(0x0402, "EC-FLOW-GLOBAL-GOBACK"); - cobException.put(0x0403, "EC-FLOW-IMP"); - cobException.put(0x0404, "EC-FLOW-RELEASE"); - cobException.put(0x0405, "EC-FLOW-REPORT"); - cobException.put(0x0406, "EC-FLOW-RETURN"); - cobException.put(0x0407, "EC-FLOW-SEARCH"); - cobException.put(0x0408, "EC-FLOW-USE"); - cobException.put(0x0500, "EC-I-O"); - cobException.put(0x0501, "EC-I-O-AT-END"); - cobException.put(0x0502, "EC-I-O-EOP"); - cobException.put(0x0503, "EC-I-O-EOP-OVERFLOW"); - cobException.put(0x0504, "EC-I-O-FILE-SHARING"); - cobException.put(0x0505, "EC-I-O-IMP"); - cobException.put(0x0506, "EC-I-O-INVALID-KEY"); - cobException.put(0x0507, "EC-I-O-LINAGE"); - cobException.put(0x0508, "EC-I-O-LOGIC-ERROR"); - cobException.put(0x0509, "EC-I-O-PERMANENT-ERROR"); - cobException.put(0x050A, "EC-I-O-RECORD-OPERATION"); - cobException.put(0x0600, "EC-IMP"); - cobException.put(0x0601, "EC-IMP-ACCEPT"); - cobException.put(0x0602, "EC-IMP-DISPLAY"); - cobException.put(0x0700, "EC-LOCALE"); - cobException.put(0x0701, "EC-LOCALE-IMP"); - cobException.put(0x0702, "EC-LOCALE-INCOMPATIBLE"); - cobException.put(0x0703, "EC-LOCALE-INVALID"); - cobException.put(0x0704, "EC-LOCALE-INVALID-PTR"); - cobException.put(0x0705, "EC-LOCALE-MISSING"); - cobException.put(0x0706, "EC-LOCALE-SIZE"); - cobException.put(0x0800, "EC-OO"); - cobException.put(0x0801, "EC-OO-CONFORMANCE"); - cobException.put(0x0802, "EC-OO-EXCEPTION"); - cobException.put(0x0803, "EC-OO-IMP"); - cobException.put(0x0804, "EC-OO-METHOD"); - cobException.put(0x0805, "EC-OO-NULL"); - cobException.put(0x0806, "EC-OO-RESOURCE"); - cobException.put(0x0807, "EC-OO-UNIVERSAL"); - cobException.put(0x0900, "EC-ORDER"); - cobException.put(0x0901, "EC-ORDER-IMP"); - cobException.put(0x0902, "EC-ORDER-NOT-SUPPORTED"); - cobException.put(0x0A00, "EC-OVERFLOW"); - cobException.put(0x0A01, "EC-OVERFLOW-IMP"); - cobException.put(0x0A02, "EC-OVERFLOW-STRING"); - cobException.put(0x0A03, "EC-OVERFLOW-UNSTRING"); - cobException.put(0x0B00, "EC-PROGRAM"); - cobException.put(0x0B01, "EC-PROGRAM-ARG-MISMATCH"); - cobException.put(0x0B02, "EC-PROGRAM-ARG-OMITTED"); - cobException.put(0x0B03, "EC-PROGRAM-CANCEL-ACTIVE"); - cobException.put(0x0B04, "EC-PROGRAM-IMP"); - cobException.put(0x0B05, "EC-PROGRAM-NOT-FOUND"); - cobException.put(0x0B06, "EC-PROGRAM-PTR-NULL"); - cobException.put(0x0B07, "EC-PROGRAM-RECURSIVE-CALL"); - cobException.put(0x0B08, "EC-PROGRAM-RESOURCES"); - cobException.put(0x0C00, "EC-RAISING"); - cobException.put(0x0C01, "EC-RAISING-IMP"); - cobException.put(0x0C02, "EC-RAISING-NOT-SPECIFIED"); - cobException.put(0x0D00, "EC-RANGE"); - cobException.put(0x0D01, "EC-RANGE-IMP"); - cobException.put(0x0D02, "EC-RANGE-INDEX"); - cobException.put(0x0D03, "EC-RANGE-INSPECT-SIZE"); - cobException.put(0x0D04, "EC-RANGE-INVALID"); - cobException.put(0x0D05, "EC-RANGE-PERFORM-VARYING"); - cobException.put(0x0D06, "EC-RANGE-PTR"); - cobException.put(0x0D07, "EC-RANGE-SEARCH-INDEX"); - cobException.put(0x0D08, "EC-RANGE-SEARCH-NO-MATCH"); - cobException.put(0x0E00, "EC-REPORT"); - cobException.put(0x0E01, "EC-REPORT-ACTIVE"); - cobException.put(0x0E02, "EC-REPORT-COLUMN-OVERLAP"); - cobException.put(0x0E03, "EC-REPORT-FILE-MODE"); - cobException.put(0x0E04, "EC-REPORT-IMP"); - cobException.put(0x0E05, "EC-REPORT-INACTIVE"); - cobException.put(0x0E06, "EC-REPORT-LINE-OVERLAP"); - cobException.put(0x0E08, "EC-REPORT-NOT-TERMINATED"); - cobException.put(0x0E09, "EC-REPORT-PAGE-LIMIT"); - cobException.put(0x0E0A, "EC-REPORT-PAGE-WIDTH"); - cobException.put(0x0E0B, "EC-REPORT-SUM-SIZE"); - cobException.put(0x0E0C, "EC-REPORT-VARYING"); - cobException.put(0x0F00, "EC-SCREEN"); - cobException.put(0x0F01, "EC-SCREEN-FIELD-OVERLAP"); - cobException.put(0x0F02, "EC-SCREEN-IMP"); - cobException.put(0x0F03, "EC-SCREEN-ITEM-TRUNCATED"); - cobException.put(0x0F04, "EC-SCREEN-LINE-NUMBER"); - cobException.put(0x0F05, "EC-SCREEN-STARTING-COLUMN"); - cobException.put(0x1000, "EC-SIZE"); - cobException.put(0x1001, "EC-SIZE-ADDRESS"); - cobException.put(0x1002, "EC-SIZE-EXPONENTIATION"); - cobException.put(0x1003, "EC-SIZE-IMP"); - cobException.put(0x1004, "EC-SIZE-OVERFLOW"); - cobException.put(0x1005, "EC-SIZE-TRUNCATION"); - cobException.put(0x1006, "EC-SIZE-UNDERFLOW"); - cobException.put(0x1007, "EC-SIZE-ZERO-DIVIDE"); - cobException.put(0x1100, "EC-SORT-MERGE"); - cobException.put(0x1101, "EC-SORT-MERGE-ACTIVE"); - cobException.put(0x1102, "EC-SORT-MERGE-FILE-OPEN"); - cobException.put(0x1103, "EC-SORT-MERGE-IMP"); - cobException.put(0x1104, "EC-SORT-MERGE-RELEASE"); - cobException.put(0x1105, "EC-SORT-MERGE-RETURN"); - cobException.put(0x1106, "EC-SORT-MERGE-SEQUENCE"); - cobException.put(0x1200, "EC-STORAGE"); - cobException.put(0x1201, "EC-STORAGE-IMP"); - cobException.put(0x1202, "EC-STORAGE-NOT-ALLOC"); - cobException.put(0x1203, "EC-STORAGE-NOT-AVAIL"); - cobException.put(0x1300, "EC-USER"); - cobException.put(0x1400, "EC-VALIDATE"); - cobException.put(0x1401, "EC-VALIDATE-CONTENT"); - cobException.put(0x1402, "EC-VALIDATE-FORMAT"); - cobException.put(0x1403, "EC-VALIDATE-IMP"); - cobException.put(0x1404, "EC-VALIDATE-RELATION"); - cobException.put(0x1405, "EC-VALIDATE-VARYING"); - cobException.put(0x1500, "EC-FUNCTION"); - cobException.put(0x1501, "EC-FUNCTION-NOT-FOUND"); - cobException.put(0x1502, "EC-FUNCTION-PTR-INVALID"); - cobException.put(0x1503, "EC-FUNCTION-PTR-NULL"); - cobException.put(0x1600, "EC-XML"); - cobException.put(0x1601, "EC-XML-CODESET"); - cobException.put(0x1602, "EC-XML-CODESET-CONVERSION"); - cobException.put(0x1603, "EC-XML-COUNT"); - cobException.put(0x1604, "EC-XML-DOCUMENT-TYPE"); - cobException.put(0x1605, "EC-XML-IMPLICIT-CLOSE"); - cobException.put(0x1606, "EC-XML-INVALID"); - cobException.put(0x1607, "EC-XML-NAMESPACE"); - cobException.put(0x1608, "EC-XML-STACKED-OPEN"); - cobException.put(0x1609, "EC-XML-RANGE"); - } - - /** - * 下記の環境変数を読み込み、CobolResolve内で定義されたメソッドの動作が変わる。
- * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、resolveメソッドに渡された引数を小文字に変換してから処理を開始する。
- * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、resolveメソッドに渡された引数を大文字に変換してから処理を開始する。
- * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 resolveメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
- * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 resolveメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 - * 環境変数COB_PRE_LOADは未実装 - */ - public static void cobolInitCall() { - - String s; - String buf; - - // //用途不明 - // call_filename_buff = cob_malloc (CALL_FILEBUFF_SIZE); - // call_entry_buff = cob_malloc (COB_SMALL_BUFF); - // call_entry2_buff = cob_malloc (COB_SMALL_BUFF); - - s = CobolUtil.getEnv("COB_LOAD_CASE"); - if (s != null) { - String sU = s.toUpperCase(); - if ("LOWER".equals(sU)) { - name_convert = 1; - } else if ("UPPER".equals(sU)) { - name_convert = 2; - } + /** プログラム名とCobolRunnableインスタンスの対応表 */ + private static Map callTable; + + /** 例外コードと例外名の対応を表現する */ + public static Map cobException; + + /** 名前の変換方法(小文字か大文字)を示す変数 */ + private static int name_convert; + + // TODO resolve_pathsの利用方法 + /** システムで設定された区切り文字で区切られた0個以上のパス 動的に読み込むクラスファイルを検索する場所を示す. */ + private static List resolve_paths; + + /** システムで設定された区切り文字で区切られた0個以上のパス 動的に読み込むクラスファイルを検索するパッケージ名を示す. */ + private static List package_paths; + + static { + callTable = new HashMap<>(); + name_convert = 0; + resolve_paths = new ArrayList(); + package_paths = new ArrayList(); + cobException = new HashMap<>(); + + cobException.put(0xFFFF, "EC-ALL"); + cobException.put(0x0100, "EC-ARGUMENT"); + cobException.put(0x0101, "EC-ARGUMENT-FUNCTION"); + cobException.put(0x0102, "EC-ARGUMENT-IMP"); + cobException.put(0x0200, "EC-BOUND"); + cobException.put(0x0201, "EC-BOUND-IMP"); + cobException.put(0x0202, "EC-BOUND-ODO"); + cobException.put(0x0203, "EC-BOUND-OVERFLOW"); + cobException.put(0x0204, "EC-BOUND-PTR"); + cobException.put(0x0205, "EC-BOUND-REF-MOD"); + cobException.put(0x0206, "EC-BOUND-SET"); + cobException.put(0x0207, "EC-BOUND-SUBSCRIPT"); + cobException.put(0x0208, "EC-BOUND-TABLE-LIMIT"); + cobException.put(0x0300, "EC-DATA"); + cobException.put(0x0301, "EC-DATA-CONVERSION"); + cobException.put(0x0302, "EC-DATA-IMP"); + cobException.put(0x0303, "EC-DATA-INCOMPATIBLE"); + cobException.put(0x0304, "EC-DATA-INTEGRITY"); + cobException.put(0x0305, "EC-DATA-PTR-NULL"); + cobException.put(0x0306, "EC-DATA-INFINITY"); + cobException.put(0x0307, "EC-DATA-NEGATIVE-INFINITY"); + cobException.put(0x0308, "EC-DATA-NOT_A_NUMBER"); + cobException.put(0x0400, "EC-FLOW"); + cobException.put(0x0401, "EC-FLOW-GLOBAL-EXIT"); + cobException.put(0x0402, "EC-FLOW-GLOBAL-GOBACK"); + cobException.put(0x0403, "EC-FLOW-IMP"); + cobException.put(0x0404, "EC-FLOW-RELEASE"); + cobException.put(0x0405, "EC-FLOW-REPORT"); + cobException.put(0x0406, "EC-FLOW-RETURN"); + cobException.put(0x0407, "EC-FLOW-SEARCH"); + cobException.put(0x0408, "EC-FLOW-USE"); + cobException.put(0x0500, "EC-I-O"); + cobException.put(0x0501, "EC-I-O-AT-END"); + cobException.put(0x0502, "EC-I-O-EOP"); + cobException.put(0x0503, "EC-I-O-EOP-OVERFLOW"); + cobException.put(0x0504, "EC-I-O-FILE-SHARING"); + cobException.put(0x0505, "EC-I-O-IMP"); + cobException.put(0x0506, "EC-I-O-INVALID-KEY"); + cobException.put(0x0507, "EC-I-O-LINAGE"); + cobException.put(0x0508, "EC-I-O-LOGIC-ERROR"); + cobException.put(0x0509, "EC-I-O-PERMANENT-ERROR"); + cobException.put(0x050A, "EC-I-O-RECORD-OPERATION"); + cobException.put(0x0600, "EC-IMP"); + cobException.put(0x0601, "EC-IMP-ACCEPT"); + cobException.put(0x0602, "EC-IMP-DISPLAY"); + cobException.put(0x0700, "EC-LOCALE"); + cobException.put(0x0701, "EC-LOCALE-IMP"); + cobException.put(0x0702, "EC-LOCALE-INCOMPATIBLE"); + cobException.put(0x0703, "EC-LOCALE-INVALID"); + cobException.put(0x0704, "EC-LOCALE-INVALID-PTR"); + cobException.put(0x0705, "EC-LOCALE-MISSING"); + cobException.put(0x0706, "EC-LOCALE-SIZE"); + cobException.put(0x0800, "EC-OO"); + cobException.put(0x0801, "EC-OO-CONFORMANCE"); + cobException.put(0x0802, "EC-OO-EXCEPTION"); + cobException.put(0x0803, "EC-OO-IMP"); + cobException.put(0x0804, "EC-OO-METHOD"); + cobException.put(0x0805, "EC-OO-NULL"); + cobException.put(0x0806, "EC-OO-RESOURCE"); + cobException.put(0x0807, "EC-OO-UNIVERSAL"); + cobException.put(0x0900, "EC-ORDER"); + cobException.put(0x0901, "EC-ORDER-IMP"); + cobException.put(0x0902, "EC-ORDER-NOT-SUPPORTED"); + cobException.put(0x0A00, "EC-OVERFLOW"); + cobException.put(0x0A01, "EC-OVERFLOW-IMP"); + cobException.put(0x0A02, "EC-OVERFLOW-STRING"); + cobException.put(0x0A03, "EC-OVERFLOW-UNSTRING"); + cobException.put(0x0B00, "EC-PROGRAM"); + cobException.put(0x0B01, "EC-PROGRAM-ARG-MISMATCH"); + cobException.put(0x0B02, "EC-PROGRAM-ARG-OMITTED"); + cobException.put(0x0B03, "EC-PROGRAM-CANCEL-ACTIVE"); + cobException.put(0x0B04, "EC-PROGRAM-IMP"); + cobException.put(0x0B05, "EC-PROGRAM-NOT-FOUND"); + cobException.put(0x0B06, "EC-PROGRAM-PTR-NULL"); + cobException.put(0x0B07, "EC-PROGRAM-RECURSIVE-CALL"); + cobException.put(0x0B08, "EC-PROGRAM-RESOURCES"); + cobException.put(0x0C00, "EC-RAISING"); + cobException.put(0x0C01, "EC-RAISING-IMP"); + cobException.put(0x0C02, "EC-RAISING-NOT-SPECIFIED"); + cobException.put(0x0D00, "EC-RANGE"); + cobException.put(0x0D01, "EC-RANGE-IMP"); + cobException.put(0x0D02, "EC-RANGE-INDEX"); + cobException.put(0x0D03, "EC-RANGE-INSPECT-SIZE"); + cobException.put(0x0D04, "EC-RANGE-INVALID"); + cobException.put(0x0D05, "EC-RANGE-PERFORM-VARYING"); + cobException.put(0x0D06, "EC-RANGE-PTR"); + cobException.put(0x0D07, "EC-RANGE-SEARCH-INDEX"); + cobException.put(0x0D08, "EC-RANGE-SEARCH-NO-MATCH"); + cobException.put(0x0E00, "EC-REPORT"); + cobException.put(0x0E01, "EC-REPORT-ACTIVE"); + cobException.put(0x0E02, "EC-REPORT-COLUMN-OVERLAP"); + cobException.put(0x0E03, "EC-REPORT-FILE-MODE"); + cobException.put(0x0E04, "EC-REPORT-IMP"); + cobException.put(0x0E05, "EC-REPORT-INACTIVE"); + cobException.put(0x0E06, "EC-REPORT-LINE-OVERLAP"); + cobException.put(0x0E08, "EC-REPORT-NOT-TERMINATED"); + cobException.put(0x0E09, "EC-REPORT-PAGE-LIMIT"); + cobException.put(0x0E0A, "EC-REPORT-PAGE-WIDTH"); + cobException.put(0x0E0B, "EC-REPORT-SUM-SIZE"); + cobException.put(0x0E0C, "EC-REPORT-VARYING"); + cobException.put(0x0F00, "EC-SCREEN"); + cobException.put(0x0F01, "EC-SCREEN-FIELD-OVERLAP"); + cobException.put(0x0F02, "EC-SCREEN-IMP"); + cobException.put(0x0F03, "EC-SCREEN-ITEM-TRUNCATED"); + cobException.put(0x0F04, "EC-SCREEN-LINE-NUMBER"); + cobException.put(0x0F05, "EC-SCREEN-STARTING-COLUMN"); + cobException.put(0x1000, "EC-SIZE"); + cobException.put(0x1001, "EC-SIZE-ADDRESS"); + cobException.put(0x1002, "EC-SIZE-EXPONENTIATION"); + cobException.put(0x1003, "EC-SIZE-IMP"); + cobException.put(0x1004, "EC-SIZE-OVERFLOW"); + cobException.put(0x1005, "EC-SIZE-TRUNCATION"); + cobException.put(0x1006, "EC-SIZE-UNDERFLOW"); + cobException.put(0x1007, "EC-SIZE-ZERO-DIVIDE"); + cobException.put(0x1100, "EC-SORT-MERGE"); + cobException.put(0x1101, "EC-SORT-MERGE-ACTIVE"); + cobException.put(0x1102, "EC-SORT-MERGE-FILE-OPEN"); + cobException.put(0x1103, "EC-SORT-MERGE-IMP"); + cobException.put(0x1104, "EC-SORT-MERGE-RELEASE"); + cobException.put(0x1105, "EC-SORT-MERGE-RETURN"); + cobException.put(0x1106, "EC-SORT-MERGE-SEQUENCE"); + cobException.put(0x1200, "EC-STORAGE"); + cobException.put(0x1201, "EC-STORAGE-IMP"); + cobException.put(0x1202, "EC-STORAGE-NOT-ALLOC"); + cobException.put(0x1203, "EC-STORAGE-NOT-AVAIL"); + cobException.put(0x1300, "EC-USER"); + cobException.put(0x1400, "EC-VALIDATE"); + cobException.put(0x1401, "EC-VALIDATE-CONTENT"); + cobException.put(0x1402, "EC-VALIDATE-FORMAT"); + cobException.put(0x1403, "EC-VALIDATE-IMP"); + cobException.put(0x1404, "EC-VALIDATE-RELATION"); + cobException.put(0x1405, "EC-VALIDATE-VARYING"); + cobException.put(0x1500, "EC-FUNCTION"); + cobException.put(0x1501, "EC-FUNCTION-NOT-FOUND"); + cobException.put(0x1502, "EC-FUNCTION-PTR-INVALID"); + cobException.put(0x1503, "EC-FUNCTION-PTR-NULL"); + cobException.put(0x1600, "EC-XML"); + cobException.put(0x1601, "EC-XML-CODESET"); + cobException.put(0x1602, "EC-XML-CODESET-CONVERSION"); + cobException.put(0x1603, "EC-XML-COUNT"); + cobException.put(0x1604, "EC-XML-DOCUMENT-TYPE"); + cobException.put(0x1605, "EC-XML-IMPLICIT-CLOSE"); + cobException.put(0x1606, "EC-XML-INVALID"); + cobException.put(0x1607, "EC-XML-NAMESPACE"); + cobException.put(0x1608, "EC-XML-STACKED-OPEN"); + cobException.put(0x1609, "EC-XML-RANGE"); } - s = CobolUtil.getEnv("COB_LIBRARY_PATH"); - if (s == null || s.equals("")) { - buf = "." + System.getProperty("path.separator") + CobolConstant.COB_LIBRARY_PATH; - } else { - buf = - s - + System.getProperty("path.separator") - + "." - + System.getProperty("path.separator") - + CobolConstant.COB_LIBRARY_PATH; + /** + * 下記の環境変数を読み込み、CobolResolve内で定義されたメソッドの動作が変わる。
+ * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、resolveメソッドに渡された引数を小文字に変換してから処理を開始する。
+ * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、resolveメソッドに渡された引数を大文字に変換してから処理を開始する。
+ * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 resolveメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
+ * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 resolveメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 + * 環境変数COB_PRE_LOADは未実装 + */ + public static void cobolInitCall() { + + String s; + String buf; + + // //用途不明 + // call_filename_buff = cob_malloc (CALL_FILEBUFF_SIZE); + // call_entry_buff = cob_malloc (COB_SMALL_BUFF); + // call_entry2_buff = cob_malloc (COB_SMALL_BUFF); + + s = CobolUtil.getEnv("COB_LOAD_CASE"); + if (s != null) { + String sU = s.toUpperCase(); + if ("LOWER".equals(sU)) { + name_convert = 1; + } else if ("UPPER".equals(sU)) { + name_convert = 2; + } + } + + s = CobolUtil.getEnv("COB_LIBRARY_PATH"); + if (s == null || s.equals("")) { + buf = "." + System.getProperty("path.separator") + CobolConstant.COB_LIBRARY_PATH; + } else { + buf = + s + + System.getProperty("path.separator") + + "." + + System.getProperty("path.separator") + + CobolConstant.COB_LIBRARY_PATH; + } + setLibraryPath(buf); + + s = CobolUtil.getEnv("COB_PACKAGE_PATH"); + setPackagePath(s); + + // TODO プリロードの扱いを検討する + s = CobolUtil.getEnv("COB_PRE_LOAD"); + + // 用途不明 + // call_buffer = cob_malloc (CALL_BUFF_SIZE); + // call_lastsize = CALL_BUFF_SIZE; + // for (psyst = (struct system_table *)&system_tab[0]; psyst->syst_name; + // ++psyst) { + // insert (psyst->syst_name, psyst->syst_call, NULL); + // } } - setLibraryPath(buf); - - s = CobolUtil.getEnv("COB_PACKAGE_PATH"); - setPackagePath(s); - - // TODO プリロードの扱いを検討する - s = CobolUtil.getEnv("COB_PRE_LOAD"); - - // 用途不明 - // call_buffer = cob_malloc (CALL_BUFF_SIZE); - // call_lastsize = CALL_BUFF_SIZE; - // for (psyst = (struct system_table *)&system_tab[0]; psyst->syst_name; - // ++psyst) { - // insert (psyst->syst_name, psyst->syst_call, NULL); - // } - } - - /** - * ライブラリパスを更新する - * - * @param path 区切り文字で区切られた0個以上のパスを示す文字列 - */ - private static void setLibraryPath(String path) { - if (!resolve_paths.isEmpty()) { - resolve_paths.clear(); - } - - String[] paths = path.split(System.getProperty("path.separator")); - for (String path1 : paths) { - if (path1.length() > 0) { - resolve_paths.add(path1); - } - } - } - - /** - * パッケージへパスを更新する - * - * @param path 区切り文字で区切られた0個以上のパスを示す文字列 - */ - private static void setPackagePath(String path) { - if (!package_paths.isEmpty()) { - package_paths.clear(); + /** + * ライブラリパスを更新する + * + * @param path 区切り文字で区切られた0個以上のパスを示す文字列 + */ + private static void setLibraryPath(String path) { + if (!resolve_paths.isEmpty()) { + resolve_paths.clear(); + } + + String[] paths = path.split(System.getProperty("path.separator")); + + for (String path1 : paths) { + if (path1.length() > 0) { + resolve_paths.add(path1); + } + } } - String[] paths = path.split(System.getProperty("path.separator")); - - for (String path1 : paths) { - if (path1.length() > 0) { - package_paths.add(path1); - } - } - } - - /** - * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
- * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
- * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 - * - * @param packageName 検索するクラスのパッケージ名 - * @param cobolField 読み込むクラスの名前を格納するCOBOL変数 - * @param runner CobolRunnableを実装したクラス。nullでもよい。 - * @return runnerがnullでない場合はrunnerを返し、そうでないときはクラス名とパッケージ名を元に検索処理を実施する。 - * 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 - * @throws CobolRuntimeException TODO: 準備中 - */ - public static CobolRunnable resolve( - String packageName, AbstractCobolField cobolField, CobolRunnable runner) - throws CobolRuntimeException { - if (runner == null) { - return resolve(packageName, cobolField.fieldToString()); - } else { - return runner; + /** + * パッケージへパスを更新する + * + * @param path 区切り文字で区切られた0個以上のパスを示す文字列 + */ + private static void setPackagePath(String path) { + if (!package_paths.isEmpty()) { + package_paths.clear(); + } + + String[] paths = path.split(System.getProperty("path.separator")); + + for (String path1 : paths) { + if (path1.length() > 0) { + package_paths.add(path1); + } + } } - } - - /** - * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
- * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
- * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 - * - * @param packageName 検索するクラスのパッケージ名 - * @param name 読み込むクラスの名前 - * @param runner CobolRunnableを実装したクラス。nullでもよい。 - * @return runnerがnullでない場合はrunnerを返し、そうでないときはクラス名とパッケージ名を元に検索処理を実施する。 - * 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 - * @throws CobolRuntimeException TODO: 準備中 - */ - public static CobolRunnable resolve(String packageName, String name, CobolRunnable runner) - throws CobolRuntimeException { - if (runner == null) { - return resolve(packageName, name); - } else { - return runner; - } - } - - /** - * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
- * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
- * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 - * - * @param packageName パッケージ名 - * @param cobolField 読み込むクラスの名前 - * @return クラス名とパッケージ名を元に検索処理を実施する。 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 - * @throws CobolRuntimeException TODO: 準備中 - */ - public static CobolRunnable resolve(String packageName, AbstractCobolField cobolField) - throws CobolRuntimeException { - return resolve(packageName, cobolField.fieldToString()); - } - - /** - * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
- * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
- * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
- * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 - * - * @param packageName パッケージ名 - * @param name 読み込むクラスの名前 - * @return クラス名とパッケージ名を元に検索処理を実施する。 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 - * @throws CobolRuntimeException TODO: 準備中 - */ - public static CobolRunnable resolve(String packageName, String name) - throws CobolRuntimeException { - String fullName; - CobolRunnable runnable = null; - - /* encode program name */ - char c1 = name.charAt(0); - if (c1 >= '0' && c1 <= '9') { - name = "_" + name; - } - name = name.replaceAll("-", "__"); - /* search the cache */ - if (callTable.containsKey(name)) { - return callTable.get(name); + /** + * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
+ * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
+ * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 + * + * @param packageName 検索するクラスのパッケージ名 + * @param cobolField 読み込むクラスの名前を格納するCOBOL変数 + * @param runner CobolRunnableを実装したクラス。nullでもよい。 + * @return runnerがnullでない場合はrunnerを返し、そうでないときはクラス名とパッケージ名を元に検索処理を実施する。 + * 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 + * @throws CobolRuntimeException TODO: 準備中 + */ + public static CobolRunnable resolve( + String packageName, AbstractCobolField cobolField, CobolRunnable runner) + throws CobolRuntimeException { + if (runner == null) { + return resolve(packageName, cobolField.fieldToString()); + } else { + return runner; + } } - if (name_convert == 1) { - name = name.toLowerCase(); - } else if (name_convert == 2) { - name = name.toUpperCase(); + /** + * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
+ * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
+ * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 + * + * @param packageName 検索するクラスのパッケージ名 + * @param name 読み込むクラスの名前 + * @param runner CobolRunnableを実装したクラス。nullでもよい。 + * @return runnerがnullでない場合はrunnerを返し、そうでないときはクラス名とパッケージ名を元に検索処理を実施する。 + * 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 + * @throws CobolRuntimeException TODO: 準備中 + */ + public static CobolRunnable resolve(String packageName, String name, CobolRunnable runner) + throws CobolRuntimeException { + if (runner == null) { + return resolve(packageName, name); + } else { + return runner; + } } - if (packageName != null) { - fullName = packageName + "." + name; - } else { - fullName = name; + /** + * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
+ * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、cobolFieldの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
+ * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 + * + * @param packageName パッケージ名 + * @param cobolField 読み込むクラスの名前 + * @return クラス名とパッケージ名を元に検索処理を実施する。 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 + * @throws CobolRuntimeException TODO: 準備中 + */ + public static CobolRunnable resolve(String packageName, AbstractCobolField cobolField) + throws CobolRuntimeException { + return resolve(packageName, cobolField.fieldToString()); } - /* search the main program */ - runnable = getInstance(fullName); - if (runnable != null) { - callTable.put(name, runnable); - return runnable; + /** + * パッケージ名とクラス名から、クラスを動的に読み込む。 このメソッドは以下のように、環境変数の設定値によって動作が変わる。
+ * 環境変数COB_LOAD_CASEにLOWERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LOAD_CASEにUPPERが指定されているときは、nameの示す文字列全体を小文字に変換したものを検索する。
+ * 環境変数COB_LIBRARY_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのディレクトリパスのリストにそれを追加する。
+ * 環境変数COB_PACKAGE_PATHにディレクトリパスが指定されている場合、 このメソッドが検索するモジュールのパッケージパスのリストにそれを追加する。 + * + * @param packageName パッケージ名 + * @param name 読み込むクラスの名前 + * @return クラス名とパッケージ名を元に検索処理を実施する。 検索して動的にクラスの読み込みに成功したら、それを返す。検索に失敗したら nullを返す。 + * @throws CobolRuntimeException TODO: 準備中 + */ + public static CobolRunnable resolve(String packageName, String name) + throws CobolRuntimeException { + String fullName; + CobolRunnable runnable = null; + + /* encode program name */ + char c1 = name.charAt(0); + if (c1 >= '0' && c1 <= '9') { + name = "_" + name; + } + name = name.replaceAll("-", "__"); + + /* search the cache */ + if (callTable.containsKey(name)) { + return callTable.get(name); + } + + if (name_convert == 1) { + name = name.toLowerCase(); + } else if (name_convert == 2) { + name = name.toUpperCase(); + } + + if (packageName != null) { + fullName = packageName + "." + name; + } else { + fullName = name; + } + + /* search the main program */ + runnable = getInstance(fullName); + if (runnable != null) { + callTable.put(name, runnable); + return runnable; + } + + /* search external modules */ + for (String packagePath : package_paths) { + fullName = packagePath + "." + name; + runnable = getInstance(fullName); + if (runnable != null) { + callTable.put(name, runnable); + return runnable; + } + } + + // Not found + String msg = "Program not found: " + name; + throw new CobolRuntimeException(CobolExceptionId.COB_EC_PROGRAM_NOT_FOUND, msg); } - /* search external modules */ - for (String packagePath : package_paths) { - fullName = packagePath + "." + name; - runnable = getInstance(fullName); - if (runnable != null) { - callTable.put(name, runnable); - return runnable; - } + /** + * リフレクション機能を用いて動的にクラスファイルを読み込んでCobolRunnableのインスタンスを生成する + * + * @param name 読み込むクラスファイルのパス + * @return 読み込みに失敗したときはnull,其れ以外は読み込んだCobolRunnbableのインスタンス + */ + private static CobolRunnable getInstance(String name) { + CobolRunnable runnable = null; + + try { + Class c = Class.forName(name); + Constructor cons = c.getConstructor(); + runnable = (CobolRunnable) cons.newInstance(); + runnable = (CobolRunnable) c.getDeclaredConstructor().newInstance(); + callTable.put(name, runnable); + return runnable; + } catch (NoSuchMethodException + | SecurityException + | InstantiationException + | IllegalAccessException + | IllegalArgumentException + | InvocationTargetException + | ClassNotFoundException e) { + // TODO 自動生成された catch ブロック + return null; + } } - // Not found - String msg = "Program not found: " + name; - throw new CobolRuntimeException(CobolExceptionId.COB_EC_PROGRAM_NOT_FOUND, msg); - } - - /** - * リフレクション機能を用いて動的にクラスファイルを読み込んでCobolRunnableのインスタンスを生成する - * - * @param name 読み込むクラスファイルのパス - * @return 読み込みに失敗したときはnull,其れ以外は読み込んだCobolRunnbableのインスタンス - */ - private static CobolRunnable getInstance(String name) { - CobolRunnable runnable = null; - - try { - Class c = Class.forName(name); - Constructor cons = c.getConstructor(); - runnable = (CobolRunnable) cons.newInstance(); - runnable = (CobolRunnable) c.getDeclaredConstructor().newInstance(); - callTable.put(name, runnable); - return runnable; - } catch (NoSuchMethodException - | SecurityException - | InstantiationException - | IllegalAccessException - | IllegalArgumentException - | InvocationTargetException - | ClassNotFoundException e) { - // TODO 自動生成された catch ブロック - return null; - } - } - - /** - * 引数で与えられたプログラム名に対応するCobolRunnableのインスタンスの cancelメソッドを呼び出す - * - * @param cobolField プログラム名を示すCOBOL変数 - */ - public static void cancel(AbstractCobolField cobolField) { - cancel(cobolField.getString()); - } - - /** - * 引数で与えられたプログラム名に対応するCobolRunnableのインスタンスの cancelメソッドを呼び出す - * - * @param name プログラム名 - */ - public static void cancel(String name) { - if (name == null) { - throw new CobolRuntimeException( - CobolRuntimeException.COBOL_FATAL_ERROR, "NULL name parameter passed to 'cobcancel'"); + /** + * 引数で与えられたプログラム名に対応するCobolRunnableのインスタンスの cancelメソッドを呼び出す + * + * @param cobolField プログラム名を示すCOBOL変数 + */ + public static void cancel(AbstractCobolField cobolField) { + cancel(cobolField.getString()); } - CobolRunnable runnable = callTable.get(name); - if (runnable.isActive() == false) { - runnable.cancel(); + /** + * 引数で与えられたプログラム名に対応するCobolRunnableのインスタンスの cancelメソッドを呼び出す + * + * @param name プログラム名 + */ + public static void cancel(String name) { + if (name == null) { + throw new CobolRuntimeException( + CobolRuntimeException.COBOL_FATAL_ERROR, + "NULL name parameter passed to 'cobcancel'"); + } + + CobolRunnable runnable = callTable.get(name); + if (runnable.isActive() == false) { + runnable.cancel(); + } } - } - - /** - * 指定のプログラムのcancelメソッドを呼び出す - * - * @param f cancelを呼び出すプログラム名を示すCOBOL変数 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void fieldCancel(AbstractCobolField f) throws CobolStopRunException { - CobolResolve.cobCancel(f.fieldToString()); - } - /** - * 指定のプログラムのcancelメソッドを呼び出す - * - * @param name プログラム名 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCancel(String name) throws CobolStopRunException { - if (name == null || name.equals("")) { - // TODO cob_runtime_errorの実装 - CobolStopRunException.stopRunAndThrow(1); + + /** + * 指定のプログラムのcancelメソッドを呼び出す + * + * @param f cancelを呼び出すプログラム名を示すCOBOL変数 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void fieldCancel(AbstractCobolField f) throws CobolStopRunException { + CobolResolve.cobCancel(f.fieldToString()); } - name = name.replaceAll("-", "__"); - CobolRunnable runner = callTable.get(name); - if (runner != null) { - runner.cancel(); + /** + * 指定のプログラムのcancelメソッドを呼び出す + * + * @param name プログラム名 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCancel(String name) throws CobolStopRunException { + if (name == null || name.equals("")) { + // TODO cob_runtime_errorの実装 + CobolStopRunException.stopRunAndThrow(1); + } + + name = name.replaceAll("-", "__"); + CobolRunnable runner = callTable.get(name); + if (runner != null) { + runner.cancel(); + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolRunnable.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolRunnable.java index fae4de3d..a29809e5 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolRunnable.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolRunnable.java @@ -22,21 +22,21 @@ /** COBOLプログラムの実行単位が実装すべきインターフェース */ public interface CobolRunnable { - /** - * COBOLプログラムを実行する - * - * @param storages プログラムの入力データの可変長引数。CALL等の引数のデータ部分 - * @return プログラムの終了コード - */ - int run(CobolDataStorage... storages); + /** + * COBOLプログラムを実行する + * + * @param storages プログラムの入力データの可変長引数。CALL等の引数のデータ部分 + * @return プログラムの終了コード + */ + int run(CobolDataStorage... storages); - /** CANCELのためのメソッド */ - void cancel(); + /** CANCELのためのメソッド */ + void cancel(); - /** - * 取り扱いについては準備中 - * - * @return 準備中 - */ - boolean isActive(); + /** + * 取り扱いについては準備中 + * + * @return 準備中 + */ + boolean isActive(); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java index f4935947..6c421c14 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java @@ -1,907 +1,920 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.call; - -import java.io.IOException; -import java.lang.ProcessBuilder.Redirect; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** 組み込み関数を提供するクラス */ -public class CobolSystemRoutine { - private static final boolean runsOnWindows = "\\".equals(System.getProperty("file.separator")); - - /** - * 組み込み関数CBL_EXIT_PROCの実装。未実装。 - * - * @param x 未実装 - * @param pptr 未実装 - * @return 未実装 - */ - public static int CBL_EXIT_PROC(CobolDataStorage x, CobolDataStorage pptr) { - // TODO 実装 - return 0; - } - - /** - * 組み込み関数CBL_ERROR_PROCの実装。未実装。 - * - * @param x 未実装 - * @param pptr 未実装 - * @return 未実装 - */ - public static int CBL_ERROR_PROC(CobolDataStorage x, CobolDataStorage pptr) { - // TODO 実装 - return 0; - } - - /** - * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 - * - * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 - * @return コマンドの終了コード。 - * @throws CobolStopRunException TODO: 準備中 - * このメソッドは内部でCobolModule.getCurrentModule().cob_procedure_parametersを参照する。 - * このリストの形式に問題がある場合にスローされる。 - */ - public static int SYSTEM(CobolDataStorage cmd) throws CobolStopRunException { - int size = SYSTEM_getParameterSize(); - String cmdStr = new String(cmd.getByteArray(0, size)); - return SYSTEM_main(cmdStr); - } - - /** - * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 - * - * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 - * @return コマンドの終了コード。 - */ - public static int SYSTEM(String cmd) { - return SYSTEM_main(cmd); - } - - private static int SYSTEM_getParameterSize() throws CobolStopRunException { - CobolUtil.COB_CHK_PARMS("SYSTEM", 1); - List paramaters = CobolModule.getCurrentModule().cob_procedure_parameters; - if (!paramaters.isEmpty() && paramaters.get(0) != null) { - AbstractCobolField paramater = paramaters.get(0); - int size = paramater.getSize(); - if (size <= 0) { - CobolUtil.runtimeError("The size of the paramater to SYSTEM call is less than 1"); - CobolStopRunException.stopRunAndThrow(1); - } - return size; - } else { - CobolUtil.runtimeError("The size of the paramater is not specified"); - CobolStopRunException.stopRunAndThrow(1); - // not reached - return -1; - } - } - - private static int SYSTEM_main(String cmd) { - ProcessBuilder pb; - if (runsOnWindows) { - pb = new ProcessBuilder("cmd", "/c", cmd); - } else { - pb = new ProcessBuilder("sh", "-c", cmd); - } - pb.redirectInput(Redirect.INHERIT) - .redirectOutput(Redirect.INHERIT) - .redirectError(Redirect.INHERIT); - try { - Process process = pb.start(); - return process.waitFor(); - } catch (InterruptedException | IOException e) { - e.printStackTrace(); - return 1; - } - } - - /** - * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 - * - * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 - * @return コマンドの終了コード。 - */ - public static int SYSTEM(AbstractCobolField cmd) { - return SYSTEM(cmd.getString()); - } - - private interface Calculater { - byte calc(byte b1, byte b2); - } - - private static int CBL_COMMON_OPERATION( - String funcName, CobolDataStorage data1, CobolDataStorage data2, int length, Calculater c) { - CobolUtil.COB_CHK_PARMS(funcName, 3); - if (length <= 0) { - return 0; - } - for (int n = 0; n < length; ++n) { - byte b1 = data1.getByte(n); - byte b2 = data2.getByte(n); - data2.setByte(n, c.calc(b1, b2)); - } - return 0; - } - - /** - * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数のバイト列。 - * @param data2 計算対象の2番目のCOBOL変数のバイト列。先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数。 - * @return 0 - */ - public static int CBL_AND(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_AND", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return (byte) (b1 & b2); - } - }); - } - /** - * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数。 - * @param data2 計算対象の2番目の引数のバイト列。先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数。 - * @return 0 - */ - public static int CBL_AND(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_AND(data1.getDataStorage(), data2, length); - } - /** - * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数のバイト列。 - * @param data2 計算対象の2番目のCOBOL変数のバイト列。その変数のバイト列の先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数。 - * @return 0 - */ - public static int CBL_AND(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_AND(data1, data2.getDataStorage(), length); - } - /** - * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数。 - * @param data2 計算対象の2番目のCOBOL変数。その変数のバイト列の先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数。 - * @return 0 - */ - public static int CBL_AND(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_AND(data1.getDataStorage(), data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数のバイト列。 - * @param data2 計算対象の2番目のCOBOL変数のバイト列。先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数 - * @return 0 - */ - public static int CBL_OR(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_OR", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return (byte) (b1 | b2); - } - }); - } - - /** - * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数のバイト列。 - * @param data2 計算対象の2番目のCOBOL変数。そのバイト列の先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数 - * @return 0 - */ - public static int CBL_OR(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_OR(data1.getDataStorage(), data2, length); - } - - /** - * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 計算対象の1番目のCOBOL変数のバイト列。 - * @param data2 計算対象の2番目のCOBOL変数。先頭lengthバイトに計算結果が格納される。 - * @param length 計算するバイト数 - * @return 0 - */ - public static int CBL_OR(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_OR(data1, data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_ORの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_OR(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_OR(data1.getDataStorage(), data2.getDataStorage(), length); - } - - private static int byte2Int(byte x) { - return x & 0xFF; - } - - private static byte int2Byte(int x) { - return (byte) (x & 0xFF); - } - - /** - * 組み込み関数CBL_NORの実装。1バイトごとに排他的論理和を取る。 先頭lengthバイトのデータについて論理否定を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOR(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_NOR", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return int2Byte(~(byte2Int(b1) | int2Byte(b2))); - } - }); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOR(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_NOR(data1.getDataStorage(), data2, length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOR(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_NOR(data1, data2.getDataStorage(), length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOR(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_NOR(data1.getDataStorage(), data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_XORの実装。1バイトごとに排他的論理和を取る。 先頭lengthバイトのデータについて排他的論理和を計算し、計算結果を2番目の引数の先頭に格納する。 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XOR(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_XOR", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return (byte) (b1 ^ b2); - } - }); - } - - /** - * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XOR(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_XOR(data1.getDataStorage(), data2, length); - } - - /** - * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XOR(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_XOR(data1, data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XOR(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_XOR(data1.getDataStorage(), data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_NIMPの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NIMP(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_NIMP", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return (byte) (b1 & (~b2)); - } - }); - } - - /** - * 組み込み関数CBL_NIMPの実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NIMP(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_NIMP(data1.getDataStorage(), data2, length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NIMP(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_NIMP(data1, data2.getDataStorage(), length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NIMP(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_NIMP(data1.getDataStorage(), data2.getDataStorage(), length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_EQ(CobolDataStorage data1, CobolDataStorage data2, int length) { - return CBL_COMMON_OPERATION( - "CBL_EQ", - data1, - data2, - length, - new Calculater() { - @Override - public byte calc(byte b1, byte b2) { - return (byte) ~(b1 ^ b2); - } - }); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_EQ(AbstractCobolField data1, CobolDataStorage data2, int length) { - return CBL_EQ(data1.getDataStorage(), data2, length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_EQ(CobolDataStorage data1, AbstractCobolField data2, int length) { - return CBL_EQ(data1, data2.getDataStorage(), length); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_EQ(AbstractCobolField data1, AbstractCobolField data2, int length) { - return CBL_EQ(data1.getDataStorage(), data2.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_NOTの実装。詳しい説明はTODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOT(CobolDataStorage data, int length) { - CobolUtil.COB_CHK_PARMS("CBL_NOT", 2); - if (length <= 0) { - return 0; - } - for (int n = 0; n < length; ++n) { - byte b = data.getByte(n); - data.setByte(n, (byte) ~b); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_NOT(AbstractCobolField data, int length) { - return CBL_NOT(data.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_XF4の実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF4(CobolDataStorage data1, CobolDataStorage data2) { - CobolUtil.COB_CHK_PARMS("CBL_XF4", 2); - for (int n = 0; n < 8; ++n) { - byte b1 = data1.getByte(n); - byte b2 = data2.getByte(n); - data1.setByte(n, (byte) (b1 | (b2 & 1) << (7 - n))); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF4(AbstractCobolField data1, CobolDataStorage data2) { - return CBL_XF4(data1.getDataStorage(), data2); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF4(CobolDataStorage data1, AbstractCobolField data2) { - return CBL_XF4(data1, data2.getDataStorage()); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF4(AbstractCobolField data1, AbstractCobolField data2) { - return CBL_XF4(data1.getDataStorage(), data2.getDataStorage()); - } - - /** - * 組み込み関数CBL_XF5の実装。詳しい説明はTODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF5(CobolDataStorage data1, CobolDataStorage data2) { - CobolUtil.COB_CHK_PARMS("CBL_XF5", 2); - byte b1 = data1.getByte(0); - for (int n = 0; n < 8; ++n) { - data2.setByte(n, (byte) ((b1 & (1 << (7 - n))) != 0 ? 1 : 0)); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF5(AbstractCobolField data1, CobolDataStorage data2) { - return CBL_XF5(data1.getDataStorage(), data2); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF5(CobolDataStorage data1, AbstractCobolField data2) { - return CBL_XF5(data1, data2.getDataStorage()); - } - - /** - * TODO: 準備中 - * - * @param data1 TODO: 準備中 - * @param data2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_XF5(AbstractCobolField data1, AbstractCobolField data2) { - return CBL_XF5(data1.getDataStorage(), data2.getDataStorage()); - } - - /** - * 組み込み関数CBL_X91の実装。詳しい説明はTODO: 準備中 - * - * @param result TODO: 準備中 - * @param func TODO: 準備中 - * @param parm TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_X91(CobolDataStorage result, CobolDataStorage func, CobolDataStorage parm) { - switch (func.getByte(0)) { - case 11: - for (int i = 0; i < 8; ++i) { - if (parm.getByte(i) == 0) { - CobolUtil.cobSwitch[i] = false; - } else if (parm.getByte(i) == 1) { - CobolUtil.cobSwitch[i] = true; - } - } - result.setByte(0, (byte) 0); - break; - case 12: - for (int i = 0; i < 8; ++i) { - parm.setByte(i, (byte) (CobolUtil.cobSwitch[i] ? 1 : 0)); - } - result.setByte(0, (byte) 0); - break; - case 16: - parm.setByte(0, (byte) CobolUtil.cobSaveCallParams); - result.setByte(0, (byte) 0); - break; - default: - result.setByte(0, (byte) 1); - break; - } - return 0; - } - - /** - * 組み込み関数CBL_TOLOWERの実装。詳しい説明はTODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_TOLOWER(CobolDataStorage data, int length) { - CobolUtil.COB_CHK_PARMS("CBL_TOLOWER", 2); - if (length <= 0) { - return 0; - } - - for (int n = 0; n < length; ++n) { - byte b = data.getByte(n); - byte[] bytes = {b}; - byte result = new String(bytes).toLowerCase().getBytes()[0]; - data.setByte(n, result); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_TOLOWER(AbstractCobolField data, int length) { - return CBL_TOLOWER(data.getDataStorage(), length); - } - - /** - * 組み込み関数CBL_TOUPPERの実装。詳しい説明はTODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_TOUPPER(CobolDataStorage data, int length) { - CobolUtil.COB_CHK_PARMS("CBL_TOUPPER", 2); - if (length <= 0) { - return 0; - } - - for (int n = 0; n < length; ++n) { - byte b = data.getByte(n); - byte[] bytes = {b}; - byte result = new String(bytes).toUpperCase().getBytes()[0]; - data.setByte(n, result); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_TOUPPER(AbstractCobolField data, int length) { - return CBL_TOUPPER(data.getDataStorage(), length); - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_OC_NANOSLEEP(CobolDataStorage data) { - CobolUtil.COB_CHK_PARMS("CBL_OC_NANOSLEEP", 1); - - AbstractCobolField param = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); - if (param != null) { - long nsecs = param.getLong(); - System.out.println(nsecs); - if (nsecs > 0) { - try { - TimeUnit.NANOSECONDS.sleep(nsecs); - } catch (InterruptedException e) { - } - } - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param field TODO: 準備中 - * @return TODO: 準備中 - */ - public static int CBL_OC_NANOSLEEP(AbstractCobolField field) { - CobolSystemRoutine.CBL_OC_NANOSLEEP(field.getDataStorage()); - return 0; - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @return TODO: 準備中 - */ - public static int calledBy(CobolDataStorage data) { - CobolUtil.COB_CHK_PARMS("calledby", 1); - return CobolModule.calledBy(data); - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @return TODO: 準備中 - */ - public static int listDir(CobolDataStorage... data) { - CobolUtil.COB_CHK_PARMS("listDirectory", 1); - List params = CobolModule.getCurrentModule().cob_procedure_parameters; - if (params == null) { - return -1; - } - int paramsSize = params.size(); - if (paramsSize < 1) { - return -1; - } - AbstractCobolField operationCodeFiled = params.get(0); - if (operationCodeFiled == null) { - return -1; - } - - int operationCode = params.get(0).getInt(); - switch (operationCode) { - case 1: // LISTDIR-OPEN(value:1) - if (paramsSize < 3) { - return -1; - } - return listDirOpen(params.get(1), params.get(2)); - case 2: // LISTDIR-OPEN(value:2) - if (paramsSize < 3) { - return -1; - } - return listDirNext(params.get(1), params.get(2)); - case 3: // LISTDIR-OPEN(value:3) - if (paramsSize < 2) { - return -1; - } - return lsitDirClose(params.get(1)); - default: - return -1; - } - } - - private static List dirList = null; - - private static int listDirOpen(AbstractCobolField dirPathField, AbstractCobolField patternField) { - // FIXME: now not use patternField. - String dirPath = strFromField(dirPathField); - try { - dirList = - Files.list(Paths.get(dirPath)).map(p -> p.getFileName()).collect(Collectors.toList()); - } catch (IOException e) { - return -1; - } - dirList.add(Paths.get(".")); - dirList.add(Paths.get("..")); - Collections.sort(dirList); - return 0; - } - - private static int listDirNext(AbstractCobolField handleField, AbstractCobolField fileNameField) { - // FIXME: now not use handleField. - if (dirList == null) { - return -1; - } - - CobolDataStorage storage = fileNameField.getDataStorage(); - int fieldSize = fileNameField.getSize(); - storage.memset(' ', fieldSize); - - if (dirList.isEmpty()) { - return -1; - } - - Path filePath = dirList.get(0); - dirList.remove(0); - byte[] filePathBytes = filePath.toString().getBytes(); - int filePathStringLength = filePathBytes.length; - int copySize = Math.min(fieldSize, filePathStringLength); - storage.memcpy(filePathBytes, copySize); - return 0; - } - - private static int lsitDirClose(AbstractCobolField handleField) { - // FIXME: now not use handleField - dirList = null; - return 0; - } - - private static String strFromField(AbstractCobolField field) { - if (field == null) { - return null; - } - - int i; - CobolDataStorage storage = field.getDataStorage(); - for (i = field.getSize() - 1; i >= 0; --i) { - byte b = storage.getByte(i); - if (b != ' ' && b != 0) { - break; - } - } - - StringBuilder sb = new StringBuilder(); - boolean quoteSwitch = false; - for (int n = 0; n <= i; ++n) { - byte b = storage.getByte(n); - if (b == '\'') { - quoteSwitch = !quoteSwitch; - continue; - } - if (quoteSwitch) { - sb.append((char) b); - continue; - } else if (b == ' ' || b == 0) { - break; - } else { - sb.append((char) b); - } - } - return sb.toString(); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.call; + +import java.io.IOException; +import java.lang.ProcessBuilder.Redirect; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** 組み込み関数を提供するクラス */ +public class CobolSystemRoutine { + private static final boolean runsOnWindows = "\\".equals(System.getProperty("file.separator")); + + /** + * 組み込み関数CBL_EXIT_PROCの実装。未実装。 + * + * @param x 未実装 + * @param pptr 未実装 + * @return 未実装 + */ + public static int CBL_EXIT_PROC(CobolDataStorage x, CobolDataStorage pptr) { + // TODO 実装 + return 0; + } + + /** + * 組み込み関数CBL_ERROR_PROCの実装。未実装。 + * + * @param x 未実装 + * @param pptr 未実装 + * @return 未実装 + */ + public static int CBL_ERROR_PROC(CobolDataStorage x, CobolDataStorage pptr) { + // TODO 実装 + return 0; + } + + /** + * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 + * + * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 + * @return コマンドの終了コード。 + * @throws CobolStopRunException TODO: 準備中 + * このメソッドは内部でCobolModule.getCurrentModule().cob_procedure_parametersを参照する。 + * このリストの形式に問題がある場合にスローされる。 + */ + public static int SYSTEM(CobolDataStorage cmd) throws CobolStopRunException { + int size = SYSTEM_getParameterSize(); + String cmdStr = new String(cmd.getByteArray(0, size)); + return SYSTEM_main(cmdStr); + } + + /** + * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 + * + * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 + * @return コマンドの終了コード。 + */ + public static int SYSTEM(String cmd) { + return SYSTEM_main(cmd); + } + + private static int SYSTEM_getParameterSize() throws CobolStopRunException { + CobolUtil.COB_CHK_PARMS("SYSTEM", 1); + List paramaters = + CobolModule.getCurrentModule().cob_procedure_parameters; + if (!paramaters.isEmpty() && paramaters.get(0) != null) { + AbstractCobolField paramater = paramaters.get(0); + int size = paramater.getSize(); + if (size <= 0) { + CobolUtil.runtimeError("The size of the paramater to SYSTEM call is less than 1"); + CobolStopRunException.stopRunAndThrow(1); + } + return size; + } else { + CobolUtil.runtimeError("The size of the paramater is not specified"); + CobolStopRunException.stopRunAndThrow(1); + // not reached + return -1; + } + } + + private static int SYSTEM_main(String cmd) { + ProcessBuilder pb; + if (runsOnWindows) { + pb = new ProcessBuilder("cmd", "/c", cmd); + } else { + pb = new ProcessBuilder("sh", "-c", cmd); + } + pb.redirectInput(Redirect.INHERIT) + .redirectOutput(Redirect.INHERIT) + .redirectError(Redirect.INHERIT); + try { + Process process = pb.start(); + return process.waitFor(); + } catch (InterruptedException | IOException e) { + e.printStackTrace(); + return 1; + } + } + + /** + * 組み込み関数SYSTEMの実装。cmdに指定されたコマンドを実行する。 + * + * @param cmd コマンド文字列。Linux/Unix環境であればシェルコマンド、Windows環境であればコマンドプロンプトのコマンド。 + * @return コマンドの終了コード。 + */ + public static int SYSTEM(AbstractCobolField cmd) { + return SYSTEM(cmd.getString()); + } + + private interface Calculater { + byte calc(byte b1, byte b2); + } + + private static int CBL_COMMON_OPERATION( + String funcName, + CobolDataStorage data1, + CobolDataStorage data2, + int length, + Calculater c) { + CobolUtil.COB_CHK_PARMS(funcName, 3); + if (length <= 0) { + return 0; + } + for (int n = 0; n < length; ++n) { + byte b1 = data1.getByte(n); + byte b2 = data2.getByte(n); + data2.setByte(n, c.calc(b1, b2)); + } + return 0; + } + + /** + * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数のバイト列。 + * @param data2 計算対象の2番目のCOBOL変数のバイト列。先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数。 + * @return 0 + */ + public static int CBL_AND(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_AND", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return (byte) (b1 & b2); + } + }); + } + + /** + * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数。 + * @param data2 計算対象の2番目の引数のバイト列。先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数。 + * @return 0 + */ + public static int CBL_AND(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_AND(data1.getDataStorage(), data2, length); + } + + /** + * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数のバイト列。 + * @param data2 計算対象の2番目のCOBOL変数のバイト列。その変数のバイト列の先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数。 + * @return 0 + */ + public static int CBL_AND(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_AND(data1, data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_ANDの実装。1バイトごとに論理積を取る。 先頭lengthバイトのデータについて論理積を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数。 + * @param data2 計算対象の2番目のCOBOL変数。その変数のバイト列の先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数。 + * @return 0 + */ + public static int CBL_AND(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_AND(data1.getDataStorage(), data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数のバイト列。 + * @param data2 計算対象の2番目のCOBOL変数のバイト列。先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数 + * @return 0 + */ + public static int CBL_OR(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_OR", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return (byte) (b1 | b2); + } + }); + } + + /** + * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数のバイト列。 + * @param data2 計算対象の2番目のCOBOL変数。そのバイト列の先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数 + * @return 0 + */ + public static int CBL_OR(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_OR(data1.getDataStorage(), data2, length); + } + + /** + * 組み込み関数CBL_ORの実装。1バイトごとに論理和を取る。 先頭lengthバイトのデータについて論理和を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 計算対象の1番目のCOBOL変数のバイト列。 + * @param data2 計算対象の2番目のCOBOL変数。先頭lengthバイトに計算結果が格納される。 + * @param length 計算するバイト数 + * @return 0 + */ + public static int CBL_OR(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_OR(data1, data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_ORの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_OR(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_OR(data1.getDataStorage(), data2.getDataStorage(), length); + } + + private static int byte2Int(byte x) { + return x & 0xFF; + } + + private static byte int2Byte(int x) { + return (byte) (x & 0xFF); + } + + /** + * 組み込み関数CBL_NORの実装。1バイトごとに排他的論理和を取る。 先頭lengthバイトのデータについて論理否定を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOR(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_NOR", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return int2Byte(~(byte2Int(b1) | int2Byte(b2))); + } + }); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOR(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_NOR(data1.getDataStorage(), data2, length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOR(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_NOR(data1, data2.getDataStorage(), length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOR(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_NOR(data1.getDataStorage(), data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_XORの実装。1バイトごとに排他的論理和を取る。 先頭lengthバイトのデータについて排他的論理和を計算し、計算結果を2番目の引数の先頭に格納する。 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XOR(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_XOR", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return (byte) (b1 ^ b2); + } + }); + } + + /** + * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XOR(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_XOR(data1.getDataStorage(), data2, length); + } + + /** + * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XOR(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_XOR(data1, data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_XORの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XOR(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_XOR(data1.getDataStorage(), data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_NIMPの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NIMP(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_NIMP", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return (byte) (b1 & (~b2)); + } + }); + } + + /** + * 組み込み関数CBL_NIMPの実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NIMP(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_NIMP(data1.getDataStorage(), data2, length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NIMP(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_NIMP(data1, data2.getDataStorage(), length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NIMP(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_NIMP(data1.getDataStorage(), data2.getDataStorage(), length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_EQ(CobolDataStorage data1, CobolDataStorage data2, int length) { + return CBL_COMMON_OPERATION( + "CBL_EQ", + data1, + data2, + length, + new Calculater() { + @Override + public byte calc(byte b1, byte b2) { + return (byte) ~(b1 ^ b2); + } + }); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_EQ(AbstractCobolField data1, CobolDataStorage data2, int length) { + return CBL_EQ(data1.getDataStorage(), data2, length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_EQ(CobolDataStorage data1, AbstractCobolField data2, int length) { + return CBL_EQ(data1, data2.getDataStorage(), length); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_EQ(AbstractCobolField data1, AbstractCobolField data2, int length) { + return CBL_EQ(data1.getDataStorage(), data2.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_NOTの実装。詳しい説明はTODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOT(CobolDataStorage data, int length) { + CobolUtil.COB_CHK_PARMS("CBL_NOT", 2); + if (length <= 0) { + return 0; + } + for (int n = 0; n < length; ++n) { + byte b = data.getByte(n); + data.setByte(n, (byte) ~b); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_NOT(AbstractCobolField data, int length) { + return CBL_NOT(data.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_XF4の実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF4(CobolDataStorage data1, CobolDataStorage data2) { + CobolUtil.COB_CHK_PARMS("CBL_XF4", 2); + for (int n = 0; n < 8; ++n) { + byte b1 = data1.getByte(n); + byte b2 = data2.getByte(n); + data1.setByte(n, (byte) (b1 | (b2 & 1) << (7 - n))); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF4(AbstractCobolField data1, CobolDataStorage data2) { + return CBL_XF4(data1.getDataStorage(), data2); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF4(CobolDataStorage data1, AbstractCobolField data2) { + return CBL_XF4(data1, data2.getDataStorage()); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF4(AbstractCobolField data1, AbstractCobolField data2) { + return CBL_XF4(data1.getDataStorage(), data2.getDataStorage()); + } + + /** + * 組み込み関数CBL_XF5の実装。詳しい説明はTODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF5(CobolDataStorage data1, CobolDataStorage data2) { + CobolUtil.COB_CHK_PARMS("CBL_XF5", 2); + byte b1 = data1.getByte(0); + for (int n = 0; n < 8; ++n) { + data2.setByte(n, (byte) ((b1 & (1 << (7 - n))) != 0 ? 1 : 0)); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF5(AbstractCobolField data1, CobolDataStorage data2) { + return CBL_XF5(data1.getDataStorage(), data2); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF5(CobolDataStorage data1, AbstractCobolField data2) { + return CBL_XF5(data1, data2.getDataStorage()); + } + + /** + * TODO: 準備中 + * + * @param data1 TODO: 準備中 + * @param data2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_XF5(AbstractCobolField data1, AbstractCobolField data2) { + return CBL_XF5(data1.getDataStorage(), data2.getDataStorage()); + } + + /** + * 組み込み関数CBL_X91の実装。詳しい説明はTODO: 準備中 + * + * @param result TODO: 準備中 + * @param func TODO: 準備中 + * @param parm TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_X91( + CobolDataStorage result, CobolDataStorage func, CobolDataStorage parm) { + switch (func.getByte(0)) { + case 11: + for (int i = 0; i < 8; ++i) { + if (parm.getByte(i) == 0) { + CobolUtil.cobSwitch[i] = false; + } else if (parm.getByte(i) == 1) { + CobolUtil.cobSwitch[i] = true; + } + } + result.setByte(0, (byte) 0); + break; + case 12: + for (int i = 0; i < 8; ++i) { + parm.setByte(i, (byte) (CobolUtil.cobSwitch[i] ? 1 : 0)); + } + result.setByte(0, (byte) 0); + break; + case 16: + parm.setByte(0, (byte) CobolUtil.cobSaveCallParams); + result.setByte(0, (byte) 0); + break; + default: + result.setByte(0, (byte) 1); + break; + } + return 0; + } + + /** + * 組み込み関数CBL_TOLOWERの実装。詳しい説明はTODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_TOLOWER(CobolDataStorage data, int length) { + CobolUtil.COB_CHK_PARMS("CBL_TOLOWER", 2); + if (length <= 0) { + return 0; + } + + for (int n = 0; n < length; ++n) { + byte b = data.getByte(n); + byte[] bytes = {b}; + byte result = new String(bytes).toLowerCase().getBytes()[0]; + data.setByte(n, result); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_TOLOWER(AbstractCobolField data, int length) { + return CBL_TOLOWER(data.getDataStorage(), length); + } + + /** + * 組み込み関数CBL_TOUPPERの実装。詳しい説明はTODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_TOUPPER(CobolDataStorage data, int length) { + CobolUtil.COB_CHK_PARMS("CBL_TOUPPER", 2); + if (length <= 0) { + return 0; + } + + for (int n = 0; n < length; ++n) { + byte b = data.getByte(n); + byte[] bytes = {b}; + byte result = new String(bytes).toUpperCase().getBytes()[0]; + data.setByte(n, result); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_TOUPPER(AbstractCobolField data, int length) { + return CBL_TOUPPER(data.getDataStorage(), length); + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_OC_NANOSLEEP(CobolDataStorage data) { + CobolUtil.COB_CHK_PARMS("CBL_OC_NANOSLEEP", 1); + + AbstractCobolField param = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); + if (param != null) { + long nsecs = param.getLong(); + System.out.println(nsecs); + if (nsecs > 0) { + try { + TimeUnit.NANOSECONDS.sleep(nsecs); + } catch (InterruptedException e) { + } + } + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param field TODO: 準備中 + * @return TODO: 準備中 + */ + public static int CBL_OC_NANOSLEEP(AbstractCobolField field) { + CobolSystemRoutine.CBL_OC_NANOSLEEP(field.getDataStorage()); + return 0; + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @return TODO: 準備中 + */ + public static int calledBy(CobolDataStorage data) { + CobolUtil.COB_CHK_PARMS("calledby", 1); + return CobolModule.calledBy(data); + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @return TODO: 準備中 + */ + public static int listDir(CobolDataStorage... data) { + CobolUtil.COB_CHK_PARMS("listDirectory", 1); + List params = CobolModule.getCurrentModule().cob_procedure_parameters; + if (params == null) { + return -1; + } + int paramsSize = params.size(); + if (paramsSize < 1) { + return -1; + } + AbstractCobolField operationCodeFiled = params.get(0); + if (operationCodeFiled == null) { + return -1; + } + + int operationCode = params.get(0).getInt(); + switch (operationCode) { + case 1: // LISTDIR-OPEN(value:1) + if (paramsSize < 3) { + return -1; + } + return listDirOpen(params.get(1), params.get(2)); + case 2: // LISTDIR-OPEN(value:2) + if (paramsSize < 3) { + return -1; + } + return listDirNext(params.get(1), params.get(2)); + case 3: // LISTDIR-OPEN(value:3) + if (paramsSize < 2) { + return -1; + } + return lsitDirClose(params.get(1)); + default: + return -1; + } + } + + private static List dirList = null; + + private static int listDirOpen( + AbstractCobolField dirPathField, AbstractCobolField patternField) { + // FIXME: now not use patternField. + String dirPath = strFromField(dirPathField); + try { + dirList = + Files.list(Paths.get(dirPath)) + .map(p -> p.getFileName()) + .collect(Collectors.toList()); + } catch (IOException e) { + return -1; + } + dirList.add(Paths.get(".")); + dirList.add(Paths.get("..")); + Collections.sort(dirList); + return 0; + } + + private static int listDirNext( + AbstractCobolField handleField, AbstractCobolField fileNameField) { + // FIXME: now not use handleField. + if (dirList == null) { + return -1; + } + + CobolDataStorage storage = fileNameField.getDataStorage(); + int fieldSize = fileNameField.getSize(); + storage.memset(' ', fieldSize); + + if (dirList.isEmpty()) { + return -1; + } + + Path filePath = dirList.get(0); + dirList.remove(0); + byte[] filePathBytes = filePath.toString().getBytes(); + int filePathStringLength = filePathBytes.length; + int copySize = Math.min(fieldSize, filePathStringLength); + storage.memcpy(filePathBytes, copySize); + return 0; + } + + private static int lsitDirClose(AbstractCobolField handleField) { + // FIXME: now not use handleField + dirList = null; + return 0; + } + + private static String strFromField(AbstractCobolField field) { + if (field == null) { + return null; + } + + int i; + CobolDataStorage storage = field.getDataStorage(); + for (i = field.getSize() - 1; i >= 0; --i) { + byte b = storage.getByte(i); + if (b != ' ' && b != 0) { + break; + } + } + + StringBuilder sb = new StringBuilder(); + boolean quoteSwitch = false; + for (int n = 0; n <= i; ++n) { + byte b = storage.getByte(n); + if (b == '\'') { + quoteSwitch = !quoteSwitch; + continue; + } + if (quoteSwitch) { + sb.append((char) b); + continue; + } else if (b == ' ' || b == 0) { + break; + } else { + sb.append((char) b); + } + } + return sb.toString(); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCallParams.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCallParams.java index 3dd5479d..b7cd159f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCallParams.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCallParams.java @@ -1,25 +1,25 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -/** TODO: 準備中 */ -public class CobolCallParams { - /** TODO: 準備中 */ - public static int callParams = 0; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +/** TODO: 準備中 */ +public class CobolCallParams { + /** TODO: 準備中 */ + public static int callParams = 0; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCheck.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCheck.java index d62d38e7..717594c9 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCheck.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolCheck.java @@ -1,110 +1,111 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public class CobolCheck { - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - * @param min TODO: 準備中 - * @param max TODO: 準備中 - * @param name TODO: 準備中 - * @param len TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void checkSubscript(int i, int min, int max, byte[] name, int len) - throws CobolStopRunException { - if (i < min || max < i) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_SUBSCRIPT); - CobolUtil.runtimeError( - String.format( - "Subscript of '%s' out of bounds: %d", - new String(name, AbstractCobolField.charSetSJIS), i)); - CobolStopRunException.stopRunAndThrow(1); - } - } - - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - * @param min TODO: 準備中 - * @param max TODO: 準備中 - * @param name TODO: 準備中 - * @param len TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void checkSubscript(long i, int min, int max, byte[] name, int len) - throws CobolStopRunException { - CobolCheck.checkSubscript((int) i, min, max, name, len); - } - - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - * @param min TODO: 準備中 - * @param max TODO: 準備中 - * @param name TODO: 準備中 - * @param len TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void checkSubscript(long i, int min, int max, CobolDataStorage name, int len) - throws CobolStopRunException { - CobolCheck.checkSubscript((int) i, min, max, name.getByteArrayRef(0, len), len); - } - - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - * @param min TODO: 準備中 - * @param max TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void checkOdo(int i, int min, int max, String name) throws CobolStopRunException { - if (i < min || max < i) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_SUBSCRIPT); - CobolUtil.runtimeError(String.format("OCCURS DEPENDING ON '%s' out of bounds: %d", name, i)); - CobolStopRunException.stopRunAndThrow(1); - } - } - - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - * @param min TODO: 準備中 - * @param max TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void checkOdo(int i, int min, int max, byte[] name) throws CobolStopRunException { - CobolCheck.checkOdo(i, min, max, new String(name, AbstractCobolField.charSetSJIS)); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public class CobolCheck { + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + * @param min TODO: 準備中 + * @param max TODO: 準備中 + * @param name TODO: 準備中 + * @param len TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void checkSubscript(int i, int min, int max, byte[] name, int len) + throws CobolStopRunException { + if (i < min || max < i) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_SUBSCRIPT); + CobolUtil.runtimeError( + String.format( + "Subscript of '%s' out of bounds: %d", + new String(name, AbstractCobolField.charSetSJIS), i)); + CobolStopRunException.stopRunAndThrow(1); + } + } + + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + * @param min TODO: 準備中 + * @param max TODO: 準備中 + * @param name TODO: 準備中 + * @param len TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void checkSubscript(long i, int min, int max, byte[] name, int len) + throws CobolStopRunException { + CobolCheck.checkSubscript((int) i, min, max, name, len); + } + + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + * @param min TODO: 準備中 + * @param max TODO: 準備中 + * @param name TODO: 準備中 + * @param len TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void checkSubscript(long i, int min, int max, CobolDataStorage name, int len) + throws CobolStopRunException { + CobolCheck.checkSubscript((int) i, min, max, name.getByteArrayRef(0, len), len); + } + + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + * @param min TODO: 準備中 + * @param max TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void checkOdo(int i, int min, int max, String name) throws CobolStopRunException { + if (i < min || max < i) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_SUBSCRIPT); + CobolUtil.runtimeError( + String.format("OCCURS DEPENDING ON '%s' out of bounds: %d", name, i)); + CobolStopRunException.stopRunAndThrow(1); + } + } + + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + * @param min TODO: 準備中 + * @param max TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void checkOdo(int i, int min, int max, byte[] name) throws CobolStopRunException { + CobolCheck.checkOdo(i, min, max, new String(name, AbstractCobolField.charSetSJIS)); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolConstant.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolConstant.java index 604a7cc9..46828424 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolConstant.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolConstant.java @@ -1,156 +1,190 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; - -/** TODO: 準備中 */ -public class CobolConstant { - /** TODO: 準備中 */ - public static final CobolFieldAttribute allAttr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL, 0, 0, 0, null); - /** TODO: 準備中 */ - public static final CobolFieldAttribute oneAttr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC, 1, 0, 0, null); - - /** TODO: 準備中 */ - public static final byte[] SJZERO = {(byte) 0x82, (byte) 0x4f}; - /** TODO: 準備中 */ - public static final byte[] SJSPC = {(byte) 0x81, (byte) 0x40}; - /** TODO: 準備中 */ - public static final byte[] SJBLK = {(byte) 0x81, (byte) 0x40}; - /** TODO: 準備中 */ - public static final byte[] SJQUOT = {(byte) 0x81, (byte) 0x68}; - /** TODO: 準備中 */ - public static final byte[] SJSLAS = {(byte) 0x81, (byte) 0x5e}; - /** TODO: 準備中 */ - public static final int SJCSIZ = 2; - - /** TODO: 準備中 */ - public static final byte[] ZENZERO = SJZERO; - /** TODO: 準備中 */ - public static final byte[] ZENSPC = SJSPC; - /** TODO: 準備中 */ - public static final byte[] ZENBLK = SJBLK; - /** TODO: 準備中 */ - public static final byte[] ZENQUOT = SJQUOT; - /** TODO: 準備中 */ - public static final byte[] ZENSLAS = SJSLAS; - /** TODO: 準備中 */ - public static final int ZENCSIZ = SJCSIZ; - - /** TODO: 準備中 */ - public static final AbstractCobolField zero = CobolFieldFactory.makeCobolField(1, "0", allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField space = CobolFieldFactory.makeCobolField(1, " ", allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField blank = CobolFieldFactory.makeCobolField(1, " ", allAttr); - - /** TODO: 準備中 */ - public static final AbstractCobolField high = - CobolFieldFactory.makeCobolField(1, CobolConstant.get0xFFStorage(), allAttr); - - /** TODO: 準備中 */ - public static final AbstractCobolField low = CobolFieldFactory.makeCobolField(1, "\0", allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField quote = CobolFieldFactory.makeCobolField(1, "\"", allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField one = CobolFieldFactory.makeCobolField(1, "1", oneAttr); - - /** TODO: 準備中 */ - public static final AbstractCobolField zenZero = - CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENZERO), allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField zenSpace = - CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENSPC), allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField zenBlank = - CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENBLK), allAttr); - /** TODO: 準備中 */ - public static final AbstractCobolField zenQuote = - CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENQUOT), allAttr); - - private static CobolDataStorage get0xFFStorage() { - byte[] bytes = new byte[1]; - bytes[0] = (byte) 0xff; - return new CobolDataStorage(bytes); - } - - /** TODO: 準備中 */ - public static final long[] exp10LL = { - 1L, - 10L, - 100L, - 1000L, - 10000L, - 100000L, - 1000000L, - 10000000L, - 100000000L, - 1000000000L, - 10000000000L, - 100000000000L, - 1000000000000L, - 10000000000000L, - 100000000000000L, - 1000000000000000L, - 10000000000000000L, - 100000000000000000L, - 1000000000000000000L - }; - - /** TODO: 準備中 */ - static final int COB_MINI_BUFF = 256; - /** TODO: 準備中 */ - static final int COB_SMALL_BUFF = 1024; - /** TODO: 準備中 */ - static final int COB_NORMAL_BUFF = 2048; - /** TODO: 準備中 */ - static final int COB_MEDIUM_BUFF = 8192; - /** TODO: 準備中 */ - static final int COB_LARGE_BUFF = 16384; - - /** TODO: 準備中 */ - static final int COB_MINI_MAX = COB_MINI_BUFF - 1; - /** TODO: 準備中 */ - static final int COB_SMALL_MAX = COB_SMALL_BUFF - 1; - /** TODO: 準備中 */ - static final int COB_NORMAL_MAX = COB_NORMAL_BUFF - 1; - /** TODO: 準備中 */ - static final int COB_MEDIUM_MAX = COB_MEDIUM_BUFF - 1; - /** TODO: 準備中 */ - static final int COB_LARGE_MAX = COB_LARGE_BUFF - 1; - - /** TODO: 準備中 */ - static final int COB_MAX_FIELD_PARAMS = 64; - /** TODO: 準備中 */ - static final int COB_FERROR_INITIALIZED = 0; - /** TODO: 準備中 */ - static final String COB_SOURCE_FILE = null; - /** TODO: 準備中 */ - static final int COB_PACKAGE_VERSION = 0; - /** TODO: 準備中 */ - static final int COB_PATCH_LEVEL = 0; - // TODO 標準パスの設定 - /** TODO: 準備中 */ - public static final String COB_LIBRARY_PATH = ""; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; + +/** TODO: 準備中 */ +public class CobolConstant { + /** TODO: 準備中 */ + public static final CobolFieldAttribute allAttr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL, 0, 0, 0, null); + + /** TODO: 準備中 */ + public static final CobolFieldAttribute oneAttr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC, 1, 0, 0, null); + + /** TODO: 準備中 */ + public static final byte[] SJZERO = {(byte) 0x82, (byte) 0x4f}; + + /** TODO: 準備中 */ + public static final byte[] SJSPC = {(byte) 0x81, (byte) 0x40}; + + /** TODO: 準備中 */ + public static final byte[] SJBLK = {(byte) 0x81, (byte) 0x40}; + + /** TODO: 準備中 */ + public static final byte[] SJQUOT = {(byte) 0x81, (byte) 0x68}; + + /** TODO: 準備中 */ + public static final byte[] SJSLAS = {(byte) 0x81, (byte) 0x5e}; + + /** TODO: 準備中 */ + public static final int SJCSIZ = 2; + + /** TODO: 準備中 */ + public static final byte[] ZENZERO = SJZERO; + + /** TODO: 準備中 */ + public static final byte[] ZENSPC = SJSPC; + + /** TODO: 準備中 */ + public static final byte[] ZENBLK = SJBLK; + + /** TODO: 準備中 */ + public static final byte[] ZENQUOT = SJQUOT; + + /** TODO: 準備中 */ + public static final byte[] ZENSLAS = SJSLAS; + + /** TODO: 準備中 */ + public static final int ZENCSIZ = SJCSIZ; + + /** TODO: 準備中 */ + public static final AbstractCobolField zero = CobolFieldFactory.makeCobolField(1, "0", allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField space = + CobolFieldFactory.makeCobolField(1, " ", allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField blank = + CobolFieldFactory.makeCobolField(1, " ", allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField high = + CobolFieldFactory.makeCobolField(1, CobolConstant.get0xFFStorage(), allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField low = CobolFieldFactory.makeCobolField(1, "\0", allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField quote = + CobolFieldFactory.makeCobolField(1, "\"", allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField one = CobolFieldFactory.makeCobolField(1, "1", oneAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField zenZero = + CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENZERO), allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField zenSpace = + CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENSPC), allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField zenBlank = + CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENBLK), allAttr); + + /** TODO: 準備中 */ + public static final AbstractCobolField zenQuote = + CobolFieldFactory.makeCobolField(ZENCSIZ, new CobolDataStorage(ZENQUOT), allAttr); + + private static CobolDataStorage get0xFFStorage() { + byte[] bytes = new byte[1]; + bytes[0] = (byte) 0xff; + return new CobolDataStorage(bytes); + } + + /** TODO: 準備中 */ + public static final long[] exp10LL = { + 1L, + 10L, + 100L, + 1000L, + 10000L, + 100000L, + 1000000L, + 10000000L, + 100000000L, + 1000000000L, + 10000000000L, + 100000000000L, + 1000000000000L, + 10000000000000L, + 100000000000000L, + 1000000000000000L, + 10000000000000000L, + 100000000000000000L, + 1000000000000000000L + }; + + /** TODO: 準備中 */ + static final int COB_MINI_BUFF = 256; + + /** TODO: 準備中 */ + static final int COB_SMALL_BUFF = 1024; + + /** TODO: 準備中 */ + static final int COB_NORMAL_BUFF = 2048; + + /** TODO: 準備中 */ + static final int COB_MEDIUM_BUFF = 8192; + + /** TODO: 準備中 */ + static final int COB_LARGE_BUFF = 16384; + + /** TODO: 準備中 */ + static final int COB_MINI_MAX = COB_MINI_BUFF - 1; + + /** TODO: 準備中 */ + static final int COB_SMALL_MAX = COB_SMALL_BUFF - 1; + + /** TODO: 準備中 */ + static final int COB_NORMAL_MAX = COB_NORMAL_BUFF - 1; + + /** TODO: 準備中 */ + static final int COB_MEDIUM_MAX = COB_MEDIUM_BUFF - 1; + + /** TODO: 準備中 */ + static final int COB_LARGE_MAX = COB_LARGE_BUFF - 1; + + /** TODO: 準備中 */ + static final int COB_MAX_FIELD_PARAMS = 64; + + /** TODO: 準備中 */ + static final int COB_FERROR_INITIALIZED = 0; + + /** TODO: 準備中 */ + static final String COB_SOURCE_FILE = null; + + /** TODO: 準備中 */ + static final int COB_PACKAGE_VERSION = 0; + + /** TODO: 準備中 */ + static final int COB_PATCH_LEVEL = 0; + + // TODO 標準パスの設定 + /** TODO: 準備中 */ + public static final String COB_LIBRARY_PATH = ""; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolControl.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolControl.java index a222e4b8..bfd06754 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolControl.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolControl.java @@ -25,119 +25,120 @@ /** TODO: 準備中 */ public abstract class CobolControl { - /** TODO: 準備中 */ - public enum LabelType { /** TODO: 準備中 */ - label, - /** TODO: 準備中 */ - section, - } + public enum LabelType { + /** TODO: 準備中 */ + label, + /** TODO: 準備中 */ + section, + } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - * @throws CobolRuntimeException TODO: 準備中 - * @throws CobolGoBackException TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public abstract Optional run() - throws CobolRuntimeException, CobolGoBackException, CobolStopRunException; + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + * @throws CobolRuntimeException TODO: 準備中 + * @throws CobolGoBackException TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public abstract Optional run() + throws CobolRuntimeException, CobolGoBackException, CobolStopRunException; - /** TODO: 準備中 */ - public int contId = -1; - /** TODO: 準備中 */ - public LabelType type = LabelType.label; + /** TODO: 準備中 */ + public int contId = -1; - /** TODO: 準備中 */ - public CobolControl() { - this.contId = -1; - this.type = LabelType.label; - } + /** TODO: 準備中 */ + public LabelType type = LabelType.label; + + /** TODO: 準備中 */ + public CobolControl() { + this.contId = -1; + this.type = LabelType.label; + } - /** - * TODO: 準備中 - * - * @param contId TODO: 準備中 - * @param type TODO: 準備中 - */ - public CobolControl(int contId, LabelType type) { - this.contId = contId; - this.type = type; - } + /** + * TODO: 準備中 + * + * @param contId TODO: 準備中 + * @param type TODO: 準備中 + */ + public CobolControl(int contId, LabelType type) { + this.contId = contId; + this.type = type; + } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static CobolControl pure() { - return new CobolControl() { - @Override - public Optional run() - throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { - return Optional.empty(); - } - }; - } + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static CobolControl pure() { + return new CobolControl() { + @Override + public Optional run() + throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { + return Optional.empty(); + } + }; + } - /** - * TODO: 準備中 - * - * @param cont TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolControl goTo(CobolControl cont) { - return new CobolControl() { - @Override - public Optional run() - throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { - return cont.run(); - } - }; - } + /** + * TODO: 準備中 + * + * @param cont TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolControl goTo(CobolControl cont) { + return new CobolControl() { + @Override + public Optional run() + throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { + return cont.run(); + } + }; + } - /** - * TODO: 準備中 - * - * @param contList TODO: 準備中 - * @param begin TODO: 準備中 - * @param end TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolControl performThrough(CobolControl[] contList, int begin, int end) { - return new CobolControl() { - @Override - public Optional run() - throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { - Optional nextCont = Optional.of(contList[begin]); - LabelType endType = contList[end].type; - int executedProgramId; - do { - CobolControl cont = nextCont.get(); - executedProgramId = cont.contId; - nextCont = cont.run(); - } while (nextCont.isPresent() && executedProgramId != end); + /** + * TODO: 準備中 + * + * @param contList TODO: 準備中 + * @param begin TODO: 準備中 + * @param end TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolControl performThrough(CobolControl[] contList, int begin, int end) { + return new CobolControl() { + @Override + public Optional run() + throws CobolRuntimeException, CobolGoBackException, CobolStopRunException { + Optional nextCont = Optional.of(contList[begin]); + LabelType endType = contList[end].type; + int executedProgramId; + do { + CobolControl cont = nextCont.get(); + executedProgramId = cont.contId; + nextCont = cont.run(); + } while (nextCont.isPresent() && executedProgramId != end); - if (endType == LabelType.section) { - while (nextCont.isPresent() && nextCont.get().type == LabelType.label) { - CobolControl cont = nextCont.get(); - nextCont = cont.run(); - } - } - return Optional.of(CobolControl.pure()); - } - }; - } + if (endType == LabelType.section) { + while (nextCont.isPresent() && nextCont.get().type == LabelType.label) { + CobolControl cont = nextCont.get(); + nextCont = cont.run(); + } + } + return Optional.of(CobolControl.pure()); + } + }; + } - /** - * TODO: 準備中 - * - * @param contList TODO: 準備中 - * @param labelId TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolControl perform(CobolControl[] contList, int labelId) { - return CobolControl.performThrough(contList, labelId, labelId); - } + /** + * TODO: 準備中 + * + * @param contList TODO: 準備中 + * @param labelId TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolControl perform(CobolControl[] contList, int labelId) { + return CobolControl.performThrough(contList, labelId, labelId); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolExternal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolExternal.java index c7803529..38829c84 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolExternal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolExternal.java @@ -1,77 +1,77 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import java.util.AbstractMap; -import java.util.HashMap; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.file.CobolFile; - -/** TODO: 準備中 */ -public final class CobolExternal { - - private CobolFile extAllocFile; - private CobolDataStorage extAllocStorage; - - private static AbstractMap externalMap = - new HashMap(); - - private CobolExternal(CobolFile file) { - this.extAllocFile = file; - } - - private CobolExternal(CobolDataStorage storage, int size) { - this.extAllocStorage = storage; - } - - /** - * TODO: 準備中 - * - * @param name TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolFile getFileAddress(String name) { - if (externalMap.containsKey(name)) { - return externalMap.get(name).extAllocFile; - } else { - CobolFile ret = new CobolFile(); - CobolExternal ext = new CobolExternal(ret); - externalMap.put(name, ext); - return ret; - } - } - - /** - * TODO: 準備中 - * - * @param name TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolDataStorage getStorageAddress(String name, int size) { - if (externalMap.containsKey(name)) { - return externalMap.get(name).extAllocStorage; - } else { - CobolDataStorage ret = new CobolDataStorage(size); - CobolExternal ext = new CobolExternal(ret, size); - externalMap.put(name, ext); - return ret; - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import java.util.AbstractMap; +import java.util.HashMap; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.file.CobolFile; + +/** TODO: 準備中 */ +public final class CobolExternal { + + private CobolFile extAllocFile; + private CobolDataStorage extAllocStorage; + + private static AbstractMap externalMap = + new HashMap(); + + private CobolExternal(CobolFile file) { + this.extAllocFile = file; + } + + private CobolExternal(CobolDataStorage storage, int size) { + this.extAllocStorage = storage; + } + + /** + * TODO: 準備中 + * + * @param name TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolFile getFileAddress(String name) { + if (externalMap.containsKey(name)) { + return externalMap.get(name).extAllocFile; + } else { + CobolFile ret = new CobolFile(); + CobolExternal ext = new CobolExternal(ret); + externalMap.put(name, ext); + return ret; + } + } + + /** + * TODO: 準備中 + * + * @param name TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolDataStorage getStorageAddress(String name, int size) { + if (externalMap.containsKey(name)) { + return externalMap.get(name).extAllocStorage; + } else { + CobolDataStorage ret = new CobolDataStorage(size); + CobolExternal ext = new CobolExternal(ret, size); + externalMap.put(name, ext); + return ret; + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java index 2f44a492..83f772c0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java @@ -1,411 +1,416 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public class CobolInspect { - private static final int INSPECT_ALL = 0; - private static final int INSPECT_LEADING = 1; - private static final int INSPECT_FIRST = 2; - private static final int INSPECT_TRAILING = 3; - - private static AbstractCobolField inspectVar; - private static CobolDataStorage inspectData; - private static int inspectStart; - private static int inspectEnd; - private static int[] inspectMark = null; - private static int lastsize = 0; - private static int inspectSize; - private static int inspectReplacing; - private static int inspectSign; - private static AbstractCobolField inspectVarCopy; - - private static AbstractCobolField figurative(AbstractCobolField f1, AbstractCobolField f2) { - int size1 = 0; - int size2 = f2.getSize(); - byte[] figptr = new byte[size2]; - int s = 0; - for (int n = 0; n < size2; n++, s++) { - figptr[s] = f1.getDataStorage().getByte(size1); - size1++; - if (size1 >= f1.getSize()) { - size1 = 0; - } - } - return CobolFieldFactory.makeCobolField( - size2, - new CobolDataStorage(figptr), - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); - } - - private static void common(AbstractCobolField f1, AbstractCobolField f2, int type) - throws CobolStopRunException { - if (f1 == null) { - f1 = CobolConstant.low; - } - if (f2 == null) { - f2 = CobolConstant.low; - } - - int type1 = f1.getAttribute().getType(); - int type2 = f2.getAttribute().getType(); - - if (type2 == CobolFieldAttribute.COB_TYPE_NATIONAL - || type2 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { - if (f1 == CobolConstant.quote) { - f1 = CobolConstant.zenQuote; - } else if (f1 == CobolConstant.space) { - f1 = CobolConstant.zenSpace; - } else if (f1 == CobolConstant.zero) { - f1 = CobolConstant.zenZero; - } - } - if (type1 == CobolFieldAttribute.COB_TYPE_NATIONAL - || type1 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { - if (f2 == CobolConstant.quote) { - f2 = CobolConstant.zenQuote; - } else if (f2 == CobolConstant.space) { - f2 = CobolConstant.zenSpace; - } else if (f2 == CobolConstant.zero) { - f2 = CobolConstant.zenZero; - } - } - if (inspectReplacing != 0 && f1.getSize() != f2.getSize()) { - if (type1 == CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL) { - f1 = figurative(f1, f2); - } else { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_RANGE_INSPECT_SIZE); - return; - } - } - - int mark = inspectStart; - int len = inspectEnd - inspectStart; - int n = 0; - if (type == INSPECT_TRAILING) { - for (int i = len - f2.getSize(); i >= 0; i--) { - if (inspectData.memcmp(inspectStart + i, f2.getDataStorage(), f2.getSize()) == 0) { - int j; - for (j = 0; j < f2.getSize(); ++j) { - if (inspectMark[mark + i + j] != -1) { - break; - } - } - if (j == f2.getSize()) { - CobolDataStorage f1Storage = f1.getDataStorage(); - for (j = 0; j < f2.getSize(); ++j) { - inspectMark[mark + i + j] = inspectReplacing != 0 ? f1Storage.getByte(j) : 1; - } - i -= f2.getSize() - 1; - n++; - } - } else { - break; - } - } - } else { - for (int i = 0; i < (len - f2.getSize() + 1); ++i) { - if (inspectData.memcmp(inspectStart + i, f2.getDataStorage(), f2.getSize()) == 0) { - int j; - for (j = 0; j < f2.getSize(); ++j) { - if (inspectMark[mark + i + j] != -1) { - break; - } - } - if (j == f2.getSize()) { - CobolDataStorage f1Storage = f1.getDataStorage(); - for (j = 0; j < f2.getSize(); ++j) { - inspectMark[mark + i + j] = inspectReplacing != 0 ? f1Storage.getByte(j) : 1; - } - i += f2.getSize() - 1; - n++; - if (type == INSPECT_FIRST) { - break; - } - } - } else if (type == INSPECT_LEADING) { - break; - } - } - } - - if (n > 0 && inspectReplacing == 0) { - f1.addInt(n); - } - } - - /** - * libcob/strings.cのcob_inspect_initの実装。詳しい説明はTODO: 準備中。 - * - * @param var TODO: 準備中 - * @param replacing TODO: 準備中 - */ - public static void init(AbstractCobolField var, int replacing) { - CobolInspect.inspectVarCopy = var; - CobolInspect.inspectVar = CobolInspect.inspectVarCopy; - if (inspectVar.getAttribute().isTypeNumericDisplay()) { - inspectVar.putSign(1); - } - CobolInspect.inspectReplacing = replacing; - CobolInspect.inspectSign = var.getSign(); - CobolInspect.inspectSize = var.getFieldSize(); - CobolInspect.inspectData = var.getDataStorage(); - CobolInspect.inspectStart = -1; - CobolInspect.inspectEnd = -1; - if (inspectSize > lastsize) { - inspectMark = new int[inspectSize]; - lastsize = inspectSize; - } - for (int i = 0; i < inspectSize; ++i) { - inspectMark[i] = -1; - } - CobolRuntimeException.setException(0); - } - - /** libcob/strings.cのcob_inspect_startの実装 */ - public static void start() { - inspectStart = 0; - inspectEnd = inspectSize; - } - - /** - * libcob/strings.cのcob_inspect_beforeの実装。詳しい説明はTODO: 準備中。 - * - * @param str TODO: 準備中 - */ - public static void before(AbstractCobolField str) { - CobolDataStorage p2 = null; - int fig = 0; - - switch (str.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - CobolDataStorage data = str.getDataStorage(); - int firstIndex = str.getFirstDataIndex(); - int size = str.getFieldSize(); - int n = 0; - int i = 0; - while (size > 1 - && (data.getByte(firstIndex + i) == (byte) '0' - || data.getByte(firstIndex + i) == (byte) 0x70)) { - size--; - i++; - } - while (size-- > 0) { - int b = data.getByte(firstIndex + i++); - n = n * 10 + (b >= 0x70 ? b - 0x70 : b - 0x30); - fig++; - } - p2 = new CobolDataStorage(String.format("%d", n).getBytes()); - break; - default: - fig = str.getSize(); - p2 = str.getDataStorage(); - break; - } - - for (int p = inspectStart; p < inspectEnd - fig + 1; ++p) { - if (inspectData.getSubDataStorage(p).memcmp(p2, fig) == 0) { - inspectEnd = p; - break; - } - } - } - - /** - * libcob/strings.cのcob_inspect_afterの実装。詳しい説明はTODO: 準備中。 - * - * @param str TODO: 準備中 - */ - public static void after(AbstractCobolField str) { - CobolDataStorage data = str.getDataStorage(); - int size = str.getSize(); - for (int p = inspectStart; p < inspectEnd - str.getSize() + 1; ++p) { - if (inspectData.getSubDataStorage(p).memcmp(data, size) == 0) { - inspectStart = p + size; - return; - } - } - inspectStart = inspectEnd; - } - - /** - * libcob/strings.cのcob_inspect_charactersの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void characters(AbstractCobolField f1) throws CobolStopRunException { - int mark = inspectStart; - int len = inspectEnd - inspectStart; - if (inspectReplacing != 0) { - for (int i = 0; i < len; ++i) { - if (inspectMark[mark + i] == -1) { - CobolDataStorage data = f1.getDataStorage(); - for (int j = 0; j < f1.getSize(); ++j) { - inspectMark[mark + i + j] = data.getByte(j); - } - i += f1.getSize() - 1; - } - } - } else { - int n = 0; - for (int i = 0; i < len; ++i) { - if (inspectMark[mark + i] == -1) { - inspectMark[mark + i] = 1; - n++; - } - } - if (n > 0) { - int type = inspectVar.getAttribute().getType(); - if (type == CobolFieldAttribute.COB_TYPE_NATIONAL - || type == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { - n = n / 2; - } - f1.addInt(n); - } - } - } - - /** - * libcob/strings.cのcob_inspect_allの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @param f2 TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void all(AbstractCobolField f1, AbstractCobolField f2) - throws CobolStopRunException { - common(f1, f2, INSPECT_ALL); - } - - /** - * libcob/strings.cのcob_inspect_leadingの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @param f2 TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void leading(AbstractCobolField f1, AbstractCobolField f2) - throws CobolStopRunException { - common(f1, f2, INSPECT_LEADING); - } - - /** - * libcob/strings.cのcob_inspect_firstの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @param f2 TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void first(AbstractCobolField f1, AbstractCobolField f2) - throws CobolStopRunException { - common(f1, f2, INSPECT_FIRST); - } - - /** - * libcob/strings.cのcob_inspect_trailingの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @param f2 TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void trailing(AbstractCobolField f1, AbstractCobolField f2) - throws CobolStopRunException { - common(f1, f2, INSPECT_TRAILING); - } - - /** - * libcob/strings.cのcob_inspect_convertingの実装。詳しい説明はTODO: 準備中。 - * - * @param f1 TODO: 準備中 - * @param f2 TODO: 準備中 - */ - public static void converting(AbstractCobolField f1, AbstractCobolField f2) { - int type1 = f1.getAttribute().getType(); - int len = inspectEnd - inspectStart; - CobolDataStorage data = f2.getDataStorage(); - if (type1 == CobolFieldAttribute.COB_TYPE_NATIONAL - || type1 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { - if (f2 == CobolConstant.quote) { - f2 = CobolConstant.zenQuote; - } else if (f2 == CobolConstant.space) { - f2 = CobolConstant.zenSpace; - } else if (f2 == CobolConstant.zero) { - f2 = CobolConstant.zenZero; - } - for (int j = 0; j < f1.getSize(); j += 2) { - for (int i = 0; i < len; i += 2) { - if (inspectMark[i] == -1 - && inspectMark[i + 1] == -1 - && f1.getDataStorage() - .getSubDataStorage(j) - .memcmp(inspectData.getSubDataStorage(inspectStart + i), 2) - == 0) { - inspectData.setByte(inspectStart + i, data.getByte(0)); - inspectData.setByte(inspectStart + i + 1, data.getByte(1)); - } - inspectMark[i] = 1; - inspectMark[i + 1] = 1; - } - } - } else { - for (int j = 0; j < f1.getSize(); ++j) { - for (int i = 0; i < len; ++i) { - if (inspectMark[i] == -1 - && inspectData.getByte(inspectStart + i) == f1.getDataStorage().getByte(j)) { - if (f2 == CobolConstant.quote - || f2 == CobolConstant.space - || f2 == CobolConstant.zero) { - inspectData.setByte(inspectStart + i, data.getByte(0)); - } else { - inspectData.setByte(inspectStart + i, data.getByte(j)); - } - inspectMark[i] = 1; - } - } - } - } - } - - /** libcob/strings.cのcob_inspect_finishの実装。詳しい説明はTODO: 準備中。 */ - public static void finish() { - if (inspectReplacing != 0) { - for (int i = 0; i < inspectSize; ++i) { - if (inspectMark[i] != -1) { - inspectData.setByte(i, (byte) inspectMark[i]); - } - } - } - inspectVar.putSign(inspectSign); - } - - /** TODO: 準備中 */ - public static void initString() { - CobolInspect.inspectMark = new int[CobolConstant.COB_MEDIUM_BUFF]; - lastsize = CobolConstant.COB_MEDIUM_BUFF; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public class CobolInspect { + private static final int INSPECT_ALL = 0; + private static final int INSPECT_LEADING = 1; + private static final int INSPECT_FIRST = 2; + private static final int INSPECT_TRAILING = 3; + + private static AbstractCobolField inspectVar; + private static CobolDataStorage inspectData; + private static int inspectStart; + private static int inspectEnd; + private static int[] inspectMark = null; + private static int lastsize = 0; + private static int inspectSize; + private static int inspectReplacing; + private static int inspectSign; + private static AbstractCobolField inspectVarCopy; + + private static AbstractCobolField figurative(AbstractCobolField f1, AbstractCobolField f2) { + int size1 = 0; + int size2 = f2.getSize(); + byte[] figptr = new byte[size2]; + int s = 0; + for (int n = 0; n < size2; n++, s++) { + figptr[s] = f1.getDataStorage().getByte(size1); + size1++; + if (size1 >= f1.getSize()) { + size1 = 0; + } + } + return CobolFieldFactory.makeCobolField( + size2, + new CobolDataStorage(figptr), + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); + } + + private static void common(AbstractCobolField f1, AbstractCobolField f2, int type) + throws CobolStopRunException { + if (f1 == null) { + f1 = CobolConstant.low; + } + if (f2 == null) { + f2 = CobolConstant.low; + } + + int type1 = f1.getAttribute().getType(); + int type2 = f2.getAttribute().getType(); + + if (type2 == CobolFieldAttribute.COB_TYPE_NATIONAL + || type2 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { + if (f1 == CobolConstant.quote) { + f1 = CobolConstant.zenQuote; + } else if (f1 == CobolConstant.space) { + f1 = CobolConstant.zenSpace; + } else if (f1 == CobolConstant.zero) { + f1 = CobolConstant.zenZero; + } + } + if (type1 == CobolFieldAttribute.COB_TYPE_NATIONAL + || type1 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { + if (f2 == CobolConstant.quote) { + f2 = CobolConstant.zenQuote; + } else if (f2 == CobolConstant.space) { + f2 = CobolConstant.zenSpace; + } else if (f2 == CobolConstant.zero) { + f2 = CobolConstant.zenZero; + } + } + if (inspectReplacing != 0 && f1.getSize() != f2.getSize()) { + if (type1 == CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL) { + f1 = figurative(f1, f2); + } else { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_RANGE_INSPECT_SIZE); + return; + } + } + + int mark = inspectStart; + int len = inspectEnd - inspectStart; + int n = 0; + if (type == INSPECT_TRAILING) { + for (int i = len - f2.getSize(); i >= 0; i--) { + if (inspectData.memcmp(inspectStart + i, f2.getDataStorage(), f2.getSize()) == 0) { + int j; + for (j = 0; j < f2.getSize(); ++j) { + if (inspectMark[mark + i + j] != -1) { + break; + } + } + if (j == f2.getSize()) { + CobolDataStorage f1Storage = f1.getDataStorage(); + for (j = 0; j < f2.getSize(); ++j) { + inspectMark[mark + i + j] = + inspectReplacing != 0 ? f1Storage.getByte(j) : 1; + } + i -= f2.getSize() - 1; + n++; + } + } else { + break; + } + } + } else { + for (int i = 0; i < (len - f2.getSize() + 1); ++i) { + if (inspectData.memcmp(inspectStart + i, f2.getDataStorage(), f2.getSize()) == 0) { + int j; + for (j = 0; j < f2.getSize(); ++j) { + if (inspectMark[mark + i + j] != -1) { + break; + } + } + if (j == f2.getSize()) { + CobolDataStorage f1Storage = f1.getDataStorage(); + for (j = 0; j < f2.getSize(); ++j) { + inspectMark[mark + i + j] = + inspectReplacing != 0 ? f1Storage.getByte(j) : 1; + } + i += f2.getSize() - 1; + n++; + if (type == INSPECT_FIRST) { + break; + } + } + } else if (type == INSPECT_LEADING) { + break; + } + } + } + + if (n > 0 && inspectReplacing == 0) { + f1.addInt(n); + } + } + + /** + * libcob/strings.cのcob_inspect_initの実装。詳しい説明はTODO: 準備中。 + * + * @param var TODO: 準備中 + * @param replacing TODO: 準備中 + */ + public static void init(AbstractCobolField var, int replacing) { + CobolInspect.inspectVarCopy = var; + CobolInspect.inspectVar = CobolInspect.inspectVarCopy; + if (inspectVar.getAttribute().isTypeNumericDisplay()) { + inspectVar.putSign(1); + } + CobolInspect.inspectReplacing = replacing; + CobolInspect.inspectSign = var.getSign(); + CobolInspect.inspectSize = var.getFieldSize(); + CobolInspect.inspectData = var.getDataStorage(); + CobolInspect.inspectStart = -1; + CobolInspect.inspectEnd = -1; + if (inspectSize > lastsize) { + inspectMark = new int[inspectSize]; + lastsize = inspectSize; + } + for (int i = 0; i < inspectSize; ++i) { + inspectMark[i] = -1; + } + CobolRuntimeException.setException(0); + } + + /** libcob/strings.cのcob_inspect_startの実装 */ + public static void start() { + inspectStart = 0; + inspectEnd = inspectSize; + } + + /** + * libcob/strings.cのcob_inspect_beforeの実装。詳しい説明はTODO: 準備中。 + * + * @param str TODO: 準備中 + */ + public static void before(AbstractCobolField str) { + CobolDataStorage p2 = null; + int fig = 0; + + switch (str.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + CobolDataStorage data = str.getDataStorage(); + int firstIndex = str.getFirstDataIndex(); + int size = str.getFieldSize(); + int n = 0; + int i = 0; + while (size > 1 + && (data.getByte(firstIndex + i) == (byte) '0' + || data.getByte(firstIndex + i) == (byte) 0x70)) { + size--; + i++; + } + while (size-- > 0) { + int b = data.getByte(firstIndex + i++); + n = n * 10 + (b >= 0x70 ? b - 0x70 : b - 0x30); + fig++; + } + p2 = new CobolDataStorage(String.format("%d", n).getBytes()); + break; + default: + fig = str.getSize(); + p2 = str.getDataStorage(); + break; + } + + for (int p = inspectStart; p < inspectEnd - fig + 1; ++p) { + if (inspectData.getSubDataStorage(p).memcmp(p2, fig) == 0) { + inspectEnd = p; + break; + } + } + } + + /** + * libcob/strings.cのcob_inspect_afterの実装。詳しい説明はTODO: 準備中。 + * + * @param str TODO: 準備中 + */ + public static void after(AbstractCobolField str) { + CobolDataStorage data = str.getDataStorage(); + int size = str.getSize(); + for (int p = inspectStart; p < inspectEnd - str.getSize() + 1; ++p) { + if (inspectData.getSubDataStorage(p).memcmp(data, size) == 0) { + inspectStart = p + size; + return; + } + } + inspectStart = inspectEnd; + } + + /** + * libcob/strings.cのcob_inspect_charactersの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void characters(AbstractCobolField f1) throws CobolStopRunException { + int mark = inspectStart; + int len = inspectEnd - inspectStart; + if (inspectReplacing != 0) { + for (int i = 0; i < len; ++i) { + if (inspectMark[mark + i] == -1) { + CobolDataStorage data = f1.getDataStorage(); + for (int j = 0; j < f1.getSize(); ++j) { + inspectMark[mark + i + j] = data.getByte(j); + } + i += f1.getSize() - 1; + } + } + } else { + int n = 0; + for (int i = 0; i < len; ++i) { + if (inspectMark[mark + i] == -1) { + inspectMark[mark + i] = 1; + n++; + } + } + if (n > 0) { + int type = inspectVar.getAttribute().getType(); + if (type == CobolFieldAttribute.COB_TYPE_NATIONAL + || type == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { + n = n / 2; + } + f1.addInt(n); + } + } + } + + /** + * libcob/strings.cのcob_inspect_allの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @param f2 TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void all(AbstractCobolField f1, AbstractCobolField f2) + throws CobolStopRunException { + common(f1, f2, INSPECT_ALL); + } + + /** + * libcob/strings.cのcob_inspect_leadingの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @param f2 TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void leading(AbstractCobolField f1, AbstractCobolField f2) + throws CobolStopRunException { + common(f1, f2, INSPECT_LEADING); + } + + /** + * libcob/strings.cのcob_inspect_firstの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @param f2 TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void first(AbstractCobolField f1, AbstractCobolField f2) + throws CobolStopRunException { + common(f1, f2, INSPECT_FIRST); + } + + /** + * libcob/strings.cのcob_inspect_trailingの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @param f2 TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void trailing(AbstractCobolField f1, AbstractCobolField f2) + throws CobolStopRunException { + common(f1, f2, INSPECT_TRAILING); + } + + /** + * libcob/strings.cのcob_inspect_convertingの実装。詳しい説明はTODO: 準備中。 + * + * @param f1 TODO: 準備中 + * @param f2 TODO: 準備中 + */ + public static void converting(AbstractCobolField f1, AbstractCobolField f2) { + int type1 = f1.getAttribute().getType(); + int len = inspectEnd - inspectStart; + CobolDataStorage data = f2.getDataStorage(); + if (type1 == CobolFieldAttribute.COB_TYPE_NATIONAL + || type1 == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { + if (f2 == CobolConstant.quote) { + f2 = CobolConstant.zenQuote; + } else if (f2 == CobolConstant.space) { + f2 = CobolConstant.zenSpace; + } else if (f2 == CobolConstant.zero) { + f2 = CobolConstant.zenZero; + } + for (int j = 0; j < f1.getSize(); j += 2) { + for (int i = 0; i < len; i += 2) { + if (inspectMark[i] == -1 + && inspectMark[i + 1] == -1 + && f1.getDataStorage() + .getSubDataStorage(j) + .memcmp( + inspectData.getSubDataStorage(inspectStart + i), + 2) + == 0) { + inspectData.setByte(inspectStart + i, data.getByte(0)); + inspectData.setByte(inspectStart + i + 1, data.getByte(1)); + } + inspectMark[i] = 1; + inspectMark[i + 1] = 1; + } + } + } else { + for (int j = 0; j < f1.getSize(); ++j) { + for (int i = 0; i < len; ++i) { + if (inspectMark[i] == -1 + && inspectData.getByte(inspectStart + i) + == f1.getDataStorage().getByte(j)) { + if (f2 == CobolConstant.quote + || f2 == CobolConstant.space + || f2 == CobolConstant.zero) { + inspectData.setByte(inspectStart + i, data.getByte(0)); + } else { + inspectData.setByte(inspectStart + i, data.getByte(j)); + } + inspectMark[i] = 1; + } + } + } + } + } + + /** libcob/strings.cのcob_inspect_finishの実装。詳しい説明はTODO: 準備中。 */ + public static void finish() { + if (inspectReplacing != 0) { + for (int i = 0; i < inspectSize; ++i) { + if (inspectMark[i] != -1) { + inspectData.setByte(i, (byte) inspectMark[i]); + } + } + } + inspectVar.putSign(inspectSign); + } + + /** TODO: 準備中 */ + public static void initString() { + CobolInspect.inspectMark = new int[CobolConstant.COB_MEDIUM_BUFF]; + lastsize = CobolConstant.COB_MEDIUM_BUFF; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java index bd49eaf2..c3af28ff 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java @@ -1,2780 +1,2839 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import java.math.BigDecimal; -import java.text.DateFormat; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.format.DateTimeFormatter; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Locale; -import java.util.Random; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolDecimal; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; -import jp.osscons.opensourcecobol.libcobj.data.CobolNationalField; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; -import jp.osscons.opensourcecobol.libcobj.file.CobolFile; - -/** TODO: 準備中 */ -public class CobolIntrinsic { - - private static int[] normalDays = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; - private static int[] leapDays = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366}; - private static int[] normalMonthDays = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - private static int[] leapMonthDays = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - private static final int DEPTH_LEVEL = 8; - private static final int sizeOfDouble = 8; - private static int currEntry = 0; - private static AbstractCobolField currField = null; - private static AbstractCobolField[] calcField = new AbstractCobolField[DEPTH_LEVEL]; - private static Random random = new Random(); - private static byte[] localeBuff; - private static final byte[] byteArray00 = "00".getBytes(); - - /** libcob/intrinsicのmake_double_entryの実装 */ - private static void makeDoubleEntry() { - CobolDataStorage s = new CobolDataStorage(sizeOfDouble + 1); - - CobolFieldAttribute newAttr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE, - 18, - 9, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField newField = CobolFieldFactory.makeCobolField(sizeOfDouble, s, newAttr); - - calcField[currEntry] = newField; - currField = newField; - ++currEntry; - if (currEntry >= DEPTH_LEVEL) { - currEntry = 0; - } - } - - /** libcob/intrinsicのmake_field_entryの実装 */ - private static void makeFieldEntry(AbstractCobolField f) { - AbstractCobolField newField = - CobolFieldFactory.makeCobolField( - f.getSize(), new CobolDataStorage(f.getSize() + 1), f.getAttribute()); - calcField[currEntry] = newField; - currField = calcField[currEntry]; - - ++currEntry; - if (currEntry >= DEPTH_LEVEL) { - currEntry = 0; - } - } - - /** - * libcob/intrinsicのcob_intr_ordの実装 - * - * @param year TODO: 準備中 - * @return TODO: 準備中 - */ - private static boolean isLeapYear(int year) { - return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)); - } - - // libcob/intrinsicのcob_init_intrinsicの実装 - /** TODO: 準備中 */ - public static void init() { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - for (int i = 0; i < DEPTH_LEVEL; ++i) { - calcField[i] = CobolFieldFactory.makeCobolField(256, new CobolDataStorage(256), attr); - } - } - - // libcob/intrinsicのcob_intr_get_doubleの実装 - /** - * TODO: 準備中 - * - * @param d - * @return - */ - private static double intrGetDouble(CobolDecimal d) { - double v = d.getValue().doubleValue(); - int n = d.getScale(); - for (int i = 0; i < Math.abs(n); ++i) { - if (n > 0) { - v /= 10; - } else { - v *= 10; - } - } - return v; - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - */ - private static void calcRefMod(AbstractCobolField f, int offset, int length) { - if (offset <= f.getSize()) { - int calcoff = offset - 1; - int size = f.getSize() - calcoff; - if (length > 0 && length < size) { - size = length; - } - f.setSize(size); - if (calcoff > 0) { - CobolDataStorage tmp = new CobolDataStorage(size); - tmp.memcpy(f.getDataStorage().getSubDataStorage(calcoff), size); - f.getDataStorage().memcpy(tmp, size); - } - } - } - - /** - * TODO: 準備中 - * - * @param f1 TODO: 準備中 - * @param op TODO: 準備中 - * @param f2 TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField intrBinop(AbstractCobolField f1, int op, AbstractCobolField f2) - throws CobolStopRunException { - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - d1.setField(f1); - d2.setField(f2); - - switch ((char) op) { - case '+': - d1.add(d2); - break; - case '-': - d1.sub(d2); - break; - case '*': - d1.mul(d2); - break; - case '/': - d1.div(d2); - break; - case '^': - d1.pow(d2); - break; - default: - break; - } - - int attrsign = 0; - if (d1.getValue().signum() < 0) { - attrsign = CobolFieldAttribute.COB_FLAG_HAVE_SIGN; - } else { - attrsign = 0; - } - - int size = sizeInBase10(d1.getValue()); - if (d1.getScale() > size) { - size = d1.getScale(); - } - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, size, d1.getScale(), attrsign, null); - AbstractCobolField field = - CobolFieldFactory.makeCobolField(size, (CobolDataStorage) null, attr); - makeFieldEntry(field); - d1.getDisplayField(currField, 0); - return currField; - } - - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLength(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - currField.setInt(srcfield.getSize()); - return currField; - } - - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcInteger(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolDecimal d1 = new CobolDecimal(); - d1.setField(srcfield); - if (d1.getValue().signum() >= 0) { - try { - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - boolean isScalePositive = d1.getScale() > 0; - BigDecimal val = d1.getValue(); - for (int i = 0; i < Math.abs(d1.getScale()); ++i) { - if (isScalePositive) { - val = val.divide(BigDecimal.TEN); - } else { - val = val.multiply(BigDecimal.TEN); - } - } - - // Rouding to negative infinity - BigDecimal[] vals = val.divideAndRemainder(BigDecimal.ONE); - if (vals[1].signum() != 0) { - vals[0] = vals[0].subtract(BigDecimal.ONE); - } - - try { - new CobolDecimal(vals[0], 0).getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcIntegerPart(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - makeFieldEntry(field); - currField.moveFrom(srcfield); - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcUpperCase( - int offset, int length, AbstractCobolField srcfield) { - makeFieldEntry(srcfield); - int size = srcfield.getSize(); - CobolDataStorage currStorage = currField.getDataStorage(); - CobolDataStorage srcStorage = srcfield.getDataStorage(); - for (int i = 0; i < size; ++i) { - currStorage.setByte(i, (byte) Character.toUpperCase(srcStorage.getByte(i))); - } - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLowerCase( - int offset, int length, AbstractCobolField srcfield) { - makeFieldEntry(srcfield); - int size = srcfield.getSize(); - CobolDataStorage currStorage = currField.getDataStorage(); - CobolDataStorage srcStorage = srcfield.getDataStorage(); - for (int i = 0; i < size; ++i) { - currStorage.setByte(i, (byte) Character.toLowerCase(srcStorage.getByte(i))); - } - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcReverse( - int offset, int length, AbstractCobolField srcfield) { - makeFieldEntry(srcfield); - int size = srcfield.getSize(); - CobolDataStorage currStorage = currField.getDataStorage(); - CobolDataStorage srcStorage = srcfield.getDataStorage(); - for (int i = 0; i < size; ++i) { - currStorage.setByte(i, srcStorage.getByte(srcfield.getSize() - i - 1)); - } - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param f TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcWhenCompiled(int offset, int length, AbstractCobolField f) { - makeFieldEntry(f); - currField.getDataStorage().memcpy(f.getDataStorage(), f.getSize()); - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcCurrentDate(int offset, int length) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(21, (CobolDataStorage) null, attr); - makeFieldEntry(field); - // TODO Time Zoneを表示する機能を取り入れる - - String dateString = - String.format( - "%4d%02d%02d%02d%02d%02d%02d00000", - CobolUtil.cal.get(Calendar.YEAR), - CobolUtil.cal.get(Calendar.MONTH) + 1, - CobolUtil.cal.get(Calendar.DAY_OF_MONTH), - CobolUtil.cal.get(Calendar.HOUR_OF_DAY), - CobolUtil.cal.get(Calendar.MINUTE), - CobolUtil.cal.get(Calendar.SECOND), - CobolUtil.cal.get(Calendar.MILLISECOND) / 10); - currField.getDataStorage().memcpy(dateString.getBytes()); - - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcChar(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(1, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - int i = srcfield.getInt(); - if (i < 1 || i > 256) { - currField.getDataStorage().setByte(0, (byte) 0); - } else { - currField.getDataStorage().setByte(0, (byte) (i - 1)); - } - return currField; - } - - // libcob/intrinsicのcob_intr_ordの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcOrd(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - currField.setInt(srcfield.getDataStorage().getByte(0) + 1); - return currField; - } - - // libcob/intrinsicのcob_intr_date_of_integerの実装 - /** - * TODO: 準備中 - * - * @param srcdays TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcDateOfInteger(AbstractCobolField srcdays) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolRuntimeException.setException(0); - int days = srcdays.getInt(); - - if (days < 1 || days > 3067671) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.getDataStorage().memset((byte) '0', 8); - return currField; - } - - int leapyear = 365; - int baseyear = 1601; - while (days > leapyear) { - days -= leapyear; - ++baseyear; - if (isLeapYear(baseyear)) { - leapyear = 366; - } else { - leapyear = 365; - } - } - int i; - for (i = 0; i < 13; ++i) { - if (isLeapYear(baseyear)) { - if (days <= leapDays[i]) { - days -= leapDays[i - 1]; - break; - } - } else { - if (days <= normalDays[i]) { - days -= normalDays[i - 1]; - break; - } - } - } - String dateString = String.format("%04d%02d%02d", baseyear, i, days); - currField.getDataStorage().memcpy(dateString.getBytes()); - return currField; - } - - // libcob/intrinsicのcob_intr_day_of_integerの実装 - /** - * TODO: 準備中 - * - * @param srcdays TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcDayOfInteger(AbstractCobolField srcdays) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 7, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(7, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolRuntimeException.setException(0); - int days = srcdays.getInt(); - - if (days < 1 || days > 3067671) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.getDataStorage().memset((byte) '0', 8); - return currField; - } - - int leapyear = 365; - int baseyear = 1601; - while (days > leapyear) { - days -= leapyear; - ++baseyear; - if (isLeapYear((baseyear))) { - leapyear = 366; - } else { - leapyear = 365; - } - } - String dateString = String.format("%04d%03d", baseyear, days); - currField.getDataStorage().memcpy(dateString.getBytes()); - return currField; - } - - // libcob/intrinsicのcob_intr_integer_of_dateの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcIntegerOfDate(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolRuntimeException.setException(0); - int indate = srcfield.getInt(); - int year = indate / 10000; - if (year < 1601 || year > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - indate %= 10000; - int month = indate / 100; - if (month < 1 || month > 12) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - int days = indate % 100; - if (days < 1 || days > 31) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - if (isLeapYear(year)) { - if (days > leapMonthDays[month]) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - } else { - if (days > normalMonthDays[month]) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - } - - int totaldays = 0; - int baseyear = 1601; - while (baseyear != year) { - if (isLeapYear(baseyear)) { - totaldays += 366; - } else { - totaldays += 365; - } - ++baseyear; - } - - if (isLeapYear(baseyear)) { - totaldays += leapDays[month - 1]; - } else { - totaldays += normalDays[month - 1]; - } - - totaldays += days; - currField.setInt(totaldays); - return currField; - } - - // libcob/intrinsicのcob_intr_integer_of_dayの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcIntegerOfDay(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolRuntimeException.setException(0); - int indate = srcfield.getInt(); - int year = indate / 1000; - if (year < 1601 || year > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - int days = indate % 1000; - if (days < 1 || days > 365 + (isLeapYear(year) ? 1 : 0)) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - int totaldays = 0; - int baseyear = 1601; - while (baseyear != year) { - if (isLeapYear(baseyear)) { - totaldays += 366; - } else { - totaldays += 365; - } - ++baseyear; - } - totaldays += days; - currField.setInt(totaldays); - return currField; - } - - // libcob/intrinsicのcob_intr_integer_of_dayの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcFactorial(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 18, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolRuntimeException.setException(0); - int srcval = srcfield.getInt(); - if (srcval < 0) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - BigDecimal d = BigDecimal.ONE; - for (int i = 2; i <= srcval; ++i) { - d = d.multiply(new BigDecimal(i)); - } - try { - new CobolDecimal(d, 0).getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - private static CobolDecimal mathFunctionBefore1(AbstractCobolField srcfield) { - CobolDecimal d1 = new CobolDecimal(); - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 17, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - d1.setField(srcfield); - makeFieldEntry(field); - return d1; - } - - private static CobolDecimal mathFunctionBefore2(AbstractCobolField srcfield) { - CobolDecimal d1 = new CobolDecimal(); - d1.setField(srcfield); - makeDoubleEntry(); - return d1; - } - - private static AbstractCobolField mathFunctionAfter1(double mathd2) { - if (Double.isNaN(mathd2) - || mathd2 == Double.POSITIVE_INFINITY - || mathd2 == Double.NEGATIVE_INFINITY) { - currField.setInt(0); - return currField; - } - long result = (long) mathd2; - mathd2 -= result; - for (int i = 0; i < 17; ++i) { - mathd2 *= 10; - int tempres = (int) mathd2; - result *= 10; - result += tempres; - mathd2 -= tempres; - } - currField.getDataStorage().set(result); - return currField; - } - - private static AbstractCobolField mathFunctionAfter2(double mathd2) { - if (Double.isNaN(mathd2) - || mathd2 == Double.POSITIVE_INFINITY - || mathd2 == Double.NEGATIVE_INFINITY) { - currField.setInt(0); - return currField; - } - currField.getDataStorage().set(mathd2); - return currField; - } - - // libcob/intrinsicのcob_intr_expの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExp(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.pow(2.7182818284590452354, intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_exp10の実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExp10(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.pow(10, intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_absの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcAbs(AbstractCobolField srcfield) { - makeFieldEntry(srcfield); - CobolDecimal d1 = srcfield.getDecimal(); - d1.setValue(d1.getValue().abs()); - try { - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - // libcob/intrinsicのcob_intr_acosの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcAcos(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore1(srcfield); - double mathd2 = Math.acos(intrGetDouble(d1)); - return mathFunctionAfter1(mathd2); - } - - // libcob/intrinsicのcob_intr_asinの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcAsin(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore1(srcfield); - double mathd2 = Math.asin(intrGetDouble(d1)); - return mathFunctionAfter1(mathd2); - } - - // libcob/intrinsicのcob_intr_atanの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcAtan(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore1(srcfield); - double mathd2 = Math.atan(intrGetDouble(d1)); - return mathFunctionAfter1(mathd2); - } - - // libcob/intrinsicのcob_intr_cosの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcCos(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore1(srcfield); - double mathd2 = Math.cos(intrGetDouble(d1)); - return mathFunctionAfter1(mathd2); - } - - // libcob/intrinsicのcob_intr_logの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLog(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.log(intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_log10の実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLog10(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.log10(intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_sinの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSin(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore1(srcfield); - double mathd2 = Math.sin(intrGetDouble(d1)); - return mathFunctionAfter1(mathd2); - } - - // libcob/intrinsicのcob_intr_sqrtの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSqrt(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.sqrt(intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_tanの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcTan(AbstractCobolField srcfield) { - CobolDecimal d1 = mathFunctionBefore2(srcfield); - double mathd2 = Math.tan(intrGetDouble(d1)); - return mathFunctionAfter2(mathd2); - } - - // libcob/intrinsicのcob_intr_numvalの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcNumval(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - CobolDataStorage s = srcfield.getDataStorage(); - boolean sign = false; - boolean decimalSeen = false; - long llval = 0; - int integerDigits = 0; - int decimalDigits = 0; - StringBuilder integerBuff = new StringBuilder(); - StringBuilder decimalBuff = new StringBuilder(); - for (int i = 0; i < srcfield.getSize(); ++i) { - if (i < srcfield.getSize() - 1) { - if ((Character.toUpperCase(s.getByte(i)) == 'C' - && Character.toUpperCase(s.getByte(i + 1)) == 'R') - || (Character.toUpperCase(s.getByte(i)) == 'D' - && Character.toUpperCase(s.getByte(i + 1)) == 'B')) { - sign = true; - break; - } - } - char c = (char) s.getByte(i); - if (c == ' ' || c == '+') { - continue; - } - if (c == '-') { - sign = true; - continue; - } - if (c == CobolModule.getCurrentModule().decimal_point) { - decimalSeen = true; - continue; - } - if (c >= '0' && c <= '9') { - llval *= 10; - llval += c - '0'; - if (decimalSeen) { - decimalBuff.append(c); - decimalDigits++; - } else { - integerBuff.append(c); - integerDigits++; - } - } - if (integerDigits + decimalDigits > 30) { - break; - } - } - if (integerDigits > 0) { - integerBuff.setCharAt(0, '0'); - } - if (decimalDigits > 0) { - decimalBuff.setCharAt(0, '0'); - } - if (sign) { - llval = -llval; - } - if (integerDigits + decimalDigits <= 18) { - attr.setScale(decimalDigits); - makeFieldEntry(field); - currField.getDataStorage().set(llval); - } else { - String dataString = - String.format("%s%s.%s", sign ? "-" : "", integerBuff.toString(), decimalBuff.toString()); - double val = Double.parseDouble(dataString); - makeDoubleEntry(); - currField.getDataStorage().set(val); - } - return currField; - } - - // libcob/intrinsicのcob_intr_numval_cの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @param currency TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcNumvalC( - AbstractCobolField srcfield, AbstractCobolField currency) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - boolean sign = false; - boolean decimalSeen = false; - long llval = 0; - int integerDigits = 0; - int decimalDigits = 0; - StringBuilder integerBuff = new StringBuilder(); - StringBuilder decimalBuff = new StringBuilder(); - - CobolDataStorage currencyData = null; - if (currency != null) { - if (currency.getSize() < srcfield.getSize()) { - currencyData = currency.getDataStorage(); - } - } - for (int i = 0; i < srcfield.getSize(); ++i) { - char c = (char) srcfield.getDataStorage().getByte(i); - if (i < srcfield.getSize() - 1) { - char cc = (char) srcfield.getDataStorage().getByte(i + 1); - if ((Character.toUpperCase(c) == 'C' && Character.toUpperCase(cc) == 'R') - || (Character.toUpperCase(c) == 'D' && Character.toUpperCase(cc) == 'B')) { - sign = true; - break; - } - } - if (currencyData != null) { - if (i < srcfield.getSize() - currency.getSize()) { - if (currencyData.memcmp( - srcfield.getDataStorage().getSubDataStorage(i), currency.getSize()) - == 0) { - i += (currency.getSize() - 1); - continue; - } - } - } - if (c == ' ' || c == '+') { - continue; - } - if (c == '-') { - sign = true; - continue; - } - if (c == CobolModule.getCurrentModule().decimal_point) { - decimalSeen = true; - continue; - } - if (c == CobolModule.getCurrentModule().currency_symbol) { - continue; - } - if (c >= '0' && c <= '9') { - llval *= 10; - llval += c - '0'; - if (decimalSeen) { - decimalBuff.append(c); - decimalDigits++; - } else { - integerBuff.append(c); - integerDigits++; - } - } - if (integerDigits + decimalDigits > 30) { - break; - } - } - if (integerDigits > 0) { - integerBuff.setCharAt(0, '0'); - } - if (decimalDigits > 0) { - decimalBuff.setCharAt(0, '0'); - } - if (sign) { - llval = -llval; - } - if (integerDigits + decimalDigits <= 18) { - attr.setScale(decimalDigits); - makeFieldEntry(field); - currField.getDataStorage().set(llval); - } else { - String dataString = - String.format("%s%s.%s", sign ? "-" : "", integerBuff.toString(), decimalBuff.toString()); - double val = Double.parseDouble(dataString); - makeDoubleEntry(); - currField.getDataStorage().set(val); - } - return currField; - } - - /** - * このメソッドは未実装 - * - * @param n このメソッドは未実装 - * @param currency このメソッドは未実装 - * @return null - */ - public static AbstractCobolField funcNumvalC(int n, AbstractCobolField currency) { - // TODO - return null; - } - - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcNumvalC(AbstractCobolField srcfield, int n) { - return funcNumvalC(srcfield, null); - } - - /** - * このメソッドは未実装 - * - * @param n このメソッドは未実装 - * @param m このメソッドは未実装 - * @return null - */ - public static AbstractCobolField funcNumvalC(int n, int m) { - // TODO - return null; - } - - // libcob/intrinsicのcob_intr_annuityの実装 - /** - * TODO: 準備中 - * - * @param srcfield1 TODO: 準備中 - * @param srcfield2 TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcAnnuity( - AbstractCobolField srcfield1, AbstractCobolField srcfield2) { - makeDoubleEntry(); - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - d1.setField(srcfield1); - d2.setField(srcfield2); - - double mathd1 = intrGetDouble(d1); - double mathd2 = intrGetDouble(d2); - if (mathd1 == 0) { - mathd1 = 1.0 / mathd2; - currField.getDataStorage().set(mathd1); - return currField; - } - - mathd1 /= (1.0 - Math.pow(mathd1 + 1.0, 0.0 - mathd2)); - currField.getDataStorage().set(mathd1); - return currField; - } - - private static int sizeInBase10(BigDecimal d1) { - String s = d1.toPlainString(); - int begin = s.charAt(0) == '-' ? 0 : -1; - int pointIndex = s.indexOf('.'); - int end = pointIndex < 0 ? s.length() : pointIndex; - return end - begin - 1; - } - - // libcob/intrinsicのcob_intr_sumの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSum(int params, AbstractCobolField... fields) { - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - d1.setValue(BigDecimal.ZERO); - - int scale = 0; - for (AbstractCobolField f : fields) { - if (f.getAttribute().getScale() > scale) { - scale = f.getAttribute().getScale(); - } - d2.setField(f); - d1.add(d2); - } - - int size = sizeInBase10(d1.getValue()); - AbstractCobolField field; - if (size < 19) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - } else { - if (d1.getScale() > size) { - size = d1.getScale(); - } - if (scale > size) { - size = scale; - } - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - field = CobolFieldFactory.makeCobolField(size, (CobolDataStorage) null, attr); - } - makeFieldEntry(field); - try { - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - // libcob/intrinsicのcob_intr_ord_minの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcOrdMin(int params, AbstractCobolField... fields) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - if (fields.length <= 1) { - currField.setInt(0); - return currField; - } - - AbstractCobolField basef = fields[0]; - int ordmin = 0; - for (int i = 1; i < fields.length; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(basef) < 0) { - basef = f; - ordmin = i; - } - } - - currField.setLong((long) ordmin + 1); - return currField; - } - - // libcob/intrinsicのcob_intr_ord_maxの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcOrdMax(int params, AbstractCobolField... fields) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - if (fields.length <= 1) { - currField.setInt(0); - return currField; - } - - AbstractCobolField basef = fields[0]; - int ordmax = 0; - for (int i = 1; i < fields.length; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(basef) > 0) { - basef = f; - ordmax = i; - } - } - - currField.setLong((long) ordmax + 1); - return currField; - } - - // libcob/intrinsicのcob_intr_minの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcMin(int params, AbstractCobolField... fields) { - AbstractCobolField beasef = fields[0]; - for (int i = 1; i < fields.length; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(beasef) < 0) { - beasef = f; - } - } - - return beasef; - } - - // libcob/intrinsicのcob_intr_maxの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcMax(int params, AbstractCobolField... fields) { - AbstractCobolField beasef = fields[0]; - for (int i = 1; i < fields.length; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(beasef) > 0) { - beasef = f; - } - } - - return beasef; - } - - // libcob/intrinsicのcob_intr_midrangeの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcMidrange(int params, AbstractCobolField... fields) { - makeDoubleEntry(); - AbstractCobolField basemin = fields[0]; - AbstractCobolField basemax = fields[0]; - for (int i = 1; i < params; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(basemin) < 0) { - basemin = f; - } - if (f.compareTo(basemax) > 0) { - basemax = f; - } - } - - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - d1.setField(basemin); - d2.setField(basemax); - d1.add(d2); - d2 = new CobolDecimal(new BigDecimal(2), 0); - try { - d1.div(d2); - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - // libcob/intrinsicのcob_intr_medianの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcMedian(int params, AbstractCobolField... fields) { - if (fields.length == 1) { - return fields[0]; - } - - AbstractCobolField[] fieldAlloc = new AbstractCobolField[fields.length]; - - for (int i = 0; i < params; ++i) { - fieldAlloc[i] = fields[i]; - } - - Arrays.sort(fieldAlloc, (a, b) -> a.compareTo(b)); - int i = params / 2; - if (params % 2 != 0) { - return fieldAlloc[i]; - } else { - makeDoubleEntry(); - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - d1.setField(fieldAlloc[i]); - d2.setField(fieldAlloc[i - 1]); - d1.add(d2); - d2 = new CobolDecimal(new BigDecimal(2), 0); - try { - d1.div(d2); - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - } - - // libcob/intrinsicのcob_intr_medianの実装 - /** - * TODO: 準備中 - * - * @param pramas TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcMean(int pramas, AbstractCobolField... fields) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO); - CobolDecimal d2 = new CobolDecimal(); - - for (AbstractCobolField f : fields) { - d2.setField(f); - d1.add(d2); - } - - d2 = new CobolDecimal(new BigDecimal(fields.length), 0); - try { - d1.div(d2); - } catch (CobolStopRunException e) { - return null; - } - - CobolDataStorage storage = new CobolDataStorage(8); - field.setDataStorage(storage); - try { - d1.getField(field, 0); - } catch (CobolStopRunException e) { - return null; - } - long n = storage.longValue(); - int i = 0; - while (n != 0) { - n /= 10; - ++i; - } - field.setDataStorage(null); - if (i <= 18) { - attr.setScale(18 - i); - } - makeFieldEntry(field); - try { - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - // libcob/intrinsicのcob_intr_modの実装 - /** - * TODO: 準備中 - * - * @param srcfield1 TODO: 準備中 - * @param srcfield2 TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcMod( - AbstractCobolField srcfield1, AbstractCobolField srcfield2) throws CobolStopRunException { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - makeFieldEntry(field); - - AbstractCobolField f1 = funcInteger(intrBinop(srcfield1, '/', srcfield2)); - d1.setField(srcfield2); - d2.setField(f1); - d2.mul(d1); - d1.setField(srcfield1); - d1.sub(d2); - try { - d1.getField(currField, 0); - } catch (CobolStopRunException e) { - return null; - } - return currField; - } - - // libcob/intrinsicのcob_intr_rangeの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcRange(int params, AbstractCobolField... fields) - throws CobolStopRunException { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - - AbstractCobolField basemin = fields[0]; - AbstractCobolField basemax = fields[0]; - for (int i = 1; i < fields.length; ++i) { - AbstractCobolField f = fields[i]; - if (f.compareTo(basemin) < 0) { - basemin = f; - } - if (f.compareTo(basemax) > 0) { - basemax = f; - } - } - - attr.setScale(basemin.getAttribute().getScale()); - if (basemax.getAttribute().getScale() > attr.getScale()) { - attr.setScale(basemax.getAttribute().getScale()); - } - makeFieldEntry(field); - d1.setField(basemax); - d2.setField(basemin); - d1.sub(d2); - d1.getField(currField, 0); - return currField; - } - - // libcob/intrinsicのcob_intr_remの実装 - /** - * TODO: 準備中 - * - * @param srcfield1 TODO: 準備中 - * @param srcfield2 TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcRem( - AbstractCobolField srcfield1, AbstractCobolField srcfield2) throws CobolStopRunException { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - AbstractCobolField f1 = funcIntegerPart(intrBinop(srcfield1, '/', srcfield2)); - CobolDecimal d1 = new CobolDecimal(); - CobolDecimal d2 = new CobolDecimal(); - - d1.setField(srcfield2); - d2.setField(f1); - d2.mul(d1); - d1.setField(srcfield1); - d1.sub(d2); - - attr.setScale(srcfield1.getAttribute().getScale()); - if (srcfield2.getAttribute().getScale() > attr.getScale()) { - attr.setScale(srcfield2.getAttribute().getScale()); - } - makeFieldEntry(field); - d1.getField(currField, 0); - return currField; - } - - // libcob/intrinsicのcob_intr_randomの実装 - /** - * TODO: 準備中 - * - * @param prams TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcRandom(int prams, AbstractCobolField... fields) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - if (fields.length > 0) { - AbstractCobolField f = fields[0]; - int seed = f.getInt(); - if (seed < 0) { - seed = 0; - } - random.setSeed(seed); - } - - int r = random.nextInt(1000000001); - - int exp10 = 1; - int i = 0; - for (i = 0; i < 10; ++i) { - if (r / exp10 == 0) { - break; - } - exp10 *= 10; - } - if (i == 0) { - i = 1; - } - attr.setScale(i); - makeFieldEntry(field); - currField.getDataStorage().set((long) r); - return currField; - } - - // libcob/intrinsicのcob_intr_varianceの実装 - /** - * TODO: 準備中 - * - * @param prams TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcVariance(int prams, AbstractCobolField... fields) - throws CobolStopRunException { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - if (fields.length == 1) { - makeFieldEntry(field); - currField.setInt(0); - return currField; - } - - CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO, 0); - CobolDecimal d2 = new CobolDecimal(); - - for (AbstractCobolField f : fields) { - d2.setField(f); - d1.add(d2); - } - - d2.setValue(new BigDecimal(fields.length)); - d2.setScale(0); - try { - d1.div(d2); - } catch (CobolStopRunException e) { - return null; - } - - CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); - - for (AbstractCobolField f : fields) { - d2.setField(f); - d2.sub(d1); - d2.mul(d2); - d4.add(d2); - } - - CobolDecimal d3 = new CobolDecimal(new BigDecimal(fields.length), 0); - try { - d4.div(d3); - } catch (CobolStopRunException e) { - return null; - } - CobolDataStorage data = new CobolDataStorage(8); - field.setDataStorage(data); - d4.getField(field, 0); - long n = field.getLong(); - int i = 0; - while (n != 0) { - n /= 10; - ++i; - } - makeFieldEntry(field); - if (i <= 18) { - attr.setScale(18 - i); - } - d4.getField(currField, 0); - return currField; - } - - // libcob/intrinsicのcob_intr_standard_deviationの実装 - /** - * TODO: 準備中 - * - * @param prams TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcStandardDeviation(int prams, AbstractCobolField... fields) - throws CobolStopRunException { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - - makeDoubleEntry(); - - if (fields.length == 1) { - makeFieldEntry(field); - currField.setInt(0); - return currField; - } - - CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO, 0); - CobolDecimal d2 = new CobolDecimal(); - - for (AbstractCobolField f : fields) { - d2.setField(f); - d1.add(d2); - } - - d2.setValue(new BigDecimal(fields.length)); - d2.setScale(0); - try { - d1.div(d2); - } catch (CobolStopRunException e) { - return null; - } - - CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); - - for (AbstractCobolField f : fields) { - d2.setField(f); - d2.sub(d1); - d2.mul(d2); - d4.add(d2); - } - - CobolDecimal d3 = new CobolDecimal(new BigDecimal(fields.length), 0); - try { - d4.div(d3); - } catch (CobolStopRunException e) { - return null; - } - d4.getField(currField, 0); - return funcSqrt(currField); - } - - // libcob/intrinsicのcob_intr_present_valueの実装 - /** - * TODO: 準備中 - * - * @param prams TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static AbstractCobolField funcPresentValue(int prams, AbstractCobolField... fields) - throws CobolStopRunException { - makeDoubleEntry(); - if (fields.length < 2) { - System.err.println("Wrong number of parameters for FUNCTION PRESENT-VALUE"); - System.err.flush(); - currField.setInt(0); - return currField; - } - AbstractCobolField f = fields[0]; - CobolDecimal d1 = new CobolDecimal(); - d1.setField(f); - CobolDecimal d2 = new CobolDecimal(BigDecimal.ONE, 0); - d1.add(d2); - CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); - - for (int i = 1; i < fields.length; ++i) { - f = fields[i]; - d2.setField(f); - CobolDecimal d3 = new CobolDecimal(d1.getValue().add(BigDecimal.ZERO), d1.getScale()); - if (i > 1) { - CobolDecimal d5 = new CobolDecimal(new BigDecimal(i), 0); - d3.pow(d5); - } - d2.div(d3); - d4.add(d2); - } - - d4.getField(currField, 0); - return currField; - } - - // libcob/intrinsicのcob_intr_nationalの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcNational(AbstractCobolField srcfield) { - int size = srcfield.getSize(); - byte[] pdata = - CobolNationalField.han2zen(srcfield.getDataStorage().getByteBuffer(size).array(), size); - int ndata = CobolNationalField.workReturnSize; - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NATIONAL, 0, 0, 0, null); - AbstractCobolField field = - CobolFieldFactory.makeCobolField(ndata, (CobolDataStorage) null, attr); - makeFieldEntry(field); - currField.getDataStorage().memcpy(pdata, ndata); - return currField; - } - - // cob_intr_combined_datetimeの実装 - /** - * TODO: 準備中 - * - * @param srcdays TODO: 準備中 - * @param srctime TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcCombinedDatetime( - AbstractCobolField srcdays, AbstractCobolField srctime) { - int srdays; - int srtime; - String str; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 12, 5, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(12, (CobolDataStorage) null, attr); - makeFieldEntry(field); - CobolRuntimeException.setException(0); - srdays = srcdays.getInt(); - if (srdays < 1 || srdays > 3067671) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.getDataStorage().memset(0, 12); - return currField; - } - srtime = srctime.getInt(); - if (srtime < 1 || srtime > 86400) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.getDataStorage().memset(0, 12); - return currField; - } - str = String.format("%7d%5d", srdays, srtime); - byte[] buff = str.getBytes(); - for (int i = 0; i < buff.length; i++) { - if (buff[i] == ' ') { - buff[i] = '0'; - } - } - currField.getDataStorage().memcpy(buff); - return currField; - } - - // cob_intr_concatenateの実装 - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcConcatenate( - int offset, int length, int params, AbstractCobolField... fields) { - int calcsize = 0; - int i; - int index = 0; - int size; - byte[] data; - - for (i = 0; i < params; i++) { - calcsize += fields[i].getSize(); - } - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = - CobolFieldFactory.makeCobolField(calcsize, (CobolDataStorage) null, attr); - makeFieldEntry(field); - data = new byte[calcsize]; - for (i = 0; i < params; i++) { - size = fields[i].getSize(); - System.arraycopy( - fields[i].getDataStorage().getByteBuffer(size).array(), 0, data, index, size); - index += size; - } - currField.setDataStorage(new CobolDataStorage(data)); - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - // cob_intr_date_to_yyyymmddの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcDateToYyyymmdd(int params, AbstractCobolField... fields) { - int year; - int mmdd; - int interval; - int xqtyear; - int maxyear; - LocalDateTime timeptr; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - year = fields[0].getInt(); - mmdd = year % 10000; - year /= 10000; - if (params > 1) { - interval = fields[1].getInt(); - } else { - interval = 50; - } - if (params > 2) { - xqtyear = fields[2].getInt(); - } else { - timeptr = CobolUtil.localtime(); - xqtyear = 1900 + timeptr.getDayOfYear(); - } - if (year < 0 || year > 999999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - if (xqtyear < 1601 || xqtyear > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - maxyear = xqtyear + interval; - if (maxyear < 1700 || maxyear > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - if (maxyear % 100 >= year) { - year += 100 * (maxyear / 100); - } else { - year += 100 * ((maxyear / 100) - 1); - } - year *= 10000; - year += mmdd; - currField.setInt(year); - return currField; - } - - // cob_intr_day_to_yyyydddの実装 - /** - * TODO: 準備中 - * - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcDayToYyyyddd(int params, AbstractCobolField... fields) { - int year; - int days; - int interval; - int xqtyear; - int maxyear; - LocalDateTime timeptr; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - year = fields[0].getInt(); - days = year % 1000; - year /= 1000; - if (params > 1) { - interval = fields[1].getInt(); - } else { - interval = 50; - } - if (params > 2) { - xqtyear = fields[2].getInt(); - } else { - timeptr = CobolUtil.localtime(); - xqtyear = 1900 + timeptr.getDayOfYear(); - } - - if (year < 0 || year > 999999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - if (xqtyear < 1601 || xqtyear > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - maxyear = xqtyear + interval; - if (maxyear < 1700 || maxyear > 9999) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - if (maxyear % 100 >= year) { - year += 100 * (maxyear / 100); - } else { - year += 100 * ((maxyear / 100) - 1); - } - year *= 1000; - year += days; - currField.setInt(year); - return currField; - } - - // cob_intr_exception_fileの実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExceptionFile() { - int flen; - byte[] data; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(0, (CobolDataStorage) null, attr); - if (CobolRuntimeException.getException() == 0 - || (CobolRuntimeException.getExceptionCode() & 0x0500) != 0x0500) { - field.setSize(2); - makeFieldEntry(field); - currField.memcpy(byteArray00, 2); - } else { - flen = CobolFile.errorFile.getSelectName().length(); - field.setSize(flen + 2); - makeFieldEntry(field); - data = new byte[2 + flen]; - System.arraycopy(CobolFile.errorFile.getFileStatus(), 0, data, 0, 2); - System.arraycopy(CobolFile.errorFile.getSelectName().getBytes(), 0, data, 2, flen); - currField.setDataStorage(new CobolDataStorage(data)); - } - return currField; - } - - // cob_intr_exception_locationの実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExceptionLocation() { - String buff; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(0, (CobolDataStorage) null, attr); - currField = field; - if (CobolRuntimeException.getException() != 1 - || CobolRuntimeException.getOrigProgramId() == null) { - field.setSize(1); - makeFieldEntry(field); - currField.getDataStorage().setByte(0, ' '); - return currField; - } - if (CobolRuntimeException.getOrigSection() != null - && CobolRuntimeException.getOrigParagragh() != null) { - buff = - String.format( - "%s; %s OF %s; %d", - CobolRuntimeException.getOrigProgramId(), - CobolRuntimeException.getOrigParagragh(), - CobolRuntimeException.getOrigSection(), - CobolRuntimeException.getOrigLine()); - } else if (CobolRuntimeException.getOrigSection() != null) { - buff = - String.format( - "%s; %s; %d", - CobolRuntimeException.getOrigProgramId(), - CobolRuntimeException.getOrigSection(), - CobolRuntimeException.getOrigLine()); - } else if (CobolRuntimeException.getOrigParagragh() != null) { - buff = - String.format( - "%s; %s; %d", - CobolRuntimeException.getOrigProgramId(), - CobolRuntimeException.getOrigParagragh(), - CobolRuntimeException.getOrigLine()); - } else { - buff = - String.format( - "%s; ; %d", - CobolRuntimeException.getOrigProgramId(), CobolRuntimeException.getOrigLine()); - } - localeBuff = buff.getBytes(); - field.setSize(localeBuff.length); - currField.setDataStorage(new CobolDataStorage(localeBuff)); - return currField; - } - - // cob_intr_exception_statementの実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExceptionStatement() { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); - makeFieldEntry(field); - byte[] data; - if (CobolRuntimeException.getExceptionCode() != 0 - && CobolRuntimeException.getOrigStatement() != null) { - data = String.format("%-31s", CobolRuntimeException.getOrigStatement()).getBytes(); - } else { - data = String.format("%-31s", "").getBytes(); - } - currField.setDataStorage(new CobolDataStorage(data)); - return currField; - } - - private static final byte[] CONST_STRING_EXCEPTION_OBJECT = "EXCEPTION-OBJECT".getBytes(); - - // cob_intr_exception_statusの実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static AbstractCobolField funcExceptionStatus() { - byte[] exceptName; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); - makeFieldEntry(field); - byte[] data = String.format("%-31s", "").getBytes(); - currField.setDataStorage(new CobolDataStorage(data)); - if (CobolRuntimeException.getExceptionCode() != 0) { - try { - exceptName = - CobolRuntimeException.getExceptionName(CobolRuntimeException.getExceptionCode()) - .getBytes(); - } catch (Exception e) { - exceptName = CONST_STRING_EXCEPTION_OBJECT; - } - currField.memcpy(exceptName, exceptName.length); - } - return currField; - } - - // cob_intr_fraction_partの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcFractionPart(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 18, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - currField.moveFrom(srcfield); - return currField; - } - - // cob_intr_seconds_from_formatted_timeの実装 - /** - * TODO: 準備中 - * - * @param format TODO: 準備中 - * @param value TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSecondsFromFormattedTime( - AbstractCobolField format, AbstractCobolField value) { - int n; - int seconds = 0; - int minutes = 0; - int hours = 0; - boolean secondsSeen = false; - boolean minutesSeen = false; - boolean hoursSeen = false; - String p1; - int p2; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - if (value.getSize() < format.getSize()) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - currField.setInt(0); - return currField; - } - - CobolDataStorage formatData = format.getDataStorage(); - CobolDataStorage valueData = value.getDataStorage(); - - for (n = 0; n < format.getSize() - 1; n++) { - p1 = new String(formatData.getByteArray(n, 2)); - - if ("hh".equals(p1) && !hoursSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); - hours = p2; - hoursSeen = true; - continue; - } - if ("mm".equals(p1) && !minutesSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); - minutes = p2; - minutesSeen = true; - continue; - } - if ("ss".equals(p1) && !secondsSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); - seconds = p2; - secondsSeen = true; - continue; - } - } - - if (hoursSeen && minutesSeen && secondsSeen) { - seconds += hours * 3600 + minutes * 60; - } else { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - seconds = 0; - } - currField.setInt(seconds); - return currField; - } - - // cob_intr_seconds_past_midnightの実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSecondsPastMidnight() { - int seconds; - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - LocalDateTime currDate = LocalDateTime.now(); - seconds = currDate.getHour() * 3600 + currDate.getMinute() * 60 + currDate.getSecond(); - currField.setInt(seconds); - return currField; - } - - // cob_intr_signの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSign(AbstractCobolField srcfield) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 8, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - currField.setInt(0); - int n = srcfield.compareTo(currField); - if (n < 0) { - currField.setInt(-1); - } else if (n > 0) { - currField.setInt(1); - } - return currField; - } - - // cob_intr_stored_char_lengthの実装 - /** - * TODO: 準備中 - * - * @param srcfield TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcStoredCharLength(AbstractCobolField srcfield) { - int count; - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); - AbstractCobolField field = CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); - makeFieldEntry(field); - - CobolDataStorage storage = srcfield.getDataStorage(); - for (count = srcfield.getSize(); count > 0; count--) { - if (storage.getByte(count - 1) != ' ') { - break; - } - } - - currField.setInt(count); - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSubstitute( - int offset, int length, int params, AbstractCobolField... fields) { - int i, j, k; - int numreps = params / 2; - AbstractCobolField[] f1 = new AbstractCobolField[numreps]; - AbstractCobolField[] f2 = new AbstractCobolField[numreps]; - CobolDataStorage src = fields[0].getDataStorage(); - CobolDataStorage fData1; - int srcSize = fields[0].getSize(); - int fSize1; - StringBuilder rtn = new StringBuilder(); - - for (i = 0; i < params - 1; i++) { - if ((i % 2) == 0) { - f1[i / 2] = fields[i + 1]; - } else { - f2[i / 2] = fields[i + 1]; - } - } - - for (i = 0; i < srcSize; ) { - for (j = 0; j < numreps; j++) { - fData1 = f1[j].getDataStorage(); - fSize1 = f1[j].getSize(); - for (k = fSize1 - 1; k >= 0; k--) { - if (i + k >= srcSize || src.getByte(i + k) != fData1.getByte(k)) { - break; - } - } - if (k < 0) { - rtn.append(f2[j].getString()); - i += fSize1; - break; - } - } - if (j == numreps) { - rtn.append((char) src.getByte(i)); - i++; - } - } - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = - CobolFieldFactory.makeCobolField(rtn.length(), (CobolDataStorage) null, attr); - makeFieldEntry(field); - currField.setDataStorage(new CobolDataStorage(rtn.toString())); - - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param params TODO: 準備中 - * @param fields TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcSubstituteCase( - int offset, int length, int params, AbstractCobolField... fields) { - int i, j, k; - int numreps = params / 2; - AbstractCobolField[] f1 = new AbstractCobolField[numreps]; - AbstractCobolField[] f2 = new AbstractCobolField[numreps]; - CobolDataStorage src = fields[0].getDataStorage(); - CobolDataStorage fData1; - int srcSize = fields[0].getSize(); - int fSize1; - StringBuilder rtn = new StringBuilder(); - - for (i = 0; i < params - 1; i++) { - if (i % 2 == 0) { - f1[i / 2] = fields[i + 1]; - } else { - f2[i / 2] = fields[i + 1]; - } - } - - for (i = 0; i < srcSize; ) { - for (j = 0; j < numreps; j++) { - fData1 = f1[j].getDataStorage(); - fSize1 = f1[j].getSize(); - for (k = fSize1 - 1; k >= 0; k--) { - if (i + k >= srcSize - || Character.toLowerCase((char) fData1.getByte(k)) - != Character.toLowerCase((char) src.getByte(i + k))) { - break; - } - } - if (k < 0) { - rtn.append(f2[j].getString()); - i += fSize1; - break; - } - } - if (j == numreps) { - rtn.append((char) src.getByte(i)); - i++; - } - } - - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField field = - CobolFieldFactory.makeCobolField(rtn.length(), (CobolDataStorage) null, attr); - makeFieldEntry(field); - - currField.setDataStorage(new CobolDataStorage(rtn.toString())); - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - // Equivalent to cob_intr_trim - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param direction TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcTrim( - int offset, int length, AbstractCobolField srcField, int direction) { - makeFieldEntry(srcField); - int i; - int srcFieldSize = srcField.getSize(); - CobolDataStorage srcStorage = srcField.getDataStorage(); - for (i = 0; i < srcFieldSize; ++i) { - if (srcStorage.getByte(i) != ' ') { - break; - } - } - if (i == srcFieldSize) { - currField.setSize(1); - currField.getDataStorage().setByte(0, (byte) ' '); - return currField; - } - int beginIndex = 0; - if (direction != 2) { - while (srcStorage.getByte(beginIndex) == ' ') { - ++beginIndex; - } - } - int endIndex = srcFieldSize - 1; - if (direction != 1) { - while (srcStorage.getByte(endIndex) == ' ') { - --endIndex; - } - } - CobolDataStorage currStorage = currField.getDataStorage(); - currField.setSize(endIndex - beginIndex + 1); - for (i = 0; i <= endIndex - beginIndex; ++i) { - currStorage.setByte(i, srcStorage.getByte(beginIndex + i)); - } - if (offset > 0) { - calcRefMod(currField, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleDate( - int offset, int length, AbstractCobolField srcField, int localeField) { - return funcLocaleDate(offset, length, srcField, null); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleDate( - int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { - AbstractCobolField field = - CobolFieldFactory.makeCobolField( - 0, - (CobolDataStorage) null, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); - int inDate; - - // Convert the input field to an integer - if (srcField.getAttribute().isTypeNumeric()) { - inDate = srcField.getInt(); - } else { - if (srcField.getSize() < 8) { - return errorFuncLocaleDate(field); - } - int p = 0; - inDate = 0; - for (int len = 0; len < 8; ++len, ++p) { - char c = (char) srcField.getDataStorage().getByte(p); - if ('0' <= c && c <= '9') { - inDate = inDate * 10 + (c - '0'); - } else { - return errorFuncLocaleDate(field); - } - } - } - - // Calculate the year, month, and days - int year = inDate / 10000; - if (year < 1601 || year > 9999) { - return errorFuncLocaleDate(field); - } - inDate %= 10000; - - int month = inDate / 100; - if (month < 1 || month > 12) { - return errorFuncLocaleDate(field); - } - - int days = inDate % 100; - if (days < 1 || days > 31) { - return errorFuncLocaleDate(field); - } - - if (isLeapYear(year)) { - if (days > leapMonthDays[month]) { - return errorFuncLocaleDate(field); - } - } else { - if (days > normalMonthDays[month]) { - return errorFuncLocaleDate(field); - } - } - - // Create the date string - Calendar cal = Calendar.getInstance(); - cal.set(year, month - 1, days); - - DateFormat df; - if (localeField != null) { - Locale locale = new Locale(localeField.getString()); - df = DateFormat.getDateInstance(DateFormat.SHORT, locale); - } else { - df = DateFormat.getDateInstance(DateFormat.SHORT); - } - String dateString = df.format(cal.getTime()); - - // Return the result - field.setSize(dateString.length()); - makeFieldEntry(field); - currField.getDataStorage().memcpy(dateString.getBytes()); - if (offset > 0) { - calcRefMod(field, offset, length); - } - return currField; - } - - private static AbstractCobolField errorFuncLocaleDate(AbstractCobolField field) { - field.setSize(10); - makeFieldEntry(field); - currField.getDataStorage().memset((byte) '0', 10); - CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleTime( - int offset, int length, AbstractCobolField srcField, int localeField) { - return funcLocaleTime(offset, length, srcField, null); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleTime( - int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { - AbstractCobolField field = - CobolFieldFactory.makeCobolField( - 0, - (CobolDataStorage) null, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); - int inTime; - - // Convert the input field to an integer - if (srcField.getAttribute().isTypeNumeric()) { - inTime = srcField.getInt(); - } else { - if (srcField.getSize() < 6) { - return errorFuncLocaleDate(field); - } - int p = 0; - inTime = 0; - for (int len = 0; len < 6; ++len, ++p) { - char c = (char) srcField.getDataStorage().getByte(p); - if ('0' <= c && c <= '9') { - inTime = inTime * 10 + (c - '0'); - } else { - return errorFuncLocaleDate(field); - } - } - } - - // Calculate the hours, minutes, and seconds - int hours = inTime / 10000; - if (hours < 0 || hours > 24) { - return errorFuncLocaleDate(field); - } - inTime %= 10000; - - int minutes = inTime / 100; - if (minutes < 0 || minutes > 59) { - return errorFuncLocaleDate(field); - } - - int seconds = inTime % 100; - if (seconds < 0 || seconds > 59) { - return errorFuncLocaleDate(field); - } - - // Create the time string - LocalTime time = LocalTime.of(hours, minutes, seconds); - - DateTimeFormatter formatter; - String pattern = "HH:mm:ss"; - if (localeField != null) { - Locale locale = new Locale(localeField.getString()); - formatter = DateTimeFormatter.ofPattern(pattern, locale); - } else { - formatter = DateTimeFormatter.ofPattern(pattern); - } - String timeString = time.format(formatter); - - // Return the result - field.setSize(timeString.length()); - makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); - if (offset > 0) { - calcRefMod(field, offset, length); - } - return currField; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleTimeFromSeconds( - int offset, int length, AbstractCobolField srcField, int localeField) { - return funcLocaleTime(offset, length, srcField, null); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param srcField TODO: 準備中 - * @param localeField TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField funcLocaleTimeFromSeconds( - int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { - AbstractCobolField field = - CobolFieldFactory.makeCobolField( - 0, - (CobolDataStorage) null, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); - int inTime; - - // Convert the input field to an integer - if (srcField.getAttribute().isTypeNumeric()) { - inTime = srcField.getInt(); - } else { - return errorFuncLocaleDate(field); - } - - // Calculate the hours, minutes, and seconds - int hours = inTime / 3600; - inTime %= 3600; - int minutes = inTime / 60; - int seconds = inTime % 60; - - // Create the time string - LocalTime time = LocalTime.of(hours, minutes, seconds); - - DateTimeFormatter formatter; - String pattern = "HH:mm:ss"; - if (localeField != null) { - Locale locale = new Locale(localeField.getString()); - formatter = DateTimeFormatter.ofPattern(pattern, locale); - } else { - formatter = DateTimeFormatter.ofPattern(pattern); - } - String timeString = time.format(formatter); - - // Return the result - field.setSize(timeString.length()); - makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); - if (offset > 0) { - calcRefMod(field, offset, length); - } - return currField; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import java.math.BigDecimal; +import java.text.DateFormat; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Locale; +import java.util.Random; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolDecimal; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; +import jp.osscons.opensourcecobol.libcobj.data.CobolNationalField; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; +import jp.osscons.opensourcecobol.libcobj.file.CobolFile; + +/** TODO: 準備中 */ +public class CobolIntrinsic { + + private static int[] normalDays = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; + private static int[] leapDays = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366}; + private static int[] normalMonthDays = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + private static int[] leapMonthDays = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + private static final int DEPTH_LEVEL = 8; + private static final int sizeOfDouble = 8; + private static int currEntry = 0; + private static AbstractCobolField currField = null; + private static AbstractCobolField[] calcField = new AbstractCobolField[DEPTH_LEVEL]; + private static Random random = new Random(); + private static byte[] localeBuff; + private static final byte[] byteArray00 = "00".getBytes(); + + /** libcob/intrinsicのmake_double_entryの実装 */ + private static void makeDoubleEntry() { + CobolDataStorage s = new CobolDataStorage(sizeOfDouble + 1); + + CobolFieldAttribute newAttr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE, + 18, + 9, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField newField = CobolFieldFactory.makeCobolField(sizeOfDouble, s, newAttr); + + calcField[currEntry] = newField; + currField = newField; + ++currEntry; + if (currEntry >= DEPTH_LEVEL) { + currEntry = 0; + } + } + + /** libcob/intrinsicのmake_field_entryの実装 */ + private static void makeFieldEntry(AbstractCobolField f) { + AbstractCobolField newField = + CobolFieldFactory.makeCobolField( + f.getSize(), new CobolDataStorage(f.getSize() + 1), f.getAttribute()); + calcField[currEntry] = newField; + currField = calcField[currEntry]; + + ++currEntry; + if (currEntry >= DEPTH_LEVEL) { + currEntry = 0; + } + } + + /** + * libcob/intrinsicのcob_intr_ordの実装 + * + * @param year TODO: 準備中 + * @return TODO: 準備中 + */ + private static boolean isLeapYear(int year) { + return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)); + } + + // libcob/intrinsicのcob_init_intrinsicの実装 + /** TODO: 準備中 */ + public static void init() { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + for (int i = 0; i < DEPTH_LEVEL; ++i) { + calcField[i] = CobolFieldFactory.makeCobolField(256, new CobolDataStorage(256), attr); + } + } + + // libcob/intrinsicのcob_intr_get_doubleの実装 + /** + * TODO: 準備中 + * + * @param d + * @return + */ + private static double intrGetDouble(CobolDecimal d) { + double v = d.getValue().doubleValue(); + int n = d.getScale(); + for (int i = 0; i < Math.abs(n); ++i) { + if (n > 0) { + v /= 10; + } else { + v *= 10; + } + } + return v; + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + */ + private static void calcRefMod(AbstractCobolField f, int offset, int length) { + if (offset <= f.getSize()) { + int calcoff = offset - 1; + int size = f.getSize() - calcoff; + if (length > 0 && length < size) { + size = length; + } + f.setSize(size); + if (calcoff > 0) { + CobolDataStorage tmp = new CobolDataStorage(size); + tmp.memcpy(f.getDataStorage().getSubDataStorage(calcoff), size); + f.getDataStorage().memcpy(tmp, size); + } + } + } + + /** + * TODO: 準備中 + * + * @param f1 TODO: 準備中 + * @param op TODO: 準備中 + * @param f2 TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField intrBinop(AbstractCobolField f1, int op, AbstractCobolField f2) + throws CobolStopRunException { + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + d1.setField(f1); + d2.setField(f2); + + switch ((char) op) { + case '+': + d1.add(d2); + break; + case '-': + d1.sub(d2); + break; + case '*': + d1.mul(d2); + break; + case '/': + d1.div(d2); + break; + case '^': + d1.pow(d2); + break; + default: + break; + } + + int attrsign = 0; + if (d1.getValue().signum() < 0) { + attrsign = CobolFieldAttribute.COB_FLAG_HAVE_SIGN; + } else { + attrsign = 0; + } + + int size = sizeInBase10(d1.getValue()); + if (d1.getScale() > size) { + size = d1.getScale(); + } + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + d1.getScale(), + attrsign, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(size, (CobolDataStorage) null, attr); + makeFieldEntry(field); + d1.getDisplayField(currField, 0); + return currField; + } + + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLength(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + currField.setInt(srcfield.getSize()); + return currField; + } + + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcInteger(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolDecimal d1 = new CobolDecimal(); + d1.setField(srcfield); + if (d1.getValue().signum() >= 0) { + try { + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + boolean isScalePositive = d1.getScale() > 0; + BigDecimal val = d1.getValue(); + for (int i = 0; i < Math.abs(d1.getScale()); ++i) { + if (isScalePositive) { + val = val.divide(BigDecimal.TEN); + } else { + val = val.multiply(BigDecimal.TEN); + } + } + + // Rouding to negative infinity + BigDecimal[] vals = val.divideAndRemainder(BigDecimal.ONE); + if (vals[1].signum() != 0) { + vals[0] = vals[0].subtract(BigDecimal.ONE); + } + + try { + new CobolDecimal(vals[0], 0).getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcIntegerPart(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + makeFieldEntry(field); + currField.moveFrom(srcfield); + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcUpperCase( + int offset, int length, AbstractCobolField srcfield) { + makeFieldEntry(srcfield); + int size = srcfield.getSize(); + CobolDataStorage currStorage = currField.getDataStorage(); + CobolDataStorage srcStorage = srcfield.getDataStorage(); + for (int i = 0; i < size; ++i) { + currStorage.setByte(i, (byte) Character.toUpperCase(srcStorage.getByte(i))); + } + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLowerCase( + int offset, int length, AbstractCobolField srcfield) { + makeFieldEntry(srcfield); + int size = srcfield.getSize(); + CobolDataStorage currStorage = currField.getDataStorage(); + CobolDataStorage srcStorage = srcfield.getDataStorage(); + for (int i = 0; i < size; ++i) { + currStorage.setByte(i, (byte) Character.toLowerCase(srcStorage.getByte(i))); + } + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcReverse( + int offset, int length, AbstractCobolField srcfield) { + makeFieldEntry(srcfield); + int size = srcfield.getSize(); + CobolDataStorage currStorage = currField.getDataStorage(); + CobolDataStorage srcStorage = srcfield.getDataStorage(); + for (int i = 0; i < size; ++i) { + currStorage.setByte(i, srcStorage.getByte(srcfield.getSize() - i - 1)); + } + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param f TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcWhenCompiled( + int offset, int length, AbstractCobolField f) { + makeFieldEntry(f); + currField.getDataStorage().memcpy(f.getDataStorage(), f.getSize()); + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcCurrentDate(int offset, int length) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(21, (CobolDataStorage) null, attr); + makeFieldEntry(field); + // TODO Time Zoneを表示する機能を取り入れる + + String dateString = + String.format( + "%4d%02d%02d%02d%02d%02d%02d00000", + CobolUtil.cal.get(Calendar.YEAR), + CobolUtil.cal.get(Calendar.MONTH) + 1, + CobolUtil.cal.get(Calendar.DAY_OF_MONTH), + CobolUtil.cal.get(Calendar.HOUR_OF_DAY), + CobolUtil.cal.get(Calendar.MINUTE), + CobolUtil.cal.get(Calendar.SECOND), + CobolUtil.cal.get(Calendar.MILLISECOND) / 10); + currField.getDataStorage().memcpy(dateString.getBytes()); + + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcChar(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(1, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + int i = srcfield.getInt(); + if (i < 1 || i > 256) { + currField.getDataStorage().setByte(0, (byte) 0); + } else { + currField.getDataStorage().setByte(0, (byte) (i - 1)); + } + return currField; + } + + // libcob/intrinsicのcob_intr_ordの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcOrd(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + currField.setInt(srcfield.getDataStorage().getByte(0) + 1); + return currField; + } + + // libcob/intrinsicのcob_intr_date_of_integerの実装 + /** + * TODO: 準備中 + * + * @param srcdays TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcDateOfInteger(AbstractCobolField srcdays) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolRuntimeException.setException(0); + int days = srcdays.getInt(); + + if (days < 1 || days > 3067671) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.getDataStorage().memset((byte) '0', 8); + return currField; + } + + int leapyear = 365; + int baseyear = 1601; + while (days > leapyear) { + days -= leapyear; + ++baseyear; + if (isLeapYear(baseyear)) { + leapyear = 366; + } else { + leapyear = 365; + } + } + int i; + for (i = 0; i < 13; ++i) { + if (isLeapYear(baseyear)) { + if (days <= leapDays[i]) { + days -= leapDays[i - 1]; + break; + } + } else { + if (days <= normalDays[i]) { + days -= normalDays[i - 1]; + break; + } + } + } + String dateString = String.format("%04d%02d%02d", baseyear, i, days); + currField.getDataStorage().memcpy(dateString.getBytes()); + return currField; + } + + // libcob/intrinsicのcob_intr_day_of_integerの実装 + /** + * TODO: 準備中 + * + * @param srcdays TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcDayOfInteger(AbstractCobolField srcdays) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 7, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(7, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolRuntimeException.setException(0); + int days = srcdays.getInt(); + + if (days < 1 || days > 3067671) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.getDataStorage().memset((byte) '0', 8); + return currField; + } + + int leapyear = 365; + int baseyear = 1601; + while (days > leapyear) { + days -= leapyear; + ++baseyear; + if (isLeapYear((baseyear))) { + leapyear = 366; + } else { + leapyear = 365; + } + } + String dateString = String.format("%04d%03d", baseyear, days); + currField.getDataStorage().memcpy(dateString.getBytes()); + return currField; + } + + // libcob/intrinsicのcob_intr_integer_of_dateの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcIntegerOfDate(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolRuntimeException.setException(0); + int indate = srcfield.getInt(); + int year = indate / 10000; + if (year < 1601 || year > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + indate %= 10000; + int month = indate / 100; + if (month < 1 || month > 12) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + int days = indate % 100; + if (days < 1 || days > 31) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + if (isLeapYear(year)) { + if (days > leapMonthDays[month]) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + } else { + if (days > normalMonthDays[month]) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + } + + int totaldays = 0; + int baseyear = 1601; + while (baseyear != year) { + if (isLeapYear(baseyear)) { + totaldays += 366; + } else { + totaldays += 365; + } + ++baseyear; + } + + if (isLeapYear(baseyear)) { + totaldays += leapDays[month - 1]; + } else { + totaldays += normalDays[month - 1]; + } + + totaldays += days; + currField.setInt(totaldays); + return currField; + } + + // libcob/intrinsicのcob_intr_integer_of_dayの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcIntegerOfDay(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolRuntimeException.setException(0); + int indate = srcfield.getInt(); + int year = indate / 1000; + if (year < 1601 || year > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + int days = indate % 1000; + if (days < 1 || days > 365 + (isLeapYear(year) ? 1 : 0)) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + int totaldays = 0; + int baseyear = 1601; + while (baseyear != year) { + if (isLeapYear(baseyear)) { + totaldays += 366; + } else { + totaldays += 365; + } + ++baseyear; + } + totaldays += days; + currField.setInt(totaldays); + return currField; + } + + // libcob/intrinsicのcob_intr_integer_of_dayの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcFactorial(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 18, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolRuntimeException.setException(0); + int srcval = srcfield.getInt(); + if (srcval < 0) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + BigDecimal d = BigDecimal.ONE; + for (int i = 2; i <= srcval; ++i) { + d = d.multiply(new BigDecimal(i)); + } + try { + new CobolDecimal(d, 0).getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + private static CobolDecimal mathFunctionBefore1(AbstractCobolField srcfield) { + CobolDecimal d1 = new CobolDecimal(); + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 17, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + d1.setField(srcfield); + makeFieldEntry(field); + return d1; + } + + private static CobolDecimal mathFunctionBefore2(AbstractCobolField srcfield) { + CobolDecimal d1 = new CobolDecimal(); + d1.setField(srcfield); + makeDoubleEntry(); + return d1; + } + + private static AbstractCobolField mathFunctionAfter1(double mathd2) { + if (Double.isNaN(mathd2) + || mathd2 == Double.POSITIVE_INFINITY + || mathd2 == Double.NEGATIVE_INFINITY) { + currField.setInt(0); + return currField; + } + long result = (long) mathd2; + mathd2 -= result; + for (int i = 0; i < 17; ++i) { + mathd2 *= 10; + int tempres = (int) mathd2; + result *= 10; + result += tempres; + mathd2 -= tempres; + } + currField.getDataStorage().set(result); + return currField; + } + + private static AbstractCobolField mathFunctionAfter2(double mathd2) { + if (Double.isNaN(mathd2) + || mathd2 == Double.POSITIVE_INFINITY + || mathd2 == Double.NEGATIVE_INFINITY) { + currField.setInt(0); + return currField; + } + currField.getDataStorage().set(mathd2); + return currField; + } + + // libcob/intrinsicのcob_intr_expの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExp(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.pow(2.7182818284590452354, intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_exp10の実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExp10(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.pow(10, intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_absの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcAbs(AbstractCobolField srcfield) { + makeFieldEntry(srcfield); + CobolDecimal d1 = srcfield.getDecimal(); + d1.setValue(d1.getValue().abs()); + try { + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + // libcob/intrinsicのcob_intr_acosの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcAcos(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore1(srcfield); + double mathd2 = Math.acos(intrGetDouble(d1)); + return mathFunctionAfter1(mathd2); + } + + // libcob/intrinsicのcob_intr_asinの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcAsin(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore1(srcfield); + double mathd2 = Math.asin(intrGetDouble(d1)); + return mathFunctionAfter1(mathd2); + } + + // libcob/intrinsicのcob_intr_atanの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcAtan(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore1(srcfield); + double mathd2 = Math.atan(intrGetDouble(d1)); + return mathFunctionAfter1(mathd2); + } + + // libcob/intrinsicのcob_intr_cosの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcCos(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore1(srcfield); + double mathd2 = Math.cos(intrGetDouble(d1)); + return mathFunctionAfter1(mathd2); + } + + // libcob/intrinsicのcob_intr_logの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLog(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.log(intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_log10の実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLog10(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.log10(intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_sinの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSin(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore1(srcfield); + double mathd2 = Math.sin(intrGetDouble(d1)); + return mathFunctionAfter1(mathd2); + } + + // libcob/intrinsicのcob_intr_sqrtの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSqrt(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.sqrt(intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_tanの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcTan(AbstractCobolField srcfield) { + CobolDecimal d1 = mathFunctionBefore2(srcfield); + double mathd2 = Math.tan(intrGetDouble(d1)); + return mathFunctionAfter2(mathd2); + } + + // libcob/intrinsicのcob_intr_numvalの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcNumval(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + CobolDataStorage s = srcfield.getDataStorage(); + boolean sign = false; + boolean decimalSeen = false; + long llval = 0; + int integerDigits = 0; + int decimalDigits = 0; + StringBuilder integerBuff = new StringBuilder(); + StringBuilder decimalBuff = new StringBuilder(); + for (int i = 0; i < srcfield.getSize(); ++i) { + if (i < srcfield.getSize() - 1) { + if ((Character.toUpperCase(s.getByte(i)) == 'C' + && Character.toUpperCase(s.getByte(i + 1)) == 'R') + || (Character.toUpperCase(s.getByte(i)) == 'D' + && Character.toUpperCase(s.getByte(i + 1)) == 'B')) { + sign = true; + break; + } + } + char c = (char) s.getByte(i); + if (c == ' ' || c == '+') { + continue; + } + if (c == '-') { + sign = true; + continue; + } + if (c == CobolModule.getCurrentModule().decimal_point) { + decimalSeen = true; + continue; + } + if (c >= '0' && c <= '9') { + llval *= 10; + llval += c - '0'; + if (decimalSeen) { + decimalBuff.append(c); + decimalDigits++; + } else { + integerBuff.append(c); + integerDigits++; + } + } + if (integerDigits + decimalDigits > 30) { + break; + } + } + if (integerDigits > 0) { + integerBuff.setCharAt(0, '0'); + } + if (decimalDigits > 0) { + decimalBuff.setCharAt(0, '0'); + } + if (sign) { + llval = -llval; + } + if (integerDigits + decimalDigits <= 18) { + attr.setScale(decimalDigits); + makeFieldEntry(field); + currField.getDataStorage().set(llval); + } else { + String dataString = + String.format( + "%s%s.%s", + sign ? "-" : "", integerBuff.toString(), decimalBuff.toString()); + double val = Double.parseDouble(dataString); + makeDoubleEntry(); + currField.getDataStorage().set(val); + } + return currField; + } + + // libcob/intrinsicのcob_intr_numval_cの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @param currency TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcNumvalC( + AbstractCobolField srcfield, AbstractCobolField currency) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + boolean sign = false; + boolean decimalSeen = false; + long llval = 0; + int integerDigits = 0; + int decimalDigits = 0; + StringBuilder integerBuff = new StringBuilder(); + StringBuilder decimalBuff = new StringBuilder(); + + CobolDataStorage currencyData = null; + if (currency != null) { + if (currency.getSize() < srcfield.getSize()) { + currencyData = currency.getDataStorage(); + } + } + for (int i = 0; i < srcfield.getSize(); ++i) { + char c = (char) srcfield.getDataStorage().getByte(i); + if (i < srcfield.getSize() - 1) { + char cc = (char) srcfield.getDataStorage().getByte(i + 1); + if ((Character.toUpperCase(c) == 'C' && Character.toUpperCase(cc) == 'R') + || (Character.toUpperCase(c) == 'D' && Character.toUpperCase(cc) == 'B')) { + sign = true; + break; + } + } + if (currencyData != null) { + if (i < srcfield.getSize() - currency.getSize()) { + if (currencyData.memcmp( + srcfield.getDataStorage().getSubDataStorage(i), + currency.getSize()) + == 0) { + i += (currency.getSize() - 1); + continue; + } + } + } + if (c == ' ' || c == '+') { + continue; + } + if (c == '-') { + sign = true; + continue; + } + if (c == CobolModule.getCurrentModule().decimal_point) { + decimalSeen = true; + continue; + } + if (c == CobolModule.getCurrentModule().currency_symbol) { + continue; + } + if (c >= '0' && c <= '9') { + llval *= 10; + llval += c - '0'; + if (decimalSeen) { + decimalBuff.append(c); + decimalDigits++; + } else { + integerBuff.append(c); + integerDigits++; + } + } + if (integerDigits + decimalDigits > 30) { + break; + } + } + if (integerDigits > 0) { + integerBuff.setCharAt(0, '0'); + } + if (decimalDigits > 0) { + decimalBuff.setCharAt(0, '0'); + } + if (sign) { + llval = -llval; + } + if (integerDigits + decimalDigits <= 18) { + attr.setScale(decimalDigits); + makeFieldEntry(field); + currField.getDataStorage().set(llval); + } else { + String dataString = + String.format( + "%s%s.%s", + sign ? "-" : "", integerBuff.toString(), decimalBuff.toString()); + double val = Double.parseDouble(dataString); + makeDoubleEntry(); + currField.getDataStorage().set(val); + } + return currField; + } + + /** + * このメソッドは未実装 + * + * @param n このメソッドは未実装 + * @param currency このメソッドは未実装 + * @return null + */ + public static AbstractCobolField funcNumvalC(int n, AbstractCobolField currency) { + // TODO + return null; + } + + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcNumvalC(AbstractCobolField srcfield, int n) { + return funcNumvalC(srcfield, null); + } + + /** + * このメソッドは未実装 + * + * @param n このメソッドは未実装 + * @param m このメソッドは未実装 + * @return null + */ + public static AbstractCobolField funcNumvalC(int n, int m) { + // TODO + return null; + } + + // libcob/intrinsicのcob_intr_annuityの実装 + /** + * TODO: 準備中 + * + * @param srcfield1 TODO: 準備中 + * @param srcfield2 TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcAnnuity( + AbstractCobolField srcfield1, AbstractCobolField srcfield2) { + makeDoubleEntry(); + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + d1.setField(srcfield1); + d2.setField(srcfield2); + + double mathd1 = intrGetDouble(d1); + double mathd2 = intrGetDouble(d2); + if (mathd1 == 0) { + mathd1 = 1.0 / mathd2; + currField.getDataStorage().set(mathd1); + return currField; + } + + mathd1 /= (1.0 - Math.pow(mathd1 + 1.0, 0.0 - mathd2)); + currField.getDataStorage().set(mathd1); + return currField; + } + + private static int sizeInBase10(BigDecimal d1) { + String s = d1.toPlainString(); + int begin = s.charAt(0) == '-' ? 0 : -1; + int pointIndex = s.indexOf('.'); + int end = pointIndex < 0 ? s.length() : pointIndex; + return end - begin - 1; + } + + // libcob/intrinsicのcob_intr_sumの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSum(int params, AbstractCobolField... fields) { + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + d1.setValue(BigDecimal.ZERO); + + int scale = 0; + for (AbstractCobolField f : fields) { + if (f.getAttribute().getScale() > scale) { + scale = f.getAttribute().getScale(); + } + d2.setField(f); + d1.add(d2); + } + + int size = sizeInBase10(d1.getValue()); + AbstractCobolField field; + if (size < 19) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + field = CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + } else { + if (d1.getScale() > size) { + size = d1.getScale(); + } + if (scale > size) { + size = scale; + } + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + field = CobolFieldFactory.makeCobolField(size, (CobolDataStorage) null, attr); + } + makeFieldEntry(field); + try { + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + // libcob/intrinsicのcob_intr_ord_minの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcOrdMin(int params, AbstractCobolField... fields) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + if (fields.length <= 1) { + currField.setInt(0); + return currField; + } + + AbstractCobolField basef = fields[0]; + int ordmin = 0; + for (int i = 1; i < fields.length; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(basef) < 0) { + basef = f; + ordmin = i; + } + } + + currField.setLong((long) ordmin + 1); + return currField; + } + + // libcob/intrinsicのcob_intr_ord_maxの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcOrdMax(int params, AbstractCobolField... fields) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + if (fields.length <= 1) { + currField.setInt(0); + return currField; + } + + AbstractCobolField basef = fields[0]; + int ordmax = 0; + for (int i = 1; i < fields.length; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(basef) > 0) { + basef = f; + ordmax = i; + } + } + + currField.setLong((long) ordmax + 1); + return currField; + } + + // libcob/intrinsicのcob_intr_minの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcMin(int params, AbstractCobolField... fields) { + AbstractCobolField beasef = fields[0]; + for (int i = 1; i < fields.length; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(beasef) < 0) { + beasef = f; + } + } + + return beasef; + } + + // libcob/intrinsicのcob_intr_maxの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcMax(int params, AbstractCobolField... fields) { + AbstractCobolField beasef = fields[0]; + for (int i = 1; i < fields.length; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(beasef) > 0) { + beasef = f; + } + } + + return beasef; + } + + // libcob/intrinsicのcob_intr_midrangeの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcMidrange(int params, AbstractCobolField... fields) { + makeDoubleEntry(); + AbstractCobolField basemin = fields[0]; + AbstractCobolField basemax = fields[0]; + for (int i = 1; i < params; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(basemin) < 0) { + basemin = f; + } + if (f.compareTo(basemax) > 0) { + basemax = f; + } + } + + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + d1.setField(basemin); + d2.setField(basemax); + d1.add(d2); + d2 = new CobolDecimal(new BigDecimal(2), 0); + try { + d1.div(d2); + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + // libcob/intrinsicのcob_intr_medianの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcMedian(int params, AbstractCobolField... fields) { + if (fields.length == 1) { + return fields[0]; + } + + AbstractCobolField[] fieldAlloc = new AbstractCobolField[fields.length]; + + for (int i = 0; i < params; ++i) { + fieldAlloc[i] = fields[i]; + } + + Arrays.sort(fieldAlloc, (a, b) -> a.compareTo(b)); + int i = params / 2; + if (params % 2 != 0) { + return fieldAlloc[i]; + } else { + makeDoubleEntry(); + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + d1.setField(fieldAlloc[i]); + d2.setField(fieldAlloc[i - 1]); + d1.add(d2); + d2 = new CobolDecimal(new BigDecimal(2), 0); + try { + d1.div(d2); + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + } + + // libcob/intrinsicのcob_intr_medianの実装 + /** + * TODO: 準備中 + * + * @param pramas TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcMean(int pramas, AbstractCobolField... fields) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO); + CobolDecimal d2 = new CobolDecimal(); + + for (AbstractCobolField f : fields) { + d2.setField(f); + d1.add(d2); + } + + d2 = new CobolDecimal(new BigDecimal(fields.length), 0); + try { + d1.div(d2); + } catch (CobolStopRunException e) { + return null; + } + + CobolDataStorage storage = new CobolDataStorage(8); + field.setDataStorage(storage); + try { + d1.getField(field, 0); + } catch (CobolStopRunException e) { + return null; + } + long n = storage.longValue(); + int i = 0; + while (n != 0) { + n /= 10; + ++i; + } + field.setDataStorage(null); + if (i <= 18) { + attr.setScale(18 - i); + } + makeFieldEntry(field); + try { + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + // libcob/intrinsicのcob_intr_modの実装 + /** + * TODO: 準備中 + * + * @param srcfield1 TODO: 準備中 + * @param srcfield2 TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcMod( + AbstractCobolField srcfield1, AbstractCobolField srcfield2) + throws CobolStopRunException { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + makeFieldEntry(field); + + AbstractCobolField f1 = funcInteger(intrBinop(srcfield1, '/', srcfield2)); + d1.setField(srcfield2); + d2.setField(f1); + d2.mul(d1); + d1.setField(srcfield1); + d1.sub(d2); + try { + d1.getField(currField, 0); + } catch (CobolStopRunException e) { + return null; + } + return currField; + } + + // libcob/intrinsicのcob_intr_rangeの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcRange(int params, AbstractCobolField... fields) + throws CobolStopRunException { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + + AbstractCobolField basemin = fields[0]; + AbstractCobolField basemax = fields[0]; + for (int i = 1; i < fields.length; ++i) { + AbstractCobolField f = fields[i]; + if (f.compareTo(basemin) < 0) { + basemin = f; + } + if (f.compareTo(basemax) > 0) { + basemax = f; + } + } + + attr.setScale(basemin.getAttribute().getScale()); + if (basemax.getAttribute().getScale() > attr.getScale()) { + attr.setScale(basemax.getAttribute().getScale()); + } + makeFieldEntry(field); + d1.setField(basemax); + d2.setField(basemin); + d1.sub(d2); + d1.getField(currField, 0); + return currField; + } + + // libcob/intrinsicのcob_intr_remの実装 + /** + * TODO: 準備中 + * + * @param srcfield1 TODO: 準備中 + * @param srcfield2 TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcRem( + AbstractCobolField srcfield1, AbstractCobolField srcfield2) + throws CobolStopRunException { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + AbstractCobolField f1 = funcIntegerPart(intrBinop(srcfield1, '/', srcfield2)); + CobolDecimal d1 = new CobolDecimal(); + CobolDecimal d2 = new CobolDecimal(); + + d1.setField(srcfield2); + d2.setField(f1); + d2.mul(d1); + d1.setField(srcfield1); + d1.sub(d2); + + attr.setScale(srcfield1.getAttribute().getScale()); + if (srcfield2.getAttribute().getScale() > attr.getScale()) { + attr.setScale(srcfield2.getAttribute().getScale()); + } + makeFieldEntry(field); + d1.getField(currField, 0); + return currField; + } + + // libcob/intrinsicのcob_intr_randomの実装 + /** + * TODO: 準備中 + * + * @param prams TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcRandom(int prams, AbstractCobolField... fields) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + if (fields.length > 0) { + AbstractCobolField f = fields[0]; + int seed = f.getInt(); + if (seed < 0) { + seed = 0; + } + random.setSeed(seed); + } + + int r = random.nextInt(1000000001); + + int exp10 = 1; + int i = 0; + for (i = 0; i < 10; ++i) { + if (r / exp10 == 0) { + break; + } + exp10 *= 10; + } + if (i == 0) { + i = 1; + } + attr.setScale(i); + makeFieldEntry(field); + currField.getDataStorage().set((long) r); + return currField; + } + + // libcob/intrinsicのcob_intr_varianceの実装 + /** + * TODO: 準備中 + * + * @param prams TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcVariance(int prams, AbstractCobolField... fields) + throws CobolStopRunException { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + if (fields.length == 1) { + makeFieldEntry(field); + currField.setInt(0); + return currField; + } + + CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO, 0); + CobolDecimal d2 = new CobolDecimal(); + + for (AbstractCobolField f : fields) { + d2.setField(f); + d1.add(d2); + } + + d2.setValue(new BigDecimal(fields.length)); + d2.setScale(0); + try { + d1.div(d2); + } catch (CobolStopRunException e) { + return null; + } + + CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); + + for (AbstractCobolField f : fields) { + d2.setField(f); + d2.sub(d1); + d2.mul(d2); + d4.add(d2); + } + + CobolDecimal d3 = new CobolDecimal(new BigDecimal(fields.length), 0); + try { + d4.div(d3); + } catch (CobolStopRunException e) { + return null; + } + CobolDataStorage data = new CobolDataStorage(8); + field.setDataStorage(data); + d4.getField(field, 0); + long n = field.getLong(); + int i = 0; + while (n != 0) { + n /= 10; + ++i; + } + makeFieldEntry(field); + if (i <= 18) { + attr.setScale(18 - i); + } + d4.getField(currField, 0); + return currField; + } + + // libcob/intrinsicのcob_intr_standard_deviationの実装 + /** + * TODO: 準備中 + * + * @param prams TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcStandardDeviation(int prams, AbstractCobolField... fields) + throws CobolStopRunException { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + + makeDoubleEntry(); + + if (fields.length == 1) { + makeFieldEntry(field); + currField.setInt(0); + return currField; + } + + CobolDecimal d1 = new CobolDecimal(BigDecimal.ZERO, 0); + CobolDecimal d2 = new CobolDecimal(); + + for (AbstractCobolField f : fields) { + d2.setField(f); + d1.add(d2); + } + + d2.setValue(new BigDecimal(fields.length)); + d2.setScale(0); + try { + d1.div(d2); + } catch (CobolStopRunException e) { + return null; + } + + CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); + + for (AbstractCobolField f : fields) { + d2.setField(f); + d2.sub(d1); + d2.mul(d2); + d4.add(d2); + } + + CobolDecimal d3 = new CobolDecimal(new BigDecimal(fields.length), 0); + try { + d4.div(d3); + } catch (CobolStopRunException e) { + return null; + } + d4.getField(currField, 0); + return funcSqrt(currField); + } + + // libcob/intrinsicのcob_intr_present_valueの実装 + /** + * TODO: 準備中 + * + * @param prams TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static AbstractCobolField funcPresentValue(int prams, AbstractCobolField... fields) + throws CobolStopRunException { + makeDoubleEntry(); + if (fields.length < 2) { + System.err.println("Wrong number of parameters for FUNCTION PRESENT-VALUE"); + System.err.flush(); + currField.setInt(0); + return currField; + } + AbstractCobolField f = fields[0]; + CobolDecimal d1 = new CobolDecimal(); + d1.setField(f); + CobolDecimal d2 = new CobolDecimal(BigDecimal.ONE, 0); + d1.add(d2); + CobolDecimal d4 = new CobolDecimal(BigDecimal.ZERO, 0); + + for (int i = 1; i < fields.length; ++i) { + f = fields[i]; + d2.setField(f); + CobolDecimal d3 = new CobolDecimal(d1.getValue().add(BigDecimal.ZERO), d1.getScale()); + if (i > 1) { + CobolDecimal d5 = new CobolDecimal(new BigDecimal(i), 0); + d3.pow(d5); + } + d2.div(d3); + d4.add(d2); + } + + d4.getField(currField, 0); + return currField; + } + + // libcob/intrinsicのcob_intr_nationalの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcNational(AbstractCobolField srcfield) { + int size = srcfield.getSize(); + byte[] pdata = + CobolNationalField.han2zen( + srcfield.getDataStorage().getByteBuffer(size).array(), size); + int ndata = CobolNationalField.workReturnSize; + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NATIONAL, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(ndata, (CobolDataStorage) null, attr); + makeFieldEntry(field); + currField.getDataStorage().memcpy(pdata, ndata); + return currField; + } + + // cob_intr_combined_datetimeの実装 + /** + * TODO: 準備中 + * + * @param srcdays TODO: 準備中 + * @param srctime TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcCombinedDatetime( + AbstractCobolField srcdays, AbstractCobolField srctime) { + int srdays; + int srtime; + String str; + + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, 12, 5, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(12, (CobolDataStorage) null, attr); + makeFieldEntry(field); + CobolRuntimeException.setException(0); + srdays = srcdays.getInt(); + if (srdays < 1 || srdays > 3067671) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.getDataStorage().memset(0, 12); + return currField; + } + srtime = srctime.getInt(); + if (srtime < 1 || srtime > 86400) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.getDataStorage().memset(0, 12); + return currField; + } + str = String.format("%7d%5d", srdays, srtime); + byte[] buff = str.getBytes(); + for (int i = 0; i < buff.length; i++) { + if (buff[i] == ' ') { + buff[i] = '0'; + } + } + currField.getDataStorage().memcpy(buff); + return currField; + } + + // cob_intr_concatenateの実装 + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcConcatenate( + int offset, int length, int params, AbstractCobolField... fields) { + int calcsize = 0; + int i; + int index = 0; + int size; + byte[] data; + + for (i = 0; i < params; i++) { + calcsize += fields[i].getSize(); + } + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(calcsize, (CobolDataStorage) null, attr); + makeFieldEntry(field); + data = new byte[calcsize]; + for (i = 0; i < params; i++) { + size = fields[i].getSize(); + System.arraycopy( + fields[i].getDataStorage().getByteBuffer(size).array(), 0, data, index, size); + index += size; + } + currField.setDataStorage(new CobolDataStorage(data)); + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + // cob_intr_date_to_yyyymmddの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcDateToYyyymmdd(int params, AbstractCobolField... fields) { + int year; + int mmdd; + int interval; + int xqtyear; + int maxyear; + LocalDateTime timeptr; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + year = fields[0].getInt(); + mmdd = year % 10000; + year /= 10000; + if (params > 1) { + interval = fields[1].getInt(); + } else { + interval = 50; + } + if (params > 2) { + xqtyear = fields[2].getInt(); + } else { + timeptr = CobolUtil.localtime(); + xqtyear = 1900 + timeptr.getDayOfYear(); + } + if (year < 0 || year > 999999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + if (xqtyear < 1601 || xqtyear > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + maxyear = xqtyear + interval; + if (maxyear < 1700 || maxyear > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + if (maxyear % 100 >= year) { + year += 100 * (maxyear / 100); + } else { + year += 100 * ((maxyear / 100) - 1); + } + year *= 10000; + year += mmdd; + currField.setInt(year); + return currField; + } + + // cob_intr_day_to_yyyydddの実装 + /** + * TODO: 準備中 + * + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcDayToYyyyddd(int params, AbstractCobolField... fields) { + int year; + int days; + int interval; + int xqtyear; + int maxyear; + LocalDateTime timeptr; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + year = fields[0].getInt(); + days = year % 1000; + year /= 1000; + if (params > 1) { + interval = fields[1].getInt(); + } else { + interval = 50; + } + if (params > 2) { + xqtyear = fields[2].getInt(); + } else { + timeptr = CobolUtil.localtime(); + xqtyear = 1900 + timeptr.getDayOfYear(); + } + + if (year < 0 || year > 999999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + if (xqtyear < 1601 || xqtyear > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + maxyear = xqtyear + interval; + if (maxyear < 1700 || maxyear > 9999) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + if (maxyear % 100 >= year) { + year += 100 * (maxyear / 100); + } else { + year += 100 * ((maxyear / 100) - 1); + } + year *= 1000; + year += days; + currField.setInt(year); + return currField; + } + + // cob_intr_exception_fileの実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExceptionFile() { + int flen; + byte[] data; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(0, (CobolDataStorage) null, attr); + if (CobolRuntimeException.getException() == 0 + || (CobolRuntimeException.getExceptionCode() & 0x0500) != 0x0500) { + field.setSize(2); + makeFieldEntry(field); + currField.memcpy(byteArray00, 2); + } else { + flen = CobolFile.errorFile.getSelectName().length(); + field.setSize(flen + 2); + makeFieldEntry(field); + data = new byte[2 + flen]; + System.arraycopy(CobolFile.errorFile.getFileStatus(), 0, data, 0, 2); + System.arraycopy(CobolFile.errorFile.getSelectName().getBytes(), 0, data, 2, flen); + currField.setDataStorage(new CobolDataStorage(data)); + } + return currField; + } + + // cob_intr_exception_locationの実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExceptionLocation() { + String buff; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(0, (CobolDataStorage) null, attr); + currField = field; + if (CobolRuntimeException.getException() != 1 + || CobolRuntimeException.getOrigProgramId() == null) { + field.setSize(1); + makeFieldEntry(field); + currField.getDataStorage().setByte(0, ' '); + return currField; + } + if (CobolRuntimeException.getOrigSection() != null + && CobolRuntimeException.getOrigParagragh() != null) { + buff = + String.format( + "%s; %s OF %s; %d", + CobolRuntimeException.getOrigProgramId(), + CobolRuntimeException.getOrigParagragh(), + CobolRuntimeException.getOrigSection(), + CobolRuntimeException.getOrigLine()); + } else if (CobolRuntimeException.getOrigSection() != null) { + buff = + String.format( + "%s; %s; %d", + CobolRuntimeException.getOrigProgramId(), + CobolRuntimeException.getOrigSection(), + CobolRuntimeException.getOrigLine()); + } else if (CobolRuntimeException.getOrigParagragh() != null) { + buff = + String.format( + "%s; %s; %d", + CobolRuntimeException.getOrigProgramId(), + CobolRuntimeException.getOrigParagragh(), + CobolRuntimeException.getOrigLine()); + } else { + buff = + String.format( + "%s; ; %d", + CobolRuntimeException.getOrigProgramId(), + CobolRuntimeException.getOrigLine()); + } + localeBuff = buff.getBytes(); + field.setSize(localeBuff.length); + currField.setDataStorage(new CobolDataStorage(localeBuff)); + return currField; + } + + // cob_intr_exception_statementの実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExceptionStatement() { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); + makeFieldEntry(field); + byte[] data; + if (CobolRuntimeException.getExceptionCode() != 0 + && CobolRuntimeException.getOrigStatement() != null) { + data = String.format("%-31s", CobolRuntimeException.getOrigStatement()).getBytes(); + } else { + data = String.format("%-31s", "").getBytes(); + } + currField.setDataStorage(new CobolDataStorage(data)); + return currField; + } + + private static final byte[] CONST_STRING_EXCEPTION_OBJECT = "EXCEPTION-OBJECT".getBytes(); + + // cob_intr_exception_statusの実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static AbstractCobolField funcExceptionStatus() { + byte[] exceptName; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); + makeFieldEntry(field); + byte[] data = String.format("%-31s", "").getBytes(); + currField.setDataStorage(new CobolDataStorage(data)); + if (CobolRuntimeException.getExceptionCode() != 0) { + try { + exceptName = + CobolRuntimeException.getExceptionName( + CobolRuntimeException.getExceptionCode()) + .getBytes(); + } catch (Exception e) { + exceptName = CONST_STRING_EXCEPTION_OBJECT; + } + currField.memcpy(exceptName, exceptName.length); + } + return currField; + } + + // cob_intr_fraction_partの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcFractionPart(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 18, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(8, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + currField.moveFrom(srcfield); + return currField; + } + + // cob_intr_seconds_from_formatted_timeの実装 + /** + * TODO: 準備中 + * + * @param format TODO: 準備中 + * @param value TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSecondsFromFormattedTime( + AbstractCobolField format, AbstractCobolField value) { + int n; + int seconds = 0; + int minutes = 0; + int hours = 0; + boolean secondsSeen = false; + boolean minutesSeen = false; + boolean hoursSeen = false; + String p1; + int p2; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + if (value.getSize() < format.getSize()) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + currField.setInt(0); + return currField; + } + + CobolDataStorage formatData = format.getDataStorage(); + CobolDataStorage valueData = value.getDataStorage(); + + for (n = 0; n < format.getSize() - 1; n++) { + p1 = new String(formatData.getByteArray(n, 2)); + + if ("hh".equals(p1) && !hoursSeen) { + p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + hours = p2; + hoursSeen = true; + continue; + } + if ("mm".equals(p1) && !minutesSeen) { + p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + minutes = p2; + minutesSeen = true; + continue; + } + if ("ss".equals(p1) && !secondsSeen) { + p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + seconds = p2; + secondsSeen = true; + continue; + } + } + + if (hoursSeen && minutesSeen && secondsSeen) { + seconds += hours * 3600 + minutes * 60; + } else { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + seconds = 0; + } + currField.setInt(seconds); + return currField; + } + + // cob_intr_seconds_past_midnightの実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSecondsPastMidnight() { + int seconds; + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + LocalDateTime currDate = LocalDateTime.now(); + seconds = currDate.getHour() * 3600 + currDate.getMinute() * 60 + currDate.getSecond(); + currField.setInt(seconds); + return currField; + } + + // cob_intr_signの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSign(AbstractCobolField srcfield) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 8, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + currField.setInt(0); + int n = srcfield.compareTo(currField); + if (n < 0) { + currField.setInt(-1); + } else if (n > 0) { + currField.setInt(1); + } + return currField; + } + + // cob_intr_stored_char_lengthの実装 + /** + * TODO: 準備中 + * + * @param srcfield TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcStoredCharLength(AbstractCobolField srcfield) { + int count; + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 8, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(4, (CobolDataStorage) null, attr); + makeFieldEntry(field); + + CobolDataStorage storage = srcfield.getDataStorage(); + for (count = srcfield.getSize(); count > 0; count--) { + if (storage.getByte(count - 1) != ' ') { + break; + } + } + + currField.setInt(count); + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSubstitute( + int offset, int length, int params, AbstractCobolField... fields) { + int i, j, k; + int numreps = params / 2; + AbstractCobolField[] f1 = new AbstractCobolField[numreps]; + AbstractCobolField[] f2 = new AbstractCobolField[numreps]; + CobolDataStorage src = fields[0].getDataStorage(); + CobolDataStorage fData1; + int srcSize = fields[0].getSize(); + int fSize1; + StringBuilder rtn = new StringBuilder(); + + for (i = 0; i < params - 1; i++) { + if ((i % 2) == 0) { + f1[i / 2] = fields[i + 1]; + } else { + f2[i / 2] = fields[i + 1]; + } + } + + for (i = 0; i < srcSize; ) { + for (j = 0; j < numreps; j++) { + fData1 = f1[j].getDataStorage(); + fSize1 = f1[j].getSize(); + for (k = fSize1 - 1; k >= 0; k--) { + if (i + k >= srcSize || src.getByte(i + k) != fData1.getByte(k)) { + break; + } + } + if (k < 0) { + rtn.append(f2[j].getString()); + i += fSize1; + break; + } + } + if (j == numreps) { + rtn.append((char) src.getByte(i)); + i++; + } + } + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(rtn.length(), (CobolDataStorage) null, attr); + makeFieldEntry(field); + currField.setDataStorage(new CobolDataStorage(rtn.toString())); + + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param params TODO: 準備中 + * @param fields TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcSubstituteCase( + int offset, int length, int params, AbstractCobolField... fields) { + int i, j, k; + int numreps = params / 2; + AbstractCobolField[] f1 = new AbstractCobolField[numreps]; + AbstractCobolField[] f2 = new AbstractCobolField[numreps]; + CobolDataStorage src = fields[0].getDataStorage(); + CobolDataStorage fData1; + int srcSize = fields[0].getSize(); + int fSize1; + StringBuilder rtn = new StringBuilder(); + + for (i = 0; i < params - 1; i++) { + if (i % 2 == 0) { + f1[i / 2] = fields[i + 1]; + } else { + f2[i / 2] = fields[i + 1]; + } + } + + for (i = 0; i < srcSize; ) { + for (j = 0; j < numreps; j++) { + fData1 = f1[j].getDataStorage(); + fSize1 = f1[j].getSize(); + for (k = fSize1 - 1; k >= 0; k--) { + if (i + k >= srcSize + || Character.toLowerCase((char) fData1.getByte(k)) + != Character.toLowerCase((char) src.getByte(i + k))) { + break; + } + } + if (k < 0) { + rtn.append(f2[j].getString()); + i += fSize1; + break; + } + } + if (j == numreps) { + rtn.append((char) src.getByte(i)); + i++; + } + } + + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField field = + CobolFieldFactory.makeCobolField(rtn.length(), (CobolDataStorage) null, attr); + makeFieldEntry(field); + + currField.setDataStorage(new CobolDataStorage(rtn.toString())); + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + // Equivalent to cob_intr_trim + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param direction TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcTrim( + int offset, int length, AbstractCobolField srcField, int direction) { + makeFieldEntry(srcField); + int i; + int srcFieldSize = srcField.getSize(); + CobolDataStorage srcStorage = srcField.getDataStorage(); + for (i = 0; i < srcFieldSize; ++i) { + if (srcStorage.getByte(i) != ' ') { + break; + } + } + if (i == srcFieldSize) { + currField.setSize(1); + currField.getDataStorage().setByte(0, (byte) ' '); + return currField; + } + int beginIndex = 0; + if (direction != 2) { + while (srcStorage.getByte(beginIndex) == ' ') { + ++beginIndex; + } + } + int endIndex = srcFieldSize - 1; + if (direction != 1) { + while (srcStorage.getByte(endIndex) == ' ') { + --endIndex; + } + } + CobolDataStorage currStorage = currField.getDataStorage(); + currField.setSize(endIndex - beginIndex + 1); + for (i = 0; i <= endIndex - beginIndex; ++i) { + currStorage.setByte(i, srcStorage.getByte(beginIndex + i)); + } + if (offset > 0) { + calcRefMod(currField, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleDate( + int offset, int length, AbstractCobolField srcField, int localeField) { + return funcLocaleDate(offset, length, srcField, null); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleDate( + int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { + AbstractCobolField field = + CobolFieldFactory.makeCobolField( + 0, + (CobolDataStorage) null, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); + int inDate; + + // Convert the input field to an integer + if (srcField.getAttribute().isTypeNumeric()) { + inDate = srcField.getInt(); + } else { + if (srcField.getSize() < 8) { + return errorFuncLocaleDate(field); + } + int p = 0; + inDate = 0; + for (int len = 0; len < 8; ++len, ++p) { + char c = (char) srcField.getDataStorage().getByte(p); + if ('0' <= c && c <= '9') { + inDate = inDate * 10 + (c - '0'); + } else { + return errorFuncLocaleDate(field); + } + } + } + + // Calculate the year, month, and days + int year = inDate / 10000; + if (year < 1601 || year > 9999) { + return errorFuncLocaleDate(field); + } + inDate %= 10000; + + int month = inDate / 100; + if (month < 1 || month > 12) { + return errorFuncLocaleDate(field); + } + + int days = inDate % 100; + if (days < 1 || days > 31) { + return errorFuncLocaleDate(field); + } + + if (isLeapYear(year)) { + if (days > leapMonthDays[month]) { + return errorFuncLocaleDate(field); + } + } else { + if (days > normalMonthDays[month]) { + return errorFuncLocaleDate(field); + } + } + + // Create the date string + Calendar cal = Calendar.getInstance(); + cal.set(year, month - 1, days); + + DateFormat df; + if (localeField != null) { + Locale locale = new Locale(localeField.getString()); + df = DateFormat.getDateInstance(DateFormat.SHORT, locale); + } else { + df = DateFormat.getDateInstance(DateFormat.SHORT); + } + String dateString = df.format(cal.getTime()); + + // Return the result + field.setSize(dateString.length()); + makeFieldEntry(field); + currField.getDataStorage().memcpy(dateString.getBytes()); + if (offset > 0) { + calcRefMod(field, offset, length); + } + return currField; + } + + private static AbstractCobolField errorFuncLocaleDate(AbstractCobolField field) { + field.setSize(10); + makeFieldEntry(field); + currField.getDataStorage().memset((byte) '0', 10); + CobolRuntimeException.setException(CobolExceptionId.COB_EC_ARGUMENT_FUNCTION); + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleTime( + int offset, int length, AbstractCobolField srcField, int localeField) { + return funcLocaleTime(offset, length, srcField, null); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleTime( + int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { + AbstractCobolField field = + CobolFieldFactory.makeCobolField( + 0, + (CobolDataStorage) null, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); + int inTime; + + // Convert the input field to an integer + if (srcField.getAttribute().isTypeNumeric()) { + inTime = srcField.getInt(); + } else { + if (srcField.getSize() < 6) { + return errorFuncLocaleDate(field); + } + int p = 0; + inTime = 0; + for (int len = 0; len < 6; ++len, ++p) { + char c = (char) srcField.getDataStorage().getByte(p); + if ('0' <= c && c <= '9') { + inTime = inTime * 10 + (c - '0'); + } else { + return errorFuncLocaleDate(field); + } + } + } + + // Calculate the hours, minutes, and seconds + int hours = inTime / 10000; + if (hours < 0 || hours > 24) { + return errorFuncLocaleDate(field); + } + inTime %= 10000; + + int minutes = inTime / 100; + if (minutes < 0 || minutes > 59) { + return errorFuncLocaleDate(field); + } + + int seconds = inTime % 100; + if (seconds < 0 || seconds > 59) { + return errorFuncLocaleDate(field); + } + + // Create the time string + LocalTime time = LocalTime.of(hours, minutes, seconds); + + DateTimeFormatter formatter; + String pattern = "HH:mm:ss"; + if (localeField != null) { + Locale locale = new Locale(localeField.getString()); + formatter = DateTimeFormatter.ofPattern(pattern, locale); + } else { + formatter = DateTimeFormatter.ofPattern(pattern); + } + String timeString = time.format(formatter); + + // Return the result + field.setSize(timeString.length()); + makeFieldEntry(field); + currField.getDataStorage().memcpy(timeString.getBytes()); + if (offset > 0) { + calcRefMod(field, offset, length); + } + return currField; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleTimeFromSeconds( + int offset, int length, AbstractCobolField srcField, int localeField) { + return funcLocaleTime(offset, length, srcField, null); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param srcField TODO: 準備中 + * @param localeField TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField funcLocaleTimeFromSeconds( + int offset, int length, AbstractCobolField srcField, AbstractCobolField localeField) { + AbstractCobolField field = + CobolFieldFactory.makeCobolField( + 0, + (CobolDataStorage) null, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 10, 0, 0, null)); + int inTime; + + // Convert the input field to an integer + if (srcField.getAttribute().isTypeNumeric()) { + inTime = srcField.getInt(); + } else { + return errorFuncLocaleDate(field); + } + + // Calculate the hours, minutes, and seconds + int hours = inTime / 3600; + inTime %= 3600; + int minutes = inTime / 60; + int seconds = inTime % 60; + + // Create the time string + LocalTime time = LocalTime.of(hours, minutes, seconds); + + DateTimeFormatter formatter; + String pattern = "HH:mm:ss"; + if (localeField != null) { + Locale locale = new Locale(localeField.getString()); + formatter = DateTimeFormatter.ofPattern(pattern, locale); + } else { + formatter = DateTimeFormatter.ofPattern(pattern); + } + String timeString = time.format(formatter); + + // Return the result + field.setSize(timeString.length()); + makeFieldEntry(field); + currField.getDataStorage().memcpy(timeString.getBytes()); + if (offset > 0) { + calcRefMod(field, offset, length); + } + return currField; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolModule.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolModule.java index a9287f08..7df43c6f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolModule.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolModule.java @@ -1,201 +1,209 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import java.util.ArrayList; -import java.util.List; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; - -/** libcob/common.hのcob_moduleに対応するクラス */ -public class CobolModule { - - private static List moduleStack = new ArrayList(); - private static CobolModule currentModule; - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static CobolModule getCurrentModule() { - return currentModule; - } - - /** - * モジュールスタックに追加する - * - * @param module キューに追加するモジュール - */ - public static void push(CobolModule module) { - currentModule = module; - moduleStack.add(module); - } - - /** モジュールスタックからモジュールを取り除く */ - public static void pop() { - currentModule = moduleStack.remove(moduleStack.size() - 1); - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @return TODO: 準備中 - */ - public static int calledBy(CobolDataStorage data) { - AbstractCobolField param = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); - if (param != null) { - if (moduleStack.size() >= 2) { - String calledProgramName = moduleStack.get(moduleStack.size() - 2).program_id; - if (calledProgramName == null) { - return -1; - } - int length = Math.min(param.getSize(), calledProgramName.length()); - param.getDataStorage().memcpy(calledProgramName, length); - } else { - param.getDataStorage().memset(' ', param.getSize()); - return 0; - } - } - return 1; - } - - /** - * モジュールキューが空かどうか - * - * @return TODO: 準備中 - */ - public static boolean isQueueEmpty() { - return moduleStack.isEmpty(); - } - - /** TODO: 準備中 */ - // private CobolModule next; - /** TODO: 準備中 */ - public CobolDataStorage collating_sequence; - /** TODO: 準備中 */ - // private AbstractCobolField cut_status; - /** TODO: 準備中 */ - // private AbstractCobolField cursor_pos; - /** TODO: 準備中 */ - public int display_sign; - /** TODO: 準備中 */ - public char decimal_point; - /** TODO: 準備中 */ - public char currency_symbol; - /** TODO: 準備中 */ - // private char numeric_separator; - /** TODO: 準備中 */ - public int flag_filename_mapping; - /** TODO: 準備中 */ - public int flag_binary_truncate; - /** TODO: 準備中 */ - public int flag_pretty_display; - /** TODO: 準備中 */ - // private int spare8; - /** TODO: 準備中 */ - private String program_id; - /** TODO: 準備中 */ - // private String packageName; - - /** TODO: 準備中 */ - public List cob_procedure_parameters; - - /** - * コンストラクタ - * - * @param next TODO: 準備中 - * @param collatingSequence TODO: 準備中 - * @param cutStatus TODO: 準備中 - * @param cursorPos TODO: 準備中 - * @param displaySign TODO: 準備中 - * @param decimalPoint TODO: 準備中 - * @param currencySymbol TODO: 準備中 - * @param numericSeparator TODO: 準備中 - * @param flagFilenameMapping TODO: 準備中 - * @param flagBinaryTruncate TODO: 準備中 - * @param flagPrettyDisplay TODO: 準備中 - * @param spare8 TODO: 準備中 - * @param programId TODO: 準備中 - */ - public CobolModule( - CobolModule next, - CobolDataStorage collatingSequence, - AbstractCobolField cutStatus, - AbstractCobolField cursorPos, - int displaySign, - char decimalPoint, - char currencySymbol, - char numericSeparator, - int flagFilenameMapping, - int flagBinaryTruncate, - int flagPrettyDisplay, - int spare8, - String programId) { - // this.next = next; - this.collating_sequence = collatingSequence; - // this.cut_status = cutStatus; - // this.cursor_pos = cursorPos; - this.display_sign = displaySign; - this.decimal_point = decimalPoint; - this.currency_symbol = currencySymbol; - // this.numeric_separator = numericSeparator; - this.flag_filename_mapping = flagFilenameMapping; - this.flag_binary_truncate = flagBinaryTruncate; - this.flag_pretty_display = flagPrettyDisplay; - // this.spare8 = spare8; - this.program_id = programId; - - this.cob_procedure_parameters = new ArrayList(); - } - - /** - * TODO 実装 - * - * @param programName TODO: 準備中 - */ - public void setProgramId(String programName) { - if (this.program_id != null) { - this.program_id = null; - } - this.program_id = programName; - } - - /** - * TODO: 準備中 - * - * @param field TODO: 準備中 - */ - public void setParameters(AbstractCobolField... field) { - cob_procedure_parameters.clear(); - for (AbstractCobolField f : field) { - cob_procedure_parameters.add(f); - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static int getDecimalPoint() { - return currentModule.decimal_point; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import java.util.ArrayList; +import java.util.List; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; + +/** libcob/common.hのcob_moduleに対応するクラス */ +public class CobolModule { + + private static List moduleStack = new ArrayList(); + private static CobolModule currentModule; + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static CobolModule getCurrentModule() { + return currentModule; + } + + /** + * モジュールスタックに追加する + * + * @param module キューに追加するモジュール + */ + public static void push(CobolModule module) { + currentModule = module; + moduleStack.add(module); + } + + /** モジュールスタックからモジュールを取り除く */ + public static void pop() { + currentModule = moduleStack.remove(moduleStack.size() - 1); + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @return TODO: 準備中 + */ + public static int calledBy(CobolDataStorage data) { + AbstractCobolField param = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); + if (param != null) { + if (moduleStack.size() >= 2) { + String calledProgramName = moduleStack.get(moduleStack.size() - 2).program_id; + if (calledProgramName == null) { + return -1; + } + int length = Math.min(param.getSize(), calledProgramName.length()); + param.getDataStorage().memcpy(calledProgramName, length); + } else { + param.getDataStorage().memset(' ', param.getSize()); + return 0; + } + } + return 1; + } + + /** + * モジュールキューが空かどうか + * + * @return TODO: 準備中 + */ + public static boolean isQueueEmpty() { + return moduleStack.isEmpty(); + } + + /** TODO: 準備中 */ + // private CobolModule next; + /** TODO: 準備中 */ + public CobolDataStorage collating_sequence; + + /** TODO: 準備中 */ + // private AbstractCobolField cut_status; + /** TODO: 準備中 */ + // private AbstractCobolField cursor_pos; + /** TODO: 準備中 */ + public int display_sign; + + /** TODO: 準備中 */ + public char decimal_point; + + /** TODO: 準備中 */ + public char currency_symbol; + + /** TODO: 準備中 */ + // private char numeric_separator; + /** TODO: 準備中 */ + public int flag_filename_mapping; + + /** TODO: 準備中 */ + public int flag_binary_truncate; + + /** TODO: 準備中 */ + public int flag_pretty_display; + + /** TODO: 準備中 */ + // private int spare8; + /** TODO: 準備中 */ + private String program_id; + + /** TODO: 準備中 */ + // private String packageName; + + /** TODO: 準備中 */ + public List cob_procedure_parameters; + + /** + * コンストラクタ + * + * @param next TODO: 準備中 + * @param collatingSequence TODO: 準備中 + * @param cutStatus TODO: 準備中 + * @param cursorPos TODO: 準備中 + * @param displaySign TODO: 準備中 + * @param decimalPoint TODO: 準備中 + * @param currencySymbol TODO: 準備中 + * @param numericSeparator TODO: 準備中 + * @param flagFilenameMapping TODO: 準備中 + * @param flagBinaryTruncate TODO: 準備中 + * @param flagPrettyDisplay TODO: 準備中 + * @param spare8 TODO: 準備中 + * @param programId TODO: 準備中 + */ + public CobolModule( + CobolModule next, + CobolDataStorage collatingSequence, + AbstractCobolField cutStatus, + AbstractCobolField cursorPos, + int displaySign, + char decimalPoint, + char currencySymbol, + char numericSeparator, + int flagFilenameMapping, + int flagBinaryTruncate, + int flagPrettyDisplay, + int spare8, + String programId) { + // this.next = next; + this.collating_sequence = collatingSequence; + // this.cut_status = cutStatus; + // this.cursor_pos = cursorPos; + this.display_sign = displaySign; + this.decimal_point = decimalPoint; + this.currency_symbol = currencySymbol; + // this.numeric_separator = numericSeparator; + this.flag_filename_mapping = flagFilenameMapping; + this.flag_binary_truncate = flagBinaryTruncate; + this.flag_pretty_display = flagPrettyDisplay; + // this.spare8 = spare8; + this.program_id = programId; + + this.cob_procedure_parameters = new ArrayList(); + } + + /** + * TODO 実装 + * + * @param programName TODO: 準備中 + */ + public void setProgramId(String programName) { + if (this.program_id != null) { + this.program_id = null; + } + this.program_id = programName; + } + + /** + * TODO: 準備中 + * + * @param field TODO: 準備中 + */ + public void setParameters(AbstractCobolField... field) { + cob_procedure_parameters.clear(); + for (AbstractCobolField f : field) { + cob_procedure_parameters.add(f); + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static int getDecimalPoint() { + return currentModule.decimal_point; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolString.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolString.java index 038dff26..074779ee 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolString.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolString.java @@ -1,588 +1,598 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -class Dlm { - public AbstractCobolField dlm; - public int all; -} - -/** TODO: 準備中 */ -public class CobolString { - private static final int DLM_DEFAULT_NUM = 8; - - private static int udlmCount = 0; - - private static AbstractCobolField stringDst; - private static AbstractCobolField stringPtr; - private static AbstractCobolField stringDlm; - private static AbstractCobolField stringDstCopy; - private static AbstractCobolField stringPtrCopy; - private static AbstractCobolField stringDlmCopy; - private static int stringOffset; - - private static Dlm[] dlmList; - private static AbstractCobolField unstringSrc; - private static AbstractCobolField unstringPtr; - private static AbstractCobolField unstringSrcCopy; - private static AbstractCobolField unstringPtrCopy; - private static int unstringOffset; - private static int unstringCount; - private static int unstringNdlms; - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param ptr TODO: 準備中 - */ - public static void stringInit(int dst, AbstractCobolField ptr) { - stringInit(null, ptr); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param ptr TODO: 準備中 - */ - public static void stringInit(AbstractCobolField dst, int ptr) { - stringInit(dst, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param ptr TODO: 準備中 - */ - public static void stringInit(int dst, int ptr) { - stringInit(null, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param ptr TODO: 準備中 - */ - public static void stringInit(AbstractCobolField dst, AbstractCobolField ptr) { - stringDstCopy = dst; - stringDst = stringDstCopy; - stringPtr = null; - if (ptr != null) { - stringPtrCopy = ptr; - stringPtr = stringPtrCopy; - } - stringOffset = 0; - CobolRuntimeException.setException(0); - - if (stringPtr != null) { - stringOffset = stringPtr.getInt() - 1; - if (stringOffset < 0 || stringOffset >= stringDst.getSize()) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_STRING); - } - } - - switch (stringDst.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - stringOffset *= 2; - break; - default: - break; - } - } - - /** - * TODO: 準備中 - * - * @param dlm TODO: 準備中 - */ - public static void stringDelimited(int dlm) { - stringDelimited(null); - } - - /** - * TODO: 準備中 - * - * @param dlm TODO: 準備中 - */ - public static void stringDelimited(AbstractCobolField dlm) { - switch (stringDst.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - if (dlm == CobolConstant.quote) { - dlm = CobolConstant.zenQuote; - } else if (dlm == CobolConstant.space) { - dlm = CobolConstant.zenSpace; - } else if (dlm == CobolConstant.zero) { - dlm = CobolConstant.zenZero; - } - break; - default: - break; - } - stringDlm = null; - if (dlm != null) { - stringDlmCopy = dlm; - stringDlm = stringDlmCopy; - } - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public static void stringAppend(int src) { - stringAppend(null); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public static void stringAppend(AbstractCobolField src) { - if (CobolRuntimeException.code != 0) { - return; - } - - int srcSize = src.getSize(); - if (stringDlm != null) { - int size = srcSize - stringDlm.getSize() + 1; - CobolDataStorage srcData = src.getDataStorage(); - CobolDataStorage dlmData = stringDlm.getDataStorage(); - int dlmSize = stringDlm.getSize(); - for (int i = 0; i < size; ++i) { - if (srcData.getSubDataStorage(i).memcmp(dlmData, dlmSize) == 0) { - srcSize = i; - break; - } - } - } - - if (srcSize <= stringDst.getSize() - stringOffset) { - stringDst - .getDataStorage() - .getSubDataStorage(stringOffset) - .memcpy(src.getDataStorage(), srcSize); - stringOffset += srcSize; - } else { - int size = stringDst.getSize() - stringOffset; - stringDst.getDataStorage().getSubDataStorage(stringOffset).memcpy(src.getDataStorage(), size); - stringOffset += size; - CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_STRING); - } - } - - /** TODO: 準備中 */ - public static void stringFinish() { - int type = stringDst.getAttribute().getType(); - if (type == CobolFieldAttribute.COB_TYPE_NATIONAL - || type == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { - - stringOffset /= 2; - } - if (stringPtr != null) { - stringPtr.setInt(stringOffset + 1); - } - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param ptr TODO: 準備中 - * @param numDlm TODO: 準備中 - */ - public static void unstringInit(int src, int ptr, int numDlm) { - unstringInit(null, null, numDlm); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param ptr TODO: 準備中 - * @param numDlm TODO: 準備中 - */ - public static void unstringInit(AbstractCobolField src, int ptr, int numDlm) { - unstringInit(src, null, numDlm); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param ptr TODO: 準備中 - * @param numDlm TODO: 準備中 - */ - public static void unstringInit(int src, AbstractCobolField ptr, int numDlm) { - unstringInit(null, ptr, numDlm); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param ptr TODO: 準備中 - * @param numDlm TODO: 準備中 - */ - public static void unstringInit(AbstractCobolField src, AbstractCobolField ptr, int numDlm) { - unstringSrcCopy = src; - unstringSrc = unstringSrcCopy; - unstringPtr = null; - if (ptr != null) { - unstringPtrCopy = ptr; - unstringPtr = unstringPtrCopy; - } - - unstringOffset = 0; - unstringCount = 0; - unstringNdlms = 0; - CobolRuntimeException.setException(0); - - if (dlmList == null) { - if (numDlm <= DLM_DEFAULT_NUM) { - dlmList = new Dlm[DLM_DEFAULT_NUM]; - udlmCount = DLM_DEFAULT_NUM; - } else { - dlmList = new Dlm[numDlm]; - udlmCount = numDlm; - } - } else { - if (numDlm > udlmCount) { - dlmList = new Dlm[numDlm]; - udlmCount = numDlm; - } - } - - for (int i = 0; i < dlmList.length; ++i) { - dlmList[i] = new Dlm(); - } - - if (unstringPtr != null) { - unstringOffset = unstringPtr.getInt() - 1; - if (unstringOffset < 0 || unstringOffset >= unstringSrc.getSize()) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_UNSTRING); - } - } - - switch (unstringSrc.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - unstringOffset *= 2; - break; - default: - break; - } - } - - /** - * TODO: 準備中 - * - * @param dlm TODO: 準備中 - * @param all TODO: 準備中 - */ - public static void unstringDelimited(int dlm, int all) { - unstringDelimited(null, all); - } - - /** - * TODO: 準備中 - * - * @param dlm TODO: 準備中 - * @param all TODO: 準備中 - */ - public static void unstringDelimited(AbstractCobolField dlm, int all) { - AbstractCobolField addDlm = null; - - switch (unstringSrc.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - if (dlm == CobolConstant.quote) { - dlm = CobolConstant.zenQuote; - } else if (dlm == CobolConstant.space) { - dlm = CobolConstant.zenSpace; - addDlm = CobolConstant.zenBlank; - } else if (dlm == CobolConstant.zero) { - dlm = CobolConstant.zenZero; - } - break; - default: - break; - } - - dlmList[unstringNdlms].dlm = dlm; - dlmList[unstringNdlms].all = all; - unstringNdlms++; - - if (addDlm != null) { - dlmList[unstringNdlms].dlm = addDlm; - dlmList[unstringNdlms].all = all; - unstringNdlms++; - } - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(AbstractCobolField dst, AbstractCobolField dlm, int cnt) { - unstringInto(dst, dlm, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(AbstractCobolField dst, int dlm, AbstractCobolField cnt) { - unstringInto(dst, null, cnt); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(AbstractCobolField dst, int dlm, int cnt) { - unstringInto(dst, null, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(int dst, int dlm, int cnt) { - unstringInto(null, null, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(int dst, AbstractCobolField dlm, int cnt) { - unstringInto(null, dlm, null); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(int dst, int dlm, AbstractCobolField cnt) { - unstringInto(null, null, cnt); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto(int dst, AbstractCobolField dlm, AbstractCobolField cnt) { - unstringInto(null, dlm, cnt); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param dlm TODO: 準備中 - * @param cnt TODO: 準備中 - */ - public static void unstringInto( - AbstractCobolField dst, AbstractCobolField dlm, AbstractCobolField cnt) { - if (CobolExceptionInfo.code != 0) { - return; - } - if (unstringOffset >= unstringSrc.getSize()) { - return; - } - - CobolDataStorage srcData = unstringSrc.getDataStorage(); - int start = unstringOffset; - int matchSize = 0; - int dlmSize = 0; - CobolDataStorage dlmData = null; - if (unstringNdlms == 0) { - matchSize = Math.min(dst.getFieldSize(), unstringSrc.getSize() - unstringOffset); - dst.moveFrom( - CobolFieldFactory.makeCobolField( - matchSize, - srcData.getSubDataStorage(unstringOffset), - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); - unstringOffset += matchSize; - } else { - int srSize = unstringSrc.getSize(); - int s = srSize; - boolean brkpt = false; - for (int p = start; p < s; ++p) { - for (int i = 0; i < unstringNdlms; ++i) { - int dlsize = dlmList[i].dlm.getSize(); - CobolDataStorage dp = dlmList[i].dlm.getDataStorage(); - if (p + dlsize > s) { - continue; - } - if (srcData.getSubDataStorage(p).memcmp(dp, dlsize) == 0) { - matchSize = (p - start); - dst.moveFrom( - CobolFieldFactory.makeCobolField( - matchSize, - srcData.getSubDataStorage(start), - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); - unstringOffset += matchSize + dlsize; - dlmData = dp; - dlmSize = dlsize; - if (dlmList[i].all != 0) { - for (p += dlsize; p < s; p += dlsize) { - if (p + dlsize > s) { - break; - } - if (srcData.getSubDataStorage(p).memcmp(dp, dlsize) != 0) { - break; - } - unstringOffset += dlsize; - } - } - brkpt = true; - break; - } - } - switch (unstringSrc.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - p++; - break; - default: - break; - } - - if (brkpt) { - break; - } - } - if (!brkpt) { - matchSize = unstringSrc.getSize() - unstringOffset; - dst.moveFrom( - CobolFieldFactory.makeCobolField( - matchSize, - srcData.getSubDataStorage(start), - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); - unstringOffset = unstringSrc.getSize(); - dlmData = null; - } - } - unstringCount++; - - if (dlm != null) { - if (dlmData != null) { - dlm.moveFrom( - CobolFieldFactory.makeCobolField( - dlmSize, - dlmData, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); - } else if (dlm.getAttribute().isTypeNumeric()) { - dlm.moveFrom(CobolConstant.zero); - } else { - dlm.moveFrom(CobolConstant.space); - } - } - - switch (unstringSrc.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - matchSize /= 2; - break; - default: - break; - } - - if (cnt != null) { - cnt.setInt(matchSize); - } - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void unstringTallying(int f) throws CobolStopRunException {} - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void unstringTallying(AbstractCobolField f) throws CobolStopRunException { - f.addInt(unstringCount); - } - - /** TODO: 準備中 */ - public static void unstringFinish() { - if (unstringOffset < unstringSrc.getSize()) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_UNSTRING); - } - - switch (unstringSrc.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - unstringOffset /= 2; - break; - default: - break; - } - - if (unstringPtr != null) { - unstringPtr.setInt(unstringOffset + 1); - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +class Dlm { + public AbstractCobolField dlm; + public int all; +} + +/** TODO: 準備中 */ +public class CobolString { + private static final int DLM_DEFAULT_NUM = 8; + + private static int udlmCount = 0; + + private static AbstractCobolField stringDst; + private static AbstractCobolField stringPtr; + private static AbstractCobolField stringDlm; + private static AbstractCobolField stringDstCopy; + private static AbstractCobolField stringPtrCopy; + private static AbstractCobolField stringDlmCopy; + private static int stringOffset; + + private static Dlm[] dlmList; + private static AbstractCobolField unstringSrc; + private static AbstractCobolField unstringPtr; + private static AbstractCobolField unstringSrcCopy; + private static AbstractCobolField unstringPtrCopy; + private static int unstringOffset; + private static int unstringCount; + private static int unstringNdlms; + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param ptr TODO: 準備中 + */ + public static void stringInit(int dst, AbstractCobolField ptr) { + stringInit(null, ptr); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param ptr TODO: 準備中 + */ + public static void stringInit(AbstractCobolField dst, int ptr) { + stringInit(dst, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param ptr TODO: 準備中 + */ + public static void stringInit(int dst, int ptr) { + stringInit(null, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param ptr TODO: 準備中 + */ + public static void stringInit(AbstractCobolField dst, AbstractCobolField ptr) { + stringDstCopy = dst; + stringDst = stringDstCopy; + stringPtr = null; + if (ptr != null) { + stringPtrCopy = ptr; + stringPtr = stringPtrCopy; + } + stringOffset = 0; + CobolRuntimeException.setException(0); + + if (stringPtr != null) { + stringOffset = stringPtr.getInt() - 1; + if (stringOffset < 0 || stringOffset >= stringDst.getSize()) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_STRING); + } + } + + switch (stringDst.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + stringOffset *= 2; + break; + default: + break; + } + } + + /** + * TODO: 準備中 + * + * @param dlm TODO: 準備中 + */ + public static void stringDelimited(int dlm) { + stringDelimited(null); + } + + /** + * TODO: 準備中 + * + * @param dlm TODO: 準備中 + */ + public static void stringDelimited(AbstractCobolField dlm) { + switch (stringDst.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + if (dlm == CobolConstant.quote) { + dlm = CobolConstant.zenQuote; + } else if (dlm == CobolConstant.space) { + dlm = CobolConstant.zenSpace; + } else if (dlm == CobolConstant.zero) { + dlm = CobolConstant.zenZero; + } + break; + default: + break; + } + stringDlm = null; + if (dlm != null) { + stringDlmCopy = dlm; + stringDlm = stringDlmCopy; + } + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public static void stringAppend(int src) { + stringAppend(null); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public static void stringAppend(AbstractCobolField src) { + if (CobolRuntimeException.code != 0) { + return; + } + + int srcSize = src.getSize(); + if (stringDlm != null) { + int size = srcSize - stringDlm.getSize() + 1; + CobolDataStorage srcData = src.getDataStorage(); + CobolDataStorage dlmData = stringDlm.getDataStorage(); + int dlmSize = stringDlm.getSize(); + for (int i = 0; i < size; ++i) { + if (srcData.getSubDataStorage(i).memcmp(dlmData, dlmSize) == 0) { + srcSize = i; + break; + } + } + } + + if (srcSize <= stringDst.getSize() - stringOffset) { + stringDst + .getDataStorage() + .getSubDataStorage(stringOffset) + .memcpy(src.getDataStorage(), srcSize); + stringOffset += srcSize; + } else { + int size = stringDst.getSize() - stringOffset; + stringDst + .getDataStorage() + .getSubDataStorage(stringOffset) + .memcpy(src.getDataStorage(), size); + stringOffset += size; + CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_STRING); + } + } + + /** TODO: 準備中 */ + public static void stringFinish() { + int type = stringDst.getAttribute().getType(); + if (type == CobolFieldAttribute.COB_TYPE_NATIONAL + || type == CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED) { + + stringOffset /= 2; + } + if (stringPtr != null) { + stringPtr.setInt(stringOffset + 1); + } + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param ptr TODO: 準備中 + * @param numDlm TODO: 準備中 + */ + public static void unstringInit(int src, int ptr, int numDlm) { + unstringInit(null, null, numDlm); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param ptr TODO: 準備中 + * @param numDlm TODO: 準備中 + */ + public static void unstringInit(AbstractCobolField src, int ptr, int numDlm) { + unstringInit(src, null, numDlm); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param ptr TODO: 準備中 + * @param numDlm TODO: 準備中 + */ + public static void unstringInit(int src, AbstractCobolField ptr, int numDlm) { + unstringInit(null, ptr, numDlm); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param ptr TODO: 準備中 + * @param numDlm TODO: 準備中 + */ + public static void unstringInit(AbstractCobolField src, AbstractCobolField ptr, int numDlm) { + unstringSrcCopy = src; + unstringSrc = unstringSrcCopy; + unstringPtr = null; + if (ptr != null) { + unstringPtrCopy = ptr; + unstringPtr = unstringPtrCopy; + } + + unstringOffset = 0; + unstringCount = 0; + unstringNdlms = 0; + CobolRuntimeException.setException(0); + + if (dlmList == null) { + if (numDlm <= DLM_DEFAULT_NUM) { + dlmList = new Dlm[DLM_DEFAULT_NUM]; + udlmCount = DLM_DEFAULT_NUM; + } else { + dlmList = new Dlm[numDlm]; + udlmCount = numDlm; + } + } else { + if (numDlm > udlmCount) { + dlmList = new Dlm[numDlm]; + udlmCount = numDlm; + } + } + + for (int i = 0; i < dlmList.length; ++i) { + dlmList[i] = new Dlm(); + } + + if (unstringPtr != null) { + unstringOffset = unstringPtr.getInt() - 1; + if (unstringOffset < 0 || unstringOffset >= unstringSrc.getSize()) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_UNSTRING); + } + } + + switch (unstringSrc.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + unstringOffset *= 2; + break; + default: + break; + } + } + + /** + * TODO: 準備中 + * + * @param dlm TODO: 準備中 + * @param all TODO: 準備中 + */ + public static void unstringDelimited(int dlm, int all) { + unstringDelimited(null, all); + } + + /** + * TODO: 準備中 + * + * @param dlm TODO: 準備中 + * @param all TODO: 準備中 + */ + public static void unstringDelimited(AbstractCobolField dlm, int all) { + AbstractCobolField addDlm = null; + + switch (unstringSrc.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + if (dlm == CobolConstant.quote) { + dlm = CobolConstant.zenQuote; + } else if (dlm == CobolConstant.space) { + dlm = CobolConstant.zenSpace; + addDlm = CobolConstant.zenBlank; + } else if (dlm == CobolConstant.zero) { + dlm = CobolConstant.zenZero; + } + break; + default: + break; + } + + dlmList[unstringNdlms].dlm = dlm; + dlmList[unstringNdlms].all = all; + unstringNdlms++; + + if (addDlm != null) { + dlmList[unstringNdlms].dlm = addDlm; + dlmList[unstringNdlms].all = all; + unstringNdlms++; + } + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(AbstractCobolField dst, AbstractCobolField dlm, int cnt) { + unstringInto(dst, dlm, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(AbstractCobolField dst, int dlm, AbstractCobolField cnt) { + unstringInto(dst, null, cnt); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(AbstractCobolField dst, int dlm, int cnt) { + unstringInto(dst, null, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(int dst, int dlm, int cnt) { + unstringInto(null, null, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(int dst, AbstractCobolField dlm, int cnt) { + unstringInto(null, dlm, null); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(int dst, int dlm, AbstractCobolField cnt) { + unstringInto(null, null, cnt); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto(int dst, AbstractCobolField dlm, AbstractCobolField cnt) { + unstringInto(null, dlm, cnt); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param dlm TODO: 準備中 + * @param cnt TODO: 準備中 + */ + public static void unstringInto( + AbstractCobolField dst, AbstractCobolField dlm, AbstractCobolField cnt) { + if (CobolExceptionInfo.code != 0) { + return; + } + if (unstringOffset >= unstringSrc.getSize()) { + return; + } + + CobolDataStorage srcData = unstringSrc.getDataStorage(); + int start = unstringOffset; + int matchSize = 0; + int dlmSize = 0; + CobolDataStorage dlmData = null; + if (unstringNdlms == 0) { + matchSize = Math.min(dst.getFieldSize(), unstringSrc.getSize() - unstringOffset); + dst.moveFrom( + CobolFieldFactory.makeCobolField( + matchSize, + srcData.getSubDataStorage(unstringOffset), + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); + unstringOffset += matchSize; + } else { + int srSize = unstringSrc.getSize(); + int s = srSize; + boolean brkpt = false; + for (int p = start; p < s; ++p) { + for (int i = 0; i < unstringNdlms; ++i) { + int dlsize = dlmList[i].dlm.getSize(); + CobolDataStorage dp = dlmList[i].dlm.getDataStorage(); + if (p + dlsize > s) { + continue; + } + if (srcData.getSubDataStorage(p).memcmp(dp, dlsize) == 0) { + matchSize = (p - start); + dst.moveFrom( + CobolFieldFactory.makeCobolField( + matchSize, + srcData.getSubDataStorage(start), + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, + 0, + 0, + 0, + null))); + unstringOffset += matchSize + dlsize; + dlmData = dp; + dlmSize = dlsize; + if (dlmList[i].all != 0) { + for (p += dlsize; p < s; p += dlsize) { + if (p + dlsize > s) { + break; + } + if (srcData.getSubDataStorage(p).memcmp(dp, dlsize) != 0) { + break; + } + unstringOffset += dlsize; + } + } + brkpt = true; + break; + } + } + switch (unstringSrc.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + p++; + break; + default: + break; + } + + if (brkpt) { + break; + } + } + if (!brkpt) { + matchSize = unstringSrc.getSize() - unstringOffset; + dst.moveFrom( + CobolFieldFactory.makeCobolField( + matchSize, + srcData.getSubDataStorage(start), + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); + unstringOffset = unstringSrc.getSize(); + dlmData = null; + } + } + unstringCount++; + + if (dlm != null) { + if (dlmData != null) { + dlm.moveFrom( + CobolFieldFactory.makeCobolField( + dlmSize, + dlmData, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null))); + } else if (dlm.getAttribute().isTypeNumeric()) { + dlm.moveFrom(CobolConstant.zero); + } else { + dlm.moveFrom(CobolConstant.space); + } + } + + switch (unstringSrc.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + matchSize /= 2; + break; + default: + break; + } + + if (cnt != null) { + cnt.setInt(matchSize); + } + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void unstringTallying(int f) throws CobolStopRunException {} + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void unstringTallying(AbstractCobolField f) throws CobolStopRunException { + f.addInt(unstringCount); + } + + /** TODO: 準備中 */ + public static void unstringFinish() { + if (unstringOffset < unstringSrc.getSize()) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_OVERFLOW_UNSTRING); + } + + switch (unstringSrc.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + unstringOffset /= 2; + break; + default: + break; + } + + if (unstringPtr != null) { + unstringPtr.setInt(unstringOffset + 1); + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java index 126fbbf7..7f1546e9 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java @@ -1,687 +1,700 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import java.io.UnsupportedEncodingException; -import java.time.DateTimeException; -import java.time.LocalDateTime; -import java.util.Calendar; -import java.util.Properties; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; -import jp.osscons.opensourcecobol.libcobj.file.CobolFile; - -/** TDOD: 準備中 */ -public class CobolUtil { - private static boolean cob_io_assume_rewrite = false; - private static boolean cob_verbose = false; - private static HandlerList hdlrs = null; - private static String runtime_err_str = null; - - /** TDOD: 準備中 */ - public static LocalDateTime cobLocalTm = null; - /** TDOD: 準備中 */ - public static String cobLocalEnv = null; - - /** TDOD: 準備中 */ - public static String[] commandLineArgs = null; - /** TDOD: 準備中 */ - public static int currentArgIndex = 1; - - /** TDOD: 準備中 */ - public static boolean nibbleCForUnsigned = false; - - /** TDOD: 準備中 */ - public static boolean[] cobSwitch = new boolean[8]; - /** TDOD: 準備中 */ - public static int cobSaveCallParams = 0; - - /** TDOD: 準備中 */ - public static boolean verbose = false; - /** TDOD: 準備中 */ - public static boolean cobErrorOnExitFlag = false; - /** TDOD: 準備中 */ - public static Calendar cal; - - /** TDOD: 準備中 */ - public static int fileSeqWriteBufferSize = 10; - - private static boolean lineTrace = false; - - /** TDOD: 準備中 */ - private static String sourceFile; - /** TDOD: 準備中 */ - private static int sourceLine; - /** TDOD: 準備中 */ - private static String currProgramId; - /** TDOD: 準備中 */ - private static String currSection; - /** TDOD: 準備中 */ - private static String currParagraph; - /** TDOD: 準備中 */ - private static String sourceStatement; - - abstract static class HandlerList { - public HandlerList next = null; - - public abstract int proc(String s); - } - - /** TDOD: 準備中 */ - public static final int FERROR_INITIALIZED = 0; - /** TDOD: 準備中 */ - public static final int FERROR_CODEGEN = 1; - /** TDOD: 準備中 */ - public static final int FERROR_CHAINING = 2; - /** TDOD: 準備中 */ - public static final int FERROR_STACK = 3; - - private static Properties envVarTable = new Properties(); - - // libcob/common.cのcob_check_envの実装 - /** - * TODO: 準備中 - * - * @param name TODO: 準備中 - * @param value TODO: 準備中 - * @return TODO: 準備中 - */ - public static int checkEnv(String name, String value) { - if (name == null || value == null) { - return 0; - } - - String s = CobolUtil.getEnv(name); - if (s != null) { - if (s.contentEquals(value)) { - return 1; - } - } - return 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static boolean cob_io_rewwrite_assumed() { - return cob_io_assume_rewrite; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefModNational(int offset, long length, int size, byte[] name) - throws CobolStopRunException { - CobolUtil.cobCheckRefMod((offset + 1) / 2, length / 2, size / 2, name); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefModNational(int offset, long length, int size, String name) - throws CobolStopRunException { - CobolUtil.cobCheckRefMod((offset + 1) / 2, length / 2, size / 2, name); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @param nameLen TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefMod( - int offset, long length, int size, CobolDataStorage name, int nameLen) - throws CobolStopRunException { - cobCheckRefMod(offset, length, size, name.getByteArrayRef(0, nameLen)); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @param nameLen TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefMod(int offset, long length, int size, byte[] name, int nameLen) - throws CobolStopRunException { - cobCheckRefMod(offset, length, size, name); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefMod(int offset, long length, int size, byte[] name) - throws CobolStopRunException { - try { - CobolUtil.cobCheckRefMod(offset, length, size, new String(name, "Shift_JIS")); - } catch (UnsupportedEncodingException e) { - CobolUtil.cobCheckRefMod(offset, length, size, ""); - } - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @param nameLen TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefMod(int offset, long length, int size, String name, int nameLen) - throws CobolStopRunException { - cobCheckRefMod(offset, length, size, name); - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param length TODO: 準備中 - * @param size TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckRefMod(int offset, long length, int size, String name) - throws CobolStopRunException { - /* check the offset */ - if (offset < 1 || offset > size) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_REF_MOD); - CobolUtil.runtimeError(String.format("Offset of '%s' out of bounds: %d", name, offset)); - CobolStopRunException.stopRunAndThrow(1); - } - - /* check the length */ - if (length < 1 || offset + length - 1 > size) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_REF_MOD); - CobolUtil.runtimeError(String.format("Length of '%s' out of bounds: %d", name, length)); - CobolStopRunException.stopRunAndThrow(1); - } - } - - /** - * TODO: 準備中 - * - * @param x TODO: 準備中 - * @param name TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void cobCheckBased(CobolDataStorage x, byte[] name) throws CobolStopRunException { - if (x == null) { - CobolUtil.runtimeError(String.format("BASED/LINKAGE item '%s' has NULL address", name)); - CobolStopRunException.stopRunAndThrow(1); - } - } - - /** - * TODO: 準備中 - * - * @param argv TODO: 準備中 - * @param cobInitialized TODO: 準備中 - */ - public static void cob_init(String[] argv, boolean cobInitialized) { - // TODO 未完成 - if (!cobInitialized) { - CobolUtil.commandLineArgs = argv; - CobolInspect.initString(); - CobolFile.cob_init_fileio(); - CobolIntrinsic.init(); - CobolUtil.envVarTable = new Properties(); - - for (int i = 0; i < 8; ++i) { - String envVariableName = String.format("COB_SWITCH_%d", i + 1); - String envValue = CobolUtil.getEnv(envVariableName); - if (envValue == null) { - CobolUtil.cobSwitch[i] = false; - } else { - CobolUtil.cobSwitch[i] = "ON".equals(envValue); - } - } - } - - cal = Calendar.getInstance(); - String s = CobolUtil.getEnv("COB_DATE"); - if (s != null) { - Pattern p = Pattern.compile("([0-9]{4})/([0-9]{2})/([0-9]{2})"); - Matcher m = p.matcher(s); - if (m.matches()) { - date_time_block: - if (m.groupCount() != 3) { - System.err.println("Warning: COB_DATE format invalid, ignored."); - } else { - int year = Integer.parseInt(m.group(1)); - int month = Integer.parseInt(m.group(2)); - int dayOfMonth = Integer.parseInt(m.group(3)); - cal.set(Calendar.YEAR, year); - cal.set(Calendar.MONTH, month - 1); - cal.set(Calendar.DAY_OF_MONTH, dayOfMonth); - LocalDateTime tm; - try { - tm = LocalDateTime.of(year, month, dayOfMonth, 0, 0); - } catch (DateTimeException e) { - break date_time_block; - } - cobLocalTm = tm; - } - } else { - System.err.println("Warning: COB_DATE format invalid, ignored."); - } - } - - s = CobolUtil.getEnv("COB_VERBOSE"); - if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { - CobolUtil.cob_verbose = true; - } - - s = CobolUtil.getEnv("COB_IO_ASSUME_REWRITE"); - if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { - CobolUtil.cob_io_assume_rewrite = true; - } - - s = CobolUtil.getEnv("COB_NIBBLE_C_UNSIGNED"); - if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { - CobolUtil.nibbleCForUnsigned = true; - } - - s = System.getenv("COB_FILE_SEQ_WRITE_BUFFER_SIZE"); - if (s != null) { - int size = Integer.parseInt(s); - if (size >= 0) { - CobolUtil.fileSeqWriteBufferSize = size; - } - } - } - - // libcob/common.cとcob_localtime - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static LocalDateTime localtime() { - LocalDateTime rt = LocalDateTime.now(); - if (CobolUtil.cobLocalTm != null) { - CobolUtil.cobLocalTm = - CobolUtil.cobLocalTm - .withHour(rt.getHour()) - .withMinute(rt.getMinute()) - .withSecond(rt.getSecond()); - rt = CobolUtil.cobLocalTm; - } - return rt; - } - - // libcob/cob_verbose_outputの実装 - /** - * TODO: 準備中 - * - * @param s TODO cob_verboseの初期化 - */ - public static void verboseOutput(String s) { - if (cob_verbose) { - System.out.println("libcobj: " + s); - } - } - - // libcob/fileio.cのcob_rintime_errorの実装 - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - */ - public static void runtimeError(String s) { - if (hdlrs != null) { - HandlerList h = hdlrs; - if (runtime_err_str != null) { - if (sourceFile != null) { - runtime_err_str = String.format("%s:%d: ", sourceFile, sourceLine); - } - } - while (h != null) { - if (runtime_err_str != null) { - h.proc(runtime_err_str); - } else { - h.proc("Malloc error"); - } - h = h.next; - } - hdlrs = null; - } - - if (sourceFile != null) { - System.err.print(String.format("%s:%d: ", sourceFile, sourceLine)); - } - byte[] messageBytes = ("libcobj: " + s).getBytes(AbstractCobolField.charSetSJIS); - System.err.write(messageBytes, 0, messageBytes.length); - System.err.println(); - System.err.flush(); - } - - // libcob/common.c cob_get_environment - /** - * TODO: 準備中 - * - * @param envname TODO: 準備中 - * @param envval TODO: 準備中 - */ - public static void getEnvironment(AbstractCobolField envname, AbstractCobolField envval) { - String p = CobolUtil.getEnv(envname.fieldToString()); - if (p == null) { - CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); - p = " "; - } - envval.memcpy(p); - } - - // libcob/common.cのCOB_CHK_PARMSの実装 - /** - * TODO: 準備中 - * - * @param funcName TODO: 準備中 - * @param numParams TODO: 準備中 - */ - public static void COB_CHK_PARMS(String funcName, int numParams) {} - - // libcob/common.cのcob_get_switchの実装 - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public static boolean getSwitch(int n) { - return CobolUtil.cobSwitch[n]; - } - - // libcob/common.cのcob_set_switchの実装 - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @param flag TODO: 準備中 - */ - public static void setSwitch(int n, int flag) { - if (flag == 0) { - CobolUtil.cobSwitch[n] = false; - } else if (flag == 1) { - CobolUtil.cobSwitch[n] = true; - } - } - - // libcob/common.cのalnum_cmpsの実装 - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param s2 TODO: 準備中 - * @param size TODO: 準備中 - * @param col TODO: 準備中 - * @return TODO: 準備中 - */ - public static int alnumCmps( - CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { - if (col != null) { - for (int i = 0; i < size; ++i) { - int ret = - col.getByte(Byte.toUnsignedInt(s1.getByte(i))) - - col.getByte(Byte.toUnsignedInt(s2.getByte(i))); - if (ret != 0) { - return ret; - } - } - } else { - for (int i = 0; i < size; ++i) { - int ret = Byte.toUnsignedInt(s1.getByte(i)) - Byte.toUnsignedInt(s2.getByte(i)); - if (ret != 0) { - return ret; - } - } - } - return 0; - } - - // libcob/common.cのnational_cmpsの実装 - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param s2 TODO: 準備中 - * @param size TODO: 準備中 - * @param col TODO: 準備中 - * @return TODO: 準備中 - */ - public static int nationalCmps( - CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { - int ret = 0; - for (int i = 0; i < size && ret == 0; i += 2) { - int b11 = Byte.toUnsignedInt(s1.getByte(i)); - int b12 = Byte.toUnsignedInt(s1.getByte(i + 1)); - int b21 = Byte.toUnsignedInt(s2.getByte(i)); - int b22 = Byte.toUnsignedInt(s2.getByte(i + 1)); - ret = ((b11 << 8) | b12) - ((b21 << 8) | b22); - } - return ret; - } - - /** TODO: 準備中 */ - public static void readyTrace() { - CobolUtil.lineTrace = true; - } - - /** TODO: 準備中 */ - public static void resetTrace() { - CobolUtil.lineTrace = false; - } - - /** - * TODO: 準備中 - * - * @param fatalError TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void fatalError(int fatalError) throws CobolStopRunException { - switch (fatalError) { - case CobolUtil.FERROR_INITIALIZED: - CobolUtil.runtimeError("cob_init() has not been called"); - break; - case CobolUtil.FERROR_CODEGEN: - CobolUtil.runtimeError("Codegen error - Please report this"); - break; - case CobolUtil.FERROR_CHAINING: - CobolUtil.runtimeError("ERROR - Recursive call of chained program"); - break; - case CobolUtil.FERROR_STACK: - CobolUtil.runtimeError("Stack overflow, possible PERFORM depth exceeded"); - break; - default: - CobolUtil.runtimeError(String.format("Unknown failure : %d", fatalError)); - break; - } - CobolStopRunException.stopRunAndThrow(1); - } - - /** - * TODO: 準備中 - * - * @param progId TODO: 準備中 - * @param sfile TODO: 準備中 - * @param sline TODO: 準備中 - * @param csect TODO: 準備中 - * @param cpara TODO: 準備中 - * @param cstatement TODO: 準備中 - */ - public static void setLocation( - String progId, String sfile, int sline, String csect, String cpara, String cstatement) { - CobolUtil.sourceFile = sfile; - CobolUtil.sourceLine = sline; - currProgramId = progId; - currSection = csect; - currParagraph = cpara; - sourceLine = sline; - if (cstatement != null) { - sourceStatement = cstatement; - } - if (CobolUtil.lineTrace) { - System.err.println( - String.format( - "PROGRAM-ID: %s \tLine: %d \tStatement: %s", - progId, sline, cstatement == null ? "Unknown" : cstatement)); - System.err.flush(); - } - } - - /** - * TODO: 準備中 - * - * @param envVarName TODO: 準備中 - * @return TODO: 準備中 - */ - public static String getEnv(String envVarName) { - String envVarInTable = CobolUtil.envVarTable.getProperty(envVarName); - if (envVarInTable != null) { - return envVarInTable; - } else { - return System.getenv(envVarName); - } - } - - /** - * get environemnt variable - * - * @param envVarName the name of an environment variable. - * @param envVarValue the value to be set to the environment variable. - */ - public static void setEnv(String envVarName, String envVarValue) { - CobolUtil.envVarTable.setProperty(envVarName, envVarValue); - } - - /** - * Set environemnt variable - * - * @param envVarName the name of an environment variable. The leading and trailing spaces are - * ignored. - * @param envVarValue the value of an environment variable to be set. - */ - public static void setEnv(AbstractCobolField envVarName, AbstractCobolField envVarValue) { - CobolUtil.envVarTable.setProperty(envVarName.getString().trim(), envVarValue.getString()); - } - - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - * @return TODO: 準備中 - */ - public static byte[] stringToBytes(String s) { - try { - return s.getBytes("Shift_JIS"); - } catch (UnsupportedEncodingException e) { - return null; - } - } - - /** - * TODO: 準備中 - * - * @param bytes TODO: 準備中 - * @return TODO: 準備中 - */ - public static byte[] toBytes(byte... bytes) { - return bytes; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static String getCurrProgramId() { - return currProgramId; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static String getCurrSection() { - return currSection; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static String getCurrParagraph() { - return currParagraph; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static int getSourceLine() { - return sourceLine; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static String getSourceStatement() { - return sourceStatement; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import java.io.UnsupportedEncodingException; +import java.time.DateTimeException; +import java.time.LocalDateTime; +import java.util.Calendar; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; +import jp.osscons.opensourcecobol.libcobj.file.CobolFile; + +/** TDOD: 準備中 */ +public class CobolUtil { + private static boolean cob_io_assume_rewrite = false; + private static boolean cob_verbose = false; + private static HandlerList hdlrs = null; + private static String runtime_err_str = null; + + /** TDOD: 準備中 */ + public static LocalDateTime cobLocalTm = null; + + /** TDOD: 準備中 */ + public static String cobLocalEnv = null; + + /** TDOD: 準備中 */ + public static String[] commandLineArgs = null; + + /** TDOD: 準備中 */ + public static int currentArgIndex = 1; + + /** TDOD: 準備中 */ + public static boolean nibbleCForUnsigned = false; + + /** TDOD: 準備中 */ + public static boolean[] cobSwitch = new boolean[8]; + + /** TDOD: 準備中 */ + public static int cobSaveCallParams = 0; + + /** TDOD: 準備中 */ + public static boolean verbose = false; + + /** TDOD: 準備中 */ + public static boolean cobErrorOnExitFlag = false; + + /** TDOD: 準備中 */ + public static Calendar cal; + + /** TDOD: 準備中 */ + public static int fileSeqWriteBufferSize = 10; + + private static boolean lineTrace = false; + + /** TDOD: 準備中 */ + private static String sourceFile; + + /** TDOD: 準備中 */ + private static int sourceLine; + + /** TDOD: 準備中 */ + private static String currProgramId; + + /** TDOD: 準備中 */ + private static String currSection; + + /** TDOD: 準備中 */ + private static String currParagraph; + + /** TDOD: 準備中 */ + private static String sourceStatement; + + abstract static class HandlerList { + public HandlerList next = null; + + public abstract int proc(String s); + } + + /** TDOD: 準備中 */ + public static final int FERROR_INITIALIZED = 0; + + /** TDOD: 準備中 */ + public static final int FERROR_CODEGEN = 1; + + /** TDOD: 準備中 */ + public static final int FERROR_CHAINING = 2; + + /** TDOD: 準備中 */ + public static final int FERROR_STACK = 3; + + private static Properties envVarTable = new Properties(); + + // libcob/common.cのcob_check_envの実装 + /** + * TODO: 準備中 + * + * @param name TODO: 準備中 + * @param value TODO: 準備中 + * @return TODO: 準備中 + */ + public static int checkEnv(String name, String value) { + if (name == null || value == null) { + return 0; + } + + String s = CobolUtil.getEnv(name); + if (s != null) { + if (s.contentEquals(value)) { + return 1; + } + } + return 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static boolean cob_io_rewwrite_assumed() { + return cob_io_assume_rewrite; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefModNational(int offset, long length, int size, byte[] name) + throws CobolStopRunException { + CobolUtil.cobCheckRefMod((offset + 1) / 2, length / 2, size / 2, name); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefModNational(int offset, long length, int size, String name) + throws CobolStopRunException { + CobolUtil.cobCheckRefMod((offset + 1) / 2, length / 2, size / 2, name); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @param nameLen TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefMod( + int offset, long length, int size, CobolDataStorage name, int nameLen) + throws CobolStopRunException { + cobCheckRefMod(offset, length, size, name.getByteArrayRef(0, nameLen)); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @param nameLen TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefMod(int offset, long length, int size, byte[] name, int nameLen) + throws CobolStopRunException { + cobCheckRefMod(offset, length, size, name); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefMod(int offset, long length, int size, byte[] name) + throws CobolStopRunException { + try { + CobolUtil.cobCheckRefMod(offset, length, size, new String(name, "Shift_JIS")); + } catch (UnsupportedEncodingException e) { + CobolUtil.cobCheckRefMod(offset, length, size, ""); + } + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @param nameLen TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefMod(int offset, long length, int size, String name, int nameLen) + throws CobolStopRunException { + cobCheckRefMod(offset, length, size, name); + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param length TODO: 準備中 + * @param size TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckRefMod(int offset, long length, int size, String name) + throws CobolStopRunException { + /* check the offset */ + if (offset < 1 || offset > size) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_REF_MOD); + CobolUtil.runtimeError(String.format("Offset of '%s' out of bounds: %d", name, offset)); + CobolStopRunException.stopRunAndThrow(1); + } + + /* check the length */ + if (length < 1 || offset + length - 1 > size) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_BOUND_REF_MOD); + CobolUtil.runtimeError(String.format("Length of '%s' out of bounds: %d", name, length)); + CobolStopRunException.stopRunAndThrow(1); + } + } + + /** + * TODO: 準備中 + * + * @param x TODO: 準備中 + * @param name TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void cobCheckBased(CobolDataStorage x, byte[] name) throws CobolStopRunException { + if (x == null) { + CobolUtil.runtimeError(String.format("BASED/LINKAGE item '%s' has NULL address", name)); + CobolStopRunException.stopRunAndThrow(1); + } + } + + /** + * TODO: 準備中 + * + * @param argv TODO: 準備中 + * @param cobInitialized TODO: 準備中 + */ + public static void cob_init(String[] argv, boolean cobInitialized) { + // TODO 未完成 + if (!cobInitialized) { + CobolUtil.commandLineArgs = argv; + CobolInspect.initString(); + CobolFile.cob_init_fileio(); + CobolIntrinsic.init(); + CobolUtil.envVarTable = new Properties(); + + for (int i = 0; i < 8; ++i) { + String envVariableName = String.format("COB_SWITCH_%d", i + 1); + String envValue = CobolUtil.getEnv(envVariableName); + if (envValue == null) { + CobolUtil.cobSwitch[i] = false; + } else { + CobolUtil.cobSwitch[i] = "ON".equals(envValue); + } + } + } + + cal = Calendar.getInstance(); + String s = CobolUtil.getEnv("COB_DATE"); + if (s != null) { + Pattern p = Pattern.compile("([0-9]{4})/([0-9]{2})/([0-9]{2})"); + Matcher m = p.matcher(s); + if (m.matches()) { + date_time_block: + if (m.groupCount() != 3) { + System.err.println("Warning: COB_DATE format invalid, ignored."); + } else { + int year = Integer.parseInt(m.group(1)); + int month = Integer.parseInt(m.group(2)); + int dayOfMonth = Integer.parseInt(m.group(3)); + cal.set(Calendar.YEAR, year); + cal.set(Calendar.MONTH, month - 1); + cal.set(Calendar.DAY_OF_MONTH, dayOfMonth); + LocalDateTime tm; + try { + tm = LocalDateTime.of(year, month, dayOfMonth, 0, 0); + } catch (DateTimeException e) { + break date_time_block; + } + cobLocalTm = tm; + } + } else { + System.err.println("Warning: COB_DATE format invalid, ignored."); + } + } + + s = CobolUtil.getEnv("COB_VERBOSE"); + if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { + CobolUtil.cob_verbose = true; + } + + s = CobolUtil.getEnv("COB_IO_ASSUME_REWRITE"); + if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { + CobolUtil.cob_io_assume_rewrite = true; + } + + s = CobolUtil.getEnv("COB_NIBBLE_C_UNSIGNED"); + if (s != null && s.length() > 0 && (s.charAt(0) == 'y' || s.charAt(0) == 'Y')) { + CobolUtil.nibbleCForUnsigned = true; + } + + s = System.getenv("COB_FILE_SEQ_WRITE_BUFFER_SIZE"); + if (s != null) { + int size = Integer.parseInt(s); + if (size >= 0) { + CobolUtil.fileSeqWriteBufferSize = size; + } + } + } + + // libcob/common.cとcob_localtime + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static LocalDateTime localtime() { + LocalDateTime rt = LocalDateTime.now(); + if (CobolUtil.cobLocalTm != null) { + CobolUtil.cobLocalTm = + CobolUtil.cobLocalTm + .withHour(rt.getHour()) + .withMinute(rt.getMinute()) + .withSecond(rt.getSecond()); + rt = CobolUtil.cobLocalTm; + } + return rt; + } + + // libcob/cob_verbose_outputの実装 + /** + * TODO: 準備中 + * + * @param s TODO cob_verboseの初期化 + */ + public static void verboseOutput(String s) { + if (cob_verbose) { + System.out.println("libcobj: " + s); + } + } + + // libcob/fileio.cのcob_rintime_errorの実装 + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + */ + public static void runtimeError(String s) { + if (hdlrs != null) { + HandlerList h = hdlrs; + if (runtime_err_str != null) { + if (sourceFile != null) { + runtime_err_str = String.format("%s:%d: ", sourceFile, sourceLine); + } + } + while (h != null) { + if (runtime_err_str != null) { + h.proc(runtime_err_str); + } else { + h.proc("Malloc error"); + } + h = h.next; + } + hdlrs = null; + } + + if (sourceFile != null) { + System.err.print(String.format("%s:%d: ", sourceFile, sourceLine)); + } + byte[] messageBytes = ("libcobj: " + s).getBytes(AbstractCobolField.charSetSJIS); + System.err.write(messageBytes, 0, messageBytes.length); + System.err.println(); + System.err.flush(); + } + + // libcob/common.c cob_get_environment + /** + * TODO: 準備中 + * + * @param envname TODO: 準備中 + * @param envval TODO: 準備中 + */ + public static void getEnvironment(AbstractCobolField envname, AbstractCobolField envval) { + String p = CobolUtil.getEnv(envname.fieldToString()); + if (p == null) { + CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); + p = " "; + } + envval.memcpy(p); + } + + // libcob/common.cのCOB_CHK_PARMSの実装 + /** + * TODO: 準備中 + * + * @param funcName TODO: 準備中 + * @param numParams TODO: 準備中 + */ + public static void COB_CHK_PARMS(String funcName, int numParams) {} + + // libcob/common.cのcob_get_switchの実装 + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public static boolean getSwitch(int n) { + return CobolUtil.cobSwitch[n]; + } + + // libcob/common.cのcob_set_switchの実装 + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @param flag TODO: 準備中 + */ + public static void setSwitch(int n, int flag) { + if (flag == 0) { + CobolUtil.cobSwitch[n] = false; + } else if (flag == 1) { + CobolUtil.cobSwitch[n] = true; + } + } + + // libcob/common.cのalnum_cmpsの実装 + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param s2 TODO: 準備中 + * @param size TODO: 準備中 + * @param col TODO: 準備中 + * @return TODO: 準備中 + */ + public static int alnumCmps( + CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { + if (col != null) { + for (int i = 0; i < size; ++i) { + int ret = + col.getByte(Byte.toUnsignedInt(s1.getByte(i))) + - col.getByte(Byte.toUnsignedInt(s2.getByte(i))); + if (ret != 0) { + return ret; + } + } + } else { + for (int i = 0; i < size; ++i) { + int ret = Byte.toUnsignedInt(s1.getByte(i)) - Byte.toUnsignedInt(s2.getByte(i)); + if (ret != 0) { + return ret; + } + } + } + return 0; + } + + // libcob/common.cのnational_cmpsの実装 + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param s2 TODO: 準備中 + * @param size TODO: 準備中 + * @param col TODO: 準備中 + * @return TODO: 準備中 + */ + public static int nationalCmps( + CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { + int ret = 0; + for (int i = 0; i < size && ret == 0; i += 2) { + int b11 = Byte.toUnsignedInt(s1.getByte(i)); + int b12 = Byte.toUnsignedInt(s1.getByte(i + 1)); + int b21 = Byte.toUnsignedInt(s2.getByte(i)); + int b22 = Byte.toUnsignedInt(s2.getByte(i + 1)); + ret = ((b11 << 8) | b12) - ((b21 << 8) | b22); + } + return ret; + } + + /** TODO: 準備中 */ + public static void readyTrace() { + CobolUtil.lineTrace = true; + } + + /** TODO: 準備中 */ + public static void resetTrace() { + CobolUtil.lineTrace = false; + } + + /** + * TODO: 準備中 + * + * @param fatalError TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void fatalError(int fatalError) throws CobolStopRunException { + switch (fatalError) { + case CobolUtil.FERROR_INITIALIZED: + CobolUtil.runtimeError("cob_init() has not been called"); + break; + case CobolUtil.FERROR_CODEGEN: + CobolUtil.runtimeError("Codegen error - Please report this"); + break; + case CobolUtil.FERROR_CHAINING: + CobolUtil.runtimeError("ERROR - Recursive call of chained program"); + break; + case CobolUtil.FERROR_STACK: + CobolUtil.runtimeError("Stack overflow, possible PERFORM depth exceeded"); + break; + default: + CobolUtil.runtimeError(String.format("Unknown failure : %d", fatalError)); + break; + } + CobolStopRunException.stopRunAndThrow(1); + } + + /** + * TODO: 準備中 + * + * @param progId TODO: 準備中 + * @param sfile TODO: 準備中 + * @param sline TODO: 準備中 + * @param csect TODO: 準備中 + * @param cpara TODO: 準備中 + * @param cstatement TODO: 準備中 + */ + public static void setLocation( + String progId, String sfile, int sline, String csect, String cpara, String cstatement) { + CobolUtil.sourceFile = sfile; + CobolUtil.sourceLine = sline; + currProgramId = progId; + currSection = csect; + currParagraph = cpara; + sourceLine = sline; + if (cstatement != null) { + sourceStatement = cstatement; + } + if (CobolUtil.lineTrace) { + System.err.println( + String.format( + "PROGRAM-ID: %s \tLine: %d \tStatement: %s", + progId, sline, cstatement == null ? "Unknown" : cstatement)); + System.err.flush(); + } + } + + /** + * TODO: 準備中 + * + * @param envVarName TODO: 準備中 + * @return TODO: 準備中 + */ + public static String getEnv(String envVarName) { + String envVarInTable = CobolUtil.envVarTable.getProperty(envVarName); + if (envVarInTable != null) { + return envVarInTable; + } else { + return System.getenv(envVarName); + } + } + + /** + * get environemnt variable + * + * @param envVarName the name of an environment variable. + * @param envVarValue the value to be set to the environment variable. + */ + public static void setEnv(String envVarName, String envVarValue) { + CobolUtil.envVarTable.setProperty(envVarName, envVarValue); + } + + /** + * Set environemnt variable + * + * @param envVarName the name of an environment variable. The leading and trailing spaces are + * ignored. + * @param envVarValue the value of an environment variable to be set. + */ + public static void setEnv(AbstractCobolField envVarName, AbstractCobolField envVarValue) { + CobolUtil.envVarTable.setProperty(envVarName.getString().trim(), envVarValue.getString()); + } + + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + * @return TODO: 準備中 + */ + public static byte[] stringToBytes(String s) { + try { + return s.getBytes("Shift_JIS"); + } catch (UnsupportedEncodingException e) { + return null; + } + } + + /** + * TODO: 準備中 + * + * @param bytes TODO: 準備中 + * @return TODO: 準備中 + */ + public static byte[] toBytes(byte... bytes) { + return bytes; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static String getCurrProgramId() { + return currProgramId; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static String getCurrSection() { + return currSection; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static String getCurrParagraph() { + return currParagraph; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static int getSourceLine() { + return sourceLine; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static String getSourceStatement() { + return sourceStatement; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetAbstractCobolField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetAbstractCobolField.java index 2467bc18..e0884f72 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetAbstractCobolField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetAbstractCobolField.java @@ -1,33 +1,33 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public interface GetAbstractCobolField { - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - AbstractCobolField run() throws CobolStopRunException; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public interface GetAbstractCobolField { + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + AbstractCobolField run() throws CobolStopRunException; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java index bfd08fe8..cacc233e 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java @@ -1,29 +1,29 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.common; - -/** TODO: 準備中 */ -public interface GetInt { - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int run(); -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.common; + +/** TODO: 準備中 */ +public interface GetInt { + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int run(); +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java index 0be6e2bd..3042f096 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java @@ -1,1737 +1,1754 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** COBOLで使用する変数を表現するクラス。 */ -public abstract class AbstractCobolField { - /** データを格納に使用するバイト配列の長さ */ - protected int size; - - /** データを格納するバイト配列を扱うオブジェクト */ - protected CobolDataStorage dataStorage; - - /** 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) */ - protected CobolFieldAttribute attribute; - - static int lastsize = 0; - static CobolDataStorage lastdata = null; - /** TODO: 準備中 */ - public static Charset charSetSJIS = Charset.forName("SHIFT-JIS"); - - static final int[] cobExp10 = { - 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 - }; - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) - */ - public AbstractCobolField(int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - this.size = size; - this.dataStorage = dataStorage; - this.attribute = attribute; - } - - /** - * メンバ変数dataStorageのgetter - * - * @return this.dataStorage - */ - public CobolDataStorage getDataStorage() { - return dataStorage; - } - - /** - * メンバ変数dataStorageのsetter - * - * @param dataStorage TODO: 準備中 - */ - public void setDataStorage(CobolDataStorage dataStorage) { - this.dataStorage = dataStorage; - } - - /** - * メンバ変数attributeのsetter - * - * @param attribute TODO: 準備中 - */ - public void setAttribute(CobolFieldAttribute attribute) { - this.attribute = attribute; - } - - /** - * メンバ変数attributeのgetter - * - * @return this.attribute - */ - public CobolFieldAttribute getAttribute() { - return attribute; - } - - /** - * メンバ変数sizeのsetter - * - * @param size TODO: 準備中 - */ - public void setSize(int size) { - this.size = size; - } - - /** - * メンバ変数sizeのgetter - * - * @return this.size - */ - public int getSize() { - return size; - } - - /** - * 符号部分を除いた数値部分の長さを返す - * - * @return 符号付で符号が分離している場合はthis.size-1,そうでなければthis.size - */ - public int getFieldSize() { - return this.size - (this.attribute.isFlagSignSeparate() ? 1 : 0); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public CobolDataStorage getFieldData() { - if (this.attribute.isFlagSignSeparate() && this.attribute.isFlagSignLeading()) { - return new CobolDataStorage(this.dataStorage.getRefOfData(), this.dataStorage.getIndex() + 1); - } else { - return this.dataStorage; - } - } - - /** - * バイト配列の中で(符号データではなく)数値データの格納されている最小の添え字を返す - * - * @return SIGN LEADINGかつSIGN SEPARATEな変数なら1,それ以外は0 - */ - public int getFirstDataIndex() { - return (this.attribute.isFlagSignSeparate() && this.attribute.isFlagSignLeading()) ? 1 : 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public byte[] getBytes() { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 9, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage n = new CobolDataStorage(new byte[4], 0); - AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, n, attr); - temp.moveFrom(this); - return ByteBuffer.wrap(n.getByteArray(0, 4)).array(); - } - - /** - * thisの文字列表現をかえす. - * - * @return thisの文字列表現 - */ - public abstract String getString(); - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getInt() { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 9, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage n = new CobolDataStorage(new byte[4], 0); - AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, n, attr); - temp.moveFrom(this); - return ByteBuffer.wrap(n.getByteArray(0, 4)).getInt(); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public double getDouble() { - try { - return Double.parseDouble(this.getString()); - } catch (Exception e) { - return 0; - } - } - - /** - * 数値を表すデータが実装すべきメソッド. 保持する数値データをCobolDecimal型に変換する. - * - * @return 保持する数値データをCobolDecimal型に変換した値 - */ - public CobolDecimal getDecimal() { - CobolDataStorage data = this.getDataStorage(); - int firstDataIndex = this.getFirstDataIndex(); - int size = this.getFieldSize(); - - if (Byte.toUnsignedInt(data.getByte(firstDataIndex)) == 0xFF) { - CobolDecimal decimal = new CobolDecimal(BigDecimal.TEN.pow(size)); - decimal.setScale(this.getAttribute().getScale()); - return decimal; - } - - if (data.getByte(firstDataIndex) == 0) { - CobolDecimal decimal = new CobolDecimal(BigDecimal.TEN.pow(size).negate()); - decimal.setScale(this.getAttribute().getScale()); - return decimal; - } - - char[] buf = new char[size]; - for (int i = 0; i < size; ++i) { - byte val = data.getByte(firstDataIndex + i); - if (val >= 0x70) { - buf[i] = (char) (val - 0x40); - } else { - buf[i] = (char) val; - } - } - - CobolFieldAttribute attr = this.getAttribute(); - int sign = 1; - if (attr.isFlagHaveSign()) { - if (attr.isFlagSignSeparate()) { - int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; - if (data.getByte(signIndex) == '-') { - sign = -1; - } - } else { - int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; - if (data.getByte(signIndex) >= 0x70) { - sign = -1; - } - } - } - - BigDecimal decimal = new BigDecimal(buf); - if (sign < 0) { - decimal = decimal.negate(); - } - CobolDecimal ret = new CobolDecimal(decimal); - ret.setScale(this.getAttribute().getScale()); - return ret; - } - - /** - * TODO: 準備中 - * - * @param decimal TODO: 準備中 - */ - public abstract void setDecimal(BigDecimal decimal); - - /** - * thisの保持する数値データをint型で返す - * - * @param size TODO: 準備中 - * @return thisの保持する数値データをintに変換した値 - */ - public int getInt(int size) { - int retval = 0; - int p = 0; - CobolDataStorage data = this.getDataStorage(); - for (int n = 0; n < size; ++n, ++p) { - retval *= 10; - if (data.getByte(p) > (byte) '9') { - retval += 10; - } else { - retval += data.getByte(p) - (byte) '0'; - } - } - return retval; - } - - /** thisの保持する数値データを0に設定するメソッド. */ - public void setZero() { - throw new CobolRuntimeException(0, "未実装"); - } - - /** - * thisの保持する数値データに,引数で与えられたフィールドの保持する数値データを加算する - * - * @param field 加算する数値を保持するフィールド - * @param opt 加算に関するオプション.詳しくはTODO: 準備中 - * @return 加算後のthisの保持する数値データ - * @throws CobolStopRunException TODO: 準備中 - */ - public int add(AbstractCobolField field, int opt) throws CobolStopRunException { - CobolDecimal d1 = this.getDecimal(); - CobolDecimal d2 = field.getDecimal(); - d1.add(d2); - return d1.getField(this, opt); - } - - /** - * thisの保持する数値データに,引数で与えられたフィールドの保持する数値データを減算する - * - * @param field 減算する数値を保持するフィールド - * @param opt 減算に関するオプション.詳しくはTODO: 準備中 - * @return 減算後のthisの保持する数値データ - * @throws CobolStopRunException TODO: 準備中 - */ - public int sub(AbstractCobolField field, int opt) throws CobolStopRunException { - CobolDecimal d1 = this.getDecimal(); - CobolDecimal d2 = field.getDecimal(); - d1.sub(d2); - return d1.getField(this, opt); - } - - /** - * 保持する数値データに指定された値を加算する - * - * @param n thisの保持する数値データから加算する数値 - * @return 基本的に0が返される.詳しくは詳しくはTODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int addInt(int n) throws CobolStopRunException { - if (n == 0) { - return 0; - } - CobolDecimal d1 = this.getDecimal(); - CobolDecimal d2 = new CobolDecimal(n); - d2.setScale(0); - if (d1.getScale() != 0) { - BigDecimal cobMexp = BigDecimal.TEN.pow(d1.getScale()); - d2.setValue(d2.getValue().multiply(cobMexp)); - d2.setScale(d1.getScale()); - } - d1.setValue(d1.getValue().add(d2.getValue())); - return d1.getField(this, 0); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public abstract int addPackedInt(int n); - - /** - * thisの保持する数値データに指定された値を減算する - * - * @param n thisの保持する数値データから減算する数値 - * @return 基本的に0が返される.詳しくはTODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int subInt(int n) throws CobolStopRunException { - return n == 0 ? 0 : this.addInt(-n); - } - - /** - * TODO: 準備中 - * - * @param divisor TODO: 準備中 - * @param quotient TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int divQuotient(AbstractCobolField divisor, AbstractCobolField quotient, int opt) - throws CobolStopRunException { - AbstractCobolField dividend = this; - CobolDecimal d1 = dividend.getDecimal(); - CobolDecimal d2 = divisor.getDecimal(); - CobolDecimal.cobD3.set(d1); - - d1.div(d2); - if (d1.getScale() == CobolDecimal.DECIMAL_NAN) { - CobolDecimal.cobD3.setScale(CobolDecimal.DECIMAL_NAN); - // TODO 例外を投げるべきか? - return 0; - } - CobolDecimal d4 = new CobolDecimal(); - d4.set(d1); - int ret = d1.getField(quotient, opt); - - d4.shiftDecimal(quotient.getAttribute().getScale() - d4.getScale()); - - d4.mul(d2); - CobolDecimal.cobD3.sub(d4); - - return ret; - } - - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int divRemainder(int opt) throws CobolStopRunException { - return CobolDecimal.cobD3.getField(this, opt); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpInt(int n) { - CobolDecimal d1 = this.getDecimal(); - CobolDecimal d2 = new CobolDecimal(n); - d2.setScale(0); - return d1.compareTo(d2); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpInt(long n) { - return this.cmpInt((int) n); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpUint(int n) { - return this.cmpInt(n); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpUint(long n) { - return this.cmpUint((int) n); - } - - /** - * TODO: 準備中 - * - * @param field TODO: 準備中 - * @return TODO: 準備中 - */ - public int numericCompareTo(AbstractCobolField field) { - CobolDecimal d1 = this.getDecimal(); - CobolDecimal d2 = field.getDecimal(); - return d1.compareTo(d2); - } - - /** - * thisの保持する数値データの符号を返す - * - * @return thisの保持する数値データが負ならば負数,0なら0,正なら正数を返す - */ - public int getSign() { - return this.getAttribute().isFlagHaveSign() ? this.realGetSign() : 0; - } - - /** - * thisの保持する数値データの符号を設定する - * - * @param sign 正符号を設定するときは正数,負符号を設定するときは負数,それ以外は0 - */ - public void putSign(int sign) { - if (this.getAttribute().isFlagHaveSign()) { - this.realPutSign(sign); - } - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @return TODO: 準備中 - */ - protected AbstractCobolField preprocessOfMoving(AbstractCobolField src) { - AbstractCobolField src1 = src; - - if (src1.getAttribute().isTypeAlphanumAll() || src1.getAttribute().isTypeNationalAll()) { - this.moveFromAll(src); - return null; - } - - if (this.getSize() == 0) { - return null; - } - - CobolFieldAttribute srcAttr = src1.getAttribute(); - CobolFieldAttribute dstAttr = this.getAttribute(); - if (!srcAttr.isTypeGroup()) { - if ((srcAttr.isTypeNumeric() || srcAttr.isTypeAlphanum() || srcAttr.isTypeAlphanumEdited()) - && (dstAttr.isTypeNational() || dstAttr.isTypeNationalEdited())) { - byte[] pTmp = null; - int size = 0; - if (srcAttr.isTypeNumericDisplay() - || srcAttr.isTypeAlphanum() - || srcAttr.isTypeAlphanumEdited()) { - pTmp = CobolNationalField.judge_hankakujpn_exist(src1); - size = CobolNationalField.workReturnSize; - } - if (pTmp != null) { - src1.setDataStorage(new CobolDataStorage(pTmp)); - src1.setSize(size); - } - if (src1.size == 0) { - return src1; - } - } - } - - if (src1.getSize() == 0) { - return src1; - } - - return src; - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - protected void moveFromAll(AbstractCobolField src) { - int size = 0; - CobolDataStorage tmpSrcStorage = null; - int tmpSrcSize = 0; - boolean xToN = false; - CobolFieldAttribute attr; - int digcount; - - if (!(src.getAttribute().isTypeNational() || src.getAttribute().isTypeNationalEdited()) - && (this.attribute.isTypeNational() || this.attribute.isTypeNationalEdited())) { - CobolDataStorage pTmp; - byte[] pBytes = CobolNationalField.judge_hankakujpn_exist(src); - pTmp = new CobolDataStorage(pBytes); - size = CobolNationalField.workReturnSize; - tmpSrcStorage = pTmp; - tmpSrcSize = size; - xToN = true; - } - - if (xToN) { - attr = new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NATIONAL, 0, 0, 0, null); - } else { - attr = new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - } - if (this.attribute.isTypeNumeric()) { - digcount = 18; - attr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); - attr.setDigits(18); - } else { - digcount = this.size; - } - if (digcount > AbstractCobolField.lastsize) { - AbstractCobolField.lastdata = new CobolDataStorage(digcount); - AbstractCobolField.lastsize = digcount; - } - - AbstractCobolField temp = CobolFieldFactory.makeCobolField(digcount, lastdata, attr); - - if (xToN && tmpSrcSize > 1) { - for (int i = 0; i < digcount; ++i) { - lastdata.setByte(i, tmpSrcStorage.getByte(i % tmpSrcSize)); - } - } else { - if (src.getSize() == 1) { - lastdata.memset(src.getDataStorage().getByte(0), digcount); - } else { - int i; - for (i = 0; i < digcount; ++i) { - lastdata.setByte(i, src.getDataStorage().getByte(i % src.getSize())); - } - - int b = Byte.toUnsignedInt(lastdata.getByte(i - 1)); - if ((0x81 <= b && b <= 0x9F) || (0xE0 <= b && b <= 0xFC)) { - lastdata.setByte(i - 1, (byte) ' '); - } - } - } - this.moveFrom(temp); - } - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param field 代入元のデータ - */ - public abstract void moveFrom(AbstractCobolField field); - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param dataStorage 代入元のデータ - */ - public abstract void moveFrom(CobolDataStorage dataStorage); - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param bytes 代入元のデータ - */ - public abstract void moveFrom(byte[] bytes); - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param s 代入元のデータ - */ - public void moveFrom(String s) { - // The maximum number of digits of int type in decimal is 10 - - byte[] bytes = s.getBytes(charSetSJIS); - - CobolDataStorage storage = new CobolDataStorage(bytes.length); - storage.memcpy(bytes); - - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, - bytes.length, - 0, - 0, - String.format("X(%d)", bytes.length)); - - AbstractCobolField tmp = CobolFieldFactory.makeCobolField(bytes.length, storage, attr); - this.moveFrom(tmp); - } - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param number 代入元のデータ - */ - public void moveFrom(int number) { - // The maximum number of digits of int type in decimal is 10 - final int length = 10; - - CobolDataStorage storage = new CobolDataStorage(length); - String formattedNumberString = String.format("%10d", Math.abs(number)); - storage.memcpy(formattedNumberString, length); - if (number < 0) { - storage.setByte(length - 1, (byte) (storage.getByte(length - 1) + 0x40)); - } - - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - length, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - "S9(10)"); - - AbstractCobolField tmp = CobolFieldFactory.makeCobolField(length, storage, attr); - this.moveFrom(tmp); - } - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param number 代入元のデータ - */ - public void moveFrom(double number) { - String s = Double.toString(Math.abs(number)); - String ss; - int scale; - ss = s.replace("+", "").replace("-", ""); - int pointIndex = ss.indexOf('.'); - if (pointIndex < 0) { - scale = 0; - } else { - scale = ss.length() - 1 - pointIndex; - ss = ss.replace(".", ""); - } - - CobolDataStorage storage = new CobolDataStorage(ss.length()); - storage.memcpy(ss, ss.length()); - - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - ss.length(), - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - ""); - - AbstractCobolField tmp = CobolFieldFactory.makeCobolField(ss.length(), storage, attr); - if (number < 0) { - tmp.putSign(-1); - } - this.moveFrom(tmp); - } - - /** - * 引数で与えらえられたデータからthisへの代入を行う - * - * @param number 代入元のデータ - */ - public abstract void moveFrom(BigDecimal number); - - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public void checkNumeric(byte[] s) throws CobolStopRunException { - if (!this.isNumeric()) { - byte[] buff = this.getDataStorage().getByteArrayRef(0, this.getSize()); - String name = new String(s, charSetSJIS); - String content = new String(buff, charSetSJIS); - CobolUtil.runtimeError("'" + name + "' not numeric: '" + content + "'"); - CobolStopRunException.stopRunAndThrow(1); - } - } - - // TODO abstract指定 - /** - * thisと引数で与えられたデータとの数値比較を行う - * - * @param other thisと比較するfield - * @return 保持する数値データの比較を行い,this<fieldなら負の値,this==fieldなら0,this>fieldなら正の値 - */ - public int compareTo(AbstractCobolField other) { - AbstractCobolField f1 = this; - AbstractCobolField f2 = other; - CobolFieldAttribute attr1 = f1.getAttribute(); - CobolFieldAttribute attr2 = f2.getAttribute(); - - if (attr1.isTypeNational() || attr1.isTypeNationalAll() || attr1.isTypeNationalEdited()) { - if (f2 == CobolConstant.quote) { - f2 = CobolConstant.zenQuote; - } else if (f2 == CobolConstant.space) { - f2 = CobolConstant.zenSpace; - } else if (f2 == CobolConstant.zero) { - f2 = CobolConstant.zenZero; - } - } - - if (attr2.isTypeNational() || attr2.isTypeNationalAll() || attr2.isTypeNationalEdited()) { - if (f1 == CobolConstant.quote) { - f1 = CobolConstant.zenQuote; - } else if (f1 == CobolConstant.space) { - f1 = CobolConstant.zenSpace; - } else if (f1 == CobolConstant.zero) { - f1 = CobolConstant.zenZero; - } - } - - attr1 = f1.getAttribute(); - attr2 = f2.getAttribute(); - - if (attr1.isTypeNumeric() && attr2.isTypeNumeric()) { - return f1.numericCompareTo(f2); - } - if (attr2.isTypeAlphanumAll()) { - if (f2 == CobolConstant.zero && attr1.isTypeNumeric()) { - return f1.cmpInt(0); - } else if (f2.getSize() == 1) { - return f1.cmpChar(f2.getDataStorage().getByte(0)); - } else { - return f1.cmpAll(f2); - } - } else if (attr1.isTypeAlphanumAll()) { - if (f1 == CobolConstant.zero && attr2.isTypeNumeric()) { - return -f2.cmpInt(0); - } else if (f1.getSize() == 1) { - return -f2.cmpChar(f1.getDataStorage().getByte(0)); - } else { - return -f2.cmpAll(f1); - } - } else if (attr2.isTypeNationalAll()) { - if (f2 == CobolConstant.zero && attr1.isTypeNumeric()) { - return f1.cmpInt(0); - } else if (f2.getSize() == 1) { - return f1.cmpChar(f2.getDataStorage().getByte(0)); - } else { - return f1.cmpAll(f2); - } - } else if (attr1.isTypeNationalAll()) { - if (f1 == CobolConstant.zero && attr2.isTypeNumeric()) { - return -f2.cmpInt(0); - } else if (f1.getSize() == 1) { - return -f2.cmpChar(f1.getDataStorage().getByte(0)); - } else { - return -f2.cmpAll(f1); - } - } else if (attr1.isTypeGroup() || attr2.isTypeGroup()) { - return f1.cmpSimpleStr(f2); - } else { - if (attr1.isTypeNumeric()) { - if (attr1.getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY) { - int tmpSize = attr1.getDigits(); - CobolDataStorage tmpBuff = new CobolDataStorage(48); - CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr1); - tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); - tmpAttr.setFlags(tmpAttr.getFlags() & ~CobolFieldAttribute.COB_FLAG_HAVE_SIGN); - AbstractCobolField tmpField = CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); - tmpField.moveFrom(f1); - f1 = tmpField; - } else if (attr1.isFlagSignSeparate()) { - int tmpSize = attr1.getDigits(); - CobolDataStorage tmpBuff = new CobolDataStorage(48); - CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr1); - tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); - tmpAttr.setFlags(CobolFieldAttribute.COB_FLAG_HAVE_SIGN); - AbstractCobolField tmpField = CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); - tmpField.moveFrom(f1); - f1 = tmpField; - } - } - if (attr2.isTypeNumeric()) { - if (attr2.getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY) { - int tmpSize = attr2.getDigits(); - CobolDataStorage tmpBuff = new CobolDataStorage(48); - CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr2); - tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); - tmpAttr.setFlags(tmpAttr.getFlags() & ~CobolFieldAttribute.COB_FLAG_HAVE_SIGN); - AbstractCobolField tmpField = CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); - tmpField.moveFrom(f2); - f2 = tmpField; - } else if (attr2.isFlagSignSeparate()) { - int tmpSize = attr2.getDigits(); - CobolDataStorage tmpBuff = new CobolDataStorage(48); - CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr2); - tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); - tmpAttr.setFlags(CobolFieldAttribute.COB_FLAG_HAVE_SIGN); - AbstractCobolField tmpField = CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); - tmpField.moveFrom(f2); - f2 = tmpField; - } - } - } - return f1.cmpAlnum(f2); - } - - /** - * TODO: 準備中 - * - * @param field thisと比較するフィールド - * @return TODO: 準備中 - */ - protected int compareAll(AbstractCobolField field) { - int size = this.getSize(); - CobolDataStorage data = this.getDataStorage(); - int sign = this.getSign(); - int ret = 0; - int p = 0; - outer: - { - while (size >= field.getSize()) { - // TODO moduleを参照するコードにする - ret = alnumCmps(data, p, field.getDataStorage(), 0, this.getSize(), null); - if (ret != 0) { - break outer; - } - size -= field.getSize(); - p += field.getSize(); - } - if (size > 0) { - // TODO moduleを参照するコードにする - ret = alnumCmps(data, 0, field.getDataStorage(), 0, this.getSize(), null); - } - } - this.putSign(sign); - return ret; - } - - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param s1Start s1のバイトデータにアクセスるするときの最初の添え字の相対位置 - * @param s2 TODO: 準備中 - * @param s2Start s2のバイトデータにアクセスるするときの最初の添え字の相対位置 - * @param size TODO: 準備中 - * @param col TODO: 準備中 - * @return TODO: 準備中 - */ - protected int alnumCmps( - CobolDataStorage s1, - int s1Start, - CobolDataStorage s2, - int s2Start, - int size, - CobolDataStorage col) { - int ret; - if (col != null) { - // TODO 実装 - throw new CobolRuntimeException(0, "未実装"); - } else { - for (int i = 0; i < size; ++i) { - ret = s1.getByte(i + s1Start) - s2.getByte(i + s2Start); - if (ret != 0) { - return ret; - } - } - } - return 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public BigDecimal getBigDecimal() { - return BigDecimal.ZERO; - } - - /** - * TODO: 準備中 - * - * @return thisからCobolNumericField型へ変換した値 - */ - public CobolNumericField getNumericField() { - return new CobolNumericField(this.getSize(), this.getDataStorage(), this.getAttribute()); - } - - /** - * TODO: 準備中 - * - * @param field TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public void checkMoveStrNum(AbstractCobolField field) throws CobolStopRunException { - switch (this.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - switch (field.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC: - /* case COB_TYPE_NUMERIC_DISPLAY: */ - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - CobolDataStorage data = this.getDataStorage(); - int firstIndex = this.getFirstDataIndex(); - for (int i = 0; i < this.getSize(); i++) { - byte val = data.getByte(firstIndex + i); - if (val < 0x30 || 0x39 < val) { - CobolUtil.runtimeError("Numeric value is expected"); - CobolStopRunException.stopRunAndThrow(1); - } - } - break; - default: - break; - } - break; - default: - break; - } - } - - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param s1StartIndex s1のバイトデータにアクセスるするときの最初の添え字の相対位置 - * @param s2 TODO: 準備中 - * @param s2StartIndex s2のバイトデータにアクセスるするときの最初の添え字の相対位置 - * @param size TODO: 準備中 - */ - protected void ownByteMemcpy( - CobolDataStorage s1, int s1StartIndex, CobolDataStorage s2, int s2StartIndex, int size) { - int i = 0; - do { - s1.setByte(s1StartIndex + i, s2.getByte(s2StartIndex + i)); - i++; - } while (--size > 0); - } - - @Override - public String toString() { - return this.getString(); - } - - /** - * TODO: 準備中 - * - * @return this.dataの保持するデータを文字列にして返す. - */ - public String fieldToString() { - CobolDataStorage data = this.getDataStorage(); - int i; - for (i = this.getSize() - 1; i >= 0; --i) { - if (data.getByte(i) != ' ' && data.getByte(i) != 0) { - break; - } - } - return new String(data.getByteArray(0, i + 1)); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setInt(int n) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 9, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(ByteBuffer.allocate(4).putInt(n).array()); - AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, data, attr); - this.moveFrom(temp); - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - */ - public void setInt(CobolDataStorage data) { - this.setInt((int) data.intValue()); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setLong(Long n) { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 9, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(ByteBuffer.allocate(8).putLong(n).array()); - AbstractCobolField temp = CobolFieldFactory.makeCobolField(8, data, attr); - this.moveFrom(temp); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(byte[] src, int size) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - AbstractCobolField temp = - CobolFieldFactory.makeCobolField(size, new CobolDataStorage(src), attr); - this.moveFrom(temp); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public void memcpy(byte[] src) { - this.memcpy(src, src.length); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(String src, int size) { - byte[] bytes = src.getBytes(); - this.memcpy(bytes, size); - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public void memcpy(String src) { - this.memcpy(src.getBytes()); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isOmitted() { - return this.dataStorage == null; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isNumeric() { - int i; - char c = 0; - int sign = 0; - switch (this.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - return true; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - byte b = 0; - for (i = 0; i < this.size - 1; ++i) { - b = this.getDataStorage().getByte(i); - if ((b & 0xF0) > 0x90 || (b & 0x0f) > 0x09) { - return false; - } - } - b = this.getDataStorage().getByte(i); - if ((b & 0xf0) > 0x90) { - return false; - } - sign = b & 0x0f; - if (sign == 0x0f) { - return true; - } - if (this.getAttribute().isFlagHaveSign()) { - if (sign == 0x0c || sign == 0x0d) { - return true; - } - } else if (CobolUtil.nibbleCForUnsigned) { - if (sign == 0x0c) { - return true; - } - } - return false; - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - int size = this.getFieldSize(); - int firstIndex = this.getFirstDataIndex(); - sign = this.getSign(); - this.putSign(1); - for (i = 0; i < size; ++i) { - c = (char) this.getDataStorage().getByte(i + firstIndex); - if (!Character.isDigit(c)) { - this.putSign(sign); - return false; - } - } - this.putSign(sign); - return true; - default: - for (i = 0; i < this.size; ++i) { - c = (char) this.getDataStorage().getByte(i); - if (!Character.isDigit(c)) { - return false; - } - } - return true; - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isAlpha() { - for (int i = 0; i < this.size; ++i) { - char c = (char) this.getDataStorage().getByte(i); - if (!Character.isWhitespace(c) && !Character.isAlphabetic(c)) { - return false; - } - } - return true; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isUpper() { - for (int i = 0; i < this.size; ++i) { - char c = (char) this.getDataStorage().getByte(i); - if (!Character.isWhitespace(c) && !Character.isUpperCase(c)) { - return false; - } - } - return true; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isLower() { - for (int i = 0; i < this.size; ++i) { - char c = (char) this.getDataStorage().getByte(i); - if (!Character.isWhitespace(c) && !Character.isLowerCase(c)) { - return false; - } - } - return true; - } - - /** - * TODO: 準備中 - * - * @param c TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpChar(byte c) { - int sign = this.getSign(); - int ret = AbstractCobolField.commonCmpc(this.getDataStorage(), c, this.getSize()); - if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { - this.putSign(sign); - } - return ret; - } - - private interface DataComparator { - int compare(CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col); - } - - private static DataComparator getComparator(AbstractCobolField f) { - if (f.getAttribute().isTypeNational()) { - return new DataComparator() { - @Override - public int compare( - CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { - return CobolUtil.nationalCmps(s1, s2, size, col); - } - }; - } else { - return new DataComparator() { - @Override - public int compare( - CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { - return CobolUtil.alnumCmps(s1, s2, size, col); - } - }; - } - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAll(AbstractCobolField other) { - int ret = 0; - DataComparator comparator = getComparator(this); - int sign = 0; - - if ((this.getAttribute().getType() == CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL - || this.getAttribute().getType() == CobolFieldAttribute.COB_TYPE_NATIONAL_ALL) - && this.getSize() < other.getSize()) { - int size = other.getSize(); - CobolDataStorage data = other.getDataStorage(); - sign = other.getSign(); - CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; - OUTSIDE: - do { - while (size >= this.getSize()) { - ret = comparator.compare(this.getDataStorage(), data, this.getSize(), s); - if (ret != 0) { - break OUTSIDE; - } - size -= this.getSize(); - data = data.getSubDataStorage(this.getSize()); - } - if (size > 0) { - ret = comparator.compare(this.getDataStorage(), data, size, s); - } - } while (false); - } else { - int size = this.getSize(); - CobolDataStorage data = this.getDataStorage(); - sign = this.getSign(); - CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; - OUTSIDE: - do { - while (size >= other.getSize()) { - ret = comparator.compare(data, other.getDataStorage(), other.getSize(), s); - if (ret != 0) { - break OUTSIDE; - } - size -= other.getSize(); - data = data.getSubDataStorage(other.getSize()); - } - if (size > 0) { - ret = comparator.compare(data, other.getDataStorage(), size, s); - } - } while (false); - } - - if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { - this.putSign(sign); - } - return ret; - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSimpleStr(AbstractCobolField other) { - AbstractCobolField lf, sf; - DataComparator comparator = getComparator(this); - if (this.getSize() < other.getSize()) { - lf = other; - sf = this; - } else { - lf = this; - sf = other; - } - CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; - int ret = comparator.compare(this.getDataStorage(), other.getDataStorage(), sf.getSize(), s); - if (ret == 0) { - if (lf.getSize() > sf.getSize()) { - if ((lf.getAttribute().getType() & CobolFieldAttribute.COB_TYPE_NATIONAL) != 0) { - int cmpResult = - AbstractCobolField.isNationalPadding( - sf.getSize(), lf.getDataStorage(), lf.getSize() - sf.getSize()); - return cmpResult == 0 ? 1 : 0; - } else { - ret = - AbstractCobolField.commonCmpc( - lf.getDataStorage().getSubDataStorage(sf.getSize()), - (byte) ' ', - lf.getSize() - sf.getSize()); - } - if (this.getSize() < other.getSize()) { - ret = -ret; - } - } - } - return ret; - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlnum(AbstractCobolField other) { - int sign1 = this.getSign(); - int sign2 = other.getSign(); - - if (this.getAttribute().isTypeNumericDisplay()) { - this.putSign(1); - } - if (other.getAttribute().isTypeNumericDisplay()) { - other.putSign(1); - } - - int ret = this.cmpSimpleStr(other); - - if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { - this.putSign(sign1); - } - if (other.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { - other.putSign(sign2); - } - return ret; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int realGetSign() { - CobolDataStorage p; - CobolFieldAttribute attr = this.getAttribute(); - byte b; - - switch (this.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC: - if (attr.isFlagSignLeading()) { - p = this.getDataStorage(); - } else { - p = this.getDataStorage().getSubDataStorage(this.getSize() - 1); - } - - b = p.getByte(0); - if (attr.isFlagSignSeparate()) { - return b == '+' ? 1 : -1; - } else { - if ('0' <= b && b <= '9') { - return 1; - } - if (b == ' ') { - p.setByte(0, (byte) '0'); - return 1; - } - if (CobolModule.getCurrentModule().display_sign != 0) { - return AbstractCobolField.getSignEbcdic(p); - } else { - // TODO マクロの分岐に関して調査 - // #ifdef COB_EBCDIC_MACHINE - // CobolUtil.getSignAscii(p); - // #else - p.setByte(0, (byte) (b - 0x40)); - // #endif - return -1; - } - } - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - p = this.getDataStorage().getSubDataStorage(this.size - 1); - return ((p.getByte(0) & 0x0f) == 0x0d) ? -1 : 1; - default: - return 0; - } - } - - /** - * TODO: 準備中 - * - * @param sign TODO: 準備中 - */ - public void realPutSign(int sign) { - CobolDataStorage p; - CobolFieldAttribute attr = this.getAttribute(); - byte b; - - switch (this.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC: - if (attr.isFlagSignLeading()) { - p = this.getDataStorage(); - } else { - p = this.getDataStorage().getSubDataStorage(this.getSize() - 1); - } - - b = p.getByte(0); - if (attr.isFlagSignSeparate()) { - char c = (sign < 0) ? '-' : '+'; - if (b != c) { - p.setByte(0, (byte) c); - } - } else if (CobolModule.getCurrentModule().display_sign != 0) { - AbstractCobolField.putSignEbcdic(p, sign); - } else if (sign < 0) { - p.setByte(0, (byte) (b + 0x40)); - } - return; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - p = this.getDataStorage().getSubDataStorage(this.size - 1); - if (sign < 0) { - p.setByte(0, (byte) ((p.getByte(0) & 0xf0) | 0x0d)); - } else { - p.setByte(0, (byte) ((p.getByte(0) & 0xf0) | 0x0c)); - } - return; - default: - return; - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public long getLong() { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, - 18, - 0, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - byte[] data = new byte[8]; - CobolDataStorage storage = new CobolDataStorage(data); - AbstractCobolField field = CobolFieldFactory.makeCobolField(8, storage, attr); - field.moveFrom(this); - return ByteBuffer.wrap(data).getLong(); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public long getLongValue() { - return 0; - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public void hankakuMoveFrom(AbstractCobolField src) { - // TODO 暫定実装 - this.moveFrom(src); - } - - // libcob/common.cのcob_get_sign_ebcdicの実装 - /** - * TODO: 準備中 - * - * @param p TODO: 準備中 - * @return TODO: 準備中 - */ - private static int getSignEbcdic(CobolDataStorage p) { - switch (p.getByte(0)) { - case '{': - p.setByte(0, (byte) '0'); - return 1; - case 'A': - p.setByte(0, (byte) '1'); - return 1; - case 'B': - p.setByte(0, (byte) '2'); - return 1; - case 'C': - p.setByte(0, (byte) '3'); - return 1; - case 'D': - p.setByte(0, (byte) '4'); - return 1; - case 'E': - p.setByte(0, (byte) '5'); - return 1; - case 'F': - p.setByte(0, (byte) '6'); - return 1; - case 'G': - p.setByte(0, (byte) '7'); - return 1; - case 'H': - p.setByte(0, (byte) '8'); - return 1; - case 'I': - p.setByte(0, (byte) '9'); - return 1; - case '}': - p.setByte(0, (byte) '0'); - return -1; - case 'J': - p.setByte(0, (byte) '1'); - return -1; - case 'K': - p.setByte(0, (byte) '2'); - return -1; - case 'L': - p.setByte(0, (byte) '3'); - return -1; - case 'M': - p.setByte(0, (byte) '4'); - return -1; - case 'N': - p.setByte(0, (byte) '5'); - return -1; - case 'O': - p.setByte(0, (byte) '6'); - return -1; - case 'P': - p.setByte(0, (byte) '7'); - return -1; - case 'Q': - p.setByte(0, (byte) '8'); - return -1; - case 'R': - p.setByte(0, (byte) '9'); - return -1; - default: - /* What to do here */ - p.setByte(0, (byte) '0'); - return 1; - } - } - - // libcob/common.cのcob_put_sign_ebcdicの実装 - /** - * TODO: 準備中 - * - * @param p TODO: 準備中 - * @param sign TODO: 準備中 - */ - private static void putSignEbcdic(CobolDataStorage p, int sign) { - if (sign < 0) { - switch (p.getByte(0)) { - case '0': - p.setByte(0, (byte) '}'); - return; - case '1': - p.setByte(0, (byte) 'J'); - return; - case '2': - p.setByte(0, (byte) 'K'); - return; - case '3': - p.setByte(0, (byte) 'L'); - return; - case '4': - p.setByte(0, (byte) 'M'); - return; - case '5': - p.setByte(0, (byte) 'N'); - return; - case '6': - p.setByte(0, (byte) 'O'); - return; - case '7': - p.setByte(0, (byte) 'P'); - return; - case '8': - p.setByte(0, (byte) 'Q'); - return; - case '9': - p.setByte(0, (byte) 'R'); - return; - default: - /* What to do here */ - p.setByte(0, (byte) '}'); - return; - } - } - switch (p.getByte(0)) { - case '0': - p.setByte(0, (byte) '{'); - return; - case '1': - p.setByte(0, (byte) 'A'); - return; - case '2': - p.setByte(0, (byte) 'B'); - return; - case '3': - p.setByte(0, (byte) 'C'); - return; - case '4': - p.setByte(0, (byte) 'D'); - return; - case '5': - p.setByte(0, (byte) 'E'); - return; - case '6': - p.setByte(0, (byte) 'F'); - return; - case '7': - p.setByte(0, (byte) 'G'); - return; - case '8': - p.setByte(0, (byte) 'H'); - return; - case '9': - p.setByte(0, (byte) 'I'); - return; - default: - /* What to do here */ - p.setByte(0, (byte) '{'); - return; - } - } - - // libcob/common.cのcommon_compcの実装 - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param c TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - private static int commonCmpc(CobolDataStorage s1, byte c, int size) { - CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; - int uc = c & 0xFF; - if (s != null) { - for (int i = 0; i < size; ++i) { - // int ret = s.getByte((s1.getByte(i) & 0xFF) - (s.getByte(uc) & 0xFF)); - int ret = (s.getByte(s1.getByte(i) & 0xFF) & 0xFF) - (s.getByte(uc) & 0xFF); - if (ret != 0) { - return ret; - } - } - } else { - for (int i = 0; i < size; ++i) { - int ret = (s1.getByte(i) & 0xFF) - uc; - if (ret != 0) { - return ret; - } - } - } - return 0; - } - - // libcob/common.cのis_national_paddingの実装 - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param s TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - private static int isNationalPadding(int offset, CobolDataStorage s, int size) { - int ret = 1; - int i = 0; - while (i < size && ret != 0) { - if (s.getByte(offset + i) == ' ') { - i++; - } else if (size - i >= CobolConstant.ZENCSIZ) { - for (int j = 0; j < CobolConstant.ZENCSIZ; ++j) { - if (s.getByte(offset + i + j) != CobolConstant.ZENSPC[j]) { - return 0; - } - } - i += CobolConstant.ZENCSIZ; - } else { - ret = 0; - } - } - return ret; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** COBOLで使用する変数を表現するクラス。 */ +public abstract class AbstractCobolField { + /** データを格納に使用するバイト配列の長さ */ + protected int size; + + /** データを格納するバイト配列を扱うオブジェクト */ + protected CobolDataStorage dataStorage; + + /** 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) */ + protected CobolFieldAttribute attribute; + + static int lastsize = 0; + static CobolDataStorage lastdata = null; + + /** TODO: 準備中 */ + public static Charset charSetSJIS = Charset.forName("SHIFT-JIS"); + + static final int[] cobExp10 = { + 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 + }; + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) + */ + public AbstractCobolField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + this.size = size; + this.dataStorage = dataStorage; + this.attribute = attribute; + } + + /** + * メンバ変数dataStorageのgetter + * + * @return this.dataStorage + */ + public CobolDataStorage getDataStorage() { + return dataStorage; + } + + /** + * メンバ変数dataStorageのsetter + * + * @param dataStorage TODO: 準備中 + */ + public void setDataStorage(CobolDataStorage dataStorage) { + this.dataStorage = dataStorage; + } + + /** + * メンバ変数attributeのsetter + * + * @param attribute TODO: 準備中 + */ + public void setAttribute(CobolFieldAttribute attribute) { + this.attribute = attribute; + } + + /** + * メンバ変数attributeのgetter + * + * @return this.attribute + */ + public CobolFieldAttribute getAttribute() { + return attribute; + } + + /** + * メンバ変数sizeのsetter + * + * @param size TODO: 準備中 + */ + public void setSize(int size) { + this.size = size; + } + + /** + * メンバ変数sizeのgetter + * + * @return this.size + */ + public int getSize() { + return size; + } + + /** + * 符号部分を除いた数値部分の長さを返す + * + * @return 符号付で符号が分離している場合はthis.size-1,そうでなければthis.size + */ + public int getFieldSize() { + return this.size - (this.attribute.isFlagSignSeparate() ? 1 : 0); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public CobolDataStorage getFieldData() { + if (this.attribute.isFlagSignSeparate() && this.attribute.isFlagSignLeading()) { + return new CobolDataStorage( + this.dataStorage.getRefOfData(), this.dataStorage.getIndex() + 1); + } else { + return this.dataStorage; + } + } + + /** + * バイト配列の中で(符号データではなく)数値データの格納されている最小の添え字を返す + * + * @return SIGN LEADINGかつSIGN SEPARATEな変数なら1,それ以外は0 + */ + public int getFirstDataIndex() { + return (this.attribute.isFlagSignSeparate() && this.attribute.isFlagSignLeading()) ? 1 : 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public byte[] getBytes() { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 9, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage n = new CobolDataStorage(new byte[4], 0); + AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, n, attr); + temp.moveFrom(this); + return ByteBuffer.wrap(n.getByteArray(0, 4)).array(); + } + + /** + * thisの文字列表現をかえす. + * + * @return thisの文字列表現 + */ + public abstract String getString(); + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getInt() { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 9, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage n = new CobolDataStorage(new byte[4], 0); + AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, n, attr); + temp.moveFrom(this); + return ByteBuffer.wrap(n.getByteArray(0, 4)).getInt(); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public double getDouble() { + try { + return Double.parseDouble(this.getString()); + } catch (Exception e) { + return 0; + } + } + + /** + * 数値を表すデータが実装すべきメソッド. 保持する数値データをCobolDecimal型に変換する. + * + * @return 保持する数値データをCobolDecimal型に変換した値 + */ + public CobolDecimal getDecimal() { + CobolDataStorage data = this.getDataStorage(); + int firstDataIndex = this.getFirstDataIndex(); + int size = this.getFieldSize(); + + if (Byte.toUnsignedInt(data.getByte(firstDataIndex)) == 0xFF) { + CobolDecimal decimal = new CobolDecimal(BigDecimal.TEN.pow(size)); + decimal.setScale(this.getAttribute().getScale()); + return decimal; + } + + if (data.getByte(firstDataIndex) == 0) { + CobolDecimal decimal = new CobolDecimal(BigDecimal.TEN.pow(size).negate()); + decimal.setScale(this.getAttribute().getScale()); + return decimal; + } + + char[] buf = new char[size]; + for (int i = 0; i < size; ++i) { + byte val = data.getByte(firstDataIndex + i); + if (val >= 0x70) { + buf[i] = (char) (val - 0x40); + } else { + buf[i] = (char) val; + } + } + + CobolFieldAttribute attr = this.getAttribute(); + int sign = 1; + if (attr.isFlagHaveSign()) { + if (attr.isFlagSignSeparate()) { + int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; + if (data.getByte(signIndex) == '-') { + sign = -1; + } + } else { + int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; + if (data.getByte(signIndex) >= 0x70) { + sign = -1; + } + } + } + + BigDecimal decimal = new BigDecimal(buf); + if (sign < 0) { + decimal = decimal.negate(); + } + CobolDecimal ret = new CobolDecimal(decimal); + ret.setScale(this.getAttribute().getScale()); + return ret; + } + + /** + * TODO: 準備中 + * + * @param decimal TODO: 準備中 + */ + public abstract void setDecimal(BigDecimal decimal); + + /** + * thisの保持する数値データをint型で返す + * + * @param size TODO: 準備中 + * @return thisの保持する数値データをintに変換した値 + */ + public int getInt(int size) { + int retval = 0; + int p = 0; + CobolDataStorage data = this.getDataStorage(); + for (int n = 0; n < size; ++n, ++p) { + retval *= 10; + if (data.getByte(p) > (byte) '9') { + retval += 10; + } else { + retval += data.getByte(p) - (byte) '0'; + } + } + return retval; + } + + /** thisの保持する数値データを0に設定するメソッド. */ + public void setZero() { + throw new CobolRuntimeException(0, "未実装"); + } + + /** + * thisの保持する数値データに,引数で与えられたフィールドの保持する数値データを加算する + * + * @param field 加算する数値を保持するフィールド + * @param opt 加算に関するオプション.詳しくはTODO: 準備中 + * @return 加算後のthisの保持する数値データ + * @throws CobolStopRunException TODO: 準備中 + */ + public int add(AbstractCobolField field, int opt) throws CobolStopRunException { + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = field.getDecimal(); + d1.add(d2); + return d1.getField(this, opt); + } + + /** + * thisの保持する数値データに,引数で与えられたフィールドの保持する数値データを減算する + * + * @param field 減算する数値を保持するフィールド + * @param opt 減算に関するオプション.詳しくはTODO: 準備中 + * @return 減算後のthisの保持する数値データ + * @throws CobolStopRunException TODO: 準備中 + */ + public int sub(AbstractCobolField field, int opt) throws CobolStopRunException { + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = field.getDecimal(); + d1.sub(d2); + return d1.getField(this, opt); + } + + /** + * 保持する数値データに指定された値を加算する + * + * @param n thisの保持する数値データから加算する数値 + * @return 基本的に0が返される.詳しくは詳しくはTODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int addInt(int n) throws CobolStopRunException { + if (n == 0) { + return 0; + } + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = new CobolDecimal(n); + d2.setScale(0); + if (d1.getScale() != 0) { + BigDecimal cobMexp = BigDecimal.TEN.pow(d1.getScale()); + d2.setValue(d2.getValue().multiply(cobMexp)); + d2.setScale(d1.getScale()); + } + d1.setValue(d1.getValue().add(d2.getValue())); + return d1.getField(this, 0); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public abstract int addPackedInt(int n); + + /** + * thisの保持する数値データに指定された値を減算する + * + * @param n thisの保持する数値データから減算する数値 + * @return 基本的に0が返される.詳しくはTODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int subInt(int n) throws CobolStopRunException { + return n == 0 ? 0 : this.addInt(-n); + } + + /** + * TODO: 準備中 + * + * @param divisor TODO: 準備中 + * @param quotient TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int divQuotient(AbstractCobolField divisor, AbstractCobolField quotient, int opt) + throws CobolStopRunException { + AbstractCobolField dividend = this; + CobolDecimal d1 = dividend.getDecimal(); + CobolDecimal d2 = divisor.getDecimal(); + CobolDecimal.cobD3.set(d1); + + d1.div(d2); + if (d1.getScale() == CobolDecimal.DECIMAL_NAN) { + CobolDecimal.cobD3.setScale(CobolDecimal.DECIMAL_NAN); + // TODO 例外を投げるべきか? + return 0; + } + CobolDecimal d4 = new CobolDecimal(); + d4.set(d1); + int ret = d1.getField(quotient, opt); + + d4.shiftDecimal(quotient.getAttribute().getScale() - d4.getScale()); + + d4.mul(d2); + CobolDecimal.cobD3.sub(d4); + + return ret; + } + + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int divRemainder(int opt) throws CobolStopRunException { + return CobolDecimal.cobD3.getField(this, opt); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpInt(int n) { + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = new CobolDecimal(n); + d2.setScale(0); + return d1.compareTo(d2); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpInt(long n) { + return this.cmpInt((int) n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpUint(int n) { + return this.cmpInt(n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpUint(long n) { + return this.cmpUint((int) n); + } + + /** + * TODO: 準備中 + * + * @param field TODO: 準備中 + * @return TODO: 準備中 + */ + public int numericCompareTo(AbstractCobolField field) { + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = field.getDecimal(); + return d1.compareTo(d2); + } + + /** + * thisの保持する数値データの符号を返す + * + * @return thisの保持する数値データが負ならば負数,0なら0,正なら正数を返す + */ + public int getSign() { + return this.getAttribute().isFlagHaveSign() ? this.realGetSign() : 0; + } + + /** + * thisの保持する数値データの符号を設定する + * + * @param sign 正符号を設定するときは正数,負符号を設定するときは負数,それ以外は0 + */ + public void putSign(int sign) { + if (this.getAttribute().isFlagHaveSign()) { + this.realPutSign(sign); + } + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @return TODO: 準備中 + */ + protected AbstractCobolField preprocessOfMoving(AbstractCobolField src) { + AbstractCobolField src1 = src; + + if (src1.getAttribute().isTypeAlphanumAll() || src1.getAttribute().isTypeNationalAll()) { + this.moveFromAll(src); + return null; + } + + if (this.getSize() == 0) { + return null; + } + + CobolFieldAttribute srcAttr = src1.getAttribute(); + CobolFieldAttribute dstAttr = this.getAttribute(); + if (!srcAttr.isTypeGroup()) { + if ((srcAttr.isTypeNumeric() + || srcAttr.isTypeAlphanum() + || srcAttr.isTypeAlphanumEdited()) + && (dstAttr.isTypeNational() || dstAttr.isTypeNationalEdited())) { + byte[] pTmp = null; + int size = 0; + if (srcAttr.isTypeNumericDisplay() + || srcAttr.isTypeAlphanum() + || srcAttr.isTypeAlphanumEdited()) { + pTmp = CobolNationalField.judge_hankakujpn_exist(src1); + size = CobolNationalField.workReturnSize; + } + if (pTmp != null) { + src1.setDataStorage(new CobolDataStorage(pTmp)); + src1.setSize(size); + } + if (src1.size == 0) { + return src1; + } + } + } + + if (src1.getSize() == 0) { + return src1; + } + + return src; + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + protected void moveFromAll(AbstractCobolField src) { + int size = 0; + CobolDataStorage tmpSrcStorage = null; + int tmpSrcSize = 0; + boolean xToN = false; + CobolFieldAttribute attr; + int digcount; + + if (!(src.getAttribute().isTypeNational() || src.getAttribute().isTypeNationalEdited()) + && (this.attribute.isTypeNational() || this.attribute.isTypeNationalEdited())) { + CobolDataStorage pTmp; + byte[] pBytes = CobolNationalField.judge_hankakujpn_exist(src); + pTmp = new CobolDataStorage(pBytes); + size = CobolNationalField.workReturnSize; + tmpSrcStorage = pTmp; + tmpSrcSize = size; + xToN = true; + } + + if (xToN) { + attr = new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NATIONAL, 0, 0, 0, null); + } else { + attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + } + if (this.attribute.isTypeNumeric()) { + digcount = 18; + attr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); + attr.setDigits(18); + } else { + digcount = this.size; + } + if (digcount > AbstractCobolField.lastsize) { + AbstractCobolField.lastdata = new CobolDataStorage(digcount); + AbstractCobolField.lastsize = digcount; + } + + AbstractCobolField temp = CobolFieldFactory.makeCobolField(digcount, lastdata, attr); + + if (xToN && tmpSrcSize > 1) { + for (int i = 0; i < digcount; ++i) { + lastdata.setByte(i, tmpSrcStorage.getByte(i % tmpSrcSize)); + } + } else { + if (src.getSize() == 1) { + lastdata.memset(src.getDataStorage().getByte(0), digcount); + } else { + int i; + for (i = 0; i < digcount; ++i) { + lastdata.setByte(i, src.getDataStorage().getByte(i % src.getSize())); + } + + int b = Byte.toUnsignedInt(lastdata.getByte(i - 1)); + if ((0x81 <= b && b <= 0x9F) || (0xE0 <= b && b <= 0xFC)) { + lastdata.setByte(i - 1, (byte) ' '); + } + } + } + this.moveFrom(temp); + } + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param field 代入元のデータ + */ + public abstract void moveFrom(AbstractCobolField field); + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param dataStorage 代入元のデータ + */ + public abstract void moveFrom(CobolDataStorage dataStorage); + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param bytes 代入元のデータ + */ + public abstract void moveFrom(byte[] bytes); + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param s 代入元のデータ + */ + public void moveFrom(String s) { + // The maximum number of digits of int type in decimal is 10 + + byte[] bytes = s.getBytes(charSetSJIS); + + CobolDataStorage storage = new CobolDataStorage(bytes.length); + storage.memcpy(bytes); + + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, + bytes.length, + 0, + 0, + String.format("X(%d)", bytes.length)); + + AbstractCobolField tmp = CobolFieldFactory.makeCobolField(bytes.length, storage, attr); + this.moveFrom(tmp); + } + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param number 代入元のデータ + */ + public void moveFrom(int number) { + // The maximum number of digits of int type in decimal is 10 + final int length = 10; + + CobolDataStorage storage = new CobolDataStorage(length); + String formattedNumberString = String.format("%10d", Math.abs(number)); + storage.memcpy(formattedNumberString, length); + if (number < 0) { + storage.setByte(length - 1, (byte) (storage.getByte(length - 1) + 0x40)); + } + + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + length, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + "S9(10)"); + + AbstractCobolField tmp = CobolFieldFactory.makeCobolField(length, storage, attr); + this.moveFrom(tmp); + } + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param number 代入元のデータ + */ + public void moveFrom(double number) { + String s = Double.toString(Math.abs(number)); + String ss; + int scale; + ss = s.replace("+", "").replace("-", ""); + int pointIndex = ss.indexOf('.'); + if (pointIndex < 0) { + scale = 0; + } else { + scale = ss.length() - 1 - pointIndex; + ss = ss.replace(".", ""); + } + + CobolDataStorage storage = new CobolDataStorage(ss.length()); + storage.memcpy(ss, ss.length()); + + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + ss.length(), + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + ""); + + AbstractCobolField tmp = CobolFieldFactory.makeCobolField(ss.length(), storage, attr); + if (number < 0) { + tmp.putSign(-1); + } + this.moveFrom(tmp); + } + + /** + * 引数で与えらえられたデータからthisへの代入を行う + * + * @param number 代入元のデータ + */ + public abstract void moveFrom(BigDecimal number); + + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public void checkNumeric(byte[] s) throws CobolStopRunException { + if (!this.isNumeric()) { + byte[] buff = this.getDataStorage().getByteArrayRef(0, this.getSize()); + String name = new String(s, charSetSJIS); + String content = new String(buff, charSetSJIS); + CobolUtil.runtimeError("'" + name + "' not numeric: '" + content + "'"); + CobolStopRunException.stopRunAndThrow(1); + } + } + + // TODO abstract指定 + /** + * thisと引数で与えられたデータとの数値比較を行う + * + * @param other thisと比較するfield + * @return 保持する数値データの比較を行い,this<fieldなら負の値,this==fieldなら0,this>fieldなら正の値 + */ + public int compareTo(AbstractCobolField other) { + AbstractCobolField f1 = this; + AbstractCobolField f2 = other; + CobolFieldAttribute attr1 = f1.getAttribute(); + CobolFieldAttribute attr2 = f2.getAttribute(); + + if (attr1.isTypeNational() || attr1.isTypeNationalAll() || attr1.isTypeNationalEdited()) { + if (f2 == CobolConstant.quote) { + f2 = CobolConstant.zenQuote; + } else if (f2 == CobolConstant.space) { + f2 = CobolConstant.zenSpace; + } else if (f2 == CobolConstant.zero) { + f2 = CobolConstant.zenZero; + } + } + + if (attr2.isTypeNational() || attr2.isTypeNationalAll() || attr2.isTypeNationalEdited()) { + if (f1 == CobolConstant.quote) { + f1 = CobolConstant.zenQuote; + } else if (f1 == CobolConstant.space) { + f1 = CobolConstant.zenSpace; + } else if (f1 == CobolConstant.zero) { + f1 = CobolConstant.zenZero; + } + } + + attr1 = f1.getAttribute(); + attr2 = f2.getAttribute(); + + if (attr1.isTypeNumeric() && attr2.isTypeNumeric()) { + return f1.numericCompareTo(f2); + } + if (attr2.isTypeAlphanumAll()) { + if (f2 == CobolConstant.zero && attr1.isTypeNumeric()) { + return f1.cmpInt(0); + } else if (f2.getSize() == 1) { + return f1.cmpChar(f2.getDataStorage().getByte(0)); + } else { + return f1.cmpAll(f2); + } + } else if (attr1.isTypeAlphanumAll()) { + if (f1 == CobolConstant.zero && attr2.isTypeNumeric()) { + return -f2.cmpInt(0); + } else if (f1.getSize() == 1) { + return -f2.cmpChar(f1.getDataStorage().getByte(0)); + } else { + return -f2.cmpAll(f1); + } + } else if (attr2.isTypeNationalAll()) { + if (f2 == CobolConstant.zero && attr1.isTypeNumeric()) { + return f1.cmpInt(0); + } else if (f2.getSize() == 1) { + return f1.cmpChar(f2.getDataStorage().getByte(0)); + } else { + return f1.cmpAll(f2); + } + } else if (attr1.isTypeNationalAll()) { + if (f1 == CobolConstant.zero && attr2.isTypeNumeric()) { + return -f2.cmpInt(0); + } else if (f1.getSize() == 1) { + return -f2.cmpChar(f1.getDataStorage().getByte(0)); + } else { + return -f2.cmpAll(f1); + } + } else if (attr1.isTypeGroup() || attr2.isTypeGroup()) { + return f1.cmpSimpleStr(f2); + } else { + if (attr1.isTypeNumeric()) { + if (attr1.getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY) { + int tmpSize = attr1.getDigits(); + CobolDataStorage tmpBuff = new CobolDataStorage(48); + CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr1); + tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); + tmpAttr.setFlags(tmpAttr.getFlags() & ~CobolFieldAttribute.COB_FLAG_HAVE_SIGN); + AbstractCobolField tmpField = + CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); + tmpField.moveFrom(f1); + f1 = tmpField; + } else if (attr1.isFlagSignSeparate()) { + int tmpSize = attr1.getDigits(); + CobolDataStorage tmpBuff = new CobolDataStorage(48); + CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr1); + tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); + tmpAttr.setFlags(CobolFieldAttribute.COB_FLAG_HAVE_SIGN); + AbstractCobolField tmpField = + CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); + tmpField.moveFrom(f1); + f1 = tmpField; + } + } + if (attr2.isTypeNumeric()) { + if (attr2.getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY) { + int tmpSize = attr2.getDigits(); + CobolDataStorage tmpBuff = new CobolDataStorage(48); + CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr2); + tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); + tmpAttr.setFlags(tmpAttr.getFlags() & ~CobolFieldAttribute.COB_FLAG_HAVE_SIGN); + AbstractCobolField tmpField = + CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); + tmpField.moveFrom(f2); + f2 = tmpField; + } else if (attr2.isFlagSignSeparate()) { + int tmpSize = attr2.getDigits(); + CobolDataStorage tmpBuff = new CobolDataStorage(48); + CobolFieldAttribute tmpAttr = new CobolFieldAttribute(attr2); + tmpAttr.setType(CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY); + tmpAttr.setFlags(CobolFieldAttribute.COB_FLAG_HAVE_SIGN); + AbstractCobolField tmpField = + CobolFieldFactory.makeCobolField(tmpSize, tmpBuff, tmpAttr); + tmpField.moveFrom(f2); + f2 = tmpField; + } + } + } + return f1.cmpAlnum(f2); + } + + /** + * TODO: 準備中 + * + * @param field thisと比較するフィールド + * @return TODO: 準備中 + */ + protected int compareAll(AbstractCobolField field) { + int size = this.getSize(); + CobolDataStorage data = this.getDataStorage(); + int sign = this.getSign(); + int ret = 0; + int p = 0; + outer: + { + while (size >= field.getSize()) { + // TODO moduleを参照するコードにする + ret = alnumCmps(data, p, field.getDataStorage(), 0, this.getSize(), null); + if (ret != 0) { + break outer; + } + size -= field.getSize(); + p += field.getSize(); + } + if (size > 0) { + // TODO moduleを参照するコードにする + ret = alnumCmps(data, 0, field.getDataStorage(), 0, this.getSize(), null); + } + } + this.putSign(sign); + return ret; + } + + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param s1Start s1のバイトデータにアクセスるするときの最初の添え字の相対位置 + * @param s2 TODO: 準備中 + * @param s2Start s2のバイトデータにアクセスるするときの最初の添え字の相対位置 + * @param size TODO: 準備中 + * @param col TODO: 準備中 + * @return TODO: 準備中 + */ + protected int alnumCmps( + CobolDataStorage s1, + int s1Start, + CobolDataStorage s2, + int s2Start, + int size, + CobolDataStorage col) { + int ret; + if (col != null) { + // TODO 実装 + throw new CobolRuntimeException(0, "未実装"); + } else { + for (int i = 0; i < size; ++i) { + ret = s1.getByte(i + s1Start) - s2.getByte(i + s2Start); + if (ret != 0) { + return ret; + } + } + } + return 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public BigDecimal getBigDecimal() { + return BigDecimal.ZERO; + } + + /** + * TODO: 準備中 + * + * @return thisからCobolNumericField型へ変換した値 + */ + public CobolNumericField getNumericField() { + return new CobolNumericField(this.getSize(), this.getDataStorage(), this.getAttribute()); + } + + /** + * TODO: 準備中 + * + * @param field TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public void checkMoveStrNum(AbstractCobolField field) throws CobolStopRunException { + switch (this.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + switch (field.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC: + /* case COB_TYPE_NUMERIC_DISPLAY: */ + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + CobolDataStorage data = this.getDataStorage(); + int firstIndex = this.getFirstDataIndex(); + for (int i = 0; i < this.getSize(); i++) { + byte val = data.getByte(firstIndex + i); + if (val < 0x30 || 0x39 < val) { + CobolUtil.runtimeError("Numeric value is expected"); + CobolStopRunException.stopRunAndThrow(1); + } + } + break; + default: + break; + } + break; + default: + break; + } + } + + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param s1StartIndex s1のバイトデータにアクセスるするときの最初の添え字の相対位置 + * @param s2 TODO: 準備中 + * @param s2StartIndex s2のバイトデータにアクセスるするときの最初の添え字の相対位置 + * @param size TODO: 準備中 + */ + protected void ownByteMemcpy( + CobolDataStorage s1, + int s1StartIndex, + CobolDataStorage s2, + int s2StartIndex, + int size) { + int i = 0; + do { + s1.setByte(s1StartIndex + i, s2.getByte(s2StartIndex + i)); + i++; + } while (--size > 0); + } + + @Override + public String toString() { + return this.getString(); + } + + /** + * TODO: 準備中 + * + * @return this.dataの保持するデータを文字列にして返す. + */ + public String fieldToString() { + CobolDataStorage data = this.getDataStorage(); + int i; + for (i = this.getSize() - 1; i >= 0; --i) { + if (data.getByte(i) != ' ' && data.getByte(i) != 0) { + break; + } + } + return new String(data.getByteArray(0, i + 1)); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setInt(int n) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 9, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(ByteBuffer.allocate(4).putInt(n).array()); + AbstractCobolField temp = CobolFieldFactory.makeCobolField(4, data, attr); + this.moveFrom(temp); + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + */ + public void setInt(CobolDataStorage data) { + this.setInt((int) data.intValue()); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setLong(Long n) { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 9, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(ByteBuffer.allocate(8).putLong(n).array()); + AbstractCobolField temp = CobolFieldFactory.makeCobolField(8, data, attr); + this.moveFrom(temp); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(byte[] src, int size) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + AbstractCobolField temp = + CobolFieldFactory.makeCobolField(size, new CobolDataStorage(src), attr); + this.moveFrom(temp); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public void memcpy(byte[] src) { + this.memcpy(src, src.length); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(String src, int size) { + byte[] bytes = src.getBytes(); + this.memcpy(bytes, size); + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public void memcpy(String src) { + this.memcpy(src.getBytes()); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isOmitted() { + return this.dataStorage == null; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isNumeric() { + int i; + char c = 0; + int sign = 0; + switch (this.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + return true; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + byte b = 0; + for (i = 0; i < this.size - 1; ++i) { + b = this.getDataStorage().getByte(i); + if ((b & 0xF0) > 0x90 || (b & 0x0f) > 0x09) { + return false; + } + } + b = this.getDataStorage().getByte(i); + if ((b & 0xf0) > 0x90) { + return false; + } + sign = b & 0x0f; + if (sign == 0x0f) { + return true; + } + if (this.getAttribute().isFlagHaveSign()) { + if (sign == 0x0c || sign == 0x0d) { + return true; + } + } else if (CobolUtil.nibbleCForUnsigned) { + if (sign == 0x0c) { + return true; + } + } + return false; + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + int size = this.getFieldSize(); + int firstIndex = this.getFirstDataIndex(); + sign = this.getSign(); + this.putSign(1); + for (i = 0; i < size; ++i) { + c = (char) this.getDataStorage().getByte(i + firstIndex); + if (!Character.isDigit(c)) { + this.putSign(sign); + return false; + } + } + this.putSign(sign); + return true; + default: + for (i = 0; i < this.size; ++i) { + c = (char) this.getDataStorage().getByte(i); + if (!Character.isDigit(c)) { + return false; + } + } + return true; + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isAlpha() { + for (int i = 0; i < this.size; ++i) { + char c = (char) this.getDataStorage().getByte(i); + if (!Character.isWhitespace(c) && !Character.isAlphabetic(c)) { + return false; + } + } + return true; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isUpper() { + for (int i = 0; i < this.size; ++i) { + char c = (char) this.getDataStorage().getByte(i); + if (!Character.isWhitespace(c) && !Character.isUpperCase(c)) { + return false; + } + } + return true; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isLower() { + for (int i = 0; i < this.size; ++i) { + char c = (char) this.getDataStorage().getByte(i); + if (!Character.isWhitespace(c) && !Character.isLowerCase(c)) { + return false; + } + } + return true; + } + + /** + * TODO: 準備中 + * + * @param c TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpChar(byte c) { + int sign = this.getSign(); + int ret = AbstractCobolField.commonCmpc(this.getDataStorage(), c, this.getSize()); + if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { + this.putSign(sign); + } + return ret; + } + + private interface DataComparator { + int compare(CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col); + } + + private static DataComparator getComparator(AbstractCobolField f) { + if (f.getAttribute().isTypeNational()) { + return new DataComparator() { + @Override + public int compare( + CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { + return CobolUtil.nationalCmps(s1, s2, size, col); + } + }; + } else { + return new DataComparator() { + @Override + public int compare( + CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { + return CobolUtil.alnumCmps(s1, s2, size, col); + } + }; + } + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAll(AbstractCobolField other) { + int ret = 0; + DataComparator comparator = getComparator(this); + int sign = 0; + + if ((this.getAttribute().getType() == CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL + || this.getAttribute().getType() + == CobolFieldAttribute.COB_TYPE_NATIONAL_ALL) + && this.getSize() < other.getSize()) { + int size = other.getSize(); + CobolDataStorage data = other.getDataStorage(); + sign = other.getSign(); + CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; + OUTSIDE: + do { + while (size >= this.getSize()) { + ret = comparator.compare(this.getDataStorage(), data, this.getSize(), s); + if (ret != 0) { + break OUTSIDE; + } + size -= this.getSize(); + data = data.getSubDataStorage(this.getSize()); + } + if (size > 0) { + ret = comparator.compare(this.getDataStorage(), data, size, s); + } + } while (false); + } else { + int size = this.getSize(); + CobolDataStorage data = this.getDataStorage(); + sign = this.getSign(); + CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; + OUTSIDE: + do { + while (size >= other.getSize()) { + ret = comparator.compare(data, other.getDataStorage(), other.getSize(), s); + if (ret != 0) { + break OUTSIDE; + } + size -= other.getSize(); + data = data.getSubDataStorage(other.getSize()); + } + if (size > 0) { + ret = comparator.compare(data, other.getDataStorage(), size, s); + } + } while (false); + } + + if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { + this.putSign(sign); + } + return ret; + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSimpleStr(AbstractCobolField other) { + AbstractCobolField lf, sf; + DataComparator comparator = getComparator(this); + if (this.getSize() < other.getSize()) { + lf = other; + sf = this; + } else { + lf = this; + sf = other; + } + CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; + int ret = + comparator.compare(this.getDataStorage(), other.getDataStorage(), sf.getSize(), s); + if (ret == 0) { + if (lf.getSize() > sf.getSize()) { + if ((lf.getAttribute().getType() & CobolFieldAttribute.COB_TYPE_NATIONAL) != 0) { + int cmpResult = + AbstractCobolField.isNationalPadding( + sf.getSize(), lf.getDataStorage(), lf.getSize() - sf.getSize()); + return cmpResult == 0 ? 1 : 0; + } else { + ret = + AbstractCobolField.commonCmpc( + lf.getDataStorage().getSubDataStorage(sf.getSize()), + (byte) ' ', + lf.getSize() - sf.getSize()); + } + if (this.getSize() < other.getSize()) { + ret = -ret; + } + } + } + return ret; + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlnum(AbstractCobolField other) { + int sign1 = this.getSign(); + int sign2 = other.getSign(); + + if (this.getAttribute().isTypeNumericDisplay()) { + this.putSign(1); + } + if (other.getAttribute().isTypeNumericDisplay()) { + other.putSign(1); + } + + int ret = this.cmpSimpleStr(other); + + if (this.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { + this.putSign(sign1); + } + if (other.getAttribute().getType() != CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED) { + other.putSign(sign2); + } + return ret; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int realGetSign() { + CobolDataStorage p; + CobolFieldAttribute attr = this.getAttribute(); + byte b; + + switch (this.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC: + if (attr.isFlagSignLeading()) { + p = this.getDataStorage(); + } else { + p = this.getDataStorage().getSubDataStorage(this.getSize() - 1); + } + + b = p.getByte(0); + if (attr.isFlagSignSeparate()) { + return b == '+' ? 1 : -1; + } else { + if ('0' <= b && b <= '9') { + return 1; + } + if (b == ' ') { + p.setByte(0, (byte) '0'); + return 1; + } + if (CobolModule.getCurrentModule().display_sign != 0) { + return AbstractCobolField.getSignEbcdic(p); + } else { + // TODO マクロの分岐に関して調査 + // #ifdef COB_EBCDIC_MACHINE + // CobolUtil.getSignAscii(p); + // #else + p.setByte(0, (byte) (b - 0x40)); + // #endif + return -1; + } + } + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + p = this.getDataStorage().getSubDataStorage(this.size - 1); + return ((p.getByte(0) & 0x0f) == 0x0d) ? -1 : 1; + default: + return 0; + } + } + + /** + * TODO: 準備中 + * + * @param sign TODO: 準備中 + */ + public void realPutSign(int sign) { + CobolDataStorage p; + CobolFieldAttribute attr = this.getAttribute(); + byte b; + + switch (this.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC: + if (attr.isFlagSignLeading()) { + p = this.getDataStorage(); + } else { + p = this.getDataStorage().getSubDataStorage(this.getSize() - 1); + } + + b = p.getByte(0); + if (attr.isFlagSignSeparate()) { + char c = (sign < 0) ? '-' : '+'; + if (b != c) { + p.setByte(0, (byte) c); + } + } else if (CobolModule.getCurrentModule().display_sign != 0) { + AbstractCobolField.putSignEbcdic(p, sign); + } else if (sign < 0) { + p.setByte(0, (byte) (b + 0x40)); + } + return; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + p = this.getDataStorage().getSubDataStorage(this.size - 1); + if (sign < 0) { + p.setByte(0, (byte) ((p.getByte(0) & 0xf0) | 0x0d)); + } else { + p.setByte(0, (byte) ((p.getByte(0) & 0xf0) | 0x0c)); + } + return; + default: + return; + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public long getLong() { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, + 18, + 0, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + byte[] data = new byte[8]; + CobolDataStorage storage = new CobolDataStorage(data); + AbstractCobolField field = CobolFieldFactory.makeCobolField(8, storage, attr); + field.moveFrom(this); + return ByteBuffer.wrap(data).getLong(); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public long getLongValue() { + return 0; + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public void hankakuMoveFrom(AbstractCobolField src) { + // TODO 暫定実装 + this.moveFrom(src); + } + + // libcob/common.cのcob_get_sign_ebcdicの実装 + /** + * TODO: 準備中 + * + * @param p TODO: 準備中 + * @return TODO: 準備中 + */ + private static int getSignEbcdic(CobolDataStorage p) { + switch (p.getByte(0)) { + case '{': + p.setByte(0, (byte) '0'); + return 1; + case 'A': + p.setByte(0, (byte) '1'); + return 1; + case 'B': + p.setByte(0, (byte) '2'); + return 1; + case 'C': + p.setByte(0, (byte) '3'); + return 1; + case 'D': + p.setByte(0, (byte) '4'); + return 1; + case 'E': + p.setByte(0, (byte) '5'); + return 1; + case 'F': + p.setByte(0, (byte) '6'); + return 1; + case 'G': + p.setByte(0, (byte) '7'); + return 1; + case 'H': + p.setByte(0, (byte) '8'); + return 1; + case 'I': + p.setByte(0, (byte) '9'); + return 1; + case '}': + p.setByte(0, (byte) '0'); + return -1; + case 'J': + p.setByte(0, (byte) '1'); + return -1; + case 'K': + p.setByte(0, (byte) '2'); + return -1; + case 'L': + p.setByte(0, (byte) '3'); + return -1; + case 'M': + p.setByte(0, (byte) '4'); + return -1; + case 'N': + p.setByte(0, (byte) '5'); + return -1; + case 'O': + p.setByte(0, (byte) '6'); + return -1; + case 'P': + p.setByte(0, (byte) '7'); + return -1; + case 'Q': + p.setByte(0, (byte) '8'); + return -1; + case 'R': + p.setByte(0, (byte) '9'); + return -1; + default: + /* What to do here */ + p.setByte(0, (byte) '0'); + return 1; + } + } + + // libcob/common.cのcob_put_sign_ebcdicの実装 + /** + * TODO: 準備中 + * + * @param p TODO: 準備中 + * @param sign TODO: 準備中 + */ + private static void putSignEbcdic(CobolDataStorage p, int sign) { + if (sign < 0) { + switch (p.getByte(0)) { + case '0': + p.setByte(0, (byte) '}'); + return; + case '1': + p.setByte(0, (byte) 'J'); + return; + case '2': + p.setByte(0, (byte) 'K'); + return; + case '3': + p.setByte(0, (byte) 'L'); + return; + case '4': + p.setByte(0, (byte) 'M'); + return; + case '5': + p.setByte(0, (byte) 'N'); + return; + case '6': + p.setByte(0, (byte) 'O'); + return; + case '7': + p.setByte(0, (byte) 'P'); + return; + case '8': + p.setByte(0, (byte) 'Q'); + return; + case '9': + p.setByte(0, (byte) 'R'); + return; + default: + /* What to do here */ + p.setByte(0, (byte) '}'); + return; + } + } + switch (p.getByte(0)) { + case '0': + p.setByte(0, (byte) '{'); + return; + case '1': + p.setByte(0, (byte) 'A'); + return; + case '2': + p.setByte(0, (byte) 'B'); + return; + case '3': + p.setByte(0, (byte) 'C'); + return; + case '4': + p.setByte(0, (byte) 'D'); + return; + case '5': + p.setByte(0, (byte) 'E'); + return; + case '6': + p.setByte(0, (byte) 'F'); + return; + case '7': + p.setByte(0, (byte) 'G'); + return; + case '8': + p.setByte(0, (byte) 'H'); + return; + case '9': + p.setByte(0, (byte) 'I'); + return; + default: + /* What to do here */ + p.setByte(0, (byte) '{'); + return; + } + } + + // libcob/common.cのcommon_compcの実装 + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param c TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + private static int commonCmpc(CobolDataStorage s1, byte c, int size) { + CobolDataStorage s = CobolModule.getCurrentModule().collating_sequence; + int uc = c & 0xFF; + if (s != null) { + for (int i = 0; i < size; ++i) { + // int ret = s.getByte((s1.getByte(i) & 0xFF) - (s.getByte(uc) & 0xFF)); + int ret = (s.getByte(s1.getByte(i) & 0xFF) & 0xFF) - (s.getByte(uc) & 0xFF); + if (ret != 0) { + return ret; + } + } + } else { + for (int i = 0; i < size; ++i) { + int ret = (s1.getByte(i) & 0xFF) - uc; + if (ret != 0) { + return ret; + } + } + } + return 0; + } + + // libcob/common.cのis_national_paddingの実装 + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param s TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + private static int isNationalPadding(int offset, CobolDataStorage s, int size) { + int ret = 1; + int i = 0; + while (i < size && ret != 0) { + if (s.getByte(offset + i) == ' ') { + i++; + } else if (size - i >= CobolConstant.ZENCSIZ) { + for (int j = 0; j < CobolConstant.ZENCSIZ; ++j) { + if (s.getByte(offset + i + j) != CobolConstant.ZENSPC[j]) { + return 0; + } + } + i += CobolConstant.ZENCSIZ; + } else { + ret = 0; + } + } + return ret; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericAllField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericAllField.java index 107f8303..c667a3ed 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericAllField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericAllField.java @@ -1,34 +1,34 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -/** TODO: 準備中 */ -public class CobolAlphanumericAllField extends CobolAlphanumericField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolAlphanumericAllField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +/** TODO: 準備中 */ +public class CobolAlphanumericAllField extends CobolAlphanumericField { + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolAlphanumericAllField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java index da5d28c5..bd833521 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java @@ -1,187 +1,192 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -/** TODO: 準備中 */ -public class CobolAlphanumericEditedField extends AbstractCobolField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolAlphanumericEditedField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - // TODO Auto-generated method stub - return new byte[0]; - } - - @Override - public String getString() { - // TODO Auto-generated method stub - return null; - } - - @Override - public CobolDecimal getDecimal() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setDecimal(BigDecimal decimal) { - // TODO Auto-generated method stub - - } - - @Override - public int addPackedInt(int n) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - CobolFieldAttribute attr = src1.getAttribute(); - int scale = src1.getAttribute().getScale(); - int digits = src1.getAttribute().getDigits(); - if (scale < 0 || scale > digits) { - CobolFieldAttribute newAttr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, attr.getDigits(), 0, 0, null); - int newSize = scale < 0 ? digits - scale : scale; - AbstractCobolField newSrc = - CobolFieldFactory.makeCobolField(newSize, new CobolDataStorage(newSize), newAttr); - newSrc.moveFrom(src1); - this.moveFrom(newSrc); - } else { - CobolAlphanumericEditedField.moveAlphanumToEdited(this, src1); - } - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - CobolAlphanumericEditedField.moveAlphanumToEdited(this, src1); - break; - } - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param src TODO: 準備中 - */ - public static void moveAlphanumToEdited(AbstractCobolField dst, AbstractCobolField src) { - CobolDataStorage srcd = src.getDataStorage(); - CobolDataStorage dstd = dst.getDataStorage(); - int sign = src.getSign(); - int max = src.getFieldSize(); - int srcp = src.getFirstDataIndex(); - int dstp = 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); - final int sizeOfInt = 4; - - for (int p = 0; p < picBytes.length; ) { - byte c = picBytes[p++]; - ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); - buf.order(ByteOrder.LITTLE_ENDIAN); - int n = buf.getInt(); - p += sizeOfInt; - - for (; n > 0; --n) { - switch (c) { - case 'A': - case 'X': - case '9': - dstd.setByte(dstp++, (srcp < max) ? srcd.getByte(srcp++) : (byte) ' '); - break; - case '0': - case '/': - dstd.setByte(dstp++, c); - break; - case 'B': - dstd.setByte(dstp++, (byte) ' '); - break; - default: - dstd.setByte(dstp++, (byte) '?'); /* invalid PIC */ - break; - } - } - } - src.putSign(sign); - } - - @Override - public void moveFrom(CobolDataStorage dataStrage) { - // TODO Auto-generated method stub - - } - - @Override - public void moveFrom(byte[] bytes) { - // TODO Auto-generated method stub - - } - - @Override - public void moveFrom(String string) { - // TODO Auto-generated method stub - } - - @Override - public void moveFrom(int number) { - // TODO Auto-generated method stub - } - - @Override - public void moveFrom(double number) { - // TODO Auto-generated method stub - - } - - @Override - public void moveFrom(BigDecimal number) { - // TODO Auto-generated method stub - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** TODO: 準備中 */ +public class CobolAlphanumericEditedField extends AbstractCobolField { + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolAlphanumericEditedField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + // TODO Auto-generated method stub + return new byte[0]; + } + + @Override + public String getString() { + // TODO Auto-generated method stub + return null; + } + + @Override + public CobolDecimal getDecimal() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setDecimal(BigDecimal decimal) { + // TODO Auto-generated method stub + + } + + @Override + public int addPackedInt(int n) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + CobolFieldAttribute attr = src1.getAttribute(); + int scale = src1.getAttribute().getScale(); + int digits = src1.getAttribute().getDigits(); + if (scale < 0 || scale > digits) { + CobolFieldAttribute newAttr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, + attr.getDigits(), + 0, + 0, + null); + int newSize = scale < 0 ? digits - scale : scale; + AbstractCobolField newSrc = + CobolFieldFactory.makeCobolField( + newSize, new CobolDataStorage(newSize), newAttr); + newSrc.moveFrom(src1); + this.moveFrom(newSrc); + } else { + CobolAlphanumericEditedField.moveAlphanumToEdited(this, src1); + } + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + CobolAlphanumericEditedField.moveAlphanumToEdited(this, src1); + break; + } + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param src TODO: 準備中 + */ + public static void moveAlphanumToEdited(AbstractCobolField dst, AbstractCobolField src) { + CobolDataStorage srcd = src.getDataStorage(); + CobolDataStorage dstd = dst.getDataStorage(); + int sign = src.getSign(); + int max = src.getFieldSize(); + int srcp = src.getFirstDataIndex(); + int dstp = 0; + byte[] picBytes = dst.getAttribute().getPic().getBytes(); + final int sizeOfInt = 4; + + for (int p = 0; p < picBytes.length; ) { + byte c = picBytes[p++]; + ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); + buf.order(ByteOrder.LITTLE_ENDIAN); + int n = buf.getInt(); + p += sizeOfInt; + + for (; n > 0; --n) { + switch (c) { + case 'A': + case 'X': + case '9': + dstd.setByte(dstp++, (srcp < max) ? srcd.getByte(srcp++) : (byte) ' '); + break; + case '0': + case '/': + dstd.setByte(dstp++, c); + break; + case 'B': + dstd.setByte(dstp++, (byte) ' '); + break; + default: + dstd.setByte(dstp++, (byte) '?'); /* invalid PIC */ + break; + } + } + } + src.putSign(sign); + } + + @Override + public void moveFrom(CobolDataStorage dataStrage) { + // TODO Auto-generated method stub + + } + + @Override + public void moveFrom(byte[] bytes) { + // TODO Auto-generated method stub + + } + + @Override + public void moveFrom(String string) { + // TODO Auto-generated method stub + } + + @Override + public void moveFrom(int number) { + // TODO Auto-generated method stub + } + + @Override + public void moveFrom(double number) { + // TODO Auto-generated method stub + + } + + @Override + public void moveFrom(BigDecimal number) { + // TODO Auto-generated method stub + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java index e95d38f2..e8519c29 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java @@ -1,246 +1,246 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** PIC 文字列がX(5)やX(9)の変数を表現するクラス. */ -public class CobolAlphanumericField extends AbstractCobolField { - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolAlphanumericField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return dataStorage.getData(); - } - - @Override - public String getString() { - try { - return new String(dataStorage.getByteArray(0, this.getSize()), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } - } - - @Override - public void setDecimal(BigDecimal decimal) { - // TODO 自動生成されたメソッド・スタブ - - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - this.moveDisplayToAlnum(src1); - return; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - this.moveFrom(src1.getNumericField()); - return; - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - case CobolFieldAttribute.COB_TYPE_GROUP: - this.moveAlphanumToAlphanum(src1); - return; - default: - throw new CobolRuntimeException(0, "未実装"); - } - } - - /** - * CobolNumericDisplayからCobolAlphanumericFieldへのMOVEの処理 - * - * @param field 転記元のCobolNumericDisplay型のフィールド - */ - public void moveDisplayToAlnum(AbstractCobolField field) { - CobolDataStorage data1 = field.getDataStorage(); - int data1FirstIndex = field.getFirstDataIndex(); - int size1 = field.getFieldSize(); - int sign = field.getSign(); - CobolDataStorage data2 = this.getDataStorage(); - int size2 = this.getSize(); - - if (size1 >= size2) { - for (int i = 0; i < size2 && data1FirstIndex + i < size1; ++i) { - byte val = data1.getByte(data1FirstIndex + i); - data2.setByte(i, (byte) (val >= 0x70 ? val - 0x40 : val)); - } - } else { - int diff = size2 - size1; - int zeroSize = 0; - int i = 0; - for (; i < size1; ++i) { - byte val = data1.getByte(data1FirstIndex + i); - data2.setByte(i, (byte) (val >= 0x70 ? val - 0x40 : val)); - } - if (field.getAttribute().getScale() < 0) { - for (; i < field.getAttribute().getDigits(); ++i) { - data2.setByte(i, (byte) '0'); - } - } - if (diff - zeroSize > 0) { - for (; i < size2; ++i) { - data2.setByte(i, (byte) ' '); - } - } - } - field.putSign(sign); - } - - /** - * CobolNumericDisplayからCobolAlphanumericFieldへのMOVEの処理 - * - * @param field 転記元のCobolNumericDisplay型のフィールド - */ - public void moveAlphanumToAlphanum(AbstractCobolField field) { - CobolAlphanumericField.moveAlphanumToAlphanum(this, field); - } - - /** - * TODO: 準備中 - * - * @param dst TODO: 準備中 - * @param src TODO: 準備中 - */ - public static void moveAlphanumToAlphanum(AbstractCobolField dst, AbstractCobolField src) { - CobolDataStorage data1 = src.getDataStorage(); - int size1 = src.getSize(); - CobolDataStorage data2 = dst.getDataStorage(); - int size2 = dst.getSize(); - if (size1 >= size2) { - if (dst.getAttribute().isFlagJustified()) { - for (int i = 0; i < size2; ++i) { - data2.setByte(i, data1.getByte(size1 - size2 + i)); - } - } else { - for (int i = 0; i < size2; ++i) { - data2.setByte(i, data1.getByte(i)); - } - } - } else { - if (dst.getAttribute().isFlagJustified()) { - for (int i = 0; i < size2 - size1; ++i) { - data2.setByte(i, (byte) 0x20); - } - for (int i = 0; i < size1; ++i) { - data2.setByte(size2 - size1 + i, data1.getByte(i)); - } - } else { - for (int i = 0; i < size1; ++i) { - data2.setByte(i, data1.getByte(i)); - } - for (int i = 0; i < size2 - size1; ++i) { - data2.setByte(size1 + i, (byte) 0x20); - } - } - } - } - - @Override - public void moveFrom(byte[] bytes) { - this.dataStorage.setData(bytes); - } - - @Override - public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - int length = Math.min(bytes.length, this.getSize()); - CobolDataStorage data = this.getDataStorage(); - // ' '埋め - for (int i = 0; i < this.getSize(); ++i) { - data.setByte(i, (byte) 0x20); - } - for (int i = 0; i < length; ++i) { - data.setByte(i, bytes[i]); - } - } catch (UnsupportedEncodingException e) { - return; - } - } - - @Override - public CobolNumericField getNumericField() { - int size = 36; - int scale = 18; - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(64); - CobolNumericField field = new CobolNumericField(size, data, attr); - field.moveFrom(this); - return field; - } - - @Override - public void moveFrom(int number) { - // TODO 自動生成されたメソッド・スタブ - } - - @Override - public void moveFrom(double number) { - // TODO 自動生成されたメソッド・スタブ - this.moveFrom((int) number); - } - - @Override - public void moveFrom(BigDecimal number) { - // TODO 自動生成されたメソッド・スタブ - - } - - @Override - public void moveFrom(CobolDataStorage dataStorage) { - // TODO 自動生成されたメソッド・スタブ - - } - - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** PIC 文字列がX(5)やX(9)の変数を表現するクラス. */ +public class CobolAlphanumericField extends AbstractCobolField { + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolAlphanumericField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + return dataStorage.getData(); + } + + @Override + public String getString() { + try { + return new String(dataStorage.getByteArray(0, this.getSize()), "SJIS"); + } catch (UnsupportedEncodingException e) { + return ""; + } + } + + @Override + public void setDecimal(BigDecimal decimal) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + this.moveDisplayToAlnum(src1); + return; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + this.moveFrom(src1.getNumericField()); + return; + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + case CobolFieldAttribute.COB_TYPE_GROUP: + this.moveAlphanumToAlphanum(src1); + return; + default: + throw new CobolRuntimeException(0, "未実装"); + } + } + + /** + * CobolNumericDisplayからCobolAlphanumericFieldへのMOVEの処理 + * + * @param field 転記元のCobolNumericDisplay型のフィールド + */ + public void moveDisplayToAlnum(AbstractCobolField field) { + CobolDataStorage data1 = field.getDataStorage(); + int data1FirstIndex = field.getFirstDataIndex(); + int size1 = field.getFieldSize(); + int sign = field.getSign(); + CobolDataStorage data2 = this.getDataStorage(); + int size2 = this.getSize(); + + if (size1 >= size2) { + for (int i = 0; i < size2 && data1FirstIndex + i < size1; ++i) { + byte val = data1.getByte(data1FirstIndex + i); + data2.setByte(i, (byte) (val >= 0x70 ? val - 0x40 : val)); + } + } else { + int diff = size2 - size1; + int zeroSize = 0; + int i = 0; + for (; i < size1; ++i) { + byte val = data1.getByte(data1FirstIndex + i); + data2.setByte(i, (byte) (val >= 0x70 ? val - 0x40 : val)); + } + if (field.getAttribute().getScale() < 0) { + for (; i < field.getAttribute().getDigits(); ++i) { + data2.setByte(i, (byte) '0'); + } + } + if (diff - zeroSize > 0) { + for (; i < size2; ++i) { + data2.setByte(i, (byte) ' '); + } + } + } + field.putSign(sign); + } + + /** + * CobolNumericDisplayからCobolAlphanumericFieldへのMOVEの処理 + * + * @param field 転記元のCobolNumericDisplay型のフィールド + */ + public void moveAlphanumToAlphanum(AbstractCobolField field) { + CobolAlphanumericField.moveAlphanumToAlphanum(this, field); + } + + /** + * TODO: 準備中 + * + * @param dst TODO: 準備中 + * @param src TODO: 準備中 + */ + public static void moveAlphanumToAlphanum(AbstractCobolField dst, AbstractCobolField src) { + CobolDataStorage data1 = src.getDataStorage(); + int size1 = src.getSize(); + CobolDataStorage data2 = dst.getDataStorage(); + int size2 = dst.getSize(); + if (size1 >= size2) { + if (dst.getAttribute().isFlagJustified()) { + for (int i = 0; i < size2; ++i) { + data2.setByte(i, data1.getByte(size1 - size2 + i)); + } + } else { + for (int i = 0; i < size2; ++i) { + data2.setByte(i, data1.getByte(i)); + } + } + } else { + if (dst.getAttribute().isFlagJustified()) { + for (int i = 0; i < size2 - size1; ++i) { + data2.setByte(i, (byte) 0x20); + } + for (int i = 0; i < size1; ++i) { + data2.setByte(size2 - size1 + i, data1.getByte(i)); + } + } else { + for (int i = 0; i < size1; ++i) { + data2.setByte(i, data1.getByte(i)); + } + for (int i = 0; i < size2 - size1; ++i) { + data2.setByte(size1 + i, (byte) 0x20); + } + } + } + } + + @Override + public void moveFrom(byte[] bytes) { + this.dataStorage.setData(bytes); + } + + @Override + public void moveFrom(String string) { + try { + byte[] bytes = string.getBytes("SJIS"); + int length = Math.min(bytes.length, this.getSize()); + CobolDataStorage data = this.getDataStorage(); + // ' '埋め + for (int i = 0; i < this.getSize(); ++i) { + data.setByte(i, (byte) 0x20); + } + for (int i = 0; i < length; ++i) { + data.setByte(i, bytes[i]); + } + } catch (UnsupportedEncodingException e) { + return; + } + } + + @Override + public CobolNumericField getNumericField() { + int size = 36; + int scale = 18; + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(64); + CobolNumericField field = new CobolNumericField(size, data, attr); + field.moveFrom(this); + return field; + } + + @Override + public void moveFrom(int number) { + // TODO 自動生成されたメソッド・スタブ + } + + @Override + public void moveFrom(double number) { + // TODO 自動生成されたメソッド・スタブ + this.moveFrom((int) number); + } + + @Override + public void moveFrom(BigDecimal number) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public void moveFrom(CobolDataStorage dataStorage) { + // TODO 自動生成されたメソッド・スタブ + + } + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java index 49c2f811..d69ba6fa 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java @@ -1,2588 +1,2684 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; - -/** - * COBOL変数のデータを保存するバイト配列を扱うクラス
- * byte[]型のデータと、その配列中での相対位置を保持し、データの読み書きを行う - */ -public class CobolDataStorage { - - /** データを保存するバイト配列 */ - private byte[] data; - - /** このクラスの扱うデータが保存する領域のバイト配列中での相対位置 */ - private int index; - - /** - * 引数で指定された長さ分のバイト配列を確保する.相対位置は0にする. - * - * @param size バイト配列の長さ - */ - public CobolDataStorage(int size) { - this.data = new byte[size]; - this.index = 0; - } - - /** - * バイト配列と相対位置を指定する - * - * @param data データを保存するバイト配列 - * @param index バイト配列中の相対位置 - */ - public CobolDataStorage(byte[] data, int index) { - this.data = data; - this.index = index; - } - - /** - * データを保存するバイト配列を引数で指定する.相対位置は0にする. - * - * @param data データを保存するバイト配列 - */ - public CobolDataStorage(byte[] data) { - this(data, 0); - } - - /** - * TODO: 準備中 - * - * @param bytes TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolDataStorage makeCobolDataStorage(byte... bytes) { - return new CobolDataStorage(bytes); - } - - /** TODO: 準備中 */ - public CobolDataStorage() { - this.index = 0; - this.data = null; - } - - /** - * TODO: 準備中 - * - * @param data TODO: 準備中 - * @param index TODO: 準備中 - */ - public void setDataRefAndIndex(CobolDataStorage data, int index) { - this.data = data.data; - this.index = index; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getIndex() { - return this.index; - } - - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - */ - public void setIndex(int index) { - this.index = index; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public byte[] getRefOfData() { - return this.data; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public CobolDataStorage copy() { - CobolDataStorage ret = new CobolDataStorage(); - ret.index = this.index; - ret.data = this.data; - return ret; - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public ByteBuffer getByteBuffer(int size) { - return ByteBuffer.wrap(this.data, this.index, size); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addIndex(int n) { - this.index += n; - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolDataStorage primitiveToDataStorage(int n) { - byte[] bytes = new byte[4]; - ByteBuffer buffer = ByteBuffer.wrap(bytes); - buffer.putInt(n); - return new CobolDataStorage(bytes); - } - - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolDataStorage primitiveToDataStorage(String s) { - return new CobolDataStorage(s); - } - - /** - * TODO: 準備中 - * - * @param str TODO: 準備中 - */ - public CobolDataStorage(String str) { - try { - byte[] bytes = str.getBytes("SHIFT-JIS"); - this.data = bytes; - this.index = 0; - } catch (Exception e) { - e.printStackTrace(); - this.data = new byte[0]; - this.index = 0; - } - } - - /** - * 保持するバイト配列のコピーを返す - * - * @return TODO: 準備中 - */ - public byte[] getData() { - return this.getData(0); - } - - /** - * 引数で指定した開始位置から末尾までをコピーした配列を返す。 - * - * @param index このオブジェクトの保持する相対位置を基準とした、コピーの開始位置 - * @return 開始位置から末尾までのデータをコピーしたバイト配列 - */ - public byte[] getData(int index) { - byte[] result = new byte[this.data.length - this.index - index]; - - System.arraycopy(this.data, this.index + index, result, 0, result.length); - - return result; - } - - /** - * 引数で指定した相対位置から指定した長さをコピーした配列を返す。 - * - * @param index このオブジェクトの保持する相対位置を基準とした、コピーの開始位置 - * @param length コピーする長さ(バイト数) - * @return 開始位置からlengthバイト分の配列 - */ - public byte[] getByteArray(int index, int length) { - byte[] result = new byte[length]; - System.arraycopy(this.data, this.index + index, result, 0, length); - return result; - } - - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @param length TODO: 準備中 - * @return TODO: 準備中 - */ - public byte[] getByteArrayRef(int index, int length) { - ByteBuffer buffer = ByteBuffer.wrap(this.data, this.index + index, length); - return buffer.array(); - } - - /** - * C言語のmemcpyに相当するメソッド - * - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(CobolDataStorage buf, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(i, buf.getByte(i)); - } - } - - /** - * C言語のmemcpyに相当するメソッド - * - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(byte[] buf, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(i, buf[i]); - } - } - - /** - * C言語のmemcpyに相当するメソッド - * - * @param str TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(String str, int size) { - try { - this.memcpy(str.getBytes("SJIS"), size); - } catch (UnsupportedEncodingException e) { - this.memcpy(str.getBytes(), size); - } - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(int offset, byte[] buf, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(offset + i, buf[i]); - } - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(int offset, CobolDataStorage buf, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(offset + i, buf.getByte(i)); - } - } - - /** - * TODO: 準備中 - * - * @param buf TODO: 準備中 - * @param offset TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memcpy(byte[] buf, int offset, int size) { - System.arraycopy(buf, offset, this.data, this.index, size); - } - - /** - * TODO: 準備中 - * - * @param buf TODO: 準備中 - */ - public void memcpy(byte[] buf) { - this.memcpy(buf, buf.length); - } - - /** - * C言語のmemsetに相当するメソッド - * - * @param ch TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memset(byte ch, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(i, ch); - } - } - - /** - * C言語のmemsetに相当するメソッド - * - * @param ch TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memset(int ch, int size) { - this.memset((byte) ch, size); - } - - /** - * C言語のmemsetに相当するメソッド - * - * @param offset TODO: 準備中 - * @param ch TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memset(int offset, byte ch, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(offset + i, ch); - } - } - - /** - * C言語のmemsetに相当するメソッド - * - * @param offset TODO: 準備中 - * @param ch TODO: 準備中 - * @param size TODO: 準備中 - */ - public void memset(int offset, int ch, int size) { - this.memset(offset, (byte) ch, size); - } - - /** - * C言語のmemcmpに相当するメソッド - * - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public int memcmp(byte[] buf, int size) { - for (int i = 0; i < size; ++i) { - if (this.getByte(i) != buf[i]) { - int x = Byte.toUnsignedInt(this.getByte(i)); - int y = Byte.toUnsignedInt(buf[i]); - return x - y; - } - } - return 0; - } - - /** - * C言語のmemcmpに相当するメソッド - * - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public int memcmp(String buf, int size) { - return this.memcmp(buf.getBytes(), size); - } - - /** - * C言語のmemcmpに相当するメソッド - * - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public int memcmp(CobolDataStorage buf, int size) { - for (int i = 0; i < size; ++i) { - if (this.getByte(i) != buf.getByte(i)) { - int x = Byte.toUnsignedInt(this.getByte(i)); - int y = Byte.toUnsignedInt(buf.getByte(i)); - return x - y; - } - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param buf TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public int memcmp(int offset, CobolDataStorage buf, int size) { - for (int i = 0; i < size; ++i) { - byte x = this.getByte(offset + i); - byte y = buf.getByte(i); - if (x != y) { - return Byte.toUnsignedInt(x) - Byte.toUnsignedInt(y); - } - } - return 0; - } - - /** - * 引数で与えられたバイト配列に保持したデータをこのオブジェクトに書き込む - * - * @param data TODO: 準備中 - */ - public void setData(byte[] data) { - setData(data, 0); - } - - /** - * 引数で与えられたバイト配列に保持したデータをこのオブジェクトに書き込む - * - * @param data コピー元のバイト配列 - * @param index コピー先のバイト配列中での開始位置 - */ - public void setData(byte[] data, int index) { - int length = - (data.length <= this.data.length - this.index - index) - ? data.length - : this.data.length - this.index - index; - - System.arraycopy(data, 0, this.data, this.index + index, length); - } - - /** - * 引数で指定された分だけ相対位置を変位させたCobolDataStorageクラスのインスタンスを作成する - * - * @param index 変位させるバイト数 - * @return 新たに作成したCobolDataStorageクラスのインスタンス - */ - public CobolDataStorage getDataStorage(int index) { - return new CobolDataStorage(this.data, this.index + index); - } - - /** - * 指定のバイト配列中での位置に指定の値を代入する - * - * @param index 代入先のバイト配列中の位置 - * @param value 代入する値 - */ - public void setByte(int index, byte value) { - this.data[this.index + index] = value; - } - - /** - * 指定のバイト配列中での位置に指定の値を代入する - * - * @param index 代入先のバイト配列中の位置 - * @param value 代入する値 - */ - public void setByte(int index, int value) { - this.setByte(index, (byte) value); - } - - /** - * 指定のバイト配列中での位置に指定の値を代入する - * - * @param index 代入先のバイト配列中の位置. - * @param value 代入する値 - */ - public void setByte(int index, char value) { - this.setByte(index, (byte) value); - } - - /** - * TODO: 準備中 - * - * @param value TODO: 準備中 - */ - public void setByte(byte value) { - this.setByte(0, value); - } - - /** - * TODO: 準備中 - * - * @param value TODO: 準備中 - */ - public void setByte(int value) { - this.setByte((byte) value); - } - - /** - * TODO: 準備中 - * - * @param value TODO: 準備中 - */ - public void setByte(char value) { - this.setByte((byte) value); - } - - /** - * 指定のバイト配列中での位置に格納された値を返す - * - * @param index バイト配列中での位置. - * @return 指定のバイト配列中での位置に格納された値 - */ - public byte getByte(int index) { - return this.data[this.index + index]; - } - - /** - * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する - * - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(byte value, int size) { - fillBytes(0, value, size); - } - - /** - * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する - * - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(int value, int size) { - fillBytes(0, value, size); - } - - /** - * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する - * - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(char value, int size) { - fillBytes(0, value, size); - } - - /** - * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する - * - * @param index コピーの開始位置 - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(int index, byte value, int size) { - for (int i = 0; i < size; ++i) { - this.setByte(i + index, value); - } - } - - /** - * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する - * - * @param index コピーの開始位置 - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(int index, int value, int size) { - this.fillBytes(index, (byte) value, size); - } - - /** - * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する - * - * @param index コピーの開始位置 - * @param value 代入する値 - * @param size 代入先のバイト数 - */ - public void fillBytes(int index, char value, int size) { - this.fillBytes(index, (byte) value, size); - } - - /** - * TODO: 準備中 - * - * @param bytes コピー元のバイト配列 - */ - public void setBytes(byte[] bytes) { - for (int i = 0; i < bytes.length; ++i) { - this.setByte(i, bytes[i]); - } - } - - /** - * TODO: 準備中 - * - * @param bytes コピー元の配列 - * @param length コピーするバイト数 - */ - public void setBytes(byte[] bytes, int length) { - for (int i = 0; i < length; ++i) { - this.setByte(i, bytes[i]); - } - } - - /** - * 指定のバイト配列に格納された値を this.dataのthis.indexバイト目以降へlengthバイトだけコピーする. - * - * @param index コピー先のthis.indexからの相対位置 - * @param bytes コピー元の配列 - * @param length コピーするバイト数 - */ - public void setBytes(int index, byte[] bytes, int length) { - for (int i = 0; i < length; ++i) { - this.setByte(i + index, bytes[i]); - } - } - - /** - * 指定した文字列をバイト配列にコピーする - * - * @param str コピー元の文字列 - * @param length コピーするバイト数 - */ - public void setBytes(String str, int length) { - try { - this.setBytes(str.getBytes("SHIFT-JIS"), length); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする - * - * @param data コピー元のCobolDataStorage - * @param length コピーするバイト数 - */ - public void setBytes(CobolDataStorage data, int length) { - this.setBytes(data, length, 0, 0); - } - - /** - * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする - * - * @param data コピー元のCobolDataStorage - * @param length コピーするバイト数 - * @param dstIndex コピー先のthis.indexからの相対位置 - */ - public void setBytes(CobolDataStorage data, int length, int dstIndex) { - this.setBytes(data, length, dstIndex, 0); - } - - /** - * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする - * - * @param data コピー元のCobolDataStorage - * @param length コピーするバイト数 - * @param dstIndex TODO: 準備中 - * @param srcIndex コピー元バイト配列中の相対位置 - */ - public void setBytes(CobolDataStorage data, int length, int dstIndex, int srcIndex) { - for (int i = 0; i < length; ++i) { - this.setByte(i + dstIndex, data.getByte(i + srcIndex)); - } - } - - /** - * TODO 暫定的な実装 - * - * @param str TODO: 準備中 - */ - public void setString(String str) { - this.fillBytes((byte) 0x20, this.data.length); - try { - this.setBytes(str.getBytes("SHIFT-JIS")); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * TODO 暫定的な実装(対応未定) - * - * @param pointer TODO: 準備中 - */ - public void setPointer(int pointer) { - System.err.println("setPointer is not implemented"); - } - - /** - * TODO: 準備中 - * - * @param bytes 書き込むバイト配列 - */ - public void set(byte[] bytes) { - for (int i = 0; i < bytes.length && this.index + i < this.data.length; ++i) { - this.setByte(i, bytes[i]); - } - } - - /** - * TODO: 準備中 - * - * @param value TODO: 準備中 - */ - public void set(byte value) { - this.setByte(0, value); - } - - /** - * 2バイト整数値をこのオブジェクト時書き込む - * - * @param value 書き込む値 - */ - public void set(short value) { - ByteBuffer.wrap(this.data, this.index, 2).putShort(value); - } - - /** - * 4バイト整数値をこのオブジェクト時書き込む - * - * @param value 書き込む値 - */ - public void set(int value) { - ByteBuffer.wrap(this.data, this.index, 4).putInt(value); - } - - /** - * 8バイト整数値をこのオブジェクト時書き込む - * - * @param value 書き込む値 - */ - public void set(long value) { - ByteBuffer.wrap(this.data, this.index, 8).putLong(value); - } - - /** - * double型の値をこのオブジェクト時書き込む - * - * @param value 書き込む値 - */ - public void set(double value) { - ByteBuffer.wrap(this.data, this.index, 8).putDouble(value); - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - */ - public void set(CobolDataStorage other) { - this.set(other.intValue()); - } - - /** - * コピーの開始位置を指定して、4バイト整数値を書き込む - * - * @param value TODO: 準備中 - * @param index TODO: 準備中 - */ - public void set(int value, int index) { - ByteBuffer buffer = ByteBuffer.wrap(this.data, this.index + index, 4); - buffer.putInt(value); - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - * @return TODO: 準備中 - */ - public boolean isSame(CobolDataStorage other) { - return this.data == other.data && this.index == other.index; - } - - /** - * このオブジェクトの保持するバイト配列の先頭2バイトを読み込んでshort型として返す - * - * @return 読み込んだ2バイト整数値 - */ - public short shortValue() { - return ByteBuffer.wrap(this.data, this.index, Short.BYTES).getShort(); - } - - /** - * このオブジェクトの保持するバイト配列の先頭4バイトを読み込んでint型として返す - * - * @return 読み込んだ4バイト整数値 - */ - public int intValue() { - return ByteBuffer.wrap(this.data, this.index, Integer.BYTES).getInt(); - } - - /** - * このオブジェクトの保持するバイト配列の先頭4バイトを読み込んでlong型として返す - * - * @return 読み込んだ8バイト整数値 - */ - public long longValue() { - return ByteBuffer.wrap(this.data, this.index, Long.BYTES).getLong(); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public double doubleValue() { - return ByteBuffer.wrap(this.data, this.index, Double.BYTES).getDouble(); - } - - /** - * 相対位置を加算したCobolDataStorageのインスタンスを返す - * - * @param index 相対位置に加算する値 - * @return 相対位置を加算したCobolDataStorageのインスタンス - */ - public CobolDataStorage getSubDataStorage(int index) { - return new CobolDataStorage(this.data, this.index + index); - } - - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - */ - public CobolDataStorage getSubDataStorage(long index) { - return this.getDataStorage((int) index); - } - - private long toLong(int numOfBytes, boolean signed, boolean isBigEndian) { - ByteBuffer buffer = ByteBuffer.wrap(this.data); - buffer.order(isBigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); - if (numOfBytes == 1) { - return buffer.get(this.index); - } else if (numOfBytes == 2) { - return buffer.getShort(this.index); - } else if (numOfBytes == 4) { - return buffer.getInt(this.index); - } else { - return buffer.getLong(this.index); - } - } - - private interface Cmpr { - int run(long a, long b); - } - - private static final Cmpr compareS = - new Cmpr() { - @Override - public int run(long a, long b) { - if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else { - return 0; - } - } - }; - - private static final Cmpr compareU = - new Cmpr() { - @Override - public int run(long a, long b) { - return Long.compareUnsigned(a, b); - } - }; - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @param numOfBytes TODO: 準備中 - * @param signed TODO: 準備中 - * @param isBigEndian TODO: 準備中 - * @return TODO: 準備中 - */ - public int compareToBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { - long val = this.toLong(numOfBytes, signed, isBigEndian); - Cmpr comparator = signed ? compareS : compareU; - return comparator.run(val, n); - } - - private void fromLong(int numOfBytes, boolean isBigEndian, long n) { - ByteBuffer buffer = ByteBuffer.wrap(this.data); - buffer.order(isBigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); - if (numOfBytes <= 1) { - buffer.put(this.index, (byte) n); - } else if (numOfBytes <= 2) { - buffer.putShort(this.index, (short) n); - } else if (numOfBytes <= 4) { - buffer.putInt(this.index, (int) n); - } else if (numOfBytes <= 8) { - buffer.putLong(this.index, n); - } - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @param numOfBytes TODO: 準備中 - * @param signed TODO: 準備中 - * @param isBigEndian TODO: 準備中 - */ - public void addBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { - long x = this.toLong(numOfBytes, signed, isBigEndian); - x += n; - this.fromLong(numOfBytes, isBigEndian, x); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @param numOfBytes TODO: 準備中 - * @param signed TODO: 準備中 - * @param isBigEndian TODO: 準備中 - */ - public void subBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { - long x = this.toLong(numOfBytes, signed, isBigEndian); - x -= n; - this.fromLong(numOfBytes, isBigEndian, x); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU8Binary(long n) { - return compareToBinary(n, 1, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS8Binary(long n) { - return compareToBinary(n, 1, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU16Binary(long n) { - return compareToBinary(n, 2, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS16Binary(long n) { - return compareToBinary(n, 2, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU24Binary(long n) { - return compareToBinary(n, 3, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS24Binary(long n) { - return compareToBinary(n, 3, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU32Binary(long n) { - return compareToBinary(n, 4, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS32Binary(long n) { - return compareToBinary(n, 4, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU40Binary(long n) { - return compareToBinary(n, 5, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS40Binary(long n) { - return compareToBinary(n, 5, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU48Binary(long n) { - return compareToBinary(n, 6, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS48Binary(long n) { - return compareToBinary(n, 6, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU56Binary(long n) { - return compareToBinary(n, 7, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS56Binary(long n) { - return compareToBinary(n, 7, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpU64Binary(long n) { - return compareToBinary(n, 8, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpS64Binary(long n) { - return compareToBinary(n, 8, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignU8Binary(long n) { - return compareToBinary(n, 1, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignS8Binary(long n) { - return compareToBinary(n, 1, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignU16Binary(long n) { - return compareToBinary(n, 2, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignS16Binary(long n) { - return compareToBinary(n, 2, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignU32Binary(long n) { - return compareToBinary(n, 4, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignS32Binary(long n) { - return compareToBinary(n, 4, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignU64Binary(long n) { - return compareToBinary(n, 8, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpAlignS64Binary(long n) { - return compareToBinary(n, 8, true, true); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU8Binary(long n) { - addBinary(n, 1, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS8Binary(long n) { - addBinary(n, 1, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU16Binary(long n) { - addBinary(n, 2, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS16Binary(long n) { - addBinary(n, 2, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU24Binary(long n) { - addBinary(n, 3, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS24Binary(long n) { - addBinary(n, 3, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU32Binary(long n) { - addBinary(n, 4, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS32Binary(long n) { - addBinary(n, 4, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU40Binary(long n) { - addBinary(n, 5, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS40Binary(long n) { - addBinary(n, 5, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU48Binary(long n) { - addBinary(n, 6, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS48Binary(long n) { - addBinary(n, 6, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU56Binary(long n) { - addBinary(n, 7, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS56Binary(long n) { - addBinary(n, 7, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addU64Binary(long n) { - addBinary(n, 8, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addS64Binary(long n) { - addBinary(n, 8, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignU8Binary(long n) { - addBinary(n, 1, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignS8Binary(long n) { - addBinary(n, 1, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignU16Binary(long n) { - addBinary(n, 2, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignS16Binary(long n) { - addBinary(n, 2, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignU32Binary(long n) { - addBinary(n, 4, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignS32Binary(long n) { - addBinary(n, 4, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignU64Binary(long n) { - addBinary(n, 8, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addAlignS64Binary(long n) { - addBinary(n, 8, true, true); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU8Binary(long n) { - subBinary(n, 1, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS8Binary(long n) { - subBinary(n, 1, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU16Binary(long n) { - subBinary(n, 2, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS16Binary(long n) { - subBinary(n, 2, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU24Binary(long n) { - subBinary(n, 3, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS24Binary(long n) { - subBinary(n, 3, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU32Binary(long n) { - subBinary(n, 4, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS32Binary(long n) { - subBinary(n, 4, true, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU40Binary(long n) { - subBinary(n, 5, false, true); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS40Binary(long n) { - subBinary(n, 5, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU48Binary(long n) { - subBinary(n, 6, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS48Binary(long n) { - subBinary(n, 6, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU56Binary(long n) { - subBinary(n, 7, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS56Binary(long n) { - subBinary(n, 7, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subU64Binary(long n) { - subBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subS64Binary(long n) { - subBinary(n, 8, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignU8Binary(long n) { - subBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignS8Binary(long n) { - subBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignU16Binary(long n) { - subBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignS16Binary(long n) { - subBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignU32Binary(long n) { - subBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignS32Binary(long n) { - subBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignU64Binary(long n) { - subBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subAlignS64Binary(long n) { - subBinary(n, 8, true, true); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU8Binary(long n) { - return compareToBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS8Binary(long n) { - return compareToBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU16Binary(long n) { - return compareToBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS16Binary(long n) { - return compareToBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU24Binary(long n) { - return compareToBinary(n, 3, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS24Binary(long n) { - return compareToBinary(n, 3, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU32Binary(long n) { - return compareToBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS32Binary(long n) { - return compareToBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU40Binary(long n) { - return compareToBinary(n, 5, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS40Binary(long n) { - return compareToBinary(n, 5, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU48Binary(long n) { - return compareToBinary(n, 6, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS48Binary(long n) { - return compareToBinary(n, 6, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU56Binary(long n) { - return compareToBinary(n, 7, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS56Binary(long n) { - return compareToBinary(n, 7, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpU64Binary(long n) { - return compareToBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpS64Binary(long n) { - return compareToBinary(n, 8, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignU8Binary(long n) { - return compareToBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignS8Binary(long n) { - return compareToBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignU16Binary(long n) { - return compareToBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignS16Binary(long n) { - return compareToBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignU32Binary(long n) { - return compareToBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignS32Binary(long n) { - return compareToBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignU64Binary(long n) { - return compareToBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSwpAlignS64Binary(long n) { - return compareToBinary(n, 8, true, true); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU8Binary(long n) { - addBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS8Binary(long n) { - addBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU16Binary(long n) { - addBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS16Binary(long n) { - addBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU24Binary(long n) { - addBinary(n, 3, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS24Binary(long n) { - addBinary(n, 3, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU32Binary(long n) { - addBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS32Binary(long n) { - addBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU40Binary(long n) { - addBinary(n, 5, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS40Binary(long n) { - addBinary(n, 5, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU48Binary(long n) { - addBinary(n, 6, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS48Binary(long n) { - addBinary(n, 6, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU56Binary(long n) { - addBinary(n, 7, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS56Binary(long n) { - addBinary(n, 7, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpU64Binary(long n) { - addBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpS64Binary(long n) { - addBinary(n, 8, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignU8Binary(long n) { - addBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignS8Binary(long n) { - addBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignU16Binary(long n) { - addBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignS16Binary(long n) { - addBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignU32Binary(long n) { - addBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignS32Binary(long n) { - addBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignU64Binary(long n) { - addBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void addSwpAlignS64Binary(long n) { - addBinary(n, 8, true, true); - } - - // n numofBytes signed isBigEndian - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU8Binary(int n) { - subBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS8Binary(int n) { - subBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU16Binary(int n) { - subBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS16Binary(int n) { - subBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU24Binary(int n) { - subBinary(n, 3, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS24Binary(int n) { - subBinary(n, 3, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU32Binary(int n) { - subBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS32Binary(int n) { - subBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU40Binary(int n) { - subBinary(n, 5, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS40Binary(int n) { - subBinary(n, 5, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU48Binary(int n) { - subBinary(n, 6, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS48Binary(int n) { - subBinary(n, 6, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU56Binary(int n) { - subBinary(n, 7, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS56Binary(int n) { - subBinary(n, 7, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpU64Binary(int n) { - subBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpS64Binary(int n) { - subBinary(n, 8, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignU8Binary(int n) { - subBinary(n, 1, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignS8Binary(int n) { - subBinary(n, 1, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignU16Binary(int n) { - subBinary(n, 2, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignS16Binary(int n) { - subBinary(n, 2, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignU32Binary(int n) { - subBinary(n, 4, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignS32Binary(int n) { - subBinary(n, 4, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignU64Binary(int n) { - subBinary(n, 8, false, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void subSwpAlignS64Binary(int n) { - subBinary(n, 8, true, true); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU16Binary(int n) { - this.fromLong(2, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS16Binary(int n) { - this.fromLong(2, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU24Binary(int n) { - this.fromLong(3, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS24Binary(int n) { - this.fromLong(3, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU32Binary(int n) { - this.fromLong(4, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS32Binary(int n) { - this.fromLong(4, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU40Binary(int n) { - this.fromLong(5, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS40Binary(int n) { - this.fromLong(5, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU48Binary(int n) { - this.fromLong(6, true, n); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS48Binary(int n) { - this.fromLong(6, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU56Binary(int n) { - this.fromLong(7, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS56Binary(int n) { - this.fromLong(7, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpU64Binary(int n) { - this.fromLong(8, true, n); - } - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setSwpS64Binary(int n) { - this.fromLong(8, true, n); - } - - // libcob/numeric.cのcob_cmp_numdispの実装 - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpNumdisp(int size, long n) { - int p = 0; - int val = 0; - for (int inc = 0; inc < size; ++inc, ++p) { - val = (val * 10) + (this.getByte(p) - '0'); - } - return (val < n) ? -1 : (val > n) ? 1 : 0; - } - - // libcob/numeric.cのcob_cmp_long_numdispの実装 - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpLongNumdisp(int size, long n) { - return this.cmpNumdisp(size, n); - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpSignNumdisp(int size, long n) { - int p = 0; - int val = 0; - for (int inc = 0; inc < size - 1; ++inc, ++p) { - val = (val * 10) + (this.getByte(p) - '0'); - } - val *= 10; - if (this.getByte(p) >= '0' && this.getByte(p) <= '9') { - val += (this.getByte(p) - '0'); - } else { - if (CobolModule.getCurrentModule().display_sign != 0) { - PairInt pair = this.getLongEbcdicSign(p, val); - val = pair.first; - if (pair.last != 0) { - val = -val; - } - } else { - val += (this.getByte(p) - 'p'); - val = -val; - } - } - return (val < n) ? -1 : (val > n) ? 1 : 0; - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - public int cmpLongSignNumdisp(int size, long n) { - int p = 0; - int val = 0; - for (int inc = 0; inc < size - 1; ++inc, ++p) { - val = (val * 10) + (this.getByte(p) - '0'); - } - val *= 10; - if (this.getByte(p) >= '0' && this.getByte(p) <= '9') { - val += (this.getByte(p) - '0'); - } else { - if (CobolModule.getCurrentModule().display_sign != 0) { - PairInt pair = this.getLongEbcdicSign(p, val); - val = pair.first; - if (pair.last != 0) { - val = -val; - } - } else { - val += (this.getByte(p) - ('0' + 0x40)); - val = -val; - } - } - return (val < n) ? -1 : (val > n) ? 1 : 0; - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public int getNumdisp(int size) { - int retval = 0; - for (int n = 0; n < size; ++n) { - retval *= 10; - byte b = this.getByte(n); - if (b > '9') { - retval += 10; - } else { - retval += b - '0'; - } - } - return retval; - } - - private static class PairInt { - public int first; - public int last; - - public PairInt(int a, int b) { - first = a; - last = b; - } - } - - /** - * TODO: 準備中 - * - * @param p TODO: 準備中 - * @param val TODO: 準備中 - * @return TODO: 準備中 - */ - public PairInt getEbcdicSign(int p, int val) { - switch (this.getByte(p)) { - case '{': - return new PairInt(val, 0); - case 'A': - return new PairInt(val + 1, 0); - case 'B': - return new PairInt(val + 2, 0); - case 'C': - return new PairInt(val + 3, 0); - case 'D': - return new PairInt(val + 4, 0); - case 'E': - return new PairInt(val + 5, 0); - case 'F': - return new PairInt(val + 6, 0); - case 'G': - return new PairInt(val + 7, 0); - case 'H': - return new PairInt(val + 8, 0); - case 'I': - return new PairInt(val + 9, 0); - case '}': - return new PairInt(val, 1); - case 'J': - return new PairInt(val + 1, 1); - case 'K': - return new PairInt(val + 2, 1); - case 'L': - return new PairInt(val + 3, 1); - case 'M': - return new PairInt(val + 4, 1); - case 'N': - return new PairInt(val + 5, 1); - case 'O': - return new PairInt(val + 6, 1); - case 'P': - return new PairInt(val + 7, 1); - case 'Q': - return new PairInt(val + 8, 1); - case 'R': - return new PairInt(val + 9, 1); - default: - return new PairInt(val, 0); - } - } - - /** - * TODO: 準備中 - * - * @param p TODO: 準備中 - * @param val TODO: 準備中 - * @return TODO: 準備中 - */ - public PairInt getLongEbcdicSign(int p, int val) { - switch (this.getByte(p)) { - case '{': - return new PairInt(val, 0); - case 'A': - return new PairInt(val + 1, 0); - case 'B': - return new PairInt(val + 2, 0); - case 'C': - return new PairInt(val + 3, 0); - case 'D': - return new PairInt(val + 4, 0); - case 'E': - return new PairInt(val + 5, 0); - case 'F': - return new PairInt(val + 6, 0); - case 'G': - return new PairInt(val + 7, 0); - case 'H': - return new PairInt(val + 8, 0); - case 'I': - return new PairInt(val + 9, 0); - case '}': - return new PairInt(val, 1); - case 'J': - return new PairInt(val + 1, 1); - case 'K': - return new PairInt(val + 2, 1); - case 'L': - return new PairInt(val + 3, 1); - case 'M': - return new PairInt(val + 4, 1); - case 'N': - return new PairInt(val + 5, 1); - case 'O': - return new PairInt(val + 6, 1); - case 'P': - return new PairInt(val + 7, 1); - case 'Q': - return new PairInt(val + 8, 1); - case 'R': - return new PairInt(val + 9, 1); - default: - return new PairInt(val, 0); - } - } - - // TODO 修正 - // opensource COBOLにはない実装 COB_BSWAP_32などの代替 - // 本家opensource COBOLのcobc/codegen.cの894行目付近を参照 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public long bswap_16() { - return this.toLong(2, true, true); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public long bswap_32() { - return this.toLong(4, true, true); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public long bswap_64() { - return this.toLong(8, true, true); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; + +/** + * COBOL変数のデータを保存するバイト配列を扱うクラス
+ * byte[]型のデータと、その配列中での相対位置を保持し、データの読み書きを行う + */ +public class CobolDataStorage { + + /** データを保存するバイト配列 */ + private byte[] data; + + /** このクラスの扱うデータが保存する領域のバイト配列中での相対位置 */ + private int index; + + /** + * 引数で指定された長さ分のバイト配列を確保する.相対位置は0にする. + * + * @param size バイト配列の長さ + */ + public CobolDataStorage(int size) { + this.data = new byte[size]; + this.index = 0; + } + + /** + * バイト配列と相対位置を指定する + * + * @param data データを保存するバイト配列 + * @param index バイト配列中の相対位置 + */ + public CobolDataStorage(byte[] data, int index) { + this.data = data; + this.index = index; + } + + /** + * データを保存するバイト配列を引数で指定する.相対位置は0にする. + * + * @param data データを保存するバイト配列 + */ + public CobolDataStorage(byte[] data) { + this(data, 0); + } + + /** + * TODO: 準備中 + * + * @param bytes TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolDataStorage makeCobolDataStorage(byte... bytes) { + return new CobolDataStorage(bytes); + } + + /** TODO: 準備中 */ + public CobolDataStorage() { + this.index = 0; + this.data = null; + } + + /** + * TODO: 準備中 + * + * @param data TODO: 準備中 + * @param index TODO: 準備中 + */ + public void setDataRefAndIndex(CobolDataStorage data, int index) { + this.data = data.data; + this.index = index; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getIndex() { + return this.index; + } + + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + */ + public void setIndex(int index) { + this.index = index; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public byte[] getRefOfData() { + return this.data; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public CobolDataStorage copy() { + CobolDataStorage ret = new CobolDataStorage(); + ret.index = this.index; + ret.data = this.data; + return ret; + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public ByteBuffer getByteBuffer(int size) { + return ByteBuffer.wrap(this.data, this.index, size); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addIndex(int n) { + this.index += n; + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolDataStorage primitiveToDataStorage(int n) { + byte[] bytes = new byte[4]; + ByteBuffer buffer = ByteBuffer.wrap(bytes); + buffer.putInt(n); + return new CobolDataStorage(bytes); + } + + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolDataStorage primitiveToDataStorage(String s) { + return new CobolDataStorage(s); + } + + /** + * TODO: 準備中 + * + * @param str TODO: 準備中 + */ + public CobolDataStorage(String str) { + try { + byte[] bytes = str.getBytes("SHIFT-JIS"); + this.data = bytes; + this.index = 0; + } catch (Exception e) { + e.printStackTrace(); + this.data = new byte[0]; + this.index = 0; + } + } + + /** + * 保持するバイト配列のコピーを返す + * + * @return TODO: 準備中 + */ + public byte[] getData() { + return this.getData(0); + } + + /** + * 引数で指定した開始位置から末尾までをコピーした配列を返す。 + * + * @param index このオブジェクトの保持する相対位置を基準とした、コピーの開始位置 + * @return 開始位置から末尾までのデータをコピーしたバイト配列 + */ + public byte[] getData(int index) { + byte[] result = new byte[this.data.length - this.index - index]; + + System.arraycopy(this.data, this.index + index, result, 0, result.length); + + return result; + } + + /** + * 引数で指定した相対位置から指定した長さをコピーした配列を返す。 + * + * @param index このオブジェクトの保持する相対位置を基準とした、コピーの開始位置 + * @param length コピーする長さ(バイト数) + * @return 開始位置からlengthバイト分の配列 + */ + public byte[] getByteArray(int index, int length) { + byte[] result = new byte[length]; + System.arraycopy(this.data, this.index + index, result, 0, length); + return result; + } + + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @param length TODO: 準備中 + * @return TODO: 準備中 + */ + public byte[] getByteArrayRef(int index, int length) { + ByteBuffer buffer = ByteBuffer.wrap(this.data, this.index + index, length); + return buffer.array(); + } + + /** + * C言語のmemcpyに相当するメソッド + * + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(CobolDataStorage buf, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(i, buf.getByte(i)); + } + } + + /** + * C言語のmemcpyに相当するメソッド + * + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(byte[] buf, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(i, buf[i]); + } + } + + /** + * C言語のmemcpyに相当するメソッド + * + * @param str TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(String str, int size) { + try { + this.memcpy(str.getBytes("SJIS"), size); + } catch (UnsupportedEncodingException e) { + this.memcpy(str.getBytes(), size); + } + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(int offset, byte[] buf, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(offset + i, buf[i]); + } + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(int offset, CobolDataStorage buf, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(offset + i, buf.getByte(i)); + } + } + + /** + * TODO: 準備中 + * + * @param buf TODO: 準備中 + * @param offset TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memcpy(byte[] buf, int offset, int size) { + System.arraycopy(buf, offset, this.data, this.index, size); + } + + /** + * TODO: 準備中 + * + * @param buf TODO: 準備中 + */ + public void memcpy(byte[] buf) { + this.memcpy(buf, buf.length); + } + + /** + * C言語のmemsetに相当するメソッド + * + * @param ch TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memset(byte ch, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(i, ch); + } + } + + /** + * C言語のmemsetに相当するメソッド + * + * @param ch TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memset(int ch, int size) { + this.memset((byte) ch, size); + } + + /** + * C言語のmemsetに相当するメソッド + * + * @param offset TODO: 準備中 + * @param ch TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memset(int offset, byte ch, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(offset + i, ch); + } + } + + /** + * C言語のmemsetに相当するメソッド + * + * @param offset TODO: 準備中 + * @param ch TODO: 準備中 + * @param size TODO: 準備中 + */ + public void memset(int offset, int ch, int size) { + this.memset(offset, (byte) ch, size); + } + + /** + * C言語のmemcmpに相当するメソッド + * + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public int memcmp(byte[] buf, int size) { + for (int i = 0; i < size; ++i) { + if (this.getByte(i) != buf[i]) { + int x = Byte.toUnsignedInt(this.getByte(i)); + int y = Byte.toUnsignedInt(buf[i]); + return x - y; + } + } + return 0; + } + + /** + * C言語のmemcmpに相当するメソッド + * + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public int memcmp(String buf, int size) { + return this.memcmp(buf.getBytes(), size); + } + + /** + * C言語のmemcmpに相当するメソッド + * + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public int memcmp(CobolDataStorage buf, int size) { + for (int i = 0; i < size; ++i) { + if (this.getByte(i) != buf.getByte(i)) { + int x = Byte.toUnsignedInt(this.getByte(i)); + int y = Byte.toUnsignedInt(buf.getByte(i)); + return x - y; + } + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param buf TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public int memcmp(int offset, CobolDataStorage buf, int size) { + for (int i = 0; i < size; ++i) { + byte x = this.getByte(offset + i); + byte y = buf.getByte(i); + if (x != y) { + return Byte.toUnsignedInt(x) - Byte.toUnsignedInt(y); + } + } + return 0; + } + + /** + * 引数で与えられたバイト配列に保持したデータをこのオブジェクトに書き込む + * + * @param data TODO: 準備中 + */ + public void setData(byte[] data) { + setData(data, 0); + } + + /** + * 引数で与えられたバイト配列に保持したデータをこのオブジェクトに書き込む + * + * @param data コピー元のバイト配列 + * @param index コピー先のバイト配列中での開始位置 + */ + public void setData(byte[] data, int index) { + int length = + (data.length <= this.data.length - this.index - index) + ? data.length + : this.data.length - this.index - index; + + System.arraycopy(data, 0, this.data, this.index + index, length); + } + + /** + * 引数で指定された分だけ相対位置を変位させたCobolDataStorageクラスのインスタンスを作成する + * + * @param index 変位させるバイト数 + * @return 新たに作成したCobolDataStorageクラスのインスタンス + */ + public CobolDataStorage getDataStorage(int index) { + return new CobolDataStorage(this.data, this.index + index); + } + + /** + * 指定のバイト配列中での位置に指定の値を代入する + * + * @param index 代入先のバイト配列中の位置 + * @param value 代入する値 + */ + public void setByte(int index, byte value) { + this.data[this.index + index] = value; + } + + /** + * 指定のバイト配列中での位置に指定の値を代入する + * + * @param index 代入先のバイト配列中の位置 + * @param value 代入する値 + */ + public void setByte(int index, int value) { + this.setByte(index, (byte) value); + } + + /** + * 指定のバイト配列中での位置に指定の値を代入する + * + * @param index 代入先のバイト配列中の位置. + * @param value 代入する値 + */ + public void setByte(int index, char value) { + this.setByte(index, (byte) value); + } + + /** + * TODO: 準備中 + * + * @param value TODO: 準備中 + */ + public void setByte(byte value) { + this.setByte(0, value); + } + + /** + * TODO: 準備中 + * + * @param value TODO: 準備中 + */ + public void setByte(int value) { + this.setByte((byte) value); + } + + /** + * TODO: 準備中 + * + * @param value TODO: 準備中 + */ + public void setByte(char value) { + this.setByte((byte) value); + } + + /** + * 指定のバイト配列中での位置に格納された値を返す + * + * @param index バイト配列中での位置. + * @return 指定のバイト配列中での位置に格納された値 + */ + public byte getByte(int index) { + return this.data[this.index + index]; + } + + /** + * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する + * + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(byte value, int size) { + fillBytes(0, value, size); + } + + /** + * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する + * + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(int value, int size) { + fillBytes(0, value, size); + } + + /** + * バイト配列のthis.indexバイト目からsizeバイトの範囲にvalueを代入する + * + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(char value, int size) { + fillBytes(0, value, size); + } + + /** + * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する + * + * @param index コピーの開始位置 + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(int index, byte value, int size) { + for (int i = 0; i < size; ++i) { + this.setByte(i + index, value); + } + } + + /** + * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する + * + * @param index コピーの開始位置 + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(int index, int value, int size) { + this.fillBytes(index, (byte) value, size); + } + + /** + * バイト配列の0バイト目からsizeバイトの範囲にvalueを代入する + * + * @param index コピーの開始位置 + * @param value 代入する値 + * @param size 代入先のバイト数 + */ + public void fillBytes(int index, char value, int size) { + this.fillBytes(index, (byte) value, size); + } + + /** + * TODO: 準備中 + * + * @param bytes コピー元のバイト配列 + */ + public void setBytes(byte[] bytes) { + for (int i = 0; i < bytes.length; ++i) { + this.setByte(i, bytes[i]); + } + } + + /** + * TODO: 準備中 + * + * @param bytes コピー元の配列 + * @param length コピーするバイト数 + */ + public void setBytes(byte[] bytes, int length) { + for (int i = 0; i < length; ++i) { + this.setByte(i, bytes[i]); + } + } + + /** + * 指定のバイト配列に格納された値を this.dataのthis.indexバイト目以降へlengthバイトだけコピーする. + * + * @param index コピー先のthis.indexからの相対位置 + * @param bytes コピー元の配列 + * @param length コピーするバイト数 + */ + public void setBytes(int index, byte[] bytes, int length) { + for (int i = 0; i < length; ++i) { + this.setByte(i + index, bytes[i]); + } + } + + /** + * 指定した文字列をバイト配列にコピーする + * + * @param str コピー元の文字列 + * @param length コピーするバイト数 + */ + public void setBytes(String str, int length) { + try { + this.setBytes(str.getBytes("SHIFT-JIS"), length); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする + * + * @param data コピー元のCobolDataStorage + * @param length コピーするバイト数 + */ + public void setBytes(CobolDataStorage data, int length) { + this.setBytes(data, length, 0, 0); + } + + /** + * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする + * + * @param data コピー元のCobolDataStorage + * @param length コピーするバイト数 + * @param dstIndex コピー先のthis.indexからの相対位置 + */ + public void setBytes(CobolDataStorage data, int length, int dstIndex) { + this.setBytes(data, length, dstIndex, 0); + } + + /** + * 指定されたCobolDataStorageのインスタンスから,lengthバイトだけデータをコピーする + * + * @param data コピー元のCobolDataStorage + * @param length コピーするバイト数 + * @param dstIndex TODO: 準備中 + * @param srcIndex コピー元バイト配列中の相対位置 + */ + public void setBytes(CobolDataStorage data, int length, int dstIndex, int srcIndex) { + for (int i = 0; i < length; ++i) { + this.setByte(i + dstIndex, data.getByte(i + srcIndex)); + } + } + + /** + * TODO 暫定的な実装 + * + * @param str TODO: 準備中 + */ + public void setString(String str) { + this.fillBytes((byte) 0x20, this.data.length); + try { + this.setBytes(str.getBytes("SHIFT-JIS")); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * TODO 暫定的な実装(対応未定) + * + * @param pointer TODO: 準備中 + */ + public void setPointer(int pointer) { + System.err.println("setPointer is not implemented"); + } + + /** + * TODO: 準備中 + * + * @param bytes 書き込むバイト配列 + */ + public void set(byte[] bytes) { + for (int i = 0; i < bytes.length && this.index + i < this.data.length; ++i) { + this.setByte(i, bytes[i]); + } + } + + /** + * TODO: 準備中 + * + * @param value TODO: 準備中 + */ + public void set(byte value) { + this.setByte(0, value); + } + + /** + * 2バイト整数値をこのオブジェクト時書き込む + * + * @param value 書き込む値 + */ + public void set(short value) { + ByteBuffer.wrap(this.data, this.index, 2).putShort(value); + } + + /** + * 4バイト整数値をこのオブジェクト時書き込む + * + * @param value 書き込む値 + */ + public void set(int value) { + ByteBuffer.wrap(this.data, this.index, 4).putInt(value); + } + + /** + * 8バイト整数値をこのオブジェクト時書き込む + * + * @param value 書き込む値 + */ + public void set(long value) { + ByteBuffer.wrap(this.data, this.index, 8).putLong(value); + } + + /** + * double型の値をこのオブジェクト時書き込む + * + * @param value 書き込む値 + */ + public void set(double value) { + ByteBuffer.wrap(this.data, this.index, 8).putDouble(value); + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + */ + public void set(CobolDataStorage other) { + this.set(other.intValue()); + } + + /** + * コピーの開始位置を指定して、4バイト整数値を書き込む + * + * @param value TODO: 準備中 + * @param index TODO: 準備中 + */ + public void set(int value, int index) { + ByteBuffer buffer = ByteBuffer.wrap(this.data, this.index + index, 4); + buffer.putInt(value); + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + * @return TODO: 準備中 + */ + public boolean isSame(CobolDataStorage other) { + return this.data == other.data && this.index == other.index; + } + + /** + * このオブジェクトの保持するバイト配列の先頭2バイトを読み込んでshort型として返す + * + * @return 読み込んだ2バイト整数値 + */ + public short shortValue() { + return ByteBuffer.wrap(this.data, this.index, Short.BYTES).getShort(); + } + + /** + * このオブジェクトの保持するバイト配列の先頭4バイトを読み込んでint型として返す + * + * @return 読み込んだ4バイト整数値 + */ + public int intValue() { + return ByteBuffer.wrap(this.data, this.index, Integer.BYTES).getInt(); + } + + /** + * このオブジェクトの保持するバイト配列の先頭4バイトを読み込んでlong型として返す + * + * @return 読み込んだ8バイト整数値 + */ + public long longValue() { + return ByteBuffer.wrap(this.data, this.index, Long.BYTES).getLong(); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public double doubleValue() { + return ByteBuffer.wrap(this.data, this.index, Double.BYTES).getDouble(); + } + + /** + * 相対位置を加算したCobolDataStorageのインスタンスを返す + * + * @param index 相対位置に加算する値 + * @return 相対位置を加算したCobolDataStorageのインスタンス + */ + public CobolDataStorage getSubDataStorage(int index) { + return new CobolDataStorage(this.data, this.index + index); + } + + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + */ + public CobolDataStorage getSubDataStorage(long index) { + return this.getDataStorage((int) index); + } + + private long toLong(int numOfBytes, boolean signed, boolean isBigEndian) { + ByteBuffer buffer = ByteBuffer.wrap(this.data); + buffer.order(isBigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); + if (numOfBytes == 1) { + return buffer.get(this.index); + } else if (numOfBytes == 2) { + return buffer.getShort(this.index); + } else if (numOfBytes == 4) { + return buffer.getInt(this.index); + } else { + return buffer.getLong(this.index); + } + } + + private interface Cmpr { + int run(long a, long b); + } + + private static final Cmpr compareS = + new Cmpr() { + @Override + public int run(long a, long b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + } + }; + + private static final Cmpr compareU = + new Cmpr() { + @Override + public int run(long a, long b) { + return Long.compareUnsigned(a, b); + } + }; + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @param numOfBytes TODO: 準備中 + * @param signed TODO: 準備中 + * @param isBigEndian TODO: 準備中 + * @return TODO: 準備中 + */ + public int compareToBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { + long val = this.toLong(numOfBytes, signed, isBigEndian); + Cmpr comparator = signed ? compareS : compareU; + return comparator.run(val, n); + } + + private void fromLong(int numOfBytes, boolean isBigEndian, long n) { + ByteBuffer buffer = ByteBuffer.wrap(this.data); + buffer.order(isBigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); + if (numOfBytes <= 1) { + buffer.put(this.index, (byte) n); + } else if (numOfBytes <= 2) { + buffer.putShort(this.index, (short) n); + } else if (numOfBytes <= 4) { + buffer.putInt(this.index, (int) n); + } else if (numOfBytes <= 8) { + buffer.putLong(this.index, n); + } + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @param numOfBytes TODO: 準備中 + * @param signed TODO: 準備中 + * @param isBigEndian TODO: 準備中 + */ + public void addBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { + long x = this.toLong(numOfBytes, signed, isBigEndian); + x += n; + this.fromLong(numOfBytes, isBigEndian, x); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @param numOfBytes TODO: 準備中 + * @param signed TODO: 準備中 + * @param isBigEndian TODO: 準備中 + */ + public void subBinary(long n, int numOfBytes, boolean signed, boolean isBigEndian) { + long x = this.toLong(numOfBytes, signed, isBigEndian); + x -= n; + this.fromLong(numOfBytes, isBigEndian, x); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU8Binary(long n) { + return compareToBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS8Binary(long n) { + return compareToBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU16Binary(long n) { + return compareToBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS16Binary(long n) { + return compareToBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU24Binary(long n) { + return compareToBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS24Binary(long n) { + return compareToBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU32Binary(long n) { + return compareToBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS32Binary(long n) { + return compareToBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU40Binary(long n) { + return compareToBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS40Binary(long n) { + return compareToBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU48Binary(long n) { + return compareToBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS48Binary(long n) { + return compareToBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU56Binary(long n) { + return compareToBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS56Binary(long n) { + return compareToBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpU64Binary(long n) { + return compareToBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpS64Binary(long n) { + return compareToBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignU8Binary(long n) { + return compareToBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignS8Binary(long n) { + return compareToBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignU16Binary(long n) { + return compareToBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignS16Binary(long n) { + return compareToBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignU32Binary(long n) { + return compareToBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignS32Binary(long n) { + return compareToBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignU64Binary(long n) { + return compareToBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpAlignS64Binary(long n) { + return compareToBinary(n, 8, true, true); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU8Binary(long n) { + addBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS8Binary(long n) { + addBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU16Binary(long n) { + addBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS16Binary(long n) { + addBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU24Binary(long n) { + addBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS24Binary(long n) { + addBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU32Binary(long n) { + addBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS32Binary(long n) { + addBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU40Binary(long n) { + addBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS40Binary(long n) { + addBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU48Binary(long n) { + addBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS48Binary(long n) { + addBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU56Binary(long n) { + addBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS56Binary(long n) { + addBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addU64Binary(long n) { + addBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addS64Binary(long n) { + addBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignU8Binary(long n) { + addBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignS8Binary(long n) { + addBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignU16Binary(long n) { + addBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignS16Binary(long n) { + addBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignU32Binary(long n) { + addBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignS32Binary(long n) { + addBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignU64Binary(long n) { + addBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addAlignS64Binary(long n) { + addBinary(n, 8, true, true); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU8Binary(long n) { + subBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS8Binary(long n) { + subBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU16Binary(long n) { + subBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS16Binary(long n) { + subBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU24Binary(long n) { + subBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS24Binary(long n) { + subBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU32Binary(long n) { + subBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS32Binary(long n) { + subBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU40Binary(long n) { + subBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS40Binary(long n) { + subBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU48Binary(long n) { + subBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS48Binary(long n) { + subBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU56Binary(long n) { + subBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS56Binary(long n) { + subBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subU64Binary(long n) { + subBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subS64Binary(long n) { + subBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignU8Binary(long n) { + subBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignS8Binary(long n) { + subBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignU16Binary(long n) { + subBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignS16Binary(long n) { + subBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignU32Binary(long n) { + subBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignS32Binary(long n) { + subBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignU64Binary(long n) { + subBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subAlignS64Binary(long n) { + subBinary(n, 8, true, true); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU8Binary(long n) { + return compareToBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS8Binary(long n) { + return compareToBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU16Binary(long n) { + return compareToBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS16Binary(long n) { + return compareToBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU24Binary(long n) { + return compareToBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS24Binary(long n) { + return compareToBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU32Binary(long n) { + return compareToBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS32Binary(long n) { + return compareToBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU40Binary(long n) { + return compareToBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS40Binary(long n) { + return compareToBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU48Binary(long n) { + return compareToBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS48Binary(long n) { + return compareToBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU56Binary(long n) { + return compareToBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS56Binary(long n) { + return compareToBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpU64Binary(long n) { + return compareToBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpS64Binary(long n) { + return compareToBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignU8Binary(long n) { + return compareToBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignS8Binary(long n) { + return compareToBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignU16Binary(long n) { + return compareToBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignS16Binary(long n) { + return compareToBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignU32Binary(long n) { + return compareToBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignS32Binary(long n) { + return compareToBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignU64Binary(long n) { + return compareToBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSwpAlignS64Binary(long n) { + return compareToBinary(n, 8, true, true); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU8Binary(long n) { + addBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS8Binary(long n) { + addBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU16Binary(long n) { + addBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS16Binary(long n) { + addBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU24Binary(long n) { + addBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS24Binary(long n) { + addBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU32Binary(long n) { + addBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS32Binary(long n) { + addBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU40Binary(long n) { + addBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS40Binary(long n) { + addBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU48Binary(long n) { + addBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS48Binary(long n) { + addBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU56Binary(long n) { + addBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS56Binary(long n) { + addBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpU64Binary(long n) { + addBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpS64Binary(long n) { + addBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignU8Binary(long n) { + addBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignS8Binary(long n) { + addBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignU16Binary(long n) { + addBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignS16Binary(long n) { + addBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignU32Binary(long n) { + addBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignS32Binary(long n) { + addBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignU64Binary(long n) { + addBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void addSwpAlignS64Binary(long n) { + addBinary(n, 8, true, true); + } + + // n numofBytes signed isBigEndian + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU8Binary(int n) { + subBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS8Binary(int n) { + subBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU16Binary(int n) { + subBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS16Binary(int n) { + subBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU24Binary(int n) { + subBinary(n, 3, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS24Binary(int n) { + subBinary(n, 3, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU32Binary(int n) { + subBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS32Binary(int n) { + subBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU40Binary(int n) { + subBinary(n, 5, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS40Binary(int n) { + subBinary(n, 5, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU48Binary(int n) { + subBinary(n, 6, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS48Binary(int n) { + subBinary(n, 6, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU56Binary(int n) { + subBinary(n, 7, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS56Binary(int n) { + subBinary(n, 7, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpU64Binary(int n) { + subBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpS64Binary(int n) { + subBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignU8Binary(int n) { + subBinary(n, 1, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignS8Binary(int n) { + subBinary(n, 1, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignU16Binary(int n) { + subBinary(n, 2, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignS16Binary(int n) { + subBinary(n, 2, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignU32Binary(int n) { + subBinary(n, 4, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignS32Binary(int n) { + subBinary(n, 4, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignU64Binary(int n) { + subBinary(n, 8, false, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void subSwpAlignS64Binary(int n) { + subBinary(n, 8, true, true); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU16Binary(int n) { + this.fromLong(2, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS16Binary(int n) { + this.fromLong(2, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU24Binary(int n) { + this.fromLong(3, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS24Binary(int n) { + this.fromLong(3, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU32Binary(int n) { + this.fromLong(4, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS32Binary(int n) { + this.fromLong(4, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU40Binary(int n) { + this.fromLong(5, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS40Binary(int n) { + this.fromLong(5, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU48Binary(int n) { + this.fromLong(6, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS48Binary(int n) { + this.fromLong(6, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU56Binary(int n) { + this.fromLong(7, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS56Binary(int n) { + this.fromLong(7, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpU64Binary(int n) { + this.fromLong(8, true, n); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setSwpS64Binary(int n) { + this.fromLong(8, true, n); + } + + // libcob/numeric.cのcob_cmp_numdispの実装 + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpNumdisp(int size, long n) { + int p = 0; + int val = 0; + for (int inc = 0; inc < size; ++inc, ++p) { + val = (val * 10) + (this.getByte(p) - '0'); + } + return (val < n) ? -1 : (val > n) ? 1 : 0; + } + + // libcob/numeric.cのcob_cmp_long_numdispの実装 + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpLongNumdisp(int size, long n) { + return this.cmpNumdisp(size, n); + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpSignNumdisp(int size, long n) { + int p = 0; + int val = 0; + for (int inc = 0; inc < size - 1; ++inc, ++p) { + val = (val * 10) + (this.getByte(p) - '0'); + } + val *= 10; + if (this.getByte(p) >= '0' && this.getByte(p) <= '9') { + val += (this.getByte(p) - '0'); + } else { + if (CobolModule.getCurrentModule().display_sign != 0) { + PairInt pair = this.getLongEbcdicSign(p, val); + val = pair.first; + if (pair.last != 0) { + val = -val; + } + } else { + val += (this.getByte(p) - 'p'); + val = -val; + } + } + return (val < n) ? -1 : (val > n) ? 1 : 0; + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + public int cmpLongSignNumdisp(int size, long n) { + int p = 0; + int val = 0; + for (int inc = 0; inc < size - 1; ++inc, ++p) { + val = (val * 10) + (this.getByte(p) - '0'); + } + val *= 10; + if (this.getByte(p) >= '0' && this.getByte(p) <= '9') { + val += (this.getByte(p) - '0'); + } else { + if (CobolModule.getCurrentModule().display_sign != 0) { + PairInt pair = this.getLongEbcdicSign(p, val); + val = pair.first; + if (pair.last != 0) { + val = -val; + } + } else { + val += (this.getByte(p) - ('0' + 0x40)); + val = -val; + } + } + return (val < n) ? -1 : (val > n) ? 1 : 0; + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public int getNumdisp(int size) { + int retval = 0; + for (int n = 0; n < size; ++n) { + retval *= 10; + byte b = this.getByte(n); + if (b > '9') { + retval += 10; + } else { + retval += b - '0'; + } + } + return retval; + } + + private static class PairInt { + public int first; + public int last; + + public PairInt(int a, int b) { + first = a; + last = b; + } + } + + /** + * TODO: 準備中 + * + * @param p TODO: 準備中 + * @param val TODO: 準備中 + * @return TODO: 準備中 + */ + public PairInt getEbcdicSign(int p, int val) { + switch (this.getByte(p)) { + case '{': + return new PairInt(val, 0); + case 'A': + return new PairInt(val + 1, 0); + case 'B': + return new PairInt(val + 2, 0); + case 'C': + return new PairInt(val + 3, 0); + case 'D': + return new PairInt(val + 4, 0); + case 'E': + return new PairInt(val + 5, 0); + case 'F': + return new PairInt(val + 6, 0); + case 'G': + return new PairInt(val + 7, 0); + case 'H': + return new PairInt(val + 8, 0); + case 'I': + return new PairInt(val + 9, 0); + case '}': + return new PairInt(val, 1); + case 'J': + return new PairInt(val + 1, 1); + case 'K': + return new PairInt(val + 2, 1); + case 'L': + return new PairInt(val + 3, 1); + case 'M': + return new PairInt(val + 4, 1); + case 'N': + return new PairInt(val + 5, 1); + case 'O': + return new PairInt(val + 6, 1); + case 'P': + return new PairInt(val + 7, 1); + case 'Q': + return new PairInt(val + 8, 1); + case 'R': + return new PairInt(val + 9, 1); + default: + return new PairInt(val, 0); + } + } + + /** + * TODO: 準備中 + * + * @param p TODO: 準備中 + * @param val TODO: 準備中 + * @return TODO: 準備中 + */ + public PairInt getLongEbcdicSign(int p, int val) { + switch (this.getByte(p)) { + case '{': + return new PairInt(val, 0); + case 'A': + return new PairInt(val + 1, 0); + case 'B': + return new PairInt(val + 2, 0); + case 'C': + return new PairInt(val + 3, 0); + case 'D': + return new PairInt(val + 4, 0); + case 'E': + return new PairInt(val + 5, 0); + case 'F': + return new PairInt(val + 6, 0); + case 'G': + return new PairInt(val + 7, 0); + case 'H': + return new PairInt(val + 8, 0); + case 'I': + return new PairInt(val + 9, 0); + case '}': + return new PairInt(val, 1); + case 'J': + return new PairInt(val + 1, 1); + case 'K': + return new PairInt(val + 2, 1); + case 'L': + return new PairInt(val + 3, 1); + case 'M': + return new PairInt(val + 4, 1); + case 'N': + return new PairInt(val + 5, 1); + case 'O': + return new PairInt(val + 6, 1); + case 'P': + return new PairInt(val + 7, 1); + case 'Q': + return new PairInt(val + 8, 1); + case 'R': + return new PairInt(val + 9, 1); + default: + return new PairInt(val, 0); + } + } + + // TODO 修正 + // opensource COBOLにはない実装 COB_BSWAP_32などの代替 + // 本家opensource COBOLのcobc/codegen.cの894行目付近を参照 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public long bswap_16() { + return this.toLong(2, true, true); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public long bswap_32() { + return this.toLong(4, true, true); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public long bswap_64() { + return this.toLong(8, true, true); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java index 4504e00f..a5f32b07 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java @@ -1,747 +1,767 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** - * BigDecimalを扱うクラス
- * COMPUTE等で計算をするときに使用する - */ -public class CobolDecimal { - /** TODO: 準備中 */ - public static final int DECIMAL_NAN = -128; - /** TODO: 準備中 */ - public static final int COB_STORE_ROUND = 0x01; - /** TODO: 準備中 */ - public static final int COB_STORE_KEEP_ON_OVERFLOW = 0x02; - /** TODO: 準備中 */ - public static final int COB_STORE_TRUNC_ON_OVERFLOW = 0x04; - - /** TODO: 準備中 */ - public static final int COB_MAX_BINARY = 36; - - private static BigDecimal cobMexp = BigDecimal.ZERO; - /** TODO: 準備中 */ - static CobolDecimal cobD1 = new CobolDecimal(); - /** TODO: 準備中 */ - static CobolDecimal cobD2 = new CobolDecimal(); - /** TODO: 準備中 */ - static CobolDecimal cobD3 = new CobolDecimal(); - /** TODO: 準備中 */ - static CobolDecimal cobD4 = new CobolDecimal(); - /** TODO: 準備中 */ - private static BigDecimal[] cobMpze10 = new BigDecimal[COB_MAX_BINARY]; - /** TODO: 準備中 */ - static byte[] packedValue = new byte[20]; - /** TODO: 準備中 */ - static int packedValueInt = 0; - - /** TODO: 準備中 */ - public static void cobInitNumeric() { - cobD1 = new CobolDecimal(); - cobD2 = new CobolDecimal(); - cobD3 = new CobolDecimal(); - cobD4 = new CobolDecimal(); - cobMexp = BigDecimal.ZERO; - for (int i = 0; i < COB_MAX_BINARY; ++i) { - cobMpze10[i] = BigDecimal.ZERO; - cobMpze10[i] = BigDecimal.TEN.pow(i); - } - for (int i = 0; i < packedValue.length; ++i) { - packedValue[i] = 0; - } - packedValueInt = 0; - } - - // TODO cob_init_numeric周辺の初期化処理を正しく実装出来たら消す。 - static { - for (int i = 0; i < COB_MAX_BINARY; ++i) { - cobMpze10[i] = BigDecimal.ZERO; - cobMpze10[i] = BigDecimal.TEN.pow(i); - } - for (int i = 0; i < packedValue.length; ++i) { - packedValue[i] = 0; - } - packedValueInt = 0; - } - - /** 保持する数値データ */ - BigDecimal value; - - /** TODO: 準備中 */ - int scale; - - /** 値とスケールは0に設定する */ - public CobolDecimal() { - this.value = BigDecimal.ZERO; - this.setScale(0); - } - - /** - * 値はvalueを指定し,スケールは0に設定する - * - * @param value 設定する値 - */ - public CobolDecimal(BigDecimal value) { - this.setValue(value); - this.setScale(0); - } - - /** - * 値とスケールを指定する - * - * @param value 設定する値 - * @param scale 設定するスケール - */ - public CobolDecimal(BigDecimal value, int scale) { - this(value); - this.setScale(scale); - } - - /** - * 値を指定し,スケールは0に設定する - * - * @param n TODO: 準備中 - */ - public CobolDecimal(long n) { - if (n == 0L) { - this.setValue(BigDecimal.ZERO); - } else if (n == 1L) { - this.setValue(BigDecimal.ONE); - } else if (n == 10L) { - this.setValue(BigDecimal.TEN); - } else { - this.setValue(new BigDecimal(n)); - } - this.setScale(0); - } - - /** - * 値を設定し,スケールは0に設定する - * - * @param n TODO: 準備中 - */ - public CobolDecimal(int n) { - if (n == 0) { - this.setValue(BigDecimal.ZERO); - } else if (n == 1) { - this.setValue(BigDecimal.ONE); - } else if (n == 10) { - this.setValue(BigDecimal.TEN); - } else { - this.setValue(new BigDecimal(n)); - } - this.setScale(0); - } - - /** - * コピーコンストラクタ - * - * @param other TODO: 準備中 - */ - public CobolDecimal(CobolDecimal other) { - this.setValue(other.getValue()); - this.setScale(other.getScale()); - } - - /** - * このオブジェクトの値を取得する - * - * @return このオブジェクトの値 - */ - public BigDecimal getValue() { - return value; - } - - /** TODO: 準備中 */ - public void decimalInit() { - this.value = BigDecimal.ZERO; - } - - /** - * このオブジェクトの値を設定する - * - * @param value このオブジェクトに設定する値 - */ - public void setValue(BigDecimal value) { - this.value = value; - } - - /** this.valueの値を0にする */ - public void clear() { - this.value = BigDecimal.ZERO; - } - - /** - * このオブジェクトのスケールを設定する - * - * @param scale このオブジェクトに設定するスケール - */ - public void setScale(int scale) { - this.scale = scale; - } - - /** - * このオブジェクトのスケールを取得する - * - * @return このオブジェクトのスケール - */ - public int getScale() { - return this.scale; - } - - /** - * このオブジェクトの値を設定し、スケールは0に設定する - * - * @param n このオブジェクトに設定する値 - */ - public void set(int n) { - this.value = new BigDecimal(n); - this.scale = 0; - } - - /** - * このオブジェクトの値を設定し、スケールは0に設定する - * - * @param n このオブジェクトに設定する値 - */ - public void set(long n) { - this.value = new BigDecimal(n); - this.scale = 0; - } - - /** - * TODO: 準備中 - * - * @param decimal TODO: 準備中 - */ - public void set(CobolDecimal decimal) { - // TODO よりよいコピーの方法を考える - this.value = decimal.value.add(BigDecimal.ZERO); - this.setScale(decimal.getScale()); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public void setField(AbstractCobolField f) { - CobolDecimal decimal = f.getDecimal(); - this.setValue(decimal.getValue()); - this.setScale(decimal.getScale()); - } - - /** - * TODO: 準備中 - * - * @param d1 TODO: 準備中 - * @param d2 TODO: 準備中 - */ - private static boolean DECIMAL_CHECK(CobolDecimal d1, CobolDecimal d2) { - if (d1.getScale() == DECIMAL_NAN || d2.getScale() == DECIMAL_NAN) { - d1.setScale(DECIMAL_NAN); - return true; - } - return false; - } - - /** - * このオブジェクトの示す数値に対して加算を行う - * - * @param n このオブジェクトに加算する値 - */ - public void add(int n) { - this.value = this.value.add(new BigDecimal(n)); - } - - /** - * このオブジェクトの示す数値に対して加算を行う - * - * @param decimal このオブジェクトに加算する値 - */ - public void add(CobolDecimal decimal) { - if (DECIMAL_CHECK(this, decimal)) { - return; - } - alignDecimal(this, decimal); - this.setValue(this.getValue().add(decimal.getValue())); - } - - /** - * このオブジェクトの示す数値に対して減算を行う - * - * @param decimal このオブジェクトの示す数値から減算する値 - */ - public void sub(CobolDecimal decimal) { - if (DECIMAL_CHECK(this, decimal)) { - return; - } - alignDecimal(this, decimal); - this.setValue(this.getValue().subtract(decimal.getValue())); - } - - /** - * このオブジェクトの示す数値に対して減算を行う - * - * @param n このオブジェクトの示す数値から減算する値 - */ - public void sub(int n) { - this.value = this.value.subtract(new BigDecimal(n)); - } - - /** - * このオブジェクトの示す数値に対して乗算を行う - * - * @param decimal このオブジェクトの示す数値に乗算する値 - */ - public void mul(CobolDecimal decimal) { - if (DECIMAL_CHECK(this, decimal)) { - return; - } - this.setScale(this.getScale() + decimal.getScale()); - this.setValue(this.getValue().multiply(decimal.getValue())); - } - - /** - * このオブジェクトの示す数値に対して乗算を行う - * - * @param n このオブジェクトの示す数値に乗算する値 - */ - public void mul(int n) { - this.value = this.value.multiply(new BigDecimal(n)); - } - - /** - * このオブジェクトの示す数値に対してmod演算を行う - * - * @param decimal このオブジェクトの示す数値にmod演算する値 - * @throws CobolStopRunException TODO: 準備中 - */ - public void div(CobolDecimal decimal) throws CobolStopRunException { - if (DECIMAL_CHECK(this, decimal)) { - return; - } - if (decimal.getValue().signum() == 0) { - this.setScale(DECIMAL_NAN); - if (CobolUtil.cobErrorOnExitFlag) { - CobolUtil.runtimeError("Detected division by zero."); - CobolStopRunException.stopRunAndThrow(1); - ; - } - return; - } - if (this.getValue().signum() == 0) { - this.setScale(0); - return; - } - this.setScale(this.getScale() - decimal.getScale()); - int shift = 37 + ((this.getScale() < 0) ? -this.getScale() : 0); - this.shiftDecimal(shift); - this.setValue(this.getValue().divide(decimal.getValue(), RoundingMode.DOWN)); - } - - /** - * このオブジェクトの示す数値に対して除算を行う - * - * @param n このオブジェクトの示す数値を除算する値 - */ - public void div(int n) { - this.value = this.value.divide(new BigDecimal(n), RoundingMode.DOWN); - } - - /** - * このオブジェクトの示す数値に対して累乗を行う - * - * @param decimal このオブジェクトの示す数値を累乗する値 - */ - // TODO 残りの実装 - public void pow(CobolDecimal decimal) { - if (DECIMAL_CHECK(this, decimal)) { - return; - } - - if (decimal.getScale() == 0 && decimal.getValue().compareTo(new BigDecimal(2147483647)) <= 0) { - int n = decimal.getValue().intValue(); - this.value = this.value.pow(n); - this.setScale(this.getScale() * n); - } else { - this.decimalSetDouble(Math.pow(this.decimalGetDouble(), decimal.decimalGetDouble())); - } - } - - /** - * TODO: 準備中 - * - * @param v TODO: 準備中 - */ - private void decimalSetDouble(double v) { - this.setValue(new BigDecimal(v * 1.0e9)); - this.setScale(9); - } - - private double decimalGetDouble() { - double v = this.getValue().doubleValue(); - int n = this.getScale(); - for (; n > 0; n--) { - v /= 10; - } - for (; n < 0; n++) { - v *= 10; - } - return v; - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int getField(AbstractCobolField f, int opt) throws CobolStopRunException { - if (this.getScale() == CobolDecimal.DECIMAL_NAN) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); - return CobolRuntimeException.code; - } - - CobolDecimal d = new CobolDecimal(this); - - /* rounding */ - if ((opt & CobolDecimal.COB_STORE_ROUND) != 0) { - if (f.getAttribute().getScale() < d.getScale()) { - int sign = d.value.signum(); - if (sign != 0) { - d.shiftDecimal(f.getAttribute().getScale() - d.getScale() + 1); - if (sign > 0) { - d.add(5); - } else { - d.sub(5); - } - } - } - } - - d.shiftDecimal(f.getAttribute().getScale() - d.getScale()); - - // TODO 残りのパターンも実装 - switch (f.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - return d.getDisplayField(f, opt); - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - return d.getPackedField(f, opt); - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - return d.getBinaryField(f, opt); - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - System.out.println("getField: Float not implemented"); - throw new CobolRuntimeException(0, "getField: Float not implemented"); - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - return d.getDoubleField(f, opt); - default: - int digits = f.getAttribute().getDigits(); - CobolFieldAttribute attr = f.getAttribute(); - CobolFieldAttribute newAttr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - digits, - attr.getScale(), - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - AbstractCobolField displayField = - CobolFieldFactory.makeCobolField(digits, new CobolDataStorage(digits), newAttr); - if (d.getField(displayField, opt) == 0) { - f.moveFrom(displayField); - } - return CobolExceptionInfo.code; - } - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - */ - public int getDoubleField(AbstractCobolField f, int opt) { - CobolDataStorage storage = new CobolDataStorage(8); - double val = this.value.doubleValue(); - int scale = this.scale; - for (int i = 0; i < Math.abs(scale); ++i) { - if (scale > 0) { - val /= 10; - } else { - val *= 10; - } - } - storage.set(val); - f.setDataStorage(storage); - return 0; - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void shiftDecimal(int n) { - if (n == 0) { - return; - } - if (n > 0) { - cobMexp = BigDecimal.TEN.pow(n); - this.value = this.value.multiply(cobMexp); - } else { - cobMexp = BigDecimal.TEN.pow(-n); - this.value = this.value.divide(cobMexp, RoundingMode.DOWN); - } - this.setScale(this.getScale() + n); - } - - // libcob/numeric.cのalign_decimalの実装 - /** - * TODO: 準備中 - * - * @param d1 TODO: 準備中 - * @param d2 TODO: 準備中 - */ - public void alignDecimal(CobolDecimal d1, CobolDecimal d2) { - if (d1.getScale() < d2.getScale()) { - d1.shiftDecimal(d2.getScale() - d1.getScale()); - } else if (d1.getScale() > d2.getScale()) { - d2.shiftDecimal(d1.getScale() - d2.getScale()); - } - } - - // libcob/numeric.cのcob_decimal_cmpの実装 引数で与えられたCobolDecimal型のインスタンスとの比較をする. - /** - * TODO: 準備中 - * - * @param decimal TODO: 準備中 - * @return TODO: 準備中 - */ - public int compareTo(CobolDecimal decimal) { - alignDecimal(this, decimal); - BigDecimal v1 = this.getValue().movePointLeft(this.getScale()); - BigDecimal v2 = decimal.getValue().movePointLeft(decimal.getScale()); - return v1.compareTo(v2); - } - - // libcob/numeric.cのcob_decimal_get_displayの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int getDisplayField(AbstractCobolField f, int opt) throws CobolStopRunException { - int sign = this.value.signum(); - this.value = this.value.abs(); - String numString = this.value.toPlainString(); - int dPointIndex = numString.indexOf('.'); - numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); - if (dPointIndex < 0) { - dPointIndex = numBuffPtr.length; - } - dPointIndex -= this.scale; - int size = numBuffPtr.length; - - CobolDataStorage data = f.getDataStorage(); - int diff = f.getFieldSize() - size; - - if (diff < 0) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); - if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { - return CobolRuntimeException.code; - } - } - - int fFirstIndex = f.getFirstDataIndex(); - int fFieldSize = f.getFieldSize(); - int fPointIndex = fFieldSize - f.getAttribute().getScale(); - for (int i = 0; i < fFieldSize; i++) { - int fIndex = fFirstIndex + i; - int dIndex = i + dPointIndex - fPointIndex; - if (0 <= dIndex && dIndex < numBuffPtr.length) { - data.setByte(fIndex, numBuffPtr[dIndex]); - } else { - data.setByte(fIndex, (byte) '0'); - } - } - f.putSign(sign); - return 0; - } - - // libcob/numeric.cのcob_decimal_get_packedの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - */ - public int getPackedField(AbstractCobolField f, int opt) { - int sign = this.value.signum(); - this.value = this.value.abs(); - String numString = this.value.toPlainString(); - int dPointIndex = numString.indexOf('.'); - numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); - if (dPointIndex < 0) { - dPointIndex = numBuffPtr.length; - } - dPointIndex -= this.scale; - int size = numBuffPtr.length; - int fPointIndex = f.getAttribute().getDigits() - f.getAttribute().getScale(); - - CobolDataStorage data = f.getDataStorage(); - int digits = f.getAttribute().getDigits(); - int diff = digits - size; - if (diff < 0) { - CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); - if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { - return CobolRuntimeException.code; - } - } - data.fillBytes(0, f.getSize()); - for (int i = 0; i < digits; ++i) { - int j = i - fPointIndex + dPointIndex; - if (j < 0 || numBuffPtr.length <= j) { - continue; - } - byte val = (byte) ((int) numBuffPtr[j] - '0'); - int index; - if (digits % 2 == 0) { - index = (i + 1) / 2; - } else { - index = i / 2; - } - byte b = data.getByte(index); - if ((digits + i) % 2 == 0) { - data.setByte(index, (b & 0xF0) | val); - } else { - data.setByte(index, (val << 4) | (b & 0x0F)); - } - } - - int p = f.getSize() - 1; - byte x = data.getByte(p); - if (!f.getAttribute().isFlagHaveSign()) { - data.setByte(p, (byte) ((x & 0xF0) | 0x0F)); - } else if (sign < 0) { - data.setByte(p, (byte) ((x & 0xF0) | 0x0D)); - } else { - data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); - } - - return 0; - } - - // libcob/numeric.cのcob_decimal_get_binaryの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param opt TODO: 準備中 - * @return TODO: 準備中 - */ - private int getBinaryField(AbstractCobolField f, int opt) { - CobolDataStorage data = f.getDataStorage(); - CobolFieldAttribute attr = f.getAttribute(); - if (this.getValue().signum() == 0) { - data.fillBytes(0, f.getSize()); - return 0; - } - int overflow = 0; - int digits = attr.getDigits(); - int sign; - if (attr.isFlagHaveSign()) { - sign = 1; - } else { - sign = 0; - if (this.value.signum() < 0) { - this.value = this.value.abs(); - } - } - int bitnum = f.getSize() * 8 - sign; - outer: - { - if (this.getValue().compareTo(new BigDecimal(2).pow(bitnum).subtract(BigDecimal.ONE)) > 0) { - if ((opt & COB_STORE_KEEP_ON_OVERFLOW) != 0) { - break outer; - } - overflow = 1; - if ((opt & COB_STORE_TRUNC_ON_OVERFLOW) != 0) { - this.setValue(this.getValue().remainder(cobMpze10[digits])); - } else { - this.setValue(this.getValue().remainder(new BigDecimal(2).pow(f.getSize() * 8))); - } - } else if ((opt != 0) && CobolModule.getCurrentModule().flag_binary_truncate != 0) { - if (this.getValue().abs().compareTo(cobMpze10[digits].abs()) >= 0) { - if ((opt & COB_STORE_KEEP_ON_OVERFLOW) != 0) { - break outer; - } - overflow = 1; - if ((opt & COB_STORE_TRUNC_ON_OVERFLOW) != 0) { - this.setValue(this.getValue().remainder(cobMpze10[digits])); - } else { - this.setValue(this.getValue().remainder(new BigDecimal(2).pow(f.getFieldSize() * 8))); - } - } - } - ((CobolNumericBinaryField) f).setLongValue(this.getValue().longValue()); - if (overflow == 0) { - return 0; - } - } - CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); - return CobolExceptionInfo.code; - } - - // libcob/numeric.cのnum_byte_memcpyの実装 - /** - * TODO: 準備中 - * - * @param s1 TODO: 準備中 - * @param s1StartIndex TODO: 準備中 - * @param s2 TODO: 準備中 - * @param s2StartIndex TODO: 準備中 - * @param size TODO: 準備中 - */ - public static void numByteMemcpy( - CobolDataStorage s1, int s1StartIndex, CobolDataStorage s2, int s2StartIndex, int size) { - int i1 = s1StartIndex; - int i2 = s2StartIndex; - do { - s1.setByte(i1++, s2.getByte(i2++)); - } while (--size != 0); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** + * BigDecimalを扱うクラス
+ * COMPUTE等で計算をするときに使用する + */ +public class CobolDecimal { + /** TODO: 準備中 */ + public static final int DECIMAL_NAN = -128; + + /** TODO: 準備中 */ + public static final int COB_STORE_ROUND = 0x01; + + /** TODO: 準備中 */ + public static final int COB_STORE_KEEP_ON_OVERFLOW = 0x02; + + /** TODO: 準備中 */ + public static final int COB_STORE_TRUNC_ON_OVERFLOW = 0x04; + + /** TODO: 準備中 */ + public static final int COB_MAX_BINARY = 36; + + private static BigDecimal cobMexp = BigDecimal.ZERO; + + /** TODO: 準備中 */ + static CobolDecimal cobD1 = new CobolDecimal(); + + /** TODO: 準備中 */ + static CobolDecimal cobD2 = new CobolDecimal(); + + /** TODO: 準備中 */ + static CobolDecimal cobD3 = new CobolDecimal(); + + /** TODO: 準備中 */ + static CobolDecimal cobD4 = new CobolDecimal(); + + /** TODO: 準備中 */ + private static BigDecimal[] cobMpze10 = new BigDecimal[COB_MAX_BINARY]; + + /** TODO: 準備中 */ + static byte[] packedValue = new byte[20]; + + /** TODO: 準備中 */ + static int packedValueInt = 0; + + /** TODO: 準備中 */ + public static void cobInitNumeric() { + cobD1 = new CobolDecimal(); + cobD2 = new CobolDecimal(); + cobD3 = new CobolDecimal(); + cobD4 = new CobolDecimal(); + cobMexp = BigDecimal.ZERO; + for (int i = 0; i < COB_MAX_BINARY; ++i) { + cobMpze10[i] = BigDecimal.ZERO; + cobMpze10[i] = BigDecimal.TEN.pow(i); + } + for (int i = 0; i < packedValue.length; ++i) { + packedValue[i] = 0; + } + packedValueInt = 0; + } + + // TODO cob_init_numeric周辺の初期化処理を正しく実装出来たら消す。 + static { + for (int i = 0; i < COB_MAX_BINARY; ++i) { + cobMpze10[i] = BigDecimal.ZERO; + cobMpze10[i] = BigDecimal.TEN.pow(i); + } + for (int i = 0; i < packedValue.length; ++i) { + packedValue[i] = 0; + } + packedValueInt = 0; + } + + /** 保持する数値データ */ + BigDecimal value; + + /** TODO: 準備中 */ + int scale; + + /** 値とスケールは0に設定する */ + public CobolDecimal() { + this.value = BigDecimal.ZERO; + this.setScale(0); + } + + /** + * 値はvalueを指定し,スケールは0に設定する + * + * @param value 設定する値 + */ + public CobolDecimal(BigDecimal value) { + this.setValue(value); + this.setScale(0); + } + + /** + * 値とスケールを指定する + * + * @param value 設定する値 + * @param scale 設定するスケール + */ + public CobolDecimal(BigDecimal value, int scale) { + this(value); + this.setScale(scale); + } + + /** + * 値を指定し,スケールは0に設定する + * + * @param n TODO: 準備中 + */ + public CobolDecimal(long n) { + if (n == 0L) { + this.setValue(BigDecimal.ZERO); + } else if (n == 1L) { + this.setValue(BigDecimal.ONE); + } else if (n == 10L) { + this.setValue(BigDecimal.TEN); + } else { + this.setValue(new BigDecimal(n)); + } + this.setScale(0); + } + + /** + * 値を設定し,スケールは0に設定する + * + * @param n TODO: 準備中 + */ + public CobolDecimal(int n) { + if (n == 0) { + this.setValue(BigDecimal.ZERO); + } else if (n == 1) { + this.setValue(BigDecimal.ONE); + } else if (n == 10) { + this.setValue(BigDecimal.TEN); + } else { + this.setValue(new BigDecimal(n)); + } + this.setScale(0); + } + + /** + * コピーコンストラクタ + * + * @param other TODO: 準備中 + */ + public CobolDecimal(CobolDecimal other) { + this.setValue(other.getValue()); + this.setScale(other.getScale()); + } + + /** + * このオブジェクトの値を取得する + * + * @return このオブジェクトの値 + */ + public BigDecimal getValue() { + return value; + } + + /** TODO: 準備中 */ + public void decimalInit() { + this.value = BigDecimal.ZERO; + } + + /** + * このオブジェクトの値を設定する + * + * @param value このオブジェクトに設定する値 + */ + public void setValue(BigDecimal value) { + this.value = value; + } + + /** this.valueの値を0にする */ + public void clear() { + this.value = BigDecimal.ZERO; + } + + /** + * このオブジェクトのスケールを設定する + * + * @param scale このオブジェクトに設定するスケール + */ + public void setScale(int scale) { + this.scale = scale; + } + + /** + * このオブジェクトのスケールを取得する + * + * @return このオブジェクトのスケール + */ + public int getScale() { + return this.scale; + } + + /** + * このオブジェクトの値を設定し、スケールは0に設定する + * + * @param n このオブジェクトに設定する値 + */ + public void set(int n) { + this.value = new BigDecimal(n); + this.scale = 0; + } + + /** + * このオブジェクトの値を設定し、スケールは0に設定する + * + * @param n このオブジェクトに設定する値 + */ + public void set(long n) { + this.value = new BigDecimal(n); + this.scale = 0; + } + + /** + * TODO: 準備中 + * + * @param decimal TODO: 準備中 + */ + public void set(CobolDecimal decimal) { + // TODO よりよいコピーの方法を考える + this.value = decimal.value.add(BigDecimal.ZERO); + this.setScale(decimal.getScale()); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public void setField(AbstractCobolField f) { + CobolDecimal decimal = f.getDecimal(); + this.setValue(decimal.getValue()); + this.setScale(decimal.getScale()); + } + + /** + * TODO: 準備中 + * + * @param d1 TODO: 準備中 + * @param d2 TODO: 準備中 + */ + private static boolean DECIMAL_CHECK(CobolDecimal d1, CobolDecimal d2) { + if (d1.getScale() == DECIMAL_NAN || d2.getScale() == DECIMAL_NAN) { + d1.setScale(DECIMAL_NAN); + return true; + } + return false; + } + + /** + * このオブジェクトの示す数値に対して加算を行う + * + * @param n このオブジェクトに加算する値 + */ + public void add(int n) { + this.value = this.value.add(new BigDecimal(n)); + } + + /** + * このオブジェクトの示す数値に対して加算を行う + * + * @param decimal このオブジェクトに加算する値 + */ + public void add(CobolDecimal decimal) { + if (DECIMAL_CHECK(this, decimal)) { + return; + } + alignDecimal(this, decimal); + this.setValue(this.getValue().add(decimal.getValue())); + } + + /** + * このオブジェクトの示す数値に対して減算を行う + * + * @param decimal このオブジェクトの示す数値から減算する値 + */ + public void sub(CobolDecimal decimal) { + if (DECIMAL_CHECK(this, decimal)) { + return; + } + alignDecimal(this, decimal); + this.setValue(this.getValue().subtract(decimal.getValue())); + } + + /** + * このオブジェクトの示す数値に対して減算を行う + * + * @param n このオブジェクトの示す数値から減算する値 + */ + public void sub(int n) { + this.value = this.value.subtract(new BigDecimal(n)); + } + + /** + * このオブジェクトの示す数値に対して乗算を行う + * + * @param decimal このオブジェクトの示す数値に乗算する値 + */ + public void mul(CobolDecimal decimal) { + if (DECIMAL_CHECK(this, decimal)) { + return; + } + this.setScale(this.getScale() + decimal.getScale()); + this.setValue(this.getValue().multiply(decimal.getValue())); + } + + /** + * このオブジェクトの示す数値に対して乗算を行う + * + * @param n このオブジェクトの示す数値に乗算する値 + */ + public void mul(int n) { + this.value = this.value.multiply(new BigDecimal(n)); + } + + /** + * このオブジェクトの示す数値に対してmod演算を行う + * + * @param decimal このオブジェクトの示す数値にmod演算する値 + * @throws CobolStopRunException TODO: 準備中 + */ + public void div(CobolDecimal decimal) throws CobolStopRunException { + if (DECIMAL_CHECK(this, decimal)) { + return; + } + if (decimal.getValue().signum() == 0) { + this.setScale(DECIMAL_NAN); + if (CobolUtil.cobErrorOnExitFlag) { + CobolUtil.runtimeError("Detected division by zero."); + CobolStopRunException.stopRunAndThrow(1); + ; + } + return; + } + if (this.getValue().signum() == 0) { + this.setScale(0); + return; + } + this.setScale(this.getScale() - decimal.getScale()); + int shift = 37 + ((this.getScale() < 0) ? -this.getScale() : 0); + this.shiftDecimal(shift); + this.setValue(this.getValue().divide(decimal.getValue(), RoundingMode.DOWN)); + } + + /** + * このオブジェクトの示す数値に対して除算を行う + * + * @param n このオブジェクトの示す数値を除算する値 + */ + public void div(int n) { + this.value = this.value.divide(new BigDecimal(n), RoundingMode.DOWN); + } + + /** + * このオブジェクトの示す数値に対して累乗を行う + * + * @param decimal このオブジェクトの示す数値を累乗する値 + */ + // TODO 残りの実装 + public void pow(CobolDecimal decimal) { + if (DECIMAL_CHECK(this, decimal)) { + return; + } + + if (decimal.getScale() == 0 + && decimal.getValue().compareTo(new BigDecimal(2147483647)) <= 0) { + int n = decimal.getValue().intValue(); + this.value = this.value.pow(n); + this.setScale(this.getScale() * n); + } else { + this.decimalSetDouble(Math.pow(this.decimalGetDouble(), decimal.decimalGetDouble())); + } + } + + /** + * TODO: 準備中 + * + * @param v TODO: 準備中 + */ + private void decimalSetDouble(double v) { + this.setValue(new BigDecimal(v * 1.0e9)); + this.setScale(9); + } + + private double decimalGetDouble() { + double v = this.getValue().doubleValue(); + int n = this.getScale(); + for (; n > 0; n--) { + v /= 10; + } + for (; n < 0; n++) { + v *= 10; + } + return v; + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int getField(AbstractCobolField f, int opt) throws CobolStopRunException { + if (this.getScale() == CobolDecimal.DECIMAL_NAN) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); + return CobolRuntimeException.code; + } + + CobolDecimal d = new CobolDecimal(this); + + /* rounding */ + if ((opt & CobolDecimal.COB_STORE_ROUND) != 0) { + if (f.getAttribute().getScale() < d.getScale()) { + int sign = d.value.signum(); + if (sign != 0) { + d.shiftDecimal(f.getAttribute().getScale() - d.getScale() + 1); + if (sign > 0) { + d.add(5); + } else { + d.sub(5); + } + } + } + } + + d.shiftDecimal(f.getAttribute().getScale() - d.getScale()); + + // TODO 残りのパターンも実装 + switch (f.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + return d.getDisplayField(f, opt); + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + return d.getPackedField(f, opt); + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + return d.getBinaryField(f, opt); + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + System.out.println("getField: Float not implemented"); + throw new CobolRuntimeException(0, "getField: Float not implemented"); + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + return d.getDoubleField(f, opt); + default: + int digits = f.getAttribute().getDigits(); + CobolFieldAttribute attr = f.getAttribute(); + CobolFieldAttribute newAttr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + digits, + attr.getScale(), + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + AbstractCobolField displayField = + CobolFieldFactory.makeCobolField( + digits, new CobolDataStorage(digits), newAttr); + if (d.getField(displayField, opt) == 0) { + f.moveFrom(displayField); + } + return CobolExceptionInfo.code; + } + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + */ + public int getDoubleField(AbstractCobolField f, int opt) { + CobolDataStorage storage = new CobolDataStorage(8); + double val = this.value.doubleValue(); + int scale = this.scale; + for (int i = 0; i < Math.abs(scale); ++i) { + if (scale > 0) { + val /= 10; + } else { + val *= 10; + } + } + storage.set(val); + f.setDataStorage(storage); + return 0; + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void shiftDecimal(int n) { + if (n == 0) { + return; + } + if (n > 0) { + cobMexp = BigDecimal.TEN.pow(n); + this.value = this.value.multiply(cobMexp); + } else { + cobMexp = BigDecimal.TEN.pow(-n); + this.value = this.value.divide(cobMexp, RoundingMode.DOWN); + } + this.setScale(this.getScale() + n); + } + + // libcob/numeric.cのalign_decimalの実装 + /** + * TODO: 準備中 + * + * @param d1 TODO: 準備中 + * @param d2 TODO: 準備中 + */ + public void alignDecimal(CobolDecimal d1, CobolDecimal d2) { + if (d1.getScale() < d2.getScale()) { + d1.shiftDecimal(d2.getScale() - d1.getScale()); + } else if (d1.getScale() > d2.getScale()) { + d2.shiftDecimal(d1.getScale() - d2.getScale()); + } + } + + // libcob/numeric.cのcob_decimal_cmpの実装 引数で与えられたCobolDecimal型のインスタンスとの比較をする. + /** + * TODO: 準備中 + * + * @param decimal TODO: 準備中 + * @return TODO: 準備中 + */ + public int compareTo(CobolDecimal decimal) { + alignDecimal(this, decimal); + BigDecimal v1 = this.getValue().movePointLeft(this.getScale()); + BigDecimal v2 = decimal.getValue().movePointLeft(decimal.getScale()); + return v1.compareTo(v2); + } + + // libcob/numeric.cのcob_decimal_get_displayの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int getDisplayField(AbstractCobolField f, int opt) throws CobolStopRunException { + int sign = this.value.signum(); + this.value = this.value.abs(); + String numString = this.value.toPlainString(); + int dPointIndex = numString.indexOf('.'); + numString = numString.replace(".", ""); + byte[] numBuffPtr = numString.getBytes(); + if (dPointIndex < 0) { + dPointIndex = numBuffPtr.length; + } + dPointIndex -= this.scale; + int size = numBuffPtr.length; + + CobolDataStorage data = f.getDataStorage(); + int diff = f.getFieldSize() - size; + + if (diff < 0) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); + if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { + return CobolRuntimeException.code; + } + } + + int fFirstIndex = f.getFirstDataIndex(); + int fFieldSize = f.getFieldSize(); + int fPointIndex = fFieldSize - f.getAttribute().getScale(); + for (int i = 0; i < fFieldSize; i++) { + int fIndex = fFirstIndex + i; + int dIndex = i + dPointIndex - fPointIndex; + if (0 <= dIndex && dIndex < numBuffPtr.length) { + data.setByte(fIndex, numBuffPtr[dIndex]); + } else { + data.setByte(fIndex, (byte) '0'); + } + } + f.putSign(sign); + return 0; + } + + // libcob/numeric.cのcob_decimal_get_packedの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + */ + public int getPackedField(AbstractCobolField f, int opt) { + int sign = this.value.signum(); + this.value = this.value.abs(); + String numString = this.value.toPlainString(); + int dPointIndex = numString.indexOf('.'); + numString = numString.replace(".", ""); + byte[] numBuffPtr = numString.getBytes(); + if (dPointIndex < 0) { + dPointIndex = numBuffPtr.length; + } + dPointIndex -= this.scale; + int size = numBuffPtr.length; + int fPointIndex = f.getAttribute().getDigits() - f.getAttribute().getScale(); + + CobolDataStorage data = f.getDataStorage(); + int digits = f.getAttribute().getDigits(); + int diff = digits - size; + if (diff < 0) { + CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); + if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { + return CobolRuntimeException.code; + } + } + data.fillBytes(0, f.getSize()); + for (int i = 0; i < digits; ++i) { + int j = i - fPointIndex + dPointIndex; + if (j < 0 || numBuffPtr.length <= j) { + continue; + } + byte val = (byte) ((int) numBuffPtr[j] - '0'); + int index; + if (digits % 2 == 0) { + index = (i + 1) / 2; + } else { + index = i / 2; + } + byte b = data.getByte(index); + if ((digits + i) % 2 == 0) { + data.setByte(index, (b & 0xF0) | val); + } else { + data.setByte(index, (val << 4) | (b & 0x0F)); + } + } + + int p = f.getSize() - 1; + byte x = data.getByte(p); + if (!f.getAttribute().isFlagHaveSign()) { + data.setByte(p, (byte) ((x & 0xF0) | 0x0F)); + } else if (sign < 0) { + data.setByte(p, (byte) ((x & 0xF0) | 0x0D)); + } else { + data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); + } + + return 0; + } + + // libcob/numeric.cのcob_decimal_get_binaryの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param opt TODO: 準備中 + * @return TODO: 準備中 + */ + private int getBinaryField(AbstractCobolField f, int opt) { + CobolDataStorage data = f.getDataStorage(); + CobolFieldAttribute attr = f.getAttribute(); + if (this.getValue().signum() == 0) { + data.fillBytes(0, f.getSize()); + return 0; + } + int overflow = 0; + int digits = attr.getDigits(); + int sign; + if (attr.isFlagHaveSign()) { + sign = 1; + } else { + sign = 0; + if (this.value.signum() < 0) { + this.value = this.value.abs(); + } + } + int bitnum = f.getSize() * 8 - sign; + outer: + { + if (this.getValue().compareTo(new BigDecimal(2).pow(bitnum).subtract(BigDecimal.ONE)) + > 0) { + if ((opt & COB_STORE_KEEP_ON_OVERFLOW) != 0) { + break outer; + } + overflow = 1; + if ((opt & COB_STORE_TRUNC_ON_OVERFLOW) != 0) { + this.setValue(this.getValue().remainder(cobMpze10[digits])); + } else { + this.setValue( + this.getValue().remainder(new BigDecimal(2).pow(f.getSize() * 8))); + } + } else if ((opt != 0) && CobolModule.getCurrentModule().flag_binary_truncate != 0) { + if (this.getValue().abs().compareTo(cobMpze10[digits].abs()) >= 0) { + if ((opt & COB_STORE_KEEP_ON_OVERFLOW) != 0) { + break outer; + } + overflow = 1; + if ((opt & COB_STORE_TRUNC_ON_OVERFLOW) != 0) { + this.setValue(this.getValue().remainder(cobMpze10[digits])); + } else { + this.setValue( + this.getValue() + .remainder(new BigDecimal(2).pow(f.getFieldSize() * 8))); + } + } + } + ((CobolNumericBinaryField) f).setLongValue(this.getValue().longValue()); + if (overflow == 0) { + return 0; + } + } + CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); + return CobolExceptionInfo.code; + } + + // libcob/numeric.cのnum_byte_memcpyの実装 + /** + * TODO: 準備中 + * + * @param s1 TODO: 準備中 + * @param s1StartIndex TODO: 準備中 + * @param s2 TODO: 準備中 + * @param s2StartIndex TODO: 準備中 + * @param size TODO: 準備中 + */ + public static void numByteMemcpy( + CobolDataStorage s1, + int s1StartIndex, + CobolDataStorage s2, + int s2StartIndex, + int size) { + int i1 = s1StartIndex; + int i2 = s2StartIndex; + do { + s1.setByte(i1++, s2.getByte(i2++)); + } while (--size != 0); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldAttribute.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldAttribute.java index 24a81f64..72dcb386 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldAttribute.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldAttribute.java @@ -1,431 +1,450 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -/** TODO: 準備中 */ -public class CobolFieldAttribute { - - /* field types */ - - /** TODO: 準備中 */ - public static final int COB_TYPE_UNKNOWN = 0x00; - /** TODO: 準備中 */ - public static final int COB_TYPE_GROUP = 0x01; - /** TODO: 準備中 */ - public static final int COB_TYPE_BOOLEAN = 0x02; - - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC = 0x10; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_DISPLAY = 0x10; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_BINARY = 0x11; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_PACKED = 0x12; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_FLOAT = 0x13; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_DOUBLE = 0x14; - /** TODO: 準備中 */ - public static final int COB_TYPE_NUMERIC_EDITED = 0x24; - - /** TODO: 準備中 */ - public static final int COB_TYPE_ALPHANUMERIC = 0x21; - /** TODO: 準備中 */ - public static final int COB_TYPE_ALPHANUMERIC_ALL = 0x22; - /** TODO: 準備中 */ - public static final int COB_TYPE_ALPHANUMERIC_EDITED = 0x23; - - /** TODO: 準備中 */ - public static final int COB_TYPE_NATIONAL = 0x40; - /** TODO: 準備中 */ - public static final int COB_TYPE_NATIONAL_EDITED = 0x41; - /** TODO: 準備中 */ - public static final int COB_TYPE_NATIONAL_ALL = 0x42; - - /* field flags */ - - /** TODO: 準備中 */ - public static final int COB_FLAG_HAVE_SIGN = 0x01; - /** TODO: 準備中 */ - public static final int COB_FLAG_SIGN_SEPARATE = 0x02; - /** TODO: 準備中 */ - public static final int COB_FLAG_SIGN_LEADING = 0x04; - /** TODO: 準備中 */ - public static final int COB_FLAG_BLANK_ZERO = 0x08; - /** TODO: 準備中 */ - public static final int COB_FLAG_JUSTIFIED = 0x10; - /** TODO: 準備中 */ - public static final int COB_FLAG_BINARY_SWAP = 0x20; - /** TODO: 準備中 */ - public static final int COB_FLAG_REAL_BINARY = 0x40; - /** TODO: 準備中 */ - public static final int COB_FLAG_IS_POINTER = 0x80; - - /** 変数種別 */ - private int type; - - /** 数値の時,桁数を示す */ - private int digits; - - /** 数値の時,スケールを示す */ - private int scale; - - /** 様々なフラグ */ - private int flags; - - /** PICTURE句の文字列 */ - private String pic; - - /** - * コンストラクタ - * - * @param type フィールドの種別 - * @param digits 数値型のとき,桁数を表す - * @param scale 数値型の時,スケールを表す - * @param flags 各種フラグ - * @param pic PIC文字列 - */ - public CobolFieldAttribute(int type, int digits, int scale, int flags, String pic) { - this.type = type; - this.digits = digits; - this.scale = scale; - this.flags = flags; - this.pic = pic; - } - - /** - * TODO: 準備中 - * - * @param other TODO: 準備中 - */ - public CobolFieldAttribute(CobolFieldAttribute other) { - this.type = other.type; - this.digits = other.digits; - this.scale = other.scale; - this.flags = other.flags; - this.pic = other.pic; - } - - /** - * 変数種別を取得する - * - * @return このオブジェクトの変数種別 - */ - public int getType() { - return type; - } - - /** - * 変数種別を取得する - * - * @param type このオブジェクトに設定する変数種別 - */ - public void setType(int type) { - this.type = type; - } - - /** - * 桁数を取得する - * - * @return このオブジェクトの桁数 - */ - public int getDigits() { - return digits; - } - - /** - * 桁数を設定する - * - * @param digits このオブジェクトに設定する桁数 - */ - public void setDigits(int digits) { - this.digits = digits; - } - - /** - * このオブジェクトのスケールを取得する - * - * @return このオブジェクトのスケール - */ - public int getScale() { - return scale; - } - - /** - * このオブジェクトのスケールを設定する - * - * @param scale このオブジェクトに設定するスケール - */ - public void setScale(int scale) { - this.scale = scale; - } - - /** - * このオブジェクトのフラグを設定する - * - * @return このオブジェクトのフラグ - */ - public int getFlags() { - return this.flags; - } - - /** - * このオブジェクトのフラグを設定する - * - * @param flags このオブジェクトに設定するフラグ - */ - public void setFlags(int flags) { - this.flags = flags; - } - - /** - * このオブジェクトのPICTURE文字列を取得する - * - * @return このオブジェクトのPICTURE文字列 - */ - public String getPic() { - return pic; - } - - /** - * このオブジェクトのPICTURE文字列を設定する - * - * @param pic このオブジェクトに設定するPICTURE文字列 - */ - public void setPic(String pic) { - this.pic = pic; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeUnknown() { - return type == COB_TYPE_UNKNOWN; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeGroup() { - return type == COB_TYPE_GROUP; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeBoolean() { - return type == COB_TYPE_BOOLEAN; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumeric() { - return (type & COB_TYPE_NUMERIC) > 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericDisplay() { - return type == COB_TYPE_NUMERIC_DISPLAY; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericBinary() { - return type == COB_TYPE_NUMERIC_BINARY; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericPacked() { - return type == COB_TYPE_NUMERIC_PACKED; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericFloat() { - return type == COB_TYPE_NUMERIC_FLOAT; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericDouble() { - return type == COB_TYPE_NUMERIC_DOUBLE; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNumericEdited() { - return type == COB_TYPE_NUMERIC_EDITED; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeAlphanum() { - return type == COB_TYPE_ALPHANUMERIC; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeAlphanumAll() { - return type == COB_TYPE_ALPHANUMERIC_ALL; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeAlphanumEdited() { - return type == COB_TYPE_ALPHANUMERIC_EDITED; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNational() { - return type == COB_TYPE_NATIONAL; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNationalEdited() { - return type == COB_TYPE_NATIONAL_EDITED; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isTypeNationalAll() { - return type == COB_TYPE_NATIONAL_ALL; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagHaveSign() { - return (flags & COB_FLAG_HAVE_SIGN) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagSignSeparate() { - return (flags & COB_FLAG_SIGN_SEPARATE) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagSignLeading() { - return (flags & COB_FLAG_SIGN_LEADING) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagBlankZero() { - return (flags & COB_FLAG_BLANK_ZERO) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagJustified() { - return (flags & COB_FLAG_JUSTIFIED) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagBinarySwap() { - return (flags & COB_FLAG_BINARY_SWAP) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagRealBinary() { - return (flags & COB_FLAG_REAL_BINARY) != 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public boolean isFlagIsPointer() { - return (flags & COB_FLAG_IS_POINTER) != 0; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +/** TODO: 準備中 */ +public class CobolFieldAttribute { + + /* field types */ + + /** TODO: 準備中 */ + public static final int COB_TYPE_UNKNOWN = 0x00; + + /** TODO: 準備中 */ + public static final int COB_TYPE_GROUP = 0x01; + + /** TODO: 準備中 */ + public static final int COB_TYPE_BOOLEAN = 0x02; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC = 0x10; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_DISPLAY = 0x10; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_BINARY = 0x11; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_PACKED = 0x12; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_FLOAT = 0x13; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_DOUBLE = 0x14; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NUMERIC_EDITED = 0x24; + + /** TODO: 準備中 */ + public static final int COB_TYPE_ALPHANUMERIC = 0x21; + + /** TODO: 準備中 */ + public static final int COB_TYPE_ALPHANUMERIC_ALL = 0x22; + + /** TODO: 準備中 */ + public static final int COB_TYPE_ALPHANUMERIC_EDITED = 0x23; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NATIONAL = 0x40; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NATIONAL_EDITED = 0x41; + + /** TODO: 準備中 */ + public static final int COB_TYPE_NATIONAL_ALL = 0x42; + + /* field flags */ + + /** TODO: 準備中 */ + public static final int COB_FLAG_HAVE_SIGN = 0x01; + + /** TODO: 準備中 */ + public static final int COB_FLAG_SIGN_SEPARATE = 0x02; + + /** TODO: 準備中 */ + public static final int COB_FLAG_SIGN_LEADING = 0x04; + + /** TODO: 準備中 */ + public static final int COB_FLAG_BLANK_ZERO = 0x08; + + /** TODO: 準備中 */ + public static final int COB_FLAG_JUSTIFIED = 0x10; + + /** TODO: 準備中 */ + public static final int COB_FLAG_BINARY_SWAP = 0x20; + + /** TODO: 準備中 */ + public static final int COB_FLAG_REAL_BINARY = 0x40; + + /** TODO: 準備中 */ + public static final int COB_FLAG_IS_POINTER = 0x80; + + /** 変数種別 */ + private int type; + + /** 数値の時,桁数を示す */ + private int digits; + + /** 数値の時,スケールを示す */ + private int scale; + + /** 様々なフラグ */ + private int flags; + + /** PICTURE句の文字列 */ + private String pic; + + /** + * コンストラクタ + * + * @param type フィールドの種別 + * @param digits 数値型のとき,桁数を表す + * @param scale 数値型の時,スケールを表す + * @param flags 各種フラグ + * @param pic PIC文字列 + */ + public CobolFieldAttribute(int type, int digits, int scale, int flags, String pic) { + this.type = type; + this.digits = digits; + this.scale = scale; + this.flags = flags; + this.pic = pic; + } + + /** + * TODO: 準備中 + * + * @param other TODO: 準備中 + */ + public CobolFieldAttribute(CobolFieldAttribute other) { + this.type = other.type; + this.digits = other.digits; + this.scale = other.scale; + this.flags = other.flags; + this.pic = other.pic; + } + + /** + * 変数種別を取得する + * + * @return このオブジェクトの変数種別 + */ + public int getType() { + return type; + } + + /** + * 変数種別を取得する + * + * @param type このオブジェクトに設定する変数種別 + */ + public void setType(int type) { + this.type = type; + } + + /** + * 桁数を取得する + * + * @return このオブジェクトの桁数 + */ + public int getDigits() { + return digits; + } + + /** + * 桁数を設定する + * + * @param digits このオブジェクトに設定する桁数 + */ + public void setDigits(int digits) { + this.digits = digits; + } + + /** + * このオブジェクトのスケールを取得する + * + * @return このオブジェクトのスケール + */ + public int getScale() { + return scale; + } + + /** + * このオブジェクトのスケールを設定する + * + * @param scale このオブジェクトに設定するスケール + */ + public void setScale(int scale) { + this.scale = scale; + } + + /** + * このオブジェクトのフラグを設定する + * + * @return このオブジェクトのフラグ + */ + public int getFlags() { + return this.flags; + } + + /** + * このオブジェクトのフラグを設定する + * + * @param flags このオブジェクトに設定するフラグ + */ + public void setFlags(int flags) { + this.flags = flags; + } + + /** + * このオブジェクトのPICTURE文字列を取得する + * + * @return このオブジェクトのPICTURE文字列 + */ + public String getPic() { + return pic; + } + + /** + * このオブジェクトのPICTURE文字列を設定する + * + * @param pic このオブジェクトに設定するPICTURE文字列 + */ + public void setPic(String pic) { + this.pic = pic; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeUnknown() { + return type == COB_TYPE_UNKNOWN; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeGroup() { + return type == COB_TYPE_GROUP; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeBoolean() { + return type == COB_TYPE_BOOLEAN; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumeric() { + return (type & COB_TYPE_NUMERIC) > 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericDisplay() { + return type == COB_TYPE_NUMERIC_DISPLAY; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericBinary() { + return type == COB_TYPE_NUMERIC_BINARY; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericPacked() { + return type == COB_TYPE_NUMERIC_PACKED; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericFloat() { + return type == COB_TYPE_NUMERIC_FLOAT; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericDouble() { + return type == COB_TYPE_NUMERIC_DOUBLE; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNumericEdited() { + return type == COB_TYPE_NUMERIC_EDITED; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeAlphanum() { + return type == COB_TYPE_ALPHANUMERIC; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeAlphanumAll() { + return type == COB_TYPE_ALPHANUMERIC_ALL; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeAlphanumEdited() { + return type == COB_TYPE_ALPHANUMERIC_EDITED; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNational() { + return type == COB_TYPE_NATIONAL; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNationalEdited() { + return type == COB_TYPE_NATIONAL_EDITED; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isTypeNationalAll() { + return type == COB_TYPE_NATIONAL_ALL; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagHaveSign() { + return (flags & COB_FLAG_HAVE_SIGN) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagSignSeparate() { + return (flags & COB_FLAG_SIGN_SEPARATE) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagSignLeading() { + return (flags & COB_FLAG_SIGN_LEADING) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagBlankZero() { + return (flags & COB_FLAG_BLANK_ZERO) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagJustified() { + return (flags & COB_FLAG_JUSTIFIED) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagBinarySwap() { + return (flags & COB_FLAG_BINARY_SWAP) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagRealBinary() { + return (flags & COB_FLAG_REAL_BINARY) != 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public boolean isFlagIsPointer() { + return (flags & COB_FLAG_IS_POINTER) != 0; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java index 4621be0a..f341163d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java @@ -1,140 +1,141 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** AbstractCobolFieldのサブクラスを生成するためのメソッドを定義するクラス */ -public class CobolFieldFactory { - - /** - * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 - * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 - * - * @param size データを保存するバイト領域の大きさ - * @param str データを保存する領域に書き込まれる初期データ - * @param attr 変数の様々な情報を格納するインスタンス - * @return attrの値に応じてインスタンス化されたAbstractCobolField型のデータ - */ - public static AbstractCobolField makeCobolField(int size, String str, CobolFieldAttribute attr) { - return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(str), attr); - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param bytes TODO: 準備中 - * @param attr TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField makeCobolField( - int size, byte[] bytes, CobolFieldAttribute attr) { - return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(bytes), attr); - } - - /** - * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 - * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 - * - * @param size データを保存するバイト領域の大きさ - * @param data データを保存する領域 - * @param attr 変数の様々な情報を格納するインスタンス - * @return attrの値に応じてインスタンス化されたAbstractCobolField型のデータ - */ - public static AbstractCobolField makeCobolField( - int size, CobolDataStorage data, CobolFieldAttribute attr) { - switch (attr.getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC: - return new CobolNumericField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - return new CobolAlphanumericField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - return new CobolNumericPackedField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - return new CobolNumericBinaryField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NATIONAL: - return new CobolNationalField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_GROUP: - return new CobolGroupField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - return new CobolAlphanumericEditedField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - return new CobolNumericEditedField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - return new CobolNationalEditedField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL: - return new CobolAlphanumericAllField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NATIONAL_ALL: - return new CobolNationalAllField(size, data, attr); - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - return new CobolNumericDoubleField(size, data, attr); - default: - throw new CobolRuntimeException(0, "This data type is not implemented."); - } - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param data TODO: 準備中 - * @param attr TODO: 準備中 - * @return TODO: 準備中 - */ - public static AbstractCobolField makeCobolField( - long size, CobolDataStorage data, CobolFieldAttribute attr) { - return CobolFieldFactory.makeCobolField((int) size, data, attr); - } - - /** - * AbstractCobolFieldのインスタンスを生成する - * - * @param str 文字列データ - * @return strの値を保持するCobolAlphanumericFieldのインスタンス - */ - public static AbstractCobolField makeCobolField(String str) { - byte[] bytes; - try { - bytes = str.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return null; - } - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - return new CobolAlphanumericField(bytes.length, new CobolDataStorage(bytes), attr); - } - - /** - * CobolNumericFieldのインスタンスを生成する - * - * @param n int型整数値 - * @return nの値を保持するCobolNumericFieldのインスタンス - */ - public static AbstractCobolField makeCobolField(int n) { - int size = (int) (Math.log10(n) + 1); - byte[] bytes = new byte[size]; - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC, size, 0, 0, null); - AbstractCobolField field = new CobolNumericField(size, new CobolDataStorage(bytes), attr); - field.setInt(n); - return field; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** AbstractCobolFieldのサブクラスを生成するためのメソッドを定義するクラス */ +public class CobolFieldFactory { + + /** + * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 + * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 + * + * @param size データを保存するバイト領域の大きさ + * @param str データを保存する領域に書き込まれる初期データ + * @param attr 変数の様々な情報を格納するインスタンス + * @return attrの値に応じてインスタンス化されたAbstractCobolField型のデータ + */ + public static AbstractCobolField makeCobolField( + int size, String str, CobolFieldAttribute attr) { + return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(str), attr); + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param bytes TODO: 準備中 + * @param attr TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField makeCobolField( + int size, byte[] bytes, CobolFieldAttribute attr) { + return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(bytes), attr); + } + + /** + * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 + * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 + * + * @param size データを保存するバイト領域の大きさ + * @param data データを保存する領域 + * @param attr 変数の様々な情報を格納するインスタンス + * @return attrの値に応じてインスタンス化されたAbstractCobolField型のデータ + */ + public static AbstractCobolField makeCobolField( + int size, CobolDataStorage data, CobolFieldAttribute attr) { + switch (attr.getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC: + return new CobolNumericField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + return new CobolAlphanumericField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + return new CobolNumericPackedField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + return new CobolNumericBinaryField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NATIONAL: + return new CobolNationalField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_GROUP: + return new CobolGroupField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + return new CobolAlphanumericEditedField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + return new CobolNumericEditedField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + return new CobolNationalEditedField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL: + return new CobolAlphanumericAllField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NATIONAL_ALL: + return new CobolNationalAllField(size, data, attr); + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + return new CobolNumericDoubleField(size, data, attr); + default: + throw new CobolRuntimeException(0, "This data type is not implemented."); + } + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param data TODO: 準備中 + * @param attr TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField makeCobolField( + long size, CobolDataStorage data, CobolFieldAttribute attr) { + return CobolFieldFactory.makeCobolField((int) size, data, attr); + } + + /** + * AbstractCobolFieldのインスタンスを生成する + * + * @param str 文字列データ + * @return strの値を保持するCobolAlphanumericFieldのインスタンス + */ + public static AbstractCobolField makeCobolField(String str) { + byte[] bytes; + try { + bytes = str.getBytes("SJIS"); + } catch (UnsupportedEncodingException e) { + return null; + } + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + return new CobolAlphanumericField(bytes.length, new CobolDataStorage(bytes), attr); + } + + /** + * CobolNumericFieldのインスタンスを生成する + * + * @param n int型整数値 + * @return nの値を保持するCobolNumericFieldのインスタンス + */ + public static AbstractCobolField makeCobolField(int n) { + int size = (int) (Math.log10(n) + 1); + byte[] bytes = new byte[size]; + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC, size, 0, 0, null); + AbstractCobolField field = new CobolNumericField(size, new CobolDataStorage(bytes), attr); + field.setInt(n); + return field; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java index 95a60337..3ea6f26d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java @@ -25,90 +25,90 @@ /** 集団項目を扱う */ public class CobolGroupField extends AbstractCobolField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolGroupField(int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return dataStorage.getData(size); - } - - @Override - public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolGroupField(int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); } - } - - @Override - public int getInt() { - return 0; - } - - @Override - public CobolDecimal getDecimal() { - return null; - } - - @Override - public void setDecimal(BigDecimal decimal) {} - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; + + @Override + public byte[] getBytes() { + return dataStorage.getData(size); } - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - } + @Override + public String getString() { + try { + return new String(dataStorage.getData(), "SJIS"); + } catch (UnsupportedEncodingException e) { + return ""; + } + } - @Override - public void moveFrom(CobolDataStorage dataStorage) {} + @Override + public int getInt() { + return 0; + } - @Override - public void moveFrom(byte[] bytes) { - if (bytes.length >= this.size) { - this.dataStorage.setBytes(bytes, this.size); - } else { - this.dataStorage.setBytes(bytes, bytes.length); - this.dataStorage.fillBytes(bytes.length, (byte) 0x20, this.size); + @Override + public CobolDecimal getDecimal() { + return null; } - } - - @Override - public void moveFrom(String string) { - byte[] bytes; - try { - bytes = string.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return; + + @Override + public void setDecimal(BigDecimal decimal) {} + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); } - this.moveFrom(bytes); - } + @Override + public void moveFrom(CobolDataStorage dataStorage) {} + + @Override + public void moveFrom(byte[] bytes) { + if (bytes.length >= this.size) { + this.dataStorage.setBytes(bytes, this.size); + } else { + this.dataStorage.setBytes(bytes, bytes.length); + this.dataStorage.fillBytes(bytes.length, (byte) 0x20, this.size); + } + } + + @Override + public void moveFrom(String string) { + byte[] bytes; + try { + bytes = string.getBytes("SJIS"); + } catch (UnsupportedEncodingException e) { + return; + } - @Override - public void moveFrom(int number) {} + this.moveFrom(bytes); + } - @Override - public void moveFrom(double number) {} + @Override + public void moveFrom(int number) {} - @Override - public void moveFrom(BigDecimal number) {} + @Override + public void moveFrom(double number) {} - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalAllField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalAllField.java index 9315470e..c2cab3f1 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalAllField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalAllField.java @@ -1,34 +1,34 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -/** TODO: 準備中 */ -public class CobolNationalAllField extends CobolNationalField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNationalAllField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +/** TODO: 準備中 */ +public class CobolNationalAllField extends CobolNationalField { + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNationalAllField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java index b2cb726c..3ba8cb2a 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java @@ -1,151 +1,151 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; - -/** TODO: 準備中 */ -public class CobolNationalEditedField extends AbstractCobolField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNationalEditedField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return new byte[0]; - } - - @Override - public String getString() { - return null; - } - - @Override - public CobolDecimal getDecimal() { - return null; - } - - @Override - public void setDecimal(BigDecimal decimal) {} - - @Override - public int addPackedInt(int n) { - return 0; - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - this.moveAlphanumToNationalEdited(src1); - break; - } - } - - private void moveAlphanumToNationalEdited(AbstractCobolField src) { - CobolDataStorage srcd = src.getDataStorage(); - CobolDataStorage dstd = this.getDataStorage(); - int srcp = src.getFirstDataIndex(); - int dstp = 0; - int max = src.getFieldSize(); - dstd.memset((byte) ' ', this.getSize()); - - final int sizeOfInt = 4; - - byte[] picBytes = this.getAttribute().getPic().getBytes(); - for (int p = 0; p < picBytes.length; ) { - byte c = picBytes[p++]; - ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); - buf.order(ByteOrder.LITTLE_ENDIAN); - int n = buf.getInt(); - p += sizeOfInt; - for (; n > 0; --n) { - switch (c) { - case 'N': - if (srcp < max) { - dstd.setByte(dstp++, srcd.getByte(srcp++)); - dstd.setByte(dstp++, srcd.getByte(srcp++)); - } else { - dstd.memcpy(dstp, CobolConstant.ZENBLK, CobolConstant.ZENCSIZ); - dstp += CobolConstant.ZENCSIZ; - } - break; - case '/': - dstd.memcpy(dstp, CobolConstant.ZENSLAS, CobolConstant.ZENCSIZ); - dstp += CobolConstant.ZENCSIZ; - break; - case 'B': - dstd.memcpy(dstp, CobolConstant.ZENSPC, CobolConstant.ZENCSIZ); - dstp += CobolConstant.ZENCSIZ; - break; - case '0': - dstd.memcpy(dstp, CobolConstant.ZENZERO, CobolConstant.ZENCSIZ); - dstp += CobolConstant.ZENCSIZ; - break; - default: - dstd.setByte(dstp++, (byte) '?'); - break; - } - } - } - } - - @Override - public void moveFrom(CobolDataStorage dataStrage) {} - - @Override - public void moveFrom(byte[] bytes) {} - - @Override - public void moveFrom(String string) {} - - @Override - public void moveFrom(int number) {} - - @Override - public void moveFrom(double number) {} - - @Override - public void moveFrom(BigDecimal number) {} -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; + +/** TODO: 準備中 */ +public class CobolNationalEditedField extends AbstractCobolField { + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNationalEditedField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + return new byte[0]; + } + + @Override + public String getString() { + return null; + } + + @Override + public CobolDecimal getDecimal() { + return null; + } + + @Override + public void setDecimal(BigDecimal decimal) {} + + @Override + public int addPackedInt(int n) { + return 0; + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + this.moveAlphanumToNationalEdited(src1); + break; + } + } + + private void moveAlphanumToNationalEdited(AbstractCobolField src) { + CobolDataStorage srcd = src.getDataStorage(); + CobolDataStorage dstd = this.getDataStorage(); + int srcp = src.getFirstDataIndex(); + int dstp = 0; + int max = src.getFieldSize(); + dstd.memset((byte) ' ', this.getSize()); + + final int sizeOfInt = 4; + + byte[] picBytes = this.getAttribute().getPic().getBytes(); + for (int p = 0; p < picBytes.length; ) { + byte c = picBytes[p++]; + ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); + buf.order(ByteOrder.LITTLE_ENDIAN); + int n = buf.getInt(); + p += sizeOfInt; + for (; n > 0; --n) { + switch (c) { + case 'N': + if (srcp < max) { + dstd.setByte(dstp++, srcd.getByte(srcp++)); + dstd.setByte(dstp++, srcd.getByte(srcp++)); + } else { + dstd.memcpy(dstp, CobolConstant.ZENBLK, CobolConstant.ZENCSIZ); + dstp += CobolConstant.ZENCSIZ; + } + break; + case '/': + dstd.memcpy(dstp, CobolConstant.ZENSLAS, CobolConstant.ZENCSIZ); + dstp += CobolConstant.ZENCSIZ; + break; + case 'B': + dstd.memcpy(dstp, CobolConstant.ZENSPC, CobolConstant.ZENCSIZ); + dstp += CobolConstant.ZENCSIZ; + break; + case '0': + dstd.memcpy(dstp, CobolConstant.ZENZERO, CobolConstant.ZENCSIZ); + dstp += CobolConstant.ZENCSIZ; + break; + default: + dstd.setByte(dstp++, (byte) '?'); + break; + } + } + } + } + + @Override + public void moveFrom(CobolDataStorage dataStrage) {} + + @Override + public void moveFrom(byte[] bytes) {} + + @Override + public void moveFrom(String string) {} + + @Override + public void moveFrom(int number) {} + + @Override + public void moveFrom(double number) {} + + @Override + public void moveFrom(BigDecimal number) {} +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java index dff31984..1025e3ad 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java @@ -1,1086 +1,1089 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** PIC 文字列がN(5)やN(9)の変数を表現するクラス. */ -public class CobolNationalField extends AbstractCobolField { - - /** TODO: 準備中 */ - public static int workReturnSize; - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNationalField(int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return dataStorage.getData(size); - } - - @Override - public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } - } - - @Override - public int getInt() { - return 0; - } - - @Override - public CobolDecimal getDecimal() { - return null; - } - - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } - - @Override - public void moveFrom(AbstractCobolField src) { - - byte[] pTmp; - int size; - AbstractCobolField src2; - - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - // Convert Numeric - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - src1 = src1.getNumericField(); - break; - default: - break; - } - - // HANKAKU TO ZENKAKU - if (!src1.getAttribute().isTypeNational() && !src1.getAttribute().isTypeNationalEdited()) { - workReturnSize = 0; - pTmp = judge_hankakujpn_exist(src1); - size = workReturnSize; - CobolDataStorage pTmpStorage = new CobolDataStorage(size); - pTmpStorage.setBytes(pTmp, size); - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - src2 = new CobolAlphanumericField(size, pTmpStorage, attr); - } else { - src2 = src1; - } - - cob_move_from_alphanum(src2); - } - - /** - * CobolAlphanumericFieldからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void cob_move_from_alphanum(AbstractCobolField field) { - // TODO UTF8対応 - CobolDataStorage data1; - CobolDataStorage data2; - int size1; - int size2; - int len; - // TODO - final int cobZenCSiz = 2; - final byte[] cobZenBlk = {(byte) 0x81, (byte) 0x40}; - - data1 = field.getDataStorage(); - size1 = field.getSize(); - data2 = this.getDataStorage(); - size2 = this.getSize(); - - len = size2 - size1; - - if (size1 >= size2) { - /* move string with truncation */ - if (this.getAttribute().isFlagJustified()) { - data2.setBytes(data1, size2, 0, size1 - size2); - } else { - data2.setBytes(data1, size2); - } - } else { - data2.fillBytes((byte) 0x20, size2); - if (this.getAttribute().isFlagJustified()) { - for (int i = 0; i < len; i += cobZenCSiz) { - if (len - i >= cobZenCSiz) { - data2.setBytes(i, cobZenBlk, cobZenCSiz); - } - } - data2.getSubDataStorage(len).memcpy(data1, size1); - } else { - for (int i = 0; i < len; i += cobZenCSiz) { - if (len - i >= cobZenCSiz) { - data2.setBytes(i + size1, cobZenBlk, cobZenCSiz); - } - } - data2.setBytes(data1, size1); - } - } - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - * @return TODO: 準備中 - */ - public static byte[] judge_hankakujpn_exist(AbstractCobolField src) { - byte[] tmpZenJpnWord = null; - - if (src.getSize() <= 0) { - return null; - } - // TODO データのStrlenの差し替え - if (src.getDataStorage().getByte(0) != 0) { - tmpZenJpnWord = han2zen(src.getDataStorage().getData(), src.getSize()); - } - return tmpZenJpnWord; - } - - /** - * TODO: 準備中 - * - * @param str TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - public static byte[] han2zen(byte[] str, int size) { - byte[] buf; - - int c; - int d = (byte) 0x00; - int i, buIndex; - - buf = new byte[size * 2 + 1]; - - for (i = 0, buIndex = 0; i < size; i++) { - c = Byte.toUnsignedInt(str[i]); - switch (c) { - case 0x20: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x40; - buIndex += 2; - break; - case 0x21: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x49; - buIndex += 2; - break; - case 0x22: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x68; - buIndex += 2; - break; - case 0x23: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x94; - buIndex += 2; - break; - case 0x24: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x90; - buIndex += 2; - break; - case 0x25: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x93; - buIndex += 2; - break; - case 0x26: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x95; - buIndex += 2; - break; - case 0x27: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x66; - buIndex += 2; - break; - case 0x28: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x69; - buIndex += 2; - break; - case 0x29: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x6A; - buIndex += 2; - break; - case 0x2A: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x96; - buIndex += 2; - break; - case 0x2B: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x7B; - buIndex += 2; - break; - case 0x2C: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x43; - buIndex += 2; - break; - case 0x2D: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x7C; - buIndex += 2; - break; - case 0x2E: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x44; - buIndex += 2; - break; - case 0x2F: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x5E; - buIndex += 2; - break; - case 0x30: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x4F; - buIndex += 2; - break; - case 0x31: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x50; - buIndex += 2; - break; - case 0x32: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x51; - buIndex += 2; - break; - case 0x33: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x52; - buIndex += 2; - break; - case 0x34: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x53; - buIndex += 2; - break; - case 0x35: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x54; - buIndex += 2; - break; - case 0x36: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x55; - buIndex += 2; - break; - case 0x37: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x56; - buIndex += 2; - break; - case 0x38: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x57; - buIndex += 2; - break; - case 0x39: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x58; - buIndex += 2; - break; - case 0x3A: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x46; - buIndex += 2; - break; - case 0x3B: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x47; - buIndex += 2; - break; - case 0x3C: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x83; - buIndex += 2; - break; - case 0x3D: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x81; - buIndex += 2; - break; - case 0x3E: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x84; - buIndex += 2; - break; - case 0x3F: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x48; - buIndex += 2; - break; - case 0x40: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x97; - buIndex += 2; - break; - case 0x41: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x60; - buIndex += 2; - break; - case 0x42: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x61; - buIndex += 2; - break; - case 0x43: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x62; - buIndex += 2; - break; - case 0x44: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x63; - buIndex += 2; - break; - case 0x45: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x64; - buIndex += 2; - break; - case 0x46: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x65; - buIndex += 2; - break; - case 0x47: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x66; - buIndex += 2; - break; - case 0x48: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x67; - buIndex += 2; - break; - case 0x49: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x68; - buIndex += 2; - break; - case 0x4A: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x69; - buIndex += 2; - break; - case 0x4B: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6A; - buIndex += 2; - break; - case 0x4C: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6B; - buIndex += 2; - break; - case 0x4D: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6C; - buIndex += 2; - break; - case 0x4E: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6D; - buIndex += 2; - break; - case 0x4F: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6E; - buIndex += 2; - break; - case 0x50: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x6F; - buIndex += 2; - break; - case 0x51: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x70; - buIndex += 2; - break; - case 0x52: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x71; - buIndex += 2; - break; - case 0x53: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x72; - buIndex += 2; - break; - case 0x54: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x73; - buIndex += 2; - break; - case 0x55: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x74; - buIndex += 2; - break; - case 0x56: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x75; - buIndex += 2; - break; - case 0x57: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x76; - buIndex += 2; - break; - case 0x58: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x77; - buIndex += 2; - break; - case 0x59: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x78; - buIndex += 2; - break; - case 0x5A: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x79; - buIndex += 2; - break; - case 0x5B: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x6D; - buIndex += 2; - break; - case 0x5C: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x8F; - buIndex += 2; - break; - case 0x5D: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x6E; - buIndex += 2; - break; - case 0x5E: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x4F; - buIndex += 2; - break; - case 0x5F: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x51; - buIndex += 2; - break; - case 0x60: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x65; - buIndex += 2; - break; - case 0x61: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x81; - buIndex += 2; - break; - case 0x62: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x82; - buIndex += 2; - break; - case 0x63: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x83; - buIndex += 2; - break; - case 0x64: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x84; - buIndex += 2; - break; - case 0x65: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x85; - buIndex += 2; - break; - case 0x66: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x86; - buIndex += 2; - break; - case 0x67: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x87; - buIndex += 2; - break; - case 0x68: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x88; - buIndex += 2; - break; - case 0x69: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x89; - buIndex += 2; - break; - case 0x6A: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8A; - buIndex += 2; - break; - case 0x6B: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8B; - buIndex += 2; - break; - case 0x6C: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8C; - buIndex += 2; - break; - case 0x6D: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8D; - buIndex += 2; - break; - case 0x6E: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8E; - buIndex += 2; - break; - case 0x6F: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x8F; - buIndex += 2; - break; - case 0x70: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x90; - buIndex += 2; - break; - case 0x71: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x91; - buIndex += 2; - break; - case 0x72: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x92; - buIndex += 2; - break; - case 0x73: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x93; - buIndex += 2; - break; - case 0x74: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x94; - buIndex += 2; - break; - case 0x75: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x95; - buIndex += 2; - break; - case 0x76: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x96; - buIndex += 2; - break; - case 0x77: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x97; - buIndex += 2; - break; - case 0x78: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x98; - buIndex += 2; - break; - case 0x79: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x99; - buIndex += 2; - break; - case 0x7A: - buf[buIndex] = (byte) 0x82; - buf[buIndex + 1] = (byte) 0x9A; - buIndex += 2; - break; - case 0x7B: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x6F; - buIndex += 2; - break; - case 0x7C: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x62; - buIndex += 2; - break; - case 0x7D: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x70; - buIndex += 2; - break; - case 0x7E: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x60; - buIndex += 2; - break; - case 0xA1: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x42; - buIndex += 2; - break; - case 0xA2: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x75; - buIndex += 2; - break; - case 0xA3: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x76; - buIndex += 2; - break; - case 0xA4: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x41; - buIndex += 2; - break; - case 0xA5: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x45; - buIndex += 2; - break; - case 0xA6: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x92; - buIndex += 2; - break; - case 0xA7: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x40; - buIndex += 2; - break; - case 0xA8: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x42; - buIndex += 2; - break; - case 0xA9: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x44; - buIndex += 2; - break; - case 0xAA: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x46; - buIndex += 2; - break; - case 0xAB: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x48; - buIndex += 2; - break; - case 0xAC: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x83; - buIndex += 2; - break; - case 0xAD: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x85; - buIndex += 2; - break; - case 0xAE: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x87; - buIndex += 2; - break; - case 0xAF: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x62; - buIndex += 2; - break; - case 0xB0: - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x5B; - buIndex += 2; - break; - case 0xB1: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x41; - buIndex += 2; - break; - case 0xB2: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x43; - buIndex += 2; - break; - case 0xB3: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x45; - buIndex += 2; - break; - case 0xB4: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x47; - buIndex += 2; - break; - case 0xB5: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x49; - buIndex += 2; - break; - case 0xB6: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x4A; - buIndex += 2; - break; - case 0xB7: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x4C; - buIndex += 2; - break; - case 0xB8: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x4E; - buIndex += 2; - break; - case 0xB9: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x50; - buIndex += 2; - break; - case 0xBA: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x52; - buIndex += 2; - break; - case 0xBB: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x54; - buIndex += 2; - break; - case 0xBC: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x56; - buIndex += 2; - break; - case 0xBD: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x58; - buIndex += 2; - break; - case 0xBE: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x5A; - buIndex += 2; - break; - case 0xBF: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x5C; - buIndex += 2; - break; - case 0xC0: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x5E; - buIndex += 2; - break; - case 0xC1: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x60; - buIndex += 2; - break; - case 0xC2: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x63; - buIndex += 2; - break; - case 0xC3: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x65; - buIndex += 2; - break; - case 0xC4: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x67; - buIndex += 2; - break; - case 0xC5: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x69; - buIndex += 2; - break; - case 0xC6: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x6A; - buIndex += 2; - break; - case 0xC7: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x6B; - buIndex += 2; - break; - case 0xC8: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x6C; - buIndex += 2; - break; - case 0xC9: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x6D; - buIndex += 2; - break; - case 0xCA: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x6E; - buIndex += 2; - break; - case 0xCB: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x71; - buIndex += 2; - break; - case 0xCC: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x74; - buIndex += 2; - break; - case 0xCD: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x77; - buIndex += 2; - break; - case 0xCE: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x7A; - buIndex += 2; - break; - case 0xCF: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x7D; - buIndex += 2; - break; - case 0xD0: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x7E; - buIndex += 2; - break; - case 0xD1: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x80; - buIndex += 2; - break; - case 0xD2: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x81; - buIndex += 2; - break; - case 0xD3: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x82; - buIndex += 2; - break; - case 0xD4: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x84; - buIndex += 2; - break; - case 0xD5: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x86; - buIndex += 2; - break; - case 0xD6: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x88; - buIndex += 2; - break; - case 0xD7: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x89; - buIndex += 2; - break; - case 0xD8: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x8A; - buIndex += 2; - break; - case 0xD9: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x8B; - buIndex += 2; - break; - case 0xDA: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x8C; - buIndex += 2; - break; - case 0xDB: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x8D; - buIndex += 2; - break; - case 0xDC: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x8F; - buIndex += 2; - break; - case 0xDD: - buf[buIndex] = (byte) 0x83; - buf[buIndex + 1] = (byte) 0x93; - buIndex += 2; - break; - case 0xDE: - /* Dakuten */ - if ((d >= 0xB6 && d <= 0xC4) || (d >= 0xCA && d <= 0xCE)) { - buf[buIndex - 1]++; - } else if (d == 0xB3) { - buf[buIndex - 1] = (byte) 0x94; - } else { - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x4A; - buIndex += 2; - } - break; - case 0xDF: - /* Han-dakuten */ - if (d >= 0xCA && d <= 0xCE) { - buf[buIndex - 1] += 2; - } else { - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x4B; - buIndex += 2; - } - break; - case 0: - case 255: - buf[buIndex] = (byte) c; - buIndex++; - buf[buIndex] = (byte) c; - buIndex++; - if (i + 1 < size) { - if (str[i + 1] == str[i]) { - i++; - } - } - break; - default: - if ((byte) 0 < c && c < (byte) 0x20) { - // #define COB_SJSPC "\x81\x40" - buf[buIndex] = (byte) 0x81; - buf[buIndex + 1] = (byte) 0x40; - buIndex += 2; - } else { - buf[buIndex] = str[i]; - buIndex++; - i++; - buf[buIndex] = str[i]; - buIndex++; - } - break; - } - d = c; - } - buf[buIndex] = (byte) 0x00; - workReturnSize = buIndex; - return buf; - } - - @Override - public void moveFrom(CobolDataStorage dataStorage) {} - - @Override - public void moveFrom(byte[] bytes) { - dataStorage.setBytes(bytes); - } - - @Override - public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - CobolDataStorage data = new CobolDataStorage(bytes); - CobolFieldAttribute a = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); - this.moveFrom(f); - } catch (UnsupportedEncodingException e) { - return; - } - } - - @Override - public void moveFrom(int number) {} - - @Override - public void moveFrom(double number) {} - - @Override - public void moveFrom(BigDecimal number) {} - - @Override - public void setDecimal(BigDecimal decimal) {} - - @Override - public CobolNumericField getNumericField() { - int size = this.getSize() / 2; - int scale = this.getAttribute().getScale(); - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(size); - CobolNumericField field = new CobolNumericField(size, data, attr); - field.moveFrom(this); - return field; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** PIC 文字列がN(5)やN(9)の変数を表現するクラス. */ +public class CobolNationalField extends AbstractCobolField { + + /** TODO: 準備中 */ + public static int workReturnSize; + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNationalField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + return dataStorage.getData(size); + } + + @Override + public String getString() { + try { + return new String(dataStorage.getData(), "SJIS"); + } catch (UnsupportedEncodingException e) { + return ""; + } + } + + @Override + public int getInt() { + return 0; + } + + @Override + public CobolDecimal getDecimal() { + return null; + } + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } + + @Override + public void moveFrom(AbstractCobolField src) { + + byte[] pTmp; + int size; + AbstractCobolField src2; + + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + // Convert Numeric + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + src1 = src1.getNumericField(); + break; + default: + break; + } + + // HANKAKU TO ZENKAKU + if (!src1.getAttribute().isTypeNational() && !src1.getAttribute().isTypeNationalEdited()) { + workReturnSize = 0; + pTmp = judge_hankakujpn_exist(src1); + size = workReturnSize; + CobolDataStorage pTmpStorage = new CobolDataStorage(size); + pTmpStorage.setBytes(pTmp, size); + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + src2 = new CobolAlphanumericField(size, pTmpStorage, attr); + } else { + src2 = src1; + } + + cob_move_from_alphanum(src2); + } + + /** + * CobolAlphanumericFieldからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void cob_move_from_alphanum(AbstractCobolField field) { + // TODO UTF8対応 + CobolDataStorage data1; + CobolDataStorage data2; + int size1; + int size2; + int len; + // TODO + final int cobZenCSiz = 2; + final byte[] cobZenBlk = {(byte) 0x81, (byte) 0x40}; + + data1 = field.getDataStorage(); + size1 = field.getSize(); + data2 = this.getDataStorage(); + size2 = this.getSize(); + + len = size2 - size1; + + if (size1 >= size2) { + /* move string with truncation */ + if (this.getAttribute().isFlagJustified()) { + data2.setBytes(data1, size2, 0, size1 - size2); + } else { + data2.setBytes(data1, size2); + } + } else { + data2.fillBytes((byte) 0x20, size2); + if (this.getAttribute().isFlagJustified()) { + for (int i = 0; i < len; i += cobZenCSiz) { + if (len - i >= cobZenCSiz) { + data2.setBytes(i, cobZenBlk, cobZenCSiz); + } + } + data2.getSubDataStorage(len).memcpy(data1, size1); + } else { + for (int i = 0; i < len; i += cobZenCSiz) { + if (len - i >= cobZenCSiz) { + data2.setBytes(i + size1, cobZenBlk, cobZenCSiz); + } + } + data2.setBytes(data1, size1); + } + } + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + * @return TODO: 準備中 + */ + public static byte[] judge_hankakujpn_exist(AbstractCobolField src) { + byte[] tmpZenJpnWord = null; + + if (src.getSize() <= 0) { + return null; + } + // TODO データのStrlenの差し替え + if (src.getDataStorage().getByte(0) != 0) { + tmpZenJpnWord = han2zen(src.getDataStorage().getData(), src.getSize()); + } + return tmpZenJpnWord; + } + + /** + * TODO: 準備中 + * + * @param str TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + public static byte[] han2zen(byte[] str, int size) { + byte[] buf; + + int c; + int d = (byte) 0x00; + int i, buIndex; + + buf = new byte[size * 2 + 1]; + + for (i = 0, buIndex = 0; i < size; i++) { + c = Byte.toUnsignedInt(str[i]); + switch (c) { + case 0x20: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x40; + buIndex += 2; + break; + case 0x21: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x49; + buIndex += 2; + break; + case 0x22: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x68; + buIndex += 2; + break; + case 0x23: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x94; + buIndex += 2; + break; + case 0x24: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x90; + buIndex += 2; + break; + case 0x25: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x93; + buIndex += 2; + break; + case 0x26: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x95; + buIndex += 2; + break; + case 0x27: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x66; + buIndex += 2; + break; + case 0x28: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x69; + buIndex += 2; + break; + case 0x29: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x6A; + buIndex += 2; + break; + case 0x2A: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x96; + buIndex += 2; + break; + case 0x2B: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x7B; + buIndex += 2; + break; + case 0x2C: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x43; + buIndex += 2; + break; + case 0x2D: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x7C; + buIndex += 2; + break; + case 0x2E: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x44; + buIndex += 2; + break; + case 0x2F: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x5E; + buIndex += 2; + break; + case 0x30: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x4F; + buIndex += 2; + break; + case 0x31: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x50; + buIndex += 2; + break; + case 0x32: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x51; + buIndex += 2; + break; + case 0x33: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x52; + buIndex += 2; + break; + case 0x34: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x53; + buIndex += 2; + break; + case 0x35: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x54; + buIndex += 2; + break; + case 0x36: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x55; + buIndex += 2; + break; + case 0x37: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x56; + buIndex += 2; + break; + case 0x38: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x57; + buIndex += 2; + break; + case 0x39: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x58; + buIndex += 2; + break; + case 0x3A: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x46; + buIndex += 2; + break; + case 0x3B: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x47; + buIndex += 2; + break; + case 0x3C: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x83; + buIndex += 2; + break; + case 0x3D: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x81; + buIndex += 2; + break; + case 0x3E: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x84; + buIndex += 2; + break; + case 0x3F: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x48; + buIndex += 2; + break; + case 0x40: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x97; + buIndex += 2; + break; + case 0x41: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x60; + buIndex += 2; + break; + case 0x42: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x61; + buIndex += 2; + break; + case 0x43: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x62; + buIndex += 2; + break; + case 0x44: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x63; + buIndex += 2; + break; + case 0x45: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x64; + buIndex += 2; + break; + case 0x46: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x65; + buIndex += 2; + break; + case 0x47: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x66; + buIndex += 2; + break; + case 0x48: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x67; + buIndex += 2; + break; + case 0x49: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x68; + buIndex += 2; + break; + case 0x4A: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x69; + buIndex += 2; + break; + case 0x4B: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6A; + buIndex += 2; + break; + case 0x4C: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6B; + buIndex += 2; + break; + case 0x4D: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6C; + buIndex += 2; + break; + case 0x4E: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6D; + buIndex += 2; + break; + case 0x4F: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6E; + buIndex += 2; + break; + case 0x50: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x6F; + buIndex += 2; + break; + case 0x51: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x70; + buIndex += 2; + break; + case 0x52: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x71; + buIndex += 2; + break; + case 0x53: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x72; + buIndex += 2; + break; + case 0x54: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x73; + buIndex += 2; + break; + case 0x55: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x74; + buIndex += 2; + break; + case 0x56: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x75; + buIndex += 2; + break; + case 0x57: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x76; + buIndex += 2; + break; + case 0x58: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x77; + buIndex += 2; + break; + case 0x59: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x78; + buIndex += 2; + break; + case 0x5A: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x79; + buIndex += 2; + break; + case 0x5B: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x6D; + buIndex += 2; + break; + case 0x5C: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x8F; + buIndex += 2; + break; + case 0x5D: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x6E; + buIndex += 2; + break; + case 0x5E: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x4F; + buIndex += 2; + break; + case 0x5F: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x51; + buIndex += 2; + break; + case 0x60: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x65; + buIndex += 2; + break; + case 0x61: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x81; + buIndex += 2; + break; + case 0x62: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x82; + buIndex += 2; + break; + case 0x63: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x83; + buIndex += 2; + break; + case 0x64: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x84; + buIndex += 2; + break; + case 0x65: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x85; + buIndex += 2; + break; + case 0x66: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x86; + buIndex += 2; + break; + case 0x67: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x87; + buIndex += 2; + break; + case 0x68: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x88; + buIndex += 2; + break; + case 0x69: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x89; + buIndex += 2; + break; + case 0x6A: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8A; + buIndex += 2; + break; + case 0x6B: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8B; + buIndex += 2; + break; + case 0x6C: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8C; + buIndex += 2; + break; + case 0x6D: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8D; + buIndex += 2; + break; + case 0x6E: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8E; + buIndex += 2; + break; + case 0x6F: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x8F; + buIndex += 2; + break; + case 0x70: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x90; + buIndex += 2; + break; + case 0x71: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x91; + buIndex += 2; + break; + case 0x72: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x92; + buIndex += 2; + break; + case 0x73: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x93; + buIndex += 2; + break; + case 0x74: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x94; + buIndex += 2; + break; + case 0x75: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x95; + buIndex += 2; + break; + case 0x76: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x96; + buIndex += 2; + break; + case 0x77: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x97; + buIndex += 2; + break; + case 0x78: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x98; + buIndex += 2; + break; + case 0x79: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x99; + buIndex += 2; + break; + case 0x7A: + buf[buIndex] = (byte) 0x82; + buf[buIndex + 1] = (byte) 0x9A; + buIndex += 2; + break; + case 0x7B: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x6F; + buIndex += 2; + break; + case 0x7C: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x62; + buIndex += 2; + break; + case 0x7D: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x70; + buIndex += 2; + break; + case 0x7E: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x60; + buIndex += 2; + break; + case 0xA1: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x42; + buIndex += 2; + break; + case 0xA2: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x75; + buIndex += 2; + break; + case 0xA3: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x76; + buIndex += 2; + break; + case 0xA4: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x41; + buIndex += 2; + break; + case 0xA5: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x45; + buIndex += 2; + break; + case 0xA6: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x92; + buIndex += 2; + break; + case 0xA7: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x40; + buIndex += 2; + break; + case 0xA8: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x42; + buIndex += 2; + break; + case 0xA9: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x44; + buIndex += 2; + break; + case 0xAA: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x46; + buIndex += 2; + break; + case 0xAB: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x48; + buIndex += 2; + break; + case 0xAC: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x83; + buIndex += 2; + break; + case 0xAD: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x85; + buIndex += 2; + break; + case 0xAE: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x87; + buIndex += 2; + break; + case 0xAF: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x62; + buIndex += 2; + break; + case 0xB0: + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x5B; + buIndex += 2; + break; + case 0xB1: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x41; + buIndex += 2; + break; + case 0xB2: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x43; + buIndex += 2; + break; + case 0xB3: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x45; + buIndex += 2; + break; + case 0xB4: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x47; + buIndex += 2; + break; + case 0xB5: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x49; + buIndex += 2; + break; + case 0xB6: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x4A; + buIndex += 2; + break; + case 0xB7: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x4C; + buIndex += 2; + break; + case 0xB8: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x4E; + buIndex += 2; + break; + case 0xB9: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x50; + buIndex += 2; + break; + case 0xBA: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x52; + buIndex += 2; + break; + case 0xBB: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x54; + buIndex += 2; + break; + case 0xBC: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x56; + buIndex += 2; + break; + case 0xBD: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x58; + buIndex += 2; + break; + case 0xBE: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x5A; + buIndex += 2; + break; + case 0xBF: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x5C; + buIndex += 2; + break; + case 0xC0: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x5E; + buIndex += 2; + break; + case 0xC1: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x60; + buIndex += 2; + break; + case 0xC2: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x63; + buIndex += 2; + break; + case 0xC3: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x65; + buIndex += 2; + break; + case 0xC4: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x67; + buIndex += 2; + break; + case 0xC5: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x69; + buIndex += 2; + break; + case 0xC6: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x6A; + buIndex += 2; + break; + case 0xC7: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x6B; + buIndex += 2; + break; + case 0xC8: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x6C; + buIndex += 2; + break; + case 0xC9: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x6D; + buIndex += 2; + break; + case 0xCA: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x6E; + buIndex += 2; + break; + case 0xCB: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x71; + buIndex += 2; + break; + case 0xCC: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x74; + buIndex += 2; + break; + case 0xCD: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x77; + buIndex += 2; + break; + case 0xCE: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x7A; + buIndex += 2; + break; + case 0xCF: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x7D; + buIndex += 2; + break; + case 0xD0: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x7E; + buIndex += 2; + break; + case 0xD1: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x80; + buIndex += 2; + break; + case 0xD2: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x81; + buIndex += 2; + break; + case 0xD3: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x82; + buIndex += 2; + break; + case 0xD4: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x84; + buIndex += 2; + break; + case 0xD5: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x86; + buIndex += 2; + break; + case 0xD6: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x88; + buIndex += 2; + break; + case 0xD7: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x89; + buIndex += 2; + break; + case 0xD8: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x8A; + buIndex += 2; + break; + case 0xD9: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x8B; + buIndex += 2; + break; + case 0xDA: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x8C; + buIndex += 2; + break; + case 0xDB: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x8D; + buIndex += 2; + break; + case 0xDC: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x8F; + buIndex += 2; + break; + case 0xDD: + buf[buIndex] = (byte) 0x83; + buf[buIndex + 1] = (byte) 0x93; + buIndex += 2; + break; + case 0xDE: + /* Dakuten */ + if ((d >= 0xB6 && d <= 0xC4) || (d >= 0xCA && d <= 0xCE)) { + buf[buIndex - 1]++; + } else if (d == 0xB3) { + buf[buIndex - 1] = (byte) 0x94; + } else { + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x4A; + buIndex += 2; + } + break; + case 0xDF: + /* Han-dakuten */ + if (d >= 0xCA && d <= 0xCE) { + buf[buIndex - 1] += 2; + } else { + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x4B; + buIndex += 2; + } + break; + case 0: + case 255: + buf[buIndex] = (byte) c; + buIndex++; + buf[buIndex] = (byte) c; + buIndex++; + if (i + 1 < size) { + if (str[i + 1] == str[i]) { + i++; + } + } + break; + default: + if ((byte) 0 < c && c < (byte) 0x20) { + // #define COB_SJSPC "\x81\x40" + buf[buIndex] = (byte) 0x81; + buf[buIndex + 1] = (byte) 0x40; + buIndex += 2; + } else { + buf[buIndex] = str[i]; + buIndex++; + i++; + buf[buIndex] = str[i]; + buIndex++; + } + break; + } + d = c; + } + buf[buIndex] = (byte) 0x00; + workReturnSize = buIndex; + return buf; + } + + @Override + public void moveFrom(CobolDataStorage dataStorage) {} + + @Override + public void moveFrom(byte[] bytes) { + dataStorage.setBytes(bytes); + } + + @Override + public void moveFrom(String string) { + try { + byte[] bytes = string.getBytes("SJIS"); + CobolDataStorage data = new CobolDataStorage(bytes); + CobolFieldAttribute a = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); + this.moveFrom(f); + } catch (UnsupportedEncodingException e) { + return; + } + } + + @Override + public void moveFrom(int number) {} + + @Override + public void moveFrom(double number) {} + + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public void setDecimal(BigDecimal decimal) {} + + @Override + public CobolNumericField getNumericField() { + int size = this.getSize() / 2; + int scale = this.getAttribute().getScale(); + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(size); + CobolNumericField field = new CobolNumericField(size, data, attr); + field.moveFrom(this); + return field; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericBinaryField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericBinaryField.java index a4e8c553..4038b79d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericBinaryField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericBinaryField.java @@ -1,271 +1,271 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** TODO: 準備中 */ -public class CobolNumericBinaryField extends AbstractCobolField { - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNumericBinaryField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return new byte[0]; - } - - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } - - private long getBinaryValue() { - CobolDataStorage storage = this.getDataStorage(); - if (this.size == 1) { - return storage.getByte(0); - } else if (this.size == 2) { - return storage.shortValue(); - } else if (this.size == 4) { - return storage.intValue(); - } else { - return storage.longValue(); - } - } - - private void setBinaryValue(long n) { - CobolDataStorage storage = this.getDataStorage(); - if (this.size == 1) { - storage.setByte(0, (byte) n); - } else if (this.size == 2) { - storage.set((short) n); - } else if (this.size == 4) { - storage.set((int) n); - } else { - storage.set((long) n); - } - } - - @Override - public long getLongValue() { - return this.getBinaryValue(); - } - - /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - */ - public void setLongValue(long n) { - this.setBinaryValue(n); - } - - @Override - public String getString() { - CobolFieldAttribute thisAttr = this.getAttribute(); - int flag = thisAttr.isFlagHaveSign() ? CobolFieldAttribute.COB_FLAG_HAVE_SIGN : 0; - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC, - thisAttr.getDigits(), - thisAttr.getScale(), - flag, - thisAttr.getPic()); - CobolDataStorage storage = new CobolDataStorage(thisAttr.getDigits()); - CobolNumericField numericField = new CobolNumericField(thisAttr.getDigits(), storage, attr); - numericField.moveFrom(this); - return numericField.getString(); - } - - @Override - public int getSign() { - long n = this.getBinaryValue(); - - if (n < 0) { - return -1; - } else if (n > 0) { - return 1; - } else { - return 0; - } - } - - @Override - public void setDecimal(BigDecimal decimal) {} - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - this.moveDisplayToBinary(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - throw new CobolRuntimeException(0, "未実装"); - } - } - - /** - * CobolNumericFieldからからthisへの代入 - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void moveDisplayToBinary(AbstractCobolField field) { - int size1 = field.getFieldSize(); - int data1Index = field.getFirstDataIndex(); - int sign = field.getSign(); - - CobolDataStorage data1 = field.getDataStorage(); - CobolDataStorage data2 = this.getDataStorage(); - - boolean flagNull = true; - for (int i = 0; i < size1; ++i) { - if (data1.getByte(data1Index + i) != 0) { - flagNull = false; - } - } - if (flagNull) { - for (int i = 0; i < this.getSize(); ++i) { - data2.setByte(i, (byte) 0); - } - } - - int size = size1 - field.getAttribute().getScale() + this.getAttribute().getScale(); - long val = 0; - for (int i = 0; i < size; ++i) { - if (i < size1) { - byte x = data1.getByte(data1Index + i); - x = (byte) (x >= (byte) 0x70 ? x - (byte) 0x70 : x - (byte) 0x30); - val = val * 10 + x; - } else { - val = val * 10; - } - } - - if (sign < 0 && this.getAttribute().isFlagHaveSign()) { - val = -val; - } - - if (CobolModule.getCurrentModule().flag_binary_truncate != 0 - && !this.getAttribute().isFlagRealBinary()) { - val %= CobolConstant.exp10LL[this.getAttribute().getDigits()]; - } - - this.setBinaryValue(val); - field.putSign(sign); - } - - @Override - public void moveFrom(CobolDataStorage dataStorage) {} - - @Override - public void moveFrom(byte[] bytes) {} - - @Override - public void moveFrom(String string) {} - - @Override - public void moveFrom(int number) { - this.getDataStorage().setSwpU32Binary(number); - } - - @Override - public void moveFrom(double number) {} - - @Override - public void moveFrom(BigDecimal number) {} - - @Override - public CobolNumericField getNumericField() { - int size = this.getAttribute().getDigits(); - int scale = this.getAttribute().getScale(); - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(this.getAttribute().getDigits()); - CobolNumericField field = new CobolNumericField(size, data, attr); - field.moveFrom(this); - return field; - } - - @Override - public CobolDecimal getDecimal() { - CobolDecimal decimal = new CobolDecimal(); - decimal.setValue(new BigDecimal(this.getBinaryValue())); - decimal.setScale(this.getAttribute().getScale()); - return decimal; - } - - // libcob/numeric.cのcob_binary_get_int64の実装 - private long binaryGetInt64() { - int fsiz = 8 - this.getSize(); - long n = 0; - byte[] nBytes = ByteBuffer.allocate(8).putLong(n).array(); - CobolDataStorage nStorage = new CobolDataStorage(nBytes); - if (this.getAttribute().isFlagHaveSign()) { - CobolDecimal.numByteMemcpy(nStorage, 0, this.getDataStorage(), 0, this.getSize()); - n = ByteBuffer.wrap(nStorage.getByteArray(0, 8)).getLong(); - n >>>= 8 * fsiz; - } else { - CobolDecimal.numByteMemcpy(nStorage, fsiz, this.getDataStorage(), 0, this.getSize()); - n = ByteBuffer.wrap(nStorage.getByteArray(0, 8)).getLong(); - } - return n; - } - - @Override - public long getLong() { - return this.binaryGetInt64(); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** TODO: 準備中 */ +public class CobolNumericBinaryField extends AbstractCobolField { + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNumericBinaryField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + return new byte[0]; + } + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } + + private long getBinaryValue() { + CobolDataStorage storage = this.getDataStorage(); + if (this.size == 1) { + return storage.getByte(0); + } else if (this.size == 2) { + return storage.shortValue(); + } else if (this.size == 4) { + return storage.intValue(); + } else { + return storage.longValue(); + } + } + + private void setBinaryValue(long n) { + CobolDataStorage storage = this.getDataStorage(); + if (this.size == 1) { + storage.setByte(0, (byte) n); + } else if (this.size == 2) { + storage.set((short) n); + } else if (this.size == 4) { + storage.set((int) n); + } else { + storage.set((long) n); + } + } + + @Override + public long getLongValue() { + return this.getBinaryValue(); + } + + /** + * TODO: 準備中 + * + * @param n TODO: 準備中 + */ + public void setLongValue(long n) { + this.setBinaryValue(n); + } + + @Override + public String getString() { + CobolFieldAttribute thisAttr = this.getAttribute(); + int flag = thisAttr.isFlagHaveSign() ? CobolFieldAttribute.COB_FLAG_HAVE_SIGN : 0; + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC, + thisAttr.getDigits(), + thisAttr.getScale(), + flag, + thisAttr.getPic()); + CobolDataStorage storage = new CobolDataStorage(thisAttr.getDigits()); + CobolNumericField numericField = new CobolNumericField(thisAttr.getDigits(), storage, attr); + numericField.moveFrom(this); + return numericField.getString(); + } + + @Override + public int getSign() { + long n = this.getBinaryValue(); + + if (n < 0) { + return -1; + } else if (n > 0) { + return 1; + } else { + return 0; + } + } + + @Override + public void setDecimal(BigDecimal decimal) {} + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + this.moveDisplayToBinary(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + throw new CobolRuntimeException(0, "未実装"); + } + } + + /** + * CobolNumericFieldからからthisへの代入 + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void moveDisplayToBinary(AbstractCobolField field) { + int size1 = field.getFieldSize(); + int data1Index = field.getFirstDataIndex(); + int sign = field.getSign(); + + CobolDataStorage data1 = field.getDataStorage(); + CobolDataStorage data2 = this.getDataStorage(); + + boolean flagNull = true; + for (int i = 0; i < size1; ++i) { + if (data1.getByte(data1Index + i) != 0) { + flagNull = false; + } + } + if (flagNull) { + for (int i = 0; i < this.getSize(); ++i) { + data2.setByte(i, (byte) 0); + } + } + + int size = size1 - field.getAttribute().getScale() + this.getAttribute().getScale(); + long val = 0; + for (int i = 0; i < size; ++i) { + if (i < size1) { + byte x = data1.getByte(data1Index + i); + x = (byte) (x >= (byte) 0x70 ? x - (byte) 0x70 : x - (byte) 0x30); + val = val * 10 + x; + } else { + val = val * 10; + } + } + + if (sign < 0 && this.getAttribute().isFlagHaveSign()) { + val = -val; + } + + if (CobolModule.getCurrentModule().flag_binary_truncate != 0 + && !this.getAttribute().isFlagRealBinary()) { + val %= CobolConstant.exp10LL[this.getAttribute().getDigits()]; + } + + this.setBinaryValue(val); + field.putSign(sign); + } + + @Override + public void moveFrom(CobolDataStorage dataStorage) {} + + @Override + public void moveFrom(byte[] bytes) {} + + @Override + public void moveFrom(String string) {} + + @Override + public void moveFrom(int number) { + this.getDataStorage().setSwpU32Binary(number); + } + + @Override + public void moveFrom(double number) {} + + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public CobolNumericField getNumericField() { + int size = this.getAttribute().getDigits(); + int scale = this.getAttribute().getScale(); + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(this.getAttribute().getDigits()); + CobolNumericField field = new CobolNumericField(size, data, attr); + field.moveFrom(this); + return field; + } + + @Override + public CobolDecimal getDecimal() { + CobolDecimal decimal = new CobolDecimal(); + decimal.setValue(new BigDecimal(this.getBinaryValue())); + decimal.setScale(this.getAttribute().getScale()); + return decimal; + } + + // libcob/numeric.cのcob_binary_get_int64の実装 + private long binaryGetInt64() { + int fsiz = 8 - this.getSize(); + long n = 0; + byte[] nBytes = ByteBuffer.allocate(8).putLong(n).array(); + CobolDataStorage nStorage = new CobolDataStorage(nBytes); + if (this.getAttribute().isFlagHaveSign()) { + CobolDecimal.numByteMemcpy(nStorage, 0, this.getDataStorage(), 0, this.getSize()); + n = ByteBuffer.wrap(nStorage.getByteArray(0, 8)).getLong(); + n >>>= 8 * fsiz; + } else { + CobolDecimal.numByteMemcpy(nStorage, fsiz, this.getDataStorage(), 0, this.getSize()); + n = ByteBuffer.wrap(nStorage.getByteArray(0, 8)).getLong(); + } + return n; + } + + @Override + public long getLong() { + return this.binaryGetInt64(); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericDoubleField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericDoubleField.java index af26db19..31c57c10 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericDoubleField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericDoubleField.java @@ -1,186 +1,186 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** TODO: 準備中 */ -public class CobolNumericDoubleField extends AbstractCobolField { - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - * @param dataStorage TODO: 準備中 - * @param attribute TODO: 準備中 - */ - public CobolNumericDoubleField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - private double getBinaryValue() { - CobolDataStorage storage = this.getDataStorage(); - return storage.doubleValue(); - } - - @Override - public byte[] getBytes() { - return new byte[0]; - } - - @Override - public String getString() { - return String.format("%.18f", this.getDouble()); - } - - @Override - public int getSign() { - double n = this.getBinaryValue(); - - if (n < 0) { - return -1; - } else if (n > 0) { - return 1; - } else { - return 0; - } - } - - @Override - public double getDouble() { - return this.getBinaryValue(); - } - - @Override - public void setDecimal(BigDecimal decimal) { - // TODO Auto-generated method stub - } - - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - this.moveDisplayToDouble(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - throw new CobolRuntimeException(0, "未実装"); - } - } - - /** - * TODO: 準備中 - * - * @param src TODO: 準備中 - */ - public void moveDisplayToDouble(AbstractCobolField src) { - double dval = 0; - CobolDataStorage storage = src.getDataStorage(); - for (int i = 0; i < src.getSize(); ++i) { - byte c = storage.getByte(i); - if (c == (byte) '-' || c == (byte) '+') { - continue; - } - dval *= 10; - dval += c >= 0x70 ? c - 0x70 : c - 0x30; - } - int scale = src.getAttribute().getScale(); - for (int i = 0; i < Math.abs(scale); ++i) { - if (scale < 0) { - dval *= 10; - } else { - dval /= 10; - } - } - if (src.getSign() < 0) { - dval *= -1; - } - this.getDataStorage().set(dval); - } - - @Override - public CobolNumericField getNumericField() { - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - 40, - 20, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage storage = new CobolDataStorage(40); - double dval = Math.abs(this.getBinaryValue()); - String dataString = String.format("%041.20f", dval).replace(".", ""); - storage.memcpy(dataString, 40); - AbstractCobolField field = CobolFieldFactory.makeCobolField(40, storage, attr); - if (this.getSign() >= 0) { - field.putSign(1); - } else { - field.putSign(-1); - } - return (CobolNumericField) field; - } - - @Override - public CobolDecimal getDecimal() { - return new CobolDecimal(BigDecimal.valueOf(this.getBinaryValue()), 0); - } - - @Override - public void moveFrom(byte[] bytes) {} - - @Override - public void moveFrom(String string) {} - - @Override - public void moveFrom(int number) {} - - @Override - public void moveFrom(double number) {} - - @Override - public void moveFrom(BigDecimal number) {} - - @Override - public void moveFrom(CobolDataStorage dataStrage) {} -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** TODO: 準備中 */ +public class CobolNumericDoubleField extends AbstractCobolField { + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param dataStorage TODO: 準備中 + * @param attribute TODO: 準備中 + */ + public CobolNumericDoubleField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + private double getBinaryValue() { + CobolDataStorage storage = this.getDataStorage(); + return storage.doubleValue(); + } + + @Override + public byte[] getBytes() { + return new byte[0]; + } + + @Override + public String getString() { + return String.format("%.18f", this.getDouble()); + } + + @Override + public int getSign() { + double n = this.getBinaryValue(); + + if (n < 0) { + return -1; + } else if (n > 0) { + return 1; + } else { + return 0; + } + } + + @Override + public double getDouble() { + return this.getBinaryValue(); + } + + @Override + public void setDecimal(BigDecimal decimal) { + // TODO Auto-generated method stub + } + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + this.moveDisplayToDouble(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + throw new CobolRuntimeException(0, "未実装"); + } + } + + /** + * TODO: 準備中 + * + * @param src TODO: 準備中 + */ + public void moveDisplayToDouble(AbstractCobolField src) { + double dval = 0; + CobolDataStorage storage = src.getDataStorage(); + for (int i = 0; i < src.getSize(); ++i) { + byte c = storage.getByte(i); + if (c == (byte) '-' || c == (byte) '+') { + continue; + } + dval *= 10; + dval += c >= 0x70 ? c - 0x70 : c - 0x30; + } + int scale = src.getAttribute().getScale(); + for (int i = 0; i < Math.abs(scale); ++i) { + if (scale < 0) { + dval *= 10; + } else { + dval /= 10; + } + } + if (src.getSign() < 0) { + dval *= -1; + } + this.getDataStorage().set(dval); + } + + @Override + public CobolNumericField getNumericField() { + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + 40, + 20, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage storage = new CobolDataStorage(40); + double dval = Math.abs(this.getBinaryValue()); + String dataString = String.format("%041.20f", dval).replace(".", ""); + storage.memcpy(dataString, 40); + AbstractCobolField field = CobolFieldFactory.makeCobolField(40, storage, attr); + if (this.getSign() >= 0) { + field.putSign(1); + } else { + field.putSign(-1); + } + return (CobolNumericField) field; + } + + @Override + public CobolDecimal getDecimal() { + return new CobolDecimal(BigDecimal.valueOf(this.getBinaryValue()), 0); + } + + @Override + public void moveFrom(byte[] bytes) {} + + @Override + public void moveFrom(String string) {} + + @Override + public void moveFrom(int number) {} + + @Override + public void moveFrom(double number) {} + + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public void moveFrom(CobolDataStorage dataStrage) {} +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java index 48e4a4c6..ad0566bb 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java @@ -1,383 +1,385 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; - -/** TODO: 準備中 */ -public class CobolNumericEditedField extends AbstractCobolField { - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNumericEditedField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - @Override - public byte[] getBytes() { - return new byte[0]; - } - - @Override - public String getString() { - return null; - } - - @Override - public CobolDecimal getDecimal() { - return null; - } - - @Override - public void setDecimal(BigDecimal decimal) {} - - @Override - public int addPackedInt(int n) { - return 0; - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - CobolNumericEditedField.moveDisplayToEdited(this, src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - this.moveFrom(src1.getNumericField()); - break; - } - } - - private static void moveDisplayToEdited(AbstractCobolField dst, AbstractCobolField src) { - int decimalPoint = 0; - int sign = src.getSign(); - src.putSign(+1); - boolean neg = sign < 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); - int count = 0; - int countSign = 1; - int countCurr = 1; - boolean pIsLeft = false; - - final int sizeOfInt = 4; - for (int p = 0; p < picBytes.length; p += 5) { - byte c = picBytes[p]; - ByteBuffer buf = ByteBuffer.wrap(picBytes, p + 1, sizeOfInt); - buf.order(ByteOrder.LITTLE_ENDIAN); - int repeat = buf.getInt(); - if (c == '9' || c == 'Z' || c == '*') { - count += repeat; - countSign = 0; - countCurr = 0; - } else if (countCurr != 0 && c == CobolModule.getCurrentModule().currency_symbol) { - count += repeat; - } else if (countSign != 0 && (c == '+' || c == '-')) { - count += repeat; - } else if (c == 'P') { - if (count == 0) { - pIsLeft = true; - break; - } else { - count += repeat; - countSign = 0; - countCurr = 0; - } - } else if (c == 'V' || c == CobolModule.getCurrentModule().decimal_point) { - break; - } - } - - // index - int min; - if (src.getAttribute().isFlagSignSeparate() && src.getAttribute().isFlagSignLeading()) { - min = src.getDataStorage().getIndex() + 1; - } else { - min = src.getDataStorage().getIndex(); - } - int max = min + src.getFieldSize(); - int srcp = max - src.getAttribute().getScale() - count; - - int dstp = dst.getDataStorage().getIndex(); - int end = dstp + dst.getSize(); - - int signFirst = 0; - - // byte array - byte[] srcBytes = src.getDataStorage().getRefOfData(); - byte[] dstBytes = dst.getDataStorage().getRefOfData(); - - // flag - boolean suppressZero = true; - boolean isZero = true; - boolean trailingSign = false; - boolean trailingCurr = false; - - // characters - byte pad = ' '; - byte x; - byte signSymbol = 0; - byte currSymbol = 0; - - for (int p = 0; p < picBytes.length; ) { - byte c = picBytes[p++]; - ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); - buf.order(ByteOrder.LITTLE_ENDIAN); - int n = buf.getInt(); - p += sizeOfInt; - for (; n > 0; n--, ++dstp) { - switch (c) { - case '0': - case '/': - dstBytes[dstp] = c; - break; - - case 'B': - dstBytes[dstp] = suppressZero ? pad : (byte) 'B'; - break; - - case 'P': - if (pIsLeft) { - ++srcp; - ++dstp; - } - break; - - case '9': - if (min <= srcp && srcp < max) { - byte val = srcBytes[srcp++]; - dstBytes[dstp] = (byte) (val >= 0x70 ? val - 0x40 : val); - } else { - srcp++; - dstBytes[dstp] = '0'; - } - if (dstBytes[dstp] != '0') { - isZero = suppressZero = false; - } - suppressZero = false; - trailingSign = true; - trailingCurr = true; - break; - - case 'V': - --dstp; - decimalPoint = dstp; - break; - - case '.': - case ',': - if (c == CobolModule.getCurrentModule().decimal_point) { - dstBytes[dstp] = (byte) CobolModule.getCurrentModule().decimal_point; - decimalPoint = dstp; - } else { - dstBytes[dstp] = suppressZero ? pad : c; - } - break; - - case 'C': - case 'D': - end = dstp; - if (neg) { - if (c == 'C') { - dstBytes[dstp] = 'C'; - dstBytes[dstp + 1] = 'R'; - } else { - dstBytes[dstp] = 'D'; - dstBytes[dstp + 1] = 'B'; - } - } else { - dstBytes[dstp] = ' '; - dstBytes[dstp + 1] = ' '; - } - dstp++; - break; - - case 'Z': - case '*': - x = (min <= srcp && srcp < max) ? srcBytes[srcp] : (byte) '0'; - srcp++; - if (x != '0') { - isZero = suppressZero = false; - } - pad = (byte) ((c == '*') ? '*' : ' '); - dstBytes[dstp] = suppressZero ? pad : x; - trailingSign = trailingCurr = true; - break; - - case '+': - case '-': - x = (min <= srcp && srcp < max) ? srcBytes[srcp] : (byte) '0'; - srcp++; - if (x != '0') { - isZero = suppressZero = false; - } - if (trailingSign) { - dstBytes[dstp] = (byte) (neg ? '-' : (c == '+') ? '+' : ' '); - --end; - } else if (dstp == dst.getDataStorage().getIndex() || suppressZero) { - dstBytes[dstp] = pad; - signSymbol = (byte) (neg ? '-' : (c == '+') ? '+' : ' '); - if (currSymbol != 0) { - ++signFirst; - } - } else { - dstBytes[dstp] = x; - } - break; - - default: - if (c == CobolModule.getCurrentModule().currency_symbol) { - x = (byte) ((min <= srcp && srcp < max) ? srcBytes[srcp] : '0'); - srcp++; - if (x != '0') { - isZero = suppressZero = false; - } - if (trailingCurr) { - dstBytes[dstp] = (byte) CobolModule.getCurrentModule().currency_symbol; - --end; - } else if (dstp == dst.getDataStorage().getIndex() || suppressZero) { - dstBytes[dstp] = pad; - currSymbol = (byte) CobolModule.getCurrentModule().currency_symbol; - } else { - dstBytes[dstp] = x; - } - break; - } - dstBytes[dstp] = '?'; - } - } - } - - if (suppressZero || (isZero && dst.getAttribute().isFlagBlankZero())) { - if (pad == ' ' || dst.getAttribute().isFlagBlankZero()) { - dst.getDataStorage().memset((byte) ' ', dst.getSize()); - } else { - int firstIndex = dst.getDataStorage().getIndex(); - for (dstp = firstIndex; dstp < firstIndex + dst.getSize(); ++dstp) { - if (dstBytes[dstp] != CobolModule.getCurrentModule().decimal_point) { - dstBytes[dstp] = pad; - } - } - } - } else { - if (decimalPoint != 0) { - for (dstp = decimalPoint + 1; dstp < end; ++dstp) { - if (!Character.isDigit(dstBytes[dstp]) && ",+/B".lastIndexOf(dstBytes[dstp]) < 0) { - dstBytes[dstp] = '0'; - } - } - } - - if (signSymbol != 0 || currSymbol != 0) { - for (dstp = end - 1; dstp > dst.getDataStorage().getIndex(); --dstp) { - if (dstBytes[dstp] == ' ') { - break; - } - } - if (signSymbol != 0 && currSymbol != 0) { - if (signFirst != 0) { - dstBytes[dstp] = currSymbol; - --dstp; - if (dstp >= dst.getDataStorage().getIndex()) { - dstBytes[dstp] = signSymbol; - } - } else { - dstBytes[dstp] = signSymbol; - --dstp; - if (dstp >= dst.getDataStorage().getIndex()) { - dstBytes[dstp] = currSymbol; - } - } - } else if (signSymbol > 0) { - dstBytes[dstp] = signSymbol; - } else { - dstBytes[dstp] = currSymbol; - } - } - - count = 0; - for (dstp = dst.getDataStorage().getIndex(); dstp < end; ++dstp) { - if (dstBytes[dstp] == 'B') { - dstBytes[dstp] = count == 0 ? pad : (byte) ' '; - } else { - ++count; - } - } - } - - src.putSign(sign); - } - - @Override - public void moveFrom(CobolDataStorage dataStrage) {} - - @Override - public void moveFrom(byte[] bytes) {} - - @Override - public void moveFrom(String string) {} - - @Override - public void moveFrom(int number) {} - - @Override - public void moveFrom(double number) {} - - @Override - public void moveFrom(BigDecimal number) {} - - @Override - public CobolNumericField getNumericField() { - int size = 36; - int scale = 18; - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(64); - CobolNumericField field = new CobolNumericField(size, data, attr); - field.moveFrom(this); - return field; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; + +/** TODO: 準備中 */ +public class CobolNumericEditedField extends AbstractCobolField { + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNumericEditedField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + @Override + public byte[] getBytes() { + return new byte[0]; + } + + @Override + public String getString() { + return null; + } + + @Override + public CobolDecimal getDecimal() { + return null; + } + + @Override + public void setDecimal(BigDecimal decimal) {} + + @Override + public int addPackedInt(int n) { + return 0; + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + CobolNumericEditedField.moveDisplayToEdited(this, src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + this.moveFrom(src1.getNumericField()); + break; + } + } + + private static void moveDisplayToEdited(AbstractCobolField dst, AbstractCobolField src) { + int decimalPoint = 0; + int sign = src.getSign(); + src.putSign(+1); + boolean neg = sign < 0; + byte[] picBytes = dst.getAttribute().getPic().getBytes(); + int count = 0; + int countSign = 1; + int countCurr = 1; + boolean pIsLeft = false; + + final int sizeOfInt = 4; + for (int p = 0; p < picBytes.length; p += 5) { + byte c = picBytes[p]; + ByteBuffer buf = ByteBuffer.wrap(picBytes, p + 1, sizeOfInt); + buf.order(ByteOrder.LITTLE_ENDIAN); + int repeat = buf.getInt(); + if (c == '9' || c == 'Z' || c == '*') { + count += repeat; + countSign = 0; + countCurr = 0; + } else if (countCurr != 0 && c == CobolModule.getCurrentModule().currency_symbol) { + count += repeat; + } else if (countSign != 0 && (c == '+' || c == '-')) { + count += repeat; + } else if (c == 'P') { + if (count == 0) { + pIsLeft = true; + break; + } else { + count += repeat; + countSign = 0; + countCurr = 0; + } + } else if (c == 'V' || c == CobolModule.getCurrentModule().decimal_point) { + break; + } + } + + // index + int min; + if (src.getAttribute().isFlagSignSeparate() && src.getAttribute().isFlagSignLeading()) { + min = src.getDataStorage().getIndex() + 1; + } else { + min = src.getDataStorage().getIndex(); + } + int max = min + src.getFieldSize(); + int srcp = max - src.getAttribute().getScale() - count; + + int dstp = dst.getDataStorage().getIndex(); + int end = dstp + dst.getSize(); + + int signFirst = 0; + + // byte array + byte[] srcBytes = src.getDataStorage().getRefOfData(); + byte[] dstBytes = dst.getDataStorage().getRefOfData(); + + // flag + boolean suppressZero = true; + boolean isZero = true; + boolean trailingSign = false; + boolean trailingCurr = false; + + // characters + byte pad = ' '; + byte x; + byte signSymbol = 0; + byte currSymbol = 0; + + for (int p = 0; p < picBytes.length; ) { + byte c = picBytes[p++]; + ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); + buf.order(ByteOrder.LITTLE_ENDIAN); + int n = buf.getInt(); + p += sizeOfInt; + for (; n > 0; n--, ++dstp) { + switch (c) { + case '0': + case '/': + dstBytes[dstp] = c; + break; + + case 'B': + dstBytes[dstp] = suppressZero ? pad : (byte) 'B'; + break; + + case 'P': + if (pIsLeft) { + ++srcp; + ++dstp; + } + break; + + case '9': + if (min <= srcp && srcp < max) { + byte val = srcBytes[srcp++]; + dstBytes[dstp] = (byte) (val >= 0x70 ? val - 0x40 : val); + } else { + srcp++; + dstBytes[dstp] = '0'; + } + if (dstBytes[dstp] != '0') { + isZero = suppressZero = false; + } + suppressZero = false; + trailingSign = true; + trailingCurr = true; + break; + + case 'V': + --dstp; + decimalPoint = dstp; + break; + + case '.': + case ',': + if (c == CobolModule.getCurrentModule().decimal_point) { + dstBytes[dstp] = (byte) CobolModule.getCurrentModule().decimal_point; + decimalPoint = dstp; + } else { + dstBytes[dstp] = suppressZero ? pad : c; + } + break; + + case 'C': + case 'D': + end = dstp; + if (neg) { + if (c == 'C') { + dstBytes[dstp] = 'C'; + dstBytes[dstp + 1] = 'R'; + } else { + dstBytes[dstp] = 'D'; + dstBytes[dstp + 1] = 'B'; + } + } else { + dstBytes[dstp] = ' '; + dstBytes[dstp + 1] = ' '; + } + dstp++; + break; + + case 'Z': + case '*': + x = (min <= srcp && srcp < max) ? srcBytes[srcp] : (byte) '0'; + srcp++; + if (x != '0') { + isZero = suppressZero = false; + } + pad = (byte) ((c == '*') ? '*' : ' '); + dstBytes[dstp] = suppressZero ? pad : x; + trailingSign = trailingCurr = true; + break; + + case '+': + case '-': + x = (min <= srcp && srcp < max) ? srcBytes[srcp] : (byte) '0'; + srcp++; + if (x != '0') { + isZero = suppressZero = false; + } + if (trailingSign) { + dstBytes[dstp] = (byte) (neg ? '-' : (c == '+') ? '+' : ' '); + --end; + } else if (dstp == dst.getDataStorage().getIndex() || suppressZero) { + dstBytes[dstp] = pad; + signSymbol = (byte) (neg ? '-' : (c == '+') ? '+' : ' '); + if (currSymbol != 0) { + ++signFirst; + } + } else { + dstBytes[dstp] = x; + } + break; + + default: + if (c == CobolModule.getCurrentModule().currency_symbol) { + x = (byte) ((min <= srcp && srcp < max) ? srcBytes[srcp] : '0'); + srcp++; + if (x != '0') { + isZero = suppressZero = false; + } + if (trailingCurr) { + dstBytes[dstp] = + (byte) CobolModule.getCurrentModule().currency_symbol; + --end; + } else if (dstp == dst.getDataStorage().getIndex() || suppressZero) { + dstBytes[dstp] = pad; + currSymbol = (byte) CobolModule.getCurrentModule().currency_symbol; + } else { + dstBytes[dstp] = x; + } + break; + } + dstBytes[dstp] = '?'; + } + } + } + + if (suppressZero || (isZero && dst.getAttribute().isFlagBlankZero())) { + if (pad == ' ' || dst.getAttribute().isFlagBlankZero()) { + dst.getDataStorage().memset((byte) ' ', dst.getSize()); + } else { + int firstIndex = dst.getDataStorage().getIndex(); + for (dstp = firstIndex; dstp < firstIndex + dst.getSize(); ++dstp) { + if (dstBytes[dstp] != CobolModule.getCurrentModule().decimal_point) { + dstBytes[dstp] = pad; + } + } + } + } else { + if (decimalPoint != 0) { + for (dstp = decimalPoint + 1; dstp < end; ++dstp) { + if (!Character.isDigit(dstBytes[dstp]) + && ",+/B".lastIndexOf(dstBytes[dstp]) < 0) { + dstBytes[dstp] = '0'; + } + } + } + + if (signSymbol != 0 || currSymbol != 0) { + for (dstp = end - 1; dstp > dst.getDataStorage().getIndex(); --dstp) { + if (dstBytes[dstp] == ' ') { + break; + } + } + if (signSymbol != 0 && currSymbol != 0) { + if (signFirst != 0) { + dstBytes[dstp] = currSymbol; + --dstp; + if (dstp >= dst.getDataStorage().getIndex()) { + dstBytes[dstp] = signSymbol; + } + } else { + dstBytes[dstp] = signSymbol; + --dstp; + if (dstp >= dst.getDataStorage().getIndex()) { + dstBytes[dstp] = currSymbol; + } + } + } else if (signSymbol > 0) { + dstBytes[dstp] = signSymbol; + } else { + dstBytes[dstp] = currSymbol; + } + } + + count = 0; + for (dstp = dst.getDataStorage().getIndex(); dstp < end; ++dstp) { + if (dstBytes[dstp] == 'B') { + dstBytes[dstp] = count == 0 ? pad : (byte) ' '; + } else { + ++count; + } + } + } + + src.putSign(sign); + } + + @Override + public void moveFrom(CobolDataStorage dataStrage) {} + + @Override + public void moveFrom(byte[] bytes) {} + + @Override + public void moveFrom(String string) {} + + @Override + public void moveFrom(int number) {} + + @Override + public void moveFrom(double number) {} + + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public CobolNumericField getNumericField() { + int size = 36; + int scale = 18; + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(64); + CobolNumericField field = new CobolNumericField(size, data, attr); + field.moveFrom(this); + return field; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index 2f655a8a..9f9ec0c0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -1,947 +1,961 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** PIC 文字列が9(5)や9(9)の変数を表現するクラス. */ -public class CobolNumericField extends AbstractCobolField { - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト - */ - public CobolNumericField(int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - */ - public void checkNumeric(String s) {} - - @Override - public byte[] getBytes() { - return dataStorage.getData(); - } - - @Override - public String getString() { - CobolDataStorage data = this.getDataStorage(); - CobolFieldAttribute attr = this.getAttribute(); - int digits = attr.getDigits(); - char decimalPoint = (char) CobolModule.getDecimalPoint(); - - StringBuilder sb = new StringBuilder(); - if (attr.isFlagHaveSign()) { - if (this.getSign() < 0) { - sb.append('-'); - } else { - sb.append('+'); - } - } - - int scale = attr.getScale(); - int fieldSize = this.getFieldSize(); - if (scale >= fieldSize) { - sb.append(decimalPoint); - for (int i = 0; i < scale - fieldSize; ++i) { - sb.append('0'); - } - int firstIndex = this.getFirstDataIndex(); - int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; - for (int i = 0; i < fieldSize; ++i) { - char c = (char) data.getByte(firstIndex + i); - if (firstIndex + i == signIndex && c >= 0x70) { - c -= 0x40; - } - sb.append(c); - } - return sb.toString(); - } - - int pointIndex = scale > 0 ? digits - scale - 1 : digits - 1; - - int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; - int i = 0; - int dataLastIndex = - attr.isFlagHaveSign() && !attr.isFlagSignLeading() && attr.isFlagSignSeparate() - ? this.getSize() - 2 - : this.getSize() - 1; - for (; i + getFirstDataIndex() <= dataLastIndex; ++i) { - if (scale > 0 && i - 1 == pointIndex) { - sb.append(decimalPoint); - } - char c = (char) data.getByte(this.getFirstDataIndex() + i); - if (attr.isFlagHaveSign() && !attr.isFlagSignSeparate() && i == signIndex && c >= 0x70) { - c -= 0x40; - } - sb.append(c); - } - for (; i < digits; ++i) { - if (scale > 0 && i - 1 == pointIndex) { - sb.append(decimalPoint); - } - sb.append('0'); - } - - return sb.toString(); - } - - @Override - public int getInt() { - int size = this.getFieldSize(); - CobolDataStorage data = this.getDataStorage(); - int firstDataIndex = this.getFirstDataIndex(); - int sign = this.getSign(); - - int i; - for (i = 0; i < size; ++i) { - if (data.getByte(firstDataIndex + i) - 0x30 != 0) { - break; - } - } - - int val = 0; - int scale = this.getAttribute().getScale(); - if (scale < 0) { - for (; i < size; ++i) { - byte x = data.getByte(firstDataIndex + i); - x -= (x >= 0x70) ? 0x70 : 0x30; - val = val * 10 + x; - } - val *= AbstractCobolField.cobExp10[-scale]; - } else { - size -= scale; - for (; i < size; ++i) { - byte x = data.getByte(firstDataIndex + i); - x -= (x >= 0x70) ? 0x70 : 0x30; - val = val * 10 + x; - } - } - - if (sign < 0) { - val = -val; - } - - this.putSign(sign); - return val; - } - - @Override - public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); - int length = Math.min(this.size, decimalBytes.length); - - for (int i = 0; i < length; ++i) { - this.dataStorage.setByte(this.size - 1 - i, decimalBytes[decimalBytes.length - 1 - i]); - } - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - this.moveDisplayToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - this.movePackedToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - this.moveAlphanumericToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - this.moveBinaryToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: - case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: - this.moveDoubleToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - this.moveEditedToDisplay(src1); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - throw new CobolRuntimeException(0, "未実装"); - } - } - - /** - * CobolNumericDisplayからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void moveDisplayToDisplay(AbstractCobolField field) { - int sign = field.getSign(); - field.putSign(1); - - this.storeCommonRegion( - this, - field.getDataStorage().getSubDataStorage(field.getFirstDataIndex()), - field.getFieldSize(), - field.getAttribute().getScale()); - - field.putSign(sign); - this.putSign(sign); - } - - /** - * CobolNumericPackedFieldからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void movePackedToDisplay(AbstractCobolField field) { - int sign = field.getSign(); - int offset = 1 - (field.getAttribute().getDigits() % 2); - CobolDataStorage buff = new CobolDataStorage(64); - int packedDigits = field.getAttribute().getDigits(); - int packedScale = field.getAttribute().getScale(); - int end; - if (packedScale < 0) { - end = offset + packedDigits + packedScale; - } else { - end = offset + packedDigits; - } - - for (int i = offset; i < end; ++i) { - if (i % 2 == 0) { - buff.setByte( - i - offset, (byte) (((field.getDataStorage().getByte(i / 2) >> 4) & 0x0f) + 0x30)); - } else { - buff.setByte(i - offset, (byte) ((field.getDataStorage().getByte(i / 2) & 0x0f) + 0x30)); - } - } - this.storeCommonRegion( - this, buff, field.getAttribute().getDigits(), field.getAttribute().getScale()); - - this.putSign(sign); - } - - /** - * CobolAlphanumericFieldからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void moveAlphanumericToDisplay(AbstractCobolField field) { - int s1 = 0; - int e1 = s1 + field.getSize(); - int s2 = this.getFirstDataIndex(); - int e2 = this.getFieldSize(); - - for (int i = 0; i < this.getSize(); ++i) { - this.getDataStorage().setByte(i, (byte) 0x30); - } - - /* skip white space */ - for (; s1 < e1; ++s1) { - char ch = (char) field.getDataStorage().getByte(s1); - if (!Character.isWhitespace(ch)) { - break; - } - } - - /* check for sign */ - int sign = 0; - if (s1 != e1) { - byte ch = field.getDataStorage().getByte(s1); - byte plus = 0x2b; - byte minus = 0x2d; - if (ch == plus || ch == minus) { - sign = (ch == plus) ? 1 : -1; - s1++; - } - } - - /* count the number of digits before decimal point */ - int count = 0; - // TODO Moduleの情報を参照するコードに編集する - for (int p = s1; p < e1 && field.getDataStorage().getByte(p) != '.'; ++p) { - if (Character.isDigit(field.getDataStorage().getByte(p))) { - ++count; - } - } - - /* find the start position */ - int size = this.getFieldSize() - this.getAttribute().getScale(); - if (count < size) { - s2 += size - count; - } else { - while (count-- > size) { - while (!Character.isDigit(field.getDataStorage().getByte(s1++))) { - ; - } - } - } - - /* move */ - count = 0; - outer: - { - for (; s1 < e1 && s2 < e2; ++s1) { - byte c = field.getDataStorage().getByte(s1); - if (Character.isDigit(c)) { - this.getDataStorage().setByte(s2++, c); - // TODO Moduleの情報を参照するコードに編集する - } else if (c == (byte) '.') { - ++count; - if (count > 1) { - break outer; - } - - // TODO Moduleの情報を参照するコードに編集する - } else if (!Character.isWhitespace(c) || c == ',') { - break outer; - } - } - this.putSign(sign); - return; - } - for (int i = 0; i < this.getSize(); ++i) { - this.getDataStorage().setByte(i, (byte) 0x30); - } - this.putSign(0); - } - - /** - * CobolNumericBinaryからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void moveBinaryToDisplay(AbstractCobolField field) { - int sign = 1; - long val = field.getLongValue(); - - if (this.getAttribute().isFlagHaveSign() && val < 0) { - sign = -1; - val = -val; - } - - int i = 20; - byte[] buff = new byte[64]; - while (val > 0) { - buff[--i] = (byte) (val % 10 + 0x30); - val /= 10; - } - - this.storeCommonRegion( - this, new CobolDataStorage(buff, 0), i, (20 - i), field.getAttribute().getScale()); - this.putSign(sign); - } - - private void moveDoubleToDisplay(AbstractCobolField field) { - CobolFieldAttribute thisAttr = this.getAttribute(); - double val = Math.abs(field.getDouble()); - int startIndex = 0; - if (thisAttr.isFlagHaveSign() - && thisAttr.isFlagSignLeading() - && thisAttr.isFlagSignSeparate()) { - startIndex = 1; - } - CobolDataStorage dstStorage = this.getDataStorage().getSubDataStorage(startIndex); - dstStorage.memcpy(String.valueOf(val), thisAttr.getDigits()); - this.putSign(field.getSign() >= 0 ? 1 : -1); - } - - private void moveEditedToDisplay(AbstractCobolField field) { - byte[] buff = new byte[64]; - int p = 0; - boolean havePoint = false; - int scale = 0; - int sign = 0; - - for (int i = 0; i < field.getSize(); ++i) { - int cp = field.getDataStorage().getByte(i); - switch (cp) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buff[p++] = (byte) cp; - if (havePoint) { - ++scale; - } - break; - case '.': - case ',': - if (cp == CobolModule.getCurrentModule().decimal_point) { - havePoint = true; - } - break; - case '-': - case 'C': - sign = -1; - break; - default: - break; - } - } - - byte[] picBytes = field.getAttribute().getPic().getBytes(); - int count = 0; - if (scale == 0) { - for (int p1 = 0; p1 < picBytes.length; p1 += 5) { - byte c = picBytes[p1]; - ByteBuffer buf = ByteBuffer.wrap(picBytes, p1 + 1, 4); - buf.order(ByteOrder.LITTLE_ENDIAN); - int n = buf.getInt(); - if (c == '9' || c == '0' || c == 'Z' || c == '*') { - if (havePoint) { - scale += n; - } else { - count += n; - } - } else if (c == 'P') { - if (count == 0) { - havePoint = true; - scale += n; - } else { - scale -= n; - } - } else if (c == 'V') { - havePoint = true; - } - } - } - - storeCommonRegion(this, new CobolDataStorage(buff), p, scale); - this.putSign(sign); - } - - @Override - public int getSign() { - CobolFieldAttribute attr = this.getAttribute(); - if (!attr.isFlagHaveSign()) { - return 0; - } - - int p; - if (attr.isFlagSignLeading()) { - p = 0; - } else { - p = this.getSize() - 1; - } - byte value = this.getDataStorage().getByte(p); - if (attr.isFlagSignSeparate()) { - return value == 0x2b ? 1 : -1; - } else { - if (0x30 <= value && value <= 0x39) { - return 1; - } - if (value == 0x20) { - this.getDataStorage().setByte(p, (byte) 0x30); - return 1; - } - - // TODO 以下のコメントアウトを外して,他の部分も修正してテストする - // if(CobolModule.getCurrentModule().display_sign != 0) { - // return 1; - // return getSignEbcdic(p); - // } else { - // return -1; - // } - - // this.getDataStorage().setByte(p, (byte) (this.getDataStorage().getByte(p) - - // 0x40)); - return -1; - } - } - - @Override - public void putSign(int sign) { - CobolFieldAttribute attr = this.getAttribute(); - int p; - - if (!attr.isFlagHaveSign()) { - return; - } - - if (attr.isFlagSignLeading()) { - p = 0; - } else { - p = this.getSize() - 1; - } - - byte value = this.getDataStorage().getByte(p); - if (attr.isFlagSignSeparate()) { - // 0x2dは'-', 0x2bは'+' - byte c = (byte) ((sign < 0) ? 0x2d : 0x2b); - if (value != c) { - this.getDataStorage().setByte(p, c); - } - // TODO 以下のコメントを外して他の部分も修正してテストする - } // else if (CobolModule.getCurrentModule().display_sign != 0) { - /// this.putSignEbcdic(p, sign); - // } - - else { - value = (byte) (value >= 0x70 ? value - 0x40 : value); - this.getDataStorage().setByte(p, (byte) (sign < 0 ? value + 0x40 : value)); - } - } - - /** - * libcob/move.cのstore_common_regionの実装 - * - * @param field TODO: 準備中 - * @param data TODO: 準備中 - * @param size TODO: 準備中 - * @param scale TODO: 準備中 - */ - private void storeCommonRegion( - AbstractCobolField field, CobolDataStorage data, int size, int scale) { - this.storeCommonRegion(field, data, 0, size, scale); - } - - /** - * libcob/move.cのstore_common_regionの実装 - * - * @param field TODO: 準備中 - * @param data TODO: 準備中 - * @param dataStartIndex TODO: 準備中 - * @param size TODO: 準備中 - * @param scale TODO: 準備中 - */ - private void storeCommonRegion( - AbstractCobolField field, CobolDataStorage data, int dataStartIndex, int size, int scale) { - int lf1 = -scale; - int lf2 = -field.getAttribute().getScale(); - int hf1 = size + lf1; - int hf2 = field.getFieldSize() + lf2; - - int lcf = Math.max(lf1, lf2); - int gcf = Math.min(hf1, hf2); - - for (int i = 0; i < field.getFieldSize(); ++i) { - field.getDataStorage().setByte(i + field.getFirstDataIndex(), (byte) 0x30); - } - - if (gcf > lcf) { - int csize = gcf - lcf; - int p = hf1 - gcf; - int q = field.getFirstDataIndex() + hf2 - gcf; - for (int cinc = 0; cinc < csize; ++cinc, ++p, ++q) { - if (data.getByte(dataStartIndex + p) == (byte) 0x20) { - field.getDataStorage().setByte(q, (byte) 0x30); - } else { - byte value = data.getByte(dataStartIndex + p); - field.getDataStorage().setByte(q, value); - } - } - } - } - - @Override - public void moveFrom(byte[] bytes) { - this.dataStorage.setData(bytes); - } - - @Override - public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - - @Override - public void moveFrom(int number) { - int n = Math.abs(number); - for (int i = 0; i < this.size; ++i) { - this.dataStorage.setByte(i, (byte) 0x30); - } - - for (int i = this.size - 1; i >= 0; --i) { - this.dataStorage.setByte(i, (byte) (0x30 + n % 10)); - n /= 10; - } - - if (number < 0 && this.getAttribute().isFlagHaveSign()) { - this.putSign(-1); - } - } - - @Override - public int subInt(int in) { - return this.addInt(-in, CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW); - } - - private int subInt(int in, int opt) { - return this.addInt(-in, opt); - } - - @Override - public int addInt(int in) { - return this.addInt(in, CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW); - } - - private int addInt(int in, int opt) { - if (in == 0) { - return 0; - } - - int n = in; - CobolDataStorage data = this.getDataStorage(); - int firstDataIndex = this.getFirstDataIndex(); - int size = this.getFieldSize(); - int scale = this.getAttribute().getScale(); - int sign = this.getSign(); - int osize = size; - byte[] tfield = new byte[64]; - - for (int i = 0; i < osize; ++i) { - tfield[i] = data.getByte(firstDataIndex + i); - } - - if (sign < 0) { - n = -n; - } - while (scale > 0) { - --scale; - n *= 10; - } - - if (scale < 0) { - if (-scale < 10) { - while (scale != 0) { - ++scale; - n /= 10; - } - } else { - n = 0; - } - } else { - size -= scale; - } - - if (n > 0) { - if (displayAddInt(data, firstDataIndex, size, n) != 0) { - for (int i = 0; i < osize; ++i) { - data.setByte(firstDataIndex + i, tfield[i]); - } - CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); - if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { - this.putSign(sign); - return CobolRuntimeException.code; - } - } - } else if (n < 0) { - if (displaySubInt(data, firstDataIndex, size, -n) != 0) { - for (int i = 0; i < size; ++i) { - byte val = data.getByte(firstDataIndex + i); - data.setByte(firstDataIndex + i, (byte) (9 - (val - 0x30) + 0x30)); - } - displayAddInt(data, firstDataIndex, size, 1); - sign = -sign; - } - } - - this.putSign(sign); - return 0; - } - - /** - * libcob/numeric.cのdisplay_add_intの実装 - * - * @param data TODO: 準備中 - * @param firstDataIndex dataにアクセスするときの開始位置 - * @param size TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private int displayAddInt(CobolDataStorage data, int firstDataIndex, int size, long n) { - int carry = 0; - int sp = firstDataIndex + size; - int i; - while (n > 0) { - i = (int) (n % 10L); - n /= 10; - - /* check for overflow */ - --sp; - if (sp < firstDataIndex) { - if (CobolModule.getCurrentModule().flag_binary_truncate == 0) { - return 0; - } - return 1; - } - - /* perform addtion */ - int is = (data.getByte(sp) & 0x0F) + i + carry; - if (is > 9) { - carry = 1; - data.setByte(sp, (byte) (0x30 + (is % 10))); - } else { - carry = 0; - data.setByte(sp, (byte) (0x30 + is)); - } - } - if (carry == 0) { - return 0; - } - - /* carry up */ - while (--sp >= firstDataIndex) { - byte val = data.getByte(sp); - data.setByte(sp, (byte) (val + 1)); - if (val + 1 <= '9') { - return 0; - } - data.setByte(sp, (byte) '0'); - } - - if (CobolModule.getCurrentModule().flag_binary_truncate == 0) { - return 0; - } - return 1; - } - - private static int displaySubInt(CobolDataStorage data, int firstDataIndex, int size, long n) { - int carry = 0; - int sp = firstDataIndex + size; - int i; - while (n > 0) { - i = (int) (n % 10L); - n /= 10; - - /* check for overflow */ - --sp; - if (sp < firstDataIndex) { - return 1; - } - - /* perform subtraction */ - byte val = data.getByte(sp); - data.setByte(sp, (byte) (val - (i + carry))); - if (val - (i + carry) < '0') { - carry = 1; - data.setByte(sp, (byte) (data.getByte(sp) + 10)); - } else { - carry = 0; - } - } - if (carry == 0) { - return 0; - } - - /* carry up */ - while (--sp >= firstDataIndex) { - byte val = data.getByte(sp); - data.setByte(sp, (byte) (val - 1)); - if (val - 1 >= '0') { - return 0; - } - data.setByte(sp, (byte) '9'); - } - return 1; - } - - @Override - public int add(AbstractCobolField field, int opt) throws CobolStopRunException { - CobolFieldAttribute attr = field.getAttribute(); - if (attr.isTypeNumeric() - && attr.getDigits() <= 9 - && attr.getScale() == 0 - && this.getAttribute().getScale() == 0) { - return this.addInt(field.getInt(), opt); - } else { - return super.add(field, opt); - } - } - - @Override - public int sub(AbstractCobolField field, int opt) throws CobolStopRunException { - CobolFieldAttribute attr = field.getAttribute(); - if (attr.isTypeNumeric() - && attr.getDigits() <= 9 - && attr.getScale() == 0 - && this.getAttribute().getScale() == 0) { - return this.subInt(field.getInt(), opt); - } else { - return super.sub(field, opt); - } - } - - @Override - public CobolNumericField getNumericField() { - return this; - } - - /* - * @Override - * public void moveFrom(double number) { - * this.moveFrom((int) number); - * } - */ - - @Override - public void moveFrom(BigDecimal number) {} - - @Override - public void moveFrom(CobolDataStorage dataStorage) {} - - @Override - public int addPackedInt(int n) { - throw new CobolRuntimeException(0, "実装しないコード"); - } - - @Override - public long getLong() { - int size = this.getSize(); - CobolDataStorage data = this.getDataStorage(); - int sign = this.getSign(); - int i = 0; - - for (i = 0; i < size; ++i) { - if (data.getByte(i) != '0') { - break; - } - } - - long val = 0; - int scale = this.getAttribute().getScale(); - if (scale < 0) { - for (; i < size; ++i) { - val = val * 10 + (data.getByte(i) - '0'); - } - val *= CobolConstant.exp10LL[-scale]; - } else { - size -= scale; - for (; i < size; ++i) { - val = val * 10 + (data.getByte(i) - '0'); - } - } - if (sign < 0) { - val = -val; - } - this.putSign(sign); - return val; - } - - @Override - public int numericCompareTo(AbstractCobolField field) { - CobolFieldAttribute attr1 = this.getAttribute(); - CobolFieldAttribute attr2 = field.getAttribute(); - if (attr2.isTypeNumericDisplay()) { - final int scale1 = attr1.getScale(); - final int scale2 = attr2.getScale(); - final int firstIndex1 = this.getFirstDataIndex(); - final int firstIndex2 = field.getFirstDataIndex(); - final int fieldSize1 = this.getFieldSize(); - final int fieldSize2 = field.getFieldSize(); - final int size1 = this.getSize(); - final int size2 = field.getSize(); - final int pointIndex1 = fieldSize1 - scale1; - final int pointIndex2 = fieldSize2 - scale2; - int sign1 = this.getSign(); - int sign2 = field.getSign(); - sign1 = sign1 > 0 ? 1 : sign1 < 0 ? -1 : 1; - sign2 = sign2 > 0 ? 1 : sign2 < 0 ? -1 : 1; - - final int signIndex1 = - attr1.isFlagHaveSign() && !attr1.isFlagSignLeading() ? size1 - 1 : firstIndex1; - final int signIndex2 = - attr2.isFlagHaveSign() && !attr2.isFlagSignLeading() ? size2 - 1 : firstIndex2; - final int l1 = -pointIndex1; - final int l2 = -pointIndex2; - final int r1 = fieldSize1 - pointIndex1; - final int r2 = fieldSize2 - pointIndex2; - final int left = Math.min(l1, l2); - final int right = Math.max(r1, r2); - final int lastIndex1; - if (attr1.isFlagHaveSign() && !attr1.isFlagSignLeading() && attr1.isFlagSignSeparate()) { - lastIndex1 = size1 - 2; - } else { - lastIndex1 = size1 - 1; - } - final int lastIndex2; - if (attr2.isFlagHaveSign() && !attr2.isFlagSignLeading() && attr2.isFlagSignSeparate()) { - lastIndex2 = size2 - 2; - } else { - lastIndex2 = size2 - 1; - } - CobolDataStorage d1 = this.getDataStorage(); - CobolDataStorage d2 = field.getDataStorage(); - for (int i = left; i < right; ++i) { - final int i1 = firstIndex1 + i + pointIndex1; - final int i2 = firstIndex2 + i + pointIndex2; - byte b1; - if (i1 < firstIndex1 || i1 > lastIndex1) { - b1 = (byte) '0'; - } else { - b1 = d1.getByte(i1); - if (i1 == signIndex1 && b1 >= 0x70) { - b1 -= 0x40; - } - } - byte b2; - if (i2 < firstIndex2 || i2 > lastIndex2) { - b2 = (byte) '0'; - } else { - b2 = d2.getByte(i2); - if (i2 == signIndex2 && b2 >= 0x70) { - b2 -= 0x40; - } - } - if (b1 != b2) { - return (sign1 * (int) b1) - (sign2 * (int) b2); - } - } - - if (sign1 * sign2 >= 0) { - return 0; - } else if (sign1 > 0) { - return 1; - } else { - return -1; - } - } else { - return super.numericCompareTo(field); - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import jp.osscons.opensourcecobol.libcobj.common.CobolConstant; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** PIC 文字列が9(5)や9(9)の変数を表現するクラス. */ +public class CobolNumericField extends AbstractCobolField { + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト + */ + public CobolNumericField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + */ + public void checkNumeric(String s) {} + + @Override + public byte[] getBytes() { + return dataStorage.getData(); + } + + @Override + public String getString() { + CobolDataStorage data = this.getDataStorage(); + CobolFieldAttribute attr = this.getAttribute(); + int digits = attr.getDigits(); + char decimalPoint = (char) CobolModule.getDecimalPoint(); + + StringBuilder sb = new StringBuilder(); + if (attr.isFlagHaveSign()) { + if (this.getSign() < 0) { + sb.append('-'); + } else { + sb.append('+'); + } + } + + int scale = attr.getScale(); + int fieldSize = this.getFieldSize(); + if (scale >= fieldSize) { + sb.append(decimalPoint); + for (int i = 0; i < scale - fieldSize; ++i) { + sb.append('0'); + } + int firstIndex = this.getFirstDataIndex(); + int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; + for (int i = 0; i < fieldSize; ++i) { + char c = (char) data.getByte(firstIndex + i); + if (firstIndex + i == signIndex && c >= 0x70) { + c -= 0x40; + } + sb.append(c); + } + return sb.toString(); + } + + int pointIndex = scale > 0 ? digits - scale - 1 : digits - 1; + + int signIndex = attr.isFlagSignLeading() ? 0 : this.getSize() - 1; + int i = 0; + int dataLastIndex = + attr.isFlagHaveSign() && !attr.isFlagSignLeading() && attr.isFlagSignSeparate() + ? this.getSize() - 2 + : this.getSize() - 1; + for (; i + getFirstDataIndex() <= dataLastIndex; ++i) { + if (scale > 0 && i - 1 == pointIndex) { + sb.append(decimalPoint); + } + char c = (char) data.getByte(this.getFirstDataIndex() + i); + if (attr.isFlagHaveSign() + && !attr.isFlagSignSeparate() + && i == signIndex + && c >= 0x70) { + c -= 0x40; + } + sb.append(c); + } + for (; i < digits; ++i) { + if (scale > 0 && i - 1 == pointIndex) { + sb.append(decimalPoint); + } + sb.append('0'); + } + + return sb.toString(); + } + + @Override + public int getInt() { + int size = this.getFieldSize(); + CobolDataStorage data = this.getDataStorage(); + int firstDataIndex = this.getFirstDataIndex(); + int sign = this.getSign(); + + int i; + for (i = 0; i < size; ++i) { + if (data.getByte(firstDataIndex + i) - 0x30 != 0) { + break; + } + } + + int val = 0; + int scale = this.getAttribute().getScale(); + if (scale < 0) { + for (; i < size; ++i) { + byte x = data.getByte(firstDataIndex + i); + x -= (x >= 0x70) ? 0x70 : 0x30; + val = val * 10 + x; + } + val *= AbstractCobolField.cobExp10[-scale]; + } else { + size -= scale; + for (; i < size; ++i) { + byte x = data.getByte(firstDataIndex + i); + x -= (x >= 0x70) ? 0x70 : 0x30; + val = val * 10 + x; + } + } + + if (sign < 0) { + val = -val; + } + + this.putSign(sign); + return val; + } + + @Override + public void setDecimal(BigDecimal decimal) { + byte[] decimalBytes = decimal.toPlainString().getBytes(); + int length = Math.min(this.size, decimalBytes.length); + + for (int i = 0; i < length; ++i) { + this.dataStorage.setByte(this.size - 1 - i, decimalBytes[decimalBytes.length - 1 - i]); + } + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + this.moveDisplayToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + this.movePackedToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + this.moveAlphanumericToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + this.moveBinaryToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_DOUBLE: + case CobolFieldAttribute.COB_TYPE_NUMERIC_FLOAT: + this.moveDoubleToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + this.moveEditedToDisplay(src1); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + throw new CobolRuntimeException(0, "未実装"); + } + } + + /** + * CobolNumericDisplayからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void moveDisplayToDisplay(AbstractCobolField field) { + int sign = field.getSign(); + field.putSign(1); + + this.storeCommonRegion( + this, + field.getDataStorage().getSubDataStorage(field.getFirstDataIndex()), + field.getFieldSize(), + field.getAttribute().getScale()); + + field.putSign(sign); + this.putSign(sign); + } + + /** + * CobolNumericPackedFieldからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void movePackedToDisplay(AbstractCobolField field) { + int sign = field.getSign(); + int offset = 1 - (field.getAttribute().getDigits() % 2); + CobolDataStorage buff = new CobolDataStorage(64); + int packedDigits = field.getAttribute().getDigits(); + int packedScale = field.getAttribute().getScale(); + int end; + if (packedScale < 0) { + end = offset + packedDigits + packedScale; + } else { + end = offset + packedDigits; + } + + for (int i = offset; i < end; ++i) { + if (i % 2 == 0) { + buff.setByte( + i - offset, + (byte) (((field.getDataStorage().getByte(i / 2) >> 4) & 0x0f) + 0x30)); + } else { + buff.setByte( + i - offset, (byte) ((field.getDataStorage().getByte(i / 2) & 0x0f) + 0x30)); + } + } + this.storeCommonRegion( + this, buff, field.getAttribute().getDigits(), field.getAttribute().getScale()); + + this.putSign(sign); + } + + /** + * CobolAlphanumericFieldからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void moveAlphanumericToDisplay(AbstractCobolField field) { + int s1 = 0; + int e1 = s1 + field.getSize(); + int s2 = this.getFirstDataIndex(); + int e2 = this.getFieldSize(); + + for (int i = 0; i < this.getSize(); ++i) { + this.getDataStorage().setByte(i, (byte) 0x30); + } + + /* skip white space */ + for (; s1 < e1; ++s1) { + char ch = (char) field.getDataStorage().getByte(s1); + if (!Character.isWhitespace(ch)) { + break; + } + } + + /* check for sign */ + int sign = 0; + if (s1 != e1) { + byte ch = field.getDataStorage().getByte(s1); + byte plus = 0x2b; + byte minus = 0x2d; + if (ch == plus || ch == minus) { + sign = (ch == plus) ? 1 : -1; + s1++; + } + } + + /* count the number of digits before decimal point */ + int count = 0; + // TODO Moduleの情報を参照するコードに編集する + for (int p = s1; p < e1 && field.getDataStorage().getByte(p) != '.'; ++p) { + if (Character.isDigit(field.getDataStorage().getByte(p))) { + ++count; + } + } + + /* find the start position */ + int size = this.getFieldSize() - this.getAttribute().getScale(); + if (count < size) { + s2 += size - count; + } else { + while (count-- > size) { + while (!Character.isDigit(field.getDataStorage().getByte(s1++))) { + ; + } + } + } + + /* move */ + count = 0; + outer: + { + for (; s1 < e1 && s2 < e2; ++s1) { + byte c = field.getDataStorage().getByte(s1); + if (Character.isDigit(c)) { + this.getDataStorage().setByte(s2++, c); + // TODO Moduleの情報を参照するコードに編集する + } else if (c == (byte) '.') { + ++count; + if (count > 1) { + break outer; + } + + // TODO Moduleの情報を参照するコードに編集する + } else if (!Character.isWhitespace(c) || c == ',') { + break outer; + } + } + this.putSign(sign); + return; + } + for (int i = 0; i < this.getSize(); ++i) { + this.getDataStorage().setByte(i, (byte) 0x30); + } + this.putSign(0); + } + + /** + * CobolNumericBinaryからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void moveBinaryToDisplay(AbstractCobolField field) { + int sign = 1; + long val = field.getLongValue(); + + if (this.getAttribute().isFlagHaveSign() && val < 0) { + sign = -1; + val = -val; + } + + int i = 20; + byte[] buff = new byte[64]; + while (val > 0) { + buff[--i] = (byte) (val % 10 + 0x30); + val /= 10; + } + + this.storeCommonRegion( + this, new CobolDataStorage(buff, 0), i, (20 - i), field.getAttribute().getScale()); + this.putSign(sign); + } + + private void moveDoubleToDisplay(AbstractCobolField field) { + CobolFieldAttribute thisAttr = this.getAttribute(); + double val = Math.abs(field.getDouble()); + int startIndex = 0; + if (thisAttr.isFlagHaveSign() + && thisAttr.isFlagSignLeading() + && thisAttr.isFlagSignSeparate()) { + startIndex = 1; + } + CobolDataStorage dstStorage = this.getDataStorage().getSubDataStorage(startIndex); + dstStorage.memcpy(String.valueOf(val), thisAttr.getDigits()); + this.putSign(field.getSign() >= 0 ? 1 : -1); + } + + private void moveEditedToDisplay(AbstractCobolField field) { + byte[] buff = new byte[64]; + int p = 0; + boolean havePoint = false; + int scale = 0; + int sign = 0; + + for (int i = 0; i < field.getSize(); ++i) { + int cp = field.getDataStorage().getByte(i); + switch (cp) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buff[p++] = (byte) cp; + if (havePoint) { + ++scale; + } + break; + case '.': + case ',': + if (cp == CobolModule.getCurrentModule().decimal_point) { + havePoint = true; + } + break; + case '-': + case 'C': + sign = -1; + break; + default: + break; + } + } + + byte[] picBytes = field.getAttribute().getPic().getBytes(); + int count = 0; + if (scale == 0) { + for (int p1 = 0; p1 < picBytes.length; p1 += 5) { + byte c = picBytes[p1]; + ByteBuffer buf = ByteBuffer.wrap(picBytes, p1 + 1, 4); + buf.order(ByteOrder.LITTLE_ENDIAN); + int n = buf.getInt(); + if (c == '9' || c == '0' || c == 'Z' || c == '*') { + if (havePoint) { + scale += n; + } else { + count += n; + } + } else if (c == 'P') { + if (count == 0) { + havePoint = true; + scale += n; + } else { + scale -= n; + } + } else if (c == 'V') { + havePoint = true; + } + } + } + + storeCommonRegion(this, new CobolDataStorage(buff), p, scale); + this.putSign(sign); + } + + @Override + public int getSign() { + CobolFieldAttribute attr = this.getAttribute(); + if (!attr.isFlagHaveSign()) { + return 0; + } + + int p; + if (attr.isFlagSignLeading()) { + p = 0; + } else { + p = this.getSize() - 1; + } + byte value = this.getDataStorage().getByte(p); + if (attr.isFlagSignSeparate()) { + return value == 0x2b ? 1 : -1; + } else { + if (0x30 <= value && value <= 0x39) { + return 1; + } + if (value == 0x20) { + this.getDataStorage().setByte(p, (byte) 0x30); + return 1; + } + + // TODO 以下のコメントアウトを外して,他の部分も修正してテストする + // if(CobolModule.getCurrentModule().display_sign != 0) { + // return 1; + // return getSignEbcdic(p); + // } else { + // return -1; + // } + + // this.getDataStorage().setByte(p, (byte) (this.getDataStorage().getByte(p) - + // 0x40)); + return -1; + } + } + + @Override + public void putSign(int sign) { + CobolFieldAttribute attr = this.getAttribute(); + int p; + + if (!attr.isFlagHaveSign()) { + return; + } + + if (attr.isFlagSignLeading()) { + p = 0; + } else { + p = this.getSize() - 1; + } + + byte value = this.getDataStorage().getByte(p); + if (attr.isFlagSignSeparate()) { + // 0x2dは'-', 0x2bは'+' + byte c = (byte) ((sign < 0) ? 0x2d : 0x2b); + if (value != c) { + this.getDataStorage().setByte(p, c); + } + // TODO 以下のコメントを外して他の部分も修正してテストする + } // else if (CobolModule.getCurrentModule().display_sign != 0) { + /// this.putSignEbcdic(p, sign); + // } + + else { + value = (byte) (value >= 0x70 ? value - 0x40 : value); + this.getDataStorage().setByte(p, (byte) (sign < 0 ? value + 0x40 : value)); + } + } + + /** + * libcob/move.cのstore_common_regionの実装 + * + * @param field TODO: 準備中 + * @param data TODO: 準備中 + * @param size TODO: 準備中 + * @param scale TODO: 準備中 + */ + private void storeCommonRegion( + AbstractCobolField field, CobolDataStorage data, int size, int scale) { + this.storeCommonRegion(field, data, 0, size, scale); + } + + /** + * libcob/move.cのstore_common_regionの実装 + * + * @param field TODO: 準備中 + * @param data TODO: 準備中 + * @param dataStartIndex TODO: 準備中 + * @param size TODO: 準備中 + * @param scale TODO: 準備中 + */ + private void storeCommonRegion( + AbstractCobolField field, + CobolDataStorage data, + int dataStartIndex, + int size, + int scale) { + int lf1 = -scale; + int lf2 = -field.getAttribute().getScale(); + int hf1 = size + lf1; + int hf2 = field.getFieldSize() + lf2; + + int lcf = Math.max(lf1, lf2); + int gcf = Math.min(hf1, hf2); + + for (int i = 0; i < field.getFieldSize(); ++i) { + field.getDataStorage().setByte(i + field.getFirstDataIndex(), (byte) 0x30); + } + + if (gcf > lcf) { + int csize = gcf - lcf; + int p = hf1 - gcf; + int q = field.getFirstDataIndex() + hf2 - gcf; + for (int cinc = 0; cinc < csize; ++cinc, ++p, ++q) { + if (data.getByte(dataStartIndex + p) == (byte) 0x20) { + field.getDataStorage().setByte(q, (byte) 0x30); + } else { + byte value = data.getByte(dataStartIndex + p); + field.getDataStorage().setByte(q, value); + } + } + } + } + + @Override + public void moveFrom(byte[] bytes) { + this.dataStorage.setData(bytes); + } + + @Override + public void moveFrom(String string) { + try { + this.dataStorage.setData(string.getBytes("SJIS")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + + @Override + public void moveFrom(int number) { + int n = Math.abs(number); + for (int i = 0; i < this.size; ++i) { + this.dataStorage.setByte(i, (byte) 0x30); + } + + for (int i = this.size - 1; i >= 0; --i) { + this.dataStorage.setByte(i, (byte) (0x30 + n % 10)); + n /= 10; + } + + if (number < 0 && this.getAttribute().isFlagHaveSign()) { + this.putSign(-1); + } + } + + @Override + public int subInt(int in) { + return this.addInt(-in, CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW); + } + + private int subInt(int in, int opt) { + return this.addInt(-in, opt); + } + + @Override + public int addInt(int in) { + return this.addInt(in, CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW); + } + + private int addInt(int in, int opt) { + if (in == 0) { + return 0; + } + + int n = in; + CobolDataStorage data = this.getDataStorage(); + int firstDataIndex = this.getFirstDataIndex(); + int size = this.getFieldSize(); + int scale = this.getAttribute().getScale(); + int sign = this.getSign(); + int osize = size; + byte[] tfield = new byte[64]; + + for (int i = 0; i < osize; ++i) { + tfield[i] = data.getByte(firstDataIndex + i); + } + + if (sign < 0) { + n = -n; + } + while (scale > 0) { + --scale; + n *= 10; + } + + if (scale < 0) { + if (-scale < 10) { + while (scale != 0) { + ++scale; + n /= 10; + } + } else { + n = 0; + } + } else { + size -= scale; + } + + if (n > 0) { + if (displayAddInt(data, firstDataIndex, size, n) != 0) { + for (int i = 0; i < osize; ++i) { + data.setByte(firstDataIndex + i, tfield[i]); + } + CobolRuntimeException.setException(CobolExceptionId.COB_EC_SIZE_OVERFLOW); + if ((opt & CobolDecimal.COB_STORE_KEEP_ON_OVERFLOW) > 0) { + this.putSign(sign); + return CobolRuntimeException.code; + } + } + } else if (n < 0) { + if (displaySubInt(data, firstDataIndex, size, -n) != 0) { + for (int i = 0; i < size; ++i) { + byte val = data.getByte(firstDataIndex + i); + data.setByte(firstDataIndex + i, (byte) (9 - (val - 0x30) + 0x30)); + } + displayAddInt(data, firstDataIndex, size, 1); + sign = -sign; + } + } + + this.putSign(sign); + return 0; + } + + /** + * libcob/numeric.cのdisplay_add_intの実装 + * + * @param data TODO: 準備中 + * @param firstDataIndex dataにアクセスするときの開始位置 + * @param size TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private int displayAddInt(CobolDataStorage data, int firstDataIndex, int size, long n) { + int carry = 0; + int sp = firstDataIndex + size; + int i; + while (n > 0) { + i = (int) (n % 10L); + n /= 10; + + /* check for overflow */ + --sp; + if (sp < firstDataIndex) { + if (CobolModule.getCurrentModule().flag_binary_truncate == 0) { + return 0; + } + return 1; + } + + /* perform addtion */ + int is = (data.getByte(sp) & 0x0F) + i + carry; + if (is > 9) { + carry = 1; + data.setByte(sp, (byte) (0x30 + (is % 10))); + } else { + carry = 0; + data.setByte(sp, (byte) (0x30 + is)); + } + } + if (carry == 0) { + return 0; + } + + /* carry up */ + while (--sp >= firstDataIndex) { + byte val = data.getByte(sp); + data.setByte(sp, (byte) (val + 1)); + if (val + 1 <= '9') { + return 0; + } + data.setByte(sp, (byte) '0'); + } + + if (CobolModule.getCurrentModule().flag_binary_truncate == 0) { + return 0; + } + return 1; + } + + private static int displaySubInt(CobolDataStorage data, int firstDataIndex, int size, long n) { + int carry = 0; + int sp = firstDataIndex + size; + int i; + while (n > 0) { + i = (int) (n % 10L); + n /= 10; + + /* check for overflow */ + --sp; + if (sp < firstDataIndex) { + return 1; + } + + /* perform subtraction */ + byte val = data.getByte(sp); + data.setByte(sp, (byte) (val - (i + carry))); + if (val - (i + carry) < '0') { + carry = 1; + data.setByte(sp, (byte) (data.getByte(sp) + 10)); + } else { + carry = 0; + } + } + if (carry == 0) { + return 0; + } + + /* carry up */ + while (--sp >= firstDataIndex) { + byte val = data.getByte(sp); + data.setByte(sp, (byte) (val - 1)); + if (val - 1 >= '0') { + return 0; + } + data.setByte(sp, (byte) '9'); + } + return 1; + } + + @Override + public int add(AbstractCobolField field, int opt) throws CobolStopRunException { + CobolFieldAttribute attr = field.getAttribute(); + if (attr.isTypeNumeric() + && attr.getDigits() <= 9 + && attr.getScale() == 0 + && this.getAttribute().getScale() == 0) { + return this.addInt(field.getInt(), opt); + } else { + return super.add(field, opt); + } + } + + @Override + public int sub(AbstractCobolField field, int opt) throws CobolStopRunException { + CobolFieldAttribute attr = field.getAttribute(); + if (attr.isTypeNumeric() + && attr.getDigits() <= 9 + && attr.getScale() == 0 + && this.getAttribute().getScale() == 0) { + return this.subInt(field.getInt(), opt); + } else { + return super.sub(field, opt); + } + } + + @Override + public CobolNumericField getNumericField() { + return this; + } + + /* + * @Override + * public void moveFrom(double number) { + * this.moveFrom((int) number); + * } + */ + + @Override + public void moveFrom(BigDecimal number) {} + + @Override + public void moveFrom(CobolDataStorage dataStorage) {} + + @Override + public int addPackedInt(int n) { + throw new CobolRuntimeException(0, "実装しないコード"); + } + + @Override + public long getLong() { + int size = this.getSize(); + CobolDataStorage data = this.getDataStorage(); + int sign = this.getSign(); + int i = 0; + + for (i = 0; i < size; ++i) { + if (data.getByte(i) != '0') { + break; + } + } + + long val = 0; + int scale = this.getAttribute().getScale(); + if (scale < 0) { + for (; i < size; ++i) { + val = val * 10 + (data.getByte(i) - '0'); + } + val *= CobolConstant.exp10LL[-scale]; + } else { + size -= scale; + for (; i < size; ++i) { + val = val * 10 + (data.getByte(i) - '0'); + } + } + if (sign < 0) { + val = -val; + } + this.putSign(sign); + return val; + } + + @Override + public int numericCompareTo(AbstractCobolField field) { + CobolFieldAttribute attr1 = this.getAttribute(); + CobolFieldAttribute attr2 = field.getAttribute(); + if (attr2.isTypeNumericDisplay()) { + final int scale1 = attr1.getScale(); + final int scale2 = attr2.getScale(); + final int firstIndex1 = this.getFirstDataIndex(); + final int firstIndex2 = field.getFirstDataIndex(); + final int fieldSize1 = this.getFieldSize(); + final int fieldSize2 = field.getFieldSize(); + final int size1 = this.getSize(); + final int size2 = field.getSize(); + final int pointIndex1 = fieldSize1 - scale1; + final int pointIndex2 = fieldSize2 - scale2; + int sign1 = this.getSign(); + int sign2 = field.getSign(); + sign1 = sign1 > 0 ? 1 : sign1 < 0 ? -1 : 1; + sign2 = sign2 > 0 ? 1 : sign2 < 0 ? -1 : 1; + + final int signIndex1 = + attr1.isFlagHaveSign() && !attr1.isFlagSignLeading() ? size1 - 1 : firstIndex1; + final int signIndex2 = + attr2.isFlagHaveSign() && !attr2.isFlagSignLeading() ? size2 - 1 : firstIndex2; + final int l1 = -pointIndex1; + final int l2 = -pointIndex2; + final int r1 = fieldSize1 - pointIndex1; + final int r2 = fieldSize2 - pointIndex2; + final int left = Math.min(l1, l2); + final int right = Math.max(r1, r2); + final int lastIndex1; + if (attr1.isFlagHaveSign() + && !attr1.isFlagSignLeading() + && attr1.isFlagSignSeparate()) { + lastIndex1 = size1 - 2; + } else { + lastIndex1 = size1 - 1; + } + final int lastIndex2; + if (attr2.isFlagHaveSign() + && !attr2.isFlagSignLeading() + && attr2.isFlagSignSeparate()) { + lastIndex2 = size2 - 2; + } else { + lastIndex2 = size2 - 1; + } + CobolDataStorage d1 = this.getDataStorage(); + CobolDataStorage d2 = field.getDataStorage(); + for (int i = left; i < right; ++i) { + final int i1 = firstIndex1 + i + pointIndex1; + final int i2 = firstIndex2 + i + pointIndex2; + byte b1; + if (i1 < firstIndex1 || i1 > lastIndex1) { + b1 = (byte) '0'; + } else { + b1 = d1.getByte(i1); + if (i1 == signIndex1 && b1 >= 0x70) { + b1 -= 0x40; + } + } + byte b2; + if (i2 < firstIndex2 || i2 > lastIndex2) { + b2 = (byte) '0'; + } else { + b2 = d2.getByte(i2); + if (i2 == signIndex2 && b2 >= 0x70) { + b2 -= 0x40; + } + } + if (b1 != b2) { + return (sign1 * (int) b1) - (sign2 * (int) b2); + } + } + + if (sign1 * sign2 >= 0) { + return 0; + } else if (sign1 > 0) { + return 1; + } else { + return -1; + } + } else { + return super.numericCompareTo(field); + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java index ea32e821..122a0fd2 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java @@ -1,876 +1,876 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.data; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; - -/** PIC 文字列が9(5) COMP-3などの変数を表現するクラス. */ -public class CobolNumericPackedField extends AbstractCobolField { - private static final byte[] packed_bytes = { - 0x00, - 0x01, - 0x02, - 0x03, - 0x04, - 0x05, - 0x06, - 0x07, - 0x08, - 0x09, - 0x10, - 0x11, - 0x12, - 0x13, - 0x14, - 0x15, - 0x16, - 0x17, - 0x18, - 0x19, - 0x20, - 0x21, - 0x22, - 0x23, - 0x24, - 0x25, - 0x26, - 0x27, - 0x28, - 0x29, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0x40, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x60, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - (byte) 0x80, - (byte) 0x81, - (byte) 0x82, - (byte) 0x83, - (byte) 0x84, - (byte) 0x85, - (byte) 0x86, - (byte) 0x87, - (byte) 0x88, - (byte) 0x89, - (byte) 0x90, - (byte) 0x91, - (byte) 0x92, - (byte) 0x93, - (byte) 0x94, - (byte) 0x95, - (byte) 0x96, - (byte) 0x97, - (byte) 0x98, - (byte) 0x99 - }; - - /** - * コンストラクタ - * - * @param size データを格納するバイト配列の長さ - * @param dataStorage データを格納するバイト配列を扱うオブジェクト - * @param attribute 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) - */ - public CobolNumericPackedField( - int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { - super(size, dataStorage, attribute); - } - - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - */ - public void checkNumeric(String s) {} - - @Override - public byte[] getBytes() { - return dataStorage.getData(); - } - - @Override - public String getString() { - StringBuilder sb = new StringBuilder(); - int digits = this.getAttribute().getDigits(); - int scale = this.getAttribute().getScale(); - int counter = digits - scale; - int len; - if (scale < 0) { - len = digits + scale; - } else { - len = digits; - } - for (int i = 0; i < len; ++i, --counter) { - if (counter == 0) { - sb.append('.'); - } - sb.append((char) (this.getDigit(i) + 0x30)); - } - for (int i = 0; i < -scale; ++i) { - sb.append('0'); - } - - if (this.getAttribute().isFlagHaveSign()) { - if (this.getSign() < 0) { - return "-" + sb; - } else { - return "+" + sb; - } - } else { - return sb.toString(); - } - } - - @Override - public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); - int length = Math.min(this.size, decimalBytes.length); - - for (int i = 0; i < length; ++i) { - this.dataStorage.setByte(this.size - 1 - i, decimalBytes[decimalBytes.length - 1 - i]); - } - } - - @Override - public void moveFrom(AbstractCobolField src) { - AbstractCobolField src1 = this.preprocessOfMoving(src); - if (src1 == null) { - return; - } - - switch (src1.getAttribute().getType()) { - case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: - this.moveDisplayToPacked(src1); - break; - case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: - case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: - case CobolFieldAttribute.COB_TYPE_NATIONAL: - case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: - case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: - this.moveFrom(src1.getNumericField()); - break; - case CobolFieldAttribute.COB_TYPE_GROUP: - CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); - break; - default: - throw new CobolRuntimeException(0, "未実装"); - } - } - - /** - * CobolNumericFieldからthisへの代入を行う - * - * @param field 代入元のデータ(AbstractCobolField型) - */ - private void moveDisplayToPacked(AbstractCobolField field) { - int sign = field.getSign(); - CobolDataStorage data1 = field.getDataStorage(); - int data1FirstIndex = field.getFirstDataIndex(); - int digits1 = field.getAttribute().getDigits(); - int scale1 = field.getAttribute().getScale(); - CobolDataStorage data2 = this.getDataStorage(); - int digits2 = this.getAttribute().getDigits(); - int scale2 = this.getAttribute().getScale(); - int packedRealDigits; - if (scale2 < 0) { - packedRealDigits = digits2 + scale2; - } else { - packedRealDigits = digits2; - } - - /* null check */ - boolean flagNull = true; - for (int i = 0; i < digits1; ++i) { - if (field.getDataStorage().getByte(i) != 0) { - flagNull = false; - } - } - if (flagNull) { - this.getDataStorage().fillBytes((byte) 0, this.getSize()); - return; - } - - /* pack string */ - this.getDataStorage().fillBytes((byte) 0, this.getSize()); - int offset = 1 - (digits2 % 2); - int p; - if (scale2 < 0) { - p = (digits1 - scale1) - digits2; - } else { - p = (digits1 - scale1) - (digits2 - scale2); - } - - boolean isZero = true; - for (int i = offset; i < offset + packedRealDigits; ++i, ++p) { - byte n; - int index1 = data1FirstIndex + p; - if (index1 >= field.getSize() || index1 < data1FirstIndex) { - n = 0; - } else { - byte ch = data1.getByte(index1); - if (ch == (byte) 0x20) { - n = 0; - } else if (ch >= 0x70) { - n = (byte) (ch - 0x70); - } else { - n = (byte) (ch - 0x30); - } - } - isZero &= n == 0; - if (i % 2 == 0) { - data2.setByte(i / 2, (byte) (n << 4)); - } else { - byte value = data2.getByte(i / 2); - data2.setByte(i / 2, (byte) (value | n)); - } - } - - p = this.size - 1; - byte value = this.getDataStorage().getByte(p); - if ((this.getAttribute().getFlags() & CobolFieldAttribute.COB_FLAG_HAVE_SIGN) == 0) { - this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0f)); - } else if (sign < 0 && !isZero) { - this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0d)); - } else { - this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0c)); - } - } - - @Override - public void moveFrom(byte[] bytes) { - this.dataStorage.setData(bytes); - } - - @Override - public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - - @Override - public void moveFrom(int val) { - int n; - int sign = 0; - CobolDataStorage data = this.getDataStorage(); - - if (val == Integer.MIN_VALUE) { - // Integer.MIN_VALUE == -2147483647 - int[] bytes = {2, 1, 4, 7, 4, 8, 3, 6, 4, 8}; - int digits = this.getAttribute().getDigits(); - for (int i = 0; i < digits; ++i) { - if (i < bytes.length) { - this.setDigit(digits - 1 - i, bytes[bytes.length - 1 - i]); - } else { - this.setDigit(digits - 1 - i, 0); - } - } - this.putSign(-1); - return; - } else if (val < 0) { - n = -val; - sign = 1; - } else { - n = val; - } - this.getDataStorage().fillBytes(0, this.getSize()); - int p = this.getSize() - 1; - byte b = data.getByte(p); - b = (byte) ((n % 10) << 4); - if (!this.getAttribute().isFlagHaveSign()) { - b |= 0x0f; - } else if (sign != 0) { - b |= 0x0d; - } else { - b |= 0x0c; - } - data.setByte(p, b); - n /= 10; - p--; - - for (; n != 0 && p >= 0; n /= 100, p--) { - data.setByte(p, packed_bytes[n % 100]); - } - - /* Fixme */ - if (this.getAttribute().getDigits() % 2 == 0) { - data.setByte(0, (byte) (data.getByte(0) & 0x0F)); - } - } - - /** - * 指定の桁に指定の値を設定する - * - * @param index 桁の - * @param value 設定する値 - */ - private void setDigit(int index, int value) { - // 符号を格納 - byte lastByte = this.dataStorage.getByte(this.size - 1); - if (value < 0) { - this.dataStorage.setByte(this.size - 1, (byte) ((lastByte & 0xF0) | 0x0D)); - } else { - this.dataStorage.setByte(this.size - 1, (byte) ((lastByte & 0xF0) | 0x0C)); - } - - int i = this.getByteIndex(index); - - if ((this.getAttribute().getDigits() + index) % 2 == 0) { - byte x = this.dataStorage.getByte(i); - x = (byte) ((x & (0x0F << 4)) | value); - this.dataStorage.setByte(i, x); - } else { - byte x = this.dataStorage.getByte(i); - x = (byte) ((x & 0x0F) | (value << 4)); - this.dataStorage.setByte(i, x); - } - } - - /** - * 指定のけたの値を取得する - * - * @param index 桁 - * @return index桁目の値 - */ - private int getDigit(int index) { - int i = this.getByteIndex(index); - - if ((this.getAttribute().getDigits() + index) % 2 == 0) { - return (byte) (this.dataStorage.getByte(i) & 0x0F); - } else { - return (byte) ((this.dataStorage.getByte(i) >>> 4) & 0x0F); - } - } - - /** - * 指定した桁の値を取得する - * - * @param index 取得する桁の位置 - * @return index番目の桁の値 - */ - private int getByteIndex(int index) { - if (this.getAttribute().getDigits() % 2 == 0) { - return (index + 1) / 2; - } else { - return index / 2; - } - } - - @Override - public CobolNumericField getNumericField() { - int size = this.getAttribute().getDigits(); - int scale = this.getAttribute().getScale(); - CobolFieldAttribute attr = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, - size, - scale, - CobolFieldAttribute.COB_FLAG_HAVE_SIGN, - null); - CobolDataStorage data = new CobolDataStorage(this.getAttribute().getDigits()); - CobolNumericField field = new CobolNumericField(size, data, attr); - field.moveFrom(this); - return field; - } - - @Override - public void moveFrom(BigDecimal number) { - // TODO 自動生成されたメソッド・スタブ - } - - @Override - public void moveFrom(CobolDataStorage dataStorage) { - // TODO 自動生成されたメソッド・スタブ - } - - @Override - public int getSign() { - if (!this.getAttribute().isFlagHaveSign()) { - return 0; - } - int index = this.size - 1; - return (this.dataStorage.getByte(index) & 0x0f) == 0x0d ? -1 : 1; - } - - @Override - public void putSign(int sign) { - int index = this.getSize() - 1; - byte value = this.dataStorage.getByte(index); - if (sign < 0) { - this.getDataStorage().setByte(index, (byte) ((value & 0xf0) | 0x0d)); - } else { - this.getDataStorage().setByte(index, (byte) ((value & 0xf0) | 0x0c)); - } - } - - @Override - public CobolDecimal getDecimal() { - CobolDataStorage data = this.getDataStorage(); - int p = 0; - int digits = this.getAttribute().getDigits(); - int sign = this.getSign(); - int val; - BigDecimal value; - - if (digits % 2 == 0) { - val = data.getByte(p) & 0x0F; - digits--; - p++; - } else { - val = 0; - } - - if (this.getAttribute().getDigits() < 10) { - while (digits > 1) { - if (val != 0) { - val *= 100; - } - if (data.getByte(p) != 0) { - val += (upper4bits(data.getByte(p)) * 10) + (data.getByte(p) & 0x0F); - } - digits -= 2; - p++; - } - if (val != 0) { - val *= 10; - } - val += upper4bits(data.getByte(p)); - value = new BigDecimal(val); - } else { - int valseen = 0; - value = new BigDecimal(val); - if (val != 0) { - valseen = 1; - } - while (digits > 1) { - if (valseen != 0) { - value = value.multiply(new BigDecimal(100)); - } - if (data.getByte(p) != 0) { - int n = (upper4bits(data.getByte(p))) * 10 + (data.getByte(p) & 0x0F); - value = value.add(new BigDecimal(n)); - valseen = 1; - } - digits -= 2; - p++; - } - if (valseen != 0) { - value = value.multiply(BigDecimal.TEN); - } - value = value.add(new BigDecimal(upper4bits(data.getByte(p)))); - } - - if (sign < 0) { - value = value.negate(); - } - return new CobolDecimal(value, this.getAttribute().getScale()); - } - - /** - * byte型データを右に4回シフトした値を返す CとJavaのビット演算の仕様に差異があるため実装した - * - * @param b TODO: 準備中 - * @return b>>4 - */ - private byte upper4bits(byte b) { - return (byte) ((b >>> 4) & 0x0F); - } - - @Override - public int getInt() { - int p = 0; - CobolDataStorage data = this.getDataStorage(); - int val = 0; - - for (int size = 0; size < this.getSize() - 1; ++size, ++p) { - val *= 10; - val += (data.getByte(p) >>> 4) & 0x0F; - val *= 10; - val += data.getByte(p) & 0x0F; - } - val *= 10; - val += (data.getByte(p) >>> 4) & 0x0F; - if ((data.getByte(p) & 0x0F) == 0x0d) { - val = -val; - } - return val; - } - - /** thisの保持する数値データを0に設定する */ - @Override - public void setZero() { - CobolDataStorage data = this.getDataStorage(); - int size = this.getSize(); - for (int i = 0; i < size; ++i) { - data.setByte(i, (byte) 0); - } - if (this.getAttribute().isFlagHaveSign()) { - data.setByte(size - 1, (byte) 0x0C); - } else { - data.setByte(size - 1, (byte) 0x0F); - } - } - - @Override - public int addPackedInt(int val) { - if (val == 0) { - return 0; - } - - int p = this.getSize() - 1; - CobolDataStorage data = this.getDataStorage(); - int n; - if ((data.getByte(p) & 0x0F) == 0x0d) { - if (val > 0) { - return this.addInt(val); - } - n = -val; - } else { - if (val < 0) { - return this.addInt(val); - } - n = val; - } - int inc = upper4bits(data.getByte(p)) + (n % 10); - n /= 10; - int carry = inc / 10; - data.setByte(p, (byte) (((inc % 10) << 4) | data.getByte(p) & 0x0F)); - p--; - - for (int size = 0; size < this.getSize() - 1; ++size, --p) { - if (carry == 0 && n == 0) { - break; - } - byte x = data.getByte(p); - inc = (upper4bits(x) * 10) + (x & 0x0F) + carry + (n % 100); - carry = inc / 100; - n /= 100; - inc %= 100; - data.setByte(p, (byte) (((inc / 10) << 4) | (inc % 10))); - } - return 0; - } - - @Override - public int addInt(int ival) { - if (ival == 0) { - return 0; - } - - long val = ival; - int ndigs = this.getAttribute().getScale(); - while (ndigs > 0) { - --ndigs; - val *= 10; - } - ndigs = this.getAttribute().getDigits(); - if (ndigs <= 0) { - return 0; - } - int sign = this.getSign(); - int msn = 1; - int emptydig = 1 - (this.getAttribute().getDigits() % 2); - int subtr = 0; - - if (sign < 0) { - val = -val; - } - if (val < 0) { - val = -val; - subtr = 1; - } - - int p = ((ndigs + emptydig) / 2) - (1 - msn); - CobolDataStorage data = this.getDataStorage(); - int origdigs = ndigs; - int carry = 0; - int zeroes = 0; - - while (ndigs-- != 0) { - int tval; - if (msn == 0) { - tval = data.getByte(p) & 0x0F; - } else { - tval = upper4bits((byte) (data.getByte(p) & 0xF0)); - } - if (val != 0) { - carry += (val % 10); - val /= 10; - } - if (subtr != 0) { - tval -= carry; - if (tval < 0) { - tval += 10; - carry = 1; - } else { - carry = 0; - } - } else { - tval += carry; - if (tval > 9) { - tval %= 10; - carry = 1; - } else { - carry = 0; - } - } - if (tval == 0) { - zeroes++; - } - if (msn == 0) { - data.setByte(p, (byte) ((data.getByte(p) & 0xF0) | tval)); - msn = 1; - } else { - data.setByte(p, (byte) ((data.getByte(p) & 0x0F) | (tval << 4))); - msn = 0; - p--; - } - } - - if (sign != 0) { - p = this.getSize() - 1; - byte x = data.getByte(p); - if (origdigs == zeroes) { - data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); - } else if (subtr != 0 && carry != 0) { - complementPacked(); - sign = -sign; - if (sign < 0) { - data.setByte(p, (byte) ((x & 0xF0) | 0x0D)); - } else { - data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); - } - } - } else if (subtr != 0 && carry != 0) { - complementPacked(); - } - return 0; - } - - /** libcob/numeric.cのcob_complement_packedの実装 */ - private void complementPacked() { - int ndigs = this.getAttribute().getDigits(); - int msn = 1; - int emptydig = 1 - (this.getAttribute().getDigits() % 2); - int p = ((ndigs + emptydig) / 2) - (1 - msn); - CobolDataStorage data = this.getDataStorage(); - int tval; - int carry = 0; - - while (ndigs-- != 0) { - if (msn == 0) { - tval = data.getByte(p) & 0x0F; - } else { - tval = upper4bits((byte) (data.getByte(p) & 0xF0)); - } - tval += carry; - if (tval > 0) { - carry = 1; - tval = 10 - tval; - } else { - carry = 0; - } - byte x = data.getByte(p); - if (msn == 0) { - data.setByte(p, (byte) (x & 0xF0 | tval)); - msn = 1; - } else { - data.setByte(p, (byte) (x & 0x0F | (tval << 4))); - msn = 0; - p--; - } - } - } - - @Override - public int cmpInt(int n) { - if (this.getAttribute().getDigits() < 10) { - return this.cmpPackedInt(n); - } else { - return this.cmpPacked(n); - } - } - - /** - * libcob/codegen.hのcob_cmp_packed_intの実装 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private int cmpPackedInt(int n) { - CobolDataStorage data = this.getDataStorage(); - int val = 0; - int p = 0; - - for (int size = 0; size < this.getSize() - 1; ++size, ++p) { - val *= 10; - val += (data.getByte(p) >>> 4) & 0x0F; - val *= 10; - val += data.getByte(p) & 0x0F; - } - val *= 10; - val += (data.getByte(p) >> 4) & 0x0F; - if ((data.getByte(p) & 0x0F) == 0x0d) { - val = -val; - } - - return val < n ? -1 : val > n ? 1 : 0; - } - - /** - * libcob/numeric.cのcob_cmp_packedの実装 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private int cmpPacked(int n) { - int sign = this.getSign(); - if (sign >= 0 && n < 0) { - return 1; - } - if (sign < 0 && n >= 0) { - return -1; - } - - int p = 0; - CobolDataStorage data = this.getDataStorage(); - byte[] val1 = new byte[20]; - int inc = 0; - int size; - for (size = 0; size < 20; size++) { - if (size < 20 - this.getSize()) { - val1[size] = 0; - } else { - val1[size] = data.getByte(inc++); - } - } - val1[19] &= 0xF0; - if (this.getAttribute().getDigits() % 2 == 0) { - val1[20 - this.getSize()] &= 0x0F; - } - if (n != CobolDecimal.packedValueInt) { - CobolDecimal.packedValueInt = n; - if (n < 0) { - n = -n; - } - for (int i = 0; i < 6; ++i) { - CobolDecimal.packedValue[14 + i] = 0; - } - if (n != 0) { - p = 19; - CobolDecimal.packedValue[p] = (byte) ((n % 10) << 4); - p--; - n /= 10; - while (n != 0) { - size = n % 100; - CobolDecimal.packedValue[p] = (byte) ((size % 10) | ((size / 10) << 4)); - n /= 100; - p--; - } - } - } - for (size = 0; size < 20; size++) { - if (val1[size] != CobolDecimal.packedValue[size]) { - if (sign < 0) { - return Byte.toUnsignedInt(CobolDecimal.packedValue[size]) - - Byte.toUnsignedInt(val1[size]); - } else { - return Byte.toUnsignedInt(val1[size]) - - Byte.toUnsignedInt(CobolDecimal.packedValue[size]); - } - } - } - return 0; - } - - @Override - public long getLong() { - int digits = this.getAttribute().getDigits(); - int scale = this.getAttribute().getScale(); - CobolDataStorage data = this.getDataStorage(); - int sign = this.getSign(); - int offset = 1 - (this.getAttribute().getDigits() % 2); - int val = 0; - - for (int i = offset; i < digits - scale + offset; ++i) { - val *= 10; - if (i % 2 == 0) { - val += (0xFF & data.getByte(i / 2)) >> 4; - } else { - val += data.getByte(i / 2) & 0x0F; - } - } - - if (sign < 0) { - val = -val; - } - return val; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.data; + +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; + +/** PIC 文字列が9(5) COMP-3などの変数を表現するクラス. */ +public class CobolNumericPackedField extends AbstractCobolField { + private static final byte[] packed_bytes = { + 0x00, + 0x01, + 0x02, + 0x03, + 0x04, + 0x05, + 0x06, + 0x07, + 0x08, + 0x09, + 0x10, + 0x11, + 0x12, + 0x13, + 0x14, + 0x15, + 0x16, + 0x17, + 0x18, + 0x19, + 0x20, + 0x21, + 0x22, + 0x23, + 0x24, + 0x25, + 0x26, + 0x27, + 0x28, + 0x29, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + 0x40, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x60, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + (byte) 0x80, + (byte) 0x81, + (byte) 0x82, + (byte) 0x83, + (byte) 0x84, + (byte) 0x85, + (byte) 0x86, + (byte) 0x87, + (byte) 0x88, + (byte) 0x89, + (byte) 0x90, + (byte) 0x91, + (byte) 0x92, + (byte) 0x93, + (byte) 0x94, + (byte) 0x95, + (byte) 0x96, + (byte) 0x97, + (byte) 0x98, + (byte) 0x99 + }; + + /** + * コンストラクタ + * + * @param size データを格納するバイト配列の長さ + * @param dataStorage データを格納するバイト配列を扱うオブジェクト + * @param attribute 変数に関する様々な情報を保持するオブジェクト(符号付か,COMP-3指定かなど) + */ + public CobolNumericPackedField( + int size, CobolDataStorage dataStorage, CobolFieldAttribute attribute) { + super(size, dataStorage, attribute); + } + + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + */ + public void checkNumeric(String s) {} + + @Override + public byte[] getBytes() { + return dataStorage.getData(); + } + + @Override + public String getString() { + StringBuilder sb = new StringBuilder(); + int digits = this.getAttribute().getDigits(); + int scale = this.getAttribute().getScale(); + int counter = digits - scale; + int len; + if (scale < 0) { + len = digits + scale; + } else { + len = digits; + } + for (int i = 0; i < len; ++i, --counter) { + if (counter == 0) { + sb.append('.'); + } + sb.append((char) (this.getDigit(i) + 0x30)); + } + for (int i = 0; i < -scale; ++i) { + sb.append('0'); + } + + if (this.getAttribute().isFlagHaveSign()) { + if (this.getSign() < 0) { + return "-" + sb; + } else { + return "+" + sb; + } + } else { + return sb.toString(); + } + } + + @Override + public void setDecimal(BigDecimal decimal) { + byte[] decimalBytes = decimal.toPlainString().getBytes(); + int length = Math.min(this.size, decimalBytes.length); + + for (int i = 0; i < length; ++i) { + this.dataStorage.setByte(this.size - 1 - i, decimalBytes[decimalBytes.length - 1 - i]); + } + } + + @Override + public void moveFrom(AbstractCobolField src) { + AbstractCobolField src1 = this.preprocessOfMoving(src); + if (src1 == null) { + return; + } + + switch (src1.getAttribute().getType()) { + case CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY: + this.moveDisplayToPacked(src1); + break; + case CobolFieldAttribute.COB_TYPE_NUMERIC_PACKED: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC: + case CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY: + case CobolFieldAttribute.COB_TYPE_NATIONAL: + case CobolFieldAttribute.COB_TYPE_NUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_EDITED: + case CobolFieldAttribute.COB_TYPE_NATIONAL_EDITED: + this.moveFrom(src1.getNumericField()); + break; + case CobolFieldAttribute.COB_TYPE_GROUP: + CobolAlphanumericField.moveAlphanumToAlphanum(this, src1); + break; + default: + throw new CobolRuntimeException(0, "未実装"); + } + } + + /** + * CobolNumericFieldからthisへの代入を行う + * + * @param field 代入元のデータ(AbstractCobolField型) + */ + private void moveDisplayToPacked(AbstractCobolField field) { + int sign = field.getSign(); + CobolDataStorage data1 = field.getDataStorage(); + int data1FirstIndex = field.getFirstDataIndex(); + int digits1 = field.getAttribute().getDigits(); + int scale1 = field.getAttribute().getScale(); + CobolDataStorage data2 = this.getDataStorage(); + int digits2 = this.getAttribute().getDigits(); + int scale2 = this.getAttribute().getScale(); + int packedRealDigits; + if (scale2 < 0) { + packedRealDigits = digits2 + scale2; + } else { + packedRealDigits = digits2; + } + + /* null check */ + boolean flagNull = true; + for (int i = 0; i < digits1; ++i) { + if (field.getDataStorage().getByte(i) != 0) { + flagNull = false; + } + } + if (flagNull) { + this.getDataStorage().fillBytes((byte) 0, this.getSize()); + return; + } + + /* pack string */ + this.getDataStorage().fillBytes((byte) 0, this.getSize()); + int offset = 1 - (digits2 % 2); + int p; + if (scale2 < 0) { + p = (digits1 - scale1) - digits2; + } else { + p = (digits1 - scale1) - (digits2 - scale2); + } + + boolean isZero = true; + for (int i = offset; i < offset + packedRealDigits; ++i, ++p) { + byte n; + int index1 = data1FirstIndex + p; + if (index1 >= field.getSize() || index1 < data1FirstIndex) { + n = 0; + } else { + byte ch = data1.getByte(index1); + if (ch == (byte) 0x20) { + n = 0; + } else if (ch >= 0x70) { + n = (byte) (ch - 0x70); + } else { + n = (byte) (ch - 0x30); + } + } + isZero &= n == 0; + if (i % 2 == 0) { + data2.setByte(i / 2, (byte) (n << 4)); + } else { + byte value = data2.getByte(i / 2); + data2.setByte(i / 2, (byte) (value | n)); + } + } + + p = this.size - 1; + byte value = this.getDataStorage().getByte(p); + if ((this.getAttribute().getFlags() & CobolFieldAttribute.COB_FLAG_HAVE_SIGN) == 0) { + this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0f)); + } else if (sign < 0 && !isZero) { + this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0d)); + } else { + this.getDataStorage().setByte(p, (byte) ((value & 0xf0) | 0x0c)); + } + } + + @Override + public void moveFrom(byte[] bytes) { + this.dataStorage.setData(bytes); + } + + @Override + public void moveFrom(String string) { + try { + this.dataStorage.setData(string.getBytes("SJIS")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + + @Override + public void moveFrom(int val) { + int n; + int sign = 0; + CobolDataStorage data = this.getDataStorage(); + + if (val == Integer.MIN_VALUE) { + // Integer.MIN_VALUE == -2147483647 + int[] bytes = {2, 1, 4, 7, 4, 8, 3, 6, 4, 8}; + int digits = this.getAttribute().getDigits(); + for (int i = 0; i < digits; ++i) { + if (i < bytes.length) { + this.setDigit(digits - 1 - i, bytes[bytes.length - 1 - i]); + } else { + this.setDigit(digits - 1 - i, 0); + } + } + this.putSign(-1); + return; + } else if (val < 0) { + n = -val; + sign = 1; + } else { + n = val; + } + this.getDataStorage().fillBytes(0, this.getSize()); + int p = this.getSize() - 1; + byte b = data.getByte(p); + b = (byte) ((n % 10) << 4); + if (!this.getAttribute().isFlagHaveSign()) { + b |= 0x0f; + } else if (sign != 0) { + b |= 0x0d; + } else { + b |= 0x0c; + } + data.setByte(p, b); + n /= 10; + p--; + + for (; n != 0 && p >= 0; n /= 100, p--) { + data.setByte(p, packed_bytes[n % 100]); + } + + /* Fixme */ + if (this.getAttribute().getDigits() % 2 == 0) { + data.setByte(0, (byte) (data.getByte(0) & 0x0F)); + } + } + + /** + * 指定の桁に指定の値を設定する + * + * @param index 桁の + * @param value 設定する値 + */ + private void setDigit(int index, int value) { + // 符号を格納 + byte lastByte = this.dataStorage.getByte(this.size - 1); + if (value < 0) { + this.dataStorage.setByte(this.size - 1, (byte) ((lastByte & 0xF0) | 0x0D)); + } else { + this.dataStorage.setByte(this.size - 1, (byte) ((lastByte & 0xF0) | 0x0C)); + } + + int i = this.getByteIndex(index); + + if ((this.getAttribute().getDigits() + index) % 2 == 0) { + byte x = this.dataStorage.getByte(i); + x = (byte) ((x & (0x0F << 4)) | value); + this.dataStorage.setByte(i, x); + } else { + byte x = this.dataStorage.getByte(i); + x = (byte) ((x & 0x0F) | (value << 4)); + this.dataStorage.setByte(i, x); + } + } + + /** + * 指定のけたの値を取得する + * + * @param index 桁 + * @return index桁目の値 + */ + private int getDigit(int index) { + int i = this.getByteIndex(index); + + if ((this.getAttribute().getDigits() + index) % 2 == 0) { + return (byte) (this.dataStorage.getByte(i) & 0x0F); + } else { + return (byte) ((this.dataStorage.getByte(i) >>> 4) & 0x0F); + } + } + + /** + * 指定した桁の値を取得する + * + * @param index 取得する桁の位置 + * @return index番目の桁の値 + */ + private int getByteIndex(int index) { + if (this.getAttribute().getDigits() % 2 == 0) { + return (index + 1) / 2; + } else { + return index / 2; + } + } + + @Override + public CobolNumericField getNumericField() { + int size = this.getAttribute().getDigits(); + int scale = this.getAttribute().getScale(); + CobolFieldAttribute attr = + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_NUMERIC_DISPLAY, + size, + scale, + CobolFieldAttribute.COB_FLAG_HAVE_SIGN, + null); + CobolDataStorage data = new CobolDataStorage(this.getAttribute().getDigits()); + CobolNumericField field = new CobolNumericField(size, data, attr); + field.moveFrom(this); + return field; + } + + @Override + public void moveFrom(BigDecimal number) { + // TODO 自動生成されたメソッド・スタブ + } + + @Override + public void moveFrom(CobolDataStorage dataStorage) { + // TODO 自動生成されたメソッド・スタブ + } + + @Override + public int getSign() { + if (!this.getAttribute().isFlagHaveSign()) { + return 0; + } + int index = this.size - 1; + return (this.dataStorage.getByte(index) & 0x0f) == 0x0d ? -1 : 1; + } + + @Override + public void putSign(int sign) { + int index = this.getSize() - 1; + byte value = this.dataStorage.getByte(index); + if (sign < 0) { + this.getDataStorage().setByte(index, (byte) ((value & 0xf0) | 0x0d)); + } else { + this.getDataStorage().setByte(index, (byte) ((value & 0xf0) | 0x0c)); + } + } + + @Override + public CobolDecimal getDecimal() { + CobolDataStorage data = this.getDataStorage(); + int p = 0; + int digits = this.getAttribute().getDigits(); + int sign = this.getSign(); + int val; + BigDecimal value; + + if (digits % 2 == 0) { + val = data.getByte(p) & 0x0F; + digits--; + p++; + } else { + val = 0; + } + + if (this.getAttribute().getDigits() < 10) { + while (digits > 1) { + if (val != 0) { + val *= 100; + } + if (data.getByte(p) != 0) { + val += (upper4bits(data.getByte(p)) * 10) + (data.getByte(p) & 0x0F); + } + digits -= 2; + p++; + } + if (val != 0) { + val *= 10; + } + val += upper4bits(data.getByte(p)); + value = new BigDecimal(val); + } else { + int valseen = 0; + value = new BigDecimal(val); + if (val != 0) { + valseen = 1; + } + while (digits > 1) { + if (valseen != 0) { + value = value.multiply(new BigDecimal(100)); + } + if (data.getByte(p) != 0) { + int n = (upper4bits(data.getByte(p))) * 10 + (data.getByte(p) & 0x0F); + value = value.add(new BigDecimal(n)); + valseen = 1; + } + digits -= 2; + p++; + } + if (valseen != 0) { + value = value.multiply(BigDecimal.TEN); + } + value = value.add(new BigDecimal(upper4bits(data.getByte(p)))); + } + + if (sign < 0) { + value = value.negate(); + } + return new CobolDecimal(value, this.getAttribute().getScale()); + } + + /** + * byte型データを右に4回シフトした値を返す CとJavaのビット演算の仕様に差異があるため実装した + * + * @param b TODO: 準備中 + * @return b>>4 + */ + private byte upper4bits(byte b) { + return (byte) ((b >>> 4) & 0x0F); + } + + @Override + public int getInt() { + int p = 0; + CobolDataStorage data = this.getDataStorage(); + int val = 0; + + for (int size = 0; size < this.getSize() - 1; ++size, ++p) { + val *= 10; + val += (data.getByte(p) >>> 4) & 0x0F; + val *= 10; + val += data.getByte(p) & 0x0F; + } + val *= 10; + val += (data.getByte(p) >>> 4) & 0x0F; + if ((data.getByte(p) & 0x0F) == 0x0d) { + val = -val; + } + return val; + } + + /** thisの保持する数値データを0に設定する */ + @Override + public void setZero() { + CobolDataStorage data = this.getDataStorage(); + int size = this.getSize(); + for (int i = 0; i < size; ++i) { + data.setByte(i, (byte) 0); + } + if (this.getAttribute().isFlagHaveSign()) { + data.setByte(size - 1, (byte) 0x0C); + } else { + data.setByte(size - 1, (byte) 0x0F); + } + } + + @Override + public int addPackedInt(int val) { + if (val == 0) { + return 0; + } + + int p = this.getSize() - 1; + CobolDataStorage data = this.getDataStorage(); + int n; + if ((data.getByte(p) & 0x0F) == 0x0d) { + if (val > 0) { + return this.addInt(val); + } + n = -val; + } else { + if (val < 0) { + return this.addInt(val); + } + n = val; + } + int inc = upper4bits(data.getByte(p)) + (n % 10); + n /= 10; + int carry = inc / 10; + data.setByte(p, (byte) (((inc % 10) << 4) | data.getByte(p) & 0x0F)); + p--; + + for (int size = 0; size < this.getSize() - 1; ++size, --p) { + if (carry == 0 && n == 0) { + break; + } + byte x = data.getByte(p); + inc = (upper4bits(x) * 10) + (x & 0x0F) + carry + (n % 100); + carry = inc / 100; + n /= 100; + inc %= 100; + data.setByte(p, (byte) (((inc / 10) << 4) | (inc % 10))); + } + return 0; + } + + @Override + public int addInt(int ival) { + if (ival == 0) { + return 0; + } + + long val = ival; + int ndigs = this.getAttribute().getScale(); + while (ndigs > 0) { + --ndigs; + val *= 10; + } + ndigs = this.getAttribute().getDigits(); + if (ndigs <= 0) { + return 0; + } + int sign = this.getSign(); + int msn = 1; + int emptydig = 1 - (this.getAttribute().getDigits() % 2); + int subtr = 0; + + if (sign < 0) { + val = -val; + } + if (val < 0) { + val = -val; + subtr = 1; + } + + int p = ((ndigs + emptydig) / 2) - (1 - msn); + CobolDataStorage data = this.getDataStorage(); + int origdigs = ndigs; + int carry = 0; + int zeroes = 0; + + while (ndigs-- != 0) { + int tval; + if (msn == 0) { + tval = data.getByte(p) & 0x0F; + } else { + tval = upper4bits((byte) (data.getByte(p) & 0xF0)); + } + if (val != 0) { + carry += (val % 10); + val /= 10; + } + if (subtr != 0) { + tval -= carry; + if (tval < 0) { + tval += 10; + carry = 1; + } else { + carry = 0; + } + } else { + tval += carry; + if (tval > 9) { + tval %= 10; + carry = 1; + } else { + carry = 0; + } + } + if (tval == 0) { + zeroes++; + } + if (msn == 0) { + data.setByte(p, (byte) ((data.getByte(p) & 0xF0) | tval)); + msn = 1; + } else { + data.setByte(p, (byte) ((data.getByte(p) & 0x0F) | (tval << 4))); + msn = 0; + p--; + } + } + + if (sign != 0) { + p = this.getSize() - 1; + byte x = data.getByte(p); + if (origdigs == zeroes) { + data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); + } else if (subtr != 0 && carry != 0) { + complementPacked(); + sign = -sign; + if (sign < 0) { + data.setByte(p, (byte) ((x & 0xF0) | 0x0D)); + } else { + data.setByte(p, (byte) ((x & 0xF0) | 0x0C)); + } + } + } else if (subtr != 0 && carry != 0) { + complementPacked(); + } + return 0; + } + + /** libcob/numeric.cのcob_complement_packedの実装 */ + private void complementPacked() { + int ndigs = this.getAttribute().getDigits(); + int msn = 1; + int emptydig = 1 - (this.getAttribute().getDigits() % 2); + int p = ((ndigs + emptydig) / 2) - (1 - msn); + CobolDataStorage data = this.getDataStorage(); + int tval; + int carry = 0; + + while (ndigs-- != 0) { + if (msn == 0) { + tval = data.getByte(p) & 0x0F; + } else { + tval = upper4bits((byte) (data.getByte(p) & 0xF0)); + } + tval += carry; + if (tval > 0) { + carry = 1; + tval = 10 - tval; + } else { + carry = 0; + } + byte x = data.getByte(p); + if (msn == 0) { + data.setByte(p, (byte) (x & 0xF0 | tval)); + msn = 1; + } else { + data.setByte(p, (byte) (x & 0x0F | (tval << 4))); + msn = 0; + p--; + } + } + } + + @Override + public int cmpInt(int n) { + if (this.getAttribute().getDigits() < 10) { + return this.cmpPackedInt(n); + } else { + return this.cmpPacked(n); + } + } + + /** + * libcob/codegen.hのcob_cmp_packed_intの実装 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private int cmpPackedInt(int n) { + CobolDataStorage data = this.getDataStorage(); + int val = 0; + int p = 0; + + for (int size = 0; size < this.getSize() - 1; ++size, ++p) { + val *= 10; + val += (data.getByte(p) >>> 4) & 0x0F; + val *= 10; + val += data.getByte(p) & 0x0F; + } + val *= 10; + val += (data.getByte(p) >> 4) & 0x0F; + if ((data.getByte(p) & 0x0F) == 0x0d) { + val = -val; + } + + return val < n ? -1 : val > n ? 1 : 0; + } + + /** + * libcob/numeric.cのcob_cmp_packedの実装 + * + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private int cmpPacked(int n) { + int sign = this.getSign(); + if (sign >= 0 && n < 0) { + return 1; + } + if (sign < 0 && n >= 0) { + return -1; + } + + int p = 0; + CobolDataStorage data = this.getDataStorage(); + byte[] val1 = new byte[20]; + int inc = 0; + int size; + for (size = 0; size < 20; size++) { + if (size < 20 - this.getSize()) { + val1[size] = 0; + } else { + val1[size] = data.getByte(inc++); + } + } + val1[19] &= 0xF0; + if (this.getAttribute().getDigits() % 2 == 0) { + val1[20 - this.getSize()] &= 0x0F; + } + if (n != CobolDecimal.packedValueInt) { + CobolDecimal.packedValueInt = n; + if (n < 0) { + n = -n; + } + for (int i = 0; i < 6; ++i) { + CobolDecimal.packedValue[14 + i] = 0; + } + if (n != 0) { + p = 19; + CobolDecimal.packedValue[p] = (byte) ((n % 10) << 4); + p--; + n /= 10; + while (n != 0) { + size = n % 100; + CobolDecimal.packedValue[p] = (byte) ((size % 10) | ((size / 10) << 4)); + n /= 100; + p--; + } + } + } + for (size = 0; size < 20; size++) { + if (val1[size] != CobolDecimal.packedValue[size]) { + if (sign < 0) { + return Byte.toUnsignedInt(CobolDecimal.packedValue[size]) + - Byte.toUnsignedInt(val1[size]); + } else { + return Byte.toUnsignedInt(val1[size]) + - Byte.toUnsignedInt(CobolDecimal.packedValue[size]); + } + } + } + return 0; + } + + @Override + public long getLong() { + int digits = this.getAttribute().getDigits(); + int scale = this.getAttribute().getScale(); + CobolDataStorage data = this.getDataStorage(); + int sign = this.getSign(); + int offset = 1 - (this.getAttribute().getDigits() % 2); + int val = 0; + + for (int i = offset; i < digits - scale + offset; ++i) { + val *= 10; + if (i % 2 == 0) { + val += (0xFF & data.getByte(i / 2)) >> 4; + } else { + val += data.getByte(i / 2) & 0x0F; + } + } + + if (sign < 0) { + val = -val; + } + return val; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionId.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionId.java index b1e89abe..a082a060 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionId.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionId.java @@ -1,319 +1,466 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.exceptions; - -/** 例外コードを定義するクラス */ -public class CobolExceptionId { - /** この例外コードは使用されない */ - public static final int COB_EC_ZERO = 0; - /** この例外コードは使用されない */ - public static final int COB_EC_ALL = 1; - /** TODO: 準備中 */ - public static final int COB_EC_ARGUMENT = 2; - /** TODO: 準備中 */ - public static final int COB_EC_ARGUMENT_FUNCTION = 3; - /** この例外コードは使用されない */ - public static final int COB_EC_ARGUMENT_IMP = 4; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND = 5; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND_IMP = 6; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND_ODO = 7; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND_OVERFLOW = 8; - /** TODO: 準備中 */ - public static final int COB_EC_BOUND_PTR = 9; - /** TODO: 準備中 */ - public static final int COB_EC_BOUND_REF_MOD = 10; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND_SET = 11; - /** TODO: 準備中 */ - public static final int COB_EC_BOUND_SUBSCRIPT = 12; - /** この例外コードは使用されない */ - public static final int COB_EC_BOUND_TABLE_LIMIT = 13; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA = 14; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_CONVERSION = 15; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_IMP = 16; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_INCOMPATIBLE = 17; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_INTEGRITY = 18; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_PTR_NULL = 19; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_INFINITY = 20; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_NEGATIVE_INFINITY = 21; - /** この例外コードは使用されない */ - public static final int COB_EC_DATA_NOT_A_NUMBER = 22; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW = 23; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_GLOBAL_EXIT = 24; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_GLOBAL_GOBACK = 25; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_IMP = 26; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_RELEASE = 27; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_REPORT = 28; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_RETURN = 29; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_SEARCH = 30; - /** この例外コードは使用されない */ - public static final int COB_EC_FLOW_USE = 31; - /** TODO: 準備中 */ - public static final int COB_EC_I_O = 32; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_AT_END = 33; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_EOP = 34; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_EOP_OVERFLOW = 35; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_FILE_SHARING = 36; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_IMP = 37; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_INVALID_KEY = 38; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_LINAGE = 39; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_LOGIC_ERROR = 40; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_PERMANENT_ERROR = 41; - /** TODO: 準備中 */ - public static final int COB_EC_I_O_RECORD_OPERATION = 42; - /** TODO: 準備中 */ - public static final int COB_EC_IMP = 43; - /** TODO: 準備中 */ - public static final int COB_EC_IMP_ACCEPT = 44; - /** TODO: 準備中 */ - public static final int COB_EC_IMP_DISPLAY = 45; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE = 46; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_IMP = 47; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_INCOMPATIBLE = 48; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_INVALID = 49; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_INVALID_PTR = 50; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_MISSING = 51; - /** この例外コードは使用されない */ - public static final int COB_EC_LOCALE_SIZE = 52; - /** この例外コードは使用されない */ - public static final int COB_EC_OO = 53; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_CONFORMANCE = 54; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_EXCEPTION = 55; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_IMP = 56; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_METHOD = 57; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_NULL = 58; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_RESOURCE = 59; - /** この例外コードは使用されない */ - public static final int COB_EC_OO_UNIVERSAL = 60; - /** この例外コードは使用されない */ - public static final int COB_EC_ORDER = 61; - /** この例外コードは使用されない */ - public static final int COB_EC_ORDER_IMP = 62; - /** この例外コードは使用されない */ - public static final int COB_EC_ORDER_NOT_SUPPORTED = 63; - /** TODO: 準備中 */ - public static final int COB_EC_OVERFLOW = 64; - /** TODO: 準備中 */ - public static final int COB_EC_OVERFLOW_IMP = 65; - /** TODO: 準備中 */ - public static final int COB_EC_OVERFLOW_STRING = 66; - /** TODO: 準備中 */ - public static final int COB_EC_OVERFLOW_UNSTRING = 67; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM = 68; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_ARG_MISMATCH = 69; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_ARG_OMITTED = 70; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_CANCEL_ACTIVE = 71; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_IMP = 72; - /** TODO: 準備中 */ - public static final int COB_EC_PROGRAM_NOT_FOUND = 73; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_PTR_NULL = 74; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_RECURSIVE_CALL = 75; - /** この例外コードは使用されない */ - public static final int COB_EC_PROGRAM_RESOURCES = 76; - /** この例外コードは使用されない */ - public static final int COB_EC_RAISING = 77; - /** この例外コードは使用されない */ - public static final int COB_EC_RAISING_IMP = 78; - /** この例外コードは使用されない */ - public static final int COB_EC_RAISING_NOT_SPECIFIED = 79; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE = 80; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_IMP = 81; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_INDEX = 82; - /** TODO: 準備中 */ - public static final int COB_EC_RANGE_INSPECT_SIZE = 83; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_INVALID = 84; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_PERFORM_VARYING = 85; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_PTR = 86; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_SEARCH_INDEX = 87; - /** この例外コードは使用されない */ - public static final int COB_EC_RANGE_SEARCH_NO_MATCH = 88; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT = 89; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_ACTIVE = 90; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_COLUMN_OVERLAP = 91; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_FILE_MODE = 92; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_IMP = 93; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_INACTIVE = 94; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_LINE_OVERLAP = 95; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_NOT_TERMINATED = 96; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_PAGE_LIMIT = 97; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_PAGE_WIDTH = 98; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_SUM_SIZE = 99; - /** この例外コードは使用されない */ - public static final int COB_EC_REPORT_VARYING = 100; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN = 101; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN_FIELD_OVERLAP = 102; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN_IMP = 103; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN_ITEM_TRUNCATED = 104; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN_LINE_NUMBER = 105; - /** この例外コードは使用されない */ - public static final int COB_EC_SCREEN_STARTING_COLUMN = 106; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE = 107; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_ADDRESS = 108; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_EXPONENTIATION = 109; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_IMP = 110; - /** TODO: 準備中 */ - public static final int COB_EC_SIZE_OVERFLOW = 111; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_TRUNCATION = 112; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_UNDERFLOW = 113; - /** この例外コードは使用されない */ - public static final int COB_EC_SIZE_ZERO_DIVIDE = 114; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE = 115; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_ACTIVE = 116; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_FILE_OPEN = 117; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_IMP = 118; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_RELEASE = 119; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_RETURN = 120; - /** この例外コードは使用されない */ - public static final int COB_EC_SORT_MERGE_SEQUENCE = 121; - /** この例外コードは使用されない */ - public static final int COB_EC_STORAGE = 122; - /** この例外コードは使用されない */ - public static final int COB_EC_STORAGE_IMP = 123; - /** この例外コードは使用されない */ - public static final int COB_EC_STORAGE_NOT_ALLOC = 124; - /** この例外コードは使用されない */ - public static final int COB_EC_STORAGE_NOT_AVAIL = 125; - /** この例外コードは使用されない */ - public static final int COB_EC_USER = 126; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE = 127; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE_CONTENT = 128; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE_FORMAT = 129; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE_IMP = 130; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE_RELATION = 131; - /** この例外コードは使用されない */ - public static final int COB_EC_VALIDATE_VARYING = 132; - /** この例外コードは使用されない */ - public static final int COB_EC_FUNCTION = 133; - /** この例外コードは使用されない */ - public static final int COB_EC_FUNCTION_NOT_FOUND = 134; - /** この例外コードは使用されない */ - public static final int COB_EC_FUNCTION_PTR_INVALID = 135; - /** この例外コードは使用されない */ - public static final int COB_EC_FUNCTION_PTR_NULL = 136; - /** この例外コードは使用されない */ - public static final int COB_EC_XML = 137; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_CODESET = 138; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_CODESET_CONVERSION = 139; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_COUNT = 140; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_DOCUMENT_TYPE = 141; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_IMPLICIT_CLOSE = 142; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_INVALID = 143; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_NAMESPACE = 144; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_STACKED_OPEN = 145; - /** この例外コードは使用されない */ - public static final int COB_EC_XML_RANGE = 146; - /** この例外コードは使用されない */ - public static final int COB_EC_MAX = 147; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.exceptions; + +/** 例外コードを定義するクラス */ +public class CobolExceptionId { + /** この例外コードは使用されない */ + public static final int COB_EC_ZERO = 0; + + /** この例外コードは使用されない */ + public static final int COB_EC_ALL = 1; + + /** TODO: 準備中 */ + public static final int COB_EC_ARGUMENT = 2; + + /** TODO: 準備中 */ + public static final int COB_EC_ARGUMENT_FUNCTION = 3; + + /** この例外コードは使用されない */ + public static final int COB_EC_ARGUMENT_IMP = 4; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND = 5; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND_IMP = 6; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND_ODO = 7; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND_OVERFLOW = 8; + + /** TODO: 準備中 */ + public static final int COB_EC_BOUND_PTR = 9; + + /** TODO: 準備中 */ + public static final int COB_EC_BOUND_REF_MOD = 10; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND_SET = 11; + + /** TODO: 準備中 */ + public static final int COB_EC_BOUND_SUBSCRIPT = 12; + + /** この例外コードは使用されない */ + public static final int COB_EC_BOUND_TABLE_LIMIT = 13; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA = 14; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_CONVERSION = 15; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_IMP = 16; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_INCOMPATIBLE = 17; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_INTEGRITY = 18; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_PTR_NULL = 19; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_INFINITY = 20; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_NEGATIVE_INFINITY = 21; + + /** この例外コードは使用されない */ + public static final int COB_EC_DATA_NOT_A_NUMBER = 22; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW = 23; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_GLOBAL_EXIT = 24; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_GLOBAL_GOBACK = 25; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_IMP = 26; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_RELEASE = 27; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_REPORT = 28; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_RETURN = 29; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_SEARCH = 30; + + /** この例外コードは使用されない */ + public static final int COB_EC_FLOW_USE = 31; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O = 32; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_AT_END = 33; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_EOP = 34; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_EOP_OVERFLOW = 35; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_FILE_SHARING = 36; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_IMP = 37; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_INVALID_KEY = 38; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_LINAGE = 39; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_LOGIC_ERROR = 40; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_PERMANENT_ERROR = 41; + + /** TODO: 準備中 */ + public static final int COB_EC_I_O_RECORD_OPERATION = 42; + + /** TODO: 準備中 */ + public static final int COB_EC_IMP = 43; + + /** TODO: 準備中 */ + public static final int COB_EC_IMP_ACCEPT = 44; + + /** TODO: 準備中 */ + public static final int COB_EC_IMP_DISPLAY = 45; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE = 46; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_IMP = 47; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_INCOMPATIBLE = 48; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_INVALID = 49; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_INVALID_PTR = 50; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_MISSING = 51; + + /** この例外コードは使用されない */ + public static final int COB_EC_LOCALE_SIZE = 52; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO = 53; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_CONFORMANCE = 54; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_EXCEPTION = 55; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_IMP = 56; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_METHOD = 57; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_NULL = 58; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_RESOURCE = 59; + + /** この例外コードは使用されない */ + public static final int COB_EC_OO_UNIVERSAL = 60; + + /** この例外コードは使用されない */ + public static final int COB_EC_ORDER = 61; + + /** この例外コードは使用されない */ + public static final int COB_EC_ORDER_IMP = 62; + + /** この例外コードは使用されない */ + public static final int COB_EC_ORDER_NOT_SUPPORTED = 63; + + /** TODO: 準備中 */ + public static final int COB_EC_OVERFLOW = 64; + + /** TODO: 準備中 */ + public static final int COB_EC_OVERFLOW_IMP = 65; + + /** TODO: 準備中 */ + public static final int COB_EC_OVERFLOW_STRING = 66; + + /** TODO: 準備中 */ + public static final int COB_EC_OVERFLOW_UNSTRING = 67; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM = 68; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_ARG_MISMATCH = 69; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_ARG_OMITTED = 70; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_CANCEL_ACTIVE = 71; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_IMP = 72; + + /** TODO: 準備中 */ + public static final int COB_EC_PROGRAM_NOT_FOUND = 73; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_PTR_NULL = 74; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_RECURSIVE_CALL = 75; + + /** この例外コードは使用されない */ + public static final int COB_EC_PROGRAM_RESOURCES = 76; + + /** この例外コードは使用されない */ + public static final int COB_EC_RAISING = 77; + + /** この例外コードは使用されない */ + public static final int COB_EC_RAISING_IMP = 78; + + /** この例外コードは使用されない */ + public static final int COB_EC_RAISING_NOT_SPECIFIED = 79; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE = 80; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_IMP = 81; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_INDEX = 82; + + /** TODO: 準備中 */ + public static final int COB_EC_RANGE_INSPECT_SIZE = 83; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_INVALID = 84; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_PERFORM_VARYING = 85; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_PTR = 86; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_SEARCH_INDEX = 87; + + /** この例外コードは使用されない */ + public static final int COB_EC_RANGE_SEARCH_NO_MATCH = 88; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT = 89; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_ACTIVE = 90; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_COLUMN_OVERLAP = 91; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_FILE_MODE = 92; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_IMP = 93; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_INACTIVE = 94; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_LINE_OVERLAP = 95; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_NOT_TERMINATED = 96; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_PAGE_LIMIT = 97; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_PAGE_WIDTH = 98; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_SUM_SIZE = 99; + + /** この例外コードは使用されない */ + public static final int COB_EC_REPORT_VARYING = 100; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN = 101; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN_FIELD_OVERLAP = 102; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN_IMP = 103; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN_ITEM_TRUNCATED = 104; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN_LINE_NUMBER = 105; + + /** この例外コードは使用されない */ + public static final int COB_EC_SCREEN_STARTING_COLUMN = 106; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE = 107; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_ADDRESS = 108; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_EXPONENTIATION = 109; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_IMP = 110; + + /** TODO: 準備中 */ + public static final int COB_EC_SIZE_OVERFLOW = 111; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_TRUNCATION = 112; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_UNDERFLOW = 113; + + /** この例外コードは使用されない */ + public static final int COB_EC_SIZE_ZERO_DIVIDE = 114; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE = 115; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_ACTIVE = 116; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_FILE_OPEN = 117; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_IMP = 118; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_RELEASE = 119; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_RETURN = 120; + + /** この例外コードは使用されない */ + public static final int COB_EC_SORT_MERGE_SEQUENCE = 121; + + /** この例外コードは使用されない */ + public static final int COB_EC_STORAGE = 122; + + /** この例外コードは使用されない */ + public static final int COB_EC_STORAGE_IMP = 123; + + /** この例外コードは使用されない */ + public static final int COB_EC_STORAGE_NOT_ALLOC = 124; + + /** この例外コードは使用されない */ + public static final int COB_EC_STORAGE_NOT_AVAIL = 125; + + /** この例外コードは使用されない */ + public static final int COB_EC_USER = 126; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE = 127; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE_CONTENT = 128; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE_FORMAT = 129; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE_IMP = 130; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE_RELATION = 131; + + /** この例外コードは使用されない */ + public static final int COB_EC_VALIDATE_VARYING = 132; + + /** この例外コードは使用されない */ + public static final int COB_EC_FUNCTION = 133; + + /** この例外コードは使用されない */ + public static final int COB_EC_FUNCTION_NOT_FOUND = 134; + + /** この例外コードは使用されない */ + public static final int COB_EC_FUNCTION_PTR_INVALID = 135; + + /** この例外コードは使用されない */ + public static final int COB_EC_FUNCTION_PTR_NULL = 136; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML = 137; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_CODESET = 138; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_CODESET_CONVERSION = 139; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_COUNT = 140; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_DOCUMENT_TYPE = 141; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_IMPLICIT_CLOSE = 142; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_INVALID = 143; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_NAMESPACE = 144; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_STACKED_OPEN = 145; + + /** この例外コードは使用されない */ + public static final int COB_EC_XML_RANGE = 146; + + /** この例外コードは使用されない */ + public static final int COB_EC_MAX = 147; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionInfo.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionInfo.java index 032a4c01..ac4262c7 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionInfo.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionInfo.java @@ -1,34 +1,34 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.exceptions; - -/** エラーコードを保持する。 */ -public class CobolExceptionInfo { - /** エラーコード。TODO: 準備中 */ - public static int code = 0; - - /** - * エラーコードを設定する。TODO: 準備中 - * - * @param id TODO: 準備中 - */ - public static void setException(int id) { - CobolExceptionInfo.code = CobolExceptionTabCode.code[id]; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.exceptions; + +/** エラーコードを保持する。 */ +public class CobolExceptionInfo { + /** エラーコード。TODO: 準備中 */ + public static int code = 0; + + /** + * エラーコードを設定する。TODO: 準備中 + * + * @param id TODO: 準備中 + */ + public static void setException(int id) { + CobolExceptionInfo.code = CobolExceptionTabCode.code[id]; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionTabCode.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionTabCode.java index 7080124e..d3556de8 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionTabCode.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolExceptionTabCode.java @@ -1,38 +1,49 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.exceptions; - -/** エラーコード関連の計算に用いる */ -public class CobolExceptionTabCode { - static int[] code = { - 0, 0xFFFF, 0x0100, 0x0101, 0x0102, 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, 0x0206, - 0x0207, 0x0208, 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, 0x0400, - 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0500, 0x0501, 0x0502, 0x0503, - 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050A, 0x0600, 0x0601, 0x0602, 0x0700, 0x0701, - 0x0702, 0x0703, 0x0704, 0x0705, 0x0706, 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, 0x0806, - 0x0807, 0x0900, 0x0901, 0x0902, 0x0A00, 0x0A01, 0x0A02, 0x0A03, 0x0B00, 0x0B01, 0x0B02, 0x0B03, - 0x0B04, 0x0B05, 0x0B06, 0x0B07, 0x0B08, 0x0C00, 0x0C01, 0x0C02, 0x0D00, 0x0D01, 0x0D02, 0x0D03, - 0x0D04, 0x0D05, 0x0D06, 0x0D07, 0x0D08, 0x0E00, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, - 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0F00, 0x0F01, 0x0F02, 0x0F03, 0x0F04, 0x0F05, 0x1000, - 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1100, 0x1101, 0x1102, 0x1103, 0x1104, - 0x1105, 0x1106, 0x1200, 0x1201, 0x1202, 0x1203, 0x1300, 0x1400, 0x1401, 0x1402, 0x1403, 0x1404, - 0x1405, 0x1500, 0x1501, 0x1502, 0x1503, 0x1600, 0x1601, 0x1602, 0x1603, 0x1604, 0x1605, 0x1606, - 0x1607, 0x1608, 0x1609, 0 - }; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.exceptions; + +/** エラーコード関連の計算に用いる */ +public class CobolExceptionTabCode { + static int[] code = { + 0, 0xFFFF, 0x0100, 0x0101, 0x0102, 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, 0x0206, + 0x0207, 0x0208, 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, 0x0308, + 0x0400, + 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0500, 0x0501, 0x0502, + 0x0503, + 0x0504, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050A, 0x0600, 0x0601, 0x0602, 0x0700, + 0x0701, + 0x0702, 0x0703, 0x0704, 0x0705, 0x0706, 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, + 0x0806, + 0x0807, 0x0900, 0x0901, 0x0902, 0x0A00, 0x0A01, 0x0A02, 0x0A03, 0x0B00, 0x0B01, 0x0B02, + 0x0B03, + 0x0B04, 0x0B05, 0x0B06, 0x0B07, 0x0B08, 0x0C00, 0x0C01, 0x0C02, 0x0D00, 0x0D01, 0x0D02, + 0x0D03, + 0x0D04, 0x0D05, 0x0D06, 0x0D07, 0x0D08, 0x0E00, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, + 0x0E06, + 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0F00, 0x0F01, 0x0F02, 0x0F03, 0x0F04, 0x0F05, + 0x1000, + 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1100, 0x1101, 0x1102, 0x1103, + 0x1104, + 0x1105, 0x1106, 0x1200, 0x1201, 0x1202, 0x1203, 0x1300, 0x1400, 0x1401, 0x1402, 0x1403, + 0x1404, + 0x1405, 0x1500, 0x1501, 0x1502, 0x1503, 0x1600, 0x1601, 0x1602, 0x1603, 0x1604, 0x1605, + 0x1606, + 0x1607, 0x1608, 0x1609, 0 + }; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolGoBackException.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolGoBackException.java index 34175070..7dbe82a7 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolGoBackException.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolGoBackException.java @@ -23,65 +23,65 @@ /** GOBACKの呼び出し時にスローされる例外。返り値を保持する */ public final class CobolGoBackException extends Exception { - /** 返り値 */ - private int returnCode; + /** 返り値 */ + private int returnCode; - /** - * コンストラクタ - * - * @param returnCode 返り値 - */ - private CobolGoBackException(int returnCode) { - this.returnCode = returnCode; - } + /** + * コンストラクタ + * + * @param returnCode 返り値 + */ + private CobolGoBackException(int returnCode) { + this.returnCode = returnCode; + } - /** - * コンストラクタ - * - * @param returnCode 返り値 - */ - private CobolGoBackException(CobolDataStorage storage) { - this(storage.intValue()); - } + /** + * コンストラクタ + * + * @param returnCode 返り値 + */ + private CobolGoBackException(CobolDataStorage storage) { + this(storage.intValue()); + } - /** - * このクラスが保持するGOBACKの返り値を取得する。 - * - * @return このクラスが保持するGOBACKの返り値 - */ - public int getReturnCode() { - return returnCode; - } + /** + * このクラスが保持するGOBACKの返り値を取得する。 + * + * @return このクラスが保持するGOBACKの返り値 + */ + public int getReturnCode() { + return returnCode; + } - /** - * CobolGoBackExceptionを例外として投げる。 - * - * @param returnCode GOBACKの返り値 - * @throws CobolGoBackException TODO: 準備中 - */ - public static void throwException(int returnCode) throws CobolGoBackException { - throw new CobolGoBackException(returnCode); - } + /** + * CobolGoBackExceptionを例外として投げる。 + * + * @param returnCode GOBACKの返り値 + * @throws CobolGoBackException TODO: 準備中 + */ + public static void throwException(int returnCode) throws CobolGoBackException { + throw new CobolGoBackException(returnCode); + } - /** - * CobolGoBackExceptionを例外として投げる。 - * - * @param storage GOBACKの返り値 - * @throws CobolGoBackException TODO: 準備中 - */ - public static void throwException(CobolDataStorage storage) throws CobolGoBackException { - throw new CobolGoBackException(storage); - } + /** + * CobolGoBackExceptionを例外として投げる。 + * + * @param storage GOBACKの返り値 + * @throws CobolGoBackException TODO: 準備中 + */ + public static void throwException(CobolDataStorage storage) throws CobolGoBackException { + throw new CobolGoBackException(storage); + } - /** - * javaコンパイラは、try節の中にthrowが発生しないと判断するとコンパイルエラーになる。 Javaコード生成時にこの問題を回避するため、このメソッドが挿入される。 throws - * CobolGoBackExceptionが指定されているが、このメソッドは決して例外をスローせず、その他の処理も実行しない。 - * - * @throws CobolGoBackException TODO: 準備中 - */ - public static void dummy() throws CobolGoBackException { - if (false) { - throw new CobolGoBackException(0); + /** + * javaコンパイラは、try節の中にthrowが発生しないと判断するとコンパイルエラーになる。 Javaコード生成時にこの問題を回避するため、このメソッドが挿入される。 throws + * CobolGoBackExceptionが指定されているが、このメソッドは決して例外をスローせず、その他の処理も実行しない。 + * + * @throws CobolGoBackException TODO: 準備中 + */ + public static void dummy() throws CobolGoBackException { + if (false) { + throw new CobolGoBackException(0); + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolRuntimeException.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolRuntimeException.java index e0984800..976f8adf 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolRuntimeException.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolRuntimeException.java @@ -1,159 +1,159 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.exceptions; - -import jp.osscons.opensourcecobol.libcobj.call.CobolResolve; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; - -/** 実行時エラーを示す例外。エラー番号とエラーメッセージを保持する */ -public class CobolRuntimeException extends RuntimeException { - /** TODO: 準備中 */ - public static int code; - - private static int cobException = 0; - private static String origProgramId; - private static String origSection; - private static String origParagraph; - private static int origLine = 0; - private static String origStatement; - - /** 重大なエラーを示すエラーコード */ - public static final int COBOL_FATAL_ERROR = 9000; - - /** エラー番号 */ - private int errorCode; - - /** エラーメッセージ */ - private String message; - - /** - * コンストラクタ - * - * @param errorCode エラーコード - * @param message エラーメッセージ - */ - public CobolRuntimeException(int errorCode, String message) { - super(); - this.errorCode = errorCode; - this.message = message; - } - - /** エラーメッセージの文字列表現を返す */ - @Override - public String getMessage() { - // TODO エラーメッセージの設計 - return errorCode + " : " + message; - } - - /** superのprintStackTraceの拡張 */ - @Override - public void printStackTrace() { - System.out.println(errorCode + " : " + message); - super.printStackTrace(); - } - - /** - * 実行時例外を設定する。 エラーIDをベースに、CobolExceptioTabCode.codeテーブルを参照して、対応するエラーコードが設定される。 - * また、エラー発生時のプログラムID、セクション名、パラグラフ名、行番号、ステートメントを取得し、このクラスの静的変数に保持する。 - * - * @param id エラーID - */ - public static void setException(int id) { - code = CobolExceptionTabCode.code[id]; - cobException = 1; - origLine = CobolUtil.getSourceLine(); - origProgramId = CobolUtil.getCurrProgramId(); - origSection = CobolUtil.getCurrSection(); - origParagraph = CobolUtil.getCurrParagraph(); - origStatement = CobolUtil.getSourceStatement(); - } - - /** - * エラーコード名を取得する - * - * @param exceptionCode エラーコード - * @return エラーコードに対応するエラーコード名 - */ - public static String getExceptionName(int exceptionCode) { - return CobolResolve.cobException.get(exceptionCode); - } - - /** - * エラーコードを取得する - * - * @return エラーコード - */ - public static int getExceptionCode() { - return code; - } - - /** - * 常に0を返す。TODO: 必要に応じてこのメソッドは削除ないし修正する。 - * - * @return 0 - */ - public static int getException() { - return cobException; - } - - /** - * エラー発生時のプログラムIDを取得する - * - * @return エラー発生時のプログラムID - */ - public static String getOrigProgramId() { - return origProgramId; - } - - /** - * エラー発生時のセクション名を取得する - * - * @return エラー発生時のセクション名 - */ - public static String getOrigSection() { - return origSection; - } - - /** - * エラー発生時のパラグラフ名を取得する - * - * @return エラー発生時のパラグラフ名 - */ - public static String getOrigParagragh() { - return origParagraph; - } - - /** - * エラー発生時の行番号を取得する - * - * @return エラー発生時の行番号 - */ - public static int getOrigLine() { - return origLine; - } - - /** - * エラー発生時のステートメントを取得する - * - * @return エラー発生時のステートメント - */ - public static String getOrigStatement() { - return origStatement; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.exceptions; + +import jp.osscons.opensourcecobol.libcobj.call.CobolResolve; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; + +/** 実行時エラーを示す例外。エラー番号とエラーメッセージを保持する */ +public class CobolRuntimeException extends RuntimeException { + /** TODO: 準備中 */ + public static int code; + + private static int cobException = 0; + private static String origProgramId; + private static String origSection; + private static String origParagraph; + private static int origLine = 0; + private static String origStatement; + + /** 重大なエラーを示すエラーコード */ + public static final int COBOL_FATAL_ERROR = 9000; + + /** エラー番号 */ + private int errorCode; + + /** エラーメッセージ */ + private String message; + + /** + * コンストラクタ + * + * @param errorCode エラーコード + * @param message エラーメッセージ + */ + public CobolRuntimeException(int errorCode, String message) { + super(); + this.errorCode = errorCode; + this.message = message; + } + + /** エラーメッセージの文字列表現を返す */ + @Override + public String getMessage() { + // TODO エラーメッセージの設計 + return errorCode + " : " + message; + } + + /** superのprintStackTraceの拡張 */ + @Override + public void printStackTrace() { + System.out.println(errorCode + " : " + message); + super.printStackTrace(); + } + + /** + * 実行時例外を設定する。 エラーIDをベースに、CobolExceptioTabCode.codeテーブルを参照して、対応するエラーコードが設定される。 + * また、エラー発生時のプログラムID、セクション名、パラグラフ名、行番号、ステートメントを取得し、このクラスの静的変数に保持する。 + * + * @param id エラーID + */ + public static void setException(int id) { + code = CobolExceptionTabCode.code[id]; + cobException = 1; + origLine = CobolUtil.getSourceLine(); + origProgramId = CobolUtil.getCurrProgramId(); + origSection = CobolUtil.getCurrSection(); + origParagraph = CobolUtil.getCurrParagraph(); + origStatement = CobolUtil.getSourceStatement(); + } + + /** + * エラーコード名を取得する + * + * @param exceptionCode エラーコード + * @return エラーコードに対応するエラーコード名 + */ + public static String getExceptionName(int exceptionCode) { + return CobolResolve.cobException.get(exceptionCode); + } + + /** + * エラーコードを取得する + * + * @return エラーコード + */ + public static int getExceptionCode() { + return code; + } + + /** + * 常に0を返す。TODO: 必要に応じてこのメソッドは削除ないし修正する。 + * + * @return 0 + */ + public static int getException() { + return cobException; + } + + /** + * エラー発生時のプログラムIDを取得する + * + * @return エラー発生時のプログラムID + */ + public static String getOrigProgramId() { + return origProgramId; + } + + /** + * エラー発生時のセクション名を取得する + * + * @return エラー発生時のセクション名 + */ + public static String getOrigSection() { + return origSection; + } + + /** + * エラー発生時のパラグラフ名を取得する + * + * @return エラー発生時のパラグラフ名 + */ + public static String getOrigParagragh() { + return origParagraph; + } + + /** + * エラー発生時の行番号を取得する + * + * @return エラー発生時の行番号 + */ + public static int getOrigLine() { + return origLine; + } + + /** + * エラー発生時のステートメントを取得する + * + * @return エラー発生時のステートメント + */ + public static String getOrigStatement() { + return origStatement; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolStopRunException.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolStopRunException.java index 7dcaf734..3ead872b 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolStopRunException.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/exceptions/CobolStopRunException.java @@ -24,84 +24,84 @@ /** STOP RUNの呼び出し時にスローされる例外。返り値を保持する。 */ public final class CobolStopRunException extends Exception { - /** 返り値 */ - private int returnCode; + /** 返り値 */ + private int returnCode; - /** - * コンストラクタ - * - * @param returnCode 返り値 - */ - private CobolStopRunException(int returnCode) { - this.returnCode = returnCode; - } + /** + * コンストラクタ + * + * @param returnCode 返り値 + */ + private CobolStopRunException(int returnCode) { + this.returnCode = returnCode; + } - /** - * コンストラクタ - * - * @param storage 返り値を格納したCobolDataStorageのインスタンス - */ - private CobolStopRunException(CobolDataStorage storage) { - this(storage.intValue()); - } + /** + * コンストラクタ + * + * @param storage 返り値を格納したCobolDataStorageのインスタンス + */ + private CobolStopRunException(CobolDataStorage storage) { + this(storage.intValue()); + } - /** - * このクラスが保持するSTOP RUNの返り値を取得する。 - * - * @return このクラスが保持するSTOP RUNの返り値 - */ - public int getReturnCode() { - return returnCode; - } + /** + * このクラスが保持するSTOP RUNの返り値を取得する。 + * + * @return このクラスが保持するSTOP RUNの返り値 + */ + public int getReturnCode() { + return returnCode; + } - /** - * CobolStopRunExceptionを例外としてスローする。 COBOLプログラム終了時のデフォルトの終了処理は実行されない。 - * - * @param returnCode STOP RUNの返り値 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void throwException(int returnCode) throws CobolStopRunException { - throw new CobolStopRunException(returnCode); - } + /** + * CobolStopRunExceptionを例外としてスローする。 COBOLプログラム終了時のデフォルトの終了処理は実行されない。 + * + * @param returnCode STOP RUNの返り値 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void throwException(int returnCode) throws CobolStopRunException { + throw new CobolStopRunException(returnCode); + } - /** - * CobolStopRunExceptionを例外としてスローする。 COBOLプログラム終了時のデフォルトの終了処理は実行されない。 - * - * @param storage STOP RUNの返り値 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void throwException(CobolDataStorage storage) throws CobolStopRunException { - throw new CobolStopRunException(storage); - } + /** + * CobolStopRunExceptionを例外としてスローする。 COBOLプログラム終了時のデフォルトの終了処理は実行されない。 + * + * @param storage STOP RUNの返り値 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void throwException(CobolDataStorage storage) throws CobolStopRunException { + throw new CobolStopRunException(storage); + } - /** - * javaコンパイラは、try節の中にthrowが発生しないと判断するとコンパイルエラーになる。 Javaコード生成時にこの問題を回避するため、このメソッドが挿入される。 throws - * CobolRunExceptionが指定されているが、このメソッドは決して例外をスローせず、その他の処理も実行しない。 - * - * @throws CobolStopRunException TODO: 準備中 - */ - public static void dummy() throws CobolStopRunException { - if (false) { - throw new CobolStopRunException(0); + /** + * javaコンパイラは、try節の中にthrowが発生しないと判断するとコンパイルエラーになる。 Javaコード生成時にこの問題を回避するため、このメソッドが挿入される。 throws + * CobolRunExceptionが指定されているが、このメソッドは決して例外をスローせず、その他の処理も実行しない。 + * + * @throws CobolStopRunException TODO: 準備中 + */ + public static void dummy() throws CobolStopRunException { + if (false) { + throw new CobolStopRunException(0); + } } - } - /** - * デフォルトの終了処理を実行してから、CobolStopRunExceptionをスローする。 - * デフォルトの終了処理では、COBOLプログラムによってオープンされたファイルのクローズが行われる。 - * - * @param status STOP RUNの返り値 - * @throws CobolStopRunException このメソッドでは必ずCobolStopRunExceptionがスローされる。 - */ - public static void stopRunAndThrow(int status) throws CobolStopRunException { - stopRun(); - CobolStopRunException.throwException(status); - } + /** + * デフォルトの終了処理を実行してから、CobolStopRunExceptionをスローする。 + * デフォルトの終了処理では、COBOLプログラムによってオープンされたファイルのクローズが行われる。 + * + * @param status STOP RUNの返り値 + * @throws CobolStopRunException このメソッドでは必ずCobolStopRunExceptionがスローされる。 + */ + public static void stopRunAndThrow(int status) throws CobolStopRunException { + stopRun(); + CobolStopRunException.throwException(status); + } - /** デフォルトの終了処理を実行する。CobolStopRunExceptionをスローしない。 */ - public static void stopRun() { - // TODO screen実装時に追加 - // cob_screen_terminate(); - CobolFile.exitFileIO(); - } + /** デフォルトの終了処理を実行する。CobolStopRunExceptionをスローしない。 */ + public static void stopRun() { + // TODO screen実装時に追加 + // cob_screen_terminate(); + CobolFile.exitFileIO(); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 73ed2290..69550d21 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -1,1985 +1,2133 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.IOException; -import java.nio.channels.ClosedChannelException; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; -import java.nio.channels.NonWritableChannelException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** INDEXED, RELATIVE, SEQUENTIAL, LINE SEQUENTIAL等のCOBOLの ファイルを実装するための基底クラス */ -public class CobolFile { - /** TODO: 準備中 */ - protected static final int COB_ORG_SEQUENTIAL = 0; - /** TODO: 準備中 */ - protected static final int COB_ORG_LINE_SEQUENTIAL = 1; - /** TODO: 準備中 */ - protected static final int COB_ORG_RELATIVE = 2; - /** TODO: 準備中 */ - protected static final int COB_ORG_INDEXED = 3; - /** TODO: 準備中 */ - protected static final int COB_ORG_SORT = 4; - /** TODO: 準備中 */ - protected static final int COB_ORG_MAX = 5; - - /** TODO: 準備中 */ - protected static final int COB_ACCESS_SEQUENTIAL = 1; - /** TODO: 準備中 */ - protected static final int COB_ACCESS_DYNAMIC = 2; - /** TODO: 準備中 */ - protected static final int COB_ACCESS_RANDOM = 3; - - /** TODO: 準備中 */ - protected static final int COB_IO_OPEN = 0; - /** TODO: 準備中 */ - protected static final int COB_IO_READ = 1; - /** TODO: 準備中 */ - protected static final int COB_IO_WRITE = 2; - /** TODO: 準備中 */ - protected static final int COB_IO_CLOSE = 3; - /** TODO: 準備中 */ - protected static final int COB_IO_DELETE = 4; - /** TODO: 準備中 */ - protected static final int COB_IO_REWRITE = 5; - /** TODO: 準備中 */ - protected static final int COB_IO_START = 6; - /** TODO: 準備中 */ - protected static final int COB_IO_COMMIT = 7; - /** TODO: 準備中 */ - protected static final int COB_IO_ROLLBACK = 8; - /** TODO: 準備中 */ - protected static final int COB_IO_UNLOCK = 9; - /** TODO: 準備中 */ - protected static final int COB_IO_DELETE_FILE = 10; - - /** TODO: 準備中 */ - public static final int COB_OPEN_CLOSED = 0; - /** TODO: 準備中 */ - public static final int COB_OPEN_INPUT = 1; - /** TODO: 準備中 */ - public static final int COB_OPEN_OUTPUT = 2; - /** TODO: 準備中 */ - public static final int COB_OPEN_I_O = 3; - /** TODO: 準備中 */ - public static final int COB_OPEN_EXTEND = 4; - /** TODO: 準備中 */ - public static final int COB_OPEN_LOCKED = 5; - - /** TODO: 準備中 */ - public static final int COB_CLOSE_NORMAL = 0; - /** TODO: 準備中 */ - public static final int COB_CLOSE_LOCK = 1; - /** TODO: 準備中 */ - public static final int COB_CLOSE_NO_REWIND = 2; - /** TODO: 準備中 */ - public static final int COB_CLOSE_UNIT = 3; - /** TODO: 準備中 */ - public static final int COB_CLOSE_UNIT_REMOVAL = 4; - - /** TODO: 準備中 */ - public static final int COB_WRITE_MASK = 0x0000ffff; - /** TODO: 準備中 */ - public static final int COB_WRITE_LINES = 0x00010000; - /** TODO: 準備中 */ - public static final int COB_WRITE_PAGE = 0x00020000; - /** TODO: 準備中 */ - public static final int COB_WRITE_CHANNEL = 0x00040000; - /** TODO: 準備中 */ - public static final int COB_WRITE_AFTER = 0x00100000; - /** TODO: 準備中 */ - public static final int COB_WRITE_BEFORE = 0x00200000; - /** TODO: 準備中 */ - public static final int COB_WRITE_EOP = 0x00400000; - /** TODO: 準備中 */ - public static final int COB_WRITE_LOCK = 0x00800000; - - /** TODO: 準備中 */ - public static final int COB_READ_NEXT = 0x01; - /** TODO: 準備中 */ - public static final int COB_READ_PREVIOUS = 0x2; - /** TODO: 準備中 */ - public static final int COB_READ_FIRST = 0x04; - /** TODO: 準備中 */ - public static final int COB_READ_LAST = 0x08; - /** TODO: 準備中 */ - public static final int COB_READ_LOCK = 0x10; - /** TODO: 準備中 */ - public static final int COB_READ_NO_LOCK = 0x20; - /** TODO: 準備中 */ - public static final int COB_READ_KEPT_LOCK = 0x40; - /** TODO: 準備中 */ - public static final int COB_READ_WAIT_LOCK = 0x80; - /** TODO: 準備中 */ - public static final int COB_READ_IGNORE_LOCK = 0x100; - - /** TODO: 準備中 */ - protected static final String TIS_DEFINE_USERFH = "OC_USERFH"; - /** TODO: 準備中 */ - protected static final String COB_IO_CREATES = "OC_IO_CREATES"; - /** TODO: 準備中 */ - protected static final String COB_EXTEND_CREATES = "OC_EXTEND_CREATES"; - - /** TODO: 準備中 */ - protected static final int COB_STATUS_00_SUCCESS = 0; - /** TODO: 準備中 */ - protected static final int COB_STATUS_02_SUCCESS_DUPLICATE = 2; - /** TODO: 準備中 */ - protected static final int COB_STATUS_04_SUCCESS_INCOMPLETE = 4; - /** TODO: 準備中 */ - protected static final int COB_STATUS_05_SUCCESS_OPTIONAL = 5; - /** TODO: 準備中 */ - protected static final int COB_STATUS_07_SUCCESS_NO_UNIT = 7; - /** TODO: 準備中 */ - protected static final int COB_STATUS_10_END_OF_FILE = 10; - /** TODO: 準備中 */ - protected static final int COB_STATUS_14_OUT_OF_KEY_RANGE = 14; - /** TODO: 準備中 */ - protected static final int COB_STATUS_21_KEY_INVALID = 21; - /** TODO: 準備中 */ - protected static final int COB_STATUS_22_KEY_EXISTS = 22; - /** TODO: 準備中 */ - protected static final int COB_STATUS_23_KEY_NOT_EXISTS = 23; - /** TODO: 準備中 */ - protected static final int COB_STATUS_30_PERMANENT_ERROR = 30; - /** TODO: 準備中 */ - protected static final int COB_STATUS_31_INCONSISTENT_FILENAME = 31; - /** TODO: 準備中 */ - protected static final int COB_STATUS_34_BOUNDARY_VIOLATION = 34; - /** TODO: 準備中 */ - protected static final int COB_STATUS_35_NOT_EXISTS = 35; - /** TODO: 準備中 */ - protected static final int COB_STATUS_37_PERMISSION_DENIED = 37; - /** TODO: 準備中 */ - protected static final int COB_STATUS_38_CLOSED_WITH_LOCK = 38; - /** TODO: 準備中 */ - protected static final int COB_STATUS_39_CONFLICT_ATTRIBUTE = 39; - /** TODO: 準備中 */ - protected static final int COB_STATUS_41_ALREADY_OPEN = 41; - /** TODO: 準備中 */ - protected static final int COB_STATUS_42_NOT_OPEN = 42; - /** TODO: 準備中 */ - protected static final int COB_STATUS_43_READ_NOT_DONE = 43; - /** TODO: 準備中 */ - protected static final int COB_STATUS_44_RECORD_OVERFLOW = 44; - /** TODO: 準備中 */ - protected static final int COB_STATUS_46_READ_ERROR = 46; - /** TODO: 準備中 */ - protected static final int COB_STATUS_47_INPUT_DENIED = 47; - /** TODO: 準備中 */ - protected static final int COB_STATUS_48_OUTPUT_DENIED = 48; - /** TODO: 準備中 */ - protected static final int COB_STATUS_49_I_O_DENIED = 49; - /** TODO: 準備中 */ - protected static final int COB_STATUS_51_RECORD_LOCKED = 51; - /** TODO: 準備中 */ - protected static final int COB_STATUS_52_EOP = 52; - /** TODO: 準備中 */ - protected static final int COB_STATUS_57_I_O_LINAGE = 57; - /** TODO: 準備中 */ - protected static final int COB_STATUS_61_FILE_SHARING = 61; - /** TODO: 準備中 */ - protected static final int COB_STATUS_91_NOT_AVAILABLE = 91; - - /** TODO: 準備中 */ - protected static final int COB_LINAGE_INVALID = 16384; - /** TODO: 準備中 */ - protected static final int COB_NOT_CONFIGURED = 32768; - - /** TODO: 準備中 */ - public static final int COB_SELECT_FILE_STATUS = 0x01; - /** TODO: 準備中 */ - public static final int COB_SELECT_EXTERNAL = 0x02; - /** TODO: 準備中 */ - public static final int COB_SELECT_LINAGE = 0x04; - /** TODO: 準備中 */ - public static final int COB_SELECT_SPLITKEY = 0x08; - - /** TODO: 準備中 */ - protected static final int FNSTATUSSIZE = 3; - - /** TODO: 準備中 */ - protected static final int ENOENT = 2; - /** TODO: 準備中 */ - protected static final int EBADF = 9; - /** TODO: 準備中 */ - protected static final int EACCESS = 13; - /** TODO: 準備中 */ - protected static final int EISDIR = 21; - /** TODO: 準備中 */ - protected static final int EROFS = 30; - /** TODO: 準備中 */ - protected static final int EAGAIN = 11; - - /** TODO: 準備中 */ - public static CobolFile errorFile; - - /** TODO: 準備中 */ - protected static int COB_SMALL_BUFF = 1024; - /** TODO: 準備中 */ - protected static int COB_SMALL_MAX = COB_SMALL_BUFF - 1; - - /** TODO: 準備中 */ - protected static final int COB_LOCK_EXCLUSIVE = 1; - /** TODO: 準備中 */ - protected static final int COB_LOCK_MANUAL = 2; - /** TODO: 準備中 */ - protected static final int COB_LOCK_AUTOMATIC = 3; - /** TODO: 準備中 */ - protected static final int COB_LOCK_MULTIPLE = 1; - /** TODO: 準備中 */ - protected static final int COB_LOCK_MASK = 0x7; - - /** TODO: 準備中 */ - protected static String cob_file_path = null; - /** TODO: 準備中 */ - protected static String cob_ls_nulls = null; - /** TODO: 準備中 */ - protected static String cob_ls_fixed = null; - /** TODO: 準備中 */ - protected static byte[] file_open_env = new byte[1024]; - /** TODO: 準備中 */ - protected static String file_open_name; - /** TODO: 準備中 */ - protected static byte[] file_open_buff = new byte[1024]; - - /** TODO: 準備中 */ - protected static final String[] prefix = {"DD_", "dd_", ""}; - /** TODO: 準備中 */ - protected static final int NUM_PREFIX = prefix.length; - - /** TODO: 準備中 */ - protected static int eop_status = 0; - /** TODO: 準備中 */ - protected static int cob_do_sync = 0; - - private static List file_cache = new ArrayList(); - - /** TODO: 準備中 */ - protected static int[] status_exception = { - 0, - CobolExceptionId.COB_EC_I_O_AT_END, - CobolExceptionId.COB_EC_I_O_INVALID_KEY, - CobolExceptionId.COB_EC_I_O_PERMANENT_ERROR, - CobolExceptionId.COB_EC_I_O_LOGIC_ERROR, - CobolExceptionId.COB_EC_I_O_RECORD_OPERATION, - CobolExceptionId.COB_EC_I_O_FILE_SHARING, - CobolExceptionId.COB_EC_I_O, - CobolExceptionId.COB_EC_I_O, - CobolExceptionId.COB_EC_I_O_IMP - }; - /** TODO: 準備中 */ - public String select_name; - /** TODO: 準備中 */ - public byte[] file_status; - /** TODO: 準備中 */ - protected AbstractCobolField assign; - /** TODO: 準備中 */ - public AbstractCobolField record; - /** TODO: 準備中 */ - protected AbstractCobolField record_size; - /** TODO: 準備中 */ - protected CobolFileKey[] keys; - /** TODO: 準備中 */ - public FileIO file; - /** TODO: 準備中 */ - protected CobolSort filex; - /** TODO: 準備中 */ - protected IndexedFile filei; - /** TODO: 準備中 */ - protected Linage linorkeyptr; - /** TODO: 準備中 */ - protected CobolDataStorage sort_collating; - /** TODO: 準備中 */ - protected Object extfh_ptr; - /** TODO: 準備中 */ - protected int record_min; - /** TODO: 準備中 */ - public int record_max; - /** TODO: 準備中 */ - protected int nkeys; - - /** TODO: 準備中 */ - protected char organization; - /** TODO: 準備中 */ - protected char access_mode; - /** TODO: 準備中 */ - protected char lock_mode; - /** TODO: 準備中 */ - protected char open_mode; - /** TODO: 準備中 */ - protected boolean flag_optional; - /** TODO: 準備中 */ - public char last_open_mode; - /** TODO: 準備中 */ - protected char special; - /** TODO: 準備中 */ - protected boolean flag_nonexistent; - - /** TODO: 準備中 */ - protected boolean flag_end_of_file; - /** TODO: 準備中 */ - protected boolean flag_begin_of_file; - /** TODO: 準備中 */ - protected char flag_first_read; - /** TODO: 準備中 */ - protected boolean flag_read_done; - /** TODO: 準備中 */ - public char flag_select_features; - /** TODO: 準備中 */ - protected boolean flag_needs_nl; - /** TODO: 準備中 */ - protected boolean flag_needs_top; - /** TODO: 準備中 */ - protected char file_version; - - /** TODO: 準備中 */ - protected static String runtime_buffer; - /** TODO: 準備中 */ - protected static String name; - /** TODO: 準備中 */ - protected static byte[] status; - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public Linage getLinorkeyptr() { - return this.linorkeyptr; - } - - /** - * TODO: 準備中 - * - * @param ptr TODO: 準備中 - */ - public void setLinorkeyptr(Linage ptr) { - this.linorkeyptr = ptr; - } - - /** TODO: 準備中 */ - public CobolFile() {} - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - */ - public CobolFile( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - - this.select_name = selectName; - this.file_status = fileStatus; - this.assign = assign; - this.record = record; - this.record_size = recordSize; - this.record_min = recordMin; - this.record_max = recordMax; - this.nkeys = nkeys; - this.keys = keys; - this.file = new FileIO(); - this.organization = organization; - this.access_mode = accessMode; - this.lock_mode = lockMode; - this.open_mode = openMode; - this.flag_optional = flagOptional; - this.special = special; - this.flag_nonexistent = flagNonexistent; - this.flag_end_of_file = flagEndOfFile; - this.flag_begin_of_file = flagBeginOfFile; - this.flag_first_read = flagFirstRead; - this.flag_read_done = flagReadDone; - this.flag_select_features = flagSelectFeatures; - this.flag_needs_nl = flagNeedsNl; - this.flag_needs_top = flagNeedsTop; - this.file_version = fileVersion; - } - - // libcob/fileio.cのsave_statusの実装 RETURN_STATUSマクロは実装できないため,本メソッドの呼び出し後の次の文はreturn;を書くこと. - /** - * TODO: 準備中 - * - * @param status TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - protected void saveStatus(int status, AbstractCobolField fnstatus) { - CobolFile.errorFile = this; - if (status == 0) { - this.file_status[0] = '0'; - this.file_status[1] = '0'; - if (fnstatus != null) { - fnstatus.getDataStorage().setByte(0, (byte) '0'); - fnstatus.getDataStorage().setByte(1, (byte) '0'); - } - CobolRuntimeException.code = 0; - return; - } - - if (status != COB_STATUS_52_EOP) { - CobolRuntimeException.setException(status_exception[status / 10]); - } - this.file_status[0] = (byte) (status / 10 + '0'); - this.file_status[1] = (byte) (status % 10 + '0'); - if (fnstatus != null) { - fnstatus.getDataStorage().setByte(0, this.file_status[0]); - fnstatus.getDataStorage().setByte(1, this.file_status[1]); - } - } - - // libcob/fileio.のcob_invoke_funの実装 - /** - * TODO: 準備中 - * - * @param operate TODO: 準備中 - * @param f TODO: 準備中 - * @param key TODO: 準備中 - * @param rec TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @param openMode TODO: 準備中 - * @param startCond TODO: 準備中 - * @param readOpts TODO: 準備中 - * @return TODO: 準備中 - */ - public static int invokeFun( - int operate, - Object f, - AbstractCobolField key, - CobolDataStorage rec, - AbstractCobolField fnstatus, - String openMode, - String startCond, - String readOpts) { - return 0; - } - - // libcob/cob_cache_fileのj実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - protected static void cacheFile(CobolFile f) { - if (file_cache.contains(f)) { - return; - } - file_cache.add(f); - } - - // libcob/fileio.cのcob_file_linage_checkの実装 TODO 実装 - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - protected boolean file_linage_check() { - Linage lingptr = getLinorkeyptr(); - lingptr.setLinLines(lingptr.getLinage().getInt()); - - outer: - { - if (lingptr.getLinLines() < 1) { - break outer; - } - if (lingptr.getLatfoot() != null) { - lingptr.setLinFoot(lingptr.getLatfoot().getInt()); - if (lingptr.getLinFoot() < 1 || lingptr.getLinFoot() > lingptr.getLinLines()) { - break outer; - } - } else { - lingptr.setLinFoot(0); - } - if (lingptr.getLattop() != null) { - lingptr.setLinTop(lingptr.getLattop().getInt()); - if (lingptr.getLinTop() < 0) { - break outer; - } - } else { - lingptr.setLinTop(0); - } - if (lingptr.getLatbot() != null) { - lingptr.setLinBot(lingptr.getLatbot().getInt()); - if (lingptr.getLinBot() < 0) { - break outer; - } - } else { - lingptr.setLinBot(0); - } - return false; - } - - lingptr.getLinageCtr().setInt(0); - return true; - } - - // libcob/fileio.cのcob_linage_write_optの実装 TODO 実装 - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - protected int linage_write_opt(int opt) throws CobolStopRunException { - int i, n; - Linage lingptr = this.getLinorkeyptr(); - - if ((opt & COB_WRITE_PAGE) != 0) { - i = lingptr.getLinageCtr().getInt(); - if (i == 0) { - return COB_STATUS_57_I_O_LINAGE; - } - n = lingptr.getLinLines(); - for (; i < n; ++i) { - this.file.putc((byte) '\n'); - } - for (i = 0; i < lingptr.getLinBot(); i++) { - this.file.putc((byte) '\n'); - } - if (this.file_linage_check()) { - return COB_STATUS_57_I_O_LINAGE; - } - for (i = 0; i < lingptr.getLinTop(); i++) { - this.file.putc((byte) '\n'); - } - lingptr.getLinageCtr().setInt(1); - } else if ((opt & COB_WRITE_LINES) != 0) { - n = lingptr.getLinageCtr().getInt(); - if (n == 0) { - return COB_STATUS_57_I_O_LINAGE; - } - lingptr.getLinageCtr().addInt(opt & COB_WRITE_MASK); - i = lingptr.getLinageCtr().getInt(); - if ((opt & COB_WRITE_EOP) != 0 && lingptr.getLinFoot() != 0) { - if (i >= lingptr.getLinFoot()) { - eop_status = 1; - } - } - if (i > lingptr.getLinLines()) { - if ((opt & COB_WRITE_EOP) != 0) { - eop_status = 1; - } - for (; n < lingptr.getLinLines(); n++) { - this.file.putc((byte) '\n'); - } - for (i = 0; i < lingptr.getLinBot(); i++) { - this.file.putc((byte) '\n'); - } - if (this.file_linage_check()) { - return COB_STATUS_57_I_O_LINAGE; - } - lingptr.getLinageCtr().setInt(1); - for (i = 0; i < lingptr.getLinTop(); i++) { - this.file.putc((byte) '\n'); - } - } else { - for (i = (opt & COB_WRITE_MASK) - 1; i > 0; i--) { - this.file.putc((byte) '\n'); - } - } - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param name TODO: 準備中 - * @param jbuf TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - protected byte[] cb_get_jisword_buff(byte[] name, byte[] jbuf, int n) { - int cs = 0; - int ce = name.length - 1; - int cp; - boolean flagQuoted = false; - int siz = 0; - byte[] rt = null; - int c; - int p = 0; - - if (name[cs] == '\'' && name[ce] == '\'') { - cs++; - --ce; - flagQuoted = true; - } - - if (ce - cs >= 5 - && !(name[cs] == '_' && name[cs + 1] == '_' && name[cs + 2] == '_') - && !(name[ce - 2] == '_' && name[ce - 1] == '_' && name[ce] == '_')) { - cs += 3; - ce -= 3; - if (!flagQuoted) { - siz = (ce - cs + 1) / 2 + 1; - } else { - siz = (ce - cs + 1) / 2 + 3; - } - if (jbuf != null) { - rt = new byte[siz]; - } else { - if (siz > n) { - c = siz - n; - siz -= c; - ce -= c * 2; - } - /* - * TODO fix - * for (int i = 0; i < n; ++i) { - * jbuf[i] = 0; - * } - */ - // TODO - rt = null; - } - if (flagQuoted && siz > 2) { - rt[0] = rt[siz - 2] = (byte) '\''; - p = 1; - } else { - p = 0; - } - for (c = 0, cp = cs; cp <= ce; cp++, p += (c == 0 ? 1 : 0)) { - if (name[cp] >= '0' && name[cp] <= '9') { - rt[p] |= (name[cp] - '0') << (c << 2); - } else if (name[cp] >= 'A' && name[cp] <= 'F') { - rt[p] |= (name[cp] - 'A' + 10) << (c << 2); - } else { - name[p] = '?'; - cp += c; - c = 0; - } - } - } else { - if (jbuf != null) { - rt = name.clone(); - } else { - /* - * TODO fix - * for (int i = 0; i < n; ++i) { - * jbuf[i] = 0; - * } - * for (int i = 0; i < n - 1; ++i) { - * jbuf[i] = name[i]; - * } - */ - // TODO fix - rt = null; - } - } - return rt; - } - - // assert 0 <= openMode < 10 - private static String openModeToString(int openMode) { - StringBuilder sb = new StringBuilder(); - return sb.append("0").append(openMode).toString(); - } - - private static String readOptsToString(int readOpts) { - StringBuilder sb = new StringBuilder(); - if (readOpts < 10) { - sb.append("0"); - } - return sb.append(readOpts).toString(); - } - - private static String concatString(String... strs) { - StringBuilder sb = new StringBuilder(); - for (String s : strs) { - sb.append(s); - } - return sb.toString(); - } - - /** - * TODO: 準備中 - * - * @param mode TODO: 準備中 - * @param sharing TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void open(int mode, int sharing, AbstractCobolField fnstatus) { - String openMode = openModeToString(mode); - if (invokeFun(COB_IO_OPEN, this, null, null, fnstatus, openMode, null, null) != 0) { - this.last_open_mode = (char) Integer.parseInt(openMode); - return; - } - this.last_open_mode = (char) Integer.parseInt(openMode); - - /* file was previously closed with lock */ - if (this.open_mode == COB_OPEN_LOCKED) { - saveStatus(COB_STATUS_38_CLOSED_WITH_LOCK, fnstatus); - return; - } - - /* file is already open */ - if (((int) this.open_mode) != COB_OPEN_CLOSED) { - saveStatus(COB_STATUS_41_ALREADY_OPEN, fnstatus); - return; - } - - this.last_open_mode = (char) mode; - this.flag_nonexistent = false; - this.flag_end_of_file = false; - this.flag_begin_of_file = false; - this.flag_first_read = 2; - - if (this.special != 0) { - if (this.special == 1) { - if (mode != COB_OPEN_INPUT) { - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - this.file.setIn(System.in); - this.open_mode = (char) mode; - this.saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - return; - } else { - if (mode != COB_OPEN_OUTPUT) { - this.saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - this.file.setOut(System.out); - this.open_mode = (char) mode; - saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - return; - } - } - - /* obtain the file name */ - if (this.assign == null) { - file_open_name = this.select_name; - } else { - file_open_name = this.assign.fieldToString(); - } - - byte[] src; - byte[] dst; - boolean simple; - if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); - dst = file_open_buff; - simple = true; - int srcI = 0; - int dstI = 0; - while (srcI < src.length) { - char c = (char) src[srcI]; - if (!Character.isLetterOrDigit(c) && c != '_' && c != '-') { - simple = false; - } - if (c == '$') { - int i; - for (i = 1; srcI + i < src.length; i++) { - char d = (char) src[srcI + i]; - if (!Character.isLetterOrDigit(d) && d != '_' && c != '-') { - break; - } - } - for (int j = 0; j < i - 1; ++j) { - file_open_env[j] = src[srcI + 1 + j]; - } - file_open_env[i - 1] = 0; - String p = CobolUtil.getEnv(new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); - if (p != null) { - byte[] pbytes = p.getBytes(); - for (int j = 0; j < pbytes.length; ++j) { - dst[dstI + j] = pbytes[j]; - } - dstI += pbytes.length; - } - srcI += i; - } else { - dst[dstI++] = src[srcI++]; - } - } - - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); - - byte[] fileOpenNameBytes = file_open_name.getBytes(); - cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); - - if (simple) { - int i; - for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); - if (p != null) { - fileOpenNameBytes = p.getBytes(); - break; - } - } - - if (i == NUM_PREFIX && cob_file_path != null) { - byte[] fileOpenBuff = concatString(cob_file_path, "/", file_open_name).getBytes(); - fileOpenNameBytes = fileOpenBuff; - } - } - - file_open_name = new String(fileOpenNameBytes); - } - - boolean wasNotExist = false; - if (this.organization == COB_ORG_INDEXED) { - if (!Files.exists(Paths.get(file_open_name))) { - wasNotExist = true; - if (mode != COB_OPEN_OUTPUT - && !this.flag_optional - && (mode != COB_OPEN_I_O || !"yes".equals(CobolUtil.getEnv(COB_IO_CREATES))) - && (mode != COB_OPEN_EXTEND || !"yes".equals(CobolUtil.getEnv(COB_EXTEND_CREATES)))) { - saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); - return; - } - } - } else if (Files.notExists(Paths.get(file_open_name))) { - wasNotExist = true; - if (mode != COB_OPEN_OUTPUT - && !this.flag_optional - && (mode != COB_OPEN_I_O || CobolUtil.checkEnv(COB_IO_CREATES, "yes") == 0) - && (mode != COB_OPEN_EXTEND || CobolUtil.checkEnv(COB_EXTEND_CREATES, "yes") == 0)) { - saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); - return; - } - } - cacheFile(this); - - try { - switch (this.open_(file_open_name, mode, sharing)) { - case 0: - this.open_mode = (char) mode; - if (this.flag_optional && wasNotExist) { - saveStatus(COB_STATUS_05_SUCCESS_OPTIONAL, fnstatus); - return; - } else { - saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - return; - } - case ENOENT: - if (mode == COB_OPEN_EXTEND || mode == COB_OPEN_OUTPUT) { - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - if (this.flag_optional) { - this.open_mode = (char) mode; - this.flag_nonexistent = true; - this.flag_end_of_file = true; - this.flag_begin_of_file = true; - saveStatus(COB_STATUS_05_SUCCESS_OPTIONAL, fnstatus); - return; - } else { - saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); - return; - } - case EACCESS: - case EISDIR: - case EROFS: - saveStatus(COB_STATUS_37_PERMISSION_DENIED, fnstatus); - return; - case COB_STATUS_61_FILE_SHARING: - saveStatus(COB_STATUS_61_FILE_SHARING, fnstatus); - return; - case COB_STATUS_91_NOT_AVAILABLE: - saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); - return; - case COB_LINAGE_INVALID: - saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); - return; - default: - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } catch (IOException e) { - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } - - // protected long start; - // protected long end; - - /** - * TODO: 準備中 - * - * @param mode TODO: 準備中 - * @param sharing TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void openEx(int mode, int sharing, AbstractCobolField fnstatus) { - // this.open_("", mode, sharing); - } - - /** - * TODO: 準備中 - * - * @param filename TODO: 準備中 - * @param mode TODO: 準備中 - * @param sharing TODO: 準備中 - * @return TODO: 準備中 - * @throws IOException TODO: 準備中 - */ - public int open_(String filename, int mode, int sharing) throws IOException { - FileChannel fp = null; - try { - switch (mode) { - case COB_OPEN_INPUT: - fp = FileChannel.open(Paths.get(filename), StandardOpenOption.READ); - break; - case COB_OPEN_OUTPUT: - fp = - FileChannel.open( - Paths.get(filename), - StandardOpenOption.WRITE, - StandardOpenOption.CREATE, - StandardOpenOption.TRUNCATE_EXISTING); - break; - case COB_OPEN_I_O: - fp = - FileChannel.open( - Paths.get(filename), - StandardOpenOption.READ, - StandardOpenOption.WRITE, - StandardOpenOption.CREATE); - break; - case COB_OPEN_EXTEND: - fp = - FileChannel.open( - Paths.get(filename), StandardOpenOption.APPEND, StandardOpenOption.CREATE); - break; - default: - break; - } - } catch (IOException e) { - if (Files.notExists(Paths.get(filename))) { - return ENOENT; - } else { - return EACCESS; - } - } - - FileLock fl = null; - if (!filename.startsWith("/dev/")) { - try { - boolean lockFlag; - if (sharing != 0 || mode == COB_OPEN_OUTPUT) { - lockFlag = false; - } else { - lockFlag = true; - } - fl = fp.tryLock(0L, Long.MAX_VALUE, lockFlag); - } catch (NonWritableChannelException e) { - fp.close(); - return EBADF; - } catch (ClosedChannelException e) { - fp.close(); - return COB_STATUS_61_FILE_SHARING; - } - - this.file.setChannel(fp, fl); - if (fl == null || !fl.isValid()) { - fp.close(); - return COB_STATUS_61_FILE_SHARING; - } - } - - this.file.setChannel(fp, fl); - if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { - if (this.file_linage_check()) { - return COB_LINAGE_INVALID; - } - this.flag_needs_top = true; - Linage lingptr = this.getLinorkeyptr(); - lingptr.getLinageCtr().setInt(1); - } - if ((this.organization == COB_ORG_SEQUENTIAL || this.organization == COB_ORG_LINE_SEQUENTIAL) - && (mode == COB_OPEN_OUTPUT || mode == COB_OPEN_EXTEND) - && CobolUtil.fileSeqWriteBufferSize > 0) { - this.file.prepareWriteBuffer(CobolUtil.fileSeqWriteBufferSize * this.record_max); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void close(int opt, AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_CLOSE, this, null, null, fnstatus, openMode, null, null) != 0) { - this.last_open_mode = (char) Integer.parseInt(openMode); - return; - } - - this.flag_read_done = false; - if (this.special != 0) { - this.open_mode = COB_OPEN_CLOSED; - saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - return; - } - if (this.open_mode == COB_OPEN_CLOSED) { - saveStatus(COB_STATUS_42_NOT_OPEN, fnstatus); - return; - } - - int ret; - if (this.flag_nonexistent) { - ret = COB_STATUS_00_SUCCESS; - } else { - ret = this.close_(opt); - } - - if (ret == COB_STATUS_00_SUCCESS) { - switch (opt) { - case COB_CLOSE_LOCK: - this.open_mode = COB_OPEN_LOCKED; - break; - default: - this.open_mode = COB_OPEN_CLOSED; - break; - } - } - saveStatus(ret, fnstatus); - } - - // public void closeEx(int opt, AbstractCobolField fnstatus) { - // this.close_(opt); - // } - - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - */ - public int close_(int opt) { - switch (opt) { - case COB_CLOSE_NORMAL: - case COB_CLOSE_LOCK: - case COB_CLOSE_NO_REWIND: - if (this.organization == COB_ORG_LINE_SEQUENTIAL) { - if (this.flag_needs_nl && ((this.flag_select_features & COB_SELECT_LINAGE) == 0)) { - this.flag_needs_nl = false; - this.file.putc((byte) '\n'); - } - } - - this.file.releaseLock(); - this.file.close(); - - if (opt == COB_CLOSE_NO_REWIND) { - this.open_mode = COB_OPEN_CLOSED; - return COB_STATUS_07_SUCCESS_NO_UNIT; - } - return COB_STATUS_00_SUCCESS; - default: - this.file.flush(); - return COB_STATUS_07_SUCCESS_NO_UNIT; - } - } - - /** - * TODO: 準備中 - * - * @param cond TODO: 準備中 - * @param key TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void start(int cond, AbstractCobolField key, AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - String startCond = String.format("%01d", cond); - if (invokeFun(COB_IO_START, this, null, null, fnstatus, openMode, startCond, null) != 0) { - return; - } - - this.flag_read_done = false; - this.flag_first_read = 0; - - if (this.flag_nonexistent) { - saveStatus(COB_STATUS_23_KEY_NOT_EXISTS, fnstatus); - return; - } - - if (this.open_mode == COB_OPEN_CLOSED - || this.open_mode == COB_OPEN_OUTPUT - || this.open_mode == COB_OPEN_EXTEND - || this.access_mode == COB_ACCESS_RANDOM) { - saveStatus(COB_STATUS_47_INPUT_DENIED, fnstatus); - return; - } - - int ret = this.start_(cond, key); - if (ret == COB_STATUS_00_SUCCESS) { - this.flag_end_of_file = false; - this.flag_begin_of_file = false; - this.flag_first_read = 1; - } - - saveStatus(ret, fnstatus); - } - - /** - * TODO: 準備中 - * - * @param cond TODO: 準備中 - * @param key TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void startEx(int cond, AbstractCobolField key, AbstractCobolField fnstatus) { - this.start_(cond, key); - } - - /** - * TODO: 準備中 - * - * @param cond TODO: 準備中 - * @param key TODO: 準備中 - * @return TODO: 準備中 - */ - public int start_(int cond, AbstractCobolField key) { - System.out.println("super.start"); - return 0; - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @param readOpts TODO: 準備中 - */ - public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOpts) { - byte[] sbuff = new byte[3]; - String openMode = openModeToString(this.last_open_mode); - String readOptStr = readOptsToString(readOpts); - if (invokeFun(COB_IO_READ, this, key, null, fnstatus, openMode, null, readOptStr) != 0) { - for (int i = 0; i < 3; ++i) { - sbuff[i] = 0; - } - - if (fnstatus == null) { - return; - } - - for (int i = 0; i < 2; ++i) { - sbuff[i] = fnstatus.getDataStorage().getByte(i); - } - int status = Integer.parseInt(new String(sbuff)); - saveStatus(status, fnstatus); - return; - } - - this.flag_read_done = false; - if (this.flag_nonexistent) { - if (this.flag_first_read == 0) { - saveStatus(COB_STATUS_23_KEY_NOT_EXISTS, fnstatus); - return; - } - this.flag_first_read = 0; - saveStatus(COB_STATUS_10_END_OF_FILE, fnstatus); - return; - } - - /* sequential read at the end of file is an error */ - if (key == null) { - if (this.flag_end_of_file && (readOpts & COB_READ_PREVIOUS) == 0) { - saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); - return; - } - if (this.flag_begin_of_file && (readOpts & COB_READ_PREVIOUS) != 0) { - saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); - return; - } - } - - if (this.open_mode == COB_OPEN_CLOSED - || this.open_mode == COB_OPEN_OUTPUT - || this.open_mode == COB_OPEN_EXTEND) { - saveStatus(COB_STATUS_47_INPUT_DENIED, fnstatus); - return; - } - - if (this.organization == COB_ORG_INDEXED) { - if (this.open_mode != COB_OPEN_I_O || (this.lock_mode & COB_LOCK_EXCLUSIVE) != 0) { - readOpts &= ~COB_READ_LOCK; - } else if ((this.lock_mode & COB_LOCK_AUTOMATIC) != 0 && (readOpts & COB_READ_NO_LOCK) == 0) { - readOpts |= COB_READ_LOCK; - } - } else { - readOpts &= ~COB_READ_LOCK; - } - - if (this.organization == COB_ORG_INDEXED /* && bdb_env != null */) { - if (this.open_mode != COB_OPEN_I_O || (this.lock_mode & COB_LOCK_EXCLUSIVE) != 0) { - readOpts &= ~COB_READ_LOCK; - } else if ((this.lock_mode & COB_LOCK_AUTOMATIC) != 0 && (readOpts & COB_READ_NO_LOCK) == 0) { - readOpts |= COB_READ_LOCK; - } - } else { - readOpts &= ~COB_READ_LOCK; - } - - int ret; - if (key != null) { - ret = this.read_(key, readOpts); - } else { - ret = this.readNext(readOpts); - } - - switch (ret) { - case COB_STATUS_00_SUCCESS: - this.flag_first_read = 0; - this.flag_read_done = true; - this.flag_end_of_file = false; - this.flag_begin_of_file = false; - if (this.record_size != null && this.organization != COB_ORG_LINE_SEQUENTIAL) { - this.record_size.setInt(record.getSize()); - } - break; - case COB_STATUS_10_END_OF_FILE: - if ((readOpts & COB_READ_PREVIOUS) != 0) { - this.flag_begin_of_file = true; - } else { - this.flag_end_of_file = true; - } - break; - default: - break; - } - - saveStatus(ret, fnstatus); - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @param readOpts TODO: 準備中 - */ - public void read(int key, AbstractCobolField fnstatus, int readOpts) { - this.read(null, fnstatus, readOpts); - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @param readOpts TODO: 準備中 - */ - public void readEx(AbstractCobolField key, AbstractCobolField fnstatus, int readOpts) { - this.read_(key, readOpts); - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param readOpts TODO: 準備中 - * @return TODO: 準備中 - */ - public int read_(AbstractCobolField key, int readOpts) { - System.out.println("super.read"); - return 0; - } - - /** - * TODO: 準備中 - * - * @param readOpts TODO: 準備中 - * @return TODO: 準備中 - */ - public int readNext(int readOpts) { - System.out.println("super.readNext"); - return 0; - } - - /** - * TODO: 準備中 - * - * @param rec TODO: 準備中 - * @param opt TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public void write(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) - throws CobolStopRunException { - if (this.access_mode == COB_ACCESS_SEQUENTIAL - && this.last_open_mode == COB_OPEN_I_O - && CobolUtil.cob_io_rewwrite_assumed()) { - this.rewrite(rec, opt, fnstatus); - return; - } - - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_WRITE, this, null, rec.getDataStorage(), fnstatus, openMode, null, null) - != 0) { - return; - } - - this.flag_read_done = false; - if (this.access_mode == COB_ACCESS_SEQUENTIAL) { - if (this.open_mode == COB_OPEN_CLOSED - || this.open_mode == COB_OPEN_INPUT - || this.open_mode == COB_OPEN_I_O) { - saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); - return; - } - } else { - if (this.open_mode == COB_OPEN_CLOSED - || this.open_mode == COB_OPEN_INPUT - || this.open_mode == COB_OPEN_EXTEND) { - saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); - return; - } - } - - int tmpsize = this.record.getSize(); - if (this.record_size != null) { - this.record.setSize(this.record_size.getInt()); - } else { - this.record.setSize(rec.getSize()); - } - - if (this.record.getSize() < this.record_min || this.record_max < this.record.getSize()) { - saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); - return; - } - - int ret = this.write_(opt); - - if (cob_do_sync != 0 && ret == 0) { - cob_sync(this, cob_do_sync); - } - - this.record.setSize(tmpsize); - saveStatus(ret, fnstatus); - } - - /** - * TODO: 準備中 - * - * @param rec TODO: 準備中 - * @param opt TODO: 準備中 - * @param fnstatus TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public void writeEx(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) - throws CobolStopRunException { - this.write_(opt); - } - - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public int write_(int opt) throws CobolStopRunException { - System.out.println("super.write"); - return 0; - } - - // libcob/fileio.cのcob_file_write_optの実装 - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - protected int file_write_opt(int opt) throws CobolStopRunException { - if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { - return linage_write_opt(opt); - } - if ((opt & COB_WRITE_LINES) != 0) { - for (int i = opt & COB_WRITE_MASK; i > 0; i--) { - this.file.putc((byte) '\n'); - } - } else if ((opt & COB_WRITE_PAGE) != 0) { - this.file.putc((byte) '\f'); - } - return 0; - } - - /** - * TODO: 準備中 - * - * @param rec TODO: 準備中 - * @param opt TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void rewrite(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_REWRITE, this, null, null, fnstatus, openMode, null, null) != 0) { - this.last_open_mode = (char) Integer.parseInt(openMode); - return; - } - - boolean readDone = this.flag_read_done; - this.flag_read_done = false; - - if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { - saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); - return; - } - if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { - saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); - return; - } - if (this.organization == COB_ORG_SEQUENTIAL) { - if (this.record.getSize() != rec.getSize()) { - saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); - return; - } - if (this.record_size != null) { - if (this.record.getSize() != this.record_size.getInt()) { - saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); - return; - } - } - } - int ret = this.rewrite_(opt); - if (cob_do_sync != 0 && ret == 0) { - cob_sync(this, cob_do_sync); - } - - saveStatus(ret, fnstatus); - } - - /** - * TODO: 準備中 - * - * @param rec TODO: 準備中 - * @param opt TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public void rewriteEx(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) { - this.rewrite_(opt); - } - - /** - * TODO: 準備中 - * - * @param opt TODO: 準備中 - * @return TODO: 準備中 - */ - public int rewrite_(int opt) { - System.out.println("super.rewrite"); - return 0; - } - - /** - * TODO: 準備中 - * - * @param fnstatus TODO: 準備中 - */ - public void delete(AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_DELETE, this, null, null, fnstatus, openMode, null, null) != 0) { - return; - } - - boolean readDone = this.flag_read_done; - this.flag_read_done = false; - - if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { - saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); - return; - } - - if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { - saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); - return; - } - - int ret = this.delete_(); - - if (cob_do_sync != 0 && ret == 0) { - cob_sync(this, cob_do_sync); - } - saveStatus(ret, fnstatus); - } - - /** - * TODO: 準備中 - * - * @param fnstatus TODO: 準備中 - */ - public void deleteEx(AbstractCobolField fnstatus) { - this.delete_(); - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int delete_() { - System.out.println("super.delete"); - return 0; - } - - /** - * TODO: 準備中 - * - * @param fnstatus TODO: 準備中 - */ - public void unlock(AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_UNLOCK, this, null, null, fnstatus, openMode, null, null) != 0) { - return; - } - this.unlock_(); - saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - } - - /** TODO: 準備中 */ - public void unlock_() { - if (this.open_mode != COB_OPEN_CLOSED && this.open_mode != COB_OPEN_LOCKED) { - this.file.flush(); - } - } - - /** TODO: 準備中 */ - public static void commit() { - if (invokeFun(COB_IO_COMMIT, null, null, null, null, null, null, null) != 0) { - return; - } - for (CobolFile l : file_cache) { - l.unlock_(); - } - } - - /** TODO: 準備中 */ - public static void rollback() { - if (invokeFun(COB_IO_ROLLBACK, null, null, null, null, null, null, null) != 0) { - return; - } - for (CobolFile l : file_cache) { - l.unlock_(); - } - } - - /// libcob/fileio.cのcob_exit_fileioの実装 TODO 一部だけ実装したため残りを実装する - /** TODO: 準備中 */ - public static void exitFileIO() { - for (CobolFile f : file_cache) { - if (f.open_mode != COB_OPEN_CLOSED && f.open_mode != COB_OPEN_LOCKED) { - String filename = f.assign.fieldToString(); - System.err.print( - String.format( - "WARNING - Implicit CLOSE of %s (\"%s\") %c", f.select_name, filename, '\n')); - } - } - } - - // libcob/fileio.cのcob_syncの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param mode TODO: 準備中 - */ - protected void cob_sync(CobolFile f, int mode) { - // TODO - // INDEXEDファイル実装時にやる - // if (f.organization == COB_ORG_INDEXED) { - // } - if (f.organization != COB_ORG_SORT) { - this.file.flush(); - if (mode == 2) { - this.file.flush(); - } - } - } - - // libcob/fileio.cのcob_init_fileioの実装 - /** TODO: 準備中 */ - public static void cob_init_fileio() { - String s = CobolUtil.getEnv("COB_SYNC"); - if (s != null) { - if (s.charAt(0) == 'Y' || s.charAt(0) == 'y') { - cob_do_sync = 1; - } - if (s.charAt(0) == 'P' || s.charAt(0) == 'p') { - cob_do_sync = 2; - } - } - - cob_file_path = CobolUtil.getEnv("COB_FILE_PATH"); - if (cob_file_path != null) { - if (cob_file_path.charAt(0) == '\0' || cob_file_path.charAt(0) == ' ') { - cob_file_path = null; - } - } - - cob_ls_nulls = CobolUtil.getEnv("COB_LS_NULLS"); - cob_ls_fixed = CobolUtil.getEnv("COB_LS_FIXED"); - - file_open_env = new byte[COB_SMALL_BUFF]; - // file_open_name = new byte[COB_SMALL_BUFF]; - file_open_buff = new byte[COB_SMALL_BUFF]; - } - - /** TODO: 準備中 */ - public static void defaultErrorHandle() { - byte[] fileStatus = CobolFile.errorFile.file_status; - int status = (fileStatus[0] - '0') * 10 + (fileStatus[1] - '0'); - String msg; - switch (status) { - case COB_STATUS_10_END_OF_FILE: - msg = "End of file"; - break; - case COB_STATUS_14_OUT_OF_KEY_RANGE: - msg = "Key out of range"; - break; - case COB_STATUS_21_KEY_INVALID: - msg = "Key order not ascending"; - break; - case COB_STATUS_22_KEY_EXISTS: - msg = "Record key already exists"; - break; - case COB_STATUS_23_KEY_NOT_EXISTS: - msg = "Record key does not exist"; - break; - case COB_STATUS_30_PERMANENT_ERROR: - msg = "Permanent file error"; - break; - case COB_STATUS_35_NOT_EXISTS: - msg = "File does not exist"; - break; - case COB_STATUS_37_PERMISSION_DENIED: - msg = "Permission denied"; - break; - case COB_STATUS_41_ALREADY_OPEN: - msg = "File already open"; - break; - case COB_STATUS_42_NOT_OPEN: - msg = "File not open"; - break; - case COB_STATUS_43_READ_NOT_DONE: - msg = "READ must be executed first"; - break; - case COB_STATUS_44_RECORD_OVERFLOW: - msg = "Record overflow"; - break; - case COB_STATUS_46_READ_ERROR: - msg = "Failed to read"; - break; - case COB_STATUS_47_INPUT_DENIED: - msg = "READ/START not allowed"; - break; - case COB_STATUS_48_OUTPUT_DENIED: - msg = "WRITE not allowed"; - break; - case COB_STATUS_49_I_O_DENIED: - msg = "DELETE/REWRITE not allowed"; - break; - case COB_STATUS_51_RECORD_LOCKED: - msg = "Record locked by another file connector"; - break; - case COB_STATUS_52_EOP: - msg = "A page overflow condition occurred"; - break; - case COB_STATUS_57_I_O_LINAGE: - msg = "LINAGE values invalid"; - break; - case COB_STATUS_61_FILE_SHARING: - msg = "File sharing conflict"; - break; - case COB_STATUS_91_NOT_AVAILABLE: - msg = "Runtime library is not configured for this operation"; - break; - default: - msg = "Unknown file error"; - break; - } - String filename = CobolFile.errorFile.assign.fieldToString(); - CobolUtil.runtimeError(String.format("%s (STATUS = %02d) File : '%s'", msg, status, filename)); - } - - /** - * TODO: 準備中 - * - * @param fnstatus TODO: 準備中 - */ - public void cob_delete_file(AbstractCobolField fnstatus) { - String openMode = openModeToString(this.last_open_mode); - if (invokeFun(COB_IO_DELETE_FILE, this, null, null, fnstatus, openMode, null, null) != 0) { - return; - } - - if (this.open_mode == COB_OPEN_LOCKED) { - saveStatus(COB_STATUS_38_CLOSED_WITH_LOCK, fnstatus); - return; - } - - /* file is already open */ - if (this.open_mode != COB_OPEN_CLOSED) { - saveStatus(COB_STATUS_41_ALREADY_OPEN, fnstatus); - return; - } - - if (this.special != 0) { - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - - if (this.assign == null) { - file_open_name = this.select_name; - } else { - file_open_name = this.assign.fieldToString(); - } - - byte[] src; - byte[] dst; - boolean simple; - if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); - dst = file_open_buff; - simple = true; - int srcI = 0; - int dstI = 0; - while (srcI < src.length) { - char c = (char) src[srcI]; - if (!Character.isLetterOrDigit(c) && c != '_' && c != '-') { - simple = false; - } - if (c == '$') { - int i; - for (i = 1; srcI + i < src.length; i++) { - char d = (char) src[srcI + i]; - if (!Character.isLetterOrDigit(d) && d != '_' && c != '-') { - break; - } - } - for (int j = 0; j < i - 1; ++j) { - file_open_env[j] = src[srcI + 1 + j]; - } - file_open_env[i - 1] = 0; - String p = CobolUtil.getEnv(new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); - if (p != null) { - byte[] pbytes = p.getBytes(); - for (int j = 0; j < pbytes.length; ++j) { - dst[dstI + j] = pbytes[j]; - } - dstI += pbytes.length; - } - srcI += i; - } else { - dst[dstI++] = src[srcI++]; - } - } - - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); - - byte[] fileOpenNameBytes = file_open_name.getBytes(); - cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); - - if (simple) { - int i; - for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); - if (p != null) { - fileOpenNameBytes = p.getBytes(); - break; - } - } - - if (i == NUM_PREFIX && cob_file_path != null) { - byte[] fileOpenBuff = concatString(cob_file_path, "/", file_open_name).getBytes(); - fileOpenNameBytes = fileOpenBuff; - } - } - - file_open_name = new String(fileOpenNameBytes); - } - - Path filePath; - if (this.assign == null) { - filePath = Paths.get(this.select_name); - } else { - filePath = Paths.get(this.assign.fieldToString()); - } - try { - saveStatus(COB_STATUS_00_SUCCESS, fnstatus); - Files.delete(filePath); - return; - } catch (IOException e) { - int mode = (int) this.last_open_mode; - try { - switch (this.open_(file_open_name, mode, 0)) { - case ENOENT: - saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); - return; - case EACCESS: - case EISDIR: - case EROFS: - saveStatus(COB_STATUS_37_PERMISSION_DENIED, fnstatus); - return; - case EAGAIN: - case COB_STATUS_61_FILE_SHARING: - saveStatus(COB_STATUS_61_FILE_SHARING, fnstatus); - return; - case COB_STATUS_91_NOT_AVAILABLE: - saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); - return; - case COB_LINAGE_INVALID: - saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); - return; - default: - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } catch (IOException e1) { - saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public String getSelectName() { - // CobolFile cobolFile = new CobolFile(); - return this.select_name; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public byte[] getFileStatus() { - // CobolFile cobolFile = new CobolFile(); - return this.file_status; - } - - private static Map externalFileStatusTable = new HashMap(); - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @return TODO: 準備中 - */ - public static byte[] getExternalFileStatus(String key) { - byte[] bytes = externalFileStatusTable.get(key); - if (bytes == null) { - bytes = new byte[2]; - bytes[0] = 0; - bytes[1] = 0; - externalFileStatusTable.put(key, bytes); - } - return bytes; - } - - private static Map externalFileTable = new HashMap(); - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolFile getExternalFile(String key) { - return externalFileTable.get(key); - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param value TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolFile putExternalFile(String key, CobolFile value) { - return externalFileTable.put(key, value); - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.IOException; +import java.nio.channels.ClosedChannelException; +import java.nio.channels.FileChannel; +import java.nio.channels.FileLock; +import java.nio.channels.NonWritableChannelException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** INDEXED, RELATIVE, SEQUENTIAL, LINE SEQUENTIAL等のCOBOLの ファイルを実装するための基底クラス */ +public class CobolFile { + /** TODO: 準備中 */ + protected static final int COB_ORG_SEQUENTIAL = 0; + + /** TODO: 準備中 */ + protected static final int COB_ORG_LINE_SEQUENTIAL = 1; + + /** TODO: 準備中 */ + protected static final int COB_ORG_RELATIVE = 2; + + /** TODO: 準備中 */ + protected static final int COB_ORG_INDEXED = 3; + + /** TODO: 準備中 */ + protected static final int COB_ORG_SORT = 4; + + /** TODO: 準備中 */ + protected static final int COB_ORG_MAX = 5; + + /** TODO: 準備中 */ + protected static final int COB_ACCESS_SEQUENTIAL = 1; + + /** TODO: 準備中 */ + protected static final int COB_ACCESS_DYNAMIC = 2; + + /** TODO: 準備中 */ + protected static final int COB_ACCESS_RANDOM = 3; + + /** TODO: 準備中 */ + protected static final int COB_IO_OPEN = 0; + + /** TODO: 準備中 */ + protected static final int COB_IO_READ = 1; + + /** TODO: 準備中 */ + protected static final int COB_IO_WRITE = 2; + + /** TODO: 準備中 */ + protected static final int COB_IO_CLOSE = 3; + + /** TODO: 準備中 */ + protected static final int COB_IO_DELETE = 4; + + /** TODO: 準備中 */ + protected static final int COB_IO_REWRITE = 5; + + /** TODO: 準備中 */ + protected static final int COB_IO_START = 6; + + /** TODO: 準備中 */ + protected static final int COB_IO_COMMIT = 7; + + /** TODO: 準備中 */ + protected static final int COB_IO_ROLLBACK = 8; + + /** TODO: 準備中 */ + protected static final int COB_IO_UNLOCK = 9; + + /** TODO: 準備中 */ + protected static final int COB_IO_DELETE_FILE = 10; + + /** TODO: 準備中 */ + public static final int COB_OPEN_CLOSED = 0; + + /** TODO: 準備中 */ + public static final int COB_OPEN_INPUT = 1; + + /** TODO: 準備中 */ + public static final int COB_OPEN_OUTPUT = 2; + + /** TODO: 準備中 */ + public static final int COB_OPEN_I_O = 3; + + /** TODO: 準備中 */ + public static final int COB_OPEN_EXTEND = 4; + + /** TODO: 準備中 */ + public static final int COB_OPEN_LOCKED = 5; + + /** TODO: 準備中 */ + public static final int COB_CLOSE_NORMAL = 0; + + /** TODO: 準備中 */ + public static final int COB_CLOSE_LOCK = 1; + + /** TODO: 準備中 */ + public static final int COB_CLOSE_NO_REWIND = 2; + + /** TODO: 準備中 */ + public static final int COB_CLOSE_UNIT = 3; + + /** TODO: 準備中 */ + public static final int COB_CLOSE_UNIT_REMOVAL = 4; + + /** TODO: 準備中 */ + public static final int COB_WRITE_MASK = 0x0000ffff; + + /** TODO: 準備中 */ + public static final int COB_WRITE_LINES = 0x00010000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_PAGE = 0x00020000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_CHANNEL = 0x00040000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_AFTER = 0x00100000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_BEFORE = 0x00200000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_EOP = 0x00400000; + + /** TODO: 準備中 */ + public static final int COB_WRITE_LOCK = 0x00800000; + + /** TODO: 準備中 */ + public static final int COB_READ_NEXT = 0x01; + + /** TODO: 準備中 */ + public static final int COB_READ_PREVIOUS = 0x2; + + /** TODO: 準備中 */ + public static final int COB_READ_FIRST = 0x04; + + /** TODO: 準備中 */ + public static final int COB_READ_LAST = 0x08; + + /** TODO: 準備中 */ + public static final int COB_READ_LOCK = 0x10; + + /** TODO: 準備中 */ + public static final int COB_READ_NO_LOCK = 0x20; + + /** TODO: 準備中 */ + public static final int COB_READ_KEPT_LOCK = 0x40; + + /** TODO: 準備中 */ + public static final int COB_READ_WAIT_LOCK = 0x80; + + /** TODO: 準備中 */ + public static final int COB_READ_IGNORE_LOCK = 0x100; + + /** TODO: 準備中 */ + protected static final String TIS_DEFINE_USERFH = "OC_USERFH"; + + /** TODO: 準備中 */ + protected static final String COB_IO_CREATES = "OC_IO_CREATES"; + + /** TODO: 準備中 */ + protected static final String COB_EXTEND_CREATES = "OC_EXTEND_CREATES"; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_00_SUCCESS = 0; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_02_SUCCESS_DUPLICATE = 2; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_04_SUCCESS_INCOMPLETE = 4; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_05_SUCCESS_OPTIONAL = 5; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_07_SUCCESS_NO_UNIT = 7; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_10_END_OF_FILE = 10; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_14_OUT_OF_KEY_RANGE = 14; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_21_KEY_INVALID = 21; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_22_KEY_EXISTS = 22; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_23_KEY_NOT_EXISTS = 23; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_30_PERMANENT_ERROR = 30; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_31_INCONSISTENT_FILENAME = 31; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_34_BOUNDARY_VIOLATION = 34; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_35_NOT_EXISTS = 35; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_37_PERMISSION_DENIED = 37; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_38_CLOSED_WITH_LOCK = 38; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_39_CONFLICT_ATTRIBUTE = 39; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_41_ALREADY_OPEN = 41; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_42_NOT_OPEN = 42; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_43_READ_NOT_DONE = 43; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_44_RECORD_OVERFLOW = 44; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_46_READ_ERROR = 46; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_47_INPUT_DENIED = 47; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_48_OUTPUT_DENIED = 48; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_49_I_O_DENIED = 49; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_51_RECORD_LOCKED = 51; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_52_EOP = 52; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_57_I_O_LINAGE = 57; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_61_FILE_SHARING = 61; + + /** TODO: 準備中 */ + protected static final int COB_STATUS_91_NOT_AVAILABLE = 91; + + /** TODO: 準備中 */ + protected static final int COB_LINAGE_INVALID = 16384; + + /** TODO: 準備中 */ + protected static final int COB_NOT_CONFIGURED = 32768; + + /** TODO: 準備中 */ + public static final int COB_SELECT_FILE_STATUS = 0x01; + + /** TODO: 準備中 */ + public static final int COB_SELECT_EXTERNAL = 0x02; + + /** TODO: 準備中 */ + public static final int COB_SELECT_LINAGE = 0x04; + + /** TODO: 準備中 */ + public static final int COB_SELECT_SPLITKEY = 0x08; + + /** TODO: 準備中 */ + protected static final int FNSTATUSSIZE = 3; + + /** TODO: 準備中 */ + protected static final int ENOENT = 2; + + /** TODO: 準備中 */ + protected static final int EBADF = 9; + + /** TODO: 準備中 */ + protected static final int EACCESS = 13; + + /** TODO: 準備中 */ + protected static final int EISDIR = 21; + + /** TODO: 準備中 */ + protected static final int EROFS = 30; + + /** TODO: 準備中 */ + protected static final int EAGAIN = 11; + + /** TODO: 準備中 */ + public static CobolFile errorFile; + + /** TODO: 準備中 */ + protected static int COB_SMALL_BUFF = 1024; + + /** TODO: 準備中 */ + protected static int COB_SMALL_MAX = COB_SMALL_BUFF - 1; + + /** TODO: 準備中 */ + protected static final int COB_LOCK_EXCLUSIVE = 1; + + /** TODO: 準備中 */ + protected static final int COB_LOCK_MANUAL = 2; + + /** TODO: 準備中 */ + protected static final int COB_LOCK_AUTOMATIC = 3; + + /** TODO: 準備中 */ + protected static final int COB_LOCK_MULTIPLE = 1; + + /** TODO: 準備中 */ + protected static final int COB_LOCK_MASK = 0x7; + + /** TODO: 準備中 */ + protected static String cob_file_path = null; + + /** TODO: 準備中 */ + protected static String cob_ls_nulls = null; + + /** TODO: 準備中 */ + protected static String cob_ls_fixed = null; + + /** TODO: 準備中 */ + protected static byte[] file_open_env = new byte[1024]; + + /** TODO: 準備中 */ + protected static String file_open_name; + + /** TODO: 準備中 */ + protected static byte[] file_open_buff = new byte[1024]; + + /** TODO: 準備中 */ + protected static final String[] prefix = {"DD_", "dd_", ""}; + + /** TODO: 準備中 */ + protected static final int NUM_PREFIX = prefix.length; + + /** TODO: 準備中 */ + protected static int eop_status = 0; + + /** TODO: 準備中 */ + protected static int cob_do_sync = 0; + + private static List file_cache = new ArrayList(); + + /** TODO: 準備中 */ + protected static int[] status_exception = { + 0, + CobolExceptionId.COB_EC_I_O_AT_END, + CobolExceptionId.COB_EC_I_O_INVALID_KEY, + CobolExceptionId.COB_EC_I_O_PERMANENT_ERROR, + CobolExceptionId.COB_EC_I_O_LOGIC_ERROR, + CobolExceptionId.COB_EC_I_O_RECORD_OPERATION, + CobolExceptionId.COB_EC_I_O_FILE_SHARING, + CobolExceptionId.COB_EC_I_O, + CobolExceptionId.COB_EC_I_O, + CobolExceptionId.COB_EC_I_O_IMP + }; + + /** TODO: 準備中 */ + public String select_name; + + /** TODO: 準備中 */ + public byte[] file_status; + + /** TODO: 準備中 */ + protected AbstractCobolField assign; + + /** TODO: 準備中 */ + public AbstractCobolField record; + + /** TODO: 準備中 */ + protected AbstractCobolField record_size; + + /** TODO: 準備中 */ + protected CobolFileKey[] keys; + + /** TODO: 準備中 */ + public FileIO file; + + /** TODO: 準備中 */ + protected CobolSort filex; + + /** TODO: 準備中 */ + protected IndexedFile filei; + + /** TODO: 準備中 */ + protected Linage linorkeyptr; + + /** TODO: 準備中 */ + protected CobolDataStorage sort_collating; + + /** TODO: 準備中 */ + protected Object extfh_ptr; + + /** TODO: 準備中 */ + protected int record_min; + + /** TODO: 準備中 */ + public int record_max; + + /** TODO: 準備中 */ + protected int nkeys; + + /** TODO: 準備中 */ + protected char organization; + + /** TODO: 準備中 */ + protected char access_mode; + + /** TODO: 準備中 */ + protected char lock_mode; + + /** TODO: 準備中 */ + protected char open_mode; + + /** TODO: 準備中 */ + protected boolean flag_optional; + + /** TODO: 準備中 */ + public char last_open_mode; + + /** TODO: 準備中 */ + protected char special; + + /** TODO: 準備中 */ + protected boolean flag_nonexistent; + + /** TODO: 準備中 */ + protected boolean flag_end_of_file; + + /** TODO: 準備中 */ + protected boolean flag_begin_of_file; + + /** TODO: 準備中 */ + protected char flag_first_read; + + /** TODO: 準備中 */ + protected boolean flag_read_done; + + /** TODO: 準備中 */ + public char flag_select_features; + + /** TODO: 準備中 */ + protected boolean flag_needs_nl; + + /** TODO: 準備中 */ + protected boolean flag_needs_top; + + /** TODO: 準備中 */ + protected char file_version; + + /** TODO: 準備中 */ + protected static String runtime_buffer; + + /** TODO: 準備中 */ + protected static String name; + + /** TODO: 準備中 */ + protected static byte[] status; + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public Linage getLinorkeyptr() { + return this.linorkeyptr; + } + + /** + * TODO: 準備中 + * + * @param ptr TODO: 準備中 + */ + public void setLinorkeyptr(Linage ptr) { + this.linorkeyptr = ptr; + } + + /** TODO: 準備中 */ + public CobolFile() {} + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + */ + public CobolFile( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + + this.select_name = selectName; + this.file_status = fileStatus; + this.assign = assign; + this.record = record; + this.record_size = recordSize; + this.record_min = recordMin; + this.record_max = recordMax; + this.nkeys = nkeys; + this.keys = keys; + this.file = new FileIO(); + this.organization = organization; + this.access_mode = accessMode; + this.lock_mode = lockMode; + this.open_mode = openMode; + this.flag_optional = flagOptional; + this.special = special; + this.flag_nonexistent = flagNonexistent; + this.flag_end_of_file = flagEndOfFile; + this.flag_begin_of_file = flagBeginOfFile; + this.flag_first_read = flagFirstRead; + this.flag_read_done = flagReadDone; + this.flag_select_features = flagSelectFeatures; + this.flag_needs_nl = flagNeedsNl; + this.flag_needs_top = flagNeedsTop; + this.file_version = fileVersion; + } + + // libcob/fileio.cのsave_statusの実装 RETURN_STATUSマクロは実装できないため,本メソッドの呼び出し後の次の文はreturn;を書くこと. + /** + * TODO: 準備中 + * + * @param status TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + protected void saveStatus(int status, AbstractCobolField fnstatus) { + CobolFile.errorFile = this; + if (status == 0) { + this.file_status[0] = '0'; + this.file_status[1] = '0'; + if (fnstatus != null) { + fnstatus.getDataStorage().setByte(0, (byte) '0'); + fnstatus.getDataStorage().setByte(1, (byte) '0'); + } + CobolRuntimeException.code = 0; + return; + } + + if (status != COB_STATUS_52_EOP) { + CobolRuntimeException.setException(status_exception[status / 10]); + } + this.file_status[0] = (byte) (status / 10 + '0'); + this.file_status[1] = (byte) (status % 10 + '0'); + if (fnstatus != null) { + fnstatus.getDataStorage().setByte(0, this.file_status[0]); + fnstatus.getDataStorage().setByte(1, this.file_status[1]); + } + } + + // libcob/fileio.のcob_invoke_funの実装 + /** + * TODO: 準備中 + * + * @param operate TODO: 準備中 + * @param f TODO: 準備中 + * @param key TODO: 準備中 + * @param rec TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @param openMode TODO: 準備中 + * @param startCond TODO: 準備中 + * @param readOpts TODO: 準備中 + * @return TODO: 準備中 + */ + public static int invokeFun( + int operate, + Object f, + AbstractCobolField key, + CobolDataStorage rec, + AbstractCobolField fnstatus, + String openMode, + String startCond, + String readOpts) { + return 0; + } + + // libcob/cob_cache_fileのj実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + protected static void cacheFile(CobolFile f) { + if (file_cache.contains(f)) { + return; + } + file_cache.add(f); + } + + // libcob/fileio.cのcob_file_linage_checkの実装 TODO 実装 + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + protected boolean file_linage_check() { + Linage lingptr = getLinorkeyptr(); + lingptr.setLinLines(lingptr.getLinage().getInt()); + + outer: + { + if (lingptr.getLinLines() < 1) { + break outer; + } + if (lingptr.getLatfoot() != null) { + lingptr.setLinFoot(lingptr.getLatfoot().getInt()); + if (lingptr.getLinFoot() < 1 || lingptr.getLinFoot() > lingptr.getLinLines()) { + break outer; + } + } else { + lingptr.setLinFoot(0); + } + if (lingptr.getLattop() != null) { + lingptr.setLinTop(lingptr.getLattop().getInt()); + if (lingptr.getLinTop() < 0) { + break outer; + } + } else { + lingptr.setLinTop(0); + } + if (lingptr.getLatbot() != null) { + lingptr.setLinBot(lingptr.getLatbot().getInt()); + if (lingptr.getLinBot() < 0) { + break outer; + } + } else { + lingptr.setLinBot(0); + } + return false; + } + + lingptr.getLinageCtr().setInt(0); + return true; + } + + // libcob/fileio.cのcob_linage_write_optの実装 TODO 実装 + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + protected int linage_write_opt(int opt) throws CobolStopRunException { + int i, n; + Linage lingptr = this.getLinorkeyptr(); + + if ((opt & COB_WRITE_PAGE) != 0) { + i = lingptr.getLinageCtr().getInt(); + if (i == 0) { + return COB_STATUS_57_I_O_LINAGE; + } + n = lingptr.getLinLines(); + for (; i < n; ++i) { + this.file.putc((byte) '\n'); + } + for (i = 0; i < lingptr.getLinBot(); i++) { + this.file.putc((byte) '\n'); + } + if (this.file_linage_check()) { + return COB_STATUS_57_I_O_LINAGE; + } + for (i = 0; i < lingptr.getLinTop(); i++) { + this.file.putc((byte) '\n'); + } + lingptr.getLinageCtr().setInt(1); + } else if ((opt & COB_WRITE_LINES) != 0) { + n = lingptr.getLinageCtr().getInt(); + if (n == 0) { + return COB_STATUS_57_I_O_LINAGE; + } + lingptr.getLinageCtr().addInt(opt & COB_WRITE_MASK); + i = lingptr.getLinageCtr().getInt(); + if ((opt & COB_WRITE_EOP) != 0 && lingptr.getLinFoot() != 0) { + if (i >= lingptr.getLinFoot()) { + eop_status = 1; + } + } + if (i > lingptr.getLinLines()) { + if ((opt & COB_WRITE_EOP) != 0) { + eop_status = 1; + } + for (; n < lingptr.getLinLines(); n++) { + this.file.putc((byte) '\n'); + } + for (i = 0; i < lingptr.getLinBot(); i++) { + this.file.putc((byte) '\n'); + } + if (this.file_linage_check()) { + return COB_STATUS_57_I_O_LINAGE; + } + lingptr.getLinageCtr().setInt(1); + for (i = 0; i < lingptr.getLinTop(); i++) { + this.file.putc((byte) '\n'); + } + } else { + for (i = (opt & COB_WRITE_MASK) - 1; i > 0; i--) { + this.file.putc((byte) '\n'); + } + } + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param name TODO: 準備中 + * @param jbuf TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + protected byte[] cb_get_jisword_buff(byte[] name, byte[] jbuf, int n) { + int cs = 0; + int ce = name.length - 1; + int cp; + boolean flagQuoted = false; + int siz = 0; + byte[] rt = null; + int c; + int p = 0; + + if (name[cs] == '\'' && name[ce] == '\'') { + cs++; + --ce; + flagQuoted = true; + } + + if (ce - cs >= 5 + && !(name[cs] == '_' && name[cs + 1] == '_' && name[cs + 2] == '_') + && !(name[ce - 2] == '_' && name[ce - 1] == '_' && name[ce] == '_')) { + cs += 3; + ce -= 3; + if (!flagQuoted) { + siz = (ce - cs + 1) / 2 + 1; + } else { + siz = (ce - cs + 1) / 2 + 3; + } + if (jbuf != null) { + rt = new byte[siz]; + } else { + if (siz > n) { + c = siz - n; + siz -= c; + ce -= c * 2; + } + /* + * TODO fix + * for (int i = 0; i < n; ++i) { + * jbuf[i] = 0; + * } + */ + // TODO + rt = null; + } + if (flagQuoted && siz > 2) { + rt[0] = rt[siz - 2] = (byte) '\''; + p = 1; + } else { + p = 0; + } + for (c = 0, cp = cs; cp <= ce; cp++, p += (c == 0 ? 1 : 0)) { + if (name[cp] >= '0' && name[cp] <= '9') { + rt[p] |= (name[cp] - '0') << (c << 2); + } else if (name[cp] >= 'A' && name[cp] <= 'F') { + rt[p] |= (name[cp] - 'A' + 10) << (c << 2); + } else { + name[p] = '?'; + cp += c; + c = 0; + } + } + } else { + if (jbuf != null) { + rt = name.clone(); + } else { + /* + * TODO fix + * for (int i = 0; i < n; ++i) { + * jbuf[i] = 0; + * } + * for (int i = 0; i < n - 1; ++i) { + * jbuf[i] = name[i]; + * } + */ + // TODO fix + rt = null; + } + } + return rt; + } + + // assert 0 <= openMode < 10 + private static String openModeToString(int openMode) { + StringBuilder sb = new StringBuilder(); + return sb.append("0").append(openMode).toString(); + } + + private static String readOptsToString(int readOpts) { + StringBuilder sb = new StringBuilder(); + if (readOpts < 10) { + sb.append("0"); + } + return sb.append(readOpts).toString(); + } + + private static String concatString(String... strs) { + StringBuilder sb = new StringBuilder(); + for (String s : strs) { + sb.append(s); + } + return sb.toString(); + } + + /** + * TODO: 準備中 + * + * @param mode TODO: 準備中 + * @param sharing TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void open(int mode, int sharing, AbstractCobolField fnstatus) { + String openMode = openModeToString(mode); + if (invokeFun(COB_IO_OPEN, this, null, null, fnstatus, openMode, null, null) != 0) { + this.last_open_mode = (char) Integer.parseInt(openMode); + return; + } + this.last_open_mode = (char) Integer.parseInt(openMode); + + /* file was previously closed with lock */ + if (this.open_mode == COB_OPEN_LOCKED) { + saveStatus(COB_STATUS_38_CLOSED_WITH_LOCK, fnstatus); + return; + } + + /* file is already open */ + if (((int) this.open_mode) != COB_OPEN_CLOSED) { + saveStatus(COB_STATUS_41_ALREADY_OPEN, fnstatus); + return; + } + + this.last_open_mode = (char) mode; + this.flag_nonexistent = false; + this.flag_end_of_file = false; + this.flag_begin_of_file = false; + this.flag_first_read = 2; + + if (this.special != 0) { + if (this.special == 1) { + if (mode != COB_OPEN_INPUT) { + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + this.file.setIn(System.in); + this.open_mode = (char) mode; + this.saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + return; + } else { + if (mode != COB_OPEN_OUTPUT) { + this.saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + this.file.setOut(System.out); + this.open_mode = (char) mode; + saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + return; + } + } + + /* obtain the file name */ + if (this.assign == null) { + file_open_name = this.select_name; + } else { + file_open_name = this.assign.fieldToString(); + } + + byte[] src; + byte[] dst; + boolean simple; + if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { + src = file_open_name.getBytes(); + dst = file_open_buff; + simple = true; + int srcI = 0; + int dstI = 0; + while (srcI < src.length) { + char c = (char) src[srcI]; + if (!Character.isLetterOrDigit(c) && c != '_' && c != '-') { + simple = false; + } + if (c == '$') { + int i; + for (i = 1; srcI + i < src.length; i++) { + char d = (char) src[srcI + i]; + if (!Character.isLetterOrDigit(d) && d != '_' && c != '-') { + break; + } + } + for (int j = 0; j < i - 1; ++j) { + file_open_env[j] = src[srcI + 1 + j]; + } + file_open_env[i - 1] = 0; + String p = + CobolUtil.getEnv( + new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + if (p != null) { + byte[] pbytes = p.getBytes(); + for (int j = 0; j < pbytes.length; ++j) { + dst[dstI + j] = pbytes[j]; + } + dstI += pbytes.length; + } + srcI += i; + } else { + dst[dstI++] = src[srcI++]; + } + } + + file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + + byte[] fileOpenNameBytes = file_open_name.getBytes(); + cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); + + if (simple) { + int i; + for (i = 0; i < NUM_PREFIX; i++) { + byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); + String p = CobolUtil.getEnv(new String(fileOpenBuff)); + if (p != null) { + fileOpenNameBytes = p.getBytes(); + break; + } + } + + if (i == NUM_PREFIX && cob_file_path != null) { + byte[] fileOpenBuff = + concatString(cob_file_path, "/", file_open_name).getBytes(); + fileOpenNameBytes = fileOpenBuff; + } + } + + file_open_name = new String(fileOpenNameBytes); + } + + boolean wasNotExist = false; + if (this.organization == COB_ORG_INDEXED) { + if (!Files.exists(Paths.get(file_open_name))) { + wasNotExist = true; + if (mode != COB_OPEN_OUTPUT + && !this.flag_optional + && (mode != COB_OPEN_I_O || !"yes".equals(CobolUtil.getEnv(COB_IO_CREATES))) + && (mode != COB_OPEN_EXTEND + || !"yes".equals(CobolUtil.getEnv(COB_EXTEND_CREATES)))) { + saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); + return; + } + } + } else if (Files.notExists(Paths.get(file_open_name))) { + wasNotExist = true; + if (mode != COB_OPEN_OUTPUT + && !this.flag_optional + && (mode != COB_OPEN_I_O || CobolUtil.checkEnv(COB_IO_CREATES, "yes") == 0) + && (mode != COB_OPEN_EXTEND + || CobolUtil.checkEnv(COB_EXTEND_CREATES, "yes") == 0)) { + saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); + return; + } + } + cacheFile(this); + + try { + switch (this.open_(file_open_name, mode, sharing)) { + case 0: + this.open_mode = (char) mode; + if (this.flag_optional && wasNotExist) { + saveStatus(COB_STATUS_05_SUCCESS_OPTIONAL, fnstatus); + return; + } else { + saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + return; + } + case ENOENT: + if (mode == COB_OPEN_EXTEND || mode == COB_OPEN_OUTPUT) { + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + if (this.flag_optional) { + this.open_mode = (char) mode; + this.flag_nonexistent = true; + this.flag_end_of_file = true; + this.flag_begin_of_file = true; + saveStatus(COB_STATUS_05_SUCCESS_OPTIONAL, fnstatus); + return; + } else { + saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); + return; + } + case EACCESS: + case EISDIR: + case EROFS: + saveStatus(COB_STATUS_37_PERMISSION_DENIED, fnstatus); + return; + case COB_STATUS_61_FILE_SHARING: + saveStatus(COB_STATUS_61_FILE_SHARING, fnstatus); + return; + case COB_STATUS_91_NOT_AVAILABLE: + saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); + return; + case COB_LINAGE_INVALID: + saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); + return; + default: + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } catch (IOException e) { + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } + + // protected long start; + // protected long end; + + /** + * TODO: 準備中 + * + * @param mode TODO: 準備中 + * @param sharing TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void openEx(int mode, int sharing, AbstractCobolField fnstatus) { + // this.open_("", mode, sharing); + } + + /** + * TODO: 準備中 + * + * @param filename TODO: 準備中 + * @param mode TODO: 準備中 + * @param sharing TODO: 準備中 + * @return TODO: 準備中 + * @throws IOException TODO: 準備中 + */ + public int open_(String filename, int mode, int sharing) throws IOException { + FileChannel fp = null; + try { + switch (mode) { + case COB_OPEN_INPUT: + fp = FileChannel.open(Paths.get(filename), StandardOpenOption.READ); + break; + case COB_OPEN_OUTPUT: + fp = + FileChannel.open( + Paths.get(filename), + StandardOpenOption.WRITE, + StandardOpenOption.CREATE, + StandardOpenOption.TRUNCATE_EXISTING); + break; + case COB_OPEN_I_O: + fp = + FileChannel.open( + Paths.get(filename), + StandardOpenOption.READ, + StandardOpenOption.WRITE, + StandardOpenOption.CREATE); + break; + case COB_OPEN_EXTEND: + fp = + FileChannel.open( + Paths.get(filename), + StandardOpenOption.APPEND, + StandardOpenOption.CREATE); + break; + default: + break; + } + } catch (IOException e) { + if (Files.notExists(Paths.get(filename))) { + return ENOENT; + } else { + return EACCESS; + } + } + + FileLock fl = null; + if (!filename.startsWith("/dev/")) { + try { + boolean lockFlag; + if (sharing != 0 || mode == COB_OPEN_OUTPUT) { + lockFlag = false; + } else { + lockFlag = true; + } + fl = fp.tryLock(0L, Long.MAX_VALUE, lockFlag); + } catch (NonWritableChannelException e) { + fp.close(); + return EBADF; + } catch (ClosedChannelException e) { + fp.close(); + return COB_STATUS_61_FILE_SHARING; + } + + this.file.setChannel(fp, fl); + if (fl == null || !fl.isValid()) { + fp.close(); + return COB_STATUS_61_FILE_SHARING; + } + } + + this.file.setChannel(fp, fl); + if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { + if (this.file_linage_check()) { + return COB_LINAGE_INVALID; + } + this.flag_needs_top = true; + Linage lingptr = this.getLinorkeyptr(); + lingptr.getLinageCtr().setInt(1); + } + if ((this.organization == COB_ORG_SEQUENTIAL + || this.organization == COB_ORG_LINE_SEQUENTIAL) + && (mode == COB_OPEN_OUTPUT || mode == COB_OPEN_EXTEND) + && CobolUtil.fileSeqWriteBufferSize > 0) { + this.file.prepareWriteBuffer(CobolUtil.fileSeqWriteBufferSize * this.record_max); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void close(int opt, AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + if (invokeFun(COB_IO_CLOSE, this, null, null, fnstatus, openMode, null, null) != 0) { + this.last_open_mode = (char) Integer.parseInt(openMode); + return; + } + + this.flag_read_done = false; + if (this.special != 0) { + this.open_mode = COB_OPEN_CLOSED; + saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + return; + } + if (this.open_mode == COB_OPEN_CLOSED) { + saveStatus(COB_STATUS_42_NOT_OPEN, fnstatus); + return; + } + + int ret; + if (this.flag_nonexistent) { + ret = COB_STATUS_00_SUCCESS; + } else { + ret = this.close_(opt); + } + + if (ret == COB_STATUS_00_SUCCESS) { + switch (opt) { + case COB_CLOSE_LOCK: + this.open_mode = COB_OPEN_LOCKED; + break; + default: + this.open_mode = COB_OPEN_CLOSED; + break; + } + } + saveStatus(ret, fnstatus); + } + + // public void closeEx(int opt, AbstractCobolField fnstatus) { + // this.close_(opt); + // } + + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + */ + public int close_(int opt) { + switch (opt) { + case COB_CLOSE_NORMAL: + case COB_CLOSE_LOCK: + case COB_CLOSE_NO_REWIND: + if (this.organization == COB_ORG_LINE_SEQUENTIAL) { + if (this.flag_needs_nl + && ((this.flag_select_features & COB_SELECT_LINAGE) == 0)) { + this.flag_needs_nl = false; + this.file.putc((byte) '\n'); + } + } + + this.file.releaseLock(); + this.file.close(); + + if (opt == COB_CLOSE_NO_REWIND) { + this.open_mode = COB_OPEN_CLOSED; + return COB_STATUS_07_SUCCESS_NO_UNIT; + } + return COB_STATUS_00_SUCCESS; + default: + this.file.flush(); + return COB_STATUS_07_SUCCESS_NO_UNIT; + } + } + + /** + * TODO: 準備中 + * + * @param cond TODO: 準備中 + * @param key TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void start(int cond, AbstractCobolField key, AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + String startCond = String.format("%01d", cond); + if (invokeFun(COB_IO_START, this, null, null, fnstatus, openMode, startCond, null) != 0) { + return; + } + + this.flag_read_done = false; + this.flag_first_read = 0; + + if (this.flag_nonexistent) { + saveStatus(COB_STATUS_23_KEY_NOT_EXISTS, fnstatus); + return; + } + + if (this.open_mode == COB_OPEN_CLOSED + || this.open_mode == COB_OPEN_OUTPUT + || this.open_mode == COB_OPEN_EXTEND + || this.access_mode == COB_ACCESS_RANDOM) { + saveStatus(COB_STATUS_47_INPUT_DENIED, fnstatus); + return; + } + + int ret = this.start_(cond, key); + if (ret == COB_STATUS_00_SUCCESS) { + this.flag_end_of_file = false; + this.flag_begin_of_file = false; + this.flag_first_read = 1; + } + + saveStatus(ret, fnstatus); + } + + /** + * TODO: 準備中 + * + * @param cond TODO: 準備中 + * @param key TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void startEx(int cond, AbstractCobolField key, AbstractCobolField fnstatus) { + this.start_(cond, key); + } + + /** + * TODO: 準備中 + * + * @param cond TODO: 準備中 + * @param key TODO: 準備中 + * @return TODO: 準備中 + */ + public int start_(int cond, AbstractCobolField key) { + System.out.println("super.start"); + return 0; + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @param readOpts TODO: 準備中 + */ + public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOpts) { + byte[] sbuff = new byte[3]; + String openMode = openModeToString(this.last_open_mode); + String readOptStr = readOptsToString(readOpts); + if (invokeFun(COB_IO_READ, this, key, null, fnstatus, openMode, null, readOptStr) != 0) { + for (int i = 0; i < 3; ++i) { + sbuff[i] = 0; + } + + if (fnstatus == null) { + return; + } + + for (int i = 0; i < 2; ++i) { + sbuff[i] = fnstatus.getDataStorage().getByte(i); + } + int status = Integer.parseInt(new String(sbuff)); + saveStatus(status, fnstatus); + return; + } + + this.flag_read_done = false; + if (this.flag_nonexistent) { + if (this.flag_first_read == 0) { + saveStatus(COB_STATUS_23_KEY_NOT_EXISTS, fnstatus); + return; + } + this.flag_first_read = 0; + saveStatus(COB_STATUS_10_END_OF_FILE, fnstatus); + return; + } + + /* sequential read at the end of file is an error */ + if (key == null) { + if (this.flag_end_of_file && (readOpts & COB_READ_PREVIOUS) == 0) { + saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); + return; + } + if (this.flag_begin_of_file && (readOpts & COB_READ_PREVIOUS) != 0) { + saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); + return; + } + } + + if (this.open_mode == COB_OPEN_CLOSED + || this.open_mode == COB_OPEN_OUTPUT + || this.open_mode == COB_OPEN_EXTEND) { + saveStatus(COB_STATUS_47_INPUT_DENIED, fnstatus); + return; + } + + if (this.organization == COB_ORG_INDEXED) { + if (this.open_mode != COB_OPEN_I_O || (this.lock_mode & COB_LOCK_EXCLUSIVE) != 0) { + readOpts &= ~COB_READ_LOCK; + } else if ((this.lock_mode & COB_LOCK_AUTOMATIC) != 0 + && (readOpts & COB_READ_NO_LOCK) == 0) { + readOpts |= COB_READ_LOCK; + } + } else { + readOpts &= ~COB_READ_LOCK; + } + + if (this.organization == COB_ORG_INDEXED /* && bdb_env != null */) { + if (this.open_mode != COB_OPEN_I_O || (this.lock_mode & COB_LOCK_EXCLUSIVE) != 0) { + readOpts &= ~COB_READ_LOCK; + } else if ((this.lock_mode & COB_LOCK_AUTOMATIC) != 0 + && (readOpts & COB_READ_NO_LOCK) == 0) { + readOpts |= COB_READ_LOCK; + } + } else { + readOpts &= ~COB_READ_LOCK; + } + + int ret; + if (key != null) { + ret = this.read_(key, readOpts); + } else { + ret = this.readNext(readOpts); + } + + switch (ret) { + case COB_STATUS_00_SUCCESS: + this.flag_first_read = 0; + this.flag_read_done = true; + this.flag_end_of_file = false; + this.flag_begin_of_file = false; + if (this.record_size != null && this.organization != COB_ORG_LINE_SEQUENTIAL) { + this.record_size.setInt(record.getSize()); + } + break; + case COB_STATUS_10_END_OF_FILE: + if ((readOpts & COB_READ_PREVIOUS) != 0) { + this.flag_begin_of_file = true; + } else { + this.flag_end_of_file = true; + } + break; + default: + break; + } + + saveStatus(ret, fnstatus); + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @param readOpts TODO: 準備中 + */ + public void read(int key, AbstractCobolField fnstatus, int readOpts) { + this.read(null, fnstatus, readOpts); + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @param readOpts TODO: 準備中 + */ + public void readEx(AbstractCobolField key, AbstractCobolField fnstatus, int readOpts) { + this.read_(key, readOpts); + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param readOpts TODO: 準備中 + * @return TODO: 準備中 + */ + public int read_(AbstractCobolField key, int readOpts) { + System.out.println("super.read"); + return 0; + } + + /** + * TODO: 準備中 + * + * @param readOpts TODO: 準備中 + * @return TODO: 準備中 + */ + public int readNext(int readOpts) { + System.out.println("super.readNext"); + return 0; + } + + /** + * TODO: 準備中 + * + * @param rec TODO: 準備中 + * @param opt TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public void write(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) + throws CobolStopRunException { + if (this.access_mode == COB_ACCESS_SEQUENTIAL + && this.last_open_mode == COB_OPEN_I_O + && CobolUtil.cob_io_rewwrite_assumed()) { + this.rewrite(rec, opt, fnstatus); + return; + } + + String openMode = openModeToString(this.last_open_mode); + if (invokeFun( + COB_IO_WRITE, + this, + null, + rec.getDataStorage(), + fnstatus, + openMode, + null, + null) + != 0) { + return; + } + + this.flag_read_done = false; + if (this.access_mode == COB_ACCESS_SEQUENTIAL) { + if (this.open_mode == COB_OPEN_CLOSED + || this.open_mode == COB_OPEN_INPUT + || this.open_mode == COB_OPEN_I_O) { + saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); + return; + } + } else { + if (this.open_mode == COB_OPEN_CLOSED + || this.open_mode == COB_OPEN_INPUT + || this.open_mode == COB_OPEN_EXTEND) { + saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); + return; + } + } + + int tmpsize = this.record.getSize(); + if (this.record_size != null) { + this.record.setSize(this.record_size.getInt()); + } else { + this.record.setSize(rec.getSize()); + } + + if (this.record.getSize() < this.record_min || this.record_max < this.record.getSize()) { + saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + return; + } + + int ret = this.write_(opt); + + if (cob_do_sync != 0 && ret == 0) { + cob_sync(this, cob_do_sync); + } + + this.record.setSize(tmpsize); + saveStatus(ret, fnstatus); + } + + /** + * TODO: 準備中 + * + * @param rec TODO: 準備中 + * @param opt TODO: 準備中 + * @param fnstatus TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public void writeEx(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) + throws CobolStopRunException { + this.write_(opt); + } + + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public int write_(int opt) throws CobolStopRunException { + System.out.println("super.write"); + return 0; + } + + // libcob/fileio.cのcob_file_write_optの実装 + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + protected int file_write_opt(int opt) throws CobolStopRunException { + if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { + return linage_write_opt(opt); + } + if ((opt & COB_WRITE_LINES) != 0) { + for (int i = opt & COB_WRITE_MASK; i > 0; i--) { + this.file.putc((byte) '\n'); + } + } else if ((opt & COB_WRITE_PAGE) != 0) { + this.file.putc((byte) '\f'); + } + return 0; + } + + /** + * TODO: 準備中 + * + * @param rec TODO: 準備中 + * @param opt TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void rewrite(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + if (invokeFun(COB_IO_REWRITE, this, null, null, fnstatus, openMode, null, null) != 0) { + this.last_open_mode = (char) Integer.parseInt(openMode); + return; + } + + boolean readDone = this.flag_read_done; + this.flag_read_done = false; + + if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { + saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); + return; + } + if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { + saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); + return; + } + if (this.organization == COB_ORG_SEQUENTIAL) { + if (this.record.getSize() != rec.getSize()) { + saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + return; + } + if (this.record_size != null) { + if (this.record.getSize() != this.record_size.getInt()) { + saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + return; + } + } + } + int ret = this.rewrite_(opt); + if (cob_do_sync != 0 && ret == 0) { + cob_sync(this, cob_do_sync); + } + + saveStatus(ret, fnstatus); + } + + /** + * TODO: 準備中 + * + * @param rec TODO: 準備中 + * @param opt TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public void rewriteEx(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) { + this.rewrite_(opt); + } + + /** + * TODO: 準備中 + * + * @param opt TODO: 準備中 + * @return TODO: 準備中 + */ + public int rewrite_(int opt) { + System.out.println("super.rewrite"); + return 0; + } + + /** + * TODO: 準備中 + * + * @param fnstatus TODO: 準備中 + */ + public void delete(AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + if (invokeFun(COB_IO_DELETE, this, null, null, fnstatus, openMode, null, null) != 0) { + return; + } + + boolean readDone = this.flag_read_done; + this.flag_read_done = false; + + if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { + saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); + return; + } + + if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { + saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); + return; + } + + int ret = this.delete_(); + + if (cob_do_sync != 0 && ret == 0) { + cob_sync(this, cob_do_sync); + } + saveStatus(ret, fnstatus); + } + + /** + * TODO: 準備中 + * + * @param fnstatus TODO: 準備中 + */ + public void deleteEx(AbstractCobolField fnstatus) { + this.delete_(); + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int delete_() { + System.out.println("super.delete"); + return 0; + } + + /** + * TODO: 準備中 + * + * @param fnstatus TODO: 準備中 + */ + public void unlock(AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + if (invokeFun(COB_IO_UNLOCK, this, null, null, fnstatus, openMode, null, null) != 0) { + return; + } + this.unlock_(); + saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + } + + /** TODO: 準備中 */ + public void unlock_() { + if (this.open_mode != COB_OPEN_CLOSED && this.open_mode != COB_OPEN_LOCKED) { + this.file.flush(); + } + } + + /** TODO: 準備中 */ + public static void commit() { + if (invokeFun(COB_IO_COMMIT, null, null, null, null, null, null, null) != 0) { + return; + } + for (CobolFile l : file_cache) { + l.unlock_(); + } + } + + /** TODO: 準備中 */ + public static void rollback() { + if (invokeFun(COB_IO_ROLLBACK, null, null, null, null, null, null, null) != 0) { + return; + } + for (CobolFile l : file_cache) { + l.unlock_(); + } + } + + /// libcob/fileio.cのcob_exit_fileioの実装 TODO 一部だけ実装したため残りを実装する + /** TODO: 準備中 */ + public static void exitFileIO() { + for (CobolFile f : file_cache) { + if (f.open_mode != COB_OPEN_CLOSED && f.open_mode != COB_OPEN_LOCKED) { + String filename = f.assign.fieldToString(); + System.err.print( + String.format( + "WARNING - Implicit CLOSE of %s (\"%s\") %c", + f.select_name, filename, '\n')); + } + } + } + + // libcob/fileio.cのcob_syncの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param mode TODO: 準備中 + */ + protected void cob_sync(CobolFile f, int mode) { + // TODO + // INDEXEDファイル実装時にやる + // if (f.organization == COB_ORG_INDEXED) { + // } + if (f.organization != COB_ORG_SORT) { + this.file.flush(); + if (mode == 2) { + this.file.flush(); + } + } + } + + // libcob/fileio.cのcob_init_fileioの実装 + /** TODO: 準備中 */ + public static void cob_init_fileio() { + String s = CobolUtil.getEnv("COB_SYNC"); + if (s != null) { + if (s.charAt(0) == 'Y' || s.charAt(0) == 'y') { + cob_do_sync = 1; + } + if (s.charAt(0) == 'P' || s.charAt(0) == 'p') { + cob_do_sync = 2; + } + } + + cob_file_path = CobolUtil.getEnv("COB_FILE_PATH"); + if (cob_file_path != null) { + if (cob_file_path.charAt(0) == '\0' || cob_file_path.charAt(0) == ' ') { + cob_file_path = null; + } + } + + cob_ls_nulls = CobolUtil.getEnv("COB_LS_NULLS"); + cob_ls_fixed = CobolUtil.getEnv("COB_LS_FIXED"); + + file_open_env = new byte[COB_SMALL_BUFF]; + // file_open_name = new byte[COB_SMALL_BUFF]; + file_open_buff = new byte[COB_SMALL_BUFF]; + } + + /** TODO: 準備中 */ + public static void defaultErrorHandle() { + byte[] fileStatus = CobolFile.errorFile.file_status; + int status = (fileStatus[0] - '0') * 10 + (fileStatus[1] - '0'); + String msg; + switch (status) { + case COB_STATUS_10_END_OF_FILE: + msg = "End of file"; + break; + case COB_STATUS_14_OUT_OF_KEY_RANGE: + msg = "Key out of range"; + break; + case COB_STATUS_21_KEY_INVALID: + msg = "Key order not ascending"; + break; + case COB_STATUS_22_KEY_EXISTS: + msg = "Record key already exists"; + break; + case COB_STATUS_23_KEY_NOT_EXISTS: + msg = "Record key does not exist"; + break; + case COB_STATUS_30_PERMANENT_ERROR: + msg = "Permanent file error"; + break; + case COB_STATUS_35_NOT_EXISTS: + msg = "File does not exist"; + break; + case COB_STATUS_37_PERMISSION_DENIED: + msg = "Permission denied"; + break; + case COB_STATUS_41_ALREADY_OPEN: + msg = "File already open"; + break; + case COB_STATUS_42_NOT_OPEN: + msg = "File not open"; + break; + case COB_STATUS_43_READ_NOT_DONE: + msg = "READ must be executed first"; + break; + case COB_STATUS_44_RECORD_OVERFLOW: + msg = "Record overflow"; + break; + case COB_STATUS_46_READ_ERROR: + msg = "Failed to read"; + break; + case COB_STATUS_47_INPUT_DENIED: + msg = "READ/START not allowed"; + break; + case COB_STATUS_48_OUTPUT_DENIED: + msg = "WRITE not allowed"; + break; + case COB_STATUS_49_I_O_DENIED: + msg = "DELETE/REWRITE not allowed"; + break; + case COB_STATUS_51_RECORD_LOCKED: + msg = "Record locked by another file connector"; + break; + case COB_STATUS_52_EOP: + msg = "A page overflow condition occurred"; + break; + case COB_STATUS_57_I_O_LINAGE: + msg = "LINAGE values invalid"; + break; + case COB_STATUS_61_FILE_SHARING: + msg = "File sharing conflict"; + break; + case COB_STATUS_91_NOT_AVAILABLE: + msg = "Runtime library is not configured for this operation"; + break; + default: + msg = "Unknown file error"; + break; + } + String filename = CobolFile.errorFile.assign.fieldToString(); + CobolUtil.runtimeError( + String.format("%s (STATUS = %02d) File : '%s'", msg, status, filename)); + } + + /** + * TODO: 準備中 + * + * @param fnstatus TODO: 準備中 + */ + public void cob_delete_file(AbstractCobolField fnstatus) { + String openMode = openModeToString(this.last_open_mode); + if (invokeFun(COB_IO_DELETE_FILE, this, null, null, fnstatus, openMode, null, null) != 0) { + return; + } + + if (this.open_mode == COB_OPEN_LOCKED) { + saveStatus(COB_STATUS_38_CLOSED_WITH_LOCK, fnstatus); + return; + } + + /* file is already open */ + if (this.open_mode != COB_OPEN_CLOSED) { + saveStatus(COB_STATUS_41_ALREADY_OPEN, fnstatus); + return; + } + + if (this.special != 0) { + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + + if (this.assign == null) { + file_open_name = this.select_name; + } else { + file_open_name = this.assign.fieldToString(); + } + + byte[] src; + byte[] dst; + boolean simple; + if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { + src = file_open_name.getBytes(); + dst = file_open_buff; + simple = true; + int srcI = 0; + int dstI = 0; + while (srcI < src.length) { + char c = (char) src[srcI]; + if (!Character.isLetterOrDigit(c) && c != '_' && c != '-') { + simple = false; + } + if (c == '$') { + int i; + for (i = 1; srcI + i < src.length; i++) { + char d = (char) src[srcI + i]; + if (!Character.isLetterOrDigit(d) && d != '_' && c != '-') { + break; + } + } + for (int j = 0; j < i - 1; ++j) { + file_open_env[j] = src[srcI + 1 + j]; + } + file_open_env[i - 1] = 0; + String p = + CobolUtil.getEnv( + new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + if (p != null) { + byte[] pbytes = p.getBytes(); + for (int j = 0; j < pbytes.length; ++j) { + dst[dstI + j] = pbytes[j]; + } + dstI += pbytes.length; + } + srcI += i; + } else { + dst[dstI++] = src[srcI++]; + } + } + + file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + + byte[] fileOpenNameBytes = file_open_name.getBytes(); + cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); + + if (simple) { + int i; + for (i = 0; i < NUM_PREFIX; i++) { + byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); + String p = CobolUtil.getEnv(new String(fileOpenBuff)); + if (p != null) { + fileOpenNameBytes = p.getBytes(); + break; + } + } + + if (i == NUM_PREFIX && cob_file_path != null) { + byte[] fileOpenBuff = + concatString(cob_file_path, "/", file_open_name).getBytes(); + fileOpenNameBytes = fileOpenBuff; + } + } + + file_open_name = new String(fileOpenNameBytes); + } + + Path filePath; + if (this.assign == null) { + filePath = Paths.get(this.select_name); + } else { + filePath = Paths.get(this.assign.fieldToString()); + } + try { + saveStatus(COB_STATUS_00_SUCCESS, fnstatus); + Files.delete(filePath); + return; + } catch (IOException e) { + int mode = (int) this.last_open_mode; + try { + switch (this.open_(file_open_name, mode, 0)) { + case ENOENT: + saveStatus(COB_STATUS_35_NOT_EXISTS, fnstatus); + return; + case EACCESS: + case EISDIR: + case EROFS: + saveStatus(COB_STATUS_37_PERMISSION_DENIED, fnstatus); + return; + case EAGAIN: + case COB_STATUS_61_FILE_SHARING: + saveStatus(COB_STATUS_61_FILE_SHARING, fnstatus); + return; + case COB_STATUS_91_NOT_AVAILABLE: + saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); + return; + case COB_LINAGE_INVALID: + saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); + return; + default: + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } catch (IOException e1) { + saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public String getSelectName() { + // CobolFile cobolFile = new CobolFile(); + return this.select_name; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public byte[] getFileStatus() { + // CobolFile cobolFile = new CobolFile(); + return this.file_status; + } + + private static Map externalFileStatusTable = new HashMap(); + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @return TODO: 準備中 + */ + public static byte[] getExternalFileStatus(String key) { + byte[] bytes = externalFileStatusTable.get(key); + if (bytes == null) { + bytes = new byte[2]; + bytes[0] = 0; + bytes[1] = 0; + externalFileStatusTable.put(key, bytes); + } + return bytes; + } + + private static Map externalFileTable = new HashMap(); + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolFile getExternalFile(String key) { + return externalFileTable.get(key); + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param value TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolFile putExternalFile(String key, CobolFile value) { + return externalFileTable.put(key, value); + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileFactory.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileFactory.java index 4e7ad469..bbec6a1e 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileFactory.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileFactory.java @@ -1,220 +1,220 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; - -/** TODO: 準備中 */ -public class CobolFileFactory { - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - * @return TODO: 準備中 - */ - public static CobolFile makeCobolFileInstance( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - switch (organization) { - case CobolFile.COB_ORG_SEQUENTIAL: - return new CobolSequentialFile( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - case CobolFile.COB_ORG_LINE_SEQUENTIAL: - return new CobolLineSequentialFile( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - case CobolFile.COB_ORG_RELATIVE: - return new CobolRelativeFile( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - case CobolFile.COB_ORG_INDEXED: - return new CobolIndexedFile( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - default: - return new CobolFile( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; + +/** TODO: 準備中 */ +public class CobolFileFactory { + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + * @return TODO: 準備中 + */ + public static CobolFile makeCobolFileInstance( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + switch (organization) { + case CobolFile.COB_ORG_SEQUENTIAL: + return new CobolSequentialFile( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + case CobolFile.COB_ORG_LINE_SEQUENTIAL: + return new CobolLineSequentialFile( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + case CobolFile.COB_ORG_RELATIVE: + return new CobolRelativeFile( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + case CobolFile.COB_ORG_INDEXED: + return new CobolIndexedFile( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + default: + return new CobolFile( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileKey.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileKey.java index 2e2ec71e..e59edd4a 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileKey.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileKey.java @@ -1,132 +1,132 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; - -/** TODO: 準備中 */ -public class CobolFileKey { - /** TODO: 準備中 */ - public static final int COB_MAX_KEY_COMPONENTS = 8; - - private AbstractCobolField field; - private int flag; - private int offset; - private int countComponents; - private KeyComponent[] component = new KeyComponent[COB_MAX_KEY_COMPONENTS]; - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public AbstractCobolField getField() { - return field; - } - - /** - * TODO: 準備中 - * - * @param field TODO: 準備中 - */ - public void setField(AbstractCobolField field) { - this.field = field; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getFlag() { - return flag; - } - - /** - * TODO: 準備中 - * - * @param flag TODO: 準備中 - */ - public void setFlag(int flag) { - this.flag = flag; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getOffset() { - return offset; - } - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - */ - public void setOffset(int offset) { - this.offset = offset; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getCountComponents() { - return countComponents; - } - - /** - * TODO: 準備中 - * - * @param countComponents TODO: 準備中 - */ - public void setCountComponents(int countComponents) { - this.countComponents = countComponents; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public KeyComponent[] getComponent() { - return component; - } - - /** - * TODO: 準備中 - * - * @param component TODO: 準備中 - */ - public void setComponent(KeyComponent[] component) { - this.component = component; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public static int getCobMaxKeyComponents() { - return COB_MAX_KEY_COMPONENTS; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; + +/** TODO: 準備中 */ +public class CobolFileKey { + /** TODO: 準備中 */ + public static final int COB_MAX_KEY_COMPONENTS = 8; + + private AbstractCobolField field; + private int flag; + private int offset; + private int countComponents; + private KeyComponent[] component = new KeyComponent[COB_MAX_KEY_COMPONENTS]; + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public AbstractCobolField getField() { + return field; + } + + /** + * TODO: 準備中 + * + * @param field TODO: 準備中 + */ + public void setField(AbstractCobolField field) { + this.field = field; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getFlag() { + return flag; + } + + /** + * TODO: 準備中 + * + * @param flag TODO: 準備中 + */ + public void setFlag(int flag) { + this.flag = flag; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getOffset() { + return offset; + } + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + */ + public void setOffset(int offset) { + this.offset = offset; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getCountComponents() { + return countComponents; + } + + /** + * TODO: 準備中 + * + * @param countComponents TODO: 準備中 + */ + public void setCountComponents(int countComponents) { + this.countComponents = countComponents; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public KeyComponent[] getComponent() { + return component; + } + + /** + * TODO: 準備中 + * + * @param component TODO: 準備中 + */ + public void setComponent(KeyComponent[] component) { + this.component = component; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public static int getCobMaxKeyComponents() { + return COB_MAX_KEY_COMPONENTS; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileSort.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileSort.java index b019cfea..24a48249 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileSort.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFileSort.java @@ -1,1140 +1,1166 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public class CobolFileSort { - /** TODO: 準備中 */ - protected static final int COBSORTEND = 1; - /** TODO: 準備中 */ - protected static final int COBSORTABORT = 2; - /** TODO: 準備中 */ - protected static final int COBSORTFILEERR = 3; - /** TODO: 準備中 */ - protected static final int COBSORTNOTOPEN = 4; - - /** TODO: 準備中 */ - protected static final int COB_ASCENDING = 0; - /** TODO: 準備中 */ - protected static final int COB_DESCENDING = 1; - - private static String cob_process_id = ""; - private static int cob_iteration = 0; - - /** TODO: 準備中 */ - protected static int cob_sort_memory = 128 * 1024 * 1024; - - // Javaの標準ライブラリでソートするならtrue - private static boolean SORT_STD_LIB = true; - private static List dataList; - - /** - * libcob/fileio.cのsort_cmpsの実装 - * - * @param s1 TODO: 準備中 - * @param s2 TODO: 準備中 - * @param size TODO: 準備中 - * @param col TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortCmps( - CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { - if (col != null) { - for (int i = 0; i < size; ++i) { - int ret = (col.getByte(s1.getByte(i)) & 0xff) - (col.getByte(s2.getByte(i)) & 0xff); - if (ret != 0) { - return ret; - } - } - } else { - for (int i = 0; i < size; ++i) { - int ret = (s1.getByte(i) & 0xff) - (s2.getByte(i) & 0xff); - if (ret != 0) { - return ret; - } - } - } - return 0; - } - - private static void uniqueCopy(CobolDataStorage s1, CobolDataStorage s2, int size) { - for (int i = 0; i < size; ++i) { - s1.setByte(s2.getByte(i)); - } - } - - /** - * libcob/fileio.cのcob_file_sort_compareの実装 - * - * @param k1 TODO: 準備中 - * @param k2 TODO: 準備中 - * @param pointer TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortCompare(CobolItem k1, CobolItem k2, CobolFile pointer) { - CobolFile f = pointer; - long u1; - long u2; - int cmp; - - for (int i = 0; i < f.nkeys; i++) { - AbstractCobolField src = f.keys[i].getField(); - - CobolDataStorage d1 = k1.getItem().copy(); - d1.addIndex(f.keys[i].getOffset()); - - CobolDataStorage d2 = k2.getItem().copy(); - d2.addIndex(f.keys[i].getOffset()); - - AbstractCobolField f1 = - CobolFieldFactory.makeCobolField(src.getSize(), d1, src.getAttribute()); - AbstractCobolField f2 = - CobolFieldFactory.makeCobolField(src.getSize(), d2, src.getAttribute()); - - if (f1.getAttribute().isTypeNumeric()) { - cmp = f1.numericCompareTo(f2); - } else { - cmp = sortCmps(f1.getDataStorage(), f2.getDataStorage(), f1.getSize(), f.sort_collating); - } - if (cmp != 0) { - return (f.keys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; - } - } - byte[] bu1 = new byte[8]; - byte[] bu2 = new byte[8]; - uniqueCopy(new CobolDataStorage(bu1), k1.getUnique(), 8); - uniqueCopy(new CobolDataStorage(bu2), k2.getUnique(), 8); - u1 = ByteBuffer.wrap(bu1).getLong(); - u2 = ByteBuffer.wrap(bu2).getLong(); - return u1 < u2 ? -1 : 1; - } - - /** - * libcob/fileio.cのcob_free_listの実装 - * - * @param q TODO: 準備中 - */ - private static void cob_free_list(CobolItem q) { - // nothing to do - } - - /** - * libcob/fileio.cのcob_new_itemの実装 - * - * @param hp TODO: 準備中 - * @return TODO: 準備中 - */ - private static CobolItem newItem(CobolSort hp) { - CobolItem q; - if (hp.getEmpty() != null) { - q = hp.getEmpty(); - hp.setEmpty(q.getNext()); - } else { - q = new CobolItem(); - } - return q; - } - - /** - * libcob/fileio.cのcob_tmpfileの実装 - * - * @return TODO: 準備中 - */ - private static FileIO tmpfile() { - FileIO fp = new FileIO(); - String s = CobolUtil.getEnv("TMPDIR"); - if (s == null) { - s = CobolUtil.getEnv("TMP"); - if (s == null) { - s = CobolUtil.getEnv("TEMP"); - if (s == null) { - s = "/tmp"; - } - } - } - if ("".equals(cob_process_id)) { - cob_process_id = - java.lang.management.ManagementFactory.getRuntimeMXBean().getName().split("@")[0]; - } - String filename = String.format("%s/cobsort_%s_%d", s, cob_process_id, cob_iteration); - cob_iteration++; - outer: - try { - Files.delete(Paths.get(filename)); - } catch (IOException e1) { - break outer; - } - FileChannel fc = null; - try { - fc = - FileChannel.open( - Paths.get(filename), - StandardOpenOption.READ, - StandardOpenOption.WRITE, - StandardOpenOption.CREATE, - StandardOpenOption.TRUNCATE_EXISTING); - } catch (IOException e) { - return null; - } - fp.setChannel(fc, null); - return fp; - } - - /** - * libcob/fileio.cのcob_get_temp_fileの実装 - * - * @param hp TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private static boolean getTempFile(CobolSort hp, int n) { - if (hp.getFile()[n].getFp() == null) { - hp.getFile()[n].setFp(tmpfile()); - if (hp.getFile()[n].getFp() == null) { - // TODO 暫定実装 - System.out.println("SORT is unable to auire temporary file"); - System.exit(0); - } - } else { - hp.getFile()[n].getFp().rewind(); - } - hp.getFile()[n].setCount(0); - return hp.getFile()[n].getFp() == null; - } - - /** - * libcob/fileio.cのcob_sort_queuesの実装 - * - * @param hp TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortQueues(CobolSort hp) { - CobolItem q; - int source = 0; - int destination; - int move; - int n; - int[] endOfBlock = new int[2]; - - while (hp.getQueue()[source + 1].getCount() != 0) { - destination = source ^ 2; - hp.getQueue()[destination].setCount(0); - hp.getQueue()[destination + 1].setCount(0); - hp.getQueue()[destination].setFirst(null); - hp.getQueue()[destination + 1].setFirst(null); - for (; ; ) { - endOfBlock[0] = hp.getQueue()[source].getCount() == 0 ? 1 : 0; - endOfBlock[1] = hp.getQueue()[source + 1].getCount() == 0 ? 1 : 0; - if (endOfBlock[0] != 0 && endOfBlock[1] != 0) { - break; - } - while (endOfBlock[0] == 0 || endOfBlock[1] == 0) { - if (endOfBlock[0] != 0) { - move = 1; - } else if (endOfBlock[1] != 0) { - move = 0; - } else { - n = - sortCompare( - hp.getQueue()[source].getFirst(), - hp.getQueue()[source + 1].getFirst(), - hp.getPointer()); - move = n < 0 ? 0 : 1; - } - q = hp.getQueue()[source + move].getFirst(); - if (q.getEndOfBlock() != 0) { - endOfBlock[move] = 1; - } - q = hp.getQueue()[source + move].getFirst(); - if (q.getEndOfBlock() != 0) { - endOfBlock[move] = 1; - } - hp.getQueue()[source + move].setFirst(q.getNext()); - if (hp.getQueue()[destination].getFirst() == null) { - hp.getQueue()[destination].setFirst(q); - } else { - hp.getQueue()[destination].getLast().setNext(q); - } - hp.getQueue()[destination].setLast(q); - hp.getQueue()[source + move].setCount(hp.getQueue()[source + move].getCount() - 1); - hp.getQueue()[destination].setCount(hp.getQueue()[destination].getCount() + 1); - q.setNext(null); - q.setEndOfBlock(0); - } - hp.getQueue()[destination].getLast().setEndOfBlock(1); - destination ^= 1; - } - source = destination & 2; - } - return source; - } - - /** - * libcob/fileio.cのcob_read_itemの実装 - * - * @param hp TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private static int readItem(CobolSort hp, int n) { - FileIO fp = hp.getFile()[n].getFp(); - if (fp.getc() != 0) { - hp.getQueue()[n].getFirst().setEndOfBlock(1); - } else { - hp.getQueue()[n].getFirst().setEndOfBlock(0); - try { - if (fp.read(hp.getQueue()[n].getFirst().getUnique(), 8) != 8) { - return 1; - } - if (fp.read(hp.getQueue()[n].getFirst().getItem(), hp.getSize()) != hp.getSize()) { - return 1; - } - } catch (IOException e) { - return 1; - } - } - return 0; - } - - /** - * writeBlock内で使う補助メソッド - * - * @param fp TODO: 準備中 - * @param q TODO: 準備中 - * @param hp TODO: 準備中 - * @return 書き込み失敗時true,それ以外はfalse - */ - private static boolean writeItem(FileIO fp, CobolItem q, CobolSort hp) { - byte[] blockByteData = new byte[1]; - blockByteData[0] = q.getBlockByte(); - if (!fp.write(blockByteData, 1)) { - return true; - } - if (!fp.write(q.getUnique(), 8)) { - return true; - } - return fp.write(q.getItem(), hp.getSize()); - } - - /** - * libcob/fileio.cのcob_write_blockの実装 - * - * @param hp TODO: 準備中 - * @param n TODO: 準備中 - * @return TODO: 準備中 - */ - private static int writeBlock(CobolSort hp, int n) { - FileIO fp = hp.getFile()[hp.getDestinationFile()].getFp(); - for (; ; ) { - CobolItem q = hp.getQueue()[n].getFirst(); - if (q == null) { - break; - } - if (writeItem(fp, q, hp)) { - return 1; - } - hp.getQueue()[n].setFirst(q.getNext()); - q.setNext(hp.getEmpty()); - hp.setEmpty(q); - } - hp.getQueue()[n].setCount(0); - hp.getFile()[hp.getDestinationFile()].setCount( - hp.getFile()[hp.getDestinationFile()].getCount() + 1); - if (fp.putc((byte) 1) != 1) { - return 1; - } - return 0; - } - - /** - * libcob/fileio.cのcob_copy_checkの実装 - * - * @param from TODO: 準備中 - */ - private static void copyCheck(CobolFile to, CobolFile from) { - CobolDataStorage toptr = to.record.getDataStorage(); - CobolDataStorage fromptr = from.record.getDataStorage(); - int tosize = to.record.getSize(); - int fromsize = from.record.getSize(); - if (tosize > fromsize) { - for (int i = 0; i < fromsize; ++i) { - toptr.setByte(i, fromptr.getByte(i)); - } - for (int i = 0; i < tosize - fromsize; ++i) { - toptr.setByte(fromsize + i, (byte) ' '); - } - } else { - for (int i = 0; i < tosize; ++i) { - toptr.setByte(i, fromptr.getByte(i)); - } - } - } - - /** - * libcob/fileio.cのcob_file_sort_processの実装 - * - * @param hp TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortProcess(CobolSort hp) { - hp.setRetrieving(1); - int n = sortQueues(hp); - if (hp.getFilesUsed() == 0) { - hp.setRetrievalQueue(n); - return 0; - } - if (writeBlock(hp, n) != 0) { - return COBSORTFILEERR; - } - for (int i = 0; i < 4; i++) { - hp.getQueue()[i].setFirst(hp.getEmpty()); - hp.setEmpty(hp.getEmpty().getNext()); - hp.getQueue()[i].getFirst().setNext(null); - } - hp.getFile()[0].getFp().rewind(); - hp.getFile()[1].getFp().rewind(); - if (getTempFile(hp, 2)) { - return COBSORTFILEERR; - } - if (getTempFile(hp, 3)) { - return COBSORTFILEERR; - } - int source = 0; - while (hp.getFile()[source].getCount() > 1) { - int destination = source ^ 2; - hp.getFile()[destination].setCount(0); - hp.getFile()[destination + 1].setCount(0); - while (hp.getFile()[source].getCount() > 0) { - if (readItem(hp, source) != 0) { - return COBSORTFILEERR; - } - if (hp.getFile()[source + 1].getCount() > 0) { - if (readItem(hp, source + 1) != 0) { - return COBSORTFILEERR; - } - } else { - hp.getQueue()[source + 1].getFirst().setEndOfBlock(1); - } - while (hp.getQueue()[source].getFirst().getEndOfBlock() == 0 - || hp.getQueue()[source + 1].getFirst().getEndOfBlock() == 0) { - int move; - if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { - move = 1; - } else if (hp.getQueue()[source + 1].getFirst().getEndOfBlock() != 0) { - move = 0; - } else { - int res = - sortCompare( - hp.getQueue()[source].getFirst(), - hp.getQueue()[source + 1].getFirst(), - hp.getPointer()); - move = res < 0 ? 0 : 1; - } - if (writeItem( - hp.getFile()[destination].getFp(), hp.getQueue()[source + move].getFirst(), hp)) { - return COBSORTFILEERR; - } - if (readItem(hp, source + move) != 0) { - return COBSORTFILEERR; - } - } - hp.getFile()[destination].setCount(hp.getFile()[destination].getCount() + 1); - if (hp.getFile()[destination].getFp().putc((byte) 1) != 1) { - return COBSORTFILEERR; - } - hp.getFile()[source].setCount(hp.getFile()[source].getCount() - 1); - hp.getFile()[source + 1].setCount(hp.getFile()[source + 1].getCount() - 1); - destination ^= 1; - } - source = destination & 2; - for (int i = 0; i < 4; ++i) { - hp.getFile()[i].getFp().rewind(); - } - } - hp.setRetrievalQueue(source); - if (readItem(hp, source) != 0) { - return COBSORTFILEERR; - } - if (readItem(hp, source + 1) != 0) { - return COBSORTFILEERR; - } - return 0; - } - - /** - * libcob/fileio.cのcob_file_sort_submitの実装 - * - * @param p TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortSubmit(CobolFile f, CobolDataStorage p) { - - if (SORT_STD_LIB) { - dataList.add(new CobolDataStorage(p.getData())); - return 0; - } else { - CobolSort hp = f.filex; - if (hp == null) { - return COBSORTNOTOPEN; - } - if (hp.getRetrieving() != 0) { - return COBSORTABORT; - } - if (hp.getQueue()[0].getCount() + hp.getQueue()[1].getCount() >= hp.getMemory()) { - if (hp.getFilesUsed() == 0) { - if (getTempFile(hp, 0)) { - return COBSORTFILEERR; - } - if (getTempFile(hp, 1)) { - return COBSORTFILEERR; - } - hp.setFilesUsed(1); - hp.setDestinationFile(0); - } - int n = sortQueues(hp); - if (writeBlock(hp, n) != 0) { - return COBSORTFILEERR; - } - hp.setDestinationFile(hp.getDestinationFile() ^ 1); - } - - CobolItem q = newItem(hp); - if (f.record_size != null) { - q.setRecordSize(f.record_size.getInt()); - } else { - q.setRecordSize(hp.getSize()); - } - q.setEndOfBlock(1); - - { - byte[] bytes = new byte[8]; - ByteBuffer buf = ByteBuffer.wrap(bytes); - buf.putInt(hp.getUnique()); - uniqueCopy(q.getUnique(), new CobolDataStorage(bytes), 8); - } - - hp.setUnique(hp.getUnique() + 1); - - byte[] arr = p.getByteArray(0, hp.getSize()); - q.setItem(new CobolDataStorage(arr)); - - MemoryStruct z; - if (hp.getQueue()[0].getCount() <= hp.getQueue()[1].getCount()) { - z = hp.getQueue()[0]; - } else { - z = hp.getQueue()[1]; - } - q.setNext(z.getFirst()); - z.setFirst(q); - z.setCount(z.getCount() + 1); - return 0; - } - } - - /** - * libcob/fileio.cのcob_file_sort_retrieveの実装 - * - * @param p TODO: 準備中 - * @return TODO: 準備中 - */ - private static int sortRetrieve(CobolFile f, CobolDataStorage p) { - CobolSort hp = f.filex; - if (hp == null) { - return COBSORTNOTOPEN; - } - - if (SORT_STD_LIB) { - if (hp.getRetrieving() == 0) { - memorySort(f); - hp.setRetrieving(1); - } - if (dataList.isEmpty()) { - return COBSORTEND; - } - CobolDataStorage storage = dataList.remove(0); - p.setBytes(storage, hp.getSize()); - if (f.record_size != null) { - f.record_size.setInt(hp.getSize()); - } - return 0; - } - - if (hp.getRetrieving() == 0) { - int res = sortProcess(hp); - if (res != 0) { - return res; - } - } - - if (hp.getFilesUsed() != 0) { - int source = hp.getRetrievalQueue(); - int move; - if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { - if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { - return COBSORTEND; - } - move = 1; - } else if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { - move = 0; - } else { - int res = - sortCompare( - hp.getQueue()[source].getFirst(), - hp.getQueue()[source + 1].getFirst(), - hp.getPointer()); - move = res < 0 ? 0 : 1; - } - for (int i = 0; i < hp.getSize(); ++i) { - p.setByte(i, hp.getQueue()[source + move].getFirst().getItem().getByte(i)); - } - if (readItem(hp, source + move) != 0) { - return COBSORTFILEERR; - } - } else { - MemoryStruct z = hp.getQueue()[hp.getRetrievalQueue()]; - if (z.getFirst() == null) { - return COBSORTEND; - } - for (int i = 0; i < hp.getSize(); ++i) { - p.setByte(i, z.getFirst().getItem().getByte(i)); - } - if (f.record_size != null) { - f.record_size.setInt(z.getFirst().getRecordSize()); - } - CobolItem next = z.getFirst().getNext(); - z.getFirst().setNext(hp.getEmpty()); - hp.setEmpty(z.getFirst()); - z.setFirst(next); - } - return 0; - } - - private static void memorySort(CobolFile f) { - dataList.sort( - new Comparator() { - @Override - public int compare(CobolDataStorage data1, CobolDataStorage data2) { - int cmp; - - for (int i = 0; i < f.nkeys; i++) { - AbstractCobolField src = f.keys[i].getField(); - - CobolDataStorage d1 = data1.copy(); - d1.addIndex(f.keys[i].getOffset()); - - CobolDataStorage d2 = data2.copy(); - d2.addIndex(f.keys[i].getOffset()); - - AbstractCobolField f1 = - CobolFieldFactory.makeCobolField(src.getSize(), d1, src.getAttribute()); - AbstractCobolField f2 = - CobolFieldFactory.makeCobolField(src.getSize(), d2, src.getAttribute()); - - if (f1.getAttribute().isTypeNumeric()) { - cmp = f1.numericCompareTo(f2); - } else { - cmp = - sortCmps( - f1.getDataStorage(), f2.getDataStorage(), f1.getSize(), f.sort_collating); - } - if (cmp != 0) { - return (f.keys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; - } - } - return 0; - } - }); - } - - // libcob/fileio.cのcob_file_sort_initの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param collatingSequence TODO: 準備中 - * @param sortReturn TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public static void sortInit( - CobolFile f, - int nkeys, - CobolDataStorage collatingSequence, - CobolDataStorage sortReturn, - AbstractCobolField fnstatus) { - int sizeOfSizeT = 8; - CobolSort p = new CobolSort(); - p.setFnstatus(fnstatus); - p.setSize(f.record_max); - p.setrSize(f.record_max + sizeOfSizeT); - p.setwSize(f.record_max + sizeOfSizeT + 1); - p.setPointer(f); - p.setSortReturn(sortReturn); - sortReturn.set(0); - // opensource COBOLでsizeof(struct cobitem) == 32だっため,32を使用した - p.setMemory(cob_sort_memory / (p.getSize() + 32)); - dataList = new ArrayList(); - f.filex = p; - f.keys = new CobolFileKey[nkeys]; - for (int i = 0; i < nkeys; ++i) { - f.keys[i] = new CobolFileKey(); - } - f.nkeys = 0; - if (collatingSequence != null) { - f.sort_collating = collatingSequence; - } else { - f.sort_collating = CobolModule.getCurrentModule().collating_sequence; - } - f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); - } - - // libcob/fileio.cのcob_file_sort_initの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param collatingSequence TODO: 準備中 - * @param sortReturn TODO: 準備中 - * @param fnstatus TODO: 準備中 - */ - public static void sortInit( - CobolFile f, - int nkeys, - int collatingSequence, - CobolDataStorage sortReturn, - AbstractCobolField fnstatus) { - sortInit(f, nkeys, null, sortReturn, fnstatus); - } - - // libcob/fileio.cのcob_file_sort_init_keyの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param flag TODO: 準備中 - * @param field TODO: 準備中 - * @param offset TODO: 準備中 - */ - public static void sortInitKey(CobolFile f, int flag, AbstractCobolField field, int offset) { - f.keys[f.nkeys].setFlag(flag); - f.keys[f.nkeys].setField(field); - f.keys[f.nkeys].setOffset(offset); - f.nkeys++; - } - - // libcob/fileio.cのcob_file_sort_usingの実装 - /** - * TODO: 準備中 - * - * @param sortFile TODO: 準備中 - * @param dataFile TODO: 準備中 - */ - public static void sortUsing(CobolFile sortFile, CobolFile dataFile) { - dataFile.open(CobolFile.COB_OPEN_INPUT, 0, null); - for (; ; ) { - dataFile.read(null, null, CobolFile.COB_READ_NEXT); - if (dataFile.file_status[0] != (byte) '0') { - break; - } - copyCheck(sortFile, dataFile); - int ret = sortSubmit(sortFile, sortFile.record.getDataStorage()); - if (ret != 0) { - break; - } - } - dataFile.close(CobolFile.COB_CLOSE_NORMAL, null); - } - - // libcob/fileio.cのcob_file_sort_givingの実装 - /** - * TODO: 準備中 - * - * @param sortFile TODO: 準備中 - * @param varcnt TODO: 準備中 - * @param fbase TODO: 準備中 - * @throws CobolStopRunException TODO: 準備中 - */ - public static void sortGiving(CobolFile sortFile, int varcnt, CobolFile... fbase) - throws CobolStopRunException { - if (SORT_STD_LIB) { - for (int i = 0; i < varcnt; i++) { - fbase[i].open(CobolFile.COB_OPEN_OUTPUT, 0, null); - } - - int cntRec = 0; - memorySort(sortFile); - for (CobolDataStorage d : dataList) { - for (int i = 0; i < varcnt; i++) { - int opt; - if (fbase[i].special != 0 || fbase[i].organization == CobolFile.COB_ORG_LINE_SEQUENTIAL) { - opt = CobolFile.COB_WRITE_BEFORE | CobolFile.COB_WRITE_LINES | 1; - } else { - opt = 0; - } - sortFile.record.getDataStorage().memcpy(d, sortFile.record.getSize()); - copyCheck(fbase[i], sortFile); - fbase[i].write(fbase[i].record, opt, null); - } - cntRec++; - } - sortFile.file_status[0] = '1'; - sortFile.file_status[1] = '0'; - - for (int i = 0; i < varcnt; i++) { - fbase[i].close(CobolFile.COB_CLOSE_NORMAL, null); - } - CobolUtil.verboseOutput(String.format("END OF SORT/MERGE, RECORD=%d.", cntRec)); - - } else { - - for (int i = 0; i < varcnt; i++) { - fbase[i].open(CobolFile.COB_OPEN_OUTPUT, 0, null); - } - int cntRec = 0; - for (; ; ) { - int ret = sortRetrieve(sortFile, sortFile.record.getDataStorage()); - if (ret != 0) { - if (ret == COBSORTEND) { - sortFile.file_status[0] = '1'; - sortFile.file_status[1] = '0'; - } else { - CobolSort hp = sortFile.filex; - hp.getSortReturn().set(16); - sortFile.file_status[0] = '3'; - sortFile.file_status[1] = '0'; - } - break; - } - for (int i = 0; i < varcnt; i++) { - int opt; - if (fbase[i].special != 0 || fbase[i].organization == CobolFile.COB_ORG_LINE_SEQUENTIAL) { - opt = CobolFile.COB_WRITE_BEFORE | CobolFile.COB_WRITE_LINES | 1; - } else { - opt = 0; - } - copyCheck(fbase[i], sortFile); - fbase[i].write(fbase[i].record, opt, null); - } - cntRec++; - } - for (int i = 0; i < varcnt; i++) { - fbase[i].close(CobolFile.COB_CLOSE_NORMAL, null); - } - CobolUtil.verboseOutput(String.format("END OF SORT/MERGE, RECORD=%d.", cntRec)); - } - } - - // libcob/fileio.cのcob_file_sort_closeの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void sortClose(CobolFile f) { - AbstractCobolField fnstatus = null; - CobolSort hp = f.filex; - - if (hp != null) { - fnstatus = hp.getFnstatus(); - cob_free_list(hp.getEmpty()); - for (int i = 0; i < 4; ++i) { - cob_free_list(hp.getQueue()[i].getFirst()); - if (hp.getFile()[i].getFp() != null) { - hp.getFile()[i].getFp().close(); - } - } - } - f.filex = null; - f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); - } - - // libcob/fileio.cのcob_file_releaseの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void performRelease(CobolFile f) { - AbstractCobolField fnstatus = null; - CobolSort hp = f.filex; - - if (hp != null) { - fnstatus = hp.getFnstatus(); - } - int ret = CobolFileSort.sortSubmit(f, f.record.getDataStorage()); - switch (ret) { - case 0: - f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); - return; - default: - if (hp != null) { - hp.getSortReturn().set(16); - } - f.saveStatus(CobolFile.COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } - - // libcob/fileio.cのcob_file_returnの実装 - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void performReturn(CobolFile f) { - AbstractCobolField fnstatus = null; - CobolSort hp = f.filex; - if (hp != null) { - fnstatus = hp.getFnstatus(); - } - - int ret = CobolFileSort.sortRetrieve(f, f.record.getDataStorage()); - switch (ret) { - case 0: - f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); - return; - case CobolFileSort.COBSORTEND: - f.saveStatus(CobolFile.COB_STATUS_10_END_OF_FILE, fnstatus); - return; - default: - if (hp != null) { - hp.getSortReturn().set(16); - } - f.saveStatus(CobolFile.COB_STATUS_30_PERMANENT_ERROR, fnstatus); - return; - } - } - - /* Table sort */ - private static int sortNKeys; - private static CobolFileKey[] sortKeys; - private static CobolDataStorage sortCollate; - private static CobolDataStorage pivotStorage = new CobolDataStorage(); - private static CobolDataStorage leftStorage = new CobolDataStorage(); - private static CobolDataStorage rightStorage = new CobolDataStorage(); - private static CobolDataStorage cmpStorage1 = new CobolDataStorage(); - private static CobolDataStorage cmpStorage2 = new CobolDataStorage(); - private static CobolDataStorage copyBuffer = null; - private static CobolDataStorage tmpRecord = new CobolDataStorage(); - private static int copyBufferSizeMax = 0; - private static int[] sortBuffer = null; - private static AbstractCobolField cmpField1 = - CobolFieldFactory.makeCobolField( - 0, - cmpStorage1, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); - private static AbstractCobolField cmpField2 = - CobolFieldFactory.makeCobolField( - 0, - cmpStorage2, - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); - - /** - * TODO: 準備中 - * - * @param nkeys TODO: 準備中 - * @param collatingSequence TODO: 準備中 - */ - public static void sortTableInit(int nkeys, int collatingSequence) { - sortTableInit(nkeys, null); - } - - /** - * TODO: 準備中 - * - * @param nkeys TODO: 準備中 - * @param collatingSequence TODO: 準備中 - */ - public static void sortTableInit(int nkeys, CobolDataStorage collatingSequence) { - sortNKeys = 0; - if (sortKeys == null || sortKeys.length < nkeys) { - sortKeys = new CobolFileKey[nkeys]; - } - if (collatingSequence != null) { - sortCollate = collatingSequence; - } else { - sortCollate = CobolModule.getCurrentModule().collating_sequence; - } - } - - /** - * TODO: 準備中 - * - * @param flag TODO: 準備中 - * @param field TODO: 準備中 - * @param offset TODO: 準備中 - */ - public static void sortTableInitKey(int flag, AbstractCobolField field, int offset) { - if (sortKeys[sortNKeys] == null) { - sortKeys[sortNKeys] = new CobolFileKey(); - } - sortKeys[sortNKeys].setFlag(flag); - sortKeys[sortNKeys].setField( - CobolFieldFactory.makeCobolField( - field.getSize(), (CobolDataStorage) null, field.getAttribute())); - sortKeys[sortNKeys].setOffset(offset); - sortNKeys++; - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - * @param n TODO: 準備中 - */ - public static void sortTable(AbstractCobolField f, int n) { - int recordSize = f.getSize(); - if (sortBuffer == null || sortBuffer.length < n) { - sortBuffer = new int[n]; - } - for (int i = 0; i < n; ++i) { - sortBuffer[i] = i; - } - CobolDataStorage baseStorage = f.getDataStorage(); - int baseStorageBaseIndex = baseStorage.getIndex(); - indexQuickSort(f.getDataStorage(), 0, n, recordSize); - - int copyBufferSize = n * f.getSize(); - if (copyBuffer == null || copyBufferSizeMax < copyBufferSize) { - copyBuffer = new CobolDataStorage(copyBufferSize); - copyBufferSizeMax = copyBufferSize; - } - - for (int i = 0; i < n; ++i, copyBuffer.addIndex(recordSize)) { - tmpRecord.setDataRefAndIndex(baseStorage, baseStorageBaseIndex + recordSize * sortBuffer[i]); - copyBuffer.memcpy(tmpRecord, recordSize); - } - copyBuffer.setIndex(0); - baseStorage.memcpy(copyBuffer, copyBufferSize); - } - - private static void indexQuickSort( - CobolDataStorage base, int mostLeft, int mostRight, int recordSize) { - - if (mostRight - mostLeft <= 1) { - return; - } - - int pivot = (mostRight + mostLeft) / 2; - int left = mostLeft, right = mostRight - 1; - - while (true) { - pivotStorage.setDataRefAndIndex(base, base.getIndex() + sortBuffer[pivot] * recordSize); - boolean elementBiggerThanPivot = false; - for (; left < pivot; ++left) { - leftStorage.setDataRefAndIndex(base, base.getIndex() + sortBuffer[left] * recordSize); - if (compareStorageForSort(leftStorage, pivotStorage) > 0) { - elementBiggerThanPivot = true; - break; - } - } - boolean elementSmallerThanPivot = false; - for (; right > pivot; --right) { - rightStorage.setDataRefAndIndex(base, base.getIndex() + sortBuffer[right] * recordSize); - if (compareStorageForSort(pivotStorage, rightStorage) > 0) { - elementSmallerThanPivot = true; - break; - } - } - if (elementBiggerThanPivot && elementSmallerThanPivot) { - swap2Indecies(left, right); - ++left; - --right; - } else if (elementBiggerThanPivot && !elementSmallerThanPivot) { - if (left + 1 == pivot) { - swap2Indecies(left, pivot); - } else { - rotate3Indecies(pivot, pivot - 1, left); - } - --pivot; - } else if (!elementBiggerThanPivot && elementSmallerThanPivot) { - if (right - 1 == pivot) { - swap2Indecies(pivot, right); - } else { - rotate3Indecies(pivot, pivot + 1, right); - } - ++pivot; - } else { - break; - } - } - indexQuickSort(base, mostLeft, pivot, recordSize); - indexQuickSort(base, pivot + 1, mostRight, recordSize); - } - - private static int compareStorageForSort(CobolDataStorage s1, CobolDataStorage s2) { - for (int i = 0; i < sortNKeys; ++i) { - - cmpStorage1.setDataRefAndIndex(s1, s1.getIndex() + sortKeys[i].getOffset()); - cmpStorage2.setDataRefAndIndex(s2, s2.getIndex() + sortKeys[i].getOffset()); - - int cmp; - CobolFieldAttribute attr = sortKeys[i].getField().getAttribute(); - int keySize = sortKeys[i].getField().getSize(); - if (attr.isTypeNumeric()) { - cmpField1.setSize(keySize); - cmpField2.setSize(keySize); - - cmpField1.setAttribute(attr); - cmpField2.setAttribute(attr); - - cmp = cmpField1.numericCompareTo(cmpField2); - } else if (attr.isTypeNational()) { - cmp = CobolUtil.nationalCmps(cmpStorage1, cmpStorage2, keySize, sortCollate); - } else { - cmp = CobolUtil.alnumCmps(cmpStorage1, cmpStorage2, keySize, sortCollate); - } - if (cmp != 0) { - return (sortKeys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; - } - } - return 0; - } - - private static void swap2Indecies(int a, int b) { - int tmp = sortBuffer[a]; - sortBuffer[a] = sortBuffer[b]; - sortBuffer[b] = tmp; - } - - private static void rotate3Indecies(int a, int b, int c) { - int tmp = sortBuffer[c]; - sortBuffer[c] = sortBuffer[b]; - sortBuffer[b] = sortBuffer[a]; - sortBuffer[a] = tmp; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public class CobolFileSort { + /** TODO: 準備中 */ + protected static final int COBSORTEND = 1; + + /** TODO: 準備中 */ + protected static final int COBSORTABORT = 2; + + /** TODO: 準備中 */ + protected static final int COBSORTFILEERR = 3; + + /** TODO: 準備中 */ + protected static final int COBSORTNOTOPEN = 4; + + /** TODO: 準備中 */ + protected static final int COB_ASCENDING = 0; + + /** TODO: 準備中 */ + protected static final int COB_DESCENDING = 1; + + private static String cob_process_id = ""; + private static int cob_iteration = 0; + + /** TODO: 準備中 */ + protected static int cob_sort_memory = 128 * 1024 * 1024; + + // Javaの標準ライブラリでソートするならtrue + private static boolean SORT_STD_LIB = true; + private static List dataList; + + /** + * libcob/fileio.cのsort_cmpsの実装 + * + * @param s1 TODO: 準備中 + * @param s2 TODO: 準備中 + * @param size TODO: 準備中 + * @param col TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortCmps( + CobolDataStorage s1, CobolDataStorage s2, int size, CobolDataStorage col) { + if (col != null) { + for (int i = 0; i < size; ++i) { + int ret = (col.getByte(s1.getByte(i)) & 0xff) - (col.getByte(s2.getByte(i)) & 0xff); + if (ret != 0) { + return ret; + } + } + } else { + for (int i = 0; i < size; ++i) { + int ret = (s1.getByte(i) & 0xff) - (s2.getByte(i) & 0xff); + if (ret != 0) { + return ret; + } + } + } + return 0; + } + + private static void uniqueCopy(CobolDataStorage s1, CobolDataStorage s2, int size) { + for (int i = 0; i < size; ++i) { + s1.setByte(s2.getByte(i)); + } + } + + /** + * libcob/fileio.cのcob_file_sort_compareの実装 + * + * @param k1 TODO: 準備中 + * @param k2 TODO: 準備中 + * @param pointer TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortCompare(CobolItem k1, CobolItem k2, CobolFile pointer) { + CobolFile f = pointer; + long u1; + long u2; + int cmp; + + for (int i = 0; i < f.nkeys; i++) { + AbstractCobolField src = f.keys[i].getField(); + + CobolDataStorage d1 = k1.getItem().copy(); + d1.addIndex(f.keys[i].getOffset()); + + CobolDataStorage d2 = k2.getItem().copy(); + d2.addIndex(f.keys[i].getOffset()); + + AbstractCobolField f1 = + CobolFieldFactory.makeCobolField(src.getSize(), d1, src.getAttribute()); + AbstractCobolField f2 = + CobolFieldFactory.makeCobolField(src.getSize(), d2, src.getAttribute()); + + if (f1.getAttribute().isTypeNumeric()) { + cmp = f1.numericCompareTo(f2); + } else { + cmp = + sortCmps( + f1.getDataStorage(), + f2.getDataStorage(), + f1.getSize(), + f.sort_collating); + } + if (cmp != 0) { + return (f.keys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; + } + } + byte[] bu1 = new byte[8]; + byte[] bu2 = new byte[8]; + uniqueCopy(new CobolDataStorage(bu1), k1.getUnique(), 8); + uniqueCopy(new CobolDataStorage(bu2), k2.getUnique(), 8); + u1 = ByteBuffer.wrap(bu1).getLong(); + u2 = ByteBuffer.wrap(bu2).getLong(); + return u1 < u2 ? -1 : 1; + } + + /** + * libcob/fileio.cのcob_free_listの実装 + * + * @param q TODO: 準備中 + */ + private static void cob_free_list(CobolItem q) { + // nothing to do + } + + /** + * libcob/fileio.cのcob_new_itemの実装 + * + * @param hp TODO: 準備中 + * @return TODO: 準備中 + */ + private static CobolItem newItem(CobolSort hp) { + CobolItem q; + if (hp.getEmpty() != null) { + q = hp.getEmpty(); + hp.setEmpty(q.getNext()); + } else { + q = new CobolItem(); + } + return q; + } + + /** + * libcob/fileio.cのcob_tmpfileの実装 + * + * @return TODO: 準備中 + */ + private static FileIO tmpfile() { + FileIO fp = new FileIO(); + String s = CobolUtil.getEnv("TMPDIR"); + if (s == null) { + s = CobolUtil.getEnv("TMP"); + if (s == null) { + s = CobolUtil.getEnv("TEMP"); + if (s == null) { + s = "/tmp"; + } + } + } + if ("".equals(cob_process_id)) { + cob_process_id = + java.lang.management.ManagementFactory.getRuntimeMXBean() + .getName() + .split("@")[0]; + } + String filename = String.format("%s/cobsort_%s_%d", s, cob_process_id, cob_iteration); + cob_iteration++; + outer: + try { + Files.delete(Paths.get(filename)); + } catch (IOException e1) { + break outer; + } + FileChannel fc = null; + try { + fc = + FileChannel.open( + Paths.get(filename), + StandardOpenOption.READ, + StandardOpenOption.WRITE, + StandardOpenOption.CREATE, + StandardOpenOption.TRUNCATE_EXISTING); + } catch (IOException e) { + return null; + } + fp.setChannel(fc, null); + return fp; + } + + /** + * libcob/fileio.cのcob_get_temp_fileの実装 + * + * @param hp TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private static boolean getTempFile(CobolSort hp, int n) { + if (hp.getFile()[n].getFp() == null) { + hp.getFile()[n].setFp(tmpfile()); + if (hp.getFile()[n].getFp() == null) { + // TODO 暫定実装 + System.out.println("SORT is unable to auire temporary file"); + System.exit(0); + } + } else { + hp.getFile()[n].getFp().rewind(); + } + hp.getFile()[n].setCount(0); + return hp.getFile()[n].getFp() == null; + } + + /** + * libcob/fileio.cのcob_sort_queuesの実装 + * + * @param hp TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortQueues(CobolSort hp) { + CobolItem q; + int source = 0; + int destination; + int move; + int n; + int[] endOfBlock = new int[2]; + + while (hp.getQueue()[source + 1].getCount() != 0) { + destination = source ^ 2; + hp.getQueue()[destination].setCount(0); + hp.getQueue()[destination + 1].setCount(0); + hp.getQueue()[destination].setFirst(null); + hp.getQueue()[destination + 1].setFirst(null); + for (; ; ) { + endOfBlock[0] = hp.getQueue()[source].getCount() == 0 ? 1 : 0; + endOfBlock[1] = hp.getQueue()[source + 1].getCount() == 0 ? 1 : 0; + if (endOfBlock[0] != 0 && endOfBlock[1] != 0) { + break; + } + while (endOfBlock[0] == 0 || endOfBlock[1] == 0) { + if (endOfBlock[0] != 0) { + move = 1; + } else if (endOfBlock[1] != 0) { + move = 0; + } else { + n = + sortCompare( + hp.getQueue()[source].getFirst(), + hp.getQueue()[source + 1].getFirst(), + hp.getPointer()); + move = n < 0 ? 0 : 1; + } + q = hp.getQueue()[source + move].getFirst(); + if (q.getEndOfBlock() != 0) { + endOfBlock[move] = 1; + } + q = hp.getQueue()[source + move].getFirst(); + if (q.getEndOfBlock() != 0) { + endOfBlock[move] = 1; + } + hp.getQueue()[source + move].setFirst(q.getNext()); + if (hp.getQueue()[destination].getFirst() == null) { + hp.getQueue()[destination].setFirst(q); + } else { + hp.getQueue()[destination].getLast().setNext(q); + } + hp.getQueue()[destination].setLast(q); + hp.getQueue()[source + move].setCount( + hp.getQueue()[source + move].getCount() - 1); + hp.getQueue()[destination].setCount(hp.getQueue()[destination].getCount() + 1); + q.setNext(null); + q.setEndOfBlock(0); + } + hp.getQueue()[destination].getLast().setEndOfBlock(1); + destination ^= 1; + } + source = destination & 2; + } + return source; + } + + /** + * libcob/fileio.cのcob_read_itemの実装 + * + * @param hp TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private static int readItem(CobolSort hp, int n) { + FileIO fp = hp.getFile()[n].getFp(); + if (fp.getc() != 0) { + hp.getQueue()[n].getFirst().setEndOfBlock(1); + } else { + hp.getQueue()[n].getFirst().setEndOfBlock(0); + try { + if (fp.read(hp.getQueue()[n].getFirst().getUnique(), 8) != 8) { + return 1; + } + if (fp.read(hp.getQueue()[n].getFirst().getItem(), hp.getSize()) != hp.getSize()) { + return 1; + } + } catch (IOException e) { + return 1; + } + } + return 0; + } + + /** + * writeBlock内で使う補助メソッド + * + * @param fp TODO: 準備中 + * @param q TODO: 準備中 + * @param hp TODO: 準備中 + * @return 書き込み失敗時true,それ以外はfalse + */ + private static boolean writeItem(FileIO fp, CobolItem q, CobolSort hp) { + byte[] blockByteData = new byte[1]; + blockByteData[0] = q.getBlockByte(); + if (!fp.write(blockByteData, 1)) { + return true; + } + if (!fp.write(q.getUnique(), 8)) { + return true; + } + return fp.write(q.getItem(), hp.getSize()); + } + + /** + * libcob/fileio.cのcob_write_blockの実装 + * + * @param hp TODO: 準備中 + * @param n TODO: 準備中 + * @return TODO: 準備中 + */ + private static int writeBlock(CobolSort hp, int n) { + FileIO fp = hp.getFile()[hp.getDestinationFile()].getFp(); + for (; ; ) { + CobolItem q = hp.getQueue()[n].getFirst(); + if (q == null) { + break; + } + if (writeItem(fp, q, hp)) { + return 1; + } + hp.getQueue()[n].setFirst(q.getNext()); + q.setNext(hp.getEmpty()); + hp.setEmpty(q); + } + hp.getQueue()[n].setCount(0); + hp.getFile()[hp.getDestinationFile()].setCount( + hp.getFile()[hp.getDestinationFile()].getCount() + 1); + if (fp.putc((byte) 1) != 1) { + return 1; + } + return 0; + } + + /** + * libcob/fileio.cのcob_copy_checkの実装 + * + * @param from TODO: 準備中 + */ + private static void copyCheck(CobolFile to, CobolFile from) { + CobolDataStorage toptr = to.record.getDataStorage(); + CobolDataStorage fromptr = from.record.getDataStorage(); + int tosize = to.record.getSize(); + int fromsize = from.record.getSize(); + if (tosize > fromsize) { + for (int i = 0; i < fromsize; ++i) { + toptr.setByte(i, fromptr.getByte(i)); + } + for (int i = 0; i < tosize - fromsize; ++i) { + toptr.setByte(fromsize + i, (byte) ' '); + } + } else { + for (int i = 0; i < tosize; ++i) { + toptr.setByte(i, fromptr.getByte(i)); + } + } + } + + /** + * libcob/fileio.cのcob_file_sort_processの実装 + * + * @param hp TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortProcess(CobolSort hp) { + hp.setRetrieving(1); + int n = sortQueues(hp); + if (hp.getFilesUsed() == 0) { + hp.setRetrievalQueue(n); + return 0; + } + if (writeBlock(hp, n) != 0) { + return COBSORTFILEERR; + } + for (int i = 0; i < 4; i++) { + hp.getQueue()[i].setFirst(hp.getEmpty()); + hp.setEmpty(hp.getEmpty().getNext()); + hp.getQueue()[i].getFirst().setNext(null); + } + hp.getFile()[0].getFp().rewind(); + hp.getFile()[1].getFp().rewind(); + if (getTempFile(hp, 2)) { + return COBSORTFILEERR; + } + if (getTempFile(hp, 3)) { + return COBSORTFILEERR; + } + int source = 0; + while (hp.getFile()[source].getCount() > 1) { + int destination = source ^ 2; + hp.getFile()[destination].setCount(0); + hp.getFile()[destination + 1].setCount(0); + while (hp.getFile()[source].getCount() > 0) { + if (readItem(hp, source) != 0) { + return COBSORTFILEERR; + } + if (hp.getFile()[source + 1].getCount() > 0) { + if (readItem(hp, source + 1) != 0) { + return COBSORTFILEERR; + } + } else { + hp.getQueue()[source + 1].getFirst().setEndOfBlock(1); + } + while (hp.getQueue()[source].getFirst().getEndOfBlock() == 0 + || hp.getQueue()[source + 1].getFirst().getEndOfBlock() == 0) { + int move; + if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { + move = 1; + } else if (hp.getQueue()[source + 1].getFirst().getEndOfBlock() != 0) { + move = 0; + } else { + int res = + sortCompare( + hp.getQueue()[source].getFirst(), + hp.getQueue()[source + 1].getFirst(), + hp.getPointer()); + move = res < 0 ? 0 : 1; + } + if (writeItem( + hp.getFile()[destination].getFp(), + hp.getQueue()[source + move].getFirst(), + hp)) { + return COBSORTFILEERR; + } + if (readItem(hp, source + move) != 0) { + return COBSORTFILEERR; + } + } + hp.getFile()[destination].setCount(hp.getFile()[destination].getCount() + 1); + if (hp.getFile()[destination].getFp().putc((byte) 1) != 1) { + return COBSORTFILEERR; + } + hp.getFile()[source].setCount(hp.getFile()[source].getCount() - 1); + hp.getFile()[source + 1].setCount(hp.getFile()[source + 1].getCount() - 1); + destination ^= 1; + } + source = destination & 2; + for (int i = 0; i < 4; ++i) { + hp.getFile()[i].getFp().rewind(); + } + } + hp.setRetrievalQueue(source); + if (readItem(hp, source) != 0) { + return COBSORTFILEERR; + } + if (readItem(hp, source + 1) != 0) { + return COBSORTFILEERR; + } + return 0; + } + + /** + * libcob/fileio.cのcob_file_sort_submitの実装 + * + * @param p TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortSubmit(CobolFile f, CobolDataStorage p) { + + if (SORT_STD_LIB) { + dataList.add(new CobolDataStorage(p.getData())); + return 0; + } else { + CobolSort hp = f.filex; + if (hp == null) { + return COBSORTNOTOPEN; + } + if (hp.getRetrieving() != 0) { + return COBSORTABORT; + } + if (hp.getQueue()[0].getCount() + hp.getQueue()[1].getCount() >= hp.getMemory()) { + if (hp.getFilesUsed() == 0) { + if (getTempFile(hp, 0)) { + return COBSORTFILEERR; + } + if (getTempFile(hp, 1)) { + return COBSORTFILEERR; + } + hp.setFilesUsed(1); + hp.setDestinationFile(0); + } + int n = sortQueues(hp); + if (writeBlock(hp, n) != 0) { + return COBSORTFILEERR; + } + hp.setDestinationFile(hp.getDestinationFile() ^ 1); + } + + CobolItem q = newItem(hp); + if (f.record_size != null) { + q.setRecordSize(f.record_size.getInt()); + } else { + q.setRecordSize(hp.getSize()); + } + q.setEndOfBlock(1); + + { + byte[] bytes = new byte[8]; + ByteBuffer buf = ByteBuffer.wrap(bytes); + buf.putInt(hp.getUnique()); + uniqueCopy(q.getUnique(), new CobolDataStorage(bytes), 8); + } + + hp.setUnique(hp.getUnique() + 1); + + byte[] arr = p.getByteArray(0, hp.getSize()); + q.setItem(new CobolDataStorage(arr)); + + MemoryStruct z; + if (hp.getQueue()[0].getCount() <= hp.getQueue()[1].getCount()) { + z = hp.getQueue()[0]; + } else { + z = hp.getQueue()[1]; + } + q.setNext(z.getFirst()); + z.setFirst(q); + z.setCount(z.getCount() + 1); + return 0; + } + } + + /** + * libcob/fileio.cのcob_file_sort_retrieveの実装 + * + * @param p TODO: 準備中 + * @return TODO: 準備中 + */ + private static int sortRetrieve(CobolFile f, CobolDataStorage p) { + CobolSort hp = f.filex; + if (hp == null) { + return COBSORTNOTOPEN; + } + + if (SORT_STD_LIB) { + if (hp.getRetrieving() == 0) { + memorySort(f); + hp.setRetrieving(1); + } + if (dataList.isEmpty()) { + return COBSORTEND; + } + CobolDataStorage storage = dataList.remove(0); + p.setBytes(storage, hp.getSize()); + if (f.record_size != null) { + f.record_size.setInt(hp.getSize()); + } + return 0; + } + + if (hp.getRetrieving() == 0) { + int res = sortProcess(hp); + if (res != 0) { + return res; + } + } + + if (hp.getFilesUsed() != 0) { + int source = hp.getRetrievalQueue(); + int move; + if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { + if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { + return COBSORTEND; + } + move = 1; + } else if (hp.getQueue()[source].getFirst().getEndOfBlock() != 0) { + move = 0; + } else { + int res = + sortCompare( + hp.getQueue()[source].getFirst(), + hp.getQueue()[source + 1].getFirst(), + hp.getPointer()); + move = res < 0 ? 0 : 1; + } + for (int i = 0; i < hp.getSize(); ++i) { + p.setByte(i, hp.getQueue()[source + move].getFirst().getItem().getByte(i)); + } + if (readItem(hp, source + move) != 0) { + return COBSORTFILEERR; + } + } else { + MemoryStruct z = hp.getQueue()[hp.getRetrievalQueue()]; + if (z.getFirst() == null) { + return COBSORTEND; + } + for (int i = 0; i < hp.getSize(); ++i) { + p.setByte(i, z.getFirst().getItem().getByte(i)); + } + if (f.record_size != null) { + f.record_size.setInt(z.getFirst().getRecordSize()); + } + CobolItem next = z.getFirst().getNext(); + z.getFirst().setNext(hp.getEmpty()); + hp.setEmpty(z.getFirst()); + z.setFirst(next); + } + return 0; + } + + private static void memorySort(CobolFile f) { + dataList.sort( + new Comparator() { + @Override + public int compare(CobolDataStorage data1, CobolDataStorage data2) { + int cmp; + + for (int i = 0; i < f.nkeys; i++) { + AbstractCobolField src = f.keys[i].getField(); + + CobolDataStorage d1 = data1.copy(); + d1.addIndex(f.keys[i].getOffset()); + + CobolDataStorage d2 = data2.copy(); + d2.addIndex(f.keys[i].getOffset()); + + AbstractCobolField f1 = + CobolFieldFactory.makeCobolField( + src.getSize(), d1, src.getAttribute()); + AbstractCobolField f2 = + CobolFieldFactory.makeCobolField( + src.getSize(), d2, src.getAttribute()); + + if (f1.getAttribute().isTypeNumeric()) { + cmp = f1.numericCompareTo(f2); + } else { + cmp = + sortCmps( + f1.getDataStorage(), + f2.getDataStorage(), + f1.getSize(), + f.sort_collating); + } + if (cmp != 0) { + return (f.keys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; + } + } + return 0; + } + }); + } + + // libcob/fileio.cのcob_file_sort_initの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param collatingSequence TODO: 準備中 + * @param sortReturn TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public static void sortInit( + CobolFile f, + int nkeys, + CobolDataStorage collatingSequence, + CobolDataStorage sortReturn, + AbstractCobolField fnstatus) { + int sizeOfSizeT = 8; + CobolSort p = new CobolSort(); + p.setFnstatus(fnstatus); + p.setSize(f.record_max); + p.setrSize(f.record_max + sizeOfSizeT); + p.setwSize(f.record_max + sizeOfSizeT + 1); + p.setPointer(f); + p.setSortReturn(sortReturn); + sortReturn.set(0); + // opensource COBOLでsizeof(struct cobitem) == 32だっため,32を使用した + p.setMemory(cob_sort_memory / (p.getSize() + 32)); + dataList = new ArrayList(); + f.filex = p; + f.keys = new CobolFileKey[nkeys]; + for (int i = 0; i < nkeys; ++i) { + f.keys[i] = new CobolFileKey(); + } + f.nkeys = 0; + if (collatingSequence != null) { + f.sort_collating = collatingSequence; + } else { + f.sort_collating = CobolModule.getCurrentModule().collating_sequence; + } + f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); + } + + // libcob/fileio.cのcob_file_sort_initの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param collatingSequence TODO: 準備中 + * @param sortReturn TODO: 準備中 + * @param fnstatus TODO: 準備中 + */ + public static void sortInit( + CobolFile f, + int nkeys, + int collatingSequence, + CobolDataStorage sortReturn, + AbstractCobolField fnstatus) { + sortInit(f, nkeys, null, sortReturn, fnstatus); + } + + // libcob/fileio.cのcob_file_sort_init_keyの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param flag TODO: 準備中 + * @param field TODO: 準備中 + * @param offset TODO: 準備中 + */ + public static void sortInitKey(CobolFile f, int flag, AbstractCobolField field, int offset) { + f.keys[f.nkeys].setFlag(flag); + f.keys[f.nkeys].setField(field); + f.keys[f.nkeys].setOffset(offset); + f.nkeys++; + } + + // libcob/fileio.cのcob_file_sort_usingの実装 + /** + * TODO: 準備中 + * + * @param sortFile TODO: 準備中 + * @param dataFile TODO: 準備中 + */ + public static void sortUsing(CobolFile sortFile, CobolFile dataFile) { + dataFile.open(CobolFile.COB_OPEN_INPUT, 0, null); + for (; ; ) { + dataFile.read(null, null, CobolFile.COB_READ_NEXT); + if (dataFile.file_status[0] != (byte) '0') { + break; + } + copyCheck(sortFile, dataFile); + int ret = sortSubmit(sortFile, sortFile.record.getDataStorage()); + if (ret != 0) { + break; + } + } + dataFile.close(CobolFile.COB_CLOSE_NORMAL, null); + } + + // libcob/fileio.cのcob_file_sort_givingの実装 + /** + * TODO: 準備中 + * + * @param sortFile TODO: 準備中 + * @param varcnt TODO: 準備中 + * @param fbase TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 + */ + public static void sortGiving(CobolFile sortFile, int varcnt, CobolFile... fbase) + throws CobolStopRunException { + if (SORT_STD_LIB) { + for (int i = 0; i < varcnt; i++) { + fbase[i].open(CobolFile.COB_OPEN_OUTPUT, 0, null); + } + + int cntRec = 0; + memorySort(sortFile); + for (CobolDataStorage d : dataList) { + for (int i = 0; i < varcnt; i++) { + int opt; + if (fbase[i].special != 0 + || fbase[i].organization == CobolFile.COB_ORG_LINE_SEQUENTIAL) { + opt = CobolFile.COB_WRITE_BEFORE | CobolFile.COB_WRITE_LINES | 1; + } else { + opt = 0; + } + sortFile.record.getDataStorage().memcpy(d, sortFile.record.getSize()); + copyCheck(fbase[i], sortFile); + fbase[i].write(fbase[i].record, opt, null); + } + cntRec++; + } + sortFile.file_status[0] = '1'; + sortFile.file_status[1] = '0'; + + for (int i = 0; i < varcnt; i++) { + fbase[i].close(CobolFile.COB_CLOSE_NORMAL, null); + } + CobolUtil.verboseOutput(String.format("END OF SORT/MERGE, RECORD=%d.", cntRec)); + + } else { + + for (int i = 0; i < varcnt; i++) { + fbase[i].open(CobolFile.COB_OPEN_OUTPUT, 0, null); + } + int cntRec = 0; + for (; ; ) { + int ret = sortRetrieve(sortFile, sortFile.record.getDataStorage()); + if (ret != 0) { + if (ret == COBSORTEND) { + sortFile.file_status[0] = '1'; + sortFile.file_status[1] = '0'; + } else { + CobolSort hp = sortFile.filex; + hp.getSortReturn().set(16); + sortFile.file_status[0] = '3'; + sortFile.file_status[1] = '0'; + } + break; + } + for (int i = 0; i < varcnt; i++) { + int opt; + if (fbase[i].special != 0 + || fbase[i].organization == CobolFile.COB_ORG_LINE_SEQUENTIAL) { + opt = CobolFile.COB_WRITE_BEFORE | CobolFile.COB_WRITE_LINES | 1; + } else { + opt = 0; + } + copyCheck(fbase[i], sortFile); + fbase[i].write(fbase[i].record, opt, null); + } + cntRec++; + } + for (int i = 0; i < varcnt; i++) { + fbase[i].close(CobolFile.COB_CLOSE_NORMAL, null); + } + CobolUtil.verboseOutput(String.format("END OF SORT/MERGE, RECORD=%d.", cntRec)); + } + } + + // libcob/fileio.cのcob_file_sort_closeの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void sortClose(CobolFile f) { + AbstractCobolField fnstatus = null; + CobolSort hp = f.filex; + + if (hp != null) { + fnstatus = hp.getFnstatus(); + cob_free_list(hp.getEmpty()); + for (int i = 0; i < 4; ++i) { + cob_free_list(hp.getQueue()[i].getFirst()); + if (hp.getFile()[i].getFp() != null) { + hp.getFile()[i].getFp().close(); + } + } + } + f.filex = null; + f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); + } + + // libcob/fileio.cのcob_file_releaseの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void performRelease(CobolFile f) { + AbstractCobolField fnstatus = null; + CobolSort hp = f.filex; + + if (hp != null) { + fnstatus = hp.getFnstatus(); + } + int ret = CobolFileSort.sortSubmit(f, f.record.getDataStorage()); + switch (ret) { + case 0: + f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); + return; + default: + if (hp != null) { + hp.getSortReturn().set(16); + } + f.saveStatus(CobolFile.COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } + + // libcob/fileio.cのcob_file_returnの実装 + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void performReturn(CobolFile f) { + AbstractCobolField fnstatus = null; + CobolSort hp = f.filex; + if (hp != null) { + fnstatus = hp.getFnstatus(); + } + + int ret = CobolFileSort.sortRetrieve(f, f.record.getDataStorage()); + switch (ret) { + case 0: + f.saveStatus(CobolFile.COB_STATUS_00_SUCCESS, fnstatus); + return; + case CobolFileSort.COBSORTEND: + f.saveStatus(CobolFile.COB_STATUS_10_END_OF_FILE, fnstatus); + return; + default: + if (hp != null) { + hp.getSortReturn().set(16); + } + f.saveStatus(CobolFile.COB_STATUS_30_PERMANENT_ERROR, fnstatus); + return; + } + } + + /* Table sort */ + private static int sortNKeys; + private static CobolFileKey[] sortKeys; + private static CobolDataStorage sortCollate; + private static CobolDataStorage pivotStorage = new CobolDataStorage(); + private static CobolDataStorage leftStorage = new CobolDataStorage(); + private static CobolDataStorage rightStorage = new CobolDataStorage(); + private static CobolDataStorage cmpStorage1 = new CobolDataStorage(); + private static CobolDataStorage cmpStorage2 = new CobolDataStorage(); + private static CobolDataStorage copyBuffer = null; + private static CobolDataStorage tmpRecord = new CobolDataStorage(); + private static int copyBufferSizeMax = 0; + private static int[] sortBuffer = null; + private static AbstractCobolField cmpField1 = + CobolFieldFactory.makeCobolField( + 0, + cmpStorage1, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); + private static AbstractCobolField cmpField2 = + CobolFieldFactory.makeCobolField( + 0, + cmpStorage2, + new CobolFieldAttribute( + CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null)); + + /** + * TODO: 準備中 + * + * @param nkeys TODO: 準備中 + * @param collatingSequence TODO: 準備中 + */ + public static void sortTableInit(int nkeys, int collatingSequence) { + sortTableInit(nkeys, null); + } + + /** + * TODO: 準備中 + * + * @param nkeys TODO: 準備中 + * @param collatingSequence TODO: 準備中 + */ + public static void sortTableInit(int nkeys, CobolDataStorage collatingSequence) { + sortNKeys = 0; + if (sortKeys == null || sortKeys.length < nkeys) { + sortKeys = new CobolFileKey[nkeys]; + } + if (collatingSequence != null) { + sortCollate = collatingSequence; + } else { + sortCollate = CobolModule.getCurrentModule().collating_sequence; + } + } + + /** + * TODO: 準備中 + * + * @param flag TODO: 準備中 + * @param field TODO: 準備中 + * @param offset TODO: 準備中 + */ + public static void sortTableInitKey(int flag, AbstractCobolField field, int offset) { + if (sortKeys[sortNKeys] == null) { + sortKeys[sortNKeys] = new CobolFileKey(); + } + sortKeys[sortNKeys].setFlag(flag); + sortKeys[sortNKeys].setField( + CobolFieldFactory.makeCobolField( + field.getSize(), (CobolDataStorage) null, field.getAttribute())); + sortKeys[sortNKeys].setOffset(offset); + sortNKeys++; + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + * @param n TODO: 準備中 + */ + public static void sortTable(AbstractCobolField f, int n) { + int recordSize = f.getSize(); + if (sortBuffer == null || sortBuffer.length < n) { + sortBuffer = new int[n]; + } + for (int i = 0; i < n; ++i) { + sortBuffer[i] = i; + } + CobolDataStorage baseStorage = f.getDataStorage(); + int baseStorageBaseIndex = baseStorage.getIndex(); + indexQuickSort(f.getDataStorage(), 0, n, recordSize); + + int copyBufferSize = n * f.getSize(); + if (copyBuffer == null || copyBufferSizeMax < copyBufferSize) { + copyBuffer = new CobolDataStorage(copyBufferSize); + copyBufferSizeMax = copyBufferSize; + } + + for (int i = 0; i < n; ++i, copyBuffer.addIndex(recordSize)) { + tmpRecord.setDataRefAndIndex( + baseStorage, baseStorageBaseIndex + recordSize * sortBuffer[i]); + copyBuffer.memcpy(tmpRecord, recordSize); + } + copyBuffer.setIndex(0); + baseStorage.memcpy(copyBuffer, copyBufferSize); + } + + private static void indexQuickSort( + CobolDataStorage base, int mostLeft, int mostRight, int recordSize) { + + if (mostRight - mostLeft <= 1) { + return; + } + + int pivot = (mostRight + mostLeft) / 2; + int left = mostLeft, right = mostRight - 1; + + while (true) { + pivotStorage.setDataRefAndIndex(base, base.getIndex() + sortBuffer[pivot] * recordSize); + boolean elementBiggerThanPivot = false; + for (; left < pivot; ++left) { + leftStorage.setDataRefAndIndex( + base, base.getIndex() + sortBuffer[left] * recordSize); + if (compareStorageForSort(leftStorage, pivotStorage) > 0) { + elementBiggerThanPivot = true; + break; + } + } + boolean elementSmallerThanPivot = false; + for (; right > pivot; --right) { + rightStorage.setDataRefAndIndex( + base, base.getIndex() + sortBuffer[right] * recordSize); + if (compareStorageForSort(pivotStorage, rightStorage) > 0) { + elementSmallerThanPivot = true; + break; + } + } + if (elementBiggerThanPivot && elementSmallerThanPivot) { + swap2Indecies(left, right); + ++left; + --right; + } else if (elementBiggerThanPivot && !elementSmallerThanPivot) { + if (left + 1 == pivot) { + swap2Indecies(left, pivot); + } else { + rotate3Indecies(pivot, pivot - 1, left); + } + --pivot; + } else if (!elementBiggerThanPivot && elementSmallerThanPivot) { + if (right - 1 == pivot) { + swap2Indecies(pivot, right); + } else { + rotate3Indecies(pivot, pivot + 1, right); + } + ++pivot; + } else { + break; + } + } + indexQuickSort(base, mostLeft, pivot, recordSize); + indexQuickSort(base, pivot + 1, mostRight, recordSize); + } + + private static int compareStorageForSort(CobolDataStorage s1, CobolDataStorage s2) { + for (int i = 0; i < sortNKeys; ++i) { + + cmpStorage1.setDataRefAndIndex(s1, s1.getIndex() + sortKeys[i].getOffset()); + cmpStorage2.setDataRefAndIndex(s2, s2.getIndex() + sortKeys[i].getOffset()); + + int cmp; + CobolFieldAttribute attr = sortKeys[i].getField().getAttribute(); + int keySize = sortKeys[i].getField().getSize(); + if (attr.isTypeNumeric()) { + cmpField1.setSize(keySize); + cmpField2.setSize(keySize); + + cmpField1.setAttribute(attr); + cmpField2.setAttribute(attr); + + cmp = cmpField1.numericCompareTo(cmpField2); + } else if (attr.isTypeNational()) { + cmp = CobolUtil.nationalCmps(cmpStorage1, cmpStorage2, keySize, sortCollate); + } else { + cmp = CobolUtil.alnumCmps(cmpStorage1, cmpStorage2, keySize, sortCollate); + } + if (cmp != 0) { + return (sortKeys[i].getFlag() == COB_ASCENDING) ? cmp : -cmp; + } + } + return 0; + } + + private static void swap2Indecies(int a, int b) { + int tmp = sortBuffer[a]; + sortBuffer[a] = sortBuffer[b]; + sortBuffer[b] = tmp; + } + + private static void rotate3Indecies(int a, int b, int c) { + int tmp = sortBuffer[c]; + sortBuffer[c] = sortBuffer[b]; + sortBuffer[b] = sortBuffer[a]; + sortBuffer[a] = tmp; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index 854d6d00..b7e3b81c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -1,777 +1,798 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Optional; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import org.sqlite.SQLiteConfig; -import org.sqlite.SQLiteErrorCode; - -/** TODO: 準備中 */ -public class CobolIndexedFile extends CobolFile { - private Optional cursor; - private boolean updateWhileReading = false; - private boolean indexedFirstRead = true; - private boolean callStart = false; - private boolean commitOnModification = true; - - /** TODO: 準備中 */ - public static final int COB_EQ = 1; - /** TODO: 準備中 */ - public static final int COB_LT = 2; - /** TODO: 準備中 */ - public static final int COB_LE = 3; - /** TODO: 準備中 */ - public static final int COB_GT = 4; - /** TODO: 準備中 */ - public static final int COB_GE = 5; - /** TODO: 準備中 */ - public static final int COB_NE = 6; - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - */ - public CobolIndexedFile( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - super( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - } - - private static String getIndexName(int index) { - return String.format("index%d", index); - } - - private static String getSubIndexName(int index) { - return String.format("subindex%d", index); - } - - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - */ - public static String getTableName(int index) { - return String.format("table%d", index); - } - - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - */ - public static String getCursorName(int index) { - return String.format("cursor%d", index); - } - - private static String getConstraintName(int index) { - return String.format("constraint%d", index); - } - - /** - * TODO: 準備中 - * - * @param commitOnModification TODO: 準備中 - */ - public void setCommitOnModification(boolean commitOnModification) { - this.commitOnModification = commitOnModification; - } - - /** Equivalent to DBT_SET in libcob/fileio.c */ - private byte[] DBT_SET(AbstractCobolField field) { - return field.getDataStorage().getByteArray(0, field.getSize()); - } - - @Override - public int open_(String filename, int mode, int sharing) { - IndexedFile p = new IndexedFile(); - - SQLiteConfig config = new SQLiteConfig(); - config.setReadOnly(mode == COB_OPEN_INPUT); - - if (mode == COB_OPEN_OUTPUT) { - Path path = Paths.get(filename); - try { - Files.deleteIfExists(path); - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - boolean fileExists = new java.io.File(filename).exists(); - - p.connection = null; - try { - p.connection = DriverManager.getConnection("jdbc:sqlite:" + filename, config.toProperties()); - p.connection.setAutoCommit(false); - } catch (SQLException e) { - int errorCode = e.getErrorCode(); - if (errorCode == SQLiteErrorCode.SQLITE_BUSY.code) { - return COB_STATUS_61_FILE_SHARING; - } else { - return ENOENT; - } - } catch (Exception e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - - p.filenamelen = filename.length(); - p.last_dupno = new int[this.nkeys]; - p.rewrite_sec_key = new int[this.nkeys]; - - int maxsize = 0; - for (int i = 0; i < this.nkeys; ++i) { - if (this.keys[i].getField().getSize() > maxsize) { - maxsize = this.keys[i].getField().getSize(); - } - } - - if (mode == COB_OPEN_OUTPUT - || (!fileExists && (mode == COB_OPEN_EXTEND || mode == COB_OPEN_I_O))) { - try { - for (int i = 0; i < this.nkeys; ++i) { - String tableName = getTableName(i); - Statement statement = p.connection.createStatement(); - if (i == 0) { - statement.execute( - String.format( - "create table %s (key blob not null primary key, value blob not null)", - tableName)); - } else { - if (this.keys[i].getFlag() == 0) { - statement.execute( - String.format( - "create table %s (key blob not null primary key, value blob not null," - + " constraint %s foreign key (value) references %s (key))", - tableName, getConstraintName(i), getTableName(0))); - } else { - statement.execute( - String.format( - "create table %s (key blob not null, value blob not null, dupNo integer not" - + " null, constraint %s foreign key (value) references %s (key))", - tableName, getConstraintName(i), getTableName(0))); - } - statement.execute( - String.format("create index %s on %s(value)", getSubIndexName(i), tableName)); - } - statement.execute( - String.format("create index %s on %s(key)", getIndexName(i), tableName)); - statement.close(); - } - this.writeMetaData(p); - if (this.commitOnModification) { - p.connection.commit(); - } - } catch (SQLException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - p.temp_key = new CobolDataStorage(maxsize + 4); - this.filei = p; - p.key_index = 0; - p.last_key = null; - - p.filename = filename; - p.write_cursor_open = false; - p.record_locked = false; - - p.key = DBT_SET(this.keys[0].getField()); - this.updateWhileReading = false; - this.indexedFirstRead = true; - this.callStart = false; - - return 0; - } - - // Write a metadata to the database - private void writeMetaData(IndexedFile p) throws SQLException { - Statement statement = p.connection.createStatement(); - // Create a table to store metadata - statement.execute( - "create table metadata_string_int (key text not null primary key, value integer not null)"); - statement.execute( - "create table metadata_key (idx integer not null primary key, offset integer not null, size integer not null, duplicate boolean)"); - statement.close(); - - // Store the size of a record - PreparedStatement recordSizePreparedStmt = - p.connection.prepareStatement("insert into metadata_string_int values ('record_size', ?)"); - recordSizePreparedStmt.setInt(1, this.record_max); - recordSizePreparedStmt.execute(); - recordSizePreparedStmt.close(); - - // Store information of all keys - PreparedStatement keyPreparedStmt = - p.connection.prepareStatement("insert into metadata_key values (?, ?, ?, ?)"); - for (int i = 0; i < this.nkeys; i++) { - keyPreparedStmt.setInt(1, i); - keyPreparedStmt.setInt( - 2, - this.keys[i].getField().getDataStorage().getIndex() - - this.record.getDataStorage().getIndex()); - keyPreparedStmt.setInt(3, this.keys[i].getField().getSize()); - keyPreparedStmt.setBoolean(4, this.keys[i].getFlag() != 0); - keyPreparedStmt.execute(); - } - keyPreparedStmt.close(); - } - - @Override - public int close_(int opt) { - IndexedFile p = this.filei; - - this.closeCursor(); - - try { - p.connection.close(); - } catch (SQLException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - return COB_STATUS_00_SUCCESS; - } - - // Equivalent to indexed_start_internal in libcob/fileio.c - /** - * TODO: 準備中 - * - * @param cond TODO: 準備中 - * @param key TODO: 準備中 - * @param readOpts TODO: 準備中 - * @param testLock TODO: 準備中 - * @return TODO: 準備中 - */ - public int indexed_start_internal( - int cond, AbstractCobolField key, int readOpts, boolean testLock) { - IndexedFile p = this.filei; - for (p.key_index = 0; p.key_index < this.nkeys; p.key_index++) { - if (this.keys[p.key_index].getField().getDataStorage().isSame(key.getDataStorage())) { - break; - } - } - - p.key = DBT_SET(key); - - boolean isDuplicate = this.keys[p.key_index].getFlag() != 0; - - this.cursor = IndexedCursor.createCursor(p.connection, p.key, p.key_index, isDuplicate, cond); - if (!this.cursor.isPresent()) { - return COB_STATUS_30_PERMANENT_ERROR; - } - - IndexedCursor cursor = this.cursor.get(); - Optional optionalResult = cursor.next(); - if (optionalResult.isPresent()) { - FetchResult result = optionalResult.get(); - p.key = result.key; - p.data = result.value; - this.indexedFirstRead = false; - return COB_STATUS_00_SUCCESS; - } else { - return COB_STATUS_23_KEY_NOT_EXISTS; - } - } - - @Override - public int start_(int cond, AbstractCobolField key) { - int ret = indexed_start_internal(cond, key, 0, false); - if (ret == COB_STATUS_00_SUCCESS) { - this.callStart = true; - } - return ret; - } - - @Override - public int read_(AbstractCobolField key, int readOpts) { - IndexedFile p = this.filei; - boolean testLock = false; - this.callStart = false; - int ret = this.indexed_start_internal(COB_EQ, key, readOpts, testLock); - if (ret != COB_STATUS_00_SUCCESS) { - return ret; - } - - this.record.setSize(p.data.length); - this.record.getDataStorage().memcpy(p.data, p.data.length); - - return COB_STATUS_00_SUCCESS; - } - - @Override - public int readNext(int readOpts) { - IndexedFile p = this.filei; - if (this.callStart) { - this.callStart = false; - this.indexedFirstRead = false; - this.record.setSize(p.data.length); - if (this.cursor.isPresent()) { - IndexedCursor cursor = this.cursor.get(); - if ((readOpts & CobolFile.COB_READ_PREVIOUS) != 0 - && cursor.getComparator() == COB_LE - && this.record.getDataStorage().memcmp(p.data, p.data.length) != 0) { - this.callStart = false; - return this.readNext(readOpts); - } - } - this.record.getDataStorage().memcpy(p.data, p.data.length); - return COB_STATUS_00_SUCCESS; - } - - boolean isDuplicate = this.keys[p.key_index].getFlag() != 0; - if (this.indexedFirstRead || this.flag_begin_of_file) { - this.cursor = - IndexedCursor.createCursor(p.connection, p.key, p.key_index, isDuplicate, COB_GE); - if (!this.cursor.isPresent()) { - return COB_STATUS_10_END_OF_FILE; - } - this.cursor.get().moveToFirst(); - } else if (this.flag_end_of_file) { - this.cursor = - IndexedCursor.createCursor(p.connection, p.key, p.key_index, isDuplicate, COB_LE); - if (!this.cursor.isPresent()) { - return COB_STATUS_30_PERMANENT_ERROR; - } - this.cursor.get().moveToLast(); - } else if (this.updateWhileReading) { - this.updateWhileReading = false; - if (!this.cursor.isPresent()) { - return COB_STATUS_30_PERMANENT_ERROR; - } - IndexedCursor oldCursor = this.cursor.get(); - Optional newCursor = oldCursor.reloadCursor(); - if (!newCursor.isPresent()) { - this.cursor = Optional.of(oldCursor); - } else { - oldCursor.close(); - this.cursor = newCursor; - } - } - - if (!this.cursor.isPresent()) { - return COB_STATUS_30_PERMANENT_ERROR; - } - - IndexedCursor cursor = this.cursor.get(); - - final CursorReadOption cursorOpt; - if ((readOpts & COB_READ_PREVIOUS) != 0) { - cursorOpt = CursorReadOption.PREV; - cursor.setComparator(COB_LE); - } else { - cursorOpt = CursorReadOption.NEXT; - cursor.setComparator(COB_GE); - } - - Optional optionalResult = cursor.read(cursorOpt); - - if (!optionalResult.isPresent()) { - this.indexedFirstRead = false; - return COB_STATUS_10_END_OF_FILE; - } - - FetchResult result = optionalResult.get(); - p.key = result.key; - p.data = result.value; - - this.record.setSize(p.data.length); - this.record.getDataStorage().memcpy(p.data, p.data.length); - - this.indexedFirstRead = false; - return COB_STATUS_00_SUCCESS; - } - - private void closeCursor() { - if (this.cursor != null) { - if (this.cursor.isPresent()) { - this.cursor.get().close(); - } - } - } - - private boolean keyExistsInTable(IndexedFile p, int index, byte[] key) { - String query = String.format("select * from %s where key = ?", getTableName(index)); - try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { - selectStatement.setBytes(1, key); - selectStatement.setFetchSize(0); - ResultSet rs = selectStatement.executeQuery(); - return rs.next(); - } catch (SQLException e) { - return false; - } - } - - private boolean isDuplicateColumn(int index) { - return this.keys[index].getFlag() != 0; - } - - private int getNextKeyDupNo(Connection conn, int index, byte[] key) { - try { - PreparedStatement selectStatement = - conn.prepareStatement( - String.format("select ifnull(max(dupNo), -1) from %s", getTableName(index))); - ResultSet rs = selectStatement.executeQuery(); - return rs.getInt(1) + 1; - } catch (SQLException e) { - return 0; - } - } - - private int returnWith(IndexedFile p, boolean closeCursor, int index, int returnCode) { - if (closeCursor) { - this.closeCursor(); - p.write_cursor_open = false; - } - return returnCode; - } - - /** Equivalent to indexed_write_internal in libcob/fileio.c */ - private int indexed_write_internal(boolean rewrite, int opt) { - IndexedFile p = this.filei; - - boolean closeCursor; - p.write_cursor_open = true; - closeCursor = true; - - if (this.nkeys > 1 && !rewrite) { - if (this.check_alt_keys(false)) { - return returnWith(p, closeCursor, 0, COB_STATUS_22_KEY_EXISTS); - } - p.key = DBT_SET(this.keys[0].getField()); - } - - if (keyExistsInTable(p, 0, p.key)) { - return COB_STATUS_22_KEY_EXISTS; - } - - // insert into the primary table - p.data = DBT_SET(this.record); - try (PreparedStatement insertStatement = - p.connection.prepareStatement( - String.format("insert into %s values (?, ?)", getTableName(0)))) { - insertStatement.setBytes(1, p.key); - insertStatement.setBytes(2, p.data); - insertStatement.execute(); - if (this.commitOnModification) { - p.connection.commit(); - } - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); - } - - p.data = p.key; - - // insert into sub tables - for (int i = 1; i < this.nkeys; i++) { - - p.key = DBT_SET(this.keys[i].getField()); - try { - if (!isDuplicateColumn(i) && keyExistsInTable(p, i, p.key)) { - return returnWith(p, closeCursor, 0, COB_STATUS_22_KEY_EXISTS); - } - - PreparedStatement insertStatement; - if (isDuplicateColumn(i)) { - int dupNo = getNextKeyDupNo(p.connection, i, p.key); - insertStatement = - p.connection.prepareStatement( - String.format("insert into %s values (?, ?, ?)", getTableName(i))); - insertStatement.setBytes(1, p.key); - insertStatement.setBytes(2, p.data); - insertStatement.setInt(3, dupNo); - } else { - insertStatement = - p.connection.prepareStatement( - String.format("insert into %s values (?, ?)", getTableName(i))); - insertStatement.setBytes(1, p.key); - insertStatement.setBytes(2, p.data); - } - insertStatement.execute(); - insertStatement.close(); - if (this.commitOnModification) { - p.connection.commit(); - } - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); - } - } - - this.updateWhileReading = true; - - return returnWith(p, closeCursor, 0, COB_STATUS_00_SUCCESS); - } - - @Override - public int write_(int opt) { - IndexedFile p = this.filei; - - p.key = DBT_SET(this.keys[0].getField()); - if (p.last_key == null) { - p.last_key = new CobolDataStorage(p.key.length); - - } else if (this.access_mode == COB_ACCESS_SEQUENTIAL) { - byte[] keyBytes = p.key; - if (p.last_key.memcmp(keyBytes, keyBytes.length) > 0) { - return COB_STATUS_21_KEY_INVALID; - } - } - - byte[] keyBytes = p.key; - p.last_key.memcpy(keyBytes, keyBytes.length); - - return indexed_write_internal(false, opt); - } - - /** Equivalent to check_alt_keys in libcob/fileio.c */ - private boolean check_alt_keys(boolean rewrite) { - IndexedFile p = this.filei; - - byte[] primaryKey = DBT_SET(this.keys[0].getField()); - for (int i = 1; i < this.nkeys; ++i) { - if (this.keys[i].getFlag() == 0) { - p.key = DBT_SET(this.keys[i].getField()); - if (rewrite) { - if (checkTable(p, i, p.key, primaryKey)) { - return true; - } - } else { - if (keyExistsInTable(p, i, p.key)) { - return true; - } - } - } - } - return false; - } - - private static boolean checkTable(IndexedFile p, int index, byte[] key, byte[] primaryKey) { - String query = - String.format("select key from %s " + "where key = ? and value = ?", getTableName(index)); - try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { - selectStatement.setBytes(1, key); - selectStatement.setBytes(2, primaryKey); - selectStatement.setFetchSize(0); - ResultSet rs = selectStatement.executeQuery(); - return rs.next(); - } catch (SQLException e) { - return false; - } - } - - @Override - /** Equivalent to indexed_rewrite in libcob/fileio.c */ - public int rewrite_(int opt) { - IndexedFile p = this.filei; - - p.write_cursor_open = true; - - if (this.access_mode == COB_ACCESS_SEQUENTIAL - && !IndexedCursor.matchKeyHead(p.key, DBT_SET(this.keys[0].getField()))) { - return COB_STATUS_21_KEY_INVALID; - } - - p.key = DBT_SET(this.keys[0].getField()); - - int ret = this.indexed_delete_internal(true); - - if (ret != COB_STATUS_00_SUCCESS) { - p.write_cursor_open = false; - return ret; - } - - return this.indexed_write_internal(true, opt); - } - - /** Equivalent to indexed_delete_internal in libcob/fileio.c */ - private int indexed_delete_internal(boolean rewrite) { - IndexedFile p = this.filei; - boolean closeCursor; - - p.write_cursor_open = true; - closeCursor = true; - - if (this.access_mode != COB_ACCESS_SEQUENTIAL) { - p.key = DBT_SET(this.keys[0].getField()); - } - - if (this.access_mode != COB_ACCESS_SEQUENTIAL && !keyExistsInTable(p, 0, p.key)) { - return returnWith(p, closeCursor, 0, COB_STATUS_23_KEY_NOT_EXISTS); - } - - // delete data from the primary table - String query = String.format("delete from %s where key = ?", getTableName(0)); - try (PreparedStatement statement = p.connection.prepareStatement(query)) { - statement.setBytes(1, p.key); - statement.execute(); - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); - } - - // delete data from sub tables - for (int i = 1; i < this.nkeys; ++i) { - try (PreparedStatement statement = - p.connection.prepareStatement( - String.format("delete from %s where value = ?", getTableName(i)))) { - statement.setBytes(1, p.key); - statement.execute(); - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); - } - } - - if (this.commitOnModification) { - try { - p.connection.commit(); - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); - } - } - - this.updateWhileReading = true; - - return COB_STATUS_00_SUCCESS; - } - - @Override - public int delete_() { - return this.indexed_delete_internal(false); - } - - @Override - public void unlock_() { - System.err.println("Unlocking INDEXED file is not implemented"); - } - - /** TODO: 準備中 */ - public void commitJdbcTransaction() { - IndexedFile p = this.filei; - try { - p.connection.commit(); - } catch (SQLException e) { - System.err.println("Failed to commit a transaction"); - } - } - - /** - * Delete all records in the file - * - * @return true if all records are deleted successfully, otherwise false - */ - public boolean deleteAllRecords() { - IndexedFile p = this.filei; - try { - for (int i = this.nkeys - 1; i >= 0; --i) { - Statement statement = p.connection.createStatement(); - statement.execute("delete from " + getTableName(i)); - statement.close(); - } - if (this.commitOnModification) { - p.connection.commit(); - } - return true; - } catch (SQLException e) { - return false; - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Optional; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import org.sqlite.SQLiteConfig; +import org.sqlite.SQLiteErrorCode; + +/** TODO: 準備中 */ +public class CobolIndexedFile extends CobolFile { + private Optional cursor; + private boolean updateWhileReading = false; + private boolean indexedFirstRead = true; + private boolean callStart = false; + private boolean commitOnModification = true; + + /** TODO: 準備中 */ + public static final int COB_EQ = 1; + + /** TODO: 準備中 */ + public static final int COB_LT = 2; + + /** TODO: 準備中 */ + public static final int COB_LE = 3; + + /** TODO: 準備中 */ + public static final int COB_GT = 4; + + /** TODO: 準備中 */ + public static final int COB_GE = 5; + + /** TODO: 準備中 */ + public static final int COB_NE = 6; + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + */ + public CobolIndexedFile( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + super( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + } + + private static String getIndexName(int index) { + return String.format("index%d", index); + } + + private static String getSubIndexName(int index) { + return String.format("subindex%d", index); + } + + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + */ + public static String getTableName(int index) { + return String.format("table%d", index); + } + + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + */ + public static String getCursorName(int index) { + return String.format("cursor%d", index); + } + + private static String getConstraintName(int index) { + return String.format("constraint%d", index); + } + + /** + * TODO: 準備中 + * + * @param commitOnModification TODO: 準備中 + */ + public void setCommitOnModification(boolean commitOnModification) { + this.commitOnModification = commitOnModification; + } + + /** Equivalent to DBT_SET in libcob/fileio.c */ + private byte[] DBT_SET(AbstractCobolField field) { + return field.getDataStorage().getByteArray(0, field.getSize()); + } + + @Override + public int open_(String filename, int mode, int sharing) { + IndexedFile p = new IndexedFile(); + + SQLiteConfig config = new SQLiteConfig(); + config.setReadOnly(mode == COB_OPEN_INPUT); + + if (mode == COB_OPEN_OUTPUT) { + Path path = Paths.get(filename); + try { + Files.deleteIfExists(path); + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + boolean fileExists = new java.io.File(filename).exists(); + + p.connection = null; + try { + p.connection = + DriverManager.getConnection("jdbc:sqlite:" + filename, config.toProperties()); + p.connection.setAutoCommit(false); + } catch (SQLException e) { + int errorCode = e.getErrorCode(); + if (errorCode == SQLiteErrorCode.SQLITE_BUSY.code) { + return COB_STATUS_61_FILE_SHARING; + } else { + return ENOENT; + } + } catch (Exception e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + + p.filenamelen = filename.length(); + p.last_dupno = new int[this.nkeys]; + p.rewrite_sec_key = new int[this.nkeys]; + + int maxsize = 0; + for (int i = 0; i < this.nkeys; ++i) { + if (this.keys[i].getField().getSize() > maxsize) { + maxsize = this.keys[i].getField().getSize(); + } + } + + if (mode == COB_OPEN_OUTPUT + || (!fileExists && (mode == COB_OPEN_EXTEND || mode == COB_OPEN_I_O))) { + try { + for (int i = 0; i < this.nkeys; ++i) { + String tableName = getTableName(i); + Statement statement = p.connection.createStatement(); + if (i == 0) { + statement.execute( + String.format( + "create table %s (key blob not null primary key, value blob" + + " not null)", + tableName)); + } else { + if (this.keys[i].getFlag() == 0) { + statement.execute( + String.format( + "create table %s (key blob not null primary key, value" + + " blob not null, constraint %s foreign key" + + " (value) references %s (key))", + tableName, getConstraintName(i), getTableName(0))); + } else { + statement.execute( + String.format( + "create table %s (key blob not null, value blob not" + + " null, dupNo integer not null, constraint %s" + + " foreign key (value) references %s (key))", + tableName, getConstraintName(i), getTableName(0))); + } + statement.execute( + String.format( + "create index %s on %s(value)", + getSubIndexName(i), tableName)); + } + statement.execute( + String.format( + "create index %s on %s(key)", getIndexName(i), tableName)); + statement.close(); + } + this.writeMetaData(p); + if (this.commitOnModification) { + p.connection.commit(); + } + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + p.temp_key = new CobolDataStorage(maxsize + 4); + this.filei = p; + p.key_index = 0; + p.last_key = null; + + p.filename = filename; + p.write_cursor_open = false; + p.record_locked = false; + + p.key = DBT_SET(this.keys[0].getField()); + this.updateWhileReading = false; + this.indexedFirstRead = true; + this.callStart = false; + + return 0; + } + + // Write a metadata to the database + private void writeMetaData(IndexedFile p) throws SQLException { + Statement statement = p.connection.createStatement(); + // Create a table to store metadata + statement.execute( + "create table metadata_string_int (key text not null primary key, value integer not" + + " null)"); + statement.execute( + "create table metadata_key (idx integer not null primary key, offset integer not" + + " null, size integer not null, duplicate boolean)"); + statement.close(); + + // Store the size of a record + PreparedStatement recordSizePreparedStmt = + p.connection.prepareStatement( + "insert into metadata_string_int values ('record_size', ?)"); + recordSizePreparedStmt.setInt(1, this.record_max); + recordSizePreparedStmt.execute(); + recordSizePreparedStmt.close(); + + // Store information of all keys + PreparedStatement keyPreparedStmt = + p.connection.prepareStatement("insert into metadata_key values (?, ?, ?, ?)"); + for (int i = 0; i < this.nkeys; i++) { + keyPreparedStmt.setInt(1, i); + keyPreparedStmt.setInt( + 2, + this.keys[i].getField().getDataStorage().getIndex() + - this.record.getDataStorage().getIndex()); + keyPreparedStmt.setInt(3, this.keys[i].getField().getSize()); + keyPreparedStmt.setBoolean(4, this.keys[i].getFlag() != 0); + keyPreparedStmt.execute(); + } + keyPreparedStmt.close(); + } + + @Override + public int close_(int opt) { + IndexedFile p = this.filei; + + this.closeCursor(); + + try { + p.connection.close(); + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_00_SUCCESS; + } + + // Equivalent to indexed_start_internal in libcob/fileio.c + /** + * TODO: 準備中 + * + * @param cond TODO: 準備中 + * @param key TODO: 準備中 + * @param readOpts TODO: 準備中 + * @param testLock TODO: 準備中 + * @return TODO: 準備中 + */ + public int indexed_start_internal( + int cond, AbstractCobolField key, int readOpts, boolean testLock) { + IndexedFile p = this.filei; + for (p.key_index = 0; p.key_index < this.nkeys; p.key_index++) { + if (this.keys[p.key_index].getField().getDataStorage().isSame(key.getDataStorage())) { + break; + } + } + + p.key = DBT_SET(key); + + boolean isDuplicate = this.keys[p.key_index].getFlag() != 0; + + this.cursor = + IndexedCursor.createCursor(p.connection, p.key, p.key_index, isDuplicate, cond); + if (!this.cursor.isPresent()) { + return COB_STATUS_30_PERMANENT_ERROR; + } + + IndexedCursor cursor = this.cursor.get(); + Optional optionalResult = cursor.next(); + if (optionalResult.isPresent()) { + FetchResult result = optionalResult.get(); + p.key = result.key; + p.data = result.value; + this.indexedFirstRead = false; + return COB_STATUS_00_SUCCESS; + } else { + return COB_STATUS_23_KEY_NOT_EXISTS; + } + } + + @Override + public int start_(int cond, AbstractCobolField key) { + int ret = indexed_start_internal(cond, key, 0, false); + if (ret == COB_STATUS_00_SUCCESS) { + this.callStart = true; + } + return ret; + } + + @Override + public int read_(AbstractCobolField key, int readOpts) { + IndexedFile p = this.filei; + boolean testLock = false; + this.callStart = false; + int ret = this.indexed_start_internal(COB_EQ, key, readOpts, testLock); + if (ret != COB_STATUS_00_SUCCESS) { + return ret; + } + + this.record.setSize(p.data.length); + this.record.getDataStorage().memcpy(p.data, p.data.length); + + return COB_STATUS_00_SUCCESS; + } + + @Override + public int readNext(int readOpts) { + IndexedFile p = this.filei; + if (this.callStart) { + this.callStart = false; + this.indexedFirstRead = false; + this.record.setSize(p.data.length); + if (this.cursor.isPresent()) { + IndexedCursor cursor = this.cursor.get(); + if ((readOpts & CobolFile.COB_READ_PREVIOUS) != 0 + && cursor.getComparator() == COB_LE + && this.record.getDataStorage().memcmp(p.data, p.data.length) != 0) { + this.callStart = false; + return this.readNext(readOpts); + } + } + this.record.getDataStorage().memcpy(p.data, p.data.length); + return COB_STATUS_00_SUCCESS; + } + + boolean isDuplicate = this.keys[p.key_index].getFlag() != 0; + if (this.indexedFirstRead || this.flag_begin_of_file) { + this.cursor = + IndexedCursor.createCursor( + p.connection, p.key, p.key_index, isDuplicate, COB_GE); + if (!this.cursor.isPresent()) { + return COB_STATUS_10_END_OF_FILE; + } + this.cursor.get().moveToFirst(); + } else if (this.flag_end_of_file) { + this.cursor = + IndexedCursor.createCursor( + p.connection, p.key, p.key_index, isDuplicate, COB_LE); + if (!this.cursor.isPresent()) { + return COB_STATUS_30_PERMANENT_ERROR; + } + this.cursor.get().moveToLast(); + } else if (this.updateWhileReading) { + this.updateWhileReading = false; + if (!this.cursor.isPresent()) { + return COB_STATUS_30_PERMANENT_ERROR; + } + IndexedCursor oldCursor = this.cursor.get(); + Optional newCursor = oldCursor.reloadCursor(); + if (!newCursor.isPresent()) { + this.cursor = Optional.of(oldCursor); + } else { + oldCursor.close(); + this.cursor = newCursor; + } + } + + if (!this.cursor.isPresent()) { + return COB_STATUS_30_PERMANENT_ERROR; + } + + IndexedCursor cursor = this.cursor.get(); + + final CursorReadOption cursorOpt; + if ((readOpts & COB_READ_PREVIOUS) != 0) { + cursorOpt = CursorReadOption.PREV; + cursor.setComparator(COB_LE); + } else { + cursorOpt = CursorReadOption.NEXT; + cursor.setComparator(COB_GE); + } + + Optional optionalResult = cursor.read(cursorOpt); + + if (!optionalResult.isPresent()) { + this.indexedFirstRead = false; + return COB_STATUS_10_END_OF_FILE; + } + + FetchResult result = optionalResult.get(); + p.key = result.key; + p.data = result.value; + + this.record.setSize(p.data.length); + this.record.getDataStorage().memcpy(p.data, p.data.length); + + this.indexedFirstRead = false; + return COB_STATUS_00_SUCCESS; + } + + private void closeCursor() { + if (this.cursor != null) { + if (this.cursor.isPresent()) { + this.cursor.get().close(); + } + } + } + + private boolean keyExistsInTable(IndexedFile p, int index, byte[] key) { + String query = String.format("select * from %s where key = ?", getTableName(index)); + try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { + selectStatement.setBytes(1, key); + selectStatement.setFetchSize(0); + ResultSet rs = selectStatement.executeQuery(); + return rs.next(); + } catch (SQLException e) { + return false; + } + } + + private boolean isDuplicateColumn(int index) { + return this.keys[index].getFlag() != 0; + } + + private int getNextKeyDupNo(Connection conn, int index, byte[] key) { + try { + PreparedStatement selectStatement = + conn.prepareStatement( + String.format( + "select ifnull(max(dupNo), -1) from %s", getTableName(index))); + ResultSet rs = selectStatement.executeQuery(); + return rs.getInt(1) + 1; + } catch (SQLException e) { + return 0; + } + } + + private int returnWith(IndexedFile p, boolean closeCursor, int index, int returnCode) { + if (closeCursor) { + this.closeCursor(); + p.write_cursor_open = false; + } + return returnCode; + } + + /** Equivalent to indexed_write_internal in libcob/fileio.c */ + private int indexed_write_internal(boolean rewrite, int opt) { + IndexedFile p = this.filei; + + boolean closeCursor; + p.write_cursor_open = true; + closeCursor = true; + + if (this.nkeys > 1 && !rewrite) { + if (this.check_alt_keys(false)) { + return returnWith(p, closeCursor, 0, COB_STATUS_22_KEY_EXISTS); + } + p.key = DBT_SET(this.keys[0].getField()); + } + + if (keyExistsInTable(p, 0, p.key)) { + return COB_STATUS_22_KEY_EXISTS; + } + + // insert into the primary table + p.data = DBT_SET(this.record); + try (PreparedStatement insertStatement = + p.connection.prepareStatement( + String.format("insert into %s values (?, ?)", getTableName(0)))) { + insertStatement.setBytes(1, p.key); + insertStatement.setBytes(2, p.data); + insertStatement.execute(); + if (this.commitOnModification) { + p.connection.commit(); + } + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); + } + + p.data = p.key; + + // insert into sub tables + for (int i = 1; i < this.nkeys; i++) { + + p.key = DBT_SET(this.keys[i].getField()); + try { + if (!isDuplicateColumn(i) && keyExistsInTable(p, i, p.key)) { + return returnWith(p, closeCursor, 0, COB_STATUS_22_KEY_EXISTS); + } + + PreparedStatement insertStatement; + if (isDuplicateColumn(i)) { + int dupNo = getNextKeyDupNo(p.connection, i, p.key); + insertStatement = + p.connection.prepareStatement( + String.format( + "insert into %s values (?, ?, ?)", getTableName(i))); + insertStatement.setBytes(1, p.key); + insertStatement.setBytes(2, p.data); + insertStatement.setInt(3, dupNo); + } else { + insertStatement = + p.connection.prepareStatement( + String.format("insert into %s values (?, ?)", getTableName(i))); + insertStatement.setBytes(1, p.key); + insertStatement.setBytes(2, p.data); + } + insertStatement.execute(); + insertStatement.close(); + if (this.commitOnModification) { + p.connection.commit(); + } + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); + } + } + + this.updateWhileReading = true; + + return returnWith(p, closeCursor, 0, COB_STATUS_00_SUCCESS); + } + + @Override + public int write_(int opt) { + IndexedFile p = this.filei; + + p.key = DBT_SET(this.keys[0].getField()); + if (p.last_key == null) { + p.last_key = new CobolDataStorage(p.key.length); + + } else if (this.access_mode == COB_ACCESS_SEQUENTIAL) { + byte[] keyBytes = p.key; + if (p.last_key.memcmp(keyBytes, keyBytes.length) > 0) { + return COB_STATUS_21_KEY_INVALID; + } + } + + byte[] keyBytes = p.key; + p.last_key.memcpy(keyBytes, keyBytes.length); + + return indexed_write_internal(false, opt); + } + + /** Equivalent to check_alt_keys in libcob/fileio.c */ + private boolean check_alt_keys(boolean rewrite) { + IndexedFile p = this.filei; + + byte[] primaryKey = DBT_SET(this.keys[0].getField()); + for (int i = 1; i < this.nkeys; ++i) { + if (this.keys[i].getFlag() == 0) { + p.key = DBT_SET(this.keys[i].getField()); + if (rewrite) { + if (checkTable(p, i, p.key, primaryKey)) { + return true; + } + } else { + if (keyExistsInTable(p, i, p.key)) { + return true; + } + } + } + } + return false; + } + + private static boolean checkTable(IndexedFile p, int index, byte[] key, byte[] primaryKey) { + String query = + String.format( + "select key from %s " + "where key = ? and value = ?", getTableName(index)); + try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { + selectStatement.setBytes(1, key); + selectStatement.setBytes(2, primaryKey); + selectStatement.setFetchSize(0); + ResultSet rs = selectStatement.executeQuery(); + return rs.next(); + } catch (SQLException e) { + return false; + } + } + + @Override + /** Equivalent to indexed_rewrite in libcob/fileio.c */ + public int rewrite_(int opt) { + IndexedFile p = this.filei; + + p.write_cursor_open = true; + + if (this.access_mode == COB_ACCESS_SEQUENTIAL + && !IndexedCursor.matchKeyHead(p.key, DBT_SET(this.keys[0].getField()))) { + return COB_STATUS_21_KEY_INVALID; + } + + p.key = DBT_SET(this.keys[0].getField()); + + int ret = this.indexed_delete_internal(true); + + if (ret != COB_STATUS_00_SUCCESS) { + p.write_cursor_open = false; + return ret; + } + + return this.indexed_write_internal(true, opt); + } + + /** Equivalent to indexed_delete_internal in libcob/fileio.c */ + private int indexed_delete_internal(boolean rewrite) { + IndexedFile p = this.filei; + boolean closeCursor; + + p.write_cursor_open = true; + closeCursor = true; + + if (this.access_mode != COB_ACCESS_SEQUENTIAL) { + p.key = DBT_SET(this.keys[0].getField()); + } + + if (this.access_mode != COB_ACCESS_SEQUENTIAL && !keyExistsInTable(p, 0, p.key)) { + return returnWith(p, closeCursor, 0, COB_STATUS_23_KEY_NOT_EXISTS); + } + + // delete data from the primary table + String query = String.format("delete from %s where key = ?", getTableName(0)); + try (PreparedStatement statement = p.connection.prepareStatement(query)) { + statement.setBytes(1, p.key); + statement.execute(); + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); + } + + // delete data from sub tables + for (int i = 1; i < this.nkeys; ++i) { + try (PreparedStatement statement = + p.connection.prepareStatement( + String.format("delete from %s where value = ?", getTableName(i)))) { + statement.setBytes(1, p.key); + statement.execute(); + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); + } + } + + if (this.commitOnModification) { + try { + p.connection.commit(); + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); + } + } + + this.updateWhileReading = true; + + return COB_STATUS_00_SUCCESS; + } + + @Override + public int delete_() { + return this.indexed_delete_internal(false); + } + + @Override + public void unlock_() { + System.err.println("Unlocking INDEXED file is not implemented"); + } + + /** TODO: 準備中 */ + public void commitJdbcTransaction() { + IndexedFile p = this.filei; + try { + p.connection.commit(); + } catch (SQLException e) { + System.err.println("Failed to commit a transaction"); + } + } + + /** + * Delete all records in the file + * + * @return true if all records are deleted successfully, otherwise false + */ + public boolean deleteAllRecords() { + IndexedFile p = this.filei; + try { + for (int i = this.nkeys - 1; i >= 0; --i) { + Statement statement = p.connection.createStatement(); + statement.execute("delete from " + getTableName(i)); + statement.close(); + } + if (this.commitOnModification) { + p.connection.commit(); + } + return true; + } catch (SQLException e) { + return false; + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolItem.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolItem.java index f30fe066..634bd8fb 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolItem.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolItem.java @@ -1,145 +1,145 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; - -/** TODO: 準備中 */ -class CobolItem { - private CobolItem next; - private int endOfBlock; - private int recordSize; - private byte blockByte = 0; - private CobolDataStorage unique = new CobolDataStorage(new byte[8]); - private CobolDataStorage item; - - /** TODO: 準備中 */ - CobolItem() { - this.next = null; - this.endOfBlock = 0; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolItem getNext() { - return next; - } - - /** - * TODO: 準備中 - * - * @param next TODO: 準備中 - */ - void setNext(CobolItem next) { - this.next = next; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getEndOfBlock() { - return endOfBlock; - } - - /** - * TODO: 準備中 - * - * @param endOfBlock TODO: 準備中 - */ - void setEndOfBlock(int endOfBlock) { - this.endOfBlock = endOfBlock; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getRecordSize() { - return recordSize; - } - - /** - * TODO: 準備中 - * - * @param recordSize TODO: 準備中 - */ - void setRecordSize(int recordSize) { - this.recordSize = recordSize; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - byte getBlockByte() { - return blockByte; - } - - /** - * TODO: 準備中 - * - * @param blockByte TODO: 準備中 - */ - void setBlockByte(byte blockByte) { - this.blockByte = blockByte; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolDataStorage getUnique() { - return unique; - } - - /** - * TODO: 準備中 - * - * @param unique TODO: 準備中 - */ - void setUnique(CobolDataStorage unique) { - this.unique = unique; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolDataStorage getItem() { - return item; - } - - /** - * TODO: 準備中 - * - * @param item TODO: 準備中 - */ - void setItem(CobolDataStorage item) { - this.item = item; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; + +/** TODO: 準備中 */ +class CobolItem { + private CobolItem next; + private int endOfBlock; + private int recordSize; + private byte blockByte = 0; + private CobolDataStorage unique = new CobolDataStorage(new byte[8]); + private CobolDataStorage item; + + /** TODO: 準備中 */ + CobolItem() { + this.next = null; + this.endOfBlock = 0; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolItem getNext() { + return next; + } + + /** + * TODO: 準備中 + * + * @param next TODO: 準備中 + */ + void setNext(CobolItem next) { + this.next = next; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getEndOfBlock() { + return endOfBlock; + } + + /** + * TODO: 準備中 + * + * @param endOfBlock TODO: 準備中 + */ + void setEndOfBlock(int endOfBlock) { + this.endOfBlock = endOfBlock; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getRecordSize() { + return recordSize; + } + + /** + * TODO: 準備中 + * + * @param recordSize TODO: 準備中 + */ + void setRecordSize(int recordSize) { + this.recordSize = recordSize; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + byte getBlockByte() { + return blockByte; + } + + /** + * TODO: 準備中 + * + * @param blockByte TODO: 準備中 + */ + void setBlockByte(byte blockByte) { + this.blockByte = blockByte; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolDataStorage getUnique() { + return unique; + } + + /** + * TODO: 準備中 + * + * @param unique TODO: 準備中 + */ + void setUnique(CobolDataStorage unique) { + this.unique = unique; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolDataStorage getItem() { + return item; + } + + /** + * TODO: 準備中 + * + * @param item TODO: 準備中 + */ + void setItem(CobolDataStorage item) { + this.item = item; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolLineSequentialFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolLineSequentialFile.java index b7f71d40..da86ae91 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolLineSequentialFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolLineSequentialFile.java @@ -1,258 +1,258 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public class CobolLineSequentialFile extends CobolFile { - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - */ - public CobolLineSequentialFile( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - super( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - } - - @Override - public int start_(int cond, AbstractCobolField key) { - System.out.println("LineSeq.start"); - return 0; - } - - @Override - public int read_(AbstractCobolField key, int readOpts) { - System.out.println("LineSeq.read"); - return 0; - } - - @Override - public int readNext(int readOpts) { - int dataptr = 0; - int n; - int i = 0; - CobolDataStorage data = this.record.getDataStorage(); - - for (; ; ) { - n = this.file.getc(); - if (n == -1) { - if (i == 0) { - return COB_STATUS_10_END_OF_FILE; - } else { - break; - } - } - if (n == 0 && cob_ls_nulls != null) { - n = this.file.getc(); - if (n == -1) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } else { - if (n == '\r') { - continue; - } - if (n == '\n') { - break; - } - } - if (i < this.record.getSize()) { - data.setByte(dataptr++, (byte) n); - i++; - } - } - if (i < this.record.getSize()) { - for (int j = 0; i + j < this.record.getSize(); ++j) { - data.setByte(i + j, (byte) ' '); - } - } - if (this.record_size != null) { - this.record_size.setInt(i); - } - return COB_STATUS_00_SUCCESS; - } - - @Override - public int write_(int opt) throws CobolStopRunException { - int size; - int i; - - /* determine the size to be written */ - if (cob_ls_fixed != null) { - size = this.record.getSize(); - } else { - CobolDataStorage data = this.record.getDataStorage(); - for (i = this.record.getSize() - 1; i >= 0; i--) { - if (data.getByte(i) != ' ') { - break; - } - } - size = i + 1; - } - - if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { - if (this.flag_needs_top) { - this.flag_needs_top = false; - Linage lingptr = this.linorkeyptr; - for (i = 0; i < lingptr.getLinTop(); i++) { - this.file.putc((byte) '\n'); - } - } - } - - if ((opt & COB_WRITE_AFTER) != 0) { - int ret = file_write_opt(opt); - if (ret != 0) { - return ret; - } - this.flag_needs_nl = true; - } - - if (size != 0) { - if (cob_ls_nulls != null) { - int p = 0; - CobolDataStorage data = this.record.getDataStorage(); - for (i = 0; i < size; ++i, ++p) { - if (data.getByte(p) < ' ') { - this.file.putc((byte) 0); - } - this.file.putc(data.getByte(p)); - } - } else { - if (!this.file.write(this.record.getDataStorage(), size)) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - } - - if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { - this.file.putc((byte) '\n'); - } - - if ((opt & COB_WRITE_BEFORE) != 0) { - int ret = file_write_opt(opt); - if (ret != 0) { - return ret; - } - this.flag_needs_nl = false; - } - - if (this.flag_needs_nl && (this.flag_select_features & COB_SELECT_LINAGE) == 0) { - this.file.putc((byte) '\n'); - this.flag_needs_nl = false; - } - - if (eop_status != 0) { - eop_status = 0; - CobolRuntimeException.code = 0x0502; - return COB_STATUS_52_EOP; - } - return COB_STATUS_00_SUCCESS; - } - - @Override - public int rewrite_(int opt) { - System.out.println("LineSeq.rewrite"); - return 0; - } - - @Override - public int delete_() { - System.out.println("LineSeq.delete"); - return 0; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public class CobolLineSequentialFile extends CobolFile { + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + */ + public CobolLineSequentialFile( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + super( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + } + + @Override + public int start_(int cond, AbstractCobolField key) { + System.out.println("LineSeq.start"); + return 0; + } + + @Override + public int read_(AbstractCobolField key, int readOpts) { + System.out.println("LineSeq.read"); + return 0; + } + + @Override + public int readNext(int readOpts) { + int dataptr = 0; + int n; + int i = 0; + CobolDataStorage data = this.record.getDataStorage(); + + for (; ; ) { + n = this.file.getc(); + if (n == -1) { + if (i == 0) { + return COB_STATUS_10_END_OF_FILE; + } else { + break; + } + } + if (n == 0 && cob_ls_nulls != null) { + n = this.file.getc(); + if (n == -1) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + if (n == '\r') { + continue; + } + if (n == '\n') { + break; + } + } + if (i < this.record.getSize()) { + data.setByte(dataptr++, (byte) n); + i++; + } + } + if (i < this.record.getSize()) { + for (int j = 0; i + j < this.record.getSize(); ++j) { + data.setByte(i + j, (byte) ' '); + } + } + if (this.record_size != null) { + this.record_size.setInt(i); + } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int write_(int opt) throws CobolStopRunException { + int size; + int i; + + /* determine the size to be written */ + if (cob_ls_fixed != null) { + size = this.record.getSize(); + } else { + CobolDataStorage data = this.record.getDataStorage(); + for (i = this.record.getSize() - 1; i >= 0; i--) { + if (data.getByte(i) != ' ') { + break; + } + } + size = i + 1; + } + + if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { + if (this.flag_needs_top) { + this.flag_needs_top = false; + Linage lingptr = this.linorkeyptr; + for (i = 0; i < lingptr.getLinTop(); i++) { + this.file.putc((byte) '\n'); + } + } + } + + if ((opt & COB_WRITE_AFTER) != 0) { + int ret = file_write_opt(opt); + if (ret != 0) { + return ret; + } + this.flag_needs_nl = true; + } + + if (size != 0) { + if (cob_ls_nulls != null) { + int p = 0; + CobolDataStorage data = this.record.getDataStorage(); + for (i = 0; i < size; ++i, ++p) { + if (data.getByte(p) < ' ') { + this.file.putc((byte) 0); + } + this.file.putc(data.getByte(p)); + } + } else { + if (!this.file.write(this.record.getDataStorage(), size)) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + } + + if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { + this.file.putc((byte) '\n'); + } + + if ((opt & COB_WRITE_BEFORE) != 0) { + int ret = file_write_opt(opt); + if (ret != 0) { + return ret; + } + this.flag_needs_nl = false; + } + + if (this.flag_needs_nl && (this.flag_select_features & COB_SELECT_LINAGE) == 0) { + this.file.putc((byte) '\n'); + this.flag_needs_nl = false; + } + + if (eop_status != 0) { + eop_status = 0; + CobolRuntimeException.code = 0x0502; + return COB_STATUS_52_EOP; + } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int rewrite_(int opt) { + System.out.println("LineSeq.rewrite"); + return 0; + } + + @Override + public int delete_() { + System.out.println("LineSeq.delete"); + return 0; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java index 81b49935..72ee7ff8 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java @@ -1,503 +1,512 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.*; -import java.nio.ByteBuffer; -import java.nio.channels.*; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; - -/** TODO: 準備中 */ -public class CobolRelativeFile extends CobolFile { - - /** TODO: 準備中 */ - protected static final int COB_EQ = 1; - /** TODO: 準備中 */ - protected static final int COB_LT = 2; - /** TODO: 準備中 */ - protected static final int COB_LE = 3; - /** TODO: 準備中 */ - protected static final int COB_GT = 4; - /** TODO: 準備中 */ - protected static final int COB_GE = 5; - - RandomAccessFile fp; - byte[] size = new byte[8]; - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - */ - public CobolRelativeFile( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - super( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - } - - @Override - public int open_(String filename, int mode, int sharing) throws IOException { - FileChannel ch; - try { - switch (mode) { - case COB_OPEN_INPUT: - this.fp = new RandomAccessFile(this.assign.fieldToString(), "r"); - this.fp.seek(0); - break; - case COB_OPEN_OUTPUT: - Path path = Paths.get(filename); - if (Files.exists(path)) { - Files.delete(path); - } - this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); - this.fp.seek(0); - break; - case COB_OPEN_I_O: - this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); - this.fp.seek(0); - break; - case COB_OPEN_EXTEND: - this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); - this.fp.seek(0); - this.fp.seek(this.fp.length()); - break; - default: - return EACCESS; - } - } catch (IOException e) { - if (this.fp != null) { - this.file.setRandomAccessFile(this.fp, null); - } - if (Files.notExists(Paths.get(filename))) { - return ENOENT; - } else { - return EACCESS; - } - } - - ch = fp.getChannel(); - - FileLock fl = null; - if (!filename.startsWith("/dev/")) { - try { - boolean lockFlag; - if (sharing != 0 || mode == COB_OPEN_OUTPUT) { - lockFlag = false; - } else { - lockFlag = true; - } - fl = ch.tryLock(0L, Long.MAX_VALUE, lockFlag); - } catch (NonWritableChannelException e) { - this.fp.close(); - return EBADF; - } catch (IOException e) { - this.fp.close(); - return COB_STATUS_61_FILE_SHARING; - } - - this.file.setRandomAccessFile(this.fp, fl); - - if (fl == null || !fl.isValid()) { - this.fp.close(); - return COB_STATUS_61_FILE_SHARING; - } - } - - this.file.setRandomAccessFile(this.fp, fl); - if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { - if (this.file_linage_check()) { - return COB_LINAGE_INVALID; - } - this.flag_needs_top = true; - Linage lingptr = this.getLinorkeyptr(); - lingptr.getLinageCtr().setInt(1); - } - return 0; - } - - @Override - public int close_(int opt) { - try { - switch (opt) { - case COB_CLOSE_NORMAL: - case COB_CLOSE_LOCK: - case COB_CLOSE_NO_REWIND: - if (this.organization == COB_ORG_LINE_SEQUENTIAL) { - if (this.flag_needs_nl && ((this.flag_select_features & COB_SELECT_LINAGE) == 0)) { - this.flag_needs_nl = false; - - this.fp.writeChars("\n"); - } - } - - this.file.releaseLock(); - this.fp.close(); - this.file.close(); - - if (opt == COB_CLOSE_NO_REWIND) { - this.open_mode = COB_OPEN_CLOSED; - return COB_STATUS_07_SUCCESS_NO_UNIT; - } - return COB_STATUS_00_SUCCESS; - default: - this.file.flush(); - return COB_STATUS_07_SUCCESS_NO_UNIT; - } - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - @Override - public int start_(int cond, AbstractCobolField key) { - int kindex; - int relsize; - int off; - final int offset = 0; - boolean isSeek = true; - - kindex = key.getInt() - 1; - relsize = this.record_max + size.length; - if (cond == COB_LT) { - kindex--; - } else if (cond == COB_GT) { - kindex++; - } - - for (; ; ) { - off = kindex * relsize; - try { - this.fp.seek((long) off); - try { - this.fp.seek(off); - } catch (IOException e) { - isSeek = false; - } - - if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { - return COB_STATUS_23_KEY_NOT_EXISTS; - } - - if (this.record.getSize() > 0) { - key.setInt(kindex + 1); - this.fp.seek(this.fp.getFilePointer() - size.length); - return COB_STATUS_00_SUCCESS; - } - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - switch (cond) { - case COB_EQ: - return COB_STATUS_23_KEY_NOT_EXISTS; - case COB_LT: - case COB_LE: - kindex--; - break; - case COB_GT: - case COB_GE: - kindex++; - break; - default: - break; - } - } - } - - @Override - public int read_(AbstractCobolField key, int readOpts) { - int relnum; - int relsize; - int off; - final int offset = 0; - boolean isSeek = true; - try { - relnum = key.getInt() - 1; - relsize = this.record_max + size.length; - off = relnum * relsize; - try { - this.fp.seek(off); - } catch (IOException e) { - isSeek = false; - } - if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { - return COB_STATUS_23_KEY_NOT_EXISTS; - } - - if (ByteBuffer.wrap(size).getLong() == 0) { - this.fp.seek(this.fp.getFilePointer() - size.length); - return COB_STATUS_23_KEY_NOT_EXISTS; - } - byte[] bytes = new byte[this.record_max]; - if (this.fp.read(bytes, offset, this.record_max) != this.record_max) { - return COB_STATUS_30_PERMANENT_ERROR; - } - this.record.getDataStorage().memcpy(bytes); - return COB_STATUS_00_SUCCESS; - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - @Override - public int readNext(int readOpts) { - long off; - int relsize; - int relnum; - int recordSize; - final int offset = 0; - try { - - relsize = this.record_max + size.length; - for (; ; ) { - if (this.fp.read(size, offset, size.length) != size.length) { - return COB_STATUS_10_END_OF_FILE; - } - this.fp.seek(this.fp.getFilePointer() - 8); - recordSize = (int) this.fp.readLong(); - this.record.setSize(recordSize); - - if (this.keys[0].getField() != null) { - if (this.flag_first_read != 0) { - this.keys[0].getField().setInt(1); - this.flag_first_read = 0; - } else { - off = this.fp.getFilePointer(); - relnum = (int) ((off / relsize) + 1); - this.keys[0].getField().setInt(relnum); - if (String.valueOf(relnum).length() - > this.keys[0].getField().getAttribute().getDigits()) { - return COB_STATUS_14_OUT_OF_KEY_RANGE; - } - } - } - - byte[] bytes = new byte[this.record_max]; - if (recordSize > 0) { - if (this.fp.read(bytes, offset, this.record_max) != this.record_max) { - return COB_STATUS_30_PERMANENT_ERROR; - } - this.record.getDataStorage().memcpy(bytes); - return COB_STATUS_00_SUCCESS; - } - - this.fp.seek(this.fp.getFilePointer() + this.record_max); - } - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - @Override - public int write_(int opt) { - int relsize; - int i; - int kindex; - int off; - final int offset = 0; - - try { - relsize = this.record_max + size.length; - if (this.access_mode != COB_ACCESS_SEQUENTIAL) { - kindex = this.keys[0].getField().getInt() - 1; - if (kindex < 0) { - return COB_STATUS_21_KEY_INVALID; - } - off = relsize * kindex; - - try { - this.fp.seek((long) off); - } catch (IOException e) { - return COB_STATUS_21_KEY_INVALID; - } - } else { - off = (int) this.fp.getFilePointer(); - } - if (this.fp.read(size, offset, size.length) > 0) { - this.fp.seek(this.fp.getFilePointer() - 4); - int sizeInt = this.fp.readInt(); - this.fp.seek(this.fp.getFilePointer() - size.length); - if (sizeInt > 0) { - return COB_STATUS_22_KEY_EXISTS; - } - } else { - this.fp.seek(off); - } - try { - this.fp.writeLong(this.record.getSize()); - this.fp.write( - this.record.getDataStorage().getByteArray(0, this.record_max), offset, this.record_max); - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - - if (this.access_mode == COB_ACCESS_SEQUENTIAL) { - if (this.keys[0].getField() != null) { - off += relsize; - i = (int) (off / relsize); - this.keys[0].getField().setInt(i); - } - } - return COB_STATUS_00_SUCCESS; - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - @Override - public int rewrite_(int opt) { - int relsize; - int relnum; - int off; - final int offset = 0; - boolean isSeek = true; - - try { - if (this.access_mode == COB_ACCESS_SEQUENTIAL) { - this.fp.seek(this.fp.getFilePointer() - this.record_max); - } else { - relsize = this.record_max + size.length; - relnum = this.keys[0].getField().getInt() - 1; - off = relnum * relsize; - - try { - this.fp.seek(off); - } catch (IOException e) { - isSeek = false; - } - if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { - return COB_STATUS_23_KEY_NOT_EXISTS; - } - } - - this.fp.write( - this.record.getDataStorage().getByteArray(0, this.record_max), offset, this.record_max); - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - return COB_STATUS_00_SUCCESS; - } - - @Override - public int delete_() { - int relsize; - int relnum; - int off; - relnum = this.keys[0].getField().getInt() - 1; - relsize = this.record_max + size.length; - off = relnum * relsize; - final int offset = 0; - - try { - boolean isSeek = true; - try { - this.fp.seek(off); - } catch (IOException e) { - isSeek = false; - } - if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { - return COB_STATUS_23_KEY_NOT_EXISTS; - } - - this.fp.seek(this.fp.getFilePointer() - size.length); - - this.fp.writeLong(0); - - this.fp.seek(this.fp.getFilePointer() + this.record_max); - return COB_STATUS_00_SUCCESS; - - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.*; +import java.nio.ByteBuffer; +import java.nio.channels.*; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; + +/** TODO: 準備中 */ +public class CobolRelativeFile extends CobolFile { + + /** TODO: 準備中 */ + protected static final int COB_EQ = 1; + + /** TODO: 準備中 */ + protected static final int COB_LT = 2; + + /** TODO: 準備中 */ + protected static final int COB_LE = 3; + + /** TODO: 準備中 */ + protected static final int COB_GT = 4; + + /** TODO: 準備中 */ + protected static final int COB_GE = 5; + + RandomAccessFile fp; + byte[] size = new byte[8]; + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + */ + public CobolRelativeFile( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + super( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + } + + @Override + public int open_(String filename, int mode, int sharing) throws IOException { + FileChannel ch; + try { + switch (mode) { + case COB_OPEN_INPUT: + this.fp = new RandomAccessFile(this.assign.fieldToString(), "r"); + this.fp.seek(0); + break; + case COB_OPEN_OUTPUT: + Path path = Paths.get(filename); + if (Files.exists(path)) { + Files.delete(path); + } + this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); + this.fp.seek(0); + break; + case COB_OPEN_I_O: + this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); + this.fp.seek(0); + break; + case COB_OPEN_EXTEND: + this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); + this.fp.seek(0); + this.fp.seek(this.fp.length()); + break; + default: + return EACCESS; + } + } catch (IOException e) { + if (this.fp != null) { + this.file.setRandomAccessFile(this.fp, null); + } + if (Files.notExists(Paths.get(filename))) { + return ENOENT; + } else { + return EACCESS; + } + } + + ch = fp.getChannel(); + + FileLock fl = null; + if (!filename.startsWith("/dev/")) { + try { + boolean lockFlag; + if (sharing != 0 || mode == COB_OPEN_OUTPUT) { + lockFlag = false; + } else { + lockFlag = true; + } + fl = ch.tryLock(0L, Long.MAX_VALUE, lockFlag); + } catch (NonWritableChannelException e) { + this.fp.close(); + return EBADF; + } catch (IOException e) { + this.fp.close(); + return COB_STATUS_61_FILE_SHARING; + } + + this.file.setRandomAccessFile(this.fp, fl); + + if (fl == null || !fl.isValid()) { + this.fp.close(); + return COB_STATUS_61_FILE_SHARING; + } + } + + this.file.setRandomAccessFile(this.fp, fl); + if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { + if (this.file_linage_check()) { + return COB_LINAGE_INVALID; + } + this.flag_needs_top = true; + Linage lingptr = this.getLinorkeyptr(); + lingptr.getLinageCtr().setInt(1); + } + return 0; + } + + @Override + public int close_(int opt) { + try { + switch (opt) { + case COB_CLOSE_NORMAL: + case COB_CLOSE_LOCK: + case COB_CLOSE_NO_REWIND: + if (this.organization == COB_ORG_LINE_SEQUENTIAL) { + if (this.flag_needs_nl + && ((this.flag_select_features & COB_SELECT_LINAGE) == 0)) { + this.flag_needs_nl = false; + + this.fp.writeChars("\n"); + } + } + + this.file.releaseLock(); + this.fp.close(); + this.file.close(); + + if (opt == COB_CLOSE_NO_REWIND) { + this.open_mode = COB_OPEN_CLOSED; + return COB_STATUS_07_SUCCESS_NO_UNIT; + } + return COB_STATUS_00_SUCCESS; + default: + this.file.flush(); + return COB_STATUS_07_SUCCESS_NO_UNIT; + } + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + @Override + public int start_(int cond, AbstractCobolField key) { + int kindex; + int relsize; + int off; + final int offset = 0; + boolean isSeek = true; + + kindex = key.getInt() - 1; + relsize = this.record_max + size.length; + if (cond == COB_LT) { + kindex--; + } else if (cond == COB_GT) { + kindex++; + } + + for (; ; ) { + off = kindex * relsize; + try { + this.fp.seek((long) off); + try { + this.fp.seek(off); + } catch (IOException e) { + isSeek = false; + } + + if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { + return COB_STATUS_23_KEY_NOT_EXISTS; + } + + if (this.record.getSize() > 0) { + key.setInt(kindex + 1); + this.fp.seek(this.fp.getFilePointer() - size.length); + return COB_STATUS_00_SUCCESS; + } + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + switch (cond) { + case COB_EQ: + return COB_STATUS_23_KEY_NOT_EXISTS; + case COB_LT: + case COB_LE: + kindex--; + break; + case COB_GT: + case COB_GE: + kindex++; + break; + default: + break; + } + } + } + + @Override + public int read_(AbstractCobolField key, int readOpts) { + int relnum; + int relsize; + int off; + final int offset = 0; + boolean isSeek = true; + try { + relnum = key.getInt() - 1; + relsize = this.record_max + size.length; + off = relnum * relsize; + try { + this.fp.seek(off); + } catch (IOException e) { + isSeek = false; + } + if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { + return COB_STATUS_23_KEY_NOT_EXISTS; + } + + if (ByteBuffer.wrap(size).getLong() == 0) { + this.fp.seek(this.fp.getFilePointer() - size.length); + return COB_STATUS_23_KEY_NOT_EXISTS; + } + byte[] bytes = new byte[this.record_max]; + if (this.fp.read(bytes, offset, this.record_max) != this.record_max) { + return COB_STATUS_30_PERMANENT_ERROR; + } + this.record.getDataStorage().memcpy(bytes); + return COB_STATUS_00_SUCCESS; + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + @Override + public int readNext(int readOpts) { + long off; + int relsize; + int relnum; + int recordSize; + final int offset = 0; + try { + + relsize = this.record_max + size.length; + for (; ; ) { + if (this.fp.read(size, offset, size.length) != size.length) { + return COB_STATUS_10_END_OF_FILE; + } + this.fp.seek(this.fp.getFilePointer() - 8); + recordSize = (int) this.fp.readLong(); + this.record.setSize(recordSize); + + if (this.keys[0].getField() != null) { + if (this.flag_first_read != 0) { + this.keys[0].getField().setInt(1); + this.flag_first_read = 0; + } else { + off = this.fp.getFilePointer(); + relnum = (int) ((off / relsize) + 1); + this.keys[0].getField().setInt(relnum); + if (String.valueOf(relnum).length() + > this.keys[0].getField().getAttribute().getDigits()) { + return COB_STATUS_14_OUT_OF_KEY_RANGE; + } + } + } + + byte[] bytes = new byte[this.record_max]; + if (recordSize > 0) { + if (this.fp.read(bytes, offset, this.record_max) != this.record_max) { + return COB_STATUS_30_PERMANENT_ERROR; + } + this.record.getDataStorage().memcpy(bytes); + return COB_STATUS_00_SUCCESS; + } + + this.fp.seek(this.fp.getFilePointer() + this.record_max); + } + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + @Override + public int write_(int opt) { + int relsize; + int i; + int kindex; + int off; + final int offset = 0; + + try { + relsize = this.record_max + size.length; + if (this.access_mode != COB_ACCESS_SEQUENTIAL) { + kindex = this.keys[0].getField().getInt() - 1; + if (kindex < 0) { + return COB_STATUS_21_KEY_INVALID; + } + off = relsize * kindex; + + try { + this.fp.seek((long) off); + } catch (IOException e) { + return COB_STATUS_21_KEY_INVALID; + } + } else { + off = (int) this.fp.getFilePointer(); + } + if (this.fp.read(size, offset, size.length) > 0) { + this.fp.seek(this.fp.getFilePointer() - 4); + int sizeInt = this.fp.readInt(); + this.fp.seek(this.fp.getFilePointer() - size.length); + if (sizeInt > 0) { + return COB_STATUS_22_KEY_EXISTS; + } + } else { + this.fp.seek(off); + } + try { + this.fp.writeLong(this.record.getSize()); + this.fp.write( + this.record.getDataStorage().getByteArray(0, this.record_max), + offset, + this.record_max); + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + + if (this.access_mode == COB_ACCESS_SEQUENTIAL) { + if (this.keys[0].getField() != null) { + off += relsize; + i = (int) (off / relsize); + this.keys[0].getField().setInt(i); + } + } + return COB_STATUS_00_SUCCESS; + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + @Override + public int rewrite_(int opt) { + int relsize; + int relnum; + int off; + final int offset = 0; + boolean isSeek = true; + + try { + if (this.access_mode == COB_ACCESS_SEQUENTIAL) { + this.fp.seek(this.fp.getFilePointer() - this.record_max); + } else { + relsize = this.record_max + size.length; + relnum = this.keys[0].getField().getInt() - 1; + off = relnum * relsize; + + try { + this.fp.seek(off); + } catch (IOException e) { + isSeek = false; + } + if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { + return COB_STATUS_23_KEY_NOT_EXISTS; + } + } + + this.fp.write( + this.record.getDataStorage().getByteArray(0, this.record_max), + offset, + this.record_max); + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int delete_() { + int relsize; + int relnum; + int off; + relnum = this.keys[0].getField().getInt() - 1; + relsize = this.record_max + size.length; + off = relnum * relsize; + final int offset = 0; + + try { + boolean isSeek = true; + try { + this.fp.seek(off); + } catch (IOException e) { + isSeek = false; + } + if (!isSeek || this.fp.read(size, offset, size.length) != size.length) { + return COB_STATUS_23_KEY_NOT_EXISTS; + } + + this.fp.seek(this.fp.getFilePointer() - size.length); + + this.fp.writeLong(0); + + this.fp.seek(this.fp.getFilePointer() + this.record_max); + return COB_STATUS_00_SUCCESS; + + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java index d46d2ff7..d5e33800 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java @@ -1,210 +1,210 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.IOException; -import java.nio.ByteBuffer; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; - -/** TODO: 準備中 */ -public class CobolSequentialFile extends CobolFile { - - /** - * TODO: 準備中 - * - * @param selectName TODO: 準備中 - * @param fileStatus TODO: 準備中 - * @param assign TODO: 準備中 - * @param record TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param recordMin TODO: 準備中 - * @param recordMax TODO: 準備中 - * @param nkeys TODO: 準備中 - * @param keys TODO: 準備中 - * @param organization TODO: 準備中 - * @param accessMode TODO: 準備中 - * @param lockMode TODO: 準備中 - * @param openMode TODO: 準備中 - * @param flagOptional TODO: 準備中 - * @param lastOpenMode TODO: 準備中 - * @param special TODO: 準備中 - * @param flagNonexistent TODO: 準備中 - * @param flagEndOfFile TODO: 準備中 - * @param flagBeginOfFile TODO: 準備中 - * @param flagFirstRead TODO: 準備中 - * @param flagReadDone TODO: 準備中 - * @param flagSelectFeatures TODO: 準備中 - * @param flagNeedsNl TODO: 準備中 - * @param flagNeedsTop TODO: 準備中 - * @param fileVersion TODO: 準備中 - */ - public CobolSequentialFile( - String selectName, - byte[] fileStatus, - AbstractCobolField assign, - AbstractCobolField record, - AbstractCobolField recordSize, - int recordMin, - int recordMax, - int nkeys, - CobolFileKey[] keys, - char organization, - char accessMode, - char lockMode, - char openMode, - boolean flagOptional, - char lastOpenMode, - char special, - boolean flagNonexistent, - boolean flagEndOfFile, - boolean flagBeginOfFile, - char flagFirstRead, - boolean flagReadDone, - char flagSelectFeatures, - boolean flagNeedsNl, - boolean flagNeedsTop, - char fileVersion) { - super( - selectName, - fileStatus, - assign, - record, - recordSize, - recordMin, - recordMax, - nkeys, - keys, - organization, - accessMode, - lockMode, - openMode, - flagOptional, - lastOpenMode, - special, - flagNonexistent, - flagEndOfFile, - flagBeginOfFile, - flagFirstRead, - flagReadDone, - flagSelectFeatures, - flagNeedsNl, - flagNeedsTop, - fileVersion); - } - - @Override - public int start_(int cond, AbstractCobolField key) { - System.out.println("Seq.start"); - return 0; - } - - @Override - public int read_(AbstractCobolField key, int readOpts) { - System.out.println("Seq.read"); - return 0; - } - - @Override - public int readNext(int readOpts) { - byte[] sbuff = new byte[4]; - this.file.seekInit(); - - if (this.record_min != this.record_max) { - if (this.file.read(sbuff, 4) != 1) { - if (this.file.isAtEnd()) { - return COB_STATUS_10_END_OF_FILE; - } else { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - int size = ByteBuffer.wrap(sbuff).getInt(); - this.record.setSize(size); - } - - try { - int bytesread = this.file.read(this.record.getDataStorage(), this.record.getSize()); - if (bytesread != this.record.getSize()) { - if (bytesread == 0) { - return COB_STATUS_10_END_OF_FILE; - } else { - return COB_STATUS_04_SUCCESS_INCOMPLETE; - } - } - } catch (IOException e) { - return COB_STATUS_30_PERMANENT_ERROR; - } - return COB_STATUS_00_SUCCESS; - } - - @Override - public int write_(int opt) throws CobolStopRunException { - int ret; - byte[] sbuff = new byte[4]; - - this.file.seekInit(); - - /* WRITE AFTER */ - if ((opt & COB_WRITE_AFTER) != 0) { - ret = file_write_opt(opt); - if (ret != 0) { - return ret; - } - } - - if (this.record_min != this.record_max) { - ByteBuffer.wrap(sbuff).putInt(this.record.getSize()); - if (!this.file.write(sbuff, 4)) { - return COB_STATUS_30_PERMANENT_ERROR; - } - } - - /* write the record */ - if (!this.file.write(this.record.getDataStorage(), this.record.getSize())) { - return COB_STATUS_30_PERMANENT_ERROR; - } - - /* WRITE BEFORE */ - if ((opt & COB_WRITE_BEFORE) != 0) { - ret = this.file_write_opt(opt); - if (ret != 0) { - return ret; - } - this.flag_needs_nl = false; - } - return 0; - } - - @Override - public int rewrite_(int opt) { - if (!this.file.seek(-this.record.getSize(), FileIO.SEEK_CUR)) { - return COB_STATUS_30_PERMANENT_ERROR; - } - if (!this.file.write(this.record.getDataStorage(), this.record.getSize())) { - return COB_STATUS_30_PERMANENT_ERROR; - } - return COB_STATUS_00_SUCCESS; - } - - @Override - public int delete_() { - System.out.println("Seq.delete"); - return 0; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.IOException; +import java.nio.ByteBuffer; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + +/** TODO: 準備中 */ +public class CobolSequentialFile extends CobolFile { + + /** + * TODO: 準備中 + * + * @param selectName TODO: 準備中 + * @param fileStatus TODO: 準備中 + * @param assign TODO: 準備中 + * @param record TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param recordMin TODO: 準備中 + * @param recordMax TODO: 準備中 + * @param nkeys TODO: 準備中 + * @param keys TODO: 準備中 + * @param organization TODO: 準備中 + * @param accessMode TODO: 準備中 + * @param lockMode TODO: 準備中 + * @param openMode TODO: 準備中 + * @param flagOptional TODO: 準備中 + * @param lastOpenMode TODO: 準備中 + * @param special TODO: 準備中 + * @param flagNonexistent TODO: 準備中 + * @param flagEndOfFile TODO: 準備中 + * @param flagBeginOfFile TODO: 準備中 + * @param flagFirstRead TODO: 準備中 + * @param flagReadDone TODO: 準備中 + * @param flagSelectFeatures TODO: 準備中 + * @param flagNeedsNl TODO: 準備中 + * @param flagNeedsTop TODO: 準備中 + * @param fileVersion TODO: 準備中 + */ + public CobolSequentialFile( + String selectName, + byte[] fileStatus, + AbstractCobolField assign, + AbstractCobolField record, + AbstractCobolField recordSize, + int recordMin, + int recordMax, + int nkeys, + CobolFileKey[] keys, + char organization, + char accessMode, + char lockMode, + char openMode, + boolean flagOptional, + char lastOpenMode, + char special, + boolean flagNonexistent, + boolean flagEndOfFile, + boolean flagBeginOfFile, + char flagFirstRead, + boolean flagReadDone, + char flagSelectFeatures, + boolean flagNeedsNl, + boolean flagNeedsTop, + char fileVersion) { + super( + selectName, + fileStatus, + assign, + record, + recordSize, + recordMin, + recordMax, + nkeys, + keys, + organization, + accessMode, + lockMode, + openMode, + flagOptional, + lastOpenMode, + special, + flagNonexistent, + flagEndOfFile, + flagBeginOfFile, + flagFirstRead, + flagReadDone, + flagSelectFeatures, + flagNeedsNl, + flagNeedsTop, + fileVersion); + } + + @Override + public int start_(int cond, AbstractCobolField key) { + System.out.println("Seq.start"); + return 0; + } + + @Override + public int read_(AbstractCobolField key, int readOpts) { + System.out.println("Seq.read"); + return 0; + } + + @Override + public int readNext(int readOpts) { + byte[] sbuff = new byte[4]; + this.file.seekInit(); + + if (this.record_min != this.record_max) { + if (this.file.read(sbuff, 4) != 1) { + if (this.file.isAtEnd()) { + return COB_STATUS_10_END_OF_FILE; + } else { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + int size = ByteBuffer.wrap(sbuff).getInt(); + this.record.setSize(size); + } + + try { + int bytesread = this.file.read(this.record.getDataStorage(), this.record.getSize()); + if (bytesread != this.record.getSize()) { + if (bytesread == 0) { + return COB_STATUS_10_END_OF_FILE; + } else { + return COB_STATUS_04_SUCCESS_INCOMPLETE; + } + } + } catch (IOException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int write_(int opt) throws CobolStopRunException { + int ret; + byte[] sbuff = new byte[4]; + + this.file.seekInit(); + + /* WRITE AFTER */ + if ((opt & COB_WRITE_AFTER) != 0) { + ret = file_write_opt(opt); + if (ret != 0) { + return ret; + } + } + + if (this.record_min != this.record_max) { + ByteBuffer.wrap(sbuff).putInt(this.record.getSize()); + if (!this.file.write(sbuff, 4)) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + + /* write the record */ + if (!this.file.write(this.record.getDataStorage(), this.record.getSize())) { + return COB_STATUS_30_PERMANENT_ERROR; + } + + /* WRITE BEFORE */ + if ((opt & COB_WRITE_BEFORE) != 0) { + ret = this.file_write_opt(opt); + if (ret != 0) { + return ret; + } + this.flag_needs_nl = false; + } + return 0; + } + + @Override + public int rewrite_(int opt) { + if (!this.file.seek(-this.record.getSize(), FileIO.SEEK_CUR)) { + return COB_STATUS_30_PERMANENT_ERROR; + } + if (!this.file.write(this.record.getDataStorage(), this.record.getSize())) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int delete_() { + System.out.println("Seq.delete"); + return 0; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSort.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSort.java index e1094abe..0e9d45e0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSort.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSort.java @@ -1,319 +1,319 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; - -/** TODO: 準備中 */ -class CobolSort { - private CobolFile pointer; - private CobolItem empty; - private CobolDataStorage sortReturn; - private AbstractCobolField fnstatus; - private int unique; - private int retrieving; - private int filesUsed; - private int size; - private int rSize; - private int wSize; - private int memory; - private int destinationFile; - private int retrievalQueue; - private MemoryStruct[] queue = new MemoryStruct[4]; - private FileStruct[] file = new FileStruct[4]; - - /** TODO: 準備中 */ - CobolSort() { - for (int i = 0; i < 4; ++i) { - this.queue[i] = new MemoryStruct(); - this.file[i] = new FileStruct(); - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolFile getPointer() { - return pointer; - } - - /** - * TODO: 準備中 - * - * @param pointer TODO: 準備中 - */ - void setPointer(CobolFile pointer) { - this.pointer = pointer; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolItem getEmpty() { - return empty; - } - - /** - * TODO: 準備中 - * - * @param empty TODO: 準備中 - */ - void setEmpty(CobolItem empty) { - this.empty = empty; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolDataStorage getSortReturn() { - return sortReturn; - } - - /** - * TODO: 準備中 - * - * @param sortReturn TODO: 準備中 - */ - void setSortReturn(CobolDataStorage sortReturn) { - this.sortReturn = sortReturn; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getFnstatus() { - return fnstatus; - } - - /** - * TODO: 準備中 - * - * @param fnstatus TODO: 準備中 - */ - void setFnstatus(AbstractCobolField fnstatus) { - this.fnstatus = fnstatus; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getUnique() { - return unique; - } - - /** - * TODO: 準備中 - * - * @param unique TODO: 準備中 - */ - void setUnique(int unique) { - this.unique = unique; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getRetrieving() { - return retrieving; - } - - /** - * TODO: 準備中 - * - * @param retrieving TODO: 準備中 - */ - void setRetrieving(int retrieving) { - this.retrieving = retrieving; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getFilesUsed() { - return filesUsed; - } - - /** - * TODO: 準備中 - * - * @param filesUsed TODO: 準備中 - */ - void setFilesUsed(int filesUsed) { - this.filesUsed = filesUsed; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getSize() { - return size; - } - - /** - * TODO: 準備中 - * - * @param size TODO: 準備中 - */ - void setSize(int size) { - this.size = size; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getrSize() { - return rSize; - } - - /** - * TODO: 準備中 - * - * @param rSize TODO: 準備中 - */ - void setrSize(int rSize) { - this.rSize = rSize; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getwSize() { - return wSize; - } - - /** - * TODO: 準備中 - * - * @param wSize TODO: 準備中 - */ - void setwSize(int wSize) { - this.wSize = wSize; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getMemory() { - return memory; - } - - /** - * TODO: 準備中 - * - * @param memory TODO: 準備中 - */ - void setMemory(int memory) { - this.memory = memory; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getDestinationFile() { - return destinationFile; - } - - /** - * TODO: 準備中 - * - * @param destinationFile TODO: 準備中 - */ - void setDestinationFile(int destinationFile) { - this.destinationFile = destinationFile; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getRetrievalQueue() { - return retrievalQueue; - } - - /** - * TODO: 準備中 - * - * @param retrievalQueue TODO: 準備中 - */ - void setRetrievalQueue(int retrievalQueue) { - this.retrievalQueue = retrievalQueue; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - MemoryStruct[] getQueue() { - return queue; - } - - /** - * TODO: 準備中 - * - * @param queue TODO: 準備中 - */ - void setQueue(MemoryStruct[] queue) { - this.queue = queue; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - FileStruct[] getFile() { - return file; - } - - /** - * TODO: 準備中 - * - * @param file TODO: 準備中 - */ - void setFile(FileStruct[] file) { - this.file = file; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; + +/** TODO: 準備中 */ +class CobolSort { + private CobolFile pointer; + private CobolItem empty; + private CobolDataStorage sortReturn; + private AbstractCobolField fnstatus; + private int unique; + private int retrieving; + private int filesUsed; + private int size; + private int rSize; + private int wSize; + private int memory; + private int destinationFile; + private int retrievalQueue; + private MemoryStruct[] queue = new MemoryStruct[4]; + private FileStruct[] file = new FileStruct[4]; + + /** TODO: 準備中 */ + CobolSort() { + for (int i = 0; i < 4; ++i) { + this.queue[i] = new MemoryStruct(); + this.file[i] = new FileStruct(); + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolFile getPointer() { + return pointer; + } + + /** + * TODO: 準備中 + * + * @param pointer TODO: 準備中 + */ + void setPointer(CobolFile pointer) { + this.pointer = pointer; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolItem getEmpty() { + return empty; + } + + /** + * TODO: 準備中 + * + * @param empty TODO: 準備中 + */ + void setEmpty(CobolItem empty) { + this.empty = empty; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolDataStorage getSortReturn() { + return sortReturn; + } + + /** + * TODO: 準備中 + * + * @param sortReturn TODO: 準備中 + */ + void setSortReturn(CobolDataStorage sortReturn) { + this.sortReturn = sortReturn; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getFnstatus() { + return fnstatus; + } + + /** + * TODO: 準備中 + * + * @param fnstatus TODO: 準備中 + */ + void setFnstatus(AbstractCobolField fnstatus) { + this.fnstatus = fnstatus; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getUnique() { + return unique; + } + + /** + * TODO: 準備中 + * + * @param unique TODO: 準備中 + */ + void setUnique(int unique) { + this.unique = unique; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getRetrieving() { + return retrieving; + } + + /** + * TODO: 準備中 + * + * @param retrieving TODO: 準備中 + */ + void setRetrieving(int retrieving) { + this.retrieving = retrieving; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getFilesUsed() { + return filesUsed; + } + + /** + * TODO: 準備中 + * + * @param filesUsed TODO: 準備中 + */ + void setFilesUsed(int filesUsed) { + this.filesUsed = filesUsed; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getSize() { + return size; + } + + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + */ + void setSize(int size) { + this.size = size; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getrSize() { + return rSize; + } + + /** + * TODO: 準備中 + * + * @param rSize TODO: 準備中 + */ + void setrSize(int rSize) { + this.rSize = rSize; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getwSize() { + return wSize; + } + + /** + * TODO: 準備中 + * + * @param wSize TODO: 準備中 + */ + void setwSize(int wSize) { + this.wSize = wSize; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getMemory() { + return memory; + } + + /** + * TODO: 準備中 + * + * @param memory TODO: 準備中 + */ + void setMemory(int memory) { + this.memory = memory; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getDestinationFile() { + return destinationFile; + } + + /** + * TODO: 準備中 + * + * @param destinationFile TODO: 準備中 + */ + void setDestinationFile(int destinationFile) { + this.destinationFile = destinationFile; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getRetrievalQueue() { + return retrievalQueue; + } + + /** + * TODO: 準備中 + * + * @param retrievalQueue TODO: 準備中 + */ + void setRetrievalQueue(int retrievalQueue) { + this.retrievalQueue = retrievalQueue; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + MemoryStruct[] getQueue() { + return queue; + } + + /** + * TODO: 準備中 + * + * @param queue TODO: 準備中 + */ + void setQueue(MemoryStruct[] queue) { + this.queue = queue; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + FileStruct[] getFile() { + return file; + } + + /** + * TODO: 準備中 + * + * @param file TODO: 準備中 + */ + void setFile(FileStruct[] file) { + this.file = file; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java index c1caf73a..8ca82b46 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java @@ -1,430 +1,431 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintStream; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; -import java.nio.channels.NonReadableChannelException; -import java.nio.channels.NonWritableChannelException; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; - -/** TODO: 準備中 */ -class FileIO { - - private FileChannel fc; - private FileLock fl = null; - private boolean useStdOut = true; - private boolean useStdIn = true; - private boolean atEnd = false; - - private static final boolean USE_READ_BUFFER = false; - private static final int READ_BUFFER_SIZE = 1024; - private int readBufferIndex; - private byte[] readBuffer; - private int readBufferEndIndex; - - private int writeBufferSize = 0; - private int writeBufferEndIndex = 0; - private byte[] writeBuffer; - - /** TODO: 準備中 */ - FileIO() { - this.useStdOut = true; - this.useStdIn = true; - - this.readBufferIndex = READ_BUFFER_SIZE; - this.readBuffer = new byte[READ_BUFFER_SIZE]; - this.readBufferEndIndex = READ_BUFFER_SIZE; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - boolean isAtEnd() { - return this.atEnd; - } - - /** - * TODO: 準備中 - * - * @param fc TODO: 準備中 - * @param fl TODO: 準備中 - */ - void setChannel(FileChannel fc, FileLock fl) { - this.fc = fc; - this.fl = fl; - this.useStdOut = false; - this.useStdIn = false; - } - - /** - * TODO: 準備中 - * - * @param ra TODO: 準備中 - * @param fl TODO: 準備中 - */ - void setRandomAccessFile(RandomAccessFile ra, FileLock fl) { - this.useStdOut = false; - this.useStdIn = false; - this.fc = ra.getChannel(); - } - - /** - * TODO: 準備中 - * - * @param out TODO: 準備中 - */ - void setOut(PrintStream out) { - this.useStdOut = true; - } - - /** - * TODO: 準備中 - * - * @param in TODO: 準備中 - */ - void setIn(InputStream in) { - this.useStdIn = true; - } - - /** - * TODO: 準備中 - * - * @param bufferSize TODO: 準備中 - */ - void prepareWriteBuffer(int bufferSize) { - if (bufferSize > 0) { - this.writeBufferSize = bufferSize; - this.writeBufferEndIndex = 0; - if (this.writeBuffer == null || this.writeBuffer.length < bufferSize) { - this.writeBuffer = new byte[bufferSize]; - } - } - } - - private void destroyWriteBuffer() { - this.writeBufferSize = 0; - this.writeBufferEndIndex = 0; - } - - /** - * TODO: 準備中 - * - * @param bytes TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - int read(byte[] bytes, int size) { - if (useStdIn) { - // 標準入力を使う - System.err.println("read stdin not implmented"); - return 0; - } else { - int readSize; - ByteBuffer data = ByteBuffer.wrap(bytes); - try { - readSize = this.fc.read(data); - } catch (IOException | NonReadableChannelException e) { - return 0; - } - - this.atEnd = readSize == -1; - if (readSize == -1) { - return 0; - } - } - return 1; - } - - /** - * TODO: 準備中 - * - * @param storage TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - * @throws IOException TODO: 準備中 - */ - int read(CobolDataStorage storage, int size) throws IOException { - if (useStdIn) { - return 0; - } else { - if (this.fc == null) { - throw new IOException(); - } - int i = 0; - try { - for (i = 0; i < size; ++i) { - byte[] b = new byte[1]; - ByteBuffer bb = ByteBuffer.wrap(b); - if (this.fc.read(bb) != 1) { - return i; - } - storage.setByte(i, b[0]); - } - } catch (IOException | NonReadableChannelException e) { - throw e; - } - return size; - } - } - - private boolean writeByteBuffer(ByteBuffer bb) { - try { - this.fc.write(bb); - } catch (IOException | NonWritableChannelException e) { - return false; - } - return true; - } - - private boolean outputWriteBuffer() { - if (writeBufferEndIndex > 0 && writeBufferSize > 0) { - ByteBuffer bb = ByteBuffer.wrap(writeBuffer, 0, writeBufferEndIndex); - if (!writeByteBuffer(bb)) { - return false; - } - writeBufferEndIndex = 0; - } - return true; - } - - /** - * TODO: 準備中 - * - * @param bytes TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - boolean write(byte[] bytes, int size) { - if (this.fc == null) { - return false; - } - if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { - System.arraycopy(bytes, 0, writeBuffer, writeBufferEndIndex, size); - writeBufferEndIndex += size; - return true; - } - if (!outputWriteBuffer()) { - return false; - } - if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { - System.arraycopy(bytes, 0, writeBuffer, writeBufferEndIndex, size); - writeBufferEndIndex += size; - return true; - } - ByteBuffer bb = ByteBuffer.wrap(bytes, 0, size); - return writeByteBuffer(bb); - } - - /** - * TODO: 準備中 - * - * @param storage TODO: 準備中 - * @param size TODO: 準備中 - * @return TODO: 準備中 - */ - boolean write(CobolDataStorage storage, int size) { - if (this.fc == null) { - return false; - } - if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { - for (int i = 0; i < size; ++i) { - writeBuffer[writeBufferEndIndex + i] = storage.getByte(i); - } - writeBufferEndIndex += size; - return true; - } - if (!outputWriteBuffer()) { - return false; - } - if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { - for (int i = 0; i < size; ++i) { - writeBuffer[writeBufferEndIndex + i] = storage.getByte(i); - } - writeBufferEndIndex += size; - return true; - } - ByteBuffer bb = storage.getByteBuffer(size); - return writeByteBuffer(bb); - } - - /** - * TODO: 準備中 - * - * @param val TODO: 準備中 - * @return TODO: 準備中 - */ - byte putc(byte val) { - if (this.fc == null) { - return 0; - } - if (writeBufferSize > 0 && 1 <= writeBufferSize - writeBufferEndIndex) { - writeBuffer[writeBufferEndIndex++] = val; - return val; - } - if (!outputWriteBuffer()) { - return -1; - } - if (writeBufferSize > 0 && 1 <= writeBufferSize - writeBufferEndIndex) { - writeBuffer[writeBufferEndIndex++] = val; - return val; - } - byte[] arr = {val}; - if (writeByteBuffer(ByteBuffer.wrap(arr))) { - return val; - } else { - return -1; - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getc() { - if (this.fc == null) { - return 0; - } - if (USE_READ_BUFFER) { - if (readBufferIndex >= READ_BUFFER_SIZE) { - this.readBufferIndex = 0; - try { - ByteBuffer bb = ByteBuffer.wrap(readBuffer); - int readBytes = this.fc.read(bb); - if (readBytes <= 0) { - this.readBufferEndIndex = -1; - } else { - this.readBufferEndIndex = readBytes; - } - } catch (IOException | NonReadableChannelException e) { - return -1; - } - } - - if (this.readBufferIndex >= this.readBufferEndIndex) { - return -1; - } - - return readBuffer[readBufferIndex++]; - - } else { - try { - byte[] b = new byte[1]; - ByteBuffer bb = ByteBuffer.wrap(b); - if (this.fc.read(bb) == 1) { - return b[0]; - } else { - return -1; - } - } catch (IOException | NonReadableChannelException e) { - return -1; - } - } - } - - /** TODO: 準備中 */ - void close() { - if (!useStdOut && !useStdIn && this.fc != null) { - try { - outputWriteBuffer(); - destroyWriteBuffer(); - this.fc.close(); - } catch (IOException e) { - return; - } - } - } - - /** TODO: 準備中 */ - void flush() { - if (!useStdOut) { - try { - outputWriteBuffer(); - this.fc.force(false); - } catch (IOException e) { - return; - } - } - } - - /** TODO: 準備中 */ - static final int SEEK_SET = 0; - /** TODO: 準備中 */ - static final int SEEK_CUR = 1; - - /** - * TODO: 準備中 - * - * @param offset TODO: 準備中 - * @param origin TODO: 準備中 - * @return TODO: 準備中 - */ - boolean seek(long offset, int origin) { - if (!useStdOut && !useStdIn) { - try { - switch (origin) { - case FileIO.SEEK_SET: - this.fc.position(offset); - break; - case FileIO.SEEK_CUR: - this.fc.position(this.fc.position() + offset); - break; - default: - return false; - } - } catch (IOException e) { - return false; - } - } - return true; - } - - /** TODO: 準備中 */ - void seekInit() {} - - /** TODO: 準備中 */ - void rewind() { - if (!useStdOut && !useStdIn) { - try { - this.fc.position(0L); - } catch (IOException e) { - return; - } - } - } - - /** TODO: 準備中 */ - void releaseLock() { - if ((!useStdOut || !useStdIn) && this.fl != null) { - try { - this.fl.release(); - } catch (IOException e) { - return; - } - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.channels.FileLock; +import java.nio.channels.NonReadableChannelException; +import java.nio.channels.NonWritableChannelException; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; + +/** TODO: 準備中 */ +class FileIO { + + private FileChannel fc; + private FileLock fl = null; + private boolean useStdOut = true; + private boolean useStdIn = true; + private boolean atEnd = false; + + private static final boolean USE_READ_BUFFER = false; + private static final int READ_BUFFER_SIZE = 1024; + private int readBufferIndex; + private byte[] readBuffer; + private int readBufferEndIndex; + + private int writeBufferSize = 0; + private int writeBufferEndIndex = 0; + private byte[] writeBuffer; + + /** TODO: 準備中 */ + FileIO() { + this.useStdOut = true; + this.useStdIn = true; + + this.readBufferIndex = READ_BUFFER_SIZE; + this.readBuffer = new byte[READ_BUFFER_SIZE]; + this.readBufferEndIndex = READ_BUFFER_SIZE; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + boolean isAtEnd() { + return this.atEnd; + } + + /** + * TODO: 準備中 + * + * @param fc TODO: 準備中 + * @param fl TODO: 準備中 + */ + void setChannel(FileChannel fc, FileLock fl) { + this.fc = fc; + this.fl = fl; + this.useStdOut = false; + this.useStdIn = false; + } + + /** + * TODO: 準備中 + * + * @param ra TODO: 準備中 + * @param fl TODO: 準備中 + */ + void setRandomAccessFile(RandomAccessFile ra, FileLock fl) { + this.useStdOut = false; + this.useStdIn = false; + this.fc = ra.getChannel(); + } + + /** + * TODO: 準備中 + * + * @param out TODO: 準備中 + */ + void setOut(PrintStream out) { + this.useStdOut = true; + } + + /** + * TODO: 準備中 + * + * @param in TODO: 準備中 + */ + void setIn(InputStream in) { + this.useStdIn = true; + } + + /** + * TODO: 準備中 + * + * @param bufferSize TODO: 準備中 + */ + void prepareWriteBuffer(int bufferSize) { + if (bufferSize > 0) { + this.writeBufferSize = bufferSize; + this.writeBufferEndIndex = 0; + if (this.writeBuffer == null || this.writeBuffer.length < bufferSize) { + this.writeBuffer = new byte[bufferSize]; + } + } + } + + private void destroyWriteBuffer() { + this.writeBufferSize = 0; + this.writeBufferEndIndex = 0; + } + + /** + * TODO: 準備中 + * + * @param bytes TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + int read(byte[] bytes, int size) { + if (useStdIn) { + // 標準入力を使う + System.err.println("read stdin not implmented"); + return 0; + } else { + int readSize; + ByteBuffer data = ByteBuffer.wrap(bytes); + try { + readSize = this.fc.read(data); + } catch (IOException | NonReadableChannelException e) { + return 0; + } + + this.atEnd = readSize == -1; + if (readSize == -1) { + return 0; + } + } + return 1; + } + + /** + * TODO: 準備中 + * + * @param storage TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + * @throws IOException TODO: 準備中 + */ + int read(CobolDataStorage storage, int size) throws IOException { + if (useStdIn) { + return 0; + } else { + if (this.fc == null) { + throw new IOException(); + } + int i = 0; + try { + for (i = 0; i < size; ++i) { + byte[] b = new byte[1]; + ByteBuffer bb = ByteBuffer.wrap(b); + if (this.fc.read(bb) != 1) { + return i; + } + storage.setByte(i, b[0]); + } + } catch (IOException | NonReadableChannelException e) { + throw e; + } + return size; + } + } + + private boolean writeByteBuffer(ByteBuffer bb) { + try { + this.fc.write(bb); + } catch (IOException | NonWritableChannelException e) { + return false; + } + return true; + } + + private boolean outputWriteBuffer() { + if (writeBufferEndIndex > 0 && writeBufferSize > 0) { + ByteBuffer bb = ByteBuffer.wrap(writeBuffer, 0, writeBufferEndIndex); + if (!writeByteBuffer(bb)) { + return false; + } + writeBufferEndIndex = 0; + } + return true; + } + + /** + * TODO: 準備中 + * + * @param bytes TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + boolean write(byte[] bytes, int size) { + if (this.fc == null) { + return false; + } + if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { + System.arraycopy(bytes, 0, writeBuffer, writeBufferEndIndex, size); + writeBufferEndIndex += size; + return true; + } + if (!outputWriteBuffer()) { + return false; + } + if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { + System.arraycopy(bytes, 0, writeBuffer, writeBufferEndIndex, size); + writeBufferEndIndex += size; + return true; + } + ByteBuffer bb = ByteBuffer.wrap(bytes, 0, size); + return writeByteBuffer(bb); + } + + /** + * TODO: 準備中 + * + * @param storage TODO: 準備中 + * @param size TODO: 準備中 + * @return TODO: 準備中 + */ + boolean write(CobolDataStorage storage, int size) { + if (this.fc == null) { + return false; + } + if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { + for (int i = 0; i < size; ++i) { + writeBuffer[writeBufferEndIndex + i] = storage.getByte(i); + } + writeBufferEndIndex += size; + return true; + } + if (!outputWriteBuffer()) { + return false; + } + if (writeBufferSize > 0 && size <= writeBufferSize - writeBufferEndIndex) { + for (int i = 0; i < size; ++i) { + writeBuffer[writeBufferEndIndex + i] = storage.getByte(i); + } + writeBufferEndIndex += size; + return true; + } + ByteBuffer bb = storage.getByteBuffer(size); + return writeByteBuffer(bb); + } + + /** + * TODO: 準備中 + * + * @param val TODO: 準備中 + * @return TODO: 準備中 + */ + byte putc(byte val) { + if (this.fc == null) { + return 0; + } + if (writeBufferSize > 0 && 1 <= writeBufferSize - writeBufferEndIndex) { + writeBuffer[writeBufferEndIndex++] = val; + return val; + } + if (!outputWriteBuffer()) { + return -1; + } + if (writeBufferSize > 0 && 1 <= writeBufferSize - writeBufferEndIndex) { + writeBuffer[writeBufferEndIndex++] = val; + return val; + } + byte[] arr = {val}; + if (writeByteBuffer(ByteBuffer.wrap(arr))) { + return val; + } else { + return -1; + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getc() { + if (this.fc == null) { + return 0; + } + if (USE_READ_BUFFER) { + if (readBufferIndex >= READ_BUFFER_SIZE) { + this.readBufferIndex = 0; + try { + ByteBuffer bb = ByteBuffer.wrap(readBuffer); + int readBytes = this.fc.read(bb); + if (readBytes <= 0) { + this.readBufferEndIndex = -1; + } else { + this.readBufferEndIndex = readBytes; + } + } catch (IOException | NonReadableChannelException e) { + return -1; + } + } + + if (this.readBufferIndex >= this.readBufferEndIndex) { + return -1; + } + + return readBuffer[readBufferIndex++]; + + } else { + try { + byte[] b = new byte[1]; + ByteBuffer bb = ByteBuffer.wrap(b); + if (this.fc.read(bb) == 1) { + return b[0]; + } else { + return -1; + } + } catch (IOException | NonReadableChannelException e) { + return -1; + } + } + } + + /** TODO: 準備中 */ + void close() { + if (!useStdOut && !useStdIn && this.fc != null) { + try { + outputWriteBuffer(); + destroyWriteBuffer(); + this.fc.close(); + } catch (IOException e) { + return; + } + } + } + + /** TODO: 準備中 */ + void flush() { + if (!useStdOut) { + try { + outputWriteBuffer(); + this.fc.force(false); + } catch (IOException e) { + return; + } + } + } + + /** TODO: 準備中 */ + static final int SEEK_SET = 0; + + /** TODO: 準備中 */ + static final int SEEK_CUR = 1; + + /** + * TODO: 準備中 + * + * @param offset TODO: 準備中 + * @param origin TODO: 準備中 + * @return TODO: 準備中 + */ + boolean seek(long offset, int origin) { + if (!useStdOut && !useStdIn) { + try { + switch (origin) { + case FileIO.SEEK_SET: + this.fc.position(offset); + break; + case FileIO.SEEK_CUR: + this.fc.position(this.fc.position() + offset); + break; + default: + return false; + } + } catch (IOException e) { + return false; + } + } + return true; + } + + /** TODO: 準備中 */ + void seekInit() {} + + /** TODO: 準備中 */ + void rewind() { + if (!useStdOut && !useStdIn) { + try { + this.fc.position(0L); + } catch (IOException e) { + return; + } + } + } + + /** TODO: 準備中 */ + void releaseLock() { + if ((!useStdOut || !useStdIn) && this.fl != null) { + try { + this.fl.release(); + } catch (IOException e) { + return; + } + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileStruct.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileStruct.java index c7ea71fc..a89226f2 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileStruct.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileStruct.java @@ -1,61 +1,61 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -/** TODO: 準備中 */ -class FileStruct { - private FileIO fp; - private int count; - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - FileIO getFp() { - return fp; - } - - /** - * TODO: 準備中 - * - * @param fp TODO: 準備中 - */ - void setFp(FileIO fp) { - this.fp = fp; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getCount() { - return count; - } - - /** - * TODO: 準備中 - * - * @param count TODO: 準備中 - */ - void setCount(int count) { - this.count = count; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +/** TODO: 準備中 */ +class FileStruct { + private FileIO fp; + private int count; + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + FileIO getFp() { + return fp; + } + + /** + * TODO: 準備中 + * + * @param fp TODO: 準備中 + */ + void setFp(FileIO fp) { + this.fp = fp; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getCount() { + return count; + } + + /** + * TODO: 準備中 + * + * @param count TODO: 準備中 + */ + void setCount(int count) { + this.count = count; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java index 9231cf6d..2772b5bd 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java @@ -1,719 +1,732 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -/** Represents a result of fetching a data from SQLite tables. */ -class FetchResult { - /** TODO: 準備中 */ - byte[] key; - /** TODO: 準備中 */ - byte[] value; - /** TODO: 準備中 */ - int dupNo; - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param value TODO: 準備中 - * @param dupNo TODO: 準備中 - */ - FetchResult(byte[] key, byte[] value, int dupNo) { - this.key = key; - this.value = value; - this.dupNo = dupNo; - } - - /** - * TODO: 準備中 - * - * @param key TODO: 準備中 - * @param value TODO: 準備中 - */ - FetchResult(byte[] key, byte[] value) { - this.key = key; - this.value = value; - this.dupNo = 0; - } -} - -enum CursorReadOption { - NEXT, - PREV, - FIRST, - LAST -} - -/** Emulates a cursor in SQLite */ -final class IndexedCursor { - /** a cursor to the top direction */ - private Optional backwardCursor; - - /** a cursor to the bottom direction */ - private Optional forwardCursor; - - /** a connection to the SQLite database */ - private Connection conn; - - /** firstFetch is true if and only if the cursor has not read any data yet */ - private boolean firstFetch; - - /** a position in buffers that stores the read data */ - private int cursorIndex; - - /** one of COB_EQ, COB_LT, COB_LE, COB_GT, COB_GE in CobolIndexedFile.java */ - private int comparator; - - /** isDuplicate is true if and only if the table key allows duplicates */ - private boolean isDuplicate; - - /** a key */ - private byte[] key; - - /** forwardBuffer stores data located to the bottom direction from the first read position */ - List forwardBuffer; - - /** bakckwardBuffer stores data located to the first direction from the first read position */ - List backwardBuffer; - - /** the index of the table */ - private int tableIndex; - - private boolean nextCursorFetchKeyDiffrent; - private boolean prevCursorFetchKeyDiffrent; - - /** - * TODO: 準備中 - * - * @param comparator TODO: 準備中 - */ - void setComparator(int comparator) { - this.comparator = comparator; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getComparator() { - return this.comparator; - } - - private IndexedCursor( - Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { - this.conn = conn; - this.key = new byte[key.length]; - System.arraycopy(key, 0, this.key, 0, key.length); - this.cursorIndex = 0; - this.comparator = comparator; - this.firstFetch = true; - this.isDuplicate = isDuplicate; - this.tableIndex = tableIndex; - this.nextCursorFetchKeyDiffrent = false; - this.prevCursorFetchKeyDiffrent = false; - this.forwardBuffer = new ArrayList(); - this.backwardBuffer = new ArrayList(); - } - - /** - * TODO: 準備中 - * - * @param conn TODO: 準備中 - * @param key TODO: 準備中 - * @param tableIndex TODO: 準備中 - * @param isDuplicate TODO: 準備中 - * @param comparator TODO: 準備中 - * @return TODO: 準備中 - */ - static Optional createCursor( - Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { - IndexedCursor cursor = new IndexedCursor(conn, key, tableIndex, isDuplicate, comparator); - cursor.forwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, true); - cursor.backwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, false); - if (!cursor.forwardCursor.isPresent() || !cursor.backwardCursor.isPresent()) { - return Optional.empty(); - } else { - return Optional.of(cursor); - } - } - - Optional reloadCursor() { - if (this.firstFetch) { - return createCursor(this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); - } - - int newComparator; - if (this.comparator == CobolIndexedFile.COB_EQ) { - newComparator = CobolIndexedFile.COB_EQ; - } else { - newComparator = CobolIndexedFile.COB_GE; - } - - FetchResult result; - if (this.cursorIndex < 0) { - result = this.backwardBuffer.get(-this.cursorIndex - 1); - } else { - result = this.forwardBuffer.get(this.cursorIndex); - } - - IndexedCursor newCursor = - new IndexedCursor(this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); - newCursor.forwardCursor = - reloadedCursor( - this.conn, - this.tableIndex, - this.isDuplicate, - newComparator, - result, - this.comparator, - true); - newCursor.backwardCursor = - reloadedCursor( - this.conn, - this.tableIndex, - this.isDuplicate, - newComparator, - result, - this.comparator, - false); - - Optional reFetchResult = - reFetch(this.conn, this.tableIndex, this.isDuplicate, result); - if (reFetchResult.isPresent()) { - FetchResult r = reFetchResult.get(); - newCursor.forwardBuffer.add(r); - newCursor.cursorIndex = 0; - newCursor.firstFetch = false; - } - - if (!newCursor.forwardCursor.isPresent() || !newCursor.backwardCursor.isPresent()) { - return Optional.empty(); - } else { - return Optional.of(newCursor); - } - } - - private static Optional reFetch( - Connection conn, int tableIndex, boolean isDuplicate, FetchResult result) { - final boolean isPrimaryTable = tableIndex == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(tableIndex); - final String query; - if (isPrimaryTable) { - query = String.format("select key, value from %s where key == ?", primaryTable); - } else if (isDuplicate) { - query = - String.format( - "select %s.key, %s.value, %s.dupNo from " - + "%s join %s on %s.value = %s.key " - + "where %s.key == ? and %s.dupNo == ?", - subTable, - primaryTable, - subTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - subTable); - } else { - query = - String.format( - "select %s.key, %s.value from " - + "%s join %s on %s.value = %s.key " - + "where %s.key == ?", - subTable, primaryTable, subTable, primaryTable, subTable, primaryTable, subTable); - } - - try { - PreparedStatement statement = conn.prepareStatement(query); - if (isDuplicate) { - statement.setBytes(1, result.key); - statement.setInt(2, result.dupNo); - } else { - statement.setBytes(1, result.key); - } - statement.setFetchSize(0); - ResultSet rs = statement.executeQuery(); - if (rs.next()) { - byte[] key = rs.getBytes(1); - byte[] value = rs.getBytes(2); - if (isDuplicate) { - int dupNo = rs.getInt(3); - return Optional.of(new FetchResult(key, value, dupNo)); - } else { - return Optional.of(new FetchResult(key, value)); - } - } - return Optional.empty(); - } catch (SQLException e) { - return Optional.empty(); - } - } - - private static Optional reloadedCursor( - Connection conn, - int tableIndex, - boolean isDuplicate, - int comparator, - FetchResult result, - int comparaotr, - boolean forward) { - - final String compOperator = forward ? ">" : "<"; - - final String sortOrder = forward ? "" : "desc"; - - final String queryPreffix = - getReloadCursorQueryPrefix(tableIndex, isDuplicate, compOperator, sortOrder); - - final String querySuffix = getQuerySuffix(tableIndex, isDuplicate, sortOrder); - - final String query = queryPreffix + querySuffix; - - try { - PreparedStatement statement = conn.prepareStatement(query); - if (isDuplicate) { - statement.setBytes(1, result.key); - statement.setInt(2, result.dupNo); - statement.setBytes(3, result.key); - } else { - statement.setBytes(1, result.key); - } - statement.setFetchSize(0); - return Optional.ofNullable(statement.executeQuery()); - } catch (SQLException e) { - return Optional.empty(); - } - } - - private static String getReloadCursorQueryPrefix( - int index, boolean isDuplicate, String compOperator, String sortOrder) { - final boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); - if (isPrimaryTable) { - return String.format( - "select key, value from %s where key %s ? order by key %s", - primaryTable, compOperator, sortOrder); - } else if (isDuplicate) { - return String.format( - "select %s.key, %s.value, %s.dupNo from " - + "%s join %s on %s.value = %s.key " - + "where (%s.key == ? and %s.dupNo %s ?) or %s.key %s ? " - + "order by %s.key %s", - subTable, - primaryTable, - subTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - subTable, - compOperator, - subTable, - compOperator, - subTable, - sortOrder); - } else { - return String.format( - "select %s.key, %s.value from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? " - + "order by %s.key %s", - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); - } - } - - static boolean matchKeyHead(byte[] originalKey, byte[] fetchKey) { - if (originalKey.length > fetchKey.length) { - return false; - } - for (int i = 0; i < originalKey.length; ++i) { - if (originalKey[i] != fetchKey[i]) { - return false; - } - } - return true; - } - - private Optional fetchNext(ResultSet cursor) { - if (this.comparator == CobolIndexedFile.COB_EQ && this.nextCursorFetchKeyDiffrent) { - return Optional.empty(); - } - try { - if (cursor.next()) { - byte[] fetchKey = cursor.getBytes(1); - byte[] fetchValue = cursor.getBytes(2); - if (this.comparator == CobolIndexedFile.COB_EQ && !matchKeyHead(this.key, fetchKey)) { - this.nextCursorFetchKeyDiffrent = true; - return Optional.empty(); - } - FetchResult result; - if (this.isDuplicate) { - int dupNo = cursor.getInt(3); - result = new FetchResult(fetchKey, fetchValue, dupNo); - } else { - result = new FetchResult(fetchKey, fetchValue); - } - return Optional.of(result); - } else { - return Optional.empty(); - } - } catch (SQLException e) { - return Optional.empty(); - } - } - - private Optional fetchPrev(ResultSet cursor) { - if (this.comparator == CobolIndexedFile.COB_EQ && this.prevCursorFetchKeyDiffrent) { - return Optional.empty(); - } - try { - if (cursor.next()) { - byte[] fetchKey = cursor.getBytes(1); - byte[] fetchValue = cursor.getBytes(2); - if (this.comparator == CobolIndexedFile.COB_EQ && !matchKeyHead(this.key, fetchKey)) { - this.prevCursorFetchKeyDiffrent = true; - return Optional.empty(); - } - FetchResult result; - if (this.isDuplicate) { - int dupNo = cursor.getInt(3); - result = new FetchResult(fetchKey, fetchValue, dupNo); - } else { - result = new FetchResult(fetchKey, fetchValue); - } - return Optional.of(result); - } else { - return Optional.empty(); - } - } catch (SQLException e) { - return Optional.empty(); - } - } - - Optional next() { - if (!this.forwardCursor.isPresent()) { - return Optional.empty(); - } - ResultSet cursor = this.forwardCursor.get(); - if (this.firstFetch) { - this.cursorIndex = 0; - Optional fetchResult = this.fetchNext(cursor); - if (this.comparator == CobolIndexedFile.COB_GT) { - while (fetchResult.isPresent()) { - FetchResult result = fetchResult.get(); - if (!matchKeyHead(this.key, result.key)) { - break; - } - fetchResult = this.fetchNext(cursor); - } - } - this.firstFetch = false; - if (fetchResult.isPresent()) { - this.forwardBuffer.add(fetchResult.get()); - } - return fetchResult; - } else if (this.cursorIndex >= this.forwardBuffer.size()) { - return Optional.empty(); - } else if (-this.cursorIndex > this.backwardBuffer.size()) { - ++this.cursorIndex; - return Optional.empty(); - } else if (this.cursorIndex == this.forwardBuffer.size() - 1) { - Optional fetchResult = this.fetchNext(cursor); - if (fetchResult.isPresent()) { - this.forwardBuffer.add(fetchResult.get()); - ++this.cursorIndex; - } - return fetchResult; - } else if (this.cursorIndex < -1) { - ++this.cursorIndex; - return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); - } else { - ++this.cursorIndex; - return Optional.of(forwardBuffer.get(this.cursorIndex)); - } - } - - Optional prev() { - if (!this.backwardCursor.isPresent()) { - return Optional.empty(); - } - ResultSet cursor = this.backwardCursor.get(); - if (this.firstFetch) { - this.cursorIndex = -1; - Optional fetchResult = this.fetchPrev(cursor); - if (fetchResult.isPresent()) { - this.firstFetch = false; - this.backwardBuffer.add(fetchResult.get()); - } - return fetchResult; - } else if (this.cursorIndex > this.forwardBuffer.size()) { - --this.cursorIndex; - return Optional.empty(); - } else if (-this.cursorIndex - 1 >= this.backwardBuffer.size()) { - return Optional.empty(); - } else if (-this.cursorIndex == this.backwardBuffer.size()) { - Optional fetchResult = this.fetchPrev(cursor); - if (fetchResult.isPresent()) { - this.backwardBuffer.add(fetchResult.get()); - --this.cursorIndex; - } - return fetchResult; - } else if (this.cursorIndex > 0) { - --this.cursorIndex; - return Optional.of(forwardBuffer.get(this.cursorIndex)); - } else { - --this.cursorIndex; - return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); - } - } - - void close() { - try { - if (backwardCursor.isPresent()) { - backwardCursor.get().close(); - } - if (forwardCursor.isPresent()) { - forwardCursor.get().close(); - } - } catch (SQLException e) { - return; - } - } - - Optional read(CursorReadOption opt) { - if (opt == CursorReadOption.NEXT) { - return this.next(); - } else if (opt == CursorReadOption.PREV) { - return this.prev(); - } else { - return Optional.empty(); - } - } - - private static Optional getCursor( - Connection conn, - byte[] key, - int index, - boolean isDuplicate, - int comparator, - boolean forward) { - final Optional optionalCompOperator = getCompOperator(comparator, forward); - - if (!optionalCompOperator.isPresent()) { - return Optional.empty(); - } - - final String compOperator = optionalCompOperator.get(); - - final String sortOrder = forward ? "" : "desc"; - - final String queryPreffix = getQueryPrefix(index, compOperator, sortOrder, isDuplicate); - - final String querySuffix = getQuerySuffix(index, isDuplicate, sortOrder); - - final String query = queryPreffix + querySuffix; - - try { - PreparedStatement statement = conn.prepareStatement(query); - statement.setBytes(1, key); - statement.setFetchSize(0); - return Optional.ofNullable(statement.executeQuery()); - } catch (SQLException e) { - return Optional.empty(); - } - } - - private static Optional getCompOperator(int comparator, boolean forward) { - if (comparator == CobolIndexedFile.COB_EQ - || comparator == CobolIndexedFile.COB_GE - || comparator == CobolIndexedFile.COB_LT) { - return Optional.of(forward ? ">=" : "<"); - } else if (comparator == CobolIndexedFile.COB_GT || comparator == CobolIndexedFile.COB_LE) { - return Optional.of(forward ? ">" : "<="); - } else { - return Optional.empty(); - } - } - - private static String getQueryPrefix( - int index, String compOperator, String sortOrder, boolean isDuplicate) { - final boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); - if (isPrimaryTable) { - return String.format( - "select key, value from %s where key %s ? order by key %s", - primaryTable, compOperator, sortOrder); - } else if (isDuplicate) { - return String.format( - "select %s.key, %s.value, %s.dupNo from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? order by %s.key %s", - subTable, - primaryTable, - subTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); - } else { - return String.format( - "select %s.key, %s.value from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? order by %s.key %s", - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); - } - } - - private Optional getCursorForFirstLast( - int index, boolean isDuplicate, CursorReadOption option) { - final String query = getQueryForFirstLast(index, isDuplicate, option); - try { - Statement statement = this.conn.createStatement(); - return Optional.ofNullable(statement.executeQuery(query)); - } catch (SQLException e) { - return Optional.empty(); - } - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - boolean moveToFirst() { - Optional cursor = - getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.FIRST); - if (!cursor.isPresent()) { - return false; - } - this.forwardCursor = cursor; - this.backwardCursor = Optional.empty(); - this.firstFetch = true; - this.cursorIndex = 0; - return true; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - boolean moveToLast() { - Optional cursor = - getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.LAST); - if (!cursor.isPresent()) { - return false; - } - this.backwardCursor = cursor; - this.forwardCursor = Optional.empty(); - this.firstFetch = true; - this.cursorIndex = 0; - return true; - } - - private static String getQueryForFirstLast( - int index, boolean isDuplicate, CursorReadOption option) { - final String sortOrder; - if (option == CursorReadOption.FIRST) { - sortOrder = ""; - } else { - sortOrder = "desc"; - } - - boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); - - if (isPrimaryTable) { - return String.format("select key, value from %s order by key %s", primaryTable, sortOrder); - } else { - String optionColumn; - if (isDuplicate) { - optionColumn = String.format(", %s.dupNo", subTable); - } else { - optionColumn = ""; - } - String query = - String.format( - "select %s.key, %s.value %s from " - + "%s join %s on %s.value = %s.key " - + "order by %s.key %s", - subTable, - primaryTable, - optionColumn, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - sortOrder); - if (isDuplicate) { - return query + String.format(", dupNo %s", sortOrder); - } else { - return query; - } - } - } - - private static String getQuerySuffix(int index, boolean isDuplicate, String sortOrder) { - if (isDuplicate) { - final String tableName = CobolIndexedFile.getTableName(index); - return String.format(", %s.dupNo %s", tableName, sortOrder); - } else { - return ""; - } - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +/** Represents a result of fetching a data from SQLite tables. */ +class FetchResult { + /** TODO: 準備中 */ + byte[] key; + + /** TODO: 準備中 */ + byte[] value; + + /** TODO: 準備中 */ + int dupNo; + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param value TODO: 準備中 + * @param dupNo TODO: 準備中 + */ + FetchResult(byte[] key, byte[] value, int dupNo) { + this.key = key; + this.value = value; + this.dupNo = dupNo; + } + + /** + * TODO: 準備中 + * + * @param key TODO: 準備中 + * @param value TODO: 準備中 + */ + FetchResult(byte[] key, byte[] value) { + this.key = key; + this.value = value; + this.dupNo = 0; + } +} + +enum CursorReadOption { + NEXT, + PREV, + FIRST, + LAST +} + +/** Emulates a cursor in SQLite */ +final class IndexedCursor { + /** a cursor to the top direction */ + private Optional backwardCursor; + + /** a cursor to the bottom direction */ + private Optional forwardCursor; + + /** a connection to the SQLite database */ + private Connection conn; + + /** firstFetch is true if and only if the cursor has not read any data yet */ + private boolean firstFetch; + + /** a position in buffers that stores the read data */ + private int cursorIndex; + + /** one of COB_EQ, COB_LT, COB_LE, COB_GT, COB_GE in CobolIndexedFile.java */ + private int comparator; + + /** isDuplicate is true if and only if the table key allows duplicates */ + private boolean isDuplicate; + + /** a key */ + private byte[] key; + + /** forwardBuffer stores data located to the bottom direction from the first read position */ + List forwardBuffer; + + /** bakckwardBuffer stores data located to the first direction from the first read position */ + List backwardBuffer; + + /** the index of the table */ + private int tableIndex; + + private boolean nextCursorFetchKeyDiffrent; + private boolean prevCursorFetchKeyDiffrent; + + /** + * TODO: 準備中 + * + * @param comparator TODO: 準備中 + */ + void setComparator(int comparator) { + this.comparator = comparator; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getComparator() { + return this.comparator; + } + + private IndexedCursor( + Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { + this.conn = conn; + this.key = new byte[key.length]; + System.arraycopy(key, 0, this.key, 0, key.length); + this.cursorIndex = 0; + this.comparator = comparator; + this.firstFetch = true; + this.isDuplicate = isDuplicate; + this.tableIndex = tableIndex; + this.nextCursorFetchKeyDiffrent = false; + this.prevCursorFetchKeyDiffrent = false; + this.forwardBuffer = new ArrayList(); + this.backwardBuffer = new ArrayList(); + } + + /** + * TODO: 準備中 + * + * @param conn TODO: 準備中 + * @param key TODO: 準備中 + * @param tableIndex TODO: 準備中 + * @param isDuplicate TODO: 準備中 + * @param comparator TODO: 準備中 + * @return TODO: 準備中 + */ + static Optional createCursor( + Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { + IndexedCursor cursor = new IndexedCursor(conn, key, tableIndex, isDuplicate, comparator); + cursor.forwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, true); + cursor.backwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, false); + if (!cursor.forwardCursor.isPresent() || !cursor.backwardCursor.isPresent()) { + return Optional.empty(); + } else { + return Optional.of(cursor); + } + } + + Optional reloadCursor() { + if (this.firstFetch) { + return createCursor( + this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); + } + + int newComparator; + if (this.comparator == CobolIndexedFile.COB_EQ) { + newComparator = CobolIndexedFile.COB_EQ; + } else { + newComparator = CobolIndexedFile.COB_GE; + } + + FetchResult result; + if (this.cursorIndex < 0) { + result = this.backwardBuffer.get(-this.cursorIndex - 1); + } else { + result = this.forwardBuffer.get(this.cursorIndex); + } + + IndexedCursor newCursor = + new IndexedCursor( + this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); + newCursor.forwardCursor = + reloadedCursor( + this.conn, + this.tableIndex, + this.isDuplicate, + newComparator, + result, + this.comparator, + true); + newCursor.backwardCursor = + reloadedCursor( + this.conn, + this.tableIndex, + this.isDuplicate, + newComparator, + result, + this.comparator, + false); + + Optional reFetchResult = + reFetch(this.conn, this.tableIndex, this.isDuplicate, result); + if (reFetchResult.isPresent()) { + FetchResult r = reFetchResult.get(); + newCursor.forwardBuffer.add(r); + newCursor.cursorIndex = 0; + newCursor.firstFetch = false; + } + + if (!newCursor.forwardCursor.isPresent() || !newCursor.backwardCursor.isPresent()) { + return Optional.empty(); + } else { + return Optional.of(newCursor); + } + } + + private static Optional reFetch( + Connection conn, int tableIndex, boolean isDuplicate, FetchResult result) { + final boolean isPrimaryTable = tableIndex == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(tableIndex); + final String query; + if (isPrimaryTable) { + query = String.format("select key, value from %s where key == ?", primaryTable); + } else if (isDuplicate) { + query = + String.format( + "select %s.key, %s.value, %s.dupNo from " + + "%s join %s on %s.value = %s.key " + + "where %s.key == ? and %s.dupNo == ?", + subTable, + primaryTable, + subTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + subTable); + } else { + query = + String.format( + "select %s.key, %s.value from " + + "%s join %s on %s.value = %s.key " + + "where %s.key == ?", + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable); + } + + try { + PreparedStatement statement = conn.prepareStatement(query); + if (isDuplicate) { + statement.setBytes(1, result.key); + statement.setInt(2, result.dupNo); + } else { + statement.setBytes(1, result.key); + } + statement.setFetchSize(0); + ResultSet rs = statement.executeQuery(); + if (rs.next()) { + byte[] key = rs.getBytes(1); + byte[] value = rs.getBytes(2); + if (isDuplicate) { + int dupNo = rs.getInt(3); + return Optional.of(new FetchResult(key, value, dupNo)); + } else { + return Optional.of(new FetchResult(key, value)); + } + } + return Optional.empty(); + } catch (SQLException e) { + return Optional.empty(); + } + } + + private static Optional reloadedCursor( + Connection conn, + int tableIndex, + boolean isDuplicate, + int comparator, + FetchResult result, + int comparaotr, + boolean forward) { + + final String compOperator = forward ? ">" : "<"; + + final String sortOrder = forward ? "" : "desc"; + + final String queryPreffix = + getReloadCursorQueryPrefix(tableIndex, isDuplicate, compOperator, sortOrder); + + final String querySuffix = getQuerySuffix(tableIndex, isDuplicate, sortOrder); + + final String query = queryPreffix + querySuffix; + + try { + PreparedStatement statement = conn.prepareStatement(query); + if (isDuplicate) { + statement.setBytes(1, result.key); + statement.setInt(2, result.dupNo); + statement.setBytes(3, result.key); + } else { + statement.setBytes(1, result.key); + } + statement.setFetchSize(0); + return Optional.ofNullable(statement.executeQuery()); + } catch (SQLException e) { + return Optional.empty(); + } + } + + private static String getReloadCursorQueryPrefix( + int index, boolean isDuplicate, String compOperator, String sortOrder) { + final boolean isPrimaryTable = index == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(index); + if (isPrimaryTable) { + return String.format( + "select key, value from %s where key %s ? order by key %s", + primaryTable, compOperator, sortOrder); + } else if (isDuplicate) { + return String.format( + "select %s.key, %s.value, %s.dupNo from " + + "%s join %s on %s.value = %s.key " + + "where (%s.key == ? and %s.dupNo %s ?) or %s.key %s ? " + + "order by %s.key %s", + subTable, + primaryTable, + subTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + subTable, + compOperator, + subTable, + compOperator, + subTable, + sortOrder); + } else { + return String.format( + "select %s.key, %s.value from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? " + + "order by %s.key %s", + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable, + sortOrder); + } + } + + static boolean matchKeyHead(byte[] originalKey, byte[] fetchKey) { + if (originalKey.length > fetchKey.length) { + return false; + } + for (int i = 0; i < originalKey.length; ++i) { + if (originalKey[i] != fetchKey[i]) { + return false; + } + } + return true; + } + + private Optional fetchNext(ResultSet cursor) { + if (this.comparator == CobolIndexedFile.COB_EQ && this.nextCursorFetchKeyDiffrent) { + return Optional.empty(); + } + try { + if (cursor.next()) { + byte[] fetchKey = cursor.getBytes(1); + byte[] fetchValue = cursor.getBytes(2); + if (this.comparator == CobolIndexedFile.COB_EQ + && !matchKeyHead(this.key, fetchKey)) { + this.nextCursorFetchKeyDiffrent = true; + return Optional.empty(); + } + FetchResult result; + if (this.isDuplicate) { + int dupNo = cursor.getInt(3); + result = new FetchResult(fetchKey, fetchValue, dupNo); + } else { + result = new FetchResult(fetchKey, fetchValue); + } + return Optional.of(result); + } else { + return Optional.empty(); + } + } catch (SQLException e) { + return Optional.empty(); + } + } + + private Optional fetchPrev(ResultSet cursor) { + if (this.comparator == CobolIndexedFile.COB_EQ && this.prevCursorFetchKeyDiffrent) { + return Optional.empty(); + } + try { + if (cursor.next()) { + byte[] fetchKey = cursor.getBytes(1); + byte[] fetchValue = cursor.getBytes(2); + if (this.comparator == CobolIndexedFile.COB_EQ + && !matchKeyHead(this.key, fetchKey)) { + this.prevCursorFetchKeyDiffrent = true; + return Optional.empty(); + } + FetchResult result; + if (this.isDuplicate) { + int dupNo = cursor.getInt(3); + result = new FetchResult(fetchKey, fetchValue, dupNo); + } else { + result = new FetchResult(fetchKey, fetchValue); + } + return Optional.of(result); + } else { + return Optional.empty(); + } + } catch (SQLException e) { + return Optional.empty(); + } + } + + Optional next() { + if (!this.forwardCursor.isPresent()) { + return Optional.empty(); + } + ResultSet cursor = this.forwardCursor.get(); + if (this.firstFetch) { + this.cursorIndex = 0; + Optional fetchResult = this.fetchNext(cursor); + if (this.comparator == CobolIndexedFile.COB_GT) { + while (fetchResult.isPresent()) { + FetchResult result = fetchResult.get(); + if (!matchKeyHead(this.key, result.key)) { + break; + } + fetchResult = this.fetchNext(cursor); + } + } + this.firstFetch = false; + if (fetchResult.isPresent()) { + this.forwardBuffer.add(fetchResult.get()); + } + return fetchResult; + } else if (this.cursorIndex >= this.forwardBuffer.size()) { + return Optional.empty(); + } else if (-this.cursorIndex > this.backwardBuffer.size()) { + ++this.cursorIndex; + return Optional.empty(); + } else if (this.cursorIndex == this.forwardBuffer.size() - 1) { + Optional fetchResult = this.fetchNext(cursor); + if (fetchResult.isPresent()) { + this.forwardBuffer.add(fetchResult.get()); + ++this.cursorIndex; + } + return fetchResult; + } else if (this.cursorIndex < -1) { + ++this.cursorIndex; + return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); + } else { + ++this.cursorIndex; + return Optional.of(forwardBuffer.get(this.cursorIndex)); + } + } + + Optional prev() { + if (!this.backwardCursor.isPresent()) { + return Optional.empty(); + } + ResultSet cursor = this.backwardCursor.get(); + if (this.firstFetch) { + this.cursorIndex = -1; + Optional fetchResult = this.fetchPrev(cursor); + if (fetchResult.isPresent()) { + this.firstFetch = false; + this.backwardBuffer.add(fetchResult.get()); + } + return fetchResult; + } else if (this.cursorIndex > this.forwardBuffer.size()) { + --this.cursorIndex; + return Optional.empty(); + } else if (-this.cursorIndex - 1 >= this.backwardBuffer.size()) { + return Optional.empty(); + } else if (-this.cursorIndex == this.backwardBuffer.size()) { + Optional fetchResult = this.fetchPrev(cursor); + if (fetchResult.isPresent()) { + this.backwardBuffer.add(fetchResult.get()); + --this.cursorIndex; + } + return fetchResult; + } else if (this.cursorIndex > 0) { + --this.cursorIndex; + return Optional.of(forwardBuffer.get(this.cursorIndex)); + } else { + --this.cursorIndex; + return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); + } + } + + void close() { + try { + if (backwardCursor.isPresent()) { + backwardCursor.get().close(); + } + if (forwardCursor.isPresent()) { + forwardCursor.get().close(); + } + } catch (SQLException e) { + return; + } + } + + Optional read(CursorReadOption opt) { + if (opt == CursorReadOption.NEXT) { + return this.next(); + } else if (opt == CursorReadOption.PREV) { + return this.prev(); + } else { + return Optional.empty(); + } + } + + private static Optional getCursor( + Connection conn, + byte[] key, + int index, + boolean isDuplicate, + int comparator, + boolean forward) { + final Optional optionalCompOperator = getCompOperator(comparator, forward); + + if (!optionalCompOperator.isPresent()) { + return Optional.empty(); + } + + final String compOperator = optionalCompOperator.get(); + + final String sortOrder = forward ? "" : "desc"; + + final String queryPreffix = getQueryPrefix(index, compOperator, sortOrder, isDuplicate); + + final String querySuffix = getQuerySuffix(index, isDuplicate, sortOrder); + + final String query = queryPreffix + querySuffix; + + try { + PreparedStatement statement = conn.prepareStatement(query); + statement.setBytes(1, key); + statement.setFetchSize(0); + return Optional.ofNullable(statement.executeQuery()); + } catch (SQLException e) { + return Optional.empty(); + } + } + + private static Optional getCompOperator(int comparator, boolean forward) { + if (comparator == CobolIndexedFile.COB_EQ + || comparator == CobolIndexedFile.COB_GE + || comparator == CobolIndexedFile.COB_LT) { + return Optional.of(forward ? ">=" : "<"); + } else if (comparator == CobolIndexedFile.COB_GT || comparator == CobolIndexedFile.COB_LE) { + return Optional.of(forward ? ">" : "<="); + } else { + return Optional.empty(); + } + } + + private static String getQueryPrefix( + int index, String compOperator, String sortOrder, boolean isDuplicate) { + final boolean isPrimaryTable = index == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(index); + if (isPrimaryTable) { + return String.format( + "select key, value from %s where key %s ? order by key %s", + primaryTable, compOperator, sortOrder); + } else if (isDuplicate) { + return String.format( + "select %s.key, %s.value, %s.dupNo from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? order by %s.key %s", + subTable, + primaryTable, + subTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable, + sortOrder); + } else { + return String.format( + "select %s.key, %s.value from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? order by %s.key %s", + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable, + sortOrder); + } + } + + private Optional getCursorForFirstLast( + int index, boolean isDuplicate, CursorReadOption option) { + final String query = getQueryForFirstLast(index, isDuplicate, option); + try { + Statement statement = this.conn.createStatement(); + return Optional.ofNullable(statement.executeQuery(query)); + } catch (SQLException e) { + return Optional.empty(); + } + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + boolean moveToFirst() { + Optional cursor = + getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.FIRST); + if (!cursor.isPresent()) { + return false; + } + this.forwardCursor = cursor; + this.backwardCursor = Optional.empty(); + this.firstFetch = true; + this.cursorIndex = 0; + return true; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + boolean moveToLast() { + Optional cursor = + getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.LAST); + if (!cursor.isPresent()) { + return false; + } + this.backwardCursor = cursor; + this.forwardCursor = Optional.empty(); + this.firstFetch = true; + this.cursorIndex = 0; + return true; + } + + private static String getQueryForFirstLast( + int index, boolean isDuplicate, CursorReadOption option) { + final String sortOrder; + if (option == CursorReadOption.FIRST) { + sortOrder = ""; + } else { + sortOrder = "desc"; + } + + boolean isPrimaryTable = index == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(index); + + if (isPrimaryTable) { + return String.format( + "select key, value from %s order by key %s", primaryTable, sortOrder); + } else { + String optionColumn; + if (isDuplicate) { + optionColumn = String.format(", %s.dupNo", subTable); + } else { + optionColumn = ""; + } + String query = + String.format( + "select %s.key, %s.value %s from " + + "%s join %s on %s.value = %s.key " + + "order by %s.key %s", + subTable, + primaryTable, + optionColumn, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + sortOrder); + if (isDuplicate) { + return query + String.format(", dupNo %s", sortOrder); + } else { + return query; + } + } + } + + private static String getQuerySuffix(int index, boolean isDuplicate, String sortOrder) { + if (isDuplicate) { + final String tableName = CobolIndexedFile.getTableName(index); + return String.format(", %s.dupNo %s", tableName, sortOrder); + } else { + return ""; + } + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedFile.java index e9f27450..5e8c2ab9 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedFile.java @@ -1,57 +1,70 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import java.sql.Connection; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; - -/** TODO: 準備中 */ -class IndexedFile { - /** TODO: 準備中 */ - int key_index; - /** TODO: 準備中 */ - CobolDataStorage last_key; - /** TODO: 準備中 */ - CobolDataStorage temp_key; - /** TODO: 準備中 */ - Connection connection; - /** TODO: 準備中 */ - byte[] key; - /** TODO: 準備中 */ - byte[] data; - /** TODO: 準備中 */ - byte[][] last_readkey; - /** TODO: 準備中 */ - int[] last_dupno; - /** TODO: 準備中 */ - int[] rewrite_sec_key; - - /** TODO: 準備中 */ - String filename; - /** TODO: 準備中 */ - Object record_lock; - /** TODO: 準備中 */ - boolean write_cursor_open; - /** TODO: 準備中 */ - int lock_id; - /** TODO: 準備中 */ - boolean record_locked; - /** TODO: 準備中 */ - int filenamelen; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import java.sql.Connection; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; + +/** TODO: 準備中 */ +class IndexedFile { + /** TODO: 準備中 */ + int key_index; + + /** TODO: 準備中 */ + CobolDataStorage last_key; + + /** TODO: 準備中 */ + CobolDataStorage temp_key; + + /** TODO: 準備中 */ + Connection connection; + + /** TODO: 準備中 */ + byte[] key; + + /** TODO: 準備中 */ + byte[] data; + + /** TODO: 準備中 */ + byte[][] last_readkey; + + /** TODO: 準備中 */ + int[] last_dupno; + + /** TODO: 準備中 */ + int[] rewrite_sec_key; + + /** TODO: 準備中 */ + String filename; + + /** TODO: 準備中 */ + Object record_lock; + + /** TODO: 準備中 */ + boolean write_cursor_open; + + /** TODO: 準備中 */ + int lock_id; + + /** TODO: 準備中 */ + boolean record_locked; + + /** TODO: 準備中 */ + int filenamelen; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/KeyComponent.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/KeyComponent.java index 3cdbf53c..fe0c566d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/KeyComponent.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/KeyComponent.java @@ -1,29 +1,30 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; - -/** TODO: 準備中 */ -public class KeyComponent { - /** TODO: 準備中 */ - public AbstractCobolField field; - /** TODO: 準備中 */ - public int rb; -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; + +/** TODO: 準備中 */ +public class KeyComponent { + /** TODO: 準備中 */ + public AbstractCobolField field; + + /** TODO: 準備中 */ + public int rb; +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/Linage.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/Linage.java index bdea17c4..8d26279c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/Linage.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/Linage.java @@ -1,196 +1,196 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; - -/** TODO: 準備中 */ -public class Linage { - private AbstractCobolField linage; - private AbstractCobolField linageCtr; - private AbstractCobolField latfoot; - private AbstractCobolField lattop; - private AbstractCobolField latbot; - private int linLines; - private int linFoot; - private int linTop; - private int linBot; - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getLinage() { - return linage; - } - - /** - * TODO: 準備中 - * - * @param linage TODO: 準備中 - */ - public void setLinage(AbstractCobolField linage) { - this.linage = linage; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getLinageCtr() { - return linageCtr; - } - - /** - * TODO: 準備中 - * - * @param linageCtr TODO: 準備中 - */ - public void setLinageCtr(AbstractCobolField linageCtr) { - this.linageCtr = linageCtr; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getLatfoot() { - return latfoot; - } - - /** - * TODO: 準備中 - * - * @param latfoot TODO: 準備中 - */ - public void setLatfoot(AbstractCobolField latfoot) { - this.latfoot = latfoot; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getLattop() { - return lattop; - } - - /** - * TODO: 準備中 - * - * @param lattop TODO: 準備中 - */ - public void setLattop(AbstractCobolField lattop) { - this.lattop = lattop; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - AbstractCobolField getLatbot() { - return latbot; - } - - /** - * TODO: 準備中 - * - * @param latbot TODO: 準備中 - */ - public void setLatbot(AbstractCobolField latbot) { - this.latbot = latbot; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getLinLines() { - return linLines; - } - - /** - * TODO: 準備中 - * - * @param linLines TODO: 準備中 - */ - public void setLinLines(int linLines) { - this.linLines = linLines; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getLinFoot() { - return linFoot; - } - - /** - * TODO: 準備中 - * - * @param linFoot TODO: 準備中 - */ - public void setLinFoot(int linFoot) { - this.linFoot = linFoot; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getLinTop() { - return linTop; - } - - /** - * TODO: 準備中 - * - * @param linTop TODO: 準備中 - */ - public void setLinTop(int linTop) { - this.linTop = linTop; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getLinBot() { - return linBot; - } - - /** - * TODO: 準備中 - * - * @param linBot TODO: 準備中 - */ - public void setLinBot(int linBot) { - this.linBot = linBot; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; + +/** TODO: 準備中 */ +public class Linage { + private AbstractCobolField linage; + private AbstractCobolField linageCtr; + private AbstractCobolField latfoot; + private AbstractCobolField lattop; + private AbstractCobolField latbot; + private int linLines; + private int linFoot; + private int linTop; + private int linBot; + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getLinage() { + return linage; + } + + /** + * TODO: 準備中 + * + * @param linage TODO: 準備中 + */ + public void setLinage(AbstractCobolField linage) { + this.linage = linage; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getLinageCtr() { + return linageCtr; + } + + /** + * TODO: 準備中 + * + * @param linageCtr TODO: 準備中 + */ + public void setLinageCtr(AbstractCobolField linageCtr) { + this.linageCtr = linageCtr; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getLatfoot() { + return latfoot; + } + + /** + * TODO: 準備中 + * + * @param latfoot TODO: 準備中 + */ + public void setLatfoot(AbstractCobolField latfoot) { + this.latfoot = latfoot; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getLattop() { + return lattop; + } + + /** + * TODO: 準備中 + * + * @param lattop TODO: 準備中 + */ + public void setLattop(AbstractCobolField lattop) { + this.lattop = lattop; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + AbstractCobolField getLatbot() { + return latbot; + } + + /** + * TODO: 準備中 + * + * @param latbot TODO: 準備中 + */ + public void setLatbot(AbstractCobolField latbot) { + this.latbot = latbot; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getLinLines() { + return linLines; + } + + /** + * TODO: 準備中 + * + * @param linLines TODO: 準備中 + */ + public void setLinLines(int linLines) { + this.linLines = linLines; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getLinFoot() { + return linFoot; + } + + /** + * TODO: 準備中 + * + * @param linFoot TODO: 準備中 + */ + public void setLinFoot(int linFoot) { + this.linFoot = linFoot; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getLinTop() { + return linTop; + } + + /** + * TODO: 準備中 + * + * @param linTop TODO: 準備中 + */ + public void setLinTop(int linTop) { + this.linTop = linTop; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getLinBot() { + return linBot; + } + + /** + * TODO: 準備中 + * + * @param linBot TODO: 準備中 + */ + public void setLinBot(int linBot) { + this.linBot = linBot; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/MemoryStruct.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/MemoryStruct.java index 4aea50e6..f754e425 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/MemoryStruct.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/MemoryStruct.java @@ -1,86 +1,86 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.file; - -/** TODO: 準備中 */ -class MemoryStruct { - private CobolItem first; - private CobolItem last; - private int count; - - /** TODO: 準備中 */ - MemoryStruct() { - this.first = null; - this.last = null; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolItem getFirst() { - return first; - } - - /** - * TODO: 準備中 - * - * @param first TODO: 準備中 - */ - void setFirst(CobolItem first) { - this.first = first; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - CobolItem getLast() { - return last; - } - - /** - * TODO: 準備中 - * - * @param last TODO: 準備中 - */ - void setLast(CobolItem last) { - this.last = last; - } - - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - int getCount() { - return count; - } - - /** - * TODO: 準備中 - * - * @param count TODO: 準備中 - */ - void setCount(int count) { - this.count = count; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.file; + +/** TODO: 準備中 */ +class MemoryStruct { + private CobolItem first; + private CobolItem last; + private int count; + + /** TODO: 準備中 */ + MemoryStruct() { + this.first = null; + this.last = null; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolItem getFirst() { + return first; + } + + /** + * TODO: 準備中 + * + * @param first TODO: 準備中 + */ + void setFirst(CobolItem first) { + this.first = first; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + CobolItem getLast() { + return last; + } + + /** + * TODO: 準備中 + * + * @param last TODO: 準備中 + */ + void setLast(CobolItem last) { + this.last = last; + } + + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + int getCount() { + return count; + } + + /** + * TODO: 準備中 + * + * @param count TODO: 準備中 + */ + void setCount(int count) { + this.count = count; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java index 6aa377a2..bd6a7fbd 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java @@ -1,327 +1,330 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package jp.osscons.opensourcecobol.libcobj.termio; - -import java.io.PrintStream; -import java.nio.ByteBuffer; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Scanner; -import jp.osscons.opensourcecobol.libcobj.common.CobolModule; -import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; -import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; -import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; -import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; -import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; - -/** DISPLAY文やACCEPT文に関するメソッドを実装するクラス */ -public class CobolTerminal { - - /** TDOD: 準備中 */ - private static int commlncnt = 0; - - /** TDOD: 準備中 */ - private static byte[] commlnptr = null; - - /** - * 標準出力または標準エラー出力にデータを出力する - * - * @param dispStdout trueなら標準出力に,それ以外は標準エラー出力に出力する - * @param newline trueなら出力後に改行しない,それ以外の場合は改行する - * @param fields 出力するCOBOL変数(可変長) - */ - public static void display(boolean dispStdout, boolean newline, AbstractCobolField... fields) { - PrintStream stream = dispStdout ? System.out : System.err; - for (AbstractCobolField field : fields) { - CobolFieldAttribute attr = field.getAttribute(); - if (attr.isTypeNumericBinary() && CobolModule.getCurrentModule().flag_pretty_display == 0) { - stream.print(field); - } else if (attr.isTypeNumeric()) { - stream.print(field); - } else { - displayAlnum(field, stream); - } - } - if (newline) { - stream.println(""); - } - } - - private static void displayAlnum(AbstractCobolField f, PrintStream stream) { - CobolDataStorage storage = f.getDataStorage(); - stream.write(storage.getRefOfData(), storage.getIndex(), f.getSize()); - } - - /** - * 標準出力または標準エラー出力にデータを出力する - * - * @param outorerr 0なら標準出力に,それ以外は標準エラー出力に出力する. - * @param newline 0なら出力後に改行しない,それ以外の場合は改行する - * @param varcnt 出力するCOBOL変数の数 - * @param fields 出力するCOBOL変数(可変長) - */ - public static void display(int outorerr, int newline, int varcnt, AbstractCobolField... fields) { - PrintStream stream = outorerr == 0 ? System.out : System.err; - for (AbstractCobolField field : fields) { - CobolFieldAttribute attr = field.getAttribute(); - if (attr.isTypeNumericBinary() && CobolModule.getCurrentModule().flag_pretty_display == 0) { - stream.print(field); - } else if (attr.isTypeNumeric()) { - stream.print(field); - } else { - displayAlnum(field, stream); - } - } - if (newline == 1) { - stream.println(""); - } - } - - private static Scanner scan = null; - - /** - * 標準入力からデータを受け取る - * - * @param f TODO: 準備中 - */ - public static void accept(AbstractCobolField f) { - try { - if (scan == null) { - scan = new Scanner(System.in); - } - - String input = scan.nextLine(); - - // PIC X(n)型のデータに変換 - AbstractCobolField field = CobolFieldFactory.makeCobolField(input); - - if (f.getAttribute().isTypeNumericDisplay() && field.getSize() > f.getSize()) { - field.setSize(f.getSize()); - } - - f.moveFrom(field); - } catch (Exception e) { - e.printStackTrace(); - } - } - - // Time - - /** - * libcob/common.c job_or_current_localtime - * - * @return TODO: 準備中 - */ - private static LocalDateTime jobOrCurrentLocalTime() { - if (CobolUtil.cobLocalTm != null) { - return CobolUtil.cobLocalTm; - } else { - return LocalDateTime.now(); - } - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptDate(AbstractCobolField f) { - LocalDateTime date = jobOrCurrentLocalTime(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMdd"); - f.memcpy(date.format(formatter)); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptDate_yyyymmdd(AbstractCobolField f) { - LocalDateTime date = jobOrCurrentLocalTime(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); - f.memcpy(date.format(formatter)); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptDay(AbstractCobolField f) { - LocalDateTime date = jobOrCurrentLocalTime(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyDDD"); - f.memcpy(date.format(formatter)); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptDay_yyyyddd(AbstractCobolField f) { - LocalDateTime date = jobOrCurrentLocalTime(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyDDD"); - f.memcpy(date.format(formatter)); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptDayOfWeek(AbstractCobolField f) { - LocalDateTime date = jobOrCurrentLocalTime(); - f.memcpy(String.format("%d", date.getDayOfWeek().getValue())); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptTime(AbstractCobolField f) { - LocalDateTime date = LocalDateTime.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSS"); - f.memcpy(date.format(formatter)); - } - - // Environment - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void displayEnvironment(AbstractCobolField f) { - CobolUtil.cobLocalEnv = f.fieldToString(); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void displayEnvValue(AbstractCobolField f) { - if (CobolUtil.cobLocalEnv == null || CobolUtil.cobLocalEnv.equals("")) { - CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_DISPLAY); - return; - } - CobolUtil.setEnv(CobolUtil.cobLocalEnv, f.getString()); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptEnvironment(AbstractCobolField f) { - String p = null; - if (CobolUtil.cobLocalEnv != null) { - p = CobolUtil.getEnv(CobolUtil.cobLocalEnv); - } - - if (p == null) { - // TODO setExceptionは暫定実装 - CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); - p = " "; - } - - AbstractCobolField src = CobolFieldFactory.makeCobolField(p); - // TODO hankakuMoveFromは暫定実装 - f.hankakuMoveFrom(src); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void displayCommandLine(AbstractCobolField f) { - CobolTerminal.commlnptr = new byte[f.getSize()]; - CobolTerminal.commlncnt = f.getSize(); - for (int i = 0; i < CobolTerminal.commlncnt; ++i) { - CobolTerminal.commlnptr[i] = f.getDataStorage().getByte(i); - } - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptCommandLine(AbstractCobolField f) { - if (CobolTerminal.commlncnt != 0) { - f.memcpy(CobolTerminal.commlnptr, CobolTerminal.commlncnt); - return; - } - - f.memcpy(String.join(" ", CobolUtil.commandLineArgs)); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void displayArgNumber(AbstractCobolField f) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 9, 0, 0, null); - byte[] data = new byte[4]; - AbstractCobolField temp = - CobolFieldFactory.makeCobolField(data.length, new CobolDataStorage(data), attr); - temp.moveFrom(f); - int n = ByteBuffer.wrap(data).getInt(); - if (n < 0 || n > CobolUtil.commandLineArgs.length) { - CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_DISPLAY); - return; - } - CobolUtil.currentArgIndex = n; - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptArgNumber(AbstractCobolField f) { - CobolFieldAttribute attr = - new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 9, 0, 0, null); - byte[] data = new byte[4]; - ByteBuffer.wrap(data).putInt(CobolUtil.commandLineArgs.length); - AbstractCobolField temp = - CobolFieldFactory.makeCobolField(data.length, new CobolDataStorage(data), attr); - f.moveFrom(temp); - } - - /** - * TODO: 準備中 - * - * @param f TODO: 準備中 - */ - public static void acceptArgValue(AbstractCobolField f) { - if (CobolUtil.currentArgIndex > CobolUtil.commandLineArgs.length) { - CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); - return; - } - f.memcpy(CobolUtil.commandLineArgs[CobolUtil.currentArgIndex - 1]); - CobolUtil.currentArgIndex++; - } -} +/* + * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3.0, + * or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package jp.osscons.opensourcecobol.libcobj.termio; + +import java.io.PrintStream; +import java.nio.ByteBuffer; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Scanner; +import jp.osscons.opensourcecobol.libcobj.common.CobolModule; +import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; +import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; +import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldAttribute; +import jp.osscons.opensourcecobol.libcobj.data.CobolFieldFactory; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionId; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo; + +/** DISPLAY文やACCEPT文に関するメソッドを実装するクラス */ +public class CobolTerminal { + + /** TDOD: 準備中 */ + private static int commlncnt = 0; + + /** TDOD: 準備中 */ + private static byte[] commlnptr = null; + + /** + * 標準出力または標準エラー出力にデータを出力する + * + * @param dispStdout trueなら標準出力に,それ以外は標準エラー出力に出力する + * @param newline trueなら出力後に改行しない,それ以外の場合は改行する + * @param fields 出力するCOBOL変数(可変長) + */ + public static void display(boolean dispStdout, boolean newline, AbstractCobolField... fields) { + PrintStream stream = dispStdout ? System.out : System.err; + for (AbstractCobolField field : fields) { + CobolFieldAttribute attr = field.getAttribute(); + if (attr.isTypeNumericBinary() + && CobolModule.getCurrentModule().flag_pretty_display == 0) { + stream.print(field); + } else if (attr.isTypeNumeric()) { + stream.print(field); + } else { + displayAlnum(field, stream); + } + } + if (newline) { + stream.println(""); + } + } + + private static void displayAlnum(AbstractCobolField f, PrintStream stream) { + CobolDataStorage storage = f.getDataStorage(); + stream.write(storage.getRefOfData(), storage.getIndex(), f.getSize()); + } + + /** + * 標準出力または標準エラー出力にデータを出力する + * + * @param outorerr 0なら標準出力に,それ以外は標準エラー出力に出力する. + * @param newline 0なら出力後に改行しない,それ以外の場合は改行する + * @param varcnt 出力するCOBOL変数の数 + * @param fields 出力するCOBOL変数(可変長) + */ + public static void display( + int outorerr, int newline, int varcnt, AbstractCobolField... fields) { + PrintStream stream = outorerr == 0 ? System.out : System.err; + for (AbstractCobolField field : fields) { + CobolFieldAttribute attr = field.getAttribute(); + if (attr.isTypeNumericBinary() + && CobolModule.getCurrentModule().flag_pretty_display == 0) { + stream.print(field); + } else if (attr.isTypeNumeric()) { + stream.print(field); + } else { + displayAlnum(field, stream); + } + } + if (newline == 1) { + stream.println(""); + } + } + + private static Scanner scan = null; + + /** + * 標準入力からデータを受け取る + * + * @param f TODO: 準備中 + */ + public static void accept(AbstractCobolField f) { + try { + if (scan == null) { + scan = new Scanner(System.in); + } + + String input = scan.nextLine(); + + // PIC X(n)型のデータに変換 + AbstractCobolField field = CobolFieldFactory.makeCobolField(input); + + if (f.getAttribute().isTypeNumericDisplay() && field.getSize() > f.getSize()) { + field.setSize(f.getSize()); + } + + f.moveFrom(field); + } catch (Exception e) { + e.printStackTrace(); + } + } + + // Time + + /** + * libcob/common.c job_or_current_localtime + * + * @return TODO: 準備中 + */ + private static LocalDateTime jobOrCurrentLocalTime() { + if (CobolUtil.cobLocalTm != null) { + return CobolUtil.cobLocalTm; + } else { + return LocalDateTime.now(); + } + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptDate(AbstractCobolField f) { + LocalDateTime date = jobOrCurrentLocalTime(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMdd"); + f.memcpy(date.format(formatter)); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptDate_yyyymmdd(AbstractCobolField f) { + LocalDateTime date = jobOrCurrentLocalTime(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + f.memcpy(date.format(formatter)); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptDay(AbstractCobolField f) { + LocalDateTime date = jobOrCurrentLocalTime(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyDDD"); + f.memcpy(date.format(formatter)); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptDay_yyyyddd(AbstractCobolField f) { + LocalDateTime date = jobOrCurrentLocalTime(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyDDD"); + f.memcpy(date.format(formatter)); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptDayOfWeek(AbstractCobolField f) { + LocalDateTime date = jobOrCurrentLocalTime(); + f.memcpy(String.format("%d", date.getDayOfWeek().getValue())); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptTime(AbstractCobolField f) { + LocalDateTime date = LocalDateTime.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSS"); + f.memcpy(date.format(formatter)); + } + + // Environment + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void displayEnvironment(AbstractCobolField f) { + CobolUtil.cobLocalEnv = f.fieldToString(); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void displayEnvValue(AbstractCobolField f) { + if (CobolUtil.cobLocalEnv == null || CobolUtil.cobLocalEnv.equals("")) { + CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_DISPLAY); + return; + } + CobolUtil.setEnv(CobolUtil.cobLocalEnv, f.getString()); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptEnvironment(AbstractCobolField f) { + String p = null; + if (CobolUtil.cobLocalEnv != null) { + p = CobolUtil.getEnv(CobolUtil.cobLocalEnv); + } + + if (p == null) { + // TODO setExceptionは暫定実装 + CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); + p = " "; + } + + AbstractCobolField src = CobolFieldFactory.makeCobolField(p); + // TODO hankakuMoveFromは暫定実装 + f.hankakuMoveFrom(src); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void displayCommandLine(AbstractCobolField f) { + CobolTerminal.commlnptr = new byte[f.getSize()]; + CobolTerminal.commlncnt = f.getSize(); + for (int i = 0; i < CobolTerminal.commlncnt; ++i) { + CobolTerminal.commlnptr[i] = f.getDataStorage().getByte(i); + } + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptCommandLine(AbstractCobolField f) { + if (CobolTerminal.commlncnt != 0) { + f.memcpy(CobolTerminal.commlnptr, CobolTerminal.commlncnt); + return; + } + + f.memcpy(String.join(" ", CobolUtil.commandLineArgs)); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void displayArgNumber(AbstractCobolField f) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 9, 0, 0, null); + byte[] data = new byte[4]; + AbstractCobolField temp = + CobolFieldFactory.makeCobolField(data.length, new CobolDataStorage(data), attr); + temp.moveFrom(f); + int n = ByteBuffer.wrap(data).getInt(); + if (n < 0 || n > CobolUtil.commandLineArgs.length) { + CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_DISPLAY); + return; + } + CobolUtil.currentArgIndex = n; + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptArgNumber(AbstractCobolField f) { + CobolFieldAttribute attr = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_NUMERIC_BINARY, 9, 0, 0, null); + byte[] data = new byte[4]; + ByteBuffer.wrap(data).putInt(CobolUtil.commandLineArgs.length); + AbstractCobolField temp = + CobolFieldFactory.makeCobolField(data.length, new CobolDataStorage(data), attr); + f.moveFrom(temp); + } + + /** + * TODO: 準備中 + * + * @param f TODO: 準備中 + */ + public static void acceptArgValue(AbstractCobolField f) { + if (CobolUtil.currentArgIndex > CobolUtil.commandLineArgs.length) { + CobolExceptionInfo.setException(CobolExceptionId.COB_EC_IMP_ACCEPT); + return; + } + f.memcpy(CobolUtil.commandLineArgs[CobolUtil.currentArgIndex - 1]); + CobolUtil.currentArgIndex++; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolCallResult.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolCallResult.java index 70173c44..292cbf1e 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolCallResult.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolCallResult.java @@ -2,33 +2,33 @@ /** TODO: 準備中 */ public class CobolCallResult { - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public int getInt() throws CobolResultSetException { - throw new CobolResultSetException("The result type is not 'int'"); - } + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public int getInt() throws CobolResultSetException { + throw new CobolResultSetException("The result type is not 'int'"); + } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public double getDouble() throws CobolResultSetException { - throw new CobolResultSetException("The result type is not 'double'"); - } + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public double getDouble() throws CobolResultSetException { + throw new CobolResultSetException("The result type is not 'double'"); + } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public String getString() throws CobolResultSetException { - throw new CobolResultSetException("The result type is not 'String'"); - } + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public String getString() throws CobolResultSetException { + throw new CobolResultSetException("The result type is not 'String'"); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java index 94e7d58a..cb1883fa 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java @@ -2,20 +2,20 @@ /** TODO: 準備中 */ public class CobolResultDouble extends CobolCallResult { - private double value; + private double value; - /** - * TODO: 準備中 - * - * @param d TODO: 準備中 - */ - public CobolResultDouble(double d) { - this.value = d; - } + /** + * TODO: 準備中 + * + * @param d TODO: 準備中 + */ + public CobolResultDouble(double d) { + this.value = d; + } - /** TODO: 準備中 */ - @Override - public double getDouble() throws CobolResultSetException { - return this.value; - } + /** TODO: 準備中 */ + @Override + public double getDouble() throws CobolResultSetException { + return this.value; + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultInt.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultInt.java index 522aed58..9c543521 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultInt.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultInt.java @@ -2,20 +2,20 @@ /** TODO: 準備中 */ public class CobolResultInt extends CobolCallResult { - private int value; + private int value; - /** - * TODO: 準備中 - * - * @param i TODO: 準備中 - */ - public CobolResultInt(int i) { - this.value = i; - } + /** + * TODO: 準備中 + * + * @param i TODO: 準備中 + */ + public CobolResultInt(int i) { + this.value = i; + } - /** TODO: 準備中 */ - @Override - public int getInt() throws CobolResultSetException { - return this.value; - } + /** TODO: 準備中 */ + @Override + public int getInt() throws CobolResultSetException { + return this.value; + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSet.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSet.java index 54d08ae4..050e426c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSet.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSet.java @@ -2,68 +2,68 @@ /** TODO: 準備中 */ public class CobolResultSet { - private CobolCallResult results[]; - private int returnCode; + private CobolCallResult results[]; + private int returnCode; - /** - * TODO: 準備中 - * - * @param returnCode TODO: 準備中 - * @param results TODO: 準備中 - */ - public CobolResultSet(int returnCode, CobolCallResult... results) { - this.returnCode = returnCode; - this.results = results; - } + /** + * TODO: 準備中 + * + * @param returnCode TODO: 準備中 + * @param results TODO: 準備中 + */ + public CobolResultSet(int returnCode, CobolCallResult... results) { + this.returnCode = returnCode; + this.results = results; + } - private void checkIndexInValidRange(int index) throws CobolResultSetException { - if (results.length == 0 || index < 1 || this.results.length < index) { - throw new CobolResultSetException("The index is out of range."); + private void checkIndexInValidRange(int index) throws CobolResultSetException { + if (results.length == 0 || index < 1 || this.results.length < index) { + throw new CobolResultSetException("The index is out of range."); + } } - } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ - public int getReturnCode() { - return this.returnCode; - } + /** + * TODO: 準備中 + * + * @return TODO: 準備中 + */ + public int getReturnCode() { + return this.returnCode; + } - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public String getString(int index) throws CobolResultSetException { - this.checkIndexInValidRange(index); - return this.results[index - 1].getString(); - } + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public String getString(int index) throws CobolResultSetException { + this.checkIndexInValidRange(index); + return this.results[index - 1].getString(); + } - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public int getInt(int index) throws CobolResultSetException { - this.checkIndexInValidRange(index); - return this.results[index - 1].getInt(); - } + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public int getInt(int index) throws CobolResultSetException { + this.checkIndexInValidRange(index); + return this.results[index - 1].getInt(); + } - /** - * TODO: 準備中 - * - * @param index TODO: 準備中 - * @return TODO: 準備中 - * @throws CobolResultSetException TODO: 準備中 - */ - public double getDouble(int index) throws CobolResultSetException { - this.checkIndexInValidRange(index); - return this.results[index - 1].getDouble(); - } + /** + * TODO: 準備中 + * + * @param index TODO: 準備中 + * @return TODO: 準備中 + * @throws CobolResultSetException TODO: 準備中 + */ + public double getDouble(int index) throws CobolResultSetException { + this.checkIndexInValidRange(index); + return this.results[index - 1].getDouble(); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSetException.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSetException.java index 8abd52cf..576ca372 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSetException.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultSetException.java @@ -2,12 +2,12 @@ /** TODO: 準備中 */ public class CobolResultSetException extends Exception { - /** - * TODO: 準備中 - * - * @param message TODO: 準備中 - */ - public CobolResultSetException(String message) { - super(message); - } + /** + * TODO: 準備中 + * + * @param message TODO: 準備中 + */ + public CobolResultSetException(String message) { + super(message); + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java index 2294d3ca..0ef92347 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java @@ -2,20 +2,20 @@ /** TODO: 準備中 */ public class CobolResultString extends CobolCallResult { - private String value; + private String value; - /** - * TODO: 準備中 - * - * @param s TODO: 準備中 - */ - public CobolResultString(String s) { - this.value = s; - } + /** + * TODO: 準備中 + * + * @param s TODO: 準備中 + */ + public CobolResultString(String s) { + this.value = s; + } - /** TODO: 準備中 */ - @Override - public String getString() throws CobolResultSetException { - return this.value; - } + /** TODO: 準備中 */ + @Override + public String getString() throws CobolResultSetException { + return this.value; + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java index 8446f70c..b427ba8a 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFiles.java @@ -13,277 +13,278 @@ /** API連携用のJavaファイルを出力するクラス */ class ApiFiles { - private static String programId; - - /** - * 入力された値を受け取り、javaCreateメソッドを呼び出す - * - * @param args コマンドラインから入力された文字列 - */ - public static void main(String[] args) { - - if (args.length == 0) { - System.err.println("cobj-api: no input files"); - System.exit(1); - } - ApiFilesOptions.getOptions(args); - - String filePath = ApiFilesOptions.filePath; - javaCreate(filePath); - } - - /** API連携用のJavaファイルを生成する */ - static void javaCreate(String filePath) { - try { - String json = new String(Files.readAllBytes(Paths.get(filePath))); - JSONObject obj = new JSONObject(json); - JSONArray params = obj.getJSONArray("procedure_division_using_parameters"); - String outputDir; - FileWriter ctlFile; - FileWriter rcdFile; - programId = obj.getString("program_id"); - - if (ApiFilesOptions.outputDir != null) { - outputDir = ApiFilesOptions.outputDir + "/"; - ctlFile = new FileWriter(outputDir + programId + "Controller.java"); - rcdFile = new FileWriter(outputDir + programId + "Record.java"); - } else { - ctlFile = new FileWriter(programId + "Controller.java"); - rcdFile = new FileWriter(programId + "Record.java"); - } - - writeController(ctlFile, params); - writeRecord(rcdFile, params); - - } catch (IOException e) { - e.printStackTrace(); - System.err.println("Error reading file: " + e.getMessage()); - System.exit(1); - } - } - - /** - * Controller.javaのコードを記述する - * - * @param ctlFile Controller.javaのファイルの情報を保持する - * @param programId PROGRAM-IDに記述されているプログラム名 - * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 - */ - private static void writeController(FileWriter ctlFile, JSONArray params) { - JSONObject param; - PrintWriter ctlWriter = new PrintWriter(ctlFile); - String defaultValue; - String methodName; - String nameController = programId + "Controller"; - String nameRecord = programId + "Record"; - String name; - String type; - int i; - - if (ApiFilesOptions.packageName != null) { - ctlWriter.println("package " + ApiFilesOptions.packageName + ";"); - } else { - ctlWriter.println("package com.example.restservice;"); - } - - ctlWriter.println( - "import java.util.concurrent.atomic.AtomicLong;\n" - + "import org.springframework.web.bind.annotation.RequestMapping;\n" - + "import org.springframework.web.bind.annotation.GetMapping;\n" - + "import org.springframework.web.bind.annotation.PostMapping;\n" - + "import org.springframework.web.bind.annotation.RequestParam;\n" - + "import org.springframework.web.bind.annotation.RequestBody;\n" - + "import org.springframework.web.bind.annotation.RestController;\n" - + "import jp.osscons.opensourcecobol.libcobj.ui.*;\n"); - - ctlWriter.println( - "@RestController\n" - + "@RequestMapping(\"/" - + programId - + "\")\n" - + "public class " - + nameController - + " {\n\n" - + " @GetMapping\n" - + " public " - + nameRecord - + " " - + nameController - + "("); - - for (i = 0; i < params.length(); ++i) { - param = params.getJSONObject(i); - name = param.getString("variable_name").replace('-', '_'); - type = param.getString("java_type"); - if ("String".equals(type)) { - defaultValue = "\"\""; - } else { - defaultValue = "\"0\""; - } - - ctlWriter.print( - " @RequestParam(value = " - + "\"" - + name - + "\", defaultValue = " - + defaultValue - + ") " - + type - + " " - + name); - - if (i < params.length() - 1) { - ctlWriter.println(","); - } else { - ctlWriter.println(); - } + private static String programId; + + /** + * 入力された値を受け取り、javaCreateメソッドを呼び出す + * + * @param args コマンドラインから入力された文字列 + */ + public static void main(String[] args) { + + if (args.length == 0) { + System.err.println("cobj-api: no input files"); + System.exit(1); + } + ApiFilesOptions.getOptions(args); + + String filePath = ApiFilesOptions.filePath; + javaCreate(filePath); } - ctlWriter.print(" ) {\n" + " return " + programId + "Execute("); - - argPrint(ctlWriter, params, false, false); - - ctlWriter.println(");\n" + " }\n"); - - ctlWriter.print( - " @PostMapping\n" - + " public " - + nameRecord - + " " - + nameController - + "Execute(@RequestBody " - + nameRecord - + " " - + programId - + "Record) {\n" - + " return " - + programId - + "Execute("); - - argPrint(ctlWriter, params, false, true); - - ctlWriter.println(");\n" + " }\n"); - ctlWriter.print(" private " + nameRecord + " " + programId + "Execute("); - - argPrint(ctlWriter, params, true, false); - - ctlWriter.print( - ") {\n" - + " int statuscode = 200;\n" - + " " - + programId - + " " - + programId - + "Cobol = new " - + programId - + "();\n" - + " CobolResultSet result = " - + programId - + "Cobol.execute("); - - argPrint(ctlWriter, params, false, false); - ctlWriter.println(");\n" + " try {"); - - for (i = 0; i < params.length(); ++i) { - param = params.getJSONObject(i); - name = param.getString("variable_name").replace('-', '_'); - type = param.getString("java_type"); - if ("String".equals(type)) { - methodName = "getString"; - } else if ("int".equals(type)) { - methodName = "getInt"; - } else { - methodName = "getDouble"; - } - ctlWriter.println(" " + name + " = result." + methodName + "(" + (i + 1) + ");"); + /** API連携用のJavaファイルを生成する */ + static void javaCreate(String filePath) { + try { + String json = new String(Files.readAllBytes(Paths.get(filePath))); + JSONObject obj = new JSONObject(json); + JSONArray params = obj.getJSONArray("procedure_division_using_parameters"); + String outputDir; + FileWriter ctlFile; + FileWriter rcdFile; + programId = obj.getString("program_id"); + + if (ApiFilesOptions.outputDir != null) { + outputDir = ApiFilesOptions.outputDir + "/"; + ctlFile = new FileWriter(outputDir + programId + "Controller.java"); + rcdFile = new FileWriter(outputDir + programId + "Record.java"); + } else { + ctlFile = new FileWriter(programId + "Controller.java"); + rcdFile = new FileWriter(programId + "Record.java"); + } + + writeController(ctlFile, params); + writeRecord(rcdFile, params); + + } catch (IOException e) { + e.printStackTrace(); + System.err.println("Error reading file: " + e.getMessage()); + System.exit(1); + } } - ctlWriter.print( - " } catch (Exception e) {\n" - + " statuscode = 500;\n" - + " }\n" - + " return new " - + programId - + "Record(statuscode, "); - - argPrint(ctlWriter, params, false, false); - - ctlWriter.println(");\n" + " }\n" + "}"); - ctlWriter.close(); - } - - /** - * Record.javaのコードを記述する - * - * @param rcdFile Record.javaのファイル情報を保持する - * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 - */ - private static void writeRecord(FileWriter rcdFile, JSONArray params) { - JSONObject param; - PrintWriter rcdWriter = new PrintWriter(rcdFile); - String defaultValue; - String type; - int i; - - if (ApiFilesOptions.packageName != null) { - rcdWriter.println("package " + ApiFilesOptions.packageName + ";"); - } else { - rcdWriter.println("package com.example.restservice;"); + /** + * Controller.javaのコードを記述する + * + * @param ctlFile Controller.javaのファイルの情報を保持する + * @param programId PROGRAM-IDに記述されているプログラム名 + * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 + */ + private static void writeController(FileWriter ctlFile, JSONArray params) { + JSONObject param; + PrintWriter ctlWriter = new PrintWriter(ctlFile); + String defaultValue; + String methodName; + String nameController = programId + "Controller"; + String nameRecord = programId + "Record"; + String name; + String type; + int i; + + if (ApiFilesOptions.packageName != null) { + ctlWriter.println("package " + ApiFilesOptions.packageName + ";"); + } else { + ctlWriter.println("package com.example.restservice;"); + } + + ctlWriter.println( + "import java.util.concurrent.atomic.AtomicLong;\n" + + "import org.springframework.web.bind.annotation.RequestMapping;\n" + + "import org.springframework.web.bind.annotation.GetMapping;\n" + + "import org.springframework.web.bind.annotation.PostMapping;\n" + + "import org.springframework.web.bind.annotation.RequestParam;\n" + + "import org.springframework.web.bind.annotation.RequestBody;\n" + + "import org.springframework.web.bind.annotation.RestController;\n" + + "import jp.osscons.opensourcecobol.libcobj.ui.*;\n"); + + ctlWriter.println( + "@RestController\n" + + "@RequestMapping(\"/" + + programId + + "\")\n" + + "public class " + + nameController + + " {\n\n" + + " @GetMapping\n" + + " public " + + nameRecord + + " " + + nameController + + "("); + + for (i = 0; i < params.length(); ++i) { + param = params.getJSONObject(i); + name = param.getString("variable_name").replace('-', '_'); + type = param.getString("java_type"); + if ("String".equals(type)) { + defaultValue = "\"\""; + } else { + defaultValue = "\"0\""; + } + + ctlWriter.print( + " @RequestParam(value = " + + "\"" + + name + + "\", defaultValue = " + + defaultValue + + ") " + + type + + " " + + name); + + if (i < params.length() - 1) { + ctlWriter.println(","); + } else { + ctlWriter.println(); + } + } + + ctlWriter.print(" ) {\n" + " return " + programId + "Execute("); + + argPrint(ctlWriter, params, false, false); + + ctlWriter.println(");\n" + " }\n"); + + ctlWriter.print( + " @PostMapping\n" + + " public " + + nameRecord + + " " + + nameController + + "Execute(@RequestBody " + + nameRecord + + " " + + programId + + "Record) {\n" + + " return " + + programId + + "Execute("); + + argPrint(ctlWriter, params, false, true); + + ctlWriter.println(");\n" + " }\n"); + ctlWriter.print(" private " + nameRecord + " " + programId + "Execute("); + + argPrint(ctlWriter, params, true, false); + + ctlWriter.print( + ") {\n" + + " int statuscode = 200;\n" + + " " + + programId + + " " + + programId + + "Cobol = new " + + programId + + "();\n" + + " CobolResultSet result = " + + programId + + "Cobol.execute("); + + argPrint(ctlWriter, params, false, false); + ctlWriter.println(");\n" + " try {"); + + for (i = 0; i < params.length(); ++i) { + param = params.getJSONObject(i); + name = param.getString("variable_name").replace('-', '_'); + type = param.getString("java_type"); + if ("String".equals(type)) { + methodName = "getString"; + } else if ("int".equals(type)) { + methodName = "getInt"; + } else { + methodName = "getDouble"; + } + ctlWriter.println( + " " + name + " = result." + methodName + "(" + (i + 1) + ");"); + } + + ctlWriter.print( + " } catch (Exception e) {\n" + + " statuscode = 500;\n" + + " }\n" + + " return new " + + programId + + "Record(statuscode, "); + + argPrint(ctlWriter, params, false, false); + + ctlWriter.println(");\n" + " }\n" + "}"); + ctlWriter.close(); } - rcdWriter.print("public record " + programId + "Record(int statuscode, "); - - argPrint(rcdWriter, params, true, false); - - rcdWriter.print(") {\n" + " public " + programId + "Record(){\n" + " this(200, "); - for (i = 0; i < params.length(); ++i) { - param = params.getJSONObject(i); - type = param.getString("java_type"); - - if ("String".equals(type)) { - defaultValue = "\"\""; - } else { - defaultValue = "0"; - } - - rcdWriter.print(defaultValue); - if (i < params.length() - 1) { - rcdWriter.print(", "); - } + /** + * Record.javaのコードを記述する + * + * @param rcdFile Record.javaのファイル情報を保持する + * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 + */ + private static void writeRecord(FileWriter rcdFile, JSONArray params) { + JSONObject param; + PrintWriter rcdWriter = new PrintWriter(rcdFile); + String defaultValue; + String type; + int i; + + if (ApiFilesOptions.packageName != null) { + rcdWriter.println("package " + ApiFilesOptions.packageName + ";"); + } else { + rcdWriter.println("package com.example.restservice;"); + } + + rcdWriter.print("public record " + programId + "Record(int statuscode, "); + + argPrint(rcdWriter, params, true, false); + + rcdWriter.print(") {\n" + " public " + programId + "Record(){\n" + " this(200, "); + for (i = 0; i < params.length(); ++i) { + param = params.getJSONObject(i); + type = param.getString("java_type"); + + if ("String".equals(type)) { + defaultValue = "\"\""; + } else { + defaultValue = "0"; + } + + rcdWriter.print(defaultValue); + if (i < params.length() - 1) { + rcdWriter.print(", "); + } + } + + rcdWriter.println(");\n" + " }\n" + "}"); + rcdWriter.close(); } - rcdWriter.println(");\n" + " }\n" + "}"); - rcdWriter.close(); - } - - /** - * 生成されるJavaファイルに記述されるメソッドの引数などを記述する - * - * @param writer 生成されるJavaファイルの情報を保持する - * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 - * @param isType 引数の型を記述するかどうか - * @param isRecord 引数がレコード型かどうか - */ - private static void argPrint( - PrintWriter writer, JSONArray params, boolean isType, boolean isRecord) { - JSONObject param; - String name; - String type; - int i; - - for (i = 0; i < params.length(); ++i) { - param = params.getJSONObject(i); - name = param.getString("variable_name").replace('-', '_'); - if (isType) { - type = param.getString("java_type"); - name = type + " " + name; - } else if (isRecord) { - name = programId + "Record." + name + "()"; - } - writer.print(name); - if (i < params.length() - 1) { - writer.print(", "); - } + /** + * 生成されるJavaファイルに記述されるメソッドの引数などを記述する + * + * @param writer 生成されるJavaファイルの情報を保持する + * @param params PROCEDURE DIVISION USING句に記述されている引数の配列 + * @param isType 引数の型を記述するかどうか + * @param isRecord 引数がレコード型かどうか + */ + private static void argPrint( + PrintWriter writer, JSONArray params, boolean isType, boolean isRecord) { + JSONObject param; + String name; + String type; + int i; + + for (i = 0; i < params.length(); ++i) { + param = params.getJSONObject(i); + name = param.getString("variable_name").replace('-', '_'); + if (isType) { + type = param.getString("java_type"); + name = type + " " + name; + } else if (isRecord) { + name = programId + "Record." + name + "()"; + } + writer.print(name); + if (i < params.length() - 1) { + writer.print(", "); + } + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 054cc03f..869f8d9d 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -9,119 +9,123 @@ /** cobj-apiコマンドのオプションを定義するクラス */ class ApiFilesOptions { - /** cobj-apiコマンドによって生成されるJavaファイルに記述されるパッケージ名 */ - static String packageName; - /** cobj-apiコマンドによって生成されるJavaファイルが配置されるディレクトリ名 */ - static String outputDir; + /** cobj-apiコマンドによって生成されるJavaファイルに記述されるパッケージ名 */ + static String packageName; - static String filePath; + /** cobj-apiコマンドによって生成されるJavaファイルが配置されるディレクトリ名 */ + static String outputDir; - /** - * 入力されたオプションを取得する - * - * @param args コマンドラインから入力された文字列 - */ - static void getOptions(String[] args) { - Options options = new Options(); + static String filePath; - options.addOption(Option.builder("h").longOpt("help").build()); - options.addOption(Option.builder("java-package").longOpt("java-package").hasArgs().build()); - options.addOption(Option.builder("o").hasArgs().build()); - options.addOption(Option.builder("output-dir").longOpt("output-dir").hasArgs().build()); - options.addOption(Option.builder("v").longOpt("version").build()); + /** + * 入力されたオプションを取得する + * + * @param args コマンドラインから入力された文字列 + */ + static void getOptions(String[] args) { + Options options = new Options(); - CommandLineParser parser = new DefaultParser(); + options.addOption(Option.builder("h").longOpt("help").build()); + options.addOption(Option.builder("java-package").longOpt("java-package").hasArgs().build()); + options.addOption(Option.builder("o").hasArgs().build()); + options.addOption(Option.builder("output-dir").longOpt("output-dir").hasArgs().build()); + options.addOption(Option.builder("v").longOpt("version").build()); - try { - CommandLine cmd = parser.parse(options, args); - int optionCount = 0; - String outputDir; + CommandLineParser parser = new DefaultParser(); - if (cmd.getOptions().length != 0) { - for (Option option : cmd.getOptions()) { - switch (option.getOpt()) { - case "h": - printHelpMessage(); - System.exit(0); - break; - case "v": - System.out.println("1.1.2"); - System.exit(0); - break; - case "java-package": - if (!args[optionCount].contains("=")) { - System.err.println("error: Please check the usage of options.\n"); - printHelpMessage(); - System.exit(1); - } - String packageName = option.getValue(); - setJavaPackage(packageName); - break; - case "output-dir": - if (!args[optionCount].contains("=")) { - System.err.println("error: Please check the usage of options.\n"); - printHelpMessage(); - System.exit(1); - } - outputDir = option.getValue(); - setOutputDir(outputDir); - break; - case "o": - outputDir = option.getValue(); - setOutputDir(outputDir); - optionCount++; - break; - default: - break; - } - optionCount++; + try { + CommandLine cmd = parser.parse(options, args); + int optionCount = 0; + String outputDir; + + if (cmd.getOptions().length != 0) { + for (Option option : cmd.getOptions()) { + switch (option.getOpt()) { + case "h": + printHelpMessage(); + System.exit(0); + break; + case "v": + System.out.println("1.1.2"); + System.exit(0); + break; + case "java-package": + if (!args[optionCount].contains("=")) { + System.err.println("error: Please check the usage of options.\n"); + printHelpMessage(); + System.exit(1); + } + String packageName = option.getValue(); + setJavaPackage(packageName); + break; + case "output-dir": + if (!args[optionCount].contains("=")) { + System.err.println("error: Please check the usage of options.\n"); + printHelpMessage(); + System.exit(1); + } + outputDir = option.getValue(); + setOutputDir(outputDir); + break; + case "o": + outputDir = option.getValue(); + setOutputDir(outputDir); + optionCount++; + break; + default: + break; + } + optionCount++; + } + filePath = args[optionCount]; + } else { + filePath = args[0]; + } + } catch (ParseException e) { + System.err.println("error: " + e.getMessage() + "\n"); + printHelpMessage(); + System.exit(1); + } catch (ArrayIndexOutOfBoundsException e) { + System.err.println("error: Please check the usage of options.\n"); + printHelpMessage(); + System.exit(1); } - filePath = args[optionCount]; - } else { - filePath = args[0]; - } - } catch (ParseException e) { - System.err.println("error: " + e.getMessage() + "\n"); - printHelpMessage(); - System.exit(1); - } catch (ArrayIndexOutOfBoundsException e) { - System.err.println("error: Please check the usage of options.\n"); - printHelpMessage(); - System.exit(1); } - } - /** cobj-apiコマンドのヘルプメッセージを出力する */ - private static void printHelpMessage() { - System.out.println("Usage: cobj-api [options] "); - System.out.println(); - System.out.println("Arguments:"); - System.out.println(" : a json file generated by cobj with `-info-json-dir` option"); - System.out.println(); - System.out.println("Options:"); - System.out.println(" -h, --help\t\t\t\tDisplay this message"); - System.out.println( - " -java-package=\t\tSpecify the package name of the generated source code"); - System.out.println( - " -o , --output-dir=\t\tSet the output destination of the java file to an arbitrary destination"); - System.out.println(" -v, --version\t\t\t\tPrints the version of the cobj-api"); - } + /** cobj-apiコマンドのヘルプメッセージを出力する */ + private static void printHelpMessage() { + System.out.println("Usage: cobj-api [options] "); + System.out.println(); + System.out.println("Arguments:"); + System.out.println( + " : a json file generated by cobj with `-info-json-dir` option"); + System.out.println(); + System.out.println("Options:"); + System.out.println(" -h, --help\t\t\t\tDisplay this message"); + System.out.println( + " -java-package=\t\tSpecify the package name of the generated source" + + " code"); + System.out.println( + " -o , --output-dir=\t\tSet the output destination of the java file to" + + " an arbitrary destination"); + System.out.println(" -v, --version\t\t\t\tPrints the version of the cobj-api"); + } - /** - * 生成されるJavaファイルに記述されるパッケージ名を設定する - * - * @param packageName 生成されるJavaファイルに記述されるパッケージ名 - */ - static void setJavaPackage(String packageName) { - ApiFilesOptions.packageName = packageName; - } + /** + * 生成されるJavaファイルに記述されるパッケージ名を設定する + * + * @param packageName 生成されるJavaファイルに記述されるパッケージ名 + */ + static void setJavaPackage(String packageName) { + ApiFilesOptions.packageName = packageName; + } - /** - * 生成されるJavaファイルが配置されるディレクトリ名を設定する - * - * @param outputDir 生成されるJavaファイルが配置されるディレクトリ名 - */ - static void setOutputDir(String outputDir) { - ApiFilesOptions.outputDir = outputDir; - } + /** + * 生成されるJavaファイルが配置されるディレクトリ名を設定する + * + * @param outputDir 生成されるJavaファイルが配置されるディレクトリ名 + */ + static void setOutputDir(String outputDir) { + ApiFilesOptions.outputDir = outputDir; + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java index de59d84b..6d9f9480 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java @@ -2,55 +2,56 @@ /** Manage error info */ class ErrorLib { - /** - * Error when indexed file does not exist - * - * @param indexedFilePath TODO: 準備中 - * @return 1 - */ - static int errorFileDoesNotExist(String indexedFilePath) { - System.err.println("error: '" + indexedFilePath + "' does not exist."); - return 1; - } - /** - * Error when indexed file is not a valid indexed file - * - * @param indexedFilePath TODO: 準備中 - * @return 1 - */ - static int errorInvalidIndexedFile(String indexedFilePath) { - System.err.println("error: '" + indexedFilePath + "' is not a valid indexed file."); - return 1; - } + /** + * Error when indexed file does not exist + * + * @param indexedFilePath TODO: 準備中 + * @return 1 + */ + static int errorFileDoesNotExist(String indexedFilePath) { + System.err.println("error: '" + indexedFilePath + "' does not exist."); + return 1; + } - /** - * Error when IO operations of indexed files - * - * @return 1 - */ - static int errorIO() { - System.err.println("error: IO error."); - return 1; - } + /** + * Error when indexed file is not a valid indexed file + * + * @param indexedFilePath TODO: 準備中 + * @return 1 + */ + static int errorInvalidIndexedFile(String indexedFilePath) { + System.err.println("error: '" + indexedFilePath + "' is not a valid indexed file."); + return 1; + } - /** - * Error when some keys in input data have conflicts - * - * @return 1 - */ - static int errorDuplicateKeys() { - System.err.println("error: loading fails because of duplicate keys."); - return 1; - } + /** + * Error when IO operations of indexed files + * + * @return 1 + */ + static int errorIO() { + System.err.println("error: IO error."); + return 1; + } - /** - * Error when some records in input data have invalid size - * - * @param correctSize TODO: 準備中 - * @return TODO: 準備中 - */ - static int errorDataSizeMismatch(int correctSize) { - System.err.println("error: all record must have the length of " + correctSize + " bytes."); - return 1; - } + /** + * Error when some keys in input data have conflicts + * + * @return 1 + */ + static int errorDuplicateKeys() { + System.err.println("error: loading fails because of duplicate keys."); + return 1; + } + + /** + * Error when some records in input data have invalid size + * + * @param correctSize TODO: 準備中 + * @return TODO: 準備中 + */ + static int errorDataSizeMismatch(int correctSize) { + System.err.println("error: all record must have the length of " + correctSize + " bytes."); + return 1; + } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileLineSeqRecordReader.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileLineSeqRecordReader.java index 0a21c945..149e8fa7 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileLineSeqRecordReader.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileLineSeqRecordReader.java @@ -7,60 +7,61 @@ /** TODO: 準備中 */ class FileLineSeqRecordReader implements RecordReader { - /** TODO: 準備中 */ - int recordSize; - /** TODO: 準備中 */ - BufferedReader reader; + /** TODO: 準備中 */ + int recordSize; - private String filePath; + /** TODO: 準備中 */ + BufferedReader reader; - /** - * TODO: 準備中 - * - * @param recordSize TODO: 準備中 - * @param filePath TODO: 準備中 - */ - FileLineSeqRecordReader(int recordSize, String filePath) { - this.recordSize = recordSize; - this.filePath = filePath; - } + private String filePath; - @Override - public void open() { - try { - this.reader = new BufferedReader(new FileReader(this.filePath)); - } catch (IOException e) { - this.reader = null; + /** + * TODO: 準備中 + * + * @param recordSize TODO: 準備中 + * @param filePath TODO: 準備中 + */ + FileLineSeqRecordReader(int recordSize, String filePath) { + this.recordSize = recordSize; + this.filePath = filePath; } - } - @Override - public LoadResult read(CobolDataStorage record) { - if (this.reader == null) { - return LoadResult.LoadResultOther; + @Override + public void open() { + try { + this.reader = new BufferedReader(new FileReader(this.filePath)); + } catch (IOException e) { + this.reader = null; + } } - try { - String line = this.reader.readLine(); - if (line == null) { - return LoadResult.AtEnd; - } - byte[] readData = line.getBytes(); - if (readData.length != this.recordSize) { - return LoadResult.LoadResultDataSizeMismatch; - } - record.memcpy(readData, this.recordSize); - return LoadResult.LoadResultSuccess; - } catch (IOException e) { - return LoadResult.LoadResultOther; + + @Override + public LoadResult read(CobolDataStorage record) { + if (this.reader == null) { + return LoadResult.LoadResultOther; + } + try { + String line = this.reader.readLine(); + if (line == null) { + return LoadResult.AtEnd; + } + byte[] readData = line.getBytes(); + if (readData.length != this.recordSize) { + return LoadResult.LoadResultDataSizeMismatch; + } + record.memcpy(readData, this.recordSize); + return LoadResult.LoadResultSuccess; + } catch (IOException e) { + return LoadResult.LoadResultOther; + } } - } - @Override - public void close() { - try { - this.reader.close(); - } catch (IOException e) { - return; + @Override + public void close() { + try { + this.reader.close(); + } catch (IOException e) { + return; + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileSeqRecordReader.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileSeqRecordReader.java index 14000394..2f94103f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileSeqRecordReader.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/FileSeqRecordReader.java @@ -6,62 +6,62 @@ /** TODO: 準備中 */ public class FileSeqRecordReader implements RecordReader { - private FileInputStream reader; - private String filePath; - private byte[] readData; + private FileInputStream reader; + private String filePath; + private byte[] readData; - /** - * TODO: 準備中 - * - * @param recordSize TODO: 準備中 - * @param filePath TODO: 準備中 - */ - FileSeqRecordReader(int recordSize, String filePath) { - this.filePath = filePath; - this.readData = new byte[recordSize]; - } - - @Override - public void open() { - try { - this.reader = new FileInputStream(this.filePath); - } catch (IOException e) { - this.reader = null; + /** + * TODO: 準備中 + * + * @param recordSize TODO: 準備中 + * @param filePath TODO: 準備中 + */ + FileSeqRecordReader(int recordSize, String filePath) { + this.filePath = filePath; + this.readData = new byte[recordSize]; } - } - @Override - public LoadResult read(CobolDataStorage record) { - if (this.reader == null) { - return LoadResult.LoadResultOther; + @Override + public void open() { + try { + this.reader = new FileInputStream(this.filePath); + } catch (IOException e) { + this.reader = null; + } } - try { - int readSize = this.reader.read(this.readData); - if (readSize == -1) { - return LoadResult.AtEnd; - } - if (readSize != this.readData.length) { - if (readSize == 1 && this.readData[0] == '\n') { - return LoadResult.AtEnd; - } else if (readSize == 2 && this.readData[0] == '\r' && this.readData[1] == '\n') { - return LoadResult.AtEnd; - } else { - return LoadResult.LoadResultDataSizeMismatch; + + @Override + public LoadResult read(CobolDataStorage record) { + if (this.reader == null) { + return LoadResult.LoadResultOther; + } + try { + int readSize = this.reader.read(this.readData); + if (readSize == -1) { + return LoadResult.AtEnd; + } + if (readSize != this.readData.length) { + if (readSize == 1 && this.readData[0] == '\n') { + return LoadResult.AtEnd; + } else if (readSize == 2 && this.readData[0] == '\r' && this.readData[1] == '\n') { + return LoadResult.AtEnd; + } else { + return LoadResult.LoadResultDataSizeMismatch; + } + } + record.memcpy(this.readData, this.readData.length); + return LoadResult.LoadResultSuccess; + } catch (IOException e) { + return LoadResult.LoadResultOther; } - } - record.memcpy(this.readData, this.readData.length); - return LoadResult.LoadResultSuccess; - } catch (IOException e) { - return LoadResult.LoadResultOther; } - } - @Override - public void close() { - try { - this.reader.close(); - } catch (IOException e) { - return; + @Override + public void close() { + try { + this.reader.close(); + } catch (IOException e) { + return; + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 80b9f407..5e84d4af 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -37,497 +37,516 @@ * data from the indexed file. */ class IndexedFileUtilMain { - private static final String version = jp.osscons.opensourcecobol.libcobj.Const.version; - - /** - * Main method - * - * @param args TODO: 準備中 - */ - public static void main(String[] args) { - - // Build a command line parser - Options options = new Options(); - options.addOption("h", "help", false, "Print this message."); - options.addOption("v", "version", false, "Print the version"); - options.addOption("n", "new", false, "Delete all data before loading"); - options.addOption("f", "format", true, "Specify the format of the input and output data"); - CommandLineParser parser = new DefaultParser(); - CommandLine cmd; - - // Parse command line arguments - try { - cmd = parser.parse(options, args); - } catch (ParseException e) { - printHelpMessage(); - System.exit(1); - return; - } + private static final String version = jp.osscons.opensourcecobol.libcobj.Const.version; + + /** + * Main method + * + * @param args TODO: 準備中 + */ + public static void main(String[] args) { + + // Build a command line parser + Options options = new Options(); + options.addOption("h", "help", false, "Print this message."); + options.addOption("v", "version", false, "Print the version"); + options.addOption("n", "new", false, "Delete all data before loading"); + options.addOption("f", "format", true, "Specify the format of the input and output data"); + CommandLineParser parser = new DefaultParser(); + CommandLine cmd; + + // Parse command line arguments + try { + cmd = parser.parse(options, args); + } catch (ParseException e) { + printHelpMessage(); + System.exit(1); + return; + } - // Process -h, --help option - if (cmd.hasOption("h")) { - printHelpMessage(); - System.exit(0); - return; - } + // Process -h, --help option + if (cmd.hasOption("h")) { + printHelpMessage(); + System.exit(0); + return; + } - // Process -v, --version option - if (cmd.hasOption("v")) { - System.out.println(version); - System.exit(0); - return; - } + // Process -v, --version option + if (cmd.hasOption("v")) { + System.out.println(version); + System.exit(0); + return; + } + + // Process -f, --format option + UserDataFormat userDataFormat = UserDataFormat.SEQUENTIAL; + String userDataFormatString = cmd.getOptionValue("f"); + if (userDataFormatString != null) { + userDataFormatString = userDataFormatString.toLowerCase(); + if ("txt".equals(userDataFormatString)) { + userDataFormat = UserDataFormat.LINE_SEQUENTIAL; + } else if ("bin".equals(userDataFormatString)) { + userDataFormat = UserDataFormat.SEQUENTIAL; + } else { + System.err.println( + String.format( + "error: '%s' is invalid value of -f and --format option.", + userDataFormatString)); + System.err.println( + " possible values of -f and --format option is 'txt' and 'bin'."); + System.exit(1); + } + } + + // If no sub command is specified, print help message and exit. + String[] unrecognizedArgs = cmd.getArgs(); + if (unrecognizedArgs.length == 0) { + printHelpMessage(); + System.exit(0); + return; + } - // Process -f, --format option - UserDataFormat userDataFormat = UserDataFormat.SEQUENTIAL; - String userDataFormatString = cmd.getOptionValue("f"); - if (userDataFormatString != null) { - userDataFormatString = userDataFormatString.toLowerCase(); - if ("txt".equals(userDataFormatString)) { - userDataFormat = UserDataFormat.LINE_SEQUENTIAL; - } else if ("bin".equals(userDataFormatString)) { - userDataFormat = UserDataFormat.SEQUENTIAL; - } else { - System.err.println( - String.format( - "error: '%s' is invalid value of -f and --format option.", userDataFormatString)); - System.err.println(" possible values of -f and --format option is 'txt' and 'bin'."); - System.exit(1); - } + // Dispatch sub commands + String subCommand = unrecognizedArgs[0]; + if ("info".equals(subCommand)) { + if (unrecognizedArgs.length != 2) { + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); + } else { + System.err.println("error: too many indexed files are specified."); + } + System.exit(1); + } + String indexedFilePath = args[1]; + int exitCode = processInfoCommand(indexedFilePath); + System.exit(exitCode); + + } else if ("load".equals(subCommand)) { + if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); + } else { + System.err.println("error: too many indexed files are specified."); + } + System.exit(1); + } + String indexedFilePath = unrecognizedArgs[1]; + Optional filePath; + if (unrecognizedArgs.length == 3) { + filePath = Optional.of(unrecognizedArgs[2]); + } else { + filePath = Optional.empty(); + } + boolean deleteBeforeLoading = cmd.hasOption("n"); + int exitCode = + processLoadCommand( + indexedFilePath, deleteBeforeLoading, userDataFormat, filePath); + System.exit(exitCode); + + } else if ("unload".equals(subCommand)) { + if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); + } else { + System.err.println("error: too many indexed files are specified."); + } + System.exit(1); + } + String indexedFilePath = unrecognizedArgs[1]; + Optional filePath; + if (unrecognizedArgs.length == 3) { + filePath = Optional.of(unrecognizedArgs[2]); + } else { + filePath = Optional.empty(); + } + int exitCode = processUnloadCommand(indexedFilePath, userDataFormat, filePath); + System.exit(exitCode); + } else { + printHelpMessage(); + System.exit(1); + } } - // If no sub command is specified, print help message and exit. - String[] unrecognizedArgs = cmd.getArgs(); - if (unrecognizedArgs.length == 0) { - printHelpMessage(); - System.exit(0); - return; + /** Print help message. */ + private static void printHelpMessage() { + System.out.println( + "cobj-idx - A utility tool to handle an indexed file of opensource COBOL 4J"); + System.out.println(); + System.out.println("Usage:"); + System.out.println("cobj-idx [options] "); + System.out.println(); + System.err.println("Sub commands:"); + System.out.println(); + System.out.println("cobj-idx info "); + System.out.println(" Show information of the indexed file."); + System.out.println(); + System.out.println("cobj-idx load "); + System.out.println(" Load the data from stdin into the indexed file."); + System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); + System.out.println(); + System.out.println("cobj-idx load "); + System.out.println(" Load data from the input file into the indexed file."); + System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); + System.out.println(); + System.out.println("cobj-idx unload "); + System.out.println(" Write the records stored in the indexed file into stdout."); + System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); + System.out.println(); + System.out.println("cobj-idx unload "); + System.out.println( + " Write the records stored in the indexed file into the output file."); + System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); + System.out.println(); + System.out.println("Options:"); + System.out.println(); + System.out.println("-f , --format="); + System.out.println(" Specify the format of the input and output data."); + System.out.println(" Possible values are 'txt' and the default value 'bin'"); + System.out.println( + " 'bin' and 'txt' means SEQUENTIAL and LINE SEQUENTIAL respectively."); + System.out.println( + " When doing a `load`, this option specifies the format of input data which will" + + " be inserted to an indexed file."); + System.out.println( + " When doing an `unload`, this option specifies the format of output data which" + + " will be read from an indexed file."); + System.out.println(); + System.out.println("-h --help"); + System.out.println(" Print this message."); + System.out.println(); + System.out.println("-n, --new"); + System.out.println( + " Delete all data before inserting new data. This option is only valid when the" + + " sub command is 'load'."); + System.out.println(); + System.out.println("-v, --version"); + System.out.println(" Print the version of cobj-idx."); } - // Dispatch sub commands - String subCommand = unrecognizedArgs[0]; - if ("info".equals(subCommand)) { - if (unrecognizedArgs.length != 2) { - if (unrecognizedArgs.length < 2) { - System.err.println("error: no indexed file is specified."); - } else { - System.err.println("error: too many indexed files are specified."); + /** + * Process info sub command, which shows information of the indexed file. + * + * @param indexedFilePath TODO: 準備中 + * @return 0 if success, otherwise non-zero. The return value is error code. + */ + private static int processInfoCommand(String indexedFilePath) { + File indexedFile = new File(indexedFilePath); + if (!indexedFile.exists()) { + return ErrorLib.errorFileDoesNotExist(indexedFilePath); } - System.exit(1); - } - String indexedFilePath = args[1]; - int exitCode = processInfoCommand(indexedFilePath); - System.exit(exitCode); - - } else if ("load".equals(subCommand)) { - if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { - if (unrecognizedArgs.length < 2) { - System.err.println("error: no indexed file is specified."); - } else { - System.err.println("error: too many indexed files are specified."); + if (!indexedFile.isFile()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); } - System.exit(1); - } - String indexedFilePath = unrecognizedArgs[1]; - Optional filePath; - if (unrecognizedArgs.length == 3) { - filePath = Optional.of(unrecognizedArgs[2]); - } else { - filePath = Optional.empty(); - } - boolean deleteBeforeLoading = cmd.hasOption("n"); - int exitCode = - processLoadCommand(indexedFilePath, deleteBeforeLoading, userDataFormat, filePath); - System.exit(exitCode); - - } else if ("unload".equals(subCommand)) { - if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { - if (unrecognizedArgs.length < 2) { - System.err.println("error: no indexed file is specified."); - } else { - System.err.println("error: too many indexed files are specified."); + + SQLiteConfig config = new SQLiteConfig(); + config.setReadOnly(true); + StringBuilder sb = new StringBuilder(); + + try (Connection conn = + DriverManager.getConnection( + "jdbc:sqlite:" + indexedFilePath, config.toProperties()); + Statement stmt = conn.createStatement(); ) { + // Retrieve the record size + ResultSet rs = + stmt.executeQuery( + "select value from metadata_string_int where key = 'record_size'"); + if (!rs.next()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); + } + int recordSize = rs.getInt("value"); + sb.append("Size of a record: " + recordSize + "\n"); + + // Retrieve the number of records + rs = stmt.executeQuery("select count(*) from table0"); + if (!rs.next()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); + } + sb.append("Number of records: " + rs.getInt(1) + "\n"); + + // Retrieve the number of keys + rs = + stmt.executeQuery( + "select idx, offset, size, duplicate from metadata_key order by idx"); + while (rs.next()) { + int idx = rs.getInt("idx"); + int offset = rs.getInt("offset") + 1; + int size = rs.getInt("size"); + boolean duplicate = rs.getBoolean("duplicate"); + if (idx == 0) { + sb.append("Primary key position: "); + } else { + sb.append("Alternate key position "); + if (duplicate) { + sb.append("(Duplicates): "); + } else { + sb.append("(No duplicate): "); + } + } + sb.append(offset + "-" + (offset + size - 1) + "\n"); + } + + System.out.print(sb.toString()); + return 0; + } catch (SQLException e) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); } - System.exit(1); - } - String indexedFilePath = unrecognizedArgs[1]; - Optional filePath; - if (unrecognizedArgs.length == 3) { - filePath = Optional.of(unrecognizedArgs[2]); - } else { - filePath = Optional.empty(); - } - int exitCode = processUnloadCommand(indexedFilePath, userDataFormat, filePath); - System.exit(exitCode); - } else { - printHelpMessage(); - System.exit(1); - } - } - - /** Print help message. */ - private static void printHelpMessage() { - System.out.println( - "cobj-idx - A utility tool to handle an indexed file of opensource COBOL 4J"); - System.out.println(); - System.out.println("Usage:"); - System.out.println("cobj-idx [options] "); - System.out.println(); - System.err.println("Sub commands:"); - System.out.println(); - System.out.println("cobj-idx info "); - System.out.println(" Show information of the indexed file."); - System.out.println(); - System.out.println("cobj-idx load "); - System.out.println(" Load the data from stdin into the indexed file."); - System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); - System.out.println(); - System.out.println("cobj-idx load "); - System.out.println(" Load data from the input file into the indexed file."); - System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); - System.out.println(); - System.out.println("cobj-idx unload "); - System.out.println(" Write the records stored in the indexed file into stdout."); - System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); - System.out.println(); - System.out.println("cobj-idx unload "); - System.out.println(" Write the records stored in the indexed file into the output file."); - System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); - System.out.println(); - System.out.println("Options:"); - System.out.println(); - System.out.println("-f , --format="); - System.out.println(" Specify the format of the input and output data."); - System.out.println(" Possible values are 'txt' and the default value 'bin'"); - System.out.println(" 'bin' and 'txt' means SEQUENTIAL and LINE SEQUENTIAL respectively."); - System.out.println( - " When doing a `load`, this option specifies the format of input data which will be inserted to an indexed file."); - System.out.println( - " When doing an `unload`, this option specifies the format of output data which will be read from an indexed file."); - System.out.println(); - System.out.println("-h --help"); - System.out.println(" Print this message."); - System.out.println(); - System.out.println("-n, --new"); - System.out.println( - " Delete all data before inserting new data. This option is only valid when the sub command is 'load'."); - System.out.println(); - System.out.println("-v, --version"); - System.out.println(" Print the version of cobj-idx."); - } - - /** - * Process info sub command, which shows information of the indexed file. - * - * @param indexedFilePath TODO: 準備中 - * @return 0 if success, otherwise non-zero. The return value is error code. - */ - private static int processInfoCommand(String indexedFilePath) { - File indexedFile = new File(indexedFilePath); - if (!indexedFile.exists()) { - return ErrorLib.errorFileDoesNotExist(indexedFilePath); - } - if (!indexedFile.isFile()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); } - SQLiteConfig config = new SQLiteConfig(); - config.setReadOnly(true); - StringBuilder sb = new StringBuilder(); - - try (Connection conn = - DriverManager.getConnection("jdbc:sqlite:" + indexedFilePath, config.toProperties()); - Statement stmt = conn.createStatement(); ) { - // Retrieve the record size - ResultSet rs = - stmt.executeQuery("select value from metadata_string_int where key = 'record_size'"); - if (!rs.next()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - int recordSize = rs.getInt("value"); - sb.append("Size of a record: " + recordSize + "\n"); - - // Retrieve the number of records - rs = stmt.executeQuery("select count(*) from table0"); - if (!rs.next()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - sb.append("Number of records: " + rs.getInt(1) + "\n"); - - // Retrieve the number of keys - rs = stmt.executeQuery("select idx, offset, size, duplicate from metadata_key order by idx"); - while (rs.next()) { - int idx = rs.getInt("idx"); - int offset = rs.getInt("offset") + 1; - int size = rs.getInt("size"); - boolean duplicate = rs.getBoolean("duplicate"); - if (idx == 0) { - sb.append("Primary key position: "); - } else { - sb.append("Alternate key position "); - if (duplicate) { - sb.append("(Duplicates): "); - } else { - sb.append("(No duplicate): "); - } + /** + * Process load sub command, which loads data inputted from stdin to the indexed file. + * + * @param indexedFilePath TODO: 準備中 + * @return TODO: 準備中 + */ + private static int processLoadCommand( + String indexedFilePath, + boolean deleteBeforeLoading, + UserDataFormat userDataFormat, + Optional filePath) { + File indexedFile = new File(indexedFilePath); + if (!indexedFile.exists()) { + return ErrorLib.errorFileDoesNotExist(indexedFilePath); + } + if (!indexedFile.isFile()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); + } + Optional cobolFileRet = createCobolFileFromIndexedFilePath(indexedFilePath); + if (!cobolFileRet.isPresent()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); } - sb.append(offset + "-" + (offset + size - 1) + "\n"); - } + CobolIndexedFile cobolIndexedFile = (CobolIndexedFile) cobolFileRet.get(); - System.out.print(sb.toString()); - return 0; - } catch (SQLException e) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - } - - /** - * Process load sub command, which loads data inputted from stdin to the indexed file. - * - * @param indexedFilePath TODO: 準備中 - * @return TODO: 準備中 - */ - private static int processLoadCommand( - String indexedFilePath, - boolean deleteBeforeLoading, - UserDataFormat userDataFormat, - Optional filePath) { - File indexedFile = new File(indexedFilePath); - if (!indexedFile.exists()) { - return ErrorLib.errorFileDoesNotExist(indexedFilePath); - } - if (!indexedFile.isFile()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - Optional cobolFileRet = createCobolFileFromIndexedFilePath(indexedFilePath); - if (!cobolFileRet.isPresent()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - CobolIndexedFile cobolIndexedFile = (CobolIndexedFile) cobolFileRet.get(); - - // Set the module - CobolModule module = - new CobolModule(null, null, null, null, 0, '.', '$', ',', 1, 1, 1, 0, null); - CobolModule.push(module); - - // Open the indexed file - CobolRuntimeException.code = 0; - cobolIndexedFile.setCommitOnModification(false); - cobolIndexedFile.open(CobolFile.COB_OPEN_EXTEND, 0, null); - if (CobolRuntimeException.code != 0) { - return ErrorLib.errorIO(); - } + // Set the module + CobolModule module = + new CobolModule(null, null, null, null, 0, '.', '$', ',', 1, 1, 1, 0, null); + CobolModule.push(module); - if (deleteBeforeLoading) { - cobolIndexedFile.deleteAllRecords(); - } + // Open the indexed file + CobolRuntimeException.code = 0; + cobolIndexedFile.setCommitOnModification(false); + cobolIndexedFile.open(CobolFile.COB_OPEN_EXTEND, 0, null); + if (CobolRuntimeException.code != 0) { + return ErrorLib.errorIO(); + } - RecordReader reader = - RecordReader.getInstance(userDataFormat, cobolIndexedFile.record_max, filePath); - reader.open(); - LoadResult loadResult = LoadResult.LoadResultSuccess; - // Read records from stdin or a file and write them to the indexed file - while (true) { - loadResult = reader.read(cobolIndexedFile.record.getDataStorage()); - if (loadResult != LoadResult.LoadResultSuccess) { - break; - } - - // Write the record to the indexed file - CobolRuntimeException.code = 0; - try { - cobolIndexedFile.write(cobolIndexedFile.record, 0, null); - } catch (CobolStopRunException e) { - loadResult = LoadResult.LoadResultOther; - break; - } - if (CobolRuntimeException.code != 0) { - loadResult = LoadResult.LoadResultOther; - break; - } - } + if (deleteBeforeLoading) { + cobolIndexedFile.deleteAllRecords(); + } - reader.close(); + RecordReader reader = + RecordReader.getInstance(userDataFormat, cobolIndexedFile.record_max, filePath); + reader.open(); + LoadResult loadResult = LoadResult.LoadResultSuccess; + // Read records from stdin or a file and write them to the indexed file + while (true) { + loadResult = reader.read(cobolIndexedFile.record.getDataStorage()); + if (loadResult != LoadResult.LoadResultSuccess) { + break; + } + + // Write the record to the indexed file + CobolRuntimeException.code = 0; + try { + cobolIndexedFile.write(cobolIndexedFile.record, 0, null); + } catch (CobolStopRunException e) { + loadResult = LoadResult.LoadResultOther; + break; + } + if (CobolRuntimeException.code != 0) { + loadResult = LoadResult.LoadResultOther; + break; + } + } - if (loadResult == LoadResult.LoadResultDataSizeMismatch) { - return ErrorLib.errorDataSizeMismatch(cobolIndexedFile.record.getSize()); - } else if (loadResult == LoadResult.LoadResultOther) { - return ErrorLib.errorDuplicateKeys(); - } else { - cobolIndexedFile.commitJdbcTransaction(); - cobolIndexedFile.close(0, null); - return 0; - } - } - - /** - * Process unload sub command, which writes records stored in the indexed file to stdout. - * - * @param indexedFilePath The path of the indexed file. - * @param userDataFormat The format of the output data. If this value is - * UserDataFormat.LINE_SEQUENTIAL, each records are separated by a newline character (0x20). - * If this value is UserDataFormat.SEQUENTIAL, each records are concatenated without any - * separator. - * @return 0 if success, otherwise non-zero. The return value is error code. - */ - private static int processUnloadCommand( - String indexedFilePath, UserDataFormat userDataFormat, Optional filePath) { - File indexedFile = new File(indexedFilePath); - if (!indexedFile.exists()) { - return ErrorLib.errorFileDoesNotExist(indexedFilePath); - } - if (!indexedFile.isFile()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - Optional cobolFileRet = createCobolFileFromIndexedFilePath(indexedFilePath); - if (!cobolFileRet.isPresent()) { - return ErrorLib.errorInvalidIndexedFile(indexedFilePath); - } - CobolFile cobolFile = cobolFileRet.get(); - - // Set the module - CobolModule module = - new CobolModule(null, null, null, null, 0, '.', '$', ',', 1, 1, 1, 0, null); - CobolModule.push(module); - - // Open the indexed file - CobolRuntimeException.code = 0; - cobolFile.open(CobolFile.COB_OPEN_INPUT, 0, null); - if (CobolRuntimeException.code != 0) { - return ErrorLib.errorIO(); - } + reader.close(); - // Read records from the indexed file and write them to stdout or a file - boolean isIndexedFileEmpty = true; - try (OutputStream stream = getOutputStream(filePath)) { - while (true) { - CobolRuntimeException.code = 0; - cobolFile.read(0, null, 1); - if (CobolRuntimeException.code == 0) { - isIndexedFileEmpty = false; - CobolDataStorage storage = cobolFile.record.getDataStorage(); - stream.write(storage.getRefOfData(), storage.getIndex(), cobolFile.record.getSize()); - if (userDataFormat == UserDataFormat.LINE_SEQUENTIAL) { - stream.write('\n'); - } - } else if (CobolRuntimeException.code == 0x0501) { - break; + if (loadResult == LoadResult.LoadResultDataSizeMismatch) { + return ErrorLib.errorDataSizeMismatch(cobolIndexedFile.record.getSize()); + } else if (loadResult == LoadResult.LoadResultOther) { + return ErrorLib.errorDuplicateKeys(); } else { - return ErrorLib.errorIO(); + cobolIndexedFile.commitJdbcTransaction(); + cobolIndexedFile.close(0, null); + return 0; } - } - if (userDataFormat == UserDataFormat.SEQUENTIAL && !isIndexedFileEmpty) { - stream.write('\n'); - } - } catch (IOException e) { - return ErrorLib.errorIO(); } - cobolFile.close(CobolFile.COB_CLOSE_NORMAL, null); + /** + * Process unload sub command, which writes records stored in the indexed file to stdout. + * + * @param indexedFilePath The path of the indexed file. + * @param userDataFormat The format of the output data. If this value is + * UserDataFormat.LINE_SEQUENTIAL, each records are separated by a newline character (0x20). + * If this value is UserDataFormat.SEQUENTIAL, each records are concatenated without any + * separator. + * @return 0 if success, otherwise non-zero. The return value is error code. + */ + private static int processUnloadCommand( + String indexedFilePath, UserDataFormat userDataFormat, Optional filePath) { + File indexedFile = new File(indexedFilePath); + if (!indexedFile.exists()) { + return ErrorLib.errorFileDoesNotExist(indexedFilePath); + } + if (!indexedFile.isFile()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); + } + Optional cobolFileRet = createCobolFileFromIndexedFilePath(indexedFilePath); + if (!cobolFileRet.isPresent()) { + return ErrorLib.errorInvalidIndexedFile(indexedFilePath); + } + CobolFile cobolFile = cobolFileRet.get(); + + // Set the module + CobolModule module = + new CobolModule(null, null, null, null, 0, '.', '$', ',', 1, 1, 1, 0, null); + CobolModule.push(module); + + // Open the indexed file + CobolRuntimeException.code = 0; + cobolFile.open(CobolFile.COB_OPEN_INPUT, 0, null); + if (CobolRuntimeException.code != 0) { + return ErrorLib.errorIO(); + } + + // Read records from the indexed file and write them to stdout or a file + boolean isIndexedFileEmpty = true; + try (OutputStream stream = getOutputStream(filePath)) { + while (true) { + CobolRuntimeException.code = 0; + cobolFile.read(0, null, 1); + if (CobolRuntimeException.code == 0) { + isIndexedFileEmpty = false; + CobolDataStorage storage = cobolFile.record.getDataStorage(); + stream.write( + storage.getRefOfData(), storage.getIndex(), cobolFile.record.getSize()); + if (userDataFormat == UserDataFormat.LINE_SEQUENTIAL) { + stream.write('\n'); + } + } else if (CobolRuntimeException.code == 0x0501) { + break; + } else { + return ErrorLib.errorIO(); + } + } + if (userDataFormat == UserDataFormat.SEQUENTIAL && !isIndexedFileEmpty) { + stream.write('\n'); + } + } catch (IOException e) { + return ErrorLib.errorIO(); + } - CobolModule.pop(); - return 0; - } + cobolFile.close(CobolFile.COB_CLOSE_NORMAL, null); - private static OutputStream getOutputStream(Optional filePath) - throws FileNotFoundException { - if (filePath.isPresent()) { - return new FileOutputStream(filePath.get()); - } else { - return System.out; + CobolModule.pop(); + return 0; } - } - - /** - * Create a CobolFile instance from the path of the indexed file. - * - * @param indexedFilePath TODO: 準備中 - * @return CobolFile instance if success, otherwise empty. - */ - private static Optional createCobolFileFromIndexedFilePath(String indexedFilePath) { - SQLiteConfig config = new SQLiteConfig(); - config.setReadOnly(true); - - try (Connection conn = - DriverManager.getConnection("jdbc:sqlite:" + indexedFilePath, config.toProperties()); - Statement stmt = conn.createStatement(); ) { - - // Retrieve the record size - ResultSet rs = - stmt.executeQuery("select value from metadata_string_int where key = 'record_size'"); - if (!rs.next()) { - return Optional.empty(); - } - int recordSize = rs.getInt("value"); - - // Create a record field - byte[] recordByteArray = new byte[recordSize]; - CobolDataStorage recordDataStorage = new CobolDataStorage(recordByteArray); - AbstractCobolField recordField = - CobolFieldFactory.makeCobolField( - recordSize, recordDataStorage, new CobolFieldAttribute(1, 0, 0, 0, null)); - - // Retrive key information - List keyList = new ArrayList(); - rs = stmt.executeQuery("select idx, offset, size, duplicate from metadata_key order by idx"); - while (rs.next()) { - int offset = rs.getInt("offset"); - int size = rs.getInt("size"); - boolean duplicate = rs.getBoolean("duplicate"); - - CobolFileKey cobolFileKey = new CobolFileKey(); - cobolFileKey.setOffset(offset); - cobolFileKey.setFlag(duplicate ? 1 : 0); - AbstractCobolField keyField = - CobolFieldFactory.makeCobolField( - size, - recordDataStorage.getSubDataStorage(offset), - new CobolFieldAttribute(33, 0, 0, 0, null)); - cobolFileKey.setField(keyField); - - keyList.add(cobolFileKey); - } - - // Construct a CobolFile instance - byte[] fileStatus = new byte[4]; - byte[] indxedFilePathBytes = indexedFilePath.getBytes(); - AbstractCobolField assignField = - CobolFieldFactory.makeCobolField( - indxedFilePathBytes.length, - new CobolDataStorage(indxedFilePathBytes), - new CobolFieldAttribute(33, 0, 0, 0, null)); - CobolFileKey[] keyArray = new CobolFileKey[keyList.size()]; - keyList.toArray(keyArray); - CobolFile cobolFile = - CobolFileFactory.makeCobolFileInstance( - "f", - fileStatus, - assignField, - recordField, - null, - recordSize, - recordSize, - keyArray.length, - keyArray, - (char) 3, - (char) 1, - (char) 0, - (char) 0, - false, - (char) 0, - (char) 0, - false, - false, - false, - (char) 0, - false, - (char) 2, - false, - false, - (char) 0); - conn.close(); - return Optional.of(cobolFile); - } catch (SQLException e) { - return Optional.empty(); + + private static OutputStream getOutputStream(Optional filePath) + throws FileNotFoundException { + if (filePath.isPresent()) { + return new FileOutputStream(filePath.get()); + } else { + return System.out; + } + } + + /** + * Create a CobolFile instance from the path of the indexed file. + * + * @param indexedFilePath TODO: 準備中 + * @return CobolFile instance if success, otherwise empty. + */ + private static Optional createCobolFileFromIndexedFilePath(String indexedFilePath) { + SQLiteConfig config = new SQLiteConfig(); + config.setReadOnly(true); + + try (Connection conn = + DriverManager.getConnection( + "jdbc:sqlite:" + indexedFilePath, config.toProperties()); + Statement stmt = conn.createStatement(); ) { + + // Retrieve the record size + ResultSet rs = + stmt.executeQuery( + "select value from metadata_string_int where key = 'record_size'"); + if (!rs.next()) { + return Optional.empty(); + } + int recordSize = rs.getInt("value"); + + // Create a record field + byte[] recordByteArray = new byte[recordSize]; + CobolDataStorage recordDataStorage = new CobolDataStorage(recordByteArray); + AbstractCobolField recordField = + CobolFieldFactory.makeCobolField( + recordSize, + recordDataStorage, + new CobolFieldAttribute(1, 0, 0, 0, null)); + + // Retrive key information + List keyList = new ArrayList(); + rs = + stmt.executeQuery( + "select idx, offset, size, duplicate from metadata_key order by idx"); + while (rs.next()) { + int offset = rs.getInt("offset"); + int size = rs.getInt("size"); + boolean duplicate = rs.getBoolean("duplicate"); + + CobolFileKey cobolFileKey = new CobolFileKey(); + cobolFileKey.setOffset(offset); + cobolFileKey.setFlag(duplicate ? 1 : 0); + AbstractCobolField keyField = + CobolFieldFactory.makeCobolField( + size, + recordDataStorage.getSubDataStorage(offset), + new CobolFieldAttribute(33, 0, 0, 0, null)); + cobolFileKey.setField(keyField); + + keyList.add(cobolFileKey); + } + + // Construct a CobolFile instance + byte[] fileStatus = new byte[4]; + byte[] indxedFilePathBytes = indexedFilePath.getBytes(); + AbstractCobolField assignField = + CobolFieldFactory.makeCobolField( + indxedFilePathBytes.length, + new CobolDataStorage(indxedFilePathBytes), + new CobolFieldAttribute(33, 0, 0, 0, null)); + CobolFileKey[] keyArray = new CobolFileKey[keyList.size()]; + keyList.toArray(keyArray); + CobolFile cobolFile = + CobolFileFactory.makeCobolFileInstance( + "f", + fileStatus, + assignField, + recordField, + null, + recordSize, + recordSize, + keyArray.length, + keyArray, + (char) 3, + (char) 1, + (char) 0, + (char) 0, + false, + (char) 0, + (char) 0, + false, + false, + false, + (char) 0, + false, + (char) 2, + false, + false, + (char) 0); + conn.close(); + return Optional.of(cobolFile); + } catch (SQLException e) { + return Optional.empty(); + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java index f6f75f3d..e4de5757 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java @@ -2,12 +2,12 @@ /** Enum to specify the result of the load operation. */ enum LoadResult { - /** The load operation succeeded. */ - LoadResultSuccess, - /** The load operation failed because there exists a record whose size is invalid. */ - LoadResultDataSizeMismatch, - /** The load operation failed because duplicate keys are detected or other error occurs. */ - LoadResultOther, - /** Reach the end of input data */ - AtEnd, + /** The load operation succeeded. */ + LoadResultSuccess, + /** The load operation failed because there exists a record whose size is invalid. */ + LoadResultDataSizeMismatch, + /** The load operation failed because duplicate keys are detected or other error occurs. */ + LoadResultOther, + /** Reach the end of input data */ + AtEnd, }; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordReader.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordReader.java index 0383447a..16c88f98 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordReader.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordReader.java @@ -5,41 +5,41 @@ /** TODO: 準備中 */ interface RecordReader { - /** TODO: 準備中 */ - void open(); + /** TODO: 準備中 */ + void open(); - /** - * TODO: 準備中 - * - * @param record TODO: 準備中 - * @return TODO: 準備中 - */ - LoadResult read(CobolDataStorage record); + /** + * TODO: 準備中 + * + * @param record TODO: 準備中 + * @return TODO: 準備中 + */ + LoadResult read(CobolDataStorage record); - /** TODO: 準備中 */ - void close(); + /** TODO: 準備中 */ + void close(); - /** - * TODO: 準備中 - * - * @param userDataFormat TODO: 準備中 - * @param recordSize TODO: 準備中 - * @param filePath TODO: 準備中 - * @return TODO: 準備中 - */ - static RecordReader getInstance( - UserDataFormat userDataFormat, int recordSize, Optional filePath) { - if (filePath.isPresent()) { - switch (userDataFormat) { - case LINE_SEQUENTIAL: - return new FileLineSeqRecordReader(recordSize, filePath.get()); - case SEQUENTIAL: - return new FileSeqRecordReader(recordSize, filePath.get()); - default: - return null; - } - } else { - return StdinRecordReader.getInstance(userDataFormat, recordSize); + /** + * TODO: 準備中 + * + * @param userDataFormat TODO: 準備中 + * @param recordSize TODO: 準備中 + * @param filePath TODO: 準備中 + * @return TODO: 準備中 + */ + static RecordReader getInstance( + UserDataFormat userDataFormat, int recordSize, Optional filePath) { + if (filePath.isPresent()) { + switch (userDataFormat) { + case LINE_SEQUENTIAL: + return new FileLineSeqRecordReader(recordSize, filePath.get()); + case SEQUENTIAL: + return new FileSeqRecordReader(recordSize, filePath.get()); + default: + return null; + } + } else { + return StdinRecordReader.getInstance(userDataFormat, recordSize); + } } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordWriter.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordWriter.java index ef869e9a..ba2c683a 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordWriter.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/RecordWriter.java @@ -2,17 +2,17 @@ /** TODO: 準備中 */ interface RecordWriter { - /** TODO: 準備中 */ - void open(); + /** TODO: 準備中 */ + void open(); - /** - * TODO: 準備中 - * - * @param record TODO: 準備中 - * @return TODO: 準備中 - */ - boolean write(byte[] record); + /** + * TODO: 準備中 + * + * @param record TODO: 準備中 + * @return TODO: 準備中 + */ + boolean write(byte[] record); - /** TODO: 準備中 */ - void close(); + /** TODO: 準備中 */ + void close(); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/StdinRecordReader.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/StdinRecordReader.java index a213a89e..bc5d8d68 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/StdinRecordReader.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/StdinRecordReader.java @@ -5,125 +5,126 @@ /** TODO: 準備中 */ class StdinRecordReader implements RecordReader { - /** TODO: 準備中 */ - protected int recordSize; - /** TODO: 準備中 */ - protected Scanner scan; + /** TODO: 準備中 */ + protected int recordSize; - /** - * TODO: 準備中 - * - * @param recordSize TODO: 準備中 - */ - protected StdinRecordReader(int recordSize) { - this.recordSize = recordSize; - } + /** TODO: 準備中 */ + protected Scanner scan; - @Override - public void open() { - this.scan = new Scanner(System.in); - } - - @Override - public LoadResult read(CobolDataStorage record) { - return null; - } - - @Override - public void close() { - this.scan.close(); - } - - static class StdinLineSeqReader extends StdinRecordReader { /** * TODO: 準備中 * * @param recordSize TODO: 準備中 */ - StdinLineSeqReader(int recordSize) { - super(recordSize); + protected StdinRecordReader(int recordSize) { + this.recordSize = recordSize; } @Override - public LoadResult read(CobolDataStorage record) { - if (scan.hasNextLine()) { - byte[] readData = scan.nextLine().getBytes(); - if (readData.length != this.recordSize) { - return LoadResult.LoadResultDataSizeMismatch; - } - record.memcpy(readData, this.recordSize); - return LoadResult.LoadResultSuccess; - } else { - return LoadResult.AtEnd; - } + public void open() { + this.scan = new Scanner(System.in); } - } - static class StdinSeqReader extends StdinRecordReader { - private boolean firstFetchFail; - private byte[] readData; - private int readDataOffset; - - /** - * TODO: 準備中 - * - * @param recordSize TODO: 準備中 - */ - public StdinSeqReader(int recordSize) { - super(recordSize); + @Override + public LoadResult read(CobolDataStorage record) { + return null; } @Override - public void open() { - super.open(); - this.firstFetchFail = false; - this.readData = null; - this.readDataOffset = 0; + public void close() { + this.scan.close(); } - @Override - public LoadResult read(CobolDataStorage record) { - if (firstFetchFail) { - return LoadResult.LoadResultDataSizeMismatch; - } - if (readData == null) { - if (!this.scan.hasNextLine()) { - return LoadResult.AtEnd; + static class StdinLineSeqReader extends StdinRecordReader { + /** + * TODO: 準備中 + * + * @param recordSize TODO: 準備中 + */ + StdinLineSeqReader(int recordSize) { + super(recordSize); } - this.readData = this.scan.next().getBytes(); - if (readData.length % this.recordSize != 0) { - this.firstFetchFail = true; - return LoadResult.LoadResultDataSizeMismatch; + + @Override + public LoadResult read(CobolDataStorage record) { + if (scan.hasNextLine()) { + byte[] readData = scan.nextLine().getBytes(); + if (readData.length != this.recordSize) { + return LoadResult.LoadResultDataSizeMismatch; + } + record.memcpy(readData, this.recordSize); + return LoadResult.LoadResultSuccess; + } else { + return LoadResult.AtEnd; + } } - } - if (readDataOffset >= readData.length) { - return LoadResult.AtEnd; - } - record.memcpy(this.readData, this.readDataOffset, this.recordSize); - this.readDataOffset += this.recordSize; - return LoadResult.LoadResultSuccess; } - } - /** - * TODO: 準備中 - * - * @param userDataFormat TODO: 準備中 - * @param recordSize TODO: 準備中 - * @return TODO: 準備中 - */ - static RecordReader getInstance(UserDataFormat userDataFormat, int recordSize) { - switch (userDataFormat) { - case LINE_SEQUENTIAL: - { - return new StdinLineSeqReader(recordSize); + static class StdinSeqReader extends StdinRecordReader { + private boolean firstFetchFail; + private byte[] readData; + private int readDataOffset; + + /** + * TODO: 準備中 + * + * @param recordSize TODO: 準備中 + */ + public StdinSeqReader(int recordSize) { + super(recordSize); } - case SEQUENTIAL: - { - return new StdinSeqReader(recordSize); + + @Override + public void open() { + super.open(); + this.firstFetchFail = false; + this.readData = null; + this.readDataOffset = 0; + } + + @Override + public LoadResult read(CobolDataStorage record) { + if (firstFetchFail) { + return LoadResult.LoadResultDataSizeMismatch; + } + if (readData == null) { + if (!this.scan.hasNextLine()) { + return LoadResult.AtEnd; + } + this.readData = this.scan.next().getBytes(); + if (readData.length % this.recordSize != 0) { + this.firstFetchFail = true; + return LoadResult.LoadResultDataSizeMismatch; + } + } + if (readDataOffset >= readData.length) { + return LoadResult.AtEnd; + } + record.memcpy(this.readData, this.readDataOffset, this.recordSize); + this.readDataOffset += this.recordSize; + return LoadResult.LoadResultSuccess; + } + } + + /** + * TODO: 準備中 + * + * @param userDataFormat TODO: 準備中 + * @param recordSize TODO: 準備中 + * @return TODO: 準備中 + */ + static RecordReader getInstance(UserDataFormat userDataFormat, int recordSize) { + switch (userDataFormat) { + case LINE_SEQUENTIAL: + { + return new StdinLineSeqReader(recordSize); + } + case SEQUENTIAL: + { + return new StdinSeqReader(recordSize); + } + default: + return null; } - default: - return null; } - } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java index 92d867d7..7dfefdbe 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java @@ -2,14 +2,14 @@ /** Enum to specify the format of the input and output data. */ enum UserDataFormat { - /** - * This value means the line-sequential format of COBOL. Each records are separated by a newline - * character (0x20). - */ - LINE_SEQUENTIAL, - /** - * This value means the sequential format of COBOL. Each records are concatenated without any - * separator. - */ - SEQUENTIAL, + /** + * This value means the line-sequential format of COBOL. Each records are separated by a newline + * character (0x20). + */ + LINE_SEQUENTIAL, + /** + * This value means the sequential format of COBOL. Each records are concatenated without any + * separator. + */ + SEQUENTIAL, } diff --git a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesTest.java b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesTest.java index 5612c709..9eb933ed 100644 --- a/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesTest.java +++ b/libcobj/app/src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesTest.java @@ -13,29 +13,29 @@ class ApiFilesTest { - boolean compOutputFiles(String fileName) { - ApiFiles.javaCreate(fileName); - try { - return Arrays.equals( - Files.readAllBytes( - Paths.get( - "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testController.txt")), - Files.readAllBytes(Paths.get("testController.java"))) - && Arrays.equals( - Files.readAllBytes( - Paths.get( - "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt")), - Files.readAllBytes(Paths.get("testRecord.java"))); - } catch (IOException e) { - e.printStackTrace(); - return false; + boolean compOutputFiles(String fileName) { + ApiFiles.javaCreate(fileName); + try { + return Arrays.equals( + Files.readAllBytes( + Paths.get( + "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testController.txt")), + Files.readAllBytes(Paths.get("testController.java"))) + && Arrays.equals( + Files.readAllBytes( + Paths.get( + "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/testRecord.txt")), + Files.readAllBytes(Paths.get("testRecord.java"))); + } catch (IOException e) { + e.printStackTrace(); + return false; + } } - } - @Test - void checkOutputFiles() { - String fileName = - "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/test.json"; - assertTrue(compOutputFiles(fileName)); - } + @Test + void checkOutputFiles() { + String fileName = + "src/test/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/test.json"; + assertTrue(compOutputFiles(fileName)); + } } From 19d574abc6b768e25398d9e1918bb5be17df946e Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:44:38 +0900 Subject: [PATCH 043/188] Install extra libraries in a dev container (#530) --- .devcontainer/Dockerfile | 2 +- Makefile.in | 20 +- aclocal.m4 | 141 +- bin/Makefile.in | 10 +- cobj/Makefile.in | 15 +- config.h.in | 22 +- config/Makefile.in | 8 +- configure | 6739 ++++++++++++++++--------------------- copy/Makefile.in | 8 +- lib/Makefile.in | 10 +- libcobj/Makefile.in | 8 +- tests/Makefile.in | 15 +- tests/cobol85/Makefile.in | 11 +- 13 files changed, 3098 insertions(+), 3911 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3b967bb9..aa31b1c2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -9,4 +9,4 @@ RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar' >> ~/.bashrc # install dependencies RUN dnf update -y RUN dnf install -y epel-release -RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck +RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck libtool gettext-devel diff --git a/Makefile.in b/Makefile.in index fbe138e1..2f44ed02 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -208,6 +208,9 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ABOUT-NLS AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS \ @@ -250,8 +253,6 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip -# Exists only to be overridden by the user if desired. -AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -289,8 +290,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -302,7 +301,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -647,6 +645,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -796,7 +795,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -858,8 +857,7 @@ installdirs-am: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive +install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -961,7 +959,7 @@ ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS .MAKE: $(am__recursive_targets) all check install install-am \ - install-exec install-strip + install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ diff --git a/aclocal.m4 b/aclocal.m4 index e795c66f..63cb62ce 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) @@ -3453,6 +3453,7 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -3764,8 +3765,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -3794,11 +3795,11 @@ _LT_EOF # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) + 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -4215,7 +4216,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -5589,6 +5590,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -5597,7 +5601,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -5609,18 +5613,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -6280,7 +6272,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -6786,8 +6778,7 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7159,7 +7150,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -7427,12 +7418,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -7677,9 +7662,6 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -7742,9 +7724,6 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -7999,7 +7978,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -8520,7 +8499,6 @@ _LT_EOF if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -8542,7 +8520,7 @@ _LT_EOF esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -9164,7 +9142,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -9539,7 +9517,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -9604,7 +9582,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -9943,7 +9921,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -10027,7 +10005,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -10038,7 +10016,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' @@ -12359,7 +12337,7 @@ fi AC_SUBST([$1])dnl ]) -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12374,7 +12352,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -12390,14 +12368,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12449,7 +12427,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12480,7 +12458,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12671,7 +12649,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12739,7 +12717,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12767,10 +12745,6 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -m4_ifdef([_$0_ALREADY_INIT], - [m4_fatal([$0 expanded multiple times -]m4_defn([_$0_ALREADY_INIT]))], - [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -12807,7 +12781,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -12859,20 +12833,6 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi -AC_SUBST([CTAGS]) -if test -z "$ETAGS"; then - ETAGS=etags -fi -AC_SUBST([ETAGS]) -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi -AC_SUBST([CSCOPE]) - AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -12954,7 +12914,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12975,7 +12935,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12997,7 +12957,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13032,7 +12992,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13075,7 +13035,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13096,7 +13056,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -13109,7 +13074,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13138,7 +13103,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13185,7 +13150,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13204,7 +13169,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13285,7 +13250,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13345,7 +13310,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13373,7 +13338,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13392,7 +13357,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/bin/Makefile.in b/bin/Makefile.in index 94357239..b0af4b8b 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -217,6 +217,8 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cob-config.in \ $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -253,8 +255,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -266,7 +266,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -600,6 +599,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/cobj/Makefile.in b/cobj/Makefile.in index 1e0fd25f..e7926526 100644 --- a/cobj/Makefile.in +++ b/cobj/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -200,6 +200,8 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -236,8 +238,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -249,7 +249,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -732,6 +731,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -775,8 +775,7 @@ installdirs: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -899,7 +898,7 @@ ps-am: uninstall-am: uninstall-binPROGRAMS -.MAKE: all check install install-am install-exec install-strip +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ diff --git a/config.h.in b/config.h.in index 5fdfd0db..b6c1932a 100644 --- a/config.h.in +++ b/config.h.in @@ -36,17 +36,23 @@ /* Strip command */ #undef COB_STRIP_CMD -/* Define to 1 if using 'alloca.c'. */ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -/* Define to 1 if you have 'alloca', as a function or macro. */ +/* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA -/* Define to 1 if works. */ +/* Define to 1 if you have and it should be used (not on Ultrix). + */ #undef HAVE_ALLOCA_H /* Has __attribute__((aligned)) */ @@ -106,6 +112,9 @@ /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET @@ -124,9 +133,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -216,9 +222,7 @@ STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION -/* Define to 1 if all of the C90 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ diff --git a/config/Makefile.in b/config/Makefile.in index ae8a2663..9b11aece 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -202,8 +202,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -215,7 +213,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -404,6 +401,7 @@ ctags CTAGS: cscope cscopelist: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/configure b/configure index f6b06a19..bbb9c112 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for opensource COBOL 4J 1.1.2. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,15 +187,12 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -192,38 +207,30 @@ test \$(( 1 + 1 )) = 2 || exit 1 PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -231,21 +238,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -263,19 +263,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: ws-opensource-cobol-contact@osscons.jp about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run @@ -303,7 +302,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -321,14 +319,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -343,7 +333,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -352,7 +342,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -391,13 +381,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -409,27 +398,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -441,9 +421,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -470,7 +450,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -514,7 +494,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -528,10 +508,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -545,13 +521,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -629,37 +598,40 @@ PACKAGE_URL='' ac_unique_file="libcobj.h" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= -ac_func_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE @@ -761,9 +733,6 @@ AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -CSCOPE -ETAGS -CTAGS am__untar am__tar AMTAR @@ -931,6 +900,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -971,9 +942,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -997,9 +968,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1210,9 +1181,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1226,9 +1197,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1272,9 +1243,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1290,7 +1261,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1354,7 +1325,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1563,9 +1534,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1593,8 +1564,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1602,7 +1572,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1612,9 +1582,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF opensource COBOL 4J configure 1.1.2 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1631,14 +1601,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1646,15 +1616,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1676,7 +1645,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1684,15 +1653,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1708,14 +1676,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1723,18 +1691,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1756,44 +1723,83 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1801,9 +1807,16 @@ else $as_nop #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1821,25 +1834,24 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -1856,7 +1868,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1864,15 +1876,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1888,14 +1899,14 @@ fi ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1903,18 +1914,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1935,14 +1945,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1950,18 +1960,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1976,48 +1985,96 @@ fi } # ac_fn_f77_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - ac_retval=$ac_status +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------------- ## +## Report this to ws-opensource-cobol-contact@osscons.jp ## +## ----------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_c_try_run +} # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- @@ -2026,18 +2083,17 @@ fi ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2045,13 +2101,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2059,50 +2114,29 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by opensource COBOL 4J $as_me 1.1.2, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2135,12 +2169,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2175,7 +2205,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2210,13 +2240,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2227,8 +2255,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2252,7 +2280,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2260,14 +2288,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2275,15 +2303,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2291,8 +2319,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2306,48 +2334,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2357,436 +2400,20 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" -gt_needs="$gt_needs " - -# Auxiliary files required by this configure script. -ac_aux_files="config.rpath ltmain.sh config.guess config.sub compile missing install-sh" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file fi +gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2797,12 +2424,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2811,24 +2438,24 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2838,12 +2465,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2886,9 +2512,36 @@ fi am__api_version='1.16' +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -2902,25 +2555,20 @@ am__api_version='1.16' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -2930,13 +2578,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -2944,12 +2592,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -2965,7 +2613,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -2975,8 +2623,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2986,8 +2634,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3041,8 +2689,8 @@ else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -3061,23 +2709,26 @@ test "$program_suffix" != NONE && # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3097,12 +2748,11 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3110,15 +2760,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3129,11 +2775,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3142,12 +2788,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3155,15 +2800,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3174,11 +2815,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3186,8 +2827,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3199,31 +2840,25 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done @@ -3234,7 +2869,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3244,19 +2879,18 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3264,15 +2898,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3283,25 +2913,24 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3317,12 +2946,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3336,8 +2965,7 @@ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -3347,13 +2975,12 @@ case $enable_silent_rules in # ((( *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3365,8 +2992,8 @@ else am_cv_make_support_nested_variables=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3401,10 +3028,14 @@ fi VERSION='1.1.2' -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF # Some tools Automake needs. @@ -3444,20 +3075,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi - -if test -z "$ETAGS"; then - ETAGS=etags -fi - -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi - - # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -3502,18 +3119,17 @@ END fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test ${enable_maintainer_mode+y} -then : +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else $as_nop +else USE_MAINTAINER_MODE=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -3549,7 +3165,7 @@ fi -printf "%s\n" "#define __USE_STRING_INLINES 1" >>confdefs.h +$as_echo "#define __USE_STRING_INLINES 1" >>confdefs.h LIBCOB_LIBS="-lm" @@ -3557,15 +3173,6 @@ LIBCOB_CFLAGS="$lt_prog_compiler_pic" save_libs="$LIBS" - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3576,12 +3183,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3589,15 +3195,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3608,11 +3210,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3625,12 +3227,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3638,15 +3239,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3657,11 +3254,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3673,8 +3270,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3682,23 +3279,23 @@ esac fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3708,7 +3305,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3716,7 +3313,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -3728,9 +3325,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3751,12 +3348,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3773,7 +3369,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3789,46 +3385,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3842,15 +3436,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3859,7 +3453,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3871,8 +3465,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3880,10 +3474,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3891,40 +3485,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -3938,12 +3531,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3952,32 +3544,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -3987,33 +3578,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4022,60 +3609,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4090,144 +3674,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -4236,23 +3770,21 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4280,8 +3812,8 @@ _ACEOF rm -f core conftest* unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4300,8 +3832,8 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -4337,12 +3869,11 @@ esac fi done rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -4363,12 +3894,11 @@ fi depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4475,8 +4005,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4495,36 +4025,40 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -4536,11 +4070,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -4550,8 +4083,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : break fi @@ -4563,24 +4095,29 @@ fi else ac_cv_prog_CPP=$CPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -4592,11 +4129,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -4606,12 +4142,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -4622,12 +4157,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -4635,15 +4169,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -4652,13 +4181,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4686,17 +4215,16 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -4707,15 +4235,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -4724,13 +4247,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4759,8 +4282,8 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" @@ -4770,21 +4293,19 @@ printf "%s\n" "$ac_cv_path_EGREP" >&6; } COB_CC="" # Check whether --with-cc was given. -if test ${with_cc+y} -then : +if test "${with_cc+set}" = set; then : withval=$with_cc; COB_CC=$withval -else $as_nop +else COB_CC=$CC fi # Check whether --with-seqra-extfh was given. -if test ${with_seqra_extfh+y} -then : +if test "${with_seqra_extfh+set}" = set; then : withval=$with_seqra_extfh; if test "$with_seqra_extfh" = "yes" then - printf "%s\n" "#define WITH_SEQRA_EXTFH 1" >>confdefs.h + $as_echo "#define WITH_SEQRA_EXTFH 1" >>confdefs.h fi fi @@ -4801,8 +4322,7 @@ fi GEN_DEBUG_OPT="no" # Check whether --enable-debug was given. -if test ${enable_debug+y} -then : +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if test "$enable_debug" = "yes" then GEN_DEBUG_OPT="yes" @@ -4811,22 +4331,20 @@ fi # Check whether --enable-param-check was given. -if test ${enable_param_check+y} -then : +if test "${enable_param_check+set}" = set; then : enableval=$enable_param_check; if test "$enable_param_check" = "yes" then - printf "%s\n" "#define COB_PARAM_CHECK 1" >>confdefs.h + $as_echo "#define COB_PARAM_CHECK 1" >>confdefs.h fi fi # Check whether --enable-utf8 was given. -if test ${enable_utf8+y} -then : +if test "${enable_utf8+set}" = set; then : enableval=$enable_utf8; if test "$enable_utf8" = "yes" then - printf "%s\n" "#define I18N_UTF8 1" >>confdefs.h + $as_echo "#define I18N_UTF8 1" >>confdefs.h COB_M4_FLAGS=-DM4.I18N_UTF8 fi @@ -4844,8 +4362,7 @@ fi WITH_VARSEQ=0 # Check whether --with-varseq was given. -if test ${with_varseq+y} -then : +if test "${with_varseq+set}" = set; then : withval=$with_varseq; case $with_varseq in yes) as_fn_error $? "\"You must give --with-varseq an argument.\"" "$LINENO" 5 ;; @@ -4858,7 +4375,9 @@ then : esac fi -printf "%s\n" "#define WITH_VARSEQ $WITH_VARSEQ" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define WITH_VARSEQ $WITH_VARSEQ +_ACEOF # Checks for programs. @@ -4866,15 +4385,15 @@ printf "%s\n" "#define WITH_VARSEQ $WITH_VARSEQ" >>confdefs.h with_tags= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi @@ -4882,29 +4401,26 @@ enable_dlopen=yes +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -4923,22 +4439,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -4964,12 +4479,11 @@ case $host in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else @@ -4977,15 +4491,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4996,11 +4506,11 @@ fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -printf "%s\n" "$AS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5009,12 +4519,11 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else @@ -5022,15 +4531,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5041,11 +4546,11 @@ fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -printf "%s\n" "$ac_ct_AS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then @@ -5053,8 +4558,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS @@ -5066,12 +4571,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -5079,15 +4583,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5098,11 +4598,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5111,12 +4611,11 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -5124,15 +4623,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5143,11 +4638,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -5155,8 +4650,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -5168,12 +4663,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -5181,15 +4675,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5200,11 +4690,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5213,12 +4703,11 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -5226,15 +4715,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5245,11 +4730,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -5257,8 +4742,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -5292,8 +4777,8 @@ test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -5313,7 +4798,6 @@ macro_revision='2.4.6' - ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within @@ -5337,8 +4821,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -5364,12 +4848,12 @@ func_echo_all () } case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac @@ -5385,12 +4869,11 @@ esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5404,15 +4887,10 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5421,13 +4899,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5455,8 +4933,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5473,12 +4951,11 @@ Xsed="$SED -e 1s/^X//" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5489,15 +4966,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5506,13 +4978,13 @@ case `"$ac_path_FGREP" --version 2>&1` in ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5541,8 +5013,8 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5567,18 +5039,17 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5607,16 +5078,15 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5645,19 +5115,18 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5680,12 +5149,11 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -5735,8 +5203,8 @@ else : ${lt_cv_path_NM=no} fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -5749,12 +5217,11 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -5762,15 +5229,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5781,11 +5244,11 @@ fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5798,12 +5261,11 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -5811,15 +5273,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5830,11 +5288,11 @@ fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5846,8 +5304,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -5875,12 +5333,11 @@ test -z "$NM" && NM=nm -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -5896,16 +5353,15 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else i=0 teststring=ABCD @@ -6032,11 +5488,11 @@ else $as_nop fi if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6080,12 +5536,11 @@ esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else case $host in *-*-mingw* ) case $build in @@ -6121,19 +5576,18 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6149,23 +5603,22 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_reload_flag='-r' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6198,12 +5651,11 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6211,15 +5663,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6230,11 +5678,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6243,12 +5691,11 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6256,15 +5703,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6275,11 +5718,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6287,8 +5730,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6304,12 +5747,11 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6427,7 +5869,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6505,8 +5947,8 @@ os2*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6550,12 +5992,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6563,15 +6004,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6582,11 +6019,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6595,12 +6032,11 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6608,15 +6044,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6627,11 +6059,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6639,8 +6071,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6657,12 +6089,11 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6685,8 +6116,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6702,12 +6133,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6715,15 +6145,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6734,11 +6160,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6751,12 +6177,11 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6764,15 +6189,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6783,11 +6204,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6799,8 +6220,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6808,7 +6229,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} @@ -6820,32 +6241,30 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -6853,7 +6272,7 @@ then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -6862,11 +6281,11 @@ then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -6883,12 +6302,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -6896,15 +6314,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6915,11 +6329,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6928,12 +6342,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -6941,15 +6354,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6960,11 +6369,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -6972,8 +6381,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -6992,12 +6401,11 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -7005,15 +6413,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7024,11 +6428,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7037,12 +6441,11 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -7050,15 +6453,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7069,11 +6468,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -7081,8 +6480,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7171,12 +6570,11 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7328,12 +6726,15 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7401,7 +6802,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7436,11 +6837,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi # Response file support. @@ -7486,14 +6887,13 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; -else $as_nop +else with_sysroot=no fi @@ -7511,25 +6911,24 @@ case $with_sysroot in #( no|'') ;; #( *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7540,15 +6939,10 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7568,16 +6962,15 @@ fi rm -f conftest.i conftest2.i conftest.out fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7588,8 +6981,8 @@ fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } @@ -7612,8 +7005,7 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7629,7 +7021,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -7649,7 +7041,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -7687,7 +7079,7 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -7728,7 +7120,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -7791,12 +7183,11 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7807,20 +7198,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes -else $as_nop +else lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7829,8 +7219,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -7843,7 +7233,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -7880,12 +7270,11 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -7893,15 +7282,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7912,11 +7297,11 @@ fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7925,12 +7310,11 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -7938,15 +7322,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7957,11 +7337,11 @@ fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -7969,8 +7349,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -7980,12 +7360,11 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -7995,8 +7374,8 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8011,12 +7390,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -8024,15 +7402,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8043,11 +7417,11 @@ fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8056,12 +7430,11 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -8069,15 +7442,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8088,11 +7457,11 @@ fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8100,8 +7469,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8113,12 +7482,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8126,15 +7494,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8145,11 +7509,11 @@ fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8158,12 +7522,11 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8171,15 +7534,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8190,11 +7549,11 @@ fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8202,8 +7561,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8215,12 +7574,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8228,15 +7586,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8247,11 +7601,11 @@ fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8260,12 +7614,11 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8273,15 +7626,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8292,11 +7641,11 @@ fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8304,8 +7653,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8317,12 +7666,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8330,15 +7678,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8349,11 +7693,11 @@ fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8362,12 +7706,11 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8375,15 +7718,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8394,11 +7733,11 @@ fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8406,8 +7745,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8419,12 +7758,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8432,15 +7770,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8451,11 +7785,11 @@ fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8464,12 +7798,11 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8477,15 +7810,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8496,11 +7825,11 @@ fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8508,8 +7837,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8544,12 +7873,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8578,15 +7906,14 @@ else $as_nop rm -f conftest.* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8595,41 +7922,39 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes -else $as_nop +else lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8649,8 +7974,8 @@ _LT_EOF rm -rf conftest.dSYM fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -8661,11 +7986,11 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; } # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[912]*) + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) + 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -8721,43 +8046,149 @@ func_munge_path_list () esac } -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +fi -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi +done + @@ -8781,8 +8212,7 @@ func_stripname_cnf () # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8800,7 +8230,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_shared=yes fi @@ -8813,8 +8243,7 @@ fi # Check whether --enable-static was given. -if test ${enable_static+y} -then : +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8832,7 +8261,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_static=yes fi @@ -8846,8 +8275,7 @@ fi # Check whether --with-pic was given. -if test ${with_pic+y} -then : +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -8864,7 +8292,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else pic_mode=default fi @@ -8876,8 +8304,7 @@ fi # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8895,7 +8322,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_fast_install=yes fi @@ -8909,12 +8336,11 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : +if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -8923,19 +8349,18 @@ then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9017,12 +8442,11 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -9033,15 +8457,17 @@ else fi rmdir .libs 2>/dev/null fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF @@ -9087,12 +8513,11 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9141,11 +8566,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9154,12 +8579,11 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9208,11 +8632,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9293,12 +8717,11 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9329,8 +8752,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9527,12 +8950,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -9693,28 +9110,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9745,8 +9160,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9774,12 +9189,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -9803,8 +9217,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -9818,12 +9232,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9866,20 +9279,19 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9922,8 +9334,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9931,19 +9343,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9955,8 +9367,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10014,9 +9426,6 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; esac ld_shlibs=yes @@ -10271,7 +9680,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -10514,23 +9923,21 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10545,7 +9952,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10569,23 +9976,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10600,7 +10005,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10851,12 +10256,11 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -10880,8 +10284,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -10921,34 +10325,31 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else $as_nop +else lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -10970,7 +10371,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11225,8 +10626,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11262,19 +10663,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11292,7 +10692,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11306,8 +10706,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11466,8 +10866,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -12028,10 +11428,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -12041,21 +11440,19 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12069,6 +11466,9 @@ fi # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -12077,7 +11477,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12089,18 +11489,6 @@ fi dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -12299,8 +11687,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12421,8 +11809,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12446,8 +11834,8 @@ else # directories. hardcode_action=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12491,12 +11879,11 @@ else darwin*) # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12505,31 +11892,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop +else lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12549,16 +11937,14 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12567,42 +11953,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else $as_nop +else ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop +else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12611,37 +11996,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12650,37 +12035,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes -else $as_nop +else ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12689,29 +12074,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dld_link (); int -main (void) +main () { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes -else $as_nop +else ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12750,12 +12136,11 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -12834,7 +12219,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12852,17 +12237,16 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -12941,7 +12325,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12959,8 +12343,8 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -12998,13 +12382,13 @@ fi striplib= old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -13012,16 +12396,16 @@ else if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac fi @@ -13038,13 +12422,13 @@ fi # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -13068,15 +12452,15 @@ printf %s "checking whether to build shared libraries... " >&6; } fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -13098,32 +12482,36 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -printf %s "checking how to run the C++ preprocessor... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test ${ac_cv_prog_CXXCPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CXX needs to be expanded - for CXXCPP in "$CXX -E" cpp /lib/cpp + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -13135,11 +12523,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -13149,8 +12536,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : break fi @@ -13162,24 +12548,29 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -printf "%s\n" "$CXXCPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -13191,11 +12582,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO" -then : +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -13205,12 +12595,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -13346,18 +12735,17 @@ cc_basename=$func_cc_basename_result # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -13386,16 +12774,15 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -13424,19 +12811,18 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -13493,7 +12879,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -13502,8 +12888,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld fi # PORTME: fill in a description of your system's C++ link characteristics - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -13641,23 +13027,21 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13672,7 +13056,7 @@ then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -13697,23 +13081,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13728,7 +13110,7 @@ then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -13989,7 +13371,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -14054,7 +13436,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -14393,7 +13775,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -14477,7 +13859,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -14488,7 +13870,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -14579,8 +13961,8 @@ fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX @@ -14618,7 +14000,7 @@ esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. @@ -15001,7 +14383,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -15099,28 +14481,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -15151,8 +14531,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in @@ -15174,12 +14554,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -15203,8 +14582,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : @@ -15215,12 +14594,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -15263,17 +14641,16 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -15316,8 +14693,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } @@ -15325,19 +14702,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -15346,8 +14723,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' @@ -15381,16 +14758,13 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_CXX=no - ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -printf "%s\n" "$ld_shlibs_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -15417,19 +14791,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -15447,7 +14820,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no @@ -15461,8 +14834,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac @@ -15531,8 +14904,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' @@ -16020,10 +15393,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -16033,21 +15405,19 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -16061,6 +15431,9 @@ fi # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -16069,7 +15442,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -16081,18 +15454,6 @@ fi dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -16291,8 +15652,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -16356,8 +15717,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || @@ -16381,8 +15742,8 @@ else # directories. hardcode_action_CXX=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -printf "%s\n" "$hardcode_action_CXX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then @@ -16522,13 +15883,13 @@ cc_basename=$func_cc_basename_result GCC=$G77 if test -n "$compiler"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -16551,15 +15912,15 @@ printf %s "checking whether to build shared libraries... " >&6; } fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } GCC_F77=$G77 LD_F77=$LD @@ -16750,12 +16111,6 @@ lt_prog_compiler_static_F77= lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fPIC' - lt_prog_compiler_static_F77='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -16916,28 +16271,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -16968,8 +16321,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then case $lt_prog_compiler_pic_F77 in @@ -16991,12 +16344,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -17020,8 +16372,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_F77"; then : @@ -17032,12 +16384,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest @@ -17080,17 +16431,16 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest @@ -17133,8 +16483,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } @@ -17142,19 +16492,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -17163,8 +16513,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= @@ -17222,9 +16572,6 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_F77=no - ;; esac ld_shlibs_F77=yes @@ -17479,7 +16826,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -17722,17 +17069,15 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -17747,7 +17092,7 @@ then : lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77=/usr/lib:/lib @@ -17771,17 +17116,15 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath__F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -17796,7 +17139,7 @@ then : lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__F77"; then lt_cv_aix_libpath__F77=/usr/lib:/lib @@ -18077,12 +17420,11 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat > conftest.$ac_ext <<_ACEOF @@ -18090,22 +17432,20 @@ else $as_nop subroutine foo end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else $as_nop +else lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - link_all_deplibs_F77=no else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -18127,7 +17467,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -18382,8 +17722,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 -printf "%s\n" "$ld_shlibs_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 +$as_echo "$ld_shlibs_F77" >&6; } test no = "$ld_shlibs_F77" && can_build_shared=no with_gnu_ld_F77=$with_gnu_ld @@ -18410,19 +17750,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -18440,7 +17779,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_F77=no @@ -18454,8 +17793,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac @@ -18524,8 +17863,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' @@ -19013,10 +18352,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -19027,14 +18365,12 @@ else $as_nop end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_f77_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -19048,6 +18384,9 @@ fi # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -19056,7 +18395,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -19068,18 +18407,6 @@ fi dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -19278,8 +18605,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -19343,8 +18670,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || test -n "$runpath_var_F77" || @@ -19368,8 +18695,8 @@ else # directories. hardcode_action_F77=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 -printf "%s\n" "$hardcode_action_F77" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 +$as_echo "$hardcode_action_F77" >&6; } if test relink = "$hardcode_action_F77" || test yes = "$inherit_rpath_F77"; then @@ -19420,14 +18747,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Only expand once: -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -19438,173 +18764,160 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - SET_MAKE= -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -# Checks for header files. -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make fi - - fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +# Checks for header files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes -then : - printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_types_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" -if test "x$ac_cv_header_signal_h" = xyes -then : - printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" -if test "x$ac_cv_header_fcntl_h" = xyes -then : - printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h +rm -f conftest* fi -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes -then : - printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h +rm -f conftest* fi -ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes -then : - printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" -if test "x$ac_cv_header_wchar_h" = xyes -then : - printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +for ac_header in stdint.h sys/types.h signal.h fcntl.h malloc.h locale.h \ + stddef.h wchar.h dlfcn.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi +done + # Checks for typedefs, structures, and compiler characteristics. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -19617,7 +18930,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -19645,7 +18958,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -19661,28 +18974,26 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -printf %s "checking whether byte ordering is bigendian... " >&6; } -if test ${ac_cv_c_bigendian+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19693,8 +19004,7 @@ else $as_nop typedef int dummy; _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. @@ -19718,7 +19028,7 @@ then : fi done fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19727,7 +19037,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ @@ -19739,8 +19049,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19748,7 +19057,7 @@ then : #include int -main (void) +main () { #if BYTE_ORDER != BIG_ENDIAN not big endian @@ -19758,15 +19067,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). @@ -19775,7 +19083,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros @@ -19785,15 +19093,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef _BIG_ENDIAN not big endian @@ -19803,33 +19110,31 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -unsigned short int ascii_mm[] = +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - unsigned short int ascii_ii[] = + short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } - unsigned short int ebcdic_ii[] = + short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - unsigned short int ebcdic_mm[] = + short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; @@ -19837,15 +19142,14 @@ unsigned short int ascii_mm[] = extern int foo; int -main (void) +main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -19858,13 +19162,13 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -19880,10 +19184,9 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no -else $as_nop +else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19892,17 +19195,17 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -printf "%s\n" "$ac_cv_c_bigendian" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) -printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) @@ -19911,28 +19214,28 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test ${ac_cv_struct_tm+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { struct tm tm; int *p = &tm.tm_sec; @@ -19941,51 +19244,48 @@ struct tm tm; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h -else $as_nop +else ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -printf "%s\n" "$ac_cv_struct_tm" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then -printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi # AX_C___ATTRIBUTE__ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -20004,7 +19304,7 @@ esac if test "$ac_cv_c_inline" != no then - printf "%s\n" "#define COB_HAS_INLINE 1" >>confdefs.h + $as_echo "#define COB_HAS_INLINE 1" >>confdefs.h fi @@ -20012,17 +19312,16 @@ fi # Checks for library functions. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -20030,52 +19329,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -20083,22 +19382,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -20108,19 +19405,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + break +fi + + done +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -20141,10 +19477,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -20152,104 +19487,46 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h - - -fi - -ac_func= -for ac_item in $ac_func_c_list -do - if test $ac_func; then - ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func - if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then - echo "#define $ac_item 1" >> confdefs.h - fi - ac_func= - else - ac_func=$ac_item - fi -done - -if test "x$ac_cv_func_vprintf" = xno -then : - ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = xyes -then : - -printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h - -fi - -fi -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = xyes -then : - printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes -then : - printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF -fi -ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes -then : - printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" -if test "x$ac_cv_func_fcntl" = xyes -then : - printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = xyes -then : - printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h +for ac_func in vprintf +do : + ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" +if test "x$ac_cv_func_vprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VPRINTF 1 +_ACEOF -fi -ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = xyes -then : - printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h +ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = xyes; then : -fi -ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" -if test "x$ac_cv_func_strchr" = xyes -then : - printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h +$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr" -if test "x$ac_cv_func_strrchr" = xyes -then : - printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = xyes -then : - printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h +done -fi -ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" -if test "x$ac_cv_func_strstr" = xyes -then : - printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = xyes -then : - printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h +for ac_func in memmove memset setlocale fcntl strerror \ + strcasecmp strchr strrchr strdup strstr strtol +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done # Check for timezone @@ -20257,19 +19534,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { timezone = 3600; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - printf "%s\n" "#define HAVE_TIMEZONE 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "#define HAVE_TIMEZONE 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Checks for internationalization stuff @@ -20291,10 +19567,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi @@ -20312,26 +19587,25 @@ if test "${PATH_SEPARATOR+set}" != set; then fi if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 -printf %s "checking for ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +$as_echo_n "checking for ld... " >&6; } elif test "$GCC" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else - if test ${acl_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH @@ -20400,8 +19674,7 @@ else $as_nop #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in @@ -20410,7 +19683,7 @@ then : esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20422,10 +19695,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in @@ -20434,7 +19706,7 @@ else $as_nop esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac @@ -20443,19 +19715,18 @@ fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${acl_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -printf %s "checking for shared library run path origin... " >&6; } -if test ${acl_cv_rpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh @@ -20488,8 +19757,8 @@ else $as_nop acl_cv_rpath=done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -printf "%s\n" "$acl_cv_rpath" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" @@ -20500,22 +19769,20 @@ printf "%s\n" "$acl_cv_rpath" >&6; } acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. -if test ${enable_rpath+y} -then : +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : -else $as_nop +else enable_rpath=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 -printf %s "checking 32-bit host C ABI... " >&6; } -if test ${gl_cv_host_cpu_c_abi_32bit+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +$as_echo_n "checking 32-bit host C ABI... " >&6; } +if ${gl_cv_host_cpu_c_abi_32bit+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) @@ -20577,13 +19844,12 @@ else $as_nop #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; arm* | aarch64 ) @@ -20602,13 +19868,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) @@ -20623,13 +19888,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; ia64* ) @@ -20644,13 +19908,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=yes -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; mips* ) @@ -20665,13 +19928,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; powerpc* ) @@ -20690,13 +19952,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; rs6000 ) @@ -20715,13 +19976,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; s390* ) @@ -20736,13 +19996,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; sparc | sparc64 ) @@ -20757,13 +20016,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; *) @@ -20773,8 +20031,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 -printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" @@ -20782,13 +20040,11 @@ printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 -printf %s "checking for ELF binary format... " >&6; } -if test ${gl_cv_elf+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 +$as_echo_n "checking for ELF binary format... " >&6; } +if ${gl_cv_elf+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ @@ -20797,18 +20053,17 @@ else $as_nop _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Extensible Linking Format" >/dev/null 2>&1 -then : + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : gl_cv_elf=yes -else $as_nop +else gl_cv_elf=no fi -rm -rf conftest* +rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 -printf "%s\n" "$gl_cv_elf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 +$as_echo "$gl_cv_elf" >&6; } if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header @@ -20856,12 +20111,11 @@ printf "%s\n" "$gl_cv_elf" >&6; } } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 -printf %s "checking for the common suffixes of directories in the library search path... " >&6; } -if test ${acl_cv_libdirstems+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } +if ${acl_cv_libdirstems+:} false; then : + $as_echo_n "(cached) " >&6 +else acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= @@ -20925,8 +20179,8 @@ else $as_nop acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 -printf "%s\n" "$acl_cv_libdirstems" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +$as_echo "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` @@ -20958,8 +20212,7 @@ printf "%s\n" "$acl_cv_libdirstems" >&6; } # Check whether --with-libiconv-prefix was given. -if test ${with_libiconv_prefix+y} -then : +if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -21450,12 +20703,11 @@ fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -printf %s "checking for iconv... " >&6; } -if test ${am_cv_func_iconv+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no @@ -21466,7 +20718,7 @@ else $as_nop #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -21475,11 +20727,10 @@ iconv_t cd = iconv_open("",""); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -21491,7 +20742,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -21500,26 +20751,24 @@ iconv_t cd = iconv_open("",""); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -printf "%s\n" "$am_cv_func_iconv" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -printf %s "checking for working iconv... " >&6; } -if test ${am_cv_func_iconv_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -21527,13 +20776,12 @@ else $as_nop fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21545,7 +20793,7 @@ else $as_nop #endif int -main (void) +main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful @@ -21657,8 +20905,7 @@ int result = 0; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -21670,8 +20917,8 @@ fi LIBS="$am_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -printf "%s\n" "$am_cv_func_iconv_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -21681,14 +20928,14 @@ printf "%s\n" "$am_cv_func_iconv_works" >&6; } fi if test "$am_func_iconv" = yes; then -printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h +$as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -printf %s "checking how to link with libiconv... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -printf "%s\n" "$LIBICONV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -21698,12 +20945,11 @@ printf "%s\n" "$LIBICONV" >&6; } if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 -printf %s "checking for iconv declaration... " >&6; } - if test ${am_cv_proto_iconv+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if ${am_cv_proto_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21721,33 +20967,34 @@ size_t iconv(); #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" -else $as_nop +else am_cv_proto_iconv_arg1="const" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 -printf "%s\n" " +$as_echo " $am_cv_proto_iconv" >&6; } else am_cv_proto_iconv_arg1="" fi -printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF @@ -21757,22 +21004,21 @@ printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h # FreeBSD has gnugetopt library - needs checking ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = xyes -then : - ac_fn_c_check_header_compile "$LINENO" "kpathsea/getopt.h" "ac_cv_header_kpathsea_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_kpathsea_getopt_h" = xyes -then : - printf "%s\n" "#define HAVE_KPATHSEA_GETOPT_H 1" >>confdefs.h +if test "x$ac_cv_func_getopt_long_only" = xyes; then : + for ac_header in kpathsea/getopt.h getopt.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes -then : - printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h -fi +done -else $as_nop +else case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" @@ -21794,23 +21040,21 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { nanosleep (NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 -printf %s "checking for nanosleep in -lrt... " >&6; } -if test ${ac_cv_lib_rt_nanosleep+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ac_fn_c_try_link "$LINENO"; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 +$as_echo_n "checking for nanosleep in -lrt... " >&6; } +if ${ac_cv_lib_rt_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21819,30 +21063,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char nanosleep (); int -main (void) +main () { return nanosleep (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_nanosleep=yes -else $as_nop +else ac_cv_lib_rt_nanosleep=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 -printf "%s\n" "$ac_cv_lib_rt_nanosleep" >&6; } -if test "x$ac_cv_lib_rt_nanosleep" = xyes -then : - printf "%s\n" "#define HAVE_LIBRT 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 +$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } +if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF LIBS="-lrt $LIBS" @@ -21852,12 +21099,11 @@ fi then LIBCOB_LIBS="$LIBCOB_LIBS -lrt" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lposix4" >&5 -printf %s "checking for nanosleep in -lposix4... " >&6; } -if test ${ac_cv_lib_posix4_nanosleep+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lposix4" >&5 +$as_echo_n "checking for nanosleep in -lposix4... " >&6; } +if ${ac_cv_lib_posix4_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21866,30 +21112,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char nanosleep (); int -main (void) +main () { return nanosleep (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix4_nanosleep=yes -else $as_nop +else ac_cv_lib_posix4_nanosleep=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_nanosleep" >&5 -printf "%s\n" "$ac_cv_lib_posix4_nanosleep" >&6; } -if test "x$ac_cv_lib_posix4_nanosleep" = xyes -then : - printf "%s\n" "#define HAVE_LIBPOSIX4 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_nanosleep" >&5 +$as_echo "$ac_cv_lib_posix4_nanosleep" >&6; } +if test "x$ac_cv_lib_posix4_nanosleep" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOSIX4 1 +_ACEOF LIBS="-lposix4 $LIBS" @@ -21901,23 +21150,22 @@ fi fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # Checks for gettext. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -printf %s "checking whether NLS is requested... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. -if test ${enable_nls+y} -then : +if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval -else $as_nop +else USE_NLS=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -printf "%s\n" "$USE_NLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } @@ -21956,12 +21204,11 @@ rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_MSGFMT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. @@ -21989,21 +21236,20 @@ esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -printf "%s\n" "$MSGFMT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_GMSGFMT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. @@ -22013,15 +21259,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -22034,11 +21276,11 @@ esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -printf "%s\n" "$GMSGFMT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22079,12 +21321,11 @@ rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_XGETTEXT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. @@ -22112,11 +21353,11 @@ esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -printf "%s\n" "$XGETTEXT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f messages.po @@ -22157,12 +21398,11 @@ rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_MSGMERGE+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. @@ -22189,11 +21429,11 @@ esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 -printf "%s\n" "$MSGMERGE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -22237,76 +21477,72 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -printf %s "checking for CFPreferencesCopyAppValue... " >&6; } -if test ${gt_cv_func_CFPreferencesCopyAppValue+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes -else $as_nop +else gt_cv_func_CFPreferencesCopyAppValue=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 -printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } -if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : + $as_echo_n "(cached) " >&6 +else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes -else $as_nop +else gt_cv_func_CFLocaleCopyPreferredLanguages=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 -printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then -printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= @@ -22352,12 +21588,11 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; gt_expression_test_code= fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -printf %s "checking for GNU gettext in libc... " >&6; } -if eval test \${$gt_func_gnugettext_libc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22372,7 +21607,7 @@ extern int *_nl_domain_bindings; $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -22382,18 +21617,17 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" -else $as_nop +else eval "$gt_func_gnugettext_libc=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -22426,12 +21660,11 @@ printf "%s\n" "$ac_res" >&6; } done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -printf %s "checking for iconv... " >&6; } -if test ${am_cv_func_iconv+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no @@ -22442,7 +21675,7 @@ else $as_nop #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -22451,11 +21684,10 @@ iconv_t cd = iconv_open("",""); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -22467,7 +21699,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -22476,26 +21708,24 @@ iconv_t cd = iconv_open("",""); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -printf "%s\n" "$am_cv_func_iconv" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -printf %s "checking for working iconv... " >&6; } -if test ${am_cv_func_iconv_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -22503,13 +21733,12 @@ else $as_nop fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22521,7 +21750,7 @@ else $as_nop #endif int -main (void) +main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful @@ -22633,8 +21862,7 @@ int result = 0; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -22646,8 +21874,8 @@ fi LIBS="$am_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -printf "%s\n" "$am_cv_func_iconv_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -22657,14 +21885,14 @@ printf "%s\n" "$am_cv_func_iconv_works" >&6; } fi if test "$am_func_iconv" = yes; then -printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h +$as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -printf %s "checking how to link with libiconv... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -printf "%s\n" "$LIBICONV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -22697,8 +21925,7 @@ printf "%s\n" "$LIBICONV" >&6; } # Check whether --with-libintl-prefix was given. -if test ${with_libintl_prefix+y} -then : +if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -23158,12 +22385,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -printf %s "checking for GNU gettext in libintl... " >&6; } -if eval test \${$gt_func_gnugettext_libintl+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 +else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" @@ -23186,7 +22412,7 @@ const char *_nl_expand_alias (const char *); $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -23196,13 +22422,12 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" -else $as_nop +else eval "$gt_func_gnugettext_libintl=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" @@ -23224,7 +22449,7 @@ const char *_nl_expand_alias (const char *); $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -23234,22 +22459,21 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ @@ -23276,20 +22500,20 @@ printf "%s\n" "$ac_res" >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h +$as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -printf %s "checking whether to use NLS... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -printf "%s\n" "$USE_NLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -printf %s "checking where the gettext function comes from... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" @@ -23299,18 +22523,18 @@ printf %s "checking where the gettext function comes from... " >&6; } else gt_source="included intl directory" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -printf "%s\n" "$gt_source" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -printf %s "checking how to link with libintl... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -printf "%s\n" "$LIBINTL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= @@ -23337,10 +22561,10 @@ printf "%s\n" "$LIBINTL" >&6; } fi -printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h -printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -23364,19 +22588,18 @@ then fi # Checks for workable strftime -if test "$cross_compiling" = yes -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { time_t ticks; @@ -23395,9 +22618,8 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - printf "%s\n" "#define COB_STRFTIME 1" >>confdefs.h +if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define COB_STRFTIME 1" >>confdefs.h fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -23406,18 +22628,17 @@ fi # Checks for size of long -if test "$cross_compiling" = yes -then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { if (sizeof(long int) == sizeof(long long)) @@ -23428,9 +22649,8 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - printf "%s\n" "#define COB_LI_IS_LL 1" >>confdefs.h +if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define COB_LI_IS_LL 1" >>confdefs.h fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -23518,19 +22738,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { int testint; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - printf "%s\n" "#define HAVE_PSIGN_OPT 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "#define HAVE_PSIGN_OPT 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$MYOLDCFLAGS" # Check if aligned attribute works @@ -23538,19 +22757,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { char testchar[4] __attribute__((aligned)); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - printf "%s\n" "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Special stuff @@ -23577,7 +22795,7 @@ case $host_os in if test "`basename $CC`" != "gcc" then COB_SHARED_OPT="-b" - printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h + $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h rm -f hptest* echo 'int main() { return 0; }' > hptest.c @@ -23621,7 +22839,7 @@ fi if test "x$lt_cv_dlopen_self" != "xyes" then - printf "%s\n" "#define COB_NO_SELFOPEN 1" >>confdefs.h + $as_echo "#define COB_NO_SELFOPEN 1" >>confdefs.h fi @@ -23629,19 +22847,31 @@ COB_SPLITKEY_FLAGS="yes" # Generate the output -printf "%s\n" "#define COB_EXPORT_DYN \"$COB_EXPORT_DYN\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define COB_EXPORT_DYN "$COB_EXPORT_DYN" +_ACEOF -printf "%s\n" "#define COB_PIC_FLAGS \"$COB_PIC_FLAGS\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define COB_PIC_FLAGS "$COB_PIC_FLAGS" +_ACEOF -printf "%s\n" "#define COB_SHARED_OPT \"$COB_SHARED_OPT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define COB_SHARED_OPT "$COB_SHARED_OPT" +_ACEOF -printf "%s\n" "#define COB_EXEEXT \"$COB_EXEEXT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define COB_EXEEXT "$COB_EXEEXT" +_ACEOF -printf "%s\n" "#define COB_EXTRA_FLAGS \"$COB_EXTRA_FLAGS\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define COB_EXTRA_FLAGS "$COB_EXTRA_FLAGS" +_ACEOF if test "x$striplib" != "x" then - printf "%s\n" "#define COB_STRIP_CMD \"$striplib\"" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define COB_STRIP_CMD "$striplib" +_ACEOF # AC_SUBST(COB_STRIP_CMD) fi @@ -23704,8 +22934,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -23735,15 +22965,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -23757,8 +22987,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -23775,7 +23005,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -23786,14 +23016,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -23824,8 +23054,8 @@ fi ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -23848,16 +23078,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -23867,46 +23095,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -23915,6 +23143,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -23923,12 +23158,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -23940,10 +23171,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -23956,14 +23207,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -23990,20 +23240,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -24015,13 +23263,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -24052,7 +23299,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -24074,10 +23321,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -24091,12 +23334,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -24138,7 +23375,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -24147,7 +23384,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -24210,7 +23447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by opensource COBOL 4J $as_me 1.1.2, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -24272,16 +23509,14 @@ $config_commands Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ opensource COBOL 4J config.status 1.1.2 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -24321,15 +23556,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -24337,7 +23572,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -24346,7 +23581,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -24374,7 +23609,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -24388,7 +23623,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -24396,7 +23631,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -ac_cv_exeext="$ac_cv_exeext" AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" @@ -24913,9 +24147,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -25251,7 +24485,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -25259,17 +24493,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -25286,7 +24520,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -25310,9 +24544,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -25374,8 +24608,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -25419,9 +24653,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -25437,20 +24671,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -25470,7 +24704,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -25490,8 +24724,8 @@ printf "%s\n" X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -25500,7 +24734,7 @@ printf "%s\n" "$as_me: executing $ac_file commands" >&6;} "tests/atconfig":C) cat >tests/atconfig </dev/null || -printf "%s\n" X"$am_mf" | +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -25576,7 +24808,7 @@ printf "%s\n" X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | +$as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -25601,8 +24833,8 @@ printf "%s\n" X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is @@ -25633,6 +24865,7 @@ See \`config.log' for more details" "$LINENO" 5; } cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -26162,7 +25395,6 @@ _LT_EOF esac - ltmain=$ac_aux_dir/ltmain.sh @@ -26632,8 +25864,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -26671,4 +25903,3 @@ then fi echo " Use fcntl for file locking: ${ac_cv_func_fcntl}" echo "" - diff --git a/copy/Makefile.in b/copy/Makefile.in index e0efa915..6a42f7fe 100644 --- a/copy/Makefile.in +++ b/copy/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,8 +201,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -214,7 +212,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -396,6 +393,7 @@ ctags CTAGS: cscope cscopelist: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/lib/Makefile.in b/lib/Makefile.in index 3d417791..668ecf73 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -194,6 +194,8 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog getopt.c getopt.h \ getopt1.c @@ -231,8 +233,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -244,7 +244,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -498,6 +497,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/libcobj/Makefile.in b/libcobj/Makefile.in index 04530252..8742892f 100644 --- a/libcobj/Makefile.in +++ b/libcobj/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -152,8 +152,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -165,7 +163,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -407,6 +404,7 @@ ctags CTAGS: cscope cscopelist: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/tests/Makefile.in b/tests/Makefile.in index f5377a88..a4a93bec 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -168,6 +168,8 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -350,7 +352,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test @@ -375,7 +376,7 @@ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/atlocal.in \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver \ - ChangeLog README.md + ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -435,8 +436,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -448,7 +447,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -1021,7 +1019,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1146,6 +1144,7 @@ i18n_utf8.log: i18n_utf8 @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/tests/cobol85/Makefile.in b/tests/cobol85/Makefile.in index f6440604..a05e5b82 100644 --- a/tests/cobol85/Makefile.in +++ b/tests/cobol85/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -117,8 +117,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \ - README.md +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -153,8 +152,6 @@ COB_SHARED_OPT = @COB_SHARED_OPT@ COB_SPLITKEY_FLAGS = @COB_SPLITKEY_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CXXCPP = @CXXCPP@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -166,7 +163,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ @@ -334,6 +330,7 @@ ctags CTAGS: cscope cscopelist: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am From 6877106bd4a7182499d9737687cfb3d90c668267 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:12:45 +0900 Subject: [PATCH 044/188] fix pre-commit (#533) --- .devcontainer/term_settings/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/term_settings/pre-commit b/.devcontainer/term_settings/pre-commit index 07646e42..dbc77f69 100755 --- a/.devcontainer/term_settings/pre-commit +++ b/.devcontainer/term_settings/pre-commit @@ -1,4 +1,4 @@ #!/bin/bash -git add -u ./format +git add -u From 6b1f0e7c780facce1d697bf2158473a0ad1482ff Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Wed, 30 Oct 2024 20:17:13 +0900 Subject: [PATCH 045/188] Bugfix `-fserial-variable` (#534) --- cobj/codegen.c | 7 +- cobj/scanner.c | 12 +-- tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- .../fserial-variable.at | 46 +++++++-- tests/misc.at | 1 + tests/misc.src/fserial-variable.at | 98 +++++++++++++++++++ 7 files changed, 154 insertions(+), 16 deletions(-) create mode 100644 tests/misc.src/fserial-variable.at diff --git a/cobj/codegen.c b/cobj/codegen.c index e4239832..615ea2ed 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -762,7 +762,7 @@ static int joutput_field_storage(struct cb_field *f, struct cb_field *top) { free(base_name); return flag_call_parameter; } else if (cb_flag_short_variable) { - joutput("b_"); + joutput(CB_PREFIX_BASE); for (p = f->name; *p != '\0'; ++p) { if (*p == '-') { joutput("_"); @@ -770,8 +770,11 @@ static int joutput_field_storage(struct cb_field *f, struct cb_field *top) { joutput("%c", *p); } } + } else if (cb_flag_serial_variable) { + char *base_name = get_java_identifier_base(f); + joutput(base_name); } else { - joutput("b_"); + joutput(CB_PREFIX_BASE); struct cb_field *field = f; int flag_first_iteration = 1; while (field) { diff --git a/cobj/scanner.c b/cobj/scanner.c index b3f0cd5f..fa122cb5 100644 --- a/cobj/scanner.c +++ b/cobj/scanner.c @@ -1,6 +1,6 @@ -#line 2 "scanner.c" +#line 1 "scanner.c" -#line 4 "scanner.c" +#line 3 "scanner.c" #define YY_INT_ALIGNED short int @@ -1276,9 +1276,9 @@ static int scan_numeric (char *text); static int scan_picture (char *text); static void count_lines (char *text); -#line 1280 "scanner.c" +#line 1279 "scanner.c" -#line 1282 "scanner.c" +#line 1281 "scanner.c" #define INITIAL 0 #define DECIMAL_IS_PERIOD 1 @@ -1522,7 +1522,7 @@ YY_DECL -#line 1526 "scanner.c" +#line 1525 "scanner.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -2596,7 +2596,7 @@ YY_RULE_SETUP #line 791 "scanner.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2600 "scanner.c" +#line 2599 "scanner.c" case YY_END_OF_BUFFER: { diff --git a/tests/Makefile.am b/tests/Makefile.am index fcc50f85..65d1107d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -218,7 +218,8 @@ misc_DEPENDENCIES = \ misc.src/copy-comments.at \ misc.src/read_prev_after_start.at \ misc.src/japanese-char-section-var.at \ - misc.src/evaluate-switch.at + misc.src/evaluate-switch.at \ + misc.src/fserial-variable.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a4a93bec..49b5575a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -757,7 +757,8 @@ misc_DEPENDENCIES = \ misc.src/copy-comments.at \ misc.src/read_prev_after_start.at \ misc.src/japanese-char-section-var.at \ - misc.src/evaluate-switch.at + misc.src/evaluate-switch.at \ + misc.src/fserial-variable.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/command-line-options.src/fserial-variable.at b/tests/command-line-options.src/fserial-variable.at index 082af5aa..55863736 100644 --- a/tests/command-line-options.src/fserial-variable.at +++ b/tests/command-line-options.src/fserial-variable.at @@ -30,16 +30,33 @@ A 3 B ]) +AT_CHECK([grep 'b_5' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_6' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_7' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_8' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_9' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_10' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_11' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_5' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_6' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_7' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_9' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_10' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_11' prog.java > /dev/null], [0]) + AT_CHECK([grep 'f_AAA' prog.java], [1]) AT_CHECK([grep 'b_AAA' prog.java], [1]) AT_CHECK([grep 'f_BBB' prog.java], [1]) AT_CHECK([grep 'b_BBB' prog.java], [1]) AT_CHECK([grep 'f_CCC' prog.java], [1]) AT_CHECK([grep 'b_CCC' prog.java], [1]) -AT_CHECK([grep 'f_DDD' prog.java], [1]) -AT_CHECK([grep 'f_EEE' prog.java], [1]) -AT_CHECK([grep 'f_FFF' prog.java], [1]) AT_CHECK([grep 'b_GRP' prog.java], [1]) +AT_CHECK([grep 'f_DDD__GRP' prog.java], [1]) +AT_CHECK([grep 'b_DDD__GRP' prog.java], [1]) +AT_CHECK([grep 'f_EEE__GRP' prog.java], [1]) +AT_CHECK([grep 'b_EEE__GRP' prog.java], [1]) +AT_CHECK([grep 'f_FFF__GRP' prog.java], [1]) +AT_CHECK([grep 'b_FFF__GRP' prog.java], [1]) AT_CHECK([${COMPILE} prog.cbl]) AT_CHECK([${RUN_MODULE} prog], [0], @@ -56,9 +73,26 @@ AT_CHECK([grep 'f_BBB' prog.java > /dev/null], [0]) AT_CHECK([grep 'b_BBB' prog.java > /dev/null], [0]) AT_CHECK([grep 'f_CCC' prog.java > /dev/null], [0]) AT_CHECK([grep 'b_CCC' prog.java > /dev/null], [0]) -AT_CHECK([grep 'f_DDD' prog.java > /dev/null], [0]) -AT_CHECK([grep 'f_EEE' prog.java > /dev/null], [0]) -AT_CHECK([grep 'f_FFF' prog.java > /dev/null], [0]) AT_CHECK([grep 'b_GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_DDD__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_DDD__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_EEE__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_EEE__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_FFF__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_FFF__GRP' prog.java > /dev/null], [0]) + +AT_CHECK([grep 'b_5' prog.java], [1]) +AT_CHECK([grep 'b_6' prog.java], [1]) +AT_CHECK([grep 'b_7' prog.java], [1]) +AT_CHECK([grep 'b_8' prog.java], [1]) +AT_CHECK([grep 'b_9' prog.java], [1]) +AT_CHECK([grep 'b_10' prog.java], [1]) +AT_CHECK([grep 'b_11' prog.java], [1]) +AT_CHECK([grep 'f_5' prog.java], [1]) +AT_CHECK([grep 'f_6' prog.java], [1]) +AT_CHECK([grep 'f_7' prog.java], [1]) +AT_CHECK([grep 'f_9' prog.java], [1]) +AT_CHECK([grep 'f_10' prog.java], [1]) +AT_CHECK([grep 'f_11' prog.java], [1]) AT_CLEANUP diff --git a/tests/misc.at b/tests/misc.at index 2aba485d..1a98d9e8 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -48,3 +48,4 @@ m4_include([record-key-duplicates-error.at]) m4_include([read_prev_after_start.at]) m4_include([japanese-char-section-var.at]) m4_include([evaluate-switch.at]) +m4_include([fserial-variable.at]) diff --git a/tests/misc.src/fserial-variable.at b/tests/misc.src/fserial-variable.at new file mode 100644 index 00000000..55863736 --- /dev/null +++ b/tests/misc.src/fserial-variable.at @@ -0,0 +1,98 @@ +AT_SETUP([-fserial-variable]) + +AT_DATA([prog.cbl], [ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 AAA PIC 9 VALUE 0. + 01 BBB PIC 9 COMP-3 VALUE 1. + 01 CCC PIC X VALUE "A". + 01 GRP. + 03 DDD PIC 9 VALUE 2. + 03 EEE PIC 9 COMP-3 VALUE 3. + 03 FFF PIC X VALUE "B". + PROCEDURE DIVISION. + MAIN SECTION. + DISPLAY AAA. + DISPLAY BBB. + DISPLAY CCC. + DISPLAY DDD. + DISPLAY EEE. + DISPLAY FFF. +]) + +AT_CHECK([${COMPILE} -fserial-variable prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[0 +1 +A +2 +3 +B +]) +AT_CHECK([grep 'b_5' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_6' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_7' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_8' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_9' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_10' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_11' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_5' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_6' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_7' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_9' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_10' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_11' prog.java > /dev/null], [0]) + +AT_CHECK([grep 'f_AAA' prog.java], [1]) +AT_CHECK([grep 'b_AAA' prog.java], [1]) +AT_CHECK([grep 'f_BBB' prog.java], [1]) +AT_CHECK([grep 'b_BBB' prog.java], [1]) +AT_CHECK([grep 'f_CCC' prog.java], [1]) +AT_CHECK([grep 'b_CCC' prog.java], [1]) +AT_CHECK([grep 'b_GRP' prog.java], [1]) +AT_CHECK([grep 'f_DDD__GRP' prog.java], [1]) +AT_CHECK([grep 'b_DDD__GRP' prog.java], [1]) +AT_CHECK([grep 'f_EEE__GRP' prog.java], [1]) +AT_CHECK([grep 'b_EEE__GRP' prog.java], [1]) +AT_CHECK([grep 'f_FFF__GRP' prog.java], [1]) +AT_CHECK([grep 'b_FFF__GRP' prog.java], [1]) + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[0 +1 +A +2 +3 +B +]) +AT_CHECK([grep 'f_AAA' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_AAA' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_BBB' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_BBB' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_CCC' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_CCC' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_DDD__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_DDD__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_EEE__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_EEE__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'f_FFF__GRP' prog.java > /dev/null], [0]) +AT_CHECK([grep 'b_FFF__GRP' prog.java > /dev/null], [0]) + +AT_CHECK([grep 'b_5' prog.java], [1]) +AT_CHECK([grep 'b_6' prog.java], [1]) +AT_CHECK([grep 'b_7' prog.java], [1]) +AT_CHECK([grep 'b_8' prog.java], [1]) +AT_CHECK([grep 'b_9' prog.java], [1]) +AT_CHECK([grep 'b_10' prog.java], [1]) +AT_CHECK([grep 'b_11' prog.java], [1]) +AT_CHECK([grep 'f_5' prog.java], [1]) +AT_CHECK([grep 'f_6' prog.java], [1]) +AT_CHECK([grep 'f_7' prog.java], [1]) +AT_CHECK([grep 'f_9' prog.java], [1]) +AT_CHECK([grep 'f_10' prog.java], [1]) +AT_CHECK([grep 'f_11' prog.java], [1]) + +AT_CLEANUP From a9c7869efc74680399b31dfeb6229f1d584a3cb7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 31 Oct 2024 04:09:23 +0900 Subject: [PATCH 046/188] Release v1.1.3 (#535) --- CHANGELOG.md | 20 ++++++++++++++ ChangeLog | 4 +++ NEWS | 22 ++++++++++++++++ README.md | 8 +++--- README_JP.md | 8 +++--- ReleaseNote.md | 26 ++++++++++++------- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 103 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad2a502c..ba44de06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [1.1.3] - 2024-10-31 +### Add +* Add a new option `-variable` (#513) + * With `-variable`, cobj allows 73 or more characters for each lines +* Add documentations that describe the structure of libcobj and generated Java files (#492) +* Add Visual Studio Code Dev Container of opensource COBOL 4J (#529, #530) + +### Fix +* Fix a build error of opensource COBOL 4J on Windows 10 (489) +* Fix a build error of opensource COBOL 4J on Docker (#511) +* Fix `cobj-api` (#528) + * `cobj-api` previously generated invalid constructors in record classses +* Fix typos of `cobj-idx` command (#503) +* Fix a command line option `-fserial-variable` (#534) + +### Miscellaneous +* Improve the readability of variable names containing multi-byte characters (#502) +* Convert some EVALUATE statements to switch statements (#504) + ## [1.1.2] - 2024-07-31 ### Added * Add a new command line option `-Wtruncate` (#459) diff --git a/ChangeLog b/ChangeLog index 7d3632c1..ee872e61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-10-31 OSS Consortium + + * opensource COBOL 4J v1.1.3 released. + 2024-07-31 OSS Consortium * opensource COBOL 4J v1.1.2 released. diff --git a/NEWS b/NEWS index 10265a63..2fb64339 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,28 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.3 + +** New Features + (1) Add a new option `-variable` + * With `-variable`, cobj allows 73 or more characters for each lines + (2) Add documentations that describe the structure of libcobj and generated Java files + (3) Add Visual Studio Code Dev Container of opensource COBOL 4J + +** Bug Fixes + (1) Fix a build error of opensource COBOL 4J on Windows 10 + (2) Fix a build error of opensource COBOL 4J on Docker + (3) Fix `cobj-api` + * `cobj-api` previously generated invalid constructors in record classses + (4) Fix typos of `cobj-idx` command + (5) Fix a command line option `-fserial-variable` + +** Miscellaneous + (1) Improve the readability of variable names containing multi-byte characters + (2) Convert some EVALUATE statements to switch statements + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.2 ** New Features diff --git a/README.md b/README.md index 720da38e..61e8a1dc 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.2.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.2.tar.gz -tar zxvf opensourcecobol4j-v1.1.2.tar.gz -cd opensourcecobol4j-1.1.2 +curl -L -o opensourcecobol4j-v1.1.3.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.3.tar.gz +tar zxvf opensourcecobol4j-v1.1.3.tar.gz +cd opensourcecobol4j-1.1.3 ./configure --prefix=/usr/ make sudo make install @@ -125,7 +125,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.2 +docker pull opensourcecobol/opensourcecobol4j:1.1.3 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index b714ccef..62d467c3 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.2.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.2.tar.gz -tar zxvf opensourcecobol4j-v1.1.2.tar.gz -cd opensourcecobol4j-1.1.2 +curl -L -o opensourcecobol4j-v1.1.3.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.3.tar.gz +tar zxvf opensourcecobol4j-v1.1.3.tar.gz +cd opensourcecobol4j-1.1.3 ./configure --prefix=/usr/ make sudo make install @@ -114,7 +114,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.2 +docker pull opensourcecobol/opensourcecobol4j:1.1.3 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index c48dd1a6..8872a2d2 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,9 +1,17 @@ -# Added -* Add a new command line option `-Wtruncate`. - * When `-Wtruncate` is enabled, cobj warns data truncations of MOVE statements. -# Fix -* Fix `CALL (an integer) BY CONTENT`. -* Change `-m` option so that generated jar files contains only class files. Now `-m` becomes an alias of `-jar`. -* Show an error message when SCREEN SECTION is found. -# Miscellaneous -* Improve code generated by cobj-api. \ No newline at end of file +### Added +* Add a new option `-variable` + * With `-variable`, cobj allows 73 or more characters for each lines +* Add documentations that describe the structure of libcobj and generated Java files +* Add Visual Studio Code Dev Container of opensource COBOL 4J + +### Fixed +* Fix a build error of opensource COBOL 4J on Windows 10 +* Fix a build error of opensource COBOL 4J on Docker +* Fix `cobj-api` + * `cobj-api` previously generated invalid constructors in record classses +* Fix typos of `cobj-idx` command +* Fix a command line option `-fserial-variable` + +### Miscellaneous +* Improve the readability of variable names containing multi-byte characters +* Convert some EVALUATE statements to switch statements diff --git a/configure b/configure index bbb9c112..82759e3d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.2. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.3. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.2' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='opensource COBOL 4J 1.1.2' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.3' +PACKAGE_VERSION='1.1.3' +PACKAGE_STRING='opensource COBOL 4J 1.1.3' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.2 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.2] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.3] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.2:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.3:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.2 +opensource COBOL 4J configure 1.1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.2, which was +It was created by opensource COBOL 4J $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.2' - VERSION='1.1.2' + PACKAGE='opensource-cobol-4j-1.1.3' + VERSION='1.1.3' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.2, which was +This file was extended by opensource COBOL 4J $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.2 +opensource COBOL 4J config.status 1.1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 099e4993..b0ada60e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.2],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.2]) +AC_INIT([opensource COBOL 4J],[1.1.3],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.3]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index d9647262..a0724568 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.3 | Windows | 21 | +| 1.1.3 | Ubuntu 24.04 | 21 | +| 1.1.3 | AlmaLinux 9 | 11 | +| 1.1.3 | Amazon Linux 2023 | 21 | | 1.1.2 | Windows | 21 | | 1.1.2 | Ubuntu 24.04 | 21 | | 1.1.2 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 13cf57b9..dcca6af9 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.2" + version = "1.1.3" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 3b4eb1d1..ea4b8961 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.2"; + public static final String version = "1.1.3"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 869f8d9d..c9c27122 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.2"); + System.out.println("1.1.3"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 75663668..4625a76f 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.2", + "opensourcecobol4j_version": "1.1.3", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.2", + "opensourcecobol4j_version": "1.1.3", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.2", + "opensourcecobol4j_version": "1.1.3", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.2", + "opensourcecobol4j_version": "1.1.3", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 4b0b60db..3743f5c8 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.2]) -m4_define([AT_PACKAGE_VERSION], [1.1.2]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.2]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.3]) +m4_define([AT_PACKAGE_VERSION], [1.1.3]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.3]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 98802e06..0b25715a 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.2" +#define PACKAGE "opensource-cobol4j-1.1.3" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.2" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.3" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.2" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.2" +#define PACKAGE_VERSION "1.1.3" /* Define a patch level */ #define PATCH_LEVEL 0 From 4d362a96b9d6306337e071df012dbb7c5be114e3 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:22:08 +0900 Subject: [PATCH 047/188] Update libcobj/.gitignore (#536) --- libcobj/.gitignore | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libcobj/.gitignore b/libcobj/.gitignore index 6015b00b..5054e8d2 100755 --- a/libcobj/.gitignore +++ b/libcobj/.gitignore @@ -1,7 +1,7 @@ -/bin/ -output/ -sqlite/sqlite.jar -*.class +/bin/ +output/ +sqlite/sqlite.jar +*.class # Ignore Gradle project-specific cache directory .gradle @@ -10,3 +10,4 @@ sqlite/sqlite.jar build app/src/main/java/javadoc.log +app/bin From 9c39c37c2fccbbe629a97c629c4a89ed968a459c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:55:34 +0900 Subject: [PATCH 048/188] Bump com.github.spotbugs from 6.0.25 to 6.0.26 in /libcobj (#538) Bumps com.github.spotbugs from 6.0.25 to 6.0.26. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index dcca6af9..9d08b282 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.25" + id("com.github.spotbugs") version "6.0.26" } repositories { From 68c2074454c336b6a4823a6b7ba6f35bd0c4c87c Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:33:58 +0900 Subject: [PATCH 049/188] Handle Japanese characters in file identifiers correctly (#540) --- cobj/tree.c | 9 +++++++-- tests/Makefile.am | 3 ++- tests/Makefile.in | 3 ++- tests/misc.at | 1 + tests/misc.src/file-handler-japanese.at | 25 +++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 tests/misc.src/file-handler-japanese.at diff --git a/cobj/tree.c b/cobj/tree.c index 16f0b64d..4986c90d 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -124,8 +124,13 @@ static char *to_cname(const char *s) { unsigned char *p; copy = strdup(s); - for (p = (unsigned char *)copy; *p; p++) { - *p = (*p == '-') ? '_' : (unsigned char)toupper(*p); + for (p = (unsigned char *)copy; *p;) { + if ((0x81 <= *p && *p <= 0x9F) || (0xE0 <= *p && *p <= 0xFC)) { + p += 2; + } else { + *p = (*p == '-') ? '_' : (unsigned char)toupper(*p); + p++; + } } return copy; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 65d1107d..9841b799 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -219,7 +219,8 @@ misc_DEPENDENCIES = \ misc.src/read_prev_after_start.at \ misc.src/japanese-char-section-var.at \ misc.src/evaluate-switch.at \ - misc.src/fserial-variable.at + misc.src/fserial-variable.at \ + misc.src/file-handler-japanese.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 49b5575a..dad91307 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -758,7 +758,8 @@ misc_DEPENDENCIES = \ misc.src/read_prev_after_start.at \ misc.src/japanese-char-section-var.at \ misc.src/evaluate-switch.at \ - misc.src/fserial-variable.at + misc.src/fserial-variable.at \ + misc.src/file-handler-japanese.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 1a98d9e8..7f8a6157 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -49,3 +49,4 @@ m4_include([read_prev_after_start.at]) m4_include([japanese-char-section-var.at]) m4_include([evaluate-switch.at]) m4_include([fserial-variable.at]) +m4_include([file-handler-japanese.at]) diff --git a/tests/misc.src/file-handler-japanese.at b/tests/misc.src/file-handler-japanese.at new file mode 100644 index 00000000..6815c776 --- /dev/null +++ b/tests/misc.src/file-handler-japanese.at @@ -0,0 +1,25 @@ +AT_SETUP([file-handler-japanese]) + +# This test verifies that Issue 539 is fixed. + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT eXgt@C + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD eXgt@C. + 01 REC PIC X(10). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([grep 'h_eXgt@C' prog.java > /dev/null]) +AT_CHECK([grep 'h_EXGT@C' prog.java], [1]) + +AT_CLEANUP \ No newline at end of file From 9b11bb2f985651393713b321f73381a02fb87d77 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:25:09 +0900 Subject: [PATCH 050/188] refactor: refactor slightly (#542) --- cobj/tree.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cobj/tree.c b/cobj/tree.c index 4986c90d..495d0f88 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -1724,7 +1724,6 @@ struct cb_file *build_file(cb_tree name) { p->cname = to_cname(p->name); p->organization = cb_default_organization; - ; p->access_mode = COB_ACCESS_SEQUENTIAL; p->handler = CB_LABEL(cb_standard_error_handler); p->handler_prog = current_program; From 5fdd7cb737af5d1cc4cae0f1cb9f3169d52c6356 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Thu, 7 Nov 2024 16:05:43 +0900 Subject: [PATCH 051/188] Bugfix about `PERFROM UNTIL` (#544) --- cobj/codegen.c | 2 +- .../libcobj/common/GetInt.java | 5 +++- tests/Makefile.am | 3 ++- tests/Makefile.in | 3 ++- tests/misc.at | 1 + tests/misc.src/perform-until-div.at | 25 +++++++++++++++++++ 6 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 tests/misc.src/perform-until-div.at diff --git a/cobj/codegen.c b/cobj/codegen.c index 615ea2ed..2d233a0f 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -1973,7 +1973,7 @@ static void joutput_cond(cb_tree x, int save_flag) { } joutput_indent("(new GetInt() {"); joutput_indent_level += 2; - joutput_indent("public int run(){"); + joutput_indent("public int run() throws CobolStopRunException {"); joutput_indent_level += 2; for (; x; x = CB_CHAIN(x)) { // 最後の文ならreturn文を書く diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java index cacc233e..3dd2ffcb 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/GetInt.java @@ -18,12 +18,15 @@ */ package jp.osscons.opensourcecobol.libcobj.common; +import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException; + /** TODO: 準備中 */ public interface GetInt { /** * TODO: 準備中 * * @return TODO: 準備中 + * @throws CobolStopRunException TODO: 準備中 */ - int run(); + int run() throws CobolStopRunException; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 9841b799..d12e5eb5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -220,7 +220,8 @@ misc_DEPENDENCIES = \ misc.src/japanese-char-section-var.at \ misc.src/evaluate-switch.at \ misc.src/fserial-variable.at \ - misc.src/file-handler-japanese.at + misc.src/file-handler-japanese.at \ + misc.src/perform-until-div.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index dad91307..64a8f7bc 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -759,7 +759,8 @@ misc_DEPENDENCIES = \ misc.src/japanese-char-section-var.at \ misc.src/evaluate-switch.at \ misc.src/fserial-variable.at \ - misc.src/file-handler-japanese.at + misc.src/file-handler-japanese.at \ + misc.src/perform-until-div.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 7f8a6157..449c5271 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -50,3 +50,4 @@ m4_include([japanese-char-section-var.at]) m4_include([evaluate-switch.at]) m4_include([fserial-variable.at]) m4_include([file-handler-japanese.at]) +m4_include([perform-until-div.at]) diff --git a/tests/misc.src/perform-until-div.at b/tests/misc.src/perform-until-div.at new file mode 100644 index 00000000..db986153 --- /dev/null +++ b/tests/misc.src/perform-until-div.at @@ -0,0 +1,25 @@ +AT_SETUP([PERFORM UNTIL whose condition contains division]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 CNT PIC 9(4) VALUE 1000. + 01 I PIC 9(4) VALUE 1. + PROCEDURE DIVISION. + MAIN. + PERFORM + VARYING I + FROM 1 BY 1 + UNTIL I > (CNT + 743) / 744 + PERFORM SUB + END-PERFORM + STOP RUN. + SUB. + DISPLAY "HELLO". +]) + +AT_CHECK([${COBJ} prog.cbl]) + +AT_CLEANUP From 9b756acd28aba571b3c85ed868f7ab02f3f06e40 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Fri, 8 Nov 2024 09:00:54 +0900 Subject: [PATCH 052/188] Bugfix about `SEARCH` with `DEPENDING` in `OCCURS` (#545) --- cobj/codegen.c | 1 + cobj/pplex.c | 6 ++--- tests/Makefile.am | 3 ++- tests/Makefile.in | 3 ++- tests/misc.at | 1 + tests/misc.src/search-occurs-depending.at | 32 +++++++++++++++++++++++ 6 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 tests/misc.src/search-occurs-depending.at diff --git a/cobj/codegen.c b/cobj/codegen.c index 2d233a0f..7ea8f3f4 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -2667,6 +2667,7 @@ static void joutput_search_all(cb_tree table, cb_tree stmt, cb_tree cond, joutput_prefix(); joutput("int tail = "); if (p->occurs_depending) { + joutput("(int)"); joutput_integer(p->occurs_depending); joutput(" + 1;\n"); } else { diff --git a/cobj/pplex.c b/cobj/pplex.c index 3be62fbb..bffa4e5a 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -379,7 +379,7 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start)-1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -2632,8 +2632,8 @@ YY_DECL { default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer diff --git a/tests/Makefile.am b/tests/Makefile.am index d12e5eb5..d175cf00 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -221,7 +221,8 @@ misc_DEPENDENCIES = \ misc.src/evaluate-switch.at \ misc.src/fserial-variable.at \ misc.src/file-handler-japanese.at \ - misc.src/perform-until-div.at + misc.src/perform-until-div.at \ + misc.src/search-occurs-depending.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 64a8f7bc..c8d0c140 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -760,7 +760,8 @@ misc_DEPENDENCIES = \ misc.src/evaluate-switch.at \ misc.src/fserial-variable.at \ misc.src/file-handler-japanese.at \ - misc.src/perform-until-div.at + misc.src/perform-until-div.at \ + misc.src/search-occurs-depending.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 449c5271..d3a4da6e 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -51,3 +51,4 @@ m4_include([evaluate-switch.at]) m4_include([fserial-variable.at]) m4_include([file-handler-japanese.at]) m4_include([perform-until-div.at]) +m4_include([search-occurs-depending.at]) diff --git a/tests/misc.src/search-occurs-depending.at b/tests/misc.src/search-occurs-depending.at new file mode 100644 index 00000000..d14d273d --- /dev/null +++ b/tests/misc.src/search-occurs-depending.at @@ -0,0 +1,32 @@ +AT_SETUP([SEARCH OCCURS DEPENDING]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 AAA. + 02 AAA1 PIC X(04) VALUE "HOGE". + 02 FILLER PIC X(18) VALUE SPACE. + 02 AAA2 PIC S9(4) COMP. + 01 BBB. + 02 AAA-1 OCCURS 1 TO 11 DEPENDING ON AAA2 + ASCENDING KEY KEY-A INDEXED BY K1. + 03 KEY-A PIC X(05). + 03 BBB1 PIC X(05). + 03 FILLER PIC X(02). + 01 CCC PIC X(05). + PROCEDURE DIVISION. + SEARCH ALL AAA-1 + AT END + MOVE "ERROR" TO CCC + WHEN KEY-A (K1) = "00001" + MOVE BBB1 (K1) TO CCC + END-SEARCH. + DISPLAY CCC. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl], [0]) + +AT_CLEANUP From 8f2e0b61938f7bdee5d864a8502745e673a6ec6d Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 11 Nov 2024 04:15:56 +0900 Subject: [PATCH 053/188] Fix add statements and subtract statements (#546) --- cobj/pplex.c | 6 +- .../libcobj/data/CobolNumericField.java | 42 ++++ tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/fix-subtract.at | 219 ++++++++++++++++++ 6 files changed, 269 insertions(+), 5 deletions(-) create mode 100644 tests/misc.src/fix-subtract.at diff --git a/cobj/pplex.c b/cobj/pplex.c index bffa4e5a..3be62fbb 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -379,7 +379,7 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start) - 1) / 2) +#define YY_START (((yy_start)-1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -2632,8 +2632,8 @@ YY_DECL { default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index 9f9ec0c0..8cefebec 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -691,10 +691,49 @@ private int addInt(int in, int opt) { } } + if (this.isPositiveZeroOrNegativeZero()) { + sign = 1; + } + this.putSign(sign); return 0; } + /** + * このフィールドが正のゼロまたは負のゼロであるかどうかを判定する + */ + private boolean isPositiveZeroOrNegativeZero() { + int signIndex; + CobolFieldAttribute attr = this.getAttribute(); + if (attr.isFlagHaveSign() && !attr.isFlagSignSeparate()) { + if (attr.isFlagSignLeading()) { + signIndex = 0; + } else { + signIndex = this.getSize() - 1; + } + } else { + signIndex = -1000; + } + + CobolDataStorage data = this.getDataStorage(); + int size = this.getFieldSize(); + int firstDataIndex = this.getFirstDataIndex(); + for (int i = 0; i < size; ++i) { + int index = firstDataIndex + i; + byte value = data.getByte(index); + if (index == signIndex) { + if (value != 0x30 && value != 0x70) { + return false; + } + } else { + if (value != 0x30) { + return false; + } + } + } + return true; + } + /** * libcob/numeric.cのdisplay_add_intの実装 * @@ -767,6 +806,9 @@ private static int displaySubInt(CobolDataStorage data, int firstDataIndex, int /* perform subtraction */ byte val = data.getByte(sp); + if (val >= 0x70) { + val -= 0x40; + } data.setByte(sp, (byte) (val - (i + carry))); if (val - (i + carry) < '0') { carry = 1; diff --git a/tests/Makefile.am b/tests/Makefile.am index d175cf00..484aee23 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -222,7 +222,8 @@ misc_DEPENDENCIES = \ misc.src/fserial-variable.at \ misc.src/file-handler-japanese.at \ misc.src/perform-until-div.at \ - misc.src/search-occurs-depending.at + misc.src/search-occurs-depending.at \ + misc.src/fix-subtract.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index c8d0c140..3ed18bdd 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -761,7 +761,8 @@ misc_DEPENDENCIES = \ misc.src/fserial-variable.at \ misc.src/file-handler-japanese.at \ misc.src/perform-until-div.at \ - misc.src/search-occurs-depending.at + misc.src/search-occurs-depending.at \ + misc.src/fix-subtract.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index d3a4da6e..93fa8085 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -52,3 +52,4 @@ m4_include([fserial-variable.at]) m4_include([file-handler-japanese.at]) m4_include([perform-until-div.at]) m4_include([search-occurs-depending.at]) +m4_include([fix-subtract.at]) diff --git a/tests/misc.src/fix-subtract.at b/tests/misc.src/fix-subtract.at new file mode 100644 index 00000000..3824dfd9 --- /dev/null +++ b/tests/misc.src/fix-subtract.at @@ -0,0 +1,219 @@ +AT_SETUP([fix subtract]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 NUM-REC. + 03 NUM-VAL PIC S9(2). + + PROCEDURE DIVISION. + MOVE -2 TO NUM-VAL. + ADD 1 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -2 TO NUM-VAL. + ADD 3 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -2 TO NUM-VAL. + SUBTRACT -1 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -2 TO NUM-VAL. + SUBTRACT -3 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD 4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD 5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD 6 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD -4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD -5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + ADD -6 TO NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** + MOVE -5 TO NUM-VAL. + SUBTRACT 4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + SUBTRACT 5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + SUBTRACT 6 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + SUBTRACT -4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + SUBTRACT -5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE -5 TO NUM-VAL. + SUBTRACT -6 FROM NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** + MOVE 0 TO NUM-VAL. + ADD 4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + ADD 5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + ADD 6 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + ADD -4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + ADD -5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + ADD -6 TO NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** + MOVE 0 TO NUM-VAL. + SUBTRACT 4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + SUBTRACT 5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + SUBTRACT 6 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + SUBTRACT -4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + SUBTRACT -5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 0 TO NUM-VAL. + SUBTRACT -6 FROM NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** + MOVE 5 TO NUM-VAL. + ADD 4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + ADD 5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + ADD 6 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + ADD -4 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + ADD -5 TO NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + ADD -6 TO NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** + MOVE 5 TO NUM-VAL. + SUBTRACT 4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + SUBTRACT 5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + SUBTRACT 6 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + SUBTRACT -4 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + SUBTRACT -5 FROM NUM-VAL. + DISPLAY NUM-VAL. + + MOVE 5 TO NUM-VAL. + SUBTRACT -6 FROM NUM-VAL. + DISPLAY NUM-VAL. + ****************************************************************** +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([java prog], [0], +[-01 ++01 +-01 ++01 +-01 ++00 ++01 +-09 +-10 +-11 +-09 +-10 +-11 +-01 ++00 ++01 ++04 ++05 ++06 +-04 +-05 +-06 +-04 +-05 +-06 ++04 ++05 ++06 ++09 ++10 ++11 ++01 ++00 +-01 ++01 ++00 +-01 ++09 ++10 ++11 +]) + +AT_CLEANUP + From 46ef3dc221d359bc95d5bbdd8cf193dca1de2b27 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:29:41 +0900 Subject: [PATCH 054/188] publish libcobj.jar to GitHub Package on release (#548) --- .github/workflows/create-release.yml | 27 ++++++++++++++++++++- .github/workflows/publish-libcobj.yml | 35 --------------------------- 2 files changed, 26 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/publish-libcobj.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index a88b07bb..206349ea 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -44,4 +44,29 @@ jobs: gh release upload ${{ github.ref_name }} cobj.exe --clobber gh release upload ${{ github.ref_name }} libcobj.jar --clobber gh release upload ${{ github.ref_name }} config/default.conf --clobber - \ No newline at end of file + + # publish libcobj.jar to GitHub Packages + publish: + needs: check-workflows + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - run: | + cd ../ + mv opensourcecobol4j/* . + mv libcobj/* opensourcecobol4j + - uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v3 + - name: Publish package + uses: gradle/gradle-build-action@v3 + with: + arguments: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-libcobj.yml b/.github/workflows/publish-libcobj.yml deleted file mode 100644 index 4e7d018f..00000000 --- a/.github/workflows/publish-libcobj.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish package to GitHub Packages - -on: - workflow_dispatch: - release: - types: [published] - -jobs: - check-workflows: - uses: ./.github/workflows/check-workflows.yml - - publish: - needs: check-workflows - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - run: | - cd ../ - mv opensourcecobol4j/* . - mv libcobj/* opensourcecobol4j - - uses: actions/setup-java@v4 - with: - java-version: '11' - distribution: 'temurin' - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v3 - - name: Publish package - uses: gradle/gradle-build-action@v3 - with: - arguments: publish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4436faa559ab55adb9875680d4e257eb3d292372 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Thu, 14 Nov 2024 13:19:46 +0900 Subject: [PATCH 055/188] Bugfix about `WHEN` condition of `SEARCH` (#551) * Add allow-key-in-rhs.conf * Update conf.at * move allow-key-in-rhs: config/ -> tests/command-line-option.src --- .../allow-key-in-rhs.conf | 153 ++++++++++++++++ tests/command-line-options.src/conf.at | 166 ++++++++++++++++++ 2 files changed, 319 insertions(+) create mode 100644 tests/command-line-options.src/allow-key-in-rhs.conf diff --git a/tests/command-line-options.src/allow-key-in-rhs.conf b/tests/command-line-options.src/allow-key-in-rhs.conf new file mode 100644 index 00000000..daa28900 --- /dev/null +++ b/tests/command-line-options.src/allow-key-in-rhs.conf @@ -0,0 +1,153 @@ +# COBOL compiler configuration -*- sh -*- + +# Value: any string +name: "OpenCOBOL" + +# Value: int +tab-width: 8 +text-column: 72 + +# Value: 'record-sequential', 'line-sequential' +# This sets the default organization for sequential files, +# where the organization is not explicitly defined. +default-organization: record-sequential + +# Value: 'cobol2002', 'mf', 'ibm', 'jph1' +assign-clause: mf + +# If yes, file names are resolved at run time using environment variables. +# For example, given ASSIGN TO "DATAFILE", the actual file name will be +# 1. the value of environment variable 'DD_DATAFILE' or +# 2. the value of environment variable 'dd_DATAFILE' or +# 3. the value of environment variable 'DATAFILE' or +# 4. the literal "DATAFILE" +# If no, the value of the assign clause is the file name. +# +# Value: 'yes', 'no' +filename-mapping: yes + +# Value: 'yes', 'no' +pretty-display: yes + +# Value: 'yes', 'no' +auto-initialize: yes + +# Value: 'yes', 'no' +complex-odo: no + +# Value: 'yes', 'no' +indirect-redefines: no + +# Binary byte size - defines the allocated bytes according to PIC +# Value: signed unsigned bytes +# ------ -------- ----- +# '2-4-8' 1 - 4 2 +# 5 - 9 4 +# 10 - 18 8 +# +# '1-2-4-8' 1 - 2 1 +# 3 - 4 2 +# 5 - 9 4 +# 10 - 18 8 +# +# '1--8' 1 - 2 1 - 2 1 +# 3 - 4 3 - 4 2 +# 5 - 6 5 - 7 3 +# 7 - 9 8 - 9 4 +# 10 - 11 10 - 12 5 +# 12 - 14 13 - 14 6 +# 15 - 16 15 - 16 7 +# 17 - 18 17 - 18 8 +binary-size: 1-2-4-8 + +# Value: 'yes', 'no' +binary-truncate: yes + +# Value: 'native', 'big-endian' +binary-byteorder: big-endian + +# Value: 'any', 'fatal', 'never' +abort-on-io-exception: any + +# Value: 'yes', 'no' +larger-redefines-ok: no + +# Value: 'yes', 'no' +relaxed-syntax-check: no + +# Perform type OSVS - If yes, the exit point of any currently executing perform +# is recognized if reached. +# Value: 'yes', 'no' +perform-osvs: no + +# If yes, linkage-section items remain allocated +# between invocations. +# Value: 'yes', 'no' +sticky-linkage: no + +# If yes, set the file assign to the external file +# Value: 'yes', 'no' +assign_external: no + +# If yes, allow non-matching level numbers +# Value: 'yes', 'no' +relax-level-hierarchy: no + +# not-reserved: +# Value: Word to be taken out of the reserved words list +# (case independent) + +# Dialect features +# Value: 'ok', 'archaic', 'obsolete', 'skip', 'ignore', 'unconformable' +author-paragraph: obsolete +memory-size-clause: obsolete +multiple-file-tape-clause: obsolete +label-records-clause: obsolete +value-of-clause: obsolete +data-records-clause: obsolete +top-level-occurs-clause: skip +synchronized-clause: ok +goto-statement-without-name: obsolete +stop-literal-statement: obsolete +debugging-line: obsolete +padding-character-clause: obsolete +next-sentence-phrase: archaic +eject-statement: skip +entry-statement: obsolete +move-noninteger-to-alphanumeric: error +odo-without-to: ok + +# Value: any single character +default-currency-symbol: $ + +# Value: int +max-alpha-character-data-size: 2147483647 +max-sjis-character-data-size: 1073741823 +max-utf8-character-data-size: 715827882 + +# If yes, length of PROGRAM-ID of after translation is bigger than +# 31 characters, give warning. +c89-identifier-length-check: no + +# jp compatible +# Value: 'yes', 'no' +allow-end-program-with-wrong-name: no +allow-missing-also-clause-in-evaluate: no +allow-empty-imperative-statement: no +enable-program-status-register: no +enable-sort-status-register: no +enable-special-names-argument-clause: no +enable-special-names-environment-clause: no +enable-leng-intrinsic-function: no +enable-length-an-intrinsic-function: no +enable-national-intrinsic-function: no +use-invalidkey-handler-on-status34: no +cobol68-copy-in-data-description: no +switch-no-mnemonic: no +allow-is-in-sort-key-spec: no +allow-search-key-in-rhs: yes +ignore-invalid-record-contains: no +enable-zero-division-error: no +enable-check-subscript-out-of-bounds: no +enable-expect-numeric-error: no +enable-expect-compute-string-error: no diff --git a/tests/command-line-options.src/conf.at b/tests/command-line-options.src/conf.at index 0f1b6a41..ee3f161e 100644 --- a/tests/command-line-options.src/conf.at +++ b/tests/command-line-options.src/conf.at @@ -17,3 +17,169 @@ AT_CHECK([${COBJ} -conf=hello.conf prog.cbl], [1], [], ]) AT_CLEANUP + + +AT_SETUP([allow search key in rhs]) + +# without SEARCH ALL +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + MAIN-RTN. + DISPLAY "HELLO, WORLD!!". + STOP RUN. +]) +AT_CHECK([${COBJ} prog.cbl], [0]) +AT_CHECK([${COBJ} -conf=../../command-line-options.src/allow-key-in-rhs.conf prog.cbl], [0]) + + +# key item of OCCURS is LEFT hand side on WHEN condition +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 ELEMENT_COUNT PIC 9(03) VALUE 3. + 01 RECORD_ARRAY. + 02 FILLER OCCURS 3. + 03 METRIC_COUNT PIC 9(03). + 01 RECORD_ID PIC X(02). + 01 RECORD_KEY. + 02 RECORD_STRUCT. + 03 RECORD_CODE PIC X(04). + 03 RECORD_TYPE PIC X(02). + 02 SERIAL_NO PIC 9(02). + 01 DATA_TABLE. + 02 ELEMENT OCCURS 1 TO 150 + DEPENDING ON ELEMENT_COUNT + ASCENDING KEY TABLE_KEY INDEXED BY INDEX_K. + 03 TABLE_KEY. + 04 KEY_CODE. + 05 RECORD_CODE_KEY PIC X(04). + 05 RECORD_TYPE_KEY PIC X(02). + 04 SERIAL_NO_KEY PIC 9(02). + 03 FILLER PIC X(02). + 03 METRIC_DATA. + 04 METRIC_ELEMENT OCCURS 10 INDEXED BY INDEX_J. + 05 METER_NO PIC X(08). + 05 ADDITION_FLAG PIC X(01). + 03 FILLER PIC X(02). + * + PROCEDURE DIVISION. + MAIN_ROUTINE. + SEARCH ALL ELEMENT + AT END + MOVE ZERO TO METRIC_COUNT(1) + GO TO EXIT_ROUTINE + WHEN TABLE_KEY(INDEX_K) = RECORD_KEY + MOVE KEY_CODE(INDEX_K) TO RECORD_ID + SET METRIC_COUNT(1) TO INDEX_K. + EXIT_ROUTINE. + MAIN_EXIT. + STOP RUN. +]) +AT_CHECK([${COBJ} prog.cbl], [0]) +AT_CHECK([${COBJ} -conf=../../command-line-options.src/allow-key-in-rhs.conf prog.cbl], [0]) + + +# key item of OCCURS is RIGHT hand side on WHEN condition +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 ELEMENT_COUNT PIC 9(03) VALUE 3. + 01 RECORD_ARRAY. + 02 FILLER OCCURS 3. + 03 METRIC_COUNT PIC 9(03). + 01 RECORD_ID PIC X(02). + 01 RECORD_KEY. + 02 RECORD_STRUCT. + 03 RECORD_CODE PIC X(04). + 03 RECORD_TYPE PIC X(02). + 02 SERIAL_NO PIC 9(02). + 01 DATA_TABLE. + 02 ELEMENT OCCURS 1 TO 150 + DEPENDING ON ELEMENT_COUNT + ASCENDING KEY TABLE_KEY INDEXED BY INDEX_K. + 03 TABLE_KEY. + 04 KEY_CODE. + 05 RECORD_CODE_KEY PIC X(04). + 05 RECORD_TYPE_KEY PIC X(02). + 04 SERIAL_NO_KEY PIC 9(02). + 03 FILLER PIC X(02). + 03 METRIC_DATA. + 04 METRIC_ELEMENT OCCURS 10 INDEXED BY INDEX_J. + 05 METER_NO PIC X(08). + 05 ADDITION_FLAG PIC X(01). + 03 FILLER PIC X(02). + * + PROCEDURE DIVISION. + MAIN_ROUTINE. + SEARCH ALL ELEMENT + AT END + MOVE ZERO TO METRIC_COUNT(1) + GO TO EXIT_ROUTINE + WHEN RECORD_KEY = TABLE_KEY(INDEX_K) + MOVE KEY_CODE(INDEX_K) TO RECORD_ID + SET METRIC_COUNT(1) TO INDEX_K. + EXIT_ROUTINE. + MAIN_EXIT. + STOP RUN. +]) +AT_CHECK([(${COBJ} prog.cbl | grep "Undeclared key") > a.txt 2>&1], [1]) +AT_CHECK([${COBJ} -conf=../../command-line-options.src/allow-key-in-rhs.conf prog.cbl], [0]) + + +# only key item on WHEN condition +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 ELEMENT_COUNT PIC 9(03) VALUE 3. + 01 RECORD_ARRAY. + 02 FILLER OCCURS 3. + 03 METRIC_COUNT PIC 9(03). + 01 RECORD_ID PIC X(02). + 01 RECORD_KEY. + 02 RECORD_STRUCT. + 03 RECORD_CODE PIC X(04). + 03 RECORD_TYPE PIC X(02). + 02 SERIAL_NO PIC 9(02). + 01 DATA_TABLE. + 02 ELEMENT OCCURS 1 TO 150 + DEPENDING ON ELEMENT_COUNT + ASCENDING KEY TABLE_KEY INDEXED BY INDEX_K. + 03 TABLE_KEY. + 04 KEY_CODE. + 05 RECORD_CODE_KEY PIC X(04). + 05 RECORD_TYPE_KEY PIC X(02). + 04 SERIAL_NO_KEY PIC 9(02). + 03 FILLER PIC X(02). + 03 METRIC_DATA. + 04 METRIC_ELEMENT OCCURS 10 INDEXED BY INDEX_J. + 05 METER_NO PIC X(08). + 05 ADDITION_FLAG PIC X(01). + 03 FILLER PIC X(02). + * + PROCEDURE DIVISION. + MAIN_ROUTINE. + SEARCH ALL ELEMENT + AT END + MOVE ZERO TO METRIC_COUNT(1) + GO TO EXIT_ROUTINE + WHEN TABLE_KEY(INDEX_K) + MOVE KEY_CODE(INDEX_K) TO RECORD_ID + SET METRIC_COUNT(1) TO INDEX_K. + EXIT_ROUTINE. + MAIN_EXIT. + STOP RUN. +]) +AT_CHECK([(${COBJ} prog.cbl | grep "Invalid type cast") > a.txt 2>&1], [1]) +AT_CHECK([(${COBJ} -conf=../../command-line-options.src/allow-key-in-rhs.conf prog.cbl | grep "Invalid type cast") > a.txt 2>&1], [1]) + +AT_CLEANUP From 9f3a81d95d646da7229fd1d33f21c6d4cb6b9b21 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:20:42 +0900 Subject: [PATCH 056/188] Fix getSign() (#549) * [WIP] Fix getSign() * Fix getSign() and add a test case --- .../libcobj/data/CobolNumericField.java | 6 +--- tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + .../misc.src/display-numeric-NUMERIC-class.at | 32 +++++++++++++++++++ 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 tests/misc.src/display-numeric-NUMERIC-class.at diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index 8cefebec..b05705b0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -475,11 +475,7 @@ public int getSign() { if (attr.isFlagSignSeparate()) { return value == 0x2b ? 1 : -1; } else { - if (0x30 <= value && value <= 0x39) { - return 1; - } - if (value == 0x20) { - this.getDataStorage().setByte(p, (byte) 0x30); + if (value == 0x20 || (0x30 <= value && value <= 0x39)) { return 1; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 484aee23..32c2049f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -223,7 +223,8 @@ misc_DEPENDENCIES = \ misc.src/file-handler-japanese.at \ misc.src/perform-until-div.at \ misc.src/search-occurs-depending.at \ - misc.src/fix-subtract.at + misc.src/fix-subtract.at \ + misc.src/display-numeric-NUMERIC-class.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 3ed18bdd..9c1bfa5c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -762,7 +762,8 @@ misc_DEPENDENCIES = \ misc.src/file-handler-japanese.at \ misc.src/perform-until-div.at \ misc.src/search-occurs-depending.at \ - misc.src/fix-subtract.at + misc.src/fix-subtract.at \ + misc.src/display-numeric-NUMERIC-class.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 93fa8085..1ac799e7 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -53,3 +53,4 @@ m4_include([file-handler-japanese.at]) m4_include([perform-until-div.at]) m4_include([search-occurs-depending.at]) m4_include([fix-subtract.at]) +m4_include([display-numeric-NUMERIC-class.at]) diff --git a/tests/misc.src/display-numeric-NUMERIC-class.at b/tests/misc.src/display-numeric-NUMERIC-class.at new file mode 100644 index 00000000..b3273abf --- /dev/null +++ b/tests/misc.src/display-numeric-NUMERIC-class.at @@ -0,0 +1,32 @@ +AT_SETUP([DISPLAY numeric after NUMERIC class testing]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 N-REC. + 03 N-VAL PIC 9. + PROCEDURE DIVISION. + MAIN-PROC. + ************************************************************* + MOVE SPACE TO N-REC. + DISPLAY "N-VAL: '" N-VAL "'". + + IF N-VAL NUMERIC + DISPLAY "N-VAL is numeric" + ELSE + DISPLAY "N-VAL is not numeric" + END-IF. + + DISPLAY "N-VAL: '" N-VAL "'". +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([java prog], [0], +[N-VAL: ' ' +N-VAL is not numeric +N-VAL: ' ' +]) + +AT_CLEANUP \ No newline at end of file From 754f95c126deb8fd928e3290b638286f370d70df Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Thu, 14 Nov 2024 05:06:42 +0000 Subject: [PATCH 057/188] Fix INSPECT (#550) --- .../libcobj/common/CobolInspect.java | 6 ++- tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/display-inspect-sign.at | 53 +++++++++++++++++++ 5 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 tests/misc.src/display-inspect-sign.at diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java index 83f772c0..00c13114 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java @@ -169,11 +169,13 @@ private static void common(AbstractCobolField f1, AbstractCobolField f2, int typ public static void init(AbstractCobolField var, int replacing) { CobolInspect.inspectVarCopy = var; CobolInspect.inspectVar = CobolInspect.inspectVarCopy; - if (inspectVar.getAttribute().isTypeNumericDisplay()) { + CobolInspect.inspectSign = var.getSign(); + + if (var.getAttribute().isTypeNumericDisplay()) { inspectVar.putSign(1); } + CobolInspect.inspectReplacing = replacing; - CobolInspect.inspectSign = var.getSign(); CobolInspect.inspectSize = var.getFieldSize(); CobolInspect.inspectData = var.getDataStorage(); CobolInspect.inspectStart = -1; diff --git a/tests/Makefile.am b/tests/Makefile.am index 32c2049f..60a44e3a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -224,7 +224,8 @@ misc_DEPENDENCIES = \ misc.src/perform-until-div.at \ misc.src/search-occurs-depending.at \ misc.src/fix-subtract.at \ - misc.src/display-numeric-NUMERIC-class.at + misc.src/display-numeric-NUMERIC-class.at \ + misc.src/display-inspect-sign.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 9c1bfa5c..377dde6a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -763,7 +763,8 @@ misc_DEPENDENCIES = \ misc.src/perform-until-div.at \ misc.src/search-occurs-depending.at \ misc.src/fix-subtract.at \ - misc.src/display-numeric-NUMERIC-class.at + misc.src/display-numeric-NUMERIC-class.at \ + misc.src/display-inspect-sign.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 1ac799e7..26913bc2 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -54,3 +54,4 @@ m4_include([perform-until-div.at]) m4_include([search-occurs-depending.at]) m4_include([fix-subtract.at]) m4_include([display-numeric-NUMERIC-class.at]) +m4_include([display-inspect-sign.at]) diff --git a/tests/misc.src/display-inspect-sign.at b/tests/misc.src/display-inspect-sign.at new file mode 100644 index 00000000..562afae1 --- /dev/null +++ b/tests/misc.src/display-inspect-sign.at @@ -0,0 +1,53 @@ +AT_SETUP([DISPLAY values after INSPECT]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 DATA1 + 02 DATA-SIGN PIC S9(5). + 01 DATA2 + 02 DATA-SIGN-LEADING PIC S9(5) SIGN IS LEADING. + 01 DATA3 + 02 DATA-SIGN-LEADING-SEPARATE PIC S9(5) SIGN LEADING SEPARATE. + 01 DATA4 + 02 DATA-SIGN-TRAILING-SEPARATE PIC S9(5) SIGN TRAILING SEPARATE. + PROCEDURE DIVISION. + MAIN-RTN. + MOVE -12345 TO DATA-SIGN. + DISPLAY DATA1. + INSPECT DATA-SIGN REPLACING ALL ' ' BY '0'. + DISPLAY DATA1. + + MOVE -12345 TO DATA-SIGN-LEADING. + DISPLAY DATA2. + INSPECT DATA-SIGN-LEADING REPLACING ALL ' ' BY '0'. + DISPLAY DATA2. + + MOVE -12345 TO DATA-SIGN-LEADING-SEPARATE. + DISPLAY DATA3. + INSPECT DATA-SIGN-LEADING-SEPARATE REPLACING ALL ' ' BY '0'. + DISPLAY DATA3. + + MOVE -12345 TO DATA-SIGN-TRAILING-SEPARATE. + DISPLAY DATA4. + INSPECT DATA-SIGN-TRAILING-SEPARATE REPLACING ALL ' ' BY '0'. + DISPLAY DATA4. + STOP RUN. +]) + + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[1234u +1234u +q2345 +q2345 +-12345 +-12345 +12345- +12345- +]) + +AT_CLEANUP \ No newline at end of file From 4eb41d5c56583c6355c1f838e6cd21579bf92939 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:22:21 +0900 Subject: [PATCH 058/188] Add unzip to the tools installed in Dev Container (#552) --- .devcontainer/Dockerfile | 2 +- cobj/pplex.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index aa31b1c2..c9adb5ce 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -9,4 +9,4 @@ RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar' >> ~/.bashrc # install dependencies RUN dnf update -y RUN dnf install -y epel-release -RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck libtool gettext-devel +RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-21-openjdk-devel git-clang-format cppcheck libtool gettext-devel unzip diff --git a/cobj/pplex.c b/cobj/pplex.c index 3be62fbb..bffa4e5a 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -379,7 +379,7 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start)-1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -2632,8 +2632,8 @@ YY_DECL { default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer From 56c7c13ec7ddec2fd026d28038ade69dc7613dc7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:13:08 +0900 Subject: [PATCH 059/188] Remove unnecessary settings (#553) --- .github/workflows/pull-request.yml | 3 --- .github/workflows/push.yml | 3 --- cobj/pplex.c | 6 +++--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3cb4d291..a015c3ac 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -17,9 +17,6 @@ concurrency: permissions: contents: read -env: - CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar" - jobs: check-workflows: uses: ./.github/workflows/check-workflows.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6a1dc22b..dc90eee4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,9 +16,6 @@ concurrency: permissions: contents: read -env: - CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar" - jobs: check-workflows: uses: ./.github/workflows/check-workflows.yml diff --git a/cobj/pplex.c b/cobj/pplex.c index bffa4e5a..3be62fbb 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -379,7 +379,7 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start) - 1) / 2) +#define YY_START (((yy_start)-1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) @@ -2632,8 +2632,8 @@ YY_DECL { default: YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer From 909b4382dc3e8df9b365b831f4170eaf98050e62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:24:00 +0900 Subject: [PATCH 060/188] Bump org.xerial:sqlite-jdbc from 3.47.0.0 to 3.47.1.0 in /libcobj (#554) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.47.0.0 to 3.47.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.47.0.0...3.47.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 9d08b282..209846eb 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.3.1-jre") - implementation("org.xerial:sqlite-jdbc:3.47.0.0") + implementation("org.xerial:sqlite-jdbc:3.47.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 371d85bb1f2c096fd6b145151e6ef20a02fa7754 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:47:18 +0900 Subject: [PATCH 061/188] Release 1.1.4 (#555) --- CHANGELOG.md | 17 +++++++++++ ChangeLog | 4 +++ NEWS | 18 ++++++++++++ README.md | 8 +++--- README_JP.md | 8 +++--- ReleaseNote.md | 28 ++++++++----------- configure | 26 ++++++++--------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++-- win/config.h | 8 +++--- 15 files changed, 91 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba44de06..ce74488b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [1.1.4] - 2024-11-29 + +### Fix +* Process Japanese identifiers in COBOL correctly (#540) + * The older versions convert some Japanese characters in COBOL identifiers to another characters in Java. +* Fix the conditions `PERFORM UNTIL` (#544) + * If COBOL source code contains divisions in conditions of `PERFORM UNTIL`, the older versions emit compile errors. +* Fix `SEARCH` statements with data specified `OCCURS` and `DEPENDING`(#545) + * The older versions emit compile errors when `SEARCH` statements with data specified `OCCURS` and `DEPENDING` +* Fix `ADD` statements and `SUBTRACT` statements (#546) + * In some case, the result of `SUBTRACT` was previously incorrect when the operands contais PIC S9(n) negative values. + * In some case, the result of `ADD` was -0 instead of +0 previously. +* Fix the process of checking signs of PIC 9(n) containing spaces (#549) +* Fix `INSPECT` statements (#550) + * The older versions change signs of some values accidentally because of the bug of `INSPECT` statements. + ## [1.1.3] - 2024-10-31 ### Add * Add a new option `-variable` (#513) diff --git a/ChangeLog b/ChangeLog index ee872e61..ecaf8e83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-11-29 OSS Consortium + + * opensource COBOL 4J v1.1.4 released. + 2024-10-31 OSS Consortium * opensource COBOL 4J v1.1.3 released. diff --git a/NEWS b/NEWS index 2fb64339..c8b74375 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,24 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.4 + +*** Bug Fixes + (1) Process Japanese identifiers in COBOL correctly (#540) + * The older versions convert some Japanese characters in COBOL identifiers to another characters in Java. + (2) Fix the conditions `PERFORM UNTIL` (#544) + * If COBOL source code contains divisions in conditions of `PERFORM UNTIL`, the older versions emit compile errors. + (3) Fix `SEARCH` statements with data specified `OCCURS` and `DEPENDING`(#545) + * The older versions emit compile errors when `SEARCH` statements with data specified `OCCURS` and `DEPENDING` + (4) Fix `ADD` statements and `SUBTRACT` statements (#546) + * In some case, the result of `SUBTRACT` was previously incorrect when the operands contais PIC S9(n) negative values. + * In some case, the result of `ADD` was -0 instead of +0 previously. + (5) Fix the process of checking signs of PIC 9(n) containing spaces (#549) + (6) Fix `INSPECT` statements (#550) + * The older versions change signs of some values accidentally because of the bug of `INSPECT` statements. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.3 ** New Features diff --git a/README.md b/README.md index 61e8a1dc..745776f7 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.3.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.3.tar.gz -tar zxvf opensourcecobol4j-v1.1.3.tar.gz -cd opensourcecobol4j-1.1.3 +curl -L -o opensourcecobol4j-v1.1.4.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.4.tar.gz +tar zxvf opensourcecobol4j-v1.1.4.tar.gz +cd opensourcecobol4j-1.1.4 ./configure --prefix=/usr/ make sudo make install @@ -125,7 +125,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.3 +docker pull opensourcecobol/opensourcecobol4j:1.1.4 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 62d467c3..2861f7d2 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.3.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.3.tar.gz -tar zxvf opensourcecobol4j-v1.1.3.tar.gz -cd opensourcecobol4j-1.1.3 +curl -L -o opensourcecobol4j-v1.1.4.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.4.tar.gz +tar zxvf opensourcecobol4j-v1.1.4.tar.gz +cd opensourcecobol4j-1.1.4 ./configure --prefix=/usr/ make sudo make install @@ -114,7 +114,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.3 +docker pull opensourcecobol/opensourcecobol4j:1.1.4 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index 8872a2d2..78b0aa2b 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,17 +1,13 @@ -### Added -* Add a new option `-variable` - * With `-variable`, cobj allows 73 or more characters for each lines -* Add documentations that describe the structure of libcobj and generated Java files -* Add Visual Studio Code Dev Container of opensource COBOL 4J - ### Fixed -* Fix a build error of opensource COBOL 4J on Windows 10 -* Fix a build error of opensource COBOL 4J on Docker -* Fix `cobj-api` - * `cobj-api` previously generated invalid constructors in record classses -* Fix typos of `cobj-idx` command -* Fix a command line option `-fserial-variable` - -### Miscellaneous -* Improve the readability of variable names containing multi-byte characters -* Convert some EVALUATE statements to switch statements +* Process Japanese identifiers in COBOL correctly. + * The older versions convert some Japanese characters in COBOL identifiers to another characters in Java. +* Fix the conditions `PERFORM UNTIL`. + * If COBOL source code contains divisions in conditions of `PERFORM UNTIL`, the older versions emit compile errors. +* Fix `SEARCH` statements with data specified `OCCURS` and `DEPENDING`. + * The older versions emit compile errors when `SEARCH` statements with data specified `OCCURS` and `DEPENDING` +* Fix `ADD` statements and `SUBTRACT` statements. + * In some case, the result of `SUBTRACT` was previously incorrect when the operands contais PIC S9(n) negative values. + * In some case, the result of `ADD` was -0 instead of +0 previously. +* Fix the process of checking signs of PIC 9(n) containing spaces. +* Fix `INSPECT` statements. + * The older versions change signs of some values accidentally because of the bug of `INSPECT` statements. \ No newline at end of file diff --git a/configure b/configure index 82759e3d..a2bcc923 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.3. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.4. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.3' -PACKAGE_VERSION='1.1.3' -PACKAGE_STRING='opensource COBOL 4J 1.1.3' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.4' +PACKAGE_VERSION='1.1.4' +PACKAGE_STRING='opensource COBOL 4J 1.1.4' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.3 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.3] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.4] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.3:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.4:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.3 +opensource COBOL 4J configure 1.1.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.3, which was +It was created by opensource COBOL 4J $as_me 1.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.3' - VERSION='1.1.3' + PACKAGE='opensource-cobol-4j-1.1.4' + VERSION='1.1.4' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.3, which was +This file was extended by opensource COBOL 4J $as_me 1.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.3 +opensource COBOL 4J config.status 1.1.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b0ada60e..1e8f1573 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.3],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.3]) +AC_INIT([opensource COBOL 4J],[1.1.4],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.4]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index a0724568..156cb7af 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.4 | Windows | 21 | +| 1.1.4 | Ubuntu 24.04 | 21 | +| 1.1.4 | AlmaLinux 9 | 11 | +| 1.1.4 | Amazon Linux 2023 | 21 | | 1.1.3 | Windows | 21 | | 1.1.3 | Ubuntu 24.04 | 21 | | 1.1.3 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 209846eb..ad3d9da0 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.3" + version = "1.1.4" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index ea4b8961..1cb74f17 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.3"; + public static final String version = "1.1.4"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index c9c27122..60cc23a2 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.3"); + System.out.println("1.1.4"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 4625a76f..730c7b01 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.3", + "opensourcecobol4j_version": "1.1.4", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.3", + "opensourcecobol4j_version": "1.1.4", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.3", + "opensourcecobol4j_version": "1.1.4", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.3", + "opensourcecobol4j_version": "1.1.4", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 3743f5c8..a458b6a9 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.3]) -m4_define([AT_PACKAGE_VERSION], [1.1.3]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.3]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.4]) +m4_define([AT_PACKAGE_VERSION], [1.1.4]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.4]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 0b25715a..bf8330db 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.3" +#define PACKAGE "opensource-cobol4j-1.1.4" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.3" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.4" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.3" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.4" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.3" +#define PACKAGE_VERSION "1.1.4" /* Define a patch level */ #define PATCH_LEVEL 0 From 6ffaf1799a54ec38177410d783498fae7326f95d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 19:44:23 +0900 Subject: [PATCH 062/188] Bump org.gradle.toolchains.foojay-resolver-convention in /libcobj (#558) Bumps org.gradle.toolchains.foojay-resolver-convention from 0.8.0 to 0.9.0. --- updated-dependencies: - dependency-name: org.gradle.toolchains.foojay-resolver-convention dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/settings.gradle.kts b/libcobj/settings.gradle.kts index 5bc028ae..6f155be8 100644 --- a/libcobj/settings.gradle.kts +++ b/libcobj/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" } rootProject.name = "opensourcecobol4j" From ce27cbf1185f487df62e51e35b6ca7dd8f9df081 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:10:49 +0900 Subject: [PATCH 063/188] fix comparison of COMP data (#559) --- cobj/typeck.c | 28 +- .../libcobj/data/AbstractCobolField.java | 53 ++-- tests/data-rep.src/binary.at | 258 ++++++++++++++++++ 3 files changed, 302 insertions(+), 37 deletions(-) diff --git a/cobj/typeck.c b/cobj/typeck.c index 0de8269d..7f45804d 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -114,16 +114,6 @@ static const char *const bin_set_funcs[] = {NULL, "setSwpS56Binary", "setSwpS64Binary"}; -static const char *const bin_compare_funcs[] = { - "cmpU8Binary", "cmpU16Binary", "cmpU24Binary", "cmpU32Binary", - "cmpU40Binary", "cmpU48Binary", "cmpU56Binary", "cmpU64Binary", - "cmpS8Binary", "cmpS16Binary", "cmpS24Binary", "cmpS32Binary", - "cmpS40Binary", "cmpS48Binary", "cmpS56Binary", "cmpS64Binary", - "cmpU8Binary", "cmpSwpU16Binary", "cmpSwpU24Binary", "cmpSwpU32Binary", - "cmpSwpU40Binary", "cmpSwpU48Binary", "cmpSwpU56Binary", "cmpSwpU64Binary", - "cmpS8Binary", "cmpSwpS16Binary", "cmpSwpS24Binary", "cmpSwpS32Binary", - "cmpSwpS40Binary", "cmpSwpS48Binary", "cmpSwpS56Binary", "cmpSwpS64Binary"}; - static const char *const bin_add_funcs[] = { "addU8Binary", "addU16Binary", "addU24Binary", "addU32Binary", "addU40Binary", "addU48Binary", "addU56Binary", "addU64Binary", @@ -2245,7 +2235,7 @@ static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { if (!fy->pic->have_sign && (fy->usage == CB_USAGE_BINARY || fy->usage == CB_USAGE_COMP_5 || fy->usage == CB_USAGE_COMP_X)) { - return cb_build_method_call_2("cmpUint", p->x, + return cb_build_method_call_2("cmpInteger", p->x, cb_build_cast_integer(p->y)); } } @@ -2253,10 +2243,10 @@ static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { struct cb_field *f = cb_field(p->x); if (!f->pic->scale && f->usage == CB_USAGE_PACKED) { if (f->pic->digits < 10) { - return cb_build_method_call_2("cmpInt", p->x, + return cb_build_method_call_2("cmpInteger", p->x, cb_build_cast_integer(p->y)); } else { - return cb_build_method_call_2("cmpInt", p->x, + return cb_build_method_call_2("cmpInteger", p->x, cb_build_cast_integer(p->y)); } } @@ -2287,16 +2277,12 @@ static cb_tree cb_build_optim_cond(struct cb_binary_op *p) { if (!f->pic->scale && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || f->usage == CB_USAGE_INDEX || f->usage == CB_USAGE_COMP_X)) { - size_t n = (f->size - 1) + (8 * (f->pic->have_sign ? 1 : 0)) + - (16 * (f->flag_binary_swap ? 1 : 0)); - const char *s = bin_compare_funcs[n]; - if (s) { - return cb_build_method_call_2(s, cb_build_cast_address(p->x), - cb_build_cast_integer(p->y)); - } + return cb_build_method_call_2("cmpInteger", p->x, + cb_build_cast_integer(p->y)); } } - return cb_build_method_call_2("cmpInt", p->x, cb_build_cast_integer(p->y)); + return cb_build_method_call_2("cmpInteger", p->x, + cb_build_cast_integer(p->y)); } static int cb_chk_num_cond(cb_tree x, cb_tree y) { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java index 3042f096..9f28e2d6 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java @@ -414,10 +414,10 @@ public int divRemainder(int opt) throws CobolStopRunException { } /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 + * 整数値との比較を行う + * @deprecated 代わりにcmpIntegerを使用してください + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 */ public int cmpInt(int n) { CobolDecimal d1 = this.getDecimal(); @@ -427,30 +427,51 @@ public int cmpInt(int n) { } /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 + * 整数値との比較を行う + * @deprecated 代わりにcmpIntegerを使用してください + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 */ public int cmpInt(long n) { return this.cmpInt((int) n); } /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 + * 整数値との比較を行う + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 + */ + public int cmpInteger(long n) { + CobolDecimal d1 = this.getDecimal(); + CobolDecimal d2 = new CobolDecimal(n); + d2.setScale(0); + return d1.compareTo(d2); + } + + /** + * 整数値との比較を行う + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 + */ + public int cmpInteger(int n) { + return this.cmpInteger((long) n); + } + + /** + * 整数値との比較を行う + * @deprecated 代わりにcmpIntegerを使用してください + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 */ public int cmpUint(int n) { return this.cmpInt(n); } /** - * TODO: 準備中 - * - * @param n TODO: 準備中 - * @return TODO: 準備中 + * 整数値との比較を行う + * @deprecated 代わりにcmpIntegerを使用してください + * @param n 比較対象の整数値 + * @return 保持する数値データの比較を行い,this<nなら負の値,this==nなら0,this>nなら正の値 */ public int cmpUint(long n) { return this.cmpUint((int) n); diff --git a/tests/data-rep.src/binary.at b/tests/data-rep.src/binary.at index 7ffcf7f4..b3a03b46 100644 --- a/tests/data-rep.src/binary.at +++ b/tests/data-rep.src/binary.at @@ -1277,3 +1277,261 @@ AT_CHECK([java prog], [0], ]) AT_CLEANUP + +# compare COMP data + +AT_SETUP([compare COMP]) + +AT_DATA([prog.cbl],[ + identification division. + program-id. prog. + data division. + working-storage section. + 01 u9 pic 9(9) comp. + 01 u18 pic 9(18) comp. + 01 s4 pic s9(4) comp. + 01 s9 pic s9(9) comp. + 01 s18 pic s9(18) comp. + procedure division. + move 2 to u9. move -1 to s4. + if u9 <= s4 then display "ng 00-00" end-if. + move 2 to u9. move -3 to s4. + if u9 <= s4 then display "ng 00-01" end-if. + move 2 to u9. move -9999 to s4. + if u9 <= s4 then display "ng 00-02" end-if. + move 2 to u9. move 0 to s4. + if u9 <= s4 then display "ng 00-03" end-if. + move 2 to u9. move 1 to s4. + if u9 <= s4 then display "ng 00-04" end-if. + move 2 to u9. move 2 to s4. + if u9 <> s4 then display "ng 00-05" end-if. + move 2 to u9. move 3 to s4. + if u9 >= s4 then display "ng 00-06" end-if. + move 2 to u9. move 9999 to s4. + if u9 >= s4 then display "ng 00-06" end-if. + move 0 to u9. move -1 to s4. + if u9 <= s4 then display "ng 00-07" end-if. + move 0 to u9. move -3 to s4. + if u9 <= s4 then display "ng 00-08" end-if. + move 0 to u9. move -9999 to s4. + if u9 <= s4 then display "ng 00-09" end-if. + move 0 to u9. move 0 to s4. + if u9 <> s4 then display "ng 00-10" end-if. + move 0 to u9. move 1 to s4. + if u9 >= s4 then display "ng 00-11" end-if. + move 0 to u9. move 2 to s4. + if u9 >= s4 then display "ng 00-12" end-if. + move 0 to u9. move 3 to s4. + if u9 >= s4 then display "ng 00-13" end-if. + move 0 to u9. move 9999 to s4. + if u9 >= s4 then display "ng 00-14" end-if. + move 999999999 to u9. move -1 to s4. + if u9 <= s4 then display "ng 00-15" end-if. + move 999999999 to u9. move -3 to s4. + if u9 <= s4 then display "ng 00-16" end-if. + move 999999999 to u9. move -9999 to s4. + if u9 <= s4 then display "ng 00-17" end-if. + move 999999999 to u9. move 0 to s4. + if u9 <= s4 then display "ng 00-18" end-if. + move 999999999 to u9. move 1 to s4. + if u9 <= s4 then display "ng 00-19" end-if. + move 999999999 to u9. move 2 to s4. + if u9 <= s4 then display "ng 00-20" end-if. + move 999999999 to u9. move 9999 to s4. + if u9 <= s4 then display "ng 00-21" end-if. + ****************************************************************** + move 2 to u9. move -1 to s9. + if u9 <= s9 then display "ng 01-00" end-if. + move 2 to u9. move -3 to s9. + if u9 <= s9 then display "ng 01-01" end-if. + move 2 to u9. move -999999999 to s9. + if u9 <= s9 then display "ng 01-02" end-if. + move 2 to u9. move 0 to s9. + if u9 <= s9 then display "ng 01-03" end-if. + move 2 to u9. move 1 to s9. + if u9 <= s9 then display "ng 01-04" end-if. + move 2 to u9. move 2 to s9. + if u9 <> s9 then display "ng 01-05" end-if. + move 2 to u9. move 3 to s9. + if u9 >= s9 then display "ng 01-06" end-if. + move 2 to u9. move 999999999 to s9. + if u9 >= s9 then display "ng 01-06" end-if. + move 0 to u9. move -1 to s9. + if u9 <= s9 then display "ng 01-07" end-if. + move 0 to u9. move -3 to s9. + if u9 <= s9 then display "ng 01-08" end-if. + move 0 to u9. move -999999999 to s9. + if u9 <= s9 then display "ng 01-09" end-if. + move 0 to u9. move 0 to s9. + if u9 <> s9 then display "ng 01-10" end-if. + move 0 to u9. move 1 to s9. + if u9 >= s9 then display "ng 01-11" end-if. + move 0 to u9. move 2 to s9. + if u9 >= s9 then display "ng 01-12" end-if. + move 0 to u9. move 3 to s9. + if u9 >= s9 then display "ng 01-13" end-if. + move 0 to u9. move 999999999 to s9. + if u9 >= s9 then display "ng 01-14" end-if. + move 999999999 to u9. move -1 to s9. + if u9 <= s9 then display "ng 01-15" end-if. + move 999999999 to u9. move -3 to s9. + if u9 <= s9 then display "ng 01-16" end-if. + move 999999999 to u9. move -999999999 to s9. + if u9 <= s9 then display "ng 01-17" end-if. + move 999999999 to u9. move 0 to s9. + if u9 <= s9 then display "ng 01-18" end-if. + move 999999999 to u9. move 1 to s9. + if u9 <= s9 then display "ng 01-19" end-if. + move 999999999 to u9. move 2 to s9. + if u9 <= s9 then display "ng 01-20" end-if. + move 999999999 to u9. move 999999999 to s9. + if u9 <> s9 then display "ng 01-21" end-if. + ****************************************************************** + move 2 to u9. move -1 to s18. + if u9 <= s18 then display "ng 02-00" end-if. + move 2 to u9. move -3 to s18. + if u9 <= s18 then display "ng 02-01" end-if. + move 2 to u9. move -999999999999999999 to s18. + if u9 <= s18 then display "ng 02-02" end-if. + move 2 to u9. move 0 to s18. + if u9 <= s18 then display "ng 02-03" end-if. + move 2 to u9. move 1 to s18. + if u9 <= s18 then display "ng 02-04" end-if. + move 2 to u9. move 2 to s18. + if u9 <> s18 then display "ng 02-05" end-if. + move 2 to u9. move 3 to s18. + if u9 >= s18 then display "ng 02-06" end-if. + move 2 to u9. move 999999999999999999 to s18. + if u9 >= s18 then display "ng 02-06" end-if. + move 0 to u9. move -1 to s18. + if u9 <= s18 then display "ng 02-07" end-if. + move 0 to u9. move -3 to s18. + if u9 <= s18 then display "ng 02-08" end-if. + move 0 to u9. move -999999999999999999 to s18. + if u9 <= s18 then display "ng 02-09" end-if. + move 0 to u9. move 0 to s18. + if u9 <> s18 then display "ng 02-10" end-if. + move 0 to u9. move 1 to s18. + if u9 >= s18 then display "ng 02-11" end-if. + move 0 to u9. move 2 to s18. + if u9 >= s18 then display "ng 02-12" end-if. + move 0 to u9. move 3 to s18. + if u9 >= s18 then display "ng 02-13" end-if. + move 0 to u9. move 999999999999999999 to s18. + if u9 >= s18 then display "ng 02-14" end-if. + move 999999999 to u9. move -1 to s18. + if u9 <= s18 then display "ng 02-15" end-if. + move 999999999 to u9. move -3 to s18. + if u9 <= s18 then display "ng 02-16" end-if. + move 999999999 to u9. move -999999999999999999 to s18. + if u9 <= s18 then display "ng 02-17" end-if. + move 999999999 to u9. move 0 to s18. + if u9 <= s18 then display "ng 02-18" end-if. + move 999999999 to u9. move 1 to s18. + if u9 <= s18 then display "ng 02-19" end-if. + move 999999999 to u9. move 2 to s18. + if u9 <= s18 then display "ng 02-20" end-if. + move 999999999 to u9. move 999999999999999999 to s18. + if u9 >= s18 then display "ng 02-21" end-if. + ****************************************************************** + move 2 to u18. move -1 to s9. + if u18 <= s9 then display "ng 03-00" end-if. + move 2 to u18. move -3 to s9. + if u18 <= s9 then display "ng 03-01" end-if. + move 2 to u18. move -999999999 to s9. + if u18 <= s9 then display "ng 03-02" end-if. + move 2 to u18. move 0 to s9. + if u18 <= s9 then display "ng 03-03" end-if. + move 2 to u18. move 1 to s9. + if u18 <= s9 then display "ng 03-04" end-if. + move 2 to u18. move 2 to s9. + if u18 <> s9 then display "ng 03-05" end-if. + move 2 to u18. move 3 to s9. + if u18 >= s9 then display "ng 03-06" end-if. + move 2 to u18. move 999999999 to s9. + if u18 >= s9 then display "ng 03-06" end-if. + move 0 to u18. move -1 to s9. + if u18 <= s9 then display "ng 03-07" end-if. + move 0 to u18. move -3 to s9. + if u18 <= s9 then display "ng 03-08" end-if. + move 0 to u18. move -999999999 to s9. + if u18 <= s9 then display "ng 03-09" end-if. + move 0 to u18. move 0 to s9. + if u18 <> s9 then display "ng 03-10" end-if. + move 0 to u18. move 1 to s9. + if u18 >= s9 then display "ng 03-11" end-if. + move 0 to u18. move 2 to s9. + if u18 >= s9 then display "ng 03-12" end-if. + move 0 to u18. move 3 to s9. + if u18 >= s9 then display "ng 03-13" end-if. + move 0 to u18. move 999999999 to s9. + if u18 >= s9 then display "ng 03-14" end-if. + move 999999999999999999 to u18. move -1 to s9. + if u18 <= s9 then display "ng 03-15" end-if. + move 999999999999999999 to u18. move -3 to s9. + if u18 <= s9 then display "ng 03-16" end-if. + move 999999999999999999 to u18. move -999999999 to s9. + if u18 <= s9 then display "ng 03-17" end-if. + move 999999999999999999 to u18. move 0 to s9. + if u18 <= s9 then display "ng 03-18" end-if. + move 999999999999999999 to u18. move 1 to s9. + if u18 <= s9 then display "ng 03-19" end-if. + move 999999999999999999 to u18. move 2 to s9. + if u18 <= s9 then display "ng 03-20" end-if. + move 999999999999999999 to u18. move 999999999 to s9. + if u18 <= s9 then display "ng 03-21" end-if. + ****************************************************************** + move 2 to u18. move -1 to s18. + if u18 <= s18 then display "ng 04-00" end-if. + move 2 to u18. move -3 to s18. + if u18 <= s18 then display "ng 04-01" end-if. + move 2 to u18. move -999999999999999999 to s18. + if u18 <= s18 then display "ng 04-02" end-if. + move 2 to u18. move 0 to s18. + if u18 <= s18 then display "ng 04-03" end-if. + move 2 to u18. move 1 to s18. + if u18 <= s18 then display "ng 04-04" end-if. + move 2 to u18. move 2 to s18. + if u18 <> s18 then display "ng 04-05" end-if. + move 2 to u18. move 3 to s18. + if u18 >= s18 then display "ng 04-06" end-if. + move 2 to u18. move 999999999999999999 to s18. + if u18 >= s18 then display "ng 04-06" end-if. + move 0 to u18. move -1 to s18. + if u18 <= s18 then display "ng 04-07" end-if. + move 0 to u18. move -3 to s18. + if u18 <= s18 then display "ng 04-08" end-if. + move 0 to u18. move -999999999999999999 to s18. + if u18 <= s18 then display "ng 04-09" end-if. + move 0 to u18. move 0 to s18. + if u18 <> s18 then display "ng 04-10" end-if. + move 0 to u18. move 1 to s18. + if u18 >= s18 then display "ng 04-11" end-if. + move 0 to u18. move 2 to s18. + if u18 >= s18 then display "ng 04-12" end-if. + move 0 to u18. move 3 to s18. + if u18 >= s18 then display "ng 04-13" end-if. + move 0 to u18. move 999999999999999999 to s18. + if u18 >= s18 then display "ng 04-14" end-if. + move 999999999999999999 to u18. move -1 to s18. + if u18 <= s18 then display "ng 04-15" end-if. + move 999999999999999999 to u18. move -3 to s18. + if u18 <= s18 then display "ng 04-16" end-if. + move 999999999999999999 to u18. move -999999999999999999 to s18. + if u18 <= s18 then display "ng 04-17" end-if. + move 999999999999999999 to u18. move 0 to s18. + if u18 <= s18 then display "ng 04-18" end-if. + move 999999999999999999 to u18. move 1 to s18. + if u18 <= s18 then display "ng 04-19" end-if. + move 999999999999999999 to u18. move 2 to s18. + if u18 <= s18 then display "ng 04-20" end-if. + move 999999999999999999 to u18. move 999999999999999999 to s18. + if u18 <> s18 then display "ng 04-21" end-if. + ****************************************************************** + stop run. +]) + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([java prog]) + +AT_CLEANUP \ No newline at end of file From 88c2b6e76702549b083dfe4ee7cb3523d93d851e Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:17:31 +0900 Subject: [PATCH 064/188] Remove pre-commit in Dev Container and fix a format script (#557) --- .devcontainer/boot.sh | 3 --- .devcontainer/term_settings/pre-commit | 4 ---- CONTRIBUTING.md | 7 +++---- CONTRIBUTING_JP.md | 7 +++---- cobj/format | 1 - 5 files changed, 6 insertions(+), 16 deletions(-) delete mode 100755 .devcontainer/term_settings/pre-commit diff --git a/.devcontainer/boot.sh b/.devcontainer/boot.sh index ff3b253e..2e20ebd8 100755 --- a/.devcontainer/boot.sh +++ b/.devcontainer/boot.sh @@ -5,8 +5,5 @@ make make install -# Set up pre-commit hook -cp .devcontainer/term_settings/pre-commit .git/hooks/pre-commit - # Set up ~/.bashrc cat .devcontainer/term_settings/extra_bashrc.sh >> ~/.bashrc diff --git a/.devcontainer/term_settings/pre-commit b/.devcontainer/term_settings/pre-commit deleted file mode 100755 index dbc77f69..00000000 --- a/.devcontainer/term_settings/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./format -git add -u diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3b2fb9e..3d14bac2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,6 +10,8 @@ Although any topics related to opensource COBOL 4J can be posted in [Issues](htt We will check pull requests that passed all CI checks running both tests and static code analysis. The static analysis checks whether C and Java source files are formatted using [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [google-java-format](https://github.com/google/google-java-format) respectively, and whether [PMD](https://pmd.github.io/) finds no error and warning in Java source files. +Before you submit pull requests, you should run `./format` in order to format files in this repository. + The below sections describe how to setup and run static code analysis. ## Setup Development Environment @@ -26,13 +28,10 @@ We strongly recommend using [Visual Studio Code with Dev Containers](https://cod 1. (Optional) Press `Ctrl+Shift+@` to open a new terminal of Visual Studio code. 1. (Optional) [Setup credentials for git](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials). -> [!CAUTION] -> In the dev container, [Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks) executes code formatters when starting `git commit` command. It may take a minutes when you run `git commit` for the first time. - ## Run static analysis > [!CAUTION] -> CI executes formatters and static analysis tools in Almalinux 9. The behavior of these tools may differ from the one in other operatins systems. +> Since the behavior of these tools may differ from the one in other operatins systems, we recommend that you run `./format` in Visual Studio Code with Dev Containers described in the previous section. ### check with clang-format and google-java-format diff --git a/CONTRIBUTING_JP.md b/CONTRIBUTING_JP.md index d9733c87..8bebc24c 100644 --- a/CONTRIBUTING_JP.md +++ b/CONTRIBUTING_JP.md @@ -10,6 +10,8 @@ CIはテストとコードの静的解析を実行します。 CIの静的解析はCとJavaのソースコードがそれぞれ[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [google-java-format](https://github.com/google/google-java-format)で整形されているか、 [PMD](https://pmd.github.io/)によるJavaソースコードの静的解析でエラーや警告が表示されないかをチェックします。 +Pull Request提出時には、./formatを実行してリポジトリ内のコードをフォーマットしてください。 + 下記にそれぞれのツールのセットアップと使用方法を説明します。 ## 開発環境のセットアップ @@ -26,14 +28,11 @@ CIの静的解析はCとJavaのソースコードがそれぞれ[clang-format](h 1. (オプション)`Ctrl+Shift+@`を押して、Visual Studio Codeの新しいターミナルを開きます。 1. (オプション)[gitの認証情報を設定](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials)します。 -> [!CAUTION] -> Dev container内では、[Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks)が`git commit`コマンドを開始する際にコードフォーマッタを実行します。初めて`git commit`を実行する際には数分かかることがあります。 - ## 静的解析の実行 > [!CAUTION] -> CIはAlmalinux 9でフォーマッタと静的解析ツールを実行します。これらのツールの動作は他のオペレーティングシステムとは異なる場合があります。 +> これらのツールの動作は他のオペレーティングシステムとは異なる場合があります。上記のVisual Studio Code with Dev Containersの環境でフォーマッタを実行することを推奨します。 ### clang-formatとgoogle-java-format diff --git a/cobj/format b/cobj/format index 7205d31b..3b835409 100755 --- a/cobj/format +++ b/cobj/format @@ -7,7 +7,6 @@ codegen.c \ config.c \ error.c \ field.c \ -pplex.c \ ppparse.c \ ppparse.h \ reserved.c \ From e482b3d42b71cbc97014283326485eede09de57b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 23:51:18 +0900 Subject: [PATCH 065/188] Bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4 in /libcobj (#562) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.3 to 5.11.4. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index ad3d9da0..449fd5bc 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.3.1-jre") implementation("org.xerial:sqlite-jdbc:3.47.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.11.3") + testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20240303") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From c8e13ab3e12a8b93a0abd3a6a5781355d90acfeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 23:51:33 +0900 Subject: [PATCH 066/188] Bump com.google.guava:guava from 33.3.1-jre to 33.4.0-jre in /libcobj (#563) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.1-jre to 33.4.0-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 449fd5bc..212bf55e 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.3.1-jre") + implementation("com.google.guava:guava:33.4.0-jre") implementation("org.xerial:sqlite-jdbc:3.47.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") From 5b53cc849a2ba725c760849c57599a2bf8d353fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:44:31 +0900 Subject: [PATCH 067/188] Bump com.github.spotbugs from 6.0.26 to 6.0.27 in /libcobj (#564) Bumps com.github.spotbugs from 6.0.26 to 6.0.27. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 212bf55e..86e65baa 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.26" + id("com.github.spotbugs") version "6.0.27" } repositories { From 0700bac60541ad8644f75b844f06c71d3786a7af Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:00:58 +0900 Subject: [PATCH 068/188] Reduce redudant CI options (#565) --- .github/workflows/pull-request.yml | 2 -- .github/workflows/push.yml | 2 -- .github/workflows/test-nist.yml | 3 --- 3 files changed, 7 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a015c3ac..fba0c43d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -97,8 +97,6 @@ jobs: windows-build: needs: check-workflows - strategy: - fail-fast: false uses: ./.github/workflows/windows-build.yml with: upload-artifacts: true diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index dc90eee4..5fb65f08 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -95,8 +95,6 @@ jobs: windows-build: needs: check-workflows - strategy: - fail-fast: false uses: ./.github/workflows/windows-build.yml with: upload-artifacts: true diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index 3fbd8cd5..54128e90 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -21,9 +21,6 @@ env: jobs: test-other: - strategy: - matrix: - os: ["ubuntu:24.04", "almalinux:9"] runs-on: ubuntu-latest container: image: ${{ inputs.os }} From 3acf3e43948d10c575602ee65ee3f409cdd12c0e Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 27 Dec 2024 09:09:28 +0900 Subject: [PATCH 069/188] Convert string literals containing SJIS characters to Java string literals (#561) * fix: convert SJIS string literals to ordinary Java string literals * test: add test suites --- cobj/codegen.c | 3 +- tests/i18n_sjis.src/pic-x.at | 59 ++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index 7ea8f3f4..95a4d7df 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -505,7 +505,8 @@ static void joutput_string_write(const unsigned char *s, int size, enum cb_string_category category) { int i; - if (category == CB_STRING_CATEGORY_ALL_ASCII) { + if (category == CB_STRING_CATEGORY_ALL_ASCII || + category == CB_STRING_CATEGORY_ALL_SJIS) { if (param_wrap_string_flag) { joutput("new CobolDataStorage("); } else { diff --git a/tests/i18n_sjis.src/pic-x.at b/tests/i18n_sjis.src/pic-x.at index 3311d792..c9c92812 100644 --- a/tests/i18n_sjis.src/pic-x.at +++ b/tests/i18n_sjis.src/pic-x.at @@ -483,3 +483,62 @@ AT_CHECK([cobj prog.cob], [0]) AT_CHECK([java prog], [0], [02]) AT_CLEANUP + +AT_SETUP([Readable string literals]) +# Older compilers converts string literals "{" in COBOL source code +# to `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)` in Java source code. +# The following tests check that the compiler converts the string literals to readable ones. + +AT_DATA([prog1.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog1. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(30) VALUE "1". + PROCEDURE DIVISION. + MOVE "2" TO F0. + DISPLAY "3". +]) + +AT_CHECK([cobj prog1.cob]) +AT_CHECK([grep '1' < prog1.java > /dev/null]) +AT_CHECK([grep '2' < prog1.java > /dev/null]) +AT_CHECK([grep '3' < prog1.java > /dev/null]) + +# '@' is the first multi-byte Shift-JIS character with respect to the byte order +# see http://charset.7jp.net/sjis.html +AT_DATA([prog2.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog2. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(30) VALUE "@1". + PROCEDURE DIVISION. + MOVE "@2" TO F0. + DISPLAY "@3". +]) + +AT_CHECK([cobj prog2.cob]) +AT_CHECK([grep '@1' < prog2.java > /dev/null]) +AT_CHECK([grep '@2' < prog2.java > /dev/null]) +AT_CHECK([grep '@3' < prog2.java > /dev/null]) + +# '' is the last printable Shift-JIS character with respect to the byte order. +# See http://charset.7jp.net/sjis.html +AT_DATA([prog3.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog3. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(30) VALUE "1". + PROCEDURE DIVISION. + MOVE "2" TO F0. + DISPLAY "3". +]) + +AT_CHECK([cobj prog3.cob]) +AT_CHECK([grep '1' < prog3.java > /dev/null]) +AT_CHECK([grep '2' < prog3.java > /dev/null]) +AT_CHECK([grep '3' < prog3.java > /dev/null]) + +AT_CLEANUP \ No newline at end of file From 333d880cc991c27b80caac81924c66d2d8c60b9b Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 27 Dec 2024 13:45:06 +0900 Subject: [PATCH 070/188] Release 1.1.5 (#566) --- CHANGELOG.md | 14 ++++++++++ ChangeLog | 4 +++ NEWS | 14 ++++++++++ README.md | 8 +++--- README_JP.md | 8 +++--- ReleaseNote.md | 24 ++++++++--------- configure | 26 +++++++++---------- configure.ac | 2 +- libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 14 files changed, 79 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce74488b..ea0fe5b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.5] - 2024-12-27 + +### Add + +* Convert string literals containing SJIS characters to Java string literals. (#561) + * The older versions convert string literals containing SJIS characters into byte arrays with hexdecimal integers. + * Older versions convert `"日本語"` into `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)`. + * Latest version converts `"日本語"` to `CobolUtil.stringToBytes("日本語")`. + +### Fix + +* Fix comparisons of COMP data. (#559) + * With older versions, comparisons of COMP data are invalid in some cases. + ## [1.1.4] - 2024-11-29 ### Fix diff --git a/ChangeLog b/ChangeLog index ecaf8e83..cc791369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-12-27 OSS Consortium + + * opensource COBOL 4J v1.1.5 released. + 2024-11-29 OSS Consortium * opensource COBOL 4J v1.1.4 released. diff --git a/NEWS b/NEWS index c8b74375..a0f07b9b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,20 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +** New Features + + (1) Convert string literals containing SJIS characters to Java string literals. (#561) + * The older versions convert string literals containing SJIS characters into byte arrays with hexdecimal integers. + * Older versions convert `"日本語"` into `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)`. + * Latest version converts `"日本語"` to `CobolUtil.stringToBytes("日本語")`. + +** Bug Fixes + + (1) Fix comparisons of COMP data. + * With older versions, comparisons of COMP data are invalid in some cases. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.4 *** Bug Fixes diff --git a/README.md b/README.md index 745776f7..7de4fb1a 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.4.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.4.tar.gz -tar zxvf opensourcecobol4j-v1.1.4.tar.gz -cd opensourcecobol4j-1.1.4 +curl -L -o opensourcecobol4j-v1.1.5.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.5.tar.gz +tar zxvf opensourcecobol4j-v1.1.5.tar.gz +cd opensourcecobol4j-1.1.5 ./configure --prefix=/usr/ make sudo make install @@ -125,7 +125,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.4 +docker pull opensourcecobol/opensourcecobol4j:1.1.5 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 2861f7d2..eca1117c 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.4.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.4.tar.gz -tar zxvf opensourcecobol4j-v1.1.4.tar.gz -cd opensourcecobol4j-1.1.4 +curl -L -o opensourcecobol4j-v1.1.5.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.5.tar.gz +tar zxvf opensourcecobol4j-v1.1.5.tar.gz +cd opensourcecobol4j-1.1.5 ./configure --prefix=/usr/ make sudo make install @@ -114,7 +114,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.4 +docker pull opensourcecobol/opensourcecobol4j:1.1.5 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index 78b0aa2b..f3491bf0 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,13 +1,11 @@ -### Fixed -* Process Japanese identifiers in COBOL correctly. - * The older versions convert some Japanese characters in COBOL identifiers to another characters in Java. -* Fix the conditions `PERFORM UNTIL`. - * If COBOL source code contains divisions in conditions of `PERFORM UNTIL`, the older versions emit compile errors. -* Fix `SEARCH` statements with data specified `OCCURS` and `DEPENDING`. - * The older versions emit compile errors when `SEARCH` statements with data specified `OCCURS` and `DEPENDING` -* Fix `ADD` statements and `SUBTRACT` statements. - * In some case, the result of `SUBTRACT` was previously incorrect when the operands contais PIC S9(n) negative values. - * In some case, the result of `ADD` was -0 instead of +0 previously. -* Fix the process of checking signs of PIC 9(n) containing spaces. -* Fix `INSPECT` statements. - * The older versions change signs of some values accidentally because of the bug of `INSPECT` statements. \ No newline at end of file +### Add + +* Convert string literals containing SJIS characters to Java string literals. + * The older versions convert string literals containing SJIS characters into byte arrays with hexdecimal integers. + * Older versions convert `"日本語"` into `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)`. + * Latest version converts `"日本語"` to `CobolUtil.stringToBytes("日本語")`. + +### Fix + +* Fix comparisons of COMP data. + * With older versions, comparisons of COMP data are invalid in some cases. \ No newline at end of file diff --git a/configure b/configure index a2bcc923..199f2538 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.4. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.5. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.4' -PACKAGE_VERSION='1.1.4' -PACKAGE_STRING='opensource COBOL 4J 1.1.4' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.5' +PACKAGE_VERSION='1.1.5' +PACKAGE_STRING='opensource COBOL 4J 1.1.5' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.4 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.4] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.5] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.4:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.5:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.4 +opensource COBOL 4J configure 1.1.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.4, which was +It was created by opensource COBOL 4J $as_me 1.1.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.4' - VERSION='1.1.4' + PACKAGE='opensource-cobol-4j-1.1.5' + VERSION='1.1.5' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.4, which was +This file was extended by opensource COBOL 4J $as_me 1.1.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.4 +opensource COBOL 4J config.status 1.1.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1e8f1573..59c3756f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.4],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.4]) +AC_INIT([opensource COBOL 4J],[1.1.5],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.5]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 86e65baa..630a85b5 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.4" + version = "1.1.5" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 1cb74f17..f9c342b0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.4"; + public static final String version = "1.1.5"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 60cc23a2..c87b2530 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.4"); + System.out.println("1.1.5"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 730c7b01..2c15747b 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.4", + "opensourcecobol4j_version": "1.1.5", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.4", + "opensourcecobol4j_version": "1.1.5", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.4", + "opensourcecobol4j_version": "1.1.5", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.4", + "opensourcecobol4j_version": "1.1.5", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index a458b6a9..8b7e6865 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.4]) -m4_define([AT_PACKAGE_VERSION], [1.1.4]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.4]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.5]) +m4_define([AT_PACKAGE_VERSION], [1.1.5]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.5]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index bf8330db..7cc970c4 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.4" +#define PACKAGE "opensource-cobol4j-1.1.5" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.4" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.5" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.4" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.5" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.4" +#define PACKAGE_VERSION "1.1.5" /* Define a patch level */ #define PATCH_LEVEL 0 From f49c7938a8ed57a7d65f3914f4c8ddd57228fe4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:08:42 +0900 Subject: [PATCH 071/188] Bump org.json:json from 20240303 to 20241224 in /libcobj (#568) Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20240303 to 20241224. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 630a85b5..44e23907 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") - implementation("org.json:json:20240303") + implementation("org.json:json:20241224") spotbugs("com.github.spotbugs:spotbugs:4.8.6") implementation("org.slf4j:slf4j-api:2.0.16") From 6597749dcb85bcde31ff41535ff6900df427dd32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:08:51 +0900 Subject: [PATCH 072/188] Bump org.xerial:sqlite-jdbc from 3.47.1.0 to 3.47.2.0 in /libcobj (#569) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.47.1.0 to 3.47.2.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.47.1.0...3.47.2.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 44e23907..349b396a 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.0-jre") - implementation("org.xerial:sqlite-jdbc:3.47.1.0") + implementation("org.xerial:sqlite-jdbc:3.47.2.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 0089dd88aab07116e9a13dc556433dfa69bd8920 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:23:43 +0900 Subject: [PATCH 073/188] Bump com.diffplug.spotless from 7.0.0.BETA4 to 7.0.0 in /libcobj (#570) Bumps com.diffplug.spotless from 7.0.0.BETA4 to 7.0.0. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 349b396a..059a2e2c 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.0.BETA4" + id("com.diffplug.spotless") version "7.0.0" id("java") id("maven-publish") pmd From 6f44047093e0b19a66907710f8a8efe27bea80bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:52:24 +0900 Subject: [PATCH 074/188] Bump com.diffplug.spotless from 7.0.0 to 7.0.1 in /libcobj (#572) Bumps com.diffplug.spotless from 7.0.0 to 7.0.1. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 059a2e2c..d56d86b5 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.0" + id("com.diffplug.spotless") version "7.0.1" id("java") id("maven-publish") pmd From db1ced006a227d1411fcf0f5ca2373dd08aa7446 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:52:33 +0900 Subject: [PATCH 075/188] Bump org.json:json from 20241224 to 20250107 in /libcobj (#571) Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20241224 to 20250107. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d56d86b5..e36ce2b3 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") - implementation("org.json:json:20241224") + implementation("org.json:json:20250107") spotbugs("com.github.spotbugs:spotbugs:4.8.6") implementation("org.slf4j:slf4j-api:2.0.16") From f5a356d5d00373e1219296f751c9ddf7ee64012b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 20:20:36 +0900 Subject: [PATCH 076/188] Bump com.github.spotbugs from 6.0.27 to 6.1.0 in /libcobj (#573) Bumps com.github.spotbugs from 6.0.27 to 6.1.0. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index e36ce2b3..95230242 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.0.27" + id("com.github.spotbugs") version "6.1.0" } repositories { From 6f4ffd9c8b88b1f4304e872008f2e1a93cbbac8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:56:21 +0900 Subject: [PATCH 077/188] Bump com.github.spotbugs from 6.1.0 to 6.1.1 in /libcobj (#576) Bumps com.github.spotbugs from 6.1.0 to 6.1.1. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 95230242..f76de5a9 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.0" + id("com.github.spotbugs") version "6.1.1" } repositories { From dd1647124218625ffd225c0c605d6cf60e7a2e52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:56:31 +0900 Subject: [PATCH 078/188] Bump org.xerial:sqlite-jdbc from 3.47.2.0 to 3.48.0.0 in /libcobj (#575) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.47.2.0 to 3.48.0.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.47.2.0...3.48.0.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f76de5a9..a668ef78 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.0-jre") - implementation("org.xerial:sqlite-jdbc:3.47.2.0") + implementation("org.xerial:sqlite-jdbc:3.48.0.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From baf7634744f47da38fadc811fd0640a28e1058c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:56:39 +0900 Subject: [PATCH 079/188] Bump com.diffplug.spotless from 7.0.1 to 7.0.2 in /libcobj (#574) Bumps com.diffplug.spotless from 7.0.1 to 7.0.2. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index a668ef78..47a3ceff 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.1" + id("com.diffplug.spotless") version "7.0.2" id("java") id("maven-publish") pmd From 2b985a4d51dd0acedc97aeea957d38b12c8747a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:54:05 +0900 Subject: [PATCH 080/188] Bump com.github.spotbugs from 6.1.1 to 6.1.2 in /libcobj (#578) Bumps com.github.spotbugs from 6.1.1 to 6.1.2. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 47a3ceff..e6315f43 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.1" + id("com.github.spotbugs") version "6.1.2" } repositories { From eb5b635852831f96d2c08ee7c4e5247d3169dab5 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 30 Jan 2025 14:57:37 +0900 Subject: [PATCH 081/188] add `workflow_dispatch` event triggers (#581) --- .github/workflows/pull-request.yml | 1 + .github/workflows/push.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fba0c43d..86502cc4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -9,6 +9,7 @@ on: - 'NEWS' - 'README' - 'COPYING' + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5fb65f08..4a8bbd33 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,6 +8,7 @@ on: - 'NEWS' - 'README' - 'COPYING' + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 04208c59834e1eccad30b9f40d514baff8086849 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 09:11:24 +0900 Subject: [PATCH 082/188] Bump com.github.spotbugs from 6.1.2 to 6.1.3 in /libcobj (#579) Bumps com.github.spotbugs from 6.1.2 to 6.1.3. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index e6315f43..3ff67021 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.2" + id("com.github.spotbugs") version "6.1.3" } repositories { From 99d12046b9ce1dd349e3e27227112481a831c21e Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:09:26 +0900 Subject: [PATCH 083/188] Modified to support COBOL source code written in UTF-8. (#582) * fix: convert SJIS string literals to ordinary Java string literals * test: add test suites * test: add new tests cobol_utf8 * ci: run tests of --enable-utf8 tests * ci: fix workflows for push events * ci: disable `fail-fast` of some jobs temporarily * ci: change pull_request.yml to runu utf8 tests * ci: fix push.yml and pull-request.yml slightly * test: covert some misc tests to UTF8 versions and add them to cobol_utf8 * test: change utf8 tests * ci: run m4 when installing the compiler * fix: dispatch encodings of javac * wip: fix slightly * wip: wip * fix: update libcobj to encode Strings to SJIS * fix: add -Wno-parentheses * test: fix tests * fix: disable size checks of UTF-8 data * fix: value clause * test: fix pic-n.at and pic-x * fix: typeck.c to suppress checks against inspect statement * [WIP] fix: Remove the character encoding specification for 'new String' * [WIP] fix: Fix the byte size calculation for Japanese variable names. * fix: Fix the code related to the byte size of UTF-8. * fix: Fix the code related to the byte size of UTF-8. * fix: Fix the code related to the byte size of UTF-8. * fix: Remove unnecessary codes * fix: Minor adjustments related to code generation * fix: Fix the code generation for strings that are SJIS multibyte. * fix: Fix Fix the bug about MOVE of literals when UTF-8 * fix: Remove unnecessary comments. * fix: Fix regarding UTF8 multi byte strings * fix: Fix regarding UTF8 multi byte strings * fix: Fix regarding PROGRAM-ID written in UTF8 multibyte * fix: Fix test scripts * fix: Clean up codes * Clean up codes * fix: Clean up codes * fix: Minor fix * fix: fieldToString * ci: install wget in alma and amazon linux * fix: Fix a bug regarding PROGRAM-ID with multibyte chars * Fix: Convert cb_zero_utf8 to cb_zen_zero --------- Co-authored-by: Yutaro Sakamoto Co-authored-by: unknown Co-authored-by: Yutaro Sakamoto Co-authored-by: Yutaro Sakamoto --- .github/workflows/build.yml | 15 +- .github/workflows/pull-request.yml | 46 + .github/workflows/push.yml | 48 + .github/workflows/test-cobj-api.yml | 6 +- .github/workflows/test-nist.yml | 6 +- .github/workflows/test-other.yml | 22 +- .gitignore | 1 + cobj/cobj.c | 52 +- cobj/cobj.h | 2 + cobj/codegen.c | 88 +- cobj/parser.c | 2268 ++--- cobj/parser.y | 8 - cobj/pplex.c | 7522 +++++++++-------- cobj/pplex.l | 31 +- cobj/pplex.l.m4 | 12 +- cobj/tree.c | 51 +- cobj/tree.h | 1 + cobj/typeck.c | 123 +- configure | 2 +- configure.ac | 2 +- .../libcobj/call/CobolSystemRoutine.java | 14 +- .../libcobj/common/CobolInspect.java | 4 +- .../libcobj/common/CobolIntrinsic.java | 58 +- .../libcobj/common/CobolUtil.java | 14 +- .../libcobj/data/AbstractCobolField.java | 4 +- .../data/CobolAlphanumericEditedField.java | 2 +- .../libcobj/data/CobolAlphanumericField.java | 30 +- .../libcobj/data/CobolDataStorage.java | 32 +- .../libcobj/data/CobolDecimal.java | 4 +- .../libcobj/data/CobolFieldFactory.java | 19 +- .../libcobj/data/CobolGroupField.java | 13 +- .../data/CobolNationalEditedField.java | 2 +- .../libcobj/data/CobolNationalField.java | 24 +- .../libcobj/data/CobolNumericEditedField.java | 2 +- .../libcobj/data/CobolNumericField.java | 11 +- .../libcobj/data/CobolNumericPackedField.java | 9 +- .../libcobj/file/CobolFile.java | 58 +- .../indexed_file/IndexedFileUtilMain.java | 2 +- tests/Makefile.am | 19 +- tests/Makefile.in | 25 +- tests/a.sh | 15 + tests/a.txt | 1 + tests/cobol_utf8.at | 37 + .../compare-national-diff-size.at | 55 + tests/cobol_utf8.src/compare-national.at | 44 + tests/cobol_utf8.src/error-print.at | 82 + tests/cobol_utf8.src/file-handler-japanese.at | 26 + .../japanese-char-section-var.at | 48 + tests/cobol_utf8.src/java-interface.at | 600 ++ tests/cobol_utf8.src/limits.at | 289 + tests/cobol_utf8.src/mb-space.at | 71 + tests/cobol_utf8.src/national.at | 271 + tests/cobol_utf8.src/pic-n.at | 522 ++ tests/cobol_utf8.src/pic-x.at | 585 ++ tests/cobol_utf8.src/program-id.at | 94 + tests/cobol_utf8.src/user-defined-word.at | 515 ++ 56 files changed, 9101 insertions(+), 4806 deletions(-) create mode 100644 tests/a.sh create mode 100644 tests/a.txt create mode 100644 tests/cobol_utf8.at create mode 100644 tests/cobol_utf8.src/compare-national-diff-size.at create mode 100644 tests/cobol_utf8.src/compare-national.at create mode 100644 tests/cobol_utf8.src/error-print.at create mode 100644 tests/cobol_utf8.src/file-handler-japanese.at create mode 100644 tests/cobol_utf8.src/japanese-char-section-var.at create mode 100644 tests/cobol_utf8.src/java-interface.at create mode 100644 tests/cobol_utf8.src/limits.at create mode 100644 tests/cobol_utf8.src/mb-space.at create mode 100644 tests/cobol_utf8.src/national.at create mode 100644 tests/cobol_utf8.src/pic-n.at create mode 100644 tests/cobol_utf8.src/pic-x.at create mode 100644 tests/cobol_utf8.src/program-id.at create mode 100644 tests/cobol_utf8.src/user-defined-word.at diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2212a8fa..e9796b5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -32,26 +36,27 @@ jobs: if: inputs.os == 'ubuntu:24.04' run: | apt-get update -y - apt-get install -y build-essential gettext autoconf + apt-get install -y build-essential gettext autoconf bison flex - name: Install dependencies on AlmaLinux 9 if: inputs.os == 'almalinux:9' run: | dnf -y update - dnf install -y gcc make autoconf diffutils gettext + dnf install -y gcc make autoconf diffutils gettext bison flex - name: Install dependencies on Amazon Linux 2023 if: inputs.os == 'amazonlinux:2023' run: | dnf -y update - dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip + dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip bison flex - name: Checkout opensource COBOL 4J uses: actions/checkout@v4 - name: Install opensource COBOL 4J run: | - ./configure --prefix=/usr/ CFLAGS=-Werror + ./configure --prefix=/usr/ CFLAGS=-Werror ${{ inputs.configure-args }} + touch cobj/*.m4 make echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" @@ -64,5 +69,5 @@ jobs: - name: Upload an artifact uses: actions/upload-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} path: opensourcecobol4j.tar.gz \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 86502cc4..36401c57 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,6 +31,16 @@ jobs: with: os: ${{ matrix.os }} + build-utf8: + needs: check-workflows + strategy: + matrix: + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/build.yml + with: + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-other: needs: build strategy: @@ -50,6 +60,28 @@ jobs: test-name: ${{ matrix.test_name }} os: ${{ matrix.os }} + run-test-other-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: + - "command-line-options" + - "data-rep" + - "cobol_utf8" + #- "i18n_utf8" + - "jp-compat" + - "run" + - "syntax" + - "cobj-idx" + #- "misc" + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/test-other.yml + with: + test-name: ${{ matrix.test_name }} + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-cobj-api: needs: build strategy: @@ -71,6 +103,20 @@ jobs: check-result: true os: ${{ matrix.os }} + run-test-nist-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/test-nist.yml + with: + test-name: ${{ matrix.test_name }} + check-result: true + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-nist-extra: needs: build strategy: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4a8bbd33..5798dbb8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -30,9 +30,20 @@ jobs: with: os: ${{ matrix.os }} + build-utf8: + needs: check-workflows + strategy: + matrix: + os: ["ubuntu:24.04"] + uses: ./.github/workflows/build.yml + with: + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-other: needs: build strategy: + fail-fast: false matrix: test_name: - "command-line-options" @@ -48,6 +59,28 @@ jobs: with: test-name: ${{ matrix.test_name }} os: ${{ matrix.os }} + + run-test-other-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: + - "command-line-options" + - "data-rep" + - "cobol_utf8" + #- "i18n_utf8" + - "jp-compat" + - "run" + - "syntax" + - "cobj-idx" + #- "misc" + os: ["ubuntu:24.04"] + uses: ./.github/workflows/test-other.yml + with: + test-name: ${{ matrix.test_name }} + os: ${{ matrix.os }} + configure-args: --enable-utf8 run-test-cobj-api: needs: build @@ -61,6 +94,20 @@ jobs: run-test-nist: needs: build strategy: + fail-fast: false + matrix: + test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] + os: ["ubuntu:24.04"] + uses: ./.github/workflows/test-nist.yml + with: + test-name: ${{ matrix.test_name }} + check-result: true + os: ${{ matrix.os }} + + run-test-nist-utf8: + needs: build-utf8 + strategy: + fail-fast: false matrix: test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] os: ["ubuntu:24.04"] @@ -69,6 +116,7 @@ jobs: test-name: ${{ matrix.test_name }} check-result: true os: ${{ matrix.os }} + configure-args: --enable-utf8 run-test-nist-extra: needs: build diff --git a/.github/workflows/test-cobj-api.yml b/.github/workflows/test-cobj-api.yml index 4f95c137..b1b9c579 100644 --- a/.github/workflows/test-cobj-api.yml +++ b/.github/workflows/test-cobj-api.yml @@ -6,6 +6,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -24,7 +28,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - uses: actions/setup-java@v4 if: inputs.os != 'amazonlinux:2023' diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index 54128e90..a43315ff 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -12,6 +12,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -30,7 +34,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - name: Install Java uses: actions/setup-java@v4 diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index b7703654..923a0842 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -9,6 +9,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -27,7 +31,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - uses: actions/setup-java@v4 if: inputs.os != 'amazonlinux:2023' @@ -39,19 +43,29 @@ jobs: if: inputs.os == 'ubuntu:24.04' run: | apt-get update -y - apt-get install -y build-essential unzip + apt-get install -y build-essential unzip nkf - name: Install dependencies on AlmaLinux 9 if: inputs.os == 'almalinux:9' run: | dnf -y update - dnf install -y gcc make diffutils glibc-gconv-extra unzip + dnf install -y gcc make diffutils glibc-gconv-extra unzip wget + wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate + tar zxf nkf-2.1.3.tar.gz + cd nkf-2.1.3 + make + make install - name: Install dependencies on Amazon Linux 2023 if: inputs.os == 'amazonlinux:2023' run: | dnf -y update - dnf install -y gcc make diffutils tar gzip unzip + dnf install -y gcc make diffutils tar gzip unzip wget + wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate + tar zxf nkf-2.1.3.tar.gz + cd nkf-2.1.3 + make + make install - name: Install Java if: inputs.os == 'amazonlinux:2023' diff --git a/.gitignore b/.gitignore index 8aeec330..5da2e10f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ tests/command-line-options tests/data-rep tests/i18n_sjis tests/i18n_utf8 +tests/cobol_utf8 tests/jp-compat tests/cobj-idx tests/misc diff --git a/cobj/cobj.c b/cobj/cobj.c index 0373efdd..18990f36 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -329,6 +329,12 @@ static const struct option long_options[] = { #undef CB_WARNDEF {NULL, 0, NULL, 0}}; +#ifdef I18N_UTF8 +static const char *JAVAC_ENCODING = "UTF-8"; +#else +static const char *JAVAC_ENCODING = "SJIS"; +#endif + static const char *cob_cc; /* gcc */ static char cob_java_flags[COB_SMALL_BUFF]; /* -I... */ static char cob_libs[COB_MEDIUM_BUFF]; /* -L... -lcob */ @@ -664,6 +670,43 @@ void sjis_spc_to_ascii(char *str) { } #endif /*I18N_UTF8*/ +#ifdef I18N_UTF8 +size_t utf8_calc_sjis_size(const unsigned char *p, int len) { + const unsigned char *ub = p + len; + int char_size = 0; + size_t name_size = 0; + while (p < ub) { + char_size = COB_U8BYTE_1(*p); + if (char_size == 1) { + name_size += 1; + p++; + } else if (char_size == 3 && utf8_hankaku_kana(p)) { + name_size += 1; + p += char_size; + } else { + name_size += 2; + p += char_size; + } + } + return name_size; +} + +int utf8_hankaku_kana(const unsigned char *p) { + if (p[0] == 0xef) { + if (p[1] == 0xbd) { + if (p[2] >= 0xa1 && p[2] <= 0xbf) { + return 1; + } + } else if (p[1] == 0xbe) { + if (p[2] >= 0x80 && p[2] <= 0x9f) { + return 1; + } + } + } + return 0; +} +#endif /*I18N_UTF8*/ + /* * Local functions */ @@ -1772,8 +1815,9 @@ static int process_compile(struct filename *fn) { char **program_id; for (program_id = program_id_list; *program_id; ++program_id) { - snprintf(buff, COB_MEDIUM_BUFF, "javac %s -encoding SJIS -d %s %s/%s.java", - cob_java_flags, output_name_a, java_source_dir_a, *program_id); + snprintf(buff, COB_MEDIUM_BUFF, "javac %s -encoding %s -d %s %s/%s.java", + cob_java_flags, JAVAC_ENCODING, output_name_a, java_source_dir_a, + *program_id); ret = process(buff); if (ret) { @@ -2044,8 +2088,8 @@ static int process_build_single_jar() { #else char remove_cmd[] = "rm -f"; #endif - sprintf(buff, "javac %s -encoding SJIS -d %s %s/*.java", cob_java_flags, - output_name_a, java_source_dir_a); + sprintf(buff, "javac %s -encoding %s -d %s %s/*.java", cob_java_flags, + JAVAC_ENCODING, output_name_a, java_source_dir_a); ret = process(buff); if (ret) { diff --git a/cobj/cobj.h b/cobj/cobj.h index 686a3953..db682b25 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -198,6 +198,8 @@ extern size_t utf8_strlen(const unsigned char *p); extern int utf8_casecmp(const char *s1, const char *s2); extern void utf8_spc_to_ascii(char *); extern int utf8_national_length(const unsigned char *str, int len); +extern size_t utf8_calc_sjis_size(const unsigned char *data, int len); +extern int utf8_hankaku_kana(const unsigned char *data); #else /*!I18N_UTF8*/ extern const unsigned char *sjis_pick(const unsigned char *); extern size_t sjis_strlen(const unsigned char *); diff --git a/cobj/codegen.c b/cobj/codegen.c index 95a4d7df..1b07b683 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -449,9 +449,12 @@ static void joutput_indent(const char *str) { } enum cb_string_category { + // all chracters are ASCII CB_STRING_CATEGORY_ALL_ASCII, - CB_STRING_CATEGORY_ALL_SJIS, - CB_STRING_CATEGORY_CONTAINS_NON_SJIS, + // string contains non-ASCII characters but no uncommon characters + CB_STRING_CATEGORY_CONTAINS_NON_ASCII, + // string contains uncommon characters + CB_STRING_CATEGORY_CONTAINS_UNCOMMON, }; struct string_literal_cache { @@ -491,11 +494,38 @@ static enum cb_string_category get_string_category(const unsigned char *s, int c = s[i]; if (0x20 <= c && c <= 0x7e) { i += 1; +#ifdef I18N_UTF8 + } else if (0xc2 <= c && c <= 0xdf) { + if (i + 1 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf) { + i += 2; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } + } else if (0xe0 <= c && c <= 0xef) { + if (i + 2 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf && + 0x80 <= s[i + 2] && s[i + 2] <= 0xbf) { + i += 3; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } + } else if (0xf0 <= c && c <= 0xf4) { + if (i + 3 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf && + 0x80 <= s[i + 2] && s[i + 2] <= 0xbf && 0x80 <= s[i + 3] && + s[i + 3] <= 0xbf) { + i += 4; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } +#else } else if ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)) { i += 2; - category = CB_STRING_CATEGORY_ALL_SJIS; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; +#endif } else { - return CB_STRING_CATEGORY_CONTAINS_NON_SJIS; + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; } } return category; @@ -505,8 +535,19 @@ static void joutput_string_write(const unsigned char *s, int size, enum cb_string_category category) { int i; +#ifdef I18N_UTF8 + int multi_byte = 0; + if (utf8_ext_pick(s)) { + multi_byte = 1; + } +#endif /* I18N_UTF8 */ + if (category == CB_STRING_CATEGORY_ALL_ASCII || - category == CB_STRING_CATEGORY_ALL_SJIS) { + category == CB_STRING_CATEGORY_CONTAINS_NON_ASCII +#ifdef I18N_UTF8 + || multi_byte +#endif /* I18N_UTF8 */ + ) { if (param_wrap_string_flag) { joutput("new CobolDataStorage("); } else { @@ -515,6 +556,18 @@ static void joutput_string_write(const unsigned char *s, int size, joutput("\""); +#ifdef I18N_UTF8 + for (i = 0; i < size; i++) { + int c = s[i]; + if (c == '\"' || c == '\\') { + joutput("\\%c", c); + } else if (c == '\n') { + joutput("\\n"); + } else { + joutput("%c", c); + } + } +#else int output_multibyte = 0; for (i = 0; i < size; i++) { int c = s[i]; @@ -528,7 +581,7 @@ static void joutput_string_write(const unsigned char *s, int size, output_multibyte = !output_multibyte && ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)); } - +#endif joutput("\")"); } else { if (param_wrap_string_flag) { @@ -1144,9 +1197,14 @@ static void joutput_attr(cb_tree x) { * AbstractCobolField型の変数をインスタンス化するコードを出力する */ static void joutput_field(cb_tree x) { + joutput("CobolFieldFactory.makeCobolField("); - joutput_size(x); - joutput(", "); + if (!(CB_LITERAL_P(x) && + (CB_TREE_CATEGORY(x) == CB_CATEGORY_ALPHANUMERIC || + CB_LITERAL_P(x) && CB_TREE_CATEGORY(x) == CB_CATEGORY_NATIONAL))) { + joutput_size(x); + joutput(", "); + } joutput_data(x); joutput(", "); joutput_attr(x); @@ -1674,8 +1732,12 @@ static void joutput_param(cb_tree x, int id) { } #endif joutput("CobolFieldFactory.makeCobolField("); - joutput_size(x); - joutput(", "); + if (!(CB_LITERAL_P(x) && + (CB_TREE_CATEGORY(x) == CB_CATEGORY_ALPHANUMERIC || + CB_LITERAL_P(x) && CB_TREE_CATEGORY(x) == CB_CATEGORY_NATIONAL))) { + joutput_size(x); + joutput(", "); + } joutput_data(x); joutput(", "); joutput_attr(x); @@ -2410,9 +2472,15 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { } } joutput_data(x); +#if I18N_UTF8 + joutput(".setByByteArrayAndPaddingSpaces ("); + joutput_string(l->data, l->size); + joutput(", %d);\n", f->size); +#else joutput(".setBytes ("); joutput_string((ucharptr)buff, f->size); joutput(", %d);\n", f->size); +#endif } } } diff --git a/cobj/parser.c b/cobj/parser.c index a6d09491..61b36271 100644 --- a/cobj/parser.c +++ b/cobj/parser.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.8.2. */ +/* A Bison parser, made by GNU Bison 3.7.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30802 +#define YYBISON 30704 /* Bison version string. */ -#define YYBISON_VERSION "3.8.2" +#define YYBISON_VERSION "3.7.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1587,18 +1587,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -1696,23 +1684,17 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1971,7 +1953,7 @@ static const yytype_int16 yytranslate[] = }; #if YYDEBUG -/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 772, 772, 772, 816, 817, 821, 822, 827, 828, @@ -2113,22 +2095,22 @@ static const yytype_int16 yyrline[] = 6887, 6888, 6889, 6890, 6891, 6892, 6893, 6897, 6898, 6902, 6903, 6907, 6908, 6912, 6913, 6924, 6925, 6929, 6930, 6931, 6935, 6936, 6937, 6945, 6949, 6950, 6951, 6952, 6956, 6957, - 6961, 6971, 6989, 7016, 7028, 7029, 7039, 7040, 7044, 7045, - 7046, 7047, 7048, 7049, 7050, 7058, 7062, 7066, 7070, 7074, - 7078, 7082, 7086, 7090, 7094, 7098, 7102, 7109, 7110, 7111, - 7115, 7116, 7120, 7121, 7126, 7133, 7140, 7150, 7157, 7167, - 7174, 7188, 7198, 7199, 7203, 7204, 7208, 7209, 7213, 7214, - 7215, 7219, 7220, 7224, 7225, 7229, 7230, 7234, 7235, 7242, - 7242, 7243, 7243, 7244, 7244, 7245, 7245, 7247, 7247, 7248, - 7248, 7249, 7249, 7250, 7250, 7251, 7251, 7252, 7252, 7253, - 7253, 7254, 7254, 7255, 7255, 7256, 7256, 7257, 7257, 7258, - 7258, 7259, 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, - 7263, 7264, 7264, 7264, 7265, 7265, 7266, 7266, 7266, 7267, - 7267, 7268, 7268, 7269, 7269, 7270, 7270, 7271, 7271, 7272, - 7272, 7273, 7273, 7273, 7274, 7274, 7275, 7275, 7276, 7276, - 7277, 7277, 7278, 7278, 7279, 7279, 7280, 7280, 7280, 7281, - 7281, 7282, 7282, 7283, 7283, 7284, 7284, 7285, 7285, 7286, - 7286, 7287, 7287, 7289, 7289, 7290, 7290 + 6961, 6971, 6985, 7008, 7020, 7021, 7031, 7032, 7036, 7037, + 7038, 7039, 7040, 7041, 7042, 7050, 7054, 7058, 7062, 7066, + 7070, 7074, 7078, 7082, 7086, 7090, 7094, 7101, 7102, 7103, + 7107, 7108, 7112, 7113, 7118, 7125, 7132, 7142, 7149, 7159, + 7166, 7180, 7190, 7191, 7195, 7196, 7200, 7201, 7205, 7206, + 7207, 7211, 7212, 7216, 7217, 7221, 7222, 7226, 7227, 7234, + 7234, 7235, 7235, 7236, 7236, 7237, 7237, 7239, 7239, 7240, + 7240, 7241, 7241, 7242, 7242, 7243, 7243, 7244, 7244, 7245, + 7245, 7246, 7246, 7247, 7247, 7248, 7248, 7249, 7249, 7250, + 7250, 7251, 7251, 7252, 7252, 7253, 7253, 7254, 7254, 7255, + 7255, 7256, 7256, 7256, 7257, 7257, 7258, 7258, 7258, 7259, + 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, 7263, 7264, + 7264, 7265, 7265, 7265, 7266, 7266, 7267, 7267, 7268, 7268, + 7269, 7269, 7270, 7270, 7271, 7271, 7272, 7272, 7272, 7273, + 7273, 7274, 7274, 7275, 7275, 7276, 7276, 7277, 7277, 7278, + 7278, 7279, 7279, 7281, 7281, 7282, 7282 }; #endif @@ -2420,6 +2402,61 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, + 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 43, + 45, 42, 47, 704, 94, 46, 61, 41, 40, 62, + 60, 58, 38 +}; +#endif + #define YYPACT_NINF (-2010) #define yypact_value_is_default(Yyn) \ @@ -2430,8 +2467,8 @@ yysymbol_name (yysymbol_kind_t yysymbol) #define yytable_value_is_error(Yyn) \ 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -2010, 206, 536, -2010, 153, 306, 195, -2010, -2010, -2010, @@ -2665,9 +2702,9 @@ static const yytype_int16 yypact[] = -2010, 4721, -2010, -2010 }; -/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { 2, 0, 0, 1, 0, 0, 0, 4, 6, 7, @@ -2901,7 +2938,7 @@ static const yytype_int16 yydefact[] = 509, 0, 1080, 553 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -2010, -2010, -2010, -2010, 1892, -2010, -2010, -2010, 44, -2010, @@ -2977,10 +3014,10 @@ static const yytype_int16 yypgoto[] = 1076, -129 }; -/* YYDEFGOTO[NTERM-NUM]. */ + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 2, 6, 7, 8, 24, 39, 69, 128, + -1, 1, 2, 6, 7, 8, 24, 39, 69, 128, 256, 9, 25, 40, 70, 90, 499, 73, 71, 35, 11, 21, 27, 42, 57, 58, 17, 37, 77, 97, 98, 191, 192, 178, 99, 179, 180, 181, 182, 502, @@ -3053,9 +3090,9 @@ static const yytype_int16 yydefgoto[] = 844, 1524 }; -/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 122, 258, 301, 194, 478, 686, 902, 1137, 560, 865, @@ -4174,8 +4211,8 @@ static const yytype_int16 yycheck[] = 450, -1, -1, -1, -1, -1, -1, -1, 458 }; -/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of - state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 464, 465, 0, 183, 311, 466, 467, 468, 474, @@ -4409,7 +4446,7 @@ static const yytype_int16 yystos[] = 1098, 49, 901, 1084 }; -/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { 0, 463, 465, 464, 466, 466, 467, 467, 469, 470, @@ -4569,7 +4606,7 @@ static const yytype_int16 yyr1[] = 1161, 1162, 1162, 1163, 1163, 1164, 1164 }; -/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 3, 1, 2, 1, 1, 0, 0, @@ -4738,7 +4775,6 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4779,7 +4815,10 @@ do { \ YYFPRINTF Args; \ } while (0) - +/* This macro is provided for backward compatibility. */ +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -4803,11 +4842,15 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YY_USE (yyoutput); + YYUSE (yyoutput); if (!yyvaluep) return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4921,13 +4964,13 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YY_USE (yyvaluep); + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4990,7 +5033,6 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; @@ -5016,7 +5058,7 @@ yyparse (void) if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - YYNOMEM; + goto yyexhaustedlab; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5044,7 +5086,7 @@ yyparse (void) # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - YYNOMEM; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5055,7 +5097,7 @@ yyparse (void) YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - YYNOMEM; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5077,7 +5119,6 @@ yyparse (void) } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; @@ -5213,7 +5254,7 @@ yyparse (void) cb_build_registers (); current_program->flag_main = cb_flag_main; } -#line 5217 "parser.c" +#line 5258 "parser.c" break; case 3: /* start: $@1 nested_list "end of file" */ @@ -5235,19 +5276,19 @@ yyparse (void) emit_entry (current_program->program_id, 0, NULL); } } -#line 5239 "parser.c" +#line 5280 "parser.c" break; case 8: /* $@2: %empty */ #line 827 "parser.y" { cb_validate_program_environment (current_program); } -#line 5245 "parser.c" +#line 5286 "parser.c" break; case 9: /* $@3: %empty */ #line 828 "parser.y" { cb_validate_program_data (current_program); } -#line 5251 "parser.c" +#line 5292 "parser.c" break; case 10: /* program_definition: identification_division environment_division $@2 data_division $@3 procedure_division nested_prog end_program */ @@ -5258,19 +5299,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5262 "parser.c" +#line 5303 "parser.c" break; case 11: /* $@4: %empty */ #line 841 "parser.y" { cb_validate_program_environment (current_program); } -#line 5268 "parser.c" +#line 5309 "parser.c" break; case 12: /* $@5: %empty */ #line 842 "parser.y" { cb_validate_program_data (current_program); } -#line 5274 "parser.c" +#line 5315 "parser.c" break; case 13: /* program_mandatory: identification_division environment_division $@4 data_division $@5 procedure_division nested_prog end_mandatory */ @@ -5281,19 +5322,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5285 "parser.c" +#line 5326 "parser.c" break; case 14: /* $@6: %empty */ #line 855 "parser.y" { cb_validate_program_environment (current_program); } -#line 5291 "parser.c" +#line 5332 "parser.c" break; case 15: /* $@7: %empty */ #line 856 "parser.y" { cb_validate_program_data (current_program); } -#line 5297 "parser.c" +#line 5338 "parser.c" break; case 21: /* end_program: "END PROGRAM" program_name '.' */ @@ -5322,7 +5363,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5326 "parser.c" +#line 5367 "parser.c" break; case 22: /* end_mandatory: "END PROGRAM" program_name '.' */ @@ -5349,7 +5390,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5353 "parser.c" +#line 5394 "parser.c" break; case 23: /* end_function: "END FUNCTION" program_name '.' */ @@ -5376,7 +5417,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5380 "parser.c" +#line 5421 "parser.c" break; case 24: /* $@8: %empty */ @@ -5420,7 +5461,7 @@ yyparse (void) depth++; current_program->program_id = cb_build_program_id (yyvsp[-1], yyvsp[0]); } -#line 5424 "parser.c" +#line 5465 "parser.c" break; case 26: /* function_division: "FUNCTION-ID" '.' program_name as_literal '.' */ @@ -5465,19 +5506,19 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5469 "parser.c" +#line 5510 "parser.c" break; case 29: /* as_literal: %empty */ #line 1045 "parser.y" { yyval = NULL; } -#line 5475 "parser.c" +#line 5516 "parser.c" break; case 30: /* as_literal: AS "Literal" */ #line 1046 "parser.y" { yyval = yyvsp[0]; } -#line 5481 "parser.c" +#line 5522 "parser.c" break; case 33: /* program_type_clause: COMMON */ @@ -5488,7 +5529,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5492 "parser.c" +#line 5533 "parser.c" break; case 34: /* program_type_clause: COMMON _init_or_recurs */ @@ -5499,7 +5540,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5503 "parser.c" +#line 5544 "parser.c" break; case 36: /* _init_or_recurs: "INITIAL" */ @@ -5507,7 +5548,7 @@ yyparse (void) { current_program->flag_initial = 1; } -#line 5511 "parser.c" +#line 5552 "parser.c" break; case 37: /* _init_or_recurs: RECURSIVE */ @@ -5516,7 +5557,7 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5520 "parser.c" +#line 5561 "parser.c" break; case 41: /* configuration_section: CONFIGURATION SECTION '.' configuration_list */ @@ -5526,7 +5567,7 @@ yyparse (void) cb_error (_("CONFIGURATION SECTION not allowed in nested programs")); } } -#line 5530 "parser.c" +#line 5571 "parser.c" break; case 53: /* with_debugging_mode: _with DEBUGGING MODE */ @@ -5534,13 +5575,13 @@ yyparse (void) { cb_verify (cb_debugging_line, "DEBUGGING MODE"); } -#line 5538 "parser.c" +#line 5579 "parser.c" break; case 54: /* computer_name: "Identifier" */ #line 1143 "parser.y" { } -#line 5544 "parser.c" +#line 5585 "parser.c" break; case 65: /* object_computer_memory: MEMORY SIZE _is integer object_char_or_word */ @@ -5548,7 +5589,7 @@ yyparse (void) { cb_verify (cb_memory_size_clause, "MEMORY SIZE"); } -#line 5552 "parser.c" +#line 5593 "parser.c" break; case 68: /* object_computer_sequence: _program coll_sequence _is reference */ @@ -5556,7 +5597,7 @@ yyparse (void) { current_program->collating_sequence = yyvsp[0]; } -#line 5560 "parser.c" +#line 5601 "parser.c" break; case 69: /* object_computer_segment: "SEGMENT-LIMIT" _is integer */ @@ -5564,7 +5605,7 @@ yyparse (void) { /* Ignore */ } -#line 5568 "parser.c" +#line 5609 "parser.c" break; case 75: /* repository_name: FUNCTION repository_literal_list INTRINSIC */ @@ -5572,7 +5613,7 @@ yyparse (void) { current_program->function_spec_list = yyvsp[-1]; } -#line 5576 "parser.c" +#line 5617 "parser.c" break; case 76: /* repository_name: FUNCTION ALL INTRINSIC */ @@ -5580,19 +5621,19 @@ yyparse (void) { functions_are_all = 1; } -#line 5584 "parser.c" +#line 5625 "parser.c" break; case 77: /* repository_literal_list: "Literal" */ #line 1228 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5590 "parser.c" +#line 5631 "parser.c" break; case 78: /* repository_literal_list: repository_literal_list "Literal" */ #line 1230 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5596 "parser.c" +#line 5637 "parser.c" break; case 96: /* mnemonic_name_clause: "Identifier" _is CRT */ @@ -5606,7 +5647,7 @@ yyparse (void) } /* current_program->flag_screen = 1; */ } -#line 5610 "parser.c" +#line 5651 "parser.c" break; case 97: /* $@9: %empty */ @@ -5620,7 +5661,7 @@ yyparse (void) } save_tree_2 = yyvsp[0]; } -#line 5624 "parser.c" +#line 5665 "parser.c" break; case 99: /* $@10: %empty */ @@ -5632,7 +5673,7 @@ yyparse (void) } save_tree_2 = NULL; } -#line 5636 "parser.c" +#line 5677 "parser.c" break; case 101: /* mnemonic_name_clause: "ARGUMENT-NUMBER" _is undefined_word */ @@ -5650,7 +5691,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-NUMBER clause is not yet supported")); } } -#line 5654 "parser.c" +#line 5695 "parser.c" break; case 102: /* mnemonic_name_clause: "ARGUMENT-VALUE" _is undefined_word */ @@ -5668,7 +5709,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-VALUE clause is not yet supported")); } } -#line 5672 "parser.c" +#line 5713 "parser.c" break; case 103: /* mnemonic_name_clause: "ENVIRONMENT-NAME" _is undefined_word */ @@ -5686,7 +5727,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-NAME clause is not yet supported")); } } -#line 5690 "parser.c" +#line 5731 "parser.c" break; case 104: /* mnemonic_name_clause: "ENVIRONMENT-VALUE" _is undefined_word */ @@ -5704,7 +5745,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-VALUE clause is not yet supported")); } } -#line 5708 "parser.c" +#line 5749 "parser.c" break; case 109: /* special_name_mnemonic_on_off: on_or_off _status _is undefined_word */ @@ -5716,19 +5757,19 @@ yyparse (void) cb_define_switch_name (yyvsp[0], save_tree_1, yyvsp[-3], save_tree_2); } } -#line 5720 "parser.c" +#line 5761 "parser.c" break; case 110: /* on_or_off: ON */ #line 1379 "parser.y" { yyval = cb_int1; } -#line 5726 "parser.c" +#line 5767 "parser.c" break; case 111: /* on_or_off: OFF */ #line 1380 "parser.y" { yyval = cb_int0; } -#line 5732 "parser.c" +#line 5773 "parser.c" break; case 112: /* $@11: %empty */ @@ -5736,7 +5777,7 @@ yyparse (void) { save_tree_1 = yyvsp[0]; } -#line 5740 "parser.c" +#line 5781 "parser.c" break; case 113: /* alphabet_name_clause: ALPHABET undefined_word $@11 _is alphabet_definition */ @@ -5745,31 +5786,31 @@ yyparse (void) current_program->alphabet_name_list = cb_list_add (current_program->alphabet_name_list, yyvsp[0]); } -#line 5749 "parser.c" +#line 5790 "parser.c" break; case 114: /* alphabet_definition: NATIVE */ #line 1399 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_NATIVE); } -#line 5755 "parser.c" +#line 5796 "parser.c" break; case 115: /* alphabet_definition: "STANDARD-1" */ #line 1400 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_1); } -#line 5761 "parser.c" +#line 5802 "parser.c" break; case 116: /* alphabet_definition: "STANDARD-2" */ #line 1401 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_2); } -#line 5767 "parser.c" +#line 5808 "parser.c" break; case 117: /* alphabet_definition: EBCDIC */ #line 1402 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_EBCDIC); } -#line 5773 "parser.c" +#line 5814 "parser.c" break; case 118: /* alphabet_definition: alphabet_literal_list */ @@ -5778,31 +5819,31 @@ yyparse (void) yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_CUSTOM); CB_ALPHABET_NAME (yyval)->custom_list = yyvsp[0]; } -#line 5782 "parser.c" +#line 5823 "parser.c" break; case 119: /* alphabet_literal_list: alphabet_literal */ #line 1411 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5788 "parser.c" +#line 5829 "parser.c" break; case 120: /* alphabet_literal_list: alphabet_literal_list alphabet_literal */ #line 1413 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5794 "parser.c" +#line 5835 "parser.c" break; case 121: /* alphabet_literal: alphabet_lits */ #line 1417 "parser.y" { yyval = yyvsp[0]; } -#line 5800 "parser.c" +#line 5841 "parser.c" break; case 122: /* alphabet_literal: alphabet_lits THRU alphabet_lits */ #line 1418 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 5806 "parser.c" +#line 5847 "parser.c" break; case 123: /* @12: %empty */ @@ -5811,7 +5852,7 @@ yyparse (void) yyval = cb_list_init (yyvsp[-1]); save_tree_2 = yyval; } -#line 5815 "parser.c" +#line 5856 "parser.c" break; case 124: /* alphabet_literal: alphabet_lits ALSO @12 alphabet_also_sequence */ @@ -5819,79 +5860,79 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 5823 "parser.c" +#line 5864 "parser.c" break; case 127: /* alphabet_lits: "Literal" */ #line 1436 "parser.y" { yyval = yyvsp[0]; } -#line 5829 "parser.c" +#line 5870 "parser.c" break; case 128: /* alphabet_lits: SPACE */ #line 1437 "parser.y" { yyval = cb_space; } -#line 5835 "parser.c" +#line 5876 "parser.c" break; case 129: /* alphabet_lits: ZERO */ #line 1438 "parser.y" { yyval = cb_zero; } -#line 5841 "parser.c" +#line 5882 "parser.c" break; case 130: /* alphabet_lits: QUOTE */ #line 1439 "parser.y" { yyval = cb_quote; } -#line 5847 "parser.c" +#line 5888 "parser.c" break; case 131: /* alphabet_lits: "HIGH-VALUE" */ #line 1440 "parser.y" { yyval = cb_norm_high; } -#line 5853 "parser.c" +#line 5894 "parser.c" break; case 132: /* alphabet_lits: "LOW-VALUE" */ #line 1441 "parser.y" { yyval = cb_norm_low; } -#line 5859 "parser.c" +#line 5900 "parser.c" break; case 133: /* alphabet_also_literal: "Literal" */ #line 1445 "parser.y" { cb_list_add (save_tree_2, yyvsp[0]); } -#line 5865 "parser.c" +#line 5906 "parser.c" break; case 134: /* alphabet_also_literal: SPACE */ #line 1446 "parser.y" { cb_list_add (save_tree_2, cb_space); } -#line 5871 "parser.c" +#line 5912 "parser.c" break; case 135: /* alphabet_also_literal: ZERO */ #line 1447 "parser.y" { cb_list_add (save_tree_2, cb_zero); } -#line 5877 "parser.c" +#line 5918 "parser.c" break; case 136: /* alphabet_also_literal: QUOTE */ #line 1448 "parser.y" { cb_list_add (save_tree_2, cb_quote); } -#line 5883 "parser.c" +#line 5924 "parser.c" break; case 137: /* alphabet_also_literal: "HIGH-VALUE" */ #line 1449 "parser.y" { cb_list_add (save_tree_2, cb_norm_high); } -#line 5889 "parser.c" +#line 5930 "parser.c" break; case 138: /* alphabet_also_literal: "LOW-VALUE" */ #line 1450 "parser.y" { cb_list_add (save_tree_2, cb_norm_low); } -#line 5895 "parser.c" +#line 5936 "parser.c" break; case 139: /* symbolic_characters_clause: SYMBOLIC _characters symbolic_characters_list */ @@ -5903,7 +5944,7 @@ yyparse (void) } PENDING ("SYMBOLIC CHARACTERS"); } -#line 5907 "parser.c" +#line 5948 "parser.c" break; case 140: /* symbolic_characters_list: char_list _is_are integer_list */ @@ -5916,31 +5957,31 @@ yyparse (void) yyval = NULL; } } -#line 5920 "parser.c" +#line 5961 "parser.c" break; case 141: /* char_list: undefined_word */ #line 1480 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5926 "parser.c" +#line 5967 "parser.c" break; case 142: /* char_list: char_list undefined_word */ #line 1481 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5932 "parser.c" +#line 5973 "parser.c" break; case 143: /* integer_list: integer */ #line 1485 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5938 "parser.c" +#line 5979 "parser.c" break; case 144: /* integer_list: integer_list integer */ #line 1486 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5944 "parser.c" +#line 5985 "parser.c" break; case 145: /* class_name_clause: CLASS undefined_word _is class_item_list */ @@ -5950,25 +5991,25 @@ yyparse (void) cb_list_add (current_program->class_name_list, cb_build_class_name (yyvsp[-2], yyvsp[0])); } -#line 5954 "parser.c" +#line 5995 "parser.c" break; case 146: /* class_item_list: class_item */ #line 1502 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5960 "parser.c" +#line 6001 "parser.c" break; case 147: /* class_item_list: class_item_list class_item */ #line 1503 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5966 "parser.c" +#line 6007 "parser.c" break; case 148: /* class_item: basic_value */ #line 1507 "parser.y" { yyval = yyvsp[0]; } -#line 5972 "parser.c" +#line 6013 "parser.c" break; case 149: /* class_item: basic_value THRU basic_value */ @@ -5981,7 +6022,7 @@ yyparse (void) yyval = cb_build_pair (yyvsp[0], yyvsp[-2]); } } -#line 5985 "parser.c" +#line 6026 "parser.c" break; case 150: /* locale_clause: LOCALE undefined_word _is reference */ @@ -5995,7 +6036,7 @@ yyparse (void) cb_list_add (current_program->locale_list, l); } } -#line 5999 "parser.c" +#line 6040 "parser.c" break; case 151: /* currency_sign_clause: CURRENCY _sign _is "Literal" */ @@ -6060,7 +6101,7 @@ yyparse (void) } current_program->currency_symbol = s[0]; } -#line 6064 "parser.c" +#line 6105 "parser.c" break; case 152: /* decimal_point_clause: "DECIMAL-POINT" _is COMMA */ @@ -6069,31 +6110,31 @@ yyparse (void) current_program->decimal_point = ','; current_program->numeric_separator = '.'; } -#line 6073 "parser.c" +#line 6114 "parser.c" break; case 153: /* cursor_clause: CURSOR _is reference */ #line 1615 "parser.y" { current_program->cursor_pos = yyvsp[0]; } -#line 6079 "parser.c" +#line 6120 "parser.c" break; case 154: /* crt_status_clause: CRT STATUS _is reference */ #line 1622 "parser.y" { current_program->crt_status = yyvsp[0]; } -#line 6085 "parser.c" +#line 6126 "parser.c" break; case 155: /* screen_control: "SCREEN-CONTROL" _is reference */ #line 1629 "parser.y" { PENDING ("SCREEN CONTROL"); } -#line 6091 "parser.c" +#line 6132 "parser.c" break; case 156: /* event_status: "EVENT-STATUS" _is reference */ #line 1635 "parser.y" { PENDING ("EVENT STATUS"); } -#line 6097 "parser.c" +#line 6138 "parser.c" break; case 159: /* $@13: %empty */ @@ -6106,7 +6147,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6110 "parser.c" +#line 6151 "parser.c" break; case 161: /* $@14: %empty */ @@ -6119,7 +6160,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6123 "parser.c" +#line 6164 "parser.c" break; case 167: /* $@15: %empty */ @@ -6138,7 +6179,7 @@ yyparse (void) current_program->file_list = cb_cons (CB_TREE (current_file), current_program->file_list); } -#line 6142 "parser.c" +#line 6183 "parser.c" break; case 168: /* file_control_entry: SELECT flag_optional undefined_word $@15 select_clause_sequence '.' */ @@ -6146,7 +6187,7 @@ yyparse (void) { validate_file (current_file, yyvsp[-3]); } -#line 6150 "parser.c" +#line 6191 "parser.c" break; case 186: /* assign_clause: ASSIGN _to _ext_clause _device assignment_name */ @@ -6154,7 +6195,7 @@ yyparse (void) { current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } -#line 6158 "parser.c" +#line 6199 "parser.c" break; case 187: /* assign_clause: ASSIGN _to _ext_clause DISK */ @@ -6163,7 +6204,7 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("DISK")); } -#line 6167 "parser.c" +#line 6208 "parser.c" break; case 188: /* assign_clause: ASSIGN _to _ext_clause PRINTER */ @@ -6172,13 +6213,13 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("PRINTER")); } -#line 6176 "parser.c" +#line 6217 "parser.c" break; case 191: /* _device: PRINTER */ #line 1745 "parser.y" { current_file->organization = COB_ORG_LINE_SEQUENTIAL; } -#line 6182 "parser.c" +#line 6223 "parser.c" break; case 193: /* _ext_clause: EXTERNAL */ @@ -6186,7 +6227,7 @@ yyparse (void) { current_file->external_assign = 1; } -#line 6190 "parser.c" +#line 6231 "parser.c" break; case 194: /* _ext_clause: DYNAMIC */ @@ -6194,7 +6235,7 @@ yyparse (void) { current_file->external_assign = 0; } -#line 6198 "parser.c" +#line 6239 "parser.c" break; case 196: /* assignment_name: DISPLAY */ @@ -6205,7 +6246,7 @@ yyparse (void) s = "$#@DUMMY@#$"; yyval = cb_build_alphanumeric_literal ((unsigned char *)s, strlen (s)); } -#line 6209 "parser.c" +#line 6250 "parser.c" break; case 197: /* assignment_name: _literal assignment_device_name_list */ @@ -6226,37 +6267,37 @@ yyparse (void) yyval = yyvsp[-1]; } } -#line 6230 "parser.c" +#line 6271 "parser.c" break; case 198: /* assignment_device_name_list: qualified_word */ #line 1788 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 6236 "parser.c" +#line 6277 "parser.c" break; case 199: /* assignment_device_name_list: assignment_device_name_list qualified_word */ #line 1789 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 6242 "parser.c" +#line 6283 "parser.c" break; case 201: /* access_mode: SEQUENTIAL */ #line 1799 "parser.y" { current_file->access_mode = COB_ACCESS_SEQUENTIAL; } -#line 6248 "parser.c" +#line 6289 "parser.c" break; case 202: /* access_mode: DYNAMIC */ #line 1800 "parser.y" { current_file->access_mode = COB_ACCESS_DYNAMIC; } -#line 6254 "parser.c" +#line 6295 "parser.c" break; case 203: /* access_mode: RANDOM */ #line 1801 "parser.y" { current_file->access_mode = COB_ACCESS_RANDOM; } -#line 6260 "parser.c" +#line 6301 "parser.c" break; case 204: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference flag_duplicates */ @@ -6280,7 +6321,7 @@ yyparse (void) l->next = p; } } -#line 6284 "parser.c" +#line 6325 "parser.c" break; case 205: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6324,7 +6365,7 @@ yyparse (void) } } } -#line 6328 "parser.c" +#line 6369 "parser.c" break; case 206: /* $@16: %empty */ @@ -6332,7 +6373,7 @@ yyparse (void) { key_component_list = NULL; } -#line 6336 "parser.c" +#line 6377 "parser.c" break; case 209: /* split_key: reference */ @@ -6349,25 +6390,25 @@ yyparse (void) c->next = comp; } } -#line 6353 "parser.c" +#line 6394 "parser.c" break; case 210: /* key_is_eq: %empty */ #line 1895 "parser.y" { yyval = NULL; } -#line 6359 "parser.c" +#line 6400 "parser.c" break; case 211: /* key_is_eq: SOURCE _is */ #line 1896 "parser.y" { yyval = cb_int1; } -#line 6365 "parser.c" +#line 6406 "parser.c" break; case 212: /* key_is_eq: '=' */ #line 1897 "parser.y" { yyval = cb_int('='); } -#line 6371 "parser.c" +#line 6412 "parser.c" break; case 213: /* collating_sequence_clause: coll_sequence _is "Identifier" */ @@ -6375,7 +6416,7 @@ yyparse (void) { PENDING ("COLLATING SEQUENCE"); } -#line 6379 "parser.c" +#line 6420 "parser.c" break; case 214: /* file_status_clause: file_or_sort STATUS _is reference opt_reference */ @@ -6386,25 +6427,25 @@ yyparse (void) PENDING ("2nd FILE STATUS"); } } -#line 6390 "parser.c" +#line 6431 "parser.c" break; case 219: /* lock_mode: MANUAL lock_with */ #line 1935 "parser.y" { current_file->lock_mode = COB_LOCK_MANUAL; } -#line 6396 "parser.c" +#line 6437 "parser.c" break; case 220: /* lock_mode: AUTOMATIC lock_with */ #line 1936 "parser.y" { current_file->lock_mode = COB_LOCK_AUTOMATIC; } -#line 6402 "parser.c" +#line 6443 "parser.c" break; case 221: /* lock_mode: EXCLUSIVE */ #line 1937 "parser.y" { current_file->lock_mode = COB_LOCK_EXCLUSIVE; } -#line 6408 "parser.c" +#line 6449 "parser.c" break; case 224: /* lock_with: WITH LOCK ON MULTIPLE lock_records */ @@ -6412,13 +6453,13 @@ yyparse (void) { current_file->lock_mode |= COB_LOCK_MULTIPLE; } -#line 6416 "parser.c" +#line 6457 "parser.c" break; case 225: /* lock_with: WITH ROLLBACK */ #line 1946 "parser.y" { PENDING ("WITH ROLLBACK"); } -#line 6422 "parser.c" +#line 6463 "parser.c" break; case 230: /* organization: INDEXED */ @@ -6431,7 +6472,7 @@ yyparse (void) organized_seen = 1; } } -#line 6435 "parser.c" +#line 6476 "parser.c" break; case 231: /* organization: RECORD _binary SEQUENTIAL */ @@ -6444,7 +6485,7 @@ yyparse (void) organized_seen = 1; } } -#line 6448 "parser.c" +#line 6489 "parser.c" break; case 232: /* organization: SEQUENTIAL */ @@ -6457,7 +6498,7 @@ yyparse (void) organized_seen = 1; } } -#line 6461 "parser.c" +#line 6502 "parser.c" break; case 233: /* organization: RELATIVE */ @@ -6470,7 +6511,7 @@ yyparse (void) organized_seen = 1; } } -#line 6474 "parser.c" +#line 6515 "parser.c" break; case 234: /* organization: LINE SEQUENTIAL */ @@ -6483,7 +6524,7 @@ yyparse (void) organized_seen = 1; } } -#line 6487 "parser.c" +#line 6528 "parser.c" break; case 235: /* padding_character_clause: PADDING _character _is reference_or_literal */ @@ -6491,13 +6532,13 @@ yyparse (void) { cb_verify (cb_padding_character_clause, "PADDING CHARACTER"); } -#line 6495 "parser.c" +#line 6536 "parser.c" break; case 236: /* record_delimiter_clause: RECORD DELIMITER _is "STANDARD-1" */ #line 2023 "parser.y" { /* ignored */ } -#line 6501 "parser.c" +#line 6542 "parser.c" break; case 237: /* record_key_clause: RECORD _key _is reference flag_duplicates */ @@ -6510,7 +6551,7 @@ yyparse (void) current_file->key = yyvsp[-1]; } -#line 6514 "parser.c" +#line 6555 "parser.c" break; case 238: /* record_key_clause: RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6546,55 +6587,55 @@ yyparse (void) current_file->component_list = key_component_list; } } -#line 6550 "parser.c" +#line 6591 "parser.c" break; case 239: /* relative_key_clause: RELATIVE _key _is reference */ #line 2077 "parser.y" { current_file->key = yyvsp[0]; } -#line 6556 "parser.c" +#line 6597 "parser.c" break; case 240: /* reserve_clause: RESERVE integer _area */ #line 2084 "parser.y" { /* ignored */ } -#line 6562 "parser.c" +#line 6603 "parser.c" break; case 241: /* reserve_clause: RESERVE NO */ #line 2085 "parser.y" { /* ignored */ } -#line 6568 "parser.c" +#line 6609 "parser.c" break; case 242: /* sharing_clause: SHARING _with sharing_option */ #line 2092 "parser.y" { current_file->sharing = yyvsp[0]; } -#line 6574 "parser.c" +#line 6615 "parser.c" break; case 243: /* sharing_option: ALL _other */ #line 2096 "parser.y" { yyval = NULL; PENDING ("SHARING ALL OTHER"); } -#line 6580 "parser.c" +#line 6621 "parser.c" break; case 244: /* sharing_option: NO _other */ #line 2097 "parser.y" { yyval = cb_int1; } -#line 6586 "parser.c" +#line 6627 "parser.c" break; case 245: /* sharing_option: READ ONLY */ #line 2098 "parser.y" { yyval = cb_int0; } -#line 6592 "parser.c" +#line 6633 "parser.c" break; case 246: /* nominal_key_clause: NOMINAL _key _is reference */ #line 2104 "parser.y" { PENDING ("NOMINAL KEY"); } -#line 6598 "parser.c" +#line 6639 "parser.c" break; case 257: /* same_clause: SAME same_option _area _for file_name_list */ @@ -6620,31 +6661,31 @@ yyparse (void) break; } } -#line 6624 "parser.c" +#line 6665 "parser.c" break; case 258: /* same_option: %empty */ #line 2159 "parser.y" { yyval = cb_int0; } -#line 6630 "parser.c" +#line 6671 "parser.c" break; case 259: /* same_option: RECORD */ #line 2160 "parser.y" { yyval = cb_int1; } -#line 6636 "parser.c" +#line 6677 "parser.c" break; case 260: /* same_option: SORT */ #line 2161 "parser.y" { yyval = cb_int2; } -#line 6642 "parser.c" +#line 6683 "parser.c" break; case 261: /* same_option: "SORT-MERGE" */ #line 2162 "parser.y" { yyval = cb_int2; } -#line 6648 "parser.c" +#line 6689 "parser.c" break; case 262: /* multiple_file_tape_clause: MULTIPLE _file _tape _contains multiple_file_list */ @@ -6652,13 +6693,13 @@ yyparse (void) { cb_verify (cb_multiple_file_tape_clause, "MULTIPLE FILE TAPE"); } -#line 6656 "parser.c" +#line 6697 "parser.c" break; case 265: /* multiple_file: file_name multiple_file_position */ #line 2180 "parser.y" { } -#line 6662 "parser.c" +#line 6703 "parser.c" break; case 271: /* apply_clause: APPLY "COMMITMENT-CONTROL" _on reference_list */ @@ -6666,7 +6707,7 @@ yyparse (void) { PENDING ("APPLY COMMITMENT-CONTROL"); } -#line 6670 "parser.c" +#line 6711 "parser.c" break; case 272: /* apply_clause: APPLY "CYL-OVERFLOW" _of "Literal" TRACKS ON reference_list */ @@ -6674,7 +6715,7 @@ yyparse (void) { PENDING ("APPLY CYL-OVERFLOW"); } -#line 6678 "parser.c" +#line 6719 "parser.c" break; case 273: /* apply_clause: APPLY "CORE-INDEX" TO reference ON reference_list */ @@ -6682,7 +6723,7 @@ yyparse (void) { PENDING ("APPLY CORE-INDEX"); } -#line 6686 "parser.c" +#line 6727 "parser.c" break; case 274: /* apply_clause: APPLY "FORMS-OVERLAY" TO reference ON reference_list */ @@ -6690,7 +6731,7 @@ yyparse (void) { PENDING ("APPLY FORMS-OVERLAY"); } -#line 6694 "parser.c" +#line 6735 "parser.c" break; case 275: /* apply_clause: APPLY "CLOSE-NOFEED" ON reference_list */ @@ -6698,13 +6739,13 @@ yyparse (void) { PENDING ("APPLY CLOSE-NOFEED"); } -#line 6702 "parser.c" +#line 6743 "parser.c" break; case 279: /* $@17: %empty */ #line 2238 "parser.y" { current_storage = CB_STORAGE_FILE; } -#line 6708 "parser.c" +#line 6749 "parser.c" break; case 281: /* $@18: %empty */ @@ -6718,7 +6759,7 @@ yyparse (void) } current_storage = CB_STORAGE_FILE; } -#line 6722 "parser.c" +#line 6763 "parser.c" break; case 285: /* file_description: file_type file_description_entry record_description_list */ @@ -6730,7 +6771,7 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6734 "parser.c" +#line 6775 "parser.c" break; case 286: /* file_description_sequence_without_type: file_description_entry record_description_list */ @@ -6742,19 +6783,19 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6746 "parser.c" +#line 6787 "parser.c" break; case 288: /* file_type: FD */ #line 2283 "parser.y" { yyval = cb_int0; } -#line 6752 "parser.c" +#line 6793 "parser.c" break; case 289: /* file_type: SD */ #line 2284 "parser.y" { yyval = cb_int1; } -#line 6758 "parser.c" +#line 6799 "parser.c" break; case 290: /* @19: %empty */ @@ -6769,7 +6810,7 @@ yyparse (void) current_file->organization = COB_ORG_SORT; } } -#line 6773 "parser.c" +#line 6814 "parser.c" break; case 291: /* file_description_entry: file_name @19 file_description_clause_sequence '.' */ @@ -6778,7 +6819,7 @@ yyparse (void) /* Shut up bison */ dummy_tree = yyvsp[-2]; } -#line 6782 "parser.c" +#line 6823 "parser.c" break; case 294: /* file_description_clause: _is EXTERNAL */ @@ -6789,7 +6830,7 @@ yyparse (void) } current_file->external = 1; } -#line 6793 "parser.c" +#line 6834 "parser.c" break; case 295: /* file_description_clause: _is GLOBAL */ @@ -6800,13 +6841,13 @@ yyparse (void) } current_file->global = 1; } -#line 6804 "parser.c" +#line 6845 "parser.c" break; case 306: /* block_contains_clause: BLOCK _contains integer opt_to_integer _records_or_characters */ #line 2347 "parser.y" { /* ignored */ } -#line 6810 "parser.c" +#line 6851 "parser.c" break; case 310: /* record_clause: RECORD _contains integer _characters */ @@ -6822,7 +6863,7 @@ yyparse (void) } } } -#line 6826 "parser.c" +#line 6867 "parser.c" break; case 311: /* record_clause: RECORD _contains integer TO integer _characters */ @@ -6851,7 +6892,7 @@ yyparse (void) } } } -#line 6855 "parser.c" +#line 6896 "parser.c" break; case 312: /* record_clause: RECORD _is VARYING _in _size opt_from_integer opt_to_integer _characters record_depending */ @@ -6876,7 +6917,7 @@ yyparse (void) cb_error (_("RECORD clause invalid")); } } -#line 6880 "parser.c" +#line 6921 "parser.c" break; case 314: /* record_depending: DEPENDING _on reference */ @@ -6884,31 +6925,31 @@ yyparse (void) { current_file->record_depending = yyvsp[0]; } -#line 6888 "parser.c" +#line 6929 "parser.c" break; case 315: /* opt_from_integer: %empty */ #line 2425 "parser.y" { yyval = NULL; } -#line 6894 "parser.c" +#line 6935 "parser.c" break; case 316: /* opt_from_integer: _from integer */ #line 2426 "parser.y" { yyval = yyvsp[0]; } -#line 6900 "parser.c" +#line 6941 "parser.c" break; case 317: /* opt_to_integer: %empty */ #line 2430 "parser.y" { yyval = NULL; } -#line 6906 "parser.c" +#line 6947 "parser.c" break; case 318: /* opt_to_integer: TO integer */ #line 2431 "parser.y" { yyval = yyvsp[0]; } -#line 6912 "parser.c" +#line 6953 "parser.c" break; case 319: /* label_records_clause: LABEL records label_option */ @@ -6916,7 +6957,7 @@ yyparse (void) { cb_verify (cb_label_records_clause, "LABEL RECORDS"); } -#line 6920 "parser.c" +#line 6961 "parser.c" break; case 322: /* value_of_clause: VALUE OF "Identifier" _is valueof_name */ @@ -6924,7 +6965,7 @@ yyparse (void) { cb_verify (cb_value_of_clause, "VALUE OF"); } -#line 6928 "parser.c" +#line 6969 "parser.c" break; case 323: /* value_of_clause: VALUE OF "FILE-ID" _is valueof_name */ @@ -6934,7 +6975,7 @@ yyparse (void) current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } } -#line 6938 "parser.c" +#line 6979 "parser.c" break; case 326: /* data_records_clause: DATA records no_reference_list */ @@ -6942,7 +6983,7 @@ yyparse (void) { cb_verify (cb_data_records_clause, "DATA RECORDS"); } -#line 6946 "parser.c" +#line 6987 "parser.c" break; case 327: /* linage_clause: LINAGE _is reference_or_literal _lines linage_sequence */ @@ -6961,7 +7002,7 @@ yyparse (void) current_linage++; } } -#line 6965 "parser.c" +#line 7006 "parser.c" break; case 333: /* linage_footing: _with FOOTING _at reference_or_literal _lines */ @@ -6969,7 +7010,7 @@ yyparse (void) { current_file->latfoot = yyvsp[-1]; } -#line 6973 "parser.c" +#line 7014 "parser.c" break; case 334: /* linage_top: _at TOP reference_or_literal _lines */ @@ -6977,7 +7018,7 @@ yyparse (void) { current_file->lattop = yyvsp[-1]; } -#line 6981 "parser.c" +#line 7022 "parser.c" break; case 335: /* linage_bottom: _at BOTTOM reference_or_literal */ @@ -6985,13 +7026,13 @@ yyparse (void) { current_file->latbot = yyvsp[0]; } -#line 6989 "parser.c" +#line 7030 "parser.c" break; case 336: /* recording_mode_clause: RECORDING _mode _is "Identifier" */ #line 2536 "parser.y" { /* ignore */ } -#line 6995 "parser.c" +#line 7036 "parser.c" break; case 337: /* code_set_clause: "CODE-SET" _is "Identifier" */ @@ -7008,7 +7049,7 @@ yyparse (void) } } } -#line 7012 "parser.c" +#line 7053 "parser.c" break; case 338: /* report_clause: REPORT _is report_name */ @@ -7016,7 +7057,7 @@ yyparse (void) { cb_warning (_("file descriptor REPORT IS")); } -#line 7020 "parser.c" +#line 7061 "parser.c" break; case 339: /* report_clause: REPORTS _are report_name */ @@ -7024,13 +7065,13 @@ yyparse (void) { cb_warning (_("file descriptor REPORTS ARE")); } -#line 7028 "parser.c" +#line 7069 "parser.c" break; case 341: /* $@20: %empty */ #line 2577 "parser.y" { current_storage = CB_STORAGE_WORKING; } -#line 7034 "parser.c" +#line 7075 "parser.c" break; case 342: /* working_storage_section: "WORKING-STORAGE" SECTION '.' $@20 record_description_list */ @@ -7041,19 +7082,19 @@ yyparse (void) cb_field_add (current_program->working_storage, CB_FIELD (yyvsp[0])); } } -#line 7045 "parser.c" +#line 7086 "parser.c" break; case 343: /* record_description_list: %empty */ #line 2588 "parser.y" { yyval = NULL; } -#line 7051 "parser.c" +#line 7092 "parser.c" break; case 344: /* record_description_list: record_description_list_1 */ #line 2589 "parser.y" { yyval = yyvsp[0]; } -#line 7057 "parser.c" +#line 7098 "parser.c" break; case 345: /* $@21: %empty */ @@ -7063,7 +7104,7 @@ yyparse (void) description_field = NULL; cb_clear_real_field (); } -#line 7067 "parser.c" +#line 7108 "parser.c" break; case 346: /* record_description_list_1: $@21 record_description_list_2 */ @@ -7076,7 +7117,7 @@ yyparse (void) } yyval = CB_TREE (description_field); } -#line 7080 "parser.c" +#line 7121 "parser.c" break; case 351: /* $@22: %empty */ @@ -7092,7 +7133,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7096 "parser.c" +#line 7137 "parser.c" break; case 352: /* data_description: level_number entry_name $@22 data_description_clause_sequence _maybe_next_level_number */ @@ -7109,7 +7150,7 @@ yyparse (void) description_field = current_field; } } -#line 7113 "parser.c" +#line 7154 "parser.c" break; case 353: /* $@23: %empty */ @@ -7125,7 +7166,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7129 "parser.c" +#line 7170 "parser.c" break; case 354: /* data_description: level_number_88 entry_name $@23 value_cond_clause */ @@ -7140,7 +7181,7 @@ yyparse (void) } } -#line 7144 "parser.c" +#line 7185 "parser.c" break; case 358: /* _maybe_next_level_number: "Literal" */ @@ -7162,7 +7203,7 @@ yyparse (void) cb_unget_token (LITERAL, yyvsp[0]); } } -#line 7166 "parser.c" +#line 7207 "parser.c" break; case 359: /* entry_name: %empty */ @@ -7172,7 +7213,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7176 "parser.c" +#line 7217 "parser.c" break; case 360: /* entry_name: FILLER */ @@ -7182,7 +7223,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7186 "parser.c" +#line 7227 "parser.c" break; case 361: /* entry_name: "Identifier" */ @@ -7192,7 +7233,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7196 "parser.c" +#line 7237 "parser.c" break; case 362: /* const_name: "Identifier" */ @@ -7202,7 +7243,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7206 "parser.c" +#line 7247 "parser.c" break; case 364: /* const_global: _is GLOBAL */ @@ -7211,25 +7252,25 @@ yyparse (void) current_field->flag_is_global = 1; cb_error (_("CONSTANT with GLOBAL clause is not yet supported")); } -#line 7215 "parser.c" +#line 7256 "parser.c" break; case 365: /* lit_or_length: literal */ #line 2741 "parser.y" { yyval = yyvsp[0]; } -#line 7221 "parser.c" +#line 7262 "parser.c" break; case 366: /* lit_or_length: LENGTH _of identifier_1 */ #line 2742 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7227 "parser.c" +#line 7268 "parser.c" break; case 367: /* lit_or_length: "BYTE-LENGTH" _of identifier_1 */ #line 2743 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7233 "parser.c" +#line 7274 "parser.c" break; case 368: /* constant_entry: level_number const_name CONSTANT const_global _as lit_or_length */ @@ -7249,7 +7290,7 @@ yyparse (void) /* Ignore return value */ cb_validate_78_item (CB_FIELD (x)); } -#line 7253 "parser.c" +#line 7294 "parser.c" break; case 369: /* data_description_clause_sequence: %empty */ @@ -7258,7 +7299,7 @@ yyparse (void) /* required to check redefines */ yyval = NULL; } -#line 7262 "parser.c" +#line 7303 "parser.c" break; case 370: /* data_description_clause_sequence: data_description_clause_sequence data_description_clause */ @@ -7267,7 +7308,7 @@ yyparse (void) /* required to check redefines */ yyval = cb_true; } -#line 7271 "parser.c" +#line 7312 "parser.c" break; case 386: /* redefines_clause: REDEFINES identifier_1 */ @@ -7287,7 +7328,7 @@ yyparse (void) YYERROR; } } -#line 7291 "parser.c" +#line 7332 "parser.c" break; case 387: /* external_clause: _is EXTERNAL as_extname */ @@ -7310,13 +7351,13 @@ yyparse (void) has_external = 1; } } -#line 7314 "parser.c" +#line 7355 "parser.c" break; case 388: /* as_extname: %empty */ #line 2845 "parser.y" { current_field->ename = NULL; } -#line 7320 "parser.c" +#line 7361 "parser.c" break; case 389: /* as_extname: AS "Literal" */ @@ -7327,7 +7368,7 @@ yyparse (void) x = CB_FIELD(cb_build_field (cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)))); current_field->ename = x->name; } -#line 7331 "parser.c" +#line 7372 "parser.c" break; case 390: /* global_clause: _is GLOBAL */ @@ -7345,79 +7386,79 @@ yyparse (void) current_field->flag_is_global = 1; } } -#line 7349 "parser.c" +#line 7390 "parser.c" break; case 391: /* picture_clause: PICTURE */ #line 2878 "parser.y" { current_field->pic = CB_PICTURE (yyvsp[0]); } -#line 7355 "parser.c" +#line 7396 "parser.c" break; case 394: /* usage: BINARY */ #line 2890 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7361 "parser.c" +#line 7402 "parser.c" break; case 395: /* usage: COMP */ #line 2891 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7367 "parser.c" +#line 7408 "parser.c" break; case 396: /* usage: "COMP-1" */ #line 2892 "parser.y" { current_field->usage = CB_USAGE_FLOAT; } -#line 7373 "parser.c" +#line 7414 "parser.c" break; case 397: /* usage: "COMP-2" */ #line 2893 "parser.y" { current_field->usage = CB_USAGE_DOUBLE; } -#line 7379 "parser.c" +#line 7420 "parser.c" break; case 398: /* usage: "COMP-3" */ #line 2894 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7385 "parser.c" +#line 7426 "parser.c" break; case 399: /* usage: "COMP-4" */ #line 2895 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7391 "parser.c" +#line 7432 "parser.c" break; case 400: /* usage: "COMP-5" */ #line 2896 "parser.y" { current_field->usage = CB_USAGE_COMP_5; } -#line 7397 "parser.c" +#line 7438 "parser.c" break; case 401: /* usage: "COMP-X" */ #line 2897 "parser.y" { current_field->usage = CB_USAGE_COMP_X; } -#line 7403 "parser.c" +#line 7444 "parser.c" break; case 402: /* usage: DISPLAY */ #line 2898 "parser.y" { current_field->usage = CB_USAGE_DISPLAY; } -#line 7409 "parser.c" +#line 7450 "parser.c" break; case 403: /* usage: INDEX */ #line 2899 "parser.y" { current_field->usage = CB_USAGE_INDEX; } -#line 7415 "parser.c" +#line 7456 "parser.c" break; case 404: /* usage: "PACKED-DECIMAL" */ #line 2900 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7421 "parser.c" +#line 7462 "parser.c" break; case 405: /* usage: POINTER */ @@ -7426,7 +7467,7 @@ yyparse (void) current_field->usage = CB_USAGE_POINTER; current_field->flag_is_pointer = 1; } -#line 7430 "parser.c" +#line 7471 "parser.c" break; case 406: /* usage: "PROGRAM-POINTER" */ @@ -7435,115 +7476,115 @@ yyparse (void) current_field->usage = CB_USAGE_PROGRAM_POINTER; current_field->flag_is_pointer = 1; } -#line 7439 "parser.c" +#line 7480 "parser.c" break; case 407: /* usage: "SIGNED-SHORT" */ #line 2911 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7445 "parser.c" +#line 7486 "parser.c" break; case 408: /* usage: "SIGNED-INT" */ #line 2912 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7451 "parser.c" +#line 7492 "parser.c" break; case 409: /* usage: "SIGNED-LONG" */ #line 2913 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7457 "parser.c" +#line 7498 "parser.c" break; case 410: /* usage: "UNSIGNED-SHORT" */ #line 2914 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7463 "parser.c" +#line 7504 "parser.c" break; case 411: /* usage: "UNSIGNED-INT" */ #line 2915 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7469 "parser.c" +#line 7510 "parser.c" break; case 412: /* usage: "UNSIGNED-LONG" */ #line 2916 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7475 "parser.c" +#line 7516 "parser.c" break; case 413: /* usage: "BINARY-CHAR" SIGNED */ #line 2917 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7481 "parser.c" +#line 7522 "parser.c" break; case 414: /* usage: "BINARY-CHAR" UNSIGNED */ #line 2918 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_CHAR; } -#line 7487 "parser.c" +#line 7528 "parser.c" break; case 415: /* usage: "BINARY-CHAR" */ #line 2919 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7493 "parser.c" +#line 7534 "parser.c" break; case 416: /* usage: "BINARY-SHORT" SIGNED */ #line 2920 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7499 "parser.c" +#line 7540 "parser.c" break; case 417: /* usage: "BINARY-SHORT" UNSIGNED */ #line 2921 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7505 "parser.c" +#line 7546 "parser.c" break; case 418: /* usage: "BINARY-SHORT" */ #line 2922 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7511 "parser.c" +#line 7552 "parser.c" break; case 419: /* usage: "BINARY-LONG" SIGNED */ #line 2923 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7517 "parser.c" +#line 7558 "parser.c" break; case 420: /* usage: "BINARY-LONG" UNSIGNED */ #line 2924 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7523 "parser.c" +#line 7564 "parser.c" break; case 421: /* usage: "BINARY-LONG" */ #line 2925 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7529 "parser.c" +#line 7570 "parser.c" break; case 422: /* usage: "BINARY-DOUBLE" SIGNED */ #line 2926 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7535 "parser.c" +#line 7576 "parser.c" break; case 423: /* usage: "BINARY-DOUBLE" UNSIGNED */ #line 2927 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7541 "parser.c" +#line 7582 "parser.c" break; case 424: /* usage: "BINARY-DOUBLE" */ #line 2928 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7547 "parser.c" +#line 7588 "parser.c" break; case 425: /* usage: "BINARY-C-LONG" SIGNED */ @@ -7555,7 +7596,7 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7559 "parser.c" +#line 7600 "parser.c" break; case 426: /* usage: "BINARY-C-LONG" UNSIGNED */ @@ -7567,7 +7608,7 @@ yyparse (void) current_field->usage = CB_USAGE_UNSIGNED_LONG; } } -#line 7571 "parser.c" +#line 7612 "parser.c" break; case 427: /* usage: "BINARY-C-LONG" */ @@ -7579,13 +7620,13 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7583 "parser.c" +#line 7624 "parser.c" break; case 428: /* usage: NATIONAL */ #line 2953 "parser.y" { PENDING ("USAGE NATIONAL");} -#line 7589 "parser.c" +#line 7630 "parser.c" break; case 429: /* sign_clause: _sign_is LEADING flag_separate */ @@ -7594,7 +7635,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 1; } -#line 7598 "parser.c" +#line 7639 "parser.c" break; case 430: /* sign_clause: _sign_is TRAILING flag_separate */ @@ -7603,7 +7644,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 0; } -#line 7607 "parser.c" +#line 7648 "parser.c" break; case 434: /* occurs_clause: OCCURS integer occurs_to_integer _times occurs_depending occurs_key_spec */ @@ -7620,19 +7661,19 @@ yyparse (void) } current_field->flag_occurs = 1; } -#line 7624 "parser.c" +#line 7665 "parser.c" break; case 435: /* occurs_to_integer: %empty */ #line 2998 "parser.y" { yyval = NULL; } -#line 7630 "parser.c" +#line 7671 "parser.c" break; case 436: /* occurs_to_integer: TO integer */ #line 2999 "parser.y" { yyval = yyvsp[0]; } -#line 7636 "parser.c" +#line 7677 "parser.c" break; case 438: /* occurs_depending: DEPENDING _on reference */ @@ -7640,7 +7681,7 @@ yyparse (void) { current_field->occurs_depending = yyvsp[0]; } -#line 7644 "parser.c" +#line 7685 "parser.c" break; case 441: /* occurs_keys: occurs_key_list */ @@ -7665,7 +7706,7 @@ yyparse (void) current_field->nkeys = nkeys; } } -#line 7669 "parser.c" +#line 7710 "parser.c" break; case 442: /* occurs_key: ascending_or_descending _key _is reference_list */ @@ -7682,31 +7723,31 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 7686 "parser.c" +#line 7727 "parser.c" break; case 443: /* occurs_key_list: occurs_key */ #line 3052 "parser.y" { yyval = yyvsp[0]; } -#line 7692 "parser.c" +#line 7733 "parser.c" break; case 444: /* occurs_key_list: occurs_key_list occurs_key */ #line 3053 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 7698 "parser.c" +#line 7739 "parser.c" break; case 445: /* ascending_or_descending: ASCENDING */ #line 3057 "parser.y" { yyval = cb_int (COB_ASCENDING); } -#line 7704 "parser.c" +#line 7745 "parser.c" break; case 446: /* ascending_or_descending: DESCENDING */ #line 3058 "parser.y" { yyval = cb_int (COB_DESCENDING); } -#line 7710 "parser.c" +#line 7751 "parser.c" break; case 449: /* occurs_indexed: INDEXED _by occurs_index_list */ @@ -7714,19 +7755,19 @@ yyparse (void) { current_field->index_list = yyvsp[0]; } -#line 7718 "parser.c" +#line 7759 "parser.c" break; case 450: /* occurs_index_list: occurs_index */ #line 3071 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7724 "parser.c" +#line 7765 "parser.c" break; case 451: /* occurs_index_list: occurs_index_list occurs_index */ #line 3073 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7730 "parser.c" +#line 7771 "parser.c" break; case 452: /* occurs_index: "Identifier" */ @@ -7734,25 +7775,25 @@ yyparse (void) { yyval = cb_build_index (yyvsp[0], cb_int1, 1, current_field); } -#line 7738 "parser.c" +#line 7779 "parser.c" break; case 453: /* justified_clause: JUSTIFIED _right */ #line 3087 "parser.y" { current_field->flag_justified = 1; } -#line 7744 "parser.c" +#line 7785 "parser.c" break; case 454: /* synchronized_clause: SYNCHRONIZED left_or_right */ #line 3094 "parser.y" { current_field->flag_synchronized = 1; } -#line 7750 "parser.c" +#line 7791 "parser.c" break; case 458: /* blank_clause: BLANK _when ZERO */ #line 3106 "parser.y" { current_field->flag_blank_zero = 1; } -#line 7756 "parser.c" +#line 7797 "parser.c" break; case 459: /* based_clause: BASED */ @@ -7776,43 +7817,43 @@ yyparse (void) current_field->flag_item_based = 1; } } -#line 7780 "parser.c" +#line 7821 "parser.c" break; case 460: /* value_clause: VALUE _is literal */ #line 3138 "parser.y" { current_field->values = cb_list_init (yyvsp[0]); } -#line 7786 "parser.c" +#line 7827 "parser.c" break; case 461: /* $@24: %empty */ #line 3142 "parser.y" { current_field->values = yyvsp[0]; } -#line 7792 "parser.c" +#line 7833 "parser.c" break; case 463: /* value_item_list: value_item */ #line 3147 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7798 "parser.c" +#line 7839 "parser.c" break; case 464: /* value_item_list: value_item_list value_item */ #line 3148 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7804 "parser.c" +#line 7845 "parser.c" break; case 465: /* value_item: literal */ #line 3152 "parser.y" { yyval = yyvsp[0]; } -#line 7810 "parser.c" +#line 7851 "parser.c" break; case 466: /* value_item: literal THRU literal */ #line 3153 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 7816 "parser.c" +#line 7857 "parser.c" break; case 468: /* false_is: "FALSE" _is literal */ @@ -7823,7 +7864,7 @@ yyparse (void) } current_field->false_88 = cb_list_init (yyvsp[0]); } -#line 7827 "parser.c" +#line 7868 "parser.c" break; case 469: /* renames_clause: RENAMES qualified_word */ @@ -7839,7 +7880,7 @@ yyparse (void) } } } -#line 7843 "parser.c" +#line 7884 "parser.c" break; case 470: /* renames_clause: RENAMES qualified_word THRU qualified_word */ @@ -7858,7 +7899,7 @@ yyparse (void) } } } -#line 7862 "parser.c" +#line 7903 "parser.c" break; case 471: /* any_length_clause: ANY LENGTH */ @@ -7870,7 +7911,7 @@ yyparse (void) current_field->flag_any_length = 1; } } -#line 7874 "parser.c" +#line 7915 "parser.c" break; case 473: /* $@25: %empty */ @@ -7881,7 +7922,7 @@ yyparse (void) cb_error (_("LOCAL-STORAGE not allowed in nested programs")); } } -#line 7885 "parser.c" +#line 7926 "parser.c" break; case 474: /* local_storage_section: "LOCAL-STORAGE" SECTION '.' $@25 record_description_list */ @@ -7891,13 +7932,13 @@ yyparse (void) current_program->local_storage = CB_FIELD (yyvsp[0]); } } -#line 7895 "parser.c" +#line 7936 "parser.c" break; case 476: /* $@26: %empty */ #line 3238 "parser.y" { current_storage = CB_STORAGE_LINKAGE; } -#line 7901 "parser.c" +#line 7942 "parser.c" break; case 477: /* linkage_section: LINKAGE SECTION '.' $@26 record_description_list */ @@ -7907,7 +7948,7 @@ yyparse (void) current_program->linkage_storage = CB_FIELD (yyvsp[0]); } } -#line 7911 "parser.c" +#line 7952 "parser.c" break; case 479: /* $@27: %empty */ @@ -7916,7 +7957,7 @@ yyparse (void) cb_error (_("REPORT SECTION not supported")); current_storage = CB_STORAGE_REPORT; } -#line 7920 "parser.c" +#line 7961 "parser.c" break; case 486: /* report_description_options: %empty */ @@ -7924,7 +7965,7 @@ yyparse (void) { cb_warning (_("Report description using defaults")); } -#line 7928 "parser.c" +#line 7969 "parser.c" break; case 488: /* report_description_option: _is GLOBAL */ @@ -7932,31 +7973,31 @@ yyparse (void) { cb_error (_("GLOBAL is not allowed with RD")); } -#line 7936 "parser.c" +#line 7977 "parser.c" break; case 497: /* identifier_list: identifier */ #line 3317 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7942 "parser.c" +#line 7983 "parser.c" break; case 498: /* identifier_list: identifier_list identifier */ #line 3318 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7948 "parser.c" +#line 7989 "parser.c" break; case 520: /* report_group_option: type_clause */ #line 3374 "parser.y" { cb_warning (_("looking for Report line TYPE")); } -#line 7954 "parser.c" +#line 7995 "parser.c" break; case 571: /* $@28: %empty */ #line 3479 "parser.y" { current_storage = CB_STORAGE_SCREEN; } -#line 7960 "parser.c" +#line 8001 "parser.c" break; case 572: /* screen_section: SCREEN SECTION '.' $@28 */ @@ -7964,7 +8005,7 @@ yyparse (void) { cb_error (_("SCREEN SECTION is not supported")); } -#line 7968 "parser.c" +#line 8009 "parser.c" break; case 574: /* $@29: %empty */ @@ -7978,7 +8019,7 @@ yyparse (void) cb_define_system_name ("SYSERR"); cb_set_in_procedure (); } -#line 7982 "parser.c" +#line 8023 "parser.c" break; case 575: /* $@30: %empty */ @@ -7992,7 +8033,7 @@ yyparse (void) emit_entry (current_program->source_name, 1, yyvsp[-4]); } } -#line 7996 "parser.c" +#line 8037 "parser.c" break; case 576: /* procedure_division: PROCEDURE DIVISION procedure_using_chaining procedure_returning '.' $@29 procedure_declaratives $@30 procedure_list */ @@ -8011,13 +8052,13 @@ yyparse (void) emit_statement (cb_build_perform_exit (current_section)); } } -#line 8015 "parser.c" +#line 8056 "parser.c" break; case 577: /* procedure_using_chaining: %empty */ #line 3528 "parser.y" { yyval = NULL; } -#line 8021 "parser.c" +#line 8062 "parser.c" break; case 578: /* $@31: %empty */ @@ -8026,13 +8067,13 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8030 "parser.c" +#line 8071 "parser.c" break; case 579: /* procedure_using_chaining: USING $@31 procedure_param_list */ #line 3534 "parser.y" { yyval = yyvsp[0]; } -#line 8036 "parser.c" +#line 8077 "parser.c" break; case 580: /* $@32: %empty */ @@ -8041,25 +8082,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; current_program->flag_chained = 1; } -#line 8045 "parser.c" +#line 8086 "parser.c" break; case 581: /* procedure_using_chaining: CHAINING $@32 procedure_param_list */ #line 3540 "parser.y" { yyval = yyvsp[0]; } -#line 8051 "parser.c" +#line 8092 "parser.c" break; case 582: /* procedure_param_list: procedure_param */ #line 3544 "parser.y" { yyval = yyvsp[0]; } -#line 8057 "parser.c" +#line 8098 "parser.c" break; case 583: /* procedure_param_list: procedure_param_list procedure_param */ #line 3546 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8063 "parser.c" +#line 8104 "parser.c" break; case 584: /* procedure_param: procedure_type size_optional procedure_optional "Identifier" */ @@ -8068,7 +8109,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), cb_build_identifier (yyvsp[0])); CB_SIZES (yyval) = size_mode; } -#line 8072 "parser.c" +#line 8113 "parser.c" break; case 586: /* procedure_type: _by REFERENCE */ @@ -8076,7 +8117,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8080 "parser.c" +#line 8121 "parser.c" break; case 587: /* procedure_type: _by VALUE */ @@ -8088,7 +8129,7 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8092 "parser.c" +#line 8133 "parser.c" break; case 589: /* size_optional: SIZE _is AUTO */ @@ -8100,7 +8141,7 @@ yyparse (void) size_mode = CB_SIZE_AUTO; } } -#line 8104 "parser.c" +#line 8145 "parser.c" break; case 590: /* size_optional: SIZE _is DEFAULT */ @@ -8112,7 +8153,7 @@ yyparse (void) size_mode = CB_SIZE_4; } } -#line 8116 "parser.c" +#line 8157 "parser.c" break; case 591: /* size_optional: UNSIGNED SIZE _is integer */ @@ -8145,7 +8186,7 @@ yyparse (void) } } } -#line 8149 "parser.c" +#line 8190 "parser.c" break; case 592: /* size_optional: SIZE _is integer */ @@ -8178,7 +8219,7 @@ yyparse (void) } } } -#line 8182 "parser.c" +#line 8223 "parser.c" break; case 594: /* procedure_optional: OPTIONAL */ @@ -8188,7 +8229,7 @@ yyparse (void) cb_error (_("OPTIONAL only allowed for BY REFERENCE items")); } } -#line 8192 "parser.c" +#line 8233 "parser.c" break; case 595: /* procedure_returning: %empty */ @@ -8198,7 +8239,7 @@ yyparse (void) cb_error (_("RETURNING clause is required for a FUNCTION")); } } -#line 8202 "parser.c" +#line 8243 "parser.c" break; case 596: /* procedure_returning: RETURNING "Identifier" */ @@ -8211,13 +8252,13 @@ yyparse (void) } } } -#line 8215 "parser.c" +#line 8256 "parser.c" break; case 598: /* $@33: %empty */ #line 3680 "parser.y" { in_declaratives = 1; } -#line 8221 "parser.c" +#line 8262 "parser.c" break; case 599: /* procedure_declaratives: DECLARATIVES '.' $@33 procedure_list END DECLARATIVES '.' */ @@ -8239,7 +8280,7 @@ yyparse (void) current_section = NULL; } } -#line 8243 "parser.c" +#line 8284 "parser.c" break; case 605: /* procedure: statements '.' */ @@ -8259,7 +8300,7 @@ yyparse (void) } /* check_unreached = 0; */ } -#line 8263 "parser.c" +#line 8304 "parser.c" break; case 606: /* procedure: error */ @@ -8267,7 +8308,7 @@ yyparse (void) { check_unreached = 0; } -#line 8271 "parser.c" +#line 8312 "parser.c" break; case 607: /* section_header: section_name SECTION opt_segment '.' */ @@ -8299,7 +8340,7 @@ yyparse (void) current_paragraph = NULL; emit_statement (CB_TREE (current_section)); } -#line 8303 "parser.c" +#line 8344 "parser.c" break; case 608: /* paragraph_header: "Identifier" '.' */ @@ -8337,7 +8378,7 @@ yyparse (void) } emit_statement (CB_TREE (current_paragraph)); } -#line 8341 "parser.c" +#line 8382 "parser.c" break; case 609: /* invalid_statement: section_name */ @@ -8350,19 +8391,19 @@ yyparse (void) } YYERROR; } -#line 8354 "parser.c" +#line 8395 "parser.c" break; case 610: /* section_name: "Identifier" */ #line 3823 "parser.y" { yyval = cb_build_section_name (yyvsp[0], 0); } -#line 8360 "parser.c" +#line 8401 "parser.c" break; case 612: /* opt_segment: "Literal" */ #line 3827 "parser.y" { /* ignore */ } -#line 8366 "parser.c" +#line 8407 "parser.c" break; case 613: /* @34: %empty */ @@ -8371,7 +8412,7 @@ yyparse (void) yyval = current_program->exec_list; current_program->exec_list = NULL; } -#line 8375 "parser.c" +#line 8416 "parser.c" break; case 614: /* @35: %empty */ @@ -8380,7 +8421,7 @@ yyparse (void) yyval = CB_TREE (current_statement); current_statement = NULL; } -#line 8384 "parser.c" +#line 8425 "parser.c" break; case 615: /* statement_list: @34 @35 statements */ @@ -8390,7 +8431,7 @@ yyparse (void) current_program->exec_list = yyvsp[-2]; current_statement = CB_STATEMENT (yyvsp[-1]); } -#line 8394 "parser.c" +#line 8435 "parser.c" break; case 616: /* statements: %empty */ @@ -8415,7 +8456,7 @@ yyparse (void) cb_cons (CB_TREE (current_paragraph), current_section->children); } } -#line 8419 "parser.c" +#line 8460 "parser.c" break; case 667: /* statement: "NEXT SENTENCE" */ @@ -8433,7 +8474,7 @@ yyparse (void) } check_unreached = 0; } -#line 8437 "parser.c" +#line 8478 "parser.c" break; case 668: /* $@36: %empty */ @@ -8445,7 +8486,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 8449 "parser.c" +#line 8490 "parser.c" break; case 670: /* accept_body: identifier opt_at_line_column opt_accp_attr on_accp_exception */ @@ -8453,7 +8494,7 @@ yyparse (void) { cb_emit_accept (yyvsp[-3], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 8457 "parser.c" +#line 8498 "parser.c" break; case 671: /* accept_body: identifier FROM ESCAPE KEY */ @@ -8461,7 +8502,7 @@ yyparse (void) { PENDING ("ACCEPT .. FROM ESCAPE KEY"); } -#line 8465 "parser.c" +#line 8506 "parser.c" break; case 672: /* accept_body: identifier FROM LINES */ @@ -8469,7 +8510,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 0); } -#line 8473 "parser.c" +#line 8514 "parser.c" break; case 673: /* accept_body: identifier FROM COLUMNS */ @@ -8477,7 +8518,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 1); } -#line 8481 "parser.c" +#line 8522 "parser.c" break; case 674: /* accept_body: identifier FROM DATE */ @@ -8485,7 +8526,7 @@ yyparse (void) { cb_emit_accept_date (yyvsp[-2]); } -#line 8489 "parser.c" +#line 8530 "parser.c" break; case 675: /* accept_body: identifier FROM DATE YYYYMMDD */ @@ -8493,7 +8534,7 @@ yyparse (void) { cb_emit_accept_date_yyyymmdd (yyvsp[-3]); } -#line 8497 "parser.c" +#line 8538 "parser.c" break; case 676: /* accept_body: identifier FROM DAY */ @@ -8501,7 +8542,7 @@ yyparse (void) { cb_emit_accept_day (yyvsp[-2]); } -#line 8505 "parser.c" +#line 8546 "parser.c" break; case 677: /* accept_body: identifier FROM DAY YYYYDDD */ @@ -8509,7 +8550,7 @@ yyparse (void) { cb_emit_accept_day_yyyyddd (yyvsp[-3]); } -#line 8513 "parser.c" +#line 8554 "parser.c" break; case 678: /* accept_body: identifier FROM "DAY-OF-WEEK" */ @@ -8517,7 +8558,7 @@ yyparse (void) { cb_emit_accept_day_of_week (yyvsp[-2]); } -#line 8521 "parser.c" +#line 8562 "parser.c" break; case 679: /* accept_body: identifier FROM TIME */ @@ -8525,7 +8566,7 @@ yyparse (void) { cb_emit_accept_time (yyvsp[-2]); } -#line 8529 "parser.c" +#line 8570 "parser.c" break; case 680: /* accept_body: identifier FROM "COMMAND-LINE" */ @@ -8533,7 +8574,7 @@ yyparse (void) { cb_emit_accept_command_line (yyvsp[-2]); } -#line 8537 "parser.c" +#line 8578 "parser.c" break; case 681: /* accept_body: identifier FROM "ENVIRONMENT-VALUE" on_accp_exception */ @@ -8541,7 +8582,7 @@ yyparse (void) { cb_emit_accept_environment (yyvsp[-3]); } -#line 8545 "parser.c" +#line 8586 "parser.c" break; case 682: /* accept_body: identifier FROM ENVIRONMENT simple_value on_accp_exception */ @@ -8549,7 +8590,7 @@ yyparse (void) { cb_emit_get_environment (yyvsp[-1], yyvsp[-4]); } -#line 8553 "parser.c" +#line 8594 "parser.c" break; case 683: /* accept_body: identifier FROM "ARGUMENT-NUMBER" */ @@ -8557,7 +8598,7 @@ yyparse (void) { cb_emit_accept_arg_number (yyvsp[-2]); } -#line 8561 "parser.c" +#line 8602 "parser.c" break; case 684: /* accept_body: identifier FROM "ARGUMENT-VALUE" on_accp_exception */ @@ -8565,7 +8606,7 @@ yyparse (void) { cb_emit_accept_arg_value (yyvsp[-3]); } -#line 8569 "parser.c" +#line 8610 "parser.c" break; case 685: /* accept_body: identifier FROM mnemonic_name */ @@ -8573,7 +8614,7 @@ yyparse (void) { cb_emit_accept_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 8577 "parser.c" +#line 8618 "parser.c" break; case 686: /* accept_body: identifier FROM "Identifier" */ @@ -8581,103 +8622,103 @@ yyparse (void) { cb_emit_accept_name (yyvsp[-2], yyvsp[0]); } -#line 8585 "parser.c" +#line 8626 "parser.c" break; case 687: /* opt_at_line_column: %empty */ #line 4033 "parser.y" { yyval = NULL; } -#line 8591 "parser.c" +#line 8632 "parser.c" break; case 688: /* opt_at_line_column: _at line_number column_number */ #line 4034 "parser.y" { yyval = cb_build_pair (yyvsp[-1], yyvsp[0]); } -#line 8597 "parser.c" +#line 8638 "parser.c" break; case 689: /* opt_at_line_column: _at column_number line_number */ #line 4035 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 8603 "parser.c" +#line 8644 "parser.c" break; case 690: /* opt_at_line_column: _at line_number */ #line 4036 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 8609 "parser.c" +#line 8650 "parser.c" break; case 691: /* opt_at_line_column: _at column_number */ #line 4037 "parser.y" { yyval = cb_build_pair (NULL, yyvsp[0]); } -#line 8615 "parser.c" +#line 8656 "parser.c" break; case 692: /* opt_at_line_column: AT simple_value */ #line 4038 "parser.y" { yyval = yyvsp[0]; } -#line 8621 "parser.c" +#line 8662 "parser.c" break; case 693: /* line_number: LINE _number id_or_lit */ #line 4042 "parser.y" { yyval = yyvsp[0]; } -#line 8627 "parser.c" +#line 8668 "parser.c" break; case 694: /* column_number: COLUMN _number id_or_lit */ #line 4046 "parser.y" { yyval = yyvsp[0]; } -#line 8633 "parser.c" +#line 8674 "parser.c" break; case 695: /* column_number: POSITION _number id_or_lit */ #line 4047 "parser.y" { yyval = yyvsp[0]; } -#line 8639 "parser.c" +#line 8680 "parser.c" break; case 700: /* accp_attr: BELL */ #line 4060 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 8645 "parser.c" +#line 8686 "parser.c" break; case 701: /* accp_attr: BLINK */ #line 4061 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 8651 "parser.c" +#line 8692 "parser.c" break; case 702: /* accp_attr: HIGHLIGHT */ #line 4062 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 8657 "parser.c" +#line 8698 "parser.c" break; case 703: /* accp_attr: LOWLIGHT */ #line 4063 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 8663 "parser.c" +#line 8704 "parser.c" break; case 704: /* accp_attr: "REVERSE-VIDEO" */ #line 4064 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 8669 "parser.c" +#line 8710 "parser.c" break; case 705: /* accp_attr: UNDERLINE */ #line 4065 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 8675 "parser.c" +#line 8716 "parser.c" break; case 706: /* accp_attr: OVERLINE */ #line 4066 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 8681 "parser.c" +#line 8722 "parser.c" break; case 707: /* accp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -8685,7 +8726,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 8689 "parser.c" +#line 8730 "parser.c" break; case 708: /* accp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -8693,7 +8734,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 8697 "parser.c" +#line 8738 "parser.c" break; case 709: /* accp_attr: SCROLL UP _opt_scroll_lines */ @@ -8701,7 +8742,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 8705 "parser.c" +#line 8746 "parser.c" break; case 710: /* accp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -8710,61 +8751,61 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 8714 "parser.c" +#line 8755 "parser.c" break; case 711: /* accp_attr: AUTO */ #line 4084 "parser.y" { dispattrs |= COB_SCREEN_AUTO; } -#line 8720 "parser.c" +#line 8761 "parser.c" break; case 712: /* accp_attr: FULL */ #line 4085 "parser.y" { dispattrs |= COB_SCREEN_FULL; } -#line 8726 "parser.c" +#line 8767 "parser.c" break; case 713: /* accp_attr: REQUIRED */ #line 4086 "parser.y" { dispattrs |= COB_SCREEN_REQUIRED; } -#line 8732 "parser.c" +#line 8773 "parser.c" break; case 714: /* accp_attr: SECURE */ #line 4087 "parser.y" { dispattrs |= COB_SCREEN_SECURE; } -#line 8738 "parser.c" +#line 8779 "parser.c" break; case 715: /* accp_attr: UPDATE */ #line 4088 "parser.y" { dispattrs |= COB_SCREEN_UPDATE; } -#line 8744 "parser.c" +#line 8785 "parser.c" break; case 716: /* accp_attr: PROMPT */ #line 4089 "parser.y" { dispattrs |= COB_SCREEN_PROMPT; } -#line 8750 "parser.c" +#line 8791 "parser.c" break; case 717: /* end_accept: %empty */ #line 4093 "parser.y" { terminator_warning (TERM_ACCEPT); } -#line 8756 "parser.c" +#line 8797 "parser.c" break; case 718: /* end_accept: "END-ACCEPT" */ #line 4094 "parser.y" { terminator_clear (TERM_ACCEPT); } -#line 8762 "parser.c" +#line 8803 "parser.c" break; case 719: /* $@37: %empty */ #line 4103 "parser.y" { BEGIN_STATEMENT ("ADD", TERM_ADD); } -#line 8768 "parser.c" +#line 8809 "parser.c" break; case 721: /* add_body: x_list TO arithmetic_x_list on_size_error */ @@ -8772,7 +8813,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '+', cb_build_binary_list (yyvsp[-3], '+')); } -#line 8776 "parser.c" +#line 8817 "parser.c" break; case 722: /* add_body: x_list add_to GIVING arithmetic_x_list on_size_error */ @@ -8780,7 +8821,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (yyvsp[-4], '+')); } -#line 8784 "parser.c" +#line 8825 "parser.c" break; case 723: /* add_body: CORRESPONDING identifier TO identifier flag_rounded on_size_error */ @@ -8788,31 +8829,31 @@ yyparse (void) { cb_emit_corresponding (cb_build_add, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 8792 "parser.c" +#line 8833 "parser.c" break; case 725: /* add_to: TO x */ #line 4124 "parser.y" { cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 8798 "parser.c" +#line 8839 "parser.c" break; case 726: /* end_add: %empty */ #line 4128 "parser.y" { terminator_warning (TERM_ADD); } -#line 8804 "parser.c" +#line 8845 "parser.c" break; case 727: /* end_add: "END-ADD" */ #line 4129 "parser.y" { terminator_clear (TERM_ADD); } -#line 8810 "parser.c" +#line 8851 "parser.c" break; case 728: /* $@38: %empty */ #line 4138 "parser.y" { BEGIN_STATEMENT ("ALLOCATE", 0); } -#line 8816 "parser.c" +#line 8857 "parser.c" break; case 730: /* allocate_body: "Identifier" flag_initialized allocate_returning */ @@ -8820,7 +8861,7 @@ yyparse (void) { cb_emit_allocate (yyvsp[-2], yyvsp[0], NULL, yyvsp[-1]); } -#line 8824 "parser.c" +#line 8865 "parser.c" break; case 731: /* allocate_body: expr CHARACTERS flag_initialized RETURNING target_x */ @@ -8828,19 +8869,19 @@ yyparse (void) { cb_emit_allocate (NULL, yyvsp[0], yyvsp[-4], yyvsp[-2]); } -#line 8832 "parser.c" +#line 8873 "parser.c" break; case 732: /* allocate_returning: %empty */ #line 4154 "parser.y" { yyval = NULL; } -#line 8838 "parser.c" +#line 8879 "parser.c" break; case 733: /* allocate_returning: RETURNING target_x */ #line 4155 "parser.y" { yyval = yyvsp[0]; } -#line 8844 "parser.c" +#line 8885 "parser.c" break; case 734: /* alter_statement: ALTER alter_options */ @@ -8848,13 +8889,13 @@ yyparse (void) { cb_error (_("ALTER statement is obsolete and unsupported")); } -#line 8852 "parser.c" +#line 8893 "parser.c" break; case 739: /* $@39: %empty */ #line 4183 "parser.y" { BEGIN_STATEMENT ("CALL", TERM_CALL); } -#line 8858 "parser.c" +#line 8899 "parser.c" break; case 740: /* call_statement: CALL $@39 id_or_lit_or_func call_using call_returning call_on_exception call_not_on_exception end_call */ @@ -8862,13 +8903,13 @@ yyparse (void) { cb_emit_call (yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1]); } -#line 8866 "parser.c" +#line 8907 "parser.c" break; case 741: /* call_using: %empty */ #line 4193 "parser.y" { yyval = NULL; } -#line 8872 "parser.c" +#line 8913 "parser.c" break; case 742: /* $@40: %empty */ @@ -8877,25 +8918,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8881 "parser.c" +#line 8922 "parser.c" break; case 743: /* call_using: USING $@40 call_param_list */ #line 4199 "parser.y" { yyval = yyvsp[0]; } -#line 8887 "parser.c" +#line 8928 "parser.c" break; case 744: /* call_param_list: call_param */ #line 4203 "parser.y" { yyval = yyvsp[0]; } -#line 8893 "parser.c" +#line 8934 "parser.c" break; case 745: /* call_param_list: call_param_list call_param */ #line 4205 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8899 "parser.c" +#line 8940 "parser.c" break; case 746: /* call_param: call_type OMITTED */ @@ -8906,7 +8947,7 @@ yyparse (void) } yyval = cb_build_pair (cb_int (call_mode), cb_null); } -#line 8910 "parser.c" +#line 8951 "parser.c" break; case 747: /* call_param: call_type size_optional x */ @@ -8915,7 +8956,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), yyvsp[0]); CB_SIZES (yyval) = size_mode; } -#line 8919 "parser.c" +#line 8960 "parser.c" break; case 749: /* call_type: _by REFERENCE */ @@ -8923,7 +8964,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8927 "parser.c" +#line 8968 "parser.c" break; case 750: /* call_type: _by CONTENT */ @@ -8935,7 +8976,7 @@ yyparse (void) call_mode = CB_CALL_BY_CONTENT; } } -#line 8939 "parser.c" +#line 8980 "parser.c" break; case 751: /* call_type: _by VALUE */ @@ -8947,25 +8988,25 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8951 "parser.c" +#line 8992 "parser.c" break; case 752: /* call_returning: %empty */ #line 4248 "parser.y" { yyval = NULL; } -#line 8957 "parser.c" +#line 8998 "parser.c" break; case 753: /* call_returning: RETURNING identifier */ #line 4249 "parser.y" { yyval = yyvsp[0]; } -#line 8963 "parser.c" +#line 9004 "parser.c" break; case 754: /* call_returning: GIVING identifier */ #line 4250 "parser.y" { yyval = yyvsp[0]; } -#line 8969 "parser.c" +#line 9010 "parser.c" break; case 755: /* call_on_exception: %empty */ @@ -8973,7 +9014,7 @@ yyparse (void) { yyval = NULL; } -#line 8977 "parser.c" +#line 9018 "parser.c" break; case 756: /* $@41: %empty */ @@ -8981,7 +9022,7 @@ yyparse (void) { check_unreached = 0; } -#line 8985 "parser.c" +#line 9026 "parser.c" break; case 757: /* call_on_exception: exception_or_overflow $@41 statement_list */ @@ -8989,7 +9030,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 8993 "parser.c" +#line 9034 "parser.c" break; case 758: /* call_not_on_exception: %empty */ @@ -8997,7 +9038,7 @@ yyparse (void) { yyval = NULL; } -#line 9001 "parser.c" +#line 9042 "parser.c" break; case 759: /* $@42: %empty */ @@ -9005,7 +9046,7 @@ yyparse (void) { check_unreached = 0; } -#line 9009 "parser.c" +#line 9050 "parser.c" break; case 760: /* call_not_on_exception: not_exception_or_overflow $@42 statement_list */ @@ -9013,25 +9054,25 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 9017 "parser.c" +#line 9058 "parser.c" break; case 761: /* end_call: %empty */ #line 4284 "parser.y" { terminator_warning (TERM_CALL); } -#line 9023 "parser.c" +#line 9064 "parser.c" break; case 762: /* end_call: "END-CALL" */ #line 4285 "parser.y" { terminator_clear (TERM_CALL); } -#line 9029 "parser.c" +#line 9070 "parser.c" break; case 763: /* $@43: %empty */ #line 4294 "parser.y" { BEGIN_STATEMENT ("CANCEL", 0); } -#line 9035 "parser.c" +#line 9076 "parser.c" break; case 766: /* cancel_list: cancel_list id_or_lit */ @@ -9039,7 +9080,7 @@ yyparse (void) { cb_emit_cancel (yyvsp[0]); } -#line 9043 "parser.c" +#line 9084 "parser.c" break; case 767: /* cancel_list: ALL */ @@ -9047,13 +9088,13 @@ yyparse (void) { cb_emit_cancel_all (); } -#line 9051 "parser.c" +#line 9092 "parser.c" break; case 768: /* $@44: %empty */ #line 4315 "parser.y" { BEGIN_STATEMENT ("CLOSE", 0); } -#line 9057 "parser.c" +#line 9098 "parser.c" break; case 771: /* close_list: close_list file_name close_option */ @@ -9064,43 +9105,43 @@ yyparse (void) cb_emit_close (yyvsp[-1], yyvsp[0]); } } -#line 9068 "parser.c" +#line 9109 "parser.c" break; case 772: /* close_option: %empty */ #line 4331 "parser.y" { yyval = cb_int (COB_CLOSE_NORMAL); } -#line 9074 "parser.c" +#line 9115 "parser.c" break; case 773: /* close_option: reel_or_unit */ #line 4332 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT); } -#line 9080 "parser.c" +#line 9121 "parser.c" break; case 774: /* close_option: reel_or_unit _for REMOVAL */ #line 4333 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT_REMOVAL); } -#line 9086 "parser.c" +#line 9127 "parser.c" break; case 775: /* close_option: _with NO REWIND */ #line 4334 "parser.y" { yyval = cb_int (COB_CLOSE_NO_REWIND); } -#line 9092 "parser.c" +#line 9133 "parser.c" break; case 776: /* close_option: _with LOCK */ #line 4335 "parser.y" { yyval = cb_int (COB_CLOSE_LOCK); } -#line 9098 "parser.c" +#line 9139 "parser.c" break; case 779: /* $@45: %empty */ #line 4346 "parser.y" { BEGIN_STATEMENT ("COMPUTE", TERM_COMPUTE); } -#line 9104 "parser.c" +#line 9145 "parser.c" break; case 781: /* compute_body: arithmetic_x_list comp_equal expr on_size_error */ @@ -9108,19 +9149,19 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-3], 0, yyvsp[-1]); } -#line 9112 "parser.c" +#line 9153 "parser.c" break; case 782: /* end_compute: %empty */ #line 4359 "parser.y" { terminator_warning (TERM_COMPUTE); } -#line 9118 "parser.c" +#line 9159 "parser.c" break; case 783: /* end_compute: "END-COMPUTE" */ #line 4360 "parser.y" { terminator_clear (TERM_COMPUTE); } -#line 9124 "parser.c" +#line 9165 "parser.c" break; case 786: /* commit_statement: COMMIT */ @@ -9129,7 +9170,7 @@ yyparse (void) BEGIN_STATEMENT ("COMMIT", 0); cb_emit_commit (); } -#line 9133 "parser.c" +#line 9174 "parser.c" break; case 787: /* continue_statement: CONTINUE */ @@ -9138,13 +9179,13 @@ yyparse (void) BEGIN_STATEMENT ("CONTINUE", 0); cb_emit_continue (); } -#line 9142 "parser.c" +#line 9183 "parser.c" break; case 788: /* $@46: %empty */ #line 4396 "parser.y" { BEGIN_STATEMENT ("DELETE", TERM_DELETE); } -#line 9148 "parser.c" +#line 9189 "parser.c" break; case 789: /* delete_statement: DELETE $@46 file_name _record opt_invalid_key end_delete */ @@ -9154,25 +9195,25 @@ yyparse (void) cb_emit_delete (yyvsp[-3]); } } -#line 9158 "parser.c" +#line 9199 "parser.c" break; case 790: /* end_delete: %empty */ #line 4407 "parser.y" { terminator_warning (TERM_DELETE); } -#line 9164 "parser.c" +#line 9205 "parser.c" break; case 791: /* end_delete: "END-DELETE" */ #line 4408 "parser.y" { terminator_clear (TERM_DELETE); } -#line 9170 "parser.c" +#line 9211 "parser.c" break; case 792: /* $@47: %empty */ #line 4417 "parser.y" { BEGIN_STATEMENT ("DELETE-FILE", 0); } -#line 9176 "parser.c" +#line 9217 "parser.c" break; case 793: /* delete_file_statement: DELETE $@47 "FILE" file_name_list */ @@ -9186,7 +9227,7 @@ yyparse (void) } } } -#line 9190 "parser.c" +#line 9231 "parser.c" break; case 794: /* $@48: %empty */ @@ -9198,7 +9239,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 9202 "parser.c" +#line 9243 "parser.c" break; case 796: /* display_body: id_or_lit "UPON ENVIRONMENT-NAME" on_disp_exception */ @@ -9206,7 +9247,7 @@ yyparse (void) { cb_emit_env_name (yyvsp[-2]); } -#line 9210 "parser.c" +#line 9251 "parser.c" break; case 797: /* display_body: id_or_lit "UPON ENVIRONMENT-VALUE" on_disp_exception */ @@ -9214,7 +9255,7 @@ yyparse (void) { cb_emit_env_value (yyvsp[-2]); } -#line 9218 "parser.c" +#line 9259 "parser.c" break; case 798: /* display_body: id_or_lit "UPON ARGUMENT-NUMBER" on_disp_exception */ @@ -9222,7 +9263,7 @@ yyparse (void) { cb_emit_arg_number (yyvsp[-2]); } -#line 9226 "parser.c" +#line 9267 "parser.c" break; case 799: /* display_body: id_or_lit "UPON COMMAND-LINE" on_disp_exception */ @@ -9230,7 +9271,7 @@ yyparse (void) { cb_emit_command_line (yyvsp[-2]); } -#line 9234 "parser.c" +#line 9275 "parser.c" break; case 800: /* display_body: x_list opt_at_line_column with_clause on_disp_exception */ @@ -9238,7 +9279,7 @@ yyparse (void) { cb_emit_display (yyvsp[-3], cb_int0, yyvsp[-1], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 9242 "parser.c" +#line 9283 "parser.c" break; case 801: /* display_body: x_list opt_at_line_column UPON mnemonic_name with_clause on_disp_exception */ @@ -9246,7 +9287,7 @@ yyparse (void) { cb_emit_display_mnemonic (yyvsp[-5], yyvsp[-2], yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9250 "parser.c" +#line 9291 "parser.c" break; case 802: /* display_body: x_list opt_at_line_column UPON "Identifier" with_clause on_disp_exception */ @@ -9255,7 +9296,7 @@ yyparse (void) cb_tree word = cb_build_display_upon_direct (yyvsp[-2]); cb_emit_display (yyvsp[-5], word, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9259 "parser.c" +#line 9300 "parser.c" break; case 803: /* display_body: x_list opt_at_line_column UPON PRINTER with_clause on_disp_exception */ @@ -9263,7 +9304,7 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9267 "parser.c" +#line 9308 "parser.c" break; case 804: /* display_body: x_list opt_at_line_column UPON CRT with_clause on_disp_exception */ @@ -9271,79 +9312,79 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9275 "parser.c" +#line 9316 "parser.c" break; case 805: /* with_clause: %empty */ #line 4489 "parser.y" { yyval = cb_int1; } -#line 9281 "parser.c" +#line 9322 "parser.c" break; case 806: /* with_clause: _with "NO ADVANCING" */ #line 4490 "parser.y" { yyval = cb_int0; } -#line 9287 "parser.c" +#line 9328 "parser.c" break; case 807: /* with_clause: WITH disp_attrs */ #line 4491 "parser.y" { yyval = cb_int1; } -#line 9293 "parser.c" +#line 9334 "parser.c" break; case 810: /* disp_attr: BELL */ #line 4501 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 9299 "parser.c" +#line 9340 "parser.c" break; case 811: /* disp_attr: BLINK */ #line 4502 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 9305 "parser.c" +#line 9346 "parser.c" break; case 812: /* disp_attr: ERASE EOL */ #line 4503 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOL; } -#line 9311 "parser.c" +#line 9352 "parser.c" break; case 813: /* disp_attr: ERASE EOS */ #line 4504 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOS; } -#line 9317 "parser.c" +#line 9358 "parser.c" break; case 814: /* disp_attr: HIGHLIGHT */ #line 4505 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 9323 "parser.c" +#line 9364 "parser.c" break; case 815: /* disp_attr: LOWLIGHT */ #line 4506 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 9329 "parser.c" +#line 9370 "parser.c" break; case 816: /* disp_attr: "REVERSE-VIDEO" */ #line 4507 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 9335 "parser.c" +#line 9376 "parser.c" break; case 817: /* disp_attr: UNDERLINE */ #line 4508 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 9341 "parser.c" +#line 9382 "parser.c" break; case 818: /* disp_attr: OVERLINE */ #line 4509 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 9347 "parser.c" +#line 9388 "parser.c" break; case 819: /* disp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -9351,7 +9392,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 9355 "parser.c" +#line 9396 "parser.c" break; case 820: /* disp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -9359,7 +9400,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 9363 "parser.c" +#line 9404 "parser.c" break; case 821: /* disp_attr: SCROLL UP _opt_scroll_lines */ @@ -9367,7 +9408,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 9371 "parser.c" +#line 9412 "parser.c" break; case 822: /* disp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -9376,37 +9417,37 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 9380 "parser.c" +#line 9421 "parser.c" break; case 823: /* disp_attr: "BLANK-LINE" */ #line 4527 "parser.y" { dispattrs |= COB_SCREEN_BLANK_LINE; } -#line 9386 "parser.c" +#line 9427 "parser.c" break; case 824: /* disp_attr: "BLANK-SCREEN" */ #line 4528 "parser.y" { dispattrs |= COB_SCREEN_BLANK_SCREEN; } -#line 9392 "parser.c" +#line 9433 "parser.c" break; case 825: /* end_display: %empty */ #line 4532 "parser.y" { terminator_warning (TERM_DISPLAY); } -#line 9398 "parser.c" +#line 9439 "parser.c" break; case 826: /* end_display: "END-DISPLAY" */ #line 4533 "parser.y" { terminator_clear (TERM_DISPLAY); } -#line 9404 "parser.c" +#line 9445 "parser.c" break; case 827: /* $@49: %empty */ #line 4542 "parser.y" { BEGIN_STATEMENT ("DIVIDE", TERM_DIVIDE); } -#line 9410 "parser.c" +#line 9451 "parser.c" break; case 829: /* divide_body: x INTO arithmetic_x_list on_size_error */ @@ -9414,7 +9455,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '/', yyvsp[-3]); } -#line 9418 "parser.c" +#line 9459 "parser.c" break; case 830: /* divide_body: x INTO x GIVING arithmetic_x_list on_size_error */ @@ -9422,7 +9463,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-3], '/', yyvsp[-5])); } -#line 9426 "parser.c" +#line 9467 "parser.c" break; case 831: /* divide_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -9430,7 +9471,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '/', yyvsp[-3])); } -#line 9434 "parser.c" +#line 9475 "parser.c" break; case 832: /* divide_body: x INTO x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9438,7 +9479,7 @@ yyparse (void) { cb_emit_divide (yyvsp[-5], yyvsp[-7], yyvsp[-3], yyvsp[-1]); } -#line 9442 "parser.c" +#line 9483 "parser.c" break; case 833: /* divide_body: x BY x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9446,25 +9487,25 @@ yyparse (void) { cb_emit_divide (yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); } -#line 9450 "parser.c" +#line 9491 "parser.c" break; case 834: /* end_divide: %empty */ #line 4571 "parser.y" { terminator_warning (TERM_DIVIDE); } -#line 9456 "parser.c" +#line 9497 "parser.c" break; case 835: /* end_divide: "END-DIVIDE" */ #line 4572 "parser.y" { terminator_clear (TERM_DIVIDE); } -#line 9462 "parser.c" +#line 9503 "parser.c" break; case 836: /* $@50: %empty */ #line 4581 "parser.y" { BEGIN_STATEMENT ("ENTRY", 0); } -#line 9468 "parser.c" +#line 9509 "parser.c" break; case 837: /* entry_statement: ENTRY $@50 "Literal" call_using */ @@ -9480,7 +9521,7 @@ yyparse (void) } check_unreached = 0; } -#line 9484 "parser.c" +#line 9525 "parser.c" break; case 838: /* $@51: %empty */ @@ -9494,7 +9535,7 @@ yyparse (void) eval_inc = 0; eval_inc2 = 0; } -#line 9498 "parser.c" +#line 9539 "parser.c" break; case 839: /* evaluate_statement: EVALUATE $@51 evaluate_subject_list evaluate_condition_list end_evaluate */ @@ -9503,13 +9544,13 @@ yyparse (void) cb_emit_evaluate (yyvsp[-2], yyvsp[-1]); eval_level--; } -#line 9507 "parser.c" +#line 9548 "parser.c" break; case 840: /* evaluate_subject_list: evaluate_subject */ #line 4621 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9513 "parser.c" +#line 9554 "parser.c" break; case 841: /* evaluate_subject_list: evaluate_subject_list _also evaluate_subject */ @@ -9520,7 +9561,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9524 "parser.c" +#line 9565 "parser.c" break; case 842: /* evaluate_subject: expr */ @@ -9533,7 +9574,7 @@ yyparse (void) eval_check[eval_level][eval_inc++] = 1; } } -#line 9537 "parser.c" +#line 9578 "parser.c" break; case 843: /* evaluate_subject: "TRUE" */ @@ -9542,7 +9583,7 @@ yyparse (void) yyval = cb_true; eval_check[eval_level][eval_inc++] = 2; } -#line 9546 "parser.c" +#line 9587 "parser.c" break; case 844: /* evaluate_subject: "FALSE" */ @@ -9551,7 +9592,7 @@ yyparse (void) yyval = cb_false; eval_check[eval_level][eval_inc++] = 3; } -#line 9555 "parser.c" +#line 9596 "parser.c" break; case 845: /* evaluate_condition_list: evaluate_case_list evaluate_other */ @@ -9581,19 +9622,19 @@ yyparse (void) yyval = cb_list_add (yyval, yyvsp[0]); } } -#line 9585 "parser.c" +#line 9626 "parser.c" break; case 846: /* evaluate_case_list: evaluate_case */ #line 4684 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9591 "parser.c" +#line 9632 "parser.c" break; case 847: /* evaluate_case_list: evaluate_case_list evaluate_case */ #line 4686 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 9597 "parser.c" +#line 9638 "parser.c" break; case 848: /* $@52: %empty */ @@ -9601,7 +9642,7 @@ yyparse (void) { check_unreached = 0; } -#line 9605 "parser.c" +#line 9646 "parser.c" break; case 849: /* evaluate_case: evaluate_when_list $@52 statement_list */ @@ -9613,7 +9654,7 @@ yyparse (void) yyval = cb_cons (yyvsp[0], yyvsp[-2]); eval_inc2 = 0; } -#line 9617 "parser.c" +#line 9658 "parser.c" break; case 850: /* evaluate_other: %empty */ @@ -9621,7 +9662,7 @@ yyparse (void) { yyval = NULL; } -#line 9625 "parser.c" +#line 9666 "parser.c" break; case 851: /* $@53: %empty */ @@ -9629,7 +9670,7 @@ yyparse (void) { check_unreached = 0; } -#line 9633 "parser.c" +#line 9674 "parser.c" break; case 852: /* evaluate_other: "WHEN OTHER" $@53 statement_list */ @@ -9641,25 +9682,25 @@ yyparse (void) yyval = cb_cons (yyvsp[0], NULL); eval_inc2 = 0; } -#line 9645 "parser.c" +#line 9686 "parser.c" break; case 853: /* evaluate_when_list: WHEN evaluate_object_list */ #line 4724 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9651 "parser.c" +#line 9692 "parser.c" break; case 854: /* evaluate_when_list: evaluate_when_list WHEN evaluate_object_list */ #line 4726 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9657 "parser.c" +#line 9698 "parser.c" break; case 855: /* evaluate_object_list: evaluate_object */ #line 4730 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9663 "parser.c" +#line 9704 "parser.c" break; case 856: /* evaluate_object_list: evaluate_object_list _also evaluate_object */ @@ -9670,7 +9711,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9674 "parser.c" +#line 9715 "parser.c" break; case 857: /* evaluate_object: partial_expr opt_evaluate_thru_expr */ @@ -9703,61 +9744,61 @@ yyparse (void) eval_inc2++; } } -#line 9707 "parser.c" +#line 9748 "parser.c" break; case 858: /* evaluate_object: ANY */ #line 4771 "parser.y" { yyval = cb_any; eval_inc2++; } -#line 9713 "parser.c" +#line 9754 "parser.c" break; case 859: /* evaluate_object: "TRUE" */ #line 4772 "parser.y" { yyval = cb_true; eval_inc2++; } -#line 9719 "parser.c" +#line 9760 "parser.c" break; case 860: /* evaluate_object: "FALSE" */ #line 4773 "parser.y" { yyval = cb_false; eval_inc2++; } -#line 9725 "parser.c" +#line 9766 "parser.c" break; case 861: /* opt_evaluate_thru_expr: %empty */ #line 4776 "parser.y" { yyval = NULL; } -#line 9731 "parser.c" +#line 9772 "parser.c" break; case 862: /* opt_evaluate_thru_expr: THRU expr */ #line 4777 "parser.y" { yyval = yyvsp[0]; } -#line 9737 "parser.c" +#line 9778 "parser.c" break; case 863: /* end_evaluate: %empty */ #line 4781 "parser.y" { terminator_warning (TERM_EVALUATE); } -#line 9743 "parser.c" +#line 9784 "parser.c" break; case 864: /* end_evaluate: "END-EVALUATE" */ #line 4782 "parser.y" { terminator_clear (TERM_EVALUATE); } -#line 9749 "parser.c" +#line 9790 "parser.c" break; case 865: /* $@54: %empty */ #line 4791 "parser.y" { BEGIN_STATEMENT ("EXIT", 0); } -#line 9755 "parser.c" +#line 9796 "parser.c" break; case 867: /* exit_body: %empty */ #line 4796 "parser.y" { /* nothing */ } -#line 9761 "parser.c" +#line 9802 "parser.c" break; case 868: /* exit_body: PROGRAM */ @@ -9769,7 +9810,7 @@ yyparse (void) check_unreached = 1; cb_emit_exit (0); } -#line 9773 "parser.c" +#line 9814 "parser.c" break; case 869: /* exit_body: PERFORM */ @@ -9781,7 +9822,7 @@ yyparse (void) cb_emit_java_break (); } } -#line 9785 "parser.c" +#line 9826 "parser.c" break; case 870: /* exit_body: PERFORM CYCLE */ @@ -9793,7 +9834,7 @@ yyparse (void) cb_emit_java_continue (); } } -#line 9797 "parser.c" +#line 9838 "parser.c" break; case 871: /* exit_body: SECTION */ @@ -9815,7 +9856,7 @@ yyparse (void) cb_emit_goto (cb_list_init (current_section->exit_label_ref), NULL); } } -#line 9819 "parser.c" +#line 9860 "parser.c" break; case 872: /* exit_body: PARAGRAPH */ @@ -9837,13 +9878,13 @@ yyparse (void) cb_emit_goto (cb_list_init (current_paragraph->exit_label_ref), NULL); } } -#line 9841 "parser.c" +#line 9882 "parser.c" break; case 873: /* $@55: %empty */ #line 4864 "parser.y" { BEGIN_STATEMENT ("FREE", 0); } -#line 9847 "parser.c" +#line 9888 "parser.c" break; case 874: /* free_statement: FREE $@55 target_x_list */ @@ -9851,13 +9892,13 @@ yyparse (void) { cb_emit_free (yyvsp[0]); } -#line 9855 "parser.c" +#line 9896 "parser.c" break; case 875: /* $@56: %empty */ #line 4877 "parser.y" { BEGIN_STATEMENT ("GENERATE", 0); } -#line 9861 "parser.c" +#line 9902 "parser.c" break; case 876: /* generate_statement: GENERATE $@56 identifier */ @@ -9865,13 +9906,13 @@ yyparse (void) { PENDING("GENERATE"); } -#line 9869 "parser.c" +#line 9910 "parser.c" break; case 877: /* $@57: %empty */ #line 4890 "parser.y" { BEGIN_STATEMENT ("GO TO", 0); } -#line 9875 "parser.c" +#line 9916 "parser.c" break; case 878: /* goto_statement: GO _to $@57 procedure_name_list goto_depending */ @@ -9879,7 +9920,7 @@ yyparse (void) { cb_emit_goto (yyvsp[-1], yyvsp[0]); } -#line 9883 "parser.c" +#line 9924 "parser.c" break; case 879: /* goto_depending: %empty */ @@ -9888,7 +9929,7 @@ yyparse (void) check_unreached = 1; yyval = NULL; } -#line 9892 "parser.c" +#line 9933 "parser.c" break; case 880: /* goto_depending: DEPENDING _on identifier */ @@ -9897,13 +9938,13 @@ yyparse (void) check_unreached = 0; yyval = yyvsp[0]; } -#line 9901 "parser.c" +#line 9942 "parser.c" break; case 881: /* $@58: %empty */ #line 4916 "parser.y" { BEGIN_STATEMENT ("GOBACK", 0); } -#line 9907 "parser.c" +#line 9948 "parser.c" break; case 882: /* goback_statement: GOBACK $@58 */ @@ -9912,13 +9953,13 @@ yyparse (void) check_unreached = 1; cb_emit_exit (1); } -#line 9916 "parser.c" +#line 9957 "parser.c" break; case 883: /* $@59: %empty */ #line 4929 "parser.y" { BEGIN_STATEMENT ("IF", TERM_IF); } -#line 9922 "parser.c" +#line 9963 "parser.c" break; case 884: /* $@60: %empty */ @@ -9926,7 +9967,7 @@ yyparse (void) { check_unreached = 0; } -#line 9930 "parser.c" +#line 9971 "parser.c" break; case 885: /* if_statement: IF $@59 condition _then $@60 statement_list if_else_sentence end_if */ @@ -9937,7 +9978,7 @@ yyparse (void) } cb_emit_if (yyvsp[-5], yyvsp[-2], yyvsp[-1]); } -#line 9941 "parser.c" +#line 9982 "parser.c" break; case 887: /* if_else_sentence: %empty */ @@ -9945,7 +9986,7 @@ yyparse (void) { yyval = NULL; } -#line 9949 "parser.c" +#line 9990 "parser.c" break; case 888: /* $@61: %empty */ @@ -9953,7 +9994,7 @@ yyparse (void) { check_unreached = 0; } -#line 9957 "parser.c" +#line 9998 "parser.c" break; case 889: /* if_else_sentence: ELSE $@61 statement_list */ @@ -9964,25 +10005,25 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 9968 "parser.c" +#line 10009 "parser.c" break; case 890: /* end_if: %empty */ #line 4964 "parser.y" { terminator_warning (TERM_IF); } -#line 9974 "parser.c" +#line 10015 "parser.c" break; case 891: /* end_if: "END-IF" */ #line 4965 "parser.y" { terminator_clear (TERM_IF); } -#line 9980 "parser.c" +#line 10021 "parser.c" break; case 892: /* $@62: %empty */ #line 4974 "parser.y" { BEGIN_STATEMENT ("INITIALIZE", 0); } -#line 9986 "parser.c" +#line 10027 "parser.c" break; case 893: /* initialize_statement: INITIALIZE $@62 target_x_list initialize_filler initialize_value initialize_replacing initialize_default */ @@ -9990,127 +10031,127 @@ yyparse (void) { cb_emit_initialize (yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 9994 "parser.c" +#line 10035 "parser.c" break; case 894: /* initialize_filler: %empty */ #line 4982 "parser.y" { yyval = NULL; } -#line 10000 "parser.c" +#line 10041 "parser.c" break; case 895: /* initialize_filler: _with FILLER */ #line 4983 "parser.y" { yyval = cb_true; } -#line 10006 "parser.c" +#line 10047 "parser.c" break; case 896: /* initialize_value: %empty */ #line 4987 "parser.y" { yyval = NULL; } -#line 10012 "parser.c" +#line 10053 "parser.c" break; case 897: /* initialize_value: ALL _to VALUE */ #line 4988 "parser.y" { yyval = cb_true; } -#line 10018 "parser.c" +#line 10059 "parser.c" break; case 898: /* initialize_value: initialize_category _to VALUE */ #line 4989 "parser.y" { yyval = yyvsp[-2]; } -#line 10024 "parser.c" +#line 10065 "parser.c" break; case 899: /* initialize_replacing: %empty */ #line 4993 "parser.y" { yyval = NULL; } -#line 10030 "parser.c" +#line 10071 "parser.c" break; case 900: /* initialize_replacing: REPLACING initialize_replacing_list */ #line 4995 "parser.y" { yyval = yyvsp[0]; } -#line 10036 "parser.c" +#line 10077 "parser.c" break; case 901: /* initialize_replacing_list: initialize_replacing_item */ #line 4999 "parser.y" { yyval = yyvsp[0]; } -#line 10042 "parser.c" +#line 10083 "parser.c" break; case 902: /* initialize_replacing_list: initialize_replacing_list initialize_replacing_item */ #line 5001 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10048 "parser.c" +#line 10089 "parser.c" break; case 903: /* initialize_replacing_item: initialize_category _data BY x */ #line 5005 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[0]); } -#line 10054 "parser.c" +#line 10095 "parser.c" break; case 904: /* initialize_category: ALPHABETIC */ #line 5009 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHABETIC); } -#line 10060 "parser.c" +#line 10101 "parser.c" break; case 905: /* initialize_category: ALPHANUMERIC */ #line 5010 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC); } -#line 10066 "parser.c" +#line 10107 "parser.c" break; case 906: /* initialize_category: NUMERIC */ #line 5011 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC); } -#line 10072 "parser.c" +#line 10113 "parser.c" break; case 907: /* initialize_category: "ALPHANUMERIC-EDITED" */ #line 5012 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC_EDITED); } -#line 10078 "parser.c" +#line 10119 "parser.c" break; case 908: /* initialize_category: "NUMERIC-EDITED" */ #line 5013 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC_EDITED); } -#line 10084 "parser.c" +#line 10125 "parser.c" break; case 909: /* initialize_category: NATIONAL */ #line 5014 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL); } -#line 10090 "parser.c" +#line 10131 "parser.c" break; case 910: /* initialize_category: "NATIONAL-EDITED" */ #line 5015 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL_EDITED); } -#line 10096 "parser.c" +#line 10137 "parser.c" break; case 911: /* initialize_default: %empty */ #line 5019 "parser.y" { yyval = NULL; } -#line 10102 "parser.c" +#line 10143 "parser.c" break; case 912: /* initialize_default: DEFAULT */ #line 5020 "parser.y" { yyval = cb_true; } -#line 10108 "parser.c" +#line 10149 "parser.c" break; case 913: /* $@63: %empty */ #line 5029 "parser.y" { BEGIN_STATEMENT ("INITIATE", 0); } -#line 10114 "parser.c" +#line 10155 "parser.c" break; case 914: /* initiate_statement: INITIATE $@63 identifier_list */ @@ -10118,7 +10159,7 @@ yyparse (void) { PENDING("INITIATE"); } -#line 10122 "parser.c" +#line 10163 "parser.c" break; case 915: /* $@64: %empty */ @@ -10128,121 +10169,121 @@ yyparse (void) sending_id = 0; inspect_keyword = 0; } -#line 10132 "parser.c" +#line 10173 "parser.c" break; case 917: /* send_identifier: identifier */ #line 5051 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 0; } -#line 10138 "parser.c" +#line 10179 "parser.c" break; case 918: /* send_identifier: literal */ #line 5052 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10144 "parser.c" +#line 10185 "parser.c" break; case 919: /* send_identifier: function */ #line 5053 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10150 "parser.c" +#line 10191 "parser.c" break; case 922: /* inspect_item: inspect_tallying */ #line 5062 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 0); } -#line 10156 "parser.c" +#line 10197 "parser.c" break; case 923: /* inspect_item: inspect_replacing */ #line 5063 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int1, 1); } -#line 10162 "parser.c" +#line 10203 "parser.c" break; case 924: /* inspect_item: inspect_converting */ #line 5064 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 2); } -#line 10168 "parser.c" +#line 10209 "parser.c" break; case 925: /* $@65: %empty */ #line 5070 "parser.y" { cb_init_tarrying (); } -#line 10174 "parser.c" +#line 10215 "parser.c" break; case 926: /* inspect_tallying: TALLYING $@65 tallying_list */ #line 5071 "parser.y" { yyval = yyvsp[0]; } -#line 10180 "parser.c" +#line 10221 "parser.c" break; case 927: /* tallying_list: tallying_item */ #line 5075 "parser.y" { yyval = yyvsp[0]; } -#line 10186 "parser.c" +#line 10227 "parser.c" break; case 928: /* tallying_list: tallying_list tallying_item */ #line 5076 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10192 "parser.c" +#line 10233 "parser.c" break; case 929: /* tallying_item: simple_value FOR */ #line 5080 "parser.y" { yyval = cb_build_tarrying_data (yyvsp[-1]); } -#line 10198 "parser.c" +#line 10239 "parser.c" break; case 930: /* tallying_item: CHARACTERS inspect_region */ #line 5081 "parser.y" { yyval = cb_build_tarrying_characters (yyvsp[0]); } -#line 10204 "parser.c" +#line 10245 "parser.c" break; case 931: /* tallying_item: ALL */ #line 5082 "parser.y" { yyval = cb_build_tarrying_all (); } -#line 10210 "parser.c" +#line 10251 "parser.c" break; case 932: /* tallying_item: LEADING */ #line 5083 "parser.y" { yyval = cb_build_tarrying_leading (); } -#line 10216 "parser.c" +#line 10257 "parser.c" break; case 933: /* tallying_item: TRAILING */ #line 5084 "parser.y" { yyval = cb_build_tarrying_trailing (); } -#line 10222 "parser.c" +#line 10263 "parser.c" break; case 934: /* tallying_item: simple_value inspect_region */ #line 5085 "parser.y" { yyval = cb_build_tarrying_value (yyvsp[-1], yyvsp[0]); } -#line 10228 "parser.c" +#line 10269 "parser.c" break; case 935: /* inspect_replacing: REPLACING replacing_list */ #line 5091 "parser.y" { yyval = yyvsp[0]; inspect_keyword = 0; } -#line 10234 "parser.c" +#line 10275 "parser.c" break; case 936: /* replacing_list: replacing_item */ #line 5095 "parser.y" { yyval = yyvsp[0]; } -#line 10240 "parser.c" +#line 10281 "parser.c" break; case 937: /* replacing_list: replacing_list replacing_item */ #line 5096 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10246 "parser.c" +#line 10287 "parser.c" break; case 938: /* replacing_item: CHARACTERS BY simple_value inspect_region */ @@ -10251,43 +10292,43 @@ yyparse (void) yyval = cb_build_replacing_characters (yyvsp[-1], yyvsp[0], save_tree_1); inspect_keyword = 0; } -#line 10255 "parser.c" +#line 10296 "parser.c" break; case 939: /* replacing_item: rep_keyword replacing_region */ #line 5105 "parser.y" { yyval = yyvsp[0]; } -#line 10261 "parser.c" +#line 10302 "parser.c" break; case 940: /* rep_keyword: %empty */ #line 5109 "parser.y" { /* Nothing */ } -#line 10267 "parser.c" +#line 10308 "parser.c" break; case 941: /* rep_keyword: ALL */ #line 5110 "parser.y" { inspect_keyword = 1; } -#line 10273 "parser.c" +#line 10314 "parser.c" break; case 942: /* rep_keyword: LEADING */ #line 5111 "parser.y" { inspect_keyword = 2; } -#line 10279 "parser.c" +#line 10320 "parser.c" break; case 943: /* rep_keyword: FIRST */ #line 5112 "parser.y" { inspect_keyword = 3; } -#line 10285 "parser.c" +#line 10326 "parser.c" break; case 944: /* rep_keyword: TRAILING */ #line 5113 "parser.y" { inspect_keyword = 4; } -#line 10291 "parser.c" +#line 10332 "parser.c" break; case 945: /* replacing_region: simple_value BY simple_all_value inspect_region */ @@ -10312,7 +10353,7 @@ yyparse (void) break; } } -#line 10316 "parser.c" +#line 10357 "parser.c" break; case 946: /* inspect_converting: CONVERTING simple_value TO simple_all_value inspect_region */ @@ -10324,31 +10365,31 @@ yyparse (void) yyval = cb_build_converting (yyvsp[-3], yyvsp[-1], yyvsp[0]); } } -#line 10328 "parser.c" +#line 10369 "parser.c" break; case 947: /* inspect_region: %empty */ #line 5156 "parser.y" { yyval = cb_build_inspect_region_start (); } -#line 10334 "parser.c" +#line 10375 "parser.c" break; case 948: /* inspect_region: inspect_region before_or_after _initial x */ #line 5158 "parser.y" { yyval = cb_build_inspect_region (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10340 "parser.c" +#line 10381 "parser.c" break; case 951: /* $@66: %empty */ #line 5169 "parser.y" { BEGIN_STATEMENT ("MERGE", 0); } -#line 10346 "parser.c" +#line 10387 "parser.c" break; case 953: /* $@67: %empty */ #line 5179 "parser.y" { BEGIN_STATEMENT ("MOVE", 0); } -#line 10352 "parser.c" +#line 10393 "parser.c" break; case 955: /* move_body: x TO target_x_list */ @@ -10356,7 +10397,7 @@ yyparse (void) { cb_emit_move (yyvsp[-2], yyvsp[0]); } -#line 10360 "parser.c" +#line 10401 "parser.c" break; case 956: /* move_body: CORRESPONDING x TO target_x_list */ @@ -10364,13 +10405,13 @@ yyparse (void) { cb_emit_move_corresponding (yyvsp[-2], yyvsp[0]); } -#line 10368 "parser.c" +#line 10409 "parser.c" break; case 957: /* $@68: %empty */ #line 5200 "parser.y" { BEGIN_STATEMENT ("MULTIPLY", TERM_MULTIPLY); } -#line 10374 "parser.c" +#line 10415 "parser.c" break; case 959: /* multiply_body: x BY arithmetic_x_list on_size_error */ @@ -10378,7 +10419,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '*', yyvsp[-3]); } -#line 10382 "parser.c" +#line 10423 "parser.c" break; case 960: /* multiply_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -10386,25 +10427,25 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '*', yyvsp[-3])); } -#line 10390 "parser.c" +#line 10431 "parser.c" break; case 961: /* end_multiply: %empty */ #line 5217 "parser.y" { terminator_warning (TERM_MULTIPLY); } -#line 10396 "parser.c" +#line 10437 "parser.c" break; case 962: /* end_multiply: "END-MULTIPLY" */ #line 5218 "parser.y" { terminator_clear (TERM_MULTIPLY); } -#line 10402 "parser.c" +#line 10443 "parser.c" break; case 963: /* $@69: %empty */ #line 5227 "parser.y" { BEGIN_STATEMENT ("OPEN", 0); } -#line 10408 "parser.c" +#line 10449 "parser.c" break; case 966: /* open_list: open_list open_mode open_sharing file_name_list open_option */ @@ -10418,67 +10459,67 @@ yyparse (void) } } } -#line 10422 "parser.c" +#line 10463 "parser.c" break; case 967: /* open_mode: INPUT */ #line 5246 "parser.y" { yyval = cb_int (COB_OPEN_INPUT); } -#line 10428 "parser.c" +#line 10469 "parser.c" break; case 968: /* open_mode: OUTPUT */ #line 5247 "parser.y" { yyval = cb_int (COB_OPEN_OUTPUT); } -#line 10434 "parser.c" +#line 10475 "parser.c" break; case 969: /* open_mode: "I-O" */ #line 5248 "parser.y" { yyval = cb_int (COB_OPEN_I_O); } -#line 10440 "parser.c" +#line 10481 "parser.c" break; case 970: /* open_mode: EXTEND */ #line 5249 "parser.y" { yyval = cb_int (COB_OPEN_EXTEND); } -#line 10446 "parser.c" +#line 10487 "parser.c" break; case 971: /* open_sharing: %empty */ #line 5253 "parser.y" { yyval = NULL; } -#line 10452 "parser.c" +#line 10493 "parser.c" break; case 972: /* open_sharing: SHARING _with sharing_option */ #line 5254 "parser.y" { yyval = yyvsp[0]; } -#line 10458 "parser.c" +#line 10499 "parser.c" break; case 973: /* open_option: %empty */ #line 5258 "parser.y" { yyval = NULL; } -#line 10464 "parser.c" +#line 10505 "parser.c" break; case 974: /* open_option: _with NO REWIND */ #line 5259 "parser.y" { yyval = NULL; } -#line 10470 "parser.c" +#line 10511 "parser.c" break; case 975: /* open_option: _with LOCK */ #line 5260 "parser.y" { PENDING ("OPEN ... WITH LOCK"); } -#line 10476 "parser.c" +#line 10517 "parser.c" break; case 976: /* $@70: %empty */ #line 5272 "parser.y" { BEGIN_STATEMENT ("PERFORM", TERM_PERFORM); } -#line 10482 "parser.c" +#line 10523 "parser.c" break; case 978: /* perform_body: perform_procedure perform_option */ @@ -10486,7 +10527,7 @@ yyparse (void) { cb_emit_perform (yyvsp[0], yyvsp[-1]); } -#line 10490 "parser.c" +#line 10531 "parser.c" break; case 979: /* $@71: %empty */ @@ -10495,7 +10536,7 @@ yyparse (void) perform_stack = cb_cons (yyvsp[0], perform_stack); check_unreached = 0; } -#line 10499 "parser.c" +#line 10540 "parser.c" break; case 980: /* perform_body: perform_option $@71 statement_list end_perform */ @@ -10504,7 +10545,7 @@ yyparse (void) perform_stack = CB_CHAIN (perform_stack); cb_emit_perform (yyvsp[-3], yyvsp[-1]); } -#line 10508 "parser.c" +#line 10549 "parser.c" break; case 981: /* perform_body: perform_option "END-PERFORM" */ @@ -10512,19 +10553,19 @@ yyparse (void) { cb_emit_perform (yyvsp[-1], NULL); } -#line 10516 "parser.c" +#line 10557 "parser.c" break; case 982: /* end_perform: %empty */ #line 5298 "parser.y" { terminator_error (); } -#line 10522 "parser.c" +#line 10563 "parser.c" break; case 983: /* end_perform: "END-PERFORM" */ #line 5299 "parser.y" { terminator_clear (TERM_PERFORM); } -#line 10528 "parser.c" +#line 10569 "parser.c" break; case 984: /* perform_procedure: procedure_name */ @@ -10533,7 +10574,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $1 */ yyval = cb_build_pair (yyvsp[0], yyvsp[0]); } -#line 10537 "parser.c" +#line 10578 "parser.c" break; case 985: /* perform_procedure: procedure_name THRU procedure_name */ @@ -10542,7 +10583,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $3 */ yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 10546 "parser.c" +#line 10587 "parser.c" break; case 986: /* perform_option: %empty */ @@ -10550,7 +10591,7 @@ yyparse (void) { yyval = cb_build_perform_once (NULL); } -#line 10554 "parser.c" +#line 10595 "parser.c" break; case 987: /* perform_option: FOREVER */ @@ -10558,7 +10599,7 @@ yyparse (void) { yyval = cb_build_perform_forever (NULL); } -#line 10562 "parser.c" +#line 10603 "parser.c" break; case 988: /* perform_option: id_or_lit_or_func TIMES */ @@ -10567,7 +10608,7 @@ yyparse (void) yyval = cb_build_perform_times (yyvsp[-1]); current_program->loop_counter++; } -#line 10571 "parser.c" +#line 10612 "parser.c" break; case 989: /* perform_option: perform_test UNTIL condition */ @@ -10578,7 +10619,7 @@ yyparse (void) varying = cb_list_init (cb_build_perform_varying (NULL, NULL, NULL, yyvsp[0])); yyval = cb_build_perform_until (yyvsp[-2], varying); } -#line 10582 "parser.c" +#line 10623 "parser.c" break; case 990: /* perform_option: perform_test VARYING perform_varying_list */ @@ -10586,31 +10627,31 @@ yyparse (void) { yyval = cb_build_perform_until (yyvsp[-2], yyvsp[0]); } -#line 10590 "parser.c" +#line 10631 "parser.c" break; case 991: /* perform_test: %empty */ #line 5343 "parser.y" { yyval = CB_BEFORE; } -#line 10596 "parser.c" +#line 10637 "parser.c" break; case 992: /* perform_test: _with TEST before_or_after */ #line 5344 "parser.y" { yyval = yyvsp[0]; } -#line 10602 "parser.c" +#line 10643 "parser.c" break; case 993: /* perform_varying_list: perform_varying */ #line 5348 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 10608 "parser.c" +#line 10649 "parser.c" break; case 994: /* perform_varying_list: perform_varying_list AFTER perform_varying */ #line 5350 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 10614 "parser.c" +#line 10655 "parser.c" break; case 995: /* perform_varying: identifier FROM x BY x UNTIL condition */ @@ -10618,13 +10659,13 @@ yyparse (void) { yyval = cb_build_perform_varying (yyvsp[-6], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10622 "parser.c" +#line 10663 "parser.c" break; case 996: /* $@72: %empty */ #line 5366 "parser.y" { BEGIN_STATEMENT ("READ", TERM_READ); } -#line 10628 "parser.c" +#line 10669 "parser.c" break; case 997: /* read_statement: READ $@72 file_name flag_next _record read_into with_lock read_key read_handler end_read */ @@ -10652,25 +10693,25 @@ yyparse (void) } } } -#line 10656 "parser.c" +#line 10697 "parser.c" break; case 998: /* read_into: %empty */ #line 5395 "parser.y" { yyval = NULL; } -#line 10662 "parser.c" +#line 10703 "parser.c" break; case 999: /* read_into: INTO identifier */ #line 5396 "parser.y" { yyval = yyvsp[0]; } -#line 10668 "parser.c" +#line 10709 "parser.c" break; case 1000: /* with_lock: %empty */ #line 5400 "parser.y" { yyval = NULL; } -#line 10674 "parser.c" +#line 10715 "parser.c" break; case 1001: /* with_lock: IGNORING LOCK */ @@ -10678,7 +10719,7 @@ yyparse (void) { yyval = cb_int3; } -#line 10682 "parser.c" +#line 10723 "parser.c" break; case 1002: /* with_lock: _with LOCK */ @@ -10686,7 +10727,7 @@ yyparse (void) { yyval = cb_int1; } -#line 10690 "parser.c" +#line 10731 "parser.c" break; case 1003: /* with_lock: _with NO LOCK */ @@ -10694,7 +10735,7 @@ yyparse (void) { yyval = cb_int2; } -#line 10698 "parser.c" +#line 10739 "parser.c" break; case 1004: /* with_lock: _with IGNORE LOCK */ @@ -10702,7 +10743,7 @@ yyparse (void) { yyval = cb_int3; } -#line 10706 "parser.c" +#line 10747 "parser.c" break; case 1005: /* with_lock: _with WAIT */ @@ -10710,13 +10751,13 @@ yyparse (void) { yyval = cb_int4; } -#line 10714 "parser.c" +#line 10755 "parser.c" break; case 1006: /* read_key: %empty */ #line 5424 "parser.y" { yyval = NULL; } -#line 10720 "parser.c" +#line 10761 "parser.c" break; case 1007: /* read_key: KEY _is identifier_list */ @@ -10724,25 +10765,25 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 10728 "parser.c" +#line 10769 "parser.c" break; case 1011: /* end_read: %empty */ #line 5437 "parser.y" { terminator_warning (TERM_READ); } -#line 10734 "parser.c" +#line 10775 "parser.c" break; case 1012: /* end_read: "END-READ" */ #line 5438 "parser.y" { terminator_clear (TERM_READ); } -#line 10740 "parser.c" +#line 10781 "parser.c" break; case 1013: /* $@73: %empty */ #line 5447 "parser.y" { BEGIN_STATEMENT ("RELEASE", 0); } -#line 10746 "parser.c" +#line 10787 "parser.c" break; case 1014: /* release_statement: RELEASE $@73 record_name write_from */ @@ -10752,13 +10793,13 @@ yyparse (void) cb_emit_release (yyvsp[-1], yyvsp[0]); } } -#line 10756 "parser.c" +#line 10797 "parser.c" break; case 1015: /* $@74: %empty */ #line 5462 "parser.y" { BEGIN_STATEMENT ("RETURN", TERM_RETURN); } -#line 10762 "parser.c" +#line 10803 "parser.c" break; case 1016: /* return_statement: RETURN $@74 file_name _record read_into at_end end_return */ @@ -10768,25 +10809,25 @@ yyparse (void) cb_emit_return (yyvsp[-4], yyvsp[-2]); } } -#line 10772 "parser.c" +#line 10813 "parser.c" break; case 1017: /* end_return: %empty */ #line 5473 "parser.y" { terminator_warning (TERM_RETURN); } -#line 10778 "parser.c" +#line 10819 "parser.c" break; case 1018: /* end_return: "END-RETURN" */ #line 5474 "parser.y" { terminator_clear (TERM_RETURN); } -#line 10784 "parser.c" +#line 10825 "parser.c" break; case 1019: /* $@75: %empty */ #line 5483 "parser.y" { BEGIN_STATEMENT ("REWRITE", TERM_REWRITE); } -#line 10790 "parser.c" +#line 10831 "parser.c" break; case 1020: /* rewrite_statement: REWRITE $@75 record_name write_from write_lock opt_invalid_key end_rewrite */ @@ -10802,13 +10843,13 @@ yyparse (void) cb_emit_rewrite (yyvsp[-4], yyvsp[-3], yyvsp[-2]); } } -#line 10806 "parser.c" +#line 10847 "parser.c" break; case 1021: /* write_lock: %empty */ #line 5500 "parser.y" { yyval = NULL; } -#line 10812 "parser.c" +#line 10853 "parser.c" break; case 1022: /* write_lock: _with LOCK */ @@ -10816,7 +10857,7 @@ yyparse (void) { yyval = cb_int1; } -#line 10820 "parser.c" +#line 10861 "parser.c" break; case 1023: /* write_lock: _with NO LOCK */ @@ -10824,19 +10865,19 @@ yyparse (void) { yyval = cb_int2; } -#line 10828 "parser.c" +#line 10869 "parser.c" break; case 1024: /* end_rewrite: %empty */ #line 5512 "parser.y" { terminator_warning (TERM_REWRITE); } -#line 10834 "parser.c" +#line 10875 "parser.c" break; case 1025: /* end_rewrite: "END-REWRITE" */ #line 5513 "parser.y" { terminator_clear (TERM_REWRITE); } -#line 10840 "parser.c" +#line 10881 "parser.c" break; case 1026: /* rollback_statement: ROLLBACK */ @@ -10845,13 +10886,13 @@ yyparse (void) BEGIN_STATEMENT ("ROLLBACK", 0); cb_emit_rollback (); } -#line 10849 "parser.c" +#line 10890 "parser.c" break; case 1027: /* $@76: %empty */ #line 5535 "parser.y" { BEGIN_STATEMENT ("SEARCH", TERM_SEARCH); } -#line 10855 "parser.c" +#line 10896 "parser.c" break; case 1029: /* search_body: table_name search_varying search_at_end search_whens */ @@ -10859,7 +10900,7 @@ yyparse (void) { cb_emit_search (yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10863 "parser.c" +#line 10904 "parser.c" break; case 1030: /* $@77: %empty */ @@ -10867,7 +10908,7 @@ yyparse (void) { check_unreached = 0; } -#line 10871 "parser.c" +#line 10912 "parser.c" break; case 1031: /* search_body: ALL table_name search_at_end WHEN expr $@77 statement_list */ @@ -10875,25 +10916,25 @@ yyparse (void) { cb_emit_search_all (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10879 "parser.c" +#line 10920 "parser.c" break; case 1032: /* search_varying: %empty */ #line 5556 "parser.y" { yyval = NULL; } -#line 10885 "parser.c" +#line 10926 "parser.c" break; case 1033: /* search_varying: VARYING identifier */ #line 5557 "parser.y" { yyval = yyvsp[0]; } -#line 10891 "parser.c" +#line 10932 "parser.c" break; case 1034: /* search_at_end: %empty */ #line 5561 "parser.y" { yyval = NULL; } -#line 10897 "parser.c" +#line 10938 "parser.c" break; case 1035: /* $@78: %empty */ @@ -10901,7 +10942,7 @@ yyparse (void) { check_unreached = 0; } -#line 10905 "parser.c" +#line 10946 "parser.c" break; case 1036: /* search_at_end: _at END $@78 statement_list */ @@ -10909,19 +10950,19 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 10913 "parser.c" +#line 10954 "parser.c" break; case 1037: /* search_whens: search_when */ #line 5573 "parser.y" { yyval = yyvsp[0]; } -#line 10919 "parser.c" +#line 10960 "parser.c" break; case 1038: /* search_whens: search_when search_whens */ #line 5574 "parser.y" { yyval = yyvsp[-1]; CB_IF (yyvsp[-1])->stmt2 = yyvsp[0]; } -#line 10925 "parser.c" +#line 10966 "parser.c" break; case 1039: /* $@79: %empty */ @@ -10929,7 +10970,7 @@ yyparse (void) { check_unreached = 0; } -#line 10933 "parser.c" +#line 10974 "parser.c" break; case 1040: /* search_when: WHEN condition $@79 statement_list */ @@ -10937,25 +10978,25 @@ yyparse (void) { yyval = cb_build_if (yyvsp[-2], yyvsp[0], NULL); } -#line 10941 "parser.c" +#line 10982 "parser.c" break; case 1041: /* end_search: %empty */ #line 5589 "parser.y" { terminator_warning (TERM_SEARCH); } -#line 10947 "parser.c" +#line 10988 "parser.c" break; case 1042: /* end_search: "END-SEARCH" */ #line 5590 "parser.y" { terminator_clear (TERM_SEARCH); } -#line 10953 "parser.c" +#line 10994 "parser.c" break; case 1043: /* $@80: %empty */ #line 5599 "parser.y" { BEGIN_STATEMENT ("SET", 0); } -#line 10959 "parser.c" +#line 11000 "parser.c" break; case 1050: /* set_environment: ENVIRONMENT simple_value TO simple_value */ @@ -10963,7 +11004,7 @@ yyparse (void) { cb_emit_setenv (yyvsp[-2], yyvsp[0]); } -#line 10967 "parser.c" +#line 11008 "parser.c" break; case 1051: /* set_to: target_x_list TO ENTRY alnum_or_id */ @@ -10971,7 +11012,7 @@ yyparse (void) { cb_emit_set_to (yyvsp[-3], cb_build_ppointer (yyvsp[0])); } -#line 10975 "parser.c" +#line 11016 "parser.c" break; case 1052: /* set_to: target_x_list TO x */ @@ -10979,7 +11020,7 @@ yyparse (void) { cb_emit_set_to (yyvsp[-2], yyvsp[0]); } -#line 10983 "parser.c" +#line 11024 "parser.c" break; case 1053: /* set_up_down: target_x_list up_or_down BY x */ @@ -10987,19 +11028,19 @@ yyparse (void) { cb_emit_set_up_down (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10991 "parser.c" +#line 11032 "parser.c" break; case 1054: /* up_or_down: UP */ #line 5643 "parser.y" { yyval = cb_int0; } -#line 10997 "parser.c" +#line 11038 "parser.c" break; case 1055: /* up_or_down: DOWN */ #line 5644 "parser.y" { yyval = cb_int1; } -#line 11003 "parser.c" +#line 11044 "parser.c" break; case 1058: /* set_to_on_off: mnemonic_name_list TO on_or_off */ @@ -11007,7 +11048,7 @@ yyparse (void) { cb_emit_set_on_off (yyvsp[-2], yyvsp[0]); } -#line 11011 "parser.c" +#line 11052 "parser.c" break; case 1061: /* set_to_true_false: target_x_list TO "TRUE" */ @@ -11015,7 +11056,7 @@ yyparse (void) { cb_emit_set_true (yyvsp[-2]); } -#line 11019 "parser.c" +#line 11060 "parser.c" break; case 1062: /* set_to_true_false: target_x_list TO "FALSE" */ @@ -11023,13 +11064,13 @@ yyparse (void) { cb_emit_set_false (yyvsp[-2]); } -#line 11027 "parser.c" +#line 11068 "parser.c" break; case 1063: /* $@81: %empty */ #line 5685 "parser.y" { BEGIN_STATEMENT ("SORT", 0); } -#line 11033 "parser.c" +#line 11074 "parser.c" break; case 1065: /* $@82: %empty */ @@ -11042,7 +11083,7 @@ yyparse (void) /* used in sort_input/sort_output */ save_tree_1 = yyvsp[-3]; } -#line 11046 "parser.c" +#line 11087 "parser.c" break; case 1066: /* sort_body: qualified_word sort_key_list sort_duplicates sort_collating $@82 sort_input sort_output */ @@ -11050,7 +11091,7 @@ yyparse (void) { cb_emit_sort_finish (yyvsp[-6]); } -#line 11054 "parser.c" +#line 11095 "parser.c" break; case 1067: /* sort_key_list: %empty */ @@ -11058,7 +11099,7 @@ yyparse (void) { yyval = NULL; } -#line 11062 "parser.c" +#line 11103 "parser.c" break; case 1068: /* sort_key_list: sort_key_list _on ascending_or_descending _key _is opt_key_list */ @@ -11079,37 +11120,37 @@ yyparse (void) yyval = cb_list_append (yyvsp[-5], yyvsp[0]); } } -#line 11083 "parser.c" +#line 11124 "parser.c" break; case 1069: /* opt_key_list: %empty */ #line 5731 "parser.y" { yyval = NULL; } -#line 11089 "parser.c" +#line 11130 "parser.c" break; case 1070: /* opt_key_list: opt_key_list qualified_word */ #line 5732 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11095 "parser.c" +#line 11136 "parser.c" break; case 1072: /* sort_duplicates: with_dups _in_order */ #line 5736 "parser.y" { /* nothing */ } -#line 11101 "parser.c" +#line 11142 "parser.c" break; case 1073: /* sort_collating: %empty */ #line 5740 "parser.y" { yyval = cb_null; } -#line 11107 "parser.c" +#line 11148 "parser.c" break; case 1074: /* sort_collating: coll_sequence _is reference */ #line 5741 "parser.y" { yyval = cb_ref (yyvsp[0]); } -#line 11113 "parser.c" +#line 11154 "parser.c" break; case 1075: /* sort_input: %empty */ @@ -11119,7 +11160,7 @@ yyparse (void) cb_error (_("File sort requires USING or INPUT PROCEDURE")); } } -#line 11123 "parser.c" +#line 11164 "parser.c" break; case 1076: /* sort_input: USING file_name_list */ @@ -11131,7 +11172,7 @@ yyparse (void) cb_emit_sort_using (save_tree_1, yyvsp[0]); } } -#line 11135 "parser.c" +#line 11176 "parser.c" break; case 1077: /* sort_input: INPUT PROCEDURE _is perform_procedure */ @@ -11143,7 +11184,7 @@ yyparse (void) cb_emit_sort_input (yyvsp[0], save_tree_1); } } -#line 11147 "parser.c" +#line 11188 "parser.c" break; case 1078: /* sort_output: %empty */ @@ -11153,7 +11194,7 @@ yyparse (void) cb_error (_("File sort requires GIVING or OUTPUT PROCEDURE")); } } -#line 11157 "parser.c" +#line 11198 "parser.c" break; case 1079: /* sort_output: GIVING file_name_list */ @@ -11165,7 +11206,7 @@ yyparse (void) cb_emit_sort_giving (save_tree_1, yyvsp[0]); } } -#line 11169 "parser.c" +#line 11210 "parser.c" break; case 1080: /* sort_output: OUTPUT PROCEDURE _is perform_procedure */ @@ -11177,19 +11218,19 @@ yyparse (void) cb_emit_sort_output (yyvsp[0], save_tree_1); } } -#line 11181 "parser.c" +#line 11222 "parser.c" break; case 1081: /* $@83: %empty */ #line 5800 "parser.y" { BEGIN_STATEMENT ("START", TERM_START); } -#line 11187 "parser.c" +#line 11228 "parser.c" break; case 1082: /* @84: %empty */ #line 5801 "parser.y" { yyval = cb_int (COB_EQ); } -#line 11193 "parser.c" +#line 11234 "parser.c" break; case 1083: /* start_statement: START $@83 file_name @84 start_key opt_invalid_key end_start */ @@ -11208,13 +11249,13 @@ yyparse (void) yyval = cb_error_node; } } -#line 11212 "parser.c" +#line 11253 "parser.c" break; case 1084: /* start_key: %empty */ #line 5821 "parser.y" { yyval = NULL; } -#line 11218 "parser.c" +#line 11259 "parser.c" break; case 1085: /* start_key: KEY _is start_op identifier_list */ @@ -11223,55 +11264,55 @@ yyparse (void) yyvsp[-4] = yyvsp[-1]; yyval = yyvsp[0]; } -#line 11227 "parser.c" +#line 11268 "parser.c" break; case 1086: /* start_op: flag_not eq */ #line 5830 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_NE : COB_EQ); } -#line 11233 "parser.c" +#line 11274 "parser.c" break; case 1087: /* start_op: flag_not gt */ #line 5831 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LE : COB_GT); } -#line 11239 "parser.c" +#line 11280 "parser.c" break; case 1088: /* start_op: flag_not lt */ #line 5832 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GE : COB_LT); } -#line 11245 "parser.c" +#line 11286 "parser.c" break; case 1089: /* start_op: flag_not ge */ #line 5833 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LT : COB_GE); } -#line 11251 "parser.c" +#line 11292 "parser.c" break; case 1090: /* start_op: flag_not le */ #line 5834 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GT : COB_LE); } -#line 11257 "parser.c" +#line 11298 "parser.c" break; case 1091: /* end_start: %empty */ #line 5838 "parser.y" { terminator_warning (TERM_START); } -#line 11263 "parser.c" +#line 11304 "parser.c" break; case 1092: /* end_start: "END-START" */ #line 5839 "parser.y" { terminator_clear (TERM_START); } -#line 11269 "parser.c" +#line 11310 "parser.c" break; case 1093: /* $@85: %empty */ #line 5848 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11275 "parser.c" +#line 11316 "parser.c" break; case 1094: /* stop_statement: STOP RUN $@85 stop_returning */ @@ -11279,13 +11320,13 @@ yyparse (void) { cb_emit_stop_run (yyvsp[0]); } -#line 11283 "parser.c" +#line 11324 "parser.c" break; case 1095: /* $@86: %empty */ #line 5853 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11289 "parser.c" +#line 11330 "parser.c" break; case 1096: /* stop_statement: STOP "Literal" $@86 */ @@ -11293,31 +11334,31 @@ yyparse (void) { cb_verify (cb_stop_literal_statement, "STOP literal"); } -#line 11297 "parser.c" +#line 11338 "parser.c" break; case 1097: /* stop_returning: %empty */ #line 5860 "parser.y" { yyval = current_program->cb_return_code; } -#line 11303 "parser.c" +#line 11344 "parser.c" break; case 1098: /* stop_returning: RETURNING x */ #line 5861 "parser.y" { yyval = yyvsp[0]; } -#line 11309 "parser.c" +#line 11350 "parser.c" break; case 1099: /* stop_returning: GIVING x */ #line 5862 "parser.y" { yyval = yyvsp[0]; } -#line 11315 "parser.c" +#line 11356 "parser.c" break; case 1100: /* $@87: %empty */ #line 5871 "parser.y" { BEGIN_STATEMENT ("STRING", TERM_STRING); } -#line 11321 "parser.c" +#line 11362 "parser.c" break; case 1101: /* string_statement: STRING $@87 string_item_list INTO identifier opt_with_pointer on_overflow end_string */ @@ -11325,67 +11366,67 @@ yyparse (void) { cb_emit_string (yyvsp[-5], yyvsp[-3], yyvsp[-2]); } -#line 11329 "parser.c" +#line 11370 "parser.c" break; case 1102: /* string_item_list: string_item */ #line 5880 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11335 "parser.c" +#line 11376 "parser.c" break; case 1103: /* string_item_list: string_item_list string_item */ #line 5881 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11341 "parser.c" +#line 11382 "parser.c" break; case 1104: /* string_item: x */ #line 5885 "parser.y" { yyval = yyvsp[0]; } -#line 11347 "parser.c" +#line 11388 "parser.c" break; case 1105: /* string_item: DELIMITED _by SIZE */ #line 5886 "parser.y" { yyval = cb_build_pair (cb_int0, NULL); } -#line 11353 "parser.c" +#line 11394 "parser.c" break; case 1106: /* string_item: DELIMITED _by x */ #line 5887 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 11359 "parser.c" +#line 11400 "parser.c" break; case 1107: /* opt_with_pointer: %empty */ #line 5891 "parser.y" { yyval = cb_int0; } -#line 11365 "parser.c" +#line 11406 "parser.c" break; case 1108: /* opt_with_pointer: _with POINTER identifier */ #line 5892 "parser.y" { yyval = yyvsp[0]; } -#line 11371 "parser.c" +#line 11412 "parser.c" break; case 1109: /* end_string: %empty */ #line 5896 "parser.y" { terminator_warning (TERM_STRING); } -#line 11377 "parser.c" +#line 11418 "parser.c" break; case 1110: /* end_string: "END-STRING" */ #line 5897 "parser.y" { terminator_clear (TERM_STRING); } -#line 11383 "parser.c" +#line 11424 "parser.c" break; case 1111: /* $@88: %empty */ #line 5906 "parser.y" { BEGIN_STATEMENT ("SUBTRACT", TERM_SUBTRACT); } -#line 11389 "parser.c" +#line 11430 "parser.c" break; case 1113: /* subtract_body: x_list FROM arithmetic_x_list on_size_error */ @@ -11393,7 +11434,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '-', cb_build_binary_list (yyvsp[-3], '+')); } -#line 11397 "parser.c" +#line 11438 "parser.c" break; case 1114: /* subtract_body: x_list FROM x GIVING arithmetic_x_list on_size_error */ @@ -11401,7 +11442,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (cb_cons (yyvsp[-3], yyvsp[-5]), '-')); } -#line 11405 "parser.c" +#line 11446 "parser.c" break; case 1115: /* subtract_body: CORRESPONDING identifier FROM identifier flag_rounded on_size_error */ @@ -11409,19 +11450,19 @@ yyparse (void) { cb_emit_corresponding (cb_build_sub, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 11413 "parser.c" +#line 11454 "parser.c" break; case 1116: /* end_subtract: %empty */ #line 5927 "parser.y" { terminator_warning (TERM_SUBTRACT); } -#line 11419 "parser.c" +#line 11460 "parser.c" break; case 1117: /* end_subtract: "END-SUBTRACT" */ #line 5928 "parser.y" { terminator_clear (TERM_SUBTRACT); } -#line 11425 "parser.c" +#line 11466 "parser.c" break; case 1118: /* suppress_statement: SUPPRESS _printing */ @@ -11430,13 +11471,13 @@ yyparse (void) BEGIN_STATEMENT ("SUPPRESS", 0); PENDING("SUPPRESS"); } -#line 11434 "parser.c" +#line 11475 "parser.c" break; case 1121: /* $@89: %empty */ #line 5953 "parser.y" { BEGIN_STATEMENT ("TERMINATE", 0); } -#line 11440 "parser.c" +#line 11481 "parser.c" break; case 1122: /* terminate_statement: TERMINATE $@89 identifier_list */ @@ -11444,13 +11485,13 @@ yyparse (void) { PENDING("TERMINATE"); } -#line 11448 "parser.c" +#line 11489 "parser.c" break; case 1123: /* $@90: %empty */ #line 5966 "parser.y" { BEGIN_STATEMENT ("TRANSFORM", 0); } -#line 11454 "parser.c" +#line 11495 "parser.c" break; case 1124: /* transform_statement: TRANSFORM $@90 identifier FROM simple_value TO simple_all_value */ @@ -11461,13 +11502,13 @@ yyparse (void) x = cb_build_converting (yyvsp[-2], yyvsp[0], cb_build_inspect_region_start ()); cb_emit_inspect (yyvsp[-4], x, cb_int0, 2); } -#line 11465 "parser.c" +#line 11506 "parser.c" break; case 1125: /* $@91: %empty */ #line 5982 "parser.y" { BEGIN_STATEMENT ("UNLOCK", 0); } -#line 11471 "parser.c" +#line 11512 "parser.c" break; case 1126: /* unlock_statement: UNLOCK $@91 file_name opt_record */ @@ -11477,13 +11518,13 @@ yyparse (void) cb_emit_unlock (yyvsp[-1]); } } -#line 11481 "parser.c" +#line 11522 "parser.c" break; case 1130: /* $@92: %empty */ #line 6003 "parser.y" { BEGIN_STATEMENT ("UNSTRING", TERM_UNSTRING); } -#line 11487 "parser.c" +#line 11528 "parser.c" break; case 1131: /* unstring_statement: UNSTRING $@92 identifier unstring_delimited unstring_into opt_with_pointer unstring_tallying on_overflow end_unstring */ @@ -11491,31 +11532,31 @@ yyparse (void) { cb_emit_unstring (yyvsp[-6], yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2]); } -#line 11495 "parser.c" +#line 11536 "parser.c" break; case 1132: /* unstring_delimited: %empty */ #line 6013 "parser.y" { yyval = NULL; } -#line 11501 "parser.c" +#line 11542 "parser.c" break; case 1133: /* unstring_delimited: DELIMITED _by unstring_delimited_list */ #line 6015 "parser.y" { yyval = yyvsp[0]; } -#line 11507 "parser.c" +#line 11548 "parser.c" break; case 1134: /* unstring_delimited_list: unstring_delimited_item */ #line 6019 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11513 "parser.c" +#line 11554 "parser.c" break; case 1135: /* unstring_delimited_list: unstring_delimited_list OR unstring_delimited_item */ #line 6021 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 11519 "parser.c" +#line 11560 "parser.c" break; case 1136: /* unstring_delimited_item: flag_all simple_value */ @@ -11523,19 +11564,19 @@ yyparse (void) { yyval = cb_build_unstring_delimited (yyvsp[-1], yyvsp[0]); } -#line 11527 "parser.c" +#line 11568 "parser.c" break; case 1137: /* unstring_into: INTO unstring_into_item */ #line 6032 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11533 "parser.c" +#line 11574 "parser.c" break; case 1138: /* unstring_into: unstring_into unstring_into_item */ #line 6034 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11539 "parser.c" +#line 11580 "parser.c" break; case 1139: /* unstring_into_item: identifier unstring_into_delimiter unstring_into_count */ @@ -11543,55 +11584,55 @@ yyparse (void) { yyval = cb_build_unstring_into (yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 11547 "parser.c" +#line 11588 "parser.c" break; case 1140: /* unstring_into_delimiter: %empty */ #line 6045 "parser.y" { yyval = NULL; } -#line 11553 "parser.c" +#line 11594 "parser.c" break; case 1141: /* unstring_into_delimiter: DELIMITER _in identifier */ #line 6046 "parser.y" { yyval = yyvsp[0]; } -#line 11559 "parser.c" +#line 11600 "parser.c" break; case 1142: /* unstring_into_count: %empty */ #line 6050 "parser.y" { yyval = NULL; } -#line 11565 "parser.c" +#line 11606 "parser.c" break; case 1143: /* unstring_into_count: COUNT _in identifier */ #line 6051 "parser.y" { yyval = yyvsp[0]; } -#line 11571 "parser.c" +#line 11612 "parser.c" break; case 1144: /* unstring_tallying: %empty */ #line 6055 "parser.y" { yyval = NULL; } -#line 11577 "parser.c" +#line 11618 "parser.c" break; case 1145: /* unstring_tallying: TALLYING _in identifier */ #line 6056 "parser.y" { yyval = yyvsp[0]; } -#line 11583 "parser.c" +#line 11624 "parser.c" break; case 1146: /* end_unstring: %empty */ #line 6060 "parser.y" { terminator_warning (TERM_UNSTRING); } -#line 11589 "parser.c" +#line 11630 "parser.c" break; case 1147: /* end_unstring: "END-UNSTRING" */ #line 6061 "parser.y" { terminator_clear (TERM_UNSTRING); } -#line 11595 "parser.c" +#line 11636 "parser.c" break; case 1151: /* use_exception: USE use_global _after _standard exception_or_error _procedure _on use_exception_target */ @@ -11613,7 +11654,7 @@ yyparse (void) } } } -#line 11617 "parser.c" +#line 11658 "parser.c" break; case 1152: /* use_global: %empty */ @@ -11621,7 +11662,7 @@ yyparse (void) { use_global_ind = 0; } -#line 11625 "parser.c" +#line 11666 "parser.c" break; case 1153: /* use_global: GLOBAL */ @@ -11630,7 +11671,7 @@ yyparse (void) use_global_ind = 1; current_program->flag_global_use = 1; } -#line 11634 "parser.c" +#line 11675 "parser.c" break; case 1154: /* use_exception_target: file_name_list */ @@ -11644,7 +11685,7 @@ yyparse (void) } } } -#line 11648 "parser.c" +#line 11689 "parser.c" break; case 1155: /* use_exception_target: INPUT */ @@ -11653,7 +11694,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_INPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_INPUT].handler_prog = current_program; } -#line 11657 "parser.c" +#line 11698 "parser.c" break; case 1156: /* use_exception_target: OUTPUT */ @@ -11662,7 +11703,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_OUTPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_OUTPUT].handler_prog = current_program; } -#line 11666 "parser.c" +#line 11707 "parser.c" break; case 1157: /* use_exception_target: "I-O" */ @@ -11671,7 +11712,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_I_O].handler_label = current_section; current_program->global_handler[COB_OPEN_I_O].handler_prog = current_program; } -#line 11675 "parser.c" +#line 11716 "parser.c" break; case 1158: /* use_exception_target: EXTEND */ @@ -11680,7 +11721,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_EXTEND].handler_label = current_section; current_program->global_handler[COB_OPEN_EXTEND].handler_prog = current_program; } -#line 11684 "parser.c" +#line 11725 "parser.c" break; case 1171: /* use_debugging: USE _for DEBUGGING _on use_debugging_target */ @@ -11688,7 +11729,7 @@ yyparse (void) { PENDING ("USE FOR DEBUGGING"); } -#line 11692 "parser.c" +#line 11733 "parser.c" break; case 1174: /* use_reporting: USE use_global BEFORE REPORTING identifier */ @@ -11696,13 +11737,13 @@ yyparse (void) { PENDING ("USE BEFORE REPORTING"); } -#line 11700 "parser.c" +#line 11741 "parser.c" break; case 1175: /* $@93: %empty */ #line 6192 "parser.y" { BEGIN_STATEMENT ("WRITE", TERM_WRITE); } -#line 11706 "parser.c" +#line 11747 "parser.c" break; case 1176: /* write_statement: WRITE $@93 record_name write_from write_lock write_option write_handler end_write */ @@ -11718,19 +11759,19 @@ yyparse (void) cb_emit_write (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[-3]); } } -#line 11722 "parser.c" +#line 11763 "parser.c" break; case 1177: /* write_from: %empty */ #line 6209 "parser.y" { yyval = NULL; } -#line 11728 "parser.c" +#line 11769 "parser.c" break; case 1178: /* write_from: FROM id_or_lit */ #line 6210 "parser.y" { yyval = yyvsp[0]; } -#line 11734 "parser.c" +#line 11775 "parser.c" break; case 1179: /* write_option: %empty */ @@ -11738,7 +11779,7 @@ yyparse (void) { yyval = cb_int0; } -#line 11742 "parser.c" +#line 11783 "parser.c" break; case 1180: /* write_option: before_or_after _advancing num_id_or_lit _line_or_lines */ @@ -11746,7 +11787,7 @@ yyparse (void) { yyval = cb_build_write_advancing_lines (yyvsp[-3], yyvsp[-1]); } -#line 11750 "parser.c" +#line 11791 "parser.c" break; case 1181: /* write_option: before_or_after _advancing mnemonic_name */ @@ -11754,7 +11795,7 @@ yyparse (void) { yyval = cb_build_write_advancing_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 11758 "parser.c" +#line 11799 "parser.c" break; case 1182: /* write_option: before_or_after _advancing PAGE */ @@ -11762,31 +11803,31 @@ yyparse (void) { yyval = cb_build_write_advancing_page (yyvsp[-2]); } -#line 11766 "parser.c" +#line 11807 "parser.c" break; case 1183: /* before_or_after: BEFORE */ #line 6233 "parser.y" { yyval = CB_BEFORE; } -#line 11772 "parser.c" +#line 11813 "parser.c" break; case 1184: /* before_or_after: AFTER */ #line 6234 "parser.y" { yyval = CB_AFTER; } -#line 11778 "parser.c" +#line 11819 "parser.c" break; case 1188: /* end_write: %empty */ #line 6243 "parser.y" { terminator_warning (TERM_WRITE); } -#line 11784 "parser.c" +#line 11825 "parser.c" break; case 1189: /* end_write: "END-WRITE" */ #line 6244 "parser.y" { terminator_clear (TERM_WRITE); } -#line 11790 "parser.c" +#line 11831 "parser.c" break; case 1190: /* on_accp_exception: opt_on_exception opt_not_on_exception */ @@ -11794,7 +11835,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_IMP_ACCEPT; } -#line 11798 "parser.c" +#line 11839 "parser.c" break; case 1191: /* on_disp_exception: opt_on_exception opt_not_on_exception */ @@ -11802,7 +11843,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_IMP_DISPLAY; } -#line 11806 "parser.c" +#line 11847 "parser.c" break; case 1193: /* $@94: %empty */ @@ -11810,7 +11851,7 @@ yyparse (void) { check_unreached = 0; } -#line 11814 "parser.c" +#line 11855 "parser.c" break; case 1194: /* opt_on_exception: EXCEPTION $@94 statement_list */ @@ -11818,7 +11859,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11822 "parser.c" +#line 11863 "parser.c" break; case 1196: /* $@95: %empty */ @@ -11826,7 +11867,7 @@ yyparse (void) { check_unreached = 0; } -#line 11830 "parser.c" +#line 11871 "parser.c" break; case 1197: /* opt_not_on_exception: "NOT EXCEPTION" $@95 statement_list */ @@ -11834,7 +11875,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11838 "parser.c" +#line 11879 "parser.c" break; case 1200: /* $@96: %empty */ @@ -11843,7 +11884,7 @@ yyparse (void) check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11847 "parser.c" +#line 11888 "parser.c" break; case 1201: /* opt_on_size_error: "SIZE ERROR" $@96 statement_list */ @@ -11851,7 +11892,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11855 "parser.c" +#line 11896 "parser.c" break; case 1203: /* $@97: %empty */ @@ -11860,7 +11901,7 @@ yyparse (void) check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11864 "parser.c" +#line 11905 "parser.c" break; case 1204: /* opt_not_on_size_error: "NOT SIZE ERROR" $@97 statement_list */ @@ -11868,7 +11909,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11872 "parser.c" +#line 11913 "parser.c" break; case 1205: /* on_overflow: opt_on_overflow opt_not_on_overflow */ @@ -11876,7 +11917,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_OVERFLOW; } -#line 11880 "parser.c" +#line 11921 "parser.c" break; case 1207: /* $@98: %empty */ @@ -11884,7 +11925,7 @@ yyparse (void) { check_unreached = 0; } -#line 11888 "parser.c" +#line 11929 "parser.c" break; case 1208: /* opt_on_overflow: OVERFLOW $@98 statement_list */ @@ -11892,7 +11933,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11896 "parser.c" +#line 11937 "parser.c" break; case 1210: /* $@99: %empty */ @@ -11900,7 +11941,7 @@ yyparse (void) { check_unreached = 0; } -#line 11904 "parser.c" +#line 11945 "parser.c" break; case 1211: /* opt_not_on_overflow: "NOT OVERFLOW" $@99 statement_list */ @@ -11908,7 +11949,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11912 "parser.c" +#line 11953 "parser.c" break; case 1212: /* at_end: at_end_sentence */ @@ -11917,7 +11958,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[0]; } -#line 11921 "parser.c" +#line 11962 "parser.c" break; case 1213: /* at_end: not_at_end_sentence */ @@ -11926,7 +11967,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler2 = yyvsp[0]; } -#line 11930 "parser.c" +#line 11971 "parser.c" break; case 1214: /* at_end: at_end_sentence not_at_end_sentence */ @@ -11936,7 +11977,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 11940 "parser.c" +#line 11981 "parser.c" break; case 1215: /* $@100: %empty */ @@ -11944,7 +11985,7 @@ yyparse (void) { check_unreached = 0; } -#line 11948 "parser.c" +#line 11989 "parser.c" break; case 1216: /* at_end_sentence: END $@100 statement_list */ @@ -11952,7 +11993,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 11956 "parser.c" +#line 11997 "parser.c" break; case 1217: /* $@101: %empty */ @@ -11960,7 +12001,7 @@ yyparse (void) { check_unreached = 0; } -#line 11964 "parser.c" +#line 12005 "parser.c" break; case 1218: /* not_at_end_sentence: "NOT END" $@101 statement_list */ @@ -11968,7 +12009,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 11972 "parser.c" +#line 12013 "parser.c" break; case 1219: /* at_eop: at_eop_sentence */ @@ -11977,7 +12018,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[0]; } -#line 11981 "parser.c" +#line 12022 "parser.c" break; case 1220: /* at_eop: not_at_eop_sentence */ @@ -11986,7 +12027,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler2 = yyvsp[0]; } -#line 11990 "parser.c" +#line 12031 "parser.c" break; case 1221: /* at_eop: at_eop_sentence not_at_eop_sentence */ @@ -11996,7 +12037,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12000 "parser.c" +#line 12041 "parser.c" break; case 1222: /* $@102: %empty */ @@ -12004,7 +12045,7 @@ yyparse (void) { check_unreached = 0; } -#line 12008 "parser.c" +#line 12049 "parser.c" break; case 1223: /* at_eop_sentence: EOP $@102 statement_list */ @@ -12012,7 +12053,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12016 "parser.c" +#line 12057 "parser.c" break; case 1224: /* $@103: %empty */ @@ -12020,7 +12061,7 @@ yyparse (void) { check_unreached = 0; } -#line 12024 "parser.c" +#line 12065 "parser.c" break; case 1225: /* not_at_eop_sentence: "NOT EOP" $@103 statement_list */ @@ -12028,7 +12069,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12032 "parser.c" +#line 12073 "parser.c" break; case 1228: /* invalid_key: invalid_key_sentence */ @@ -12037,7 +12078,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[0]; } -#line 12041 "parser.c" +#line 12082 "parser.c" break; case 1229: /* invalid_key: not_invalid_key_sentence */ @@ -12046,7 +12087,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler2 = yyvsp[0]; } -#line 12050 "parser.c" +#line 12091 "parser.c" break; case 1230: /* invalid_key: invalid_key_sentence not_invalid_key_sentence */ @@ -12056,7 +12097,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12060 "parser.c" +#line 12101 "parser.c" break; case 1231: /* $@104: %empty */ @@ -12064,7 +12105,7 @@ yyparse (void) { check_unreached = 0; } -#line 12068 "parser.c" +#line 12109 "parser.c" break; case 1232: /* invalid_key_sentence: "INVALID KEY" $@104 statement_list */ @@ -12072,7 +12113,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12076 "parser.c" +#line 12117 "parser.c" break; case 1233: /* $@105: %empty */ @@ -12080,7 +12121,7 @@ yyparse (void) { check_unreached = 0; } -#line 12084 "parser.c" +#line 12125 "parser.c" break; case 1234: /* not_invalid_key_sentence: "NOT INVALID KEY" $@105 statement_list */ @@ -12088,7 +12129,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12092 "parser.c" +#line 12133 "parser.c" break; case 1235: /* _opt_scroll_lines: %empty */ @@ -12096,7 +12137,7 @@ yyparse (void) { yyval = cb_one; } -#line 12100 "parser.c" +#line 12141 "parser.c" break; case 1236: /* _opt_scroll_lines: _by num_id_or_lit _line_or_lines */ @@ -12104,7 +12145,7 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 12108 "parser.c" +#line 12149 "parser.c" break; case 1237: /* condition: expr */ @@ -12112,7 +12153,7 @@ yyparse (void) { yyval = cb_build_cond (yyvsp[0]); } -#line 12116 "parser.c" +#line 12157 "parser.c" break; case 1238: /* expr: partial_expr */ @@ -12120,7 +12161,7 @@ yyparse (void) { yyval = cb_build_expr (yyvsp[0]); } -#line 12124 "parser.c" +#line 12165 "parser.c" break; case 1239: /* $@106: %empty */ @@ -12128,7 +12169,7 @@ yyparse (void) { current_expr = NULL; } -#line 12132 "parser.c" +#line 12173 "parser.c" break; case 1240: /* partial_expr: $@106 expr_tokens */ @@ -12136,337 +12177,337 @@ yyparse (void) { yyval = cb_list_reverse (current_expr); } -#line 12140 "parser.c" +#line 12181 "parser.c" break; case 1241: /* expr_tokens: expr_token x */ #line 6549 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12146 "parser.c" +#line 12187 "parser.c" break; case 1242: /* expr_tokens: expr_tokens ')' */ #line 6550 "parser.y" { push_expr (')', NULL); } -#line 12152 "parser.c" +#line 12193 "parser.c" break; case 1243: /* expr_tokens: expr_token OMITTED */ #line 6552 "parser.y" { push_expr ('O', NULL); } -#line 12158 "parser.c" +#line 12199 "parser.c" break; case 1244: /* expr_tokens: expr_token NUMERIC */ #line 6553 "parser.y" { push_expr ('9', NULL); } -#line 12164 "parser.c" +#line 12205 "parser.c" break; case 1245: /* expr_tokens: expr_token ALPHABETIC */ #line 6554 "parser.y" { push_expr ('A', NULL); } -#line 12170 "parser.c" +#line 12211 "parser.c" break; case 1246: /* expr_tokens: expr_token "ALPHABETIC-LOWER" */ #line 6555 "parser.y" { push_expr ('L', NULL); } -#line 12176 "parser.c" +#line 12217 "parser.c" break; case 1247: /* expr_tokens: expr_token "ALPHABETIC-UPPER" */ #line 6556 "parser.y" { push_expr ('U', NULL); } -#line 12182 "parser.c" +#line 12223 "parser.c" break; case 1248: /* expr_tokens: expr_token CLASS_NAME */ #line 6557 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12188 "parser.c" +#line 12229 "parser.c" break; case 1249: /* expr_tokens: expr_tokens OMITTED */ #line 6559 "parser.y" { push_expr ('O', NULL); } -#line 12194 "parser.c" +#line 12235 "parser.c" break; case 1250: /* expr_tokens: expr_tokens NUMERIC */ #line 6560 "parser.y" { push_expr ('9', NULL); } -#line 12200 "parser.c" +#line 12241 "parser.c" break; case 1251: /* expr_tokens: expr_tokens ALPHABETIC */ #line 6561 "parser.y" { push_expr ('A', NULL); } -#line 12206 "parser.c" +#line 12247 "parser.c" break; case 1252: /* expr_tokens: expr_tokens "ALPHABETIC-LOWER" */ #line 6562 "parser.y" { push_expr ('L', NULL); } -#line 12212 "parser.c" +#line 12253 "parser.c" break; case 1253: /* expr_tokens: expr_tokens "ALPHABETIC-UPPER" */ #line 6563 "parser.y" { push_expr ('U', NULL); } -#line 12218 "parser.c" +#line 12259 "parser.c" break; case 1254: /* expr_tokens: expr_tokens CLASS_NAME */ #line 6564 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12224 "parser.c" +#line 12265 "parser.c" break; case 1255: /* expr_tokens: expr_token POSITIVE */ #line 6566 "parser.y" { push_expr ('P', NULL); } -#line 12230 "parser.c" +#line 12271 "parser.c" break; case 1256: /* expr_tokens: expr_token NEGATIVE */ #line 6567 "parser.y" { push_expr ('N', NULL); } -#line 12236 "parser.c" +#line 12277 "parser.c" break; case 1257: /* expr_tokens: expr_tokens POSITIVE */ #line 6569 "parser.y" { push_expr ('P', NULL); } -#line 12242 "parser.c" +#line 12283 "parser.c" break; case 1258: /* expr_tokens: expr_tokens NEGATIVE */ #line 6570 "parser.y" { push_expr ('N', NULL); } -#line 12248 "parser.c" +#line 12289 "parser.c" break; case 1259: /* expr_tokens: expr_tokens ZERO */ #line 6571 "parser.y" { push_expr ('x', cb_zero); } -#line 12254 "parser.c" +#line 12295 "parser.c" break; case 1263: /* expr_token: expr_token '(' */ #line 6578 "parser.y" { push_expr ('(', NULL); } -#line 12260 "parser.c" +#line 12301 "parser.c" break; case 1264: /* expr_token: expr_token '+' */ #line 6580 "parser.y" { push_expr ('+', NULL); } -#line 12266 "parser.c" +#line 12307 "parser.c" break; case 1265: /* expr_token: expr_token '-' */ #line 6581 "parser.y" { push_expr ('-', NULL); } -#line 12272 "parser.c" +#line 12313 "parser.c" break; case 1266: /* expr_token: expr_token '^' */ #line 6582 "parser.y" { push_expr ('^', NULL); } -#line 12278 "parser.c" +#line 12319 "parser.c" break; case 1267: /* expr_token: expr_token NOT */ #line 6584 "parser.y" { push_expr ('!', NULL); } -#line 12284 "parser.c" +#line 12325 "parser.c" break; case 1268: /* expr_token: expr_tokens NOT */ #line 6585 "parser.y" { push_expr ('!', NULL); } -#line 12290 "parser.c" +#line 12331 "parser.c" break; case 1269: /* expr_token: expr_tokens '+' */ #line 6587 "parser.y" { push_expr ('+', NULL); } -#line 12296 "parser.c" +#line 12337 "parser.c" break; case 1270: /* expr_token: expr_tokens '-' */ #line 6588 "parser.y" { push_expr ('-', NULL); } -#line 12302 "parser.c" +#line 12343 "parser.c" break; case 1271: /* expr_token: expr_tokens '*' */ #line 6589 "parser.y" { push_expr ('*', NULL); } -#line 12308 "parser.c" +#line 12349 "parser.c" break; case 1272: /* expr_token: expr_tokens '/' */ #line 6590 "parser.y" { push_expr ('/', NULL); } -#line 12314 "parser.c" +#line 12355 "parser.c" break; case 1273: /* expr_token: expr_tokens '^' */ #line 6591 "parser.y" { push_expr ('^', NULL); } -#line 12320 "parser.c" +#line 12361 "parser.c" break; case 1274: /* expr_token: expr_tokens eq */ #line 6593 "parser.y" { push_expr ('=', NULL); } -#line 12326 "parser.c" +#line 12367 "parser.c" break; case 1275: /* expr_token: expr_tokens gt */ #line 6594 "parser.y" { push_expr ('>', NULL); } -#line 12332 "parser.c" +#line 12373 "parser.c" break; case 1276: /* expr_token: expr_tokens lt */ #line 6595 "parser.y" { push_expr ('<', NULL); } -#line 12338 "parser.c" +#line 12379 "parser.c" break; case 1277: /* expr_token: expr_tokens ge */ #line 6596 "parser.y" { push_expr (']', NULL); } -#line 12344 "parser.c" +#line 12385 "parser.c" break; case 1278: /* expr_token: expr_tokens le */ #line 6597 "parser.y" { push_expr ('[', NULL); } -#line 12350 "parser.c" +#line 12391 "parser.c" break; case 1279: /* expr_token: expr_tokens NE */ #line 6598 "parser.y" { push_expr ('~', NULL); } -#line 12356 "parser.c" +#line 12397 "parser.c" break; case 1280: /* expr_token: expr_token eq */ #line 6600 "parser.y" { push_expr ('=', NULL); } -#line 12362 "parser.c" +#line 12403 "parser.c" break; case 1281: /* expr_token: expr_token gt */ #line 6601 "parser.y" { push_expr ('>', NULL); } -#line 12368 "parser.c" +#line 12409 "parser.c" break; case 1282: /* expr_token: expr_token lt */ #line 6602 "parser.y" { push_expr ('<', NULL); } -#line 12374 "parser.c" +#line 12415 "parser.c" break; case 1283: /* expr_token: expr_token ge */ #line 6603 "parser.y" { push_expr (']', NULL); } -#line 12380 "parser.c" +#line 12421 "parser.c" break; case 1284: /* expr_token: expr_token le */ #line 6604 "parser.y" { push_expr ('[', NULL); } -#line 12386 "parser.c" +#line 12427 "parser.c" break; case 1285: /* expr_token: expr_token NE */ #line 6605 "parser.y" { push_expr ('~', NULL); } -#line 12392 "parser.c" +#line 12433 "parser.c" break; case 1286: /* expr_token: expr_tokens AND */ #line 6607 "parser.y" { push_expr ('&', NULL); } -#line 12398 "parser.c" +#line 12439 "parser.c" break; case 1287: /* expr_token: expr_tokens OR */ #line 6608 "parser.y" { push_expr ('|', NULL); } -#line 12404 "parser.c" +#line 12445 "parser.c" break; case 1301: /* exp_list: exp */ #line 6620 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12410 "parser.c" +#line 12451 "parser.c" break; case 1302: /* exp_list: exp_list e_sep exp */ #line 6621 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 12416 "parser.c" +#line 12457 "parser.c" break; case 1306: /* exp: arith_x */ #line 6630 "parser.y" { yyval = yyvsp[0]; } -#line 12422 "parser.c" +#line 12463 "parser.c" break; case 1307: /* exp: exp '+' exp */ #line 6631 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '+', yyvsp[0]); } -#line 12428 "parser.c" +#line 12469 "parser.c" break; case 1308: /* exp: exp '-' exp */ #line 6632 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '-', yyvsp[0]); } -#line 12434 "parser.c" +#line 12475 "parser.c" break; case 1309: /* exp: exp '*' exp */ #line 6633 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '*', yyvsp[0]); } -#line 12440 "parser.c" +#line 12481 "parser.c" break; case 1310: /* exp: exp '/' exp */ #line 6634 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '/', yyvsp[0]); } -#line 12446 "parser.c" +#line 12487 "parser.c" break; case 1311: /* exp: '+' exp */ #line 6635 "parser.y" { yyval = yyvsp[0]; } -#line 12452 "parser.c" +#line 12493 "parser.c" break; case 1312: /* exp: '-' exp */ #line 6636 "parser.y" { yyval = cb_build_binary_op (cb_zero, '-', yyvsp[0]); } -#line 12458 "parser.c" +#line 12499 "parser.c" break; case 1313: /* exp: exp '^' exp */ #line 6637 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '^', yyvsp[0]); } -#line 12464 "parser.c" +#line 12505 "parser.c" break; case 1314: /* exp: '(' exp ')' */ #line 6638 "parser.y" { yyval = yyvsp[-1]; } -#line 12470 "parser.c" +#line 12511 "parser.c" break; case 1315: /* linage_counter: "LINAGE-COUNTER" */ @@ -12482,7 +12523,7 @@ yyparse (void) yyval = linage_file->linage_ctr; } } -#line 12486 "parser.c" +#line 12527 "parser.c" break; case 1316: /* linage_counter: "LINAGE-COUNTER" in_of "Identifier" */ @@ -12495,25 +12536,25 @@ yyparse (void) yyval = cb_error_node; } } -#line 12499 "parser.c" +#line 12540 "parser.c" break; case 1317: /* arithmetic_x_list: arithmetic_x */ #line 6676 "parser.y" { yyval = yyvsp[0]; } -#line 12505 "parser.c" +#line 12546 "parser.c" break; case 1318: /* arithmetic_x_list: arithmetic_x_list arithmetic_x */ #line 6678 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 12511 "parser.c" +#line 12552 "parser.c" break; case 1319: /* arithmetic_x: x flag_rounded */ #line 6682 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 12517 "parser.c" +#line 12558 "parser.c" break; case 1320: /* record_name: qualified_word */ @@ -12534,7 +12575,7 @@ yyparse (void) } yyval = x; } -#line 12538 "parser.c" +#line 12579 "parser.c" break; case 1321: /* table_name: qualified_word */ @@ -12553,7 +12594,7 @@ yyparse (void) yyval = yyvsp[0]; } } -#line 12557 "parser.c" +#line 12598 "parser.c" break; case 1322: /* file_name_list: file_name */ @@ -12561,7 +12602,7 @@ yyparse (void) { yyval = cb_list_init (yyvsp[0]); } -#line 12565 "parser.c" +#line 12606 "parser.c" break; case 1323: /* file_name_list: file_name_list file_name */ @@ -12578,7 +12619,7 @@ yyparse (void) yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } } -#line 12582 "parser.c" +#line 12623 "parser.c" break; case 1324: /* file_name: "Identifier" */ @@ -12591,37 +12632,37 @@ yyparse (void) yyval = cb_error_node; } } -#line 12595 "parser.c" +#line 12636 "parser.c" break; case 1325: /* mnemonic_name_list: mnemonic_name */ #line 6764 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12601 "parser.c" +#line 12642 "parser.c" break; case 1326: /* mnemonic_name_list: mnemonic_name_list mnemonic_name */ #line 6766 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12607 "parser.c" +#line 12648 "parser.c" break; case 1327: /* mnemonic_name: "MNEMONIC NAME" */ #line 6770 "parser.y" { yyval = yyvsp[0]; } -#line 12613 "parser.c" +#line 12654 "parser.c" break; case 1328: /* procedure_name_list: %empty */ #line 6776 "parser.y" { yyval = NULL; } -#line 12619 "parser.c" +#line 12660 "parser.c" break; case 1329: /* procedure_name_list: procedure_name_list procedure_name */ #line 6778 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12625 "parser.c" +#line 12666 "parser.c" break; case 1330: /* procedure_name: label */ @@ -12631,7 +12672,7 @@ yyparse (void) CB_REFERENCE (yyval)->offset = CB_TREE (current_section); current_program->label_list = cb_cons (yyval, current_program->label_list); } -#line 12635 "parser.c" +#line 12676 "parser.c" break; case 1334: /* integer_label: "Literal" */ @@ -12641,19 +12682,19 @@ yyparse (void) yyval->source_file = yyvsp[0]->source_file; yyval->source_line = yyvsp[0]->source_line; } -#line 12645 "parser.c" +#line 12686 "parser.c" break; case 1335: /* reference_list: reference */ #line 6808 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12651 "parser.c" +#line 12692 "parser.c" break; case 1336: /* reference_list: reference_list reference */ #line 6809 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12657 "parser.c" +#line 12698 "parser.c" break; case 1337: /* reference: qualified_word */ @@ -12662,31 +12703,31 @@ yyparse (void) yyval = yyvsp[0]; current_program->reference_list = cb_cons (yyval, current_program->reference_list); } -#line 12666 "parser.c" +#line 12707 "parser.c" break; case 1338: /* no_reference_list: qualified_word */ #line 6823 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12672 "parser.c" +#line 12713 "parser.c" break; case 1339: /* no_reference_list: no_reference_list qualified_word */ #line 6824 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12678 "parser.c" +#line 12719 "parser.c" break; case 1340: /* opt_reference: %empty */ #line 6828 "parser.y" { yyval = NULL; } -#line 12684 "parser.c" +#line 12725 "parser.c" break; case 1341: /* opt_reference: reference */ #line 6829 "parser.y" { yyval = yyvsp[0]; } -#line 12690 "parser.c" +#line 12731 "parser.c" break; case 1344: /* undefined_word: "Identifier" */ @@ -12698,145 +12739,145 @@ yyparse (void) yyval = cb_error_node; } } -#line 12702 "parser.c" +#line 12743 "parser.c" break; case 1345: /* target_x_list: target_x */ #line 6860 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12708 "parser.c" +#line 12749 "parser.c" break; case 1346: /* target_x_list: target_x_list target_x */ #line 6861 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12714 "parser.c" +#line 12755 "parser.c" break; case 1348: /* target_x: ADDRESS _of identifier_1 */ #line 6866 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12720 "parser.c" +#line 12761 "parser.c" break; case 1349: /* x_list: x */ #line 6870 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12726 "parser.c" +#line 12767 "parser.c" break; case 1350: /* x_list: x_list x */ #line 6871 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12732 "parser.c" +#line 12773 "parser.c" break; case 1352: /* x: LENGTH _of identifier_1 */ #line 6876 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12738 "parser.c" +#line 12779 "parser.c" break; case 1353: /* x: LENGTH _of basic_literal */ #line 6877 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12744 "parser.c" +#line 12785 "parser.c" break; case 1354: /* x: LENGTH _of function */ #line 6878 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12750 "parser.c" +#line 12791 "parser.c" break; case 1355: /* x: ADDRESS _of prog_or_entry alnum_or_id */ #line 6879 "parser.y" { yyval = cb_build_ppointer (yyvsp[0]); } -#line 12756 "parser.c" +#line 12797 "parser.c" break; case 1356: /* x: ADDRESS _of identifier_1 */ #line 6880 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12762 "parser.c" +#line 12803 "parser.c" break; case 1361: /* arith_x: LENGTH _of identifier_1 */ #line 6888 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12768 "parser.c" +#line 12809 "parser.c" break; case 1362: /* arith_x: LENGTH _of basic_literal */ #line 6889 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12774 "parser.c" +#line 12815 "parser.c" break; case 1363: /* arith_x: LENGTH _of function */ #line 6890 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12780 "parser.c" +#line 12821 "parser.c" break; case 1369: /* alnum_or_id: identifier_1 */ #line 6902 "parser.y" { yyval = yyvsp[0]; } -#line 12786 "parser.c" +#line 12827 "parser.c" break; case 1370: /* alnum_or_id: "Literal" */ #line 6903 "parser.y" { yyval = yyvsp[0]; } -#line 12792 "parser.c" +#line 12833 "parser.c" break; case 1382: /* num_id_or_lit: ZERO */ #line 6937 "parser.y" { yyval = cb_zero; } -#line 12798 "parser.c" +#line 12839 "parser.c" break; case 1383: /* identifier: identifier_1 */ #line 6945 "parser.y" { yyval = cb_build_identifier (yyvsp[0]); } -#line 12804 "parser.c" +#line 12845 "parser.c" break; case 1384: /* identifier_1: qualified_word */ #line 6949 "parser.y" { yyval = yyvsp[0]; } -#line 12810 "parser.c" +#line 12851 "parser.c" break; case 1385: /* identifier_1: qualified_word subref */ #line 6950 "parser.y" { yyval = yyvsp[-1]; } -#line 12816 "parser.c" +#line 12857 "parser.c" break; case 1386: /* identifier_1: qualified_word refmod */ #line 6951 "parser.y" { yyval = yyvsp[-1]; } -#line 12822 "parser.c" +#line 12863 "parser.c" break; case 1387: /* identifier_1: qualified_word subref refmod */ #line 6952 "parser.y" { yyval = yyvsp[-2]; } -#line 12828 "parser.c" +#line 12869 "parser.c" break; case 1388: /* qualified_word: "Identifier" */ #line 6956 "parser.y" { yyval = yyvsp[0]; } -#line 12834 "parser.c" +#line 12875 "parser.c" break; case 1389: /* qualified_word: "Identifier" in_of qualified_word */ #line 6957 "parser.y" { yyval = yyvsp[-2]; CB_REFERENCE (yyvsp[-2])->chain = yyvsp[0]; } -#line 12840 "parser.c" +#line 12881 "parser.c" break; case 1390: /* subref: '(' exp_list ')' */ @@ -12847,7 +12888,7 @@ yyparse (void) CB_REFERENCE (yyvsp[-3])->subs = cb_list_reverse (yyvsp[-1]); } } -#line 12851 "parser.c" +#line 12892 "parser.c" break; case 1391: /* refmod: '(' exp ':' ')' */ @@ -12857,35 +12898,27 @@ yyparse (void) CB_REFERENCE (yyvsp[-4])->value = CB_TREE (cb_field (yyvsp[-4])); if (cb_tree_category (yyvsp[-4]) == CB_CATEGORY_NATIONAL || cb_tree_category (yyvsp[-4]) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ yyvsp[-2] = cb_build_binary_op (yyvsp[-2], '*', cb_int2); yyvsp[-2] = cb_build_binary_op (yyvsp[-2], '-', cb_int1); -#endif /*I18N_UTF8*/ } else { CB_TREE (yyvsp[-4])->category = CB_CATEGORY_ALPHANUMERIC; } CB_REFERENCE (yyvsp[-4])->offset = yyvsp[-2]; } } -#line 12873 "parser.c" +#line 12910 "parser.c" break; case 1392: /* refmod: '(' exp ':' exp ')' */ -#line 6990 "parser.y" +#line 6986 "parser.y" { if (cb_ref (yyvsp[-5]) != cb_error_node) { CB_REFERENCE (yyvsp[-5])->value = CB_TREE (cb_field (yyvsp[-5])); if (cb_tree_category (yyvsp[-5]) == CB_CATEGORY_NATIONAL || cb_tree_category (yyvsp[-5]) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ yyvsp[-3] = cb_build_binary_op (yyvsp[-3], '*', cb_int2); yyvsp[-3] = cb_build_binary_op (yyvsp[-3], '-', cb_int1); yyvsp[-1] = cb_build_binary_op (yyvsp[-1], '*', cb_int2); -#endif /*I18N_UTF8*/ } else { CB_TREE (yyvsp[-5])->category = CB_CATEGORY_ALPHANUMERIC; } @@ -12893,11 +12926,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-5])->length = yyvsp[-1]; } } -#line 12897 "parser.c" +#line 12930 "parser.c" break; case 1393: /* integer: "Literal" */ -#line 7017 "parser.y" +#line 7009 "parser.y" { if (cb_tree_category (yyvsp[0]) != CB_CATEGORY_NUMERIC) { cb_error (_("Integer value expected")); @@ -12906,437 +12939,437 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 12910 "parser.c" +#line 12943 "parser.c" break; case 1394: /* literal: basic_literal */ -#line 7028 "parser.y" +#line 7020 "parser.y" { yyval = yyvsp[0]; } -#line 12916 "parser.c" +#line 12949 "parser.c" break; case 1395: /* literal: ALL basic_value */ -#line 7030 "parser.y" +#line 7022 "parser.y" { yyval = yyvsp[0]; if (CB_LITERAL_P (yyvsp[0])) { CB_LITERAL (yyvsp[0])->all = 1; } } -#line 12927 "parser.c" +#line 12960 "parser.c" break; case 1396: /* basic_literal: basic_value */ -#line 7039 "parser.y" +#line 7031 "parser.y" { yyval = yyvsp[0]; } -#line 12933 "parser.c" +#line 12966 "parser.c" break; case 1397: /* basic_literal: basic_literal '&' basic_value */ -#line 7040 "parser.y" +#line 7032 "parser.y" { yyval = cb_concat_literals (yyvsp[-2], yyvsp[0]); } -#line 12939 "parser.c" +#line 12972 "parser.c" break; case 1398: /* basic_value: "Literal" */ -#line 7044 "parser.y" +#line 7036 "parser.y" { yyval = yyvsp[0]; } -#line 12945 "parser.c" +#line 12978 "parser.c" break; case 1399: /* basic_value: SPACE */ -#line 7045 "parser.y" +#line 7037 "parser.y" { yyval = cb_space; } -#line 12951 "parser.c" +#line 12984 "parser.c" break; case 1400: /* basic_value: ZERO */ -#line 7046 "parser.y" +#line 7038 "parser.y" { yyval = cb_zero; } -#line 12957 "parser.c" +#line 12990 "parser.c" break; case 1401: /* basic_value: QUOTE */ -#line 7047 "parser.y" +#line 7039 "parser.y" { yyval = cb_quote; } -#line 12963 "parser.c" +#line 12996 "parser.c" break; case 1402: /* basic_value: "HIGH-VALUE" */ -#line 7048 "parser.y" +#line 7040 "parser.y" { yyval = cb_high; } -#line 12969 "parser.c" +#line 13002 "parser.c" break; case 1403: /* basic_value: "LOW-VALUE" */ -#line 7049 "parser.y" +#line 7041 "parser.y" { yyval = cb_low; } -#line 12975 "parser.c" +#line 13008 "parser.c" break; case 1404: /* basic_value: "NULL" */ -#line 7050 "parser.y" +#line 7042 "parser.y" { yyval = cb_null; } -#line 12981 "parser.c" +#line 13014 "parser.c" break; case 1405: /* function: "FUNCTION CURRENT-DATE" func_refmod */ -#line 7059 "parser.y" +#line 7051 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12989 "parser.c" +#line 13022 "parser.c" break; case 1406: /* function: "FUNCTION WHEN-COMPILED" func_refmod */ -#line 7063 "parser.y" +#line 7055 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12997 "parser.c" +#line 13030 "parser.c" break; case 1407: /* function: "FUNCTION UPPER-CASE" '(' exp ')' func_refmod */ -#line 7067 "parser.y" +#line 7059 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13005 "parser.c" +#line 13038 "parser.c" break; case 1408: /* function: "FUNCTION LOWER-CASE" '(' exp ')' func_refmod */ -#line 7071 "parser.y" +#line 7063 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13013 "parser.c" +#line 13046 "parser.c" break; case 1409: /* function: "FUNCTION REVERSE" '(' exp ')' func_refmod */ -#line 7075 "parser.y" +#line 7067 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13021 "parser.c" +#line 13054 "parser.c" break; case 1410: /* function: "FUNCTION CONCATENATE" '(' exp_list ')' func_refmod */ -#line 7079 "parser.y" +#line 7071 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13029 "parser.c" +#line 13062 "parser.c" break; case 1411: /* function: "FUNCTION SUBSTITUTE" '(' exp_list ')' func_refmod */ -#line 7083 "parser.y" +#line 7075 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13037 "parser.c" +#line 13070 "parser.c" break; case 1412: /* function: "FUNCTION SUBSTITUTE-CASE" '(' exp_list ')' func_refmod */ -#line 7087 "parser.y" +#line 7079 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13045 "parser.c" +#line 13078 "parser.c" break; case 1413: /* function: "FUNCTION TRIM" '(' trim_args ')' func_refmod */ -#line 7091 "parser.y" +#line 7083 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13053 "parser.c" +#line 13086 "parser.c" break; case 1414: /* function: "FUNCTION NUMVALC" '(' numvalc_args ')' */ -#line 7095 "parser.y" +#line 7087 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-3], yyvsp[-1], NULL); } -#line 13061 "parser.c" +#line 13094 "parser.c" break; case 1415: /* function: "FUNCTION LOCALE" '(' locale_dt_args ')' func_refmod */ -#line 7099 "parser.y" +#line 7091 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13069 "parser.c" +#line 13102 "parser.c" break; case 1416: /* function: "FUNCTION" func_args */ -#line 7103 "parser.y" +#line 7095 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], yyvsp[0], NULL); } -#line 13077 "parser.c" +#line 13110 "parser.c" break; case 1417: /* func_refmod: %empty */ -#line 7109 "parser.y" +#line 7101 "parser.y" { yyval = NULL; } -#line 13083 "parser.c" +#line 13116 "parser.c" break; case 1418: /* func_refmod: '(' exp ':' ')' */ -#line 7110 "parser.y" +#line 7102 "parser.y" { yyval = cb_build_pair (yyvsp[-2], NULL); } -#line 13089 "parser.c" +#line 13122 "parser.c" break; case 1419: /* func_refmod: '(' exp ':' exp ')' */ -#line 7111 "parser.y" +#line 7103 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[-1]); } -#line 13095 "parser.c" +#line 13128 "parser.c" break; case 1420: /* func_args: %empty */ -#line 7115 "parser.y" +#line 7107 "parser.y" { yyval = NULL; } -#line 13101 "parser.c" +#line 13134 "parser.c" break; case 1421: /* func_args: '(' list_func_args ')' */ -#line 7116 "parser.y" +#line 7108 "parser.y" { yyval = yyvsp[-1]; } -#line 13107 "parser.c" +#line 13140 "parser.c" break; case 1422: /* list_func_args: %empty */ -#line 7120 "parser.y" +#line 7112 "parser.y" { yyval = NULL; } -#line 13113 "parser.c" +#line 13146 "parser.c" break; case 1423: /* list_func_args: exp_list */ -#line 7121 "parser.y" +#line 7113 "parser.y" { yyval = yyvsp[0]; } -#line 13119 "parser.c" +#line 13152 "parser.c" break; case 1424: /* trim_args: exp */ -#line 7127 "parser.y" +#line 7119 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_int0); } -#line 13130 "parser.c" +#line 13163 "parser.c" break; case 1425: /* trim_args: exp e_sep LEADING */ -#line 7134 "parser.y" +#line 7126 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int1); } -#line 13141 "parser.c" +#line 13174 "parser.c" break; case 1426: /* trim_args: exp e_sep TRAILING */ -#line 7141 "parser.y" +#line 7133 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int2); } -#line 13152 "parser.c" +#line 13185 "parser.c" break; case 1427: /* numvalc_args: exp */ -#line 7151 "parser.y" +#line 7143 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13163 "parser.c" +#line 13196 "parser.c" break; case 1428: /* numvalc_args: exp e_sep exp */ -#line 7158 "parser.y" +#line 7150 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, yyvsp[0]); } -#line 13174 "parser.c" +#line 13207 "parser.c" break; case 1429: /* locale_dt_args: exp */ -#line 7168 "parser.y" +#line 7160 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13185 "parser.c" +#line 13218 "parser.c" break; case 1430: /* locale_dt_args: exp e_sep reference */ -#line 7175 "parser.y" +#line 7167 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_ref (yyvsp[0])); } -#line 13196 "parser.c" +#line 13229 "parser.c" break; case 1431: /* not_const_word: %empty */ -#line 7188 "parser.y" +#line 7180 "parser.y" { non_const_word = 1; } -#line 13204 "parser.c" +#line 13237 "parser.c" break; case 1432: /* flag_all: %empty */ -#line 7198 "parser.y" +#line 7190 "parser.y" { yyval = cb_int0; } -#line 13210 "parser.c" +#line 13243 "parser.c" break; case 1433: /* flag_all: ALL */ -#line 7199 "parser.y" +#line 7191 "parser.y" { yyval = cb_int1; } -#line 13216 "parser.c" +#line 13249 "parser.c" break; case 1434: /* flag_duplicates: %empty */ -#line 7203 "parser.y" +#line 7195 "parser.y" { yyval = cb_int0; } -#line 13222 "parser.c" +#line 13255 "parser.c" break; case 1435: /* flag_duplicates: with_dups */ -#line 7204 "parser.y" +#line 7196 "parser.y" { yyval = cb_int1; } -#line 13228 "parser.c" +#line 13261 "parser.c" break; case 1436: /* flag_initialized: %empty */ -#line 7208 "parser.y" +#line 7200 "parser.y" { yyval = NULL; } -#line 13234 "parser.c" +#line 13267 "parser.c" break; case 1437: /* flag_initialized: INITIALIZED */ -#line 7209 "parser.y" +#line 7201 "parser.y" { yyval = cb_int1; } -#line 13240 "parser.c" +#line 13273 "parser.c" break; case 1438: /* flag_next: %empty */ -#line 7213 "parser.y" +#line 7205 "parser.y" { yyval = cb_int0; } -#line 13246 "parser.c" +#line 13279 "parser.c" break; case 1439: /* flag_next: NEXT */ -#line 7214 "parser.y" +#line 7206 "parser.y" { yyval = cb_int1; } -#line 13252 "parser.c" +#line 13285 "parser.c" break; case 1440: /* flag_next: PREVIOUS */ -#line 7215 "parser.y" +#line 7207 "parser.y" { yyval = cb_int2; } -#line 13258 "parser.c" +#line 13291 "parser.c" break; case 1441: /* flag_not: %empty */ -#line 7219 "parser.y" +#line 7211 "parser.y" { yyval = cb_int0; } -#line 13264 "parser.c" +#line 13297 "parser.c" break; case 1442: /* flag_not: NOT */ -#line 7220 "parser.y" +#line 7212 "parser.y" { yyval = cb_int1; } -#line 13270 "parser.c" +#line 13303 "parser.c" break; case 1443: /* flag_optional: %empty */ -#line 7224 "parser.y" +#line 7216 "parser.y" { yyval = cb_int0; } -#line 13276 "parser.c" +#line 13309 "parser.c" break; case 1444: /* flag_optional: OPTIONAL */ -#line 7225 "parser.y" +#line 7217 "parser.y" { yyval = cb_int1; } -#line 13282 "parser.c" +#line 13315 "parser.c" break; case 1445: /* flag_rounded: %empty */ -#line 7229 "parser.y" +#line 7221 "parser.y" { yyval = cb_int0; } -#line 13288 "parser.c" +#line 13321 "parser.c" break; case 1446: /* flag_rounded: ROUNDED */ -#line 7230 "parser.y" +#line 7222 "parser.y" { yyval = cb_int1; } -#line 13294 "parser.c" +#line 13327 "parser.c" break; case 1447: /* flag_separate: %empty */ -#line 7234 "parser.y" +#line 7226 "parser.y" { yyval = cb_int0; } -#line 13300 "parser.c" +#line 13333 "parser.c" break; case 1448: /* flag_separate: SEPARATE _character */ -#line 7235 "parser.y" +#line 7227 "parser.y" { yyval = cb_int1; } -#line 13306 "parser.c" +#line 13339 "parser.c" break; case 1460: /* _also: ALSO */ -#line 7248 "parser.y" +#line 7240 "parser.y" { yyval = cb_int1; } -#line 13312 "parser.c" +#line 13345 "parser.c" break; case 1489: /* _is: %empty */ -#line 7263 "parser.y" +#line 7255 "parser.y" { yyval = NULL; } -#line 13318 "parser.c" +#line 13351 "parser.c" break; case 1490: /* _is: IS */ -#line 7263 "parser.y" +#line 7255 "parser.y" { yyval = cb_int1; } -#line 13324 "parser.c" +#line 13357 "parser.c" break; case 1501: /* _literal: %empty */ -#line 7268 "parser.y" +#line 7260 "parser.y" { yyval = NULL; } -#line 13330 "parser.c" +#line 13363 "parser.c" break; case 1502: /* _literal: "Literal" */ -#line 7268 "parser.y" +#line 7260 "parser.y" { yyval = yyvsp[0]; } -#line 13336 "parser.c" +#line 13369 "parser.c" break; -#line 13340 "parser.c" +#line 13373 "parser.c" default: break; } @@ -13418,7 +13451,6 @@ yyparse (void) label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; - ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -13479,7 +13511,7 @@ yyparse (void) `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturnlab; + goto yyreturn; /*-----------------------------------. @@ -13487,22 +13519,24 @@ yyparse (void) `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturnlab; + goto yyreturn; -/*-----------------------------------------------------------. -| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | -`-----------------------------------------------------------*/ +#if !defined yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturnlab; + goto yyreturn; +#endif -/*----------------------------------------------------------. -| yyreturnlab -- parsing is finished, clean up and return. | -`----------------------------------------------------------*/ -yyreturnlab: +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -13529,5 +13563,5 @@ yyparse (void) return yyresult; } -#line 7293 "parser.y" +#line 7285 "parser.y" diff --git a/cobj/parser.y b/cobj/parser.y index 524bc1f8..187b5190 100644 --- a/cobj/parser.y +++ b/cobj/parser.y @@ -6974,12 +6974,8 @@ refmod: CB_REFERENCE ($0)->value = CB_TREE (cb_field ($0)); if (cb_tree_category ($0) == CB_CATEGORY_NATIONAL || cb_tree_category ($0) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ $2 = cb_build_binary_op ($2, '*', cb_int2); $2 = cb_build_binary_op ($2, '-', cb_int1); -#endif /*I18N_UTF8*/ } else { CB_TREE ($0)->category = CB_CATEGORY_ALPHANUMERIC; } @@ -6992,13 +6988,9 @@ refmod: CB_REFERENCE ($0)->value = CB_TREE (cb_field ($0)); if (cb_tree_category ($0) == CB_CATEGORY_NATIONAL || cb_tree_category ($0) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ $2 = cb_build_binary_op ($2, '*', cb_int2); $2 = cb_build_binary_op ($2, '-', cb_int1); $4 = cb_build_binary_op ($4, '*', cb_int2); -#endif /*I18N_UTF8*/ } else { CB_TREE ($0)->category = CB_CATEGORY_ALPHANUMERIC; } diff --git a/cobj/pplex.c b/cobj/pplex.c index 3be62fbb..7a3e6e35 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -1,8 +1,8 @@ -#line 2 "pplex.c" +#line 1 "pplex.c" -#line 4 "pplex.c" +#line 3 "pplex.c" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -276,10 +276,10 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -#include #include -#include #include +#include +#include /* end standard C headers. */ @@ -290,10 +290,10 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -310,41 +310,41 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -368,7 +368,7 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less @@ -379,12 +379,12 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start)-1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin) +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -400,10 +400,9 @@ typedef unsigned int flex_uint32_t; #endif /* __ia64__ */ #endif -/* The state buf must be large enough to hold one state per character in the - * main buffer. +/* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -422,90 +421,94 @@ extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET(yy_c_buf_p) = yy_cp = \ - yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, (yytext_ptr)) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -513,8 +516,9 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER \ - ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ @@ -522,62 +526,64 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart(FILE *input_file); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size); -void yy_delete_buffer(YY_BUFFER_STATE b); -void yy_flush_buffer(YY_BUFFER_STATE b); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer); -void yypop_buffer_state(void); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -static void yyensure_buffer_stack(void); -static void yy_load_buffer_state(void); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER) +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size); -YY_BUFFER_STATE yy_scan_string(const char *yy_str); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, int len); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -void *yyalloc(yy_size_t); -void *yyrealloc(void *, yy_size_t); -void yyfree(void *); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define ppwrap() (/*CONSTCOND*/ 1) +#define ppwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -594,820 +600,1445 @@ extern char *yytext; #endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state(void); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state); -static int yy_get_next_buffer(void); -static void yynoreturn yy_fatal_error(const char *msg); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int)(yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 99 #define YY_END_OF_BUFFER 100 /* This struct is not used in this scanner, but its presence is necessary. */ -struct yy_trans_info { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[609] = { - 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 100, 98, 73, 74, 98, 98, - 76, 77, 98, 98, 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 98, 98, 74, 12, 13, 93, 98, 16, 15, 16, 12, 13, 44, - 20, 21, 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, 44, 44, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 44, 44, 12, 13, 51, 45, 46, 51, 51, - 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, 51, 12, 13, 60, 55, 56, - - 60, 60, 60, 60, 60, 57, 60, 57, 60, 57, 57, 57, 57, 60, 60, 12, 13, - 74, 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, 95, 95, 0, 0, 74, 0, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 74, 93, 0, 12, 1, 13, 93, 16, 1, 12, 1, 13, - 21, 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, 0, 23, 36, 26, 27, 41, - 41, 28, 41, 41, 41, 41, 46, 0, 0, 50, 0, 0, 49, 45, 48, - - 48, 0, 0, 47, 56, 0, 0, 59, 0, 0, 58, 55, 57, 57, 0, 0, 57, - 57, 57, 1, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 0, 95, 0, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, - 95, 1, 1, 1, 41, 41, 29, 41, 41, 41, 41, 41, 41, 57, 57, 57, 0, - 0, 0, 0, 89, 0, 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, 95, 95, - 0, 0, 95, 95, 95, 80, 0, 95, 95, 95, 95, 95, 95, 95, 95, - - 95, 95, 92, 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 52, 57, 57, 82, - 0, 81, 0, 95, 95, 0, 0, 95, 69, 0, 0, 0, 95, 95, 0, 0, 95, - 0, 95, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 0, - 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, 62, 95, 0, 0, 95, - 95, 95, 69, 0, 0, 95, 0, 0, 91, 0, 95, 0, 95, 95, 95, 90, 0, - 95, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, 0, 0, 95, - - 0, 41, 41, 37, 41, 41, 38, 41, 41, 57, 57, 95, 0, 95, 95, 95, 0, - 0, 95, 85, 0, 95, 0, 95, 18, 95, 95, 14, 95, 95, 67, 19, 95, 95, - 78, 0, 0, 0, 35, 33, 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, 95, - 95, 95, 0, 0, 95, 95, 0, 95, 95, 95, 95, 95, 68, 0, 0, 79, 0, - 41, 31, 41, 41, 30, 34, 0, 0, 0, 95, 95, 95, 0, 0, 95, 0, 95, - 0, 0, 95, 95, 95, 95, 61, 83, 0, 39, 32, 40, 86, 0, 0, - - 0, 0, 95, 95, 95, 0, 0, 95, 0, 0, 95, 0, 95, 95, 0, 0, 5, - 0, 0, 0, 95, 95, 95, 0, 10, 95, 0, 6, 0, 95, 95, 0, 0, 0, - 0, 0, 0, 95, 95, 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, 0, 0, - 0, 8, 65, 64, 0, 0, 0, 95, 0, 0, 0, 0, 0, 95, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 0, 0, 9, 0, 0, 0, 0, 88, 7, - - 0, 0, 0, 0, 0, 2, 0, 0}; - -static const YY_CHAR yy_ec[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, - 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, 14, 14, 14, 14, - 14, 1, 18, 1, 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 38, 47, 47, 47, 47, - 38, 47, 48, 49, 50, 51, - - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 38, 64, 65, 66, 67, 68, 69, - 70, 71, 38, 47, 47, 47, 47, 1, 47, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, - - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 1, 1, 1}; - -static const YY_CHAR yy_meta[75] = { - 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}; - -static const flex_int16_t yy_base[632] = { - 0, 0, 72, 74, 82, 144, 70, 218, 291, 364, 83, 871, - 3699, 3699, 241, 866, 858, 3699, 3699, 839, 87, 243, 252, 95, - 260, 245, 429, 67, 436, 432, 446, 473, 501, 517, 512, 539, - 532, 545, 609, 617, 268, 831, 0, 586, 625, 0, 3699, 829, - 808, 0, 3699, 3699, 246, 808, 787, 3699, 3699, 771, 103, 651, - 633, 111, 659, 248, 755, 276, 487, 645, 667, 671, 674, 677, - 681, 684, 699, 703, 748, 767, 753, 0, 3699, 3699, 249, 764, - 747, 717, 119, 784, 792, 340, 801, 448, 715, 717, 810, 822, - 699, 0, 3699, 3699, 251, - - 710, 698, 679, 449, 838, 865, 873, 881, 471, 832, 850, 889, - 899, 918, 931, 677, 0, 258, 671, 676, 3699, 646, 0, 903, - 965, 3699, 270, 601, 835, 973, 981, 989, 275, 589, 997, 1001, - 1012, 1006, 1025, 1009, 1028, 1051, 1031, 1055, 1077, 1096, 1101, 1127, - 1104, 1108, 1150, 1083, 1122, 1133, 1155, 1130, 475, 226, 571, 0, - 0, 0, 1176, 0, 0, 0, 0, 0, 286, 565, 579, 3699, - 577, 1202, 1219, 3699, 1173, 1227, 1240, 1248, 3699, 1199, 1220, 1256, - 1264, 1267, 1270, 1278, 1295, 1334, 1300, 442, 554, 568, 3699, 565, - 1364, 1374, 3699, 1291, - - 1384, 1398, 1406, 3699, 444, 513, 527, 3699, 512, 1414, 1422, 3699, - 1392, 1432, 1456, 1464, 1423, 1477, 1451, 0, 1480, 1496, 953, 1518, - 1490, 1506, 1510, 1532, 1549, 1440, 1545, 1554, 1564, 1578, 481, 1581, - 1645, 1575, 1597, 1629, 1661, 1655, 1669, 1673, 1676, 1679, 1690, 1693, - 1697, 1758, 1766, 1725, 0, 0, 0, 1774, 1743, 1778, 1781, 1791, - 1800, 1795, 1807, 1813, 1819, 1828, 1845, 1879, 1895, 1911, 1919, 312, - 466, 1887, 1909, 1865, 1912, 1933, 1929, 698, 1957, 1951, 1936, 1977, - 1945, 68, 455, 1981, 1984, 1988, 320, 449, 2017, 2020, 2002, 2025, - 2030, 2033, 2052, 2067, - - 2075, 2097, 329, 446, 2100, 2058, 2103, 2108, 2055, 2131, 2144, 2122, - 2125, 2134, 2173, 2177, 345, 434, 563, 431, 2180, 2199, 961, 2212, - 2224, 2208, 39, 77, 422, 2227, 2252, 2288, 2296, 2265, 213, 2306, - 2276, 2282, 2317, 2353, 2332, 2318, 2346, 2341, 2335, 2365, 2370, 2374, - 2382, 2399, 2414, 2446, 2438, 2424, 2454, 2463, 2458, 2467, 2471, 2480, - 2489, 2495, 2513, 2492, 2537, 419, 419, 2544, 2559, 2563, 3699, 418, - 424, 2547, 2574, 2627, 592, 332, 2587, 498, 2603, 2614, 2595, 599, - 330, 2591, 2640, 2635, 2643, 2660, 2667, 2679, 3699, 3699, 3699, 2682, - 943, 310, 2707, 2724, - - 2746, 2718, 2731, 2738, 2754, 2765, 2768, 2774, 2771, 2761, 2790, 2795, - 271, 2818, 2841, 2844, 545, 616, 2838, 1269, 301, 2810, 417, 2847, - 2807, 2874, 2863, 2877, 2883, 2889, 2894, 2897, 2911, 2922, 1302, 298, - 2928, 2964, 2916, 2941, 2961, 2981, 2989, 2994, 2998, 3011, 2953, 3005, - 3034, 622, 3031, 3018, 3039, 459, 471, 3046, 3076, 632, 3085, 3089, - 3098, 3103, 3113, 3110, 3124, 3177, 3129, 266, 3153, 3142, 3156, 3162, - 3167, 3185, 3216, 3238, 483, 3211, 3190, 3235, 652, 668, 3226, 1459, - 3256, 3279, 659, 3270, 3267, 3201, 3294, 3259, 1310, 259, 3299, 3303, - 3310, 1338, 665, 523, - - 258, 682, 3315, 3323, 3326, 686, 759, 3339, 767, 242, 3334, 768, - 3348, 3374, 1466, 3412, 3344, 799, 864, 810, 3382, 3392, 3358, 823, - 3699, 3429, 617, 3403, 527, 3433, 3425, 838, 122, 853, 1107, 121, - 865, 3441, 3457, 3438, 3699, 1671, 3505, 884, 1005, 3699, 117, 3471, - 3462, 712, 954, 961, 3699, 3467, 3475, 993, 116, 745, 3515, 996, - 996, 995, 762, 1002, 3481, 838, 1311, 1019, 1036, 1069, 1786, 3545, - 1091, 3565, 111, 1160, 866, 1163, 1191, 109, 1234, 1596, 1276, 1291, - 1353, 906, 1296, 1523, 1297, 1548, 3699, 101, 1319, 3699, 3569, 93, - 1331, 994, 1699, 3699, - - 1339, 1341, 1350, 1646, 1728, 3699, 87, 3699, 3641, 3644, 3647, 3650, - 97, 3653, 3656, 3659, 3662, 3665, 3668, 3671, 91, 3674, 3677, 90, - 3680, 3683, 89, 3686, 3689, 3692, 3695}; - -static const flex_int16_t yy_def[632] = { - 0, 608, 1, 609, 609, 608, 5, 610, 610, 608, 9, 608, 608, 608, 608, - 611, 612, 608, 608, 608, 608, 608, 613, 608, 613, 608, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 614, 615, 613, 613, - 616, 608, 616, 617, 618, 608, 608, 608, 619, 620, 608, 608, 608, 608, 608, - 621, 608, 621, 608, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 621, 621, 614, 615, 608, 608, 608, 622, 623, 608, 608, 608, 624, 608, - 624, 608, 608, 624, 624, 624, 614, 615, 608, 608, 608, - - 625, 626, 608, 608, 608, 627, 608, 627, 608, 627, 627, 627, 627, 627, 627, - 614, 615, 608, 608, 611, 608, 612, 628, 608, 608, 608, 608, 608, 613, 613, - 613, 613, 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 608, 608, 614, - 629, 615, 613, 616, 630, 617, 631, 618, 608, 608, 619, 608, 620, 608, 608, - 608, 621, 621, 621, 621, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 608, 608, 622, 608, 623, 608, 608, 608, 624, - - 624, 624, 624, 608, 608, 608, 625, 608, 626, 608, 608, 608, 627, 627, 627, - 627, 627, 627, 627, 628, 613, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 629, 630, 631, 621, 621, 621, 621, 621, - 621, 621, 621, 621, 627, 627, 627, 608, 613, 608, 613, 608, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, 608, 608, 613, 613, 613, - 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, - - 613, 613, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, - 627, 608, 608, 608, 608, 613, 613, 608, 613, 613, 613, 608, 608, 608, 613, - 613, 608, 613, 613, 608, 613, 613, 613, 608, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 608, 613, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 613, 608, 608, 613, 613, 613, 608, 608, 608, 613, 608, - 613, 608, 608, 613, 608, 613, 613, 613, 608, 608, 613, 613, 613, 613, 613, - 613, 613, 608, 608, 608, 613, 608, 608, 608, 613, - - 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, 613, 608, 613, 613, - 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 608, 613, 613, 613, 608, 608, 613, 613, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 608, 608, 621, 621, 621, 621, 621, 621, 608, - 613, 608, 613, 613, 613, 608, 608, 613, 608, 613, 613, 608, 613, 613, 613, - 613, 613, 608, 608, 621, 621, 621, 608, 608, 608, - - 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 608, - 613, 613, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 613, 608, 613, - 613, 608, 608, 608, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, - 608, 608, 613, 613, 608, 608, 608, 608, 613, 613, 608, 608, 608, 613, 608, - 608, 608, 608, 608, 613, 608, 608, 608, 608, 608, 608, 613, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608}; - -static const flex_int16_t yy_nxt[3774] = { - 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12, 24, - 24, 24, 24, 25, 12, 12, 12, 26, 27, 28, 29, 30, 31, 27, 27, - 32, 27, 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, 27, 37, 27, - 27, 27, 12, 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, 27, 27, - 27, 27, 27, 33, 34, 35, 36, 27, 37, 27, 27, 27, 38, 39, 27, - 40, 46, 608, 78, 608, 41, 372, 47, 79, 46, 42, 43, 43, 43, 43, - 48, 116, 213, 200, 177, 49, 117, 124, 335, 124, 129, - - 125, 125, 125, 125, 124, 372, 124, 605, 125, 125, 125, 125, 174, 595, 174, - 373, 175, 175, 175, 175, 174, 590, 174, 335, 175, 175, 175, 175, 197, 571, - 197, 574, 198, 198, 198, 198, 542, 545, 131, 132, 373, 535, 515, 44, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 50, 62, 62, 62, - 62, 63, 64, 50, 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, 69, - 67, 70, 67, 67, 71, 72, 67, 73, 74, 75, 67, 67, 67, 67, 67, - 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, - - 69, 67, 70, 67, 67, 71, 72, 73, 74, 75, 67, 67, 67, 67, 67, - 76, 77, 67, 80, 81, 82, 83, 84, 80, 80, 85, 86, 87, 88, 89, - 80, 90, 90, 90, 90, 91, 92, 80, 80, 158, 158, 158, 158, 118, 126, - 127, 126, 133, 169, 176, 169, 192, 124, 205, 124, 380, 125, 125, 125, 125, - 118, 124, 484, 124, 80, 130, 130, 130, 130, 124, 157, 124, 127, 130, 130, - 130, 130, 133, 475, 465, 380, 158, 158, 158, 158, 608, 437, 608, 169, 94, - 95, 80, 81, 82, 83, 84, 80, 80, 96, 86, - - 87, 88, 89, 97, 90, 90, 90, 90, 91, 92, 80, 80, 119, 450, 128, - 182, 134, 170, 399, 170, 193, 375, 206, 131, 132, 272, 272, 272, 272, 119, - 351, 131, 132, 291, 291, 291, 291, 80, 450, 159, 182, 128, 303, 303, 303, - 303, 134, 179, 180, 197, 339, 197, 332, 198, 198, 198, 198, 170, 317, 317, - 317, 317, 94, 95, 98, 99, 100, 101, 102, 98, 98, 103, 104, 105, 106, - 107, 98, 108, 108, 108, 108, 109, 98, 98, 98, 110, 110, 111, 110, 110, - 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, - - 110, 110, 113, 110, 110, 110, 110, 110, 110, 110, 98, 110, 110, 111, 110, - 110, 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, 110, 113, 110, 110, - 110, 110, 110, 110, 110, 114, 115, 110, 608, 323, 608, 608, 280, 608, 192, - 608, 205, 608, 413, 199, 192, 270, 417, 140, 268, 608, 458, 608, 210, 418, - 210, 135, 211, 211, 211, 211, 250, 136, 137, 240, 138, 139, 212, 205, 413, - 235, 141, 157, 417, 140, 142, 458, 608, 235, 608, 418, 223, 135, 158, 158, - 158, 158, 136, 137, 143, 138, 608, 139, 608, 481, - - 131, 132, 141, 131, 132, 286, 142, 131, 132, 482, 608, 144, 608, 193, 145, - 206, 208, 131, 132, 193, 143, 608, 502, 608, 481, 146, 608, 423, 608, 545, - 208, 286, 183, 205, 482, 147, 144, 151, 546, 145, 148, 608, 206, 608, 131, - 132, 159, 502, 608, 149, 608, 146, 287, 423, 608, 150, 608, 183, 179, 180, - 154, 147, 519, 151, 152, 148, 156, 155, 454, 195, 153, 195, 131, 132, 192, - 149, 319, 319, 319, 319, 150, 172, 172, 131, 132, 169, 154, 519, 131, 132, - 152, 157, 156, 155, 454, 124, 153, 124, 547, 163, - - 163, 163, 163, 131, 132, 377, 377, 377, 377, 133, 131, 132, 384, 384, 384, - 384, 131, 132, 608, 608, 608, 127, 608, 608, 608, 608, 608, 608, 608, 118, - 608, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 608, 174, 455, 174, - 157, 178, 178, 178, 178, 121, 477, 176, 169, 608, 129, 608, 131, 132, 544, - 174, 487, 174, 129, 175, 175, 175, 175, 174, 455, 174, 129, 178, 178, 178, - 178, 608, 477, 608, 121, 608, 506, 608, 608, 544, 608, 608, 487, 608, 507, - 608, 118, 608, 608, 512, 608, 161, 518, 123, 186, - - 280, 184, 208, 187, 179, 180, 185, 506, 608, 189, 608, 520, 608, 208, 608, - 507, 179, 180, 161, 188, 512, 524, 170, 518, 327, 186, 608, 184, 608, 187, - 179, 180, 185, 204, 328, 189, 123, 520, 179, 180, 190, 191, 179, 180, 188, - 179, 180, 524, 179, 180, 327, 195, 179, 180, 560, 179, 180, 608, 608, 608, - 328, 608, 608, 608, 608, 190, 191, 195, 169, 329, 179, 180, 161, 181, 179, - 180, 608, 608, 608, 560, 608, 608, 608, 608, 564, 199, 192, 177, 202, 203, - 123, 172, 525, 197, 177, 197, 527, 198, 198, 198, - - 198, 197, 529, 197, 569, 201, 201, 201, 201, 564, 197, 172, 197, 177, 201, - 201, 201, 201, 525, 608, 608, 608, 527, 608, 608, 608, 608, 167, 529, 569, - 192, 608, 608, 608, 534, 608, 608, 608, 608, 212, 205, 608, 200, 608, 608, - 537, 608, 210, 165, 210, 161, 211, 211, 211, 211, 193, 200, 541, 123, 608, - 534, 608, 121, 202, 203, 535, 535, 550, 200, 121, 608, 537, 202, 203, 210, - 551, 210, 573, 214, 214, 214, 214, 210, 541, 210, 217, 211, 211, 211, 211, - 210, 608, 210, 550, 214, 214, 214, 214, 608, 553, - - 608, 551, 573, 215, 216, 584, 131, 132, 608, 206, 608, 217, 124, 558, 124, - 608, 125, 125, 125, 125, 608, 215, 216, 218, 219, 553, 608, 608, 608, 608, - 584, 608, 608, 608, 608, 536, 215, 216, 205, 558, 608, 608, 608, 608, 608, - 608, 608, 608, 593, 218, 219, 213, 215, 216, 223, 223, 397, 397, 397, 397, - 215, 216, 608, 323, 213, 608, 272, 272, 272, 272, 215, 216, 608, 593, 124, - 561, 124, 213, 125, 125, 125, 125, 124, 608, 124, 366, 130, 130, 130, 130, - 608, 608, 608, 562, 608, 608, 608, 608, 608, 608, - - 608, 561, 608, 608, 608, 608, 608, 545, 608, 129, 608, 366, 608, 223, 223, - 608, 546, 608, 608, 562, 608, 608, 563, 608, 273, 566, 222, 129, 567, 221, - 568, 570, 367, 601, 608, 129, 608, 608, 608, 608, 608, 576, 608, 608, 131, - 132, 225, 608, 563, 228, 608, 566, 222, 229, 567, 221, 568, 570, 601, 226, - 608, 227, 608, 232, 608, 577, 608, 576, 131, 132, 608, 225, 131, 132, 228, - 230, 547, 131, 132, 229, 131, 132, 608, 224, 132, 226, 608, 227, 608, 232, - 233, 577, 608, 231, 608, 608, 131, 132, 235, 131, - - 132, 230, 131, 132, 578, 608, 247, 608, 535, 535, 608, 234, 608, 608, 608, - 608, 233, 608, 231, 608, 581, 236, 131, 132, 238, 608, 131, 132, 240, 240, - 578, 608, 247, 608, 552, 608, 608, 234, 608, 608, 239, 608, 608, 243, 608, - 242, 581, 236, 131, 132, 238, 248, 608, 608, 131, 132, 250, 250, 608, 608, - 552, 608, 252, 608, 608, 239, 608, 237, 132, 243, 242, 249, 131, 132, 244, - 131, 132, 248, 536, 131, 132, 583, 608, 245, 608, 124, 246, 124, 252, 163, - 163, 163, 163, 131, 132, 608, 249, 585, 241, 132, - - 244, 131, 132, 608, 131, 132, 608, 583, 608, 245, 608, 174, 246, 174, 608, - 175, 175, 175, 175, 608, 586, 131, 132, 585, 608, 608, 251, 132, 174, 608, - 174, 608, 175, 175, 175, 175, 174, 608, 174, 608, 178, 178, 178, 178, 179, - 180, 586, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 177, 587, 179, 180, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 420, 420, 420, 420, 177, 608, 257, 608, - 608, 179, 180, 256, 177, 587, 258, 608, 179, 180, - - 608, 608, 608, 259, 608, 608, 608, 260, 588, 608, 608, 608, 574, 574, 257, - 435, 435, 435, 435, 256, 589, 264, 258, 493, 493, 493, 493, 179, 180, 259, - 594, 261, 597, 260, 588, 179, 180, 608, 179, 180, 608, 179, 180, 608, 608, - 608, 589, 264, 598, 179, 180, 498, 498, 498, 498, 590, 594, 261, 597, 608, - 262, 608, 202, 203, 591, 600, 179, 180, 602, 608, 263, 179, 180, 197, 598, - 197, 603, 198, 198, 198, 198, 608, 575, 197, 604, 197, 262, 198, 198, 198, - 198, 600, 608, 197, 602, 197, 263, 201, 201, 201, - - 201, 608, 603, 608, 608, 179, 180, 608, 608, 608, 604, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 210, 592, 210, 200, 211, 211, 211, - 211, 210, 608, 210, 608, 211, 211, 211, 211, 608, 608, 210, 280, 210, 200, - 214, 214, 214, 214, 608, 608, 608, 200, 608, 608, 202, 203, 608, 608, 265, - 608, 484, 608, 215, 216, 608, 608, 608, 515, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 268, 268, 509, 213, 265, 608, 267, 608, 608, - 532, 608, 608, 608, 215, 216, 608, 270, 270, 608, - - 266, 608, 213, 215, 216, 608, 608, 608, 608, 509, 213, 281, 132, 267, 608, - 608, 532, 608, 274, 608, 608, 608, 215, 216, 595, 595, 266, 608, 608, 608, - 510, 608, 608, 608, 608, 608, 608, 533, 223, 608, 608, 608, 608, 608, 274, - 275, 608, 608, 215, 216, 590, 269, 132, 277, 608, 276, 608, 278, 608, 591, - 608, 131, 132, 608, 129, 608, 608, 271, 132, 608, 275, 608, 279, 608, 282, - 608, 608, 131, 132, 277, 276, 131, 132, 278, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 283, 596, 608, 608, 284, 279, 608, - - 282, 285, 608, 131, 132, 608, 608, 289, 608, 582, 582, 582, 582, 608, 608, - 288, 131, 132, 283, 592, 131, 132, 608, 284, 608, 131, 132, 285, 608, 608, - 240, 240, 608, 289, 608, 131, 132, 290, 608, 608, 608, 288, 291, 291, 291, - 291, 131, 132, 605, 131, 132, 608, 131, 132, 608, 608, 608, 606, 608, 608, - 608, 608, 290, 608, 608, 235, 608, 608, 131, 132, 608, 608, 608, 542, 608, - 608, 608, 608, 608, 608, 608, 240, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 129, 294, 608, 293, 556, 295, 297, 296, 608, - - 292, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 298, 599, 599, 599, - 599, 608, 607, 294, 293, 608, 556, 295, 297, 296, 608, 131, 132, 608, 300, - 605, 299, 301, 608, 608, 608, 608, 298, 302, 606, 131, 132, 557, 608, 131, - 132, 608, 131, 132, 608, 131, 132, 608, 608, 608, 300, 299, 608, 301, 250, - 250, 131, 132, 302, 131, 132, 305, 307, 131, 132, 608, 303, 303, 303, 303, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 250, 608, 571, 608, - 608, 305, 608, 307, 608, 608, 131, 132, 608, 607, - - 608, 608, 608, 608, 608, 608, 608, 308, 306, 608, 579, 608, 129, 608, 179, - 180, 608, 608, 608, 608, 608, 311, 608, 608, 608, 309, 608, 608, 608, 304, - 608, 608, 310, 308, 306, 608, 579, 608, 608, 608, 608, 608, 313, 312, 608, - 179, 180, 311, 608, 179, 180, 309, 179, 180, 608, 608, 608, 580, 310, 608, - 315, 608, 179, 180, 314, 608, 179, 180, 313, 312, 608, 179, 180, 608, 608, - 608, 608, 316, 179, 180, 268, 268, 608, 608, 179, 180, 315, 608, 608, 314, - 215, 216, 317, 317, 317, 317, 608, 608, 608, 215, - - 216, 608, 608, 316, 608, 608, 608, 608, 608, 608, 608, 608, 270, 270, 323, - 268, 215, 216, 608, 608, 608, 608, 321, 608, 319, 319, 319, 319, 608, 608, - 608, 608, 608, 608, 608, 608, 131, 132, 608, 270, 608, 129, 608, 325, 608, - 608, 608, 608, 321, 322, 318, 608, 608, 608, 608, 608, 608, 608, 131, 132, - 608, 331, 608, 608, 608, 129, 608, 608, 608, 326, 608, 608, 608, 608, 322, - 608, 608, 280, 332, 332, 131, 132, 320, 324, 132, 334, 608, 331, 608, 330, - 608, 608, 608, 608, 326, 608, 608, 608, 608, 608, - - 131, 132, 608, 129, 131, 132, 608, 131, 132, 338, 334, 608, 608, 608, 330, - 608, 131, 132, 339, 339, 608, 336, 131, 132, 608, 337, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 338, 608, 608, 608, 608, 342, 608, 608, 608, 608, - 341, 336, 608, 333, 132, 337, 343, 131, 132, 345, 131, 132, 608, 608, 131, - 132, 608, 608, 608, 608, 342, 608, 608, 344, 608, 608, 341, 608, 131, 132, - 608, 608, 343, 608, 608, 345, 347, 348, 349, 608, 608, 608, 354, 340, 132, - 346, 131, 132, 344, 608, 357, 131, 132, 351, 351, - - 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 608, 354, 608, - 346, 350, 608, 608, 608, 357, 608, 608, 131, 132, 353, 179, 180, 608, 179, - 180, 608, 355, 608, 608, 608, 608, 356, 131, 132, 608, 350, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 353, 358, 608, 608, 608, 608, 361, 355, 608, - 360, 608, 608, 356, 608, 608, 608, 608, 352, 132, 608, 131, 132, 359, 179, - 180, 608, 608, 358, 179, 180, 608, 608, 361, 608, 360, 608, 608, 608, 608, - 608, 608, 608, 179, 180, 608, 179, 180, 363, 359, - - 608, 608, 179, 180, 608, 215, 216, 608, 608, 608, 608, 608, 608, 608, 362, - 179, 180, 608, 364, 371, 365, 608, 608, 608, 363, 608, 608, 608, 608, 608, - 608, 608, 323, 608, 608, 608, 608, 608, 608, 362, 608, 608, 608, 364, 215, - 216, 365, 368, 215, 216, 608, 131, 132, 375, 375, 608, 608, 369, 129, 608, - 608, 608, 374, 608, 608, 608, 608, 370, 608, 608, 131, 132, 608, 368, 608, - 608, 608, 608, 608, 131, 132, 608, 608, 369, 608, 608, 608, 608, 374, 332, - 332, 608, 370, 608, 379, 131, 132, 608, 131, 132, - - 382, 377, 377, 377, 377, 608, 608, 608, 608, 608, 608, 608, 608, 608, 383, - 608, 332, 608, 339, 339, 379, 608, 608, 376, 132, 608, 382, 608, 608, 608, - 384, 384, 384, 384, 608, 381, 131, 132, 608, 388, 383, 608, 129, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, 386, 608, 391, 378, - 608, 381, 608, 608, 608, 388, 608, 608, 608, 608, 608, 387, 390, 339, 608, - 389, 608, 131, 132, 608, 608, 393, 386, 608, 391, 394, 608, 608, 385, 131, - 132, 608, 608, 395, 392, 608, 387, 608, 390, 129, - - 608, 389, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, - 351, 351, 131, 132, 608, 392, 608, 608, 608, 608, 608, 396, 397, 397, 397, - 397, 608, 608, 608, 608, 608, 131, 132, 608, 399, 399, 131, 132, 608, 608, - 131, 132, 608, 608, 608, 608, 608, 396, 131, 132, 608, 608, 608, 402, 608, - 608, 608, 608, 608, 608, 608, 351, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 400, 608, 608, 608, 608, 608, 608, 402, 398, 608, 405, 403, 608, - 406, 608, 129, 608, 608, 179, 180, 608, 608, 608, - - 608, 608, 400, 608, 608, 408, 608, 404, 608, 401, 132, 608, 608, 405, 403, - 407, 406, 608, 409, 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 179, - 180, 408, 404, 608, 179, 180, 411, 608, 179, 180, 407, 608, 179, 180, 409, - 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 608, 608, 608, 608, 608, - 179, 180, 411, 131, 132, 608, 215, 216, 608, 608, 608, 412, 608, 608, 608, - 375, 375, 608, 608, 414, 608, 419, 608, 608, 215, 216, 608, 420, 420, 420, - 420, 608, 608, 608, 415, 608, 608, 412, 608, 608, - - 608, 416, 608, 608, 608, 414, 608, 419, 131, 132, 608, 608, 608, 608, 608, - 131, 132, 608, 131, 132, 415, 608, 422, 608, 608, 608, 416, 426, 608, 424, - 131, 132, 427, 608, 131, 132, 608, 608, 608, 425, 608, 608, 608, 608, 608, - 421, 608, 375, 422, 608, 608, 608, 608, 426, 608, 424, 608, 427, 131, 132, - 608, 608, 131, 132, 608, 425, 131, 132, 429, 608, 608, 608, 608, 129, 131, - 132, 608, 430, 608, 428, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 432, 608, 429, 608, 608, 608, 608, 431, - - 608, 608, 608, 430, 428, 608, 131, 132, 399, 399, 434, 131, 132, 608, 131, - 132, 608, 608, 432, 433, 435, 435, 435, 435, 431, 437, 437, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 434, 608, 131, 132, 608, 608, 608, 608, 433, - 439, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 440, 608, - 608, 608, 608, 608, 608, 608, 399, 441, 608, 608, 608, 439, 608, 608, 608, - 608, 608, 608, 436, 608, 608, 608, 608, 608, 440, 608, 447, 608, 442, 179, - 180, 608, 129, 441, 443, 438, 132, 444, 608, 608, - - 608, 608, 179, 180, 608, 446, 608, 608, 608, 179, 180, 608, 447, 445, 442, - 448, 608, 608, 608, 608, 443, 608, 608, 444, 608, 179, 180, 608, 608, 608, - 608, 446, 215, 216, 608, 449, 179, 180, 445, 179, 180, 448, 179, 180, 457, - 179, 180, 608, 608, 608, 608, 451, 608, 608, 608, 608, 608, 608, 608, 608, - 449, 215, 216, 608, 608, 452, 131, 132, 608, 608, 457, 456, 608, 453, 608, - 608, 459, 451, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 131, - 132, 452, 608, 462, 608, 460, 608, 456, 608, 453, - - 608, 461, 459, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 463, - 131, 132, 608, 131, 132, 608, 460, 608, 465, 465, 608, 461, 608, 608, 437, - 437, 608, 608, 608, 131, 132, 608, 608, 608, 608, 463, 467, 467, 467, 467, - 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 464, 608, 608, 608, - 131, 132, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 464, 131, 132, 437, 608, 608, 179, 180, 608, - 608, 608, 608, 466, 132, 469, 608, 608, 608, 468, - - 608, 608, 608, 608, 608, 608, 608, 608, 470, 608, 129, 608, 179, 180, 608, - 608, 608, 608, 608, 608, 608, 469, 608, 471, 215, 216, 608, 608, 472, 608, - 608, 608, 179, 180, 470, 475, 475, 473, 474, 608, 608, 608, 608, 608, 608, - 608, 608, 479, 608, 471, 608, 608, 179, 180, 472, 608, 608, 608, 608, 608, - 179, 180, 473, 608, 474, 179, 180, 478, 608, 179, 180, 483, 608, 479, 608, - 608, 215, 216, 484, 480, 608, 608, 179, 180, 608, 608, 485, 608, 608, 131, - 132, 608, 608, 478, 608, 608, 608, 483, 608, 608, - - 608, 608, 131, 132, 480, 476, 132, 608, 488, 608, 131, 132, 608, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 490, 608, 465, 465, 608, 608, 489, - 437, 437, 491, 608, 488, 608, 608, 493, 493, 493, 493, 608, 467, 467, 467, - 467, 608, 486, 132, 490, 608, 608, 492, 608, 489, 608, 131, 132, 491, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 131, - 132, 608, 492, 608, 608, 495, 131, 132, 496, 131, 132, 608, 608, 608, 497, - 608, 608, 608, 608, 608, 494, 608, 465, 608, 608, - - 468, 608, 608, 515, 608, 608, 495, 608, 608, 496, 608, 608, 608, 179, 180, - 497, 504, 475, 475, 608, 608, 608, 608, 129, 179, 180, 608, 179, 180, 498, - 498, 498, 498, 179, 180, 608, 608, 608, 179, 180, 503, 608, 504, 499, 608, - 500, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 179, 180, 475, 608, - 508, 131, 132, 608, 608, 608, 503, 608, 608, 499, 608, 500, 516, 132, 608, - 505, 608, 608, 608, 608, 608, 608, 131, 132, 129, 511, 508, 501, 608, 608, - 608, 513, 608, 608, 608, 608, 514, 131, 132, 484, - - 505, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 511, 608, 608, 608, - 608, 608, 513, 517, 608, 608, 608, 514, 608, 608, 129, 608, 131, 132, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 517, - 608, 608, 521, 608, 608, 608, 523, 522, 608, 608, 608, 608, 608, 528, 608, - 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 179, 180, 608, 521, 179, - 180, 608, 523, 522, 526, 608, 179, 180, 608, 528, 608, 131, 132, 530, 608, - 608, 608, 540, 608, 131, 132, 608, 131, 132, 608, - - 608, 608, 608, 608, 526, 131, 132, 538, 608, 531, 131, 132, 608, 530, 608, - 131, 132, 539, 540, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 542, 515, 538, 608, 531, 608, 608, 608, 608, 608, 608, 608, 539, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 129, 549, - 608, 608, 548, 131, 132, 554, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 608, 608, 608, 608, 608, 555, 608, 571, 608, 549, 608, 608, 548, 608, - 608, 554, 608, 608, 608, 608, 131, 132, 608, 608, - - 543, 132, 608, 608, 131, 132, 559, 555, 608, 131, 132, 608, 131, 132, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 542, 608, 608, 131, 132, - 608, 608, 559, 131, 132, 608, 608, 608, 131, 132, 608, 608, 131, 132, 608, - 608, 131, 132, 608, 565, 608, 129, 572, 132, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 571, 574, 574, 608, 608, 595, 595, 608, 608, 608, - 565, 608, 608, 582, 582, 582, 582, 599, 599, 599, 599, 131, 132, 608, 608, - 608, 129, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 575, 608, 608, 608, 596, 45, 45, 45, 93, - 93, 93, 120, 608, 120, 122, 608, 122, 160, 608, 160, 162, 608, 162, 164, - 608, 164, 166, 608, 166, 168, 608, 168, 171, 608, 171, 173, 608, 173, 194, - 608, 194, 196, 608, 196, 207, 608, 207, 209, 608, 209, 220, 608, 220, 253, - 608, 253, 254, 608, 254, 255, 608, 255, 11, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; - -static const flex_int16_t yy_chk[3774] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 27, 6, 27, 2, 327, 3, 6, 4, 2, 2, 2, 2, 2, - 4, 10, 627, 624, 621, 4, 10, 20, 286, 20, 613, - - 20, 20, 20, 20, 23, 327, 23, 607, 23, 23, 23, 23, 58, 596, 58, - 328, 58, 58, 58, 58, 61, 592, 61, 286, 61, 61, 61, 61, 86, 580, - 86, 575, 86, 86, 86, 86, 557, 547, 27, 27, 328, 536, 533, 2, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 158, 158, 158, 158, 14, 21, - 21, 25, 25, 52, 63, 63, 82, 21, 100, 21, 335, 21, 21, 21, 21, - 118, 22, 510, 22, 7, 22, 22, 22, 22, 24, 40, 24, 127, 24, 24, - 24, 24, 133, 501, 494, 335, 40, 40, 40, 40, 65, 468, 65, 169, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 413, 21, - 65, 25, 52, 436, 63, 82, 421, 100, 22, 22, 272, 272, 272, 272, 118, - 398, 24, 24, 291, 291, 291, 291, 8, 413, 40, 65, 127, 303, 303, 303, - 303, 133, 65, 65, 89, 385, 89, 378, 89, 89, 89, 89, 169, 317, 317, - 317, 317, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 26, 367, 26, 29, 329, 29, 192, - 28, 205, 28, 366, 91, 91, 320, 372, 29, 318, 30, 423, 30, 104, 373, - 104, 26, 104, 104, 104, 104, 304, 26, 26, 292, 26, 28, 109, 109, 366, - 287, 30, 157, 372, 29, 30, 423, 31, 235, 31, 373, 273, 26, 157, 157, - 157, 157, 26, 26, 31, 26, 66, 28, 66, 454, - - 26, 26, 30, 29, 29, 235, 30, 28, 28, 455, 32, 31, 32, 192, 31, - 205, 209, 30, 30, 91, 31, 34, 477, 34, 454, 32, 33, 380, 33, 529, - 207, 235, 66, 206, 455, 32, 31, 34, 529, 31, 32, 36, 109, 36, 31, - 31, 157, 477, 35, 33, 35, 32, 235, 380, 37, 33, 37, 66, 66, 66, - 36, 32, 500, 34, 35, 32, 37, 36, 417, 196, 35, 194, 32, 32, 193, - 33, 319, 319, 319, 319, 33, 173, 171, 34, 34, 170, 36, 500, 33, 33, - 35, 159, 37, 36, 417, 43, 35, 43, 529, 43, - - 43, 43, 43, 36, 36, 377, 377, 377, 377, 134, 35, 35, 384, 384, 384, - 384, 37, 37, 38, 38, 38, 128, 38, 38, 38, 38, 39, 39, 39, 38, - 39, 39, 39, 39, 44, 44, 44, 39, 44, 44, 44, 44, 60, 418, 60, - 44, 60, 60, 60, 60, 122, 450, 59, 59, 67, 38, 67, 43, 43, 527, - 59, 458, 59, 39, 59, 59, 59, 59, 62, 418, 62, 44, 62, 62, 62, - 62, 68, 450, 68, 120, 69, 481, 69, 70, 527, 70, 71, 458, 71, 482, - 72, 119, 72, 73, 487, 73, 116, 499, 103, 70, - - 280, 68, 102, 71, 60, 60, 69, 481, 74, 73, 74, 502, 75, 101, 75, - 482, 67, 67, 96, 72, 487, 506, 59, 499, 280, 70, 93, 68, 93, 71, - 62, 62, 69, 92, 280, 73, 85, 502, 68, 68, 74, 75, 69, 69, 72, - 70, 70, 506, 71, 71, 280, 84, 72, 72, 550, 73, 73, 76, 76, 76, - 280, 76, 76, 76, 76, 74, 75, 83, 76, 280, 74, 74, 78, 64, 75, - 75, 77, 77, 77, 550, 77, 77, 77, 77, 558, 87, 87, 77, 93, 93, - 57, 54, 507, 87, 76, 87, 509, 87, 87, 87, - - 87, 88, 512, 88, 563, 88, 88, 88, 88, 558, 90, 53, 90, 77, 90, - 90, 90, 90, 507, 94, 94, 94, 509, 94, 94, 94, 94, 48, 512, 563, - 94, 95, 95, 95, 518, 95, 95, 95, 95, 105, 105, 110, 95, 110, 129, - 520, 129, 105, 47, 105, 41, 105, 105, 105, 105, 87, 94, 524, 19, 111, - 518, 111, 16, 88, 88, 519, 519, 532, 95, 15, 11, 520, 90, 90, 106, - 534, 106, 566, 106, 106, 106, 106, 107, 524, 107, 111, 107, 107, 107, 107, - 108, 0, 108, 532, 108, 108, 108, 108, 112, 537, - - 112, 534, 566, 110, 110, 577, 129, 129, 113, 105, 113, 111, 124, 544, 124, - 0, 124, 124, 124, 124, 0, 111, 111, 112, 113, 537, 0, 114, 114, 114, - 577, 114, 114, 114, 114, 519, 106, 106, 114, 544, 115, 115, 115, 0, 115, - 115, 115, 115, 586, 112, 113, 115, 108, 108, 223, 223, 397, 397, 397, 397, - 112, 112, 0, 323, 114, 0, 223, 223, 223, 223, 113, 113, 0, 586, 125, - 551, 125, 115, 125, 125, 125, 125, 130, 0, 130, 323, 130, 130, 130, 130, - 131, 131, 131, 552, 131, 131, 131, 131, 132, 132, - - 132, 551, 132, 132, 132, 132, 135, 545, 135, 132, 136, 323, 136, 137, 137, - 138, 545, 138, 140, 552, 140, 137, 556, 137, 223, 560, 136, 131, 561, 135, - 562, 564, 323, 598, 139, 132, 139, 141, 0, 141, 143, 568, 143, 0, 130, - 130, 138, 0, 556, 140, 0, 560, 136, 141, 561, 135, 562, 564, 598, 139, - 142, 139, 142, 143, 144, 569, 144, 568, 135, 135, 0, 138, 136, 136, 140, - 142, 545, 138, 138, 141, 140, 140, 0, 137, 137, 139, 145, 139, 145, 143, - 144, 569, 152, 142, 152, 0, 139, 139, 146, 141, - - 141, 142, 143, 143, 570, 146, 152, 146, 535, 535, 147, 145, 147, 149, 0, - 149, 144, 150, 142, 150, 573, 146, 142, 142, 147, 0, 144, 144, 148, 148, - 570, 153, 152, 153, 535, 0, 148, 145, 148, 156, 147, 156, 154, 150, 154, - 149, 573, 146, 145, 145, 147, 153, 0, 0, 152, 152, 155, 155, 0, 151, - 535, 151, 156, 0, 155, 147, 155, 146, 146, 150, 149, 154, 147, 147, 151, - 149, 149, 153, 535, 150, 150, 576, 177, 151, 177, 163, 151, 163, 156, 163, - 163, 163, 163, 153, 153, 0, 154, 578, 148, 148, - - 151, 156, 156, 0, 154, 154, 0, 576, 182, 151, 182, 174, 151, 174, 0, - 174, 174, 174, 174, 0, 579, 151, 151, 578, 0, 0, 155, 155, 175, 183, - 175, 183, 175, 175, 175, 175, 178, 0, 178, 0, 178, 178, 178, 178, 177, - 177, 579, 163, 163, 179, 179, 179, 0, 179, 179, 179, 179, 180, 180, 180, - 0, 180, 180, 180, 180, 184, 0, 184, 180, 581, 182, 182, 0, 185, 0, - 185, 186, 0, 186, 187, 0, 187, 420, 420, 420, 420, 179, 188, 186, 188, - 0, 183, 183, 185, 180, 581, 187, 0, 178, 178, - - 200, 0, 200, 188, 189, 0, 189, 188, 583, 191, 0, 191, 567, 567, 186, - 435, 435, 435, 435, 185, 584, 191, 187, 493, 493, 493, 493, 184, 184, 188, - 587, 189, 589, 188, 583, 185, 185, 0, 186, 186, 0, 187, 187, 190, 0, - 190, 584, 191, 593, 188, 188, 498, 498, 498, 498, 585, 587, 189, 589, 0, - 190, 0, 200, 200, 585, 597, 189, 189, 601, 0, 190, 191, 191, 197, 593, - 197, 602, 197, 197, 197, 197, 0, 567, 198, 603, 198, 190, 198, 198, 198, - 198, 597, 0, 201, 601, 201, 190, 201, 201, 201, - - 201, 213, 602, 213, 0, 190, 190, 202, 202, 202, 603, 202, 202, 202, 202, - 203, 203, 203, 0, 203, 203, 203, 203, 210, 585, 210, 203, 210, 210, 210, - 210, 211, 217, 211, 217, 211, 211, 211, 211, 0, 0, 214, 230, 214, 202, - 214, 214, 214, 214, 230, 0, 230, 203, 0, 0, 201, 201, 0, 0, 217, - 219, 484, 219, 213, 213, 215, 215, 215, 515, 215, 215, 215, 215, 216, 216, - 216, 0, 216, 216, 216, 216, 221, 221, 484, 216, 217, 218, 219, 218, 221, - 515, 221, 0, 0, 217, 217, 0, 222, 222, 225, - - 218, 225, 215, 214, 214, 222, 0, 222, 0, 484, 216, 230, 230, 219, 0, - 226, 515, 226, 225, 227, 0, 227, 219, 219, 588, 588, 218, 224, 224, 224, - 484, 224, 224, 224, 224, 0, 0, 515, 224, 0, 0, 228, 0, 228, 225, - 226, 0, 0, 218, 218, 590, 221, 221, 228, 231, 227, 231, 228, 229, 590, - 229, 225, 225, 232, 224, 232, 0, 222, 222, 0, 226, 0, 229, 233, 231, - 233, 0, 226, 226, 228, 227, 227, 227, 228, 238, 0, 238, 234, 0, 234, - 236, 0, 236, 232, 588, 0, 0, 233, 229, 0, - - 231, 234, 0, 228, 228, 0, 239, 238, 239, 582, 582, 582, 582, 0, 0, - 236, 231, 231, 232, 590, 229, 229, 0, 233, 0, 232, 232, 234, 0, 0, - 240, 240, 0, 238, 0, 233, 233, 239, 0, 0, 0, 236, 240, 240, 240, - 240, 238, 238, 604, 234, 234, 0, 236, 236, 237, 237, 237, 604, 237, 237, - 237, 237, 239, 0, 242, 237, 242, 0, 239, 239, 241, 241, 241, 542, 241, - 241, 241, 241, 243, 0, 243, 241, 244, 0, 244, 245, 0, 245, 246, 0, - 246, 237, 243, 0, 242, 542, 243, 245, 244, 247, - - 240, 247, 248, 0, 248, 0, 249, 241, 249, 0, 0, 246, 599, 599, 599, - 599, 0, 604, 243, 242, 0, 542, 243, 245, 244, 0, 242, 242, 0, 248, - 605, 247, 249, 0, 252, 0, 252, 246, 249, 605, 243, 243, 542, 0, 244, - 244, 0, 245, 245, 0, 246, 246, 257, 0, 257, 248, 247, 0, 249, 250, - 250, 247, 247, 249, 248, 248, 252, 257, 249, 249, 0, 250, 250, 250, 250, - 251, 251, 251, 0, 251, 251, 251, 251, 256, 0, 256, 251, 258, 571, 258, - 259, 252, 259, 257, 0, 0, 252, 252, 0, 605, - - 260, 0, 260, 0, 262, 0, 262, 259, 256, 261, 571, 261, 251, 0, 257, - 257, 263, 0, 263, 0, 0, 262, 264, 0, 264, 260, 0, 0, 265, 250, - 265, 0, 261, 259, 256, 0, 571, 266, 0, 266, 0, 0, 264, 263, 0, - 256, 256, 262, 0, 258, 258, 260, 259, 259, 267, 0, 267, 571, 261, 0, - 266, 0, 260, 260, 265, 0, 262, 262, 264, 263, 0, 261, 261, 0, 276, - 0, 276, 267, 263, 263, 268, 268, 0, 0, 264, 264, 266, 0, 0, 265, - 265, 265, 268, 268, 268, 268, 274, 0, 274, 266, - - 266, 0, 0, 267, 269, 269, 269, 0, 269, 269, 269, 269, 270, 270, 277, - 269, 267, 267, 275, 0, 275, 277, 274, 277, 270, 270, 270, 270, 271, 271, - 271, 0, 271, 271, 271, 271, 276, 276, 279, 271, 279, 269, 278, 278, 278, - 283, 0, 283, 274, 275, 268, 0, 0, 0, 285, 0, 285, 0, 274, 274, - 282, 283, 282, 0, 0, 271, 281, 281, 281, 279, 281, 281, 281, 281, 275, - 0, 0, 281, 284, 284, 275, 275, 270, 277, 277, 285, 284, 283, 284, 282, - 288, 0, 288, 289, 279, 289, 0, 290, 0, 290, - - 279, 279, 0, 281, 278, 278, 0, 283, 283, 290, 285, 295, 0, 295, 282, - 0, 285, 285, 293, 293, 0, 288, 282, 282, 0, 289, 293, 0, 293, 294, - 0, 294, 0, 0, 296, 290, 296, 0, 0, 297, 295, 297, 298, 0, 298, - 294, 288, 0, 284, 284, 289, 296, 288, 288, 298, 289, 289, 0, 0, 290, - 290, 299, 0, 299, 309, 295, 309, 306, 297, 306, 0, 294, 0, 295, 295, - 0, 300, 296, 300, 0, 298, 300, 300, 300, 301, 0, 301, 306, 293, 293, - 299, 294, 294, 297, 0, 309, 296, 296, 302, 302, - - 0, 297, 297, 0, 298, 298, 302, 0, 302, 305, 0, 305, 307, 306, 307, - 299, 301, 308, 0, 308, 309, 0, 0, 299, 299, 305, 309, 309, 0, 306, - 306, 312, 307, 312, 313, 0, 313, 308, 300, 300, 310, 301, 310, 314, 0, - 314, 301, 301, 0, 0, 0, 305, 310, 311, 0, 311, 0, 313, 307, 0, - 312, 0, 0, 308, 0, 0, 0, 0, 302, 302, 0, 305, 305, 311, 307, - 307, 0, 0, 310, 308, 308, 0, 315, 313, 315, 312, 316, 0, 316, 321, - 0, 321, 0, 312, 312, 0, 313, 313, 316, 311, - - 0, 0, 310, 310, 0, 314, 314, 0, 322, 0, 322, 0, 0, 0, 315, - 311, 311, 326, 321, 326, 322, 324, 324, 324, 316, 324, 324, 324, 324, 0, - 0, 0, 324, 325, 0, 325, 330, 0, 330, 315, 0, 0, 0, 321, 315, - 315, 322, 325, 316, 316, 0, 321, 321, 331, 331, 0, 0, 325, 324, 0, - 0, 331, 330, 331, 0, 0, 0, 325, 0, 0, 322, 322, 0, 325, 334, - 0, 334, 0, 0, 326, 326, 0, 0, 325, 0, 337, 0, 337, 330, 332, - 332, 338, 325, 338, 334, 325, 325, 0, 330, 330, - - 337, 332, 332, 332, 332, 333, 333, 333, 0, 333, 333, 333, 333, 0, 338, - 336, 333, 336, 339, 339, 334, 0, 0, 331, 331, 0, 337, 342, 0, 342, - 339, 339, 339, 339, 0, 336, 334, 334, 0, 342, 338, 341, 333, 341, 345, - 0, 345, 337, 337, 0, 344, 0, 344, 338, 338, 343, 341, 343, 345, 332, - 0, 336, 340, 340, 340, 342, 340, 340, 340, 340, 0, 341, 344, 340, 346, - 343, 346, 336, 336, 347, 0, 347, 341, 348, 345, 348, 0, 0, 339, 342, - 342, 349, 0, 349, 346, 0, 341, 0, 344, 340, - - 0, 343, 0, 341, 341, 0, 345, 345, 350, 0, 350, 0, 344, 344, 0, - 351, 351, 343, 343, 0, 346, 0, 0, 0, 0, 0, 350, 351, 351, 351, - 351, 0, 0, 354, 0, 354, 346, 346, 0, 353, 353, 347, 347, 0, 0, - 348, 348, 353, 0, 353, 0, 0, 350, 349, 349, 352, 352, 352, 354, 352, - 352, 352, 352, 355, 0, 355, 352, 357, 0, 357, 350, 350, 356, 0, 356, - 0, 358, 353, 358, 0, 359, 0, 359, 0, 354, 351, 0, 357, 355, 360, - 358, 360, 352, 0, 0, 354, 354, 0, 361, 0, - - 361, 364, 353, 364, 362, 360, 362, 356, 0, 353, 353, 0, 0, 357, 355, - 359, 358, 0, 361, 362, 0, 0, 363, 0, 363, 355, 355, 0, 0, 357, - 357, 360, 356, 0, 356, 356, 363, 0, 358, 358, 359, 0, 359, 359, 361, - 362, 365, 0, 365, 0, 0, 360, 360, 368, 0, 368, 374, 0, 374, 0, - 361, 361, 363, 364, 364, 0, 362, 362, 369, 0, 369, 365, 370, 0, 370, - 375, 375, 0, 0, 368, 0, 374, 0, 0, 363, 363, 0, 375, 375, 375, - 375, 0, 0, 0, 369, 0, 379, 365, 379, 0, - - 386, 370, 386, 0, 383, 368, 383, 374, 365, 365, 0, 0, 381, 0, 381, - 368, 368, 0, 374, 374, 369, 0, 379, 382, 0, 382, 370, 383, 0, 381, - 369, 369, 386, 0, 370, 370, 376, 376, 376, 382, 376, 376, 376, 376, 388, - 375, 388, 376, 379, 387, 0, 387, 389, 383, 389, 381, 0, 386, 379, 379, - 0, 0, 386, 386, 0, 382, 383, 383, 388, 390, 0, 390, 0, 376, 381, - 381, 391, 389, 391, 387, 0, 0, 0, 0, 0, 382, 382, 0, 392, 0, - 392, 396, 391, 396, 388, 0, 0, 0, 0, 390, - - 0, 0, 0, 389, 387, 0, 388, 388, 399, 399, 396, 387, 387, 0, 389, - 389, 0, 0, 391, 392, 399, 399, 399, 399, 390, 400, 400, 402, 0, 402, - 0, 390, 390, 400, 0, 400, 396, 0, 391, 391, 403, 0, 403, 0, 392, - 402, 0, 404, 0, 404, 392, 392, 0, 396, 396, 401, 401, 401, 403, 401, - 401, 401, 401, 405, 0, 405, 401, 404, 0, 0, 410, 402, 410, 0, 406, - 0, 406, 407, 399, 407, 409, 0, 409, 408, 403, 408, 410, 0, 405, 402, - 402, 0, 401, 404, 406, 400, 400, 407, 0, 411, - - 0, 411, 403, 403, 412, 409, 412, 0, 0, 404, 404, 0, 410, 408, 405, - 411, 425, 0, 425, 422, 406, 422, 0, 407, 0, 405, 405, 414, 0, 414, - 0, 409, 410, 410, 0, 412, 406, 406, 408, 407, 407, 411, 409, 409, 422, - 408, 408, 419, 0, 419, 415, 414, 415, 416, 0, 416, 424, 0, 424, 0, - 412, 411, 411, 0, 0, 415, 412, 412, 0, 0, 422, 419, 427, 416, 427, - 0, 424, 414, 425, 425, 0, 422, 422, 426, 0, 426, 428, 0, 428, 414, - 414, 415, 429, 429, 429, 426, 0, 419, 430, 416, - - 430, 427, 424, 431, 0, 431, 432, 0, 432, 419, 419, 0, 415, 415, 430, - 416, 416, 0, 424, 424, 433, 426, 433, 434, 434, 439, 427, 439, 0, 437, - 437, 434, 0, 434, 427, 427, 0, 0, 0, 0, 430, 437, 437, 437, 437, - 426, 426, 0, 428, 428, 440, 0, 440, 0, 429, 429, 433, 0, 0, 0, - 430, 430, 447, 0, 447, 431, 431, 0, 432, 432, 441, 0, 441, 438, 438, - 438, 0, 438, 438, 438, 438, 433, 433, 433, 438, 0, 0, 439, 439, 0, - 442, 0, 442, 434, 434, 441, 0, 0, 443, 437, - - 443, 0, 0, 444, 0, 444, 0, 445, 442, 445, 438, 0, 440, 440, 448, - 0, 448, 0, 0, 0, 446, 441, 446, 443, 447, 447, 0, 452, 444, 452, - 0, 0, 441, 441, 442, 449, 449, 445, 446, 0, 451, 0, 451, 449, 0, - 449, 0, 452, 453, 443, 453, 0, 442, 442, 444, 456, 0, 456, 0, 0, - 443, 443, 445, 0, 446, 444, 444, 451, 0, 445, 445, 456, 0, 452, 0, - 0, 448, 448, 457, 453, 0, 0, 446, 446, 0, 457, 457, 457, 0, 452, - 452, 0, 0, 451, 459, 0, 459, 456, 460, 0, - - 460, 0, 451, 451, 453, 449, 449, 461, 459, 461, 453, 453, 462, 0, 462, - 0, 0, 456, 456, 464, 0, 464, 463, 461, 463, 465, 465, 0, 0, 460, - 467, 467, 462, 0, 459, 0, 0, 465, 465, 465, 465, 0, 467, 467, 467, - 467, 0, 457, 457, 461, 0, 470, 463, 470, 460, 0, 459, 459, 462, 0, - 460, 460, 469, 0, 469, 471, 0, 471, 0, 461, 461, 472, 0, 472, 462, - 462, 473, 463, 473, 0, 469, 464, 464, 471, 463, 463, 466, 466, 466, 472, - 466, 466, 466, 466, 474, 465, 474, 466, 0, 479, - - 467, 479, 0, 490, 0, 0, 469, 0, 0, 471, 490, 0, 490, 470, 470, - 472, 479, 475, 475, 0, 478, 0, 478, 466, 469, 469, 0, 471, 471, 475, - 475, 475, 475, 472, 472, 483, 0, 483, 473, 473, 478, 0, 479, 475, 480, - 475, 480, 476, 476, 476, 0, 476, 476, 476, 476, 0, 474, 474, 476, 0, - 483, 479, 479, 0, 0, 485, 478, 485, 492, 475, 492, 475, 490, 490, 0, - 480, 489, 0, 489, 488, 0, 488, 478, 478, 476, 485, 483, 475, 486, 486, - 486, 488, 486, 486, 486, 486, 489, 483, 483, 486, - - 480, 0, 0, 491, 0, 491, 480, 480, 495, 0, 495, 485, 496, 0, 496, - 0, 0, 488, 491, 497, 0, 497, 489, 0, 503, 486, 503, 485, 485, 0, - 492, 492, 504, 0, 504, 505, 0, 505, 489, 489, 0, 488, 488, 511, 491, - 511, 0, 503, 508, 0, 508, 505, 504, 517, 0, 517, 0, 513, 511, 513, - 0, 0, 0, 0, 0, 491, 491, 523, 0, 523, 495, 495, 0, 503, 496, - 496, 0, 505, 504, 508, 0, 497, 497, 514, 511, 514, 503, 503, 513, 0, - 0, 521, 523, 521, 504, 504, 0, 505, 505, 0, - - 0, 522, 0, 522, 508, 511, 511, 521, 0, 514, 508, 508, 528, 513, 528, - 517, 517, 522, 523, 513, 513, 516, 516, 516, 0, 516, 516, 516, 516, 523, - 523, 526, 516, 521, 531, 514, 531, 0, 526, 0, 526, 0, 530, 522, 530, - 514, 514, 540, 0, 540, 538, 0, 538, 521, 521, 0, 0, 0, 516, 531, - 0, 0, 530, 522, 522, 538, 539, 0, 539, 0, 0, 549, 0, 549, 528, - 528, 554, 0, 554, 0, 548, 539, 548, 565, 555, 531, 555, 0, 530, 0, - 565, 538, 565, 0, 0, 0, 531, 531, 0, 0, - - 526, 526, 0, 0, 530, 530, 548, 539, 0, 540, 540, 0, 538, 538, 543, - 543, 543, 0, 543, 543, 543, 543, 0, 0, 559, 543, 559, 0, 539, 539, - 0, 0, 548, 549, 549, 0, 0, 0, 554, 554, 0, 0, 548, 548, 0, - 0, 555, 555, 0, 559, 0, 543, 565, 565, 572, 572, 572, 0, 572, 572, - 572, 572, 0, 0, 0, 572, 574, 574, 0, 0, 595, 595, 0, 0, 0, - 559, 0, 0, 574, 574, 574, 574, 595, 595, 595, 595, 559, 559, 0, 0, - 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 595, 609, 609, 609, 610, - 610, 610, 611, 0, 611, 612, 0, 612, 614, 0, 614, 615, 0, 615, 616, - 0, 616, 617, 0, 617, 618, 0, 618, 619, 0, 619, 620, 0, 620, 622, - 0, 622, 623, 0, 623, 625, 0, 625, 626, 0, 626, 628, 0, 628, 629, - 0, 629, 630, 0, 630, 631, 0, 631, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[791] = + { 0, + 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, + 100, 98, 73, 74, 98, 98, 76, 77, 98, 98, + 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 74, 12, 13, + 93, 98, 16, 15, 16, 12, 13, 44, 20, 21, + 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, + 44, 44, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 12, 13, 51, 45, 46, 51, 51, + + 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 12, + 13, 60, 55, 56, 60, 60, 60, 60, 60, 57, + 60, 57, 60, 57, 57, 57, 57, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 12, 13, 74, + 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, + 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 0, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 74, 93, 0, 12, + 1, 13, 93, 0, 16, 1, 12, 1, 13, 21, + 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 36, 26, 27, 41, 41, 28, 41, 41, 41, 41, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 46, 0, 0, 50, 0, 0, 49, 45, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 59, 0, 0, 58, 55, 57, + + 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 57, 57, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 95, + 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 0, 95, 0, 95, 95, 0, 0, + 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, + 95, 95, 95, 0, 0, 0, 0, 1, 1, 1, + 0, 0, 41, 41, 29, 41, 41, 41, 41, 41, + 41, 41, 41, 0, 0, 0, 0, 0, 48, 48, + 0, 0, 0, 0, 0, 57, 57, 57, 57, 57, + + 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, + 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, + 95, 95, 0, 0, 95, 0, 95, 95, 80, 0, + 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 92, 0, 0, 95, 41, 41, 41, 41, 41, + 41, 41, 41, 52, 57, 57, 82, 0, 0, 81, + 0, 0, 0, 95, 95, 0, 0, 95, 69, 0, + 0, 0, 0, 95, 95, 0, 0, 95, 0, 0, + 95, 95, 95, 0, 0, 0, 95, 95, 95, 95, + 95, 95, 70, 71, 72, 95, 0, 0, 0, 95, + + 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, + 0, 0, 62, 95, 0, 0, 0, 95, 95, 95, + 69, 0, 0, 0, 95, 0, 0, 91, 0, 0, + 95, 0, 95, 95, 95, 90, 0, 0, 95, 95, + 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, + 0, 0, 0, 95, 0, 41, 41, 37, 41, 41, + 38, 41, 41, 57, 57, 95, 0, 0, 95, 95, + 95, 0, 0, 95, 85, 0, 0, 0, 95, 0, + 95, 18, 95, 0, 95, 14, 95, 95, 67, 19, + 95, 95, 0, 78, 0, 0, 0, 0, 35, 33, + + 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, + 95, 95, 95, 0, 0, 95, 0, 95, 0, 95, + 95, 95, 95, 95, 68, 0, 0, 0, 79, 0, + 0, 41, 31, 41, 41, 30, 34, 0, 0, 0, + 95, 95, 95, 0, 0, 95, 0, 95, 0, 0, + 95, 95, 95, 95, 61, 83, 0, 0, 0, 39, + 32, 40, 86, 0, 0, 0, 0, 0, 95, 95, + 95, 0, 0, 95, 0, 0, 95, 0, 0, 95, + 95, 0, 0, 5, 0, 0, 0, 0, 0, 95, + 95, 95, 0, 10, 95, 0, 0, 6, 0, 95, + + 95, 0, 0, 0, 0, 0, 0, 0, 95, 95, + 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, + 0, 0, 0, 0, 0, 8, 65, 64, 0, 0, + 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, + 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 9, 0, 0, 0, 0, 0, 88, 0, + 7, 0, 0, 0, 0, 0, 2, 0, 0, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 4, 1, 1, 1, 1, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 14, 14, 14, 14, 14, 14, 1, 18, 1, + 19, 20, 1, 1, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 37, + 1, 1, 1, 1, 37, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 37, 62, 63, 64, 65, 66, 67, 68, + 69, 37, 1, 1, 1, 1, 1, 70, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 1, 1, 74, 74, 74, 74, 74, 74, 74, + + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 75, 76, 76, 77, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 79, 80, 80, 81, + 82, 82, 82, 83, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[84] = + { 0, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3 + } ; + +static const flex_int16_t yy_base[813] = + { 0, + 0, 81, 83, 91, 158, 79, 241, 92, 324, 93, + 1770, 4855, 4855, 405, 1764, 1693, 4855, 4855, 1670, 97, + 407, 475, 105, 549, 409, 623, 113, 415, 423, 442, + 442, 474, 478, 557, 586, 631, 450, 61, 1615, 65, + 69, 73, 77, 80, 30, 84, 343, 511, 1662, 0, + 431, 474, 0, 4855, 1660, 1640, 0, 4855, 4855, 417, + 1644, 1642, 4855, 4855, 1626, 569, 655, 723, 577, 797, + 500, 1610, 680, 604, 688, 696, 706, 732, 744, 777, + 806, 769, 826, 580, 1527, 604, 654, 680, 371, 692, + 343, 701, 407, 1572, 0, 4855, 4855, 423, 1553, 1539, + + 1516, 834, 851, 919, 875, 993, 518, 1476, 883, 705, + 1420, 754, 787, 811, 534, 831, 457, 835, 505, 1457, + 0, 4855, 4855, 465, 1471, 1469, 1453, 899, 935, 1067, + 907, 1141, 606, 943, 951, 1003, 964, 869, 1394, 899, + 912, 951, 697, 955, 540, 959, 608, 1445, 0, 545, + 1340, 1404, 4855, 1402, 0, 1024, 1032, 4855, 557, 1325, + 1040, 0, 988, 1307, 993, 1015, 1019, 758, 1023, 609, + 1027, 644, 567, 1309, 1095, 1104, 1120, 1149, 1166, 1189, + 1216, 1228, 1178, 1244, 1257, 1272, 1291, 1309, 1317, 1328, + 1336, 1361, 1157, 1386, 1402, 1411, 1031, 1176, 1192, 1294, + + 1319, 1359, 1363, 1367, 1374, 1379, 1439, 1443, 1291, 0, + 0, 0, 1447, 1399, 0, 0, 0, 0, 0, 577, + 1289, 1343, 4855, 1323, 1466, 1474, 4855, 1482, 0, 1430, + 1247, 1434, 1438, 1442, 855, 1447, 656, 1451, 762, 4855, + 1515, 1523, 1531, 1539, 1548, 1560, 1573, 1589, 1598, 1616, + 1508, 1546, 1568, 1572, 1581, 1585, 1593, 1597, 1601, 1605, + 612, 1243, 1279, 4855, 1245, 1669, 1677, 4855, 1685, 0, + 1633, 1163, 1637, 1641, 1645, 920, 1649, 797, 1653, 873, + 4855, 1657, 1661, 1665, 1669, 1673, 1677, 1681, 1685, 1689, + 1693, 657, 1164, 1194, 4855, 1191, 1757, 1765, 4855, 1773, + + 0, 1721, 1118, 1725, 1729, 1733, 1054, 1737, 915, 1741, + 1068, 1805, 1813, 1823, 1772, 1776, 1780, 1784, 1792, 1797, + 1801, 1805, 1809, 1815, 1114, 0, 1109, 1136, 1107, 1887, + 1903, 1893, 1821, 1912, 1920, 1929, 1941, 1961, 1978, 1987, + 1996, 2005, 2013, 1338, 2030, 1877, 2055, 2063, 2079, 1961, + 2090, 2099, 2118, 2145, 2155, 2163, 2178, 2186, 2122, 1978, + 2201, 2219, 2233, 2013, 2047, 2111, 1105, 0, 0, 0, + 1100, 1227, 2242, 2253, 2268, 2277, 2295, 2303, 2322, 2330, + 2341, 2362, 2370, 2135, 2152, 2201, 1098, 1264, 2382, 2390, + 2225, 2251, 2291, 1058, 1284, 2398, 2406, 2414, 2425, 2435, + + 2383, 2387, 2402, 2462, 2410, 2482, 2416, 2476, 1047, 2430, + 2494, 2502, 2510, 2518, 2533, 2541, 2510, 2492, 2558, 2568, + 2587, 2596, 399, 1043, 2607, 2555, 2625, 2634, 2615, 1010, + 2586, 2660, 2669, 2683, 2691, 2708, 2717, 2737, 2699, 2745, + 2762, 2752, 981, 2710, 2775, 2791, 2799, 2807, 2817, 2834, + 2848, 2856, 2872, 2881, 2891, 2899, 2779, 975, 2770, 2907, + 973, 2855, 965, 2921, 2932, 1558, 2890, 2954, 2974, 45, + 411, 963, 2902, 2984, 3001, 3020, 2909, 3014, 413, 946, + 3035, 3043, 3059, 936, 3079, 2935, 3088, 3103, 3116, 3124, + 3148, 3162, 3171, 3183, 3191, 3203, 3207, 2968, 934, 3223, + + 3231, 3242, 3254, 3263, 3279, 3293, 3304, 3316, 3324, 3341, + 907, 905, 3362, 3370, 407, 894, 3013, 3378, 3386, 3395, + 4855, 436, 458, 892, 3408, 3433, 3036, 3152, 876, 3295, + 3444, 480, 3454, 3471, 3483, 3400, 842, 3402, 3497, 3508, + 3516, 3527, 3536, 3553, 3567, 4855, 4855, 4855, 3577, 3475, + 785, 3484, 3594, 3610, 3544, 3622, 3630, 3638, 3646, 3669, + 3679, 3687, 3697, 3705, 3722, 3747, 496, 782, 3759, 3767, + 3783, 645, 810, 3791, 3661, 777, 3670, 775, 3811, 624, + 3819, 3840, 3848, 765, 3862, 3870, 3881, 3889, 3901, 3911, + 3919, 3935, 749, 3737, 747, 3939, 3695, 3768, 3951, 3959, + + 3967, 3975, 3983, 3994, 4008, 4021, 4029, 4040, 4060, 919, + 4068, 4076, 4084, 667, 848, 4096, 738, 4124, 1024, 4135, + 4145, 4153, 4165, 4174, 4183, 4208, 3837, 726, 4212, 720, + 3887, 4224, 4232, 4240, 4248, 4256, 4267, 4288, 3988, 855, + 4296, 4304, 4312, 1077, 1087, 4322, 1930, 4331, 3994, 1080, + 4347, 4357, 4380, 4388, 4403, 4100, 718, 4101, 710, 4411, + 4419, 4428, 4190, 1128, 857, 675, 4160, 1133, 4436, 4444, + 4455, 1177, 1181, 4467, 1222, 666, 4475, 4223, 1221, 4494, + 4502, 2161, 4307, 4511, 647, 1233, 1293, 639, 1250, 4526, + 4538, 4555, 1256, 4855, 4563, 888, 631, 4580, 1306, 4588, + + 4596, 1263, 629, 4336, 1346, 3247, 586, 1340, 4608, 4619, + 4634, 4855, 2237, 4424, 1352, 1408, 4855, 540, 4644, 4655, + 890, 529, 1420, 1502, 527, 4855, 4666, 4674, 1513, 520, + 4430, 1218, 508, 4682, 1537, 1539, 1549, 1236, 498, 1566, + 4697, 1487, 1619, 1614, 1829, 1863, 2385, 4474, 1871, 4703, + 462, 1917, 1489, 1908, 1931, 454, 4511, 1926, 4707, 452, + 1957, 1989, 1410, 1531, 441, 2003, 2054, 2031, 2142, 4855, + 381, 2045, 4855, 4723, 364, 2042, 348, 1933, 4713, 56, + 4855, 2069, 2086, 2115, 2229, 2250, 4855, 54, 48, 4855, + 4800, 4803, 4806, 113, 4809, 4812, 4815, 4818, 4821, 4824, + + 4827, 105, 4830, 4833, 87, 4836, 4839, 85, 4842, 4845, + 4848, 4851 + } ; + +static const flex_int16_t yy_def[813] = + { 0, + 790, 1, 791, 791, 790, 5, 790, 7, 790, 9, + 790, 790, 790, 790, 792, 793, 790, 790, 790, 790, + 790, 794, 790, 794, 790, 24, 24, 24, 24, 24, + 26, 26, 26, 24, 24, 24, 24, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 795, 796, + 24, 790, 797, 790, 797, 798, 799, 790, 790, 790, + 800, 801, 790, 790, 790, 790, 790, 802, 790, 802, + 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 795, 796, 790, 790, 790, 803, 804, + + 790, 790, 790, 805, 790, 805, 790, 790, 106, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, + 796, 790, 790, 790, 806, 807, 790, 790, 790, 808, + 790, 808, 790, 132, 132, 132, 132, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 795, 796, 790, + 790, 792, 790, 793, 809, 790, 790, 790, 790, 790, + 24, 24, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, + 810, 796, 24, 790, 797, 811, 798, 812, 799, 790, + 790, 800, 790, 801, 790, 790, 790, 70, 70, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 803, 790, 804, 790, 790, 790, 106, 106, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 806, 790, 807, 790, 790, 790, 132, + + 132, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 132, 132, 132, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 809, 790, 790, 790, 24, + 24, 790, 790, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 790, 24, 790, 24, 24, 790, 790, + 24, 24, 24, 24, 24, 24, 24, 24, 790, 790, + 24, 24, 24, 790, 790, 790, 790, 810, 811, 812, + 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 790, 790, 790, 790, 790, 106, 106, + 790, 790, 790, 790, 790, 132, 132, 132, 132, 132, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 24, 24, 24, 24, 24, 24, 790, 790, 24, 24, + 24, 24, 790, 790, 24, 790, 24, 24, 790, 790, + 790, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 790, 790, 790, 24, 70, 70, 70, 70, 70, + 70, 70, 70, 132, 132, 132, 790, 790, 790, 790, + 790, 790, 790, 24, 24, 790, 790, 24, 24, 790, + 790, 790, 790, 24, 24, 790, 790, 24, 790, 790, + 24, 24, 24, 790, 790, 790, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 790, 790, 790, 24, + + 70, 70, 70, 70, 70, 70, 70, 70, 132, 132, + 790, 790, 24, 24, 790, 790, 790, 24, 24, 24, + 790, 790, 790, 790, 24, 790, 790, 790, 790, 790, + 24, 790, 24, 24, 24, 790, 790, 790, 24, 24, + 24, 24, 24, 24, 24, 790, 790, 790, 24, 790, + 790, 790, 790, 24, 790, 70, 70, 70, 70, 70, + 70, 70, 70, 132, 132, 24, 790, 790, 24, 24, + 24, 790, 790, 24, 790, 790, 790, 790, 24, 790, + 24, 24, 24, 790, 24, 24, 24, 24, 24, 24, + 24, 24, 790, 790, 790, 790, 790, 790, 70, 70, + + 70, 70, 70, 70, 70, 70, 132, 132, 24, 790, + 24, 24, 24, 790, 790, 24, 790, 24, 790, 24, + 24, 24, 24, 24, 24, 790, 790, 790, 790, 790, + 790, 70, 70, 70, 70, 70, 70, 790, 790, 790, + 24, 24, 24, 790, 790, 24, 790, 24, 790, 790, + 24, 24, 24, 24, 24, 790, 790, 790, 790, 70, + 70, 70, 790, 790, 790, 790, 790, 790, 24, 24, + 24, 790, 790, 24, 790, 790, 24, 790, 790, 24, + 24, 790, 790, 24, 790, 790, 790, 790, 790, 24, + 24, 24, 790, 790, 24, 790, 790, 24, 790, 24, + + 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, + 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, + 790, 790, 790, 790, 790, 790, 24, 24, 790, 790, + 790, 790, 790, 24, 790, 790, 790, 790, 790, 790, + 24, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 0, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790 + } ; + +static const flex_int16_t yy_nxt[4939] = + { 0, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 12, 24, 24, 24, 24, 25, 12, 12, + 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, + 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, + 27, 37, 27, 27, 27, 26, 27, 28, 29, 30, + 31, 27, 27, 32, 27, 27, 27, 27, 27, 27, + 33, 34, 35, 36, 27, 37, 27, 27, 27, 12, + 12, 12, 12, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 54, 522, 94, 300, 49, 269, + 55, 95, 54, 50, 51, 51, 51, 51, 56, 120, + + 148, 204, 204, 57, 121, 149, 156, 228, 156, 522, + 157, 157, 157, 157, 156, 161, 156, 786, 157, 157, + 157, 157, 790, 789, 790, 774, 161, 161, 161, 161, + 161, 161, 161, 161, 198, 198, 198, 198, 199, 200, + 200, 200, 201, 201, 201, 201, 202, 202, 202, 203, + 203, 203, 203, 205, 205, 205, 205, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 58, 70, 70, 70, 70, 71, 72, 58, 73, 74, + 75, 75, 75, 75, 75, 75, 76, 77, 75, 78, + 75, 75, 79, 80, 75, 81, 82, 83, 75, 75, + + 75, 75, 75, 73, 74, 75, 75, 75, 75, 75, + 75, 76, 77, 75, 78, 75, 75, 79, 80, 81, + 82, 83, 75, 75, 75, 75, 75, 58, 58, 58, + 58, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 96, 97, 98, 99, 100, 96, 96, 101, 102, + 103, 104, 105, 96, 106, 106, 106, 106, 107, 108, + 96, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 96, 96, 96, 96, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 122, 123, 124, 125, 126, 122, + 122, 127, 128, 129, 130, 131, 122, 132, 132, 132, + 132, 133, 122, 122, 134, 134, 135, 134, 134, 134, + 134, 134, 136, 134, 134, 134, 134, 134, 134, 134, + 134, 137, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 135, 134, 134, 134, 134, 134, 136, 134, 134, + 134, 134, 134, 134, 134, 137, 134, 134, 134, 134, + 134, 134, 134, 122, 122, 122, 122, 138, 139, 140, + + 141, 142, 143, 144, 145, 146, 147, 150, 158, 159, + 158, 173, 206, 206, 258, 258, 156, 769, 156, 220, + 157, 157, 157, 157, 790, 261, 790, 479, 161, 161, + 161, 161, 790, 780, 790, 567, 161, 161, 161, 161, + 256, 256, 256, 180, 213, 213, 213, 213, 523, 179, + 777, 790, 479, 790, 532, 161, 161, 161, 161, 790, + 567, 790, 183, 161, 161, 161, 161, 292, 180, 572, + 196, 181, 523, 161, 179, 182, 260, 260, 532, 184, + 161, 151, 185, 160, 156, 174, 156, 183, 162, 162, + 162, 162, 573, 221, 572, 196, 181, 186, 161, 262, + + 182, 227, 220, 184, 161, 161, 185, 187, 580, 189, + 747, 161, 188, 207, 161, 190, 161, 573, 161, 268, + 261, 750, 186, 765, 208, 208, 208, 208, 289, 289, + 161, 760, 187, 580, 189, 161, 188, 610, 161, 190, + 161, 293, 161, 214, 200, 200, 200, 150, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 156, 159, + 156, 610, 162, 162, 162, 162, 790, 713, 790, 173, + 161, 161, 161, 161, 291, 291, 221, 716, 225, 220, + 225, 191, 226, 226, 226, 226, 225, 209, 225, 739, + 226, 226, 226, 226, 262, 790, 706, 790, 682, 161, + + 161, 161, 161, 287, 287, 287, 191, 299, 292, 733, + 192, 322, 322, 790, 261, 790, 193, 228, 228, 228, + 228, 151, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 790, 160, 790, 192, 161, 161, 161, 161, + 790, 193, 790, 174, 161, 161, 161, 161, 242, 228, + 228, 228, 228, 221, 175, 725, 227, 220, 194, 292, + 176, 177, 619, 178, 225, 195, 225, 614, 226, 226, + 226, 226, 242, 252, 252, 252, 252, 324, 324, 175, + 204, 204, 293, 194, 176, 177, 619, 178, 262, 790, + 195, 790, 614, 228, 228, 228, 228, 790, 722, 790, + + 647, 228, 228, 228, 228, 790, 644, 790, 638, 228, + 228, 228, 228, 206, 206, 790, 626, 790, 241, 228, + 228, 228, 228, 253, 254, 254, 254, 258, 258, 243, + 644, 221, 225, 293, 225, 697, 229, 229, 229, 229, + 244, 790, 241, 790, 688, 228, 228, 228, 228, 255, + 255, 255, 255, 790, 243, 790, 245, 228, 228, 228, + 228, 257, 257, 257, 257, 244, 320, 320, 320, 246, + 259, 259, 259, 259, 269, 269, 269, 269, 790, 596, + 790, 245, 228, 228, 228, 228, 790, 685, 790, 659, + 228, 228, 228, 228, 246, 553, 230, 231, 232, 233, + + 234, 235, 236, 237, 238, 239, 225, 526, 225, 249, + 229, 229, 229, 229, 247, 790, 628, 790, 497, 228, + 228, 228, 228, 283, 283, 283, 283, 202, 202, 202, + 248, 260, 260, 249, 485, 790, 615, 790, 247, 228, + 228, 228, 228, 266, 476, 266, 617, 267, 267, 267, + 267, 466, 268, 261, 593, 248, 284, 285, 285, 285, + 266, 615, 266, 250, 267, 267, 267, 267, 289, 289, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 286, 286, 286, 286, 266, 645, 266, 250, 267, 267, + 267, 267, 790, 668, 790, 687, 269, 269, 269, 269, + + 288, 288, 288, 288, 290, 290, 290, 290, 297, 645, + 297, 584, 298, 298, 298, 298, 297, 668, 297, 687, + 298, 298, 298, 298, 256, 256, 256, 262, 266, 715, + 266, 735, 270, 270, 270, 270, 299, 292, 300, 300, + 300, 300, 291, 291, 297, 578, 297, 640, 298, 298, + 298, 298, 790, 715, 790, 735, 300, 300, 300, 300, + 790, 417, 790, 568, 300, 300, 300, 300, 316, 316, + 316, 316, 640, 790, 406, 790, 404, 300, 300, 300, + 300, 317, 318, 318, 318, 312, 322, 322, 314, 287, + 287, 287, 271, 272, 273, 274, 275, 276, 277, 278, + + 279, 280, 266, 359, 266, 349, 270, 270, 270, 270, + 312, 293, 790, 314, 790, 344, 300, 300, 300, 300, + 319, 319, 319, 319, 321, 321, 321, 321, 323, 323, + 323, 323, 524, 156, 332, 156, 313, 157, 157, 157, + 157, 156, 512, 156, 511, 157, 157, 157, 157, 790, + 499, 790, 650, 161, 161, 161, 161, 161, 161, 161, + 161, 313, 198, 198, 198, 198, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 297, 650, 297, 484, + 301, 301, 301, 301, 328, 200, 200, 200, 201, 201, + 201, 201, 203, 203, 203, 203, 205, 205, 205, 205, + + 161, 161, 161, 161, 790, 672, 790, 673, 161, 161, + 161, 161, 480, 790, 679, 790, 463, 161, 161, 161, + 161, 332, 332, 320, 320, 320, 330, 292, 331, 790, + 672, 790, 673, 161, 161, 161, 161, 324, 324, 679, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 297, 330, 297, 331, 301, 301, 301, 301, 790, 686, + 790, 689, 161, 161, 161, 161, 790, 261, 790, 220, + 161, 161, 161, 161, 207, 790, 173, 790, 159, 161, + 161, 161, 161, 150, 686, 357, 689, 790, 334, 790, + 315, 161, 161, 161, 161, 295, 333, 295, 790, 335, + + 790, 336, 161, 161, 161, 161, 362, 362, 362, 341, + 357, 693, 334, 694, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 335, 790, 336, 790, 337, 161, + 161, 161, 161, 394, 341, 282, 693, 790, 694, 790, + 338, 161, 161, 161, 161, 362, 362, 362, 362, 264, + 696, 339, 337, 790, 699, 790, 740, 161, 161, 161, + 161, 150, 362, 362, 362, 338, 790, 705, 790, 340, + 161, 161, 161, 161, 344, 696, 339, 745, 342, 699, + 740, 790, 264, 790, 708, 161, 161, 161, 161, 712, + 343, 721, 705, 340, 706, 706, 345, 382, 382, 382, + + 790, 745, 790, 342, 161, 161, 161, 161, 716, 708, + 349, 349, 387, 347, 712, 343, 721, 717, 790, 251, + 790, 345, 161, 161, 161, 161, 790, 223, 790, 348, + 161, 161, 161, 161, 389, 389, 389, 790, 347, 790, + 344, 161, 161, 161, 161, 790, 223, 790, 346, 161, + 161, 161, 161, 348, 399, 399, 399, 351, 371, 353, + 367, 423, 352, 362, 363, 363, 363, 723, 354, 707, + 790, 355, 790, 726, 161, 161, 161, 161, 329, 197, + 732, 351, 718, 356, 353, 350, 423, 352, 362, 362, + 362, 362, 723, 354, 327, 790, 355, 790, 726, 161, + + 161, 161, 161, 359, 359, 732, 153, 153, 356, 325, + 716, 790, 769, 790, 424, 161, 161, 161, 161, 717, + 790, 770, 790, 358, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 364, 364, 364, 364, + 736, 207, 361, 365, 365, 365, 365, 358, 366, 366, + 366, 366, 208, 208, 208, 208, 208, 208, 208, 208, + 213, 213, 213, 213, 211, 736, 315, 361, 207, 362, + 362, 362, 155, 295, 295, 225, 211, 225, 360, 226, + 226, 226, 226, 225, 718, 225, 771, 226, 226, 226, + 226, 790, 282, 790, 281, 228, 228, 228, 228, 228, + + 228, 228, 228, 252, 252, 252, 252, 372, 254, 254, + 254, 255, 255, 255, 255, 209, 257, 257, 257, 257, + 259, 259, 259, 259, 790, 749, 790, 762, 228, 228, + 228, 228, 790, 737, 790, 155, 228, 228, 228, 228, + 790, 738, 790, 264, 228, 228, 228, 228, 790, 749, + 790, 762, 228, 228, 228, 228, 264, 790, 737, 790, + 466, 228, 228, 228, 228, 742, 738, 373, 374, 790, + 743, 790, 772, 228, 228, 228, 228, 228, 228, 228, + 228, 515, 790, 744, 790, 375, 228, 228, 228, 228, + 742, 211, 373, 374, 746, 743, 772, 376, 790, 251, + + 790, 377, 228, 228, 228, 228, 515, 790, 744, 790, + 375, 228, 228, 228, 228, 382, 382, 382, 382, 746, + 750, 750, 376, 379, 378, 790, 377, 790, 240, 228, + 228, 228, 228, 380, 516, 752, 381, 220, 382, 382, + 382, 382, 383, 383, 383, 155, 223, 223, 379, 378, + 382, 382, 382, 382, 228, 228, 228, 228, 380, 218, + 752, 381, 228, 228, 228, 228, 384, 384, 384, 384, + 385, 385, 385, 385, 386, 386, 386, 386, 266, 216, + 266, 211, 267, 267, 267, 267, 266, 197, 266, 155, + 267, 267, 267, 267, 790, 751, 790, 153, 269, 269, + + 269, 269, 269, 269, 269, 269, 283, 283, 283, 283, + 388, 285, 285, 285, 286, 286, 286, 286, 288, 288, + 288, 288, 290, 290, 290, 290, 269, 269, 269, 269, + 389, 389, 389, 389, 261, 389, 389, 389, 389, 390, + 390, 390, 389, 389, 389, 389, 269, 269, 269, 269, + 269, 269, 269, 269, 391, 391, 391, 391, 392, 392, + 392, 392, 393, 393, 393, 393, 297, 153, 297, 790, + 298, 298, 298, 298, 297, 790, 297, 790, 298, 298, + 298, 298, 790, 790, 790, 790, 300, 300, 300, 300, + 300, 300, 300, 300, 316, 316, 316, 316, 395, 318, + + 318, 318, 319, 319, 319, 319, 321, 321, 321, 321, + 323, 323, 323, 323, 790, 790, 790, 790, 300, 300, + 300, 300, 790, 790, 790, 790, 300, 300, 300, 300, + 790, 790, 790, 790, 790, 397, 300, 300, 300, 300, + 396, 300, 300, 300, 300, 399, 399, 399, 399, 292, + 399, 399, 399, 399, 400, 400, 400, 753, 398, 790, + 397, 399, 399, 399, 399, 396, 300, 300, 300, 300, + 300, 300, 300, 300, 401, 401, 401, 401, 402, 402, + 402, 402, 753, 398, 403, 403, 403, 403, 404, 404, + 410, 200, 200, 200, 332, 332, 790, 754, 790, 758, + + 161, 161, 161, 161, 406, 406, 408, 408, 408, 408, + 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 754, 790, 758, 161, 161, 161, 161, 790, + 790, 790, 647, 161, 161, 161, 161, 761, 790, 411, + 790, 763, 161, 161, 161, 161, 426, 200, 200, 200, + 790, 790, 790, 675, 161, 161, 161, 161, 412, 764, + 766, 414, 761, 405, 411, 415, 763, 790, 790, 409, + 790, 782, 790, 413, 161, 161, 161, 161, 675, 407, + 417, 790, 412, 416, 764, 766, 414, 790, 767, 790, + 415, 161, 161, 161, 161, 782, 790, 413, 790, 790, + + 161, 161, 161, 161, 790, 790, 676, 790, 416, 161, + 161, 161, 161, 767, 790, 419, 790, 768, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 431, 200, 200, 200, 420, 422, 773, 421, 790, 790, + 419, 790, 768, 161, 161, 161, 161, 444, 200, 200, + 200, 790, 790, 790, 418, 774, 774, 790, 420, 790, + 422, 773, 421, 425, 790, 776, 790, 790, 161, 161, + 161, 161, 790, 778, 790, 781, 161, 161, 161, 161, + 349, 349, 161, 161, 161, 161, 427, 790, 425, 790, + 776, 790, 429, 429, 429, 429, 790, 783, 778, 790, + + 781, 790, 428, 161, 161, 161, 161, 790, 790, 790, + 790, 427, 161, 161, 161, 161, 161, 161, 161, 161, + 784, 433, 783, 359, 359, 434, 428, 790, 432, 790, + 775, 161, 161, 161, 161, 442, 442, 442, 442, 790, + 790, 790, 435, 790, 769, 784, 433, 790, 785, 790, + 434, 790, 432, 770, 790, 430, 790, 790, 161, 161, + 161, 161, 790, 682, 790, 436, 790, 435, 161, 161, + 161, 161, 790, 785, 790, 790, 161, 161, 161, 161, + 161, 161, 161, 161, 702, 790, 437, 790, 790, 790, + 436, 161, 161, 161, 161, 790, 790, 790, 443, 161, + + 161, 161, 161, 438, 228, 228, 228, 228, 790, 702, + 790, 437, 790, 439, 161, 161, 161, 161, 771, 790, + 440, 228, 228, 228, 228, 790, 441, 438, 790, 790, + 790, 786, 161, 161, 161, 161, 790, 703, 439, 713, + 787, 445, 790, 790, 790, 440, 161, 161, 161, 161, + 441, 790, 786, 790, 790, 228, 228, 228, 228, 790, + 729, 787, 790, 790, 790, 445, 228, 228, 228, 228, + 228, 228, 228, 228, 790, 446, 447, 790, 790, 790, + 790, 228, 228, 228, 228, 729, 790, 790, 790, 790, + 228, 228, 228, 228, 269, 269, 269, 269, 790, 790, + + 446, 447, 448, 790, 790, 788, 790, 790, 228, 228, + 228, 228, 790, 730, 790, 790, 228, 228, 228, 228, + 269, 269, 269, 269, 790, 790, 788, 448, 449, 790, + 790, 790, 790, 790, 450, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 451, 790, 790, + 790, 790, 790, 449, 228, 228, 228, 228, 790, 450, + 269, 269, 269, 269, 790, 452, 790, 790, 790, 453, + 790, 790, 451, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 747, 790, 790, + 452, 790, 790, 790, 453, 269, 269, 269, 269, 790, + + 790, 790, 790, 269, 269, 269, 269, 790, 755, 790, + 790, 300, 300, 300, 300, 790, 790, 790, 790, 300, + 300, 300, 300, 790, 790, 790, 790, 300, 300, 300, + 300, 790, 790, 755, 790, 790, 790, 455, 300, 300, + 300, 300, 454, 790, 790, 456, 790, 790, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 790, 756, 455, 404, 404, 790, 454, 790, 790, 790, + 456, 300, 300, 300, 300, 457, 457, 457, 457, 459, + 200, 200, 200, 406, 406, 462, 200, 200, 200, 408, + 408, 408, 408, 790, 790, 460, 460, 460, 460, 332, + + 362, 362, 362, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 417, 790, 790, 161, 161, 161, 161, 790, + 466, 790, 790, 161, 161, 161, 161, 790, 464, 790, + 790, 161, 161, 161, 161, 470, 790, 790, 458, 790, + 790, 465, 790, 468, 790, 471, 161, 161, 161, 161, + 790, 790, 790, 464, 161, 161, 161, 161, 461, 790, + 470, 473, 200, 200, 200, 465, 790, 790, 790, 790, + 471, 161, 161, 161, 161, 790, 790, 790, 790, 790, + 469, 161, 161, 161, 161, 790, 472, 790, 476, 476, + 790, 790, 475, 790, 467, 474, 790, 790, 790, 790, + + 161, 161, 161, 161, 469, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 475, 790, 474, + 161, 161, 161, 161, 344, 362, 362, 362, 429, 429, + 429, 429, 790, 790, 790, 478, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 790, 481, 161, 161, 161, + 161, 790, 790, 790, 483, 349, 362, 362, 362, 478, + 790, 485, 485, 477, 790, 482, 790, 790, 790, 790, + 481, 790, 790, 161, 161, 161, 161, 790, 790, 483, + 790, 790, 161, 161, 161, 161, 790, 790, 790, 482, + 790, 790, 790, 487, 790, 790, 161, 161, 161, 161, + + 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 493, 494, 495, 489, 790, 487, 790, + 488, 161, 161, 161, 161, 790, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 486, 491, 790, 790, + 790, 489, 790, 790, 488, 490, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, + 161, 161, 491, 497, 497, 442, 442, 442, 442, 490, + 790, 790, 790, 790, 492, 161, 161, 161, 161, 359, + 362, 362, 362, 790, 790, 496, 790, 790, 161, 161, + 161, 161, 457, 457, 457, 457, 790, 790, 492, 500, + + 790, 790, 790, 790, 228, 228, 228, 228, 790, 496, + 790, 790, 228, 228, 228, 228, 790, 790, 790, 501, + 228, 228, 228, 228, 500, 790, 790, 502, 790, 790, + 228, 228, 228, 228, 790, 503, 790, 790, 498, 404, + 362, 362, 362, 790, 501, 790, 790, 228, 228, 228, + 228, 790, 502, 790, 505, 790, 504, 790, 790, 790, + 503, 228, 228, 228, 228, 790, 790, 790, 790, 228, + 228, 228, 228, 790, 790, 790, 506, 790, 790, 505, + 504, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 507, 300, 300, 300, 300, 790, 790, + + 790, 506, 790, 508, 300, 300, 300, 300, 790, 790, + 790, 790, 300, 300, 300, 300, 790, 507, 790, 510, + 460, 460, 460, 460, 406, 362, 362, 362, 508, 790, + 790, 509, 790, 790, 161, 161, 161, 161, 790, 790, + 790, 790, 790, 790, 510, 161, 161, 161, 161, 790, + 790, 790, 514, 790, 790, 509, 790, 790, 513, 517, + 200, 200, 200, 790, 790, 790, 790, 161, 161, 161, + 161, 417, 362, 362, 362, 790, 518, 514, 530, 200, + 200, 200, 513, 790, 790, 521, 519, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 520, 161, 161, 161, + + 161, 518, 526, 526, 538, 200, 200, 200, 790, 790, + 790, 519, 790, 790, 161, 161, 161, 161, 525, 790, + 520, 476, 476, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 528, 528, 528, 528, 552, 200, 200, + 200, 790, 531, 525, 790, 790, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 533, 790, 790, 534, 531, 790, 790, + 790, 790, 161, 161, 161, 161, 790, 527, 790, 790, + 485, 485, 466, 362, 362, 362, 790, 790, 533, 790, + 535, 534, 536, 536, 536, 536, 529, 790, 790, 790, + + 790, 161, 161, 161, 161, 577, 200, 200, 200, 790, + 790, 539, 790, 790, 790, 535, 161, 161, 161, 161, + 790, 790, 790, 541, 790, 790, 540, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 539, 161, 161, 161, + 161, 790, 790, 790, 542, 790, 790, 790, 541, 790, + 540, 790, 790, 790, 543, 537, 790, 790, 790, 790, + 790, 161, 161, 161, 161, 528, 528, 528, 528, 542, + 544, 790, 790, 790, 790, 161, 161, 161, 161, 543, + 790, 790, 546, 790, 161, 161, 161, 161, 790, 790, + 545, 790, 790, 790, 547, 544, 161, 161, 161, 161, + + 790, 790, 548, 790, 161, 161, 161, 161, 497, 497, + 790, 790, 790, 790, 790, 545, 161, 161, 161, 161, + 550, 550, 550, 550, 553, 553, 790, 790, 790, 549, + 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 790, 228, 228, 228, 228, 706, 706, + 790, 790, 790, 790, 549, 228, 228, 228, 228, 790, + 790, 554, 790, 790, 556, 790, 790, 228, 228, 228, + 228, 790, 790, 724, 790, 557, 228, 228, 228, 228, + 790, 790, 790, 551, 790, 554, 790, 790, 790, 556, + 790, 559, 228, 228, 228, 228, 790, 558, 724, 555, + + 557, 560, 790, 790, 790, 790, 228, 228, 228, 228, + 790, 790, 790, 790, 790, 790, 559, 228, 228, 228, + 228, 558, 790, 707, 790, 790, 560, 790, 562, 228, + 228, 228, 228, 790, 790, 790, 561, 300, 300, 300, + 300, 790, 790, 790, 563, 790, 790, 564, 790, 790, + 790, 790, 790, 562, 300, 300, 300, 300, 790, 790, + 561, 790, 790, 565, 476, 362, 362, 362, 790, 563, + 790, 790, 564, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 565, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + + 161, 161, 161, 566, 790, 790, 790, 790, 161, 161, + 161, 161, 569, 536, 536, 536, 536, 790, 790, 790, + 570, 161, 161, 161, 161, 790, 790, 790, 566, 790, + 790, 790, 571, 790, 526, 526, 790, 569, 790, 790, + 790, 574, 790, 790, 790, 570, 575, 575, 575, 575, + 790, 790, 790, 790, 790, 790, 571, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 574, 161, 161, 161, + 161, 485, 362, 362, 362, 790, 790, 790, 579, 581, + 790, 790, 790, 790, 161, 161, 161, 161, 550, 550, + 550, 550, 790, 790, 790, 582, 161, 161, 161, 161, + + 790, 790, 790, 579, 581, 790, 790, 790, 790, 576, + 161, 161, 161, 161, 583, 790, 790, 790, 790, 790, + 582, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 585, 790, 583, + 161, 161, 161, 161, 790, 790, 586, 790, 587, 161, + 161, 161, 161, 497, 362, 362, 362, 790, 790, 790, + 588, 585, 790, 790, 790, 790, 161, 161, 161, 161, + 586, 790, 790, 587, 589, 790, 790, 590, 790, 790, + 161, 161, 161, 161, 790, 588, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 553, 553, 790, 589, 790, + + 790, 790, 590, 790, 592, 790, 591, 594, 594, 594, + 594, 596, 596, 598, 200, 200, 200, 790, 790, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 592, + 591, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 790, 599, 790, + 790, 228, 228, 228, 228, 790, 600, 790, 790, 228, + 228, 228, 228, 790, 790, 790, 601, 790, 790, 790, + 595, 790, 790, 599, 575, 575, 575, 575, 790, 602, + 790, 600, 228, 228, 228, 228, 597, 790, 790, 790, + 790, 601, 228, 228, 228, 228, 790, 603, 790, 790, + + 228, 228, 228, 228, 602, 790, 790, 604, 790, 790, + 228, 228, 228, 228, 790, 790, 790, 790, 300, 300, + 300, 300, 603, 790, 790, 605, 790, 790, 790, 607, + 606, 790, 604, 790, 790, 300, 300, 300, 300, 526, + 362, 362, 362, 790, 790, 790, 608, 790, 790, 605, + 594, 594, 594, 594, 607, 606, 790, 790, 790, 790, + 161, 161, 161, 161, 631, 200, 200, 200, 790, 790, + 790, 608, 161, 161, 161, 161, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 609, 790, 790, 790, + 612, 611, 790, 790, 790, 790, 161, 161, 161, 161, + + 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, + 609, 613, 790, 790, 790, 612, 611, 790, 790, 790, + 790, 790, 790, 616, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 161, 161, 161, 613, 553, 362, 362, + 362, 790, 790, 790, 618, 790, 790, 620, 616, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 621, 618, + 790, 790, 620, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + 790, 623, 790, 621, 161, 161, 161, 161, 790, 622, + + 790, 790, 161, 161, 161, 161, 658, 200, 200, 200, + 790, 790, 790, 624, 161, 161, 161, 161, 790, 790, + 790, 790, 790, 622, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 161, 161, 161, 626, 626, 624, 790, + 596, 596, 790, 790, 790, 790, 790, 790, 161, 161, + 161, 161, 629, 629, 629, 629, 596, 362, 362, 362, + 790, 790, 790, 625, 228, 228, 228, 228, 790, 790, + 790, 790, 228, 228, 228, 228, 790, 790, 790, 790, + 228, 228, 228, 228, 790, 790, 790, 625, 228, 228, + 228, 228, 790, 790, 790, 790, 228, 228, 228, 228, + + 632, 633, 790, 790, 790, 790, 790, 228, 228, 228, + 228, 627, 790, 790, 790, 630, 634, 790, 790, 790, + 790, 228, 228, 228, 228, 632, 633, 635, 790, 790, + 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, + 790, 634, 300, 300, 300, 300, 636, 637, 790, 790, + 790, 790, 635, 300, 300, 300, 300, 667, 200, 200, + 200, 638, 638, 678, 200, 200, 200, 790, 790, 790, + 636, 790, 637, 161, 161, 161, 161, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, + + 161, 790, 790, 641, 642, 790, 790, 790, 790, 161, + 161, 161, 161, 656, 656, 656, 656, 790, 790, 790, + 646, 790, 790, 643, 790, 790, 647, 790, 641, 642, + 790, 790, 790, 790, 648, 790, 639, 161, 161, 161, + 161, 790, 790, 790, 790, 646, 790, 643, 161, 161, + 161, 161, 790, 790, 790, 790, 790, 651, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 626, 362, 362, 362, 790, 790, 790, 653, 161, 161, + 161, 161, 651, 790, 652, 790, 790, 161, 161, 161, + 161, 790, 790, 654, 790, 790, 161, 161, 161, 161, + + 649, 790, 653, 663, 663, 663, 663, 790, 652, 626, + 626, 790, 655, 596, 596, 790, 790, 790, 654, 790, + 790, 656, 656, 656, 656, 629, 629, 629, 629, 638, + 362, 362, 362, 790, 790, 790, 655, 228, 228, 228, + 228, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 660, 790, 790, 228, 228, 228, 228, 790, 790, 790, + 790, 228, 228, 228, 228, 790, 661, 790, 790, 228, + 228, 228, 228, 790, 662, 660, 790, 790, 790, 790, + 228, 228, 228, 228, 657, 790, 790, 790, 630, 638, + 638, 661, 647, 362, 362, 362, 790, 790, 790, 662, + + 790, 663, 663, 663, 663, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 664, 790, 665, 161, 161, 161, + 161, 790, 790, 790, 669, 161, 161, 161, 161, 670, + 790, 790, 790, 790, 790, 161, 161, 161, 161, 664, + 790, 665, 790, 790, 161, 161, 161, 161, 790, 669, + 790, 671, 790, 790, 670, 674, 790, 790, 790, 677, + 161, 161, 161, 161, 666, 790, 790, 680, 790, 790, + 161, 161, 161, 161, 790, 671, 704, 200, 200, 200, + 674, 790, 682, 790, 677, 681, 790, 790, 790, 790, + 790, 790, 680, 161, 161, 161, 161, 790, 790, 790, + + 790, 161, 161, 161, 161, 682, 362, 362, 362, 790, + 681, 684, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, + 790, 790, 228, 228, 228, 228, 684, 790, 790, 790, + 790, 228, 228, 228, 228, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 683, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 790, 690, 161, 161, + 161, 161, 691, 790, 790, 790, 790, 790, 790, 692, + 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, + 161, 161, 690, 731, 200, 200, 200, 691, 698, 713, + + 362, 362, 362, 790, 692, 790, 695, 161, 161, 161, + 161, 790, 790, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 698, 161, 161, 161, 161, 790, 790, + 695, 790, 790, 700, 790, 790, 701, 790, 790, 161, + 161, 161, 161, 757, 200, 200, 200, 790, 790, 790, + 709, 161, 161, 161, 161, 790, 790, 700, 790, 790, + 790, 701, 710, 790, 790, 713, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 709, 161, 161, 161, 161, + 747, 362, 362, 362, 790, 790, 790, 710, 711, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 711, 790, 790, 719, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 720, + 790, 727, 161, 161, 161, 161, 790, 790, 790, 714, + 790, 719, 728, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 790, 720, 790, 727, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 790, 728, 161, 161, + 161, 161, 790, 790, 790, 790, 790, 790, 734, 161, + 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 790, 790, 161, 161, 161, 161, 747, + + 790, 790, 790, 734, 750, 750, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 741, 759, 759, 759, 759, + 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, + 790, 790, 790, 790, 790, 790, 779, 779, 779, 779, + 741, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 748, 790, 790, 790, 790, 790, 751, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 775, + + 53, 53, 53, 152, 790, 152, 154, 790, 154, 210, + 790, 210, 212, 790, 212, 215, 790, 215, 217, 790, + 217, 219, 790, 219, 222, 790, 222, 224, 790, 224, + 263, 790, 263, 265, 790, 265, 294, 790, 294, 296, + 790, 296, 326, 790, 326, 368, 790, 368, 369, 790, + 369, 370, 790, 370, 11, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790 + } ; + +static const flex_int16_t yy_chk[4939] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 3, 470, 6, 808, 2, 805, + 3, 6, 4, 2, 2, 2, 2, 2, 4, 8, + + 10, 45, 45, 4, 8, 10, 20, 802, 20, 470, + 20, 20, 20, 20, 23, 794, 23, 789, 23, 23, + 23, 23, 27, 788, 27, 780, 27, 27, 27, 27, + 38, 38, 38, 38, 40, 40, 40, 40, 41, 41, + 41, 41, 42, 42, 42, 42, 43, 43, 43, 44, + 44, 44, 44, 46, 46, 46, 46, 2, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 9, 9, 9, 9, 9, 9, 9, 14, 21, 21, + 25, 25, 47, 47, 91, 91, 21, 777, 21, 60, + 21, 21, 21, 21, 28, 98, 28, 423, 28, 28, + 28, 28, 29, 775, 29, 515, 29, 29, 29, 29, + 89, 89, 89, 29, 51, 51, 51, 51, 471, 28, + 771, 30, 423, 30, 479, 30, 30, 30, 30, 37, + 515, 37, 31, 37, 37, 37, 37, 124, 29, 522, + 37, 30, 471, 31, 28, 30, 93, 93, 479, 31, + 31, 14, 31, 21, 22, 25, 22, 31, 22, 22, + 22, 22, 523, 60, 522, 37, 30, 32, 31, 98, + + 30, 71, 71, 31, 31, 32, 31, 32, 532, 33, + 765, 32, 32, 48, 32, 33, 33, 523, 33, 107, + 107, 760, 32, 756, 48, 48, 48, 48, 117, 117, + 32, 751, 32, 532, 33, 32, 32, 567, 32, 33, + 33, 124, 33, 52, 52, 52, 52, 150, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 24, 159, + 24, 567, 24, 24, 24, 24, 34, 739, 34, 173, + 34, 34, 34, 34, 119, 119, 71, 733, 66, 220, + 66, 34, 66, 66, 66, 66, 69, 48, 69, 730, + 69, 69, 69, 69, 107, 35, 725, 35, 722, 35, + + 35, 35, 35, 115, 115, 115, 34, 133, 133, 718, + 35, 145, 145, 74, 261, 74, 35, 74, 74, 74, + 74, 150, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 26, 159, 26, 35, 26, 26, 26, 26, + 36, 35, 36, 173, 36, 36, 36, 36, 74, 84, + 84, 84, 84, 220, 26, 707, 67, 67, 36, 292, + 26, 26, 580, 26, 67, 36, 67, 572, 67, 67, + 67, 67, 74, 86, 86, 86, 86, 147, 147, 26, + 170, 170, 133, 36, 26, 26, 580, 26, 261, 73, + 36, 73, 572, 73, 73, 73, 73, 75, 703, 75, + + 697, 75, 75, 75, 75, 76, 614, 76, 688, 76, + 76, 76, 76, 172, 172, 77, 685, 77, 73, 77, + 77, 77, 77, 87, 87, 87, 87, 237, 237, 76, + 614, 67, 68, 292, 68, 676, 68, 68, 68, 68, + 77, 78, 73, 78, 666, 78, 78, 78, 78, 88, + 88, 88, 88, 79, 76, 79, 78, 79, 79, 79, + 79, 90, 90, 90, 90, 77, 143, 143, 143, 79, + 92, 92, 92, 92, 110, 110, 110, 110, 82, 659, + 82, 78, 82, 82, 82, 82, 80, 657, 80, 630, + 80, 80, 80, 80, 79, 628, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 70, 617, 70, 82, + 70, 70, 70, 70, 80, 81, 595, 81, 593, 81, + 81, 81, 81, 112, 112, 112, 112, 168, 168, 168, + 81, 239, 239, 82, 584, 83, 573, 83, 80, 83, + 83, 83, 83, 102, 578, 102, 576, 102, 102, 102, + 102, 568, 103, 103, 551, 81, 113, 113, 113, 113, + 103, 573, 103, 83, 103, 103, 103, 103, 278, 278, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 114, 114, 114, 114, 105, 615, 105, 83, 105, 105, + 105, 105, 109, 640, 109, 665, 109, 109, 109, 109, + + 116, 116, 116, 116, 118, 118, 118, 118, 128, 615, + 128, 537, 128, 128, 128, 128, 131, 640, 131, 665, + 131, 131, 131, 131, 235, 235, 235, 103, 104, 696, + 104, 721, 104, 104, 104, 104, 129, 129, 138, 138, + 138, 138, 280, 280, 129, 529, 129, 610, 129, 129, + 129, 129, 134, 696, 134, 721, 134, 134, 134, 134, + 135, 524, 135, 516, 135, 135, 135, 135, 140, 140, + 140, 140, 610, 137, 512, 137, 511, 137, 137, 137, + 137, 141, 141, 141, 141, 135, 309, 309, 137, 276, + 276, 276, 104, 104, 104, 104, 104, 104, 104, 104, + + 104, 104, 106, 499, 106, 484, 106, 106, 106, 106, + 135, 129, 136, 137, 136, 480, 136, 136, 136, 136, + 142, 142, 142, 142, 144, 144, 144, 144, 146, 146, + 146, 146, 472, 156, 463, 156, 136, 156, 156, 156, + 156, 157, 461, 157, 458, 157, 157, 157, 157, 161, + 443, 161, 619, 161, 161, 161, 161, 163, 163, 163, + 163, 136, 165, 165, 165, 165, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 130, 619, 130, 430, + 130, 130, 130, 130, 166, 166, 166, 166, 167, 167, + 167, 167, 169, 169, 169, 169, 171, 171, 171, 171, + + 197, 197, 197, 197, 175, 644, 175, 645, 175, 175, + 175, 175, 424, 176, 650, 176, 409, 176, 176, 176, + 176, 177, 177, 307, 307, 307, 175, 394, 176, 177, + 644, 177, 645, 177, 177, 177, 177, 311, 311, 650, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 132, 175, 132, 176, 132, 132, 132, 132, 178, 664, + 178, 668, 178, 178, 178, 178, 193, 387, 193, 371, + 193, 193, 193, 193, 367, 179, 329, 179, 327, 179, + 179, 179, 179, 325, 664, 193, 668, 183, 178, 183, + 303, 183, 183, 183, 183, 296, 177, 294, 180, 179, + + 180, 179, 180, 180, 180, 180, 328, 328, 328, 183, + 193, 672, 178, 673, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 179, 181, 179, 181, 180, 181, + 181, 181, 181, 293, 183, 272, 672, 182, 673, 182, + 181, 182, 182, 182, 182, 198, 198, 198, 198, 265, + 675, 182, 180, 184, 679, 184, 732, 184, 184, 184, + 184, 199, 199, 199, 199, 181, 185, 686, 185, 182, + 185, 185, 185, 185, 186, 675, 182, 738, 184, 679, + 732, 186, 263, 186, 689, 186, 186, 186, 186, 693, + 185, 702, 686, 182, 687, 687, 186, 372, 372, 372, + + 187, 738, 187, 184, 187, 187, 187, 187, 699, 689, + 188, 188, 262, 187, 693, 185, 702, 699, 188, 231, + 188, 186, 188, 188, 188, 188, 189, 224, 189, 187, + 189, 189, 189, 189, 388, 388, 388, 190, 187, 190, + 344, 190, 190, 190, 190, 191, 222, 191, 186, 191, + 191, 191, 191, 187, 395, 395, 395, 189, 221, 191, + 209, 344, 190, 200, 200, 200, 200, 705, 191, 687, + 192, 191, 192, 708, 192, 192, 192, 192, 174, 164, + 715, 189, 699, 192, 191, 188, 344, 190, 201, 201, + 201, 201, 705, 191, 160, 194, 191, 194, 708, 194, + + 194, 194, 194, 195, 195, 715, 154, 152, 192, 151, + 716, 195, 763, 195, 344, 195, 195, 195, 195, 716, + 196, 763, 196, 194, 196, 196, 196, 196, 202, 202, + 202, 202, 203, 203, 203, 203, 204, 204, 204, 204, + 723, 207, 196, 205, 205, 205, 205, 194, 206, 206, + 206, 206, 207, 207, 207, 207, 208, 208, 208, 208, + 213, 213, 213, 213, 148, 723, 139, 196, 214, 214, + 214, 214, 127, 126, 125, 225, 120, 225, 195, 225, + 225, 225, 225, 226, 716, 226, 763, 226, 226, 226, + 226, 228, 111, 228, 108, 228, 228, 228, 228, 230, + + 230, 230, 230, 232, 232, 232, 232, 233, 233, 233, + 233, 234, 234, 234, 234, 207, 236, 236, 236, 236, + 238, 238, 238, 238, 241, 742, 241, 753, 241, 241, + 241, 241, 242, 724, 242, 101, 242, 242, 242, 242, + 243, 729, 243, 100, 243, 243, 243, 243, 244, 742, + 244, 753, 244, 244, 244, 244, 99, 245, 724, 245, + 466, 245, 245, 245, 245, 735, 729, 244, 245, 246, + 736, 246, 764, 246, 246, 246, 246, 251, 251, 251, + 251, 466, 247, 737, 247, 246, 247, 247, 247, 247, + 735, 94, 244, 245, 740, 736, 764, 247, 248, 85, + + 248, 247, 248, 248, 248, 248, 466, 249, 737, 249, + 246, 249, 249, 249, 249, 252, 252, 252, 252, 740, + 743, 743, 247, 249, 248, 250, 247, 250, 72, 250, + 250, 250, 250, 249, 466, 744, 250, 253, 253, 253, + 253, 254, 254, 254, 254, 65, 62, 61, 249, 248, + 255, 255, 255, 255, 256, 256, 256, 256, 249, 56, + 744, 250, 257, 257, 257, 257, 258, 258, 258, 258, + 259, 259, 259, 259, 260, 260, 260, 260, 266, 55, + 266, 49, 266, 266, 266, 266, 267, 39, 267, 19, + 267, 267, 267, 267, 269, 743, 269, 16, 269, 269, + + 269, 269, 271, 271, 271, 271, 273, 273, 273, 273, + 274, 274, 274, 274, 275, 275, 275, 275, 277, 277, + 277, 277, 279, 279, 279, 279, 282, 282, 282, 282, + 283, 283, 283, 283, 284, 284, 284, 284, 285, 285, + 285, 285, 286, 286, 286, 286, 287, 287, 287, 287, + 288, 288, 288, 288, 289, 289, 289, 289, 290, 290, + 290, 290, 291, 291, 291, 291, 297, 15, 297, 11, + 297, 297, 297, 297, 298, 0, 298, 0, 298, 298, + 298, 298, 300, 0, 300, 0, 300, 300, 300, 300, + 302, 302, 302, 302, 304, 304, 304, 304, 305, 305, + + 305, 305, 306, 306, 306, 306, 308, 308, 308, 308, + 310, 310, 310, 310, 312, 0, 312, 0, 312, 312, + 312, 312, 313, 0, 313, 0, 313, 313, 313, 313, + 0, 0, 314, 0, 314, 313, 314, 314, 314, 314, + 312, 315, 315, 315, 315, 316, 316, 316, 316, 317, + 317, 317, 317, 318, 318, 318, 318, 745, 314, 0, + 313, 319, 319, 319, 319, 312, 320, 320, 320, 320, + 321, 321, 321, 321, 322, 322, 322, 322, 323, 323, + 323, 323, 745, 314, 324, 324, 324, 324, 330, 330, + 333, 333, 333, 333, 332, 332, 330, 746, 330, 749, + + 330, 330, 330, 330, 331, 331, 332, 332, 332, 332, + 0, 0, 331, 0, 331, 0, 331, 331, 331, 331, + 0, 334, 746, 334, 749, 334, 334, 334, 334, 335, + 0, 335, 647, 335, 335, 335, 335, 752, 336, 334, + 336, 754, 336, 336, 336, 336, 346, 346, 346, 346, + 337, 0, 337, 647, 337, 337, 337, 337, 335, 755, + 758, 337, 752, 330, 334, 337, 754, 0, 0, 332, + 338, 778, 338, 336, 338, 338, 338, 338, 647, 331, + 339, 0, 335, 338, 755, 758, 337, 339, 761, 339, + 337, 339, 339, 339, 339, 778, 340, 336, 340, 0, + + 340, 340, 340, 340, 0, 341, 647, 341, 338, 341, + 341, 341, 341, 761, 342, 340, 342, 762, 342, 342, + 342, 342, 343, 0, 343, 0, 343, 343, 343, 343, + 350, 350, 350, 350, 341, 343, 766, 342, 0, 345, + 340, 345, 762, 345, 345, 345, 345, 360, 360, 360, + 360, 0, 0, 0, 339, 767, 767, 0, 341, 0, + 343, 766, 342, 345, 347, 768, 347, 0, 347, 347, + 347, 347, 348, 772, 348, 776, 348, 348, 348, 348, + 349, 349, 364, 364, 364, 364, 347, 0, 345, 0, + 768, 0, 349, 349, 349, 349, 0, 782, 772, 351, + + 776, 351, 348, 351, 351, 351, 351, 0, 352, 0, + 352, 347, 352, 352, 352, 352, 365, 365, 365, 365, + 783, 352, 782, 359, 359, 352, 348, 353, 351, 353, + 767, 353, 353, 353, 353, 359, 359, 359, 359, 0, + 0, 0, 353, 0, 769, 783, 352, 0, 784, 0, + 352, 0, 351, 769, 354, 349, 354, 0, 354, 354, + 354, 354, 0, 682, 355, 354, 355, 353, 355, 355, + 355, 355, 356, 784, 356, 0, 356, 356, 356, 356, + 366, 366, 366, 366, 682, 0, 355, 357, 0, 357, + 354, 357, 357, 357, 357, 358, 0, 358, 359, 358, + + 358, 358, 358, 356, 384, 384, 384, 384, 0, 682, + 361, 355, 361, 357, 361, 361, 361, 361, 769, 0, + 358, 385, 385, 385, 385, 0, 358, 356, 362, 0, + 362, 785, 362, 362, 362, 362, 0, 682, 357, 713, + 785, 361, 363, 0, 363, 358, 363, 363, 363, 363, + 358, 373, 786, 373, 0, 373, 373, 373, 373, 0, + 713, 786, 374, 0, 374, 361, 374, 374, 374, 374, + 386, 386, 386, 386, 0, 373, 374, 375, 0, 375, + 0, 375, 375, 375, 375, 713, 376, 0, 376, 0, + 376, 376, 376, 376, 391, 391, 391, 391, 0, 0, + + 373, 374, 376, 0, 377, 785, 377, 0, 377, 377, + 377, 377, 378, 713, 378, 0, 378, 378, 378, 378, + 392, 392, 392, 392, 0, 0, 786, 376, 377, 0, + 0, 379, 0, 379, 378, 379, 379, 379, 379, 380, + 0, 380, 0, 380, 380, 380, 380, 379, 0, 0, + 381, 0, 381, 377, 381, 381, 381, 381, 0, 378, + 393, 393, 393, 393, 0, 380, 0, 0, 0, 381, + 0, 382, 379, 382, 0, 382, 382, 382, 382, 383, + 0, 383, 0, 383, 383, 383, 383, 747, 0, 0, + 380, 389, 0, 389, 381, 389, 389, 389, 389, 390, + + 0, 390, 0, 390, 390, 390, 390, 396, 747, 396, + 0, 396, 396, 396, 396, 397, 0, 397, 0, 397, + 397, 397, 397, 398, 0, 398, 0, 398, 398, 398, + 398, 0, 0, 747, 399, 0, 399, 397, 399, 399, + 399, 399, 396, 0, 400, 398, 400, 0, 400, 400, + 400, 400, 401, 401, 401, 401, 402, 402, 402, 402, + 0, 747, 397, 404, 404, 0, 396, 0, 0, 0, + 398, 403, 403, 403, 403, 404, 404, 404, 404, 405, + 405, 405, 405, 406, 406, 407, 407, 407, 407, 408, + 408, 408, 408, 0, 0, 406, 406, 406, 406, 410, + + 410, 410, 410, 411, 0, 411, 0, 411, 411, 411, + 411, 412, 417, 412, 0, 412, 412, 412, 412, 413, + 414, 413, 0, 413, 413, 413, 413, 414, 411, 414, + 0, 414, 414, 414, 414, 417, 0, 0, 404, 0, + 0, 412, 415, 415, 415, 417, 415, 415, 415, 415, + 416, 0, 416, 411, 416, 416, 416, 416, 406, 0, + 417, 418, 418, 418, 418, 412, 0, 419, 0, 419, + 417, 419, 419, 419, 419, 0, 0, 420, 0, 420, + 416, 420, 420, 420, 420, 0, 417, 0, 421, 421, + 0, 0, 420, 0, 414, 419, 421, 0, 421, 0, + + 421, 421, 421, 421, 416, 422, 0, 422, 0, 422, + 422, 422, 422, 0, 0, 0, 425, 420, 425, 419, + 425, 425, 425, 425, 426, 426, 426, 426, 429, 429, + 429, 429, 0, 0, 427, 422, 427, 0, 427, 427, + 427, 427, 0, 428, 0, 428, 425, 428, 428, 428, + 428, 0, 0, 0, 428, 431, 431, 431, 431, 422, + 0, 432, 432, 421, 0, 427, 0, 0, 0, 432, + 425, 432, 0, 432, 432, 432, 432, 0, 433, 428, + 433, 0, 433, 433, 433, 433, 0, 0, 0, 427, + 0, 0, 434, 433, 434, 0, 434, 434, 434, 434, + + 435, 0, 435, 0, 435, 435, 435, 435, 439, 0, + 439, 0, 439, 439, 439, 439, 435, 436, 433, 436, + 434, 436, 436, 436, 436, 0, 437, 0, 437, 0, + 437, 437, 437, 437, 0, 0, 432, 437, 0, 0, + 0, 435, 0, 0, 434, 436, 438, 0, 438, 0, + 438, 438, 438, 438, 440, 0, 440, 0, 440, 440, + 440, 440, 437, 441, 441, 442, 442, 442, 442, 436, + 0, 441, 0, 441, 438, 441, 441, 441, 441, 444, + 444, 444, 444, 0, 445, 440, 445, 0, 445, 445, + 445, 445, 457, 457, 457, 457, 0, 0, 438, 445, + + 446, 0, 446, 0, 446, 446, 446, 446, 447, 440, + 447, 0, 447, 447, 447, 447, 448, 0, 448, 446, + 448, 448, 448, 448, 445, 0, 449, 447, 449, 0, + 449, 449, 449, 449, 0, 448, 0, 0, 441, 459, + 459, 459, 459, 450, 446, 450, 0, 450, 450, 450, + 450, 0, 447, 0, 450, 0, 449, 451, 0, 451, + 448, 451, 451, 451, 451, 452, 0, 452, 0, 452, + 452, 452, 452, 0, 0, 0, 451, 0, 0, 450, + 449, 453, 0, 453, 0, 453, 453, 453, 453, 0, + 454, 0, 454, 452, 454, 454, 454, 454, 0, 0, + + 455, 451, 455, 453, 455, 455, 455, 455, 456, 0, + 456, 0, 456, 456, 456, 456, 0, 452, 0, 456, + 460, 460, 460, 460, 462, 462, 462, 462, 453, 0, + 464, 455, 464, 0, 464, 464, 464, 464, 0, 0, + 0, 465, 0, 465, 456, 465, 465, 465, 465, 0, + 0, 0, 465, 0, 0, 455, 0, 0, 464, 467, + 467, 467, 467, 468, 0, 468, 0, 468, 468, 468, + 468, 473, 473, 473, 473, 0, 468, 465, 477, 477, + 477, 477, 464, 469, 0, 469, 468, 469, 469, 469, + 469, 0, 0, 474, 0, 474, 468, 474, 474, 474, + + 474, 468, 475, 475, 486, 486, 486, 486, 0, 0, + 475, 468, 475, 0, 475, 475, 475, 475, 474, 0, + 468, 476, 476, 478, 0, 478, 0, 478, 478, 478, + 478, 0, 0, 476, 476, 476, 476, 498, 498, 498, + 498, 0, 478, 474, 481, 0, 481, 0, 481, 481, + 481, 481, 482, 0, 482, 0, 482, 482, 482, 482, + 0, 0, 0, 481, 0, 0, 482, 478, 483, 0, + 483, 0, 483, 483, 483, 483, 0, 475, 0, 0, + 485, 485, 517, 517, 517, 517, 0, 0, 481, 0, + 483, 482, 485, 485, 485, 485, 476, 487, 0, 487, + + 0, 487, 487, 487, 487, 527, 527, 527, 527, 0, + 0, 487, 488, 0, 488, 483, 488, 488, 488, 488, + 0, 0, 0, 488, 0, 489, 487, 489, 0, 489, + 489, 489, 489, 490, 0, 490, 487, 490, 490, 490, + 490, 0, 0, 0, 489, 0, 0, 0, 488, 0, + 487, 0, 0, 0, 490, 485, 0, 491, 0, 491, + 0, 491, 491, 491, 491, 528, 528, 528, 528, 489, + 491, 492, 0, 492, 0, 492, 492, 492, 492, 490, + 493, 0, 493, 0, 493, 493, 493, 493, 0, 0, + 492, 0, 494, 0, 494, 491, 494, 494, 494, 494, + + 495, 0, 495, 0, 495, 495, 495, 495, 497, 497, + 0, 0, 496, 0, 496, 492, 496, 496, 496, 496, + 497, 497, 497, 497, 500, 500, 0, 0, 0, 496, + 0, 0, 500, 0, 500, 0, 500, 500, 500, 500, + 501, 0, 501, 0, 501, 501, 501, 501, 706, 706, + 0, 502, 0, 502, 496, 502, 502, 502, 502, 0, + 0, 500, 0, 503, 501, 503, 0, 503, 503, 503, + 503, 0, 504, 706, 504, 502, 504, 504, 504, 504, + 0, 0, 0, 497, 0, 500, 0, 0, 505, 501, + 505, 504, 505, 505, 505, 505, 0, 503, 706, 500, + + 502, 505, 506, 0, 506, 0, 506, 506, 506, 506, + 0, 0, 0, 507, 0, 507, 504, 507, 507, 507, + 507, 503, 0, 706, 0, 508, 505, 508, 507, 508, + 508, 508, 508, 509, 0, 509, 506, 509, 509, 509, + 509, 0, 0, 0, 508, 0, 0, 509, 0, 0, + 510, 0, 510, 507, 510, 510, 510, 510, 0, 0, + 506, 0, 0, 510, 530, 530, 530, 530, 0, 508, + 0, 513, 509, 513, 0, 513, 513, 513, 513, 514, + 0, 514, 0, 514, 514, 514, 514, 518, 510, 518, + 0, 518, 518, 518, 518, 519, 0, 519, 0, 519, + + 519, 519, 519, 514, 520, 0, 520, 0, 520, 520, + 520, 520, 518, 536, 536, 536, 536, 525, 0, 525, + 519, 525, 525, 525, 525, 0, 0, 0, 514, 0, + 0, 0, 520, 0, 526, 526, 0, 518, 0, 0, + 0, 525, 0, 0, 0, 519, 526, 526, 526, 526, + 0, 0, 0, 531, 0, 531, 520, 531, 531, 531, + 531, 0, 0, 533, 0, 533, 525, 533, 533, 533, + 533, 538, 538, 538, 538, 0, 0, 0, 531, 533, + 534, 0, 534, 0, 534, 534, 534, 534, 550, 550, + 550, 550, 535, 0, 535, 534, 535, 535, 535, 535, + + 0, 0, 0, 531, 533, 0, 539, 0, 539, 526, + 539, 539, 539, 539, 535, 0, 0, 540, 0, 540, + 534, 540, 540, 540, 540, 541, 0, 541, 0, 541, + 541, 541, 541, 0, 0, 0, 542, 539, 542, 535, + 542, 542, 542, 542, 0, 543, 540, 543, 541, 543, + 543, 543, 543, 552, 552, 552, 552, 0, 0, 0, + 542, 539, 544, 0, 544, 0, 544, 544, 544, 544, + 540, 0, 0, 541, 543, 0, 545, 544, 545, 0, + 545, 545, 545, 545, 0, 542, 549, 0, 549, 0, + 549, 549, 549, 549, 0, 553, 553, 0, 543, 0, + + 0, 0, 544, 0, 549, 0, 545, 553, 553, 553, + 553, 554, 554, 555, 555, 555, 555, 0, 0, 554, + 0, 554, 0, 554, 554, 554, 554, 0, 0, 549, + 545, 556, 0, 556, 0, 556, 556, 556, 556, 557, + 0, 557, 0, 557, 557, 557, 557, 558, 556, 558, + 0, 558, 558, 558, 558, 559, 557, 559, 0, 559, + 559, 559, 559, 0, 0, 0, 558, 0, 0, 0, + 553, 0, 0, 556, 575, 575, 575, 575, 560, 559, + 560, 557, 560, 560, 560, 560, 554, 0, 561, 0, + 561, 558, 561, 561, 561, 561, 562, 560, 562, 0, + + 562, 562, 562, 562, 559, 0, 563, 561, 563, 0, + 563, 563, 563, 563, 564, 0, 564, 0, 564, 564, + 564, 564, 560, 0, 0, 562, 0, 0, 0, 564, + 563, 565, 561, 565, 0, 565, 565, 565, 565, 577, + 577, 577, 577, 0, 0, 0, 565, 0, 0, 562, + 594, 594, 594, 594, 564, 563, 566, 0, 566, 0, + 566, 566, 566, 566, 597, 597, 597, 597, 569, 0, + 569, 565, 569, 569, 569, 569, 570, 0, 570, 0, + 570, 570, 570, 570, 0, 0, 566, 0, 0, 0, + 570, 569, 571, 0, 571, 0, 571, 571, 571, 571, + + 574, 0, 574, 0, 574, 574, 574, 574, 0, 0, + 566, 571, 0, 0, 0, 570, 569, 0, 0, 0, + 579, 0, 579, 574, 579, 579, 579, 579, 581, 0, + 581, 0, 581, 581, 581, 581, 571, 598, 598, 598, + 598, 0, 0, 0, 579, 0, 0, 581, 574, 582, + 0, 582, 0, 582, 582, 582, 582, 583, 0, 583, + 0, 583, 583, 583, 583, 0, 0, 0, 583, 579, + 0, 585, 581, 585, 0, 585, 585, 585, 585, 586, + 0, 586, 0, 586, 586, 586, 586, 0, 0, 0, + 587, 587, 587, 583, 587, 587, 587, 587, 588, 585, + + 588, 0, 588, 588, 588, 588, 627, 627, 627, 627, + 589, 0, 589, 588, 589, 589, 589, 589, 0, 0, + 590, 0, 590, 585, 590, 590, 590, 590, 591, 0, + 591, 0, 591, 591, 591, 591, 592, 592, 588, 0, + 596, 596, 0, 0, 592, 0, 592, 0, 592, 592, + 592, 592, 596, 596, 596, 596, 631, 631, 631, 631, + 599, 0, 599, 591, 599, 599, 599, 599, 600, 0, + 600, 0, 600, 600, 600, 600, 601, 0, 601, 0, + 601, 601, 601, 601, 602, 0, 602, 591, 602, 602, + 602, 602, 603, 0, 603, 0, 603, 603, 603, 603, + + 601, 602, 0, 604, 0, 604, 0, 604, 604, 604, + 604, 592, 0, 0, 0, 596, 603, 605, 0, 605, + 0, 605, 605, 605, 605, 601, 602, 604, 0, 0, + 606, 0, 606, 0, 606, 606, 606, 606, 607, 0, + 607, 603, 607, 607, 607, 607, 605, 606, 0, 608, + 0, 608, 604, 608, 608, 608, 608, 639, 639, 639, + 639, 609, 609, 649, 649, 649, 649, 0, 0, 609, + 605, 609, 606, 609, 609, 609, 609, 611, 0, 611, + 0, 611, 611, 611, 611, 612, 0, 612, 0, 612, + 612, 612, 612, 613, 0, 613, 0, 613, 613, 613, + + 613, 0, 0, 611, 612, 616, 0, 616, 0, 616, + 616, 616, 616, 656, 656, 656, 656, 0, 0, 0, + 616, 0, 0, 613, 0, 0, 618, 0, 611, 612, + 0, 0, 0, 618, 618, 618, 609, 618, 618, 618, + 618, 0, 0, 0, 620, 616, 620, 613, 620, 620, + 620, 620, 0, 0, 621, 0, 621, 620, 621, 621, + 621, 621, 622, 0, 622, 0, 622, 622, 622, 622, + 658, 658, 658, 658, 623, 0, 623, 622, 623, 623, + 623, 623, 620, 624, 621, 624, 0, 624, 624, 624, + 624, 0, 625, 623, 625, 0, 625, 625, 625, 625, + + 618, 0, 622, 663, 663, 663, 663, 0, 621, 626, + 626, 0, 624, 629, 629, 0, 0, 0, 623, 0, + 0, 626, 626, 626, 626, 629, 629, 629, 629, 667, + 667, 667, 667, 632, 0, 632, 624, 632, 632, 632, + 632, 633, 0, 633, 0, 633, 633, 633, 633, 634, + 632, 634, 0, 634, 634, 634, 634, 635, 0, 635, + 0, 635, 635, 635, 635, 636, 634, 636, 0, 636, + 636, 636, 636, 0, 635, 632, 637, 0, 637, 0, + 637, 637, 637, 637, 626, 0, 0, 0, 629, 638, + 638, 634, 678, 678, 678, 678, 0, 0, 0, 635, + + 0, 638, 638, 638, 638, 641, 0, 641, 0, 641, + 641, 641, 641, 642, 638, 642, 638, 642, 642, 642, + 642, 643, 0, 643, 641, 643, 643, 643, 643, 642, + 0, 646, 0, 646, 0, 646, 646, 646, 646, 638, + 648, 638, 648, 0, 648, 648, 648, 648, 0, 641, + 0, 643, 0, 0, 642, 646, 651, 0, 651, 648, + 651, 651, 651, 651, 638, 0, 652, 651, 652, 0, + 652, 652, 652, 652, 0, 643, 683, 683, 683, 683, + 646, 0, 653, 0, 648, 652, 0, 0, 0, 653, + 0, 653, 651, 653, 653, 653, 653, 654, 0, 654, + + 0, 654, 654, 654, 654, 704, 704, 704, 704, 0, + 652, 654, 655, 0, 655, 0, 655, 655, 655, 655, + 660, 0, 660, 0, 660, 660, 660, 660, 661, 0, + 661, 0, 661, 661, 661, 661, 654, 662, 0, 662, + 0, 662, 662, 662, 662, 669, 0, 669, 0, 669, + 669, 669, 669, 670, 0, 670, 653, 670, 670, 670, + 670, 0, 0, 0, 671, 0, 671, 669, 671, 671, + 671, 671, 670, 0, 0, 0, 674, 0, 674, 671, + 674, 674, 674, 674, 677, 0, 677, 0, 677, 677, + 677, 677, 669, 714, 714, 714, 714, 670, 677, 731, + + 731, 731, 731, 680, 671, 680, 674, 680, 680, 680, + 680, 681, 0, 681, 0, 681, 681, 681, 681, 0, + 684, 0, 684, 677, 684, 684, 684, 684, 0, 0, + 674, 0, 0, 680, 0, 690, 681, 690, 0, 690, + 690, 690, 690, 748, 748, 748, 748, 691, 0, 691, + 690, 691, 691, 691, 691, 0, 0, 680, 0, 0, + 0, 681, 691, 0, 692, 695, 692, 0, 692, 692, + 692, 692, 695, 0, 695, 690, 695, 695, 695, 695, + 757, 757, 757, 757, 0, 0, 0, 691, 692, 698, + 0, 698, 0, 698, 698, 698, 698, 700, 0, 700, + + 0, 700, 700, 700, 700, 701, 0, 701, 0, 701, + 701, 701, 701, 692, 0, 0, 700, 709, 0, 709, + 0, 709, 709, 709, 709, 0, 0, 0, 710, 701, + 710, 709, 710, 710, 710, 710, 0, 0, 0, 695, + 0, 700, 710, 711, 0, 711, 0, 711, 711, 711, + 711, 0, 0, 719, 701, 719, 709, 719, 719, 719, + 719, 0, 0, 0, 720, 0, 720, 710, 720, 720, + 720, 720, 0, 0, 0, 727, 0, 727, 719, 727, + 727, 727, 727, 728, 0, 728, 0, 728, 728, 728, + 728, 734, 0, 734, 0, 734, 734, 734, 734, 741, + + 0, 0, 0, 719, 750, 750, 741, 0, 741, 0, + 741, 741, 741, 741, 0, 734, 750, 750, 750, 750, + 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, + 0, 0, 0, 0, 0, 0, 774, 774, 774, 774, + 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 741, 0, 0, 0, 0, 0, 750, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 774, + + 791, 791, 791, 792, 0, 792, 793, 0, 793, 795, + 0, 795, 796, 0, 796, 797, 0, 797, 798, 0, + 798, 799, 0, 799, 800, 0, 800, 801, 0, 801, + 803, 0, 803, 804, 0, 804, 806, 0, 806, 807, + 0, 807, 809, 0, 809, 810, 0, 810, 811, 0, + 811, 812, 0, 812, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790 + } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -1451,7 +2082,7 @@ char *yytext; #include #include #include -#ifdef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -1463,72 +2094,73 @@ char *yytext; #include "ppparse.h" enum { - CB_COMPILE_STATUS_NONE, - CB_COMPILE_STATUS_TRUE, - CB_COMPILE_STATUS_FALSE, - CB_COMPILE_STATUS_FALSE_END, - CB_COMPILE_STATUS_TRUE_ELSE, - CB_COMPILE_STATUS_FALSE_ELSE, - CB_COMPILE_STATUS_ERROR + CB_COMPILE_STATUS_NONE, + CB_COMPILE_STATUS_TRUE, + CB_COMPILE_STATUS_FALSE, + CB_COMPILE_STATUS_FALSE_END, + CB_COMPILE_STATUS_TRUE_ELSE, + CB_COMPILE_STATUS_FALSE_ELSE, + CB_COMPILE_STATUS_ERROR }; -static char *plexbuff1 = NULL; -static char *plexbuff2 = NULL; -static size_t newline_count = 0; -static size_t within_comment = 0; -static size_t inside_bracket = 0; -static size_t consecutive_quotation = 0; -static int quotation_mark = 0; -static int last_line_1 = -1; -static int last_line_2 = -1; +static char *plexbuff1 = NULL; +static char *plexbuff2 = NULL; +static size_t newline_count = 0; +static size_t within_comment = 0; +static size_t inside_bracket = 0; +static size_t consecutive_quotation = 0; +static int quotation_mark = 0; +static int last_line_1 = -1; +static int last_line_2 = -1; /* for COBOL68 style COPY in data description entry */ -static int suppress_echo = 0; -static int current_division = PP_OUT_OF_DIVISION; -static int omit_data_entry_name = 0; -static int omit_data_redef_name = 0; +static int suppress_echo = 0; +static int current_division = PP_OUT_OF_DIVISION; +static int omit_data_entry_name = 0; +static int omit_data_redef_name = 0; #define MAX_DEPTH 10 -static int cb_compile_status = CB_COMPILE_STATUS_NONE; -static int cb_compile_status_list[MAX_DEPTH]; -static int compile_directive_depth = -1; +static int cb_compile_status = CB_COMPILE_STATUS_NONE; +static int cb_compile_status_list[MAX_DEPTH]; +static int compile_directive_depth = -1; + -static struct cb_replace_list *current_replace_list = NULL; +static struct cb_replace_list *current_replace_list = NULL; -static struct cb_replace_list *current_copy_replace_list = NULL; +static struct cb_replace_list *current_copy_replace_list = NULL; -static struct cb_joining_ext *current_joining_ext = NULL; +static struct cb_joining_ext *current_joining_ext = NULL; -static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ -static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ +static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ +static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ static struct copy_info { - struct copy_info *next; - char *file; - int line; - int replacing; - int joining; - int quotation_mark; - YY_BUFFER_STATE buffer; + struct copy_info *next; + char *file; + int line; + int replacing; + int joining; + int quotation_mark; + YY_BUFFER_STATE buffer; } *copy_stack = NULL; -#define YY_INPUT(buf, result, max_size) result = ppinput(buf, max_size); +#define YY_INPUT(buf, result, max_size) result = ppinput (buf, max_size); -static int ppinput(char *buf, int max_size); -static void ppecho(const char *text); +static int ppinput (char *buf, int max_size); +static void ppecho (const char *text); -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf); +#ifdef I18N_UTF8 +static void convert_ucs_hyphen_minus (char *namebuf); #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *datanamebuf); +static void ppecho_dataname (char *datanamebuf); -static void switch_to_buffer(const int lineno, const char *filename, - YY_BUFFER_STATE buffer); +static void switch_to_buffer (const int lineno, const char *filename, + YY_BUFFER_STATE buffer); -#line 1846 "pplex.c" +#line 2161 "pplex.c" -#line 1848 "pplex.c" +#line 2163 "pplex.c" #define INITIAL 0 #define PROCESS_STATE 1 @@ -1540,36 +2172,36 @@ static void switch_to_buffer(const int lineno, const char *filename, #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals(void); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(void); +int yylex_destroy ( void ); -int yyget_debug(void); +int yyget_debug ( void ); -void yyset_debug(int debug_flag); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra(void); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra(YY_EXTRA_TYPE user_defined); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in(void); +FILE *yyget_in ( void ); -void yyset_in(FILE *_in_str); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out(void); +FILE *yyget_out ( void ); -void yyset_out(FILE *_out_str); +void yyset_out ( FILE * _out_str ); -int yyget_leng(void); + int yyget_leng ( void ); -char *yyget_text(void); +char *yyget_text ( void ); -int yyget_lineno(void); +int yyget_lineno ( void ); -void yyset_lineno(int _line_number); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1577,31 +2209,31 @@ void yyset_lineno(int _line_number); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(void); +extern "C" int yywrap ( void ); #else -extern int yywrap(void); +extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT - -static void yyunput(int c, char *buf_ptr); - + + static void yyunput ( int c, char *buf_ptr ); + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void); +static int yyinput ( void ); #else -static int input(void); +static int input ( void ); #endif #endif @@ -1621,40 +2253,42 @@ static int input(void); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) { \ - } \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - int n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && \ - ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -1673,7 +2307,7 @@ static int input(void); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ @@ -1684,9 +2318,9 @@ static int input(void); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(void); +extern int yylex (void); -#define YY_DECL int yylex(void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -1698,942 +2332,839 @@ extern int yylex(void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP \ - if (yyleng > 0) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION /** The main scanner function which does all the work. */ -YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if (!(yy_init)) { - (yy_init) = 1; +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!(yy_start)) - (yy_start) = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } - yy_load_buffer_state(); - } + yy_load_buffer_state( ); + } - { -#line 126 "pplex.l" - -#line 2070 "pplex.c" - - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_current_state != 608); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - - case 1: - YY_RULE_SETUP -#line 131 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 2: - YY_RULE_SETUP + { #line 135 "pplex.l" - { - identification_division_line_number = cb_source_line; - ppecho("IDENTIFICATION DIVISION."); - } - YY_BREAK - case 3: - YY_RULE_SETUP -#line 139 "pplex.l" - { - ppecho("ID DIVISION."); - } - YY_BREAK - case 4: - YY_RULE_SETUP + + + + + +#line 2385 "pplex.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 790 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 140 "pplex.l" - { - ppecho("FUNCTION DIVISION."); - } - YY_BREAK - case 5: - YY_RULE_SETUP -#line 141 "pplex.l" - { - ppecho(yytext); - return PROGRAM_ID; - } - YY_BREAK - case 6: - YY_RULE_SETUP -#line 142 "pplex.l" - { - ppecho(yytext); - return FUNCTION_ID; - } - YY_BREAK - case 7: - YY_RULE_SETUP -#line 143 "pplex.l" - { - ppecho("ENVIRONMENT DIVISION"); - return ENVIRONMENT_DIVISION; - } - YY_BREAK - case 8: - YY_RULE_SETUP +{ + ppecho (" "); +} + YY_BREAK +case 2: +YY_RULE_SETUP #line 144 "pplex.l" - { - position_in_source_code = POSITION_AFTER_WORKING_STORAGE; - ppecho("DATA DIVISION"); - return DATA_DIVISION; - } - YY_BREAK - case 9: - YY_RULE_SETUP +{ + identification_division_line_number = cb_source_line; + ppecho ("IDENTIFICATION DIVISION."); +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 148 "pplex.l" +{ ppecho ("ID DIVISION."); } + YY_BREAK +case 4: +YY_RULE_SETUP #line 149 "pplex.l" - { - if (copy_stack->next == NULL) { - procedure_division_line_number = cb_source_line; - position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; - } - ppecho("PROCEDURE DIVISION"); - return PROCEDURE_DIVISION; - } - YY_BREAK - case 10: - YY_RULE_SETUP -#line 157 "pplex.l" - { - ppecho("END PROGRAM"); - return END_PROGRAM; - } - YY_BREAK - case 11: - YY_RULE_SETUP +{ ppecho ("FUNCTION DIVISION."); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 150 "pplex.l" +{ ppecho (yytext); return PROGRAM_ID; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 151 "pplex.l" +{ ppecho (yytext); return FUNCTION_ID; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 152 "pplex.l" +{ ppecho ("ENVIRONMENT DIVISION"); return ENVIRONMENT_DIVISION; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 153 "pplex.l" +{ + position_in_source_code = POSITION_AFTER_WORKING_STORAGE; + ppecho ("DATA DIVISION"); + return DATA_DIVISION; +} + YY_BREAK +case 9: +YY_RULE_SETUP #line 158 "pplex.l" - { - ppecho("END FUNCTION"); - return END_FUNCTION; - } - YY_BREAK - case 12: -#line 161 "pplex.l" - case 13: - YY_RULE_SETUP -#line 161 "pplex.l" - { - ppecho(" "); - if (cb_source_format != CB_FORMAT_FIXED) { - ppecho(yytext); - } - } - YY_BREAK - case 14: - YY_RULE_SETUP -#line 168 "pplex.l" - { - BEGIN PROCESS_STATE; - } - YY_BREAK - - case 15: - /* rule 15 can match eol */ - YY_RULE_SETUP -#line 171 "pplex.l" - { - BEGIN INITIAL; - unput('\n'); - } - YY_BREAK - case 16: - YY_RULE_SETUP -#line 172 "pplex.l" - { - cb_warning(_("PROCESS statement is ignored")); - } - YY_BREAK - - case 17: - YY_RULE_SETUP -#line 175 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 18: - YY_RULE_SETUP -#line 176 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 19: - YY_RULE_SETUP +{ + if(copy_stack->next == NULL) { + procedure_division_line_number = cb_source_line; + position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; + } + ppecho ("PROCEDURE DIVISION"); + return PROCEDURE_DIVISION; +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 166 "pplex.l" +{ ppecho ("END PROGRAM"); return END_PROGRAM; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 167 "pplex.l" +{ ppecho ("END FUNCTION"); return END_FUNCTION; } + YY_BREAK +case 12: +#line 170 "pplex.l" +case 13: +YY_RULE_SETUP +#line 170 "pplex.l" +{ + ppecho (" "); + if (cb_source_format != CB_FORMAT_FIXED) { + ppecho (yytext); + } +} + YY_BREAK +case 14: +YY_RULE_SETUP #line 177 "pplex.l" - { - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - - case 20: - /* rule 20 can match eol */ - YY_RULE_SETUP +{ BEGIN PROCESS_STATE; } + YY_BREAK + +case 15: +/* rule 15 can match eol */ +YY_RULE_SETUP #line 180 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 21: - YY_RULE_SETUP +{ BEGIN INITIAL; unput ('\n'); } + YY_BREAK +case 16: +YY_RULE_SETUP #line 181 "pplex.l" - { /* ignore */ - } - YY_BREAK - case 22: - YY_RULE_SETUP -#line 182 "pplex.l" - { - BEGIN INITIAL; - return '.'; - } - YY_BREAK - case 23: - YY_RULE_SETUP -#line 183 "pplex.l" - { - BEGIN PSEUDO_STATE; - return EQEQ; - } - YY_BREAK - case 24: - YY_RULE_SETUP +{ cb_warning (_("PROCESS statement is ignored")); } + YY_BREAK + +case 17: +YY_RULE_SETUP #line 184 "pplex.l" - { - return '('; - } - YY_BREAK - case 25: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 18: +YY_RULE_SETUP #line 185 "pplex.l" - { - return ')'; - } - YY_BREAK - case 26: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 19: +YY_RULE_SETUP #line 186 "pplex.l" - { - return BY; - } - YY_BREAK - case 27: - YY_RULE_SETUP -#line 187 "pplex.l" - { - return IN; - } - YY_BREAK - case 28: - YY_RULE_SETUP -#line 188 "pplex.l" - { - return OF; - } - YY_BREAK - case 29: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return REPLACE; } + YY_BREAK + +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP #line 189 "pplex.l" - { - return OFF; - } - YY_BREAK - case 30: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 21: +YY_RULE_SETUP #line 190 "pplex.l" - { - return SUPPRESS; - } - YY_BREAK - case 31: - YY_RULE_SETUP +{ /* ignore */ } + YY_BREAK +case 22: +YY_RULE_SETUP #line 191 "pplex.l" - { - return PRINTING; - } - YY_BREAK - case 32: - YY_RULE_SETUP +{ BEGIN INITIAL; return '.'; } + YY_BREAK +case 23: +YY_RULE_SETUP #line 192 "pplex.l" - { - return REPLACING; - } - YY_BREAK - case 33: - YY_RULE_SETUP +{ BEGIN PSEUDO_STATE; return EQEQ; } + YY_BREAK +case 24: +YY_RULE_SETUP #line 193 "pplex.l" - { - return LEADING; - } - YY_BREAK - case 34: - YY_RULE_SETUP +{ return '('; } + YY_BREAK +case 25: +YY_RULE_SETUP #line 194 "pplex.l" - { - return TRAILING; - } - YY_BREAK - case 35: - YY_RULE_SETUP +{ return ')'; } + YY_BREAK +case 26: +YY_RULE_SETUP #line 195 "pplex.l" - { - return JOINING; - } - YY_BREAK - case 36: - YY_RULE_SETUP +{ return BY; } + YY_BREAK +case 27: +YY_RULE_SETUP #line 196 "pplex.l" - { - return AS; - } - YY_BREAK - case 37: - YY_RULE_SETUP +{ return IN; } + YY_BREAK +case 28: +YY_RULE_SETUP #line 197 "pplex.l" - { - return PREFIX; - } - YY_BREAK - case 38: - YY_RULE_SETUP +{ return OF; } + YY_BREAK +case 29: +YY_RULE_SETUP #line 198 "pplex.l" - { - return SUFFIX; - } - YY_BREAK - case 39: - YY_RULE_SETUP +{ return OFF; } + YY_BREAK +case 30: +YY_RULE_SETUP #line 199 "pplex.l" - { - return PREFIXING; - } - YY_BREAK - case 40: - YY_RULE_SETUP +{ return SUPPRESS; } + YY_BREAK +case 31: +YY_RULE_SETUP #line 200 "pplex.l" - { - return SUFFIXING; - } - YY_BREAK - case 41: - YY_RULE_SETUP +{ return PRINTING; } + YY_BREAK +case 32: +YY_RULE_SETUP #line 201 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); -#endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 42: +{ return REPLACING; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 202 "pplex.l" +{ return LEADING; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 203 "pplex.l" +{ return TRAILING; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 204 "pplex.l" +{ return JOINING; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 205 "pplex.l" +{ return AS; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 206 "pplex.l" +{ return PREFIX; } + YY_BREAK +case 38: +YY_RULE_SETUP #line 207 "pplex.l" - case 43: -#line 208 "pplex.l" - case 44: - YY_RULE_SETUP +{ return SUFFIX; } + YY_BREAK +case 39: +YY_RULE_SETUP #line 208 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 45: - /* rule 45 can match eol */ - YY_RULE_SETUP -#line 212 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 46: - YY_RULE_SETUP -#line 213 "pplex.l" - { - pplval.s = strdup(" "); - return TOKEN; - } - YY_BREAK - case 47: - YY_RULE_SETUP -#line 214 "pplex.l" - { - BEGIN COPY_STATE; - return EQEQ; - } - YY_BREAK - case 48: - YY_RULE_SETUP -#line 215 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); +{ return PREFIXING; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 209 "pplex.l" +{ return SUFFIXING; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 210 "pplex.l" +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); #endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 49: + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 42: +#line 216 "pplex.l" +case 43: +#line 217 "pplex.l" +case 44: +YY_RULE_SETUP +#line 217 "pplex.l" +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 45: +/* rule 45 can match eol */ +YY_RULE_SETUP #line 221 "pplex.l" - case 50: -#line 222 "pplex.l" - case 51: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 46: +YY_RULE_SETUP #line 222 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 52: - YY_RULE_SETUP -#line 226 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 53: - YY_RULE_SETUP -#line 227 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 54: - YY_RULE_SETUP -#line 228 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - case 55: - /* rule 55 can match eol */ - YY_RULE_SETUP -#line 229 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 56: - YY_RULE_SETUP +{ pplval.s = strdup (" "); return TOKEN; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 223 "pplex.l" +{ BEGIN COPY_STATE; return EQEQ; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 224 "pplex.l" +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); +#endif /*I18N_UTF8*/ + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 49: #line 230 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 57: - YY_RULE_SETUP +case 50: #line 231 "pplex.l" - { - BEGIN INITIAL; - if (!strcasecmp(yytext, "FILLER")) { - ppecho(yytext); - } else { - ppecho_dataname(yytext); - } - suppress_echo = 0; - if (cb_cobol68_copy_in_data_description) { - pplval.s = strdup(yytext); - return TOKEN; - } - } - YY_BREAK - case 58: -#line 245 "pplex.l" - case 59: -#line 246 "pplex.l" - case 60: - YY_RULE_SETUP -#line 246 "pplex.l" - { - suppress_echo = 0; - BEGIN INITIAL; - ppecho(yytext); - } - YY_BREAK - - case 61: - YY_RULE_SETUP -#line 249 "pplex.l" - { - suppress_echo = (omit_data_redef_name) ? 1 : 0; - ppecho(yytext); - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return REDEFINES; - } - } - YY_BREAK - case 62: -#line 259 "pplex.l" - case 63: -#line 260 "pplex.l" - case 64: -#line 261 "pplex.l" - case 65: -#line 262 "pplex.l" - case 66: -#line 263 "pplex.l" - case 67: -#line 264 "pplex.l" - case 68: - YY_RULE_SETUP -#line 264 "pplex.l" - { - /* these words are treated as comments */ - if (cb_verify(cb_author_paragraph, yytext)) { - /* skip comments until the end of line */ - int c; - - within_comment = 1; - while ((c = input()) != EOF) { - if (c == '\n') { - break; - } - } - unput(c); - } - } - YY_BREAK - case 69: -#line 281 "pplex.l" - case 70: -#line 282 "pplex.l" - case 71: -#line 283 "pplex.l" - case 72: - YY_RULE_SETUP -#line 283 "pplex.l" - { - /* these words are comments in IBM COBOL */ - if (cb_verify(cb_eject_statement, yytext)) { - /* do nothing for now */ - } else { - /* ECHO; */ /* comment should be suppressed, shouldn't it? */ - } - } - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +case 51: +YY_RULE_SETUP +#line 231 "pplex.l" +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 52: +YY_RULE_SETUP +#line 235 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 236 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 237 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return REPLACE; } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 238 "pplex.l" +{ ECHO; cb_source_line++; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 239 "pplex.l" +{ ppecho (" "); } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 240 "pplex.l" +{ + BEGIN INITIAL; + if (!strcasecmp (yytext, "FILLER")) { + ppecho (yytext); + } else { + ppecho_dataname (yytext); + } + suppress_echo = 0; + if (cb_cobol68_copy_in_data_description) { + pplval.s = strdup (yytext); + return TOKEN; + } + } + YY_BREAK +case 58: +#line 254 "pplex.l" +case 59: +#line 255 "pplex.l" +case 60: +YY_RULE_SETUP +#line 255 "pplex.l" +{ suppress_echo = 0; BEGIN INITIAL; ppecho (yytext); } + YY_BREAK + +case 61: +YY_RULE_SETUP +#line 258 "pplex.l" +{ + suppress_echo = (omit_data_redef_name) ? 1 : 0; + ppecho (yytext); + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return REDEFINES; + } +} + YY_BREAK +case 62: +#line 268 "pplex.l" +case 63: +#line 269 "pplex.l" +case 64: +#line 270 "pplex.l" +case 65: +#line 271 "pplex.l" +case 66: +#line 272 "pplex.l" +case 67: +#line 273 "pplex.l" +case 68: +YY_RULE_SETUP +#line 273 "pplex.l" +{ + /* these words are treated as comments */ + if (cb_verify (cb_author_paragraph, yytext)) { + /* skip comments until the end of line */ + int c; + + within_comment = 1; + while ((c = input ()) != EOF) { + if (c == '\n') { + break; + } + } + unput (c); + } +} + YY_BREAK +case 69: +#line 290 "pplex.l" +case 70: +#line 291 "pplex.l" +case 71: +#line 292 "pplex.l" +case 72: +YY_RULE_SETUP #line 292 "pplex.l" - { - ppecho("\n"); - cb_source_line++; - } - YY_BREAK - case 74: - YY_RULE_SETUP -#line 294 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 75: - YY_RULE_SETUP -#line 296 "pplex.l" - { - if (inside_bracket) { - ppecho(", "); - } else { - ppecho(" "); - } - } - YY_BREAK - case 76: - YY_RULE_SETUP -#line 304 "pplex.l" - { - inside_bracket++; - ppecho("("); - } - YY_BREAK - case 77: - YY_RULE_SETUP -#line 309 "pplex.l" - { - if (inside_bracket) { - inside_bracket--; - } - ppecho(")"); - } - YY_BREAK - case 78: +{ + /* these words are comments in IBM COBOL */ + if (cb_verify (cb_eject_statement, yytext)) { + /* do nothing for now */ + } else { + /* ECHO; */ /* comment should be suppressed, shouldn't it? */ + } +} + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP +#line 301 "pplex.l" +{ ppecho ("\n"); cb_source_line++; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 303 "pplex.l" +{ ppecho (" "); } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 305 "pplex.l" +{ + if (inside_bracket) { + ppecho (", "); + } else { + ppecho (" "); + } +} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 313 "pplex.l" +{ + inside_bracket++; + ppecho ("("); +} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 318 "pplex.l" +{ + if (inside_bracket) { + inside_bracket--; + } + ppecho (")"); +} + YY_BREAK +case 78: /* rule 78 can match eol */ -#line 317 "pplex.l" - case 79: +#line 326 "pplex.l" +case 79: /* rule 79 can match eol */ -#line 318 "pplex.l" - case 80: +#line 327 "pplex.l" +case 80: /* rule 80 can match eol */ -#line 319 "pplex.l" - case 81: +#line 328 "pplex.l" +case 81: /* rule 81 can match eol */ -#line 320 "pplex.l" - case 82: +#line 329 "pplex.l" +case 82: /* rule 82 can match eol */ -#line 321 "pplex.l" - case 83: +#line 330 "pplex.l" +case 83: /* rule 83 can match eol */ -#line 322 "pplex.l" - case 84: +#line 331 "pplex.l" +case 84: /* rule 84 can match eol */ -#line 323 "pplex.l" - case 85: +#line 332 "pplex.l" +case 85: /* rule 85 can match eol */ -#line 324 "pplex.l" - case 86: +#line 333 "pplex.l" +case 86: /* rule 86 can match eol */ -#line 325 "pplex.l" - case 87: +#line 334 "pplex.l" +case 87: /* rule 87 can match eol */ -#line 326 "pplex.l" - case 88: +#line 335 "pplex.l" +case 88: /* rule 88 can match eol */ -#line 327 "pplex.l" - case 89: +#line 336 "pplex.l" +case 89: /* rule 89 can match eol */ -#line 328 "pplex.l" - case 90: +#line 337 "pplex.l" +case 90: /* rule 90 can match eol */ -#line 329 "pplex.l" - case 91: +#line 338 "pplex.l" +case 91: /* rule 91 can match eol */ -#line 330 "pplex.l" - case 92: - /* rule 92 can match eol */ - YY_RULE_SETUP -#line 330 "pplex.l" - { - /* each numeric is not a level-number */ - char *p, *pcrnt; - cobc_mbspc2ascii(yytext); - pcrnt = yytext; - while (*pcrnt) { - for (p = pcrnt; *p && *p != ' ' && *p != '\n'; p++) - ; - for (; *p == ' ' || *p == '\n'; p++) { - if (*p == '\n') { - cb_source_line++; - } - *p = '\0'; - } - ppecho(pcrnt); - if (*p) { - ppecho(" "); - } - pcrnt = p; - } - } - YY_BREAK - case 93: - YY_RULE_SETUP -#line 352 "pplex.l" - { - char *p = yytext; - cobc_mbspc2ascii(yytext); - while (*p == ' ') { - p++; - } - suppress_echo = (omit_data_entry_name) ? 1 : 0; - ppecho(p); - if (current_division == PP_DATA_DIVISION) { - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return LEVEL_NUMBER; - } - } - } - YY_BREAK - case 94: - YY_RULE_SETUP -#line 368 "pplex.l" - { - ppecho(yytext); - return yytext[0]; - } - YY_BREAK - case 95: - YY_RULE_SETUP -#line 373 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); -#endif /*I18N_UTF8*/ - ppecho(yytext); - } - YY_BREAK - case 96: -#line 379 "pplex.l" - case 97: -#line 380 "pplex.l" - case 98: - YY_RULE_SETUP -#line 380 "pplex.l" - { - ppecho(yytext); - } - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(PROCESS_STATE): - case YY_STATE_EOF(COPY_STATE): - case YY_STATE_EOF(PSEUDO_STATE): - case YY_STATE_EOF(DATANAME_JOIN_STATE): +#line 339 "pplex.l" +case 92: +/* rule 92 can match eol */ +YY_RULE_SETUP +#line 339 "pplex.l" +{ + /* each numeric is not a level-number */ + char *p, *pcrnt; + cobc_mbspc2ascii (yytext); + pcrnt = yytext; + while (*pcrnt) { + for (p = pcrnt; *p && *p != ' ' && *p != '\n' ; p++) + ; + for ( ; *p == ' ' || *p == '\n'; p++) { + if (*p == '\n') { + cb_source_line++; + } + *p = '\0'; + } + ppecho (pcrnt); + if (*p) { + ppecho (" "); + } + pcrnt = p; + } +} + YY_BREAK +case 93: +YY_RULE_SETUP +#line 361 "pplex.l" +{ + char *p = yytext; + cobc_mbspc2ascii (yytext); + while (*p == ' ') { + p++; + } + suppress_echo = (omit_data_entry_name) ? 1 : 0; + ppecho (p); + if (current_division == PP_DATA_DIVISION) { + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return LEVEL_NUMBER; + } + } +} + YY_BREAK +case 94: +YY_RULE_SETUP +#line 377 "pplex.l" +{ + ppecho (yytext); + return yytext[0]; +} + YY_BREAK +case 95: +YY_RULE_SETUP #line 382 "pplex.l" - { - struct copy_info *p; - - p = copy_stack; - - yy_delete_buffer(YY_CURRENT_BUFFER); - - /* Terminate at the end of all input */ - if (p->next == NULL) { - within_comment = 0; - newline_count = 0; - inside_bracket = 0; - current_replace_list = NULL; - current_copy_replace_list = NULL; - current_joining_ext = NULL; - text_queue1 = text_queue2 = NULL; - copy_stack = NULL; - quotation_mark = 0; - consecutive_quotation = 0; - last_line_1 = -1; - last_line_2 = -1; - yyterminate(); - } - - /* Close the current file */ - fclose(ppin); - - /* Switch to the last buffer */ - if (p->replacing) { - pp_set_copy_replace_list(NULL); - } - if (p->joining) { - pp_set_joining_ext(NULL); - } - switch_to_buffer(p->line, p->file, p->buffer); - quotation_mark = p->quotation_mark; - - copy_stack = p->next; - free(p); - } - YY_BREAK - case 99: - YY_RULE_SETUP -#line 423 "pplex.l" - YY_FATAL_ERROR("flex scanner jammed"); - YY_BREAK -#line 2722 "pplex.c" - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ((yy_c_buf_p) <= - &YY_CURRENT_BUFFER_LVALUE - ->yy_ch_buf[(yy_n_chars)]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer()) { - case EOB_ACT_END_OF_FILE: { - (yy_did_buffer_switch_on_eof) = 0; - - if (yywrap()) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); +#endif /*I18N_UTF8*/ + ppecho (yytext); } + YY_BREAK +case 96: +#line 388 "pplex.l" +case 97: +#line 389 "pplex.l" +case 98: +YY_RULE_SETUP +#line 389 "pplex.l" +{ ppecho (yytext); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PROCESS_STATE): +case YY_STATE_EOF(COPY_STATE): +case YY_STATE_EOF(PSEUDO_STATE): +case YY_STATE_EOF(DATANAME_JOIN_STATE): +#line 391 "pplex.l" +{ + struct copy_info *p; + + p = copy_stack; + + yy_delete_buffer (YY_CURRENT_BUFFER); + + /* Terminate at the end of all input */ + if (p->next == NULL) { + within_comment = 0; + newline_count = 0; + inside_bracket = 0; + current_replace_list = NULL; + current_copy_replace_list = NULL; + current_joining_ext = NULL; + text_queue1 = text_queue2 = NULL; + copy_stack = NULL; + quotation_mark = 0; + consecutive_quotation = 0; + last_line_1 = -1; + last_line_2 = -1; + yyterminate (); + } + + /* Close the current file */ + fclose (ppin); + + /* Switch to the last buffer */ + if (p->replacing) { + pp_set_copy_replace_list (NULL); + } + if (p->joining) { + pp_set_joining_ext (NULL); + } + switch_to_buffer (p->line, p->file, p->buffer); + quotation_mark = p->quotation_mark; + + copy_stack = p->next; + free (p); +} + YY_BREAK +case 99: +YY_RULE_SETUP +#line 432 "pplex.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 3037 "pplex.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2643,149 +3174,170 @@ YY_DECL { * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(void) { - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == - 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if ((yy_c_buf_p) - (yytext_ptr)-YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)((yy_c_buf_p) - (yytext_ptr)-1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)((yy_c_buf_p)-b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - int new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2)); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ((yy_n_chars) == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)yyrealloc( - (void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(void) { - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -2793,589 +3345,650 @@ static yy_state_type yy_get_previous_state(void) { * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) { - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 608); - - return yy_is_jam ? 0 : yy_current_state; + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 790); + + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT -static void yyunput(int c, char *yy_bp) { - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + - 2) { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE - ->yy_ch_buf[YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while (source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - *--dest = *--source; - - yy_cp += (int)(dest - source); - yy_bp += (int)(dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = - (int)YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2) - YY_FATAL_ERROR("flex scanner push-back overflow"); - } - - *--yy_cp = (char)c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; + static void yyunput (int c, char * yy_bp ) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void) + static int yyinput (void) #else -static int input(void) + static int input (void) #endif { - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else { /* need more input */ - int offset = (int)((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch (yy_get_next_buffer()) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap()) - return 0; - - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *)(yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file) { - - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } - - yy_init_buffer(YY_CURRENT_BUFFER, input_file); - yy_load_buffer_state(); + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) { - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } -static void yy_load_buffer_state(void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c - * YY_BUF_SIZE. - * + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2)); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file); + yy_init_buffer( b, file ); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ -void yy_delete_buffer(YY_BUFFER_STATE b) { - - if (!b) - return; + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *)b); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; + int oerrno = errno; + + yy_flush_buffer( b ); - yy_flush_buffer(b); + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ -void yy_flush_buffer(YY_BUFFER_STATE b) { - if (!b) - return; + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer) { - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ -void yypop_buffer_state(void) { - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; - } +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(void) { - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state **)yyalloc( - num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset((yy_buffer_stack), 0, - num_to_alloc * sizeof(struct yy_buffer_state *)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state **)yyrealloc( - (yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, - grow_size * sizeof(struct yy_buffer_state *)); - (yy_buffer_stack_max) = num_to_alloc; - } + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } } -/** Setup the input buffer state to scan directly from a user-specified - * character buffer. +/** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || - base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b); - - return b; +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr) { - - return yy_scan_bytes(yystr, (int)strlen(yystr)); +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, int _yybytes_len) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg) { - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ -int yyget_lineno(void) { return yylineno; } +int yyget_lineno (void) +{ + + return yylineno; +} /** Get the input stream. - * + * */ -FILE *yyget_in(void) { return yyin; } +FILE *yyget_in (void) +{ + return yyin; +} /** Get the output stream. - * + * */ -FILE *yyget_out(void) { return yyout; } +FILE *yyget_out (void) +{ + return yyout; +} /** Get the length of the current token. - * + * */ -int yyget_leng(void) { return yyleng; } +int yyget_leng (void) +{ + return yyleng; +} /** Get the current token. - * + * */ -char *yyget_text(void) { return yytext; } +char *yyget_text (void) +{ + return yytext; +} /** Set the current line number. * @param _line_number line number - * + * */ -void yyset_lineno(int _line_number) { yylineno = _line_number; } +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. - * + * * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str) { yyin = _in_str; } +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} -void yyset_out(FILE *_out_str) { yyout = _out_str; } +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} -int yyget_debug(void) { return yy_flex_debug; } +int yyget_debug (void) +{ + return yy_flex_debug; +} -void yyset_debug(int _bdebug) { yy_flex_debug = _bdebug; } +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} -static int yy_init_globals(void) { - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(void) { - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack)); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next - * time yylex() is called, initialization will occur. */ - yy_init_globals(); - - return 0; +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; } /* @@ -3383,1033 +3996,1072 @@ int yylex_destroy(void) { */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n) { - - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s) { - int n; - for (n = 0; s[n]; ++n) - ; +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size) { return malloc(size); } - -void *yyrealloc(void *ptr, yy_size_t size) { +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr) { - free((char *)ptr); /* see yyrealloc() for (char *) cast */ +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 423 "pplex.l" +#line 432 "pplex.l" -void pp_set_replace_list(struct cb_replace_list *list) { - current_replace_list = list; + +void +pp_set_replace_list (struct cb_replace_list *list) +{ + current_replace_list = list; } -void pp_set_copy_replace_list(struct cb_replace_list *list) { - current_copy_replace_list = list; +void +pp_set_copy_replace_list (struct cb_replace_list *list) +{ + current_copy_replace_list = list; } -void pp_set_joining_ext(struct cb_joining_ext *ext) { - current_joining_ext = ext; +void +pp_set_joining_ext (struct cb_joining_ext *ext) +{ + current_joining_ext = ext; } -#ifdef I18N_UTF8 -#define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" -#define UTF8_MINUS_SIGN "\xE2\x88\x92" +#ifdef I18N_UTF8 +# define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" +# define UTF8_MINUS_SIGN "\xE2\x88\x92" #else /*!I18N_UTF8*/ -#define SJIS_MINUS_SIGN "\x81\x7c" +# define SJIS_MINUS_SIGN "\x81\x7c" #endif /*I18N_UTF8*/ -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf) { - char *p = namebuf; - while (NULL != (p = strstr(p, UTF8_MINUS_SIGN))) { - memcpy(p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; - } - return; +#ifdef I18N_UTF8 +static void +convert_ucs_hyphen_minus (char *namebuf) +{ + char *p = namebuf; + while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + return; } #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *namebuf) { - int extlen, namelen, seplen; - const char *ext; - const char *sep; +static void +ppecho_dataname (char *namebuf) +{ + int extlen, namelen, seplen; + const char *ext; + const char *sep; -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(namebuf); +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (namebuf); #endif /*I18N_UTF8*/ - if (!current_joining_ext) { - ppecho(namebuf); - } else { - ext = current_joining_ext->ext; - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - extlen = strlen(ext); - namelen = strlen(namebuf); -#ifdef I18N_UTF8 - if (!utf8_ext_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = UTF8_FULLWIDTH_HYPHEN_MINUS; - seplen = 3; - } -#else /*!I18N_UTF8*/ - if (!sjis_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = SJIS_MINUS_SIGN; - seplen = 2; - } + if (!current_joining_ext) { + ppecho (namebuf); + } else { + ext = current_joining_ext->ext; + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + extlen = strlen (ext); + namelen = strlen (namebuf); +#ifdef I18N_UTF8 + if (!utf8_ext_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = UTF8_FULLWIDTH_HYPHEN_MINUS; + seplen = 3; + } +#else /*!I18N_UTF8*/ + if (!sjis_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = SJIS_MINUS_SIGN; + seplen = 2; + } #endif /*I18N_UTF8*/ - if (current_joining_ext->type == joining_as_prefix) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), sep, seplen); - memcpy(&(plexbuff1[extlen + seplen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == joining_as_suffix) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), sep, seplen); - memcpy(&(plexbuff1[namelen + seplen]), ext, extlen + 1); - } else if (current_joining_ext->type == prefixing) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == suffixing) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), ext, extlen + 1); - } - ppecho(plexbuff1); - } + if (current_joining_ext->type == joining_as_prefix) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), sep, seplen); + memcpy (&(plexbuff1[extlen+seplen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == joining_as_suffix) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), sep, seplen); + memcpy (&(plexbuff1[namelen+seplen]), ext, extlen+1); + } else if (current_joining_ext->type == prefixing) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == suffixing) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), ext, extlen+1); + } + ppecho (plexbuff1); + } } -static void switch_to_buffer(const int line, const char *file, - YY_BUFFER_STATE buffer) { - char *p; - - cb_source_line = line; - cb_source_file = strdup(file); - for (p = cb_source_file; *p; p++) { - if (*p == '\\') { - *p = '/'; - } - } - yy_switch_to_buffer(buffer); - fprintf(yyout, "# %d \"%s\"\n", line, cb_source_file); +static void +switch_to_buffer (const int line, const char *file, YY_BUFFER_STATE buffer) +{ + char *p; + + cb_source_line = line; + cb_source_file = strdup (file); + for (p = cb_source_file; *p; p++) { + if (*p == '\\') { + *p = '/'; + } + } + yy_switch_to_buffer (buffer); + fprintf (yyout, "# %d \"%s\"\n", line, cb_source_file); } -int ppopen(const char *name, struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct copy_info *p; - - for (; newline_count > 0; newline_count--) { - ungetc('\n', ppin); - } - - /* Open the copy file */ - ppin = fopen(name, "rb"); - if (!ppin) { - if (cb_source_file) { - cb_error(_("%s: %s"), name, strerror(errno)); - } else { - perror(name); - } - return -1; - } - - /* Add to dependency list */ - if (cb_depend_file) { - cb_depend_list = cb_text_list_add(cb_depend_list, name); - } - - /* Preserve the current buffer */ - p = cobc_malloc(sizeof(struct copy_info)); - p->line = cb_source_line; - p->file = cb_source_file; - p->replacing = replace_list ? 1 : 0; - p->joining = joining_ext ? 1 : 0; - p->buffer = YY_CURRENT_BUFFER; - p->quotation_mark = quotation_mark; - p->next = copy_stack; - copy_stack = p; - - /* Switch to new buffer */ - if (replace_list) { - pp_set_copy_replace_list(replace_list); - } - if (joining_ext) { - pp_set_joining_ext(joining_ext); - } - switch_to_buffer(1, name, yy_create_buffer(ppin, YY_BUF_SIZE)); - return 0; +int +ppopen (const char *name, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct copy_info *p; + + for (; newline_count > 0; newline_count--) { + ungetc ('\n', ppin); + } + + /* Open the copy file */ + ppin = fopen (name, "rb"); + if (!ppin) { + if (cb_source_file) { + cb_error (_("%s: %s"), name, strerror (errno)); + } else { + perror (name); + } + return -1; + } + + /* Add to dependency list */ + if (cb_depend_file) { + cb_depend_list = cb_text_list_add (cb_depend_list, name); + } + + /* Preserve the current buffer */ + p = cobc_malloc (sizeof (struct copy_info)); + p->line = cb_source_line; + p->file = cb_source_file; + p->replacing = replace_list ? 1 : 0; + p->joining = joining_ext ? 1 : 0; + p->buffer = YY_CURRENT_BUFFER; + p->quotation_mark = quotation_mark; + p->next = copy_stack; + copy_stack = p; + + /* Switch to new buffer */ + if (replace_list) { + pp_set_copy_replace_list (replace_list); + } + if (joining_ext) { + pp_set_joining_ext (joining_ext); + } + switch_to_buffer (1, name, yy_create_buffer (ppin, YY_BUF_SIZE)); + return 0; } -int ppcopy(const char *name, const char *lib, - struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct cb_text_list *il; - struct cb_text_list *el; - char *s; - struct stat st; - - if (lib) { - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - snprintf(plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); - s = plexbuff1; - } else { - s = (char *)name; - } - - /* Find the file */ - if (stat(s, &st) == 0) { - return ppopen(s, joining_ext, replace_list); - } - if (!plexbuff2) { - plexbuff2 = cobc_malloc(COB_SMALL_BUFF); - } - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - if (*s != '/') { - for (il = cb_include_list; il; il = il->next) { - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s/%s%s", il->text, name, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - } - } - cb_error(_("%s: %s"), name, strerror(errno)); - return -1; +int +ppcopy (const char *name, const char *lib, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct cb_text_list *il; + struct cb_text_list *el; + char *s; + struct stat st; + + if (lib) { + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + snprintf (plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); + s = plexbuff1; + } else { + s = (char *)name; + } + + /* Find the file */ + if (stat (s, &st) == 0) { + return ppopen (s, joining_ext, replace_list); + } + if (!plexbuff2) { + plexbuff2 = cobc_malloc (COB_SMALL_BUFF); + } + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + if (*s != '/') { + for (il = cb_include_list; il; il = il->next) { + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s/%s%s", + il->text, name, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + } + } + cb_error (_("%s: %s"), name, strerror (errno)); + return -1; } /* Check directives */ /* This is horrible but we have to parse directives directly after the read */ /* as flex buffers up input and it is then too late to use the flex parser */ -static void check_directive(char *buff, int *line_size) { - char *s; - char *dirptr; - size_t cnt; - int n; - char sbuff[5][256]; - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != ' ') { - return; - } - s = &buff[7]; - } else { - s = buff; - } - for (; *s == ' '; s++) { - ; - } - dirptr = s; - if (*s != '>') { - return; - } - s++; - if (*s != '>') { - return; - } - s++; - if (*s == 'D') { - if (cb_flag_debugging_line) { - memset(dirptr, ' ', 3); - } else { - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - strcat(buff, " *> DEBUG\n"); - *line_size = strlen(buff); - newline_count = 0; - } - return; - } - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - if (n < 2 || strcasecmp(sbuff[0], "SOURCE")) { - cb_warning(_("Invalid directive - ignored")); - return; - } - switch (n) { - case 2: - if (!strcasecmp(sbuff[1], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[1], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[1], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - break; - case 3: - if (strcasecmp(sbuff[1], "FORMAT") && strcasecmp(sbuff[1], "IS")) { - break; - } - if (!strcasecmp(sbuff[2], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[2], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[2], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[2], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - default: - if (strcasecmp(sbuff[1], "FORMAT")) { - break; - } - if (strcasecmp(sbuff[2], "IS")) { - break; - } - if (!strcasecmp(sbuff[3], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[3], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[3], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[3], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - } - cb_warning(_("Invalid directive - ignored")); +static void +check_directive (char *buff, int *line_size) +{ + char *s; + char *dirptr; + size_t cnt; + int n; + char sbuff[5][256]; + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != ' ') { + return; + } + s = &buff[7]; + } else { + s = buff; + } + for (; *s == ' '; s++) { + ; + } + dirptr = s; + if (*s != '>') { + return; + } + s++; + if (*s != '>') { + return; + } + s++; + if (*s == 'D') { + if (cb_flag_debugging_line) { + memset (dirptr, ' ', 3); + } else { + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + strcat (buff, " *> DEBUG\n"); + *line_size = strlen (buff); + newline_count = 0; + } + return; + } + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + if (n < 2 || strcasecmp (sbuff[0], "SOURCE")) { + cb_warning (_("Invalid directive - ignored")); + return; + } + switch (n) { + case 2: + if (!strcasecmp (sbuff[1], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[1], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[1], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + break; + case 3: + if (strcasecmp (sbuff[1], "FORMAT") && + strcasecmp (sbuff[1], "IS")) { + break; + } + if (!strcasecmp (sbuff[2], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[2], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[2], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[2], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + default: + if (strcasecmp (sbuff[1], "FORMAT")) { + break; + } + if (strcasecmp (sbuff[2], "IS")) { + break; + } + if (!strcasecmp (sbuff[3], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[3], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[3], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[3], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + } + cb_warning (_("Invalid directive - ignored")); } -static void check_dollar_directive(char *buff, int *line_size) { - struct cb_constant_list *l; - char *s; - size_t cnt; - int n; - char sbuff[5][256]; - int isDEFINED, isNOT; - int i; - COB_UNUSED(n); - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != '$') { - return; - } - if (*line_size > cb_text_column + 1) { - strcpy(buff + cb_text_column, "\n"); - } - s = &buff[6]; - } else { - if (buff[1] != '$') { - return; - } - s = buff; - } - - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - - if (strcasecmp(sbuff[0], "$IF") == 0) { - compile_directive_depth++; - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF is nested more than 10 times")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $IF statement")); - return; - } - if (strlen(sbuff[1]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Arguments not enough to $IF statemen")); - return; - } - - isDEFINED = 0; - isNOT = 0; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - if (strcasecmp(sbuff[2], "NOT") == 0) { - isNOT = 1; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - } - if (strcasecmp(sbuff[2 + isNOT], "DEFINED") == 0) { - isDEFINED = 1; - } else if (strcasecmp(sbuff[2 + isNOT], "=") != 0 || - strlen(sbuff[3 + isNOT]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid argument $IF statemen")); - return; - } - l = cb_const_list; - while (l) { - if (strcasecmp(l->name, sbuff[1]) == 0) { - if (isDEFINED) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - break; - } else { - switch (l->type) { - case CB_CONSTANT_TYPE_ALPANUM: - if (strlen(sbuff[3 + isNOT]) < 3 || - sbuff[3 + isNOT] != strchr(sbuff[3 + isNOT], '\"') || - sbuff[3 + isNOT] == strrchr(sbuff[3 + isNOT], '\"') || - strlen(strchr(sbuff[3 + isNOT] + 1, '\"')) > 1) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("%s is not a string"), sbuff[3 + isNOT]); - return; - } - strcpy(strchr(sbuff[3 + isNOT] + 1, '\"'), ""); - if (strcasecmp(sbuff[3 + isNOT] + 1, l->alphavalue) == 0) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - } - break; - case CB_CONSTANT_TYPE_NUMERIC: - // TODO - break; - default: - break; - } - break; - } - } - l = l->next; - } - } else if (strcasecmp(sbuff[0], "$ELSE") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $ELSE statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $ELSE")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_TRUE_ELSE || - cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE_ELSE) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$ELSE has continued")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE_ELSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE_ELSE; - } else if (strcasecmp(sbuff[0], "$END") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $END statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $END")); - return; - } - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; - compile_directive_depth--; - } else if (strcasecmp(sbuff[0], "$SET") == 0) { - if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE)") == 0) { - cb_source_format = CB_FORMAT_FREE; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { - cb_source_format = CB_FORMAT_FIXED; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0) { - cb_source_format = CB_FORMAT_VARIABLE; - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $SET")); - return; - } - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $ statements")); - return; - } - - if (compile_directive_depth > -1) { - for (i = 0; i <= compile_directive_depth; i++) { - if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && - cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { - cb_compile_status = CB_COMPILE_STATUS_FALSE; - return; - } - } - } - if (*buff == '\n') { - cb_compile_status = CB_COMPILE_STATUS_FALSE_END; - } else { - cb_compile_status = CB_COMPILE_STATUS_TRUE; - } +static void +check_dollar_directive (char *buff, int *line_size) +{ + struct cb_constant_list *l; + char *s; + size_t cnt; + int n; + char sbuff[5][256]; + int isDEFINED, isNOT; + int i; + COB_UNUSED(n); + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != '$') { + return; + } + if (*line_size > cb_text_column + 1) { + strcpy (buff + cb_text_column, "\n"); + } + s = &buff[6]; + } else { + if (buff[1] != '$') { + return; + } + s = buff; + } + + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + + if (strcasecmp (sbuff[0], "$IF") == 0) { + compile_directive_depth++; + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF is nested more than 10 times")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $IF statement")); + return; + } + if (strlen (sbuff[1]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Arguments not enough to $IF statemen")); + return; + } + + isDEFINED = 0; + isNOT = 0; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + if (strcasecmp (sbuff[2], "NOT") == 0) { + isNOT = 1; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + if (strcasecmp (sbuff[2+isNOT], "DEFINED") == 0) { + isDEFINED = 1; + } else if (strcasecmp (sbuff[2+isNOT], "=") != 0 || + strlen (sbuff[3+isNOT]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid argument $IF statemen")); + return; + } + l = cb_const_list; + while (l) { + if (strcasecmp (l->name, sbuff[1]) == 0) { + if (isDEFINED) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + break; + } else { + switch (l->type) { + case CB_CONSTANT_TYPE_ALPANUM: + if (strlen (sbuff[3+isNOT]) < 3 || + sbuff[3+isNOT] != strchr (sbuff[3+isNOT], '\"') || + sbuff[3+isNOT] == strrchr (sbuff[3+isNOT], '\"') || + strlen (strchr (sbuff[3+isNOT]+1, '\"')) > 1) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("%s is not a string"), sbuff[3+isNOT]); + return; + } + strcpy (strchr (sbuff[3+isNOT]+1, '\"'), ""); + if (strcasecmp (sbuff[3+isNOT]+1, l->alphavalue) == 0) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + break; + case CB_CONSTANT_TYPE_NUMERIC: + //TODO + break; + default: + break; + } + break; + } + } + l = l->next; + } + } else if (strcasecmp (sbuff[0], "$ELSE") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $ELSE statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $ELSE")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_TRUE_ELSE || + cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE_ELSE) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$ELSE has continued")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE) + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE_ELSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE_ELSE; + } else if (strcasecmp (sbuff[0], "$END") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $END statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $END")); + return; + } + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; + compile_directive_depth--; + } else if (strcasecmp (sbuff[0], "$SET") == 0) { + if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE)") == 0) { + cb_source_format = CB_FORMAT_FREE; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { + cb_source_format = CB_FORMAT_FIXED; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ + cb_source_format = CB_FORMAT_VARIABLE; + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $SET")); + return; + } + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $ statements")); + return; + } + + if (compile_directive_depth > -1) { + for (i = 0; i <= compile_directive_depth; i++) { + if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && + cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { + cb_compile_status = CB_COMPILE_STATUS_FALSE; + return; + } + } + } + if (*buff == '\n') { + cb_compile_status = CB_COMPILE_STATUS_FALSE_END; + } else { + cb_compile_status = CB_COMPILE_STATUS_TRUE; + } } /* * Read line */ -static int ppinput(char *buff, int max_size) { +static int +ppinput (char *buff, int max_size) +{ - char *bp; - size_t gotcr; - size_t continuation = 0; - int ipchar; - int i; - int n; - int coln; - char *str1 = NULL; - char *str2 = NULL; - int comment_counter = 0; + char *bp; + size_t gotcr; + size_t continuation = 0; + int ipchar; + int i; + int n; + int coln; + char *str1 = NULL; + char *str2 = NULL; + int comment_counter = 0; start: - /* read a line */ - gotcr = 0; - ipchar = 0; - for (n = 0; n < 256 && ipchar != '\n';) { - ipchar = getc(ppin); - if (ipchar == EOF) { - if (n > 0) { - break; - } - if (newline_count == 0) { - return 0; - } - memset(buff, '\n', newline_count); - buff[newline_count] = 0; - newline_count = 0; - return strlen(buff); - } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && - cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE) { - if (ipchar != ' ' && ipchar != '\n') { - buff[n++] = ' '; - } - } - if (gotcr) { - if (ipchar != '\n') { - buff[n++] = '\r'; - } - gotcr = 0; - } - if (ipchar == '\r') { - gotcr = 1; - } else if (ipchar == '\t') { - buff[n++] = ' '; - while (n % cb_tab_width != 0) { - buff[n++] = ' '; - } - } else { - buff[n++] = ipchar; - } - } - - if (buff[n - 1] != '\n') { - cb_warning(_("Line not terminated by a newline")); - buff[n++] = '\n'; - } - buff[n] = 0; - if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { - strcpy(buff, "\n"); - return strlen(buff); - } - str1 = strstr(buff, "*>"); - if (str1 != NULL) { - if ((str1 - buff) >= 7) { - str2 = strstr(str1, "\""); - if (str2 == NULL) { - buff[str1 - buff] = '\n'; - buff[str1 - buff + 1] = '\0'; - n = strlen(buff); - } - } - } - check_directive(buff, &n); - check_dollar_directive(buff, &n); - if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { - return YY_NULL; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { - newline_count++; - comment_counter++; - goto start; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { - cb_compile_status = CB_COMPILE_STATUS_NONE; - newline_count++; - comment_counter++; - goto start; - } - - /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED && - cb_source_format != CB_FORMAT_VARIABLE) { - return n; - } - - /* line too short */ - if (n < 8) { - newline_count++; - comment_counter++; - goto start; - } - - if (cb_flag_mfcomment) { - if (buff[0] == '*' || buff[0] == '/') { - /*if(!cb_flag_no_cobol_comment) { - register_comment(0, buff, comment_counter++); - }*/ - newline_count++; - goto start; - } - } - /* check the indicator (column 7) */ - bp = buff + 7; - switch (buff[6]) { - case ' ': - break; - case '-': - continuation = 1; - break; - case 'd': - case 'D': - /* debugging line */ - if (cb_flag_debugging_line) { - break; - } - newline_count++; - comment_counter++; - goto start; - case '*': - case '/': - /* comment line */ - /*if(!cb_flag_no_cobol_comment) { - register_comment(6, buff, comment_counter++); - }*/ - newline_count++; - goto start; - default: - /* invalid indicator */ - cb_error(_("Invalid indicator '%c' at column 7"), buff[6]); - return YY_NULL; - } - - /* skip comments that follow after AUTHORS, etc. */ - if (within_comment) { - /* Check all of "Area A" */ - switch (n) { - case 8: - if (buff[7] == ' ') { - newline_count++; - comment_counter++; - goto start; - } - break; - case 9: - if (!memcmp(&buff[7], " ", 2)) { - newline_count++; - comment_counter++; - goto start; - } - break; - case 10: - if (!memcmp(&buff[7], " ", 3)) { - newline_count++; - comment_counter++; - goto start; - } - break; - default: - if (!memcmp(&buff[7], " ", 4)) { - newline_count++; - comment_counter++; - goto start; - } - break; - } - within_comment = 0; - } - - /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { - - /* show warning if it is not whitespaces */ - if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { - for (coln = cb_text_column; coln < n; coln++) { - if (buff[coln] != ' ' && buff[coln] != '\n') { - cb_warning(_("Source text after column %d"), cb_text_column); - break; - } - } - } - - /* remove it */ - strcpy(buff + cb_text_column, "\n"); - last_line_2 = cb_source_line; - n = cb_text_column + 1; - } - - /* skip blank lines */ - for (i = 7; buff[i] == ' '; i++) - ; - if (buff[i] == '\n') { - newline_count++; - comment_counter++; - goto start; - } - - if (continuation) { - /* line continuation */ - for (; *bp == ' '; bp++) - ; - - /* validate concatenation */ - if (consecutive_quotation) { - if (bp[0] == quotation_mark && bp[1] == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - quotation_mark = 0; - consecutive_quotation = 0; - } else if (quotation_mark) { - /* literal concatenation */ - if (*bp == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - } - } else { - /* normal line */ - quotation_mark = 0; - consecutive_quotation = 0; - } - - /* check if string literal is to be continued */ - for (i = bp - buff; buff[i] != '\n'; i++) { - if (buff[i] == '\'' || buff[i] == '\"') { - if (quotation_mark == 0) { - /* literal start */ - quotation_mark = buff[i]; - } else if (quotation_mark == buff[i]) { - if (i == cb_text_column - 1) { - /* consecutive quotation */ - consecutive_quotation = 1; - } else { - /* literal end */ - quotation_mark = 0; - } - } - } - } - - /* truncate trailing spaces, including the newline */ - if (quotation_mark) { - for (; i < 72;) { - buff[i++] = ' '; - } - buff[i] = 0; - } else { - for (i--; buff[i] == ' '; i--) - ; - if (buff[i] == '\'' || buff[i] == '\"') { - buff[++i] = ' '; - } - buff[i + 1] = 0; - } - - if (continuation) { - memmove(buff, bp, strlen(bp) + 1); - newline_count++; - comment_counter++; - } else { - /* insert newlines at the start of the buffer */ - memmove(buff + newline_count, bp, strlen(bp) + 1); - memset(buff, '\n', newline_count); - newline_count = 1; - } - - return strlen(buff); + /* read a line */ + gotcr = 0; + ipchar = 0; + for (n = 0; n < 256 && ipchar != '\n';) { + ipchar = getc (ppin); + if (ipchar == EOF) { + if (n > 0) { + break; + } + if (newline_count == 0) { + return 0; + } + memset (buff, '\n', newline_count); + buff[newline_count] = 0; + newline_count = 0; + return strlen (buff); + } + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 + && cb_source_format != CB_FORMAT_VARIABLE) { + if (ipchar != ' ' && ipchar != '\n') { + buff[n++] = ' '; + } + } + if (gotcr) { + if (ipchar != '\n') { + buff[n++] = '\r'; + } + gotcr = 0; + } + if (ipchar == '\r') { + gotcr = 1; + } else if (ipchar == '\t') { + buff[n++] = ' '; + while (n % cb_tab_width != 0) { + buff[n++] = ' '; + } + } else { + buff[n++] = ipchar; + } + } + + if (buff[n - 1] != '\n') { + cb_warning (_("Line not terminated by a newline")); + buff[n++] = '\n'; + } + buff[n] = 0; + if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { + strcpy (buff, "\n"); + return strlen (buff); + } + str1 = strstr (buff, "*>"); + if (str1 != NULL) { + if ((str1-buff) >= 7) { + str2 = strstr (str1, "\""); + if (str2 == NULL) { + buff[str1-buff] = '\n'; + buff[str1-buff +1] = '\0'; + n = strlen (buff); + } + } + } + check_directive (buff, &n); + check_dollar_directive (buff, &n); + if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { + return YY_NULL; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { + newline_count++; + comment_counter++; + goto start; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { + cb_compile_status = CB_COMPILE_STATUS_NONE; + newline_count++; + comment_counter++; + goto start; + } + + /* nothing more to do with free format */ + if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { + return n; + } + + /* line too short */ + if (n < 8) { + newline_count++; + comment_counter++; + goto start; + } + + if (cb_flag_mfcomment) { + if (buff[0] == '*' || buff[0] == '/') { + /*if(!cb_flag_no_cobol_comment) { + register_comment(0, buff, comment_counter++); + }*/ + newline_count++; + goto start; + } + } + /* check the indicator (column 7) */ + bp = buff + 7; + switch (buff[6]) { + case ' ': + break; + case '-': + continuation = 1; + break; + case 'd': + case 'D': + /* debugging line */ + if (cb_flag_debugging_line) { + break; + } + newline_count++; + comment_counter++; + goto start; + case '*': + case '/': + /* comment line */ + /*if(!cb_flag_no_cobol_comment) { + register_comment(6, buff, comment_counter++); + }*/ + newline_count++; + goto start; + default: + /* invalid indicator */ + cb_error (_("Invalid indicator '%c' at column 7"), buff[6]); + return YY_NULL; + } + + /* skip comments that follow after AUTHORS, etc. */ + if (within_comment) { + /* Check all of "Area A" */ + switch (n) { + case 8: + if (buff[7] == ' ') { + newline_count++; + comment_counter++; + goto start; + } + break; + case 9: + if (!memcmp (&buff[7], " ", 2)) { + newline_count++; + comment_counter++; + goto start; + } + break; + case 10: + if (!memcmp (&buff[7], " ", 3)) { + newline_count++; + comment_counter++; + goto start; + } + break; + default: + if (!memcmp (&buff[7], " ", 4)) { + newline_count++; + comment_counter++; + goto start; + } + break; + } + within_comment = 0; + } + + /* check the text that is longer than cb_text_column */ + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + + /* show warning if it is not whitespaces */ + if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { + for (coln = cb_text_column; coln < n; coln++) { + if (buff[coln] != ' ' && buff[coln] != '\n') { + cb_warning (_("Source text after column %d"), + cb_text_column); + break; + } + } + } + + /* remove it */ + strcpy (buff + cb_text_column, "\n"); + last_line_2 = cb_source_line; + n = cb_text_column + 1; + } + + /* skip blank lines */ + for (i = 7; buff[i] == ' '; i++) ; + if (buff[i] == '\n') { + newline_count++; + comment_counter++; + goto start; + } + + if (continuation) { + /* line continuation */ + for (; *bp == ' '; bp++) ; + + /* validate concatenation */ + if (consecutive_quotation) { + if (bp[0] == quotation_mark && bp[1] == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + quotation_mark = 0; + consecutive_quotation = 0; + } else if (quotation_mark) { + /* literal concatenation */ + if (*bp == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + } + } else { + /* normal line */ + quotation_mark = 0; + consecutive_quotation = 0; + } + + /* check if string literal is to be continued */ + for (i = bp - buff; buff[i] != '\n'; i++) { + if (buff[i] == '\'' || buff[i] == '\"') { + if (quotation_mark == 0) { + /* literal start */ + quotation_mark = buff[i]; + } else if (quotation_mark == buff[i]) { + if (i == cb_text_column - 1) { + /* consecutive quotation */ + consecutive_quotation = 1; + } else { + /* literal end */ + quotation_mark = 0; + } + } + } + } + + /* truncate trailing spaces, including the newline */ + if (quotation_mark) { + for (; i < 72;) { + buff[i++] = ' '; + } + buff[i] = 0; + } else { + for (i--; buff[i] == ' '; i--) ; + if (buff[i] == '\'' || buff[i] == '\"') { + buff[++i] = ' '; + } + buff[i + 1] = 0; + } + + if (continuation) { + memmove (buff, bp, strlen (bp) + 1); + newline_count++; + comment_counter++; + } else { + /* insert newlines at the start of the buffer */ + memmove (buff + newline_count, bp, strlen (bp) + 1); + memset (buff, '\n', newline_count); + newline_count = 1; + } + + return strlen (buff); } -static void ppecho_0(const char *text, struct cb_text_list **pqueue, - struct cb_replace_list **preplace, - void(ppecho_proc)(const char *)) { - - struct cb_replace_list *r; - struct cb_text_list *l; - struct cb_text_list *queue; - - if (suppress_echo) { - /* generate no output */ - } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { - ppecho_proc(text); - } else if (!*preplace) { - for (; *pqueue; *pqueue = (*pqueue)->next) { - ppecho_proc((*pqueue)->text); - } - ppecho_proc(text); - } else { - /* Do replacement */ - - *pqueue = cb_text_list_add(*pqueue, text); - - while (*pqueue) { - for (r = *preplace; r; r = r->next) { - queue = *pqueue; - for (l = r->old_text; l; l = l->next) { - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l == NULL) { - break; - } - while (queue && (queue->text[0] == ' ' || queue->text[0] == '\n')) { - queue = queue->next; - } - if (queue == NULL) { - return; /* partial match */ - } - if (r->replace_type == CB_REPLACE_LEADING) { - break; - } else if (r->replace_type == CB_REPLACE_TRAILING) { - break; - } else if (r->replace_type == CB_REPLACE_OTHER) { - if (strcasecmp(l->text, queue->text) != 0) { - break; - } - } - queue = queue->next; - } - if (r->replace_type == CB_REPLACE_LEADING) { - if (!l || !queue) { - continue; - } - if (strncasecmp(l->text, queue->text, strlen(l->text)) == 0) { - break; - } - } else if (r->replace_type == CB_REPLACE_TRAILING) { - if (!l || !queue || strlen(queue->text) < strlen(r->old_text->text)) { - continue; - } - if (strcasecmp(queue->text + strlen(queue->text) - - strlen(r->old_text->text), - r->old_text->text) == 0) { - break; - } - } else if (l == NULL) { - /* match */ - break; - } - } - - /* match */ - if (r && r->replace_type == CB_REPLACE_LEADING) { - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - ppecho_proc(queue->text + oldlen); - queue = queue->next; - } else if (r && r->replace_type == CB_REPLACE_TRAILING) { - int i; - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - for (i = 0; i < strlen(queue->text) - oldlen; i++) { - fputc(queue->text[i], ppout); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - queue = queue->next; - } else if (r && l == NULL) { - for (l = r->new_text; l; l = l->next) { - ppecho_proc(l->text); - } - } else { - /* no match */ - if (!*pqueue) { - break; - } - ppecho_proc((*pqueue)->text); - queue = (*pqueue)->next; - } - - while (*pqueue != queue) { - if (!*pqueue) - break; - - l = (*pqueue)->next; - free(*pqueue); - *pqueue = l; - } - } - } +static void +ppecho_0 (const char *text, + struct cb_text_list **pqueue, + struct cb_replace_list **preplace, + void (ppecho_proc)(const char *)) { + + struct cb_replace_list *r; + struct cb_text_list *l; + struct cb_text_list *queue; + + if (suppress_echo) { + /* generate no output */ + } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { + ppecho_proc (text); + } else if (!*preplace) { + for (; *pqueue; *pqueue = (*pqueue)->next) { + ppecho_proc ((*pqueue)->text); + } + ppecho_proc (text); + } else { + /* Do replacement */ + + *pqueue = cb_text_list_add (*pqueue, text); + + while (*pqueue) { + for (r = *preplace; r; r = r->next) { + queue = *pqueue; + for (l = r->old_text; l; l = l->next) { + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l == NULL) { + break; + } + while (queue && (queue->text[0] == ' ' || + queue->text[0] == '\n')) { + queue = queue->next; + } + if (queue == NULL) { + return; /* partial match */ + } + if (r->replace_type == CB_REPLACE_LEADING) { + break; + } else if (r->replace_type == CB_REPLACE_TRAILING) { + break; + } else if (r->replace_type == CB_REPLACE_OTHER) { + if (strcasecmp (l->text, queue->text) != 0) { + break; + } + } + queue = queue->next; + } + if (r->replace_type == CB_REPLACE_LEADING) { + if (!l || !queue) { + continue; + } + if (strncasecmp (l->text, queue->text, strlen (l->text)) == 0) { + break; + } + } else if (r->replace_type == CB_REPLACE_TRAILING) { + if (!l || !queue || strlen (queue->text) < strlen (r->old_text->text)) { + continue; + } + if (strcasecmp (queue->text + strlen (queue->text) - strlen (r->old_text->text), r->old_text->text) == 0) { + break; + } + } else if (l == NULL) { + /* match */ + break; + } + } + + /* match */ + if (r && r->replace_type == CB_REPLACE_LEADING) { + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + ppecho_proc (queue->text + oldlen); + queue = queue->next; + } else if (r && r->replace_type == CB_REPLACE_TRAILING) { + int i; + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + for (i = 0; i < strlen (queue->text) - oldlen; i++) { + fputc (queue->text[i], ppout); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + queue = queue->next; + } else if (r && l == NULL) { + for (l = r->new_text; l; l = l->next) { + ppecho_proc (l->text); + } + } else { + /* no match */ + if (!*pqueue) { + break; + } + ppecho_proc ((*pqueue)->text); + queue = (*pqueue)->next; + } + + while (*pqueue != queue) { + if (!*pqueue) break; + + l = (*pqueue)->next; + free (*pqueue); + *pqueue = l; + } + } + } } -static void ppecho_final(const char *text) { fputs(text, ppout); } - -static void ppecho_2(const char *text) { - /* process REPLACE */ - ppecho_0(text, &text_queue2, ¤t_replace_list, ppecho_final); +static void +ppecho_final (const char *text) +{ + fputs (text, ppout); } -static void ppecho_1(const char *text) { - /* process COPY REPLACING */ - ppecho_0(text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +static void +ppecho_2 (const char *text) +{ + /* process REPLACE */ + ppecho_0 (text, &text_queue2, ¤t_replace_list, ppecho_final); } -static void ppecho(const char *text) { ppecho_1(text); } +static void +ppecho_1 (const char *text) +{ + /* process COPY REPLACING */ + ppecho_0 (text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +} -void pp_set_current_division(int divno) { current_division = divno; } +static void +ppecho (const char *text) +{ + ppecho_1 (text); +} -void pp_omit_data_entry_name(int on_off) { omit_data_entry_name = on_off; } +void pp_set_current_division (int divno) +{ + current_division = divno; +} -void pp_omit_data_redef_name(int on_off) { omit_data_redef_name = on_off; } +void pp_omit_data_entry_name (int on_off) +{ + omit_data_entry_name = on_off; +} -void register_comment(int comment_mark_index, char *buffer, int delta) { - struct comment_info *p = malloc(sizeof(struct comment_info)); - p->file = cb_source_file; - p->line = cb_source_line + delta + 1; +void pp_omit_data_redef_name (int on_off) +{ + omit_data_redef_name = on_off; +} - // Remove the unnecessary part of the comment - int str_len_original_line = strlen(buffer); - int comment_end_index; - if (buffer[str_len_original_line - 1] == '\n') { - if (str_len_original_line >= 2 && - buffer[str_len_original_line - 1] == '\r') { - comment_end_index = str_len_original_line - 2; - } else { - comment_end_index = str_len_original_line - 1; - } - } else { - comment_end_index = str_len_original_line; - } - int comment_len = comment_end_index - comment_mark_index - 1; - p->comment = malloc(comment_len + 1); - memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); - p->comment[comment_len] = '\0'; - - p->prev = comment_info_list_last; - p->next = NULL; - p->is_base_cobol_file = copy_stack->next == NULL; - p->position_in_source_code = position_in_source_code; - if (comment_info_list_last != NULL) { - comment_info_list_last->next = p; - } - comment_info_list_last = p; - if (comment_info_list_head == NULL) { - comment_info_list_head = p; - } +void register_comment(int comment_mark_index, char* buffer, int delta) { + struct comment_info* p = malloc(sizeof(struct comment_info)); + p->file = cb_source_file; + p->line = cb_source_line + delta + 1; + + // Remove the unnecessary part of the comment + int str_len_original_line = strlen(buffer); + int comment_end_index; + if(buffer[str_len_original_line - 1] == '\n') { + if(str_len_original_line >= 2 && buffer[str_len_original_line - 1] == '\r') { + comment_end_index = str_len_original_line - 2; + } else { + comment_end_index = str_len_original_line - 1; + } + } else { + comment_end_index = str_len_original_line; + } + int comment_len = comment_end_index - comment_mark_index - 1; + p->comment = malloc(comment_len + 1); + memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); + p->comment[comment_len] = '\0'; + + p->prev = comment_info_list_last; + p->next = NULL; + p->is_base_cobol_file = copy_stack->next == NULL; + p->position_in_source_code = position_in_source_code; + if(comment_info_list_last != NULL) { + comment_info_list_last->next = p; + } + comment_info_list_last = p; + if(comment_info_list_head == NULL) { + comment_info_list_head = p; + } } diff --git a/cobj/pplex.l b/cobj/pplex.l index 76bd67c9..e087042a 100644 --- a/cobj/pplex.l +++ b/cobj/pplex.l @@ -112,11 +112,20 @@ static void switch_to_buffer (const int lineno, const char *filename, %} -ZENSPC [\x81][\x40] -SJIS [\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC] -SJIS_EX_ZENSPC [\x82-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC]|[\x81][\x40-\x7E\x80-\xFC]{-}[\x40] -JPNWORD [\xA0-\xDF]|{SJIS_EX_ZENSPC} -WORD ([_0-9A-Z-]|{JPNWORD})+ +ZENSPC [\xE3][\x80][\x80] +U00_7F [\x00-\x7F] +U80_7FF [\xC2-\xDF][\x80-\xBF] +U800_FFF [\xE0][\xA0-\xBF][\x80-\xBF] +U1000_CFFF [\xE1-\xEC][\x80-\xBF][\x80-\xBF] +U1000_EX_ZENSPC [\xE1-\xE2][\x80-\xBF][\x80-\xBF]|[\xE3][\x80-\xBF][\x81-\xBF]|[\xE3][\x81-\xBF][\x80-\xBF]|[\xE4-\xEC][\x80-\xBF][\x80-\xBF] +UD000_D7FF [\xED][\x80-\x9F][\x80-\xBF] +UE000_FFFF [\xEE-\xEF][\x80-\xBF][\x80-\xBF] +U10000_3FFFF [\xF0][\x90-\xBF][\x80-\xBF][\x80-\xBF] +U30000_FFFFF [\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF] +U100000_10FFFF [\xF4][\x80-\x8F][\x80-\xBF][\x80-\xBF] +UTF8_EXT {U80_7FF}|{U800_FFF}|{U1000_EX_ZENSPC}|{UD000_D7FF}|{UE000_FFFF}|{U10000_3FFFF}|{U30000_FFFFF}|{U100000_10FFFF} +UTF8 {U00_7F}|{UTF8_EXT} +WORD ({UTF8_EXT}|[_0-9A-Z-])+ NUMRIC_LITERAL [+-]?[0-9,.]*[0-9] ALNUM_LITERAL \"[^\"\n]*\"|\'[^\'\n]*\' @@ -453,8 +462,16 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; } return; } diff --git a/cobj/pplex.l.m4 b/cobj/pplex.l.m4 index 52edf9be..6ffb8ab5 100644 --- a/cobj/pplex.l.m4 +++ b/cobj/pplex.l.m4 @@ -468,8 +468,16 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; } return; } diff --git a/cobj/tree.c b/cobj/tree.c index 495d0f88..6ca181a0 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -92,6 +92,7 @@ cb_tree cb_true; cb_tree cb_false; cb_tree cb_null; cb_tree cb_zero; +cb_tree cb_zen_zero; cb_tree cb_one; cb_tree cb_space; cb_tree cb_blank; @@ -764,6 +765,7 @@ void cb_init_constants(void) { cb_false = make_constant(CB_CATEGORY_BOOLEAN, "0"); cb_null = make_constant(CB_CATEGORY_DATA_POINTER, "0"); cb_zero = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.zero"); + cb_zen_zero = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.zenZero"); cb_one = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.One"); cb_space = make_constant(CB_CATEGORY_ALPHANUMERIC, "CobolConstant.space"); cb_blank = make_constant(CB_CATEGORY_ALPHANUMERIC, "CobolConstant.blank"); @@ -1465,12 +1467,7 @@ cb_tree cb_build_picture(const char *str) { size += n; } else if (c == 'N' || (category == PIC_NATIONAL_EDITED && (c == '0' || c == 'B' || c == '/'))) { -#ifdef I18N_UTF8 - /* I18N_UTF8: 3bytes for BMP. */ - size += n * 2; -#else /*!I18N_UTF8*/ size += n; -#endif /*I18N_UTF8*/ } /* store in the buffer */ @@ -1514,14 +1511,15 @@ cb_tree cb_build_picture(const char *str) { break; case PIC_NATIONAL: pic->category = CB_CATEGORY_NATIONAL; -#ifdef I18N_UTF8 - /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ - CHECK_CHARACTER_LENGTH(cb_max_utf8_character_data_size, - "National field cannot be larger than %d digits"); -#else /*!I18N_UTF8*/ + // #ifdef I18N_UTF8 + // /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ + // CHECK_CHARACTER_LENGTH(cb_max_utf8_character_data_size, + // "National field cannot be larger than %d + // digits"); + // #else /*!I18N_UTF8*/ CHECK_CHARACTER_LENGTH(cb_max_sjis_character_data_size, "National field cannot be larger than %d digits"); -#endif /*I18N_UTF8*/ + // #endif /*I18N_UTF8*/ break; case PIC_NUMERIC_EDITED: pic->str = cobc_malloc(idx + 1); @@ -1547,16 +1545,16 @@ cb_tree cb_build_picture(const char *str) { memcpy(pic->str, buff, idx); pic->category = CB_CATEGORY_NATIONAL_EDITED; pic->lenstr = idx; -#ifdef I18N_UTF8 - /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ - CHECK_CHARACTER_LENGTH( - cb_max_utf8_character_data_size, - "NationalEdit field cannot be larger than %d digits"); -#else /*!I18N_UTF8*/ + // #ifdef I18N_UTF8 + // /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ + // CHECK_CHARACTER_LENGTH( + // cb_max_utf8_character_data_size, + // "NationalEdit field cannot be larger than %d digits"); + // #else /*!I18N_UTF8*/ CHECK_CHARACTER_LENGTH( cb_max_sjis_character_data_size, "NationalEdit field cannot be larger than %d digits"); -#endif /*I18N_UTF8*/ + // #endif /*I18N_UTF8*/ break; default: goto error; @@ -2731,22 +2729,31 @@ cb_tree cb_build_intrinsic(cb_tree name, cb_tree args, cb_tree refmod) { char *cb_get_hexword(char *name) { unsigned char *p; - int non_sjis = 0; + int non_sjis_utf8 = 0; char *rt = NULL; for (p = (unsigned char *)name; *p;) { unsigned char c = *p; +#ifdef I18N_UTF8 + int n; + if ((n = COB_U8BYTE_1(c))) { + p += n; + } else { + non_sjis_utf8 = 1; + break; + } +#else /*!I18N_UTF8*/ if (c < 0x80) { p++; } else if ((0x81 <= c && c <= 0x9F) || (0xE0 <= c && c <= 0xEF)) { p += 2; } else { - non_sjis = 1; + non_sjis_utf8 = 1; break; } +#endif /*I18N_UTF8*/ } - - if (!non_sjis) { + if (!non_sjis_utf8) { rt = strdup(name); } else { rt = cobc_malloc(strlen(name) * 2 + 7); diff --git a/cobj/tree.h b/cobj/tree.h index b251eb23..647827ee 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -273,6 +273,7 @@ extern cb_tree cb_true; extern cb_tree cb_false; extern cb_tree cb_null; extern cb_tree cb_zero; +extern cb_tree cb_zen_zero; extern cb_tree cb_one; extern cb_tree cb_space; extern cb_tree cb_blank; diff --git a/cobj/typeck.c b/cobj/typeck.c index 7f45804d..7acff062 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -375,6 +375,26 @@ char *cb_encode_program_id(const char *name) { p += sprintf((char *)p, "_%02X", *s++); } /* encode invalid letters */ +#ifdef I18N_UTF8 + int n, i; + + for (; *s; s++) { + if (isalnum(*s) || *s == '_') { + *p++ = *s; + } else if (*s == '-') { + *p++ = '_'; + *p++ = '_'; + } else if ((n = COB_U8BYTE_1(*s))) { + p += sprintf((char *)p, "_"); + for (i = 0; i < n; i++) { + p += sprintf((char *)p, "%02X", s[i]); + } + s += n - 1; + } else { + p += sprintf((char *)p, "_%02X", *s); + } + } +#else /*!I18N_UTF8*/ for (; *s; s++) { if (isalnum(*s) || *s == '_') { *p++ = *s; @@ -385,7 +405,9 @@ char *cb_encode_program_id(const char *name) { p += sprintf((char *)p, "_%02X", *s); } } +#endif *p = 0; + return strdup((char *)buff); } @@ -661,6 +683,7 @@ cb_tree cb_build_identifier(cb_tree x) { cb_tree sub; int size; int n; + int name_size; if (x == cb_error_node) { return cb_error_node; @@ -741,6 +764,13 @@ cb_tree cb_build_identifier(cb_tree x) { } } +#ifdef I18N_UTF8 + name_size = + utf8_calc_sjis_size((const unsigned char *)name, strlen(name)); +#else /*!I18N_UTF8*/ + name_size = strlen(name); +#endif /*I18N_UTF8*/ + /* run-time check */ if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_SUBSCRIPT)) { if (p->occurs_depending) { @@ -754,7 +784,7 @@ cb_tree cb_build_identifier(cb_tree x) { e2 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_build_cast_integer(p->occurs_depending), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); } else { e1 = cb_build_funcall_4( "CobolCheck.checkOdo", cb_int(p->occurs_max), @@ -764,7 +794,7 @@ cb_tree cb_build_identifier(cb_tree x) { e2 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_int(p->occurs_max), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); } r->check = cb_list_add(r->check, e1); r->check = cb_list_add(r->check, e2); @@ -773,7 +803,7 @@ cb_tree cb_build_identifier(cb_tree x) { e1 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_int(p->occurs_max), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); r->check = cb_list_add(r->check, e1); } } @@ -820,18 +850,6 @@ cb_tree cb_build_identifier(cb_tree x) { #endif /*I18N_UTF8*/ /* run-time check */ -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ - if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_REF_MOD)) { - if (!CB_LITERAL_P(r->offset) || (r->length && !CB_LITERAL_P(r->length))) { - e1 = cb_build_funcall_4( - "CobolUtil.cobCheckRefMod", cb_build_cast_integer(r->offset), - r->length ? cb_build_cast_integer(r->length) : cb_int1, - cb_int(f->size), cb_build_string0((ucharptr)f->name)); - r->check = cb_list_add(r->check, e1); - } - } -#else /*!I18N_UTF8*/ if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_REF_MOD)) { if (!CB_LITERAL_P(r->offset) || (r->length && !CB_LITERAL_P(r->length))) { if (cb_tree_category(CB_TREE(r)) == CB_CATEGORY_NATIONAL || @@ -851,7 +869,6 @@ cb_tree cb_build_identifier(cb_tree x) { r->check = cb_list_add(r->check, e1); } } -#endif /*I18N_UTF8*/ } if (f->storage == CB_STORAGE_CONSTANT) { @@ -3976,17 +3993,17 @@ static int check_equal_data_size(cb_tree x, cb_tree y) { return rt; } -static int cb_validate_inspect_replaceable(cb_tree x, cb_tree y) { - int rt = 0; - - if (y == cb_zero || y == cb_space || y == cb_quote || y == cb_high || - y == cb_low) { - /* always replaceable */ - } else if (check_equal_data_size(x, y)) { - rt = 1; - } - return rt; -} +// static int cb_validate_inspect_replaceable(cb_tree x, cb_tree y) { +// int rt = 0; +// +// if (y == cb_zero || y == cb_space || y == cb_quote || y == cb_high || +// y == cb_low) { +// /* always replaceable */ +// } else if (check_equal_data_size(x, y)) { +// rt = 1; +// } +// return rt; +// } static int cb_validate_inspect_convertible(cb_tree x, cb_tree y) { unsigned char *data1; @@ -4160,7 +4177,14 @@ cb_tree cb_build_replacing_characters(cb_tree x, cb_tree l, cb_tree var) { cb_tree cb_build_replacing_all(cb_tree x, cb_tree y, cb_tree l, cb_tree var) { #ifdef I18N_UTF8 - cb_validate_inspect_replaceable(x, y); + // cb_validate_inspect_replaceable(x, y); + + if (CB_LITERAL_P(x)) { + const unsigned char *p = CB_LITERAL(x)->data; + if (COB_U8BYTE_1(*p) == 3 && y == cb_zero) { + y = cb_zen_zero; + } + } #else /*I18N_UTF8*/ /* * caution: cb_validate_inspect() never returns error (<0) @@ -4237,6 +4261,7 @@ static int move_error(cb_tree src, cb_tree dst, const size_t value_flag, return 0; } loc = src->source_line ? src : dst; + if (value_flag) { /* VALUE clause */ cb_warning_x(loc, msg); @@ -4691,10 +4716,8 @@ int validate_move(cb_tree src, cb_tree dst, size_t is_value) { if ((int)i < 0) { goto invalid_national; } - if (size >= 0 && i > size) { - goto size_overflow; - } - } else if (size >= 0 && (int)l->size > size) { + } + if (size >= 0 && utf8_calc_sjis_size(l->data, l->size) > size) { goto size_overflow; } #else /*!I18N_UTF8*/ @@ -5240,6 +5263,7 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { int val; int n; unsigned char bbyte; + size_t dst_size; l = CB_LITERAL(src); f = cb_field(dst); @@ -5297,17 +5321,34 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { ((cat == CB_CATEGORY_ALPHABETIC || cat == CB_CATEGORY_ALPHANUMERIC) && f->size < (int)(l->size + 16) && !cb_field_variable_size(f))) { - buff = cobc_malloc((size_t)f->size); +#ifdef I18N_UTF8 + if (!utf8_ext_pick(l->data)) { + diff = (int)(f->size - l->size); + dst_size = f->size; + } else { + diff = (int)(f->size - utf8_calc_sjis_size(l->data, l->size)); + if (diff > 0) { + dst_size = strlen((char *)l->data) + diff; + } else { + dst_size = strlen((char *)l->data); + } + } + buff = cobc_malloc(dst_size); +#else /*!I18N_UTF8*/ diff = (int)(f->size - l->size); + dst_size = (size_t)f->size; + buff = cobc_malloc(dst_size); +#endif /*I18N_UTF8*/ + if (cat == CB_CATEGORY_NUMERIC) { if (diff <= 0) { - memcpy(buff, l->data - diff, (size_t)f->size); + memcpy(buff, l->data - diff, dst_size); } else { memset(buff, '0', (size_t)diff); memcpy(buff + diff, l->data, (size_t)l->size); } if (f->pic->have_sign) { - p = &buff[f->size - 1]; + p = &buff[dst_size - 1]; if (cb_display_sign) { cob_put_sign_ebcdic(p, l->sign); } else if (l->sign < 0) { @@ -5321,14 +5362,14 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { } else { if (f->flag_justified) { if (diff <= 0) { - memcpy(buff, l->data - diff, (size_t)f->size); + memcpy(buff, l->data - diff, dst_size); } else { memset(buff, ' ', (size_t)diff); memcpy(buff + diff, l->data, (size_t)l->size); } } else { if (diff <= 0) { - memcpy(buff, l->data, (size_t)f->size); + memcpy(buff, l->data, dst_size); } else { memcpy(buff, l->data, (size_t)l->size); memset(buff + l->size, ' ', (size_t)diff); @@ -5336,22 +5377,22 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { } } bbyte = *buff; - if (f->size == 1) { + if (dst_size == 1) { free(buff); return cb_build_funcall_2("$E", dst, cb_int(bbyte)); } - for (i = 0; i < f->size; i++) { + for (i = 0; i < dst_size; i++) { if (bbyte != buff[i]) { break; } } - if (i == f->size) { + if (i == dst_size) { free(buff); return cb_build_method_call_3("fillBytes", cb_build_cast_address(dst), cb_int(bbyte), cb_build_cast_length(dst)); } return cb_build_method_call_3("setBytes", cb_build_cast_address(dst), - cb_build_string(buff, f->size), + cb_build_string(buff, dst_size), cb_build_cast_length(dst)); } else if (cb_fits_int(src) && f->size <= 8 && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || diff --git a/configure b/configure index 199f2538..c204c6ef 100755 --- a/configure +++ b/configure @@ -22834,7 +22834,7 @@ esac if test "`basename $CC`" = "gcc" then - CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security" + CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security -Wno-parentheses" fi if test "x$lt_cv_dlopen_self" != "xyes" diff --git a/configure.ac b/configure.ac index 59c3756f..f8edc10a 100644 --- a/configure.ac +++ b/configure.ac @@ -407,7 +407,7 @@ esac if test "`basename $CC`" = "gcc" then - CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security" + CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security -Wno-parentheses" fi if test "x$lt_cv_dlopen_self" != "xyes" diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java index 6c421c14..e8a9a773 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java @@ -72,7 +72,7 @@ public static int CBL_ERROR_PROC(CobolDataStorage x, CobolDataStorage pptr) { */ public static int SYSTEM(CobolDataStorage cmd) throws CobolStopRunException { int size = SYSTEM_getParameterSize(); - String cmdStr = new String(cmd.getByteArray(0, size)); + String cmdStr = new String(cmd.getByteArray(0, size), AbstractCobolField.charSetSJIS); return SYSTEM_main(cmdStr); } @@ -696,7 +696,10 @@ public static int CBL_TOLOWER(CobolDataStorage data, int length) { for (int n = 0; n < length; ++n) { byte b = data.getByte(n); byte[] bytes = {b}; - byte result = new String(bytes).toLowerCase().getBytes()[0]; + byte result = + new String(bytes, AbstractCobolField.charSetSJIS) + .toLowerCase() + .getBytes(AbstractCobolField.charSetSJIS)[0]; data.setByte(n, result); } return 0; @@ -729,7 +732,10 @@ public static int CBL_TOUPPER(CobolDataStorage data, int length) { for (int n = 0; n < length; ++n) { byte b = data.getByte(n); byte[] bytes = {b}; - byte result = new String(bytes).toUpperCase().getBytes()[0]; + byte result = + new String(bytes, AbstractCobolField.charSetSJIS) + .toUpperCase() + .getBytes(AbstractCobolField.charSetSJIS)[0]; data.setByte(n, result); } return 0; @@ -871,7 +877,7 @@ private static int listDirNext( Path filePath = dirList.get(0); dirList.remove(0); - byte[] filePathBytes = filePath.toString().getBytes(); + byte[] filePathBytes = filePath.toString().getBytes(AbstractCobolField.charSetSJIS); int filePathStringLength = filePathBytes.length; int copySize = Math.min(fieldSize, filePathStringLength); storage.memcpy(filePathBytes, copySize); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java index 00c13114..d540d9f3 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java @@ -223,7 +223,9 @@ public static void before(AbstractCobolField str) { n = n * 10 + (b >= 0x70 ? b - 0x70 : b - 0x30); fig++; } - p2 = new CobolDataStorage(String.format("%d", n).getBytes()); + p2 = + new CobolDataStorage( + String.format("%d", n).getBytes(AbstractCobolField.charSetSJIS)); break; default: fig = str.getSize(); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java index c3af28ff..6fa42814 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java @@ -52,7 +52,7 @@ public class CobolIntrinsic { private static AbstractCobolField[] calcField = new AbstractCobolField[DEPTH_LEVEL]; private static Random random = new Random(); private static byte[] localeBuff; - private static final byte[] byteArray00 = "00".getBytes(); + private static final byte[] byteArray00 = "00".getBytes(AbstractCobolField.charSetSJIS); /** libcob/intrinsicのmake_double_entryの実装 */ private static void makeDoubleEntry() { @@ -416,7 +416,7 @@ public static AbstractCobolField funcCurrentDate(int offset, int length) { CobolUtil.cal.get(Calendar.MINUTE), CobolUtil.cal.get(Calendar.SECOND), CobolUtil.cal.get(Calendar.MILLISECOND) / 10); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(currField, offset, length); @@ -514,7 +514,7 @@ public static AbstractCobolField funcDateOfInteger(AbstractCobolField srcdays) { } } String dateString = String.format("%04d%02d%02d", baseyear, i, days); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); return currField; } @@ -554,7 +554,7 @@ public static AbstractCobolField funcDayOfInteger(AbstractCobolField srcdays) { } } String dateString = String.format("%04d%03d", baseyear, days); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); return currField; } @@ -1905,7 +1905,7 @@ public static AbstractCobolField funcCombinedDatetime( return currField; } str = String.format("%7d%5d", srdays, srtime); - byte[] buff = str.getBytes(); + byte[] buff = str.getBytes(AbstractCobolField.charSetSJIS); for (int i = 0; i < buff.length; i++) { if (buff[i] == ' ') { buff[i] = '0'; @@ -2105,7 +2105,12 @@ public static AbstractCobolField funcExceptionFile() { makeFieldEntry(field); data = new byte[2 + flen]; System.arraycopy(CobolFile.errorFile.getFileStatus(), 0, data, 0, 2); - System.arraycopy(CobolFile.errorFile.getSelectName().getBytes(), 0, data, 2, flen); + System.arraycopy( + CobolFile.errorFile.getSelectName().getBytes(AbstractCobolField.charSetSJIS), + 0, + data, + 2, + flen); currField.setDataStorage(new CobolDataStorage(data)); } return currField; @@ -2162,7 +2167,7 @@ public static AbstractCobolField funcExceptionLocation() { CobolRuntimeException.getOrigProgramId(), CobolRuntimeException.getOrigLine()); } - localeBuff = buff.getBytes(); + localeBuff = buff.getBytes(AbstractCobolField.charSetSJIS); field.setSize(localeBuff.length); currField.setDataStorage(new CobolDataStorage(localeBuff)); return currField; @@ -2183,15 +2188,18 @@ public static AbstractCobolField funcExceptionStatement() { byte[] data; if (CobolRuntimeException.getExceptionCode() != 0 && CobolRuntimeException.getOrigStatement() != null) { - data = String.format("%-31s", CobolRuntimeException.getOrigStatement()).getBytes(); + data = + String.format("%-31s", CobolRuntimeException.getOrigStatement()) + .getBytes(AbstractCobolField.charSetSJIS); } else { - data = String.format("%-31s", "").getBytes(); + data = String.format("%-31s", "").getBytes(AbstractCobolField.charSetSJIS); } currField.setDataStorage(new CobolDataStorage(data)); return currField; } - private static final byte[] CONST_STRING_EXCEPTION_OBJECT = "EXCEPTION-OBJECT".getBytes(); + private static final byte[] CONST_STRING_EXCEPTION_OBJECT = + "EXCEPTION-OBJECT".getBytes(AbstractCobolField.charSetSJIS); // cob_intr_exception_statusの実装 /** @@ -2207,14 +2215,14 @@ public static AbstractCobolField funcExceptionStatus() { AbstractCobolField field = CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); makeFieldEntry(field); - byte[] data = String.format("%-31s", "").getBytes(); + byte[] data = String.format("%-31s", "").getBytes(AbstractCobolField.charSetSJIS); currField.setDataStorage(new CobolDataStorage(data)); if (CobolRuntimeException.getExceptionCode() != 0) { try { exceptName = CobolRuntimeException.getExceptionName( CobolRuntimeException.getExceptionCode()) - .getBytes(); + .getBytes(AbstractCobolField.charSetSJIS); } catch (Exception e) { exceptName = CONST_STRING_EXCEPTION_OBJECT; } @@ -2282,22 +2290,34 @@ public static AbstractCobolField funcSecondsFromFormattedTime( CobolDataStorage valueData = value.getDataStorage(); for (n = 0; n < format.getSize() - 1; n++) { - p1 = new String(formatData.getByteArray(n, 2)); + p1 = new String(formatData.getByteArray(n, 2), AbstractCobolField.charSetSJIS); if ("hh".equals(p1) && !hoursSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); hours = p2; hoursSeen = true; continue; } if ("mm".equals(p1) && !minutesSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); minutes = p2; minutesSeen = true; continue; } if ("ss".equals(p1) && !secondsSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); seconds = p2; secondsSeen = true; continue; @@ -2661,7 +2681,7 @@ public static AbstractCobolField funcLocaleDate( // Return the result field.setSize(dateString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } @@ -2761,7 +2781,7 @@ public static AbstractCobolField funcLocaleTime( // Return the result field.setSize(timeString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); + currField.getDataStorage().memcpy(timeString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } @@ -2830,7 +2850,7 @@ public static AbstractCobolField funcLocaleTimeFromSeconds( // Return the result field.setSize(timeString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); + currField.getDataStorage().memcpy(timeString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java index 7f1546e9..5c67989b 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.common; -import java.io.UnsupportedEncodingException; import java.time.DateTimeException; import java.time.LocalDateTime; import java.util.Calendar; @@ -214,11 +213,8 @@ public static void cobCheckRefMod(int offset, long length, int size, byte[] name */ public static void cobCheckRefMod(int offset, long length, int size, byte[] name) throws CobolStopRunException { - try { - CobolUtil.cobCheckRefMod(offset, length, size, new String(name, "Shift_JIS")); - } catch (UnsupportedEncodingException e) { - CobolUtil.cobCheckRefMod(offset, length, size, ""); - } + CobolUtil.cobCheckRefMod( + offset, length, size, new String(name, AbstractCobolField.charSetSJIS)); } /** @@ -636,11 +632,7 @@ public static void setEnv(AbstractCobolField envVarName, AbstractCobolField envV * @return TODO: 準備中 */ public static byte[] stringToBytes(String s) { - try { - return s.getBytes("Shift_JIS"); - } catch (UnsupportedEncodingException e) { - return null; - } + return s.getBytes(AbstractCobolField.charSetSJIS); } /** diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java index 9f28e2d6..251a7356 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java @@ -1122,7 +1122,7 @@ public void memcpy(byte[] src) { * @param size TODO: 準備中 */ public void memcpy(String src, int size) { - byte[] bytes = src.getBytes(); + byte[] bytes = src.getBytes(AbstractCobolField.charSetSJIS); this.memcpy(bytes, size); } @@ -1132,7 +1132,7 @@ public void memcpy(String src, int size) { * @param src TODO: 準備中 */ public void memcpy(String src) { - this.memcpy(src.getBytes()); + this.memcpy(src.getBytes(AbstractCobolField.charSetSJIS)); } /** diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java index bd833521..92bf3c7d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java @@ -124,7 +124,7 @@ public static void moveAlphanumToEdited(AbstractCobolField dst, AbstractCobolFie int max = src.getFieldSize(); int srcp = src.getFirstDataIndex(); int dstp = 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); + byte[] picBytes = dst.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); final int sizeOfInt = 4; for (int p = 0; p < picBytes.length; ) { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java index e8519c29..c678ef52 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -44,11 +43,8 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getByteArray(0, this.getSize()), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String( + dataStorage.getByteArray(0, this.getSize()), AbstractCobolField.charSetSJIS); } @Override @@ -183,19 +179,15 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - int length = Math.min(bytes.length, this.getSize()); - CobolDataStorage data = this.getDataStorage(); - // ' '埋め - for (int i = 0; i < this.getSize(); ++i) { - data.setByte(i, (byte) 0x20); - } - for (int i = 0; i < length; ++i) { - data.setByte(i, bytes[i]); - } - } catch (UnsupportedEncodingException e) { - return; + byte[] bytes = string.getBytes(AbstractCobolField.charSetSJIS); + int length = Math.min(bytes.length, this.getSize()); + CobolDataStorage data = this.getDataStorage(); + // ' '埋め + for (int i = 0; i < this.getSize(); ++i) { + data.setByte(i, (byte) 0x20); + } + for (int i = 0; i < length; ++i) { + data.setByte(i, bytes[i]); } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java index d69ba6fa..dff54357 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import jp.osscons.opensourcecobol.libcobj.common.CobolModule; @@ -180,7 +179,7 @@ public static CobolDataStorage primitiveToDataStorage(String s) { */ public CobolDataStorage(String str) { try { - byte[] bytes = str.getBytes("SHIFT-JIS"); + byte[] bytes = str.getBytes(AbstractCobolField.charSetSJIS); this.data = bytes; this.index = 0; } catch (Exception e) { @@ -269,11 +268,7 @@ public void memcpy(byte[] buf, int size) { * @param size TODO: 準備中 */ public void memcpy(String str, int size) { - try { - this.memcpy(str.getBytes("SJIS"), size); - } catch (UnsupportedEncodingException e) { - this.memcpy(str.getBytes(), size); - } + this.memcpy(str.getBytes(AbstractCobolField.charSetSJIS), size); } /** @@ -394,7 +389,7 @@ public int memcmp(byte[] buf, int size) { * @return TODO: 準備中 */ public int memcmp(String buf, int size) { - return this.memcmp(buf.getBytes(), size); + return this.memcmp(buf.getBytes(AbstractCobolField.charSetSJIS), size); } /** @@ -611,6 +606,23 @@ public void setBytes(byte[] bytes) { } } + /** + * TODO: 準備中 + * + * @param bytes コピー元のバイト配列 + * @param length コピーする最大バイト数 + */ + public void setByByteArrayAndPaddingSpaces(byte[] bytes, int length) { + int copyLength = Math.min(bytes.length, length); + int i; + for (i = 0; i < copyLength; ++i) { + this.setByte(i, bytes[i]); + } + for (; i < length; ++i) { + this.setByte(i, (byte) ' '); + } + } + /** * TODO: 準備中 * @@ -644,7 +656,7 @@ public void setBytes(int index, byte[] bytes, int length) { */ public void setBytes(String str, int length) { try { - this.setBytes(str.getBytes("SHIFT-JIS"), length); + this.setBytes(str.getBytes(AbstractCobolField.charSetSJIS), length); } catch (Exception e) { e.printStackTrace(); } @@ -693,7 +705,7 @@ public void setBytes(CobolDataStorage data, int length, int dstIndex, int srcInd public void setString(String str) { this.fillBytes((byte) 0x20, this.data.length); try { - this.setBytes(str.getBytes("SHIFT-JIS")); + this.setBytes(str.getBytes(AbstractCobolField.charSetSJIS)); } catch (Exception e) { e.printStackTrace(); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java index a5f32b07..95e4be1d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java @@ -579,7 +579,7 @@ public int getDisplayField(AbstractCobolField f, int opt) throws CobolStopRunExc String numString = this.value.toPlainString(); int dPointIndex = numString.indexOf('.'); numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); + byte[] numBuffPtr = numString.getBytes(AbstractCobolField.charSetSJIS); if (dPointIndex < 0) { dPointIndex = numBuffPtr.length; } @@ -626,7 +626,7 @@ public int getPackedField(AbstractCobolField f, int opt) { String numString = this.value.toPlainString(); int dPointIndex = numString.indexOf('.'); numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); + byte[] numBuffPtr = numString.getBytes(AbstractCobolField.charSetSJIS); if (dPointIndex < 0) { dPointIndex = numBuffPtr.length; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java index f341163d..51ee6933 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; /** AbstractCobolFieldのサブクラスを生成するためのメソッドを定義するクラス */ @@ -51,6 +50,18 @@ public static AbstractCobolField makeCobolField( return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(bytes), attr); } + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param bytes TODO: 準備中 + * @param attr TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField makeCobolField(byte[] bytes, CobolFieldAttribute attr) { + return CobolFieldFactory.makeCobolField(bytes.length, new CobolDataStorage(bytes), attr); + } + /** * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 @@ -113,11 +124,7 @@ public static AbstractCobolField makeCobolField( */ public static AbstractCobolField makeCobolField(String str) { byte[] bytes; - try { - bytes = str.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return null; - } + bytes = str.getBytes(AbstractCobolField.charSetSJIS); CobolFieldAttribute attr = new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); return new CobolAlphanumericField(bytes.length, new CobolDataStorage(bytes), attr); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java index 3ea6f26d..a9172d10 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -43,11 +42,7 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String(dataStorage.getData(), AbstractCobolField.charSetSJIS); } @Override @@ -89,11 +84,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { byte[] bytes; - try { - bytes = string.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return; - } + bytes = string.getBytes(AbstractCobolField.charSetSJIS); this.moveFrom(bytes); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java index 3ba8cb2a..d832f73c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java @@ -93,7 +93,7 @@ private void moveAlphanumToNationalEdited(AbstractCobolField src) { final int sizeOfInt = 4; - byte[] picBytes = this.getAttribute().getPic().getBytes(); + byte[] picBytes = this.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); for (int p = 0; p < picBytes.length; ) { byte c = picBytes[p++]; ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java index 1025e3ad..95c8de22 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -47,11 +46,7 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String(dataStorage.getData(), AbstractCobolField.charSetSJIS); } @Override @@ -1045,17 +1040,12 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - CobolDataStorage data = new CobolDataStorage(bytes); - CobolFieldAttribute a = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); - this.moveFrom(f); - } catch (UnsupportedEncodingException e) { - return; - } + byte[] bytes = string.getBytes(AbstractCobolField.charSetSJIS); + CobolDataStorage data = new CobolDataStorage(bytes); + CobolFieldAttribute a = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); + this.moveFrom(f); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java index ad0566bb..4e26f04c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java @@ -92,7 +92,7 @@ private static void moveDisplayToEdited(AbstractCobolField dst, AbstractCobolFie int sign = src.getSign(); src.putSign(+1); boolean neg = sign < 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); + byte[] picBytes = dst.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); int count = 0; int countSign = 1; int countCurr = 1; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index b05705b0..3f2b37cb 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -163,7 +162,7 @@ public int getInt() { @Override public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); + byte[] decimalBytes = decimal.toPlainString().getBytes(AbstractCobolField.charSetSJIS); int length = Math.min(this.size, decimalBytes.length); for (int i = 0; i < length; ++i) { @@ -427,7 +426,7 @@ private void moveEditedToDisplay(AbstractCobolField field) { } } - byte[] picBytes = field.getAttribute().getPic().getBytes(); + byte[] picBytes = field.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); int count = 0; if (scale == 0) { for (int p1 = 0; p1 < picBytes.length; p1 += 5) { @@ -588,11 +587,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } + this.dataStorage.setData(string.getBytes(AbstractCobolField.charSetSJIS)); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java index 122a0fd2..e55c62b2 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -186,7 +185,7 @@ public String getString() { @Override public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); + byte[] decimalBytes = decimal.toPlainString().getBytes(AbstractCobolField.charSetSJIS); int length = Math.min(this.size, decimalBytes.length); for (int i = 0; i < length; ++i) { @@ -308,11 +307,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } + this.dataStorage.setData(string.getBytes(AbstractCobolField.charSetSJIS)); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 69550d21..9877b5b4 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -961,7 +961,7 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { byte[] dst; boolean simple; if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); + src = file_open_name.getBytes(AbstractCobolField.charSetSJIS); dst = file_open_buff; simple = true; int srcI = 0; @@ -985,9 +985,11 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { file_open_env[i - 1] = 0; String p = CobolUtil.getEnv( - new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + new String( + Arrays.copyOfRange(file_open_env, 0, i - 1), + AbstractCobolField.charSetSJIS)); if (p != null) { - byte[] pbytes = p.getBytes(); + byte[] pbytes = p.getBytes(AbstractCobolField.charSetSJIS); for (int j = 0; j < pbytes.length; ++j) { dst[dstI + j] = pbytes[j]; } @@ -999,30 +1001,36 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { } } - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + file_open_name = + new String(Arrays.copyOfRange(dst, 0, dstI), AbstractCobolField.charSetSJIS); - byte[] fileOpenNameBytes = file_open_name.getBytes(); + byte[] fileOpenNameBytes = file_open_name.getBytes(AbstractCobolField.charSetSJIS); cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); if (simple) { int i; for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); + byte[] fileOpenBuff = + concatString(prefix[i], file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); + String p = + CobolUtil.getEnv( + new String(fileOpenBuff, AbstractCobolField.charSetSJIS)); if (p != null) { - fileOpenNameBytes = p.getBytes(); + fileOpenNameBytes = p.getBytes(AbstractCobolField.charSetSJIS); break; } } if (i == NUM_PREFIX && cob_file_path != null) { byte[] fileOpenBuff = - concatString(cob_file_path, "/", file_open_name).getBytes(); + concatString(cob_file_path, "/", file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); fileOpenNameBytes = fileOpenBuff; } } - file_open_name = new String(fileOpenNameBytes); + file_open_name = new String(fileOpenNameBytes, AbstractCobolField.charSetSJIS); } boolean wasNotExist = false; @@ -1376,7 +1384,7 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp for (int i = 0; i < 2; ++i) { sbuff[i] = fnstatus.getDataStorage().getByte(i); } - int status = Integer.parseInt(new String(sbuff)); + int status = Integer.parseInt(new String(sbuff, AbstractCobolField.charSetSJIS)); saveStatus(status, fnstatus); return; } @@ -1962,7 +1970,7 @@ public void cob_delete_file(AbstractCobolField fnstatus) { byte[] dst; boolean simple; if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); + src = file_open_name.getBytes(AbstractCobolField.charSetSJIS); dst = file_open_buff; simple = true; int srcI = 0; @@ -1986,9 +1994,11 @@ public void cob_delete_file(AbstractCobolField fnstatus) { file_open_env[i - 1] = 0; String p = CobolUtil.getEnv( - new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + new String( + Arrays.copyOfRange(file_open_env, 0, i - 1), + AbstractCobolField.charSetSJIS)); if (p != null) { - byte[] pbytes = p.getBytes(); + byte[] pbytes = p.getBytes(AbstractCobolField.charSetSJIS); for (int j = 0; j < pbytes.length; ++j) { dst[dstI + j] = pbytes[j]; } @@ -2000,30 +2010,36 @@ public void cob_delete_file(AbstractCobolField fnstatus) { } } - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + file_open_name = + new String(Arrays.copyOfRange(dst, 0, dstI), AbstractCobolField.charSetSJIS); - byte[] fileOpenNameBytes = file_open_name.getBytes(); + byte[] fileOpenNameBytes = file_open_name.getBytes(AbstractCobolField.charSetSJIS); cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); if (simple) { int i; for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); + byte[] fileOpenBuff = + concatString(prefix[i], file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); + String p = + CobolUtil.getEnv( + new String(fileOpenBuff, AbstractCobolField.charSetSJIS)); if (p != null) { - fileOpenNameBytes = p.getBytes(); + fileOpenNameBytes = p.getBytes(AbstractCobolField.charSetSJIS); break; } } if (i == NUM_PREFIX && cob_file_path != null) { byte[] fileOpenBuff = - concatString(cob_file_path, "/", file_open_name).getBytes(); + concatString(cob_file_path, "/", file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); fileOpenNameBytes = fileOpenBuff; } } - file_open_name = new String(fileOpenNameBytes); + file_open_name = new String(fileOpenNameBytes, AbstractCobolField.charSetSJIS); } Path filePath; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 5e84d4af..2c394ab4 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -508,7 +508,7 @@ private static Optional createCobolFileFromIndexedFilePath(String ind // Construct a CobolFile instance byte[] fileStatus = new byte[4]; - byte[] indxedFilePathBytes = indexedFilePath.getBytes(); + byte[] indxedFilePathBytes = indexedFilePath.getBytes(AbstractCobolField.charSetSJIS); AbstractCobolField assignField = CobolFieldFactory.makeCobolField( indxedFilePathBytes.length, diff --git a/tests/Makefile.am b/tests/Makefile.am index 60a44e3a..51a5de03 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,7 @@ TESTS = syntax \ run-O \ data-rep \ data-rep-O \ - i18n_utf8 \ + cobol_utf8 \ jp-compat \ command-line-options \ cobj-idx \ @@ -109,6 +109,22 @@ i18n_sjis_DEPENDENCIES = \ i18n_sjis.src/national.at \ i18n_sjis.src/mb-space.at +cobol_utf8_DEPENDENCIES = \ + cobol_utf8.at \ + cobol_utf8.src/user-defined-word.at \ + cobol_utf8.src/pic-x.at \ + cobol_utf8.src/pic-n.at \ + cobol_utf8.src/program-id.at \ + cobol_utf8.src/error-print.at \ + cobol_utf8.src/limits.at \ + cobol_utf8.src/national.at \ + cobol_utf8.src/mb-space.at \ + cobol_utf8.src/compare-national-diff-size.at \ + cobol_utf8.src/compare-national.at \ + cobol_utf8.src/file-handler-japanese.at \ + cobol_utf8.src/japanese-char-section-var.at \ + cobol_utf8.src/java-interface.at + jp_compat_DEPENDENCIES = \ jp-compat.at \ jp-compat.src/split-keys.at \ @@ -264,6 +280,7 @@ $(srcdir)/syntax: $(syntax_DEPENDENCIES) $(srcdir)/run: $(run_DEPENDENCIES) $(srcdir)/data-rep: $(data_rep_DEPENDENCIES) $(srcdir)/i18n_utf8: $(i18n_utf8_DEPENDENCIES) +$(srcdir)/cobol_utf8: $(cobol_utf8_DEPENDENCIES) $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) diff --git a/tests/Makefile.in b/tests/Makefile.in index 377dde6a..ee116d8d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -577,7 +577,7 @@ SUBDIRS = cobol85 @I18N_UTF8_TRUE@ run-O \ @I18N_UTF8_TRUE@ data-rep \ @I18N_UTF8_TRUE@ data-rep-O \ -@I18N_UTF8_TRUE@ i18n_utf8 \ +@I18N_UTF8_TRUE@ cobol_utf8 \ @I18N_UTF8_TRUE@ jp-compat \ @I18N_UTF8_TRUE@ command-line-options \ @I18N_UTF8_TRUE@ cobj-idx \ @@ -648,6 +648,22 @@ i18n_sjis_DEPENDENCIES = \ i18n_sjis.src/national.at \ i18n_sjis.src/mb-space.at +cobol_utf8_DEPENDENCIES = \ + cobol_utf8.at \ + cobol_utf8.src/user-defined-word.at \ + cobol_utf8.src/pic-x.at \ + cobol_utf8.src/pic-n.at \ + cobol_utf8.src/program-id.at \ + cobol_utf8.src/error-print.at \ + cobol_utf8.src/limits.at \ + cobol_utf8.src/national.at \ + cobol_utf8.src/mb-space.at \ + cobol_utf8.src/compare-national-diff-size.at \ + cobol_utf8.src/compare-national.at \ + cobol_utf8.src/file-handler-japanese.at \ + cobol_utf8.src/japanese-char-section-var.at \ + cobol_utf8.src/java-interface.at + jp_compat_DEPENDENCIES = \ jp-compat.at \ jp-compat.src/split-keys.at \ @@ -1130,9 +1146,9 @@ misc.log: misc --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -i18n_utf8.log: i18n_utf8 - @p='i18n_utf8'; \ - b='i18n_utf8'; \ +cobol_utf8.log: cobol_utf8 + @p='cobol_utf8'; \ + b='cobol_utf8'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1359,6 +1375,7 @@ $(srcdir)/syntax: $(syntax_DEPENDENCIES) $(srcdir)/run: $(run_DEPENDENCIES) $(srcdir)/data-rep: $(data_rep_DEPENDENCIES) $(srcdir)/i18n_utf8: $(i18n_utf8_DEPENDENCIES) +$(srcdir)/cobol_utf8: $(cobol_utf8_DEPENDENCIES) $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) diff --git a/tests/a.sh b/tests/a.sh new file mode 100644 index 00000000..3453fc86 --- /dev/null +++ b/tests/a.sh @@ -0,0 +1,15 @@ +LANG=C.utf8 \ +LC_CTYPE="C.utf8" \ +LC_NUMERIC="C.utf8" \ +LC_TIME="C.utf8" \ +LC_COLLATE="C.utf8" \ +LC_MONETARY="C.utf8" \ +LC_MESSAGES="C.utf8" \ +LC_PAPER="C.utf8" \ +LC_NAME="C.utf8" \ +LC_ADDRESS="C.utf8" \ +LC_TELEPHONE="C.utf8" \ +LC_MEASUREMENT="C.utf8" \ +LC_IDENTIFICATION="C.utf8" \ +LC_ALL="" \ +./cobol_utf8 \ No newline at end of file diff --git a/tests/a.txt b/tests/a.txt new file mode 100644 index 00000000..05009d66 --- /dev/null +++ b/tests/a.txt @@ -0,0 +1 @@ +{ diff --git a/tests/cobol_utf8.at b/tests/cobol_utf8.at new file mode 100644 index 00000000..fca53cf8 --- /dev/null +++ b/tests/cobol_utf8.at @@ -0,0 +1,37 @@ +### OpenCOBOL Test Suite -*- m4 -*- + +# Copyright (C) 2003-2009 Keisuke Nishida +# Copyright (C) 2007-2009 Roger While +# Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. +# +# 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 +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301 USA + +AT_INIT([I18n Shift_JIS Tests]) + +m4_include([user-defined-word.at]) +m4_include([pic-x.at]) +m4_include([pic-n.at]) +m4_include([program-id.at]) +m4_include([error-print.at]) +m4_include([limits.at]) +m4_include([national.at]) +m4_include([mb-space.at]) + +m4_include([compare-national-diff-size.at]) +m4_include([compare-national.at]) +m4_include([file-handler-japanese.at]) +m4_include([japanese-char-section-var.at]) +m4_include([java-interface.at]) diff --git a/tests/cobol_utf8.src/compare-national-diff-size.at b/tests/cobol_utf8.src/compare-national-diff-size.at new file mode 100644 index 00000000..063768fb --- /dev/null +++ b/tests/cobol_utf8.src/compare-national-diff-size.at @@ -0,0 +1,55 @@ +AT_SETUP([Compare national of different sizes]) +export LC_ALL='' + +AT_DATA([prog.cbl],[ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 WK-STR1-1 PIC N(04) value "猫". + 01 WK-STR1-2 PIC N(02) value "猫". + 01 WK-STR2-1 PIC N(04) value "猫犬". + 01 WK-STR2-2 PIC N(02) value "猫犬". + 01 WK-STR3-1 PIC N(04). + 01 WK-STR3-2 PIC N(02). + 01 WK-STR4-1 PIC N(04) VALUE SPACE. + 01 WK-STR4-2 PIC N(02) VALUE SPACE. + 01 WK-STR5-1 PIC N(100) value "猫". + 01 WK-STR5-2 PIC N(1) value "猫". + PROCEDURE DIVISION. + IF WK-STR1-1 NOT = WK-STR1-2 + DISPLAY "NG" + END-IF. + IF WK-STR1-2 NOT = WK-STR1-1 + DISPLAY "NG" + END-IF. + IF WK-STR2-1 NOT = WK-STR2-2 + DISPLAY "NG" + END-IF. + IF WK-STR2-2 NOT = WK-STR2-1 + DISPLAY "NG" + END-IF. + IF WK-STR3-1 NOT = WK-STR3-2 + DISPLAY "NG" + END-IF. + IF WK-STR3-2 NOT = WK-STR3-1 + DISPLAY "NG" + END-IF. + IF WK-STR4-1 NOT = WK-STR4-2 + DISPLAY "NG" + END-IF. + IF WK-STR4-2 NOT = WK-STR4-1 + DISPLAY "NG" + END-IF. + IF WK-STR5-1 NOT = WK-STR5-2 + DISPLAY "NG" + END-IF. + IF WK-STR5-2 NOT = WK-STR5-1 + DISPLAY "NG" + END-IF. +]) +AT_CHECK([cobj prog.cbl]) +AT_CHECK([java prog]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/compare-national.at b/tests/cobol_utf8.src/compare-national.at new file mode 100644 index 00000000..3c3d19bf --- /dev/null +++ b/tests/cobol_utf8.src/compare-national.at @@ -0,0 +1,44 @@ +AT_SETUP([compare national]) +export LC_ALL='' + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A PIC N VALUE N"あ". + 01 I PIC N VALUE N"い". + 01 X1 PIC N VALUE "丘". + 01 X2 PIC N VALUE "岡". + 01 X3 PIC N VALUE "花". + 01 X4 PIC N VALUE "鼻". + PROCEDURE DIVISION. + IF A = I + DISPLAY "A = I" + ELSE + DISPLAY "A != I" + END-IF. + + IF X1 = X2 + DISPLAY "X1 = X2" + ELSE + DISPLAY "X1 != X2" + END-IF. + + IF X3 = X4 + DISPLAY "X3 = X4" + ELSE + DISPLAY "X3 != X4" + END-IF. + + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[A != I +X1 != X2 +X3 != X4 +]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/error-print.at b/tests/cobol_utf8.src/error-print.at new file mode 100644 index 00000000..fe3f0718 --- /dev/null +++ b/tests/cobol_utf8.src/error-print.at @@ -0,0 +1,82 @@ +AT_SETUP([undefined not message]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + identification division. + program-id. prog. + data division. + working-storage section. + 01 wk-01. + 03 wk-02 pic x(2). + 03 wk−03 redefines wk-02 pic n(2). + 01 cnt pic 9(1). + procedure division. + inspect wk−03 tallying cnt + for characters before initial space. + stop run. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:8: Error: Size of 'wk_03' larger than size of 'wk-02' +]) + +AT_CLEANUP + +AT_SETUP([Encoding alphanumeric name item]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + DISPLAY A___82A0___A. + STOP RUN. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:6: Error: 'A___82A0___A' undefined +]) + +AT_CLEANUP + +AT_SETUP([Encoding national name item]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + DISPLAY A___あ___A. + STOP RUN. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:6: Error: 'A___あ___A' undefined +]) + +AT_CLEANUP + +AT_SETUP([Decoding national section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + テスト SECTION. + MOVE 1 TO 項目1. + テスト段落. + MOVE 1 TO 項目2. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob: In section 'テスト': +prog.cob:7: Error: '項目1' undefined +prog.cob: In paragraph 'テスト段落': +prog.cob:9: Error: '項目2' undefined +]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/file-handler-japanese.at b/tests/cobol_utf8.src/file-handler-japanese.at new file mode 100644 index 00000000..18a8b71f --- /dev/null +++ b/tests/cobol_utf8.src/file-handler-japanese.at @@ -0,0 +1,26 @@ +AT_SETUP([file-handler-japanese]) +export LC_ALL='' + +# This test verifies that Issue 539 is fixed. + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT テストファイル + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD テストファイル. + 01 REC PIC X(10). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([grep 'h_テストファイル' prog.java > /dev/null]) +AT_CHECK([grep 'h_ウスエサァイル' prog.java], [1]) + +AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/japanese-char-section-var.at b/tests/cobol_utf8.src/japanese-char-section-var.at new file mode 100644 index 00000000..2fa32ec8 --- /dev/null +++ b/tests/cobol_utf8.src/japanese-char-section-var.at @@ -0,0 +1,48 @@ +AT_SETUP([japanese word section variable]) +export LC_ALL='' + +AT_DATA([prog.cbl], [ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 新宿 PIC x(5) VALUE "00000". + 01 横浜−1 PIC x(5) VALUE "11111". + 01 甲府−2 PIC x(5) VALUE "22222". + 01 宇都宮1 PIC x(5) VALUE "33333". + 01 仙台2 PIC x(5) VALUE "44444". + PROCEDURE DIVISION. + 東京ラベル. + DISPLAY 新宿. + 神奈川−1ラベル. + DISPLAY 横浜−1. + 山梨−2ラベル. + DISPLAY 甲府−2. + 栃木1ラベル. + DISPLAY 宇都宮1. + 宮城2ラベル. + DISPLAY 仙台2. +]) + + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[00000 +11111 +22222 +33333 +44444 +]) +AT_CHECK([cat prog.java | grep "新宿" > /dev/null]) +AT_CHECK([cat prog.java | grep "横浜_1" > /dev/null]) +AT_CHECK([cat prog.java | grep "甲府_2" > /dev/null]) +AT_CHECK([cat prog.java | grep "宇都宮1" > /dev/null]) +AT_CHECK([cat prog.java | grep "仙台2" > /dev/null]) + +AT_CHECK([cat prog.java | grep "東京ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "神奈川_1ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "山梨_2ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "栃木1ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "宮城2ラベル" > /dev/null]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/java-interface.at b/tests/cobol_utf8.src/java-interface.at new file mode 100644 index 00000000..38f020e2 --- /dev/null +++ b/tests/cobol_utf8.src/java-interface.at @@ -0,0 +1,600 @@ +AT_SETUP([no-argument]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + procedure division. + display " b". +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(); + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ b +]) + +AT_CLEANUP + +AT_SETUP([PIC 9(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3). + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: 000 + arg: 1 + arg: 001 + arg: 2 + arg: 002 + arg: 3 + arg: 998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3). + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {-999, -2, -1, 0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999 + arg: -998 + arg: -002 + arg: -1 + arg: -001 + arg: 0 + arg: +000 + arg: 1 + arg: +001 + arg: 2 + arg: +002 + arg: 3 + arg: +998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)V99]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3)V99. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + double@<:@@:>@ data_list = {-999.99, -2.01, -1.01, -1.00, 0, 1.01, 2.01, 998.99}; + try{ + for(double data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getDouble(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999.99 + arg: -998.99 + arg: -002.01 + arg: -1.01 + arg: -001.01 + arg: -0.01 + arg: -001.00 + arg: 0.0 + arg: +000.00 + arg: 1.0 + arg: +001.01 + arg: 2.01 + arg: +002.01 + arg: 3.01 + arg: +998.99 + arg: 999.99 +]) + +AT_CLEANUP + + +AT_SETUP([PIC 9(3) USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3) USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: 000 + arg: 1 + arg: 001 + arg: 2 + arg: 002 + arg: 3 + arg: 998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3) USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3) USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {-999, -2, -1, 0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999 + arg: -998 + arg: -002 + arg: -1 + arg: -001 + arg: 0 + arg: +000 + arg: 1 + arg: +001 + arg: 2 + arg: +002 + arg: 3 + arg: +998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)V99 USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3)V99 USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + double@<:@@:>@ data_list = {-999.99, -2.01, -1.01, -1.00, 0, 1.01, 2.01, 998.99}; + try{ + for(double data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getDouble(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999.99 + arg: -998.99 + arg: -002.01 + arg: -1.01 + arg: -001.01 + arg: -0.01 + arg: -001.00 + arg: 0.0 + arg: +000.00 + arg: 1.0 + arg: +001.01 + arg: 2.01 + arg: +002.01 + arg: 3.01 + arg: +998.99 + arg: 999.99 +]) + +AT_CLEANUP + +AT_SETUP([PIC X(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic X(3). + procedure division using arg. + display " arg: " arg. + MOVE "123" TO arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + try{ + rs = prog.execute("abc"); + System.out.println(" arg: " + rs.getString(1)); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: abc + arg: 123 +]) + +AT_CLEANUP + +AT_SETUP([Out of range]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3). + procedure division using arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + try{ + rs = prog.execute(0); + System.out.println(" arg: " + rs.getInt(2)); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a 2>&1 | grep 'The index is out of range' > /dev/null], [0]) +AT_CLEANUP + +AT_SETUP([Type mismatch]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg-i pic 9(3). + 01 arg-d pic 9(3)V9. + 01 arg-s pic X(3). + procedure division using arg-i arg-d arg-s. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(1, 1.1, "abc"); + try{ + rs.getDouble(1); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getString(1); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getInt(2); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getString(2); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getInt(3); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getDouble(3); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a 2>&1 | grep 'jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException'], [0], +[jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'double' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'String' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'int' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'String' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'int' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'double' +]) +AT_CLEANUP + +AT_SETUP([Japanese]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg-1 pic 9(3). + 01 arg-2 pic N(5). + procedure division using arg-1 arg-2. + display arg-1. + display arg-2. + add 1 to arg-1. + move N"かきくけこ" to arg-2. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(100, "あいうえお"); + try{ + int ret1 = rs.getInt(1); + String ret2 = rs.getString(2); + System.out.println("ret1: " + ret1); + System.out.println("ret2: " + ret2); + } catch(CobolResultSetException e){ + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac -encoding UTF8 a.java]) +AT_CHECK([java -Dfile.encoding=SJIS a > out1.txt]) +AT_CHECK([echo -n '100 +あいうえお +ret1: 101 +ret2: かきくけこ +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) +AT_CLEANUP + + +AT_SETUP([COMP-3 Integer.MIN_VALUE]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 k1 pic S9(1) usage comp-3 value zero. + 01 k2 pic S9(2) usage comp-3 value zero. + 01 k3 pic S9(3) usage comp-3 value zero. + 01 k4 pic S9(4) usage comp-3 value zero. + 01 k5 pic S9(5) usage comp-3 value zero. + 01 k6 pic S9(6) usage comp-3 value zero. + 01 k7 pic S9(7) usage comp-3 value zero. + 01 k8 pic S9(8) usage comp-3 value zero. + 01 k9 pic S9(9) usage comp-3 value zero. + 01 k10 pic S9(10) usage comp-3 value zero. + 01 k11 pic S9(11) usage comp-3 value zero. + 01 k12 pic S9(12) usage comp-3 value zero. + 01 k13 pic S9(13) usage comp-3 value zero. + procedure division + using k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13. + + display k1. + display k2. + display k3. + display k4. + display k5. + display k6. + display k7. + display k8. + display k9. + display k10. + display k11. + display k12. + display k13. +]) + +AT_DATA([a.java], [ +public class a { + public static void main(String@<:@@:>@ args) { + int v = Integer.MIN_VALUE; + b prog = new b(); + prog.execute(v, v, v, v, v, v, v, v, v, v, v, v, v); + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[-8 +-48 +-648 +-3648 +-83648 +-483648 +-7483648 +-47483648 +-147483648 +-2147483648 +-02147483648 +-002147483648 +-0002147483648 +]) +AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/limits.at b/tests/cobol_utf8.src/limits.at new file mode 100644 index 00000000..9355959f --- /dev/null +++ b/tests/cobol_utf8.src/limits.at @@ -0,0 +1,289 @@ +AT_SETUP([Field length limit PIC A/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC A(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC A/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC A(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: Alphabetic field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC X/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC X(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC X/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC X(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumeric field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B9/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B9(159). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B9/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B9(160). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: NumericEdit field cannot be larger than 160 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], + +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BA/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BA(16777215). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BA/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BA(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BX/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BX(16777215). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BX/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BX(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC N/VALID (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-N PIC N(8388608). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC N/TOO LONG (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 INVALID-N PIC N(8388609). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: National field cannot be larger than 8388608 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BN/VALID (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-BN PIC BN(8388607). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BN/TOO LONG (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 INVALID-BN PIC BN(8388608). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: NationalEdit field cannot be larger than 8388608 digits +]) + +AT_CLEANUP + diff --git a/tests/cobol_utf8.src/mb-space.at b/tests/cobol_utf8.src/mb-space.at new file mode 100644 index 00000000..869e87f1 --- /dev/null +++ b/tests/cobol_utf8.src/mb-space.at @@ -0,0 +1,71 @@ +AT_SETUP([Zenkaku SPC delims in headings]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA       DIVISION. + WORKING-STORAGE  SECTION. + 01 項目 PIC X. + PROCEDURE   DIVISION. + DISPLAY "OK" WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP + +AT_SETUP([Zenkaku SPC delims in record def]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目 PIC X(40) VALUE + "Zen SPC between item name and PIC clause". +  01 F00 PIC X. +   01 F01 PIC X. + 01 F02 PIC X. + 01 F03 PIC X. + 01 F04 PIC X . + PROCEDURE DIVISION. + DISPLAY 項目 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Zen SPC between item name and PIC clause]) + +AT_CLEANUP + +AT_SETUP([Zenkaku SPC delims in COPY stmt]) +export LC_ALL='' + +AT_DATA([inc.cpy], [ + 01 項目 PIC X(2) VALUE "OK". +  01 F00 PIC X. +   01 F01 PIC X. + 01 F02 PIC X. + 01 F03 PIC X. + 01 F04 PIC X . +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + COPY  inc. + PROCEDURE DIVISION. + DISPLAY 項目 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/national.at b/tests/cobol_utf8.src/national.at new file mode 100644 index 00000000..2f8a8e65 --- /dev/null +++ b/tests/cobol_utf8.src/national.at @@ -0,0 +1,271 @@ +AT_SETUP([FUNCTION NATIONAL single-byte]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(5). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "ABCDZ" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABCDZ'| nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL multi-byte]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(9). + 01 O-STR PIC X(12). + PROCEDURE DIVISION. + MOVE "ABC123" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABC123'| nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-exclamation]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(5). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "!!!!!" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '!!!!!' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-yen]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(1). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "¥" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob], [0], [], +[prog.cob:9: Warning: Value size exceeds data size +prog.cob:6: Warning: 'I-STR' defined here as PIC X(1) +]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '¥ ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-plus]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(2). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "+ " TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '+  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL (HanKana w/ Daku-on)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(16). + 01 O-STR PIC X(16). + PROCEDURE DIVISION. + MOVE "レディガガ" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'レディガガ   ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL (HanKana w/ Han-daku-on)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(10). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "ポピン" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ポピン  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([N Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY N"いろは". + DISPLAY N"イロハ". + DISPLAY N"ポピン". + DISPLAY N"ABC". + DISPLAY N"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([NC Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY NC"いろは". + DISPLAY NC"イロハ". + DISPLAY NC"ポピン". + DISPLAY NC"ABC". + DISPLAY NC"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([ND Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY ND"いろは". + DISPLAY ND"イロハ". + DISPLAY ND"ポピン". + DISPLAY ND"ABC". + DISPLAY ND"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([NX Literal]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY NX"E38184E3828DE381AF". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/pic-n.at b/tests/cobol_utf8.src/pic-n.at new file mode 100644 index 00000000..57f4b1e0 --- /dev/null +++ b/tests/cobol_utf8.src/pic-n.at @@ -0,0 +1,522 @@ +AT_SETUP([PIC N Value clause]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7) VALUE "日本語の文字列". + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with trunc]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(3). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with padding by full-width SPC]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(9). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with justify]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(9) JUSTIFIED RIGHT. + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '  日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N EDITED w/ VALUE]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INITIALIZE PIC N EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + MOVE "春夏秋冬寒暖" TO F0. + INITIALIZE F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '  /     0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INITIALIZE PIC N EDITED TO VALUE]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + MOVE "春夏秋冬寒暖" TO F0. + INITIALIZE F0 NATIONAL TO VALUE. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move to NATIONAL EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width alnum conv.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "ABC0123" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABC0123' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width kana conv.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "コメダコーヒー" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 83 52 83 81 83 5f 83 52 81 5b 83 71 81 5b +]) + +AT_CLEANUP + +AT_SETUP([PIC N Ref mod(n:)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(5:) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Ref mod(n:m)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(5:2) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING by size]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(3) VALUE "名前は". + 01 F2 PIC N(5) VALUE "ありません". + 01 FF PIC N(10). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前はありません' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with delimiter (causes warn)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(4) VALUE "名前△は". + 01 F2 PIC N(6) VALUE "△ありません". + 01 FF PIC N(4). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY "△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with NATIONAL delimiter]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(4) VALUE "名前△は". + 01 F2 PIC N(6) VALUE "△ありません". + 01 FF PIC N(4). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY N"△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with pointer]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(3) VALUE "名前は". + 01 F2 PIC N(5) VALUE "ありません". + 01 FF PIC N(10) VALUE "言えません○※△■×". + 01 FP PIC 99 VALUE 6. + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF WITH POINTER FP. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '言えません私の名前は' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY "0". + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING by ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING by NATIONAL ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL N"5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT TALLYING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + 01 CN PIC 99. + PROCEDURE DIVISION. + INSPECT F0 TALLYING CN FOR ALL "45". + DISPLAY CN WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '02' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width dakuten kana.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "゙ダ・ヴィンチ" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '゛ダ・ヴィンチ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width han-dakuten kana.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "゚ポンデリング" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '゜ポンデリング' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/pic-x.at b/tests/cobol_utf8.src/pic-x.at new file mode 100644 index 00000000..bdbe1199 --- /dev/null +++ b/tests/cobol_utf8.src/pic-x.at @@ -0,0 +1,585 @@ +AT_SETUP([Value clause]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14) VALUE "日本語の文字列". + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob 2> /dev/null]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語の文字列 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語の文字列 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move with trunc]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(6). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move ALL with trunc and trimming]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE ALL "喜" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 8a ec 8a ec 8a ec 20 +]) + +AT_CLEANUP + +AT_SETUP([Move with trunc and trimming 1]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 7b 8c ea 82 +]) + +AT_CLEANUP + +AT_SETUP([Move from field with trunc and trimming 1]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 FS PIC X(14) VALUE "日本語の文字列". + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE FS TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 7b 8c ea 82 +]) + +AT_CLEANUP + +AT_SETUP([Move with padding]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(16). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列 ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move with justify]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(15) JUSTIFIED RIGHT. + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n ' 日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XXXX/XXXXBXXXX0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (pic too short)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XX/XXBXX0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日/本 中0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (pic too long)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XX/XXBXX0. + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日/本 0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (No char break)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(2)BX(2). + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日 本' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (char break & junk chars)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(1)BX(3). + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 20 fa 96 7b +]) + +AT_CLEANUP + +AT_SETUP([Move group to group in bad alignment]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0. + 03 XX0 PIC X(4) VALUE "日本". + 01 F1. + 03 XX1 PIC X(3). + 03 FILLER PIC X(1). + + PROCEDURE DIVISION. + MOVE F0 TO F1. + DISPLAY XX1 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 +]) + +AT_CLEANUP + +AT_SETUP([Redifinition breaking char pos.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0. + 03 XX0 PIC X(4) VALUE "日本". + 01 F1 REDEFINES F0. + 03 XX1 PIC X(3). + 03 FILLER PIC X(1). + + PROCEDURE DIVISION. + DISPLAY XX1 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 +]) + +AT_CLEANUP + + +AT_SETUP([Ref mod(n:)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(9:) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Ref mod(n:m)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(9:4) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING by size]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(6) VALUE "名前は". + 01 F2 PIC X(10) VALUE "ありません". + 01 FF PIC X(20). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前はありません' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING with delimiter]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(8) VALUE "名前△は". + 01 F2 PIC X(12) VALUE "△ありません". + 01 FF PIC X(8). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY "△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING with pointer]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(6) VALUE "名前は". + 01 F2 PIC X(10) VALUE "ありません". + 01 FF PIC X(20) VALUE "言えません○※△■×". + 01 FP PIC 99 VALUE 11. + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF WITH POINTER FP. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '言えません私の名前は' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT REPLACING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(20) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY "0". + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT REPLACING by ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(20) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT TALLYING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(30) VALUE "1234512345". + 01 CN PIC 99. + PROCEDURE DIVISION. + INSPECT F0 TALLYING CN FOR ALL "45". + DISPLAY CN WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '02' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +#AT_SETUP([Readable string literals]) +#export LC_ALL='' +## Older compilers converts string literals "日本語" in COBOL source code +## to `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)` in Java source code. +## The following tests check that the compiler converts the string literals to readable ones. +# +#AT_DATA([prog1.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog1. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE "東京1". +# PROCEDURE DIVISION. +# MOVE "東京2" TO F0. +# DISPLAY "東京3". +#]) +# +#AT_CHECK([cobj prog1.cob]) +#AT_CHECK([grep '東京1' < prog1.java > /dev/null]) +#AT_CHECK([grep '東京2' < prog1.java > /dev/null]) +#AT_CHECK([grep '東京3' < prog1.java > /dev/null]) +# +## ' ' is the first multi-byte Shift-JIS character with respect to the byte order +## see http://charset.7jp.net/sjis.html +#AT_DATA([prog2.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog2. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE " 1". +# PROCEDURE DIVISION. +# MOVE " 2" TO F0. +# DISPLAY " 3". +#]) +# +#AT_CHECK([cobj prog2.cob]) +#AT_CHECK([grep ' 1' < prog2.java > /dev/null]) +#AT_CHECK([grep ' 2' < prog2.java > /dev/null]) +#AT_CHECK([grep ' 3' < prog2.java > /dev/null]) +# +## '熙' is the last printable Shift-JIS character with respect to the byte order. +## See http://charset.7jp.net/sjis.html +#AT_DATA([prog3.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog3. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE "熙1". +# PROCEDURE DIVISION. +# MOVE "熙2" TO F0. +# DISPLAY "熙3". +#]) +# +#AT_CHECK([cobj prog3.cob]) +#AT_CHECK([grep '熙1' < prog3.java > /dev/null]) +#AT_CHECK([grep '熙2' < prog3.java > /dev/null]) +#AT_CHECK([grep '熙3' < prog3.java > /dev/null]) +# +#AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/program-id.at b/tests/cobol_utf8.src/program-id.at new file mode 100644 index 00000000..14ddc3f5 --- /dev/null +++ b/tests/cobol_utf8.src/program-id.at @@ -0,0 +1,94 @@ +AT_SETUP([PROGRAM-ID NATIONAL C89 no warning]) +export LC_ALL='' + +AT_DATA([test.conf], [ +include "default.conf" +c89-identifier-length-check: yes +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京都. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京都. +]) + +AT_CHECK([${COMPILE} -conf=test.conf prog.cob], [0]) + +AT_CLEANUP + + +AT_SETUP([PROGRAM-ID NATIONAL C89 warning]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) +AT_DATA([test.conf], [ +include "default.conf" +c89-identifier-length-check: yes +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京湾岸港湾局. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京湾岸港湾局. +]) + +AT_CHECK([${COMPILE} -conf=test.conf prog.cob], [0], [], +[prog.cob:3: Warning: PROGRAM-ID length exceeds C89 function name limit +prog.cob:6: Warning: PROGRAM-ID length exceeds C89 function name limit +]) + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL C89 ignore]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京湾岸港湾局. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京湾岸港湾局. +]) + +AT_CHECK([${COMPILE} prog.cob], [0]) + + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL 32 character no over]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. あいうえおかきくけこさしすせそ + -たちつてとなにぬねのはひふへほ. + DATA DIVISION. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL 32 character over]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. あいうえおかきくけこさしすせそ + -たちつてとなにぬねのはひふへほまみ. + DATA DIVISION. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [1], [], +[prog.cob:3: Error: User defined name must be less than 32 characters +]) + +AT_CLEANUP + diff --git a/tests/cobol_utf8.src/user-defined-word.at b/tests/cobol_utf8.src/user-defined-word.at new file mode 100644 index 00000000..36f0ccbd --- /dev/null +++ b/tests/cobol_utf8.src/user-defined-word.at @@ -0,0 +1,515 @@ +AT_SETUP([Program name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 日本語のプログラム名. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) + +AT_CLEANUP + +AT_SETUP([Field name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 O−文字列 PIC X(7) USAGE DISPLAY. + PROCEDURE DIVISION. + MOVE "Unicode" TO O−文字列. + DISPLAY O−文字列 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Unicode]) + +AT_CLEANUP + +AT_SETUP([Long field name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目ABCDEFGH012345 + PIC X(7). + PROCEDURE DIVISION. + MOVE "Unicode" + TO + 項目ABCDEFGH012345. + DISPLAY + 項目ABCDEFGH012345 + WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Unicode]) + +AT_CLEANUP + + +AT_SETUP([Field lookup]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目2 PIC X(1) VALUE "A". + 01 項目R PIC X(1) VALUE "B". + PROCEDURE DIVISION. + DISPLAY 項目2 項目R WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [AB]) + +AT_CLEANUP + +AT_SETUP([Section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM S−初期化. + PERFORM S−終了. + S−初期化 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Hello, and good bye.]) + +AT_CLEANUP + +AT_SETUP([Long section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM s12345678901234567890. + PERFORM S−終了. + s12345678901234567890 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Hello, and good bye.]) + +AT_CLEANUP + +AT_SETUP([Too long section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM s1234567890123456789012345678901. + PERFORM S−終了. + s1234567890123456789012345678901 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [1], [], +[prog.cob:7: Error: User defined name must be less than 32 characters +prog.cob:9: Error: User defined name must be less than 32 characters +]) + +AT_CLEANUP + +AT_SETUP([Nihongo Filename]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT テストファイル ASSIGN TO "./テスト_ファイル" + ORGANIZATION IS INDEXED + ACCESS MODE IS SEQUENTIAL + RECORD KEY IS TEST-KEY. + DATA DIVISION. + FILE SECTION. + FD テストファイル. + 01 TEST-KEY PIC X(10). + PROCEDURE DIVISION. + OPEN OUTPUT テストファイル. + MOVE "TEST000000" TO TEST-KEY. + WRITE TEST-KEY. + CLOSE テストファイル. + OPEN INPUT テストファイル. + READ テストファイル + NOT AT END + DISPLAY "OK" NO ADVANCING + END-READ. + CLOSE テストファイル. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in numeric test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 TEST-REC. + 03 U項目 PIC 9(4) VALUE 1000. + 01 X項目 PIC X(4) VALUE 'ABCD'. + PROCEDURE DIVISION. + MOVE X項目 TO TEST-REC. + ADD 1 TO U項目. + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:11: libcobj: 'U項目' not numeric: 'ABCD'" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in BASED test msg.]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(4) VALUE 'ABCD'. + 01 Y項目 PIC X(4) BASED. + PROCEDURE DIVISION. + MOVE X項目 TO Y項目. + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:9: libcobj: BASED/LINKAGE item 'Y項目' has NULL address" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in ODO test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I項目 PIC 9 VALUE 4. + 01 X. + 03 Y項目 PIC 9 OCCURS 1 TO 3 DEPENDING ON I項目. + PROCEDURE DIVISION. + MOVE 1 TO Y項目(3). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: OCCURS DEPENDING ON 'I項目' out of bounds: 4" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in Subscript test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I項目 PIC 9 VALUE 2. + 01 X. + 03 Y項目 PIC 9 OCCURS 1 TO 3 DEPENDING ON I項目. + PROCEDURE DIVISION. + MOVE 1 TO Y項目(3). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Subscript of 'Y項目' out of bounds: 3" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in length of ref_mod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 2. + 01 J PIC 9 VALUE 6. + 01 X項目 PIC X(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Length of 'X項目' out of bounds: 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in offset of ref_mod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 6. + 01 J PIC 9 VALUE 2. + 01 X項目 PIC X(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Offset of 'X項目' out of bounds: 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in length of N_refmod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 2. + 01 J PIC 99 VALUE 18. + 01 X項目 PIC N(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Length of 'X項目' out of bounds: 18" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in offset of N_refmod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 99 VALUE 18. + 01 J PIC 9 VALUE 2. + 01 X項目 PIC N(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Offset of 'X項目' out of bounds: 18" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in extaddr test msg.]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. check1. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(5) EXTERNAL. + PROCEDURE DIVISION. + CALL 'check2'. + + IDENTIFICATION DIVISION. + PROGRAM-ID. check2. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(6) EXTERNAL. + PROCEDURE DIVISION. + END PROGRAM check2. + END PROGRAM check1. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:8: libcobj: EXTERNAL item 'X項目' has size > 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in undefined error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 G集団項目. + 03 A項目 PIC X. + PROCEDURE DIVISION. +001009 DISPLAY NO-FLD. +001010 DISPLAY NO-FLD IN G-GRP. +001011 DISPLAY NO-FLD IN NO-GRP. +001012 DISPLAY NO項目. +001013 DISPLAY NO項目 IN G集団項目. +001014 DISPLAY NO項目 IN NO集団項目. +001015 DISPLAY NO-FLD IN G集団項目. +001016 DISPLAY NO-FLD IN NO集団項目. +001017 DISPLAY NO項目 IN G-GRP. +001018 DISPLAY NO項目 IN NO-GRP. +001019 DISPLAY NO項目 IN G集団項目 IN NO集団項目. +]) + +AT_CHECK([${COMPILE} -debug prog.cob], [1], [], +[prog.cob:9: Error: 'NO-FLD' undefined +prog.cob:10: Error: 'NO-FLD' in 'G-GRP' undefined +prog.cob:11: Error: 'NO-FLD' in 'NO-GRP' undefined +prog.cob:12: Error: 'NO項目' undefined +prog.cob:13: Error: 'NO項目' in 'G集団項目' undefined +prog.cob:14: Error: 'NO項目' in 'NO集団項目' undefined +prog.cob:15: Error: 'NO-FLD' in 'G集団項目' undefined +prog.cob:16: Error: 'NO-FLD' in 'NO集団項目' undefined +prog.cob:17: Error: 'NO項目' in 'G-GRP' undefined +prog.cob:18: Error: 'NO項目' in 'NO-GRP' undefined +prog.cob:19: Error: 'NO項目' in 'G集団項目' in 'NO集団項目' undefined +]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in ambiguous error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A項目 PIC X. + 01 G1集団. + 03 A項目 PIC X. + 03 B項目 PIC X. + 03 G2集団. + 05 A項目 PIC X. + 05 B項目 PIC X. + PROCEDURE DIVISION. +001014 DISPLAY A項目. +001015 DISPLAY B項目 IN G1集団. + GOBACK. +]) + +AT_CHECK([${COMPILE_ONLY} prog.cob], [1], [], +[prog.cob:8: Warning: Redefinition of 'A項目' +prog.cob:6: Warning: 'A項目' previously defined here +prog.cob:11: Warning: Redefinition of 'A項目' +prog.cob:6: Warning: 'A項目' previously defined here +prog.cob:14: Error: 'A項目' ambiguous; need qualification +prog.cob:6: Error: 'A項目' defined here +prog.cob:8: Error: 'A項目' in 'G1集団' defined here +prog.cob:11: Error: 'A項目' in 'G2集団' in 'G1集団' defined here +prog.cob:15: Error: 'B項目' in 'G1集団' ambiguous; need qualification +prog.cob:9: Error: 'B項目' in 'G1集団' defined here +prog.cob:12: Error: 'B項目' in 'G2集団' in 'G1集団' defined here +]) + +AT_CLEANUP + +AT_SETUP([Nihongo label name in ambiguous error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. +001006 L0見出し. +001007 GO TO L1見出し. +001008 GO TO L2見出し IN S1節. +001009 L1見出し. GOBACK. +001010 L1見出し. GOBACK. +001011 S1節 SECTION. +001012 L2見出し. GOBACK. +001013 L2見出し. GOBACK. +]) + +AT_CHECK([${COMPILE_ONLY} prog.cob], [1], [], +[prog.cob:7: Error: 'L1見出し' ambiguous; need qualification +prog.cob:9: Error: 'L1見出し' in 'MAIN SECTION' defined here +prog.cob:10: Error: 'L1見出し' in 'MAIN SECTION' defined here +prog.cob:8: Error: 'L2見出し' in 'S1節' ambiguous; need qualification +prog.cob:12: Error: 'L2見出し' in 'S1節' defined here +prog.cob:13: Error: 'L2見出し' in 'S1節' defined here +]) + +AT_CLEANUP From 5730f6cd7104fa005db097162890a60d039195df Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:00:55 +0900 Subject: [PATCH 084/188] Release 1.1.6 (#583) --- .github/workflows/build.yml | 8 + .github/workflows/javadoc.yml | 3 +- CHANGELOG.md | 6 + ChangeLog | 4 + NEWS | 7 + README.md | 20 +- README_JP.md | 20 +- ReleaseNote.md | 11 +- cobj/pplex.c | 7522 ++++++++--------- cobj/pplex.l | 31 +- configure | 26 +- configure.ac | 2 +- libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../libcobj/data/CobolFieldFactory.java | 1 - .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +- tests/package.m4 | 6 +- win/config.h | 8 +- 19 files changed, 3531 insertions(+), 4158 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9796b5c..5f8ec493 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,14 @@ jobs: uses: actions/checkout@v4 - name: Install opensource COBOL 4J + if: inputs.configure-args == '' + run: | + ./configure --prefix=/usr/ CFLAGS=-Werror + make + echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" + + - name: Install opensource COBOL 4J + if: inputs.configure-args != '' run: | ./configure --prefix=/usr/ CFLAGS=-Werror ${{ inputs.configure-args }} touch cobj/*.m4 diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index dbb20482..5fb1e74d 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -19,7 +19,8 @@ jobs: uses: actions/checkout@v4 - name: Run javadoc - working-directory: libcobj + working-directory: libcobj run: | + ./gradlew javadoc ./gradlew javadoc | tee javadoc.log test "$(grep '[1-9][0-9]* warning' javadoc.log)" = "" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ea0fe5b7..77b369dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.6] - 2025-01-31 + +### Add + +* Compile UTF-8 Source Code + * The latest version of cobj is now able to accept UTF-8 encoded COBOL and generate UTF-8 encoded Java. ## [1.1.5] - 2024-12-27 diff --git a/ChangeLog b/ChangeLog index cc791369..3d549aac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-01-31 OSS Consortium + + * opensource COBOL 4J v1.1.6 released. + 2024-12-27 OSS Consortium * opensource COBOL 4J v1.1.5 released. diff --git a/NEWS b/NEWS index a0f07b9b..50d82c1e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +** New Features + + (1) Compile UTF-8 Source Code + * The latest version of cobj is now able to accept UTF-8 encoded COBOL and generate UTF-8 encoded Java. + +----------------------------------------------------------------------- + ** New Features (1) Convert string literals containing SJIS characters to Java string literals. (#561) diff --git a/README.md b/README.md index 7de4fb1a..2af423aa 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,26 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.5.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.5.tar.gz -tar zxvf opensourcecobol4j-v1.1.5.tar.gz -cd opensourcecobol4j-1.1.5 +curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz +tar zxvf opensourcecobol4j-v1.1.6.tar.gz +cd opensourcecobol4j-1.1.6 ./configure --prefix=/usr/ make sudo make install ``` +In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. + +``` +curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz +tar zxvf opensourcecobol4j-v1.1.6.tar.gz +cd opensourcecobol4j-1.1.6 +./configure --prefix=/usr/ +touch cobj/*.m4 +make +sudo make install +``` + ### Set $CLASSPATH Add /usr/lib/opensourcecobol4j/libcobj.jar to the environment variable $CLASSPATH. For instance, run the following code in Unix-like systems. @@ -125,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.5 +docker pull opensourcecobol/opensourcecobol4j:1.1.6 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index eca1117c..52463482 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,14 +46,26 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.5.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.5.tar.gz -tar zxvf opensourcecobol4j-v1.1.5.tar.gz -cd opensourcecobol4j-1.1.5 +curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz +tar zxvf opensourcecobol4j-v1.1.6.tar.gz +cd opensourcecobol4j-1.1.6 ./configure --prefix=/usr/ make sudo make install ``` +UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 + +``` +curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz +tar zxvf opensourcecobol4j-v1.1.6.tar.gz +cd opensourcecobol4j-1.1.6 +./configure --prefix=/usr/ +touch cobj/*.m4 +make +sudo make install +``` + ### $CLASSPATHの設定 /usr/lib/opensourcecobol4j/libcobj.jarを環境変数$CLASSPATHに追加します。 例えば、Unix系システムで次のコードを実行します。 @@ -114,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.5 +docker pull opensourcecobol/opensourcecobol4j:1.1.6 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index f3491bf0..a896476b 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,11 +1,4 @@ ### Add -* Convert string literals containing SJIS characters to Java string literals. - * The older versions convert string literals containing SJIS characters into byte arrays with hexdecimal integers. - * Older versions convert `"日本語"` into `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)`. - * Latest version converts `"日本語"` to `CobolUtil.stringToBytes("日本語")`. - -### Fix - -* Fix comparisons of COMP data. - * With older versions, comparisons of COMP data are invalid in some cases. \ No newline at end of file +* Compile UTF-8 Source Code + * The latest version of cobj is now able to accept UTF-8 encoded COBOL and generate UTF-8 encoded Java. diff --git a/cobj/pplex.c b/cobj/pplex.c index 7a3e6e35..3be62fbb 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -1,8 +1,8 @@ -#line 1 "pplex.c" +#line 2 "pplex.c" -#line 3 "pplex.c" +#line 4 "pplex.c" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -276,10 +276,10 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -#include -#include #include +#include #include +#include /* end standard C headers. */ @@ -290,10 +290,10 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -310,41 +310,41 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767-1) +#define INT16_MIN (-32767 - 1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) +#define INT32_MIN (-2147483647 - 1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -368,7 +368,7 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less @@ -379,12 +379,12 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start) - 1) / 2) +#define YY_START (((yy_start)-1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) +#define YY_NEW_FILE yyrestart(yyin) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -400,9 +400,10 @@ typedef unsigned int flex_uint32_t; #endif /* __ia64__ */ #endif -/* The state buf must be large enough to hold one state per character in the main buffer. +/* The state buf must be large enough to hold one state per character in the + * main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -421,94 +422,90 @@ extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - + +#define YY_LESS_LINENO(n) +#define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, (yytext_ptr) ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET(yy_c_buf_p) = yy_cp = \ + yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) +#define unput(c) yyunput(c, (yytext_ptr)) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +struct yy_buffer_state { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -516,9 +513,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) +#define YY_CURRENT_BUFFER \ + ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ @@ -526,64 +522,62 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart ( FILE *input_file ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); -void yy_delete_buffer ( YY_BUFFER_STATE b ); -void yy_flush_buffer ( YY_BUFFER_STATE b ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state ( void ); +void yyrestart(FILE *input_file); +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size); +void yy_delete_buffer(YY_BUFFER_STATE b); +void yy_flush_buffer(YY_BUFFER_STATE b); +void yypush_buffer_state(YY_BUFFER_STATE new_buffer); +void yypop_buffer_state(void); -static void yyensure_buffer_stack ( void ); -static void yy_load_buffer_state ( void ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) +static void yyensure_buffer_stack(void); +static void yy_load_buffer_state(void); +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER) -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size); +YY_BUFFER_STATE yy_scan_string(const char *yy_str); +YY_BUFFER_STATE yy_scan_bytes(const char *bytes, int len); -void *yyalloc ( yy_size_t ); -void *yyrealloc ( void *, yy_size_t ); -void yyfree ( void * ); +void *yyalloc(yy_size_t); +void *yyrealloc(void *, yy_size_t); +void yyfree(void *); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if (!YY_CURRENT_BUFFER) { \ + yyensure_buffer_stack(); \ + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define ppwrap() (/*CONSTCOND*/1) +#define ppwrap() (/*CONSTCOND*/ 1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -600,1445 +594,820 @@ extern char *yytext; #endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state ( void ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); -static int yy_get_next_buffer ( void ); -static void yynoreturn yy_fatal_error ( const char* msg ); +static yy_state_type yy_get_previous_state(void); +static yy_state_type yy_try_NUL_trans(yy_state_type current_state); +static int yy_get_next_buffer(void); +static void yynoreturn yy_fatal_error(const char *msg); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int)(yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 99 #define YY_END_OF_BUFFER 100 /* This struct is not used in this scanner, but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[791] = - { 0, - 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, - 100, 98, 73, 74, 98, 98, 76, 77, 98, 98, - 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 74, 12, 13, - 93, 98, 16, 15, 16, 12, 13, 44, 20, 21, - 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, - 44, 44, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 12, 13, 51, 45, 46, 51, 51, - - 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 12, - 13, 60, 55, 56, 60, 60, 60, 60, 60, 57, - 60, 57, 60, 57, 57, 57, 57, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 12, 13, 74, - 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, - 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 74, 93, 0, 12, - 1, 13, 93, 0, 16, 1, 12, 1, 13, 21, - 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 36, 26, 27, 41, 41, 28, 41, 41, 41, 41, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 46, 0, 0, 50, 0, 0, 49, 45, 48, 48, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 56, 0, 0, 59, 0, 0, 58, 55, 57, - - 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 57, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 95, - 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 0, 95, 0, 95, 95, 0, 0, - 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, - 95, 95, 95, 0, 0, 0, 0, 1, 1, 1, - 0, 0, 41, 41, 29, 41, 41, 41, 41, 41, - 41, 41, 41, 0, 0, 0, 0, 0, 48, 48, - 0, 0, 0, 0, 0, 57, 57, 57, 57, 57, - - 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, - 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, - 95, 95, 0, 0, 95, 0, 95, 95, 80, 0, - 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 92, 0, 0, 95, 41, 41, 41, 41, 41, - 41, 41, 41, 52, 57, 57, 82, 0, 0, 81, - 0, 0, 0, 95, 95, 0, 0, 95, 69, 0, - 0, 0, 0, 95, 95, 0, 0, 95, 0, 0, - 95, 95, 95, 0, 0, 0, 95, 95, 95, 95, - 95, 95, 70, 71, 72, 95, 0, 0, 0, 95, - - 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, - 0, 0, 62, 95, 0, 0, 0, 95, 95, 95, - 69, 0, 0, 0, 95, 0, 0, 91, 0, 0, - 95, 0, 95, 95, 95, 90, 0, 0, 95, 95, - 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, - 0, 0, 0, 95, 0, 41, 41, 37, 41, 41, - 38, 41, 41, 57, 57, 95, 0, 0, 95, 95, - 95, 0, 0, 95, 85, 0, 0, 0, 95, 0, - 95, 18, 95, 0, 95, 14, 95, 95, 67, 19, - 95, 95, 0, 78, 0, 0, 0, 0, 35, 33, - - 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, - 95, 95, 95, 0, 0, 95, 0, 95, 0, 95, - 95, 95, 95, 95, 68, 0, 0, 0, 79, 0, - 0, 41, 31, 41, 41, 30, 34, 0, 0, 0, - 95, 95, 95, 0, 0, 95, 0, 95, 0, 0, - 95, 95, 95, 95, 61, 83, 0, 0, 0, 39, - 32, 40, 86, 0, 0, 0, 0, 0, 95, 95, - 95, 0, 0, 95, 0, 0, 95, 0, 0, 95, - 95, 0, 0, 5, 0, 0, 0, 0, 0, 95, - 95, 95, 0, 10, 95, 0, 0, 6, 0, 95, - - 95, 0, 0, 0, 0, 0, 0, 0, 95, 95, - 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, - 0, 0, 0, 0, 0, 8, 65, 64, 0, 0, - 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, - 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 9, 0, 0, 0, 0, 0, 88, 0, - 7, 0, 0, 0, 0, 0, 2, 0, 0, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 4, 1, 1, 1, 1, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 14, 14, 14, 14, 14, 14, 1, 18, 1, - 19, 20, 1, 1, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 37, - 1, 1, 1, 1, 37, 1, 46, 47, 48, 49, - - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 37, 62, 63, 64, 65, 66, 67, 68, - 69, 37, 1, 1, 1, 1, 1, 70, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 1, 1, 74, 74, 74, 74, 74, 74, 74, - - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 75, 76, 76, 77, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 79, 80, 80, 81, - 82, 82, 82, 83, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[84] = - { 0, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3 - } ; - -static const flex_int16_t yy_base[813] = - { 0, - 0, 81, 83, 91, 158, 79, 241, 92, 324, 93, - 1770, 4855, 4855, 405, 1764, 1693, 4855, 4855, 1670, 97, - 407, 475, 105, 549, 409, 623, 113, 415, 423, 442, - 442, 474, 478, 557, 586, 631, 450, 61, 1615, 65, - 69, 73, 77, 80, 30, 84, 343, 511, 1662, 0, - 431, 474, 0, 4855, 1660, 1640, 0, 4855, 4855, 417, - 1644, 1642, 4855, 4855, 1626, 569, 655, 723, 577, 797, - 500, 1610, 680, 604, 688, 696, 706, 732, 744, 777, - 806, 769, 826, 580, 1527, 604, 654, 680, 371, 692, - 343, 701, 407, 1572, 0, 4855, 4855, 423, 1553, 1539, - - 1516, 834, 851, 919, 875, 993, 518, 1476, 883, 705, - 1420, 754, 787, 811, 534, 831, 457, 835, 505, 1457, - 0, 4855, 4855, 465, 1471, 1469, 1453, 899, 935, 1067, - 907, 1141, 606, 943, 951, 1003, 964, 869, 1394, 899, - 912, 951, 697, 955, 540, 959, 608, 1445, 0, 545, - 1340, 1404, 4855, 1402, 0, 1024, 1032, 4855, 557, 1325, - 1040, 0, 988, 1307, 993, 1015, 1019, 758, 1023, 609, - 1027, 644, 567, 1309, 1095, 1104, 1120, 1149, 1166, 1189, - 1216, 1228, 1178, 1244, 1257, 1272, 1291, 1309, 1317, 1328, - 1336, 1361, 1157, 1386, 1402, 1411, 1031, 1176, 1192, 1294, - - 1319, 1359, 1363, 1367, 1374, 1379, 1439, 1443, 1291, 0, - 0, 0, 1447, 1399, 0, 0, 0, 0, 0, 577, - 1289, 1343, 4855, 1323, 1466, 1474, 4855, 1482, 0, 1430, - 1247, 1434, 1438, 1442, 855, 1447, 656, 1451, 762, 4855, - 1515, 1523, 1531, 1539, 1548, 1560, 1573, 1589, 1598, 1616, - 1508, 1546, 1568, 1572, 1581, 1585, 1593, 1597, 1601, 1605, - 612, 1243, 1279, 4855, 1245, 1669, 1677, 4855, 1685, 0, - 1633, 1163, 1637, 1641, 1645, 920, 1649, 797, 1653, 873, - 4855, 1657, 1661, 1665, 1669, 1673, 1677, 1681, 1685, 1689, - 1693, 657, 1164, 1194, 4855, 1191, 1757, 1765, 4855, 1773, - - 0, 1721, 1118, 1725, 1729, 1733, 1054, 1737, 915, 1741, - 1068, 1805, 1813, 1823, 1772, 1776, 1780, 1784, 1792, 1797, - 1801, 1805, 1809, 1815, 1114, 0, 1109, 1136, 1107, 1887, - 1903, 1893, 1821, 1912, 1920, 1929, 1941, 1961, 1978, 1987, - 1996, 2005, 2013, 1338, 2030, 1877, 2055, 2063, 2079, 1961, - 2090, 2099, 2118, 2145, 2155, 2163, 2178, 2186, 2122, 1978, - 2201, 2219, 2233, 2013, 2047, 2111, 1105, 0, 0, 0, - 1100, 1227, 2242, 2253, 2268, 2277, 2295, 2303, 2322, 2330, - 2341, 2362, 2370, 2135, 2152, 2201, 1098, 1264, 2382, 2390, - 2225, 2251, 2291, 1058, 1284, 2398, 2406, 2414, 2425, 2435, - - 2383, 2387, 2402, 2462, 2410, 2482, 2416, 2476, 1047, 2430, - 2494, 2502, 2510, 2518, 2533, 2541, 2510, 2492, 2558, 2568, - 2587, 2596, 399, 1043, 2607, 2555, 2625, 2634, 2615, 1010, - 2586, 2660, 2669, 2683, 2691, 2708, 2717, 2737, 2699, 2745, - 2762, 2752, 981, 2710, 2775, 2791, 2799, 2807, 2817, 2834, - 2848, 2856, 2872, 2881, 2891, 2899, 2779, 975, 2770, 2907, - 973, 2855, 965, 2921, 2932, 1558, 2890, 2954, 2974, 45, - 411, 963, 2902, 2984, 3001, 3020, 2909, 3014, 413, 946, - 3035, 3043, 3059, 936, 3079, 2935, 3088, 3103, 3116, 3124, - 3148, 3162, 3171, 3183, 3191, 3203, 3207, 2968, 934, 3223, - - 3231, 3242, 3254, 3263, 3279, 3293, 3304, 3316, 3324, 3341, - 907, 905, 3362, 3370, 407, 894, 3013, 3378, 3386, 3395, - 4855, 436, 458, 892, 3408, 3433, 3036, 3152, 876, 3295, - 3444, 480, 3454, 3471, 3483, 3400, 842, 3402, 3497, 3508, - 3516, 3527, 3536, 3553, 3567, 4855, 4855, 4855, 3577, 3475, - 785, 3484, 3594, 3610, 3544, 3622, 3630, 3638, 3646, 3669, - 3679, 3687, 3697, 3705, 3722, 3747, 496, 782, 3759, 3767, - 3783, 645, 810, 3791, 3661, 777, 3670, 775, 3811, 624, - 3819, 3840, 3848, 765, 3862, 3870, 3881, 3889, 3901, 3911, - 3919, 3935, 749, 3737, 747, 3939, 3695, 3768, 3951, 3959, - - 3967, 3975, 3983, 3994, 4008, 4021, 4029, 4040, 4060, 919, - 4068, 4076, 4084, 667, 848, 4096, 738, 4124, 1024, 4135, - 4145, 4153, 4165, 4174, 4183, 4208, 3837, 726, 4212, 720, - 3887, 4224, 4232, 4240, 4248, 4256, 4267, 4288, 3988, 855, - 4296, 4304, 4312, 1077, 1087, 4322, 1930, 4331, 3994, 1080, - 4347, 4357, 4380, 4388, 4403, 4100, 718, 4101, 710, 4411, - 4419, 4428, 4190, 1128, 857, 675, 4160, 1133, 4436, 4444, - 4455, 1177, 1181, 4467, 1222, 666, 4475, 4223, 1221, 4494, - 4502, 2161, 4307, 4511, 647, 1233, 1293, 639, 1250, 4526, - 4538, 4555, 1256, 4855, 4563, 888, 631, 4580, 1306, 4588, - - 4596, 1263, 629, 4336, 1346, 3247, 586, 1340, 4608, 4619, - 4634, 4855, 2237, 4424, 1352, 1408, 4855, 540, 4644, 4655, - 890, 529, 1420, 1502, 527, 4855, 4666, 4674, 1513, 520, - 4430, 1218, 508, 4682, 1537, 1539, 1549, 1236, 498, 1566, - 4697, 1487, 1619, 1614, 1829, 1863, 2385, 4474, 1871, 4703, - 462, 1917, 1489, 1908, 1931, 454, 4511, 1926, 4707, 452, - 1957, 1989, 1410, 1531, 441, 2003, 2054, 2031, 2142, 4855, - 381, 2045, 4855, 4723, 364, 2042, 348, 1933, 4713, 56, - 4855, 2069, 2086, 2115, 2229, 2250, 4855, 54, 48, 4855, - 4800, 4803, 4806, 113, 4809, 4812, 4815, 4818, 4821, 4824, - - 4827, 105, 4830, 4833, 87, 4836, 4839, 85, 4842, 4845, - 4848, 4851 - } ; - -static const flex_int16_t yy_def[813] = - { 0, - 790, 1, 791, 791, 790, 5, 790, 7, 790, 9, - 790, 790, 790, 790, 792, 793, 790, 790, 790, 790, - 790, 794, 790, 794, 790, 24, 24, 24, 24, 24, - 26, 26, 26, 24, 24, 24, 24, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 795, 796, - 24, 790, 797, 790, 797, 798, 799, 790, 790, 790, - 800, 801, 790, 790, 790, 790, 790, 802, 790, 802, - 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 795, 796, 790, 790, 790, 803, 804, - - 790, 790, 790, 805, 790, 805, 790, 790, 106, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, - 796, 790, 790, 790, 806, 807, 790, 790, 790, 808, - 790, 808, 790, 132, 132, 132, 132, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 795, 796, 790, - 790, 792, 790, 793, 809, 790, 790, 790, 790, 790, - 24, 24, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 790, 790, 790, 790, - - 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, - 810, 796, 24, 790, 797, 811, 798, 812, 799, 790, - 790, 800, 790, 801, 790, 790, 790, 70, 70, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 803, 790, 804, 790, 790, 790, 106, 106, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 806, 790, 807, 790, 790, 790, 132, - - 132, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 132, 132, 132, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 809, 790, 790, 790, 24, - 24, 790, 790, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 790, 24, 790, 24, 24, 790, 790, - 24, 24, 24, 24, 24, 24, 24, 24, 790, 790, - 24, 24, 24, 790, 790, 790, 790, 810, 811, 812, - 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 790, 790, 790, 790, 790, 106, 106, - 790, 790, 790, 790, 790, 132, 132, 132, 132, 132, - - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 24, 24, 24, 24, 24, 24, 790, 790, 24, 24, - 24, 24, 790, 790, 24, 790, 24, 24, 790, 790, - 790, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 790, 790, 790, 24, 70, 70, 70, 70, 70, - 70, 70, 70, 132, 132, 132, 790, 790, 790, 790, - 790, 790, 790, 24, 24, 790, 790, 24, 24, 790, - 790, 790, 790, 24, 24, 790, 790, 24, 790, 790, - 24, 24, 24, 790, 790, 790, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 790, 790, 790, 24, - - 70, 70, 70, 70, 70, 70, 70, 70, 132, 132, - 790, 790, 24, 24, 790, 790, 790, 24, 24, 24, - 790, 790, 790, 790, 24, 790, 790, 790, 790, 790, - 24, 790, 24, 24, 24, 790, 790, 790, 24, 24, - 24, 24, 24, 24, 24, 790, 790, 790, 24, 790, - 790, 790, 790, 24, 790, 70, 70, 70, 70, 70, - 70, 70, 70, 132, 132, 24, 790, 790, 24, 24, - 24, 790, 790, 24, 790, 790, 790, 790, 24, 790, - 24, 24, 24, 790, 24, 24, 24, 24, 24, 24, - 24, 24, 790, 790, 790, 790, 790, 790, 70, 70, - - 70, 70, 70, 70, 70, 70, 132, 132, 24, 790, - 24, 24, 24, 790, 790, 24, 790, 24, 790, 24, - 24, 24, 24, 24, 24, 790, 790, 790, 790, 790, - 790, 70, 70, 70, 70, 70, 70, 790, 790, 790, - 24, 24, 24, 790, 790, 24, 790, 24, 790, 790, - 24, 24, 24, 24, 24, 790, 790, 790, 790, 70, - 70, 70, 790, 790, 790, 790, 790, 790, 24, 24, - 24, 790, 790, 24, 790, 790, 24, 790, 790, 24, - 24, 790, 790, 24, 790, 790, 790, 790, 790, 24, - 24, 24, 790, 790, 24, 790, 790, 24, 790, 24, - - 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, - 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, - 790, 790, 790, 790, 790, 790, 24, 24, 790, 790, - 790, 790, 790, 24, 790, 790, 790, 790, 790, 790, - 24, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 0, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790 - } ; - -static const flex_int16_t yy_nxt[4939] = - { 0, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 12, 24, 24, 24, 24, 25, 12, 12, - 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, - 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, - 27, 37, 27, 27, 27, 26, 27, 28, 29, 30, - 31, 27, 27, 32, 27, 27, 27, 27, 27, 27, - 33, 34, 35, 36, 27, 37, 27, 27, 27, 12, - 12, 12, 12, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 54, 522, 94, 300, 49, 269, - 55, 95, 54, 50, 51, 51, 51, 51, 56, 120, - - 148, 204, 204, 57, 121, 149, 156, 228, 156, 522, - 157, 157, 157, 157, 156, 161, 156, 786, 157, 157, - 157, 157, 790, 789, 790, 774, 161, 161, 161, 161, - 161, 161, 161, 161, 198, 198, 198, 198, 199, 200, - 200, 200, 201, 201, 201, 201, 202, 202, 202, 203, - 203, 203, 203, 205, 205, 205, 205, 52, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 58, 70, 70, 70, 70, 71, 72, 58, 73, 74, - 75, 75, 75, 75, 75, 75, 76, 77, 75, 78, - 75, 75, 79, 80, 75, 81, 82, 83, 75, 75, - - 75, 75, 75, 73, 74, 75, 75, 75, 75, 75, - 75, 76, 77, 75, 78, 75, 75, 79, 80, 81, - 82, 83, 75, 75, 75, 75, 75, 58, 58, 58, - 58, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 96, 97, 98, 99, 100, 96, 96, 101, 102, - 103, 104, 105, 96, 106, 106, 106, 106, 107, 108, - 96, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 96, 96, 96, 96, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 122, 123, 124, 125, 126, 122, - 122, 127, 128, 129, 130, 131, 122, 132, 132, 132, - 132, 133, 122, 122, 134, 134, 135, 134, 134, 134, - 134, 134, 136, 134, 134, 134, 134, 134, 134, 134, - 134, 137, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 135, 134, 134, 134, 134, 134, 136, 134, 134, - 134, 134, 134, 134, 134, 137, 134, 134, 134, 134, - 134, 134, 134, 122, 122, 122, 122, 138, 139, 140, - - 141, 142, 143, 144, 145, 146, 147, 150, 158, 159, - 158, 173, 206, 206, 258, 258, 156, 769, 156, 220, - 157, 157, 157, 157, 790, 261, 790, 479, 161, 161, - 161, 161, 790, 780, 790, 567, 161, 161, 161, 161, - 256, 256, 256, 180, 213, 213, 213, 213, 523, 179, - 777, 790, 479, 790, 532, 161, 161, 161, 161, 790, - 567, 790, 183, 161, 161, 161, 161, 292, 180, 572, - 196, 181, 523, 161, 179, 182, 260, 260, 532, 184, - 161, 151, 185, 160, 156, 174, 156, 183, 162, 162, - 162, 162, 573, 221, 572, 196, 181, 186, 161, 262, - - 182, 227, 220, 184, 161, 161, 185, 187, 580, 189, - 747, 161, 188, 207, 161, 190, 161, 573, 161, 268, - 261, 750, 186, 765, 208, 208, 208, 208, 289, 289, - 161, 760, 187, 580, 189, 161, 188, 610, 161, 190, - 161, 293, 161, 214, 200, 200, 200, 150, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 156, 159, - 156, 610, 162, 162, 162, 162, 790, 713, 790, 173, - 161, 161, 161, 161, 291, 291, 221, 716, 225, 220, - 225, 191, 226, 226, 226, 226, 225, 209, 225, 739, - 226, 226, 226, 226, 262, 790, 706, 790, 682, 161, - - 161, 161, 161, 287, 287, 287, 191, 299, 292, 733, - 192, 322, 322, 790, 261, 790, 193, 228, 228, 228, - 228, 151, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 790, 160, 790, 192, 161, 161, 161, 161, - 790, 193, 790, 174, 161, 161, 161, 161, 242, 228, - 228, 228, 228, 221, 175, 725, 227, 220, 194, 292, - 176, 177, 619, 178, 225, 195, 225, 614, 226, 226, - 226, 226, 242, 252, 252, 252, 252, 324, 324, 175, - 204, 204, 293, 194, 176, 177, 619, 178, 262, 790, - 195, 790, 614, 228, 228, 228, 228, 790, 722, 790, - - 647, 228, 228, 228, 228, 790, 644, 790, 638, 228, - 228, 228, 228, 206, 206, 790, 626, 790, 241, 228, - 228, 228, 228, 253, 254, 254, 254, 258, 258, 243, - 644, 221, 225, 293, 225, 697, 229, 229, 229, 229, - 244, 790, 241, 790, 688, 228, 228, 228, 228, 255, - 255, 255, 255, 790, 243, 790, 245, 228, 228, 228, - 228, 257, 257, 257, 257, 244, 320, 320, 320, 246, - 259, 259, 259, 259, 269, 269, 269, 269, 790, 596, - 790, 245, 228, 228, 228, 228, 790, 685, 790, 659, - 228, 228, 228, 228, 246, 553, 230, 231, 232, 233, - - 234, 235, 236, 237, 238, 239, 225, 526, 225, 249, - 229, 229, 229, 229, 247, 790, 628, 790, 497, 228, - 228, 228, 228, 283, 283, 283, 283, 202, 202, 202, - 248, 260, 260, 249, 485, 790, 615, 790, 247, 228, - 228, 228, 228, 266, 476, 266, 617, 267, 267, 267, - 267, 466, 268, 261, 593, 248, 284, 285, 285, 285, - 266, 615, 266, 250, 267, 267, 267, 267, 289, 289, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 286, 286, 286, 286, 266, 645, 266, 250, 267, 267, - 267, 267, 790, 668, 790, 687, 269, 269, 269, 269, - - 288, 288, 288, 288, 290, 290, 290, 290, 297, 645, - 297, 584, 298, 298, 298, 298, 297, 668, 297, 687, - 298, 298, 298, 298, 256, 256, 256, 262, 266, 715, - 266, 735, 270, 270, 270, 270, 299, 292, 300, 300, - 300, 300, 291, 291, 297, 578, 297, 640, 298, 298, - 298, 298, 790, 715, 790, 735, 300, 300, 300, 300, - 790, 417, 790, 568, 300, 300, 300, 300, 316, 316, - 316, 316, 640, 790, 406, 790, 404, 300, 300, 300, - 300, 317, 318, 318, 318, 312, 322, 322, 314, 287, - 287, 287, 271, 272, 273, 274, 275, 276, 277, 278, - - 279, 280, 266, 359, 266, 349, 270, 270, 270, 270, - 312, 293, 790, 314, 790, 344, 300, 300, 300, 300, - 319, 319, 319, 319, 321, 321, 321, 321, 323, 323, - 323, 323, 524, 156, 332, 156, 313, 157, 157, 157, - 157, 156, 512, 156, 511, 157, 157, 157, 157, 790, - 499, 790, 650, 161, 161, 161, 161, 161, 161, 161, - 161, 313, 198, 198, 198, 198, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 297, 650, 297, 484, - 301, 301, 301, 301, 328, 200, 200, 200, 201, 201, - 201, 201, 203, 203, 203, 203, 205, 205, 205, 205, - - 161, 161, 161, 161, 790, 672, 790, 673, 161, 161, - 161, 161, 480, 790, 679, 790, 463, 161, 161, 161, - 161, 332, 332, 320, 320, 320, 330, 292, 331, 790, - 672, 790, 673, 161, 161, 161, 161, 324, 324, 679, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 297, 330, 297, 331, 301, 301, 301, 301, 790, 686, - 790, 689, 161, 161, 161, 161, 790, 261, 790, 220, - 161, 161, 161, 161, 207, 790, 173, 790, 159, 161, - 161, 161, 161, 150, 686, 357, 689, 790, 334, 790, - 315, 161, 161, 161, 161, 295, 333, 295, 790, 335, - - 790, 336, 161, 161, 161, 161, 362, 362, 362, 341, - 357, 693, 334, 694, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 335, 790, 336, 790, 337, 161, - 161, 161, 161, 394, 341, 282, 693, 790, 694, 790, - 338, 161, 161, 161, 161, 362, 362, 362, 362, 264, - 696, 339, 337, 790, 699, 790, 740, 161, 161, 161, - 161, 150, 362, 362, 362, 338, 790, 705, 790, 340, - 161, 161, 161, 161, 344, 696, 339, 745, 342, 699, - 740, 790, 264, 790, 708, 161, 161, 161, 161, 712, - 343, 721, 705, 340, 706, 706, 345, 382, 382, 382, - - 790, 745, 790, 342, 161, 161, 161, 161, 716, 708, - 349, 349, 387, 347, 712, 343, 721, 717, 790, 251, - 790, 345, 161, 161, 161, 161, 790, 223, 790, 348, - 161, 161, 161, 161, 389, 389, 389, 790, 347, 790, - 344, 161, 161, 161, 161, 790, 223, 790, 346, 161, - 161, 161, 161, 348, 399, 399, 399, 351, 371, 353, - 367, 423, 352, 362, 363, 363, 363, 723, 354, 707, - 790, 355, 790, 726, 161, 161, 161, 161, 329, 197, - 732, 351, 718, 356, 353, 350, 423, 352, 362, 362, - 362, 362, 723, 354, 327, 790, 355, 790, 726, 161, - - 161, 161, 161, 359, 359, 732, 153, 153, 356, 325, - 716, 790, 769, 790, 424, 161, 161, 161, 161, 717, - 790, 770, 790, 358, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 364, 364, 364, 364, - 736, 207, 361, 365, 365, 365, 365, 358, 366, 366, - 366, 366, 208, 208, 208, 208, 208, 208, 208, 208, - 213, 213, 213, 213, 211, 736, 315, 361, 207, 362, - 362, 362, 155, 295, 295, 225, 211, 225, 360, 226, - 226, 226, 226, 225, 718, 225, 771, 226, 226, 226, - 226, 790, 282, 790, 281, 228, 228, 228, 228, 228, - - 228, 228, 228, 252, 252, 252, 252, 372, 254, 254, - 254, 255, 255, 255, 255, 209, 257, 257, 257, 257, - 259, 259, 259, 259, 790, 749, 790, 762, 228, 228, - 228, 228, 790, 737, 790, 155, 228, 228, 228, 228, - 790, 738, 790, 264, 228, 228, 228, 228, 790, 749, - 790, 762, 228, 228, 228, 228, 264, 790, 737, 790, - 466, 228, 228, 228, 228, 742, 738, 373, 374, 790, - 743, 790, 772, 228, 228, 228, 228, 228, 228, 228, - 228, 515, 790, 744, 790, 375, 228, 228, 228, 228, - 742, 211, 373, 374, 746, 743, 772, 376, 790, 251, - - 790, 377, 228, 228, 228, 228, 515, 790, 744, 790, - 375, 228, 228, 228, 228, 382, 382, 382, 382, 746, - 750, 750, 376, 379, 378, 790, 377, 790, 240, 228, - 228, 228, 228, 380, 516, 752, 381, 220, 382, 382, - 382, 382, 383, 383, 383, 155, 223, 223, 379, 378, - 382, 382, 382, 382, 228, 228, 228, 228, 380, 218, - 752, 381, 228, 228, 228, 228, 384, 384, 384, 384, - 385, 385, 385, 385, 386, 386, 386, 386, 266, 216, - 266, 211, 267, 267, 267, 267, 266, 197, 266, 155, - 267, 267, 267, 267, 790, 751, 790, 153, 269, 269, - - 269, 269, 269, 269, 269, 269, 283, 283, 283, 283, - 388, 285, 285, 285, 286, 286, 286, 286, 288, 288, - 288, 288, 290, 290, 290, 290, 269, 269, 269, 269, - 389, 389, 389, 389, 261, 389, 389, 389, 389, 390, - 390, 390, 389, 389, 389, 389, 269, 269, 269, 269, - 269, 269, 269, 269, 391, 391, 391, 391, 392, 392, - 392, 392, 393, 393, 393, 393, 297, 153, 297, 790, - 298, 298, 298, 298, 297, 790, 297, 790, 298, 298, - 298, 298, 790, 790, 790, 790, 300, 300, 300, 300, - 300, 300, 300, 300, 316, 316, 316, 316, 395, 318, - - 318, 318, 319, 319, 319, 319, 321, 321, 321, 321, - 323, 323, 323, 323, 790, 790, 790, 790, 300, 300, - 300, 300, 790, 790, 790, 790, 300, 300, 300, 300, - 790, 790, 790, 790, 790, 397, 300, 300, 300, 300, - 396, 300, 300, 300, 300, 399, 399, 399, 399, 292, - 399, 399, 399, 399, 400, 400, 400, 753, 398, 790, - 397, 399, 399, 399, 399, 396, 300, 300, 300, 300, - 300, 300, 300, 300, 401, 401, 401, 401, 402, 402, - 402, 402, 753, 398, 403, 403, 403, 403, 404, 404, - 410, 200, 200, 200, 332, 332, 790, 754, 790, 758, - - 161, 161, 161, 161, 406, 406, 408, 408, 408, 408, - 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, - 790, 790, 754, 790, 758, 161, 161, 161, 161, 790, - 790, 790, 647, 161, 161, 161, 161, 761, 790, 411, - 790, 763, 161, 161, 161, 161, 426, 200, 200, 200, - 790, 790, 790, 675, 161, 161, 161, 161, 412, 764, - 766, 414, 761, 405, 411, 415, 763, 790, 790, 409, - 790, 782, 790, 413, 161, 161, 161, 161, 675, 407, - 417, 790, 412, 416, 764, 766, 414, 790, 767, 790, - 415, 161, 161, 161, 161, 782, 790, 413, 790, 790, - - 161, 161, 161, 161, 790, 790, 676, 790, 416, 161, - 161, 161, 161, 767, 790, 419, 790, 768, 161, 161, - 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, - 431, 200, 200, 200, 420, 422, 773, 421, 790, 790, - 419, 790, 768, 161, 161, 161, 161, 444, 200, 200, - 200, 790, 790, 790, 418, 774, 774, 790, 420, 790, - 422, 773, 421, 425, 790, 776, 790, 790, 161, 161, - 161, 161, 790, 778, 790, 781, 161, 161, 161, 161, - 349, 349, 161, 161, 161, 161, 427, 790, 425, 790, - 776, 790, 429, 429, 429, 429, 790, 783, 778, 790, - - 781, 790, 428, 161, 161, 161, 161, 790, 790, 790, - 790, 427, 161, 161, 161, 161, 161, 161, 161, 161, - 784, 433, 783, 359, 359, 434, 428, 790, 432, 790, - 775, 161, 161, 161, 161, 442, 442, 442, 442, 790, - 790, 790, 435, 790, 769, 784, 433, 790, 785, 790, - 434, 790, 432, 770, 790, 430, 790, 790, 161, 161, - 161, 161, 790, 682, 790, 436, 790, 435, 161, 161, - 161, 161, 790, 785, 790, 790, 161, 161, 161, 161, - 161, 161, 161, 161, 702, 790, 437, 790, 790, 790, - 436, 161, 161, 161, 161, 790, 790, 790, 443, 161, - - 161, 161, 161, 438, 228, 228, 228, 228, 790, 702, - 790, 437, 790, 439, 161, 161, 161, 161, 771, 790, - 440, 228, 228, 228, 228, 790, 441, 438, 790, 790, - 790, 786, 161, 161, 161, 161, 790, 703, 439, 713, - 787, 445, 790, 790, 790, 440, 161, 161, 161, 161, - 441, 790, 786, 790, 790, 228, 228, 228, 228, 790, - 729, 787, 790, 790, 790, 445, 228, 228, 228, 228, - 228, 228, 228, 228, 790, 446, 447, 790, 790, 790, - 790, 228, 228, 228, 228, 729, 790, 790, 790, 790, - 228, 228, 228, 228, 269, 269, 269, 269, 790, 790, - - 446, 447, 448, 790, 790, 788, 790, 790, 228, 228, - 228, 228, 790, 730, 790, 790, 228, 228, 228, 228, - 269, 269, 269, 269, 790, 790, 788, 448, 449, 790, - 790, 790, 790, 790, 450, 228, 228, 228, 228, 790, - 790, 790, 790, 228, 228, 228, 228, 451, 790, 790, - 790, 790, 790, 449, 228, 228, 228, 228, 790, 450, - 269, 269, 269, 269, 790, 452, 790, 790, 790, 453, - 790, 790, 451, 790, 790, 228, 228, 228, 228, 790, - 790, 790, 790, 228, 228, 228, 228, 747, 790, 790, - 452, 790, 790, 790, 453, 269, 269, 269, 269, 790, - - 790, 790, 790, 269, 269, 269, 269, 790, 755, 790, - 790, 300, 300, 300, 300, 790, 790, 790, 790, 300, - 300, 300, 300, 790, 790, 790, 790, 300, 300, 300, - 300, 790, 790, 755, 790, 790, 790, 455, 300, 300, - 300, 300, 454, 790, 790, 456, 790, 790, 300, 300, - 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, - 790, 756, 455, 404, 404, 790, 454, 790, 790, 790, - 456, 300, 300, 300, 300, 457, 457, 457, 457, 459, - 200, 200, 200, 406, 406, 462, 200, 200, 200, 408, - 408, 408, 408, 790, 790, 460, 460, 460, 460, 332, - - 362, 362, 362, 790, 790, 790, 790, 161, 161, 161, - 161, 790, 417, 790, 790, 161, 161, 161, 161, 790, - 466, 790, 790, 161, 161, 161, 161, 790, 464, 790, - 790, 161, 161, 161, 161, 470, 790, 790, 458, 790, - 790, 465, 790, 468, 790, 471, 161, 161, 161, 161, - 790, 790, 790, 464, 161, 161, 161, 161, 461, 790, - 470, 473, 200, 200, 200, 465, 790, 790, 790, 790, - 471, 161, 161, 161, 161, 790, 790, 790, 790, 790, - 469, 161, 161, 161, 161, 790, 472, 790, 476, 476, - 790, 790, 475, 790, 467, 474, 790, 790, 790, 790, - - 161, 161, 161, 161, 469, 790, 790, 790, 790, 161, - 161, 161, 161, 790, 790, 790, 790, 475, 790, 474, - 161, 161, 161, 161, 344, 362, 362, 362, 429, 429, - 429, 429, 790, 790, 790, 478, 790, 790, 161, 161, - 161, 161, 790, 790, 790, 790, 481, 161, 161, 161, - 161, 790, 790, 790, 483, 349, 362, 362, 362, 478, - 790, 485, 485, 477, 790, 482, 790, 790, 790, 790, - 481, 790, 790, 161, 161, 161, 161, 790, 790, 483, - 790, 790, 161, 161, 161, 161, 790, 790, 790, 482, - 790, 790, 790, 487, 790, 790, 161, 161, 161, 161, - - 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, - 790, 790, 161, 493, 494, 495, 489, 790, 487, 790, - 488, 161, 161, 161, 161, 790, 790, 790, 790, 790, - 161, 161, 161, 161, 790, 790, 486, 491, 790, 790, - 790, 489, 790, 790, 488, 490, 790, 790, 790, 790, - 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, - 161, 161, 491, 497, 497, 442, 442, 442, 442, 490, - 790, 790, 790, 790, 492, 161, 161, 161, 161, 359, - 362, 362, 362, 790, 790, 496, 790, 790, 161, 161, - 161, 161, 457, 457, 457, 457, 790, 790, 492, 500, - - 790, 790, 790, 790, 228, 228, 228, 228, 790, 496, - 790, 790, 228, 228, 228, 228, 790, 790, 790, 501, - 228, 228, 228, 228, 500, 790, 790, 502, 790, 790, - 228, 228, 228, 228, 790, 503, 790, 790, 498, 404, - 362, 362, 362, 790, 501, 790, 790, 228, 228, 228, - 228, 790, 502, 790, 505, 790, 504, 790, 790, 790, - 503, 228, 228, 228, 228, 790, 790, 790, 790, 228, - 228, 228, 228, 790, 790, 790, 506, 790, 790, 505, - 504, 790, 790, 790, 790, 228, 228, 228, 228, 790, - 790, 790, 790, 507, 300, 300, 300, 300, 790, 790, - - 790, 506, 790, 508, 300, 300, 300, 300, 790, 790, - 790, 790, 300, 300, 300, 300, 790, 507, 790, 510, - 460, 460, 460, 460, 406, 362, 362, 362, 508, 790, - 790, 509, 790, 790, 161, 161, 161, 161, 790, 790, - 790, 790, 790, 790, 510, 161, 161, 161, 161, 790, - 790, 790, 514, 790, 790, 509, 790, 790, 513, 517, - 200, 200, 200, 790, 790, 790, 790, 161, 161, 161, - 161, 417, 362, 362, 362, 790, 518, 514, 530, 200, - 200, 200, 513, 790, 790, 521, 519, 161, 161, 161, - 161, 790, 790, 790, 790, 790, 520, 161, 161, 161, - - 161, 518, 526, 526, 538, 200, 200, 200, 790, 790, - 790, 519, 790, 790, 161, 161, 161, 161, 525, 790, - 520, 476, 476, 790, 790, 790, 790, 161, 161, 161, - 161, 790, 790, 528, 528, 528, 528, 552, 200, 200, - 200, 790, 531, 525, 790, 790, 790, 790, 161, 161, - 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, - 790, 790, 790, 533, 790, 790, 534, 531, 790, 790, - 790, 790, 161, 161, 161, 161, 790, 527, 790, 790, - 485, 485, 466, 362, 362, 362, 790, 790, 533, 790, - 535, 534, 536, 536, 536, 536, 529, 790, 790, 790, - - 790, 161, 161, 161, 161, 577, 200, 200, 200, 790, - 790, 539, 790, 790, 790, 535, 161, 161, 161, 161, - 790, 790, 790, 541, 790, 790, 540, 790, 790, 161, - 161, 161, 161, 790, 790, 790, 539, 161, 161, 161, - 161, 790, 790, 790, 542, 790, 790, 790, 541, 790, - 540, 790, 790, 790, 543, 537, 790, 790, 790, 790, - 790, 161, 161, 161, 161, 528, 528, 528, 528, 542, - 544, 790, 790, 790, 790, 161, 161, 161, 161, 543, - 790, 790, 546, 790, 161, 161, 161, 161, 790, 790, - 545, 790, 790, 790, 547, 544, 161, 161, 161, 161, - - 790, 790, 548, 790, 161, 161, 161, 161, 497, 497, - 790, 790, 790, 790, 790, 545, 161, 161, 161, 161, - 550, 550, 550, 550, 553, 553, 790, 790, 790, 549, - 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, - 790, 790, 790, 790, 228, 228, 228, 228, 706, 706, - 790, 790, 790, 790, 549, 228, 228, 228, 228, 790, - 790, 554, 790, 790, 556, 790, 790, 228, 228, 228, - 228, 790, 790, 724, 790, 557, 228, 228, 228, 228, - 790, 790, 790, 551, 790, 554, 790, 790, 790, 556, - 790, 559, 228, 228, 228, 228, 790, 558, 724, 555, - - 557, 560, 790, 790, 790, 790, 228, 228, 228, 228, - 790, 790, 790, 790, 790, 790, 559, 228, 228, 228, - 228, 558, 790, 707, 790, 790, 560, 790, 562, 228, - 228, 228, 228, 790, 790, 790, 561, 300, 300, 300, - 300, 790, 790, 790, 563, 790, 790, 564, 790, 790, - 790, 790, 790, 562, 300, 300, 300, 300, 790, 790, - 561, 790, 790, 565, 476, 362, 362, 362, 790, 563, - 790, 790, 564, 790, 790, 161, 161, 161, 161, 790, - 790, 790, 790, 161, 161, 161, 161, 790, 565, 790, - 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, - - 161, 161, 161, 566, 790, 790, 790, 790, 161, 161, - 161, 161, 569, 536, 536, 536, 536, 790, 790, 790, - 570, 161, 161, 161, 161, 790, 790, 790, 566, 790, - 790, 790, 571, 790, 526, 526, 790, 569, 790, 790, - 790, 574, 790, 790, 790, 570, 575, 575, 575, 575, - 790, 790, 790, 790, 790, 790, 571, 161, 161, 161, - 161, 790, 790, 790, 790, 790, 574, 161, 161, 161, - 161, 485, 362, 362, 362, 790, 790, 790, 579, 581, - 790, 790, 790, 790, 161, 161, 161, 161, 550, 550, - 550, 550, 790, 790, 790, 582, 161, 161, 161, 161, - - 790, 790, 790, 579, 581, 790, 790, 790, 790, 576, - 161, 161, 161, 161, 583, 790, 790, 790, 790, 790, - 582, 161, 161, 161, 161, 790, 790, 790, 790, 161, - 161, 161, 161, 790, 790, 790, 790, 585, 790, 583, - 161, 161, 161, 161, 790, 790, 586, 790, 587, 161, - 161, 161, 161, 497, 362, 362, 362, 790, 790, 790, - 588, 585, 790, 790, 790, 790, 161, 161, 161, 161, - 586, 790, 790, 587, 589, 790, 790, 590, 790, 790, - 161, 161, 161, 161, 790, 588, 790, 790, 790, 790, - 161, 161, 161, 161, 790, 553, 553, 790, 589, 790, - - 790, 790, 590, 790, 592, 790, 591, 594, 594, 594, - 594, 596, 596, 598, 200, 200, 200, 790, 790, 790, - 790, 790, 790, 161, 161, 161, 161, 790, 790, 592, - 591, 790, 790, 790, 790, 228, 228, 228, 228, 790, - 790, 790, 790, 228, 228, 228, 228, 790, 599, 790, - 790, 228, 228, 228, 228, 790, 600, 790, 790, 228, - 228, 228, 228, 790, 790, 790, 601, 790, 790, 790, - 595, 790, 790, 599, 575, 575, 575, 575, 790, 602, - 790, 600, 228, 228, 228, 228, 597, 790, 790, 790, - 790, 601, 228, 228, 228, 228, 790, 603, 790, 790, - - 228, 228, 228, 228, 602, 790, 790, 604, 790, 790, - 228, 228, 228, 228, 790, 790, 790, 790, 300, 300, - 300, 300, 603, 790, 790, 605, 790, 790, 790, 607, - 606, 790, 604, 790, 790, 300, 300, 300, 300, 526, - 362, 362, 362, 790, 790, 790, 608, 790, 790, 605, - 594, 594, 594, 594, 607, 606, 790, 790, 790, 790, - 161, 161, 161, 161, 631, 200, 200, 200, 790, 790, - 790, 608, 161, 161, 161, 161, 790, 790, 790, 790, - 161, 161, 161, 161, 790, 790, 609, 790, 790, 790, - 612, 611, 790, 790, 790, 790, 161, 161, 161, 161, - - 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, - 609, 613, 790, 790, 790, 612, 611, 790, 790, 790, - 790, 790, 790, 616, 161, 161, 161, 161, 790, 790, - 790, 790, 161, 161, 161, 161, 613, 553, 362, 362, - 362, 790, 790, 790, 618, 790, 790, 620, 616, 790, - 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, - 790, 161, 161, 161, 161, 790, 790, 790, 621, 618, - 790, 790, 620, 790, 790, 161, 161, 161, 161, 790, - 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, - 790, 623, 790, 621, 161, 161, 161, 161, 790, 622, - - 790, 790, 161, 161, 161, 161, 658, 200, 200, 200, - 790, 790, 790, 624, 161, 161, 161, 161, 790, 790, - 790, 790, 790, 622, 161, 161, 161, 161, 790, 790, - 790, 790, 161, 161, 161, 161, 626, 626, 624, 790, - 596, 596, 790, 790, 790, 790, 790, 790, 161, 161, - 161, 161, 629, 629, 629, 629, 596, 362, 362, 362, - 790, 790, 790, 625, 228, 228, 228, 228, 790, 790, - 790, 790, 228, 228, 228, 228, 790, 790, 790, 790, - 228, 228, 228, 228, 790, 790, 790, 625, 228, 228, - 228, 228, 790, 790, 790, 790, 228, 228, 228, 228, - - 632, 633, 790, 790, 790, 790, 790, 228, 228, 228, - 228, 627, 790, 790, 790, 630, 634, 790, 790, 790, - 790, 228, 228, 228, 228, 632, 633, 635, 790, 790, - 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, - 790, 634, 300, 300, 300, 300, 636, 637, 790, 790, - 790, 790, 635, 300, 300, 300, 300, 667, 200, 200, - 200, 638, 638, 678, 200, 200, 200, 790, 790, 790, - 636, 790, 637, 161, 161, 161, 161, 790, 790, 790, - 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, - 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, - - 161, 790, 790, 641, 642, 790, 790, 790, 790, 161, - 161, 161, 161, 656, 656, 656, 656, 790, 790, 790, - 646, 790, 790, 643, 790, 790, 647, 790, 641, 642, - 790, 790, 790, 790, 648, 790, 639, 161, 161, 161, - 161, 790, 790, 790, 790, 646, 790, 643, 161, 161, - 161, 161, 790, 790, 790, 790, 790, 651, 161, 161, - 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, - 626, 362, 362, 362, 790, 790, 790, 653, 161, 161, - 161, 161, 651, 790, 652, 790, 790, 161, 161, 161, - 161, 790, 790, 654, 790, 790, 161, 161, 161, 161, - - 649, 790, 653, 663, 663, 663, 663, 790, 652, 626, - 626, 790, 655, 596, 596, 790, 790, 790, 654, 790, - 790, 656, 656, 656, 656, 629, 629, 629, 629, 638, - 362, 362, 362, 790, 790, 790, 655, 228, 228, 228, - 228, 790, 790, 790, 790, 228, 228, 228, 228, 790, - 660, 790, 790, 228, 228, 228, 228, 790, 790, 790, - 790, 228, 228, 228, 228, 790, 661, 790, 790, 228, - 228, 228, 228, 790, 662, 660, 790, 790, 790, 790, - 228, 228, 228, 228, 657, 790, 790, 790, 630, 638, - 638, 661, 647, 362, 362, 362, 790, 790, 790, 662, - - 790, 663, 663, 663, 663, 790, 790, 790, 790, 161, - 161, 161, 161, 790, 664, 790, 665, 161, 161, 161, - 161, 790, 790, 790, 669, 161, 161, 161, 161, 670, - 790, 790, 790, 790, 790, 161, 161, 161, 161, 664, - 790, 665, 790, 790, 161, 161, 161, 161, 790, 669, - 790, 671, 790, 790, 670, 674, 790, 790, 790, 677, - 161, 161, 161, 161, 666, 790, 790, 680, 790, 790, - 161, 161, 161, 161, 790, 671, 704, 200, 200, 200, - 674, 790, 682, 790, 677, 681, 790, 790, 790, 790, - 790, 790, 680, 161, 161, 161, 161, 790, 790, 790, - - 790, 161, 161, 161, 161, 682, 362, 362, 362, 790, - 681, 684, 790, 790, 790, 790, 161, 161, 161, 161, - 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, - 790, 790, 228, 228, 228, 228, 684, 790, 790, 790, - 790, 228, 228, 228, 228, 790, 790, 790, 790, 161, - 161, 161, 161, 790, 790, 790, 683, 161, 161, 161, - 161, 790, 790, 790, 790, 790, 790, 690, 161, 161, - 161, 161, 691, 790, 790, 790, 790, 790, 790, 692, - 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, - 161, 161, 690, 731, 200, 200, 200, 691, 698, 713, - - 362, 362, 362, 790, 692, 790, 695, 161, 161, 161, - 161, 790, 790, 790, 790, 161, 161, 161, 161, 790, - 790, 790, 790, 698, 161, 161, 161, 161, 790, 790, - 695, 790, 790, 700, 790, 790, 701, 790, 790, 161, - 161, 161, 161, 757, 200, 200, 200, 790, 790, 790, - 709, 161, 161, 161, 161, 790, 790, 700, 790, 790, - 790, 701, 710, 790, 790, 713, 790, 790, 161, 161, - 161, 161, 790, 790, 790, 709, 161, 161, 161, 161, - 747, 362, 362, 362, 790, 790, 790, 710, 711, 790, - 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, - - 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, - 161, 161, 161, 711, 790, 790, 719, 790, 790, 790, - 790, 161, 161, 161, 161, 790, 790, 790, 790, 720, - 790, 727, 161, 161, 161, 161, 790, 790, 790, 714, - 790, 719, 728, 790, 790, 790, 790, 161, 161, 161, - 161, 790, 790, 790, 720, 790, 727, 161, 161, 161, - 161, 790, 790, 790, 790, 790, 790, 728, 161, 161, - 161, 161, 790, 790, 790, 790, 790, 790, 734, 161, - 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, - 161, 790, 790, 790, 790, 161, 161, 161, 161, 747, - - 790, 790, 790, 734, 750, 750, 790, 790, 790, 790, - 161, 161, 161, 161, 790, 741, 759, 759, 759, 759, - 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, - 790, 790, 790, 790, 790, 790, 779, 779, 779, 779, - 741, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 748, 790, 790, 790, 790, 790, 751, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 775, - - 53, 53, 53, 152, 790, 152, 154, 790, 154, 210, - 790, 210, 212, 790, 212, 215, 790, 215, 217, 790, - 217, 219, 790, 219, 222, 790, 222, 224, 790, 224, - 263, 790, 263, 265, 790, 265, 294, 790, 294, 296, - 790, 296, 326, 790, 326, 368, 790, 368, 369, 790, - 369, 370, 790, 370, 11, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790 - } ; - -static const flex_int16_t yy_chk[4939] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 3, 470, 6, 808, 2, 805, - 3, 6, 4, 2, 2, 2, 2, 2, 4, 8, - - 10, 45, 45, 4, 8, 10, 20, 802, 20, 470, - 20, 20, 20, 20, 23, 794, 23, 789, 23, 23, - 23, 23, 27, 788, 27, 780, 27, 27, 27, 27, - 38, 38, 38, 38, 40, 40, 40, 40, 41, 41, - 41, 41, 42, 42, 42, 42, 43, 43, 43, 44, - 44, 44, 44, 46, 46, 46, 46, 2, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 14, 21, 21, - 25, 25, 47, 47, 91, 91, 21, 777, 21, 60, - 21, 21, 21, 21, 28, 98, 28, 423, 28, 28, - 28, 28, 29, 775, 29, 515, 29, 29, 29, 29, - 89, 89, 89, 29, 51, 51, 51, 51, 471, 28, - 771, 30, 423, 30, 479, 30, 30, 30, 30, 37, - 515, 37, 31, 37, 37, 37, 37, 124, 29, 522, - 37, 30, 471, 31, 28, 30, 93, 93, 479, 31, - 31, 14, 31, 21, 22, 25, 22, 31, 22, 22, - 22, 22, 523, 60, 522, 37, 30, 32, 31, 98, - - 30, 71, 71, 31, 31, 32, 31, 32, 532, 33, - 765, 32, 32, 48, 32, 33, 33, 523, 33, 107, - 107, 760, 32, 756, 48, 48, 48, 48, 117, 117, - 32, 751, 32, 532, 33, 32, 32, 567, 32, 33, - 33, 124, 33, 52, 52, 52, 52, 150, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 24, 159, - 24, 567, 24, 24, 24, 24, 34, 739, 34, 173, - 34, 34, 34, 34, 119, 119, 71, 733, 66, 220, - 66, 34, 66, 66, 66, 66, 69, 48, 69, 730, - 69, 69, 69, 69, 107, 35, 725, 35, 722, 35, - - 35, 35, 35, 115, 115, 115, 34, 133, 133, 718, - 35, 145, 145, 74, 261, 74, 35, 74, 74, 74, - 74, 150, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 26, 159, 26, 35, 26, 26, 26, 26, - 36, 35, 36, 173, 36, 36, 36, 36, 74, 84, - 84, 84, 84, 220, 26, 707, 67, 67, 36, 292, - 26, 26, 580, 26, 67, 36, 67, 572, 67, 67, - 67, 67, 74, 86, 86, 86, 86, 147, 147, 26, - 170, 170, 133, 36, 26, 26, 580, 26, 261, 73, - 36, 73, 572, 73, 73, 73, 73, 75, 703, 75, - - 697, 75, 75, 75, 75, 76, 614, 76, 688, 76, - 76, 76, 76, 172, 172, 77, 685, 77, 73, 77, - 77, 77, 77, 87, 87, 87, 87, 237, 237, 76, - 614, 67, 68, 292, 68, 676, 68, 68, 68, 68, - 77, 78, 73, 78, 666, 78, 78, 78, 78, 88, - 88, 88, 88, 79, 76, 79, 78, 79, 79, 79, - 79, 90, 90, 90, 90, 77, 143, 143, 143, 79, - 92, 92, 92, 92, 110, 110, 110, 110, 82, 659, - 82, 78, 82, 82, 82, 82, 80, 657, 80, 630, - 80, 80, 80, 80, 79, 628, 68, 68, 68, 68, - - 68, 68, 68, 68, 68, 68, 70, 617, 70, 82, - 70, 70, 70, 70, 80, 81, 595, 81, 593, 81, - 81, 81, 81, 112, 112, 112, 112, 168, 168, 168, - 81, 239, 239, 82, 584, 83, 573, 83, 80, 83, - 83, 83, 83, 102, 578, 102, 576, 102, 102, 102, - 102, 568, 103, 103, 551, 81, 113, 113, 113, 113, - 103, 573, 103, 83, 103, 103, 103, 103, 278, 278, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 114, 114, 114, 114, 105, 615, 105, 83, 105, 105, - 105, 105, 109, 640, 109, 665, 109, 109, 109, 109, - - 116, 116, 116, 116, 118, 118, 118, 118, 128, 615, - 128, 537, 128, 128, 128, 128, 131, 640, 131, 665, - 131, 131, 131, 131, 235, 235, 235, 103, 104, 696, - 104, 721, 104, 104, 104, 104, 129, 129, 138, 138, - 138, 138, 280, 280, 129, 529, 129, 610, 129, 129, - 129, 129, 134, 696, 134, 721, 134, 134, 134, 134, - 135, 524, 135, 516, 135, 135, 135, 135, 140, 140, - 140, 140, 610, 137, 512, 137, 511, 137, 137, 137, - 137, 141, 141, 141, 141, 135, 309, 309, 137, 276, - 276, 276, 104, 104, 104, 104, 104, 104, 104, 104, - - 104, 104, 106, 499, 106, 484, 106, 106, 106, 106, - 135, 129, 136, 137, 136, 480, 136, 136, 136, 136, - 142, 142, 142, 142, 144, 144, 144, 144, 146, 146, - 146, 146, 472, 156, 463, 156, 136, 156, 156, 156, - 156, 157, 461, 157, 458, 157, 157, 157, 157, 161, - 443, 161, 619, 161, 161, 161, 161, 163, 163, 163, - 163, 136, 165, 165, 165, 165, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 130, 619, 130, 430, - 130, 130, 130, 130, 166, 166, 166, 166, 167, 167, - 167, 167, 169, 169, 169, 169, 171, 171, 171, 171, - - 197, 197, 197, 197, 175, 644, 175, 645, 175, 175, - 175, 175, 424, 176, 650, 176, 409, 176, 176, 176, - 176, 177, 177, 307, 307, 307, 175, 394, 176, 177, - 644, 177, 645, 177, 177, 177, 177, 311, 311, 650, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 132, 175, 132, 176, 132, 132, 132, 132, 178, 664, - 178, 668, 178, 178, 178, 178, 193, 387, 193, 371, - 193, 193, 193, 193, 367, 179, 329, 179, 327, 179, - 179, 179, 179, 325, 664, 193, 668, 183, 178, 183, - 303, 183, 183, 183, 183, 296, 177, 294, 180, 179, - - 180, 179, 180, 180, 180, 180, 328, 328, 328, 183, - 193, 672, 178, 673, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 179, 181, 179, 181, 180, 181, - 181, 181, 181, 293, 183, 272, 672, 182, 673, 182, - 181, 182, 182, 182, 182, 198, 198, 198, 198, 265, - 675, 182, 180, 184, 679, 184, 732, 184, 184, 184, - 184, 199, 199, 199, 199, 181, 185, 686, 185, 182, - 185, 185, 185, 185, 186, 675, 182, 738, 184, 679, - 732, 186, 263, 186, 689, 186, 186, 186, 186, 693, - 185, 702, 686, 182, 687, 687, 186, 372, 372, 372, - - 187, 738, 187, 184, 187, 187, 187, 187, 699, 689, - 188, 188, 262, 187, 693, 185, 702, 699, 188, 231, - 188, 186, 188, 188, 188, 188, 189, 224, 189, 187, - 189, 189, 189, 189, 388, 388, 388, 190, 187, 190, - 344, 190, 190, 190, 190, 191, 222, 191, 186, 191, - 191, 191, 191, 187, 395, 395, 395, 189, 221, 191, - 209, 344, 190, 200, 200, 200, 200, 705, 191, 687, - 192, 191, 192, 708, 192, 192, 192, 192, 174, 164, - 715, 189, 699, 192, 191, 188, 344, 190, 201, 201, - 201, 201, 705, 191, 160, 194, 191, 194, 708, 194, - - 194, 194, 194, 195, 195, 715, 154, 152, 192, 151, - 716, 195, 763, 195, 344, 195, 195, 195, 195, 716, - 196, 763, 196, 194, 196, 196, 196, 196, 202, 202, - 202, 202, 203, 203, 203, 203, 204, 204, 204, 204, - 723, 207, 196, 205, 205, 205, 205, 194, 206, 206, - 206, 206, 207, 207, 207, 207, 208, 208, 208, 208, - 213, 213, 213, 213, 148, 723, 139, 196, 214, 214, - 214, 214, 127, 126, 125, 225, 120, 225, 195, 225, - 225, 225, 225, 226, 716, 226, 763, 226, 226, 226, - 226, 228, 111, 228, 108, 228, 228, 228, 228, 230, - - 230, 230, 230, 232, 232, 232, 232, 233, 233, 233, - 233, 234, 234, 234, 234, 207, 236, 236, 236, 236, - 238, 238, 238, 238, 241, 742, 241, 753, 241, 241, - 241, 241, 242, 724, 242, 101, 242, 242, 242, 242, - 243, 729, 243, 100, 243, 243, 243, 243, 244, 742, - 244, 753, 244, 244, 244, 244, 99, 245, 724, 245, - 466, 245, 245, 245, 245, 735, 729, 244, 245, 246, - 736, 246, 764, 246, 246, 246, 246, 251, 251, 251, - 251, 466, 247, 737, 247, 246, 247, 247, 247, 247, - 735, 94, 244, 245, 740, 736, 764, 247, 248, 85, - - 248, 247, 248, 248, 248, 248, 466, 249, 737, 249, - 246, 249, 249, 249, 249, 252, 252, 252, 252, 740, - 743, 743, 247, 249, 248, 250, 247, 250, 72, 250, - 250, 250, 250, 249, 466, 744, 250, 253, 253, 253, - 253, 254, 254, 254, 254, 65, 62, 61, 249, 248, - 255, 255, 255, 255, 256, 256, 256, 256, 249, 56, - 744, 250, 257, 257, 257, 257, 258, 258, 258, 258, - 259, 259, 259, 259, 260, 260, 260, 260, 266, 55, - 266, 49, 266, 266, 266, 266, 267, 39, 267, 19, - 267, 267, 267, 267, 269, 743, 269, 16, 269, 269, - - 269, 269, 271, 271, 271, 271, 273, 273, 273, 273, - 274, 274, 274, 274, 275, 275, 275, 275, 277, 277, - 277, 277, 279, 279, 279, 279, 282, 282, 282, 282, - 283, 283, 283, 283, 284, 284, 284, 284, 285, 285, - 285, 285, 286, 286, 286, 286, 287, 287, 287, 287, - 288, 288, 288, 288, 289, 289, 289, 289, 290, 290, - 290, 290, 291, 291, 291, 291, 297, 15, 297, 11, - 297, 297, 297, 297, 298, 0, 298, 0, 298, 298, - 298, 298, 300, 0, 300, 0, 300, 300, 300, 300, - 302, 302, 302, 302, 304, 304, 304, 304, 305, 305, - - 305, 305, 306, 306, 306, 306, 308, 308, 308, 308, - 310, 310, 310, 310, 312, 0, 312, 0, 312, 312, - 312, 312, 313, 0, 313, 0, 313, 313, 313, 313, - 0, 0, 314, 0, 314, 313, 314, 314, 314, 314, - 312, 315, 315, 315, 315, 316, 316, 316, 316, 317, - 317, 317, 317, 318, 318, 318, 318, 745, 314, 0, - 313, 319, 319, 319, 319, 312, 320, 320, 320, 320, - 321, 321, 321, 321, 322, 322, 322, 322, 323, 323, - 323, 323, 745, 314, 324, 324, 324, 324, 330, 330, - 333, 333, 333, 333, 332, 332, 330, 746, 330, 749, - - 330, 330, 330, 330, 331, 331, 332, 332, 332, 332, - 0, 0, 331, 0, 331, 0, 331, 331, 331, 331, - 0, 334, 746, 334, 749, 334, 334, 334, 334, 335, - 0, 335, 647, 335, 335, 335, 335, 752, 336, 334, - 336, 754, 336, 336, 336, 336, 346, 346, 346, 346, - 337, 0, 337, 647, 337, 337, 337, 337, 335, 755, - 758, 337, 752, 330, 334, 337, 754, 0, 0, 332, - 338, 778, 338, 336, 338, 338, 338, 338, 647, 331, - 339, 0, 335, 338, 755, 758, 337, 339, 761, 339, - 337, 339, 339, 339, 339, 778, 340, 336, 340, 0, - - 340, 340, 340, 340, 0, 341, 647, 341, 338, 341, - 341, 341, 341, 761, 342, 340, 342, 762, 342, 342, - 342, 342, 343, 0, 343, 0, 343, 343, 343, 343, - 350, 350, 350, 350, 341, 343, 766, 342, 0, 345, - 340, 345, 762, 345, 345, 345, 345, 360, 360, 360, - 360, 0, 0, 0, 339, 767, 767, 0, 341, 0, - 343, 766, 342, 345, 347, 768, 347, 0, 347, 347, - 347, 347, 348, 772, 348, 776, 348, 348, 348, 348, - 349, 349, 364, 364, 364, 364, 347, 0, 345, 0, - 768, 0, 349, 349, 349, 349, 0, 782, 772, 351, - - 776, 351, 348, 351, 351, 351, 351, 0, 352, 0, - 352, 347, 352, 352, 352, 352, 365, 365, 365, 365, - 783, 352, 782, 359, 359, 352, 348, 353, 351, 353, - 767, 353, 353, 353, 353, 359, 359, 359, 359, 0, - 0, 0, 353, 0, 769, 783, 352, 0, 784, 0, - 352, 0, 351, 769, 354, 349, 354, 0, 354, 354, - 354, 354, 0, 682, 355, 354, 355, 353, 355, 355, - 355, 355, 356, 784, 356, 0, 356, 356, 356, 356, - 366, 366, 366, 366, 682, 0, 355, 357, 0, 357, - 354, 357, 357, 357, 357, 358, 0, 358, 359, 358, - - 358, 358, 358, 356, 384, 384, 384, 384, 0, 682, - 361, 355, 361, 357, 361, 361, 361, 361, 769, 0, - 358, 385, 385, 385, 385, 0, 358, 356, 362, 0, - 362, 785, 362, 362, 362, 362, 0, 682, 357, 713, - 785, 361, 363, 0, 363, 358, 363, 363, 363, 363, - 358, 373, 786, 373, 0, 373, 373, 373, 373, 0, - 713, 786, 374, 0, 374, 361, 374, 374, 374, 374, - 386, 386, 386, 386, 0, 373, 374, 375, 0, 375, - 0, 375, 375, 375, 375, 713, 376, 0, 376, 0, - 376, 376, 376, 376, 391, 391, 391, 391, 0, 0, - - 373, 374, 376, 0, 377, 785, 377, 0, 377, 377, - 377, 377, 378, 713, 378, 0, 378, 378, 378, 378, - 392, 392, 392, 392, 0, 0, 786, 376, 377, 0, - 0, 379, 0, 379, 378, 379, 379, 379, 379, 380, - 0, 380, 0, 380, 380, 380, 380, 379, 0, 0, - 381, 0, 381, 377, 381, 381, 381, 381, 0, 378, - 393, 393, 393, 393, 0, 380, 0, 0, 0, 381, - 0, 382, 379, 382, 0, 382, 382, 382, 382, 383, - 0, 383, 0, 383, 383, 383, 383, 747, 0, 0, - 380, 389, 0, 389, 381, 389, 389, 389, 389, 390, - - 0, 390, 0, 390, 390, 390, 390, 396, 747, 396, - 0, 396, 396, 396, 396, 397, 0, 397, 0, 397, - 397, 397, 397, 398, 0, 398, 0, 398, 398, 398, - 398, 0, 0, 747, 399, 0, 399, 397, 399, 399, - 399, 399, 396, 0, 400, 398, 400, 0, 400, 400, - 400, 400, 401, 401, 401, 401, 402, 402, 402, 402, - 0, 747, 397, 404, 404, 0, 396, 0, 0, 0, - 398, 403, 403, 403, 403, 404, 404, 404, 404, 405, - 405, 405, 405, 406, 406, 407, 407, 407, 407, 408, - 408, 408, 408, 0, 0, 406, 406, 406, 406, 410, - - 410, 410, 410, 411, 0, 411, 0, 411, 411, 411, - 411, 412, 417, 412, 0, 412, 412, 412, 412, 413, - 414, 413, 0, 413, 413, 413, 413, 414, 411, 414, - 0, 414, 414, 414, 414, 417, 0, 0, 404, 0, - 0, 412, 415, 415, 415, 417, 415, 415, 415, 415, - 416, 0, 416, 411, 416, 416, 416, 416, 406, 0, - 417, 418, 418, 418, 418, 412, 0, 419, 0, 419, - 417, 419, 419, 419, 419, 0, 0, 420, 0, 420, - 416, 420, 420, 420, 420, 0, 417, 0, 421, 421, - 0, 0, 420, 0, 414, 419, 421, 0, 421, 0, - - 421, 421, 421, 421, 416, 422, 0, 422, 0, 422, - 422, 422, 422, 0, 0, 0, 425, 420, 425, 419, - 425, 425, 425, 425, 426, 426, 426, 426, 429, 429, - 429, 429, 0, 0, 427, 422, 427, 0, 427, 427, - 427, 427, 0, 428, 0, 428, 425, 428, 428, 428, - 428, 0, 0, 0, 428, 431, 431, 431, 431, 422, - 0, 432, 432, 421, 0, 427, 0, 0, 0, 432, - 425, 432, 0, 432, 432, 432, 432, 0, 433, 428, - 433, 0, 433, 433, 433, 433, 0, 0, 0, 427, - 0, 0, 434, 433, 434, 0, 434, 434, 434, 434, - - 435, 0, 435, 0, 435, 435, 435, 435, 439, 0, - 439, 0, 439, 439, 439, 439, 435, 436, 433, 436, - 434, 436, 436, 436, 436, 0, 437, 0, 437, 0, - 437, 437, 437, 437, 0, 0, 432, 437, 0, 0, - 0, 435, 0, 0, 434, 436, 438, 0, 438, 0, - 438, 438, 438, 438, 440, 0, 440, 0, 440, 440, - 440, 440, 437, 441, 441, 442, 442, 442, 442, 436, - 0, 441, 0, 441, 438, 441, 441, 441, 441, 444, - 444, 444, 444, 0, 445, 440, 445, 0, 445, 445, - 445, 445, 457, 457, 457, 457, 0, 0, 438, 445, - - 446, 0, 446, 0, 446, 446, 446, 446, 447, 440, - 447, 0, 447, 447, 447, 447, 448, 0, 448, 446, - 448, 448, 448, 448, 445, 0, 449, 447, 449, 0, - 449, 449, 449, 449, 0, 448, 0, 0, 441, 459, - 459, 459, 459, 450, 446, 450, 0, 450, 450, 450, - 450, 0, 447, 0, 450, 0, 449, 451, 0, 451, - 448, 451, 451, 451, 451, 452, 0, 452, 0, 452, - 452, 452, 452, 0, 0, 0, 451, 0, 0, 450, - 449, 453, 0, 453, 0, 453, 453, 453, 453, 0, - 454, 0, 454, 452, 454, 454, 454, 454, 0, 0, - - 455, 451, 455, 453, 455, 455, 455, 455, 456, 0, - 456, 0, 456, 456, 456, 456, 0, 452, 0, 456, - 460, 460, 460, 460, 462, 462, 462, 462, 453, 0, - 464, 455, 464, 0, 464, 464, 464, 464, 0, 0, - 0, 465, 0, 465, 456, 465, 465, 465, 465, 0, - 0, 0, 465, 0, 0, 455, 0, 0, 464, 467, - 467, 467, 467, 468, 0, 468, 0, 468, 468, 468, - 468, 473, 473, 473, 473, 0, 468, 465, 477, 477, - 477, 477, 464, 469, 0, 469, 468, 469, 469, 469, - 469, 0, 0, 474, 0, 474, 468, 474, 474, 474, - - 474, 468, 475, 475, 486, 486, 486, 486, 0, 0, - 475, 468, 475, 0, 475, 475, 475, 475, 474, 0, - 468, 476, 476, 478, 0, 478, 0, 478, 478, 478, - 478, 0, 0, 476, 476, 476, 476, 498, 498, 498, - 498, 0, 478, 474, 481, 0, 481, 0, 481, 481, - 481, 481, 482, 0, 482, 0, 482, 482, 482, 482, - 0, 0, 0, 481, 0, 0, 482, 478, 483, 0, - 483, 0, 483, 483, 483, 483, 0, 475, 0, 0, - 485, 485, 517, 517, 517, 517, 0, 0, 481, 0, - 483, 482, 485, 485, 485, 485, 476, 487, 0, 487, - - 0, 487, 487, 487, 487, 527, 527, 527, 527, 0, - 0, 487, 488, 0, 488, 483, 488, 488, 488, 488, - 0, 0, 0, 488, 0, 489, 487, 489, 0, 489, - 489, 489, 489, 490, 0, 490, 487, 490, 490, 490, - 490, 0, 0, 0, 489, 0, 0, 0, 488, 0, - 487, 0, 0, 0, 490, 485, 0, 491, 0, 491, - 0, 491, 491, 491, 491, 528, 528, 528, 528, 489, - 491, 492, 0, 492, 0, 492, 492, 492, 492, 490, - 493, 0, 493, 0, 493, 493, 493, 493, 0, 0, - 492, 0, 494, 0, 494, 491, 494, 494, 494, 494, - - 495, 0, 495, 0, 495, 495, 495, 495, 497, 497, - 0, 0, 496, 0, 496, 492, 496, 496, 496, 496, - 497, 497, 497, 497, 500, 500, 0, 0, 0, 496, - 0, 0, 500, 0, 500, 0, 500, 500, 500, 500, - 501, 0, 501, 0, 501, 501, 501, 501, 706, 706, - 0, 502, 0, 502, 496, 502, 502, 502, 502, 0, - 0, 500, 0, 503, 501, 503, 0, 503, 503, 503, - 503, 0, 504, 706, 504, 502, 504, 504, 504, 504, - 0, 0, 0, 497, 0, 500, 0, 0, 505, 501, - 505, 504, 505, 505, 505, 505, 0, 503, 706, 500, - - 502, 505, 506, 0, 506, 0, 506, 506, 506, 506, - 0, 0, 0, 507, 0, 507, 504, 507, 507, 507, - 507, 503, 0, 706, 0, 508, 505, 508, 507, 508, - 508, 508, 508, 509, 0, 509, 506, 509, 509, 509, - 509, 0, 0, 0, 508, 0, 0, 509, 0, 0, - 510, 0, 510, 507, 510, 510, 510, 510, 0, 0, - 506, 0, 0, 510, 530, 530, 530, 530, 0, 508, - 0, 513, 509, 513, 0, 513, 513, 513, 513, 514, - 0, 514, 0, 514, 514, 514, 514, 518, 510, 518, - 0, 518, 518, 518, 518, 519, 0, 519, 0, 519, - - 519, 519, 519, 514, 520, 0, 520, 0, 520, 520, - 520, 520, 518, 536, 536, 536, 536, 525, 0, 525, - 519, 525, 525, 525, 525, 0, 0, 0, 514, 0, - 0, 0, 520, 0, 526, 526, 0, 518, 0, 0, - 0, 525, 0, 0, 0, 519, 526, 526, 526, 526, - 0, 0, 0, 531, 0, 531, 520, 531, 531, 531, - 531, 0, 0, 533, 0, 533, 525, 533, 533, 533, - 533, 538, 538, 538, 538, 0, 0, 0, 531, 533, - 534, 0, 534, 0, 534, 534, 534, 534, 550, 550, - 550, 550, 535, 0, 535, 534, 535, 535, 535, 535, - - 0, 0, 0, 531, 533, 0, 539, 0, 539, 526, - 539, 539, 539, 539, 535, 0, 0, 540, 0, 540, - 534, 540, 540, 540, 540, 541, 0, 541, 0, 541, - 541, 541, 541, 0, 0, 0, 542, 539, 542, 535, - 542, 542, 542, 542, 0, 543, 540, 543, 541, 543, - 543, 543, 543, 552, 552, 552, 552, 0, 0, 0, - 542, 539, 544, 0, 544, 0, 544, 544, 544, 544, - 540, 0, 0, 541, 543, 0, 545, 544, 545, 0, - 545, 545, 545, 545, 0, 542, 549, 0, 549, 0, - 549, 549, 549, 549, 0, 553, 553, 0, 543, 0, - - 0, 0, 544, 0, 549, 0, 545, 553, 553, 553, - 553, 554, 554, 555, 555, 555, 555, 0, 0, 554, - 0, 554, 0, 554, 554, 554, 554, 0, 0, 549, - 545, 556, 0, 556, 0, 556, 556, 556, 556, 557, - 0, 557, 0, 557, 557, 557, 557, 558, 556, 558, - 0, 558, 558, 558, 558, 559, 557, 559, 0, 559, - 559, 559, 559, 0, 0, 0, 558, 0, 0, 0, - 553, 0, 0, 556, 575, 575, 575, 575, 560, 559, - 560, 557, 560, 560, 560, 560, 554, 0, 561, 0, - 561, 558, 561, 561, 561, 561, 562, 560, 562, 0, - - 562, 562, 562, 562, 559, 0, 563, 561, 563, 0, - 563, 563, 563, 563, 564, 0, 564, 0, 564, 564, - 564, 564, 560, 0, 0, 562, 0, 0, 0, 564, - 563, 565, 561, 565, 0, 565, 565, 565, 565, 577, - 577, 577, 577, 0, 0, 0, 565, 0, 0, 562, - 594, 594, 594, 594, 564, 563, 566, 0, 566, 0, - 566, 566, 566, 566, 597, 597, 597, 597, 569, 0, - 569, 565, 569, 569, 569, 569, 570, 0, 570, 0, - 570, 570, 570, 570, 0, 0, 566, 0, 0, 0, - 570, 569, 571, 0, 571, 0, 571, 571, 571, 571, - - 574, 0, 574, 0, 574, 574, 574, 574, 0, 0, - 566, 571, 0, 0, 0, 570, 569, 0, 0, 0, - 579, 0, 579, 574, 579, 579, 579, 579, 581, 0, - 581, 0, 581, 581, 581, 581, 571, 598, 598, 598, - 598, 0, 0, 0, 579, 0, 0, 581, 574, 582, - 0, 582, 0, 582, 582, 582, 582, 583, 0, 583, - 0, 583, 583, 583, 583, 0, 0, 0, 583, 579, - 0, 585, 581, 585, 0, 585, 585, 585, 585, 586, - 0, 586, 0, 586, 586, 586, 586, 0, 0, 0, - 587, 587, 587, 583, 587, 587, 587, 587, 588, 585, - - 588, 0, 588, 588, 588, 588, 627, 627, 627, 627, - 589, 0, 589, 588, 589, 589, 589, 589, 0, 0, - 590, 0, 590, 585, 590, 590, 590, 590, 591, 0, - 591, 0, 591, 591, 591, 591, 592, 592, 588, 0, - 596, 596, 0, 0, 592, 0, 592, 0, 592, 592, - 592, 592, 596, 596, 596, 596, 631, 631, 631, 631, - 599, 0, 599, 591, 599, 599, 599, 599, 600, 0, - 600, 0, 600, 600, 600, 600, 601, 0, 601, 0, - 601, 601, 601, 601, 602, 0, 602, 591, 602, 602, - 602, 602, 603, 0, 603, 0, 603, 603, 603, 603, - - 601, 602, 0, 604, 0, 604, 0, 604, 604, 604, - 604, 592, 0, 0, 0, 596, 603, 605, 0, 605, - 0, 605, 605, 605, 605, 601, 602, 604, 0, 0, - 606, 0, 606, 0, 606, 606, 606, 606, 607, 0, - 607, 603, 607, 607, 607, 607, 605, 606, 0, 608, - 0, 608, 604, 608, 608, 608, 608, 639, 639, 639, - 639, 609, 609, 649, 649, 649, 649, 0, 0, 609, - 605, 609, 606, 609, 609, 609, 609, 611, 0, 611, - 0, 611, 611, 611, 611, 612, 0, 612, 0, 612, - 612, 612, 612, 613, 0, 613, 0, 613, 613, 613, - - 613, 0, 0, 611, 612, 616, 0, 616, 0, 616, - 616, 616, 616, 656, 656, 656, 656, 0, 0, 0, - 616, 0, 0, 613, 0, 0, 618, 0, 611, 612, - 0, 0, 0, 618, 618, 618, 609, 618, 618, 618, - 618, 0, 0, 0, 620, 616, 620, 613, 620, 620, - 620, 620, 0, 0, 621, 0, 621, 620, 621, 621, - 621, 621, 622, 0, 622, 0, 622, 622, 622, 622, - 658, 658, 658, 658, 623, 0, 623, 622, 623, 623, - 623, 623, 620, 624, 621, 624, 0, 624, 624, 624, - 624, 0, 625, 623, 625, 0, 625, 625, 625, 625, - - 618, 0, 622, 663, 663, 663, 663, 0, 621, 626, - 626, 0, 624, 629, 629, 0, 0, 0, 623, 0, - 0, 626, 626, 626, 626, 629, 629, 629, 629, 667, - 667, 667, 667, 632, 0, 632, 624, 632, 632, 632, - 632, 633, 0, 633, 0, 633, 633, 633, 633, 634, - 632, 634, 0, 634, 634, 634, 634, 635, 0, 635, - 0, 635, 635, 635, 635, 636, 634, 636, 0, 636, - 636, 636, 636, 0, 635, 632, 637, 0, 637, 0, - 637, 637, 637, 637, 626, 0, 0, 0, 629, 638, - 638, 634, 678, 678, 678, 678, 0, 0, 0, 635, - - 0, 638, 638, 638, 638, 641, 0, 641, 0, 641, - 641, 641, 641, 642, 638, 642, 638, 642, 642, 642, - 642, 643, 0, 643, 641, 643, 643, 643, 643, 642, - 0, 646, 0, 646, 0, 646, 646, 646, 646, 638, - 648, 638, 648, 0, 648, 648, 648, 648, 0, 641, - 0, 643, 0, 0, 642, 646, 651, 0, 651, 648, - 651, 651, 651, 651, 638, 0, 652, 651, 652, 0, - 652, 652, 652, 652, 0, 643, 683, 683, 683, 683, - 646, 0, 653, 0, 648, 652, 0, 0, 0, 653, - 0, 653, 651, 653, 653, 653, 653, 654, 0, 654, - - 0, 654, 654, 654, 654, 704, 704, 704, 704, 0, - 652, 654, 655, 0, 655, 0, 655, 655, 655, 655, - 660, 0, 660, 0, 660, 660, 660, 660, 661, 0, - 661, 0, 661, 661, 661, 661, 654, 662, 0, 662, - 0, 662, 662, 662, 662, 669, 0, 669, 0, 669, - 669, 669, 669, 670, 0, 670, 653, 670, 670, 670, - 670, 0, 0, 0, 671, 0, 671, 669, 671, 671, - 671, 671, 670, 0, 0, 0, 674, 0, 674, 671, - 674, 674, 674, 674, 677, 0, 677, 0, 677, 677, - 677, 677, 669, 714, 714, 714, 714, 670, 677, 731, - - 731, 731, 731, 680, 671, 680, 674, 680, 680, 680, - 680, 681, 0, 681, 0, 681, 681, 681, 681, 0, - 684, 0, 684, 677, 684, 684, 684, 684, 0, 0, - 674, 0, 0, 680, 0, 690, 681, 690, 0, 690, - 690, 690, 690, 748, 748, 748, 748, 691, 0, 691, - 690, 691, 691, 691, 691, 0, 0, 680, 0, 0, - 0, 681, 691, 0, 692, 695, 692, 0, 692, 692, - 692, 692, 695, 0, 695, 690, 695, 695, 695, 695, - 757, 757, 757, 757, 0, 0, 0, 691, 692, 698, - 0, 698, 0, 698, 698, 698, 698, 700, 0, 700, - - 0, 700, 700, 700, 700, 701, 0, 701, 0, 701, - 701, 701, 701, 692, 0, 0, 700, 709, 0, 709, - 0, 709, 709, 709, 709, 0, 0, 0, 710, 701, - 710, 709, 710, 710, 710, 710, 0, 0, 0, 695, - 0, 700, 710, 711, 0, 711, 0, 711, 711, 711, - 711, 0, 0, 719, 701, 719, 709, 719, 719, 719, - 719, 0, 0, 0, 720, 0, 720, 710, 720, 720, - 720, 720, 0, 0, 0, 727, 0, 727, 719, 727, - 727, 727, 727, 728, 0, 728, 0, 728, 728, 728, - 728, 734, 0, 734, 0, 734, 734, 734, 734, 741, - - 0, 0, 0, 719, 750, 750, 741, 0, 741, 0, - 741, 741, 741, 741, 0, 734, 750, 750, 750, 750, - 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, - 0, 0, 0, 0, 0, 0, 774, 774, 774, 774, - 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 741, 0, 0, 0, 0, 0, 750, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 774, - - 791, 791, 791, 792, 0, 792, 793, 0, 793, 795, - 0, 795, 796, 0, 796, 797, 0, 797, 798, 0, - 798, 799, 0, 799, 800, 0, 800, 801, 0, 801, - 803, 0, 803, 804, 0, 804, 806, 0, 806, 807, - 0, 807, 809, 0, 809, 810, 0, 810, 811, 0, - 811, 812, 0, 812, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790 - } ; +struct yy_trans_info { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; +}; +static const flex_int16_t yy_accept[609] = { + 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 100, 98, 73, 74, 98, 98, + 76, 77, 98, 98, 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 98, 98, 74, 12, 13, 93, 98, 16, 15, 16, 12, 13, 44, + 20, 21, 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, 44, 44, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 44, 44, 12, 13, 51, 45, 46, 51, 51, + 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, 51, 12, 13, 60, 55, 56, + + 60, 60, 60, 60, 60, 57, 60, 57, 60, 57, 57, 57, 57, 60, 60, 12, 13, + 74, 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, 95, 95, 0, 0, 74, 0, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 74, 93, 0, 12, 1, 13, 93, 16, 1, 12, 1, 13, + 21, 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, 0, 23, 36, 26, 27, 41, + 41, 28, 41, 41, 41, 41, 46, 0, 0, 50, 0, 0, 49, 45, 48, + + 48, 0, 0, 47, 56, 0, 0, 59, 0, 0, 58, 55, 57, 57, 0, 0, 57, + 57, 57, 1, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 0, 95, 0, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, + 95, 1, 1, 1, 41, 41, 29, 41, 41, 41, 41, 41, 41, 57, 57, 57, 0, + 0, 0, 0, 89, 0, 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, 95, 95, + 0, 0, 95, 95, 95, 80, 0, 95, 95, 95, 95, 95, 95, 95, 95, + + 95, 95, 92, 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 52, 57, 57, 82, + 0, 81, 0, 95, 95, 0, 0, 95, 69, 0, 0, 0, 95, 95, 0, 0, 95, + 0, 95, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 0, + 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, 62, 95, 0, 0, 95, + 95, 95, 69, 0, 0, 95, 0, 0, 91, 0, 95, 0, 95, 95, 95, 90, 0, + 95, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, 0, 0, 95, + + 0, 41, 41, 37, 41, 41, 38, 41, 41, 57, 57, 95, 0, 95, 95, 95, 0, + 0, 95, 85, 0, 95, 0, 95, 18, 95, 95, 14, 95, 95, 67, 19, 95, 95, + 78, 0, 0, 0, 35, 33, 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, 95, + 95, 95, 0, 0, 95, 95, 0, 95, 95, 95, 95, 95, 68, 0, 0, 79, 0, + 41, 31, 41, 41, 30, 34, 0, 0, 0, 95, 95, 95, 0, 0, 95, 0, 95, + 0, 0, 95, 95, 95, 95, 61, 83, 0, 39, 32, 40, 86, 0, 0, + + 0, 0, 95, 95, 95, 0, 0, 95, 0, 0, 95, 0, 95, 95, 0, 0, 5, + 0, 0, 0, 95, 95, 95, 0, 10, 95, 0, 6, 0, 95, 95, 0, 0, 0, + 0, 0, 0, 95, 95, 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, 0, 0, + 0, 8, 65, 64, 0, 0, 0, 95, 0, 0, 0, 0, 0, 95, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 9, 0, 0, 0, 0, 88, 7, + + 0, 0, 0, 0, 0, 2, 0, 0}; + +static const YY_CHAR yy_ec[256] = { + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, 14, 14, 14, 14, + 14, 1, 18, 1, 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 38, 47, 47, 47, 47, + 38, 47, 48, 49, 50, 51, + + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 38, 64, 65, 66, 67, 68, 69, + 70, 71, 38, 47, 47, 47, 47, 1, 47, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, + + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 1, 1, 1}; + +static const YY_CHAR yy_meta[75] = { + 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}; + +static const flex_int16_t yy_base[632] = { + 0, 0, 72, 74, 82, 144, 70, 218, 291, 364, 83, 871, + 3699, 3699, 241, 866, 858, 3699, 3699, 839, 87, 243, 252, 95, + 260, 245, 429, 67, 436, 432, 446, 473, 501, 517, 512, 539, + 532, 545, 609, 617, 268, 831, 0, 586, 625, 0, 3699, 829, + 808, 0, 3699, 3699, 246, 808, 787, 3699, 3699, 771, 103, 651, + 633, 111, 659, 248, 755, 276, 487, 645, 667, 671, 674, 677, + 681, 684, 699, 703, 748, 767, 753, 0, 3699, 3699, 249, 764, + 747, 717, 119, 784, 792, 340, 801, 448, 715, 717, 810, 822, + 699, 0, 3699, 3699, 251, + + 710, 698, 679, 449, 838, 865, 873, 881, 471, 832, 850, 889, + 899, 918, 931, 677, 0, 258, 671, 676, 3699, 646, 0, 903, + 965, 3699, 270, 601, 835, 973, 981, 989, 275, 589, 997, 1001, + 1012, 1006, 1025, 1009, 1028, 1051, 1031, 1055, 1077, 1096, 1101, 1127, + 1104, 1108, 1150, 1083, 1122, 1133, 1155, 1130, 475, 226, 571, 0, + 0, 0, 1176, 0, 0, 0, 0, 0, 286, 565, 579, 3699, + 577, 1202, 1219, 3699, 1173, 1227, 1240, 1248, 3699, 1199, 1220, 1256, + 1264, 1267, 1270, 1278, 1295, 1334, 1300, 442, 554, 568, 3699, 565, + 1364, 1374, 3699, 1291, + + 1384, 1398, 1406, 3699, 444, 513, 527, 3699, 512, 1414, 1422, 3699, + 1392, 1432, 1456, 1464, 1423, 1477, 1451, 0, 1480, 1496, 953, 1518, + 1490, 1506, 1510, 1532, 1549, 1440, 1545, 1554, 1564, 1578, 481, 1581, + 1645, 1575, 1597, 1629, 1661, 1655, 1669, 1673, 1676, 1679, 1690, 1693, + 1697, 1758, 1766, 1725, 0, 0, 0, 1774, 1743, 1778, 1781, 1791, + 1800, 1795, 1807, 1813, 1819, 1828, 1845, 1879, 1895, 1911, 1919, 312, + 466, 1887, 1909, 1865, 1912, 1933, 1929, 698, 1957, 1951, 1936, 1977, + 1945, 68, 455, 1981, 1984, 1988, 320, 449, 2017, 2020, 2002, 2025, + 2030, 2033, 2052, 2067, + + 2075, 2097, 329, 446, 2100, 2058, 2103, 2108, 2055, 2131, 2144, 2122, + 2125, 2134, 2173, 2177, 345, 434, 563, 431, 2180, 2199, 961, 2212, + 2224, 2208, 39, 77, 422, 2227, 2252, 2288, 2296, 2265, 213, 2306, + 2276, 2282, 2317, 2353, 2332, 2318, 2346, 2341, 2335, 2365, 2370, 2374, + 2382, 2399, 2414, 2446, 2438, 2424, 2454, 2463, 2458, 2467, 2471, 2480, + 2489, 2495, 2513, 2492, 2537, 419, 419, 2544, 2559, 2563, 3699, 418, + 424, 2547, 2574, 2627, 592, 332, 2587, 498, 2603, 2614, 2595, 599, + 330, 2591, 2640, 2635, 2643, 2660, 2667, 2679, 3699, 3699, 3699, 2682, + 943, 310, 2707, 2724, + + 2746, 2718, 2731, 2738, 2754, 2765, 2768, 2774, 2771, 2761, 2790, 2795, + 271, 2818, 2841, 2844, 545, 616, 2838, 1269, 301, 2810, 417, 2847, + 2807, 2874, 2863, 2877, 2883, 2889, 2894, 2897, 2911, 2922, 1302, 298, + 2928, 2964, 2916, 2941, 2961, 2981, 2989, 2994, 2998, 3011, 2953, 3005, + 3034, 622, 3031, 3018, 3039, 459, 471, 3046, 3076, 632, 3085, 3089, + 3098, 3103, 3113, 3110, 3124, 3177, 3129, 266, 3153, 3142, 3156, 3162, + 3167, 3185, 3216, 3238, 483, 3211, 3190, 3235, 652, 668, 3226, 1459, + 3256, 3279, 659, 3270, 3267, 3201, 3294, 3259, 1310, 259, 3299, 3303, + 3310, 1338, 665, 523, + + 258, 682, 3315, 3323, 3326, 686, 759, 3339, 767, 242, 3334, 768, + 3348, 3374, 1466, 3412, 3344, 799, 864, 810, 3382, 3392, 3358, 823, + 3699, 3429, 617, 3403, 527, 3433, 3425, 838, 122, 853, 1107, 121, + 865, 3441, 3457, 3438, 3699, 1671, 3505, 884, 1005, 3699, 117, 3471, + 3462, 712, 954, 961, 3699, 3467, 3475, 993, 116, 745, 3515, 996, + 996, 995, 762, 1002, 3481, 838, 1311, 1019, 1036, 1069, 1786, 3545, + 1091, 3565, 111, 1160, 866, 1163, 1191, 109, 1234, 1596, 1276, 1291, + 1353, 906, 1296, 1523, 1297, 1548, 3699, 101, 1319, 3699, 3569, 93, + 1331, 994, 1699, 3699, + + 1339, 1341, 1350, 1646, 1728, 3699, 87, 3699, 3641, 3644, 3647, 3650, + 97, 3653, 3656, 3659, 3662, 3665, 3668, 3671, 91, 3674, 3677, 90, + 3680, 3683, 89, 3686, 3689, 3692, 3695}; + +static const flex_int16_t yy_def[632] = { + 0, 608, 1, 609, 609, 608, 5, 610, 610, 608, 9, 608, 608, 608, 608, + 611, 612, 608, 608, 608, 608, 608, 613, 608, 613, 608, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 614, 615, 613, 613, + 616, 608, 616, 617, 618, 608, 608, 608, 619, 620, 608, 608, 608, 608, 608, + 621, 608, 621, 608, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 621, 621, 614, 615, 608, 608, 608, 622, 623, 608, 608, 608, 624, 608, + 624, 608, 608, 624, 624, 624, 614, 615, 608, 608, 608, + + 625, 626, 608, 608, 608, 627, 608, 627, 608, 627, 627, 627, 627, 627, 627, + 614, 615, 608, 608, 611, 608, 612, 628, 608, 608, 608, 608, 608, 613, 613, + 613, 613, 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 608, 608, 614, + 629, 615, 613, 616, 630, 617, 631, 618, 608, 608, 619, 608, 620, 608, 608, + 608, 621, 621, 621, 621, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 608, 608, 622, 608, 623, 608, 608, 608, 624, + + 624, 624, 624, 608, 608, 608, 625, 608, 626, 608, 608, 608, 627, 627, 627, + 627, 627, 627, 627, 628, 613, 613, 608, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 608, 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 608, 613, 613, 629, 630, 631, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 627, 627, 627, 608, 613, 608, 613, 608, 608, 613, 613, + 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, 608, 608, 613, 613, 613, + 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, + + 613, 613, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, + 627, 608, 608, 608, 608, 613, 613, 608, 613, 613, 613, 608, 608, 608, 613, + 613, 608, 613, 613, 608, 613, 613, 613, 608, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 608, 613, 613, 621, 621, 621, 621, 621, 621, 621, + 621, 627, 627, 613, 613, 608, 608, 613, 613, 613, 608, 608, 608, 613, 608, + 613, 608, 608, 613, 608, 613, 613, 613, 608, 608, 613, 613, 613, 613, 613, + 613, 613, 608, 608, 608, 613, 608, 608, 608, 613, + + 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, 613, 608, 613, 613, + 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 608, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, + 621, 627, 627, 613, 608, 613, 613, 613, 608, 608, 613, 613, 608, 613, 613, + 613, 613, 613, 613, 608, 613, 608, 608, 621, 621, 621, 621, 621, 621, 608, + 613, 608, 613, 613, 613, 608, 608, 613, 608, 613, 613, 608, 613, 613, 613, + 613, 613, 608, 608, 621, 621, 621, 608, 608, 608, + + 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 608, + 613, 613, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 613, 608, 613, + 613, 608, 608, 608, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, + 608, 608, 613, 613, 608, 608, 608, 608, 613, 613, 608, 608, 608, 613, 608, + 608, 608, 608, 608, 613, 608, 608, 608, 608, 608, 608, 613, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608}; + +static const flex_int16_t yy_nxt[3774] = { + 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12, 24, + 24, 24, 24, 25, 12, 12, 12, 26, 27, 28, 29, 30, 31, 27, 27, + 32, 27, 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, 27, 37, 27, + 27, 27, 12, 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, 27, 27, + 27, 27, 27, 33, 34, 35, 36, 27, 37, 27, 27, 27, 38, 39, 27, + 40, 46, 608, 78, 608, 41, 372, 47, 79, 46, 42, 43, 43, 43, 43, + 48, 116, 213, 200, 177, 49, 117, 124, 335, 124, 129, + + 125, 125, 125, 125, 124, 372, 124, 605, 125, 125, 125, 125, 174, 595, 174, + 373, 175, 175, 175, 175, 174, 590, 174, 335, 175, 175, 175, 175, 197, 571, + 197, 574, 198, 198, 198, 198, 542, 545, 131, 132, 373, 535, 515, 44, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 50, 62, 62, 62, + 62, 63, 64, 50, 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, 69, + 67, 70, 67, 67, 71, 72, 67, 73, 74, 75, 67, 67, 67, 67, 67, + 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, + + 69, 67, 70, 67, 67, 71, 72, 73, 74, 75, 67, 67, 67, 67, 67, + 76, 77, 67, 80, 81, 82, 83, 84, 80, 80, 85, 86, 87, 88, 89, + 80, 90, 90, 90, 90, 91, 92, 80, 80, 158, 158, 158, 158, 118, 126, + 127, 126, 133, 169, 176, 169, 192, 124, 205, 124, 380, 125, 125, 125, 125, + 118, 124, 484, 124, 80, 130, 130, 130, 130, 124, 157, 124, 127, 130, 130, + 130, 130, 133, 475, 465, 380, 158, 158, 158, 158, 608, 437, 608, 169, 94, + 95, 80, 81, 82, 83, 84, 80, 80, 96, 86, + + 87, 88, 89, 97, 90, 90, 90, 90, 91, 92, 80, 80, 119, 450, 128, + 182, 134, 170, 399, 170, 193, 375, 206, 131, 132, 272, 272, 272, 272, 119, + 351, 131, 132, 291, 291, 291, 291, 80, 450, 159, 182, 128, 303, 303, 303, + 303, 134, 179, 180, 197, 339, 197, 332, 198, 198, 198, 198, 170, 317, 317, + 317, 317, 94, 95, 98, 99, 100, 101, 102, 98, 98, 103, 104, 105, 106, + 107, 98, 108, 108, 108, 108, 109, 98, 98, 98, 110, 110, 111, 110, 110, + 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, + + 110, 110, 113, 110, 110, 110, 110, 110, 110, 110, 98, 110, 110, 111, 110, + 110, 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, 110, 113, 110, 110, + 110, 110, 110, 110, 110, 114, 115, 110, 608, 323, 608, 608, 280, 608, 192, + 608, 205, 608, 413, 199, 192, 270, 417, 140, 268, 608, 458, 608, 210, 418, + 210, 135, 211, 211, 211, 211, 250, 136, 137, 240, 138, 139, 212, 205, 413, + 235, 141, 157, 417, 140, 142, 458, 608, 235, 608, 418, 223, 135, 158, 158, + 158, 158, 136, 137, 143, 138, 608, 139, 608, 481, + + 131, 132, 141, 131, 132, 286, 142, 131, 132, 482, 608, 144, 608, 193, 145, + 206, 208, 131, 132, 193, 143, 608, 502, 608, 481, 146, 608, 423, 608, 545, + 208, 286, 183, 205, 482, 147, 144, 151, 546, 145, 148, 608, 206, 608, 131, + 132, 159, 502, 608, 149, 608, 146, 287, 423, 608, 150, 608, 183, 179, 180, + 154, 147, 519, 151, 152, 148, 156, 155, 454, 195, 153, 195, 131, 132, 192, + 149, 319, 319, 319, 319, 150, 172, 172, 131, 132, 169, 154, 519, 131, 132, + 152, 157, 156, 155, 454, 124, 153, 124, 547, 163, + + 163, 163, 163, 131, 132, 377, 377, 377, 377, 133, 131, 132, 384, 384, 384, + 384, 131, 132, 608, 608, 608, 127, 608, 608, 608, 608, 608, 608, 608, 118, + 608, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 608, 174, 455, 174, + 157, 178, 178, 178, 178, 121, 477, 176, 169, 608, 129, 608, 131, 132, 544, + 174, 487, 174, 129, 175, 175, 175, 175, 174, 455, 174, 129, 178, 178, 178, + 178, 608, 477, 608, 121, 608, 506, 608, 608, 544, 608, 608, 487, 608, 507, + 608, 118, 608, 608, 512, 608, 161, 518, 123, 186, + + 280, 184, 208, 187, 179, 180, 185, 506, 608, 189, 608, 520, 608, 208, 608, + 507, 179, 180, 161, 188, 512, 524, 170, 518, 327, 186, 608, 184, 608, 187, + 179, 180, 185, 204, 328, 189, 123, 520, 179, 180, 190, 191, 179, 180, 188, + 179, 180, 524, 179, 180, 327, 195, 179, 180, 560, 179, 180, 608, 608, 608, + 328, 608, 608, 608, 608, 190, 191, 195, 169, 329, 179, 180, 161, 181, 179, + 180, 608, 608, 608, 560, 608, 608, 608, 608, 564, 199, 192, 177, 202, 203, + 123, 172, 525, 197, 177, 197, 527, 198, 198, 198, + + 198, 197, 529, 197, 569, 201, 201, 201, 201, 564, 197, 172, 197, 177, 201, + 201, 201, 201, 525, 608, 608, 608, 527, 608, 608, 608, 608, 167, 529, 569, + 192, 608, 608, 608, 534, 608, 608, 608, 608, 212, 205, 608, 200, 608, 608, + 537, 608, 210, 165, 210, 161, 211, 211, 211, 211, 193, 200, 541, 123, 608, + 534, 608, 121, 202, 203, 535, 535, 550, 200, 121, 608, 537, 202, 203, 210, + 551, 210, 573, 214, 214, 214, 214, 210, 541, 210, 217, 211, 211, 211, 211, + 210, 608, 210, 550, 214, 214, 214, 214, 608, 553, + + 608, 551, 573, 215, 216, 584, 131, 132, 608, 206, 608, 217, 124, 558, 124, + 608, 125, 125, 125, 125, 608, 215, 216, 218, 219, 553, 608, 608, 608, 608, + 584, 608, 608, 608, 608, 536, 215, 216, 205, 558, 608, 608, 608, 608, 608, + 608, 608, 608, 593, 218, 219, 213, 215, 216, 223, 223, 397, 397, 397, 397, + 215, 216, 608, 323, 213, 608, 272, 272, 272, 272, 215, 216, 608, 593, 124, + 561, 124, 213, 125, 125, 125, 125, 124, 608, 124, 366, 130, 130, 130, 130, + 608, 608, 608, 562, 608, 608, 608, 608, 608, 608, + + 608, 561, 608, 608, 608, 608, 608, 545, 608, 129, 608, 366, 608, 223, 223, + 608, 546, 608, 608, 562, 608, 608, 563, 608, 273, 566, 222, 129, 567, 221, + 568, 570, 367, 601, 608, 129, 608, 608, 608, 608, 608, 576, 608, 608, 131, + 132, 225, 608, 563, 228, 608, 566, 222, 229, 567, 221, 568, 570, 601, 226, + 608, 227, 608, 232, 608, 577, 608, 576, 131, 132, 608, 225, 131, 132, 228, + 230, 547, 131, 132, 229, 131, 132, 608, 224, 132, 226, 608, 227, 608, 232, + 233, 577, 608, 231, 608, 608, 131, 132, 235, 131, + + 132, 230, 131, 132, 578, 608, 247, 608, 535, 535, 608, 234, 608, 608, 608, + 608, 233, 608, 231, 608, 581, 236, 131, 132, 238, 608, 131, 132, 240, 240, + 578, 608, 247, 608, 552, 608, 608, 234, 608, 608, 239, 608, 608, 243, 608, + 242, 581, 236, 131, 132, 238, 248, 608, 608, 131, 132, 250, 250, 608, 608, + 552, 608, 252, 608, 608, 239, 608, 237, 132, 243, 242, 249, 131, 132, 244, + 131, 132, 248, 536, 131, 132, 583, 608, 245, 608, 124, 246, 124, 252, 163, + 163, 163, 163, 131, 132, 608, 249, 585, 241, 132, + + 244, 131, 132, 608, 131, 132, 608, 583, 608, 245, 608, 174, 246, 174, 608, + 175, 175, 175, 175, 608, 586, 131, 132, 585, 608, 608, 251, 132, 174, 608, + 174, 608, 175, 175, 175, 175, 174, 608, 174, 608, 178, 178, 178, 178, 179, + 180, 586, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 177, 587, 179, 180, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 420, 420, 420, 420, 177, 608, 257, 608, + 608, 179, 180, 256, 177, 587, 258, 608, 179, 180, + + 608, 608, 608, 259, 608, 608, 608, 260, 588, 608, 608, 608, 574, 574, 257, + 435, 435, 435, 435, 256, 589, 264, 258, 493, 493, 493, 493, 179, 180, 259, + 594, 261, 597, 260, 588, 179, 180, 608, 179, 180, 608, 179, 180, 608, 608, + 608, 589, 264, 598, 179, 180, 498, 498, 498, 498, 590, 594, 261, 597, 608, + 262, 608, 202, 203, 591, 600, 179, 180, 602, 608, 263, 179, 180, 197, 598, + 197, 603, 198, 198, 198, 198, 608, 575, 197, 604, 197, 262, 198, 198, 198, + 198, 600, 608, 197, 602, 197, 263, 201, 201, 201, + + 201, 608, 603, 608, 608, 179, 180, 608, 608, 608, 604, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 210, 592, 210, 200, 211, 211, 211, + 211, 210, 608, 210, 608, 211, 211, 211, 211, 608, 608, 210, 280, 210, 200, + 214, 214, 214, 214, 608, 608, 608, 200, 608, 608, 202, 203, 608, 608, 265, + 608, 484, 608, 215, 216, 608, 608, 608, 515, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 268, 268, 509, 213, 265, 608, 267, 608, 608, + 532, 608, 608, 608, 215, 216, 608, 270, 270, 608, + + 266, 608, 213, 215, 216, 608, 608, 608, 608, 509, 213, 281, 132, 267, 608, + 608, 532, 608, 274, 608, 608, 608, 215, 216, 595, 595, 266, 608, 608, 608, + 510, 608, 608, 608, 608, 608, 608, 533, 223, 608, 608, 608, 608, 608, 274, + 275, 608, 608, 215, 216, 590, 269, 132, 277, 608, 276, 608, 278, 608, 591, + 608, 131, 132, 608, 129, 608, 608, 271, 132, 608, 275, 608, 279, 608, 282, + 608, 608, 131, 132, 277, 276, 131, 132, 278, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 283, 596, 608, 608, 284, 279, 608, + + 282, 285, 608, 131, 132, 608, 608, 289, 608, 582, 582, 582, 582, 608, 608, + 288, 131, 132, 283, 592, 131, 132, 608, 284, 608, 131, 132, 285, 608, 608, + 240, 240, 608, 289, 608, 131, 132, 290, 608, 608, 608, 288, 291, 291, 291, + 291, 131, 132, 605, 131, 132, 608, 131, 132, 608, 608, 608, 606, 608, 608, + 608, 608, 290, 608, 608, 235, 608, 608, 131, 132, 608, 608, 608, 542, 608, + 608, 608, 608, 608, 608, 608, 240, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 129, 294, 608, 293, 556, 295, 297, 296, 608, + + 292, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 298, 599, 599, 599, + 599, 608, 607, 294, 293, 608, 556, 295, 297, 296, 608, 131, 132, 608, 300, + 605, 299, 301, 608, 608, 608, 608, 298, 302, 606, 131, 132, 557, 608, 131, + 132, 608, 131, 132, 608, 131, 132, 608, 608, 608, 300, 299, 608, 301, 250, + 250, 131, 132, 302, 131, 132, 305, 307, 131, 132, 608, 303, 303, 303, 303, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 250, 608, 571, 608, + 608, 305, 608, 307, 608, 608, 131, 132, 608, 607, + + 608, 608, 608, 608, 608, 608, 608, 308, 306, 608, 579, 608, 129, 608, 179, + 180, 608, 608, 608, 608, 608, 311, 608, 608, 608, 309, 608, 608, 608, 304, + 608, 608, 310, 308, 306, 608, 579, 608, 608, 608, 608, 608, 313, 312, 608, + 179, 180, 311, 608, 179, 180, 309, 179, 180, 608, 608, 608, 580, 310, 608, + 315, 608, 179, 180, 314, 608, 179, 180, 313, 312, 608, 179, 180, 608, 608, + 608, 608, 316, 179, 180, 268, 268, 608, 608, 179, 180, 315, 608, 608, 314, + 215, 216, 317, 317, 317, 317, 608, 608, 608, 215, + + 216, 608, 608, 316, 608, 608, 608, 608, 608, 608, 608, 608, 270, 270, 323, + 268, 215, 216, 608, 608, 608, 608, 321, 608, 319, 319, 319, 319, 608, 608, + 608, 608, 608, 608, 608, 608, 131, 132, 608, 270, 608, 129, 608, 325, 608, + 608, 608, 608, 321, 322, 318, 608, 608, 608, 608, 608, 608, 608, 131, 132, + 608, 331, 608, 608, 608, 129, 608, 608, 608, 326, 608, 608, 608, 608, 322, + 608, 608, 280, 332, 332, 131, 132, 320, 324, 132, 334, 608, 331, 608, 330, + 608, 608, 608, 608, 326, 608, 608, 608, 608, 608, + + 131, 132, 608, 129, 131, 132, 608, 131, 132, 338, 334, 608, 608, 608, 330, + 608, 131, 132, 339, 339, 608, 336, 131, 132, 608, 337, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 338, 608, 608, 608, 608, 342, 608, 608, 608, 608, + 341, 336, 608, 333, 132, 337, 343, 131, 132, 345, 131, 132, 608, 608, 131, + 132, 608, 608, 608, 608, 342, 608, 608, 344, 608, 608, 341, 608, 131, 132, + 608, 608, 343, 608, 608, 345, 347, 348, 349, 608, 608, 608, 354, 340, 132, + 346, 131, 132, 344, 608, 357, 131, 132, 351, 351, + + 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 608, 354, 608, + 346, 350, 608, 608, 608, 357, 608, 608, 131, 132, 353, 179, 180, 608, 179, + 180, 608, 355, 608, 608, 608, 608, 356, 131, 132, 608, 350, 608, 608, 608, + 608, 131, 132, 608, 608, 608, 353, 358, 608, 608, 608, 608, 361, 355, 608, + 360, 608, 608, 356, 608, 608, 608, 608, 352, 132, 608, 131, 132, 359, 179, + 180, 608, 608, 358, 179, 180, 608, 608, 361, 608, 360, 608, 608, 608, 608, + 608, 608, 608, 179, 180, 608, 179, 180, 363, 359, + + 608, 608, 179, 180, 608, 215, 216, 608, 608, 608, 608, 608, 608, 608, 362, + 179, 180, 608, 364, 371, 365, 608, 608, 608, 363, 608, 608, 608, 608, 608, + 608, 608, 323, 608, 608, 608, 608, 608, 608, 362, 608, 608, 608, 364, 215, + 216, 365, 368, 215, 216, 608, 131, 132, 375, 375, 608, 608, 369, 129, 608, + 608, 608, 374, 608, 608, 608, 608, 370, 608, 608, 131, 132, 608, 368, 608, + 608, 608, 608, 608, 131, 132, 608, 608, 369, 608, 608, 608, 608, 374, 332, + 332, 608, 370, 608, 379, 131, 132, 608, 131, 132, + + 382, 377, 377, 377, 377, 608, 608, 608, 608, 608, 608, 608, 608, 608, 383, + 608, 332, 608, 339, 339, 379, 608, 608, 376, 132, 608, 382, 608, 608, 608, + 384, 384, 384, 384, 608, 381, 131, 132, 608, 388, 383, 608, 129, 608, 608, + 608, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, 386, 608, 391, 378, + 608, 381, 608, 608, 608, 388, 608, 608, 608, 608, 608, 387, 390, 339, 608, + 389, 608, 131, 132, 608, 608, 393, 386, 608, 391, 394, 608, 608, 385, 131, + 132, 608, 608, 395, 392, 608, 387, 608, 390, 129, + + 608, 389, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, + 351, 351, 131, 132, 608, 392, 608, 608, 608, 608, 608, 396, 397, 397, 397, + 397, 608, 608, 608, 608, 608, 131, 132, 608, 399, 399, 131, 132, 608, 608, + 131, 132, 608, 608, 608, 608, 608, 396, 131, 132, 608, 608, 608, 402, 608, + 608, 608, 608, 608, 608, 608, 351, 608, 608, 608, 131, 132, 608, 608, 608, + 608, 608, 400, 608, 608, 608, 608, 608, 608, 402, 398, 608, 405, 403, 608, + 406, 608, 129, 608, 608, 179, 180, 608, 608, 608, + + 608, 608, 400, 608, 608, 408, 608, 404, 608, 401, 132, 608, 608, 405, 403, + 407, 406, 608, 409, 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 179, + 180, 408, 404, 608, 179, 180, 411, 608, 179, 180, 407, 608, 179, 180, 409, + 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 608, 608, 608, 608, 608, + 179, 180, 411, 131, 132, 608, 215, 216, 608, 608, 608, 412, 608, 608, 608, + 375, 375, 608, 608, 414, 608, 419, 608, 608, 215, 216, 608, 420, 420, 420, + 420, 608, 608, 608, 415, 608, 608, 412, 608, 608, + + 608, 416, 608, 608, 608, 414, 608, 419, 131, 132, 608, 608, 608, 608, 608, + 131, 132, 608, 131, 132, 415, 608, 422, 608, 608, 608, 416, 426, 608, 424, + 131, 132, 427, 608, 131, 132, 608, 608, 608, 425, 608, 608, 608, 608, 608, + 421, 608, 375, 422, 608, 608, 608, 608, 426, 608, 424, 608, 427, 131, 132, + 608, 608, 131, 132, 608, 425, 131, 132, 429, 608, 608, 608, 608, 129, 131, + 132, 608, 430, 608, 428, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, + 608, 608, 432, 608, 429, 608, 608, 608, 608, 431, + + 608, 608, 608, 430, 428, 608, 131, 132, 399, 399, 434, 131, 132, 608, 131, + 132, 608, 608, 432, 433, 435, 435, 435, 435, 431, 437, 437, 608, 608, 608, + 608, 131, 132, 608, 608, 608, 434, 608, 131, 132, 608, 608, 608, 608, 433, + 439, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 440, 608, + 608, 608, 608, 608, 608, 608, 399, 441, 608, 608, 608, 439, 608, 608, 608, + 608, 608, 608, 436, 608, 608, 608, 608, 608, 440, 608, 447, 608, 442, 179, + 180, 608, 129, 441, 443, 438, 132, 444, 608, 608, + + 608, 608, 179, 180, 608, 446, 608, 608, 608, 179, 180, 608, 447, 445, 442, + 448, 608, 608, 608, 608, 443, 608, 608, 444, 608, 179, 180, 608, 608, 608, + 608, 446, 215, 216, 608, 449, 179, 180, 445, 179, 180, 448, 179, 180, 457, + 179, 180, 608, 608, 608, 608, 451, 608, 608, 608, 608, 608, 608, 608, 608, + 449, 215, 216, 608, 608, 452, 131, 132, 608, 608, 457, 456, 608, 453, 608, + 608, 459, 451, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 131, + 132, 452, 608, 462, 608, 460, 608, 456, 608, 453, + + 608, 461, 459, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 463, + 131, 132, 608, 131, 132, 608, 460, 608, 465, 465, 608, 461, 608, 608, 437, + 437, 608, 608, 608, 131, 132, 608, 608, 608, 608, 463, 467, 467, 467, 467, + 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 464, 608, 608, 608, + 131, 132, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 464, 131, 132, 437, 608, 608, 179, 180, 608, + 608, 608, 608, 466, 132, 469, 608, 608, 608, 468, + + 608, 608, 608, 608, 608, 608, 608, 608, 470, 608, 129, 608, 179, 180, 608, + 608, 608, 608, 608, 608, 608, 469, 608, 471, 215, 216, 608, 608, 472, 608, + 608, 608, 179, 180, 470, 475, 475, 473, 474, 608, 608, 608, 608, 608, 608, + 608, 608, 479, 608, 471, 608, 608, 179, 180, 472, 608, 608, 608, 608, 608, + 179, 180, 473, 608, 474, 179, 180, 478, 608, 179, 180, 483, 608, 479, 608, + 608, 215, 216, 484, 480, 608, 608, 179, 180, 608, 608, 485, 608, 608, 131, + 132, 608, 608, 478, 608, 608, 608, 483, 608, 608, + + 608, 608, 131, 132, 480, 476, 132, 608, 488, 608, 131, 132, 608, 608, 608, + 608, 608, 131, 132, 608, 608, 608, 608, 490, 608, 465, 465, 608, 608, 489, + 437, 437, 491, 608, 488, 608, 608, 493, 493, 493, 493, 608, 467, 467, 467, + 467, 608, 486, 132, 490, 608, 608, 492, 608, 489, 608, 131, 132, 491, 608, + 131, 132, 608, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 131, + 132, 608, 492, 608, 608, 495, 131, 132, 496, 131, 132, 608, 608, 608, 497, + 608, 608, 608, 608, 608, 494, 608, 465, 608, 608, + + 468, 608, 608, 515, 608, 608, 495, 608, 608, 496, 608, 608, 608, 179, 180, + 497, 504, 475, 475, 608, 608, 608, 608, 129, 179, 180, 608, 179, 180, 498, + 498, 498, 498, 179, 180, 608, 608, 608, 179, 180, 503, 608, 504, 499, 608, + 500, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 179, 180, 475, 608, + 508, 131, 132, 608, 608, 608, 503, 608, 608, 499, 608, 500, 516, 132, 608, + 505, 608, 608, 608, 608, 608, 608, 131, 132, 129, 511, 508, 501, 608, 608, + 608, 513, 608, 608, 608, 608, 514, 131, 132, 484, + + 505, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 511, 608, 608, 608, + 608, 608, 513, 517, 608, 608, 608, 514, 608, 608, 129, 608, 131, 132, 608, + 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 517, + 608, 608, 521, 608, 608, 608, 523, 522, 608, 608, 608, 608, 608, 528, 608, + 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 179, 180, 608, 521, 179, + 180, 608, 523, 522, 526, 608, 179, 180, 608, 528, 608, 131, 132, 530, 608, + 608, 608, 540, 608, 131, 132, 608, 131, 132, 608, + + 608, 608, 608, 608, 526, 131, 132, 538, 608, 531, 131, 132, 608, 530, 608, + 131, 132, 539, 540, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 131, + 132, 542, 515, 538, 608, 531, 608, 608, 608, 608, 608, 608, 608, 539, 608, + 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 129, 549, + 608, 608, 548, 131, 132, 554, 608, 608, 608, 608, 608, 608, 608, 608, 131, + 132, 608, 608, 608, 608, 608, 555, 608, 571, 608, 549, 608, 608, 548, 608, + 608, 554, 608, 608, 608, 608, 131, 132, 608, 608, + + 543, 132, 608, 608, 131, 132, 559, 555, 608, 131, 132, 608, 131, 132, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 542, 608, 608, 131, 132, + 608, 608, 559, 131, 132, 608, 608, 608, 131, 132, 608, 608, 131, 132, 608, + 608, 131, 132, 608, 565, 608, 129, 572, 132, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 571, 574, 574, 608, 608, 595, 595, 608, 608, 608, + 565, 608, 608, 582, 582, 582, 582, 599, 599, 599, 599, 131, 132, 608, 608, + 608, 129, 608, 608, 608, 608, 608, 608, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 575, 608, 608, 608, 596, 45, 45, 45, 93, + 93, 93, 120, 608, 120, 122, 608, 122, 160, 608, 160, 162, 608, 162, 164, + 608, 164, 166, 608, 166, 168, 608, 168, 171, 608, 171, 173, 608, 173, 194, + 608, 194, 196, 608, 196, 207, 608, 207, 209, 608, 209, 220, 608, 220, 253, + 608, 253, 254, 608, 254, 255, 608, 255, 11, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; + +static const flex_int16_t yy_chk[3774] = { + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 3, 27, 6, 27, 2, 327, 3, 6, 4, 2, 2, 2, 2, 2, + 4, 10, 627, 624, 621, 4, 10, 20, 286, 20, 613, + + 20, 20, 20, 20, 23, 327, 23, 607, 23, 23, 23, 23, 58, 596, 58, + 328, 58, 58, 58, 58, 61, 592, 61, 286, 61, 61, 61, 61, 86, 580, + 86, 575, 86, 86, 86, 86, 557, 547, 27, 27, 328, 536, 533, 2, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 158, 158, 158, 158, 14, 21, + 21, 25, 25, 52, 63, 63, 82, 21, 100, 21, 335, 21, 21, 21, 21, + 118, 22, 510, 22, 7, 22, 22, 22, 22, 24, 40, 24, 127, 24, 24, + 24, 24, 133, 501, 494, 335, 40, 40, 40, 40, 65, 468, 65, 169, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 413, 21, + 65, 25, 52, 436, 63, 82, 421, 100, 22, 22, 272, 272, 272, 272, 118, + 398, 24, 24, 291, 291, 291, 291, 8, 413, 40, 65, 127, 303, 303, 303, + 303, 133, 65, 65, 89, 385, 89, 378, 89, 89, 89, 89, 169, 317, 317, + 317, 317, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 26, 367, 26, 29, 329, 29, 192, + 28, 205, 28, 366, 91, 91, 320, 372, 29, 318, 30, 423, 30, 104, 373, + 104, 26, 104, 104, 104, 104, 304, 26, 26, 292, 26, 28, 109, 109, 366, + 287, 30, 157, 372, 29, 30, 423, 31, 235, 31, 373, 273, 26, 157, 157, + 157, 157, 26, 26, 31, 26, 66, 28, 66, 454, + + 26, 26, 30, 29, 29, 235, 30, 28, 28, 455, 32, 31, 32, 192, 31, + 205, 209, 30, 30, 91, 31, 34, 477, 34, 454, 32, 33, 380, 33, 529, + 207, 235, 66, 206, 455, 32, 31, 34, 529, 31, 32, 36, 109, 36, 31, + 31, 157, 477, 35, 33, 35, 32, 235, 380, 37, 33, 37, 66, 66, 66, + 36, 32, 500, 34, 35, 32, 37, 36, 417, 196, 35, 194, 32, 32, 193, + 33, 319, 319, 319, 319, 33, 173, 171, 34, 34, 170, 36, 500, 33, 33, + 35, 159, 37, 36, 417, 43, 35, 43, 529, 43, + + 43, 43, 43, 36, 36, 377, 377, 377, 377, 134, 35, 35, 384, 384, 384, + 384, 37, 37, 38, 38, 38, 128, 38, 38, 38, 38, 39, 39, 39, 38, + 39, 39, 39, 39, 44, 44, 44, 39, 44, 44, 44, 44, 60, 418, 60, + 44, 60, 60, 60, 60, 122, 450, 59, 59, 67, 38, 67, 43, 43, 527, + 59, 458, 59, 39, 59, 59, 59, 59, 62, 418, 62, 44, 62, 62, 62, + 62, 68, 450, 68, 120, 69, 481, 69, 70, 527, 70, 71, 458, 71, 482, + 72, 119, 72, 73, 487, 73, 116, 499, 103, 70, + + 280, 68, 102, 71, 60, 60, 69, 481, 74, 73, 74, 502, 75, 101, 75, + 482, 67, 67, 96, 72, 487, 506, 59, 499, 280, 70, 93, 68, 93, 71, + 62, 62, 69, 92, 280, 73, 85, 502, 68, 68, 74, 75, 69, 69, 72, + 70, 70, 506, 71, 71, 280, 84, 72, 72, 550, 73, 73, 76, 76, 76, + 280, 76, 76, 76, 76, 74, 75, 83, 76, 280, 74, 74, 78, 64, 75, + 75, 77, 77, 77, 550, 77, 77, 77, 77, 558, 87, 87, 77, 93, 93, + 57, 54, 507, 87, 76, 87, 509, 87, 87, 87, + + 87, 88, 512, 88, 563, 88, 88, 88, 88, 558, 90, 53, 90, 77, 90, + 90, 90, 90, 507, 94, 94, 94, 509, 94, 94, 94, 94, 48, 512, 563, + 94, 95, 95, 95, 518, 95, 95, 95, 95, 105, 105, 110, 95, 110, 129, + 520, 129, 105, 47, 105, 41, 105, 105, 105, 105, 87, 94, 524, 19, 111, + 518, 111, 16, 88, 88, 519, 519, 532, 95, 15, 11, 520, 90, 90, 106, + 534, 106, 566, 106, 106, 106, 106, 107, 524, 107, 111, 107, 107, 107, 107, + 108, 0, 108, 532, 108, 108, 108, 108, 112, 537, + + 112, 534, 566, 110, 110, 577, 129, 129, 113, 105, 113, 111, 124, 544, 124, + 0, 124, 124, 124, 124, 0, 111, 111, 112, 113, 537, 0, 114, 114, 114, + 577, 114, 114, 114, 114, 519, 106, 106, 114, 544, 115, 115, 115, 0, 115, + 115, 115, 115, 586, 112, 113, 115, 108, 108, 223, 223, 397, 397, 397, 397, + 112, 112, 0, 323, 114, 0, 223, 223, 223, 223, 113, 113, 0, 586, 125, + 551, 125, 115, 125, 125, 125, 125, 130, 0, 130, 323, 130, 130, 130, 130, + 131, 131, 131, 552, 131, 131, 131, 131, 132, 132, + + 132, 551, 132, 132, 132, 132, 135, 545, 135, 132, 136, 323, 136, 137, 137, + 138, 545, 138, 140, 552, 140, 137, 556, 137, 223, 560, 136, 131, 561, 135, + 562, 564, 323, 598, 139, 132, 139, 141, 0, 141, 143, 568, 143, 0, 130, + 130, 138, 0, 556, 140, 0, 560, 136, 141, 561, 135, 562, 564, 598, 139, + 142, 139, 142, 143, 144, 569, 144, 568, 135, 135, 0, 138, 136, 136, 140, + 142, 545, 138, 138, 141, 140, 140, 0, 137, 137, 139, 145, 139, 145, 143, + 144, 569, 152, 142, 152, 0, 139, 139, 146, 141, + + 141, 142, 143, 143, 570, 146, 152, 146, 535, 535, 147, 145, 147, 149, 0, + 149, 144, 150, 142, 150, 573, 146, 142, 142, 147, 0, 144, 144, 148, 148, + 570, 153, 152, 153, 535, 0, 148, 145, 148, 156, 147, 156, 154, 150, 154, + 149, 573, 146, 145, 145, 147, 153, 0, 0, 152, 152, 155, 155, 0, 151, + 535, 151, 156, 0, 155, 147, 155, 146, 146, 150, 149, 154, 147, 147, 151, + 149, 149, 153, 535, 150, 150, 576, 177, 151, 177, 163, 151, 163, 156, 163, + 163, 163, 163, 153, 153, 0, 154, 578, 148, 148, + + 151, 156, 156, 0, 154, 154, 0, 576, 182, 151, 182, 174, 151, 174, 0, + 174, 174, 174, 174, 0, 579, 151, 151, 578, 0, 0, 155, 155, 175, 183, + 175, 183, 175, 175, 175, 175, 178, 0, 178, 0, 178, 178, 178, 178, 177, + 177, 579, 163, 163, 179, 179, 179, 0, 179, 179, 179, 179, 180, 180, 180, + 0, 180, 180, 180, 180, 184, 0, 184, 180, 581, 182, 182, 0, 185, 0, + 185, 186, 0, 186, 187, 0, 187, 420, 420, 420, 420, 179, 188, 186, 188, + 0, 183, 183, 185, 180, 581, 187, 0, 178, 178, + + 200, 0, 200, 188, 189, 0, 189, 188, 583, 191, 0, 191, 567, 567, 186, + 435, 435, 435, 435, 185, 584, 191, 187, 493, 493, 493, 493, 184, 184, 188, + 587, 189, 589, 188, 583, 185, 185, 0, 186, 186, 0, 187, 187, 190, 0, + 190, 584, 191, 593, 188, 188, 498, 498, 498, 498, 585, 587, 189, 589, 0, + 190, 0, 200, 200, 585, 597, 189, 189, 601, 0, 190, 191, 191, 197, 593, + 197, 602, 197, 197, 197, 197, 0, 567, 198, 603, 198, 190, 198, 198, 198, + 198, 597, 0, 201, 601, 201, 190, 201, 201, 201, + + 201, 213, 602, 213, 0, 190, 190, 202, 202, 202, 603, 202, 202, 202, 202, + 203, 203, 203, 0, 203, 203, 203, 203, 210, 585, 210, 203, 210, 210, 210, + 210, 211, 217, 211, 217, 211, 211, 211, 211, 0, 0, 214, 230, 214, 202, + 214, 214, 214, 214, 230, 0, 230, 203, 0, 0, 201, 201, 0, 0, 217, + 219, 484, 219, 213, 213, 215, 215, 215, 515, 215, 215, 215, 215, 216, 216, + 216, 0, 216, 216, 216, 216, 221, 221, 484, 216, 217, 218, 219, 218, 221, + 515, 221, 0, 0, 217, 217, 0, 222, 222, 225, + + 218, 225, 215, 214, 214, 222, 0, 222, 0, 484, 216, 230, 230, 219, 0, + 226, 515, 226, 225, 227, 0, 227, 219, 219, 588, 588, 218, 224, 224, 224, + 484, 224, 224, 224, 224, 0, 0, 515, 224, 0, 0, 228, 0, 228, 225, + 226, 0, 0, 218, 218, 590, 221, 221, 228, 231, 227, 231, 228, 229, 590, + 229, 225, 225, 232, 224, 232, 0, 222, 222, 0, 226, 0, 229, 233, 231, + 233, 0, 226, 226, 228, 227, 227, 227, 228, 238, 0, 238, 234, 0, 234, + 236, 0, 236, 232, 588, 0, 0, 233, 229, 0, + + 231, 234, 0, 228, 228, 0, 239, 238, 239, 582, 582, 582, 582, 0, 0, + 236, 231, 231, 232, 590, 229, 229, 0, 233, 0, 232, 232, 234, 0, 0, + 240, 240, 0, 238, 0, 233, 233, 239, 0, 0, 0, 236, 240, 240, 240, + 240, 238, 238, 604, 234, 234, 0, 236, 236, 237, 237, 237, 604, 237, 237, + 237, 237, 239, 0, 242, 237, 242, 0, 239, 239, 241, 241, 241, 542, 241, + 241, 241, 241, 243, 0, 243, 241, 244, 0, 244, 245, 0, 245, 246, 0, + 246, 237, 243, 0, 242, 542, 243, 245, 244, 247, + + 240, 247, 248, 0, 248, 0, 249, 241, 249, 0, 0, 246, 599, 599, 599, + 599, 0, 604, 243, 242, 0, 542, 243, 245, 244, 0, 242, 242, 0, 248, + 605, 247, 249, 0, 252, 0, 252, 246, 249, 605, 243, 243, 542, 0, 244, + 244, 0, 245, 245, 0, 246, 246, 257, 0, 257, 248, 247, 0, 249, 250, + 250, 247, 247, 249, 248, 248, 252, 257, 249, 249, 0, 250, 250, 250, 250, + 251, 251, 251, 0, 251, 251, 251, 251, 256, 0, 256, 251, 258, 571, 258, + 259, 252, 259, 257, 0, 0, 252, 252, 0, 605, + + 260, 0, 260, 0, 262, 0, 262, 259, 256, 261, 571, 261, 251, 0, 257, + 257, 263, 0, 263, 0, 0, 262, 264, 0, 264, 260, 0, 0, 265, 250, + 265, 0, 261, 259, 256, 0, 571, 266, 0, 266, 0, 0, 264, 263, 0, + 256, 256, 262, 0, 258, 258, 260, 259, 259, 267, 0, 267, 571, 261, 0, + 266, 0, 260, 260, 265, 0, 262, 262, 264, 263, 0, 261, 261, 0, 276, + 0, 276, 267, 263, 263, 268, 268, 0, 0, 264, 264, 266, 0, 0, 265, + 265, 265, 268, 268, 268, 268, 274, 0, 274, 266, + + 266, 0, 0, 267, 269, 269, 269, 0, 269, 269, 269, 269, 270, 270, 277, + 269, 267, 267, 275, 0, 275, 277, 274, 277, 270, 270, 270, 270, 271, 271, + 271, 0, 271, 271, 271, 271, 276, 276, 279, 271, 279, 269, 278, 278, 278, + 283, 0, 283, 274, 275, 268, 0, 0, 0, 285, 0, 285, 0, 274, 274, + 282, 283, 282, 0, 0, 271, 281, 281, 281, 279, 281, 281, 281, 281, 275, + 0, 0, 281, 284, 284, 275, 275, 270, 277, 277, 285, 284, 283, 284, 282, + 288, 0, 288, 289, 279, 289, 0, 290, 0, 290, + + 279, 279, 0, 281, 278, 278, 0, 283, 283, 290, 285, 295, 0, 295, 282, + 0, 285, 285, 293, 293, 0, 288, 282, 282, 0, 289, 293, 0, 293, 294, + 0, 294, 0, 0, 296, 290, 296, 0, 0, 297, 295, 297, 298, 0, 298, + 294, 288, 0, 284, 284, 289, 296, 288, 288, 298, 289, 289, 0, 0, 290, + 290, 299, 0, 299, 309, 295, 309, 306, 297, 306, 0, 294, 0, 295, 295, + 0, 300, 296, 300, 0, 298, 300, 300, 300, 301, 0, 301, 306, 293, 293, + 299, 294, 294, 297, 0, 309, 296, 296, 302, 302, + + 0, 297, 297, 0, 298, 298, 302, 0, 302, 305, 0, 305, 307, 306, 307, + 299, 301, 308, 0, 308, 309, 0, 0, 299, 299, 305, 309, 309, 0, 306, + 306, 312, 307, 312, 313, 0, 313, 308, 300, 300, 310, 301, 310, 314, 0, + 314, 301, 301, 0, 0, 0, 305, 310, 311, 0, 311, 0, 313, 307, 0, + 312, 0, 0, 308, 0, 0, 0, 0, 302, 302, 0, 305, 305, 311, 307, + 307, 0, 0, 310, 308, 308, 0, 315, 313, 315, 312, 316, 0, 316, 321, + 0, 321, 0, 312, 312, 0, 313, 313, 316, 311, + + 0, 0, 310, 310, 0, 314, 314, 0, 322, 0, 322, 0, 0, 0, 315, + 311, 311, 326, 321, 326, 322, 324, 324, 324, 316, 324, 324, 324, 324, 0, + 0, 0, 324, 325, 0, 325, 330, 0, 330, 315, 0, 0, 0, 321, 315, + 315, 322, 325, 316, 316, 0, 321, 321, 331, 331, 0, 0, 325, 324, 0, + 0, 331, 330, 331, 0, 0, 0, 325, 0, 0, 322, 322, 0, 325, 334, + 0, 334, 0, 0, 326, 326, 0, 0, 325, 0, 337, 0, 337, 330, 332, + 332, 338, 325, 338, 334, 325, 325, 0, 330, 330, + + 337, 332, 332, 332, 332, 333, 333, 333, 0, 333, 333, 333, 333, 0, 338, + 336, 333, 336, 339, 339, 334, 0, 0, 331, 331, 0, 337, 342, 0, 342, + 339, 339, 339, 339, 0, 336, 334, 334, 0, 342, 338, 341, 333, 341, 345, + 0, 345, 337, 337, 0, 344, 0, 344, 338, 338, 343, 341, 343, 345, 332, + 0, 336, 340, 340, 340, 342, 340, 340, 340, 340, 0, 341, 344, 340, 346, + 343, 346, 336, 336, 347, 0, 347, 341, 348, 345, 348, 0, 0, 339, 342, + 342, 349, 0, 349, 346, 0, 341, 0, 344, 340, + + 0, 343, 0, 341, 341, 0, 345, 345, 350, 0, 350, 0, 344, 344, 0, + 351, 351, 343, 343, 0, 346, 0, 0, 0, 0, 0, 350, 351, 351, 351, + 351, 0, 0, 354, 0, 354, 346, 346, 0, 353, 353, 347, 347, 0, 0, + 348, 348, 353, 0, 353, 0, 0, 350, 349, 349, 352, 352, 352, 354, 352, + 352, 352, 352, 355, 0, 355, 352, 357, 0, 357, 350, 350, 356, 0, 356, + 0, 358, 353, 358, 0, 359, 0, 359, 0, 354, 351, 0, 357, 355, 360, + 358, 360, 352, 0, 0, 354, 354, 0, 361, 0, + + 361, 364, 353, 364, 362, 360, 362, 356, 0, 353, 353, 0, 0, 357, 355, + 359, 358, 0, 361, 362, 0, 0, 363, 0, 363, 355, 355, 0, 0, 357, + 357, 360, 356, 0, 356, 356, 363, 0, 358, 358, 359, 0, 359, 359, 361, + 362, 365, 0, 365, 0, 0, 360, 360, 368, 0, 368, 374, 0, 374, 0, + 361, 361, 363, 364, 364, 0, 362, 362, 369, 0, 369, 365, 370, 0, 370, + 375, 375, 0, 0, 368, 0, 374, 0, 0, 363, 363, 0, 375, 375, 375, + 375, 0, 0, 0, 369, 0, 379, 365, 379, 0, + + 386, 370, 386, 0, 383, 368, 383, 374, 365, 365, 0, 0, 381, 0, 381, + 368, 368, 0, 374, 374, 369, 0, 379, 382, 0, 382, 370, 383, 0, 381, + 369, 369, 386, 0, 370, 370, 376, 376, 376, 382, 376, 376, 376, 376, 388, + 375, 388, 376, 379, 387, 0, 387, 389, 383, 389, 381, 0, 386, 379, 379, + 0, 0, 386, 386, 0, 382, 383, 383, 388, 390, 0, 390, 0, 376, 381, + 381, 391, 389, 391, 387, 0, 0, 0, 0, 0, 382, 382, 0, 392, 0, + 392, 396, 391, 396, 388, 0, 0, 0, 0, 390, + + 0, 0, 0, 389, 387, 0, 388, 388, 399, 399, 396, 387, 387, 0, 389, + 389, 0, 0, 391, 392, 399, 399, 399, 399, 390, 400, 400, 402, 0, 402, + 0, 390, 390, 400, 0, 400, 396, 0, 391, 391, 403, 0, 403, 0, 392, + 402, 0, 404, 0, 404, 392, 392, 0, 396, 396, 401, 401, 401, 403, 401, + 401, 401, 401, 405, 0, 405, 401, 404, 0, 0, 410, 402, 410, 0, 406, + 0, 406, 407, 399, 407, 409, 0, 409, 408, 403, 408, 410, 0, 405, 402, + 402, 0, 401, 404, 406, 400, 400, 407, 0, 411, + + 0, 411, 403, 403, 412, 409, 412, 0, 0, 404, 404, 0, 410, 408, 405, + 411, 425, 0, 425, 422, 406, 422, 0, 407, 0, 405, 405, 414, 0, 414, + 0, 409, 410, 410, 0, 412, 406, 406, 408, 407, 407, 411, 409, 409, 422, + 408, 408, 419, 0, 419, 415, 414, 415, 416, 0, 416, 424, 0, 424, 0, + 412, 411, 411, 0, 0, 415, 412, 412, 0, 0, 422, 419, 427, 416, 427, + 0, 424, 414, 425, 425, 0, 422, 422, 426, 0, 426, 428, 0, 428, 414, + 414, 415, 429, 429, 429, 426, 0, 419, 430, 416, + + 430, 427, 424, 431, 0, 431, 432, 0, 432, 419, 419, 0, 415, 415, 430, + 416, 416, 0, 424, 424, 433, 426, 433, 434, 434, 439, 427, 439, 0, 437, + 437, 434, 0, 434, 427, 427, 0, 0, 0, 0, 430, 437, 437, 437, 437, + 426, 426, 0, 428, 428, 440, 0, 440, 0, 429, 429, 433, 0, 0, 0, + 430, 430, 447, 0, 447, 431, 431, 0, 432, 432, 441, 0, 441, 438, 438, + 438, 0, 438, 438, 438, 438, 433, 433, 433, 438, 0, 0, 439, 439, 0, + 442, 0, 442, 434, 434, 441, 0, 0, 443, 437, + + 443, 0, 0, 444, 0, 444, 0, 445, 442, 445, 438, 0, 440, 440, 448, + 0, 448, 0, 0, 0, 446, 441, 446, 443, 447, 447, 0, 452, 444, 452, + 0, 0, 441, 441, 442, 449, 449, 445, 446, 0, 451, 0, 451, 449, 0, + 449, 0, 452, 453, 443, 453, 0, 442, 442, 444, 456, 0, 456, 0, 0, + 443, 443, 445, 0, 446, 444, 444, 451, 0, 445, 445, 456, 0, 452, 0, + 0, 448, 448, 457, 453, 0, 0, 446, 446, 0, 457, 457, 457, 0, 452, + 452, 0, 0, 451, 459, 0, 459, 456, 460, 0, + + 460, 0, 451, 451, 453, 449, 449, 461, 459, 461, 453, 453, 462, 0, 462, + 0, 0, 456, 456, 464, 0, 464, 463, 461, 463, 465, 465, 0, 0, 460, + 467, 467, 462, 0, 459, 0, 0, 465, 465, 465, 465, 0, 467, 467, 467, + 467, 0, 457, 457, 461, 0, 470, 463, 470, 460, 0, 459, 459, 462, 0, + 460, 460, 469, 0, 469, 471, 0, 471, 0, 461, 461, 472, 0, 472, 462, + 462, 473, 463, 473, 0, 469, 464, 464, 471, 463, 463, 466, 466, 466, 472, + 466, 466, 466, 466, 474, 465, 474, 466, 0, 479, + + 467, 479, 0, 490, 0, 0, 469, 0, 0, 471, 490, 0, 490, 470, 470, + 472, 479, 475, 475, 0, 478, 0, 478, 466, 469, 469, 0, 471, 471, 475, + 475, 475, 475, 472, 472, 483, 0, 483, 473, 473, 478, 0, 479, 475, 480, + 475, 480, 476, 476, 476, 0, 476, 476, 476, 476, 0, 474, 474, 476, 0, + 483, 479, 479, 0, 0, 485, 478, 485, 492, 475, 492, 475, 490, 490, 0, + 480, 489, 0, 489, 488, 0, 488, 478, 478, 476, 485, 483, 475, 486, 486, + 486, 488, 486, 486, 486, 486, 489, 483, 483, 486, + + 480, 0, 0, 491, 0, 491, 480, 480, 495, 0, 495, 485, 496, 0, 496, + 0, 0, 488, 491, 497, 0, 497, 489, 0, 503, 486, 503, 485, 485, 0, + 492, 492, 504, 0, 504, 505, 0, 505, 489, 489, 0, 488, 488, 511, 491, + 511, 0, 503, 508, 0, 508, 505, 504, 517, 0, 517, 0, 513, 511, 513, + 0, 0, 0, 0, 0, 491, 491, 523, 0, 523, 495, 495, 0, 503, 496, + 496, 0, 505, 504, 508, 0, 497, 497, 514, 511, 514, 503, 503, 513, 0, + 0, 521, 523, 521, 504, 504, 0, 505, 505, 0, + + 0, 522, 0, 522, 508, 511, 511, 521, 0, 514, 508, 508, 528, 513, 528, + 517, 517, 522, 523, 513, 513, 516, 516, 516, 0, 516, 516, 516, 516, 523, + 523, 526, 516, 521, 531, 514, 531, 0, 526, 0, 526, 0, 530, 522, 530, + 514, 514, 540, 0, 540, 538, 0, 538, 521, 521, 0, 0, 0, 516, 531, + 0, 0, 530, 522, 522, 538, 539, 0, 539, 0, 0, 549, 0, 549, 528, + 528, 554, 0, 554, 0, 548, 539, 548, 565, 555, 531, 555, 0, 530, 0, + 565, 538, 565, 0, 0, 0, 531, 531, 0, 0, + + 526, 526, 0, 0, 530, 530, 548, 539, 0, 540, 540, 0, 538, 538, 543, + 543, 543, 0, 543, 543, 543, 543, 0, 0, 559, 543, 559, 0, 539, 539, + 0, 0, 548, 549, 549, 0, 0, 0, 554, 554, 0, 0, 548, 548, 0, + 0, 555, 555, 0, 559, 0, 543, 565, 565, 572, 572, 572, 0, 572, 572, + 572, 572, 0, 0, 0, 572, 574, 574, 0, 0, 595, 595, 0, 0, 0, + 559, 0, 0, 574, 574, 574, 574, 595, 595, 595, 595, 559, 559, 0, 0, + 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 595, 609, 609, 609, 610, + 610, 610, 611, 0, 611, 612, 0, 612, 614, 0, 614, 615, 0, 615, 616, + 0, 616, 617, 0, 617, 618, 0, 618, 619, 0, 619, 620, 0, 620, 622, + 0, 622, 623, 0, 623, 625, 0, 625, 626, 0, 626, 628, 0, 628, 629, + 0, 629, 630, 0, 630, 631, 0, 631, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -2082,7 +1451,7 @@ char *yytext; #include #include #include -#ifdef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -2094,73 +1463,72 @@ char *yytext; #include "ppparse.h" enum { - CB_COMPILE_STATUS_NONE, - CB_COMPILE_STATUS_TRUE, - CB_COMPILE_STATUS_FALSE, - CB_COMPILE_STATUS_FALSE_END, - CB_COMPILE_STATUS_TRUE_ELSE, - CB_COMPILE_STATUS_FALSE_ELSE, - CB_COMPILE_STATUS_ERROR + CB_COMPILE_STATUS_NONE, + CB_COMPILE_STATUS_TRUE, + CB_COMPILE_STATUS_FALSE, + CB_COMPILE_STATUS_FALSE_END, + CB_COMPILE_STATUS_TRUE_ELSE, + CB_COMPILE_STATUS_FALSE_ELSE, + CB_COMPILE_STATUS_ERROR }; -static char *plexbuff1 = NULL; -static char *plexbuff2 = NULL; -static size_t newline_count = 0; -static size_t within_comment = 0; -static size_t inside_bracket = 0; -static size_t consecutive_quotation = 0; -static int quotation_mark = 0; -static int last_line_1 = -1; -static int last_line_2 = -1; +static char *plexbuff1 = NULL; +static char *plexbuff2 = NULL; +static size_t newline_count = 0; +static size_t within_comment = 0; +static size_t inside_bracket = 0; +static size_t consecutive_quotation = 0; +static int quotation_mark = 0; +static int last_line_1 = -1; +static int last_line_2 = -1; /* for COBOL68 style COPY in data description entry */ -static int suppress_echo = 0; -static int current_division = PP_OUT_OF_DIVISION; -static int omit_data_entry_name = 0; -static int omit_data_redef_name = 0; +static int suppress_echo = 0; +static int current_division = PP_OUT_OF_DIVISION; +static int omit_data_entry_name = 0; +static int omit_data_redef_name = 0; #define MAX_DEPTH 10 -static int cb_compile_status = CB_COMPILE_STATUS_NONE; -static int cb_compile_status_list[MAX_DEPTH]; -static int compile_directive_depth = -1; - +static int cb_compile_status = CB_COMPILE_STATUS_NONE; +static int cb_compile_status_list[MAX_DEPTH]; +static int compile_directive_depth = -1; -static struct cb_replace_list *current_replace_list = NULL; +static struct cb_replace_list *current_replace_list = NULL; -static struct cb_replace_list *current_copy_replace_list = NULL; +static struct cb_replace_list *current_copy_replace_list = NULL; -static struct cb_joining_ext *current_joining_ext = NULL; +static struct cb_joining_ext *current_joining_ext = NULL; -static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ -static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ +static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ +static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ static struct copy_info { - struct copy_info *next; - char *file; - int line; - int replacing; - int joining; - int quotation_mark; - YY_BUFFER_STATE buffer; + struct copy_info *next; + char *file; + int line; + int replacing; + int joining; + int quotation_mark; + YY_BUFFER_STATE buffer; } *copy_stack = NULL; -#define YY_INPUT(buf, result, max_size) result = ppinput (buf, max_size); +#define YY_INPUT(buf, result, max_size) result = ppinput(buf, max_size); -static int ppinput (char *buf, int max_size); -static void ppecho (const char *text); +static int ppinput(char *buf, int max_size); +static void ppecho(const char *text); -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus (char *namebuf); +#ifdef I18N_UTF8 +static void convert_ucs_hyphen_minus(char *namebuf); #endif /*I18N_UTF8*/ -static void ppecho_dataname (char *datanamebuf); +static void ppecho_dataname(char *datanamebuf); -static void switch_to_buffer (const int lineno, const char *filename, - YY_BUFFER_STATE buffer); +static void switch_to_buffer(const int lineno, const char *filename, + YY_BUFFER_STATE buffer); -#line 2161 "pplex.c" +#line 1846 "pplex.c" -#line 2163 "pplex.c" +#line 1848 "pplex.c" #define INITIAL 0 #define PROCESS_STATE 1 @@ -2172,36 +1540,36 @@ static void switch_to_buffer (const int lineno, const char *filename, #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals ( void ); +static int yy_init_globals(void); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( void ); +int yylex_destroy(void); -int yyget_debug ( void ); +int yyget_debug(void); -void yyset_debug ( int debug_flag ); +void yyset_debug(int debug_flag); -YY_EXTRA_TYPE yyget_extra ( void ); +YY_EXTRA_TYPE yyget_extra(void); -void yyset_extra ( YY_EXTRA_TYPE user_defined ); +void yyset_extra(YY_EXTRA_TYPE user_defined); -FILE *yyget_in ( void ); +FILE *yyget_in(void); -void yyset_in ( FILE * _in_str ); +void yyset_in(FILE *_in_str); -FILE *yyget_out ( void ); +FILE *yyget_out(void); -void yyset_out ( FILE * _out_str ); +void yyset_out(FILE *_out_str); - int yyget_leng ( void ); +int yyget_leng(void); -char *yyget_text ( void ); +char *yyget_text(void); -int yyget_lineno ( void ); +int yyget_lineno(void); -void yyset_lineno ( int _line_number ); +void yyset_lineno(int _line_number); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -2209,31 +1577,31 @@ void yyset_lineno ( int _line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( void ); +extern "C" int yywrap(void); #else -extern int yywrap ( void ); +extern int yywrap(void); #endif #endif #ifndef YY_NO_UNPUT - - static void yyunput ( int c, char *buf_ptr ); - + +static void yyunput(int c, char *buf_ptr); + #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int ); +static void yy_flex_strncpy(char *, const char *, int); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * ); +static int yy_flex_strlen(const char *); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput ( void ); +static int yyinput(void); #else -static int input ( void ); +static int input(void); #endif #endif @@ -2253,42 +1621,40 @@ static int input ( void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO \ + do { \ + if (fwrite(yytext, (size_t)yyleng, 1, yyout)) { \ + } \ + } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ +#define YY_INPUT(buf, result, max_size) \ + if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ + int c = '*'; \ + int n; \ + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else { \ + errno = 0; \ + while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && \ + ferror(yyin)) { \ + if (errno != EINTR) { \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + break; \ + } \ + errno = 0; \ + clearerr(yyin); \ + } \ + } #endif @@ -2307,7 +1673,7 @@ static int input ( void ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg) #endif /* end tables serialization structures and prototypes */ @@ -2318,9 +1684,9 @@ static int input ( void ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex (void); +extern int yylex(void); -#define YY_DECL int yylex (void) +#define YY_DECL int yylex(void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -2332,839 +1698,942 @@ extern int yylex (void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK /*LINTED*/ break; #endif -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION +#define YY_RULE_SETUP \ + if (yyleng > 0) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION /** The main scanner function which does all the work. */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if ( !(yy_init) ) - { - (yy_init) = 1; +YY_DECL { + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if (!(yy_init)) { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ + if (!(yy_start)) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if (!yyin) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if (!yyout) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); + } - yy_load_buffer_state( ); - } + yy_load_buffer_state(); + } - { + { +#line 126 "pplex.l" + +#line 2070 "pplex.c" + + while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + yy_match: + do { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 609) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } while (yy_current_state != 608); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + + case 1: + YY_RULE_SETUP +#line 131 "pplex.l" + { + ppecho(" "); + } + YY_BREAK + case 2: + YY_RULE_SETUP #line 135 "pplex.l" - - - - - -#line 2385 "pplex.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 791 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_current_state != 790 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP + { + identification_division_line_number = cb_source_line; + ppecho("IDENTIFICATION DIVISION."); + } + YY_BREAK + case 3: + YY_RULE_SETUP +#line 139 "pplex.l" + { + ppecho("ID DIVISION."); + } + YY_BREAK + case 4: + YY_RULE_SETUP #line 140 "pplex.l" -{ - ppecho (" "); -} - YY_BREAK -case 2: -YY_RULE_SETUP + { + ppecho("FUNCTION DIVISION."); + } + YY_BREAK + case 5: + YY_RULE_SETUP +#line 141 "pplex.l" + { + ppecho(yytext); + return PROGRAM_ID; + } + YY_BREAK + case 6: + YY_RULE_SETUP +#line 142 "pplex.l" + { + ppecho(yytext); + return FUNCTION_ID; + } + YY_BREAK + case 7: + YY_RULE_SETUP +#line 143 "pplex.l" + { + ppecho("ENVIRONMENT DIVISION"); + return ENVIRONMENT_DIVISION; + } + YY_BREAK + case 8: + YY_RULE_SETUP #line 144 "pplex.l" -{ - identification_division_line_number = cb_source_line; - ppecho ("IDENTIFICATION DIVISION."); -} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 148 "pplex.l" -{ ppecho ("ID DIVISION."); } - YY_BREAK -case 4: -YY_RULE_SETUP + { + position_in_source_code = POSITION_AFTER_WORKING_STORAGE; + ppecho("DATA DIVISION"); + return DATA_DIVISION; + } + YY_BREAK + case 9: + YY_RULE_SETUP #line 149 "pplex.l" -{ ppecho ("FUNCTION DIVISION."); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 150 "pplex.l" -{ ppecho (yytext); return PROGRAM_ID; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 151 "pplex.l" -{ ppecho (yytext); return FUNCTION_ID; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 152 "pplex.l" -{ ppecho ("ENVIRONMENT DIVISION"); return ENVIRONMENT_DIVISION; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 153 "pplex.l" -{ - position_in_source_code = POSITION_AFTER_WORKING_STORAGE; - ppecho ("DATA DIVISION"); - return DATA_DIVISION; -} - YY_BREAK -case 9: -YY_RULE_SETUP + { + if (copy_stack->next == NULL) { + procedure_division_line_number = cb_source_line; + position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; + } + ppecho("PROCEDURE DIVISION"); + return PROCEDURE_DIVISION; + } + YY_BREAK + case 10: + YY_RULE_SETUP +#line 157 "pplex.l" + { + ppecho("END PROGRAM"); + return END_PROGRAM; + } + YY_BREAK + case 11: + YY_RULE_SETUP #line 158 "pplex.l" -{ - if(copy_stack->next == NULL) { - procedure_division_line_number = cb_source_line; - position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; - } - ppecho ("PROCEDURE DIVISION"); - return PROCEDURE_DIVISION; -} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 166 "pplex.l" -{ ppecho ("END PROGRAM"); return END_PROGRAM; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 167 "pplex.l" -{ ppecho ("END FUNCTION"); return END_FUNCTION; } - YY_BREAK -case 12: -#line 170 "pplex.l" -case 13: -YY_RULE_SETUP -#line 170 "pplex.l" -{ - ppecho (" "); - if (cb_source_format != CB_FORMAT_FIXED) { - ppecho (yytext); - } -} - YY_BREAK -case 14: -YY_RULE_SETUP + { + ppecho("END FUNCTION"); + return END_FUNCTION; + } + YY_BREAK + case 12: +#line 161 "pplex.l" + case 13: + YY_RULE_SETUP +#line 161 "pplex.l" + { + ppecho(" "); + if (cb_source_format != CB_FORMAT_FIXED) { + ppecho(yytext); + } + } + YY_BREAK + case 14: + YY_RULE_SETUP +#line 168 "pplex.l" + { + BEGIN PROCESS_STATE; + } + YY_BREAK + + case 15: + /* rule 15 can match eol */ + YY_RULE_SETUP +#line 171 "pplex.l" + { + BEGIN INITIAL; + unput('\n'); + } + YY_BREAK + case 16: + YY_RULE_SETUP +#line 172 "pplex.l" + { + cb_warning(_("PROCESS statement is ignored")); + } + YY_BREAK + + case 17: + YY_RULE_SETUP +#line 175 "pplex.l" + { + BEGIN COPY_STATE; + return COPY; + } + YY_BREAK + case 18: + YY_RULE_SETUP +#line 176 "pplex.l" + { + BEGIN COPY_STATE; + return COPY; + } + YY_BREAK + case 19: + YY_RULE_SETUP #line 177 "pplex.l" -{ BEGIN PROCESS_STATE; } - YY_BREAK - -case 15: -/* rule 15 can match eol */ -YY_RULE_SETUP + { + BEGIN COPY_STATE; + return REPLACE; + } + YY_BREAK + + case 20: + /* rule 20 can match eol */ + YY_RULE_SETUP #line 180 "pplex.l" -{ BEGIN INITIAL; unput ('\n'); } - YY_BREAK -case 16: -YY_RULE_SETUP + { + ECHO; + cb_source_line++; + } + YY_BREAK + case 21: + YY_RULE_SETUP #line 181 "pplex.l" -{ cb_warning (_("PROCESS statement is ignored")); } - YY_BREAK - -case 17: -YY_RULE_SETUP + { /* ignore */ + } + YY_BREAK + case 22: + YY_RULE_SETUP +#line 182 "pplex.l" + { + BEGIN INITIAL; + return '.'; + } + YY_BREAK + case 23: + YY_RULE_SETUP +#line 183 "pplex.l" + { + BEGIN PSEUDO_STATE; + return EQEQ; + } + YY_BREAK + case 24: + YY_RULE_SETUP #line 184 "pplex.l" -{ BEGIN COPY_STATE; return COPY; } - YY_BREAK -case 18: -YY_RULE_SETUP + { + return '('; + } + YY_BREAK + case 25: + YY_RULE_SETUP #line 185 "pplex.l" -{ BEGIN COPY_STATE; return COPY; } - YY_BREAK -case 19: -YY_RULE_SETUP + { + return ')'; + } + YY_BREAK + case 26: + YY_RULE_SETUP #line 186 "pplex.l" -{ BEGIN COPY_STATE; return REPLACE; } - YY_BREAK - -case 20: -/* rule 20 can match eol */ -YY_RULE_SETUP + { + return BY; + } + YY_BREAK + case 27: + YY_RULE_SETUP +#line 187 "pplex.l" + { + return IN; + } + YY_BREAK + case 28: + YY_RULE_SETUP +#line 188 "pplex.l" + { + return OF; + } + YY_BREAK + case 29: + YY_RULE_SETUP #line 189 "pplex.l" -{ ECHO; cb_source_line++; } - YY_BREAK -case 21: -YY_RULE_SETUP + { + return OFF; + } + YY_BREAK + case 30: + YY_RULE_SETUP #line 190 "pplex.l" -{ /* ignore */ } - YY_BREAK -case 22: -YY_RULE_SETUP + { + return SUPPRESS; + } + YY_BREAK + case 31: + YY_RULE_SETUP #line 191 "pplex.l" -{ BEGIN INITIAL; return '.'; } - YY_BREAK -case 23: -YY_RULE_SETUP + { + return PRINTING; + } + YY_BREAK + case 32: + YY_RULE_SETUP #line 192 "pplex.l" -{ BEGIN PSEUDO_STATE; return EQEQ; } - YY_BREAK -case 24: -YY_RULE_SETUP + { + return REPLACING; + } + YY_BREAK + case 33: + YY_RULE_SETUP #line 193 "pplex.l" -{ return '('; } - YY_BREAK -case 25: -YY_RULE_SETUP + { + return LEADING; + } + YY_BREAK + case 34: + YY_RULE_SETUP #line 194 "pplex.l" -{ return ')'; } - YY_BREAK -case 26: -YY_RULE_SETUP + { + return TRAILING; + } + YY_BREAK + case 35: + YY_RULE_SETUP #line 195 "pplex.l" -{ return BY; } - YY_BREAK -case 27: -YY_RULE_SETUP + { + return JOINING; + } + YY_BREAK + case 36: + YY_RULE_SETUP #line 196 "pplex.l" -{ return IN; } - YY_BREAK -case 28: -YY_RULE_SETUP + { + return AS; + } + YY_BREAK + case 37: + YY_RULE_SETUP #line 197 "pplex.l" -{ return OF; } - YY_BREAK -case 29: -YY_RULE_SETUP + { + return PREFIX; + } + YY_BREAK + case 38: + YY_RULE_SETUP #line 198 "pplex.l" -{ return OFF; } - YY_BREAK -case 30: -YY_RULE_SETUP + { + return SUFFIX; + } + YY_BREAK + case 39: + YY_RULE_SETUP #line 199 "pplex.l" -{ return SUPPRESS; } - YY_BREAK -case 31: -YY_RULE_SETUP + { + return PREFIXING; + } + YY_BREAK + case 40: + YY_RULE_SETUP #line 200 "pplex.l" -{ return PRINTING; } - YY_BREAK -case 32: -YY_RULE_SETUP + { + return SUFFIXING; + } + YY_BREAK + case 41: + YY_RULE_SETUP #line 201 "pplex.l" -{ return REPLACING; } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 202 "pplex.l" -{ return LEADING; } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 203 "pplex.l" -{ return TRAILING; } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 204 "pplex.l" -{ return JOINING; } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 205 "pplex.l" -{ return AS; } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 206 "pplex.l" -{ return PREFIX; } - YY_BREAK -case 38: -YY_RULE_SETUP + { +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus(yytext); +#endif /*I18N_UTF8*/ + pplval.s = strdup(yytext); + return TOKEN; + } + YY_BREAK + case 42: #line 207 "pplex.l" -{ return SUFFIX; } - YY_BREAK -case 39: -YY_RULE_SETUP + case 43: #line 208 "pplex.l" -{ return PREFIXING; } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 209 "pplex.l" -{ return SUFFIXING; } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 210 "pplex.l" -{ -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus (yytext); + case 44: + YY_RULE_SETUP +#line 208 "pplex.l" + { + pplval.s = strdup(yytext); + return TOKEN; + } + YY_BREAK + + case 45: + /* rule 45 can match eol */ + YY_RULE_SETUP +#line 212 "pplex.l" + { + ECHO; + cb_source_line++; + } + YY_BREAK + case 46: + YY_RULE_SETUP +#line 213 "pplex.l" + { + pplval.s = strdup(" "); + return TOKEN; + } + YY_BREAK + case 47: + YY_RULE_SETUP +#line 214 "pplex.l" + { + BEGIN COPY_STATE; + return EQEQ; + } + YY_BREAK + case 48: + YY_RULE_SETUP +#line 215 "pplex.l" + { +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus(yytext); #endif /*I18N_UTF8*/ - pplval.s = strdup (yytext); return TOKEN; } - YY_BREAK -case 42: -#line 216 "pplex.l" -case 43: -#line 217 "pplex.l" -case 44: -YY_RULE_SETUP -#line 217 "pplex.l" -{ pplval.s = strdup (yytext); return TOKEN; } - YY_BREAK - - -case 45: -/* rule 45 can match eol */ -YY_RULE_SETUP + pplval.s = strdup(yytext); + return TOKEN; + } + YY_BREAK + case 49: #line 221 "pplex.l" -{ ECHO; cb_source_line++; } - YY_BREAK -case 46: -YY_RULE_SETUP + case 50: #line 222 "pplex.l" -{ pplval.s = strdup (" "); return TOKEN; } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 223 "pplex.l" -{ BEGIN COPY_STATE; return EQEQ; } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 224 "pplex.l" -{ -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus (yytext); -#endif /*I18N_UTF8*/ - pplval.s = strdup (yytext); return TOKEN; } - YY_BREAK -case 49: + case 51: + YY_RULE_SETUP +#line 222 "pplex.l" + { + pplval.s = strdup(yytext); + return TOKEN; + } + YY_BREAK + + case 52: + YY_RULE_SETUP +#line 226 "pplex.l" + { + suppress_echo = 0; + BEGIN COPY_STATE; + return COPY; + } + YY_BREAK + case 53: + YY_RULE_SETUP +#line 227 "pplex.l" + { + suppress_echo = 0; + BEGIN COPY_STATE; + return COPY; + } + YY_BREAK + case 54: + YY_RULE_SETUP +#line 228 "pplex.l" + { + suppress_echo = 0; + BEGIN COPY_STATE; + return REPLACE; + } + YY_BREAK + case 55: + /* rule 55 can match eol */ + YY_RULE_SETUP +#line 229 "pplex.l" + { + ECHO; + cb_source_line++; + } + YY_BREAK + case 56: + YY_RULE_SETUP #line 230 "pplex.l" -case 50: + { + ppecho(" "); + } + YY_BREAK + case 57: + YY_RULE_SETUP #line 231 "pplex.l" -case 51: -YY_RULE_SETUP -#line 231 "pplex.l" -{ pplval.s = strdup (yytext); return TOKEN; } - YY_BREAK - - -case 52: -YY_RULE_SETUP -#line 235 "pplex.l" -{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 236 "pplex.l" -{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 237 "pplex.l" -{ suppress_echo = 0; BEGIN COPY_STATE; return REPLACE; } - YY_BREAK -case 55: -/* rule 55 can match eol */ -YY_RULE_SETUP -#line 238 "pplex.l" -{ ECHO; cb_source_line++; } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 239 "pplex.l" -{ ppecho (" "); } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 240 "pplex.l" -{ - BEGIN INITIAL; - if (!strcasecmp (yytext, "FILLER")) { - ppecho (yytext); - } else { - ppecho_dataname (yytext); - } - suppress_echo = 0; - if (cb_cobol68_copy_in_data_description) { - pplval.s = strdup (yytext); - return TOKEN; - } - } - YY_BREAK -case 58: -#line 254 "pplex.l" -case 59: -#line 255 "pplex.l" -case 60: -YY_RULE_SETUP -#line 255 "pplex.l" -{ suppress_echo = 0; BEGIN INITIAL; ppecho (yytext); } - YY_BREAK - -case 61: -YY_RULE_SETUP -#line 258 "pplex.l" -{ - suppress_echo = (omit_data_redef_name) ? 1 : 0; - ppecho (yytext); - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return REDEFINES; - } -} - YY_BREAK -case 62: -#line 268 "pplex.l" -case 63: -#line 269 "pplex.l" -case 64: -#line 270 "pplex.l" -case 65: -#line 271 "pplex.l" -case 66: -#line 272 "pplex.l" -case 67: -#line 273 "pplex.l" -case 68: -YY_RULE_SETUP -#line 273 "pplex.l" -{ - /* these words are treated as comments */ - if (cb_verify (cb_author_paragraph, yytext)) { - /* skip comments until the end of line */ - int c; - - within_comment = 1; - while ((c = input ()) != EOF) { - if (c == '\n') { - break; - } - } - unput (c); - } -} - YY_BREAK -case 69: -#line 290 "pplex.l" -case 70: -#line 291 "pplex.l" -case 71: -#line 292 "pplex.l" -case 72: -YY_RULE_SETUP + { + BEGIN INITIAL; + if (!strcasecmp(yytext, "FILLER")) { + ppecho(yytext); + } else { + ppecho_dataname(yytext); + } + suppress_echo = 0; + if (cb_cobol68_copy_in_data_description) { + pplval.s = strdup(yytext); + return TOKEN; + } + } + YY_BREAK + case 58: +#line 245 "pplex.l" + case 59: +#line 246 "pplex.l" + case 60: + YY_RULE_SETUP +#line 246 "pplex.l" + { + suppress_echo = 0; + BEGIN INITIAL; + ppecho(yytext); + } + YY_BREAK + + case 61: + YY_RULE_SETUP +#line 249 "pplex.l" + { + suppress_echo = (omit_data_redef_name) ? 1 : 0; + ppecho(yytext); + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return REDEFINES; + } + } + YY_BREAK + case 62: +#line 259 "pplex.l" + case 63: +#line 260 "pplex.l" + case 64: +#line 261 "pplex.l" + case 65: +#line 262 "pplex.l" + case 66: +#line 263 "pplex.l" + case 67: +#line 264 "pplex.l" + case 68: + YY_RULE_SETUP +#line 264 "pplex.l" + { + /* these words are treated as comments */ + if (cb_verify(cb_author_paragraph, yytext)) { + /* skip comments until the end of line */ + int c; + + within_comment = 1; + while ((c = input()) != EOF) { + if (c == '\n') { + break; + } + } + unput(c); + } + } + YY_BREAK + case 69: +#line 281 "pplex.l" + case 70: +#line 282 "pplex.l" + case 71: +#line 283 "pplex.l" + case 72: + YY_RULE_SETUP +#line 283 "pplex.l" + { + /* these words are comments in IBM COBOL */ + if (cb_verify(cb_eject_statement, yytext)) { + /* do nothing for now */ + } else { + /* ECHO; */ /* comment should be suppressed, shouldn't it? */ + } + } + YY_BREAK + case 73: + /* rule 73 can match eol */ + YY_RULE_SETUP #line 292 "pplex.l" -{ - /* these words are comments in IBM COBOL */ - if (cb_verify (cb_eject_statement, yytext)) { - /* do nothing for now */ - } else { - /* ECHO; */ /* comment should be suppressed, shouldn't it? */ - } -} - YY_BREAK -case 73: -/* rule 73 can match eol */ -YY_RULE_SETUP -#line 301 "pplex.l" -{ ppecho ("\n"); cb_source_line++; } - YY_BREAK -case 74: -YY_RULE_SETUP -#line 303 "pplex.l" -{ ppecho (" "); } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 305 "pplex.l" -{ - if (inside_bracket) { - ppecho (", "); - } else { - ppecho (" "); - } -} - YY_BREAK -case 76: -YY_RULE_SETUP -#line 313 "pplex.l" -{ - inside_bracket++; - ppecho ("("); -} - YY_BREAK -case 77: -YY_RULE_SETUP -#line 318 "pplex.l" -{ - if (inside_bracket) { - inside_bracket--; - } - ppecho (")"); -} - YY_BREAK -case 78: + { + ppecho("\n"); + cb_source_line++; + } + YY_BREAK + case 74: + YY_RULE_SETUP +#line 294 "pplex.l" + { + ppecho(" "); + } + YY_BREAK + case 75: + YY_RULE_SETUP +#line 296 "pplex.l" + { + if (inside_bracket) { + ppecho(", "); + } else { + ppecho(" "); + } + } + YY_BREAK + case 76: + YY_RULE_SETUP +#line 304 "pplex.l" + { + inside_bracket++; + ppecho("("); + } + YY_BREAK + case 77: + YY_RULE_SETUP +#line 309 "pplex.l" + { + if (inside_bracket) { + inside_bracket--; + } + ppecho(")"); + } + YY_BREAK + case 78: /* rule 78 can match eol */ -#line 326 "pplex.l" -case 79: +#line 317 "pplex.l" + case 79: /* rule 79 can match eol */ -#line 327 "pplex.l" -case 80: +#line 318 "pplex.l" + case 80: /* rule 80 can match eol */ -#line 328 "pplex.l" -case 81: +#line 319 "pplex.l" + case 81: /* rule 81 can match eol */ -#line 329 "pplex.l" -case 82: +#line 320 "pplex.l" + case 82: /* rule 82 can match eol */ -#line 330 "pplex.l" -case 83: +#line 321 "pplex.l" + case 83: /* rule 83 can match eol */ -#line 331 "pplex.l" -case 84: +#line 322 "pplex.l" + case 84: /* rule 84 can match eol */ -#line 332 "pplex.l" -case 85: +#line 323 "pplex.l" + case 85: /* rule 85 can match eol */ -#line 333 "pplex.l" -case 86: +#line 324 "pplex.l" + case 86: /* rule 86 can match eol */ -#line 334 "pplex.l" -case 87: +#line 325 "pplex.l" + case 87: /* rule 87 can match eol */ -#line 335 "pplex.l" -case 88: +#line 326 "pplex.l" + case 88: /* rule 88 can match eol */ -#line 336 "pplex.l" -case 89: +#line 327 "pplex.l" + case 89: /* rule 89 can match eol */ -#line 337 "pplex.l" -case 90: +#line 328 "pplex.l" + case 90: /* rule 90 can match eol */ -#line 338 "pplex.l" -case 91: +#line 329 "pplex.l" + case 91: /* rule 91 can match eol */ -#line 339 "pplex.l" -case 92: -/* rule 92 can match eol */ -YY_RULE_SETUP -#line 339 "pplex.l" -{ - /* each numeric is not a level-number */ - char *p, *pcrnt; - cobc_mbspc2ascii (yytext); - pcrnt = yytext; - while (*pcrnt) { - for (p = pcrnt; *p && *p != ' ' && *p != '\n' ; p++) - ; - for ( ; *p == ' ' || *p == '\n'; p++) { - if (*p == '\n') { - cb_source_line++; - } - *p = '\0'; - } - ppecho (pcrnt); - if (*p) { - ppecho (" "); - } - pcrnt = p; - } -} - YY_BREAK -case 93: -YY_RULE_SETUP -#line 361 "pplex.l" -{ - char *p = yytext; - cobc_mbspc2ascii (yytext); - while (*p == ' ') { - p++; - } - suppress_echo = (omit_data_entry_name) ? 1 : 0; - ppecho (p); - if (current_division == PP_DATA_DIVISION) { - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return LEVEL_NUMBER; - } - } -} - YY_BREAK -case 94: -YY_RULE_SETUP -#line 377 "pplex.l" -{ - ppecho (yytext); - return yytext[0]; -} - YY_BREAK -case 95: -YY_RULE_SETUP -#line 382 "pplex.l" -{ -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus (yytext); +#line 330 "pplex.l" + case 92: + /* rule 92 can match eol */ + YY_RULE_SETUP +#line 330 "pplex.l" + { + /* each numeric is not a level-number */ + char *p, *pcrnt; + cobc_mbspc2ascii(yytext); + pcrnt = yytext; + while (*pcrnt) { + for (p = pcrnt; *p && *p != ' ' && *p != '\n'; p++) + ; + for (; *p == ' ' || *p == '\n'; p++) { + if (*p == '\n') { + cb_source_line++; + } + *p = '\0'; + } + ppecho(pcrnt); + if (*p) { + ppecho(" "); + } + pcrnt = p; + } + } + YY_BREAK + case 93: + YY_RULE_SETUP +#line 352 "pplex.l" + { + char *p = yytext; + cobc_mbspc2ascii(yytext); + while (*p == ' ') { + p++; + } + suppress_echo = (omit_data_entry_name) ? 1 : 0; + ppecho(p); + if (current_division == PP_DATA_DIVISION) { + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return LEVEL_NUMBER; + } + } + } + YY_BREAK + case 94: + YY_RULE_SETUP +#line 368 "pplex.l" + { + ppecho(yytext); + return yytext[0]; + } + YY_BREAK + case 95: + YY_RULE_SETUP +#line 373 "pplex.l" + { +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus(yytext); #endif /*I18N_UTF8*/ - ppecho (yytext); } - YY_BREAK -case 96: -#line 388 "pplex.l" -case 97: -#line 389 "pplex.l" -case 98: -YY_RULE_SETUP -#line 389 "pplex.l" -{ ppecho (yytext); } - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(PROCESS_STATE): -case YY_STATE_EOF(COPY_STATE): -case YY_STATE_EOF(PSEUDO_STATE): -case YY_STATE_EOF(DATANAME_JOIN_STATE): -#line 391 "pplex.l" -{ - struct copy_info *p; - - p = copy_stack; - - yy_delete_buffer (YY_CURRENT_BUFFER); - - /* Terminate at the end of all input */ - if (p->next == NULL) { - within_comment = 0; - newline_count = 0; - inside_bracket = 0; - current_replace_list = NULL; - current_copy_replace_list = NULL; - current_joining_ext = NULL; - text_queue1 = text_queue2 = NULL; - copy_stack = NULL; - quotation_mark = 0; - consecutive_quotation = 0; - last_line_1 = -1; - last_line_2 = -1; - yyterminate (); - } - - /* Close the current file */ - fclose (ppin); - - /* Switch to the last buffer */ - if (p->replacing) { - pp_set_copy_replace_list (NULL); - } - if (p->joining) { - pp_set_joining_ext (NULL); - } - switch_to_buffer (p->line, p->file, p->buffer); - quotation_mark = p->quotation_mark; - - copy_stack = p->next; - free (p); -} - YY_BREAK -case 99: -YY_RULE_SETUP -#line 432 "pplex.l" -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK -#line 3037 "pplex.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + ppecho(yytext); + } + YY_BREAK + case 96: +#line 379 "pplex.l" + case 97: +#line 380 "pplex.l" + case 98: + YY_RULE_SETUP +#line 380 "pplex.l" + { + ppecho(yytext); + } + YY_BREAK + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(PROCESS_STATE): + case YY_STATE_EOF(COPY_STATE): + case YY_STATE_EOF(PSEUDO_STATE): + case YY_STATE_EOF(DATANAME_JOIN_STATE): +#line 382 "pplex.l" + { + struct copy_info *p; + + p = copy_stack; + + yy_delete_buffer(YY_CURRENT_BUFFER); + + /* Terminate at the end of all input */ + if (p->next == NULL) { + within_comment = 0; + newline_count = 0; + inside_bracket = 0; + current_replace_list = NULL; + current_copy_replace_list = NULL; + current_joining_ext = NULL; + text_queue1 = text_queue2 = NULL; + copy_stack = NULL; + quotation_mark = 0; + consecutive_quotation = 0; + last_line_1 = -1; + last_line_2 = -1; + yyterminate(); + } + + /* Close the current file */ + fclose(ppin); + + /* Switch to the last buffer */ + if (p->replacing) { + pp_set_copy_replace_list(NULL); + } + if (p->joining) { + pp_set_joining_ext(NULL); + } + switch_to_buffer(p->line, p->file, p->buffer); + quotation_mark = p->quotation_mark; + + copy_stack = p->next; + free(p); + } + YY_BREAK + case 99: + YY_RULE_SETUP +#line 423 "pplex.l" + YY_FATAL_ERROR("flex scanner jammed"); + YY_BREAK +#line 2722 "pplex.c" + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ((yy_c_buf_p) <= + &YY_CURRENT_BUFFER_LVALUE + ->yy_ch_buf[(yy_n_chars)]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer()) { + case EOB_ACT_END_OF_FILE: { + (yy_did_buffer_switch_on_eof) = 0; + + if (yywrap()) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!(yy_did_buffer_switch_on_eof)) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -3174,170 +2643,149 @@ YY_FATAL_ERROR( "flex scanner jammed" ); * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer (void) -{ - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; +static int yy_get_next_buffer(void) { + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) + YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); + + if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == + 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if ((yy_c_buf_p) - (yytext_ptr)-YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)((yy_c_buf_p) - (yytext_ptr)-1); + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = (int)((yy_c_buf_p)-b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + int new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2)); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ((yy_n_chars) == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)yyrealloc( + (void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size); + if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (void) -{ - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 791 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; +static yy_state_type yy_get_previous_state(void) { + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 609) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -3345,650 +2793,589 @@ static int yy_get_next_buffer (void) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 791 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 790); - - return yy_is_jam ? 0 : yy_current_state; +static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) { + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 609) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 608); + + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT - static void yyunput (int c, char * yy_bp ) -{ - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; +static void yyunput(int c, char *yy_bp) { + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + + 2) { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE + ->yy_ch_buf[YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while (source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + *--dest = *--source; + + yy_cp += (int)(dest - source); + yy_bp += (int)(dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = + (int)YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2) + YY_FATAL_ERROR("flex scanner push-back overflow"); + } + + *--yy_cp = (char)c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (void) +static int yyinput(void) #else - static int input (void) +static int input(void) #endif { - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else { /* need more input */ + int offset = (int)((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch (yy_get_next_buffer()) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if (yywrap()) + return 0; + + if (!(yy_did_buffer_switch_on_eof)) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *)(yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } - - yy_init_buffer( YY_CURRENT_BUFFER, input_file ); - yy_load_buffer_state( ); +void yyrestart(FILE *input_file) { + + if (!YY_CURRENT_BUFFER) { + yyensure_buffer_stack(); + YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); + } + + yy_init_buffer(YY_CURRENT_BUFFER, input_file); + yy_load_buffer_state(); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; +void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) { + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack(); + if (YY_CURRENT_BUFFER == new_buffer) + return; + + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); +static void yy_load_buffer_state(void) { + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * @param size The character buffer size in bytes. When in doubt, use @c + * YY_BUF_SIZE. + * * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +YY_BUFFER_STATE yy_create_buffer(FILE *file, int size) { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2)); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer(b, file); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; +void yy_delete_buffer(YY_BUFFER_STATE b) { + + if (!b) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf ); + if (b->yy_is_our_buffer) + yyfree((void *)b->yy_ch_buf); - yyfree( (void *) b ); + yyfree((void *)b); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) +static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) { - int oerrno = errno; - - yy_flush_buffer( b ); + int oerrno = errno; - b->yy_input_file = file; - b->yy_fill_buffer = 1; + yy_flush_buffer(b); - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - b->yy_is_interactive = 0; - - errno = oerrno; + b->yy_is_interactive = 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; +void yy_flush_buffer(YY_BUFFER_STATE b) { + if (!b) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); + if (b == YY_CURRENT_BUFFER) + yy_load_buffer_state(); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; +void yypush_buffer_state(YY_BUFFER_STATE new_buffer) { + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if (YY_CURRENT_BUFFER) { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state(); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } +void yypop_buffer_state(void) { + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state(); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { +static void yyensure_buffer_stack(void) { + yy_size_t num_to_alloc; - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state **)yyalloc( + num_to_alloc * sizeof(struct yy_buffer_state *)); + if (!(yy_buffer_stack)) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + memset((yy_buffer_stack), 0, + num_to_alloc * sizeof(struct yy_buffer_state *)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) { + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state **)yyrealloc( + (yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state *)); + if (!(yy_buffer_stack)) + YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, + grow_size * sizeof(struct yy_buffer_state *)); + (yy_buffer_stack_max) = num_to_alloc; + } } -/** Setup the input buffer state to scan directly from a user-specified character buffer. +/** Setup the input buffer state to scan directly from a user-specified + * character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; +YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size) { + YY_BUFFER_STATE b; + + if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || + base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr ) -{ - - return yy_scan_bytes( yystr, (int) strlen(yystr) ); +YY_BUFFER_STATE yy_scan_string(const char *yystr) { + + return yy_scan_bytes(yystr, (int)strlen(yystr)); } -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. +/** Setup the input buffer state to scan the given bytes. The next call to + * yylex() will scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; +YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, int _yybytes_len) { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t)(_yybytes_len + 2); + buf = (char *)yyalloc(n); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < _yybytes_len; ++i) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg ) -{ - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); +static void yynoreturn yy_fatal_error(const char *msg) { + fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg); \ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } while (0) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ -int yyget_lineno (void) -{ - - return yylineno; -} +int yyget_lineno(void) { return yylineno; } /** Get the input stream. - * + * */ -FILE *yyget_in (void) -{ - return yyin; -} +FILE *yyget_in(void) { return yyin; } /** Get the output stream. - * + * */ -FILE *yyget_out (void) -{ - return yyout; -} +FILE *yyget_out(void) { return yyout; } /** Get the length of the current token. - * + * */ -int yyget_leng (void) -{ - return yyleng; -} +int yyget_leng(void) { return yyleng; } /** Get the current token. - * + * */ -char *yyget_text (void) -{ - return yytext; -} +char *yyget_text(void) { return yytext; } /** Set the current line number. * @param _line_number line number - * + * */ -void yyset_lineno (int _line_number ) -{ - - yylineno = _line_number; -} +void yyset_lineno(int _line_number) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. - * + * * @see yy_switch_to_buffer */ -void yyset_in (FILE * _in_str ) -{ - yyin = _in_str ; -} +void yyset_in(FILE *_in_str) { yyin = _in_str; } -void yyset_out (FILE * _out_str ) -{ - yyout = _out_str ; -} +void yyset_out(FILE *_out_str) { yyout = _out_str; } -int yyget_debug (void) -{ - return yy_flex_debug; -} +int yyget_debug(void) { return yy_flex_debug; } -void yyset_debug (int _bdebug ) -{ - yy_flex_debug = _bdebug ; -} +void yyset_debug(int _bdebug) { yy_flex_debug = _bdebug; } -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ +static int yy_init_globals(void) { + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; +int yylex_destroy(void) { + + /* Pop the buffer stack, destroying each element. */ + while (YY_CURRENT_BUFFER) { + yy_delete_buffer(YY_CURRENT_BUFFER); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack)); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next + * time yylex() is called, initialization will occur. */ + yy_init_globals(); + + return 0; } /* @@ -3996,1072 +3383,1033 @@ int yylex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n ) -{ - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; +static void yy_flex_strncpy(char *s1, const char *s2, int n) { + + int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s ) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; +static int yy_flex_strlen(const char *s) { + int n; + for (n = 0; s[n]; ++n) + ; - return n; + return n; } #endif -void *yyalloc (yy_size_t size ) -{ - return malloc(size); -} +void *yyalloc(yy_size_t size) { return malloc(size); } -void *yyrealloc (void * ptr, yy_size_t size ) -{ - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); +void *yyrealloc(void *ptr, yy_size_t size) { + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +void yyfree(void *ptr) { + free((char *)ptr); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 432 "pplex.l" +#line 423 "pplex.l" - -void -pp_set_replace_list (struct cb_replace_list *list) -{ - current_replace_list = list; +void pp_set_replace_list(struct cb_replace_list *list) { + current_replace_list = list; } -void -pp_set_copy_replace_list (struct cb_replace_list *list) -{ - current_copy_replace_list = list; +void pp_set_copy_replace_list(struct cb_replace_list *list) { + current_copy_replace_list = list; } -void -pp_set_joining_ext (struct cb_joining_ext *ext) -{ - current_joining_ext = ext; +void pp_set_joining_ext(struct cb_joining_ext *ext) { + current_joining_ext = ext; } -#ifdef I18N_UTF8 -# define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" -# define UTF8_MINUS_SIGN "\xE2\x88\x92" +#ifdef I18N_UTF8 +#define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" +#define UTF8_MINUS_SIGN "\xE2\x88\x92" #else /*!I18N_UTF8*/ -# define SJIS_MINUS_SIGN "\x81\x7c" +#define SJIS_MINUS_SIGN "\x81\x7c" #endif /*I18N_UTF8*/ -#ifdef I18N_UTF8 -static void -convert_ucs_hyphen_minus (char *namebuf) -{ - char *p = namebuf; - while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - *p = '_'; - memmove(p+1, p+3, strlen(p+3)+1); - p++; - } - - p = namebuf; - while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { - *p = '_'; - memmove(p+1, p+3, strlen(p+3)+1); - p++; - } - return; +#ifdef I18N_UTF8 +static void convert_ucs_hyphen_minus(char *namebuf) { + char *p = namebuf; + while (NULL != (p = strstr(p, UTF8_MINUS_SIGN))) { + memcpy(p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); + p += 3; + } + return; } #endif /*I18N_UTF8*/ -static void -ppecho_dataname (char *namebuf) -{ - int extlen, namelen, seplen; - const char *ext; - const char *sep; +static void ppecho_dataname(char *namebuf) { + int extlen, namelen, seplen; + const char *ext; + const char *sep; -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus (namebuf); +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus(namebuf); #endif /*I18N_UTF8*/ - if (!current_joining_ext) { - ppecho (namebuf); - } else { - ext = current_joining_ext->ext; - if (!plexbuff1) { - plexbuff1 = cobc_malloc (COB_SMALL_BUFF); - } - extlen = strlen (ext); - namelen = strlen (namebuf); -#ifdef I18N_UTF8 - if (!utf8_ext_pick ((unsigned char*) ext)) { - sep = "-"; - seplen = 1; - } else { - sep = UTF8_FULLWIDTH_HYPHEN_MINUS; - seplen = 3; - } -#else /*!I18N_UTF8*/ - if (!sjis_pick ((unsigned char*) ext)) { - sep = "-"; - seplen = 1; - } else { - sep = SJIS_MINUS_SIGN; - seplen = 2; - } + if (!current_joining_ext) { + ppecho(namebuf); + } else { + ext = current_joining_ext->ext; + if (!plexbuff1) { + plexbuff1 = cobc_malloc(COB_SMALL_BUFF); + } + extlen = strlen(ext); + namelen = strlen(namebuf); +#ifdef I18N_UTF8 + if (!utf8_ext_pick((unsigned char *)ext)) { + sep = "-"; + seplen = 1; + } else { + sep = UTF8_FULLWIDTH_HYPHEN_MINUS; + seplen = 3; + } +#else /*!I18N_UTF8*/ + if (!sjis_pick((unsigned char *)ext)) { + sep = "-"; + seplen = 1; + } else { + sep = SJIS_MINUS_SIGN; + seplen = 2; + } #endif /*I18N_UTF8*/ - if (current_joining_ext->type == joining_as_prefix) { - memcpy (plexbuff1, ext, extlen); - memcpy (&(plexbuff1[extlen]), sep, seplen); - memcpy (&(plexbuff1[extlen+seplen]), &(namebuf[0]), namelen+1); - } else if (current_joining_ext->type == joining_as_suffix) { - memcpy (plexbuff1, &(namebuf[0]), namelen); - memcpy (&(plexbuff1[namelen]), sep, seplen); - memcpy (&(plexbuff1[namelen+seplen]), ext, extlen+1); - } else if (current_joining_ext->type == prefixing) { - memcpy (plexbuff1, ext, extlen); - memcpy (&(plexbuff1[extlen]), &(namebuf[0]), namelen+1); - } else if (current_joining_ext->type == suffixing) { - memcpy (plexbuff1, &(namebuf[0]), namelen); - memcpy (&(plexbuff1[namelen]), ext, extlen+1); - } - ppecho (plexbuff1); - } + if (current_joining_ext->type == joining_as_prefix) { + memcpy(plexbuff1, ext, extlen); + memcpy(&(plexbuff1[extlen]), sep, seplen); + memcpy(&(plexbuff1[extlen + seplen]), &(namebuf[0]), namelen + 1); + } else if (current_joining_ext->type == joining_as_suffix) { + memcpy(plexbuff1, &(namebuf[0]), namelen); + memcpy(&(plexbuff1[namelen]), sep, seplen); + memcpy(&(plexbuff1[namelen + seplen]), ext, extlen + 1); + } else if (current_joining_ext->type == prefixing) { + memcpy(plexbuff1, ext, extlen); + memcpy(&(plexbuff1[extlen]), &(namebuf[0]), namelen + 1); + } else if (current_joining_ext->type == suffixing) { + memcpy(plexbuff1, &(namebuf[0]), namelen); + memcpy(&(plexbuff1[namelen]), ext, extlen + 1); + } + ppecho(plexbuff1); + } } -static void -switch_to_buffer (const int line, const char *file, YY_BUFFER_STATE buffer) -{ - char *p; - - cb_source_line = line; - cb_source_file = strdup (file); - for (p = cb_source_file; *p; p++) { - if (*p == '\\') { - *p = '/'; - } - } - yy_switch_to_buffer (buffer); - fprintf (yyout, "# %d \"%s\"\n", line, cb_source_file); +static void switch_to_buffer(const int line, const char *file, + YY_BUFFER_STATE buffer) { + char *p; + + cb_source_line = line; + cb_source_file = strdup(file); + for (p = cb_source_file; *p; p++) { + if (*p == '\\') { + *p = '/'; + } + } + yy_switch_to_buffer(buffer); + fprintf(yyout, "# %d \"%s\"\n", line, cb_source_file); } -int -ppopen (const char *name, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) -{ - struct copy_info *p; - - for (; newline_count > 0; newline_count--) { - ungetc ('\n', ppin); - } - - /* Open the copy file */ - ppin = fopen (name, "rb"); - if (!ppin) { - if (cb_source_file) { - cb_error (_("%s: %s"), name, strerror (errno)); - } else { - perror (name); - } - return -1; - } - - /* Add to dependency list */ - if (cb_depend_file) { - cb_depend_list = cb_text_list_add (cb_depend_list, name); - } - - /* Preserve the current buffer */ - p = cobc_malloc (sizeof (struct copy_info)); - p->line = cb_source_line; - p->file = cb_source_file; - p->replacing = replace_list ? 1 : 0; - p->joining = joining_ext ? 1 : 0; - p->buffer = YY_CURRENT_BUFFER; - p->quotation_mark = quotation_mark; - p->next = copy_stack; - copy_stack = p; - - /* Switch to new buffer */ - if (replace_list) { - pp_set_copy_replace_list (replace_list); - } - if (joining_ext) { - pp_set_joining_ext (joining_ext); - } - switch_to_buffer (1, name, yy_create_buffer (ppin, YY_BUF_SIZE)); - return 0; +int ppopen(const char *name, struct cb_joining_ext *joining_ext, + struct cb_replace_list *replace_list) { + struct copy_info *p; + + for (; newline_count > 0; newline_count--) { + ungetc('\n', ppin); + } + + /* Open the copy file */ + ppin = fopen(name, "rb"); + if (!ppin) { + if (cb_source_file) { + cb_error(_("%s: %s"), name, strerror(errno)); + } else { + perror(name); + } + return -1; + } + + /* Add to dependency list */ + if (cb_depend_file) { + cb_depend_list = cb_text_list_add(cb_depend_list, name); + } + + /* Preserve the current buffer */ + p = cobc_malloc(sizeof(struct copy_info)); + p->line = cb_source_line; + p->file = cb_source_file; + p->replacing = replace_list ? 1 : 0; + p->joining = joining_ext ? 1 : 0; + p->buffer = YY_CURRENT_BUFFER; + p->quotation_mark = quotation_mark; + p->next = copy_stack; + copy_stack = p; + + /* Switch to new buffer */ + if (replace_list) { + pp_set_copy_replace_list(replace_list); + } + if (joining_ext) { + pp_set_joining_ext(joining_ext); + } + switch_to_buffer(1, name, yy_create_buffer(ppin, YY_BUF_SIZE)); + return 0; } -int -ppcopy (const char *name, const char *lib, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) -{ - struct cb_text_list *il; - struct cb_text_list *el; - char *s; - struct stat st; - - if (lib) { - if (!plexbuff1) { - plexbuff1 = cobc_malloc (COB_SMALL_BUFF); - } - snprintf (plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); - s = plexbuff1; - } else { - s = (char *)name; - } - - /* Find the file */ - if (stat (s, &st) == 0) { - return ppopen (s, joining_ext, replace_list); - } - if (!plexbuff2) { - plexbuff2 = cobc_malloc (COB_SMALL_BUFF); - } - for (el = cb_extension_list; el; el = el->next) { - snprintf (plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); - if (stat (plexbuff2, &st) == 0) { - return ppopen (plexbuff2, joining_ext, replace_list); - } - } - if (*s != '/') { - for (il = cb_include_list; il; il = il->next) { - for (el = cb_extension_list; el; el = el->next) { - snprintf (plexbuff2, COB_SMALL_MAX, "%s/%s%s", - il->text, name, el->text); - if (stat (plexbuff2, &st) == 0) { - return ppopen (plexbuff2, joining_ext, replace_list); - } - } - } - } - cb_error (_("%s: %s"), name, strerror (errno)); - return -1; +int ppcopy(const char *name, const char *lib, + struct cb_joining_ext *joining_ext, + struct cb_replace_list *replace_list) { + struct cb_text_list *il; + struct cb_text_list *el; + char *s; + struct stat st; + + if (lib) { + if (!plexbuff1) { + plexbuff1 = cobc_malloc(COB_SMALL_BUFF); + } + snprintf(plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); + s = plexbuff1; + } else { + s = (char *)name; + } + + /* Find the file */ + if (stat(s, &st) == 0) { + return ppopen(s, joining_ext, replace_list); + } + if (!plexbuff2) { + plexbuff2 = cobc_malloc(COB_SMALL_BUFF); + } + for (el = cb_extension_list; el; el = el->next) { + snprintf(plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); + if (stat(plexbuff2, &st) == 0) { + return ppopen(plexbuff2, joining_ext, replace_list); + } + } + if (*s != '/') { + for (il = cb_include_list; il; il = il->next) { + for (el = cb_extension_list; el; el = el->next) { + snprintf(plexbuff2, COB_SMALL_MAX, "%s/%s%s", il->text, name, el->text); + if (stat(plexbuff2, &st) == 0) { + return ppopen(plexbuff2, joining_ext, replace_list); + } + } + } + } + cb_error(_("%s: %s"), name, strerror(errno)); + return -1; } /* Check directives */ /* This is horrible but we have to parse directives directly after the read */ /* as flex buffers up input and it is then too late to use the flex parser */ -static void -check_directive (char *buff, int *line_size) -{ - char *s; - char *dirptr; - size_t cnt; - int n; - char sbuff[5][256]; - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != ' ') { - return; - } - s = &buff[7]; - } else { - s = buff; - } - for (; *s == ' '; s++) { - ; - } - dirptr = s; - if (*s != '>') { - return; - } - s++; - if (*s != '>') { - return; - } - s++; - if (*s == 'D') { - if (cb_flag_debugging_line) { - memset (dirptr, ' ', 3); - } else { - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - strcat (buff, " *> DEBUG\n"); - *line_size = strlen (buff); - newline_count = 0; - } - return; - } - memset (sbuff[0], 0, sizeof (sbuff)); - n = sscanf (s, "%255s %255s %255s %255s %255s", - sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat (buff, " *> DIRECTIVE\n"); - *line_size = strlen (buff); - if (n < 2 || strcasecmp (sbuff[0], "SOURCE")) { - cb_warning (_("Invalid directive - ignored")); - return; - } - switch (n) { - case 2: - if (!strcasecmp (sbuff[1], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp (sbuff[1], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp (sbuff[1], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - break; - case 3: - if (strcasecmp (sbuff[1], "FORMAT") && - strcasecmp (sbuff[1], "IS")) { - break; - } - if (!strcasecmp (sbuff[2], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp (sbuff[2], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp (sbuff[2], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp (sbuff[2], "VARIABLE")){ - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - default: - if (strcasecmp (sbuff[1], "FORMAT")) { - break; - } - if (strcasecmp (sbuff[2], "IS")) { - break; - } - if (!strcasecmp (sbuff[3], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp (sbuff[3], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp (sbuff[3], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp (sbuff[3], "VARIABLE")){ - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - } - cb_warning (_("Invalid directive - ignored")); +static void check_directive(char *buff, int *line_size) { + char *s; + char *dirptr; + size_t cnt; + int n; + char sbuff[5][256]; + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != ' ') { + return; + } + s = &buff[7]; + } else { + s = buff; + } + for (; *s == ' '; s++) { + ; + } + dirptr = s; + if (*s != '>') { + return; + } + s++; + if (*s != '>') { + return; + } + s++; + if (*s == 'D') { + if (cb_flag_debugging_line) { + memset(dirptr, ' ', 3); + } else { + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + strcat(buff, " *> DEBUG\n"); + *line_size = strlen(buff); + newline_count = 0; + } + return; + } + memset(sbuff[0], 0, sizeof(sbuff)); + n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], + sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat(buff, " *> DIRECTIVE\n"); + *line_size = strlen(buff); + if (n < 2 || strcasecmp(sbuff[0], "SOURCE")) { + cb_warning(_("Invalid directive - ignored")); + return; + } + switch (n) { + case 2: + if (!strcasecmp(sbuff[1], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp(sbuff[1], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp(sbuff[1], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + break; + case 3: + if (strcasecmp(sbuff[1], "FORMAT") && strcasecmp(sbuff[1], "IS")) { + break; + } + if (!strcasecmp(sbuff[2], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp(sbuff[2], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp(sbuff[2], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp(sbuff[2], "VARIABLE")) { + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + default: + if (strcasecmp(sbuff[1], "FORMAT")) { + break; + } + if (strcasecmp(sbuff[2], "IS")) { + break; + } + if (!strcasecmp(sbuff[3], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp(sbuff[3], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp(sbuff[3], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp(sbuff[3], "VARIABLE")) { + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + } + cb_warning(_("Invalid directive - ignored")); } -static void -check_dollar_directive (char *buff, int *line_size) -{ - struct cb_constant_list *l; - char *s; - size_t cnt; - int n; - char sbuff[5][256]; - int isDEFINED, isNOT; - int i; - COB_UNUSED(n); - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != '$') { - return; - } - if (*line_size > cb_text_column + 1) { - strcpy (buff + cb_text_column, "\n"); - } - s = &buff[6]; - } else { - if (buff[1] != '$') { - return; - } - s = buff; - } - - memset (sbuff[0], 0, sizeof (sbuff)); - n = sscanf (s, "%255s %255s %255s %255s %255s", - sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat (buff, " *> DIRECTIVE\n"); - *line_size = strlen (buff); - - if (strcasecmp (sbuff[0], "$IF") == 0) { - compile_directive_depth++; - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("$IF is nested more than 10 times")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Fatal error in $IF statement")); - return; - } - if (strlen (sbuff[1]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Arguments not enough to $IF statemen")); - return; - } - - isDEFINED = 0; - isNOT = 0; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - if (strcasecmp (sbuff[2], "NOT") == 0) { - isNOT = 1; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - } - if (strcasecmp (sbuff[2+isNOT], "DEFINED") == 0) { - isDEFINED = 1; - } else if (strcasecmp (sbuff[2+isNOT], "=") != 0 || - strlen (sbuff[3+isNOT]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Invalid argument $IF statemen")); - return; - } - l = cb_const_list; - while (l) { - if (strcasecmp (l->name, sbuff[1]) == 0) { - if (isDEFINED) { - if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - break; - } else { - switch (l->type) { - case CB_CONSTANT_TYPE_ALPANUM: - if (strlen (sbuff[3+isNOT]) < 3 || - sbuff[3+isNOT] != strchr (sbuff[3+isNOT], '\"') || - sbuff[3+isNOT] == strrchr (sbuff[3+isNOT], '\"') || - strlen (strchr (sbuff[3+isNOT]+1, '\"')) > 1) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("%s is not a string"), sbuff[3+isNOT]); - return; - } - strcpy (strchr (sbuff[3+isNOT]+1, '\"'), ""); - if (strcasecmp (sbuff[3+isNOT]+1, l->alphavalue) == 0) { - if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - } - break; - case CB_CONSTANT_TYPE_NUMERIC: - //TODO - break; - default: - break; - } - break; - } - } - l = l->next; - } - } else if (strcasecmp (sbuff[0], "$ELSE") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Fatal error in $ELSE statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("$IF has no defined before the $ELSE")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_TRUE_ELSE || - cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE_ELSE) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("$ELSE has continued")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE) - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE_ELSE; - else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE_ELSE; - } else if (strcasecmp (sbuff[0], "$END") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Fatal error in $END statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("$IF has no defined before the $END")); - return; - } - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; - compile_directive_depth--; - } else if (strcasecmp (sbuff[0], "$SET") == 0) { - if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE)") == 0) { - cb_source_format = CB_FORMAT_FREE; - return; - } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { - cb_source_format = CB_FORMAT_FIXED; - return; - } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ - cb_source_format = CB_FORMAT_VARIABLE; - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Invalid $SET")); - return; - } - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error (_("Invalid $ statements")); - return; - } - - if (compile_directive_depth > -1) { - for (i = 0; i <= compile_directive_depth; i++) { - if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && - cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { - cb_compile_status = CB_COMPILE_STATUS_FALSE; - return; - } - } - } - if (*buff == '\n') { - cb_compile_status = CB_COMPILE_STATUS_FALSE_END; - } else { - cb_compile_status = CB_COMPILE_STATUS_TRUE; - } +static void check_dollar_directive(char *buff, int *line_size) { + struct cb_constant_list *l; + char *s; + size_t cnt; + int n; + char sbuff[5][256]; + int isDEFINED, isNOT; + int i; + COB_UNUSED(n); + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != '$') { + return; + } + if (*line_size > cb_text_column + 1) { + strcpy(buff + cb_text_column, "\n"); + } + s = &buff[6]; + } else { + if (buff[1] != '$') { + return; + } + s = buff; + } + + memset(sbuff[0], 0, sizeof(sbuff)); + n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], + sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat(buff, " *> DIRECTIVE\n"); + *line_size = strlen(buff); + + if (strcasecmp(sbuff[0], "$IF") == 0) { + compile_directive_depth++; + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("$IF is nested more than 10 times")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Fatal error in $IF statement")); + return; + } + if (strlen(sbuff[1]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Arguments not enough to $IF statemen")); + return; + } + + isDEFINED = 0; + isNOT = 0; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + if (strcasecmp(sbuff[2], "NOT") == 0) { + isNOT = 1; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + if (strcasecmp(sbuff[2 + isNOT], "DEFINED") == 0) { + isDEFINED = 1; + } else if (strcasecmp(sbuff[2 + isNOT], "=") != 0 || + strlen(sbuff[3 + isNOT]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Invalid argument $IF statemen")); + return; + } + l = cb_const_list; + while (l) { + if (strcasecmp(l->name, sbuff[1]) == 0) { + if (isDEFINED) { + if (isNOT) + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_FALSE; + else + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_TRUE; + break; + } else { + switch (l->type) { + case CB_CONSTANT_TYPE_ALPANUM: + if (strlen(sbuff[3 + isNOT]) < 3 || + sbuff[3 + isNOT] != strchr(sbuff[3 + isNOT], '\"') || + sbuff[3 + isNOT] == strrchr(sbuff[3 + isNOT], '\"') || + strlen(strchr(sbuff[3 + isNOT] + 1, '\"')) > 1) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("%s is not a string"), sbuff[3 + isNOT]); + return; + } + strcpy(strchr(sbuff[3 + isNOT] + 1, '\"'), ""); + if (strcasecmp(sbuff[3 + isNOT] + 1, l->alphavalue) == 0) { + if (isNOT) + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_FALSE; + else + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_TRUE; + } + break; + case CB_CONSTANT_TYPE_NUMERIC: + // TODO + break; + default: + break; + } + break; + } + } + l = l->next; + } + } else if (strcasecmp(sbuff[0], "$ELSE") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Fatal error in $ELSE statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("$IF has no defined before the $ELSE")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == + CB_COMPILE_STATUS_TRUE_ELSE || + cb_compile_status_list[compile_directive_depth] == + CB_COMPILE_STATUS_FALSE_ELSE) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("$ELSE has continued")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == + CB_COMPILE_STATUS_FALSE) + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_TRUE_ELSE; + else + cb_compile_status_list[compile_directive_depth] = + CB_COMPILE_STATUS_FALSE_ELSE; + } else if (strcasecmp(sbuff[0], "$END") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Fatal error in $END statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("$IF has no defined before the $END")); + return; + } + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; + compile_directive_depth--; + } else if (strcasecmp(sbuff[0], "$SET") == 0) { + if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE)") == 0) { + cb_source_format = CB_FORMAT_FREE; + return; + } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { + cb_source_format = CB_FORMAT_FIXED; + return; + } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0) { + cb_source_format = CB_FORMAT_VARIABLE; + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Invalid $SET")); + return; + } + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error(_("Invalid $ statements")); + return; + } + + if (compile_directive_depth > -1) { + for (i = 0; i <= compile_directive_depth; i++) { + if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && + cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { + cb_compile_status = CB_COMPILE_STATUS_FALSE; + return; + } + } + } + if (*buff == '\n') { + cb_compile_status = CB_COMPILE_STATUS_FALSE_END; + } else { + cb_compile_status = CB_COMPILE_STATUS_TRUE; + } } /* * Read line */ -static int -ppinput (char *buff, int max_size) -{ +static int ppinput(char *buff, int max_size) { - char *bp; - size_t gotcr; - size_t continuation = 0; - int ipchar; - int i; - int n; - int coln; - char *str1 = NULL; - char *str2 = NULL; - int comment_counter = 0; + char *bp; + size_t gotcr; + size_t continuation = 0; + int ipchar; + int i; + int n; + int coln; + char *str1 = NULL; + char *str2 = NULL; + int comment_counter = 0; start: - /* read a line */ - gotcr = 0; - ipchar = 0; - for (n = 0; n < 256 && ipchar != '\n';) { - ipchar = getc (ppin); - if (ipchar == EOF) { - if (n > 0) { - break; - } - if (newline_count == 0) { - return 0; - } - memset (buff, '\n', newline_count); - buff[newline_count] = 0; - newline_count = 0; - return strlen (buff); - } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 - && cb_source_format != CB_FORMAT_VARIABLE) { - if (ipchar != ' ' && ipchar != '\n') { - buff[n++] = ' '; - } - } - if (gotcr) { - if (ipchar != '\n') { - buff[n++] = '\r'; - } - gotcr = 0; - } - if (ipchar == '\r') { - gotcr = 1; - } else if (ipchar == '\t') { - buff[n++] = ' '; - while (n % cb_tab_width != 0) { - buff[n++] = ' '; - } - } else { - buff[n++] = ipchar; - } - } - - if (buff[n - 1] != '\n') { - cb_warning (_("Line not terminated by a newline")); - buff[n++] = '\n'; - } - buff[n] = 0; - if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { - strcpy (buff, "\n"); - return strlen (buff); - } - str1 = strstr (buff, "*>"); - if (str1 != NULL) { - if ((str1-buff) >= 7) { - str2 = strstr (str1, "\""); - if (str2 == NULL) { - buff[str1-buff] = '\n'; - buff[str1-buff +1] = '\0'; - n = strlen (buff); - } - } - } - check_directive (buff, &n); - check_dollar_directive (buff, &n); - if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { - return YY_NULL; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { - newline_count++; - comment_counter++; - goto start; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { - cb_compile_status = CB_COMPILE_STATUS_NONE; - newline_count++; - comment_counter++; - goto start; - } - - /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { - return n; - } - - /* line too short */ - if (n < 8) { - newline_count++; - comment_counter++; - goto start; - } - - if (cb_flag_mfcomment) { - if (buff[0] == '*' || buff[0] == '/') { - /*if(!cb_flag_no_cobol_comment) { - register_comment(0, buff, comment_counter++); - }*/ - newline_count++; - goto start; - } - } - /* check the indicator (column 7) */ - bp = buff + 7; - switch (buff[6]) { - case ' ': - break; - case '-': - continuation = 1; - break; - case 'd': - case 'D': - /* debugging line */ - if (cb_flag_debugging_line) { - break; - } - newline_count++; - comment_counter++; - goto start; - case '*': - case '/': - /* comment line */ - /*if(!cb_flag_no_cobol_comment) { - register_comment(6, buff, comment_counter++); - }*/ - newline_count++; - goto start; - default: - /* invalid indicator */ - cb_error (_("Invalid indicator '%c' at column 7"), buff[6]); - return YY_NULL; - } - - /* skip comments that follow after AUTHORS, etc. */ - if (within_comment) { - /* Check all of "Area A" */ - switch (n) { - case 8: - if (buff[7] == ' ') { - newline_count++; - comment_counter++; - goto start; - } - break; - case 9: - if (!memcmp (&buff[7], " ", 2)) { - newline_count++; - comment_counter++; - goto start; - } - break; - case 10: - if (!memcmp (&buff[7], " ", 3)) { - newline_count++; - comment_counter++; - goto start; - } - break; - default: - if (!memcmp (&buff[7], " ", 4)) { - newline_count++; - comment_counter++; - goto start; - } - break; - } - within_comment = 0; - } - - /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { - - /* show warning if it is not whitespaces */ - if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { - for (coln = cb_text_column; coln < n; coln++) { - if (buff[coln] != ' ' && buff[coln] != '\n') { - cb_warning (_("Source text after column %d"), - cb_text_column); - break; - } - } - } - - /* remove it */ - strcpy (buff + cb_text_column, "\n"); - last_line_2 = cb_source_line; - n = cb_text_column + 1; - } - - /* skip blank lines */ - for (i = 7; buff[i] == ' '; i++) ; - if (buff[i] == '\n') { - newline_count++; - comment_counter++; - goto start; - } - - if (continuation) { - /* line continuation */ - for (; *bp == ' '; bp++) ; - - /* validate concatenation */ - if (consecutive_quotation) { - if (bp[0] == quotation_mark && bp[1] == quotation_mark) { - bp++; - } else { - cb_error (_("Invalid line continuation")); - return YY_NULL; - } - quotation_mark = 0; - consecutive_quotation = 0; - } else if (quotation_mark) { - /* literal concatenation */ - if (*bp == quotation_mark) { - bp++; - } else { - cb_error (_("Invalid line continuation")); - return YY_NULL; - } - } - } else { - /* normal line */ - quotation_mark = 0; - consecutive_quotation = 0; - } - - /* check if string literal is to be continued */ - for (i = bp - buff; buff[i] != '\n'; i++) { - if (buff[i] == '\'' || buff[i] == '\"') { - if (quotation_mark == 0) { - /* literal start */ - quotation_mark = buff[i]; - } else if (quotation_mark == buff[i]) { - if (i == cb_text_column - 1) { - /* consecutive quotation */ - consecutive_quotation = 1; - } else { - /* literal end */ - quotation_mark = 0; - } - } - } - } - - /* truncate trailing spaces, including the newline */ - if (quotation_mark) { - for (; i < 72;) { - buff[i++] = ' '; - } - buff[i] = 0; - } else { - for (i--; buff[i] == ' '; i--) ; - if (buff[i] == '\'' || buff[i] == '\"') { - buff[++i] = ' '; - } - buff[i + 1] = 0; - } - - if (continuation) { - memmove (buff, bp, strlen (bp) + 1); - newline_count++; - comment_counter++; - } else { - /* insert newlines at the start of the buffer */ - memmove (buff + newline_count, bp, strlen (bp) + 1); - memset (buff, '\n', newline_count); - newline_count = 1; - } - - return strlen (buff); -} + /* read a line */ + gotcr = 0; + ipchar = 0; + for (n = 0; n < 256 && ipchar != '\n';) { + ipchar = getc(ppin); + if (ipchar == EOF) { + if (n > 0) { + break; + } + if (newline_count == 0) { + return 0; + } + memset(buff, '\n', newline_count); + buff[newline_count] = 0; + newline_count = 0; + return strlen(buff); + } + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && + cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE) { + if (ipchar != ' ' && ipchar != '\n') { + buff[n++] = ' '; + } + } + if (gotcr) { + if (ipchar != '\n') { + buff[n++] = '\r'; + } + gotcr = 0; + } + if (ipchar == '\r') { + gotcr = 1; + } else if (ipchar == '\t') { + buff[n++] = ' '; + while (n % cb_tab_width != 0) { + buff[n++] = ' '; + } + } else { + buff[n++] = ipchar; + } + } -static void -ppecho_0 (const char *text, - struct cb_text_list **pqueue, - struct cb_replace_list **preplace, - void (ppecho_proc)(const char *)) { - - struct cb_replace_list *r; - struct cb_text_list *l; - struct cb_text_list *queue; - - if (suppress_echo) { - /* generate no output */ - } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { - ppecho_proc (text); - } else if (!*preplace) { - for (; *pqueue; *pqueue = (*pqueue)->next) { - ppecho_proc ((*pqueue)->text); - } - ppecho_proc (text); - } else { - /* Do replacement */ - - *pqueue = cb_text_list_add (*pqueue, text); - - while (*pqueue) { - for (r = *preplace; r; r = r->next) { - queue = *pqueue; - for (l = r->old_text; l; l = l->next) { - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l == NULL) { - break; - } - while (queue && (queue->text[0] == ' ' || - queue->text[0] == '\n')) { - queue = queue->next; - } - if (queue == NULL) { - return; /* partial match */ - } - if (r->replace_type == CB_REPLACE_LEADING) { - break; - } else if (r->replace_type == CB_REPLACE_TRAILING) { - break; - } else if (r->replace_type == CB_REPLACE_OTHER) { - if (strcasecmp (l->text, queue->text) != 0) { - break; - } - } - queue = queue->next; - } - if (r->replace_type == CB_REPLACE_LEADING) { - if (!l || !queue) { - continue; - } - if (strncasecmp (l->text, queue->text, strlen (l->text)) == 0) { - break; - } - } else if (r->replace_type == CB_REPLACE_TRAILING) { - if (!l || !queue || strlen (queue->text) < strlen (r->old_text->text)) { - continue; - } - if (strcasecmp (queue->text + strlen (queue->text) - strlen (r->old_text->text), r->old_text->text) == 0) { - break; - } - } else if (l == NULL) { - /* match */ - break; - } - } - - /* match */ - if (r && r->replace_type == CB_REPLACE_LEADING) { - int oldlen = strlen (l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc (l->text); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc (l->text); - } - ppecho_proc (queue->text + oldlen); - queue = queue->next; - } else if (r && r->replace_type == CB_REPLACE_TRAILING) { - int i; - int oldlen = strlen (l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc (l->text); - } - for (i = 0; i < strlen (queue->text) - oldlen; i++) { - fputc (queue->text[i], ppout); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc (l->text); - } - queue = queue->next; - } else if (r && l == NULL) { - for (l = r->new_text; l; l = l->next) { - ppecho_proc (l->text); - } - } else { - /* no match */ - if (!*pqueue) { - break; - } - ppecho_proc ((*pqueue)->text); - queue = (*pqueue)->next; - } - - while (*pqueue != queue) { - if (!*pqueue) break; - - l = (*pqueue)->next; - free (*pqueue); - *pqueue = l; - } - } - } -} + if (buff[n - 1] != '\n') { + cb_warning(_("Line not terminated by a newline")); + buff[n++] = '\n'; + } + buff[n] = 0; + if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { + strcpy(buff, "\n"); + return strlen(buff); + } + str1 = strstr(buff, "*>"); + if (str1 != NULL) { + if ((str1 - buff) >= 7) { + str2 = strstr(str1, "\""); + if (str2 == NULL) { + buff[str1 - buff] = '\n'; + buff[str1 - buff + 1] = '\0'; + n = strlen(buff); + } + } + } + check_directive(buff, &n); + check_dollar_directive(buff, &n); + if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { + return YY_NULL; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { + newline_count++; + comment_counter++; + goto start; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { + cb_compile_status = CB_COMPILE_STATUS_NONE; + newline_count++; + comment_counter++; + goto start; + } -static void -ppecho_final (const char *text) -{ - fputs (text, ppout); -} + /* nothing more to do with free format */ + if (cb_source_format != CB_FORMAT_FIXED && + cb_source_format != CB_FORMAT_VARIABLE) { + return n; + } -static void -ppecho_2 (const char *text) -{ - /* process REPLACE */ - ppecho_0 (text, &text_queue2, ¤t_replace_list, ppecho_final); -} + /* line too short */ + if (n < 8) { + newline_count++; + comment_counter++; + goto start; + } -static void -ppecho_1 (const char *text) -{ - /* process COPY REPLACING */ - ppecho_0 (text, &text_queue1, ¤t_copy_replace_list, ppecho_2); -} + if (cb_flag_mfcomment) { + if (buff[0] == '*' || buff[0] == '/') { + /*if(!cb_flag_no_cobol_comment) { + register_comment(0, buff, comment_counter++); + }*/ + newline_count++; + goto start; + } + } + /* check the indicator (column 7) */ + bp = buff + 7; + switch (buff[6]) { + case ' ': + break; + case '-': + continuation = 1; + break; + case 'd': + case 'D': + /* debugging line */ + if (cb_flag_debugging_line) { + break; + } + newline_count++; + comment_counter++; + goto start; + case '*': + case '/': + /* comment line */ + /*if(!cb_flag_no_cobol_comment) { + register_comment(6, buff, comment_counter++); + }*/ + newline_count++; + goto start; + default: + /* invalid indicator */ + cb_error(_("Invalid indicator '%c' at column 7"), buff[6]); + return YY_NULL; + } -static void -ppecho (const char *text) -{ - ppecho_1 (text); + /* skip comments that follow after AUTHORS, etc. */ + if (within_comment) { + /* Check all of "Area A" */ + switch (n) { + case 8: + if (buff[7] == ' ') { + newline_count++; + comment_counter++; + goto start; + } + break; + case 9: + if (!memcmp(&buff[7], " ", 2)) { + newline_count++; + comment_counter++; + goto start; + } + break; + case 10: + if (!memcmp(&buff[7], " ", 3)) { + newline_count++; + comment_counter++; + goto start; + } + break; + default: + if (!memcmp(&buff[7], " ", 4)) { + newline_count++; + comment_counter++; + goto start; + } + break; + } + within_comment = 0; + } + + /* check the text that is longer than cb_text_column */ + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + + /* show warning if it is not whitespaces */ + if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { + for (coln = cb_text_column; coln < n; coln++) { + if (buff[coln] != ' ' && buff[coln] != '\n') { + cb_warning(_("Source text after column %d"), cb_text_column); + break; + } + } + } + + /* remove it */ + strcpy(buff + cb_text_column, "\n"); + last_line_2 = cb_source_line; + n = cb_text_column + 1; + } + + /* skip blank lines */ + for (i = 7; buff[i] == ' '; i++) + ; + if (buff[i] == '\n') { + newline_count++; + comment_counter++; + goto start; + } + + if (continuation) { + /* line continuation */ + for (; *bp == ' '; bp++) + ; + + /* validate concatenation */ + if (consecutive_quotation) { + if (bp[0] == quotation_mark && bp[1] == quotation_mark) { + bp++; + } else { + cb_error(_("Invalid line continuation")); + return YY_NULL; + } + quotation_mark = 0; + consecutive_quotation = 0; + } else if (quotation_mark) { + /* literal concatenation */ + if (*bp == quotation_mark) { + bp++; + } else { + cb_error(_("Invalid line continuation")); + return YY_NULL; + } + } + } else { + /* normal line */ + quotation_mark = 0; + consecutive_quotation = 0; + } + + /* check if string literal is to be continued */ + for (i = bp - buff; buff[i] != '\n'; i++) { + if (buff[i] == '\'' || buff[i] == '\"') { + if (quotation_mark == 0) { + /* literal start */ + quotation_mark = buff[i]; + } else if (quotation_mark == buff[i]) { + if (i == cb_text_column - 1) { + /* consecutive quotation */ + consecutive_quotation = 1; + } else { + /* literal end */ + quotation_mark = 0; + } + } + } + } + + /* truncate trailing spaces, including the newline */ + if (quotation_mark) { + for (; i < 72;) { + buff[i++] = ' '; + } + buff[i] = 0; + } else { + for (i--; buff[i] == ' '; i--) + ; + if (buff[i] == '\'' || buff[i] == '\"') { + buff[++i] = ' '; + } + buff[i + 1] = 0; + } + + if (continuation) { + memmove(buff, bp, strlen(bp) + 1); + newline_count++; + comment_counter++; + } else { + /* insert newlines at the start of the buffer */ + memmove(buff + newline_count, bp, strlen(bp) + 1); + memset(buff, '\n', newline_count); + newline_count = 1; + } + + return strlen(buff); } -void pp_set_current_division (int divno) -{ - current_division = divno; +static void ppecho_0(const char *text, struct cb_text_list **pqueue, + struct cb_replace_list **preplace, + void(ppecho_proc)(const char *)) { + + struct cb_replace_list *r; + struct cb_text_list *l; + struct cb_text_list *queue; + + if (suppress_echo) { + /* generate no output */ + } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { + ppecho_proc(text); + } else if (!*preplace) { + for (; *pqueue; *pqueue = (*pqueue)->next) { + ppecho_proc((*pqueue)->text); + } + ppecho_proc(text); + } else { + /* Do replacement */ + + *pqueue = cb_text_list_add(*pqueue, text); + + while (*pqueue) { + for (r = *preplace; r; r = r->next) { + queue = *pqueue; + for (l = r->old_text; l; l = l->next) { + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l == NULL) { + break; + } + while (queue && (queue->text[0] == ' ' || queue->text[0] == '\n')) { + queue = queue->next; + } + if (queue == NULL) { + return; /* partial match */ + } + if (r->replace_type == CB_REPLACE_LEADING) { + break; + } else if (r->replace_type == CB_REPLACE_TRAILING) { + break; + } else if (r->replace_type == CB_REPLACE_OTHER) { + if (strcasecmp(l->text, queue->text) != 0) { + break; + } + } + queue = queue->next; + } + if (r->replace_type == CB_REPLACE_LEADING) { + if (!l || !queue) { + continue; + } + if (strncasecmp(l->text, queue->text, strlen(l->text)) == 0) { + break; + } + } else if (r->replace_type == CB_REPLACE_TRAILING) { + if (!l || !queue || strlen(queue->text) < strlen(r->old_text->text)) { + continue; + } + if (strcasecmp(queue->text + strlen(queue->text) - + strlen(r->old_text->text), + r->old_text->text) == 0) { + break; + } + } else if (l == NULL) { + /* match */ + break; + } + } + + /* match */ + if (r && r->replace_type == CB_REPLACE_LEADING) { + int oldlen = strlen(l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc(l->text); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc(l->text); + } + ppecho_proc(queue->text + oldlen); + queue = queue->next; + } else if (r && r->replace_type == CB_REPLACE_TRAILING) { + int i; + int oldlen = strlen(l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc(l->text); + } + for (i = 0; i < strlen(queue->text) - oldlen; i++) { + fputc(queue->text[i], ppout); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc(l->text); + } + queue = queue->next; + } else if (r && l == NULL) { + for (l = r->new_text; l; l = l->next) { + ppecho_proc(l->text); + } + } else { + /* no match */ + if (!*pqueue) { + break; + } + ppecho_proc((*pqueue)->text); + queue = (*pqueue)->next; + } + + while (*pqueue != queue) { + if (!*pqueue) + break; + + l = (*pqueue)->next; + free(*pqueue); + *pqueue = l; + } + } + } } -void pp_omit_data_entry_name (int on_off) -{ - omit_data_entry_name = on_off; +static void ppecho_final(const char *text) { fputs(text, ppout); } + +static void ppecho_2(const char *text) { + /* process REPLACE */ + ppecho_0(text, &text_queue2, ¤t_replace_list, ppecho_final); } -void pp_omit_data_redef_name (int on_off) -{ - omit_data_redef_name = on_off; +static void ppecho_1(const char *text) { + /* process COPY REPLACING */ + ppecho_0(text, &text_queue1, ¤t_copy_replace_list, ppecho_2); } -void register_comment(int comment_mark_index, char* buffer, int delta) { - struct comment_info* p = malloc(sizeof(struct comment_info)); - p->file = cb_source_file; - p->line = cb_source_line + delta + 1; - - // Remove the unnecessary part of the comment - int str_len_original_line = strlen(buffer); - int comment_end_index; - if(buffer[str_len_original_line - 1] == '\n') { - if(str_len_original_line >= 2 && buffer[str_len_original_line - 1] == '\r') { - comment_end_index = str_len_original_line - 2; - } else { - comment_end_index = str_len_original_line - 1; - } - } else { - comment_end_index = str_len_original_line; - } - int comment_len = comment_end_index - comment_mark_index - 1; - p->comment = malloc(comment_len + 1); - memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); - p->comment[comment_len] = '\0'; - - p->prev = comment_info_list_last; - p->next = NULL; - p->is_base_cobol_file = copy_stack->next == NULL; - p->position_in_source_code = position_in_source_code; - if(comment_info_list_last != NULL) { - comment_info_list_last->next = p; - } - comment_info_list_last = p; - if(comment_info_list_head == NULL) { - comment_info_list_head = p; - } +static void ppecho(const char *text) { ppecho_1(text); } + +void pp_set_current_division(int divno) { current_division = divno; } + +void pp_omit_data_entry_name(int on_off) { omit_data_entry_name = on_off; } + +void pp_omit_data_redef_name(int on_off) { omit_data_redef_name = on_off; } + +void register_comment(int comment_mark_index, char *buffer, int delta) { + struct comment_info *p = malloc(sizeof(struct comment_info)); + p->file = cb_source_file; + p->line = cb_source_line + delta + 1; + + // Remove the unnecessary part of the comment + int str_len_original_line = strlen(buffer); + int comment_end_index; + if (buffer[str_len_original_line - 1] == '\n') { + if (str_len_original_line >= 2 && + buffer[str_len_original_line - 1] == '\r') { + comment_end_index = str_len_original_line - 2; + } else { + comment_end_index = str_len_original_line - 1; + } + } else { + comment_end_index = str_len_original_line; + } + int comment_len = comment_end_index - comment_mark_index - 1; + p->comment = malloc(comment_len + 1); + memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); + p->comment[comment_len] = '\0'; + + p->prev = comment_info_list_last; + p->next = NULL; + p->is_base_cobol_file = copy_stack->next == NULL; + p->position_in_source_code = position_in_source_code; + if (comment_info_list_last != NULL) { + comment_info_list_last->next = p; + } + comment_info_list_last = p; + if (comment_info_list_head == NULL) { + comment_info_list_head = p; + } } diff --git a/cobj/pplex.l b/cobj/pplex.l index e087042a..76bd67c9 100644 --- a/cobj/pplex.l +++ b/cobj/pplex.l @@ -112,20 +112,11 @@ static void switch_to_buffer (const int lineno, const char *filename, %} -ZENSPC [\xE3][\x80][\x80] -U00_7F [\x00-\x7F] -U80_7FF [\xC2-\xDF][\x80-\xBF] -U800_FFF [\xE0][\xA0-\xBF][\x80-\xBF] -U1000_CFFF [\xE1-\xEC][\x80-\xBF][\x80-\xBF] -U1000_EX_ZENSPC [\xE1-\xE2][\x80-\xBF][\x80-\xBF]|[\xE3][\x80-\xBF][\x81-\xBF]|[\xE3][\x81-\xBF][\x80-\xBF]|[\xE4-\xEC][\x80-\xBF][\x80-\xBF] -UD000_D7FF [\xED][\x80-\x9F][\x80-\xBF] -UE000_FFFF [\xEE-\xEF][\x80-\xBF][\x80-\xBF] -U10000_3FFFF [\xF0][\x90-\xBF][\x80-\xBF][\x80-\xBF] -U30000_FFFFF [\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF] -U100000_10FFFF [\xF4][\x80-\x8F][\x80-\xBF][\x80-\xBF] -UTF8_EXT {U80_7FF}|{U800_FFF}|{U1000_EX_ZENSPC}|{UD000_D7FF}|{UE000_FFFF}|{U10000_3FFFF}|{U30000_FFFFF}|{U100000_10FFFF} -UTF8 {U00_7F}|{UTF8_EXT} -WORD ({UTF8_EXT}|[_0-9A-Z-])+ +ZENSPC [\x81][\x40] +SJIS [\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC] +SJIS_EX_ZENSPC [\x82-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC]|[\x81][\x40-\x7E\x80-\xFC]{-}[\x40] +JPNWORD [\xA0-\xDF]|{SJIS_EX_ZENSPC} +WORD ([_0-9A-Z-]|{JPNWORD})+ NUMRIC_LITERAL [+-]?[0-9,.]*[0-9] ALNUM_LITERAL \"[^\"\n]*\"|\'[^\'\n]*\' @@ -462,16 +453,8 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - *p = '_'; - memmove(p+1, p+3, strlen(p+3)+1); - p++; - } - - p = namebuf; - while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { - *p = '_'; - memmove(p+1, p+3, strlen(p+3)+1); - p++; + memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); + p += 3; } return; } diff --git a/configure b/configure index c204c6ef..5f918060 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.5. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.6. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.5' -PACKAGE_VERSION='1.1.5' -PACKAGE_STRING='opensource COBOL 4J 1.1.5' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.6' +PACKAGE_VERSION='1.1.6' +PACKAGE_STRING='opensource COBOL 4J 1.1.6' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.5 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.5] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.6] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.5:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.6:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.5 +opensource COBOL 4J configure 1.1.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.5, which was +It was created by opensource COBOL 4J $as_me 1.1.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.5' - VERSION='1.1.5' + PACKAGE='opensource-cobol-4j-1.1.6' + VERSION='1.1.6' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.5, which was +This file was extended by opensource COBOL 4J $as_me 1.1.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.5 +opensource COBOL 4J config.status 1.1.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f8edc10a..8ebb8a21 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.5],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.5]) +AC_INIT([opensource COBOL 4J],[1.1.6],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.6]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 3ff67021..dc523499 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.5" + version = "1.1.6" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index f9c342b0..02235e55 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.5"; + public static final String version = "1.1.6"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java index 51ee6933..9b6de1f6 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java @@ -53,7 +53,6 @@ public static AbstractCobolField makeCobolField( /** * TODO: 準備中 * - * @param size TODO: 準備中 * @param bytes TODO: 準備中 * @param attr TODO: 準備中 * @return TODO: 準備中 diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index c87b2530..6f968809 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.5"); + System.out.println("1.1.6"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 2c15747b..d59c23a2 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.5", + "opensourcecobol4j_version": "1.1.6", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.5", + "opensourcecobol4j_version": "1.1.6", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.5", + "opensourcecobol4j_version": "1.1.6", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.5", + "opensourcecobol4j_version": "1.1.6", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 8b7e6865..512c82c2 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.5]) -m4_define([AT_PACKAGE_VERSION], [1.1.5]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.5]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.6]) +m4_define([AT_PACKAGE_VERSION], [1.1.6]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.6]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 7cc970c4..784acc8c 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.5" +#define PACKAGE "opensource-cobol4j-1.1.6" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.5" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.6" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.5" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.6" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.5" +#define PACKAGE_VERSION "1.1.6" /* Define a patch level */ #define PATCH_LEVEL 0 From b7cef72a46d8895693cd49a48c85be72085a444f Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 3 Feb 2025 10:45:26 +0900 Subject: [PATCH 085/188] Fix installaton commands of the UTF-8 compatible compiler (#584) --- README.md | 2 +- README_JP.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2af423aa..1822f123 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ In order to install a compiler for UTF-8 encoded COBOL source code, run the foll curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz tar zxvf opensourcecobol4j-v1.1.6.tar.gz cd opensourcecobol4j-1.1.6 -./configure --prefix=/usr/ +./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make sudo make install diff --git a/README_JP.md b/README_JP.md index 52463482..874b3f26 100644 --- a/README_JP.md +++ b/README_JP.md @@ -60,7 +60,7 @@ UTF-8のCOBOLソースコード対応版コンパイラをインストールす curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz tar zxvf opensourcecobol4j-v1.1.6.tar.gz cd opensourcecobol4j-1.1.6 -./configure --prefix=/usr/ +./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make sudo make install From 3052a3b18a9bf6f204208e8a14cb554be7783af5 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:03:11 +0900 Subject: [PATCH 086/188] Implement an encoding switcher of DISPLAY/ACCEPT statements (#590) --- .github/workflows/test-other.yml | 11 ++--- .../libcobj/common/CobolEncoding.java | 15 +++++++ .../libcobj/common/CobolUtil.java | 13 ++++++ .../libcobj/termio/CobolTerminal.java | 29 ++++++++++++- tests/i18n_sjis.src/data/in-sjis.txt | 3 ++ tests/i18n_sjis.src/data/in-utf8.txt | 3 ++ tests/i18n_sjis.src/data/out-sjis.txt | 7 ++++ tests/i18n_sjis.src/data/out-utf8.txt | 7 ++++ tests/i18n_sjis.src/pic-x.at | 42 ++++++++++++++++++- 9 files changed, 119 insertions(+), 11 deletions(-) create mode 100644 libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolEncoding.java create mode 100644 tests/i18n_sjis.src/data/in-sjis.txt create mode 100644 tests/i18n_sjis.src/data/in-utf8.txt create mode 100644 tests/i18n_sjis.src/data/out-sjis.txt create mode 100644 tests/i18n_sjis.src/data/out-utf8.txt diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index 923a0842..ec87da84 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -50,9 +50,9 @@ jobs: run: | dnf -y update dnf install -y gcc make diffutils glibc-gconv-extra unzip wget - wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate + wget "https://github.com/nurse/nkf/archive/refs/tags/v2_1_3.tar.gz" -O nkf-2.1.3.tar.gz tar zxf nkf-2.1.3.tar.gz - cd nkf-2.1.3 + cd nkf-2_1_3 make make install @@ -60,12 +60,7 @@ jobs: if: inputs.os == 'amazonlinux:2023' run: | dnf -y update - dnf install -y gcc make diffutils tar gzip unzip wget - wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate - tar zxf nkf-2.1.3.tar.gz - cd nkf-2.1.3 - make - make install + dnf install -y gcc make diffutils tar gzip unzip wget nkf - name: Install Java if: inputs.os == 'amazonlinux:2023' diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolEncoding.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolEncoding.java new file mode 100644 index 00000000..3db3ded2 --- /dev/null +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolEncoding.java @@ -0,0 +1,15 @@ +package jp.osscons.opensourcecobol.libcobj.common; + +/** + * 文字コードを表す列挙型 + */ +public enum CobolEncoding { + /** + * UTF-8を表す + */ + UTF8, + /** + * Shift_JISを表す + */ + SHIFT_JIS, +}; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java index 5c67989b..8a9ea677 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java @@ -72,6 +72,9 @@ public class CobolUtil { /** TDOD: 準備中 */ public static int fileSeqWriteBufferSize = 10; + /** DISPLAY/ACCEPT文によるデータ出力時のエンコーディング */ + public static CobolEncoding terminalEncoding = CobolEncoding.SHIFT_JIS; + private static boolean lineTrace = false; /** TDOD: 準備中 */ @@ -349,6 +352,16 @@ public static void cob_init(String[] argv, boolean cobInitialized) { CobolUtil.fileSeqWriteBufferSize = size; } } + + s = System.getenv("COB_TERMINAL_ENCODING"); + CobolUtil.terminalEncoding = CobolEncoding.SHIFT_JIS; + if (s != null) { + Pattern p = Pattern.compile("[uU][tT][fF][_-]?8"); + Matcher m = p.matcher(s); + if (m.matches()) { + CobolUtil.terminalEncoding = CobolEncoding.UTF8; + } + } } // libcob/common.cとcob_localtime diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java index bd6a7fbd..4ce02d62 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java @@ -18,11 +18,16 @@ */ package jp.osscons.opensourcecobol.libcobj.termio; +import java.io.InputStreamReader; import java.io.PrintStream; import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.charset.UnsupportedCharsetException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Scanner; +import jp.osscons.opensourcecobol.libcobj.common.CobolEncoding; import jp.osscons.opensourcecobol.libcobj.common.CobolModule; import jp.osscons.opensourcecobol.libcobj.common.CobolUtil; import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; @@ -68,7 +73,16 @@ public static void display(boolean dispStdout, boolean newline, AbstractCobolFie private static void displayAlnum(AbstractCobolField f, PrintStream stream) { CobolDataStorage storage = f.getDataStorage(); - stream.write(storage.getRefOfData(), storage.getIndex(), f.getSize()); + if (CobolUtil.terminalEncoding == CobolEncoding.UTF8) { + byte[] utf8Bytes = + new String( + storage.getByteArrayRef(0, f.getSize()), + AbstractCobolField.charSetSJIS) + .getBytes(StandardCharsets.UTF_8); + stream.write(utf8Bytes, 0, utf8Bytes.length); + } else { + stream.write(storage.getRefOfData(), storage.getIndex(), f.getSize()); + } } /** @@ -108,7 +122,18 @@ public static void display( public static void accept(AbstractCobolField f) { try { if (scan == null) { - scan = new Scanner(System.in); + if (CobolUtil.terminalEncoding == CobolEncoding.UTF8) { + scan = new Scanner(new InputStreamReader(System.in, StandardCharsets.UTF_8)); + } else { + try { + scan = + new Scanner( + new InputStreamReader( + System.in, Charset.forName("Shift_JIS"))); + } catch (UnsupportedCharsetException e) { + scan = new Scanner(System.in); + } + } } String input = scan.nextLine(); diff --git a/tests/i18n_sjis.src/data/in-sjis.txt b/tests/i18n_sjis.src/data/in-sjis.txt new file mode 100644 index 00000000..4e36865c --- /dev/null +++ b/tests/i18n_sjis.src/data/in-sjis.txt @@ -0,0 +1,3 @@ +dH + +ŠH diff --git a/tests/i18n_sjis.src/data/in-utf8.txt b/tests/i18n_sjis.src/data/in-utf8.txt new file mode 100644 index 00000000..2904d1f1 --- /dev/null +++ b/tests/i18n_sjis.src/data/in-utf8.txt @@ -0,0 +1,3 @@ +重工業 +給水所 +洗濯板滑走路 diff --git a/tests/i18n_sjis.src/data/out-sjis.txt b/tests/i18n_sjis.src/data/out-sjis.txt new file mode 100644 index 00000000..5f6ced6d --- /dev/null +++ b/tests/i18n_sjis.src/data/out-sjis.txt @@ -0,0 +1,7 @@ +{ +R +㒆 +wZ +dH + + diff --git a/tests/i18n_sjis.src/data/out-utf8.txt b/tests/i18n_sjis.src/data/out-utf8.txt new file mode 100644 index 00000000..6d00de6c --- /dev/null +++ b/tests/i18n_sjis.src/data/out-utf8.txt @@ -0,0 +1,7 @@ +日本語 +山梨県 +上中下 +小学校 +重工業 +給水所 +洗濯板 diff --git a/tests/i18n_sjis.src/pic-x.at b/tests/i18n_sjis.src/pic-x.at index c9c92812..113c67bb 100644 --- a/tests/i18n_sjis.src/pic-x.at +++ b/tests/i18n_sjis.src/pic-x.at @@ -541,4 +541,44 @@ AT_CHECK([grep ' AT_CHECK([grep '2' < prog3.java > /dev/null]) AT_CHECK([grep '3' < prog3.java > /dev/null]) -AT_CLEANUP \ No newline at end of file +AT_CLEANUP + +AT_SETUP([DISPLAY/ACCEPT encodings]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X1 PIC X(6) VALUE "R". + 01 N1 PIC N(3) VALUE "㒆". + 01 G1. + 03 X2 PIC X(6) VALUE "wZ". + 01 N2 PIC N(3) VALUE "ؗ". + PROCEDURE DIVISION. + DISPLAY "{". + DISPLAY X1. + DISPLAY N1. + DISPLAY G1. + + ACCEPT X1. + DISPLAY X1. + ACCEPT N1. + DISPLAY N1. + ACCEPT G1. + DISPLAY G1. + STOP RUN. +]) + +AT_CHECK([cobj prog.cbl]) + +AT_CHECK([java prog < ../../i18n_sjis.src/data/in-sjis.txt > out-none.txt]) +AT_CHECK([COB_TERMINAL_ENCODING=SHIFT_JIS java prog < ../../i18n_sjis.src/data/in-sjis.txt > out-sjis.txt]) +AT_CHECK([COB_TERMINAL_ENCODING=UTF-8 java prog < ../../i18n_sjis.src/data/in-utf8.txt > out-utf8.txt]) + +AT_CHECK([diff out-none.txt ../../i18n_sjis.src/data/out-sjis.txt]) +AT_CHECK([diff out-sjis.txt ../../i18n_sjis.src/data/out-sjis.txt]) +AT_CHECK([diff out-utf8.txt ../../i18n_sjis.src/data/out-utf8.txt]) + +AT_CLEANUP From d09297cecfe1b2e8d8ddd3248918562a47a0cc9c Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:46:19 +0900 Subject: [PATCH 087/188] Fix reading UTF-8 literals (#592) --- cobj/pplex.l.m4 | 14 ++++++++++++- cobj/scanner.l.m4 | 6 ++++++ tests/cobol_utf8.src/pic-n.at | 37 +++++++++++++++++++++++++++++++++++ tests/cobol_utf8.src/pic-x.at | 37 +++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 1 deletion(-) diff --git a/cobj/pplex.l.m4 b/cobj/pplex.l.m4 index 6ffb8ab5..030d78f9 100644 --- a/cobj/pplex.l.m4 +++ b/cobj/pplex.l.m4 @@ -981,6 +981,7 @@ ppinput (char *buff, int max_size) int i; int n; int coln; + int buff_len = 0; char *str1 = NULL; char *str2 = NULL; int comment_counter = 0; @@ -1152,8 +1153,19 @@ start: within_comment = 0; } +#ifdef I18N_UTF8 + unsigned char *p = (unsigned char *)buff; + if(utf8_ext_pick(p)){ + buff_len = (int) utf8_calc_sjis_size(p, strlen(buff)); + }else{ + buff_len = n; + } +#else /*!I18N_UTF8*/ + buff_len = n; +#endif /*I18N_UTF8*/ + /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + if (buff_len > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { /* show warning if it is not whitespaces */ if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { diff --git a/cobj/scanner.l.m4 b/cobj/scanner.l.m4 index 4384bfb4..377f0f52 100644 --- a/cobj/scanner.l.m4 +++ b/cobj/scanner.l.m4 @@ -815,6 +815,12 @@ read_literal (int mark, enum cb_category category) } while ((c = input ()) != EOF) { +#if EOF != 0 + if (unlikely (c == 0)){ + cb_error(_("The literal is not properly closed by %c."), mark); + break; + } +#endif plexbuff[i++] = c; if (c == mark && (c = input ()) != mark) { i--; diff --git a/tests/cobol_utf8.src/pic-n.at b/tests/cobol_utf8.src/pic-n.at index 57f4b1e0..95c108af 100644 --- a/tests/cobol_utf8.src/pic-n.at +++ b/tests/cobol_utf8.src/pic-n.at @@ -520,3 +520,40 @@ AT_CHECK([echo -n '゜ポンデリング' | nkf --ic=UTF-8 --oc=Shift_JIS > out2 AT_CHECK([diff out1.txt out2.txt]) AT_CLEANUP + +AT_SETUP([PIC N WRITE FROM Japanese literal]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT TEST-FILE ASSIGN TO "TESTFILE" + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD TEST-FILE. + 01 TEST-DATA PIC N(18). + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + OPEN OUTPUT TEST-FILE. + WRITE TEST-DATA FROM "縄文弥生古墳飛鳥奈良平安鎌倉室町江戸". + CLOSE TEST-FILE. + + OPEN INPUT TEST-FILE. + READ TEST-FILE + NOT AT END + DISPLAY TEST-DATA + END-READ. + CLOSE TEST-FILE. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '縄文弥生古墳飛鳥奈良平安鎌倉室町江戸 +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/pic-x.at b/tests/cobol_utf8.src/pic-x.at index bdbe1199..10b1c011 100644 --- a/tests/cobol_utf8.src/pic-x.at +++ b/tests/cobol_utf8.src/pic-x.at @@ -524,6 +524,43 @@ AT_CHECK([diff out1.txt out2.txt]) AT_CLEANUP +AT_SETUP([WRITE FROM Japanese literal]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT TEST-FILE ASSIGN TO "TESTFILE" + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD TEST-FILE. + 01 TEST-DATA PIC X(36). + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + OPEN OUTPUT TEST-FILE. + WRITE TEST-DATA FROM "縄文弥生古墳飛鳥奈良平安鎌倉室町江戸". + CLOSE TEST-FILE. + + OPEN INPUT TEST-FILE. + READ TEST-FILE + NOT AT END + DISPLAY TEST-DATA + END-READ. + CLOSE TEST-FILE. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '縄文弥生古墳飛鳥奈良平安鎌倉室町江戸 +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + #AT_SETUP([Readable string literals]) #export LC_ALL='' ## Older compilers converts string literals "日本語" in COBOL source code From 70ab23687e6a557609897efd7afa2f11de948ca1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 11:29:58 +0900 Subject: [PATCH 088/188] Bump com.github.spotbugs from 6.1.3 to 6.1.6 in /libcobj (#597) Bumps com.github.spotbugs from 6.1.3 to 6.1.6. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index dc523499..fb7f696d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.3" + id("com.github.spotbugs") version "6.1.6" } repositories { From ae3a925631201608246079d8c9255baaf56ef46d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 12:05:12 +0900 Subject: [PATCH 089/188] Bump org.junit.jupiter:junit-jupiter from 5.11.4 to 5.12.0 in /libcobj (#594) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.4 to 5.12.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index fb7f696d..7baaf063 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.0-jre") implementation("org.xerial:sqlite-jdbc:3.48.0.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") + testImplementation("org.junit.jupiter:junit-jupiter:5.12.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250107") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From fef89881096cb217c15e7945545af9eef46f68f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 12:05:21 +0900 Subject: [PATCH 090/188] Bump org.slf4j:slf4j-api from 2.0.16 to 2.0.17 in /libcobj (#596) Bumps org.slf4j:slf4j-api from 2.0.16 to 2.0.17. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 7baaf063..80e0937e 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { implementation("org.json:json:20250107") spotbugs("com.github.spotbugs:spotbugs:4.8.6") - implementation("org.slf4j:slf4j-api:2.0.16") + implementation("org.slf4j:slf4j-api:2.0.17") implementation("org.slf4j:slf4j-simple:2.0.16") } From f3a97c17e0735d5a7bc135e3c12f413544f6e0a7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 28 Feb 2025 12:59:09 +0900 Subject: [PATCH 091/188] Upgrade the JVM version in the static analysis workflow (#598) --- .github/workflows/static-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 8cef3aef..4614a523 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '21' - name: Install static analysis tools run: | From 5b53781a5a472fd568f8492922b404d85a954d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 13:08:37 +0900 Subject: [PATCH 092/188] Bump org.xerial:sqlite-jdbc from 3.48.0.0 to 3.49.1.0 in /libcobj (#593) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.48.0.0 to 3.49.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.48.0.0...3.49.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 80e0937e..6f094720 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.0-jre") - implementation("org.xerial:sqlite-jdbc:3.48.0.0") + implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.12.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 08ea0bd5577e2243360859bf0bbdce1fc81c02f7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:42:04 +0900 Subject: [PATCH 093/188] Release 1.1.7 (#599) --- CHANGELOG.md | 10 +++++++ ChangeLog | 4 +++ NEWS | 17 ++++++++++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 7 +++-- configure | 26 +++++++++---------- configure.ac | 2 +- libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 14 files changed, 78 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77b369dc..dd6318f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.7] - 2025-02-28 + +### Add + +* Implement the environment variable `COB_TERMINAL_ENCODING`. (#590) + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the DISPLAY statement outputs data after converting it to UTF-8. Otherwise, it outputs raw data (typically encoded in Shift JIS). + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the ACCEPT statement processes input data as UTF-8 encoded. Otherwise, it processes input data as Shift JIS encoded. +* Fix the UTF-8 compatible compiler to recognize that the size of multibyte characters in COBOL source code as 2 bytes instead of 3 bytes. (#592) + * This change allows users to write more multibyte characters on each line of the COBOL source code. + ## [1.1.6] - 2025-01-31 ### Add diff --git a/ChangeLog b/ChangeLog index 3d549aac..58676750 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-02-28 OSS Consortium + + * opensource COBOL 4J v1.1.6 released. + 2025-01-31 OSS Consortium * opensource COBOL 4J v1.1.6 released. diff --git a/NEWS b/NEWS index 50d82c1e..4e9e95a5 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,22 @@ NEWS - user visible changes -*- outline -*- + ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.7 + +** New Features + + (1) Implement the environment variable `COB_TERMINAL_ENCODING`. + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the DISPLAY statement outputs data after converting it to UTF-8. Otherwise, it outputs raw data (typically encoded in Shift JIS). + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the ACCEPT statement processes input data as UTF-8 encoded. Otherwise, it processes input data as Shift JIS encoded. + (2) Fix the UTF-8 compatible compiler to recognize that the size of multibyte characters in COBOL source code as 2 bytes instead of 3 bytes. + * This change allows users to write more multibyte characters on each line of the COBOL source code. + +----------------------------------------------------------------------- + +* opensource COBOL 4J 1.1.6 + ** New Features (1) Compile UTF-8 Source Code @@ -9,6 +24,8 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.5 + ** New Features (1) Convert string literals containing SJIS characters to Java string literals. (#561) diff --git a/README.md b/README.md index 1822f123..3615464e 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz -tar zxvf opensourcecobol4j-v1.1.6.tar.gz -cd opensourcecobol4j-1.1.6 +curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz +tar zxvf opensourcecobol4j-v1.1.7.tar.gz +cd opensourcecobol4j-1.1.7 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz -tar zxvf opensourcecobol4j-v1.1.6.tar.gz -cd opensourcecobol4j-1.1.6 +curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz +tar zxvf opensourcecobol4j-v1.1.7.tar.gz +cd opensourcecobol4j-1.1.7 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.6 +docker pull opensourcecobol/opensourcecobol4j:1.1.7 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 874b3f26..771a9615 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz -tar zxvf opensourcecobol4j-v1.1.6.tar.gz -cd opensourcecobol4j-1.1.6 +curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz +tar zxvf opensourcecobol4j-v1.1.7.tar.gz +cd opensourcecobol4j-1.1.7 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz -tar zxvf opensourcecobol4j-v1.1.6.tar.gz -cd opensourcecobol4j-1.1.6 +curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz +tar zxvf opensourcecobol4j-v1.1.7.tar.gz +cd opensourcecobol4j-1.1.7 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.6 +docker pull opensourcecobol/opensourcecobol4j:1.1.7 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index a896476b..849033c6 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,4 +1,7 @@ ### Add -* Compile UTF-8 Source Code - * The latest version of cobj is now able to accept UTF-8 encoded COBOL and generate UTF-8 encoded Java. +* Implement the environment variable `COB_TERMINAL_ENCODING`. + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the DISPLAY statement outputs data after converting it to UTF-8. Otherwise, it outputs raw data (typically encoded in Shift JIS). + * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the ACCEPT statement processes input data as UTF-8 encoded. Otherwise, it processes input data as Shift JIS encoded. +* Fix the UTF-8 compatible compiler to recognize that the size of multibyte characters in COBOL source code as 2 bytes instead of 3 bytes. + * This change allows users to write more multibyte characters on each line of the COBOL source code. diff --git a/configure b/configure index 5f918060..258c8768 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.6. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.7. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.6' -PACKAGE_VERSION='1.1.6' -PACKAGE_STRING='opensource COBOL 4J 1.1.6' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.7' +PACKAGE_VERSION='1.1.7' +PACKAGE_STRING='opensource COBOL 4J 1.1.7' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.6 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.6] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.7] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.6:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.7:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.6 +opensource COBOL 4J configure 1.1.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.6, which was +It was created by opensource COBOL 4J $as_me 1.1.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.6' - VERSION='1.1.6' + PACKAGE='opensource-cobol-4j-1.1.7' + VERSION='1.1.7' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.6, which was +This file was extended by opensource COBOL 4J $as_me 1.1.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.6 +opensource COBOL 4J config.status 1.1.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 8ebb8a21..b1d5a59f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.6],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.6]) +AC_INIT([opensource COBOL 4J],[1.1.7],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.7]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 6f094720..d7883744 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.6" + version = "1.1.7" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 02235e55..94db614d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.6"; + public static final String version = "1.1.7"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 6f968809..eeda02e2 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.6"); + System.out.println("1.1.7"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index d59c23a2..e3299c02 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.6", + "opensourcecobol4j_version": "1.1.7", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.6", + "opensourcecobol4j_version": "1.1.7", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.6", + "opensourcecobol4j_version": "1.1.7", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.6", + "opensourcecobol4j_version": "1.1.7", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 512c82c2..c217b71e 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.6]) -m4_define([AT_PACKAGE_VERSION], [1.1.6]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.6]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.7]) +m4_define([AT_PACKAGE_VERSION], [1.1.7]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.7]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 784acc8c..c4cb1b43 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.6" +#define PACKAGE "opensource-cobol4j-1.1.7" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.6" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.7" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.6" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.7" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.6" +#define PACKAGE_VERSION "1.1.7" /* Define a patch level */ #define PATCH_LEVEL 0 From eb256868f628952bfbeaf22a5d08147a37881739 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:54:30 +0900 Subject: [PATCH 094/188] Fix bugs related to UTF-8 (#604) --- cobj/codegen.c | 2 + .../libcobj/termio/CobolTerminal.java | 4 +- tests/cobol_utf8.src/pic-x.at | 53 +++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index 1b07b683..22186065 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -2452,6 +2452,7 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { joutput_data(x); joutput(".fillBytes(%d, %d);\n", buffchar, f->size); } else { +#if !I18N_UTF8 if (f->size >= 8) { buffchar = *(buff + f->size - 1); int n = 0; @@ -2471,6 +2472,7 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { return; } } +#endif joutput_data(x); #if I18N_UTF8 joutput(".setByByteArrayAndPaddingSpaces ("); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java index 4ce02d62..558232ec 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/termio/CobolTerminal.java @@ -75,9 +75,7 @@ private static void displayAlnum(AbstractCobolField f, PrintStream stream) { CobolDataStorage storage = f.getDataStorage(); if (CobolUtil.terminalEncoding == CobolEncoding.UTF8) { byte[] utf8Bytes = - new String( - storage.getByteArrayRef(0, f.getSize()), - AbstractCobolField.charSetSJIS) + new String(storage.getByteArray(0, f.getSize()), AbstractCobolField.charSetSJIS) .getBytes(StandardCharsets.UTF_8); stream.write(utf8Bytes, 0, utf8Bytes.length); } else { diff --git a/tests/cobol_utf8.src/pic-x.at b/tests/cobol_utf8.src/pic-x.at index 10b1c011..eb17324d 100644 --- a/tests/cobol_utf8.src/pic-x.at +++ b/tests/cobol_utf8.src/pic-x.at @@ -561,6 +561,59 @@ AT_CHECK([diff out1.txt out2.txt]) AT_CLEANUP +AT_SETUP([Group item COB_TERMINAL_ENCODING]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 WK-AREA. + 03 WK-CD PIC X(04). + 03 WK-NAME PIC X(20). + 03 WK-DPT-CD PIC X(02). + 03 WK-ENT-DATE PIC 9(08). + 03 WK-RETURN PIC 9(01). + PROCEDURE DIVISION. + MAIN. + MOVE "0012千葉 二郎 02199904010" TO WK-AREA. + DISPLAY "従業員番号: " WK-CD. + DISPLAY "名前   : " WK-NAME. + DISPLAY "部署コード: " WK-DPT-CD. + DISPLAY "入社日  : " WK-ENT-DATE. + STOP RUN. +]) + +AT_CHECK([cobj prog.cbl]) +AT_CHECK([COB_TERMINAL_ENCODING=UTF-8 java prog], [0], +[従業員番号: 0012 +名前   : 千葉 二郎 @&t@ +部署コード: 02 +入社日  : 19990401 +]) + +AT_CLEANUP + +AT_SETUP([Initializing Group items]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(17) VALUE "千葉 二郎". + PROCEDURE DIVISION. + DISPLAY F0. + STOP RUN. +]) + +AT_CHECK([cobj prog.cbl]) +AT_CHECK([COB_TERMINAL_ENCODING=UTF-8 java prog], [0], +[千葉 二郎 @&t@ +]) + +AT_CLEANUP + #AT_SETUP([Readable string literals]) #export LC_ALL='' ## Older compilers converts string literals "日本語" in COBOL source code From c0ed74bf180d124d41b681a62efdb2b42c0fdfb9 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 7 Mar 2025 14:05:36 +0900 Subject: [PATCH 095/188] Release 1.1.7 hotfix (#606) --- CHANGELOG.md | 8 ++++++ ChangeLog | 6 ++++- NEWS | 9 +++++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 10 +++---- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 16 ++++++++++++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 84 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6318f9..3a339da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.7-hotfix1] - 2025-02-28 + +### Fix + +* Fix bugs related to UTF-8 (#590) + * With older versions, DISPLAY statements output invalid UTF-8 data when the arguments are sub items of group fields. + * With older versions, initilizing data with VALUE clauses fails in some cases. + ## [1.1.7] - 2025-02-28 ### Add diff --git a/ChangeLog b/ChangeLog index 58676750..85e4c8eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +2025-03-07 OSS Consortium + + * opensource COBOL 4J v1.1.7-hotfix1 released. + 2025-02-28 OSS Consortium - * opensource COBOL 4J v1.1.6 released. + * opensource COBOL 4J v1.1.7 released. 2025-01-31 OSS Consortium diff --git a/NEWS b/NEWS index 4e9e95a5..4dde1ad2 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,14 @@ NEWS - user visible changes -*- outline -*- +----------------------------------------------------------------------- + +* opensource COBOL 4J 1.1.7-hotfix1 + +** New Features + + (1) Fix bugs related to UTF-8 + * With older versions, DISPLAY statements output invalid UTF-8 data when the arguments are sub items of group fields. + * With older versions, initilizing data with VALUE clauses fails in some cases. ----------------------------------------------------------------------- diff --git a/README.md b/README.md index 3615464e..52b909a7 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz -tar zxvf opensourcecobol4j-v1.1.7.tar.gz -cd opensourcecobol4j-1.1.7 +curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz +cd opensourcecobol4j-1.1.7-hotfix1 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz -tar zxvf opensourcecobol4j-v1.1.7.tar.gz -cd opensourcecobol4j-1.1.7 +curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz +cd opensourcecobol4j-1.1.7-hotfix1 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.7 +docker pull opensourcecobol/opensourcecobol4j:20250307 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 771a9615..cf4fe68f 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz -tar zxvf opensourcecobol4j-v1.1.7.tar.gz -cd opensourcecobol4j-1.1.7 +curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz +cd opensourcecobol4j-1.1.7-hotfix1 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz -tar zxvf opensourcecobol4j-v1.1.7.tar.gz -cd opensourcecobol4j-1.1.7 +curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz +cd opensourcecobol4j-1.1.7-hotfix1 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:1.1.7 +docker pull opensourcecobol/opensourcecobol4j:20250307 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index 849033c6..ab448e01 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,7 +1,5 @@ -### Add +### Fix -* Implement the environment variable `COB_TERMINAL_ENCODING`. - * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the DISPLAY statement outputs data after converting it to UTF-8. Otherwise, it outputs raw data (typically encoded in Shift JIS). - * If the value of `COB_TERMINAL_ENCODING` is `UTF-8`, the ACCEPT statement processes input data as UTF-8 encoded. Otherwise, it processes input data as Shift JIS encoded. -* Fix the UTF-8 compatible compiler to recognize that the size of multibyte characters in COBOL source code as 2 bytes instead of 3 bytes. - * This change allows users to write more multibyte characters on each line of the COBOL source code. +* Fix bugs related to UTF-8 + * With older versions, DISPLAY statements output invalid UTF-8 data when the arguments are sub items of group fields. + * With older versions, initilizing data with VALUE clauses fails in some cases. \ No newline at end of file diff --git a/configure b/configure index 258c8768..b4ba3b2e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.7. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.7-hotfix1. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.7' -PACKAGE_VERSION='1.1.7' -PACKAGE_STRING='opensource COBOL 4J 1.1.7' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.7-hotfix1' +PACKAGE_VERSION='1.1.7-hotfix1' +PACKAGE_STRING='opensource COBOL 4J 1.1.7-hotfix1' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.7 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.7-hotfix1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.7] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.7-hotfix1] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.7:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.7-hotfix1:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.7 +opensource COBOL 4J configure 1.1.7-hotfix1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.7, which was +It was created by opensource COBOL 4J $as_me 1.1.7-hotfix1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.7' - VERSION='1.1.7' + PACKAGE='opensource-cobol-4j-1.1.7-hotfix1' + VERSION='1.1.7-hotfix1' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.7, which was +This file was extended by opensource COBOL 4J $as_me 1.1.7-hotfix1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.7 +opensource COBOL 4J config.status 1.1.7-hotfix1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b1d5a59f..cb722b9e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.7],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.7]) +AC_INIT([opensource COBOL 4J],[1.1.7-hotfix1],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.7-hotfix1]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 156cb7af..2345f1e7 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,21 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.7-hotfix1 | Windows | 21 | +| 1.1.7-hotfix1 | Ubuntu 24.04 | 21 | +| 1.1.7-hotfix1 | AlmaLinux 9 | 11 | +| 1.1.7-hotfix1 | Amazon Linux 2023 | 21 | +| 1.1.7 | Windows | 21 | +| 1.1.7 | Ubuntu 24.04 | 21 | +| 1.1.7 | AlmaLinux 9 | 11 | +| 1.1.7 | Amazon Linux 2023 | 21 | +| 1.1.6 | Windows | 21 | +| 1.1.6 | Ubuntu 24.04 | 21 | +| 1.1.6 | AlmaLinux 9 | 11 | +| 1.1.6 | Amazon Linux 2023 | 21 | +| 1.1.5 | Windows | 21 | +| 1.1.5 | Ubuntu 24.04 | 21 | +| 1.1.5 | AlmaLinux 9 | 11 | +| 1.1.5 | Amazon Linux 2023 | 21 | | 1.1.4 | Windows | 21 | | 1.1.4 | Ubuntu 24.04 | 21 | | 1.1.4 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d7883744..ce07d829 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.7" + version = "1.1.7-hotfix1" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 94db614d..03cc4a52 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.7"; + public static final String version = "1.1.7-hotfix1"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index eeda02e2..aa03ea76 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.7"); + System.out.println("1.1.7-hotfix1"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index e3299c02..903450a2 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.7", + "opensourcecobol4j_version": "1.1.7-hotfix1", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.7", + "opensourcecobol4j_version": "1.1.7-hotfix1", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.7", + "opensourcecobol4j_version": "1.1.7-hotfix1", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.7", + "opensourcecobol4j_version": "1.1.7-hotfix1", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index c217b71e..29ae2679 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.7]) -m4_define([AT_PACKAGE_VERSION], [1.1.7]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.7]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.7-hotfix1]) +m4_define([AT_PACKAGE_VERSION], [1.1.7-hotfix1]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.7-hotfix1]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index c4cb1b43..fd32eedc 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.7" +#define PACKAGE "opensource-cobol4j-1.1.7-hotfix1" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.7" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.7-hotfix1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.7" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.7-hotfix1" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.7" +#define PACKAGE_VERSION "1.1.7-hotfix1" /* Define a patch level */ #define PATCH_LEVEL 0 From a496b4aa2ce4906f33f365c1991cd88611d51b33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:29:40 +0900 Subject: [PATCH 096/188] Bump org.junit.jupiter:junit-jupiter from 5.12.0 to 5.12.1 in /libcobj (#609) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.12.0 to 5.12.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index ce07d829..d15790cf 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.0-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.12.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.12.1") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250107") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From 1864cfc6ace5bc12f821d6da7f987d125d5382b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:29:48 +0900 Subject: [PATCH 097/188] Bump com.github.spotbugs from 6.1.6 to 6.1.7 in /libcobj (#605) Bumps com.github.spotbugs from 6.1.6 to 6.1.7. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d15790cf..f3397f1a 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.6" + id("com.github.spotbugs") version "6.1.7" } repositories { From 755cfb449d0b3442a21a652fe2742f89aedb7768 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:29:56 +0900 Subject: [PATCH 098/188] Bump org.slf4j:slf4j-simple from 2.0.16 to 2.0.17 in /libcobj (#601) Bumps org.slf4j:slf4j-simple from 2.0.16 to 2.0.17. --- updated-dependencies: - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f3397f1a..3bc34baa 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -40,7 +40,7 @@ dependencies { spotbugs("com.github.spotbugs:spotbugs:4.8.6") implementation("org.slf4j:slf4j-api:2.0.17") - implementation("org.slf4j:slf4j-simple:2.0.16") + implementation("org.slf4j:slf4j-simple:2.0.17") } java { From c1386742542de57f9eec93134b444207d4438c0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:11:38 +0900 Subject: [PATCH 099/188] Bump com.google.guava:guava from 33.4.0-jre to 33.4.6-jre in /libcobj (#613) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.4.0-jre to 33.4.6-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 3bc34baa..c8c7110d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.4.0-jre") + implementation("com.google.guava:guava:33.4.6-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.12.1") From a1c08e06ba42f62a1f7c14a4e38adbf4a3425a73 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:54:50 +0900 Subject: [PATCH 100/188] Fix a bug of duplicate record keys of indexed files. (#607) --- .../libcobj/file/CobolIndexedFile.java | 48 ++++++++++-- tests/misc.src/record-key-duplicates-error.at | 77 +++++++++++++++++++ 2 files changed, 120 insertions(+), 5 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index b7e3b81c..f23aec60 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -41,6 +41,7 @@ public class CobolIndexedFile extends CobolFile { private boolean indexedFirstRead = true; private boolean callStart = false; private boolean commitOnModification = true; + private int fetchKeyIndex = -1; /** TODO: 準備中 */ public static final int COB_EQ = 1; @@ -295,6 +296,7 @@ public int open_(String filename, int mode, int sharing) { this.indexedFirstRead = true; this.callStart = false; + this.fetchKeyIndex = -1; return 0; } @@ -345,6 +347,7 @@ public int close_(int opt) { } catch (SQLException e) { return COB_STATUS_30_PERMANENT_ERROR; } + this.fetchKeyIndex = -1; return COB_STATUS_00_SUCCESS; } @@ -366,6 +369,7 @@ public int indexed_start_internal( break; } } + this.fetchKeyIndex = p.key_index; p.key = DBT_SET(key); @@ -545,8 +549,12 @@ private int returnWith(IndexedFile p, boolean closeCursor, int index, int return return returnCode; } - /** Equivalent to indexed_write_internal in libcob/fileio.c */ private int indexed_write_internal(boolean rewrite, int opt) { + return this.indexed_write_internal(rewrite, null, opt); + } + + /** Equivalent to indexed_write_internal in libcob/fileio.c */ + private int indexed_write_internal(boolean rewrite, int[] dupNumbers, int opt) { IndexedFile p = this.filei; boolean closeCursor; @@ -592,7 +600,12 @@ private int indexed_write_internal(boolean rewrite, int opt) { PreparedStatement insertStatement; if (isDuplicateColumn(i)) { - int dupNo = getNextKeyDupNo(p.connection, i, p.key); + int dupNo; + if (dupNumbers == null || dupNumbers[i] < 0 || i != this.fetchKeyIndex) { + dupNo = getNextKeyDupNo(p.connection, i, p.key); + } else { + dupNo = dupNumbers[i]; + } insertStatement = p.connection.prepareStatement( String.format( @@ -693,19 +706,25 @@ public int rewrite_(int opt) { } p.key = DBT_SET(this.keys[0].getField()); + int[] dupNumbers = new int[this.nkeys]; + java.util.Arrays.fill(dupNumbers, -1); - int ret = this.indexed_delete_internal(true); + int ret = this.indexed_delete_internal(true, dupNumbers); if (ret != COB_STATUS_00_SUCCESS) { p.write_cursor_open = false; return ret; } - return this.indexed_write_internal(true, opt); + return this.indexed_write_internal(true, dupNumbers, opt); } - /** Equivalent to indexed_delete_internal in libcob/fileio.c */ private int indexed_delete_internal(boolean rewrite) { + return this.indexed_delete_internal(rewrite, null); + } + + /** Equivalent to indexed_delete_internal in libcob/fileio.c */ + private int indexed_delete_internal(boolean rewrite, int[] dupNumbers) { IndexedFile p = this.filei; boolean closeCursor; @@ -731,6 +750,25 @@ private int indexed_delete_internal(boolean rewrite) { // delete data from sub tables for (int i = 1; i < this.nkeys; ++i) { + // save the duplicate number of the record to be deleted + if (isDuplicateColumn(i)) { + try (PreparedStatement statement = + p.connection.prepareStatement( + String.format( + "select dupNo from %s where value = ?", getTableName(i)))) { + statement.setBytes(1, p.key); + ResultSet rs = statement.executeQuery(); + if (rs.next()) { + int dupNo = rs.getInt(1); + if (dupNumbers != null) { + dupNumbers[i] = dupNo; + } + } + } catch (SQLException e) { + return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); + } + } + // delete the record try (PreparedStatement statement = p.connection.prepareStatement( String.format("delete from %s where value = ?", getTableName(i)))) { diff --git a/tests/misc.src/record-key-duplicates-error.at b/tests/misc.src/record-key-duplicates-error.at index 695e69f2..3b04dc0d 100644 --- a/tests/misc.src/record-key-duplicates-error.at +++ b/tests/misc.src/record-key-duplicates-error.at @@ -26,3 +26,80 @@ AT_CHECK([${COBJ} prog.cbl], [1], [], [prog.cbl:8: Error: Record keys with duplicates are not yet supported ]) AT_CLEANUP + +AT_SETUP([Error on rewriting record keys with duplicates]) + +AT_DATA([prog.cbl], +[ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT DUP-FILE ASSIGN TO "dupfile.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS DUP-KEY + ALTERNATE RECORD KEY IS DUP-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD DUP-FILE. + 01 DUP-RECORD. + 05 DUP-KEY PIC X(5). + 05 DUP-KEY2 PIC X(5). + 05 DUP-DATA PIC X(10). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 WS-END-OF-FILE PIC X VALUE 'N'. + + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT DUP-FILE. + MOVE "11111AAAAAaaaaaaaaaa" TO DUP-RECORD. + WRITE DUP-RECORD. + MOVE "22222BBBBBbbbbbbbbbb" TO DUP-RECORD. + WRITE DUP-RECORD. + MOVE "33333BBBBBcccccccccc" TO DUP-RECORD. + WRITE DUP-RECORD. + MOVE "44444AAAAAdddddddddd" TO DUP-RECORD. + WRITE DUP-RECORD. + MOVE "55555CCCCCeeeeeeeeee" TO DUP-RECORD. + WRITE DUP-RECORD. + CLOSE DUP-FILE. + + OPEN I-O DUP-FILE + IF FILE-STATUS NOT = "00" + DISPLAY "Error opening file: " FILE-STATUS + STOP RUN + END-IF. + + MOVE "BBBBB" TO DUP-KEY2. + START DUP-FILE KEY IS >= DUP-KEY2. + IF FILE-STATUS = "00" + MOVE 'N' TO WS-END-OF-FILE + PERFORM UNTIL WS-END-OF-FILE = 'Y' + READ DUP-FILE NEXT + AT END + MOVE 'Y' TO WS-END-OF-FILE + NOT AT END + REWRITE DUP-RECORD + DISPLAY DUP-RECORD + END-PERFORM + ELSE + DISPLAY "Key not found" + END-IF. + CLOSE DUP-FILE. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([java prog], [0], +[22222BBBBBbbbbbbbbbb +33333BBBBBcccccccccc +55555CCCCCeeeeeeeeee +]) + +AT_CLEANUP \ No newline at end of file From 56cd1c4c949d3a2e565e8a672a3ad0ec2d348c99 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:55:09 +0900 Subject: [PATCH 101/188] Throw an error if COMP-1 and COMP-2 are used (#611) --- cobj/parser.c | 3864 ++++++++++++++++----------------- cobj/parser.y | 12 +- tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/comp1-comp2.at | 21 + 6 files changed, 1950 insertions(+), 1954 deletions(-) create mode 100644 tests/misc.src/comp1-comp2.at diff --git a/cobj/parser.c b/cobj/parser.c index 61b36271..f854df10 100644 --- a/cobj/parser.c +++ b/cobj/parser.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30704 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.4" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1587,6 +1587,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -1684,17 +1696,23 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1953,7 +1971,7 @@ static const yytype_int16 yytranslate[] = }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 772, 772, 772, 816, 817, 821, 822, 827, 828, @@ -1995,122 +2013,122 @@ static const yytype_int16 yyrline[] = 2709, 2715, 2724, 2732, 2733, 2741, 2742, 2743, 2747, 2767, 2771, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2801, 2823, 2845, 2846, - 2858, 2878, 2885, 2886, 2890, 2891, 2892, 2893, 2894, 2895, - 2896, 2897, 2898, 2899, 2900, 2901, 2906, 2911, 2912, 2913, - 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, - 2924, 2925, 2926, 2927, 2928, 2929, 2937, 2945, 2953, 2960, - 2965, 2975, 2976, 2977, 2981, 2998, 2999, 3002, 3003, 3009, - 3009, 3012, 3036, 3052, 3053, 3057, 3058, 3061, 3061, 3064, - 3071, 3072, 3077, 3087, 3094, 3097, 3098, 3099, 3106, 3113, - 3138, 3142, 3142, 3147, 3148, 3152, 3153, 3156, 3157, 3170, - 3182, 3202, 3216, 3218, 3217, 3237, 3238, 3238, 3251, 3253, - 3252, 3264, 3265, 3269, 3270, 3279, 3286, 3289, 3293, 3297, - 3298, 3299, 3306, 3307, 3311, 3314, 3314, 3317, 3318, 3324, - 3329, 3330, 3333, 3334, 3337, 3338, 3341, 3342, 3345, 3346, - 3350, 3351, 3352, 3356, 3357, 3360, 3361, 3365, 3369, 3370, - 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, - 3384, 3385, 3386, 3387, 3388, 3389, 3393, 3397, 3398, 3399, - 3400, 3401, 3402, 3403, 3407, 3411, 3412, 3413, 3417, 3418, - 3422, 3426, 3431, 3435, 3439, 3443, 3444, 3448, 3449, 3453, - 3454, 3455, 3458, 3458, 3458, 3461, 3465, 3468, 3468, 3471, - 3478, 3479, 3479, 3489, 3491, 3501, 3490, 3528, 3530, 3529, - 3536, 3535, 3544, 3545, 3550, 3557, 3559, 3563, 3573, 3575, - 3583, 3591, 3620, 3651, 3653, 3663, 3668, 3679, 3680, 3680, - 3707, 3708, 3712, 3713, 3714, 3715, 3731, 3743, 3774, 3811, - 3823, 3826, 3827, 3836, 3840, 3836, 3853, 3874, 3878, 3879, - 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, - 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, - 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, - 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, - 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3950, 3949, - 3962, 3966, 3970, 3974, 3978, 3982, 3986, 3990, 3994, 3998, - 4002, 4006, 4010, 4014, 4018, 4022, 4026, 4033, 4034, 4035, - 4036, 4037, 4038, 4042, 4046, 4047, 4050, 4051, 4055, 4056, - 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4071, 4075, - 4079, 4084, 4085, 4086, 4087, 4088, 4089, 4093, 4094, 4103, - 4103, 4109, 4113, 4117, 4123, 4124, 4128, 4129, 4138, 4138, - 4143, 4147, 4154, 4155, 4164, 4170, 4171, 4175, 4175, 4183, - 4183, 4193, 4195, 4194, 4203, 4204, 4209, 4216, 4223, 4225, - 4229, 4237, 4248, 4249, 4250, 4255, 4259, 4258, 4270, 4274, - 4273, 4284, 4285, 4294, 4294, 4298, 4299, 4303, 4315, 4315, - 4319, 4320, 4331, 4332, 4333, 4334, 4335, 4338, 4338, 4346, - 4346, 4352, 4359, 4360, 4363, 4363, 4370, 4383, 4396, 4396, - 4407, 4408, 4417, 4417, 4437, 4436, 4449, 4453, 4457, 4461, - 4465, 4469, 4473, 4478, 4482, 4489, 4490, 4491, 4495, 4496, - 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 4510, - 4514, 4518, 4522, 4527, 4528, 4532, 4533, 4542, 4542, 4548, - 4552, 4556, 4560, 4564, 4571, 4572, 4581, 4581, 4603, 4602, - 4621, 4622, 4633, 4642, 4647, 4655, 4684, 4685, 4691, 4690, - 4706, 4710, 4709, 4724, 4725, 4730, 4731, 4742, 4771, 4772, - 4773, 4776, 4777, 4781, 4782, 4791, 4791, 4796, 4797, 4805, - 4813, 4821, 4839, 4864, 4864, 4877, 4877, 4890, 4890, 4899, - 4903, 4916, 4916, 4929, 4931, 4929, 4942, 4947, 4951, 4950, - 4964, 4965, 4974, 4974, 4982, 4983, 4987, 4988, 4989, 4993, - 4994, 4999, 5000, 5005, 5009, 5010, 5011, 5012, 5013, 5014, - 5015, 5019, 5020, 5029, 5029, 5042, 5041, 5051, 5052, 5053, - 5057, 5058, 5062, 5063, 5064, 5070, 5070, 5075, 5076, 5080, - 5081, 5082, 5083, 5084, 5085, 5091, 5095, 5096, 5100, 5105, - 5109, 5110, 5111, 5112, 5113, 5117, 5143, 5156, 5157, 5161, - 5161, 5169, 5169, 5179, 5179, 5184, 5188, 5200, 5200, 5206, - 5210, 5217, 5218, 5227, 5227, 5231, 5232, 5246, 5247, 5248, - 5249, 5253, 5254, 5258, 5259, 5260, 5272, 5272, 5277, 5282, - 5281, 5291, 5298, 5299, 5303, 5308, 5317, 5320, 5324, 5329, - 5336, 5343, 5344, 5348, 5349, 5354, 5366, 5366, 5395, 5396, - 5400, 5401, 5405, 5409, 5413, 5417, 5424, 5425, 5431, 5432, - 5433, 5437, 5438, 5447, 5447, 5462, 5462, 5473, 5474, 5483, - 5483, 5500, 5501, 5505, 5512, 5513, 5522, 5535, 5535, 5541, - 5546, 5545, 5556, 5557, 5561, 5563, 5562, 5573, 5574, 5579, - 5578, 5589, 5590, 5599, 5599, 5604, 5605, 5606, 5607, 5608, - 5614, 5623, 5627, 5636, 5643, 5644, 5650, 5651, 5655, 5664, - 5665, 5669, 5673, 5685, 5685, 5691, 5690, 5707, 5710, 5731, - 5732, 5735, 5736, 5740, 5741, 5746, 5751, 5759, 5771, 5776, - 5784, 5800, 5801, 5800, 5821, 5822, 5830, 5831, 5832, 5833, - 5834, 5838, 5839, 5848, 5848, 5853, 5853, 5860, 5861, 5862, - 5871, 5871, 5880, 5881, 5885, 5886, 5887, 5891, 5892, 5896, - 5897, 5906, 5906, 5912, 5916, 5920, 5927, 5928, 5937, 5944, - 5945, 5953, 5953, 5966, 5966, 5982, 5982, 5991, 5993, 5994, - 6003, 6003, 6013, 6014, 6019, 6020, 6025, 6032, 6033, 6038, - 6045, 6046, 6050, 6051, 6055, 6056, 6060, 6061, 6070, 6071, - 6072, 6076, 6100, 6103, 6111, 6121, 6126, 6131, 6136, 6143, - 6144, 6147, 6148, 6152, 6152, 6156, 6156, 6160, 6160, 6163, - 6164, 6168, 6175, 6176, 6180, 6192, 6192, 6209, 6210, 6215, - 6218, 6222, 6226, 6233, 6234, 6237, 6238, 6239, 6243, 6244, - 6257, 6265, 6272, 6274, 6273, 6283, 6285, 6284, 6299, 6303, - 6305, 6304, 6315, 6317, 6316, 6333, 6339, 6341, 6340, 6350, - 6352, 6351, 6367, 6372, 6377, 6387, 6386, 6398, 6397, 6413, - 6418, 6423, 6433, 6432, 6444, 6443, 6458, 6459, 6463, 6468, - 6473, 6483, 6482, 6494, 6493, 6510, 6513, 6525, 6532, 6539, - 6539, 6549, 6550, 6552, 6553, 6554, 6555, 6556, 6557, 6559, - 6560, 6561, 6562, 6563, 6564, 6566, 6567, 6569, 6570, 6571, - 6574, 6576, 6577, 6578, 6580, 6581, 6582, 6584, 6585, 6587, - 6588, 6589, 6590, 6591, 6593, 6594, 6595, 6596, 6597, 6598, - 6600, 6601, 6602, 6603, 6604, 6605, 6607, 6608, 6611, 6611, - 6611, 6612, 6612, 6613, 6613, 6614, 6614, 6614, 6615, 6615, - 6615, 6620, 6621, 6624, 6625, 6626, 6630, 6631, 6632, 6633, - 6634, 6635, 6636, 6637, 6638, 6649, 6661, 6676, 6677, 6682, - 6688, 6710, 6730, 6734, 6750, 6764, 6765, 6770, 6776, 6777, - 6782, 6791, 6792, 6793, 6797, 6808, 6809, 6813, 6823, 6824, - 6828, 6829, 6833, 6834, 6840, 6860, 6861, 6865, 6866, 6870, - 6871, 6875, 6876, 6877, 6878, 6879, 6880, 6881, 6882, 6883, - 6887, 6888, 6889, 6890, 6891, 6892, 6893, 6897, 6898, 6902, - 6903, 6907, 6908, 6912, 6913, 6924, 6925, 6929, 6930, 6931, - 6935, 6936, 6937, 6945, 6949, 6950, 6951, 6952, 6956, 6957, - 6961, 6971, 6985, 7008, 7020, 7021, 7031, 7032, 7036, 7037, - 7038, 7039, 7040, 7041, 7042, 7050, 7054, 7058, 7062, 7066, - 7070, 7074, 7078, 7082, 7086, 7090, 7094, 7101, 7102, 7103, - 7107, 7108, 7112, 7113, 7118, 7125, 7132, 7142, 7149, 7159, - 7166, 7180, 7190, 7191, 7195, 7196, 7200, 7201, 7205, 7206, - 7207, 7211, 7212, 7216, 7217, 7221, 7222, 7226, 7227, 7234, - 7234, 7235, 7235, 7236, 7236, 7237, 7237, 7239, 7239, 7240, - 7240, 7241, 7241, 7242, 7242, 7243, 7243, 7244, 7244, 7245, - 7245, 7246, 7246, 7247, 7247, 7248, 7248, 7249, 7249, 7250, - 7250, 7251, 7251, 7252, 7252, 7253, 7253, 7254, 7254, 7255, - 7255, 7256, 7256, 7256, 7257, 7257, 7258, 7258, 7258, 7259, - 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, 7263, 7264, - 7264, 7265, 7265, 7265, 7266, 7266, 7267, 7267, 7268, 7268, - 7269, 7269, 7270, 7270, 7271, 7271, 7272, 7272, 7272, 7273, - 7273, 7274, 7274, 7275, 7275, 7276, 7276, 7277, 7277, 7278, - 7278, 7279, 7279, 7281, 7281, 7282, 7282 + 2858, 2878, 2885, 2886, 2890, 2891, 2892, 2897, 2902, 2903, + 2904, 2905, 2906, 2907, 2908, 2909, 2914, 2919, 2920, 2921, + 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, + 2932, 2933, 2934, 2935, 2936, 2937, 2945, 2953, 2961, 2968, + 2973, 2983, 2984, 2985, 2989, 3006, 3007, 3010, 3011, 3017, + 3017, 3020, 3044, 3060, 3061, 3065, 3066, 3069, 3069, 3072, + 3079, 3080, 3085, 3095, 3102, 3105, 3106, 3107, 3114, 3121, + 3146, 3150, 3150, 3155, 3156, 3160, 3161, 3164, 3165, 3178, + 3190, 3210, 3224, 3226, 3225, 3245, 3246, 3246, 3259, 3261, + 3260, 3272, 3273, 3277, 3278, 3287, 3294, 3297, 3301, 3305, + 3306, 3307, 3314, 3315, 3319, 3322, 3322, 3325, 3326, 3332, + 3337, 3338, 3341, 3342, 3345, 3346, 3349, 3350, 3353, 3354, + 3358, 3359, 3360, 3364, 3365, 3368, 3369, 3373, 3377, 3378, + 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, + 3392, 3393, 3394, 3395, 3396, 3397, 3401, 3405, 3406, 3407, + 3408, 3409, 3410, 3411, 3415, 3419, 3420, 3421, 3425, 3426, + 3430, 3434, 3439, 3443, 3447, 3451, 3452, 3456, 3457, 3461, + 3462, 3463, 3466, 3466, 3466, 3469, 3473, 3476, 3476, 3479, + 3486, 3487, 3487, 3497, 3499, 3509, 3498, 3536, 3538, 3537, + 3544, 3543, 3552, 3553, 3558, 3565, 3567, 3571, 3581, 3583, + 3591, 3599, 3628, 3659, 3661, 3671, 3676, 3687, 3688, 3688, + 3715, 3716, 3720, 3721, 3722, 3723, 3739, 3751, 3782, 3819, + 3831, 3834, 3835, 3844, 3848, 3844, 3861, 3882, 3886, 3887, + 3888, 3889, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, + 3898, 3899, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, + 3908, 3909, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, + 3918, 3919, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, + 3928, 3929, 3930, 3931, 3932, 3933, 3934, 3935, 3958, 3957, + 3970, 3974, 3978, 3982, 3986, 3990, 3994, 3998, 4002, 4006, + 4010, 4014, 4018, 4022, 4026, 4030, 4034, 4041, 4042, 4043, + 4044, 4045, 4046, 4050, 4054, 4055, 4058, 4059, 4063, 4064, + 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4079, 4083, + 4087, 4092, 4093, 4094, 4095, 4096, 4097, 4101, 4102, 4111, + 4111, 4117, 4121, 4125, 4131, 4132, 4136, 4137, 4146, 4146, + 4151, 4155, 4162, 4163, 4172, 4178, 4179, 4183, 4183, 4191, + 4191, 4201, 4203, 4202, 4211, 4212, 4217, 4224, 4231, 4233, + 4237, 4245, 4256, 4257, 4258, 4263, 4267, 4266, 4278, 4282, + 4281, 4292, 4293, 4302, 4302, 4306, 4307, 4311, 4323, 4323, + 4327, 4328, 4339, 4340, 4341, 4342, 4343, 4346, 4346, 4354, + 4354, 4360, 4367, 4368, 4371, 4371, 4378, 4391, 4404, 4404, + 4415, 4416, 4425, 4425, 4445, 4444, 4457, 4461, 4465, 4469, + 4473, 4477, 4481, 4486, 4490, 4497, 4498, 4499, 4503, 4504, + 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, + 4522, 4526, 4530, 4535, 4536, 4540, 4541, 4550, 4550, 4556, + 4560, 4564, 4568, 4572, 4579, 4580, 4589, 4589, 4611, 4610, + 4629, 4630, 4641, 4650, 4655, 4663, 4692, 4693, 4699, 4698, + 4714, 4718, 4717, 4732, 4733, 4738, 4739, 4750, 4779, 4780, + 4781, 4784, 4785, 4789, 4790, 4799, 4799, 4804, 4805, 4813, + 4821, 4829, 4847, 4872, 4872, 4885, 4885, 4898, 4898, 4907, + 4911, 4924, 4924, 4937, 4939, 4937, 4950, 4955, 4959, 4958, + 4972, 4973, 4982, 4982, 4990, 4991, 4995, 4996, 4997, 5001, + 5002, 5007, 5008, 5013, 5017, 5018, 5019, 5020, 5021, 5022, + 5023, 5027, 5028, 5037, 5037, 5050, 5049, 5059, 5060, 5061, + 5065, 5066, 5070, 5071, 5072, 5078, 5078, 5083, 5084, 5088, + 5089, 5090, 5091, 5092, 5093, 5099, 5103, 5104, 5108, 5113, + 5117, 5118, 5119, 5120, 5121, 5125, 5151, 5164, 5165, 5169, + 5169, 5177, 5177, 5187, 5187, 5192, 5196, 5208, 5208, 5214, + 5218, 5225, 5226, 5235, 5235, 5239, 5240, 5254, 5255, 5256, + 5257, 5261, 5262, 5266, 5267, 5268, 5280, 5280, 5285, 5290, + 5289, 5299, 5306, 5307, 5311, 5316, 5325, 5328, 5332, 5337, + 5344, 5351, 5352, 5356, 5357, 5362, 5374, 5374, 5403, 5404, + 5408, 5409, 5413, 5417, 5421, 5425, 5432, 5433, 5439, 5440, + 5441, 5445, 5446, 5455, 5455, 5470, 5470, 5481, 5482, 5491, + 5491, 5508, 5509, 5513, 5520, 5521, 5530, 5543, 5543, 5549, + 5554, 5553, 5564, 5565, 5569, 5571, 5570, 5581, 5582, 5587, + 5586, 5597, 5598, 5607, 5607, 5612, 5613, 5614, 5615, 5616, + 5622, 5631, 5635, 5644, 5651, 5652, 5658, 5659, 5663, 5672, + 5673, 5677, 5681, 5693, 5693, 5699, 5698, 5715, 5718, 5739, + 5740, 5743, 5744, 5748, 5749, 5754, 5759, 5767, 5779, 5784, + 5792, 5808, 5809, 5808, 5829, 5830, 5838, 5839, 5840, 5841, + 5842, 5846, 5847, 5856, 5856, 5861, 5861, 5868, 5869, 5870, + 5879, 5879, 5888, 5889, 5893, 5894, 5895, 5899, 5900, 5904, + 5905, 5914, 5914, 5920, 5924, 5928, 5935, 5936, 5945, 5952, + 5953, 5961, 5961, 5974, 5974, 5990, 5990, 5999, 6001, 6002, + 6011, 6011, 6021, 6022, 6027, 6028, 6033, 6040, 6041, 6046, + 6053, 6054, 6058, 6059, 6063, 6064, 6068, 6069, 6078, 6079, + 6080, 6084, 6108, 6111, 6119, 6129, 6134, 6139, 6144, 6151, + 6152, 6155, 6156, 6160, 6160, 6164, 6164, 6168, 6168, 6171, + 6172, 6176, 6183, 6184, 6188, 6200, 6200, 6217, 6218, 6223, + 6226, 6230, 6234, 6241, 6242, 6245, 6246, 6247, 6251, 6252, + 6265, 6273, 6280, 6282, 6281, 6291, 6293, 6292, 6307, 6311, + 6313, 6312, 6323, 6325, 6324, 6341, 6347, 6349, 6348, 6358, + 6360, 6359, 6375, 6380, 6385, 6395, 6394, 6406, 6405, 6421, + 6426, 6431, 6441, 6440, 6452, 6451, 6466, 6467, 6471, 6476, + 6481, 6491, 6490, 6502, 6501, 6518, 6521, 6533, 6540, 6547, + 6547, 6557, 6558, 6560, 6561, 6562, 6563, 6564, 6565, 6567, + 6568, 6569, 6570, 6571, 6572, 6574, 6575, 6577, 6578, 6579, + 6582, 6584, 6585, 6586, 6588, 6589, 6590, 6592, 6593, 6595, + 6596, 6597, 6598, 6599, 6601, 6602, 6603, 6604, 6605, 6606, + 6608, 6609, 6610, 6611, 6612, 6613, 6615, 6616, 6619, 6619, + 6619, 6620, 6620, 6621, 6621, 6622, 6622, 6622, 6623, 6623, + 6623, 6628, 6629, 6632, 6633, 6634, 6638, 6639, 6640, 6641, + 6642, 6643, 6644, 6645, 6646, 6657, 6669, 6684, 6685, 6690, + 6696, 6718, 6738, 6742, 6758, 6772, 6773, 6778, 6784, 6785, + 6790, 6799, 6800, 6801, 6805, 6816, 6817, 6821, 6831, 6832, + 6836, 6837, 6841, 6842, 6848, 6868, 6869, 6873, 6874, 6878, + 6879, 6883, 6884, 6885, 6886, 6887, 6888, 6889, 6890, 6891, + 6895, 6896, 6897, 6898, 6899, 6900, 6901, 6905, 6906, 6910, + 6911, 6915, 6916, 6920, 6921, 6932, 6933, 6937, 6938, 6939, + 6943, 6944, 6945, 6953, 6957, 6958, 6959, 6960, 6964, 6965, + 6969, 6979, 6993, 7016, 7028, 7029, 7039, 7040, 7044, 7045, + 7046, 7047, 7048, 7049, 7050, 7058, 7062, 7066, 7070, 7074, + 7078, 7082, 7086, 7090, 7094, 7098, 7102, 7109, 7110, 7111, + 7115, 7116, 7120, 7121, 7126, 7133, 7140, 7150, 7157, 7167, + 7174, 7188, 7198, 7199, 7203, 7204, 7208, 7209, 7213, 7214, + 7215, 7219, 7220, 7224, 7225, 7229, 7230, 7234, 7235, 7242, + 7242, 7243, 7243, 7244, 7244, 7245, 7245, 7247, 7247, 7248, + 7248, 7249, 7249, 7250, 7250, 7251, 7251, 7252, 7252, 7253, + 7253, 7254, 7254, 7255, 7255, 7256, 7256, 7257, 7257, 7258, + 7258, 7259, 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, + 7263, 7264, 7264, 7264, 7265, 7265, 7266, 7266, 7266, 7267, + 7267, 7268, 7268, 7269, 7269, 7270, 7270, 7271, 7271, 7272, + 7272, 7273, 7273, 7273, 7274, 7274, 7275, 7275, 7276, 7276, + 7277, 7277, 7278, 7278, 7279, 7279, 7280, 7280, 7280, 7281, + 7281, 7282, 7282, 7283, 7283, 7284, 7284, 7285, 7285, 7286, + 7286, 7287, 7287, 7289, 7289, 7290, 7290 }; #endif @@ -2402,61 +2420,6 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, - 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, - 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, - 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, - 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, - 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, - 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, - 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, - 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, - 695, 696, 697, 698, 699, 700, 701, 702, 703, 43, - 45, 42, 47, 704, 94, 46, 61, 41, 40, 62, - 60, 58, 38 -}; -#endif - #define YYPACT_NINF (-2010) #define yypact_value_is_default(Yyn) \ @@ -2467,8 +2430,8 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -2010, 206, 536, -2010, 153, 306, 195, -2010, -2010, -2010, @@ -2702,9 +2665,9 @@ static const yytype_int16 yypact[] = -2010, 4721, -2010, -2010 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { 2, 0, 0, 1, 0, 0, 0, 4, 6, 7, @@ -2938,7 +2901,7 @@ static const yytype_int16 yydefact[] = 509, 0, 1080, 553 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -2010, -2010, -2010, -2010, 1892, -2010, -2010, -2010, 44, -2010, @@ -3014,10 +2977,10 @@ static const yytype_int16 yypgoto[] = 1076, -129 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 1, 2, 6, 7, 8, 24, 39, 69, 128, + 0, 1, 2, 6, 7, 8, 24, 39, 69, 128, 256, 9, 25, 40, 70, 90, 499, 73, 71, 35, 11, 21, 27, 42, 57, 58, 17, 37, 77, 97, 98, 191, 192, 178, 99, 179, 180, 181, 182, 502, @@ -3090,9 +3053,9 @@ static const yytype_int16 yydefgoto[] = 844, 1524 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 122, 258, 301, 194, 478, 686, 902, 1137, 560, 865, @@ -4211,8 +4174,8 @@ static const yytype_int16 yycheck[] = 450, -1, -1, -1, -1, -1, -1, -1, 458 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 464, 465, 0, 183, 311, 466, 467, 468, 474, @@ -4446,7 +4409,7 @@ static const yytype_int16 yystos[] = 1098, 49, 901, 1084 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { 0, 463, 465, 464, 466, 466, 467, 467, 469, 470, @@ -4606,7 +4569,7 @@ static const yytype_int16 yyr1[] = 1161, 1162, 1162, 1163, 1163, 1164, 1164 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 3, 1, 2, 1, 1, 0, 0, @@ -4775,6 +4738,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4815,10 +4779,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -4842,15 +4803,11 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4964,13 +4921,13 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -5033,6 +4990,7 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -5058,7 +5016,7 @@ yyparse (void) if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5086,7 +5044,7 @@ yyparse (void) # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5097,7 +5055,7 @@ yyparse (void) YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5119,6 +5077,7 @@ yyparse (void) } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -5254,7 +5213,7 @@ yyparse (void) cb_build_registers (); current_program->flag_main = cb_flag_main; } -#line 5258 "parser.c" +#line 5217 "parser.c" break; case 3: /* start: $@1 nested_list "end of file" */ @@ -5276,19 +5235,19 @@ yyparse (void) emit_entry (current_program->program_id, 0, NULL); } } -#line 5280 "parser.c" +#line 5239 "parser.c" break; case 8: /* $@2: %empty */ #line 827 "parser.y" { cb_validate_program_environment (current_program); } -#line 5286 "parser.c" +#line 5245 "parser.c" break; case 9: /* $@3: %empty */ #line 828 "parser.y" { cb_validate_program_data (current_program); } -#line 5292 "parser.c" +#line 5251 "parser.c" break; case 10: /* program_definition: identification_division environment_division $@2 data_division $@3 procedure_division nested_prog end_program */ @@ -5299,19 +5258,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5303 "parser.c" +#line 5262 "parser.c" break; case 11: /* $@4: %empty */ #line 841 "parser.y" { cb_validate_program_environment (current_program); } -#line 5309 "parser.c" +#line 5268 "parser.c" break; case 12: /* $@5: %empty */ #line 842 "parser.y" { cb_validate_program_data (current_program); } -#line 5315 "parser.c" +#line 5274 "parser.c" break; case 13: /* program_mandatory: identification_division environment_division $@4 data_division $@5 procedure_division nested_prog end_mandatory */ @@ -5322,19 +5281,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5326 "parser.c" +#line 5285 "parser.c" break; case 14: /* $@6: %empty */ #line 855 "parser.y" { cb_validate_program_environment (current_program); } -#line 5332 "parser.c" +#line 5291 "parser.c" break; case 15: /* $@7: %empty */ #line 856 "parser.y" { cb_validate_program_data (current_program); } -#line 5338 "parser.c" +#line 5297 "parser.c" break; case 21: /* end_program: "END PROGRAM" program_name '.' */ @@ -5363,7 +5322,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5367 "parser.c" +#line 5326 "parser.c" break; case 22: /* end_mandatory: "END PROGRAM" program_name '.' */ @@ -5390,7 +5349,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5394 "parser.c" +#line 5353 "parser.c" break; case 23: /* end_function: "END FUNCTION" program_name '.' */ @@ -5417,7 +5376,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5421 "parser.c" +#line 5380 "parser.c" break; case 24: /* $@8: %empty */ @@ -5461,7 +5420,7 @@ yyparse (void) depth++; current_program->program_id = cb_build_program_id (yyvsp[-1], yyvsp[0]); } -#line 5465 "parser.c" +#line 5424 "parser.c" break; case 26: /* function_division: "FUNCTION-ID" '.' program_name as_literal '.' */ @@ -5506,19 +5465,19 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5510 "parser.c" +#line 5469 "parser.c" break; case 29: /* as_literal: %empty */ #line 1045 "parser.y" { yyval = NULL; } -#line 5516 "parser.c" +#line 5475 "parser.c" break; case 30: /* as_literal: AS "Literal" */ #line 1046 "parser.y" { yyval = yyvsp[0]; } -#line 5522 "parser.c" +#line 5481 "parser.c" break; case 33: /* program_type_clause: COMMON */ @@ -5529,7 +5488,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5533 "parser.c" +#line 5492 "parser.c" break; case 34: /* program_type_clause: COMMON _init_or_recurs */ @@ -5540,7 +5499,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5544 "parser.c" +#line 5503 "parser.c" break; case 36: /* _init_or_recurs: "INITIAL" */ @@ -5548,7 +5507,7 @@ yyparse (void) { current_program->flag_initial = 1; } -#line 5552 "parser.c" +#line 5511 "parser.c" break; case 37: /* _init_or_recurs: RECURSIVE */ @@ -5557,7 +5516,7 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5561 "parser.c" +#line 5520 "parser.c" break; case 41: /* configuration_section: CONFIGURATION SECTION '.' configuration_list */ @@ -5567,7 +5526,7 @@ yyparse (void) cb_error (_("CONFIGURATION SECTION not allowed in nested programs")); } } -#line 5571 "parser.c" +#line 5530 "parser.c" break; case 53: /* with_debugging_mode: _with DEBUGGING MODE */ @@ -5575,13 +5534,13 @@ yyparse (void) { cb_verify (cb_debugging_line, "DEBUGGING MODE"); } -#line 5579 "parser.c" +#line 5538 "parser.c" break; case 54: /* computer_name: "Identifier" */ #line 1143 "parser.y" { } -#line 5585 "parser.c" +#line 5544 "parser.c" break; case 65: /* object_computer_memory: MEMORY SIZE _is integer object_char_or_word */ @@ -5589,7 +5548,7 @@ yyparse (void) { cb_verify (cb_memory_size_clause, "MEMORY SIZE"); } -#line 5593 "parser.c" +#line 5552 "parser.c" break; case 68: /* object_computer_sequence: _program coll_sequence _is reference */ @@ -5597,7 +5556,7 @@ yyparse (void) { current_program->collating_sequence = yyvsp[0]; } -#line 5601 "parser.c" +#line 5560 "parser.c" break; case 69: /* object_computer_segment: "SEGMENT-LIMIT" _is integer */ @@ -5605,7 +5564,7 @@ yyparse (void) { /* Ignore */ } -#line 5609 "parser.c" +#line 5568 "parser.c" break; case 75: /* repository_name: FUNCTION repository_literal_list INTRINSIC */ @@ -5613,7 +5572,7 @@ yyparse (void) { current_program->function_spec_list = yyvsp[-1]; } -#line 5617 "parser.c" +#line 5576 "parser.c" break; case 76: /* repository_name: FUNCTION ALL INTRINSIC */ @@ -5621,19 +5580,19 @@ yyparse (void) { functions_are_all = 1; } -#line 5625 "parser.c" +#line 5584 "parser.c" break; case 77: /* repository_literal_list: "Literal" */ #line 1228 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5631 "parser.c" +#line 5590 "parser.c" break; case 78: /* repository_literal_list: repository_literal_list "Literal" */ #line 1230 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5637 "parser.c" +#line 5596 "parser.c" break; case 96: /* mnemonic_name_clause: "Identifier" _is CRT */ @@ -5647,7 +5606,7 @@ yyparse (void) } /* current_program->flag_screen = 1; */ } -#line 5651 "parser.c" +#line 5610 "parser.c" break; case 97: /* $@9: %empty */ @@ -5661,7 +5620,7 @@ yyparse (void) } save_tree_2 = yyvsp[0]; } -#line 5665 "parser.c" +#line 5624 "parser.c" break; case 99: /* $@10: %empty */ @@ -5673,7 +5632,7 @@ yyparse (void) } save_tree_2 = NULL; } -#line 5677 "parser.c" +#line 5636 "parser.c" break; case 101: /* mnemonic_name_clause: "ARGUMENT-NUMBER" _is undefined_word */ @@ -5691,7 +5650,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-NUMBER clause is not yet supported")); } } -#line 5695 "parser.c" +#line 5654 "parser.c" break; case 102: /* mnemonic_name_clause: "ARGUMENT-VALUE" _is undefined_word */ @@ -5709,7 +5668,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-VALUE clause is not yet supported")); } } -#line 5713 "parser.c" +#line 5672 "parser.c" break; case 103: /* mnemonic_name_clause: "ENVIRONMENT-NAME" _is undefined_word */ @@ -5727,7 +5686,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-NAME clause is not yet supported")); } } -#line 5731 "parser.c" +#line 5690 "parser.c" break; case 104: /* mnemonic_name_clause: "ENVIRONMENT-VALUE" _is undefined_word */ @@ -5745,7 +5704,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-VALUE clause is not yet supported")); } } -#line 5749 "parser.c" +#line 5708 "parser.c" break; case 109: /* special_name_mnemonic_on_off: on_or_off _status _is undefined_word */ @@ -5757,19 +5716,19 @@ yyparse (void) cb_define_switch_name (yyvsp[0], save_tree_1, yyvsp[-3], save_tree_2); } } -#line 5761 "parser.c" +#line 5720 "parser.c" break; case 110: /* on_or_off: ON */ #line 1379 "parser.y" { yyval = cb_int1; } -#line 5767 "parser.c" +#line 5726 "parser.c" break; case 111: /* on_or_off: OFF */ #line 1380 "parser.y" { yyval = cb_int0; } -#line 5773 "parser.c" +#line 5732 "parser.c" break; case 112: /* $@11: %empty */ @@ -5777,7 +5736,7 @@ yyparse (void) { save_tree_1 = yyvsp[0]; } -#line 5781 "parser.c" +#line 5740 "parser.c" break; case 113: /* alphabet_name_clause: ALPHABET undefined_word $@11 _is alphabet_definition */ @@ -5786,31 +5745,31 @@ yyparse (void) current_program->alphabet_name_list = cb_list_add (current_program->alphabet_name_list, yyvsp[0]); } -#line 5790 "parser.c" +#line 5749 "parser.c" break; case 114: /* alphabet_definition: NATIVE */ #line 1399 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_NATIVE); } -#line 5796 "parser.c" +#line 5755 "parser.c" break; case 115: /* alphabet_definition: "STANDARD-1" */ #line 1400 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_1); } -#line 5802 "parser.c" +#line 5761 "parser.c" break; case 116: /* alphabet_definition: "STANDARD-2" */ #line 1401 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_2); } -#line 5808 "parser.c" +#line 5767 "parser.c" break; case 117: /* alphabet_definition: EBCDIC */ #line 1402 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_EBCDIC); } -#line 5814 "parser.c" +#line 5773 "parser.c" break; case 118: /* alphabet_definition: alphabet_literal_list */ @@ -5819,31 +5778,31 @@ yyparse (void) yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_CUSTOM); CB_ALPHABET_NAME (yyval)->custom_list = yyvsp[0]; } -#line 5823 "parser.c" +#line 5782 "parser.c" break; case 119: /* alphabet_literal_list: alphabet_literal */ #line 1411 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5829 "parser.c" +#line 5788 "parser.c" break; case 120: /* alphabet_literal_list: alphabet_literal_list alphabet_literal */ #line 1413 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5835 "parser.c" +#line 5794 "parser.c" break; case 121: /* alphabet_literal: alphabet_lits */ #line 1417 "parser.y" { yyval = yyvsp[0]; } -#line 5841 "parser.c" +#line 5800 "parser.c" break; case 122: /* alphabet_literal: alphabet_lits THRU alphabet_lits */ #line 1418 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 5847 "parser.c" +#line 5806 "parser.c" break; case 123: /* @12: %empty */ @@ -5852,7 +5811,7 @@ yyparse (void) yyval = cb_list_init (yyvsp[-1]); save_tree_2 = yyval; } -#line 5856 "parser.c" +#line 5815 "parser.c" break; case 124: /* alphabet_literal: alphabet_lits ALSO @12 alphabet_also_sequence */ @@ -5860,79 +5819,79 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 5864 "parser.c" +#line 5823 "parser.c" break; case 127: /* alphabet_lits: "Literal" */ #line 1436 "parser.y" { yyval = yyvsp[0]; } -#line 5870 "parser.c" +#line 5829 "parser.c" break; case 128: /* alphabet_lits: SPACE */ #line 1437 "parser.y" { yyval = cb_space; } -#line 5876 "parser.c" +#line 5835 "parser.c" break; case 129: /* alphabet_lits: ZERO */ #line 1438 "parser.y" { yyval = cb_zero; } -#line 5882 "parser.c" +#line 5841 "parser.c" break; case 130: /* alphabet_lits: QUOTE */ #line 1439 "parser.y" { yyval = cb_quote; } -#line 5888 "parser.c" +#line 5847 "parser.c" break; case 131: /* alphabet_lits: "HIGH-VALUE" */ #line 1440 "parser.y" { yyval = cb_norm_high; } -#line 5894 "parser.c" +#line 5853 "parser.c" break; case 132: /* alphabet_lits: "LOW-VALUE" */ #line 1441 "parser.y" { yyval = cb_norm_low; } -#line 5900 "parser.c" +#line 5859 "parser.c" break; case 133: /* alphabet_also_literal: "Literal" */ #line 1445 "parser.y" { cb_list_add (save_tree_2, yyvsp[0]); } -#line 5906 "parser.c" +#line 5865 "parser.c" break; case 134: /* alphabet_also_literal: SPACE */ #line 1446 "parser.y" { cb_list_add (save_tree_2, cb_space); } -#line 5912 "parser.c" +#line 5871 "parser.c" break; case 135: /* alphabet_also_literal: ZERO */ #line 1447 "parser.y" { cb_list_add (save_tree_2, cb_zero); } -#line 5918 "parser.c" +#line 5877 "parser.c" break; case 136: /* alphabet_also_literal: QUOTE */ #line 1448 "parser.y" { cb_list_add (save_tree_2, cb_quote); } -#line 5924 "parser.c" +#line 5883 "parser.c" break; case 137: /* alphabet_also_literal: "HIGH-VALUE" */ #line 1449 "parser.y" { cb_list_add (save_tree_2, cb_norm_high); } -#line 5930 "parser.c" +#line 5889 "parser.c" break; case 138: /* alphabet_also_literal: "LOW-VALUE" */ #line 1450 "parser.y" { cb_list_add (save_tree_2, cb_norm_low); } -#line 5936 "parser.c" +#line 5895 "parser.c" break; case 139: /* symbolic_characters_clause: SYMBOLIC _characters symbolic_characters_list */ @@ -5944,7 +5903,7 @@ yyparse (void) } PENDING ("SYMBOLIC CHARACTERS"); } -#line 5948 "parser.c" +#line 5907 "parser.c" break; case 140: /* symbolic_characters_list: char_list _is_are integer_list */ @@ -5957,31 +5916,31 @@ yyparse (void) yyval = NULL; } } -#line 5961 "parser.c" +#line 5920 "parser.c" break; case 141: /* char_list: undefined_word */ #line 1480 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5967 "parser.c" +#line 5926 "parser.c" break; case 142: /* char_list: char_list undefined_word */ #line 1481 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5973 "parser.c" +#line 5932 "parser.c" break; case 143: /* integer_list: integer */ #line 1485 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5979 "parser.c" +#line 5938 "parser.c" break; case 144: /* integer_list: integer_list integer */ #line 1486 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5985 "parser.c" +#line 5944 "parser.c" break; case 145: /* class_name_clause: CLASS undefined_word _is class_item_list */ @@ -5991,25 +5950,25 @@ yyparse (void) cb_list_add (current_program->class_name_list, cb_build_class_name (yyvsp[-2], yyvsp[0])); } -#line 5995 "parser.c" +#line 5954 "parser.c" break; case 146: /* class_item_list: class_item */ #line 1502 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 6001 "parser.c" +#line 5960 "parser.c" break; case 147: /* class_item_list: class_item_list class_item */ #line 1503 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 6007 "parser.c" +#line 5966 "parser.c" break; case 148: /* class_item: basic_value */ #line 1507 "parser.y" { yyval = yyvsp[0]; } -#line 6013 "parser.c" +#line 5972 "parser.c" break; case 149: /* class_item: basic_value THRU basic_value */ @@ -6022,7 +5981,7 @@ yyparse (void) yyval = cb_build_pair (yyvsp[0], yyvsp[-2]); } } -#line 6026 "parser.c" +#line 5985 "parser.c" break; case 150: /* locale_clause: LOCALE undefined_word _is reference */ @@ -6036,7 +5995,7 @@ yyparse (void) cb_list_add (current_program->locale_list, l); } } -#line 6040 "parser.c" +#line 5999 "parser.c" break; case 151: /* currency_sign_clause: CURRENCY _sign _is "Literal" */ @@ -6101,7 +6060,7 @@ yyparse (void) } current_program->currency_symbol = s[0]; } -#line 6105 "parser.c" +#line 6064 "parser.c" break; case 152: /* decimal_point_clause: "DECIMAL-POINT" _is COMMA */ @@ -6110,31 +6069,31 @@ yyparse (void) current_program->decimal_point = ','; current_program->numeric_separator = '.'; } -#line 6114 "parser.c" +#line 6073 "parser.c" break; case 153: /* cursor_clause: CURSOR _is reference */ #line 1615 "parser.y" { current_program->cursor_pos = yyvsp[0]; } -#line 6120 "parser.c" +#line 6079 "parser.c" break; case 154: /* crt_status_clause: CRT STATUS _is reference */ #line 1622 "parser.y" { current_program->crt_status = yyvsp[0]; } -#line 6126 "parser.c" +#line 6085 "parser.c" break; case 155: /* screen_control: "SCREEN-CONTROL" _is reference */ #line 1629 "parser.y" { PENDING ("SCREEN CONTROL"); } -#line 6132 "parser.c" +#line 6091 "parser.c" break; case 156: /* event_status: "EVENT-STATUS" _is reference */ #line 1635 "parser.y" { PENDING ("EVENT STATUS"); } -#line 6138 "parser.c" +#line 6097 "parser.c" break; case 159: /* $@13: %empty */ @@ -6147,7 +6106,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6151 "parser.c" +#line 6110 "parser.c" break; case 161: /* $@14: %empty */ @@ -6160,7 +6119,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6164 "parser.c" +#line 6123 "parser.c" break; case 167: /* $@15: %empty */ @@ -6179,7 +6138,7 @@ yyparse (void) current_program->file_list = cb_cons (CB_TREE (current_file), current_program->file_list); } -#line 6183 "parser.c" +#line 6142 "parser.c" break; case 168: /* file_control_entry: SELECT flag_optional undefined_word $@15 select_clause_sequence '.' */ @@ -6187,7 +6146,7 @@ yyparse (void) { validate_file (current_file, yyvsp[-3]); } -#line 6191 "parser.c" +#line 6150 "parser.c" break; case 186: /* assign_clause: ASSIGN _to _ext_clause _device assignment_name */ @@ -6195,7 +6154,7 @@ yyparse (void) { current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } -#line 6199 "parser.c" +#line 6158 "parser.c" break; case 187: /* assign_clause: ASSIGN _to _ext_clause DISK */ @@ -6204,7 +6163,7 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("DISK")); } -#line 6208 "parser.c" +#line 6167 "parser.c" break; case 188: /* assign_clause: ASSIGN _to _ext_clause PRINTER */ @@ -6213,13 +6172,13 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("PRINTER")); } -#line 6217 "parser.c" +#line 6176 "parser.c" break; case 191: /* _device: PRINTER */ #line 1745 "parser.y" { current_file->organization = COB_ORG_LINE_SEQUENTIAL; } -#line 6223 "parser.c" +#line 6182 "parser.c" break; case 193: /* _ext_clause: EXTERNAL */ @@ -6227,7 +6186,7 @@ yyparse (void) { current_file->external_assign = 1; } -#line 6231 "parser.c" +#line 6190 "parser.c" break; case 194: /* _ext_clause: DYNAMIC */ @@ -6235,7 +6194,7 @@ yyparse (void) { current_file->external_assign = 0; } -#line 6239 "parser.c" +#line 6198 "parser.c" break; case 196: /* assignment_name: DISPLAY */ @@ -6246,7 +6205,7 @@ yyparse (void) s = "$#@DUMMY@#$"; yyval = cb_build_alphanumeric_literal ((unsigned char *)s, strlen (s)); } -#line 6250 "parser.c" +#line 6209 "parser.c" break; case 197: /* assignment_name: _literal assignment_device_name_list */ @@ -6267,37 +6226,37 @@ yyparse (void) yyval = yyvsp[-1]; } } -#line 6271 "parser.c" +#line 6230 "parser.c" break; case 198: /* assignment_device_name_list: qualified_word */ #line 1788 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 6277 "parser.c" +#line 6236 "parser.c" break; case 199: /* assignment_device_name_list: assignment_device_name_list qualified_word */ #line 1789 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 6283 "parser.c" +#line 6242 "parser.c" break; case 201: /* access_mode: SEQUENTIAL */ #line 1799 "parser.y" { current_file->access_mode = COB_ACCESS_SEQUENTIAL; } -#line 6289 "parser.c" +#line 6248 "parser.c" break; case 202: /* access_mode: DYNAMIC */ #line 1800 "parser.y" { current_file->access_mode = COB_ACCESS_DYNAMIC; } -#line 6295 "parser.c" +#line 6254 "parser.c" break; case 203: /* access_mode: RANDOM */ #line 1801 "parser.y" { current_file->access_mode = COB_ACCESS_RANDOM; } -#line 6301 "parser.c" +#line 6260 "parser.c" break; case 204: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference flag_duplicates */ @@ -6321,7 +6280,7 @@ yyparse (void) l->next = p; } } -#line 6325 "parser.c" +#line 6284 "parser.c" break; case 205: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6365,7 +6324,7 @@ yyparse (void) } } } -#line 6369 "parser.c" +#line 6328 "parser.c" break; case 206: /* $@16: %empty */ @@ -6373,7 +6332,7 @@ yyparse (void) { key_component_list = NULL; } -#line 6377 "parser.c" +#line 6336 "parser.c" break; case 209: /* split_key: reference */ @@ -6390,25 +6349,25 @@ yyparse (void) c->next = comp; } } -#line 6394 "parser.c" +#line 6353 "parser.c" break; case 210: /* key_is_eq: %empty */ #line 1895 "parser.y" { yyval = NULL; } -#line 6400 "parser.c" +#line 6359 "parser.c" break; case 211: /* key_is_eq: SOURCE _is */ #line 1896 "parser.y" { yyval = cb_int1; } -#line 6406 "parser.c" +#line 6365 "parser.c" break; case 212: /* key_is_eq: '=' */ #line 1897 "parser.y" { yyval = cb_int('='); } -#line 6412 "parser.c" +#line 6371 "parser.c" break; case 213: /* collating_sequence_clause: coll_sequence _is "Identifier" */ @@ -6416,7 +6375,7 @@ yyparse (void) { PENDING ("COLLATING SEQUENCE"); } -#line 6420 "parser.c" +#line 6379 "parser.c" break; case 214: /* file_status_clause: file_or_sort STATUS _is reference opt_reference */ @@ -6427,25 +6386,25 @@ yyparse (void) PENDING ("2nd FILE STATUS"); } } -#line 6431 "parser.c" +#line 6390 "parser.c" break; case 219: /* lock_mode: MANUAL lock_with */ #line 1935 "parser.y" { current_file->lock_mode = COB_LOCK_MANUAL; } -#line 6437 "parser.c" +#line 6396 "parser.c" break; case 220: /* lock_mode: AUTOMATIC lock_with */ #line 1936 "parser.y" { current_file->lock_mode = COB_LOCK_AUTOMATIC; } -#line 6443 "parser.c" +#line 6402 "parser.c" break; case 221: /* lock_mode: EXCLUSIVE */ #line 1937 "parser.y" { current_file->lock_mode = COB_LOCK_EXCLUSIVE; } -#line 6449 "parser.c" +#line 6408 "parser.c" break; case 224: /* lock_with: WITH LOCK ON MULTIPLE lock_records */ @@ -6453,13 +6412,13 @@ yyparse (void) { current_file->lock_mode |= COB_LOCK_MULTIPLE; } -#line 6457 "parser.c" +#line 6416 "parser.c" break; case 225: /* lock_with: WITH ROLLBACK */ #line 1946 "parser.y" { PENDING ("WITH ROLLBACK"); } -#line 6463 "parser.c" +#line 6422 "parser.c" break; case 230: /* organization: INDEXED */ @@ -6472,7 +6431,7 @@ yyparse (void) organized_seen = 1; } } -#line 6476 "parser.c" +#line 6435 "parser.c" break; case 231: /* organization: RECORD _binary SEQUENTIAL */ @@ -6485,7 +6444,7 @@ yyparse (void) organized_seen = 1; } } -#line 6489 "parser.c" +#line 6448 "parser.c" break; case 232: /* organization: SEQUENTIAL */ @@ -6498,7 +6457,7 @@ yyparse (void) organized_seen = 1; } } -#line 6502 "parser.c" +#line 6461 "parser.c" break; case 233: /* organization: RELATIVE */ @@ -6511,7 +6470,7 @@ yyparse (void) organized_seen = 1; } } -#line 6515 "parser.c" +#line 6474 "parser.c" break; case 234: /* organization: LINE SEQUENTIAL */ @@ -6524,7 +6483,7 @@ yyparse (void) organized_seen = 1; } } -#line 6528 "parser.c" +#line 6487 "parser.c" break; case 235: /* padding_character_clause: PADDING _character _is reference_or_literal */ @@ -6532,13 +6491,13 @@ yyparse (void) { cb_verify (cb_padding_character_clause, "PADDING CHARACTER"); } -#line 6536 "parser.c" +#line 6495 "parser.c" break; case 236: /* record_delimiter_clause: RECORD DELIMITER _is "STANDARD-1" */ #line 2023 "parser.y" { /* ignored */ } -#line 6542 "parser.c" +#line 6501 "parser.c" break; case 237: /* record_key_clause: RECORD _key _is reference flag_duplicates */ @@ -6551,7 +6510,7 @@ yyparse (void) current_file->key = yyvsp[-1]; } -#line 6555 "parser.c" +#line 6514 "parser.c" break; case 238: /* record_key_clause: RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6587,55 +6546,55 @@ yyparse (void) current_file->component_list = key_component_list; } } -#line 6591 "parser.c" +#line 6550 "parser.c" break; case 239: /* relative_key_clause: RELATIVE _key _is reference */ #line 2077 "parser.y" { current_file->key = yyvsp[0]; } -#line 6597 "parser.c" +#line 6556 "parser.c" break; case 240: /* reserve_clause: RESERVE integer _area */ #line 2084 "parser.y" { /* ignored */ } -#line 6603 "parser.c" +#line 6562 "parser.c" break; case 241: /* reserve_clause: RESERVE NO */ #line 2085 "parser.y" { /* ignored */ } -#line 6609 "parser.c" +#line 6568 "parser.c" break; case 242: /* sharing_clause: SHARING _with sharing_option */ #line 2092 "parser.y" { current_file->sharing = yyvsp[0]; } -#line 6615 "parser.c" +#line 6574 "parser.c" break; case 243: /* sharing_option: ALL _other */ #line 2096 "parser.y" { yyval = NULL; PENDING ("SHARING ALL OTHER"); } -#line 6621 "parser.c" +#line 6580 "parser.c" break; case 244: /* sharing_option: NO _other */ #line 2097 "parser.y" { yyval = cb_int1; } -#line 6627 "parser.c" +#line 6586 "parser.c" break; case 245: /* sharing_option: READ ONLY */ #line 2098 "parser.y" { yyval = cb_int0; } -#line 6633 "parser.c" +#line 6592 "parser.c" break; case 246: /* nominal_key_clause: NOMINAL _key _is reference */ #line 2104 "parser.y" { PENDING ("NOMINAL KEY"); } -#line 6639 "parser.c" +#line 6598 "parser.c" break; case 257: /* same_clause: SAME same_option _area _for file_name_list */ @@ -6661,31 +6620,31 @@ yyparse (void) break; } } -#line 6665 "parser.c" +#line 6624 "parser.c" break; case 258: /* same_option: %empty */ #line 2159 "parser.y" { yyval = cb_int0; } -#line 6671 "parser.c" +#line 6630 "parser.c" break; case 259: /* same_option: RECORD */ #line 2160 "parser.y" { yyval = cb_int1; } -#line 6677 "parser.c" +#line 6636 "parser.c" break; case 260: /* same_option: SORT */ #line 2161 "parser.y" { yyval = cb_int2; } -#line 6683 "parser.c" +#line 6642 "parser.c" break; case 261: /* same_option: "SORT-MERGE" */ #line 2162 "parser.y" { yyval = cb_int2; } -#line 6689 "parser.c" +#line 6648 "parser.c" break; case 262: /* multiple_file_tape_clause: MULTIPLE _file _tape _contains multiple_file_list */ @@ -6693,13 +6652,13 @@ yyparse (void) { cb_verify (cb_multiple_file_tape_clause, "MULTIPLE FILE TAPE"); } -#line 6697 "parser.c" +#line 6656 "parser.c" break; case 265: /* multiple_file: file_name multiple_file_position */ #line 2180 "parser.y" { } -#line 6703 "parser.c" +#line 6662 "parser.c" break; case 271: /* apply_clause: APPLY "COMMITMENT-CONTROL" _on reference_list */ @@ -6707,7 +6666,7 @@ yyparse (void) { PENDING ("APPLY COMMITMENT-CONTROL"); } -#line 6711 "parser.c" +#line 6670 "parser.c" break; case 272: /* apply_clause: APPLY "CYL-OVERFLOW" _of "Literal" TRACKS ON reference_list */ @@ -6715,7 +6674,7 @@ yyparse (void) { PENDING ("APPLY CYL-OVERFLOW"); } -#line 6719 "parser.c" +#line 6678 "parser.c" break; case 273: /* apply_clause: APPLY "CORE-INDEX" TO reference ON reference_list */ @@ -6723,7 +6682,7 @@ yyparse (void) { PENDING ("APPLY CORE-INDEX"); } -#line 6727 "parser.c" +#line 6686 "parser.c" break; case 274: /* apply_clause: APPLY "FORMS-OVERLAY" TO reference ON reference_list */ @@ -6731,7 +6690,7 @@ yyparse (void) { PENDING ("APPLY FORMS-OVERLAY"); } -#line 6735 "parser.c" +#line 6694 "parser.c" break; case 275: /* apply_clause: APPLY "CLOSE-NOFEED" ON reference_list */ @@ -6739,13 +6698,13 @@ yyparse (void) { PENDING ("APPLY CLOSE-NOFEED"); } -#line 6743 "parser.c" +#line 6702 "parser.c" break; case 279: /* $@17: %empty */ #line 2238 "parser.y" { current_storage = CB_STORAGE_FILE; } -#line 6749 "parser.c" +#line 6708 "parser.c" break; case 281: /* $@18: %empty */ @@ -6759,7 +6718,7 @@ yyparse (void) } current_storage = CB_STORAGE_FILE; } -#line 6763 "parser.c" +#line 6722 "parser.c" break; case 285: /* file_description: file_type file_description_entry record_description_list */ @@ -6771,7 +6730,7 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6775 "parser.c" +#line 6734 "parser.c" break; case 286: /* file_description_sequence_without_type: file_description_entry record_description_list */ @@ -6783,19 +6742,19 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6787 "parser.c" +#line 6746 "parser.c" break; case 288: /* file_type: FD */ #line 2283 "parser.y" { yyval = cb_int0; } -#line 6793 "parser.c" +#line 6752 "parser.c" break; case 289: /* file_type: SD */ #line 2284 "parser.y" { yyval = cb_int1; } -#line 6799 "parser.c" +#line 6758 "parser.c" break; case 290: /* @19: %empty */ @@ -6810,7 +6769,7 @@ yyparse (void) current_file->organization = COB_ORG_SORT; } } -#line 6814 "parser.c" +#line 6773 "parser.c" break; case 291: /* file_description_entry: file_name @19 file_description_clause_sequence '.' */ @@ -6819,7 +6778,7 @@ yyparse (void) /* Shut up bison */ dummy_tree = yyvsp[-2]; } -#line 6823 "parser.c" +#line 6782 "parser.c" break; case 294: /* file_description_clause: _is EXTERNAL */ @@ -6830,7 +6789,7 @@ yyparse (void) } current_file->external = 1; } -#line 6834 "parser.c" +#line 6793 "parser.c" break; case 295: /* file_description_clause: _is GLOBAL */ @@ -6841,13 +6800,13 @@ yyparse (void) } current_file->global = 1; } -#line 6845 "parser.c" +#line 6804 "parser.c" break; case 306: /* block_contains_clause: BLOCK _contains integer opt_to_integer _records_or_characters */ #line 2347 "parser.y" { /* ignored */ } -#line 6851 "parser.c" +#line 6810 "parser.c" break; case 310: /* record_clause: RECORD _contains integer _characters */ @@ -6863,7 +6822,7 @@ yyparse (void) } } } -#line 6867 "parser.c" +#line 6826 "parser.c" break; case 311: /* record_clause: RECORD _contains integer TO integer _characters */ @@ -6892,7 +6851,7 @@ yyparse (void) } } } -#line 6896 "parser.c" +#line 6855 "parser.c" break; case 312: /* record_clause: RECORD _is VARYING _in _size opt_from_integer opt_to_integer _characters record_depending */ @@ -6917,7 +6876,7 @@ yyparse (void) cb_error (_("RECORD clause invalid")); } } -#line 6921 "parser.c" +#line 6880 "parser.c" break; case 314: /* record_depending: DEPENDING _on reference */ @@ -6925,31 +6884,31 @@ yyparse (void) { current_file->record_depending = yyvsp[0]; } -#line 6929 "parser.c" +#line 6888 "parser.c" break; case 315: /* opt_from_integer: %empty */ #line 2425 "parser.y" { yyval = NULL; } -#line 6935 "parser.c" +#line 6894 "parser.c" break; case 316: /* opt_from_integer: _from integer */ #line 2426 "parser.y" { yyval = yyvsp[0]; } -#line 6941 "parser.c" +#line 6900 "parser.c" break; case 317: /* opt_to_integer: %empty */ #line 2430 "parser.y" { yyval = NULL; } -#line 6947 "parser.c" +#line 6906 "parser.c" break; case 318: /* opt_to_integer: TO integer */ #line 2431 "parser.y" { yyval = yyvsp[0]; } -#line 6953 "parser.c" +#line 6912 "parser.c" break; case 319: /* label_records_clause: LABEL records label_option */ @@ -6957,7 +6916,7 @@ yyparse (void) { cb_verify (cb_label_records_clause, "LABEL RECORDS"); } -#line 6961 "parser.c" +#line 6920 "parser.c" break; case 322: /* value_of_clause: VALUE OF "Identifier" _is valueof_name */ @@ -6965,7 +6924,7 @@ yyparse (void) { cb_verify (cb_value_of_clause, "VALUE OF"); } -#line 6969 "parser.c" +#line 6928 "parser.c" break; case 323: /* value_of_clause: VALUE OF "FILE-ID" _is valueof_name */ @@ -6975,7 +6934,7 @@ yyparse (void) current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } } -#line 6979 "parser.c" +#line 6938 "parser.c" break; case 326: /* data_records_clause: DATA records no_reference_list */ @@ -6983,7 +6942,7 @@ yyparse (void) { cb_verify (cb_data_records_clause, "DATA RECORDS"); } -#line 6987 "parser.c" +#line 6946 "parser.c" break; case 327: /* linage_clause: LINAGE _is reference_or_literal _lines linage_sequence */ @@ -7002,7 +6961,7 @@ yyparse (void) current_linage++; } } -#line 7006 "parser.c" +#line 6965 "parser.c" break; case 333: /* linage_footing: _with FOOTING _at reference_or_literal _lines */ @@ -7010,7 +6969,7 @@ yyparse (void) { current_file->latfoot = yyvsp[-1]; } -#line 7014 "parser.c" +#line 6973 "parser.c" break; case 334: /* linage_top: _at TOP reference_or_literal _lines */ @@ -7018,7 +6977,7 @@ yyparse (void) { current_file->lattop = yyvsp[-1]; } -#line 7022 "parser.c" +#line 6981 "parser.c" break; case 335: /* linage_bottom: _at BOTTOM reference_or_literal */ @@ -7026,13 +6985,13 @@ yyparse (void) { current_file->latbot = yyvsp[0]; } -#line 7030 "parser.c" +#line 6989 "parser.c" break; case 336: /* recording_mode_clause: RECORDING _mode _is "Identifier" */ #line 2536 "parser.y" { /* ignore */ } -#line 7036 "parser.c" +#line 6995 "parser.c" break; case 337: /* code_set_clause: "CODE-SET" _is "Identifier" */ @@ -7049,7 +7008,7 @@ yyparse (void) } } } -#line 7053 "parser.c" +#line 7012 "parser.c" break; case 338: /* report_clause: REPORT _is report_name */ @@ -7057,7 +7016,7 @@ yyparse (void) { cb_warning (_("file descriptor REPORT IS")); } -#line 7061 "parser.c" +#line 7020 "parser.c" break; case 339: /* report_clause: REPORTS _are report_name */ @@ -7065,13 +7024,13 @@ yyparse (void) { cb_warning (_("file descriptor REPORTS ARE")); } -#line 7069 "parser.c" +#line 7028 "parser.c" break; case 341: /* $@20: %empty */ #line 2577 "parser.y" { current_storage = CB_STORAGE_WORKING; } -#line 7075 "parser.c" +#line 7034 "parser.c" break; case 342: /* working_storage_section: "WORKING-STORAGE" SECTION '.' $@20 record_description_list */ @@ -7082,19 +7041,19 @@ yyparse (void) cb_field_add (current_program->working_storage, CB_FIELD (yyvsp[0])); } } -#line 7086 "parser.c" +#line 7045 "parser.c" break; case 343: /* record_description_list: %empty */ #line 2588 "parser.y" { yyval = NULL; } -#line 7092 "parser.c" +#line 7051 "parser.c" break; case 344: /* record_description_list: record_description_list_1 */ #line 2589 "parser.y" { yyval = yyvsp[0]; } -#line 7098 "parser.c" +#line 7057 "parser.c" break; case 345: /* $@21: %empty */ @@ -7104,7 +7063,7 @@ yyparse (void) description_field = NULL; cb_clear_real_field (); } -#line 7108 "parser.c" +#line 7067 "parser.c" break; case 346: /* record_description_list_1: $@21 record_description_list_2 */ @@ -7117,7 +7076,7 @@ yyparse (void) } yyval = CB_TREE (description_field); } -#line 7121 "parser.c" +#line 7080 "parser.c" break; case 351: /* $@22: %empty */ @@ -7133,7 +7092,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7137 "parser.c" +#line 7096 "parser.c" break; case 352: /* data_description: level_number entry_name $@22 data_description_clause_sequence _maybe_next_level_number */ @@ -7150,7 +7109,7 @@ yyparse (void) description_field = current_field; } } -#line 7154 "parser.c" +#line 7113 "parser.c" break; case 353: /* $@23: %empty */ @@ -7166,7 +7125,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7170 "parser.c" +#line 7129 "parser.c" break; case 354: /* data_description: level_number_88 entry_name $@23 value_cond_clause */ @@ -7181,7 +7140,7 @@ yyparse (void) } } -#line 7185 "parser.c" +#line 7144 "parser.c" break; case 358: /* _maybe_next_level_number: "Literal" */ @@ -7203,7 +7162,7 @@ yyparse (void) cb_unget_token (LITERAL, yyvsp[0]); } } -#line 7207 "parser.c" +#line 7166 "parser.c" break; case 359: /* entry_name: %empty */ @@ -7213,7 +7172,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7217 "parser.c" +#line 7176 "parser.c" break; case 360: /* entry_name: FILLER */ @@ -7223,7 +7182,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7227 "parser.c" +#line 7186 "parser.c" break; case 361: /* entry_name: "Identifier" */ @@ -7233,7 +7192,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7237 "parser.c" +#line 7196 "parser.c" break; case 362: /* const_name: "Identifier" */ @@ -7243,7 +7202,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7247 "parser.c" +#line 7206 "parser.c" break; case 364: /* const_global: _is GLOBAL */ @@ -7252,25 +7211,25 @@ yyparse (void) current_field->flag_is_global = 1; cb_error (_("CONSTANT with GLOBAL clause is not yet supported")); } -#line 7256 "parser.c" +#line 7215 "parser.c" break; case 365: /* lit_or_length: literal */ #line 2741 "parser.y" { yyval = yyvsp[0]; } -#line 7262 "parser.c" +#line 7221 "parser.c" break; case 366: /* lit_or_length: LENGTH _of identifier_1 */ #line 2742 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7268 "parser.c" +#line 7227 "parser.c" break; case 367: /* lit_or_length: "BYTE-LENGTH" _of identifier_1 */ #line 2743 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7274 "parser.c" +#line 7233 "parser.c" break; case 368: /* constant_entry: level_number const_name CONSTANT const_global _as lit_or_length */ @@ -7290,7 +7249,7 @@ yyparse (void) /* Ignore return value */ cb_validate_78_item (CB_FIELD (x)); } -#line 7294 "parser.c" +#line 7253 "parser.c" break; case 369: /* data_description_clause_sequence: %empty */ @@ -7299,7 +7258,7 @@ yyparse (void) /* required to check redefines */ yyval = NULL; } -#line 7303 "parser.c" +#line 7262 "parser.c" break; case 370: /* data_description_clause_sequence: data_description_clause_sequence data_description_clause */ @@ -7308,7 +7267,7 @@ yyparse (void) /* required to check redefines */ yyval = cb_true; } -#line 7312 "parser.c" +#line 7271 "parser.c" break; case 386: /* redefines_clause: REDEFINES identifier_1 */ @@ -7328,7 +7287,7 @@ yyparse (void) YYERROR; } } -#line 7332 "parser.c" +#line 7291 "parser.c" break; case 387: /* external_clause: _is EXTERNAL as_extname */ @@ -7351,13 +7310,13 @@ yyparse (void) has_external = 1; } } -#line 7355 "parser.c" +#line 7314 "parser.c" break; case 388: /* as_extname: %empty */ #line 2845 "parser.y" { current_field->ename = NULL; } -#line 7361 "parser.c" +#line 7320 "parser.c" break; case 389: /* as_extname: AS "Literal" */ @@ -7368,7 +7327,7 @@ yyparse (void) x = CB_FIELD(cb_build_field (cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)))); current_field->ename = x->name; } -#line 7372 "parser.c" +#line 7331 "parser.c" break; case 390: /* global_clause: _is GLOBAL */ @@ -7386,209 +7345,215 @@ yyparse (void) current_field->flag_is_global = 1; } } -#line 7390 "parser.c" +#line 7349 "parser.c" break; case 391: /* picture_clause: PICTURE */ #line 2878 "parser.y" { current_field->pic = CB_PICTURE (yyvsp[0]); } -#line 7396 "parser.c" +#line 7355 "parser.c" break; case 394: /* usage: BINARY */ #line 2890 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7402 "parser.c" +#line 7361 "parser.c" break; case 395: /* usage: COMP */ #line 2891 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7408 "parser.c" +#line 7367 "parser.c" break; case 396: /* usage: "COMP-1" */ -#line 2892 "parser.y" - { current_field->usage = CB_USAGE_FLOAT; } -#line 7414 "parser.c" +#line 2893 "parser.y" +{ + current_field->usage = CB_USAGE_FLOAT; + cb_error (_("COMP-1 not implemented")); +} +#line 7376 "parser.c" break; case 397: /* usage: "COMP-2" */ -#line 2893 "parser.y" - { current_field->usage = CB_USAGE_DOUBLE; } -#line 7420 "parser.c" +#line 2898 "parser.y" +{ + current_field->usage = CB_USAGE_DOUBLE; + cb_error (_("COMP-2 not implemented")); +} +#line 7385 "parser.c" break; case 398: /* usage: "COMP-3" */ -#line 2894 "parser.y" +#line 2902 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7426 "parser.c" +#line 7391 "parser.c" break; case 399: /* usage: "COMP-4" */ -#line 2895 "parser.y" +#line 2903 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7432 "parser.c" +#line 7397 "parser.c" break; case 400: /* usage: "COMP-5" */ -#line 2896 "parser.y" +#line 2904 "parser.y" { current_field->usage = CB_USAGE_COMP_5; } -#line 7438 "parser.c" +#line 7403 "parser.c" break; case 401: /* usage: "COMP-X" */ -#line 2897 "parser.y" +#line 2905 "parser.y" { current_field->usage = CB_USAGE_COMP_X; } -#line 7444 "parser.c" +#line 7409 "parser.c" break; case 402: /* usage: DISPLAY */ -#line 2898 "parser.y" +#line 2906 "parser.y" { current_field->usage = CB_USAGE_DISPLAY; } -#line 7450 "parser.c" +#line 7415 "parser.c" break; case 403: /* usage: INDEX */ -#line 2899 "parser.y" +#line 2907 "parser.y" { current_field->usage = CB_USAGE_INDEX; } -#line 7456 "parser.c" +#line 7421 "parser.c" break; case 404: /* usage: "PACKED-DECIMAL" */ -#line 2900 "parser.y" +#line 2908 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7462 "parser.c" +#line 7427 "parser.c" break; case 405: /* usage: POINTER */ -#line 2902 "parser.y" +#line 2910 "parser.y" { current_field->usage = CB_USAGE_POINTER; current_field->flag_is_pointer = 1; } -#line 7471 "parser.c" +#line 7436 "parser.c" break; case 406: /* usage: "PROGRAM-POINTER" */ -#line 2907 "parser.y" +#line 2915 "parser.y" { current_field->usage = CB_USAGE_PROGRAM_POINTER; current_field->flag_is_pointer = 1; } -#line 7480 "parser.c" +#line 7445 "parser.c" break; case 407: /* usage: "SIGNED-SHORT" */ -#line 2911 "parser.y" +#line 2919 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7486 "parser.c" +#line 7451 "parser.c" break; case 408: /* usage: "SIGNED-INT" */ -#line 2912 "parser.y" +#line 2920 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7492 "parser.c" +#line 7457 "parser.c" break; case 409: /* usage: "SIGNED-LONG" */ -#line 2913 "parser.y" +#line 2921 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7498 "parser.c" +#line 7463 "parser.c" break; case 410: /* usage: "UNSIGNED-SHORT" */ -#line 2914 "parser.y" +#line 2922 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7504 "parser.c" +#line 7469 "parser.c" break; case 411: /* usage: "UNSIGNED-INT" */ -#line 2915 "parser.y" +#line 2923 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7510 "parser.c" +#line 7475 "parser.c" break; case 412: /* usage: "UNSIGNED-LONG" */ -#line 2916 "parser.y" +#line 2924 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7516 "parser.c" +#line 7481 "parser.c" break; case 413: /* usage: "BINARY-CHAR" SIGNED */ -#line 2917 "parser.y" +#line 2925 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7522 "parser.c" +#line 7487 "parser.c" break; case 414: /* usage: "BINARY-CHAR" UNSIGNED */ -#line 2918 "parser.y" +#line 2926 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_CHAR; } -#line 7528 "parser.c" +#line 7493 "parser.c" break; case 415: /* usage: "BINARY-CHAR" */ -#line 2919 "parser.y" +#line 2927 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7534 "parser.c" +#line 7499 "parser.c" break; case 416: /* usage: "BINARY-SHORT" SIGNED */ -#line 2920 "parser.y" +#line 2928 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7540 "parser.c" +#line 7505 "parser.c" break; case 417: /* usage: "BINARY-SHORT" UNSIGNED */ -#line 2921 "parser.y" +#line 2929 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7546 "parser.c" +#line 7511 "parser.c" break; case 418: /* usage: "BINARY-SHORT" */ -#line 2922 "parser.y" +#line 2930 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7552 "parser.c" +#line 7517 "parser.c" break; case 419: /* usage: "BINARY-LONG" SIGNED */ -#line 2923 "parser.y" +#line 2931 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7558 "parser.c" +#line 7523 "parser.c" break; case 420: /* usage: "BINARY-LONG" UNSIGNED */ -#line 2924 "parser.y" +#line 2932 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7564 "parser.c" +#line 7529 "parser.c" break; case 421: /* usage: "BINARY-LONG" */ -#line 2925 "parser.y" +#line 2933 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7570 "parser.c" +#line 7535 "parser.c" break; case 422: /* usage: "BINARY-DOUBLE" SIGNED */ -#line 2926 "parser.y" +#line 2934 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7576 "parser.c" +#line 7541 "parser.c" break; case 423: /* usage: "BINARY-DOUBLE" UNSIGNED */ -#line 2927 "parser.y" +#line 2935 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7582 "parser.c" +#line 7547 "parser.c" break; case 424: /* usage: "BINARY-DOUBLE" */ -#line 2928 "parser.y" +#line 2936 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7588 "parser.c" +#line 7553 "parser.c" break; case 425: /* usage: "BINARY-C-LONG" SIGNED */ -#line 2930 "parser.y" +#line 2938 "parser.y" { if (sizeof(long) == 4) { current_field->usage = CB_USAGE_SIGNED_INT; @@ -7596,11 +7561,11 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7600 "parser.c" +#line 7565 "parser.c" break; case 426: /* usage: "BINARY-C-LONG" UNSIGNED */ -#line 2938 "parser.y" +#line 2946 "parser.y" { if (sizeof(long) == 4) { current_field->usage = CB_USAGE_UNSIGNED_INT; @@ -7608,11 +7573,11 @@ yyparse (void) current_field->usage = CB_USAGE_UNSIGNED_LONG; } } -#line 7612 "parser.c" +#line 7577 "parser.c" break; case 427: /* usage: "BINARY-C-LONG" */ -#line 2946 "parser.y" +#line 2954 "parser.y" { if (sizeof(long) == 4) { current_field->usage = CB_USAGE_SIGNED_INT; @@ -7620,35 +7585,35 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7624 "parser.c" +#line 7589 "parser.c" break; case 428: /* usage: NATIONAL */ -#line 2953 "parser.y" +#line 2961 "parser.y" { PENDING ("USAGE NATIONAL");} -#line 7630 "parser.c" +#line 7595 "parser.c" break; case 429: /* sign_clause: _sign_is LEADING flag_separate */ -#line 2961 "parser.y" +#line 2969 "parser.y" { current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 1; } -#line 7639 "parser.c" +#line 7604 "parser.c" break; case 430: /* sign_clause: _sign_is TRAILING flag_separate */ -#line 2966 "parser.y" +#line 2974 "parser.y" { current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 0; } -#line 7648 "parser.c" +#line 7613 "parser.c" break; case 434: /* occurs_clause: OCCURS integer occurs_to_integer _times occurs_depending occurs_key_spec */ -#line 2983 "parser.y" +#line 2991 "parser.y" { if (current_field->occurs_depending && !(yyvsp[-3])) { cb_verify (cb_odo_without_to, "ODO without TO clause"); @@ -7661,31 +7626,31 @@ yyparse (void) } current_field->flag_occurs = 1; } -#line 7665 "parser.c" +#line 7630 "parser.c" break; case 435: /* occurs_to_integer: %empty */ -#line 2998 "parser.y" +#line 3006 "parser.y" { yyval = NULL; } -#line 7671 "parser.c" +#line 7636 "parser.c" break; case 436: /* occurs_to_integer: TO integer */ -#line 2999 "parser.y" +#line 3007 "parser.y" { yyval = yyvsp[0]; } -#line 7677 "parser.c" +#line 7642 "parser.c" break; case 438: /* occurs_depending: DEPENDING _on reference */ -#line 3004 "parser.y" +#line 3012 "parser.y" { current_field->occurs_depending = yyvsp[0]; } -#line 7685 "parser.c" +#line 7650 "parser.c" break; case 441: /* occurs_keys: occurs_key_list */ -#line 3013 "parser.y" +#line 3021 "parser.y" { if (yyvsp[0]) { cb_tree l; @@ -7706,11 +7671,11 @@ yyparse (void) current_field->nkeys = nkeys; } } -#line 7710 "parser.c" +#line 7675 "parser.c" break; case 442: /* occurs_key: ascending_or_descending _key _is reference_list */ -#line 3037 "parser.y" +#line 3045 "parser.y" { cb_tree l; @@ -7723,81 +7688,81 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 7727 "parser.c" +#line 7692 "parser.c" break; case 443: /* occurs_key_list: occurs_key */ -#line 3052 "parser.y" +#line 3060 "parser.y" { yyval = yyvsp[0]; } -#line 7733 "parser.c" +#line 7698 "parser.c" break; case 444: /* occurs_key_list: occurs_key_list occurs_key */ -#line 3053 "parser.y" +#line 3061 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 7739 "parser.c" +#line 7704 "parser.c" break; case 445: /* ascending_or_descending: ASCENDING */ -#line 3057 "parser.y" +#line 3065 "parser.y" { yyval = cb_int (COB_ASCENDING); } -#line 7745 "parser.c" +#line 7710 "parser.c" break; case 446: /* ascending_or_descending: DESCENDING */ -#line 3058 "parser.y" +#line 3066 "parser.y" { yyval = cb_int (COB_DESCENDING); } -#line 7751 "parser.c" +#line 7716 "parser.c" break; case 449: /* occurs_indexed: INDEXED _by occurs_index_list */ -#line 3065 "parser.y" +#line 3073 "parser.y" { current_field->index_list = yyvsp[0]; } -#line 7759 "parser.c" +#line 7724 "parser.c" break; case 450: /* occurs_index_list: occurs_index */ -#line 3071 "parser.y" +#line 3079 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7765 "parser.c" +#line 7730 "parser.c" break; case 451: /* occurs_index_list: occurs_index_list occurs_index */ -#line 3073 "parser.y" +#line 3081 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7771 "parser.c" +#line 7736 "parser.c" break; case 452: /* occurs_index: "Identifier" */ -#line 3078 "parser.y" +#line 3086 "parser.y" { yyval = cb_build_index (yyvsp[0], cb_int1, 1, current_field); } -#line 7779 "parser.c" +#line 7744 "parser.c" break; case 453: /* justified_clause: JUSTIFIED _right */ -#line 3087 "parser.y" +#line 3095 "parser.y" { current_field->flag_justified = 1; } -#line 7785 "parser.c" +#line 7750 "parser.c" break; case 454: /* synchronized_clause: SYNCHRONIZED left_or_right */ -#line 3094 "parser.y" +#line 3102 "parser.y" { current_field->flag_synchronized = 1; } -#line 7791 "parser.c" +#line 7756 "parser.c" break; case 458: /* blank_clause: BLANK _when ZERO */ -#line 3106 "parser.y" +#line 3114 "parser.y" { current_field->flag_blank_zero = 1; } -#line 7797 "parser.c" +#line 7762 "parser.c" break; case 459: /* based_clause: BASED */ -#line 3114 "parser.y" +#line 3122 "parser.y" { if (current_storage != CB_STORAGE_WORKING && current_storage != CB_STORAGE_LINKAGE && @@ -7817,58 +7782,58 @@ yyparse (void) current_field->flag_item_based = 1; } } -#line 7821 "parser.c" +#line 7786 "parser.c" break; case 460: /* value_clause: VALUE _is literal */ -#line 3138 "parser.y" +#line 3146 "parser.y" { current_field->values = cb_list_init (yyvsp[0]); } -#line 7827 "parser.c" +#line 7792 "parser.c" break; case 461: /* $@24: %empty */ -#line 3142 "parser.y" +#line 3150 "parser.y" { current_field->values = yyvsp[0]; } -#line 7833 "parser.c" +#line 7798 "parser.c" break; case 463: /* value_item_list: value_item */ -#line 3147 "parser.y" +#line 3155 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7839 "parser.c" +#line 7804 "parser.c" break; case 464: /* value_item_list: value_item_list value_item */ -#line 3148 "parser.y" +#line 3156 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7845 "parser.c" +#line 7810 "parser.c" break; case 465: /* value_item: literal */ -#line 3152 "parser.y" +#line 3160 "parser.y" { yyval = yyvsp[0]; } -#line 7851 "parser.c" +#line 7816 "parser.c" break; case 466: /* value_item: literal THRU literal */ -#line 3153 "parser.y" +#line 3161 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 7857 "parser.c" +#line 7822 "parser.c" break; case 468: /* false_is: "FALSE" _is literal */ -#line 3158 "parser.y" +#line 3166 "parser.y" { if (current_field->level != 88) { cb_error (_("FALSE clause only allowed for 88 level")); } current_field->false_88 = cb_list_init (yyvsp[0]); } -#line 7868 "parser.c" +#line 7833 "parser.c" break; case 469: /* renames_clause: RENAMES qualified_word */ -#line 3171 "parser.y" +#line 3179 "parser.y" { if (cb_ref (yyvsp[0]) != cb_error_node) { if (CB_FIELD (cb_ref (yyvsp[0]))->level == 01 || @@ -7880,11 +7845,11 @@ yyparse (void) } } } -#line 7884 "parser.c" +#line 7849 "parser.c" break; case 470: /* renames_clause: RENAMES qualified_word THRU qualified_word */ -#line 3183 "parser.y" +#line 3191 "parser.y" { if (cb_ref (yyvsp[-2]) != cb_error_node && cb_ref (yyvsp[0]) != cb_error_node) { if (CB_FIELD (cb_ref (yyvsp[-2]))->level == 01 || @@ -7899,11 +7864,11 @@ yyparse (void) } } } -#line 7903 "parser.c" +#line 7868 "parser.c" break; case 471: /* any_length_clause: ANY LENGTH */ -#line 3203 "parser.y" +#line 3211 "parser.y" { if (current_field->flag_item_based) { cb_error (_("BASED and ANY LENGTH are mutually exclusive")); @@ -7911,105 +7876,105 @@ yyparse (void) current_field->flag_any_length = 1; } } -#line 7915 "parser.c" +#line 7880 "parser.c" break; case 473: /* $@25: %empty */ -#line 3218 "parser.y" +#line 3226 "parser.y" { current_storage = CB_STORAGE_LOCAL; if (current_program->nested_level) { cb_error (_("LOCAL-STORAGE not allowed in nested programs")); } } -#line 7926 "parser.c" +#line 7891 "parser.c" break; case 474: /* local_storage_section: "LOCAL-STORAGE" SECTION '.' $@25 record_description_list */ -#line 3225 "parser.y" +#line 3233 "parser.y" { if (yyvsp[0]) { current_program->local_storage = CB_FIELD (yyvsp[0]); } } -#line 7936 "parser.c" +#line 7901 "parser.c" break; case 476: /* $@26: %empty */ -#line 3238 "parser.y" +#line 3246 "parser.y" { current_storage = CB_STORAGE_LINKAGE; } -#line 7942 "parser.c" +#line 7907 "parser.c" break; case 477: /* linkage_section: LINKAGE SECTION '.' $@26 record_description_list */ -#line 3240 "parser.y" +#line 3248 "parser.y" { if (yyvsp[0]) { current_program->linkage_storage = CB_FIELD (yyvsp[0]); } } -#line 7952 "parser.c" +#line 7917 "parser.c" break; case 479: /* $@27: %empty */ -#line 3253 "parser.y" +#line 3261 "parser.y" { cb_error (_("REPORT SECTION not supported")); current_storage = CB_STORAGE_REPORT; } -#line 7961 "parser.c" +#line 7926 "parser.c" break; case 486: /* report_description_options: %empty */ -#line 3286 "parser.y" +#line 3294 "parser.y" { cb_warning (_("Report description using defaults")); } -#line 7969 "parser.c" +#line 7934 "parser.c" break; case 488: /* report_description_option: _is GLOBAL */ -#line 3294 "parser.y" +#line 3302 "parser.y" { cb_error (_("GLOBAL is not allowed with RD")); } -#line 7977 "parser.c" +#line 7942 "parser.c" break; case 497: /* identifier_list: identifier */ -#line 3317 "parser.y" +#line 3325 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7983 "parser.c" +#line 7948 "parser.c" break; case 498: /* identifier_list: identifier_list identifier */ -#line 3318 "parser.y" +#line 3326 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7989 "parser.c" +#line 7954 "parser.c" break; case 520: /* report_group_option: type_clause */ -#line 3374 "parser.y" +#line 3382 "parser.y" { cb_warning (_("looking for Report line TYPE")); } -#line 7995 "parser.c" +#line 7960 "parser.c" break; case 571: /* $@28: %empty */ -#line 3479 "parser.y" +#line 3487 "parser.y" { current_storage = CB_STORAGE_SCREEN; } -#line 8001 "parser.c" +#line 7966 "parser.c" break; case 572: /* screen_section: SCREEN SECTION '.' $@28 */ -#line 3480 "parser.y" +#line 3488 "parser.y" { cb_error (_("SCREEN SECTION is not supported")); } -#line 8009 "parser.c" +#line 7974 "parser.c" break; case 574: /* $@29: %empty */ -#line 3491 "parser.y" +#line 3499 "parser.y" { current_section = NULL; current_paragraph = NULL; @@ -8019,11 +7984,11 @@ yyparse (void) cb_define_system_name ("SYSERR"); cb_set_in_procedure (); } -#line 8023 "parser.c" +#line 7988 "parser.c" break; case 575: /* $@30: %empty */ -#line 3501 "parser.y" +#line 3509 "parser.y" { if (current_program->flag_main && !current_program->flag_chained && yyvsp[-4]) { cb_error (_("Executable program requested but PROCEDURE/ENTRY has USING clause")); @@ -8033,11 +7998,11 @@ yyparse (void) emit_entry (current_program->source_name, 1, yyvsp[-4]); } } -#line 8037 "parser.c" +#line 8002 "parser.c" break; case 576: /* procedure_division: PROCEDURE DIVISION procedure_using_chaining procedure_returning '.' $@29 procedure_declaratives $@30 procedure_list */ -#line 3511 "parser.y" +#line 3519 "parser.y" { if (current_paragraph) { if (current_paragraph->exit_label) { @@ -8052,76 +8017,76 @@ yyparse (void) emit_statement (cb_build_perform_exit (current_section)); } } -#line 8056 "parser.c" +#line 8021 "parser.c" break; case 577: /* procedure_using_chaining: %empty */ -#line 3528 "parser.y" +#line 3536 "parser.y" { yyval = NULL; } -#line 8062 "parser.c" +#line 8027 "parser.c" break; case 578: /* $@31: %empty */ -#line 3530 "parser.y" +#line 3538 "parser.y" { call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8071 "parser.c" +#line 8036 "parser.c" break; case 579: /* procedure_using_chaining: USING $@31 procedure_param_list */ -#line 3534 "parser.y" +#line 3542 "parser.y" { yyval = yyvsp[0]; } -#line 8077 "parser.c" +#line 8042 "parser.c" break; case 580: /* $@32: %empty */ -#line 3536 "parser.y" +#line 3544 "parser.y" { call_mode = CB_CALL_BY_REFERENCE; current_program->flag_chained = 1; } -#line 8086 "parser.c" +#line 8051 "parser.c" break; case 581: /* procedure_using_chaining: CHAINING $@32 procedure_param_list */ -#line 3540 "parser.y" +#line 3548 "parser.y" { yyval = yyvsp[0]; } -#line 8092 "parser.c" +#line 8057 "parser.c" break; case 582: /* procedure_param_list: procedure_param */ -#line 3544 "parser.y" +#line 3552 "parser.y" { yyval = yyvsp[0]; } -#line 8098 "parser.c" +#line 8063 "parser.c" break; case 583: /* procedure_param_list: procedure_param_list procedure_param */ -#line 3546 "parser.y" +#line 3554 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8104 "parser.c" +#line 8069 "parser.c" break; case 584: /* procedure_param: procedure_type size_optional procedure_optional "Identifier" */ -#line 3551 "parser.y" +#line 3559 "parser.y" { yyval = cb_build_pair (cb_int (call_mode), cb_build_identifier (yyvsp[0])); CB_SIZES (yyval) = size_mode; } -#line 8113 "parser.c" +#line 8078 "parser.c" break; case 586: /* procedure_type: _by REFERENCE */ -#line 3560 "parser.y" +#line 3568 "parser.y" { call_mode = CB_CALL_BY_REFERENCE; } -#line 8121 "parser.c" +#line 8086 "parser.c" break; case 587: /* procedure_type: _by VALUE */ -#line 3564 "parser.y" +#line 3572 "parser.y" { if (current_program->flag_chained) { cb_error (_("BY VALUE not allowed in CHAINED program")); @@ -8129,11 +8094,11 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8133 "parser.c" +#line 8098 "parser.c" break; case 589: /* size_optional: SIZE _is AUTO */ -#line 3576 "parser.y" +#line 3584 "parser.y" { if (call_mode != CB_CALL_BY_VALUE) { cb_error (_("SIZE only allowed for BY VALUE items")); @@ -8141,11 +8106,11 @@ yyparse (void) size_mode = CB_SIZE_AUTO; } } -#line 8145 "parser.c" +#line 8110 "parser.c" break; case 590: /* size_optional: SIZE _is DEFAULT */ -#line 3584 "parser.y" +#line 3592 "parser.y" { if (call_mode != CB_CALL_BY_VALUE) { cb_error (_("SIZE only allowed for BY VALUE items")); @@ -8153,11 +8118,11 @@ yyparse (void) size_mode = CB_SIZE_4; } } -#line 8157 "parser.c" +#line 8122 "parser.c" break; case 591: /* size_optional: UNSIGNED SIZE _is integer */ -#line 3592 "parser.y" +#line 3600 "parser.y" { unsigned char *s = CB_LITERAL (yyvsp[0])->data; @@ -8186,11 +8151,11 @@ yyparse (void) } } } -#line 8190 "parser.c" +#line 8155 "parser.c" break; case 592: /* size_optional: SIZE _is integer */ -#line 3621 "parser.y" +#line 3629 "parser.y" { unsigned char *s = CB_LITERAL (yyvsp[0])->data; @@ -8219,31 +8184,31 @@ yyparse (void) } } } -#line 8223 "parser.c" +#line 8188 "parser.c" break; case 594: /* procedure_optional: OPTIONAL */ -#line 3654 "parser.y" +#line 3662 "parser.y" { if (call_mode != CB_CALL_BY_REFERENCE) { cb_error (_("OPTIONAL only allowed for BY REFERENCE items")); } } -#line 8233 "parser.c" +#line 8198 "parser.c" break; case 595: /* procedure_returning: %empty */ -#line 3663 "parser.y" +#line 3671 "parser.y" { if (current_program->prog_type == CB_FUNCTION_TYPE) { cb_error (_("RETURNING clause is required for a FUNCTION")); } } -#line 8243 "parser.c" +#line 8208 "parser.c" break; case 596: /* procedure_returning: RETURNING "Identifier" */ -#line 3669 "parser.y" +#line 3677 "parser.y" { if (cb_ref (yyvsp[0]) != cb_error_node) { current_program->returning = yyvsp[0]; @@ -8252,17 +8217,17 @@ yyparse (void) } } } -#line 8256 "parser.c" +#line 8221 "parser.c" break; case 598: /* $@33: %empty */ -#line 3680 "parser.y" +#line 3688 "parser.y" { in_declaratives = 1; } -#line 8262 "parser.c" +#line 8227 "parser.c" break; case 599: /* procedure_declaratives: DECLARATIVES '.' $@33 procedure_list END DECLARATIVES '.' */ -#line 3683 "parser.y" +#line 3691 "parser.y" { in_declaratives = 0; if (current_paragraph) { @@ -8280,11 +8245,11 @@ yyparse (void) current_section = NULL; } } -#line 8284 "parser.c" +#line 8249 "parser.c" break; case 605: /* procedure: statements '.' */ -#line 3716 "parser.y" +#line 3724 "parser.y" { if (next_label_list) { cb_tree label; @@ -8300,19 +8265,19 @@ yyparse (void) } /* check_unreached = 0; */ } -#line 8304 "parser.c" +#line 8269 "parser.c" break; case 606: /* procedure: error */ -#line 3732 "parser.y" +#line 3740 "parser.y" { check_unreached = 0; } -#line 8312 "parser.c" +#line 8277 "parser.c" break; case 607: /* section_header: section_name SECTION opt_segment '.' */ -#line 3744 "parser.y" +#line 3752 "parser.y" { non_const_word = 0; check_unreached = 0; @@ -8340,11 +8305,11 @@ yyparse (void) current_paragraph = NULL; emit_statement (CB_TREE (current_section)); } -#line 8344 "parser.c" +#line 8309 "parser.c" break; case 608: /* paragraph_header: "Identifier" '.' */ -#line 3775 "parser.y" +#line 3783 "parser.y" { cb_tree label; @@ -8378,11 +8343,11 @@ yyparse (void) } emit_statement (CB_TREE (current_paragraph)); } -#line 8382 "parser.c" +#line 8347 "parser.c" break; case 609: /* invalid_statement: section_name */ -#line 3812 "parser.y" +#line 3820 "parser.y" { non_const_word = 0; check_unreached = 0; @@ -8391,51 +8356,51 @@ yyparse (void) } YYERROR; } -#line 8395 "parser.c" +#line 8360 "parser.c" break; case 610: /* section_name: "Identifier" */ -#line 3823 "parser.y" +#line 3831 "parser.y" { yyval = cb_build_section_name (yyvsp[0], 0); } -#line 8401 "parser.c" +#line 8366 "parser.c" break; case 612: /* opt_segment: "Literal" */ -#line 3827 "parser.y" +#line 3835 "parser.y" { /* ignore */ } -#line 8407 "parser.c" +#line 8372 "parser.c" break; case 613: /* @34: %empty */ -#line 3836 "parser.y" +#line 3844 "parser.y" { yyval = current_program->exec_list; current_program->exec_list = NULL; } -#line 8416 "parser.c" +#line 8381 "parser.c" break; case 614: /* @35: %empty */ -#line 3840 "parser.y" +#line 3848 "parser.y" { yyval = CB_TREE (current_statement); current_statement = NULL; } -#line 8425 "parser.c" +#line 8390 "parser.c" break; case 615: /* statement_list: @34 @35 statements */ -#line 3845 "parser.y" +#line 3853 "parser.y" { yyval = cb_list_reverse (current_program->exec_list); current_program->exec_list = yyvsp[-2]; current_statement = CB_STATEMENT (yyvsp[-1]); } -#line 8435 "parser.c" +#line 8400 "parser.c" break; case 616: /* statements: %empty */ -#line 3853 "parser.y" +#line 3861 "parser.y" { cb_tree label; @@ -8456,11 +8421,11 @@ yyparse (void) cb_cons (CB_TREE (current_paragraph), current_section->children); } } -#line 8460 "parser.c" +#line 8425 "parser.c" break; case 667: /* statement: "NEXT SENTENCE" */ -#line 3928 "parser.y" +#line 3936 "parser.y" { if (cb_verify (cb_next_sentence_phrase, "NEXT SENTENCE")) { cb_tree label; @@ -8474,11 +8439,11 @@ yyparse (void) } check_unreached = 0; } -#line 8478 "parser.c" +#line 8443 "parser.c" break; case 668: /* $@36: %empty */ -#line 3950 "parser.y" +#line 3958 "parser.y" { BEGIN_STATEMENT ("ACCEPT", TERM_ACCEPT); dispattrs = 0; @@ -8486,489 +8451,489 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 8490 "parser.c" +#line 8455 "parser.c" break; case 670: /* accept_body: identifier opt_at_line_column opt_accp_attr on_accp_exception */ -#line 3963 "parser.y" +#line 3971 "parser.y" { cb_emit_accept (yyvsp[-3], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 8498 "parser.c" +#line 8463 "parser.c" break; case 671: /* accept_body: identifier FROM ESCAPE KEY */ -#line 3967 "parser.y" +#line 3975 "parser.y" { PENDING ("ACCEPT .. FROM ESCAPE KEY"); } -#line 8506 "parser.c" +#line 8471 "parser.c" break; case 672: /* accept_body: identifier FROM LINES */ -#line 3971 "parser.y" +#line 3979 "parser.y" { cb_emit_accept_line_or_col (yyvsp[-2], 0); } -#line 8514 "parser.c" +#line 8479 "parser.c" break; case 673: /* accept_body: identifier FROM COLUMNS */ -#line 3975 "parser.y" +#line 3983 "parser.y" { cb_emit_accept_line_or_col (yyvsp[-2], 1); } -#line 8522 "parser.c" +#line 8487 "parser.c" break; case 674: /* accept_body: identifier FROM DATE */ -#line 3979 "parser.y" +#line 3987 "parser.y" { cb_emit_accept_date (yyvsp[-2]); } -#line 8530 "parser.c" +#line 8495 "parser.c" break; case 675: /* accept_body: identifier FROM DATE YYYYMMDD */ -#line 3983 "parser.y" +#line 3991 "parser.y" { cb_emit_accept_date_yyyymmdd (yyvsp[-3]); } -#line 8538 "parser.c" +#line 8503 "parser.c" break; case 676: /* accept_body: identifier FROM DAY */ -#line 3987 "parser.y" +#line 3995 "parser.y" { cb_emit_accept_day (yyvsp[-2]); } -#line 8546 "parser.c" +#line 8511 "parser.c" break; case 677: /* accept_body: identifier FROM DAY YYYYDDD */ -#line 3991 "parser.y" +#line 3999 "parser.y" { cb_emit_accept_day_yyyyddd (yyvsp[-3]); } -#line 8554 "parser.c" +#line 8519 "parser.c" break; case 678: /* accept_body: identifier FROM "DAY-OF-WEEK" */ -#line 3995 "parser.y" +#line 4003 "parser.y" { cb_emit_accept_day_of_week (yyvsp[-2]); } -#line 8562 "parser.c" +#line 8527 "parser.c" break; case 679: /* accept_body: identifier FROM TIME */ -#line 3999 "parser.y" +#line 4007 "parser.y" { cb_emit_accept_time (yyvsp[-2]); } -#line 8570 "parser.c" +#line 8535 "parser.c" break; case 680: /* accept_body: identifier FROM "COMMAND-LINE" */ -#line 4003 "parser.y" +#line 4011 "parser.y" { cb_emit_accept_command_line (yyvsp[-2]); } -#line 8578 "parser.c" +#line 8543 "parser.c" break; case 681: /* accept_body: identifier FROM "ENVIRONMENT-VALUE" on_accp_exception */ -#line 4007 "parser.y" +#line 4015 "parser.y" { cb_emit_accept_environment (yyvsp[-3]); } -#line 8586 "parser.c" +#line 8551 "parser.c" break; case 682: /* accept_body: identifier FROM ENVIRONMENT simple_value on_accp_exception */ -#line 4011 "parser.y" +#line 4019 "parser.y" { cb_emit_get_environment (yyvsp[-1], yyvsp[-4]); } -#line 8594 "parser.c" +#line 8559 "parser.c" break; case 683: /* accept_body: identifier FROM "ARGUMENT-NUMBER" */ -#line 4015 "parser.y" +#line 4023 "parser.y" { cb_emit_accept_arg_number (yyvsp[-2]); } -#line 8602 "parser.c" +#line 8567 "parser.c" break; case 684: /* accept_body: identifier FROM "ARGUMENT-VALUE" on_accp_exception */ -#line 4019 "parser.y" +#line 4027 "parser.y" { cb_emit_accept_arg_value (yyvsp[-3]); } -#line 8610 "parser.c" +#line 8575 "parser.c" break; case 685: /* accept_body: identifier FROM mnemonic_name */ -#line 4023 "parser.y" +#line 4031 "parser.y" { cb_emit_accept_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 8618 "parser.c" +#line 8583 "parser.c" break; case 686: /* accept_body: identifier FROM "Identifier" */ -#line 4027 "parser.y" +#line 4035 "parser.y" { cb_emit_accept_name (yyvsp[-2], yyvsp[0]); } -#line 8626 "parser.c" +#line 8591 "parser.c" break; case 687: /* opt_at_line_column: %empty */ -#line 4033 "parser.y" +#line 4041 "parser.y" { yyval = NULL; } -#line 8632 "parser.c" +#line 8597 "parser.c" break; case 688: /* opt_at_line_column: _at line_number column_number */ -#line 4034 "parser.y" +#line 4042 "parser.y" { yyval = cb_build_pair (yyvsp[-1], yyvsp[0]); } -#line 8638 "parser.c" +#line 8603 "parser.c" break; case 689: /* opt_at_line_column: _at column_number line_number */ -#line 4035 "parser.y" +#line 4043 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 8644 "parser.c" +#line 8609 "parser.c" break; case 690: /* opt_at_line_column: _at line_number */ -#line 4036 "parser.y" +#line 4044 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 8650 "parser.c" +#line 8615 "parser.c" break; case 691: /* opt_at_line_column: _at column_number */ -#line 4037 "parser.y" +#line 4045 "parser.y" { yyval = cb_build_pair (NULL, yyvsp[0]); } -#line 8656 "parser.c" +#line 8621 "parser.c" break; case 692: /* opt_at_line_column: AT simple_value */ -#line 4038 "parser.y" +#line 4046 "parser.y" { yyval = yyvsp[0]; } -#line 8662 "parser.c" +#line 8627 "parser.c" break; case 693: /* line_number: LINE _number id_or_lit */ -#line 4042 "parser.y" +#line 4050 "parser.y" { yyval = yyvsp[0]; } -#line 8668 "parser.c" +#line 8633 "parser.c" break; case 694: /* column_number: COLUMN _number id_or_lit */ -#line 4046 "parser.y" +#line 4054 "parser.y" { yyval = yyvsp[0]; } -#line 8674 "parser.c" +#line 8639 "parser.c" break; case 695: /* column_number: POSITION _number id_or_lit */ -#line 4047 "parser.y" +#line 4055 "parser.y" { yyval = yyvsp[0]; } -#line 8680 "parser.c" +#line 8645 "parser.c" break; case 700: /* accp_attr: BELL */ -#line 4060 "parser.y" +#line 4068 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 8686 "parser.c" +#line 8651 "parser.c" break; case 701: /* accp_attr: BLINK */ -#line 4061 "parser.y" +#line 4069 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 8692 "parser.c" +#line 8657 "parser.c" break; case 702: /* accp_attr: HIGHLIGHT */ -#line 4062 "parser.y" +#line 4070 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 8698 "parser.c" +#line 8663 "parser.c" break; case 703: /* accp_attr: LOWLIGHT */ -#line 4063 "parser.y" +#line 4071 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 8704 "parser.c" +#line 8669 "parser.c" break; case 704: /* accp_attr: "REVERSE-VIDEO" */ -#line 4064 "parser.y" +#line 4072 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 8710 "parser.c" +#line 8675 "parser.c" break; case 705: /* accp_attr: UNDERLINE */ -#line 4065 "parser.y" +#line 4073 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 8716 "parser.c" +#line 8681 "parser.c" break; case 706: /* accp_attr: OVERLINE */ -#line 4066 "parser.y" +#line 4074 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 8722 "parser.c" +#line 8687 "parser.c" break; case 707: /* accp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ -#line 4068 "parser.y" +#line 4076 "parser.y" { fgc = yyvsp[0]; } -#line 8730 "parser.c" +#line 8695 "parser.c" break; case 708: /* accp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ -#line 4072 "parser.y" +#line 4080 "parser.y" { bgc = yyvsp[0]; } -#line 8738 "parser.c" +#line 8703 "parser.c" break; case 709: /* accp_attr: SCROLL UP _opt_scroll_lines */ -#line 4076 "parser.y" +#line 4084 "parser.y" { scroll = yyvsp[0]; } -#line 8746 "parser.c" +#line 8711 "parser.c" break; case 710: /* accp_attr: SCROLL DOWN _opt_scroll_lines */ -#line 4080 "parser.y" +#line 4088 "parser.y" { dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 8755 "parser.c" +#line 8720 "parser.c" break; case 711: /* accp_attr: AUTO */ -#line 4084 "parser.y" +#line 4092 "parser.y" { dispattrs |= COB_SCREEN_AUTO; } -#line 8761 "parser.c" +#line 8726 "parser.c" break; case 712: /* accp_attr: FULL */ -#line 4085 "parser.y" +#line 4093 "parser.y" { dispattrs |= COB_SCREEN_FULL; } -#line 8767 "parser.c" +#line 8732 "parser.c" break; case 713: /* accp_attr: REQUIRED */ -#line 4086 "parser.y" +#line 4094 "parser.y" { dispattrs |= COB_SCREEN_REQUIRED; } -#line 8773 "parser.c" +#line 8738 "parser.c" break; case 714: /* accp_attr: SECURE */ -#line 4087 "parser.y" +#line 4095 "parser.y" { dispattrs |= COB_SCREEN_SECURE; } -#line 8779 "parser.c" +#line 8744 "parser.c" break; case 715: /* accp_attr: UPDATE */ -#line 4088 "parser.y" +#line 4096 "parser.y" { dispattrs |= COB_SCREEN_UPDATE; } -#line 8785 "parser.c" +#line 8750 "parser.c" break; case 716: /* accp_attr: PROMPT */ -#line 4089 "parser.y" +#line 4097 "parser.y" { dispattrs |= COB_SCREEN_PROMPT; } -#line 8791 "parser.c" +#line 8756 "parser.c" break; case 717: /* end_accept: %empty */ -#line 4093 "parser.y" +#line 4101 "parser.y" { terminator_warning (TERM_ACCEPT); } -#line 8797 "parser.c" +#line 8762 "parser.c" break; case 718: /* end_accept: "END-ACCEPT" */ -#line 4094 "parser.y" +#line 4102 "parser.y" { terminator_clear (TERM_ACCEPT); } -#line 8803 "parser.c" +#line 8768 "parser.c" break; case 719: /* $@37: %empty */ -#line 4103 "parser.y" +#line 4111 "parser.y" { BEGIN_STATEMENT ("ADD", TERM_ADD); } -#line 8809 "parser.c" +#line 8774 "parser.c" break; case 721: /* add_body: x_list TO arithmetic_x_list on_size_error */ -#line 4110 "parser.y" +#line 4118 "parser.y" { cb_emit_arithmetic (yyvsp[-1], '+', cb_build_binary_list (yyvsp[-3], '+')); } -#line 8817 "parser.c" +#line 8782 "parser.c" break; case 722: /* add_body: x_list add_to GIVING arithmetic_x_list on_size_error */ -#line 4114 "parser.y" +#line 4122 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (yyvsp[-4], '+')); } -#line 8825 "parser.c" +#line 8790 "parser.c" break; case 723: /* add_body: CORRESPONDING identifier TO identifier flag_rounded on_size_error */ -#line 4118 "parser.y" +#line 4126 "parser.y" { cb_emit_corresponding (cb_build_add, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 8833 "parser.c" +#line 8798 "parser.c" break; case 725: /* add_to: TO x */ -#line 4124 "parser.y" +#line 4132 "parser.y" { cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 8839 "parser.c" +#line 8804 "parser.c" break; case 726: /* end_add: %empty */ -#line 4128 "parser.y" +#line 4136 "parser.y" { terminator_warning (TERM_ADD); } -#line 8845 "parser.c" +#line 8810 "parser.c" break; case 727: /* end_add: "END-ADD" */ -#line 4129 "parser.y" +#line 4137 "parser.y" { terminator_clear (TERM_ADD); } -#line 8851 "parser.c" +#line 8816 "parser.c" break; case 728: /* $@38: %empty */ -#line 4138 "parser.y" +#line 4146 "parser.y" { BEGIN_STATEMENT ("ALLOCATE", 0); } -#line 8857 "parser.c" +#line 8822 "parser.c" break; case 730: /* allocate_body: "Identifier" flag_initialized allocate_returning */ -#line 4144 "parser.y" +#line 4152 "parser.y" { cb_emit_allocate (yyvsp[-2], yyvsp[0], NULL, yyvsp[-1]); } -#line 8865 "parser.c" +#line 8830 "parser.c" break; case 731: /* allocate_body: expr CHARACTERS flag_initialized RETURNING target_x */ -#line 4148 "parser.y" +#line 4156 "parser.y" { cb_emit_allocate (NULL, yyvsp[0], yyvsp[-4], yyvsp[-2]); } -#line 8873 "parser.c" +#line 8838 "parser.c" break; case 732: /* allocate_returning: %empty */ -#line 4154 "parser.y" +#line 4162 "parser.y" { yyval = NULL; } -#line 8879 "parser.c" +#line 8844 "parser.c" break; case 733: /* allocate_returning: RETURNING target_x */ -#line 4155 "parser.y" +#line 4163 "parser.y" { yyval = yyvsp[0]; } -#line 8885 "parser.c" +#line 8850 "parser.c" break; case 734: /* alter_statement: ALTER alter_options */ -#line 4165 "parser.y" +#line 4173 "parser.y" { cb_error (_("ALTER statement is obsolete and unsupported")); } -#line 8893 "parser.c" +#line 8858 "parser.c" break; case 739: /* $@39: %empty */ -#line 4183 "parser.y" +#line 4191 "parser.y" { BEGIN_STATEMENT ("CALL", TERM_CALL); } -#line 8899 "parser.c" +#line 8864 "parser.c" break; case 740: /* call_statement: CALL $@39 id_or_lit_or_func call_using call_returning call_on_exception call_not_on_exception end_call */ -#line 4187 "parser.y" +#line 4195 "parser.y" { cb_emit_call (yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1]); } -#line 8907 "parser.c" +#line 8872 "parser.c" break; case 741: /* call_using: %empty */ -#line 4193 "parser.y" +#line 4201 "parser.y" { yyval = NULL; } -#line 8913 "parser.c" +#line 8878 "parser.c" break; case 742: /* $@40: %empty */ -#line 4195 "parser.y" +#line 4203 "parser.y" { call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8922 "parser.c" +#line 8887 "parser.c" break; case 743: /* call_using: USING $@40 call_param_list */ -#line 4199 "parser.y" +#line 4207 "parser.y" { yyval = yyvsp[0]; } -#line 8928 "parser.c" +#line 8893 "parser.c" break; case 744: /* call_param_list: call_param */ -#line 4203 "parser.y" +#line 4211 "parser.y" { yyval = yyvsp[0]; } -#line 8934 "parser.c" +#line 8899 "parser.c" break; case 745: /* call_param_list: call_param_list call_param */ -#line 4205 "parser.y" +#line 4213 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8940 "parser.c" +#line 8905 "parser.c" break; case 746: /* call_param: call_type OMITTED */ -#line 4210 "parser.y" +#line 4218 "parser.y" { if (call_mode != CB_CALL_BY_REFERENCE) { cb_error (_("OMITTED only allowed with BY REFERENCE")); } yyval = cb_build_pair (cb_int (call_mode), cb_null); } -#line 8951 "parser.c" +#line 8916 "parser.c" break; case 747: /* call_param: call_type size_optional x */ -#line 4217 "parser.y" +#line 4225 "parser.y" { yyval = cb_build_pair (cb_int (call_mode), yyvsp[0]); CB_SIZES (yyval) = size_mode; } -#line 8960 "parser.c" +#line 8925 "parser.c" break; case 749: /* call_type: _by REFERENCE */ -#line 4226 "parser.y" +#line 4234 "parser.y" { call_mode = CB_CALL_BY_REFERENCE; } -#line 8968 "parser.c" +#line 8933 "parser.c" break; case 750: /* call_type: _by CONTENT */ -#line 4230 "parser.y" +#line 4238 "parser.y" { if (current_program->flag_chained) { cb_error (_("BY CONTENT not allowed in CHAINED program")); @@ -8976,11 +8941,11 @@ yyparse (void) call_mode = CB_CALL_BY_CONTENT; } } -#line 8980 "parser.c" +#line 8945 "parser.c" break; case 751: /* call_type: _by VALUE */ -#line 4238 "parser.y" +#line 4246 "parser.y" { if (current_program->flag_chained) { cb_error (_("BY VALUE not allowed in CHAINED program")); @@ -8988,236 +8953,236 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8992 "parser.c" +#line 8957 "parser.c" break; case 752: /* call_returning: %empty */ -#line 4248 "parser.y" +#line 4256 "parser.y" { yyval = NULL; } -#line 8998 "parser.c" +#line 8963 "parser.c" break; case 753: /* call_returning: RETURNING identifier */ -#line 4249 "parser.y" +#line 4257 "parser.y" { yyval = yyvsp[0]; } -#line 9004 "parser.c" +#line 8969 "parser.c" break; case 754: /* call_returning: GIVING identifier */ -#line 4250 "parser.y" +#line 4258 "parser.y" { yyval = yyvsp[0]; } -#line 9010 "parser.c" +#line 8975 "parser.c" break; case 755: /* call_on_exception: %empty */ -#line 4255 "parser.y" +#line 4263 "parser.y" { yyval = NULL; } -#line 9018 "parser.c" +#line 8983 "parser.c" break; case 756: /* $@41: %empty */ -#line 4259 "parser.y" +#line 4267 "parser.y" { check_unreached = 0; } -#line 9026 "parser.c" +#line 8991 "parser.c" break; case 757: /* call_on_exception: exception_or_overflow $@41 statement_list */ -#line 4263 "parser.y" +#line 4271 "parser.y" { yyval = yyvsp[0]; } -#line 9034 "parser.c" +#line 8999 "parser.c" break; case 758: /* call_not_on_exception: %empty */ -#line 4270 "parser.y" +#line 4278 "parser.y" { yyval = NULL; } -#line 9042 "parser.c" +#line 9007 "parser.c" break; case 759: /* $@42: %empty */ -#line 4274 "parser.y" +#line 4282 "parser.y" { check_unreached = 0; } -#line 9050 "parser.c" +#line 9015 "parser.c" break; case 760: /* call_not_on_exception: not_exception_or_overflow $@42 statement_list */ -#line 4278 "parser.y" +#line 4286 "parser.y" { yyval = yyvsp[0]; } -#line 9058 "parser.c" +#line 9023 "parser.c" break; case 761: /* end_call: %empty */ -#line 4284 "parser.y" +#line 4292 "parser.y" { terminator_warning (TERM_CALL); } -#line 9064 "parser.c" +#line 9029 "parser.c" break; case 762: /* end_call: "END-CALL" */ -#line 4285 "parser.y" +#line 4293 "parser.y" { terminator_clear (TERM_CALL); } -#line 9070 "parser.c" +#line 9035 "parser.c" break; case 763: /* $@43: %empty */ -#line 4294 "parser.y" +#line 4302 "parser.y" { BEGIN_STATEMENT ("CANCEL", 0); } -#line 9076 "parser.c" +#line 9041 "parser.c" break; case 766: /* cancel_list: cancel_list id_or_lit */ -#line 4300 "parser.y" +#line 4308 "parser.y" { cb_emit_cancel (yyvsp[0]); } -#line 9084 "parser.c" +#line 9049 "parser.c" break; case 767: /* cancel_list: ALL */ -#line 4304 "parser.y" +#line 4312 "parser.y" { cb_emit_cancel_all (); } -#line 9092 "parser.c" +#line 9057 "parser.c" break; case 768: /* $@44: %empty */ -#line 4315 "parser.y" +#line 4323 "parser.y" { BEGIN_STATEMENT ("CLOSE", 0); } -#line 9098 "parser.c" +#line 9063 "parser.c" break; case 771: /* close_list: close_list file_name close_option */ -#line 4322 "parser.y" +#line 4330 "parser.y" { BEGIN_IMPLICIT_STATEMENT (yyvsp[-1]); if (yyvsp[-1] != cb_error_node) { cb_emit_close (yyvsp[-1], yyvsp[0]); } } -#line 9109 "parser.c" +#line 9074 "parser.c" break; case 772: /* close_option: %empty */ -#line 4331 "parser.y" +#line 4339 "parser.y" { yyval = cb_int (COB_CLOSE_NORMAL); } -#line 9115 "parser.c" +#line 9080 "parser.c" break; case 773: /* close_option: reel_or_unit */ -#line 4332 "parser.y" +#line 4340 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT); } -#line 9121 "parser.c" +#line 9086 "parser.c" break; case 774: /* close_option: reel_or_unit _for REMOVAL */ -#line 4333 "parser.y" +#line 4341 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT_REMOVAL); } -#line 9127 "parser.c" +#line 9092 "parser.c" break; case 775: /* close_option: _with NO REWIND */ -#line 4334 "parser.y" +#line 4342 "parser.y" { yyval = cb_int (COB_CLOSE_NO_REWIND); } -#line 9133 "parser.c" +#line 9098 "parser.c" break; case 776: /* close_option: _with LOCK */ -#line 4335 "parser.y" +#line 4343 "parser.y" { yyval = cb_int (COB_CLOSE_LOCK); } -#line 9139 "parser.c" +#line 9104 "parser.c" break; case 779: /* $@45: %empty */ -#line 4346 "parser.y" +#line 4354 "parser.y" { BEGIN_STATEMENT ("COMPUTE", TERM_COMPUTE); } -#line 9145 "parser.c" +#line 9110 "parser.c" break; case 781: /* compute_body: arithmetic_x_list comp_equal expr on_size_error */ -#line 4353 "parser.y" +#line 4361 "parser.y" { cb_emit_arithmetic (yyvsp[-3], 0, yyvsp[-1]); } -#line 9153 "parser.c" +#line 9118 "parser.c" break; case 782: /* end_compute: %empty */ -#line 4359 "parser.y" +#line 4367 "parser.y" { terminator_warning (TERM_COMPUTE); } -#line 9159 "parser.c" +#line 9124 "parser.c" break; case 783: /* end_compute: "END-COMPUTE" */ -#line 4360 "parser.y" +#line 4368 "parser.y" { terminator_clear (TERM_COMPUTE); } -#line 9165 "parser.c" +#line 9130 "parser.c" break; case 786: /* commit_statement: COMMIT */ -#line 4371 "parser.y" +#line 4379 "parser.y" { BEGIN_STATEMENT ("COMMIT", 0); cb_emit_commit (); } -#line 9174 "parser.c" +#line 9139 "parser.c" break; case 787: /* continue_statement: CONTINUE */ -#line 4384 "parser.y" +#line 4392 "parser.y" { BEGIN_STATEMENT ("CONTINUE", 0); cb_emit_continue (); } -#line 9183 "parser.c" +#line 9148 "parser.c" break; case 788: /* $@46: %empty */ -#line 4396 "parser.y" +#line 4404 "parser.y" { BEGIN_STATEMENT ("DELETE", TERM_DELETE); } -#line 9189 "parser.c" +#line 9154 "parser.c" break; case 789: /* delete_statement: DELETE $@46 file_name _record opt_invalid_key end_delete */ -#line 4399 "parser.y" +#line 4407 "parser.y" { if (yyvsp[-3] != cb_error_node) { cb_emit_delete (yyvsp[-3]); } } -#line 9199 "parser.c" +#line 9164 "parser.c" break; case 790: /* end_delete: %empty */ -#line 4407 "parser.y" +#line 4415 "parser.y" { terminator_warning (TERM_DELETE); } -#line 9205 "parser.c" +#line 9170 "parser.c" break; case 791: /* end_delete: "END-DELETE" */ -#line 4408 "parser.y" +#line 4416 "parser.y" { terminator_clear (TERM_DELETE); } -#line 9211 "parser.c" +#line 9176 "parser.c" break; case 792: /* $@47: %empty */ -#line 4417 "parser.y" +#line 4425 "parser.y" { BEGIN_STATEMENT ("DELETE-FILE", 0); } -#line 9217 "parser.c" +#line 9182 "parser.c" break; case 793: /* delete_file_statement: DELETE $@47 "FILE" file_name_list */ -#line 4419 "parser.y" +#line 4427 "parser.y" { cb_tree l; for (l = yyvsp[0]; l; l = CB_CHAIN (l)) { @@ -9227,11 +9192,11 @@ yyparse (void) } } } -#line 9231 "parser.c" +#line 9196 "parser.c" break; case 794: /* $@48: %empty */ -#line 4437 "parser.y" +#line 4445 "parser.y" { BEGIN_STATEMENT ("DISPLAY", TERM_DISPLAY); dispattrs = 0; @@ -9239,277 +9204,277 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 9243 "parser.c" +#line 9208 "parser.c" break; case 796: /* display_body: id_or_lit "UPON ENVIRONMENT-NAME" on_disp_exception */ -#line 4450 "parser.y" +#line 4458 "parser.y" { cb_emit_env_name (yyvsp[-2]); } -#line 9251 "parser.c" +#line 9216 "parser.c" break; case 797: /* display_body: id_or_lit "UPON ENVIRONMENT-VALUE" on_disp_exception */ -#line 4454 "parser.y" +#line 4462 "parser.y" { cb_emit_env_value (yyvsp[-2]); } -#line 9259 "parser.c" +#line 9224 "parser.c" break; case 798: /* display_body: id_or_lit "UPON ARGUMENT-NUMBER" on_disp_exception */ -#line 4458 "parser.y" +#line 4466 "parser.y" { cb_emit_arg_number (yyvsp[-2]); } -#line 9267 "parser.c" +#line 9232 "parser.c" break; case 799: /* display_body: id_or_lit "UPON COMMAND-LINE" on_disp_exception */ -#line 4462 "parser.y" +#line 4470 "parser.y" { cb_emit_command_line (yyvsp[-2]); } -#line 9275 "parser.c" +#line 9240 "parser.c" break; case 800: /* display_body: x_list opt_at_line_column with_clause on_disp_exception */ -#line 4466 "parser.y" +#line 4474 "parser.y" { cb_emit_display (yyvsp[-3], cb_int0, yyvsp[-1], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 9283 "parser.c" +#line 9248 "parser.c" break; case 801: /* display_body: x_list opt_at_line_column UPON mnemonic_name with_clause on_disp_exception */ -#line 4470 "parser.y" +#line 4478 "parser.y" { cb_emit_display_mnemonic (yyvsp[-5], yyvsp[-2], yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9291 "parser.c" +#line 9256 "parser.c" break; case 802: /* display_body: x_list opt_at_line_column UPON "Identifier" with_clause on_disp_exception */ -#line 4474 "parser.y" +#line 4482 "parser.y" { cb_tree word = cb_build_display_upon_direct (yyvsp[-2]); cb_emit_display (yyvsp[-5], word, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9300 "parser.c" +#line 9265 "parser.c" break; case 803: /* display_body: x_list opt_at_line_column UPON PRINTER with_clause on_disp_exception */ -#line 4479 "parser.y" +#line 4487 "parser.y" { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9308 "parser.c" +#line 9273 "parser.c" break; case 804: /* display_body: x_list opt_at_line_column UPON CRT with_clause on_disp_exception */ -#line 4483 "parser.y" +#line 4491 "parser.y" { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9316 "parser.c" +#line 9281 "parser.c" break; case 805: /* with_clause: %empty */ -#line 4489 "parser.y" +#line 4497 "parser.y" { yyval = cb_int1; } -#line 9322 "parser.c" +#line 9287 "parser.c" break; case 806: /* with_clause: _with "NO ADVANCING" */ -#line 4490 "parser.y" +#line 4498 "parser.y" { yyval = cb_int0; } -#line 9328 "parser.c" +#line 9293 "parser.c" break; case 807: /* with_clause: WITH disp_attrs */ -#line 4491 "parser.y" +#line 4499 "parser.y" { yyval = cb_int1; } -#line 9334 "parser.c" +#line 9299 "parser.c" break; case 810: /* disp_attr: BELL */ -#line 4501 "parser.y" +#line 4509 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 9340 "parser.c" +#line 9305 "parser.c" break; case 811: /* disp_attr: BLINK */ -#line 4502 "parser.y" +#line 4510 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 9346 "parser.c" +#line 9311 "parser.c" break; case 812: /* disp_attr: ERASE EOL */ -#line 4503 "parser.y" +#line 4511 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOL; } -#line 9352 "parser.c" +#line 9317 "parser.c" break; case 813: /* disp_attr: ERASE EOS */ -#line 4504 "parser.y" +#line 4512 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOS; } -#line 9358 "parser.c" +#line 9323 "parser.c" break; case 814: /* disp_attr: HIGHLIGHT */ -#line 4505 "parser.y" +#line 4513 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 9364 "parser.c" +#line 9329 "parser.c" break; case 815: /* disp_attr: LOWLIGHT */ -#line 4506 "parser.y" +#line 4514 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 9370 "parser.c" +#line 9335 "parser.c" break; case 816: /* disp_attr: "REVERSE-VIDEO" */ -#line 4507 "parser.y" +#line 4515 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 9376 "parser.c" +#line 9341 "parser.c" break; case 817: /* disp_attr: UNDERLINE */ -#line 4508 "parser.y" +#line 4516 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 9382 "parser.c" +#line 9347 "parser.c" break; case 818: /* disp_attr: OVERLINE */ -#line 4509 "parser.y" +#line 4517 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 9388 "parser.c" +#line 9353 "parser.c" break; case 819: /* disp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ -#line 4511 "parser.y" +#line 4519 "parser.y" { fgc = yyvsp[0]; } -#line 9396 "parser.c" +#line 9361 "parser.c" break; case 820: /* disp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ -#line 4515 "parser.y" +#line 4523 "parser.y" { bgc = yyvsp[0]; } -#line 9404 "parser.c" +#line 9369 "parser.c" break; case 821: /* disp_attr: SCROLL UP _opt_scroll_lines */ -#line 4519 "parser.y" +#line 4527 "parser.y" { scroll = yyvsp[0]; } -#line 9412 "parser.c" +#line 9377 "parser.c" break; case 822: /* disp_attr: SCROLL DOWN _opt_scroll_lines */ -#line 4523 "parser.y" +#line 4531 "parser.y" { dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 9421 "parser.c" +#line 9386 "parser.c" break; case 823: /* disp_attr: "BLANK-LINE" */ -#line 4527 "parser.y" +#line 4535 "parser.y" { dispattrs |= COB_SCREEN_BLANK_LINE; } -#line 9427 "parser.c" +#line 9392 "parser.c" break; case 824: /* disp_attr: "BLANK-SCREEN" */ -#line 4528 "parser.y" +#line 4536 "parser.y" { dispattrs |= COB_SCREEN_BLANK_SCREEN; } -#line 9433 "parser.c" +#line 9398 "parser.c" break; case 825: /* end_display: %empty */ -#line 4532 "parser.y" +#line 4540 "parser.y" { terminator_warning (TERM_DISPLAY); } -#line 9439 "parser.c" +#line 9404 "parser.c" break; case 826: /* end_display: "END-DISPLAY" */ -#line 4533 "parser.y" +#line 4541 "parser.y" { terminator_clear (TERM_DISPLAY); } -#line 9445 "parser.c" +#line 9410 "parser.c" break; case 827: /* $@49: %empty */ -#line 4542 "parser.y" +#line 4550 "parser.y" { BEGIN_STATEMENT ("DIVIDE", TERM_DIVIDE); } -#line 9451 "parser.c" +#line 9416 "parser.c" break; case 829: /* divide_body: x INTO arithmetic_x_list on_size_error */ -#line 4549 "parser.y" +#line 4557 "parser.y" { cb_emit_arithmetic (yyvsp[-1], '/', yyvsp[-3]); } -#line 9459 "parser.c" +#line 9424 "parser.c" break; case 830: /* divide_body: x INTO x GIVING arithmetic_x_list on_size_error */ -#line 4553 "parser.y" +#line 4561 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-3], '/', yyvsp[-5])); } -#line 9467 "parser.c" +#line 9432 "parser.c" break; case 831: /* divide_body: x BY x GIVING arithmetic_x_list on_size_error */ -#line 4557 "parser.y" +#line 4565 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '/', yyvsp[-3])); } -#line 9475 "parser.c" +#line 9440 "parser.c" break; case 832: /* divide_body: x INTO x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ -#line 4561 "parser.y" +#line 4569 "parser.y" { cb_emit_divide (yyvsp[-5], yyvsp[-7], yyvsp[-3], yyvsp[-1]); } -#line 9483 "parser.c" +#line 9448 "parser.c" break; case 833: /* divide_body: x BY x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ -#line 4565 "parser.y" +#line 4573 "parser.y" { cb_emit_divide (yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); } -#line 9491 "parser.c" +#line 9456 "parser.c" break; case 834: /* end_divide: %empty */ -#line 4571 "parser.y" +#line 4579 "parser.y" { terminator_warning (TERM_DIVIDE); } -#line 9497 "parser.c" +#line 9462 "parser.c" break; case 835: /* end_divide: "END-DIVIDE" */ -#line 4572 "parser.y" +#line 4580 "parser.y" { terminator_clear (TERM_DIVIDE); } -#line 9503 "parser.c" +#line 9468 "parser.c" break; case 836: /* $@50: %empty */ -#line 4581 "parser.y" +#line 4589 "parser.y" { BEGIN_STATEMENT ("ENTRY", 0); } -#line 9509 "parser.c" +#line 9474 "parser.c" break; case 837: /* entry_statement: ENTRY $@50 "Literal" call_using */ -#line 4583 "parser.y" +#line 4591 "parser.y" { if (current_program->nested_level) { cb_error (_("ENTRY is invalid in nested program")); @@ -9521,11 +9486,11 @@ yyparse (void) } check_unreached = 0; } -#line 9525 "parser.c" +#line 9490 "parser.c" break; case 838: /* $@51: %empty */ -#line 4603 "parser.y" +#line 4611 "parser.y" { BEGIN_STATEMENT ("EVALUATE", TERM_EVALUATE); eval_level++; @@ -9535,37 +9500,37 @@ yyparse (void) eval_inc = 0; eval_inc2 = 0; } -#line 9539 "parser.c" +#line 9504 "parser.c" break; case 839: /* evaluate_statement: EVALUATE $@51 evaluate_subject_list evaluate_condition_list end_evaluate */ -#line 4614 "parser.y" +#line 4622 "parser.y" { cb_emit_evaluate (yyvsp[-2], yyvsp[-1]); eval_level--; } -#line 9548 "parser.c" +#line 9513 "parser.c" break; case 840: /* evaluate_subject_list: evaluate_subject */ -#line 4621 "parser.y" +#line 4629 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9554 "parser.c" +#line 9519 "parser.c" break; case 841: /* evaluate_subject_list: evaluate_subject_list _also evaluate_subject */ -#line 4624 "parser.y" +#line 4632 "parser.y" { if (!cb_allow_missing_also_clause_in_evaluate && yyvsp[-1] != cb_int1) { cb_error (_("Invalid expression")); } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9565 "parser.c" +#line 9530 "parser.c" break; case 842: /* evaluate_subject: expr */ -#line 4634 "parser.y" +#line 4642 "parser.y" { yyval = yyvsp[0]; if (CB_REFERENCE_P (yyvsp[0])) { @@ -9574,29 +9539,29 @@ yyparse (void) eval_check[eval_level][eval_inc++] = 1; } } -#line 9578 "parser.c" +#line 9543 "parser.c" break; case 843: /* evaluate_subject: "TRUE" */ -#line 4643 "parser.y" +#line 4651 "parser.y" { yyval = cb_true; eval_check[eval_level][eval_inc++] = 2; } -#line 9587 "parser.c" +#line 9552 "parser.c" break; case 844: /* evaluate_subject: "FALSE" */ -#line 4648 "parser.y" +#line 4656 "parser.y" { yyval = cb_false; eval_check[eval_level][eval_inc++] = 3; } -#line 9596 "parser.c" +#line 9561 "parser.c" break; case 845: /* evaluate_condition_list: evaluate_case_list evaluate_other */ -#line 4656 "parser.y" +#line 4664 "parser.y" { yyval = yyvsp[-1]; if (yyvsp[0]) { @@ -9622,31 +9587,31 @@ yyparse (void) yyval = cb_list_add (yyval, yyvsp[0]); } } -#line 9626 "parser.c" +#line 9591 "parser.c" break; case 846: /* evaluate_case_list: evaluate_case */ -#line 4684 "parser.y" +#line 4692 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9632 "parser.c" +#line 9597 "parser.c" break; case 847: /* evaluate_case_list: evaluate_case_list evaluate_case */ -#line 4686 "parser.y" +#line 4694 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 9638 "parser.c" +#line 9603 "parser.c" break; case 848: /* $@52: %empty */ -#line 4691 "parser.y" +#line 4699 "parser.y" { check_unreached = 0; } -#line 9646 "parser.c" +#line 9611 "parser.c" break; case 849: /* evaluate_case: evaluate_when_list $@52 statement_list */ -#line 4695 "parser.y" +#line 4703 "parser.y" { if (!cb_allow_empty_imperative_statement && yyvsp[0] == NULL) { cb_error (_("syntax error")); @@ -9654,27 +9619,27 @@ yyparse (void) yyval = cb_cons (yyvsp[0], yyvsp[-2]); eval_inc2 = 0; } -#line 9658 "parser.c" +#line 9623 "parser.c" break; case 850: /* evaluate_other: %empty */ -#line 4706 "parser.y" +#line 4714 "parser.y" { yyval = NULL; } -#line 9666 "parser.c" +#line 9631 "parser.c" break; case 851: /* $@53: %empty */ -#line 4710 "parser.y" +#line 4718 "parser.y" { check_unreached = 0; } -#line 9674 "parser.c" +#line 9639 "parser.c" break; case 852: /* evaluate_other: "WHEN OTHER" $@53 statement_list */ -#line 4714 "parser.y" +#line 4722 "parser.y" { if (!cb_allow_empty_imperative_statement && yyvsp[0] == NULL) { cb_error (_("syntax error")); @@ -9682,40 +9647,40 @@ yyparse (void) yyval = cb_cons (yyvsp[0], NULL); eval_inc2 = 0; } -#line 9686 "parser.c" +#line 9651 "parser.c" break; case 853: /* evaluate_when_list: WHEN evaluate_object_list */ -#line 4724 "parser.y" +#line 4732 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9692 "parser.c" +#line 9657 "parser.c" break; case 854: /* evaluate_when_list: evaluate_when_list WHEN evaluate_object_list */ -#line 4726 "parser.y" +#line 4734 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9698 "parser.c" +#line 9663 "parser.c" break; case 855: /* evaluate_object_list: evaluate_object */ -#line 4730 "parser.y" +#line 4738 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9704 "parser.c" +#line 9669 "parser.c" break; case 856: /* evaluate_object_list: evaluate_object_list _also evaluate_object */ -#line 4733 "parser.y" +#line 4741 "parser.y" { if (!cb_allow_missing_also_clause_in_evaluate && yyvsp[-1] != cb_int1) { cb_error (_("Invalid expression")); } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9715 "parser.c" +#line 9680 "parser.c" break; case 857: /* evaluate_object: partial_expr opt_evaluate_thru_expr */ -#line 4743 "parser.y" +#line 4751 "parser.y" { cb_tree not; cb_tree e1; @@ -9744,65 +9709,65 @@ yyparse (void) eval_inc2++; } } -#line 9748 "parser.c" +#line 9713 "parser.c" break; case 858: /* evaluate_object: ANY */ -#line 4771 "parser.y" +#line 4779 "parser.y" { yyval = cb_any; eval_inc2++; } -#line 9754 "parser.c" +#line 9719 "parser.c" break; case 859: /* evaluate_object: "TRUE" */ -#line 4772 "parser.y" +#line 4780 "parser.y" { yyval = cb_true; eval_inc2++; } -#line 9760 "parser.c" +#line 9725 "parser.c" break; case 860: /* evaluate_object: "FALSE" */ -#line 4773 "parser.y" +#line 4781 "parser.y" { yyval = cb_false; eval_inc2++; } -#line 9766 "parser.c" +#line 9731 "parser.c" break; case 861: /* opt_evaluate_thru_expr: %empty */ -#line 4776 "parser.y" +#line 4784 "parser.y" { yyval = NULL; } -#line 9772 "parser.c" +#line 9737 "parser.c" break; case 862: /* opt_evaluate_thru_expr: THRU expr */ -#line 4777 "parser.y" +#line 4785 "parser.y" { yyval = yyvsp[0]; } -#line 9778 "parser.c" +#line 9743 "parser.c" break; case 863: /* end_evaluate: %empty */ -#line 4781 "parser.y" +#line 4789 "parser.y" { terminator_warning (TERM_EVALUATE); } -#line 9784 "parser.c" +#line 9749 "parser.c" break; case 864: /* end_evaluate: "END-EVALUATE" */ -#line 4782 "parser.y" +#line 4790 "parser.y" { terminator_clear (TERM_EVALUATE); } -#line 9790 "parser.c" +#line 9755 "parser.c" break; case 865: /* $@54: %empty */ -#line 4791 "parser.y" +#line 4799 "parser.y" { BEGIN_STATEMENT ("EXIT", 0); } -#line 9796 "parser.c" +#line 9761 "parser.c" break; case 867: /* exit_body: %empty */ -#line 4796 "parser.y" +#line 4804 "parser.y" { /* nothing */ } -#line 9802 "parser.c" +#line 9767 "parser.c" break; case 868: /* exit_body: PROGRAM */ -#line 4798 "parser.y" +#line 4806 "parser.y" { if (in_declaratives && use_global_ind) { cb_error (_("EXIT PROGRAM is not allowed within a USE GLOBAL procedure")); @@ -9810,11 +9775,11 @@ yyparse (void) check_unreached = 1; cb_emit_exit (0); } -#line 9814 "parser.c" +#line 9779 "parser.c" break; case 869: /* exit_body: PERFORM */ -#line 4806 "parser.y" +#line 4814 "parser.y" { if (!perform_stack) { cb_error (_("EXIT PERFORM is only valid with inline PERFORM")); @@ -9822,11 +9787,11 @@ yyparse (void) cb_emit_java_break (); } } -#line 9826 "parser.c" +#line 9791 "parser.c" break; case 870: /* exit_body: PERFORM CYCLE */ -#line 4814 "parser.y" +#line 4822 "parser.y" { if (!perform_stack) { cb_error (_("EXIT PERFORM is only valid with inline PERFORM")); @@ -9834,11 +9799,11 @@ yyparse (void) cb_emit_java_continue (); } } -#line 9838 "parser.c" +#line 9803 "parser.c" break; case 871: /* exit_body: SECTION */ -#line 4822 "parser.y" +#line 4830 "parser.y" { cb_tree plabel; char name[64]; @@ -9856,11 +9821,11 @@ yyparse (void) cb_emit_goto (cb_list_init (current_section->exit_label_ref), NULL); } } -#line 9860 "parser.c" +#line 9825 "parser.c" break; case 872: /* exit_body: PARAGRAPH */ -#line 4840 "parser.y" +#line 4848 "parser.y" { cb_tree plabel; char name[64]; @@ -9878,461 +9843,461 @@ yyparse (void) cb_emit_goto (cb_list_init (current_paragraph->exit_label_ref), NULL); } } -#line 9882 "parser.c" +#line 9847 "parser.c" break; case 873: /* $@55: %empty */ -#line 4864 "parser.y" +#line 4872 "parser.y" { BEGIN_STATEMENT ("FREE", 0); } -#line 9888 "parser.c" +#line 9853 "parser.c" break; case 874: /* free_statement: FREE $@55 target_x_list */ -#line 4866 "parser.y" +#line 4874 "parser.y" { cb_emit_free (yyvsp[0]); } -#line 9896 "parser.c" +#line 9861 "parser.c" break; case 875: /* $@56: %empty */ -#line 4877 "parser.y" +#line 4885 "parser.y" { BEGIN_STATEMENT ("GENERATE", 0); } -#line 9902 "parser.c" +#line 9867 "parser.c" break; case 876: /* generate_statement: GENERATE $@56 identifier */ -#line 4879 "parser.y" +#line 4887 "parser.y" { PENDING("GENERATE"); } -#line 9910 "parser.c" +#line 9875 "parser.c" break; case 877: /* $@57: %empty */ -#line 4890 "parser.y" +#line 4898 "parser.y" { BEGIN_STATEMENT ("GO TO", 0); } -#line 9916 "parser.c" +#line 9881 "parser.c" break; case 878: /* goto_statement: GO _to $@57 procedure_name_list goto_depending */ -#line 4892 "parser.y" +#line 4900 "parser.y" { cb_emit_goto (yyvsp[-1], yyvsp[0]); } -#line 9924 "parser.c" +#line 9889 "parser.c" break; case 879: /* goto_depending: %empty */ -#line 4899 "parser.y" +#line 4907 "parser.y" { check_unreached = 1; yyval = NULL; } -#line 9933 "parser.c" +#line 9898 "parser.c" break; case 880: /* goto_depending: DEPENDING _on identifier */ -#line 4904 "parser.y" +#line 4912 "parser.y" { check_unreached = 0; yyval = yyvsp[0]; } -#line 9942 "parser.c" +#line 9907 "parser.c" break; case 881: /* $@58: %empty */ -#line 4916 "parser.y" +#line 4924 "parser.y" { BEGIN_STATEMENT ("GOBACK", 0); } -#line 9948 "parser.c" +#line 9913 "parser.c" break; case 882: /* goback_statement: GOBACK $@58 */ -#line 4917 "parser.y" +#line 4925 "parser.y" { check_unreached = 1; cb_emit_exit (1); } -#line 9957 "parser.c" +#line 9922 "parser.c" break; case 883: /* $@59: %empty */ -#line 4929 "parser.y" +#line 4937 "parser.y" { BEGIN_STATEMENT ("IF", TERM_IF); } -#line 9963 "parser.c" +#line 9928 "parser.c" break; case 884: /* $@60: %empty */ -#line 4931 "parser.y" +#line 4939 "parser.y" { check_unreached = 0; } -#line 9971 "parser.c" +#line 9936 "parser.c" break; case 885: /* if_statement: IF $@59 condition _then $@60 statement_list if_else_sentence end_if */ -#line 4936 "parser.y" +#line 4944 "parser.y" { if (!cb_allow_empty_imperative_statement && yyvsp[-2] == NULL) { cb_error (_("syntax error")); } cb_emit_if (yyvsp[-5], yyvsp[-2], yyvsp[-1]); } -#line 9982 "parser.c" +#line 9947 "parser.c" break; case 887: /* if_else_sentence: %empty */ -#line 4947 "parser.y" +#line 4955 "parser.y" { yyval = NULL; } -#line 9990 "parser.c" +#line 9955 "parser.c" break; case 888: /* $@61: %empty */ -#line 4951 "parser.y" +#line 4959 "parser.y" { check_unreached = 0; } -#line 9998 "parser.c" +#line 9963 "parser.c" break; case 889: /* if_else_sentence: ELSE $@61 statement_list */ -#line 4955 "parser.y" +#line 4963 "parser.y" { if (!cb_allow_empty_imperative_statement && yyvsp[0] == NULL) { cb_error (_("syntax error")); } yyval = yyvsp[0]; } -#line 10009 "parser.c" +#line 9974 "parser.c" break; case 890: /* end_if: %empty */ -#line 4964 "parser.y" +#line 4972 "parser.y" { terminator_warning (TERM_IF); } -#line 10015 "parser.c" +#line 9980 "parser.c" break; case 891: /* end_if: "END-IF" */ -#line 4965 "parser.y" +#line 4973 "parser.y" { terminator_clear (TERM_IF); } -#line 10021 "parser.c" +#line 9986 "parser.c" break; case 892: /* $@62: %empty */ -#line 4974 "parser.y" +#line 4982 "parser.y" { BEGIN_STATEMENT ("INITIALIZE", 0); } -#line 10027 "parser.c" +#line 9992 "parser.c" break; case 893: /* initialize_statement: INITIALIZE $@62 target_x_list initialize_filler initialize_value initialize_replacing initialize_default */ -#line 4976 "parser.y" +#line 4984 "parser.y" { cb_emit_initialize (yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10035 "parser.c" +#line 10000 "parser.c" break; case 894: /* initialize_filler: %empty */ -#line 4982 "parser.y" +#line 4990 "parser.y" { yyval = NULL; } -#line 10041 "parser.c" +#line 10006 "parser.c" break; case 895: /* initialize_filler: _with FILLER */ -#line 4983 "parser.y" +#line 4991 "parser.y" { yyval = cb_true; } -#line 10047 "parser.c" +#line 10012 "parser.c" break; case 896: /* initialize_value: %empty */ -#line 4987 "parser.y" +#line 4995 "parser.y" { yyval = NULL; } -#line 10053 "parser.c" +#line 10018 "parser.c" break; case 897: /* initialize_value: ALL _to VALUE */ -#line 4988 "parser.y" +#line 4996 "parser.y" { yyval = cb_true; } -#line 10059 "parser.c" +#line 10024 "parser.c" break; case 898: /* initialize_value: initialize_category _to VALUE */ -#line 4989 "parser.y" +#line 4997 "parser.y" { yyval = yyvsp[-2]; } -#line 10065 "parser.c" +#line 10030 "parser.c" break; case 899: /* initialize_replacing: %empty */ -#line 4993 "parser.y" +#line 5001 "parser.y" { yyval = NULL; } -#line 10071 "parser.c" +#line 10036 "parser.c" break; case 900: /* initialize_replacing: REPLACING initialize_replacing_list */ -#line 4995 "parser.y" +#line 5003 "parser.y" { yyval = yyvsp[0]; } -#line 10077 "parser.c" +#line 10042 "parser.c" break; case 901: /* initialize_replacing_list: initialize_replacing_item */ -#line 4999 "parser.y" +#line 5007 "parser.y" { yyval = yyvsp[0]; } -#line 10083 "parser.c" +#line 10048 "parser.c" break; case 902: /* initialize_replacing_list: initialize_replacing_list initialize_replacing_item */ -#line 5001 "parser.y" +#line 5009 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10089 "parser.c" +#line 10054 "parser.c" break; case 903: /* initialize_replacing_item: initialize_category _data BY x */ -#line 5005 "parser.y" +#line 5013 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[0]); } -#line 10095 "parser.c" +#line 10060 "parser.c" break; case 904: /* initialize_category: ALPHABETIC */ -#line 5009 "parser.y" +#line 5017 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHABETIC); } -#line 10101 "parser.c" +#line 10066 "parser.c" break; case 905: /* initialize_category: ALPHANUMERIC */ -#line 5010 "parser.y" +#line 5018 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC); } -#line 10107 "parser.c" +#line 10072 "parser.c" break; case 906: /* initialize_category: NUMERIC */ -#line 5011 "parser.y" +#line 5019 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC); } -#line 10113 "parser.c" +#line 10078 "parser.c" break; case 907: /* initialize_category: "ALPHANUMERIC-EDITED" */ -#line 5012 "parser.y" +#line 5020 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC_EDITED); } -#line 10119 "parser.c" +#line 10084 "parser.c" break; case 908: /* initialize_category: "NUMERIC-EDITED" */ -#line 5013 "parser.y" +#line 5021 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC_EDITED); } -#line 10125 "parser.c" +#line 10090 "parser.c" break; case 909: /* initialize_category: NATIONAL */ -#line 5014 "parser.y" +#line 5022 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL); } -#line 10131 "parser.c" +#line 10096 "parser.c" break; case 910: /* initialize_category: "NATIONAL-EDITED" */ -#line 5015 "parser.y" +#line 5023 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL_EDITED); } -#line 10137 "parser.c" +#line 10102 "parser.c" break; case 911: /* initialize_default: %empty */ -#line 5019 "parser.y" +#line 5027 "parser.y" { yyval = NULL; } -#line 10143 "parser.c" +#line 10108 "parser.c" break; case 912: /* initialize_default: DEFAULT */ -#line 5020 "parser.y" +#line 5028 "parser.y" { yyval = cb_true; } -#line 10149 "parser.c" +#line 10114 "parser.c" break; case 913: /* $@63: %empty */ -#line 5029 "parser.y" +#line 5037 "parser.y" { BEGIN_STATEMENT ("INITIATE", 0); } -#line 10155 "parser.c" +#line 10120 "parser.c" break; case 914: /* initiate_statement: INITIATE $@63 identifier_list */ -#line 5031 "parser.y" +#line 5039 "parser.y" { PENDING("INITIATE"); } -#line 10163 "parser.c" +#line 10128 "parser.c" break; case 915: /* $@64: %empty */ -#line 5042 "parser.y" +#line 5050 "parser.y" { BEGIN_STATEMENT ("INSPECT", 0); sending_id = 0; inspect_keyword = 0; } -#line 10173 "parser.c" +#line 10138 "parser.c" break; case 917: /* send_identifier: identifier */ -#line 5051 "parser.y" +#line 5059 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 0; } -#line 10179 "parser.c" +#line 10144 "parser.c" break; case 918: /* send_identifier: literal */ -#line 5052 "parser.y" +#line 5060 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10185 "parser.c" +#line 10150 "parser.c" break; case 919: /* send_identifier: function */ -#line 5053 "parser.y" +#line 5061 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10191 "parser.c" +#line 10156 "parser.c" break; case 922: /* inspect_item: inspect_tallying */ -#line 5062 "parser.y" +#line 5070 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 0); } -#line 10197 "parser.c" +#line 10162 "parser.c" break; case 923: /* inspect_item: inspect_replacing */ -#line 5063 "parser.y" +#line 5071 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int1, 1); } -#line 10203 "parser.c" +#line 10168 "parser.c" break; case 924: /* inspect_item: inspect_converting */ -#line 5064 "parser.y" +#line 5072 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 2); } -#line 10209 "parser.c" +#line 10174 "parser.c" break; case 925: /* $@65: %empty */ -#line 5070 "parser.y" +#line 5078 "parser.y" { cb_init_tarrying (); } -#line 10215 "parser.c" +#line 10180 "parser.c" break; case 926: /* inspect_tallying: TALLYING $@65 tallying_list */ -#line 5071 "parser.y" +#line 5079 "parser.y" { yyval = yyvsp[0]; } -#line 10221 "parser.c" +#line 10186 "parser.c" break; case 927: /* tallying_list: tallying_item */ -#line 5075 "parser.y" +#line 5083 "parser.y" { yyval = yyvsp[0]; } -#line 10227 "parser.c" +#line 10192 "parser.c" break; case 928: /* tallying_list: tallying_list tallying_item */ -#line 5076 "parser.y" +#line 5084 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10233 "parser.c" +#line 10198 "parser.c" break; case 929: /* tallying_item: simple_value FOR */ -#line 5080 "parser.y" +#line 5088 "parser.y" { yyval = cb_build_tarrying_data (yyvsp[-1]); } -#line 10239 "parser.c" +#line 10204 "parser.c" break; case 930: /* tallying_item: CHARACTERS inspect_region */ -#line 5081 "parser.y" +#line 5089 "parser.y" { yyval = cb_build_tarrying_characters (yyvsp[0]); } -#line 10245 "parser.c" +#line 10210 "parser.c" break; case 931: /* tallying_item: ALL */ -#line 5082 "parser.y" +#line 5090 "parser.y" { yyval = cb_build_tarrying_all (); } -#line 10251 "parser.c" +#line 10216 "parser.c" break; case 932: /* tallying_item: LEADING */ -#line 5083 "parser.y" +#line 5091 "parser.y" { yyval = cb_build_tarrying_leading (); } -#line 10257 "parser.c" +#line 10222 "parser.c" break; case 933: /* tallying_item: TRAILING */ -#line 5084 "parser.y" +#line 5092 "parser.y" { yyval = cb_build_tarrying_trailing (); } -#line 10263 "parser.c" +#line 10228 "parser.c" break; case 934: /* tallying_item: simple_value inspect_region */ -#line 5085 "parser.y" +#line 5093 "parser.y" { yyval = cb_build_tarrying_value (yyvsp[-1], yyvsp[0]); } -#line 10269 "parser.c" +#line 10234 "parser.c" break; case 935: /* inspect_replacing: REPLACING replacing_list */ -#line 5091 "parser.y" +#line 5099 "parser.y" { yyval = yyvsp[0]; inspect_keyword = 0; } -#line 10275 "parser.c" +#line 10240 "parser.c" break; case 936: /* replacing_list: replacing_item */ -#line 5095 "parser.y" +#line 5103 "parser.y" { yyval = yyvsp[0]; } -#line 10281 "parser.c" +#line 10246 "parser.c" break; case 937: /* replacing_list: replacing_list replacing_item */ -#line 5096 "parser.y" +#line 5104 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10287 "parser.c" +#line 10252 "parser.c" break; case 938: /* replacing_item: CHARACTERS BY simple_value inspect_region */ -#line 5101 "parser.y" +#line 5109 "parser.y" { yyval = cb_build_replacing_characters (yyvsp[-1], yyvsp[0], save_tree_1); inspect_keyword = 0; } -#line 10296 "parser.c" +#line 10261 "parser.c" break; case 939: /* replacing_item: rep_keyword replacing_region */ -#line 5105 "parser.y" +#line 5113 "parser.y" { yyval = yyvsp[0]; } -#line 10302 "parser.c" +#line 10267 "parser.c" break; case 940: /* rep_keyword: %empty */ -#line 5109 "parser.y" +#line 5117 "parser.y" { /* Nothing */ } -#line 10308 "parser.c" +#line 10273 "parser.c" break; case 941: /* rep_keyword: ALL */ -#line 5110 "parser.y" +#line 5118 "parser.y" { inspect_keyword = 1; } -#line 10314 "parser.c" +#line 10279 "parser.c" break; case 942: /* rep_keyword: LEADING */ -#line 5111 "parser.y" +#line 5119 "parser.y" { inspect_keyword = 2; } -#line 10320 "parser.c" +#line 10285 "parser.c" break; case 943: /* rep_keyword: FIRST */ -#line 5112 "parser.y" +#line 5120 "parser.y" { inspect_keyword = 3; } -#line 10326 "parser.c" +#line 10291 "parser.c" break; case 944: /* rep_keyword: TRAILING */ -#line 5113 "parser.y" +#line 5121 "parser.y" { inspect_keyword = 4; } -#line 10332 "parser.c" +#line 10297 "parser.c" break; case 945: /* replacing_region: simple_value BY simple_all_value inspect_region */ -#line 5118 "parser.y" +#line 5126 "parser.y" { switch (inspect_keyword) { case 1: @@ -10353,11 +10318,11 @@ yyparse (void) break; } } -#line 10357 "parser.c" +#line 10322 "parser.c" break; case 946: /* inspect_converting: CONVERTING simple_value TO simple_all_value inspect_region */ -#line 5144 "parser.y" +#line 5152 "parser.y" { if (cb_validate_inspect (save_tree_1, yyvsp[-3], yyvsp[-1]) < 0 ) { yyval = cb_error_node; @@ -10365,91 +10330,91 @@ yyparse (void) yyval = cb_build_converting (yyvsp[-3], yyvsp[-1], yyvsp[0]); } } -#line 10369 "parser.c" +#line 10334 "parser.c" break; case 947: /* inspect_region: %empty */ -#line 5156 "parser.y" +#line 5164 "parser.y" { yyval = cb_build_inspect_region_start (); } -#line 10375 "parser.c" +#line 10340 "parser.c" break; case 948: /* inspect_region: inspect_region before_or_after _initial x */ -#line 5158 "parser.y" +#line 5166 "parser.y" { yyval = cb_build_inspect_region (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10381 "parser.c" +#line 10346 "parser.c" break; case 951: /* $@66: %empty */ -#line 5169 "parser.y" +#line 5177 "parser.y" { BEGIN_STATEMENT ("MERGE", 0); } -#line 10387 "parser.c" +#line 10352 "parser.c" break; case 953: /* $@67: %empty */ -#line 5179 "parser.y" +#line 5187 "parser.y" { BEGIN_STATEMENT ("MOVE", 0); } -#line 10393 "parser.c" +#line 10358 "parser.c" break; case 955: /* move_body: x TO target_x_list */ -#line 5185 "parser.y" +#line 5193 "parser.y" { cb_emit_move (yyvsp[-2], yyvsp[0]); } -#line 10401 "parser.c" +#line 10366 "parser.c" break; case 956: /* move_body: CORRESPONDING x TO target_x_list */ -#line 5189 "parser.y" +#line 5197 "parser.y" { cb_emit_move_corresponding (yyvsp[-2], yyvsp[0]); } -#line 10409 "parser.c" +#line 10374 "parser.c" break; case 957: /* $@68: %empty */ -#line 5200 "parser.y" +#line 5208 "parser.y" { BEGIN_STATEMENT ("MULTIPLY", TERM_MULTIPLY); } -#line 10415 "parser.c" +#line 10380 "parser.c" break; case 959: /* multiply_body: x BY arithmetic_x_list on_size_error */ -#line 5207 "parser.y" +#line 5215 "parser.y" { cb_emit_arithmetic (yyvsp[-1], '*', yyvsp[-3]); } -#line 10423 "parser.c" +#line 10388 "parser.c" break; case 960: /* multiply_body: x BY x GIVING arithmetic_x_list on_size_error */ -#line 5211 "parser.y" +#line 5219 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '*', yyvsp[-3])); } -#line 10431 "parser.c" +#line 10396 "parser.c" break; case 961: /* end_multiply: %empty */ -#line 5217 "parser.y" +#line 5225 "parser.y" { terminator_warning (TERM_MULTIPLY); } -#line 10437 "parser.c" +#line 10402 "parser.c" break; case 962: /* end_multiply: "END-MULTIPLY" */ -#line 5218 "parser.y" +#line 5226 "parser.y" { terminator_clear (TERM_MULTIPLY); } -#line 10443 "parser.c" +#line 10408 "parser.c" break; case 963: /* $@69: %empty */ -#line 5227 "parser.y" +#line 5235 "parser.y" { BEGIN_STATEMENT ("OPEN", 0); } -#line 10449 "parser.c" +#line 10414 "parser.c" break; case 966: /* open_list: open_list open_mode open_sharing file_name_list open_option */ -#line 5234 "parser.y" +#line 5242 "parser.y" { cb_tree l; for (l = yyvsp[-1]; l; l = CB_CHAIN (l)) { @@ -10459,217 +10424,217 @@ yyparse (void) } } } -#line 10463 "parser.c" +#line 10428 "parser.c" break; case 967: /* open_mode: INPUT */ -#line 5246 "parser.y" +#line 5254 "parser.y" { yyval = cb_int (COB_OPEN_INPUT); } -#line 10469 "parser.c" +#line 10434 "parser.c" break; case 968: /* open_mode: OUTPUT */ -#line 5247 "parser.y" +#line 5255 "parser.y" { yyval = cb_int (COB_OPEN_OUTPUT); } -#line 10475 "parser.c" +#line 10440 "parser.c" break; case 969: /* open_mode: "I-O" */ -#line 5248 "parser.y" +#line 5256 "parser.y" { yyval = cb_int (COB_OPEN_I_O); } -#line 10481 "parser.c" +#line 10446 "parser.c" break; case 970: /* open_mode: EXTEND */ -#line 5249 "parser.y" +#line 5257 "parser.y" { yyval = cb_int (COB_OPEN_EXTEND); } -#line 10487 "parser.c" +#line 10452 "parser.c" break; case 971: /* open_sharing: %empty */ -#line 5253 "parser.y" +#line 5261 "parser.y" { yyval = NULL; } -#line 10493 "parser.c" +#line 10458 "parser.c" break; case 972: /* open_sharing: SHARING _with sharing_option */ -#line 5254 "parser.y" +#line 5262 "parser.y" { yyval = yyvsp[0]; } -#line 10499 "parser.c" +#line 10464 "parser.c" break; case 973: /* open_option: %empty */ -#line 5258 "parser.y" +#line 5266 "parser.y" { yyval = NULL; } -#line 10505 "parser.c" +#line 10470 "parser.c" break; case 974: /* open_option: _with NO REWIND */ -#line 5259 "parser.y" +#line 5267 "parser.y" { yyval = NULL; } -#line 10511 "parser.c" +#line 10476 "parser.c" break; case 975: /* open_option: _with LOCK */ -#line 5260 "parser.y" +#line 5268 "parser.y" { PENDING ("OPEN ... WITH LOCK"); } -#line 10517 "parser.c" +#line 10482 "parser.c" break; case 976: /* $@70: %empty */ -#line 5272 "parser.y" +#line 5280 "parser.y" { BEGIN_STATEMENT ("PERFORM", TERM_PERFORM); } -#line 10523 "parser.c" +#line 10488 "parser.c" break; case 978: /* perform_body: perform_procedure perform_option */ -#line 5278 "parser.y" +#line 5286 "parser.y" { cb_emit_perform (yyvsp[0], yyvsp[-1]); } -#line 10531 "parser.c" +#line 10496 "parser.c" break; case 979: /* $@71: %empty */ -#line 5282 "parser.y" +#line 5290 "parser.y" { perform_stack = cb_cons (yyvsp[0], perform_stack); check_unreached = 0; } -#line 10540 "parser.c" +#line 10505 "parser.c" break; case 980: /* perform_body: perform_option $@71 statement_list end_perform */ -#line 5287 "parser.y" +#line 5295 "parser.y" { perform_stack = CB_CHAIN (perform_stack); cb_emit_perform (yyvsp[-3], yyvsp[-1]); } -#line 10549 "parser.c" +#line 10514 "parser.c" break; case 981: /* perform_body: perform_option "END-PERFORM" */ -#line 5292 "parser.y" +#line 5300 "parser.y" { cb_emit_perform (yyvsp[-1], NULL); } -#line 10557 "parser.c" +#line 10522 "parser.c" break; case 982: /* end_perform: %empty */ -#line 5298 "parser.y" +#line 5306 "parser.y" { terminator_error (); } -#line 10563 "parser.c" +#line 10528 "parser.c" break; case 983: /* end_perform: "END-PERFORM" */ -#line 5299 "parser.y" +#line 5307 "parser.y" { terminator_clear (TERM_PERFORM); } -#line 10569 "parser.c" +#line 10534 "parser.c" break; case 984: /* perform_procedure: procedure_name */ -#line 5304 "parser.y" +#line 5312 "parser.y" { CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $1 */ yyval = cb_build_pair (yyvsp[0], yyvsp[0]); } -#line 10578 "parser.c" +#line 10543 "parser.c" break; case 985: /* perform_procedure: procedure_name THRU procedure_name */ -#line 5309 "parser.y" +#line 5317 "parser.y" { CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $3 */ yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 10587 "parser.c" +#line 10552 "parser.c" break; case 986: /* perform_option: %empty */ -#line 5317 "parser.y" +#line 5325 "parser.y" { yyval = cb_build_perform_once (NULL); } -#line 10595 "parser.c" +#line 10560 "parser.c" break; case 987: /* perform_option: FOREVER */ -#line 5321 "parser.y" +#line 5329 "parser.y" { yyval = cb_build_perform_forever (NULL); } -#line 10603 "parser.c" +#line 10568 "parser.c" break; case 988: /* perform_option: id_or_lit_or_func TIMES */ -#line 5325 "parser.y" +#line 5333 "parser.y" { yyval = cb_build_perform_times (yyvsp[-1]); current_program->loop_counter++; } -#line 10612 "parser.c" +#line 10577 "parser.c" break; case 989: /* perform_option: perform_test UNTIL condition */ -#line 5330 "parser.y" +#line 5338 "parser.y" { cb_tree varying; varying = cb_list_init (cb_build_perform_varying (NULL, NULL, NULL, yyvsp[0])); yyval = cb_build_perform_until (yyvsp[-2], varying); } -#line 10623 "parser.c" +#line 10588 "parser.c" break; case 990: /* perform_option: perform_test VARYING perform_varying_list */ -#line 5337 "parser.y" +#line 5345 "parser.y" { yyval = cb_build_perform_until (yyvsp[-2], yyvsp[0]); } -#line 10631 "parser.c" +#line 10596 "parser.c" break; case 991: /* perform_test: %empty */ -#line 5343 "parser.y" +#line 5351 "parser.y" { yyval = CB_BEFORE; } -#line 10637 "parser.c" +#line 10602 "parser.c" break; case 992: /* perform_test: _with TEST before_or_after */ -#line 5344 "parser.y" +#line 5352 "parser.y" { yyval = yyvsp[0]; } -#line 10643 "parser.c" +#line 10608 "parser.c" break; case 993: /* perform_varying_list: perform_varying */ -#line 5348 "parser.y" +#line 5356 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 10649 "parser.c" +#line 10614 "parser.c" break; case 994: /* perform_varying_list: perform_varying_list AFTER perform_varying */ -#line 5350 "parser.y" +#line 5358 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 10655 "parser.c" +#line 10620 "parser.c" break; case 995: /* perform_varying: identifier FROM x BY x UNTIL condition */ -#line 5355 "parser.y" +#line 5363 "parser.y" { yyval = cb_build_perform_varying (yyvsp[-6], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10663 "parser.c" +#line 10628 "parser.c" break; case 996: /* $@72: %empty */ -#line 5366 "parser.y" +#line 5374 "parser.y" { BEGIN_STATEMENT ("READ", TERM_READ); } -#line 10669 "parser.c" +#line 10634 "parser.c" break; case 997: /* read_statement: READ $@72 file_name flag_next _record read_into with_lock read_key read_handler end_read */ -#line 5369 "parser.y" +#line 5377 "parser.y" { if (yyvsp[-7] != cb_error_node) { if (cb_use_invalidkey_handler_on_status34 && @@ -10693,145 +10658,145 @@ yyparse (void) } } } -#line 10697 "parser.c" +#line 10662 "parser.c" break; case 998: /* read_into: %empty */ -#line 5395 "parser.y" +#line 5403 "parser.y" { yyval = NULL; } -#line 10703 "parser.c" +#line 10668 "parser.c" break; case 999: /* read_into: INTO identifier */ -#line 5396 "parser.y" +#line 5404 "parser.y" { yyval = yyvsp[0]; } -#line 10709 "parser.c" +#line 10674 "parser.c" break; case 1000: /* with_lock: %empty */ -#line 5400 "parser.y" +#line 5408 "parser.y" { yyval = NULL; } -#line 10715 "parser.c" +#line 10680 "parser.c" break; case 1001: /* with_lock: IGNORING LOCK */ -#line 5402 "parser.y" +#line 5410 "parser.y" { yyval = cb_int3; } -#line 10723 "parser.c" +#line 10688 "parser.c" break; case 1002: /* with_lock: _with LOCK */ -#line 5406 "parser.y" +#line 5414 "parser.y" { yyval = cb_int1; } -#line 10731 "parser.c" +#line 10696 "parser.c" break; case 1003: /* with_lock: _with NO LOCK */ -#line 5410 "parser.y" +#line 5418 "parser.y" { yyval = cb_int2; } -#line 10739 "parser.c" +#line 10704 "parser.c" break; case 1004: /* with_lock: _with IGNORE LOCK */ -#line 5414 "parser.y" +#line 5422 "parser.y" { yyval = cb_int3; } -#line 10747 "parser.c" +#line 10712 "parser.c" break; case 1005: /* with_lock: _with WAIT */ -#line 5418 "parser.y" +#line 5426 "parser.y" { yyval = cb_int4; } -#line 10755 "parser.c" +#line 10720 "parser.c" break; case 1006: /* read_key: %empty */ -#line 5424 "parser.y" +#line 5432 "parser.y" { yyval = NULL; } -#line 10761 "parser.c" +#line 10726 "parser.c" break; case 1007: /* read_key: KEY _is identifier_list */ -#line 5426 "parser.y" +#line 5434 "parser.y" { yyval = yyvsp[0]; } -#line 10769 "parser.c" +#line 10734 "parser.c" break; case 1011: /* end_read: %empty */ -#line 5437 "parser.y" +#line 5445 "parser.y" { terminator_warning (TERM_READ); } -#line 10775 "parser.c" +#line 10740 "parser.c" break; case 1012: /* end_read: "END-READ" */ -#line 5438 "parser.y" +#line 5446 "parser.y" { terminator_clear (TERM_READ); } -#line 10781 "parser.c" +#line 10746 "parser.c" break; case 1013: /* $@73: %empty */ -#line 5447 "parser.y" +#line 5455 "parser.y" { BEGIN_STATEMENT ("RELEASE", 0); } -#line 10787 "parser.c" +#line 10752 "parser.c" break; case 1014: /* release_statement: RELEASE $@73 record_name write_from */ -#line 5449 "parser.y" +#line 5457 "parser.y" { if (yyvsp[-1] != cb_error_node) { cb_emit_release (yyvsp[-1], yyvsp[0]); } } -#line 10797 "parser.c" +#line 10762 "parser.c" break; case 1015: /* $@74: %empty */ -#line 5462 "parser.y" +#line 5470 "parser.y" { BEGIN_STATEMENT ("RETURN", TERM_RETURN); } -#line 10803 "parser.c" +#line 10768 "parser.c" break; case 1016: /* return_statement: RETURN $@74 file_name _record read_into at_end end_return */ -#line 5465 "parser.y" +#line 5473 "parser.y" { if (yyvsp[-4] != cb_error_node) { cb_emit_return (yyvsp[-4], yyvsp[-2]); } } -#line 10813 "parser.c" +#line 10778 "parser.c" break; case 1017: /* end_return: %empty */ -#line 5473 "parser.y" +#line 5481 "parser.y" { terminator_warning (TERM_RETURN); } -#line 10819 "parser.c" +#line 10784 "parser.c" break; case 1018: /* end_return: "END-RETURN" */ -#line 5474 "parser.y" +#line 5482 "parser.y" { terminator_clear (TERM_RETURN); } -#line 10825 "parser.c" +#line 10790 "parser.c" break; case 1019: /* $@75: %empty */ -#line 5483 "parser.y" +#line 5491 "parser.y" { BEGIN_STATEMENT ("REWRITE", TERM_REWRITE); } -#line 10831 "parser.c" +#line 10796 "parser.c" break; case 1020: /* rewrite_statement: REWRITE $@75 record_name write_from write_lock opt_invalid_key end_rewrite */ -#line 5486 "parser.y" +#line 5494 "parser.y" { if (yyvsp[-4] != cb_error_node) { if (cb_use_invalidkey_handler_on_status34 && @@ -10843,238 +10808,238 @@ yyparse (void) cb_emit_rewrite (yyvsp[-4], yyvsp[-3], yyvsp[-2]); } } -#line 10847 "parser.c" +#line 10812 "parser.c" break; case 1021: /* write_lock: %empty */ -#line 5500 "parser.y" +#line 5508 "parser.y" { yyval = NULL; } -#line 10853 "parser.c" +#line 10818 "parser.c" break; case 1022: /* write_lock: _with LOCK */ -#line 5502 "parser.y" +#line 5510 "parser.y" { yyval = cb_int1; } -#line 10861 "parser.c" +#line 10826 "parser.c" break; case 1023: /* write_lock: _with NO LOCK */ -#line 5506 "parser.y" +#line 5514 "parser.y" { yyval = cb_int2; } -#line 10869 "parser.c" +#line 10834 "parser.c" break; case 1024: /* end_rewrite: %empty */ -#line 5512 "parser.y" +#line 5520 "parser.y" { terminator_warning (TERM_REWRITE); } -#line 10875 "parser.c" +#line 10840 "parser.c" break; case 1025: /* end_rewrite: "END-REWRITE" */ -#line 5513 "parser.y" +#line 5521 "parser.y" { terminator_clear (TERM_REWRITE); } -#line 10881 "parser.c" +#line 10846 "parser.c" break; case 1026: /* rollback_statement: ROLLBACK */ -#line 5523 "parser.y" +#line 5531 "parser.y" { BEGIN_STATEMENT ("ROLLBACK", 0); cb_emit_rollback (); } -#line 10890 "parser.c" +#line 10855 "parser.c" break; case 1027: /* $@76: %empty */ -#line 5535 "parser.y" +#line 5543 "parser.y" { BEGIN_STATEMENT ("SEARCH", TERM_SEARCH); } -#line 10896 "parser.c" +#line 10861 "parser.c" break; case 1029: /* search_body: table_name search_varying search_at_end search_whens */ -#line 5542 "parser.y" +#line 5550 "parser.y" { cb_emit_search (yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10904 "parser.c" +#line 10869 "parser.c" break; case 1030: /* $@77: %empty */ -#line 5546 "parser.y" +#line 5554 "parser.y" { check_unreached = 0; } -#line 10912 "parser.c" +#line 10877 "parser.c" break; case 1031: /* search_body: ALL table_name search_at_end WHEN expr $@77 statement_list */ -#line 5550 "parser.y" +#line 5558 "parser.y" { cb_emit_search_all (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10920 "parser.c" +#line 10885 "parser.c" break; case 1032: /* search_varying: %empty */ -#line 5556 "parser.y" +#line 5564 "parser.y" { yyval = NULL; } -#line 10926 "parser.c" +#line 10891 "parser.c" break; case 1033: /* search_varying: VARYING identifier */ -#line 5557 "parser.y" +#line 5565 "parser.y" { yyval = yyvsp[0]; } -#line 10932 "parser.c" +#line 10897 "parser.c" break; case 1034: /* search_at_end: %empty */ -#line 5561 "parser.y" +#line 5569 "parser.y" { yyval = NULL; } -#line 10938 "parser.c" +#line 10903 "parser.c" break; case 1035: /* $@78: %empty */ -#line 5563 "parser.y" +#line 5571 "parser.y" { check_unreached = 0; } -#line 10946 "parser.c" +#line 10911 "parser.c" break; case 1036: /* search_at_end: _at END $@78 statement_list */ -#line 5567 "parser.y" +#line 5575 "parser.y" { yyval = yyvsp[0]; } -#line 10954 "parser.c" +#line 10919 "parser.c" break; case 1037: /* search_whens: search_when */ -#line 5573 "parser.y" +#line 5581 "parser.y" { yyval = yyvsp[0]; } -#line 10960 "parser.c" +#line 10925 "parser.c" break; case 1038: /* search_whens: search_when search_whens */ -#line 5574 "parser.y" +#line 5582 "parser.y" { yyval = yyvsp[-1]; CB_IF (yyvsp[-1])->stmt2 = yyvsp[0]; } -#line 10966 "parser.c" +#line 10931 "parser.c" break; case 1039: /* $@79: %empty */ -#line 5579 "parser.y" +#line 5587 "parser.y" { check_unreached = 0; } -#line 10974 "parser.c" +#line 10939 "parser.c" break; case 1040: /* search_when: WHEN condition $@79 statement_list */ -#line 5583 "parser.y" +#line 5591 "parser.y" { yyval = cb_build_if (yyvsp[-2], yyvsp[0], NULL); } -#line 10982 "parser.c" +#line 10947 "parser.c" break; case 1041: /* end_search: %empty */ -#line 5589 "parser.y" +#line 5597 "parser.y" { terminator_warning (TERM_SEARCH); } -#line 10988 "parser.c" +#line 10953 "parser.c" break; case 1042: /* end_search: "END-SEARCH" */ -#line 5590 "parser.y" +#line 5598 "parser.y" { terminator_clear (TERM_SEARCH); } -#line 10994 "parser.c" +#line 10959 "parser.c" break; case 1043: /* $@80: %empty */ -#line 5599 "parser.y" +#line 5607 "parser.y" { BEGIN_STATEMENT ("SET", 0); } -#line 11000 "parser.c" +#line 10965 "parser.c" break; case 1050: /* set_environment: ENVIRONMENT simple_value TO simple_value */ -#line 5615 "parser.y" +#line 5623 "parser.y" { cb_emit_setenv (yyvsp[-2], yyvsp[0]); } -#line 11008 "parser.c" +#line 10973 "parser.c" break; case 1051: /* set_to: target_x_list TO ENTRY alnum_or_id */ -#line 5624 "parser.y" +#line 5632 "parser.y" { cb_emit_set_to (yyvsp[-3], cb_build_ppointer (yyvsp[0])); } -#line 11016 "parser.c" +#line 10981 "parser.c" break; case 1052: /* set_to: target_x_list TO x */ -#line 5628 "parser.y" +#line 5636 "parser.y" { cb_emit_set_to (yyvsp[-2], yyvsp[0]); } -#line 11024 "parser.c" +#line 10989 "parser.c" break; case 1053: /* set_up_down: target_x_list up_or_down BY x */ -#line 5637 "parser.y" +#line 5645 "parser.y" { cb_emit_set_up_down (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 11032 "parser.c" +#line 10997 "parser.c" break; case 1054: /* up_or_down: UP */ -#line 5643 "parser.y" +#line 5651 "parser.y" { yyval = cb_int0; } -#line 11038 "parser.c" +#line 11003 "parser.c" break; case 1055: /* up_or_down: DOWN */ -#line 5644 "parser.y" +#line 5652 "parser.y" { yyval = cb_int1; } -#line 11044 "parser.c" +#line 11009 "parser.c" break; case 1058: /* set_to_on_off: mnemonic_name_list TO on_or_off */ -#line 5656 "parser.y" +#line 5664 "parser.y" { cb_emit_set_on_off (yyvsp[-2], yyvsp[0]); } -#line 11052 "parser.c" +#line 11017 "parser.c" break; case 1061: /* set_to_true_false: target_x_list TO "TRUE" */ -#line 5670 "parser.y" +#line 5678 "parser.y" { cb_emit_set_true (yyvsp[-2]); } -#line 11060 "parser.c" +#line 11025 "parser.c" break; case 1062: /* set_to_true_false: target_x_list TO "FALSE" */ -#line 5674 "parser.y" +#line 5682 "parser.y" { cb_emit_set_false (yyvsp[-2]); } -#line 11068 "parser.c" +#line 11033 "parser.c" break; case 1063: /* $@81: %empty */ -#line 5685 "parser.y" +#line 5693 "parser.y" { BEGIN_STATEMENT ("SORT", 0); } -#line 11074 "parser.c" +#line 11039 "parser.c" break; case 1065: /* $@82: %empty */ -#line 5691 "parser.y" +#line 5699 "parser.y" { cb_emit_sort_init (yyvsp[-3], yyvsp[-2], yyvsp[0]); if (CB_FILE_P (cb_ref (yyvsp[-3])) && yyvsp[-2] == NULL) { @@ -11083,27 +11048,27 @@ yyparse (void) /* used in sort_input/sort_output */ save_tree_1 = yyvsp[-3]; } -#line 11087 "parser.c" +#line 11052 "parser.c" break; case 1066: /* sort_body: qualified_word sort_key_list sort_duplicates sort_collating $@82 sort_input sort_output */ -#line 5700 "parser.y" +#line 5708 "parser.y" { cb_emit_sort_finish (yyvsp[-6]); } -#line 11095 "parser.c" +#line 11060 "parser.c" break; case 1067: /* sort_key_list: %empty */ -#line 5707 "parser.y" +#line 5715 "parser.y" { yyval = NULL; } -#line 11103 "parser.c" +#line 11068 "parser.c" break; case 1068: /* sort_key_list: sort_key_list _on ascending_or_descending _key _is opt_key_list */ -#line 5712 "parser.y" +#line 5720 "parser.y" { cb_tree l; @@ -11120,51 +11085,51 @@ yyparse (void) yyval = cb_list_append (yyvsp[-5], yyvsp[0]); } } -#line 11124 "parser.c" +#line 11089 "parser.c" break; case 1069: /* opt_key_list: %empty */ -#line 5731 "parser.y" +#line 5739 "parser.y" { yyval = NULL; } -#line 11130 "parser.c" +#line 11095 "parser.c" break; case 1070: /* opt_key_list: opt_key_list qualified_word */ -#line 5732 "parser.y" +#line 5740 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11136 "parser.c" +#line 11101 "parser.c" break; case 1072: /* sort_duplicates: with_dups _in_order */ -#line 5736 "parser.y" +#line 5744 "parser.y" { /* nothing */ } -#line 11142 "parser.c" +#line 11107 "parser.c" break; case 1073: /* sort_collating: %empty */ -#line 5740 "parser.y" +#line 5748 "parser.y" { yyval = cb_null; } -#line 11148 "parser.c" +#line 11113 "parser.c" break; case 1074: /* sort_collating: coll_sequence _is reference */ -#line 5741 "parser.y" +#line 5749 "parser.y" { yyval = cb_ref (yyvsp[0]); } -#line 11154 "parser.c" +#line 11119 "parser.c" break; case 1075: /* sort_input: %empty */ -#line 5746 "parser.y" +#line 5754 "parser.y" { if (CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("File sort requires USING or INPUT PROCEDURE")); } } -#line 11164 "parser.c" +#line 11129 "parser.c" break; case 1076: /* sort_input: USING file_name_list */ -#line 5752 "parser.y" +#line 5760 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("USING invalid with table SORT")); @@ -11172,11 +11137,11 @@ yyparse (void) cb_emit_sort_using (save_tree_1, yyvsp[0]); } } -#line 11176 "parser.c" +#line 11141 "parser.c" break; case 1077: /* sort_input: INPUT PROCEDURE _is perform_procedure */ -#line 5760 "parser.y" +#line 5768 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("INPUT PROCEDURE invalid with table SORT")); @@ -11184,21 +11149,21 @@ yyparse (void) cb_emit_sort_input (yyvsp[0], save_tree_1); } } -#line 11188 "parser.c" +#line 11153 "parser.c" break; case 1078: /* sort_output: %empty */ -#line 5771 "parser.y" +#line 5779 "parser.y" { if (CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("File sort requires GIVING or OUTPUT PROCEDURE")); } } -#line 11198 "parser.c" +#line 11163 "parser.c" break; case 1079: /* sort_output: GIVING file_name_list */ -#line 5777 "parser.y" +#line 5785 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("GIVING invalid with table SORT")); @@ -11206,11 +11171,11 @@ yyparse (void) cb_emit_sort_giving (save_tree_1, yyvsp[0]); } } -#line 11210 "parser.c" +#line 11175 "parser.c" break; case 1080: /* sort_output: OUTPUT PROCEDURE _is perform_procedure */ -#line 5785 "parser.y" +#line 5793 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("OUTPUT PROCEDURE invalid with table SORT")); @@ -11218,23 +11183,23 @@ yyparse (void) cb_emit_sort_output (yyvsp[0], save_tree_1); } } -#line 11222 "parser.c" +#line 11187 "parser.c" break; case 1081: /* $@83: %empty */ -#line 5800 "parser.y" +#line 5808 "parser.y" { BEGIN_STATEMENT ("START", TERM_START); } -#line 11228 "parser.c" +#line 11193 "parser.c" break; case 1082: /* @84: %empty */ -#line 5801 "parser.y" +#line 5809 "parser.y" { yyval = cb_int (COB_EQ); } -#line 11234 "parser.c" +#line 11199 "parser.c" break; case 1083: /* start_statement: START $@83 file_name @84 start_key opt_invalid_key end_start */ -#line 5804 "parser.y" +#line 5812 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[-4]))) { if (CB_FILE (cb_ref (yyvsp[-4]))->organization != COB_ORG_INDEXED && @@ -11249,394 +11214,394 @@ yyparse (void) yyval = cb_error_node; } } -#line 11253 "parser.c" +#line 11218 "parser.c" break; case 1084: /* start_key: %empty */ -#line 5821 "parser.y" +#line 5829 "parser.y" { yyval = NULL; } -#line 11259 "parser.c" +#line 11224 "parser.c" break; case 1085: /* start_key: KEY _is start_op identifier_list */ -#line 5823 "parser.y" +#line 5831 "parser.y" { yyvsp[-4] = yyvsp[-1]; yyval = yyvsp[0]; } -#line 11268 "parser.c" +#line 11233 "parser.c" break; case 1086: /* start_op: flag_not eq */ -#line 5830 "parser.y" +#line 5838 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_NE : COB_EQ); } -#line 11274 "parser.c" +#line 11239 "parser.c" break; case 1087: /* start_op: flag_not gt */ -#line 5831 "parser.y" +#line 5839 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LE : COB_GT); } -#line 11280 "parser.c" +#line 11245 "parser.c" break; case 1088: /* start_op: flag_not lt */ -#line 5832 "parser.y" +#line 5840 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GE : COB_LT); } -#line 11286 "parser.c" +#line 11251 "parser.c" break; case 1089: /* start_op: flag_not ge */ -#line 5833 "parser.y" +#line 5841 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LT : COB_GE); } -#line 11292 "parser.c" +#line 11257 "parser.c" break; case 1090: /* start_op: flag_not le */ -#line 5834 "parser.y" +#line 5842 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GT : COB_LE); } -#line 11298 "parser.c" +#line 11263 "parser.c" break; case 1091: /* end_start: %empty */ -#line 5838 "parser.y" +#line 5846 "parser.y" { terminator_warning (TERM_START); } -#line 11304 "parser.c" +#line 11269 "parser.c" break; case 1092: /* end_start: "END-START" */ -#line 5839 "parser.y" +#line 5847 "parser.y" { terminator_clear (TERM_START); } -#line 11310 "parser.c" +#line 11275 "parser.c" break; case 1093: /* $@85: %empty */ -#line 5848 "parser.y" +#line 5856 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11316 "parser.c" +#line 11281 "parser.c" break; case 1094: /* stop_statement: STOP RUN $@85 stop_returning */ -#line 5850 "parser.y" +#line 5858 "parser.y" { cb_emit_stop_run (yyvsp[0]); } -#line 11324 "parser.c" +#line 11289 "parser.c" break; case 1095: /* $@86: %empty */ -#line 5853 "parser.y" +#line 5861 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11330 "parser.c" +#line 11295 "parser.c" break; case 1096: /* stop_statement: STOP "Literal" $@86 */ -#line 5854 "parser.y" +#line 5862 "parser.y" { cb_verify (cb_stop_literal_statement, "STOP literal"); } -#line 11338 "parser.c" +#line 11303 "parser.c" break; case 1097: /* stop_returning: %empty */ -#line 5860 "parser.y" +#line 5868 "parser.y" { yyval = current_program->cb_return_code; } -#line 11344 "parser.c" +#line 11309 "parser.c" break; case 1098: /* stop_returning: RETURNING x */ -#line 5861 "parser.y" +#line 5869 "parser.y" { yyval = yyvsp[0]; } -#line 11350 "parser.c" +#line 11315 "parser.c" break; case 1099: /* stop_returning: GIVING x */ -#line 5862 "parser.y" +#line 5870 "parser.y" { yyval = yyvsp[0]; } -#line 11356 "parser.c" +#line 11321 "parser.c" break; case 1100: /* $@87: %empty */ -#line 5871 "parser.y" +#line 5879 "parser.y" { BEGIN_STATEMENT ("STRING", TERM_STRING); } -#line 11362 "parser.c" +#line 11327 "parser.c" break; case 1101: /* string_statement: STRING $@87 string_item_list INTO identifier opt_with_pointer on_overflow end_string */ -#line 5874 "parser.y" +#line 5882 "parser.y" { cb_emit_string (yyvsp[-5], yyvsp[-3], yyvsp[-2]); } -#line 11370 "parser.c" +#line 11335 "parser.c" break; case 1102: /* string_item_list: string_item */ -#line 5880 "parser.y" +#line 5888 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11376 "parser.c" +#line 11341 "parser.c" break; case 1103: /* string_item_list: string_item_list string_item */ -#line 5881 "parser.y" +#line 5889 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11382 "parser.c" +#line 11347 "parser.c" break; case 1104: /* string_item: x */ -#line 5885 "parser.y" +#line 5893 "parser.y" { yyval = yyvsp[0]; } -#line 11388 "parser.c" +#line 11353 "parser.c" break; case 1105: /* string_item: DELIMITED _by SIZE */ -#line 5886 "parser.y" +#line 5894 "parser.y" { yyval = cb_build_pair (cb_int0, NULL); } -#line 11394 "parser.c" +#line 11359 "parser.c" break; case 1106: /* string_item: DELIMITED _by x */ -#line 5887 "parser.y" +#line 5895 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 11400 "parser.c" +#line 11365 "parser.c" break; case 1107: /* opt_with_pointer: %empty */ -#line 5891 "parser.y" +#line 5899 "parser.y" { yyval = cb_int0; } -#line 11406 "parser.c" +#line 11371 "parser.c" break; case 1108: /* opt_with_pointer: _with POINTER identifier */ -#line 5892 "parser.y" +#line 5900 "parser.y" { yyval = yyvsp[0]; } -#line 11412 "parser.c" +#line 11377 "parser.c" break; case 1109: /* end_string: %empty */ -#line 5896 "parser.y" +#line 5904 "parser.y" { terminator_warning (TERM_STRING); } -#line 11418 "parser.c" +#line 11383 "parser.c" break; case 1110: /* end_string: "END-STRING" */ -#line 5897 "parser.y" +#line 5905 "parser.y" { terminator_clear (TERM_STRING); } -#line 11424 "parser.c" +#line 11389 "parser.c" break; case 1111: /* $@88: %empty */ -#line 5906 "parser.y" +#line 5914 "parser.y" { BEGIN_STATEMENT ("SUBTRACT", TERM_SUBTRACT); } -#line 11430 "parser.c" +#line 11395 "parser.c" break; case 1113: /* subtract_body: x_list FROM arithmetic_x_list on_size_error */ -#line 5913 "parser.y" +#line 5921 "parser.y" { cb_emit_arithmetic (yyvsp[-1], '-', cb_build_binary_list (yyvsp[-3], '+')); } -#line 11438 "parser.c" +#line 11403 "parser.c" break; case 1114: /* subtract_body: x_list FROM x GIVING arithmetic_x_list on_size_error */ -#line 5917 "parser.y" +#line 5925 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (cb_cons (yyvsp[-3], yyvsp[-5]), '-')); } -#line 11446 "parser.c" +#line 11411 "parser.c" break; case 1115: /* subtract_body: CORRESPONDING identifier FROM identifier flag_rounded on_size_error */ -#line 5921 "parser.y" +#line 5929 "parser.y" { cb_emit_corresponding (cb_build_sub, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 11454 "parser.c" +#line 11419 "parser.c" break; case 1116: /* end_subtract: %empty */ -#line 5927 "parser.y" +#line 5935 "parser.y" { terminator_warning (TERM_SUBTRACT); } -#line 11460 "parser.c" +#line 11425 "parser.c" break; case 1117: /* end_subtract: "END-SUBTRACT" */ -#line 5928 "parser.y" +#line 5936 "parser.y" { terminator_clear (TERM_SUBTRACT); } -#line 11466 "parser.c" +#line 11431 "parser.c" break; case 1118: /* suppress_statement: SUPPRESS _printing */ -#line 5938 "parser.y" +#line 5946 "parser.y" { BEGIN_STATEMENT ("SUPPRESS", 0); PENDING("SUPPRESS"); } -#line 11475 "parser.c" +#line 11440 "parser.c" break; case 1121: /* $@89: %empty */ -#line 5953 "parser.y" +#line 5961 "parser.y" { BEGIN_STATEMENT ("TERMINATE", 0); } -#line 11481 "parser.c" +#line 11446 "parser.c" break; case 1122: /* terminate_statement: TERMINATE $@89 identifier_list */ -#line 5955 "parser.y" +#line 5963 "parser.y" { PENDING("TERMINATE"); } -#line 11489 "parser.c" +#line 11454 "parser.c" break; case 1123: /* $@90: %empty */ -#line 5966 "parser.y" +#line 5974 "parser.y" { BEGIN_STATEMENT ("TRANSFORM", 0); } -#line 11495 "parser.c" +#line 11460 "parser.c" break; case 1124: /* transform_statement: TRANSFORM $@90 identifier FROM simple_value TO simple_all_value */ -#line 5968 "parser.y" +#line 5976 "parser.y" { cb_tree x; x = cb_build_converting (yyvsp[-2], yyvsp[0], cb_build_inspect_region_start ()); cb_emit_inspect (yyvsp[-4], x, cb_int0, 2); } -#line 11506 "parser.c" +#line 11471 "parser.c" break; case 1125: /* $@91: %empty */ -#line 5982 "parser.y" +#line 5990 "parser.y" { BEGIN_STATEMENT ("UNLOCK", 0); } -#line 11512 "parser.c" +#line 11477 "parser.c" break; case 1126: /* unlock_statement: UNLOCK $@91 file_name opt_record */ -#line 5984 "parser.y" +#line 5992 "parser.y" { if (yyvsp[-1] != cb_error_node) { cb_emit_unlock (yyvsp[-1]); } } -#line 11522 "parser.c" +#line 11487 "parser.c" break; case 1130: /* $@92: %empty */ -#line 6003 "parser.y" +#line 6011 "parser.y" { BEGIN_STATEMENT ("UNSTRING", TERM_UNSTRING); } -#line 11528 "parser.c" +#line 11493 "parser.c" break; case 1131: /* unstring_statement: UNSTRING $@92 identifier unstring_delimited unstring_into opt_with_pointer unstring_tallying on_overflow end_unstring */ -#line 6007 "parser.y" +#line 6015 "parser.y" { cb_emit_unstring (yyvsp[-6], yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2]); } -#line 11536 "parser.c" +#line 11501 "parser.c" break; case 1132: /* unstring_delimited: %empty */ -#line 6013 "parser.y" +#line 6021 "parser.y" { yyval = NULL; } -#line 11542 "parser.c" +#line 11507 "parser.c" break; case 1133: /* unstring_delimited: DELIMITED _by unstring_delimited_list */ -#line 6015 "parser.y" +#line 6023 "parser.y" { yyval = yyvsp[0]; } -#line 11548 "parser.c" +#line 11513 "parser.c" break; case 1134: /* unstring_delimited_list: unstring_delimited_item */ -#line 6019 "parser.y" +#line 6027 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11554 "parser.c" +#line 11519 "parser.c" break; case 1135: /* unstring_delimited_list: unstring_delimited_list OR unstring_delimited_item */ -#line 6021 "parser.y" +#line 6029 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 11560 "parser.c" +#line 11525 "parser.c" break; case 1136: /* unstring_delimited_item: flag_all simple_value */ -#line 6026 "parser.y" +#line 6034 "parser.y" { yyval = cb_build_unstring_delimited (yyvsp[-1], yyvsp[0]); } -#line 11568 "parser.c" +#line 11533 "parser.c" break; case 1137: /* unstring_into: INTO unstring_into_item */ -#line 6032 "parser.y" +#line 6040 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11574 "parser.c" +#line 11539 "parser.c" break; case 1138: /* unstring_into: unstring_into unstring_into_item */ -#line 6034 "parser.y" +#line 6042 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11580 "parser.c" +#line 11545 "parser.c" break; case 1139: /* unstring_into_item: identifier unstring_into_delimiter unstring_into_count */ -#line 6039 "parser.y" +#line 6047 "parser.y" { yyval = cb_build_unstring_into (yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 11588 "parser.c" +#line 11553 "parser.c" break; case 1140: /* unstring_into_delimiter: %empty */ -#line 6045 "parser.y" +#line 6053 "parser.y" { yyval = NULL; } -#line 11594 "parser.c" +#line 11559 "parser.c" break; case 1141: /* unstring_into_delimiter: DELIMITER _in identifier */ -#line 6046 "parser.y" +#line 6054 "parser.y" { yyval = yyvsp[0]; } -#line 11600 "parser.c" +#line 11565 "parser.c" break; case 1142: /* unstring_into_count: %empty */ -#line 6050 "parser.y" +#line 6058 "parser.y" { yyval = NULL; } -#line 11606 "parser.c" +#line 11571 "parser.c" break; case 1143: /* unstring_into_count: COUNT _in identifier */ -#line 6051 "parser.y" +#line 6059 "parser.y" { yyval = yyvsp[0]; } -#line 11612 "parser.c" +#line 11577 "parser.c" break; case 1144: /* unstring_tallying: %empty */ -#line 6055 "parser.y" +#line 6063 "parser.y" { yyval = NULL; } -#line 11618 "parser.c" +#line 11583 "parser.c" break; case 1145: /* unstring_tallying: TALLYING _in identifier */ -#line 6056 "parser.y" +#line 6064 "parser.y" { yyval = yyvsp[0]; } -#line 11624 "parser.c" +#line 11589 "parser.c" break; case 1146: /* end_unstring: %empty */ -#line 6060 "parser.y" +#line 6068 "parser.y" { terminator_warning (TERM_UNSTRING); } -#line 11630 "parser.c" +#line 11595 "parser.c" break; case 1147: /* end_unstring: "END-UNSTRING" */ -#line 6061 "parser.y" +#line 6069 "parser.y" { terminator_clear (TERM_UNSTRING); } -#line 11636 "parser.c" +#line 11601 "parser.c" break; case 1151: /* use_exception: USE use_global _after _standard exception_or_error _procedure _on use_exception_target */ -#line 6079 "parser.y" +#line 6087 "parser.y" { if (!in_declaratives) { cb_error (_("USE statement must be within DECLARATIVES")); @@ -11654,28 +11619,28 @@ yyparse (void) } } } -#line 11658 "parser.c" +#line 11623 "parser.c" break; case 1152: /* use_global: %empty */ -#line 6100 "parser.y" +#line 6108 "parser.y" { use_global_ind = 0; } -#line 11666 "parser.c" +#line 11631 "parser.c" break; case 1153: /* use_global: GLOBAL */ -#line 6104 "parser.y" +#line 6112 "parser.y" { use_global_ind = 1; current_program->flag_global_use = 1; } -#line 11675 "parser.c" +#line 11640 "parser.c" break; case 1154: /* use_exception_target: file_name_list */ -#line 6112 "parser.y" +#line 6120 "parser.y" { cb_tree l; @@ -11685,69 +11650,69 @@ yyparse (void) } } } -#line 11689 "parser.c" +#line 11654 "parser.c" break; case 1155: /* use_exception_target: INPUT */ -#line 6122 "parser.y" +#line 6130 "parser.y" { current_program->global_handler[COB_OPEN_INPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_INPUT].handler_prog = current_program; } -#line 11698 "parser.c" +#line 11663 "parser.c" break; case 1156: /* use_exception_target: OUTPUT */ -#line 6127 "parser.y" +#line 6135 "parser.y" { current_program->global_handler[COB_OPEN_OUTPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_OUTPUT].handler_prog = current_program; } -#line 11707 "parser.c" +#line 11672 "parser.c" break; case 1157: /* use_exception_target: "I-O" */ -#line 6132 "parser.y" +#line 6140 "parser.y" { current_program->global_handler[COB_OPEN_I_O].handler_label = current_section; current_program->global_handler[COB_OPEN_I_O].handler_prog = current_program; } -#line 11716 "parser.c" +#line 11681 "parser.c" break; case 1158: /* use_exception_target: EXTEND */ -#line 6137 "parser.y" +#line 6145 "parser.y" { current_program->global_handler[COB_OPEN_EXTEND].handler_label = current_section; current_program->global_handler[COB_OPEN_EXTEND].handler_prog = current_program; } -#line 11725 "parser.c" +#line 11690 "parser.c" break; case 1171: /* use_debugging: USE _for DEBUGGING _on use_debugging_target */ -#line 6169 "parser.y" +#line 6177 "parser.y" { PENDING ("USE FOR DEBUGGING"); } -#line 11733 "parser.c" +#line 11698 "parser.c" break; case 1174: /* use_reporting: USE use_global BEFORE REPORTING identifier */ -#line 6181 "parser.y" +#line 6189 "parser.y" { PENDING ("USE BEFORE REPORTING"); } -#line 11741 "parser.c" +#line 11706 "parser.c" break; case 1175: /* $@93: %empty */ -#line 6192 "parser.y" +#line 6200 "parser.y" { BEGIN_STATEMENT ("WRITE", TERM_WRITE); } -#line 11747 "parser.c" +#line 11712 "parser.c" break; case 1176: /* write_statement: WRITE $@93 record_name write_from write_lock write_option write_handler end_write */ -#line 6195 "parser.y" +#line 6203 "parser.y" { if (yyvsp[-5] != cb_error_node) { if (cb_use_invalidkey_handler_on_status34 && @@ -11759,759 +11724,759 @@ yyparse (void) cb_emit_write (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[-3]); } } -#line 11763 "parser.c" +#line 11728 "parser.c" break; case 1177: /* write_from: %empty */ -#line 6209 "parser.y" +#line 6217 "parser.y" { yyval = NULL; } -#line 11769 "parser.c" +#line 11734 "parser.c" break; case 1178: /* write_from: FROM id_or_lit */ -#line 6210 "parser.y" +#line 6218 "parser.y" { yyval = yyvsp[0]; } -#line 11775 "parser.c" +#line 11740 "parser.c" break; case 1179: /* write_option: %empty */ -#line 6215 "parser.y" +#line 6223 "parser.y" { yyval = cb_int0; } -#line 11783 "parser.c" +#line 11748 "parser.c" break; case 1180: /* write_option: before_or_after _advancing num_id_or_lit _line_or_lines */ -#line 6219 "parser.y" +#line 6227 "parser.y" { yyval = cb_build_write_advancing_lines (yyvsp[-3], yyvsp[-1]); } -#line 11791 "parser.c" +#line 11756 "parser.c" break; case 1181: /* write_option: before_or_after _advancing mnemonic_name */ -#line 6223 "parser.y" +#line 6231 "parser.y" { yyval = cb_build_write_advancing_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 11799 "parser.c" +#line 11764 "parser.c" break; case 1182: /* write_option: before_or_after _advancing PAGE */ -#line 6227 "parser.y" +#line 6235 "parser.y" { yyval = cb_build_write_advancing_page (yyvsp[-2]); } -#line 11807 "parser.c" +#line 11772 "parser.c" break; case 1183: /* before_or_after: BEFORE */ -#line 6233 "parser.y" +#line 6241 "parser.y" { yyval = CB_BEFORE; } -#line 11813 "parser.c" +#line 11778 "parser.c" break; case 1184: /* before_or_after: AFTER */ -#line 6234 "parser.y" +#line 6242 "parser.y" { yyval = CB_AFTER; } -#line 11819 "parser.c" +#line 11784 "parser.c" break; case 1188: /* end_write: %empty */ -#line 6243 "parser.y" +#line 6251 "parser.y" { terminator_warning (TERM_WRITE); } -#line 11825 "parser.c" +#line 11790 "parser.c" break; case 1189: /* end_write: "END-WRITE" */ -#line 6244 "parser.y" +#line 6252 "parser.y" { terminator_clear (TERM_WRITE); } -#line 11831 "parser.c" +#line 11796 "parser.c" break; case 1190: /* on_accp_exception: opt_on_exception opt_not_on_exception */ -#line 6259 "parser.y" +#line 6267 "parser.y" { current_statement->handler_id = COB_EC_IMP_ACCEPT; } -#line 11839 "parser.c" +#line 11804 "parser.c" break; case 1191: /* on_disp_exception: opt_on_exception opt_not_on_exception */ -#line 6267 "parser.y" +#line 6275 "parser.y" { current_statement->handler_id = COB_EC_IMP_DISPLAY; } -#line 11847 "parser.c" +#line 11812 "parser.c" break; case 1193: /* $@94: %empty */ -#line 6274 "parser.y" +#line 6282 "parser.y" { check_unreached = 0; } -#line 11855 "parser.c" +#line 11820 "parser.c" break; case 1194: /* opt_on_exception: EXCEPTION $@94 statement_list */ -#line 6278 "parser.y" +#line 6286 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11863 "parser.c" +#line 11828 "parser.c" break; case 1196: /* $@95: %empty */ -#line 6285 "parser.y" +#line 6293 "parser.y" { check_unreached = 0; } -#line 11871 "parser.c" +#line 11836 "parser.c" break; case 1197: /* opt_not_on_exception: "NOT EXCEPTION" $@95 statement_list */ -#line 6289 "parser.y" +#line 6297 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11879 "parser.c" +#line 11844 "parser.c" break; case 1200: /* $@96: %empty */ -#line 6305 "parser.y" +#line 6313 "parser.y" { check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11888 "parser.c" +#line 11853 "parser.c" break; case 1201: /* opt_on_size_error: "SIZE ERROR" $@96 statement_list */ -#line 6310 "parser.y" +#line 6318 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11896 "parser.c" +#line 11861 "parser.c" break; case 1203: /* $@97: %empty */ -#line 6317 "parser.y" +#line 6325 "parser.y" { check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11905 "parser.c" +#line 11870 "parser.c" break; case 1204: /* opt_not_on_size_error: "NOT SIZE ERROR" $@97 statement_list */ -#line 6322 "parser.y" +#line 6330 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11913 "parser.c" +#line 11878 "parser.c" break; case 1205: /* on_overflow: opt_on_overflow opt_not_on_overflow */ -#line 6334 "parser.y" +#line 6342 "parser.y" { current_statement->handler_id = COB_EC_OVERFLOW; } -#line 11921 "parser.c" +#line 11886 "parser.c" break; case 1207: /* $@98: %empty */ -#line 6341 "parser.y" +#line 6349 "parser.y" { check_unreached = 0; } -#line 11929 "parser.c" +#line 11894 "parser.c" break; case 1208: /* opt_on_overflow: OVERFLOW $@98 statement_list */ -#line 6345 "parser.y" +#line 6353 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11937 "parser.c" +#line 11902 "parser.c" break; case 1210: /* $@99: %empty */ -#line 6352 "parser.y" +#line 6360 "parser.y" { check_unreached = 0; } -#line 11945 "parser.c" +#line 11910 "parser.c" break; case 1211: /* opt_not_on_overflow: "NOT OVERFLOW" $@99 statement_list */ -#line 6356 "parser.y" +#line 6364 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11953 "parser.c" +#line 11918 "parser.c" break; case 1212: /* at_end: at_end_sentence */ -#line 6368 "parser.y" +#line 6376 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[0]; } -#line 11962 "parser.c" +#line 11927 "parser.c" break; case 1213: /* at_end: not_at_end_sentence */ -#line 6373 "parser.y" +#line 6381 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler2 = yyvsp[0]; } -#line 11971 "parser.c" +#line 11936 "parser.c" break; case 1214: /* at_end: at_end_sentence not_at_end_sentence */ -#line 6378 "parser.y" +#line 6386 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 11981 "parser.c" +#line 11946 "parser.c" break; case 1215: /* $@100: %empty */ -#line 6387 "parser.y" +#line 6395 "parser.y" { check_unreached = 0; } -#line 11989 "parser.c" +#line 11954 "parser.c" break; case 1216: /* at_end_sentence: END $@100 statement_list */ -#line 6391 "parser.y" +#line 6399 "parser.y" { yyval = yyvsp[0]; } -#line 11997 "parser.c" +#line 11962 "parser.c" break; case 1217: /* $@101: %empty */ -#line 6398 "parser.y" +#line 6406 "parser.y" { check_unreached = 0; } -#line 12005 "parser.c" +#line 11970 "parser.c" break; case 1218: /* not_at_end_sentence: "NOT END" $@101 statement_list */ -#line 6402 "parser.y" +#line 6410 "parser.y" { yyval = yyvsp[0]; } -#line 12013 "parser.c" +#line 11978 "parser.c" break; case 1219: /* at_eop: at_eop_sentence */ -#line 6414 "parser.y" +#line 6422 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[0]; } -#line 12022 "parser.c" +#line 11987 "parser.c" break; case 1220: /* at_eop: not_at_eop_sentence */ -#line 6419 "parser.y" +#line 6427 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler2 = yyvsp[0]; } -#line 12031 "parser.c" +#line 11996 "parser.c" break; case 1221: /* at_eop: at_eop_sentence not_at_eop_sentence */ -#line 6424 "parser.y" +#line 6432 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12041 "parser.c" +#line 12006 "parser.c" break; case 1222: /* $@102: %empty */ -#line 6433 "parser.y" +#line 6441 "parser.y" { check_unreached = 0; } -#line 12049 "parser.c" +#line 12014 "parser.c" break; case 1223: /* at_eop_sentence: EOP $@102 statement_list */ -#line 6437 "parser.y" +#line 6445 "parser.y" { yyval = yyvsp[0]; } -#line 12057 "parser.c" +#line 12022 "parser.c" break; case 1224: /* $@103: %empty */ -#line 6444 "parser.y" +#line 6452 "parser.y" { check_unreached = 0; } -#line 12065 "parser.c" +#line 12030 "parser.c" break; case 1225: /* not_at_eop_sentence: "NOT EOP" $@103 statement_list */ -#line 6448 "parser.y" +#line 6456 "parser.y" { yyval = yyvsp[0]; } -#line 12073 "parser.c" +#line 12038 "parser.c" break; case 1228: /* invalid_key: invalid_key_sentence */ -#line 6464 "parser.y" +#line 6472 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[0]; } -#line 12082 "parser.c" +#line 12047 "parser.c" break; case 1229: /* invalid_key: not_invalid_key_sentence */ -#line 6469 "parser.y" +#line 6477 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler2 = yyvsp[0]; } -#line 12091 "parser.c" +#line 12056 "parser.c" break; case 1230: /* invalid_key: invalid_key_sentence not_invalid_key_sentence */ -#line 6474 "parser.y" +#line 6482 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12101 "parser.c" +#line 12066 "parser.c" break; case 1231: /* $@104: %empty */ -#line 6483 "parser.y" +#line 6491 "parser.y" { check_unreached = 0; } -#line 12109 "parser.c" +#line 12074 "parser.c" break; case 1232: /* invalid_key_sentence: "INVALID KEY" $@104 statement_list */ -#line 6487 "parser.y" +#line 6495 "parser.y" { yyval = yyvsp[0]; } -#line 12117 "parser.c" +#line 12082 "parser.c" break; case 1233: /* $@105: %empty */ -#line 6494 "parser.y" +#line 6502 "parser.y" { check_unreached = 0; } -#line 12125 "parser.c" +#line 12090 "parser.c" break; case 1234: /* not_invalid_key_sentence: "NOT INVALID KEY" $@105 statement_list */ -#line 6498 "parser.y" +#line 6506 "parser.y" { yyval = yyvsp[0]; } -#line 12133 "parser.c" +#line 12098 "parser.c" break; case 1235: /* _opt_scroll_lines: %empty */ -#line 6510 "parser.y" +#line 6518 "parser.y" { yyval = cb_one; } -#line 12141 "parser.c" +#line 12106 "parser.c" break; case 1236: /* _opt_scroll_lines: _by num_id_or_lit _line_or_lines */ -#line 6514 "parser.y" +#line 6522 "parser.y" { yyval = yyvsp[-1]; } -#line 12149 "parser.c" +#line 12114 "parser.c" break; case 1237: /* condition: expr */ -#line 6526 "parser.y" +#line 6534 "parser.y" { yyval = cb_build_cond (yyvsp[0]); } -#line 12157 "parser.c" +#line 12122 "parser.c" break; case 1238: /* expr: partial_expr */ -#line 6533 "parser.y" +#line 6541 "parser.y" { yyval = cb_build_expr (yyvsp[0]); } -#line 12165 "parser.c" +#line 12130 "parser.c" break; case 1239: /* $@106: %empty */ -#line 6539 "parser.y" +#line 6547 "parser.y" { current_expr = NULL; } -#line 12173 "parser.c" +#line 12138 "parser.c" break; case 1240: /* partial_expr: $@106 expr_tokens */ -#line 6543 "parser.y" +#line 6551 "parser.y" { yyval = cb_list_reverse (current_expr); } -#line 12181 "parser.c" +#line 12146 "parser.c" break; case 1241: /* expr_tokens: expr_token x */ -#line 6549 "parser.y" +#line 6557 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12187 "parser.c" +#line 12152 "parser.c" break; case 1242: /* expr_tokens: expr_tokens ')' */ -#line 6550 "parser.y" +#line 6558 "parser.y" { push_expr (')', NULL); } -#line 12193 "parser.c" +#line 12158 "parser.c" break; case 1243: /* expr_tokens: expr_token OMITTED */ -#line 6552 "parser.y" +#line 6560 "parser.y" { push_expr ('O', NULL); } -#line 12199 "parser.c" +#line 12164 "parser.c" break; case 1244: /* expr_tokens: expr_token NUMERIC */ -#line 6553 "parser.y" +#line 6561 "parser.y" { push_expr ('9', NULL); } -#line 12205 "parser.c" +#line 12170 "parser.c" break; case 1245: /* expr_tokens: expr_token ALPHABETIC */ -#line 6554 "parser.y" +#line 6562 "parser.y" { push_expr ('A', NULL); } -#line 12211 "parser.c" +#line 12176 "parser.c" break; case 1246: /* expr_tokens: expr_token "ALPHABETIC-LOWER" */ -#line 6555 "parser.y" +#line 6563 "parser.y" { push_expr ('L', NULL); } -#line 12217 "parser.c" +#line 12182 "parser.c" break; case 1247: /* expr_tokens: expr_token "ALPHABETIC-UPPER" */ -#line 6556 "parser.y" +#line 6564 "parser.y" { push_expr ('U', NULL); } -#line 12223 "parser.c" +#line 12188 "parser.c" break; case 1248: /* expr_tokens: expr_token CLASS_NAME */ -#line 6557 "parser.y" +#line 6565 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12229 "parser.c" +#line 12194 "parser.c" break; case 1249: /* expr_tokens: expr_tokens OMITTED */ -#line 6559 "parser.y" +#line 6567 "parser.y" { push_expr ('O', NULL); } -#line 12235 "parser.c" +#line 12200 "parser.c" break; case 1250: /* expr_tokens: expr_tokens NUMERIC */ -#line 6560 "parser.y" +#line 6568 "parser.y" { push_expr ('9', NULL); } -#line 12241 "parser.c" +#line 12206 "parser.c" break; case 1251: /* expr_tokens: expr_tokens ALPHABETIC */ -#line 6561 "parser.y" +#line 6569 "parser.y" { push_expr ('A', NULL); } -#line 12247 "parser.c" +#line 12212 "parser.c" break; case 1252: /* expr_tokens: expr_tokens "ALPHABETIC-LOWER" */ -#line 6562 "parser.y" +#line 6570 "parser.y" { push_expr ('L', NULL); } -#line 12253 "parser.c" +#line 12218 "parser.c" break; case 1253: /* expr_tokens: expr_tokens "ALPHABETIC-UPPER" */ -#line 6563 "parser.y" +#line 6571 "parser.y" { push_expr ('U', NULL); } -#line 12259 "parser.c" +#line 12224 "parser.c" break; case 1254: /* expr_tokens: expr_tokens CLASS_NAME */ -#line 6564 "parser.y" +#line 6572 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12265 "parser.c" +#line 12230 "parser.c" break; case 1255: /* expr_tokens: expr_token POSITIVE */ -#line 6566 "parser.y" +#line 6574 "parser.y" { push_expr ('P', NULL); } -#line 12271 "parser.c" +#line 12236 "parser.c" break; case 1256: /* expr_tokens: expr_token NEGATIVE */ -#line 6567 "parser.y" +#line 6575 "parser.y" { push_expr ('N', NULL); } -#line 12277 "parser.c" +#line 12242 "parser.c" break; case 1257: /* expr_tokens: expr_tokens POSITIVE */ -#line 6569 "parser.y" +#line 6577 "parser.y" { push_expr ('P', NULL); } -#line 12283 "parser.c" +#line 12248 "parser.c" break; case 1258: /* expr_tokens: expr_tokens NEGATIVE */ -#line 6570 "parser.y" +#line 6578 "parser.y" { push_expr ('N', NULL); } -#line 12289 "parser.c" +#line 12254 "parser.c" break; case 1259: /* expr_tokens: expr_tokens ZERO */ -#line 6571 "parser.y" +#line 6579 "parser.y" { push_expr ('x', cb_zero); } -#line 12295 "parser.c" +#line 12260 "parser.c" break; case 1263: /* expr_token: expr_token '(' */ -#line 6578 "parser.y" +#line 6586 "parser.y" { push_expr ('(', NULL); } -#line 12301 "parser.c" +#line 12266 "parser.c" break; case 1264: /* expr_token: expr_token '+' */ -#line 6580 "parser.y" +#line 6588 "parser.y" { push_expr ('+', NULL); } -#line 12307 "parser.c" +#line 12272 "parser.c" break; case 1265: /* expr_token: expr_token '-' */ -#line 6581 "parser.y" +#line 6589 "parser.y" { push_expr ('-', NULL); } -#line 12313 "parser.c" +#line 12278 "parser.c" break; case 1266: /* expr_token: expr_token '^' */ -#line 6582 "parser.y" +#line 6590 "parser.y" { push_expr ('^', NULL); } -#line 12319 "parser.c" +#line 12284 "parser.c" break; case 1267: /* expr_token: expr_token NOT */ -#line 6584 "parser.y" +#line 6592 "parser.y" { push_expr ('!', NULL); } -#line 12325 "parser.c" +#line 12290 "parser.c" break; case 1268: /* expr_token: expr_tokens NOT */ -#line 6585 "parser.y" +#line 6593 "parser.y" { push_expr ('!', NULL); } -#line 12331 "parser.c" +#line 12296 "parser.c" break; case 1269: /* expr_token: expr_tokens '+' */ -#line 6587 "parser.y" +#line 6595 "parser.y" { push_expr ('+', NULL); } -#line 12337 "parser.c" +#line 12302 "parser.c" break; case 1270: /* expr_token: expr_tokens '-' */ -#line 6588 "parser.y" +#line 6596 "parser.y" { push_expr ('-', NULL); } -#line 12343 "parser.c" +#line 12308 "parser.c" break; case 1271: /* expr_token: expr_tokens '*' */ -#line 6589 "parser.y" +#line 6597 "parser.y" { push_expr ('*', NULL); } -#line 12349 "parser.c" +#line 12314 "parser.c" break; case 1272: /* expr_token: expr_tokens '/' */ -#line 6590 "parser.y" +#line 6598 "parser.y" { push_expr ('/', NULL); } -#line 12355 "parser.c" +#line 12320 "parser.c" break; case 1273: /* expr_token: expr_tokens '^' */ -#line 6591 "parser.y" +#line 6599 "parser.y" { push_expr ('^', NULL); } -#line 12361 "parser.c" +#line 12326 "parser.c" break; case 1274: /* expr_token: expr_tokens eq */ -#line 6593 "parser.y" +#line 6601 "parser.y" { push_expr ('=', NULL); } -#line 12367 "parser.c" +#line 12332 "parser.c" break; case 1275: /* expr_token: expr_tokens gt */ -#line 6594 "parser.y" +#line 6602 "parser.y" { push_expr ('>', NULL); } -#line 12373 "parser.c" +#line 12338 "parser.c" break; case 1276: /* expr_token: expr_tokens lt */ -#line 6595 "parser.y" +#line 6603 "parser.y" { push_expr ('<', NULL); } -#line 12379 "parser.c" +#line 12344 "parser.c" break; case 1277: /* expr_token: expr_tokens ge */ -#line 6596 "parser.y" +#line 6604 "parser.y" { push_expr (']', NULL); } -#line 12385 "parser.c" +#line 12350 "parser.c" break; case 1278: /* expr_token: expr_tokens le */ -#line 6597 "parser.y" +#line 6605 "parser.y" { push_expr ('[', NULL); } -#line 12391 "parser.c" +#line 12356 "parser.c" break; case 1279: /* expr_token: expr_tokens NE */ -#line 6598 "parser.y" +#line 6606 "parser.y" { push_expr ('~', NULL); } -#line 12397 "parser.c" +#line 12362 "parser.c" break; case 1280: /* expr_token: expr_token eq */ -#line 6600 "parser.y" +#line 6608 "parser.y" { push_expr ('=', NULL); } -#line 12403 "parser.c" +#line 12368 "parser.c" break; case 1281: /* expr_token: expr_token gt */ -#line 6601 "parser.y" +#line 6609 "parser.y" { push_expr ('>', NULL); } -#line 12409 "parser.c" +#line 12374 "parser.c" break; case 1282: /* expr_token: expr_token lt */ -#line 6602 "parser.y" +#line 6610 "parser.y" { push_expr ('<', NULL); } -#line 12415 "parser.c" +#line 12380 "parser.c" break; case 1283: /* expr_token: expr_token ge */ -#line 6603 "parser.y" +#line 6611 "parser.y" { push_expr (']', NULL); } -#line 12421 "parser.c" +#line 12386 "parser.c" break; case 1284: /* expr_token: expr_token le */ -#line 6604 "parser.y" +#line 6612 "parser.y" { push_expr ('[', NULL); } -#line 12427 "parser.c" +#line 12392 "parser.c" break; case 1285: /* expr_token: expr_token NE */ -#line 6605 "parser.y" +#line 6613 "parser.y" { push_expr ('~', NULL); } -#line 12433 "parser.c" +#line 12398 "parser.c" break; case 1286: /* expr_token: expr_tokens AND */ -#line 6607 "parser.y" +#line 6615 "parser.y" { push_expr ('&', NULL); } -#line 12439 "parser.c" +#line 12404 "parser.c" break; case 1287: /* expr_token: expr_tokens OR */ -#line 6608 "parser.y" +#line 6616 "parser.y" { push_expr ('|', NULL); } -#line 12445 "parser.c" +#line 12410 "parser.c" break; case 1301: /* exp_list: exp */ -#line 6620 "parser.y" +#line 6628 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12451 "parser.c" +#line 12416 "parser.c" break; case 1302: /* exp_list: exp_list e_sep exp */ -#line 6621 "parser.y" +#line 6629 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 12457 "parser.c" +#line 12422 "parser.c" break; case 1306: /* exp: arith_x */ -#line 6630 "parser.y" +#line 6638 "parser.y" { yyval = yyvsp[0]; } -#line 12463 "parser.c" +#line 12428 "parser.c" break; case 1307: /* exp: exp '+' exp */ -#line 6631 "parser.y" +#line 6639 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '+', yyvsp[0]); } -#line 12469 "parser.c" +#line 12434 "parser.c" break; case 1308: /* exp: exp '-' exp */ -#line 6632 "parser.y" +#line 6640 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '-', yyvsp[0]); } -#line 12475 "parser.c" +#line 12440 "parser.c" break; case 1309: /* exp: exp '*' exp */ -#line 6633 "parser.y" +#line 6641 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '*', yyvsp[0]); } -#line 12481 "parser.c" +#line 12446 "parser.c" break; case 1310: /* exp: exp '/' exp */ -#line 6634 "parser.y" +#line 6642 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '/', yyvsp[0]); } -#line 12487 "parser.c" +#line 12452 "parser.c" break; case 1311: /* exp: '+' exp */ -#line 6635 "parser.y" +#line 6643 "parser.y" { yyval = yyvsp[0]; } -#line 12493 "parser.c" +#line 12458 "parser.c" break; case 1312: /* exp: '-' exp */ -#line 6636 "parser.y" +#line 6644 "parser.y" { yyval = cb_build_binary_op (cb_zero, '-', yyvsp[0]); } -#line 12499 "parser.c" +#line 12464 "parser.c" break; case 1313: /* exp: exp '^' exp */ -#line 6637 "parser.y" +#line 6645 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '^', yyvsp[0]); } -#line 12505 "parser.c" +#line 12470 "parser.c" break; case 1314: /* exp: '(' exp ')' */ -#line 6638 "parser.y" +#line 6646 "parser.y" { yyval = yyvsp[-1]; } -#line 12511 "parser.c" +#line 12476 "parser.c" break; case 1315: /* linage_counter: "LINAGE-COUNTER" */ -#line 6650 "parser.y" +#line 6658 "parser.y" { if (current_linage > 1) { cb_error (_("LINAGE-COUNTER must be qualified here")); @@ -12523,11 +12488,11 @@ yyparse (void) yyval = linage_file->linage_ctr; } } -#line 12527 "parser.c" +#line 12492 "parser.c" break; case 1316: /* linage_counter: "LINAGE-COUNTER" in_of "Identifier" */ -#line 6662 "parser.y" +#line 6670 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[0]))) { yyval = CB_FILE (cb_ref (yyvsp[0]))->linage_ctr; @@ -12536,29 +12501,29 @@ yyparse (void) yyval = cb_error_node; } } -#line 12540 "parser.c" +#line 12505 "parser.c" break; case 1317: /* arithmetic_x_list: arithmetic_x */ -#line 6676 "parser.y" +#line 6684 "parser.y" { yyval = yyvsp[0]; } -#line 12546 "parser.c" +#line 12511 "parser.c" break; case 1318: /* arithmetic_x_list: arithmetic_x_list arithmetic_x */ -#line 6678 "parser.y" +#line 6686 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 12552 "parser.c" +#line 12517 "parser.c" break; case 1319: /* arithmetic_x: x flag_rounded */ -#line 6682 "parser.y" +#line 6690 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 12558 "parser.c" +#line 12523 "parser.c" break; case 1320: /* record_name: qualified_word */ -#line 6689 "parser.y" +#line 6697 "parser.y" { cb_tree x; cb_tree r; @@ -12575,11 +12540,11 @@ yyparse (void) } yyval = x; } -#line 12579 "parser.c" +#line 12544 "parser.c" break; case 1321: /* table_name: qualified_word */ -#line 6711 "parser.y" +#line 6719 "parser.y" { cb_tree x; @@ -12594,19 +12559,19 @@ yyparse (void) yyval = yyvsp[0]; } } -#line 12598 "parser.c" +#line 12563 "parser.c" break; case 1322: /* file_name_list: file_name */ -#line 6731 "parser.y" +#line 6739 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12606 "parser.c" +#line 12571 "parser.c" break; case 1323: /* file_name_list: file_name_list file_name */ -#line 6735 "parser.y" +#line 6743 "parser.y" { cb_tree l; @@ -12619,11 +12584,11 @@ yyparse (void) yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } } -#line 12623 "parser.c" +#line 12588 "parser.c" break; case 1324: /* file_name: "Identifier" */ -#line 6751 "parser.y" +#line 6759 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[0]))) { yyval = yyvsp[0]; @@ -12632,106 +12597,106 @@ yyparse (void) yyval = cb_error_node; } } -#line 12636 "parser.c" +#line 12601 "parser.c" break; case 1325: /* mnemonic_name_list: mnemonic_name */ -#line 6764 "parser.y" +#line 6772 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12642 "parser.c" +#line 12607 "parser.c" break; case 1326: /* mnemonic_name_list: mnemonic_name_list mnemonic_name */ -#line 6766 "parser.y" +#line 6774 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12648 "parser.c" +#line 12613 "parser.c" break; case 1327: /* mnemonic_name: "MNEMONIC NAME" */ -#line 6770 "parser.y" +#line 6778 "parser.y" { yyval = yyvsp[0]; } -#line 12654 "parser.c" +#line 12619 "parser.c" break; case 1328: /* procedure_name_list: %empty */ -#line 6776 "parser.y" +#line 6784 "parser.y" { yyval = NULL; } -#line 12660 "parser.c" +#line 12625 "parser.c" break; case 1329: /* procedure_name_list: procedure_name_list procedure_name */ -#line 6778 "parser.y" +#line 6786 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12666 "parser.c" +#line 12631 "parser.c" break; case 1330: /* procedure_name: label */ -#line 6783 "parser.y" +#line 6791 "parser.y" { yyval = yyvsp[0]; CB_REFERENCE (yyval)->offset = CB_TREE (current_section); current_program->label_list = cb_cons (yyval, current_program->label_list); } -#line 12676 "parser.c" +#line 12641 "parser.c" break; case 1334: /* integer_label: "Literal" */ -#line 6798 "parser.y" +#line 6806 "parser.y" { yyval = cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)); yyval->source_file = yyvsp[0]->source_file; yyval->source_line = yyvsp[0]->source_line; } -#line 12686 "parser.c" +#line 12651 "parser.c" break; case 1335: /* reference_list: reference */ -#line 6808 "parser.y" +#line 6816 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12692 "parser.c" +#line 12657 "parser.c" break; case 1336: /* reference_list: reference_list reference */ -#line 6809 "parser.y" +#line 6817 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12698 "parser.c" +#line 12663 "parser.c" break; case 1337: /* reference: qualified_word */ -#line 6814 "parser.y" +#line 6822 "parser.y" { yyval = yyvsp[0]; current_program->reference_list = cb_cons (yyval, current_program->reference_list); } -#line 12707 "parser.c" +#line 12672 "parser.c" break; case 1338: /* no_reference_list: qualified_word */ -#line 6823 "parser.y" +#line 6831 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12713 "parser.c" +#line 12678 "parser.c" break; case 1339: /* no_reference_list: no_reference_list qualified_word */ -#line 6824 "parser.y" +#line 6832 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12719 "parser.c" +#line 12684 "parser.c" break; case 1340: /* opt_reference: %empty */ -#line 6828 "parser.y" +#line 6836 "parser.y" { yyval = NULL; } -#line 12725 "parser.c" +#line 12690 "parser.c" break; case 1341: /* opt_reference: reference */ -#line 6829 "parser.y" +#line 6837 "parser.y" { yyval = yyvsp[0]; } -#line 12731 "parser.c" +#line 12696 "parser.c" break; case 1344: /* undefined_word: "Identifier" */ -#line 6841 "parser.y" +#line 6849 "parser.y" { yyval = yyvsp[0]; if (CB_REFERENCE (yyval)->word->count > 0) { @@ -12739,160 +12704,160 @@ yyparse (void) yyval = cb_error_node; } } -#line 12743 "parser.c" +#line 12708 "parser.c" break; case 1345: /* target_x_list: target_x */ -#line 6860 "parser.y" +#line 6868 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12749 "parser.c" +#line 12714 "parser.c" break; case 1346: /* target_x_list: target_x_list target_x */ -#line 6861 "parser.y" +#line 6869 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12755 "parser.c" +#line 12720 "parser.c" break; case 1348: /* target_x: ADDRESS _of identifier_1 */ -#line 6866 "parser.y" +#line 6874 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12761 "parser.c" +#line 12726 "parser.c" break; case 1349: /* x_list: x */ -#line 6870 "parser.y" +#line 6878 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12767 "parser.c" +#line 12732 "parser.c" break; case 1350: /* x_list: x_list x */ -#line 6871 "parser.y" +#line 6879 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12773 "parser.c" +#line 12738 "parser.c" break; case 1352: /* x: LENGTH _of identifier_1 */ -#line 6876 "parser.y" +#line 6884 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12779 "parser.c" +#line 12744 "parser.c" break; case 1353: /* x: LENGTH _of basic_literal */ -#line 6877 "parser.y" +#line 6885 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12785 "parser.c" +#line 12750 "parser.c" break; case 1354: /* x: LENGTH _of function */ -#line 6878 "parser.y" +#line 6886 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12791 "parser.c" +#line 12756 "parser.c" break; case 1355: /* x: ADDRESS _of prog_or_entry alnum_or_id */ -#line 6879 "parser.y" +#line 6887 "parser.y" { yyval = cb_build_ppointer (yyvsp[0]); } -#line 12797 "parser.c" +#line 12762 "parser.c" break; case 1356: /* x: ADDRESS _of identifier_1 */ -#line 6880 "parser.y" +#line 6888 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12803 "parser.c" +#line 12768 "parser.c" break; case 1361: /* arith_x: LENGTH _of identifier_1 */ -#line 6888 "parser.y" +#line 6896 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12809 "parser.c" +#line 12774 "parser.c" break; case 1362: /* arith_x: LENGTH _of basic_literal */ -#line 6889 "parser.y" +#line 6897 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12815 "parser.c" +#line 12780 "parser.c" break; case 1363: /* arith_x: LENGTH _of function */ -#line 6890 "parser.y" +#line 6898 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12821 "parser.c" +#line 12786 "parser.c" break; case 1369: /* alnum_or_id: identifier_1 */ -#line 6902 "parser.y" +#line 6910 "parser.y" { yyval = yyvsp[0]; } -#line 12827 "parser.c" +#line 12792 "parser.c" break; case 1370: /* alnum_or_id: "Literal" */ -#line 6903 "parser.y" +#line 6911 "parser.y" { yyval = yyvsp[0]; } -#line 12833 "parser.c" +#line 12798 "parser.c" break; case 1382: /* num_id_or_lit: ZERO */ -#line 6937 "parser.y" +#line 6945 "parser.y" { yyval = cb_zero; } -#line 12839 "parser.c" +#line 12804 "parser.c" break; case 1383: /* identifier: identifier_1 */ -#line 6945 "parser.y" +#line 6953 "parser.y" { yyval = cb_build_identifier (yyvsp[0]); } -#line 12845 "parser.c" +#line 12810 "parser.c" break; case 1384: /* identifier_1: qualified_word */ -#line 6949 "parser.y" +#line 6957 "parser.y" { yyval = yyvsp[0]; } -#line 12851 "parser.c" +#line 12816 "parser.c" break; case 1385: /* identifier_1: qualified_word subref */ -#line 6950 "parser.y" +#line 6958 "parser.y" { yyval = yyvsp[-1]; } -#line 12857 "parser.c" +#line 12822 "parser.c" break; case 1386: /* identifier_1: qualified_word refmod */ -#line 6951 "parser.y" +#line 6959 "parser.y" { yyval = yyvsp[-1]; } -#line 12863 "parser.c" +#line 12828 "parser.c" break; case 1387: /* identifier_1: qualified_word subref refmod */ -#line 6952 "parser.y" +#line 6960 "parser.y" { yyval = yyvsp[-2]; } -#line 12869 "parser.c" +#line 12834 "parser.c" break; case 1388: /* qualified_word: "Identifier" */ -#line 6956 "parser.y" +#line 6964 "parser.y" { yyval = yyvsp[0]; } -#line 12875 "parser.c" +#line 12840 "parser.c" break; case 1389: /* qualified_word: "Identifier" in_of qualified_word */ -#line 6957 "parser.y" +#line 6965 "parser.y" { yyval = yyvsp[-2]; CB_REFERENCE (yyvsp[-2])->chain = yyvsp[0]; } -#line 12881 "parser.c" +#line 12846 "parser.c" break; case 1390: /* subref: '(' exp_list ')' */ -#line 6962 "parser.y" +#line 6970 "parser.y" { if (cb_ref (yyvsp[-3]) != cb_error_node) { yyval = yyvsp[-3]; CB_REFERENCE (yyvsp[-3])->subs = cb_list_reverse (yyvsp[-1]); } } -#line 12892 "parser.c" +#line 12857 "parser.c" break; case 1391: /* refmod: '(' exp ':' ')' */ -#line 6972 "parser.y" +#line 6980 "parser.y" { if (cb_ref (yyvsp[-4]) != cb_error_node) { CB_REFERENCE (yyvsp[-4])->value = CB_TREE (cb_field (yyvsp[-4])); @@ -12906,11 +12871,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-4])->offset = yyvsp[-2]; } } -#line 12910 "parser.c" +#line 12875 "parser.c" break; case 1392: /* refmod: '(' exp ':' exp ')' */ -#line 6986 "parser.y" +#line 6994 "parser.y" { if (cb_ref (yyvsp[-5]) != cb_error_node) { CB_REFERENCE (yyvsp[-5])->value = CB_TREE (cb_field (yyvsp[-5])); @@ -12926,11 +12891,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-5])->length = yyvsp[-1]; } } -#line 12930 "parser.c" +#line 12895 "parser.c" break; case 1393: /* integer: "Literal" */ -#line 7009 "parser.y" +#line 7017 "parser.y" { if (cb_tree_category (yyvsp[0]) != CB_CATEGORY_NUMERIC) { cb_error (_("Integer value expected")); @@ -12939,437 +12904,437 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 12943 "parser.c" +#line 12908 "parser.c" break; case 1394: /* literal: basic_literal */ -#line 7020 "parser.y" +#line 7028 "parser.y" { yyval = yyvsp[0]; } -#line 12949 "parser.c" +#line 12914 "parser.c" break; case 1395: /* literal: ALL basic_value */ -#line 7022 "parser.y" +#line 7030 "parser.y" { yyval = yyvsp[0]; if (CB_LITERAL_P (yyvsp[0])) { CB_LITERAL (yyvsp[0])->all = 1; } } -#line 12960 "parser.c" +#line 12925 "parser.c" break; case 1396: /* basic_literal: basic_value */ -#line 7031 "parser.y" +#line 7039 "parser.y" { yyval = yyvsp[0]; } -#line 12966 "parser.c" +#line 12931 "parser.c" break; case 1397: /* basic_literal: basic_literal '&' basic_value */ -#line 7032 "parser.y" +#line 7040 "parser.y" { yyval = cb_concat_literals (yyvsp[-2], yyvsp[0]); } -#line 12972 "parser.c" +#line 12937 "parser.c" break; case 1398: /* basic_value: "Literal" */ -#line 7036 "parser.y" +#line 7044 "parser.y" { yyval = yyvsp[0]; } -#line 12978 "parser.c" +#line 12943 "parser.c" break; case 1399: /* basic_value: SPACE */ -#line 7037 "parser.y" +#line 7045 "parser.y" { yyval = cb_space; } -#line 12984 "parser.c" +#line 12949 "parser.c" break; case 1400: /* basic_value: ZERO */ -#line 7038 "parser.y" +#line 7046 "parser.y" { yyval = cb_zero; } -#line 12990 "parser.c" +#line 12955 "parser.c" break; case 1401: /* basic_value: QUOTE */ -#line 7039 "parser.y" +#line 7047 "parser.y" { yyval = cb_quote; } -#line 12996 "parser.c" +#line 12961 "parser.c" break; case 1402: /* basic_value: "HIGH-VALUE" */ -#line 7040 "parser.y" +#line 7048 "parser.y" { yyval = cb_high; } -#line 13002 "parser.c" +#line 12967 "parser.c" break; case 1403: /* basic_value: "LOW-VALUE" */ -#line 7041 "parser.y" +#line 7049 "parser.y" { yyval = cb_low; } -#line 13008 "parser.c" +#line 12973 "parser.c" break; case 1404: /* basic_value: "NULL" */ -#line 7042 "parser.y" +#line 7050 "parser.y" { yyval = cb_null; } -#line 13014 "parser.c" +#line 12979 "parser.c" break; case 1405: /* function: "FUNCTION CURRENT-DATE" func_refmod */ -#line 7051 "parser.y" +#line 7059 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 13022 "parser.c" +#line 12987 "parser.c" break; case 1406: /* function: "FUNCTION WHEN-COMPILED" func_refmod */ -#line 7055 "parser.y" +#line 7063 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 13030 "parser.c" +#line 12995 "parser.c" break; case 1407: /* function: "FUNCTION UPPER-CASE" '(' exp ')' func_refmod */ -#line 7059 "parser.y" +#line 7067 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13038 "parser.c" +#line 13003 "parser.c" break; case 1408: /* function: "FUNCTION LOWER-CASE" '(' exp ')' func_refmod */ -#line 7063 "parser.y" +#line 7071 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13046 "parser.c" +#line 13011 "parser.c" break; case 1409: /* function: "FUNCTION REVERSE" '(' exp ')' func_refmod */ -#line 7067 "parser.y" +#line 7075 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13054 "parser.c" +#line 13019 "parser.c" break; case 1410: /* function: "FUNCTION CONCATENATE" '(' exp_list ')' func_refmod */ -#line 7071 "parser.y" +#line 7079 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13062 "parser.c" +#line 13027 "parser.c" break; case 1411: /* function: "FUNCTION SUBSTITUTE" '(' exp_list ')' func_refmod */ -#line 7075 "parser.y" +#line 7083 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13070 "parser.c" +#line 13035 "parser.c" break; case 1412: /* function: "FUNCTION SUBSTITUTE-CASE" '(' exp_list ')' func_refmod */ -#line 7079 "parser.y" +#line 7087 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13078 "parser.c" +#line 13043 "parser.c" break; case 1413: /* function: "FUNCTION TRIM" '(' trim_args ')' func_refmod */ -#line 7083 "parser.y" +#line 7091 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13086 "parser.c" +#line 13051 "parser.c" break; case 1414: /* function: "FUNCTION NUMVALC" '(' numvalc_args ')' */ -#line 7087 "parser.y" +#line 7095 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-3], yyvsp[-1], NULL); } -#line 13094 "parser.c" +#line 13059 "parser.c" break; case 1415: /* function: "FUNCTION LOCALE" '(' locale_dt_args ')' func_refmod */ -#line 7091 "parser.y" +#line 7099 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13102 "parser.c" +#line 13067 "parser.c" break; case 1416: /* function: "FUNCTION" func_args */ -#line 7095 "parser.y" +#line 7103 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], yyvsp[0], NULL); } -#line 13110 "parser.c" +#line 13075 "parser.c" break; case 1417: /* func_refmod: %empty */ -#line 7101 "parser.y" +#line 7109 "parser.y" { yyval = NULL; } -#line 13116 "parser.c" +#line 13081 "parser.c" break; case 1418: /* func_refmod: '(' exp ':' ')' */ -#line 7102 "parser.y" +#line 7110 "parser.y" { yyval = cb_build_pair (yyvsp[-2], NULL); } -#line 13122 "parser.c" +#line 13087 "parser.c" break; case 1419: /* func_refmod: '(' exp ':' exp ')' */ -#line 7103 "parser.y" +#line 7111 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[-1]); } -#line 13128 "parser.c" +#line 13093 "parser.c" break; case 1420: /* func_args: %empty */ -#line 7107 "parser.y" +#line 7115 "parser.y" { yyval = NULL; } -#line 13134 "parser.c" +#line 13099 "parser.c" break; case 1421: /* func_args: '(' list_func_args ')' */ -#line 7108 "parser.y" +#line 7116 "parser.y" { yyval = yyvsp[-1]; } -#line 13140 "parser.c" +#line 13105 "parser.c" break; case 1422: /* list_func_args: %empty */ -#line 7112 "parser.y" +#line 7120 "parser.y" { yyval = NULL; } -#line 13146 "parser.c" +#line 13111 "parser.c" break; case 1423: /* list_func_args: exp_list */ -#line 7113 "parser.y" +#line 7121 "parser.y" { yyval = yyvsp[0]; } -#line 13152 "parser.c" +#line 13117 "parser.c" break; case 1424: /* trim_args: exp */ -#line 7119 "parser.y" +#line 7127 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_int0); } -#line 13163 "parser.c" +#line 13128 "parser.c" break; case 1425: /* trim_args: exp e_sep LEADING */ -#line 7126 "parser.y" +#line 7134 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int1); } -#line 13174 "parser.c" +#line 13139 "parser.c" break; case 1426: /* trim_args: exp e_sep TRAILING */ -#line 7133 "parser.y" +#line 7141 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int2); } -#line 13185 "parser.c" +#line 13150 "parser.c" break; case 1427: /* numvalc_args: exp */ -#line 7143 "parser.y" +#line 7151 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13196 "parser.c" +#line 13161 "parser.c" break; case 1428: /* numvalc_args: exp e_sep exp */ -#line 7150 "parser.y" +#line 7158 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, yyvsp[0]); } -#line 13207 "parser.c" +#line 13172 "parser.c" break; case 1429: /* locale_dt_args: exp */ -#line 7160 "parser.y" +#line 7168 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13218 "parser.c" +#line 13183 "parser.c" break; case 1430: /* locale_dt_args: exp e_sep reference */ -#line 7167 "parser.y" +#line 7175 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_ref (yyvsp[0])); } -#line 13229 "parser.c" +#line 13194 "parser.c" break; case 1431: /* not_const_word: %empty */ -#line 7180 "parser.y" +#line 7188 "parser.y" { non_const_word = 1; } -#line 13237 "parser.c" +#line 13202 "parser.c" break; case 1432: /* flag_all: %empty */ -#line 7190 "parser.y" +#line 7198 "parser.y" { yyval = cb_int0; } -#line 13243 "parser.c" +#line 13208 "parser.c" break; case 1433: /* flag_all: ALL */ -#line 7191 "parser.y" +#line 7199 "parser.y" { yyval = cb_int1; } -#line 13249 "parser.c" +#line 13214 "parser.c" break; case 1434: /* flag_duplicates: %empty */ -#line 7195 "parser.y" +#line 7203 "parser.y" { yyval = cb_int0; } -#line 13255 "parser.c" +#line 13220 "parser.c" break; case 1435: /* flag_duplicates: with_dups */ -#line 7196 "parser.y" +#line 7204 "parser.y" { yyval = cb_int1; } -#line 13261 "parser.c" +#line 13226 "parser.c" break; case 1436: /* flag_initialized: %empty */ -#line 7200 "parser.y" +#line 7208 "parser.y" { yyval = NULL; } -#line 13267 "parser.c" +#line 13232 "parser.c" break; case 1437: /* flag_initialized: INITIALIZED */ -#line 7201 "parser.y" +#line 7209 "parser.y" { yyval = cb_int1; } -#line 13273 "parser.c" +#line 13238 "parser.c" break; case 1438: /* flag_next: %empty */ -#line 7205 "parser.y" +#line 7213 "parser.y" { yyval = cb_int0; } -#line 13279 "parser.c" +#line 13244 "parser.c" break; case 1439: /* flag_next: NEXT */ -#line 7206 "parser.y" +#line 7214 "parser.y" { yyval = cb_int1; } -#line 13285 "parser.c" +#line 13250 "parser.c" break; case 1440: /* flag_next: PREVIOUS */ -#line 7207 "parser.y" +#line 7215 "parser.y" { yyval = cb_int2; } -#line 13291 "parser.c" +#line 13256 "parser.c" break; case 1441: /* flag_not: %empty */ -#line 7211 "parser.y" +#line 7219 "parser.y" { yyval = cb_int0; } -#line 13297 "parser.c" +#line 13262 "parser.c" break; case 1442: /* flag_not: NOT */ -#line 7212 "parser.y" +#line 7220 "parser.y" { yyval = cb_int1; } -#line 13303 "parser.c" +#line 13268 "parser.c" break; case 1443: /* flag_optional: %empty */ -#line 7216 "parser.y" +#line 7224 "parser.y" { yyval = cb_int0; } -#line 13309 "parser.c" +#line 13274 "parser.c" break; case 1444: /* flag_optional: OPTIONAL */ -#line 7217 "parser.y" +#line 7225 "parser.y" { yyval = cb_int1; } -#line 13315 "parser.c" +#line 13280 "parser.c" break; case 1445: /* flag_rounded: %empty */ -#line 7221 "parser.y" +#line 7229 "parser.y" { yyval = cb_int0; } -#line 13321 "parser.c" +#line 13286 "parser.c" break; case 1446: /* flag_rounded: ROUNDED */ -#line 7222 "parser.y" +#line 7230 "parser.y" { yyval = cb_int1; } -#line 13327 "parser.c" +#line 13292 "parser.c" break; case 1447: /* flag_separate: %empty */ -#line 7226 "parser.y" +#line 7234 "parser.y" { yyval = cb_int0; } -#line 13333 "parser.c" +#line 13298 "parser.c" break; case 1448: /* flag_separate: SEPARATE _character */ -#line 7227 "parser.y" +#line 7235 "parser.y" { yyval = cb_int1; } -#line 13339 "parser.c" +#line 13304 "parser.c" break; case 1460: /* _also: ALSO */ -#line 7240 "parser.y" +#line 7248 "parser.y" { yyval = cb_int1; } -#line 13345 "parser.c" +#line 13310 "parser.c" break; case 1489: /* _is: %empty */ -#line 7255 "parser.y" +#line 7263 "parser.y" { yyval = NULL; } -#line 13351 "parser.c" +#line 13316 "parser.c" break; case 1490: /* _is: IS */ -#line 7255 "parser.y" +#line 7263 "parser.y" { yyval = cb_int1; } -#line 13357 "parser.c" +#line 13322 "parser.c" break; case 1501: /* _literal: %empty */ -#line 7260 "parser.y" +#line 7268 "parser.y" { yyval = NULL; } -#line 13363 "parser.c" +#line 13328 "parser.c" break; case 1502: /* _literal: "Literal" */ -#line 7260 "parser.y" +#line 7268 "parser.y" { yyval = yyvsp[0]; } -#line 13369 "parser.c" +#line 13334 "parser.c" break; -#line 13373 "parser.c" +#line 13338 "parser.c" default: break; } @@ -13451,6 +13416,7 @@ yyparse (void) label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -13511,7 +13477,7 @@ yyparse (void) `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -13519,24 +13485,22 @@ yyparse (void) `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if !defined yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -13563,5 +13527,5 @@ yyparse (void) return yyresult; } -#line 7285 "parser.y" +#line 7293 "parser.y" diff --git a/cobj/parser.y b/cobj/parser.y index 187b5190..4ac06570 100644 --- a/cobj/parser.y +++ b/cobj/parser.y @@ -2889,8 +2889,16 @@ usage_clause: usage: BINARY { current_field->usage = CB_USAGE_BINARY; } | COMP { current_field->usage = CB_USAGE_BINARY; } -| COMP_1 { current_field->usage = CB_USAGE_FLOAT; } -| COMP_2 { current_field->usage = CB_USAGE_DOUBLE; } +| COMP_1 +{ + current_field->usage = CB_USAGE_FLOAT; + cb_error (_("COMP-1 not implemented")); +} +| COMP_2 +{ + current_field->usage = CB_USAGE_DOUBLE; + cb_error (_("COMP-2 not implemented")); +} | COMP_3 { current_field->usage = CB_USAGE_PACKED; } | COMP_4 { current_field->usage = CB_USAGE_BINARY; } | COMP_5 { current_field->usage = CB_USAGE_COMP_5; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 51a5de03..59bcacbd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -241,7 +241,8 @@ misc_DEPENDENCIES = \ misc.src/search-occurs-depending.at \ misc.src/fix-subtract.at \ misc.src/display-numeric-NUMERIC-class.at \ - misc.src/display-inspect-sign.at + misc.src/display-inspect-sign.at \ + misc.src/comp1-comp2.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ee116d8d..759fb12c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -780,7 +780,8 @@ misc_DEPENDENCIES = \ misc.src/search-occurs-depending.at \ misc.src/fix-subtract.at \ misc.src/display-numeric-NUMERIC-class.at \ - misc.src/display-inspect-sign.at + misc.src/display-inspect-sign.at \ + misc.src/comp1-comp2.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index 26913bc2..c6a735ff 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -55,3 +55,4 @@ m4_include([search-occurs-depending.at]) m4_include([fix-subtract.at]) m4_include([display-numeric-NUMERIC-class.at]) m4_include([display-inspect-sign.at]) +m4_include([comp1-comp2.at]) diff --git a/tests/misc.src/comp1-comp2.at b/tests/misc.src/comp1-comp2.at new file mode 100644 index 00000000..7459b88b --- /dev/null +++ b/tests/misc.src/comp1-comp2.at @@ -0,0 +1,21 @@ +AT_SETUP([COMP-1 COMP-2 error]) + +AT_DATA([prog.cbl], [ + identification division. + ****************************************************************** + program-id. prog. + ****************************************************************** + data division. + WORKING-STORAGE SECTION. + 01 H COMP-1. + 01 I COMP-2. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl], [1], [], +[prog.cbl:8: Error: COMP-1 not implemented +prog.cbl:9: Error: COMP-2 not implemented +]) + +AT_CLEANUP \ No newline at end of file From 886d2ed453d4e9fe2e83ea0d0f4634ce8c6a7202 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:42:12 +0900 Subject: [PATCH 102/188] Release v1.1.8 (#614) --- CHANGELOG.md | 6 +++++ ChangeLog | 4 +++ NEWS | 8 ++++++ README.md | 12 ++++----- README_JP.md | 12 ++++----- ReleaseNote.md | 4 +-- configure | 26 +++++++++---------- configure.ac | 2 +- libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 14 files changed, 59 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a339da0..df174f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.8] - 2025-03-31 + +### Fix + +* Fix a bug of duplicate record keys of indexed files. + ## [1.1.7-hotfix1] - 2025-02-28 ### Fix diff --git a/ChangeLog b/ChangeLog index 85e4c8eb..2632a6e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-03-31 OSS Consortium + + * opensource COBOL 4J v1.1.8 released. + 2025-03-07 OSS Consortium * opensource COBOL 4J v1.1.7-hotfix1 released. diff --git a/NEWS b/NEWS index 4dde1ad2..5620d430 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,14 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.8 + +** Bug Fixes + + (1) Fix a bug of duplicate record keys of indexed files. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.7-hotfix1 ** New Features diff --git a/README.md b/README.md index 52b909a7..03c55a4a 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz -cd opensourcecobol4j-1.1.7-hotfix1 +curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz +tar zxvf opensourcecobol4j-v1.1.8.tar.gz +cd opensourcecobol4j-1.1.8 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz -cd opensourcecobol4j-1.1.7-hotfix1 +curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz +tar zxvf opensourcecobol4j-v1.1.8.tar.gz +cd opensourcecobol4j-1.1.8 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make diff --git a/README_JP.md b/README_JP.md index cf4fe68f..61d50802 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz -cd opensourcecobol4j-1.1.7-hotfix1 +curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz +tar zxvf opensourcecobol4j-v1.1.8.tar.gz +cd opensourcecobol4j-1.1.8 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.7-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.7-hotfix1.tar.gz -cd opensourcecobol4j-1.1.7-hotfix1 +curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz +tar zxvf opensourcecobol4j-v1.1.8.tar.gz +cd opensourcecobol4j-1.1.8 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make diff --git a/ReleaseNote.md b/ReleaseNote.md index ab448e01..b7667290 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,5 +1,3 @@ ### Fix -* Fix bugs related to UTF-8 - * With older versions, DISPLAY statements output invalid UTF-8 data when the arguments are sub items of group fields. - * With older versions, initilizing data with VALUE clauses fails in some cases. \ No newline at end of file +* Fix a bug of duplicate record keys of indexed files \ No newline at end of file diff --git a/configure b/configure index b4ba3b2e..53d72733 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.7-hotfix1. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.8. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.7-hotfix1' -PACKAGE_VERSION='1.1.7-hotfix1' -PACKAGE_STRING='opensource COBOL 4J 1.1.7-hotfix1' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.8' +PACKAGE_VERSION='1.1.8' +PACKAGE_STRING='opensource COBOL 4J 1.1.8' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.7-hotfix1 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.7-hotfix1] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.8] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.7-hotfix1:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.8:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.7-hotfix1 +opensource COBOL 4J configure 1.1.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.7-hotfix1, which was +It was created by opensource COBOL 4J $as_me 1.1.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.7-hotfix1' - VERSION='1.1.7-hotfix1' + PACKAGE='opensource-cobol-4j-1.1.8' + VERSION='1.1.8' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.7-hotfix1, which was +This file was extended by opensource COBOL 4J $as_me 1.1.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.7-hotfix1 +opensource COBOL 4J config.status 1.1.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index cb722b9e..1f6d6e3a 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.7-hotfix1],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.7-hotfix1]) +AC_INIT([opensource COBOL 4J],[1.1.8],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.8]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c8c7110d..694b8d31 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.7-hotfix1" + version = "1.1.8" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 03cc4a52..aa5cc73f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.7-hotfix1"; + public static final String version = "1.1.8"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index aa03ea76..b9f8cbe4 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.7-hotfix1"); + System.out.println("1.1.8"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 903450a2..2dc27427 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.7-hotfix1", + "opensourcecobol4j_version": "1.1.8", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.7-hotfix1", + "opensourcecobol4j_version": "1.1.8", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.7-hotfix1", + "opensourcecobol4j_version": "1.1.8", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.7-hotfix1", + "opensourcecobol4j_version": "1.1.8", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 29ae2679..965bfbc7 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.7-hotfix1]) -m4_define([AT_PACKAGE_VERSION], [1.1.7-hotfix1]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.7-hotfix1]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.8]) +m4_define([AT_PACKAGE_VERSION], [1.1.8]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.8]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index fd32eedc..12a05a38 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.7-hotfix1" +#define PACKAGE "opensource-cobol4j-1.1.8" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.7-hotfix1" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.8" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.7-hotfix1" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.8" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.7-hotfix1" +#define PACKAGE_VERSION "1.1.8" /* Define a patch level */ #define PATCH_LEVEL 0 From 44cf5c351c5be2ac2c46a5d6644348c148d5274c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:58:59 +0900 Subject: [PATCH 103/188] Bump org.gradle.toolchains.foojay-resolver-convention in /libcobj (#617) Bumps org.gradle.toolchains.foojay-resolver-convention from 0.9.0 to 0.10.0. --- updated-dependencies: - dependency-name: org.gradle.toolchains.foojay-resolver-convention dependency-version: 0.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/settings.gradle.kts b/libcobj/settings.gradle.kts index 6f155be8..6eabf8c3 100644 --- a/libcobj/settings.gradle.kts +++ b/libcobj/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0" } rootProject.name = "opensourcecobol4j" From 81bc3998012708dffb4c03a7052ae5e51e5e0e43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:59:10 +0900 Subject: [PATCH 104/188] Bump com.google.guava:guava from 33.4.6-jre to 33.4.7-jre in /libcobj (#616) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.4.6-jre to 33.4.7-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-version: 33.4.7-jre dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 694b8d31..b53e2e10 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.4.6-jre") + implementation("com.google.guava:guava:33.4.7-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.12.1") From 0ed0f183c071edd998429b45cf6f483bdc70f1cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:59:23 +0900 Subject: [PATCH 105/188] Bump com.diffplug.spotless from 7.0.2 to 7.0.3 in /libcobj (#615) Bumps com.diffplug.spotless from 7.0.2 to 7.0.3. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-version: 7.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index b53e2e10..1d86d00a 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.2" + id("com.diffplug.spotless") version "7.0.3" id("java") id("maven-publish") pmd From 6eb6d411a32966a597dc3c80e792e0d413507502 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 09:12:46 +0900 Subject: [PATCH 106/188] Bump org.junit.jupiter:junit-jupiter from 5.12.1 to 5.12.2 in /libcobj (#619) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.12.1 to 5.12.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.12.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 1d86d00a..c43a54c6 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.7-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.12.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250107") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From c731e44d60c1be95ba4e40d9d8fa05121fc06409 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:02:54 +0900 Subject: [PATCH 107/188] Fix casting integers (#618) --- cobj/codegen.c | 14 ++++++++++++-- tests/data-rep.src/binary.at | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index 22186065..617e2b6c 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -1389,14 +1389,24 @@ static void joutput_integer(cb_tree x) { } if (f->size == 2 || f->size == 4 || f->size == 8) { if (f->flag_binary_swap) { + if (!integer_reference_flag) { + switch (f->size) { + case 2: + joutput("(short)("); + break; + case 4: + joutput("(int)("); + break; + } + } joutput_data(x); if (!integer_reference_flag) { switch (f->size) { case 2: - joutput(".bswap_16()"); + joutput(".bswap_16())"); break; case 4: - joutput(".bswap_32()"); + joutput(".bswap_32())"); break; case 8: joutput(".bswap_64()"); diff --git a/tests/data-rep.src/binary.at b/tests/data-rep.src/binary.at index b3a03b46..f24f887e 100644 --- a/tests/data-rep.src/binary.at +++ b/tests/data-rep.src/binary.at @@ -1534,4 +1534,28 @@ AT_DATA([prog.cbl],[ AT_CHECK([${COMPILE} prog.cbl]) AT_CHECK([java prog]) +AT_CLEANUP + +AT_SETUP([COMP: WRITE AFTER LINE]) +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "FILE". + DATA DIVISION. + FILE SECTION. + FD F. + 01 F-REC PIC X(10). + WORKING-STORAGE SECTION. + 01 A PIC S9(6) COMP VALUE 0. + 01 REC PIC X(10). + PROCEDURE DIVISION. + WRITE F-REC FROM REC AFTER A LINE. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cbl]) + AT_CLEANUP \ No newline at end of file From f0412f24d53a284ab91cad5eab4d7203bb7693bf Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 18 Apr 2025 12:38:41 +0900 Subject: [PATCH 108/188] Fix the bug regarding exceeding column 72 with UTF-8 Japanese literal (#621) Fixed the bug regarding exceeding column 72 with UTF-8 Japanese literal. detail: In the case of UTF-8 Japanese strings are used, '\n' would be inserted to column 73. Due to the difference in the number of bytes between SJIS and UTF-8, '\n' may be inserted in a different position than in SJIS, resulting in an error. --- cobj/cobj.c | 21 +++++++++++++++++++++ cobj/cobj.h | 1 + cobj/pplex.l.m4 | 5 +++++ tests/cobol_utf8.src/pic-x.at | 21 +++++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/cobj/cobj.c b/cobj/cobj.c index 18990f36..bbd70a2c 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -705,6 +705,27 @@ int utf8_hankaku_kana(const unsigned char *p) { } return 0; } + +int utf8_calc_sjis_column(const unsigned char *p, int column) { + const unsigned char *start = p; + int char_size = 0; + int i = 0; + + while (i < column && *p != '\0') { + char_size = COB_U8BYTE_1(*p); + if (char_size == 1) { + i++; + p++; + } else if (char_size == 3 && utf8_hankaku_kana(p)) { + i++; + p += char_size; + } else { + i += 2; + p += char_size; + } + } + return p - start; +} #endif /*I18N_UTF8*/ /* diff --git a/cobj/cobj.h b/cobj/cobj.h index db682b25..5c91309c 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -200,6 +200,7 @@ extern void utf8_spc_to_ascii(char *); extern int utf8_national_length(const unsigned char *str, int len); extern size_t utf8_calc_sjis_size(const unsigned char *data, int len); extern int utf8_hankaku_kana(const unsigned char *data); +extern int utf8_calc_sjis_column(const unsigned char *p, int column); #else /*!I18N_UTF8*/ extern const unsigned char *sjis_pick(const unsigned char *); extern size_t sjis_strlen(const unsigned char *); diff --git a/cobj/pplex.l.m4 b/cobj/pplex.l.m4 index 030d78f9..dbdc4cd7 100644 --- a/cobj/pplex.l.m4 +++ b/cobj/pplex.l.m4 @@ -1179,7 +1179,12 @@ start: } /* remove it */ +#ifdef I18N_UTF8 + p = (unsigned char *) buff; + strcpy (buff + utf8_calc_sjis_column(p, cb_text_column), "\n"); +#else /*!I18N_UTF8*/ strcpy (buff + cb_text_column, "\n"); +#endif /*I18N_UTF8*/ last_line_2 = cb_source_line; n = cb_text_column + 1; } diff --git a/tests/cobol_utf8.src/pic-x.at b/tests/cobol_utf8.src/pic-x.at index eb17324d..978c6b0c 100644 --- a/tests/cobol_utf8.src/pic-x.at +++ b/tests/cobol_utf8.src/pic-x.at @@ -614,6 +614,27 @@ AT_CHECK([COB_TERMINAL_ENCODING=UTF-8 java prog], [0], AT_CLEANUP +AT_SETUP([Exceed column 72 with Japanese literal]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 str PIC X(5) VALUE 'アイウエオ'. + PROCEDURE DIVISION. + DISPLAY str. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'アイウエオ +' | nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + #AT_SETUP([Readable string literals]) #export LC_ALL='' ## Older compilers converts string literals "日本語" in COBOL source code From eacba99080d5bb0004da4730f882232d6074ef9b Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 18 Apr 2025 13:08:18 +0900 Subject: [PATCH 109/188] Release 1.1.8 hotfix1 (#622) --- CHANGELOG.md | 8 + ChangeLog | 4 + NEWS | 10 + README.md | 14 +- README_JP.md | 14 +- ReleaseNote.md | 4 +- cobj/pplex.c | 7071 +++++++++-------- cobj/pplex.l | 31 +- configure | 26 +- configure.ac | 2 +- doc/requirements-all.md | 8 + libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +- tests/package.m4 | 6 +- update-version.sh | 1 + win/config.h | 8 +- 18 files changed, 3816 insertions(+), 3405 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df174f63..5c2f5960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.8-hotfix1] - 2025-04-18 + +### Fix + +* Fix code generations for some WRITE statements. + * Older versions of the compiler converts some WRITE statements into invalid Java code. +* Fix the compiler to handle source code with UTF-8 encoded half-width Katakana characters correctly. + ## [1.1.8] - 2025-03-31 ### Fix diff --git a/ChangeLog b/ChangeLog index 2632a6e2..d39de482 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-04-18 OSS Consortium + + * opensource COBOL 4J v1.1.8-hotfix1 released. + 2025-03-31 OSS Consortium * opensource COBOL 4J v1.1.8 released. diff --git a/NEWS b/NEWS index 5620d430..edb17f02 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,16 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.8-hotfix1 + +** Bug Fixes + + (1) Fix code generations for some WRITE statements. + * Older versions of the compiler converts some WRITE statements into invalid Java code. + (2) Fix the compiler to handle source code with UTF-8 encoded half-width Katakana characters correctly. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.8 ** Bug Fixes diff --git a/README.md b/README.md index 03c55a4a..6cbd2729 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz -tar zxvf opensourcecobol4j-v1.1.8.tar.gz -cd opensourcecobol4j-1.1.8 +curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz +cd opensourcecobol4j-1.1.8-hotfix1 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz -tar zxvf opensourcecobol4j-v1.1.8.tar.gz -cd opensourcecobol4j-1.1.8 +curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz +cd opensourcecobol4j-1.1.8-hotfix1 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250307 +docker pull opensourcecobol/opensourcecobol4j:20250418 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 61d50802..81b004c3 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz -tar zxvf opensourcecobol4j-v1.1.8.tar.gz -cd opensourcecobol4j-1.1.8 +curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz +cd opensourcecobol4j-1.1.8-hotfix1 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.8.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8.tar.gz -tar zxvf opensourcecobol4j-v1.1.8.tar.gz -cd opensourcecobol4j-1.1.8 +curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz +tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz +cd opensourcecobol4j-1.1.8-hotfix1 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250307 +docker pull opensourcecobol/opensourcecobol4j:20250418 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index b7667290..a892c077 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,3 +1,5 @@ ### Fix -* Fix a bug of duplicate record keys of indexed files \ No newline at end of file +* Fix code generations for some WRITE statements. + * Older versions of the compiler converts some WRITE statements into invalid Java code. +* Fix the compiler to handle source code with UTF-8 encoded half-width Katakana characters correctly. diff --git a/cobj/pplex.c b/cobj/pplex.c index 3be62fbb..0f3b1b43 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -1,8 +1,8 @@ -#line 2 "pplex.c" +#line 1 "pplex.c" -#line 4 "pplex.c" +#line 3 "pplex.c" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -276,10 +276,10 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -#include #include -#include #include +#include +#include /* end standard C headers. */ @@ -290,10 +290,10 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -310,41 +310,41 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN -#define INT8_MIN (-128) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -368,7 +368,7 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less @@ -379,12 +379,12 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start)-1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin) +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -400,10 +400,9 @@ typedef unsigned int flex_uint32_t; #endif /* __ia64__ */ #endif -/* The state buf must be large enough to hold one state per character in the - * main buffer. +/* The state buf must be large enough to hold one state per character in the main buffer. */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE @@ -422,90 +421,94 @@ extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - -#define YY_LESS_LINENO(n) -#define YY_LINENO_REWIND_TO(ptr) - + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET(yy_c_buf_p) = yy_cp = \ - yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } while (0) -#define unput(c) yyunput(c, (yytext_ptr)) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 -}; + + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -513,8 +516,9 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER \ - ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ @@ -522,62 +526,64 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart(FILE *input_file); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size); -void yy_delete_buffer(YY_BUFFER_STATE b); -void yy_flush_buffer(YY_BUFFER_STATE b); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer); -void yypop_buffer_state(void); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -static void yyensure_buffer_stack(void); -static void yy_load_buffer_state(void); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER) +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size); -YY_BUFFER_STATE yy_scan_string(const char *yy_str); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, int len); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -void *yyalloc(yy_size_t); -void *yyrealloc(void *, yy_size_t); -void yyfree(void *); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define ppwrap() (/*CONSTCOND*/ 1) +#define ppwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -594,820 +600,1129 @@ extern char *yytext; #endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state(void); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state); -static int yy_get_next_buffer(void); -static void yynoreturn yy_fatal_error(const char *msg); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int)(yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 99 #define YY_END_OF_BUFFER 100 /* This struct is not used in this scanner, but its presence is necessary. */ -struct yy_trans_info { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; -}; -static const flex_int16_t yy_accept[609] = { - 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 100, 98, 73, 74, 98, 98, - 76, 77, 98, 98, 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 98, 98, 74, 12, 13, 93, 98, 16, 15, 16, 12, 13, 44, - 20, 21, 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, 44, 44, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 44, 44, 12, 13, 51, 45, 46, 51, 51, - 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, 51, 12, 13, 60, 55, 56, - - 60, 60, 60, 60, 60, 57, 60, 57, 60, 57, 57, 57, 57, 60, 60, 12, 13, - 74, 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, 95, 95, 0, 0, 74, 0, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 74, 93, 0, 12, 1, 13, 93, 16, 1, 12, 1, 13, - 21, 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, 0, 23, 36, 26, 27, 41, - 41, 28, 41, 41, 41, 41, 46, 0, 0, 50, 0, 0, 49, 45, 48, - - 48, 0, 0, 47, 56, 0, 0, 59, 0, 0, 58, 55, 57, 57, 0, 0, 57, - 57, 57, 1, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 0, 95, 0, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, - 95, 1, 1, 1, 41, 41, 29, 41, 41, 41, 41, 41, 41, 57, 57, 57, 0, - 0, 0, 0, 89, 0, 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, 95, 95, - 0, 0, 95, 95, 95, 80, 0, 95, 95, 95, 95, 95, 95, 95, 95, - - 95, 95, 92, 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 52, 57, 57, 82, - 0, 81, 0, 95, 95, 0, 0, 95, 69, 0, 0, 0, 95, 95, 0, 0, 95, - 0, 95, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 0, - 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, 62, 95, 0, 0, 95, - 95, 95, 69, 0, 0, 95, 0, 0, 91, 0, 95, 0, 95, 95, 95, 90, 0, - 95, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, 0, 0, 95, - - 0, 41, 41, 37, 41, 41, 38, 41, 41, 57, 57, 95, 0, 95, 95, 95, 0, - 0, 95, 85, 0, 95, 0, 95, 18, 95, 95, 14, 95, 95, 67, 19, 95, 95, - 78, 0, 0, 0, 35, 33, 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, 95, - 95, 95, 0, 0, 95, 95, 0, 95, 95, 95, 95, 95, 68, 0, 0, 79, 0, - 41, 31, 41, 41, 30, 34, 0, 0, 0, 95, 95, 95, 0, 0, 95, 0, 95, - 0, 0, 95, 95, 95, 95, 61, 83, 0, 39, 32, 40, 86, 0, 0, - - 0, 0, 95, 95, 95, 0, 0, 95, 0, 0, 95, 0, 95, 95, 0, 0, 5, - 0, 0, 0, 95, 95, 95, 0, 10, 95, 0, 6, 0, 95, 95, 0, 0, 0, - 0, 0, 0, 95, 95, 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, 0, 0, - 0, 8, 65, 64, 0, 0, 0, 95, 0, 0, 0, 0, 0, 95, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 0, 0, 9, 0, 0, 0, 0, 88, 7, - - 0, 0, 0, 0, 0, 2, 0, 0}; - -static const YY_CHAR yy_ec[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, - 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, 14, 14, 14, 14, - 14, 1, 18, 1, 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 38, 47, 47, 47, 47, - 38, 47, 48, 49, 50, 51, - - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 38, 64, 65, 66, 67, 68, 69, - 70, 71, 38, 47, 47, 47, 47, 1, 47, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, - - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 1, 1, 1}; - -static const YY_CHAR yy_meta[75] = { - 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}; - -static const flex_int16_t yy_base[632] = { - 0, 0, 72, 74, 82, 144, 70, 218, 291, 364, 83, 871, - 3699, 3699, 241, 866, 858, 3699, 3699, 839, 87, 243, 252, 95, - 260, 245, 429, 67, 436, 432, 446, 473, 501, 517, 512, 539, - 532, 545, 609, 617, 268, 831, 0, 586, 625, 0, 3699, 829, - 808, 0, 3699, 3699, 246, 808, 787, 3699, 3699, 771, 103, 651, - 633, 111, 659, 248, 755, 276, 487, 645, 667, 671, 674, 677, - 681, 684, 699, 703, 748, 767, 753, 0, 3699, 3699, 249, 764, - 747, 717, 119, 784, 792, 340, 801, 448, 715, 717, 810, 822, - 699, 0, 3699, 3699, 251, - - 710, 698, 679, 449, 838, 865, 873, 881, 471, 832, 850, 889, - 899, 918, 931, 677, 0, 258, 671, 676, 3699, 646, 0, 903, - 965, 3699, 270, 601, 835, 973, 981, 989, 275, 589, 997, 1001, - 1012, 1006, 1025, 1009, 1028, 1051, 1031, 1055, 1077, 1096, 1101, 1127, - 1104, 1108, 1150, 1083, 1122, 1133, 1155, 1130, 475, 226, 571, 0, - 0, 0, 1176, 0, 0, 0, 0, 0, 286, 565, 579, 3699, - 577, 1202, 1219, 3699, 1173, 1227, 1240, 1248, 3699, 1199, 1220, 1256, - 1264, 1267, 1270, 1278, 1295, 1334, 1300, 442, 554, 568, 3699, 565, - 1364, 1374, 3699, 1291, - - 1384, 1398, 1406, 3699, 444, 513, 527, 3699, 512, 1414, 1422, 3699, - 1392, 1432, 1456, 1464, 1423, 1477, 1451, 0, 1480, 1496, 953, 1518, - 1490, 1506, 1510, 1532, 1549, 1440, 1545, 1554, 1564, 1578, 481, 1581, - 1645, 1575, 1597, 1629, 1661, 1655, 1669, 1673, 1676, 1679, 1690, 1693, - 1697, 1758, 1766, 1725, 0, 0, 0, 1774, 1743, 1778, 1781, 1791, - 1800, 1795, 1807, 1813, 1819, 1828, 1845, 1879, 1895, 1911, 1919, 312, - 466, 1887, 1909, 1865, 1912, 1933, 1929, 698, 1957, 1951, 1936, 1977, - 1945, 68, 455, 1981, 1984, 1988, 320, 449, 2017, 2020, 2002, 2025, - 2030, 2033, 2052, 2067, - - 2075, 2097, 329, 446, 2100, 2058, 2103, 2108, 2055, 2131, 2144, 2122, - 2125, 2134, 2173, 2177, 345, 434, 563, 431, 2180, 2199, 961, 2212, - 2224, 2208, 39, 77, 422, 2227, 2252, 2288, 2296, 2265, 213, 2306, - 2276, 2282, 2317, 2353, 2332, 2318, 2346, 2341, 2335, 2365, 2370, 2374, - 2382, 2399, 2414, 2446, 2438, 2424, 2454, 2463, 2458, 2467, 2471, 2480, - 2489, 2495, 2513, 2492, 2537, 419, 419, 2544, 2559, 2563, 3699, 418, - 424, 2547, 2574, 2627, 592, 332, 2587, 498, 2603, 2614, 2595, 599, - 330, 2591, 2640, 2635, 2643, 2660, 2667, 2679, 3699, 3699, 3699, 2682, - 943, 310, 2707, 2724, - - 2746, 2718, 2731, 2738, 2754, 2765, 2768, 2774, 2771, 2761, 2790, 2795, - 271, 2818, 2841, 2844, 545, 616, 2838, 1269, 301, 2810, 417, 2847, - 2807, 2874, 2863, 2877, 2883, 2889, 2894, 2897, 2911, 2922, 1302, 298, - 2928, 2964, 2916, 2941, 2961, 2981, 2989, 2994, 2998, 3011, 2953, 3005, - 3034, 622, 3031, 3018, 3039, 459, 471, 3046, 3076, 632, 3085, 3089, - 3098, 3103, 3113, 3110, 3124, 3177, 3129, 266, 3153, 3142, 3156, 3162, - 3167, 3185, 3216, 3238, 483, 3211, 3190, 3235, 652, 668, 3226, 1459, - 3256, 3279, 659, 3270, 3267, 3201, 3294, 3259, 1310, 259, 3299, 3303, - 3310, 1338, 665, 523, - - 258, 682, 3315, 3323, 3326, 686, 759, 3339, 767, 242, 3334, 768, - 3348, 3374, 1466, 3412, 3344, 799, 864, 810, 3382, 3392, 3358, 823, - 3699, 3429, 617, 3403, 527, 3433, 3425, 838, 122, 853, 1107, 121, - 865, 3441, 3457, 3438, 3699, 1671, 3505, 884, 1005, 3699, 117, 3471, - 3462, 712, 954, 961, 3699, 3467, 3475, 993, 116, 745, 3515, 996, - 996, 995, 762, 1002, 3481, 838, 1311, 1019, 1036, 1069, 1786, 3545, - 1091, 3565, 111, 1160, 866, 1163, 1191, 109, 1234, 1596, 1276, 1291, - 1353, 906, 1296, 1523, 1297, 1548, 3699, 101, 1319, 3699, 3569, 93, - 1331, 994, 1699, 3699, - - 1339, 1341, 1350, 1646, 1728, 3699, 87, 3699, 3641, 3644, 3647, 3650, - 97, 3653, 3656, 3659, 3662, 3665, 3668, 3671, 91, 3674, 3677, 90, - 3680, 3683, 89, 3686, 3689, 3692, 3695}; - -static const flex_int16_t yy_def[632] = { - 0, 608, 1, 609, 609, 608, 5, 610, 610, 608, 9, 608, 608, 608, 608, - 611, 612, 608, 608, 608, 608, 608, 613, 608, 613, 608, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 614, 615, 613, 613, - 616, 608, 616, 617, 618, 608, 608, 608, 619, 620, 608, 608, 608, 608, 608, - 621, 608, 621, 608, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 621, 621, 614, 615, 608, 608, 608, 622, 623, 608, 608, 608, 624, 608, - 624, 608, 608, 624, 624, 624, 614, 615, 608, 608, 608, - - 625, 626, 608, 608, 608, 627, 608, 627, 608, 627, 627, 627, 627, 627, 627, - 614, 615, 608, 608, 611, 608, 612, 628, 608, 608, 608, 608, 608, 613, 613, - 613, 613, 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 608, 608, 614, - 629, 615, 613, 616, 630, 617, 631, 618, 608, 608, 619, 608, 620, 608, 608, - 608, 621, 621, 621, 621, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 608, 608, 622, 608, 623, 608, 608, 608, 624, - - 624, 624, 624, 608, 608, 608, 625, 608, 626, 608, 608, 608, 627, 627, 627, - 627, 627, 627, 627, 628, 613, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 629, 630, 631, 621, 621, 621, 621, 621, - 621, 621, 621, 621, 627, 627, 627, 608, 613, 608, 613, 608, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, 608, 608, 613, 613, 613, - 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, - - 613, 613, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, - 627, 608, 608, 608, 608, 613, 613, 608, 613, 613, 613, 608, 608, 608, 613, - 613, 608, 613, 613, 608, 613, 613, 613, 608, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 608, 613, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 613, 608, 608, 613, 613, 613, 608, 608, 608, 613, 608, - 613, 608, 608, 613, 608, 613, 613, 613, 608, 608, 613, 613, 613, 613, 613, - 613, 613, 608, 608, 608, 613, 608, 608, 608, 613, - - 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, 613, 608, 613, 613, - 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 608, 613, 613, 613, 608, 608, 613, 613, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 608, 608, 621, 621, 621, 621, 621, 621, 608, - 613, 608, 613, 613, 613, 608, 608, 613, 608, 613, 613, 608, 613, 613, 613, - 613, 613, 608, 608, 621, 621, 621, 608, 608, 608, - - 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 608, - 613, 613, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 613, 608, 613, - 613, 608, 608, 608, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, - 608, 608, 613, 613, 608, 608, 608, 608, 613, 613, 608, 608, 608, 613, 608, - 608, 608, 608, 608, 613, 608, 608, 608, 608, 608, 608, 613, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608}; - -static const flex_int16_t yy_nxt[3774] = { - 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12, 24, - 24, 24, 24, 25, 12, 12, 12, 26, 27, 28, 29, 30, 31, 27, 27, - 32, 27, 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, 27, 37, 27, - 27, 27, 12, 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, 27, 27, - 27, 27, 27, 33, 34, 35, 36, 27, 37, 27, 27, 27, 38, 39, 27, - 40, 46, 608, 78, 608, 41, 372, 47, 79, 46, 42, 43, 43, 43, 43, - 48, 116, 213, 200, 177, 49, 117, 124, 335, 124, 129, - - 125, 125, 125, 125, 124, 372, 124, 605, 125, 125, 125, 125, 174, 595, 174, - 373, 175, 175, 175, 175, 174, 590, 174, 335, 175, 175, 175, 175, 197, 571, - 197, 574, 198, 198, 198, 198, 542, 545, 131, 132, 373, 535, 515, 44, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 50, 62, 62, 62, - 62, 63, 64, 50, 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, 69, - 67, 70, 67, 67, 71, 72, 67, 73, 74, 75, 67, 67, 67, 67, 67, - 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, - - 69, 67, 70, 67, 67, 71, 72, 73, 74, 75, 67, 67, 67, 67, 67, - 76, 77, 67, 80, 81, 82, 83, 84, 80, 80, 85, 86, 87, 88, 89, - 80, 90, 90, 90, 90, 91, 92, 80, 80, 158, 158, 158, 158, 118, 126, - 127, 126, 133, 169, 176, 169, 192, 124, 205, 124, 380, 125, 125, 125, 125, - 118, 124, 484, 124, 80, 130, 130, 130, 130, 124, 157, 124, 127, 130, 130, - 130, 130, 133, 475, 465, 380, 158, 158, 158, 158, 608, 437, 608, 169, 94, - 95, 80, 81, 82, 83, 84, 80, 80, 96, 86, - - 87, 88, 89, 97, 90, 90, 90, 90, 91, 92, 80, 80, 119, 450, 128, - 182, 134, 170, 399, 170, 193, 375, 206, 131, 132, 272, 272, 272, 272, 119, - 351, 131, 132, 291, 291, 291, 291, 80, 450, 159, 182, 128, 303, 303, 303, - 303, 134, 179, 180, 197, 339, 197, 332, 198, 198, 198, 198, 170, 317, 317, - 317, 317, 94, 95, 98, 99, 100, 101, 102, 98, 98, 103, 104, 105, 106, - 107, 98, 108, 108, 108, 108, 109, 98, 98, 98, 110, 110, 111, 110, 110, - 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, - - 110, 110, 113, 110, 110, 110, 110, 110, 110, 110, 98, 110, 110, 111, 110, - 110, 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, 110, 113, 110, 110, - 110, 110, 110, 110, 110, 114, 115, 110, 608, 323, 608, 608, 280, 608, 192, - 608, 205, 608, 413, 199, 192, 270, 417, 140, 268, 608, 458, 608, 210, 418, - 210, 135, 211, 211, 211, 211, 250, 136, 137, 240, 138, 139, 212, 205, 413, - 235, 141, 157, 417, 140, 142, 458, 608, 235, 608, 418, 223, 135, 158, 158, - 158, 158, 136, 137, 143, 138, 608, 139, 608, 481, - - 131, 132, 141, 131, 132, 286, 142, 131, 132, 482, 608, 144, 608, 193, 145, - 206, 208, 131, 132, 193, 143, 608, 502, 608, 481, 146, 608, 423, 608, 545, - 208, 286, 183, 205, 482, 147, 144, 151, 546, 145, 148, 608, 206, 608, 131, - 132, 159, 502, 608, 149, 608, 146, 287, 423, 608, 150, 608, 183, 179, 180, - 154, 147, 519, 151, 152, 148, 156, 155, 454, 195, 153, 195, 131, 132, 192, - 149, 319, 319, 319, 319, 150, 172, 172, 131, 132, 169, 154, 519, 131, 132, - 152, 157, 156, 155, 454, 124, 153, 124, 547, 163, - - 163, 163, 163, 131, 132, 377, 377, 377, 377, 133, 131, 132, 384, 384, 384, - 384, 131, 132, 608, 608, 608, 127, 608, 608, 608, 608, 608, 608, 608, 118, - 608, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 608, 174, 455, 174, - 157, 178, 178, 178, 178, 121, 477, 176, 169, 608, 129, 608, 131, 132, 544, - 174, 487, 174, 129, 175, 175, 175, 175, 174, 455, 174, 129, 178, 178, 178, - 178, 608, 477, 608, 121, 608, 506, 608, 608, 544, 608, 608, 487, 608, 507, - 608, 118, 608, 608, 512, 608, 161, 518, 123, 186, - - 280, 184, 208, 187, 179, 180, 185, 506, 608, 189, 608, 520, 608, 208, 608, - 507, 179, 180, 161, 188, 512, 524, 170, 518, 327, 186, 608, 184, 608, 187, - 179, 180, 185, 204, 328, 189, 123, 520, 179, 180, 190, 191, 179, 180, 188, - 179, 180, 524, 179, 180, 327, 195, 179, 180, 560, 179, 180, 608, 608, 608, - 328, 608, 608, 608, 608, 190, 191, 195, 169, 329, 179, 180, 161, 181, 179, - 180, 608, 608, 608, 560, 608, 608, 608, 608, 564, 199, 192, 177, 202, 203, - 123, 172, 525, 197, 177, 197, 527, 198, 198, 198, - - 198, 197, 529, 197, 569, 201, 201, 201, 201, 564, 197, 172, 197, 177, 201, - 201, 201, 201, 525, 608, 608, 608, 527, 608, 608, 608, 608, 167, 529, 569, - 192, 608, 608, 608, 534, 608, 608, 608, 608, 212, 205, 608, 200, 608, 608, - 537, 608, 210, 165, 210, 161, 211, 211, 211, 211, 193, 200, 541, 123, 608, - 534, 608, 121, 202, 203, 535, 535, 550, 200, 121, 608, 537, 202, 203, 210, - 551, 210, 573, 214, 214, 214, 214, 210, 541, 210, 217, 211, 211, 211, 211, - 210, 608, 210, 550, 214, 214, 214, 214, 608, 553, - - 608, 551, 573, 215, 216, 584, 131, 132, 608, 206, 608, 217, 124, 558, 124, - 608, 125, 125, 125, 125, 608, 215, 216, 218, 219, 553, 608, 608, 608, 608, - 584, 608, 608, 608, 608, 536, 215, 216, 205, 558, 608, 608, 608, 608, 608, - 608, 608, 608, 593, 218, 219, 213, 215, 216, 223, 223, 397, 397, 397, 397, - 215, 216, 608, 323, 213, 608, 272, 272, 272, 272, 215, 216, 608, 593, 124, - 561, 124, 213, 125, 125, 125, 125, 124, 608, 124, 366, 130, 130, 130, 130, - 608, 608, 608, 562, 608, 608, 608, 608, 608, 608, - - 608, 561, 608, 608, 608, 608, 608, 545, 608, 129, 608, 366, 608, 223, 223, - 608, 546, 608, 608, 562, 608, 608, 563, 608, 273, 566, 222, 129, 567, 221, - 568, 570, 367, 601, 608, 129, 608, 608, 608, 608, 608, 576, 608, 608, 131, - 132, 225, 608, 563, 228, 608, 566, 222, 229, 567, 221, 568, 570, 601, 226, - 608, 227, 608, 232, 608, 577, 608, 576, 131, 132, 608, 225, 131, 132, 228, - 230, 547, 131, 132, 229, 131, 132, 608, 224, 132, 226, 608, 227, 608, 232, - 233, 577, 608, 231, 608, 608, 131, 132, 235, 131, - - 132, 230, 131, 132, 578, 608, 247, 608, 535, 535, 608, 234, 608, 608, 608, - 608, 233, 608, 231, 608, 581, 236, 131, 132, 238, 608, 131, 132, 240, 240, - 578, 608, 247, 608, 552, 608, 608, 234, 608, 608, 239, 608, 608, 243, 608, - 242, 581, 236, 131, 132, 238, 248, 608, 608, 131, 132, 250, 250, 608, 608, - 552, 608, 252, 608, 608, 239, 608, 237, 132, 243, 242, 249, 131, 132, 244, - 131, 132, 248, 536, 131, 132, 583, 608, 245, 608, 124, 246, 124, 252, 163, - 163, 163, 163, 131, 132, 608, 249, 585, 241, 132, - - 244, 131, 132, 608, 131, 132, 608, 583, 608, 245, 608, 174, 246, 174, 608, - 175, 175, 175, 175, 608, 586, 131, 132, 585, 608, 608, 251, 132, 174, 608, - 174, 608, 175, 175, 175, 175, 174, 608, 174, 608, 178, 178, 178, 178, 179, - 180, 586, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 177, 587, 179, 180, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 420, 420, 420, 420, 177, 608, 257, 608, - 608, 179, 180, 256, 177, 587, 258, 608, 179, 180, - - 608, 608, 608, 259, 608, 608, 608, 260, 588, 608, 608, 608, 574, 574, 257, - 435, 435, 435, 435, 256, 589, 264, 258, 493, 493, 493, 493, 179, 180, 259, - 594, 261, 597, 260, 588, 179, 180, 608, 179, 180, 608, 179, 180, 608, 608, - 608, 589, 264, 598, 179, 180, 498, 498, 498, 498, 590, 594, 261, 597, 608, - 262, 608, 202, 203, 591, 600, 179, 180, 602, 608, 263, 179, 180, 197, 598, - 197, 603, 198, 198, 198, 198, 608, 575, 197, 604, 197, 262, 198, 198, 198, - 198, 600, 608, 197, 602, 197, 263, 201, 201, 201, - - 201, 608, 603, 608, 608, 179, 180, 608, 608, 608, 604, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 210, 592, 210, 200, 211, 211, 211, - 211, 210, 608, 210, 608, 211, 211, 211, 211, 608, 608, 210, 280, 210, 200, - 214, 214, 214, 214, 608, 608, 608, 200, 608, 608, 202, 203, 608, 608, 265, - 608, 484, 608, 215, 216, 608, 608, 608, 515, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 268, 268, 509, 213, 265, 608, 267, 608, 608, - 532, 608, 608, 608, 215, 216, 608, 270, 270, 608, - - 266, 608, 213, 215, 216, 608, 608, 608, 608, 509, 213, 281, 132, 267, 608, - 608, 532, 608, 274, 608, 608, 608, 215, 216, 595, 595, 266, 608, 608, 608, - 510, 608, 608, 608, 608, 608, 608, 533, 223, 608, 608, 608, 608, 608, 274, - 275, 608, 608, 215, 216, 590, 269, 132, 277, 608, 276, 608, 278, 608, 591, - 608, 131, 132, 608, 129, 608, 608, 271, 132, 608, 275, 608, 279, 608, 282, - 608, 608, 131, 132, 277, 276, 131, 132, 278, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 283, 596, 608, 608, 284, 279, 608, - - 282, 285, 608, 131, 132, 608, 608, 289, 608, 582, 582, 582, 582, 608, 608, - 288, 131, 132, 283, 592, 131, 132, 608, 284, 608, 131, 132, 285, 608, 608, - 240, 240, 608, 289, 608, 131, 132, 290, 608, 608, 608, 288, 291, 291, 291, - 291, 131, 132, 605, 131, 132, 608, 131, 132, 608, 608, 608, 606, 608, 608, - 608, 608, 290, 608, 608, 235, 608, 608, 131, 132, 608, 608, 608, 542, 608, - 608, 608, 608, 608, 608, 608, 240, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 129, 294, 608, 293, 556, 295, 297, 296, 608, - - 292, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 298, 599, 599, 599, - 599, 608, 607, 294, 293, 608, 556, 295, 297, 296, 608, 131, 132, 608, 300, - 605, 299, 301, 608, 608, 608, 608, 298, 302, 606, 131, 132, 557, 608, 131, - 132, 608, 131, 132, 608, 131, 132, 608, 608, 608, 300, 299, 608, 301, 250, - 250, 131, 132, 302, 131, 132, 305, 307, 131, 132, 608, 303, 303, 303, 303, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 250, 608, 571, 608, - 608, 305, 608, 307, 608, 608, 131, 132, 608, 607, - - 608, 608, 608, 608, 608, 608, 608, 308, 306, 608, 579, 608, 129, 608, 179, - 180, 608, 608, 608, 608, 608, 311, 608, 608, 608, 309, 608, 608, 608, 304, - 608, 608, 310, 308, 306, 608, 579, 608, 608, 608, 608, 608, 313, 312, 608, - 179, 180, 311, 608, 179, 180, 309, 179, 180, 608, 608, 608, 580, 310, 608, - 315, 608, 179, 180, 314, 608, 179, 180, 313, 312, 608, 179, 180, 608, 608, - 608, 608, 316, 179, 180, 268, 268, 608, 608, 179, 180, 315, 608, 608, 314, - 215, 216, 317, 317, 317, 317, 608, 608, 608, 215, - - 216, 608, 608, 316, 608, 608, 608, 608, 608, 608, 608, 608, 270, 270, 323, - 268, 215, 216, 608, 608, 608, 608, 321, 608, 319, 319, 319, 319, 608, 608, - 608, 608, 608, 608, 608, 608, 131, 132, 608, 270, 608, 129, 608, 325, 608, - 608, 608, 608, 321, 322, 318, 608, 608, 608, 608, 608, 608, 608, 131, 132, - 608, 331, 608, 608, 608, 129, 608, 608, 608, 326, 608, 608, 608, 608, 322, - 608, 608, 280, 332, 332, 131, 132, 320, 324, 132, 334, 608, 331, 608, 330, - 608, 608, 608, 608, 326, 608, 608, 608, 608, 608, - - 131, 132, 608, 129, 131, 132, 608, 131, 132, 338, 334, 608, 608, 608, 330, - 608, 131, 132, 339, 339, 608, 336, 131, 132, 608, 337, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 338, 608, 608, 608, 608, 342, 608, 608, 608, 608, - 341, 336, 608, 333, 132, 337, 343, 131, 132, 345, 131, 132, 608, 608, 131, - 132, 608, 608, 608, 608, 342, 608, 608, 344, 608, 608, 341, 608, 131, 132, - 608, 608, 343, 608, 608, 345, 347, 348, 349, 608, 608, 608, 354, 340, 132, - 346, 131, 132, 344, 608, 357, 131, 132, 351, 351, - - 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 608, 354, 608, - 346, 350, 608, 608, 608, 357, 608, 608, 131, 132, 353, 179, 180, 608, 179, - 180, 608, 355, 608, 608, 608, 608, 356, 131, 132, 608, 350, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 353, 358, 608, 608, 608, 608, 361, 355, 608, - 360, 608, 608, 356, 608, 608, 608, 608, 352, 132, 608, 131, 132, 359, 179, - 180, 608, 608, 358, 179, 180, 608, 608, 361, 608, 360, 608, 608, 608, 608, - 608, 608, 608, 179, 180, 608, 179, 180, 363, 359, - - 608, 608, 179, 180, 608, 215, 216, 608, 608, 608, 608, 608, 608, 608, 362, - 179, 180, 608, 364, 371, 365, 608, 608, 608, 363, 608, 608, 608, 608, 608, - 608, 608, 323, 608, 608, 608, 608, 608, 608, 362, 608, 608, 608, 364, 215, - 216, 365, 368, 215, 216, 608, 131, 132, 375, 375, 608, 608, 369, 129, 608, - 608, 608, 374, 608, 608, 608, 608, 370, 608, 608, 131, 132, 608, 368, 608, - 608, 608, 608, 608, 131, 132, 608, 608, 369, 608, 608, 608, 608, 374, 332, - 332, 608, 370, 608, 379, 131, 132, 608, 131, 132, - - 382, 377, 377, 377, 377, 608, 608, 608, 608, 608, 608, 608, 608, 608, 383, - 608, 332, 608, 339, 339, 379, 608, 608, 376, 132, 608, 382, 608, 608, 608, - 384, 384, 384, 384, 608, 381, 131, 132, 608, 388, 383, 608, 129, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, 386, 608, 391, 378, - 608, 381, 608, 608, 608, 388, 608, 608, 608, 608, 608, 387, 390, 339, 608, - 389, 608, 131, 132, 608, 608, 393, 386, 608, 391, 394, 608, 608, 385, 131, - 132, 608, 608, 395, 392, 608, 387, 608, 390, 129, - - 608, 389, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, - 351, 351, 131, 132, 608, 392, 608, 608, 608, 608, 608, 396, 397, 397, 397, - 397, 608, 608, 608, 608, 608, 131, 132, 608, 399, 399, 131, 132, 608, 608, - 131, 132, 608, 608, 608, 608, 608, 396, 131, 132, 608, 608, 608, 402, 608, - 608, 608, 608, 608, 608, 608, 351, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 400, 608, 608, 608, 608, 608, 608, 402, 398, 608, 405, 403, 608, - 406, 608, 129, 608, 608, 179, 180, 608, 608, 608, - - 608, 608, 400, 608, 608, 408, 608, 404, 608, 401, 132, 608, 608, 405, 403, - 407, 406, 608, 409, 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 179, - 180, 408, 404, 608, 179, 180, 411, 608, 179, 180, 407, 608, 179, 180, 409, - 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 608, 608, 608, 608, 608, - 179, 180, 411, 131, 132, 608, 215, 216, 608, 608, 608, 412, 608, 608, 608, - 375, 375, 608, 608, 414, 608, 419, 608, 608, 215, 216, 608, 420, 420, 420, - 420, 608, 608, 608, 415, 608, 608, 412, 608, 608, - - 608, 416, 608, 608, 608, 414, 608, 419, 131, 132, 608, 608, 608, 608, 608, - 131, 132, 608, 131, 132, 415, 608, 422, 608, 608, 608, 416, 426, 608, 424, - 131, 132, 427, 608, 131, 132, 608, 608, 608, 425, 608, 608, 608, 608, 608, - 421, 608, 375, 422, 608, 608, 608, 608, 426, 608, 424, 608, 427, 131, 132, - 608, 608, 131, 132, 608, 425, 131, 132, 429, 608, 608, 608, 608, 129, 131, - 132, 608, 430, 608, 428, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 432, 608, 429, 608, 608, 608, 608, 431, - - 608, 608, 608, 430, 428, 608, 131, 132, 399, 399, 434, 131, 132, 608, 131, - 132, 608, 608, 432, 433, 435, 435, 435, 435, 431, 437, 437, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 434, 608, 131, 132, 608, 608, 608, 608, 433, - 439, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 440, 608, - 608, 608, 608, 608, 608, 608, 399, 441, 608, 608, 608, 439, 608, 608, 608, - 608, 608, 608, 436, 608, 608, 608, 608, 608, 440, 608, 447, 608, 442, 179, - 180, 608, 129, 441, 443, 438, 132, 444, 608, 608, - - 608, 608, 179, 180, 608, 446, 608, 608, 608, 179, 180, 608, 447, 445, 442, - 448, 608, 608, 608, 608, 443, 608, 608, 444, 608, 179, 180, 608, 608, 608, - 608, 446, 215, 216, 608, 449, 179, 180, 445, 179, 180, 448, 179, 180, 457, - 179, 180, 608, 608, 608, 608, 451, 608, 608, 608, 608, 608, 608, 608, 608, - 449, 215, 216, 608, 608, 452, 131, 132, 608, 608, 457, 456, 608, 453, 608, - 608, 459, 451, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 131, - 132, 452, 608, 462, 608, 460, 608, 456, 608, 453, - - 608, 461, 459, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 463, - 131, 132, 608, 131, 132, 608, 460, 608, 465, 465, 608, 461, 608, 608, 437, - 437, 608, 608, 608, 131, 132, 608, 608, 608, 608, 463, 467, 467, 467, 467, - 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 464, 608, 608, 608, - 131, 132, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 464, 131, 132, 437, 608, 608, 179, 180, 608, - 608, 608, 608, 466, 132, 469, 608, 608, 608, 468, - - 608, 608, 608, 608, 608, 608, 608, 608, 470, 608, 129, 608, 179, 180, 608, - 608, 608, 608, 608, 608, 608, 469, 608, 471, 215, 216, 608, 608, 472, 608, - 608, 608, 179, 180, 470, 475, 475, 473, 474, 608, 608, 608, 608, 608, 608, - 608, 608, 479, 608, 471, 608, 608, 179, 180, 472, 608, 608, 608, 608, 608, - 179, 180, 473, 608, 474, 179, 180, 478, 608, 179, 180, 483, 608, 479, 608, - 608, 215, 216, 484, 480, 608, 608, 179, 180, 608, 608, 485, 608, 608, 131, - 132, 608, 608, 478, 608, 608, 608, 483, 608, 608, - - 608, 608, 131, 132, 480, 476, 132, 608, 488, 608, 131, 132, 608, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 490, 608, 465, 465, 608, 608, 489, - 437, 437, 491, 608, 488, 608, 608, 493, 493, 493, 493, 608, 467, 467, 467, - 467, 608, 486, 132, 490, 608, 608, 492, 608, 489, 608, 131, 132, 491, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 131, - 132, 608, 492, 608, 608, 495, 131, 132, 496, 131, 132, 608, 608, 608, 497, - 608, 608, 608, 608, 608, 494, 608, 465, 608, 608, - - 468, 608, 608, 515, 608, 608, 495, 608, 608, 496, 608, 608, 608, 179, 180, - 497, 504, 475, 475, 608, 608, 608, 608, 129, 179, 180, 608, 179, 180, 498, - 498, 498, 498, 179, 180, 608, 608, 608, 179, 180, 503, 608, 504, 499, 608, - 500, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 179, 180, 475, 608, - 508, 131, 132, 608, 608, 608, 503, 608, 608, 499, 608, 500, 516, 132, 608, - 505, 608, 608, 608, 608, 608, 608, 131, 132, 129, 511, 508, 501, 608, 608, - 608, 513, 608, 608, 608, 608, 514, 131, 132, 484, - - 505, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 511, 608, 608, 608, - 608, 608, 513, 517, 608, 608, 608, 514, 608, 608, 129, 608, 131, 132, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 517, - 608, 608, 521, 608, 608, 608, 523, 522, 608, 608, 608, 608, 608, 528, 608, - 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 179, 180, 608, 521, 179, - 180, 608, 523, 522, 526, 608, 179, 180, 608, 528, 608, 131, 132, 530, 608, - 608, 608, 540, 608, 131, 132, 608, 131, 132, 608, - - 608, 608, 608, 608, 526, 131, 132, 538, 608, 531, 131, 132, 608, 530, 608, - 131, 132, 539, 540, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 542, 515, 538, 608, 531, 608, 608, 608, 608, 608, 608, 608, 539, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 129, 549, - 608, 608, 548, 131, 132, 554, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 608, 608, 608, 608, 608, 555, 608, 571, 608, 549, 608, 608, 548, 608, - 608, 554, 608, 608, 608, 608, 131, 132, 608, 608, - - 543, 132, 608, 608, 131, 132, 559, 555, 608, 131, 132, 608, 131, 132, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 542, 608, 608, 131, 132, - 608, 608, 559, 131, 132, 608, 608, 608, 131, 132, 608, 608, 131, 132, 608, - 608, 131, 132, 608, 565, 608, 129, 572, 132, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 571, 574, 574, 608, 608, 595, 595, 608, 608, 608, - 565, 608, 608, 582, 582, 582, 582, 599, 599, 599, 599, 131, 132, 608, 608, - 608, 129, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 575, 608, 608, 608, 596, 45, 45, 45, 93, - 93, 93, 120, 608, 120, 122, 608, 122, 160, 608, 160, 162, 608, 162, 164, - 608, 164, 166, 608, 166, 168, 608, 168, 171, 608, 171, 173, 608, 173, 194, - 608, 194, 196, 608, 196, 207, 608, 207, 209, 608, 209, 220, 608, 220, 253, - 608, 253, 254, 608, 254, 255, 608, 255, 11, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; - -static const flex_int16_t yy_chk[3774] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 27, 6, 27, 2, 327, 3, 6, 4, 2, 2, 2, 2, 2, - 4, 10, 627, 624, 621, 4, 10, 20, 286, 20, 613, - - 20, 20, 20, 20, 23, 327, 23, 607, 23, 23, 23, 23, 58, 596, 58, - 328, 58, 58, 58, 58, 61, 592, 61, 286, 61, 61, 61, 61, 86, 580, - 86, 575, 86, 86, 86, 86, 557, 547, 27, 27, 328, 536, 533, 2, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 158, 158, 158, 158, 14, 21, - 21, 25, 25, 52, 63, 63, 82, 21, 100, 21, 335, 21, 21, 21, 21, - 118, 22, 510, 22, 7, 22, 22, 22, 22, 24, 40, 24, 127, 24, 24, - 24, 24, 133, 501, 494, 335, 40, 40, 40, 40, 65, 468, 65, 169, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 413, 21, - 65, 25, 52, 436, 63, 82, 421, 100, 22, 22, 272, 272, 272, 272, 118, - 398, 24, 24, 291, 291, 291, 291, 8, 413, 40, 65, 127, 303, 303, 303, - 303, 133, 65, 65, 89, 385, 89, 378, 89, 89, 89, 89, 169, 317, 317, - 317, 317, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 26, 367, 26, 29, 329, 29, 192, - 28, 205, 28, 366, 91, 91, 320, 372, 29, 318, 30, 423, 30, 104, 373, - 104, 26, 104, 104, 104, 104, 304, 26, 26, 292, 26, 28, 109, 109, 366, - 287, 30, 157, 372, 29, 30, 423, 31, 235, 31, 373, 273, 26, 157, 157, - 157, 157, 26, 26, 31, 26, 66, 28, 66, 454, - - 26, 26, 30, 29, 29, 235, 30, 28, 28, 455, 32, 31, 32, 192, 31, - 205, 209, 30, 30, 91, 31, 34, 477, 34, 454, 32, 33, 380, 33, 529, - 207, 235, 66, 206, 455, 32, 31, 34, 529, 31, 32, 36, 109, 36, 31, - 31, 157, 477, 35, 33, 35, 32, 235, 380, 37, 33, 37, 66, 66, 66, - 36, 32, 500, 34, 35, 32, 37, 36, 417, 196, 35, 194, 32, 32, 193, - 33, 319, 319, 319, 319, 33, 173, 171, 34, 34, 170, 36, 500, 33, 33, - 35, 159, 37, 36, 417, 43, 35, 43, 529, 43, - - 43, 43, 43, 36, 36, 377, 377, 377, 377, 134, 35, 35, 384, 384, 384, - 384, 37, 37, 38, 38, 38, 128, 38, 38, 38, 38, 39, 39, 39, 38, - 39, 39, 39, 39, 44, 44, 44, 39, 44, 44, 44, 44, 60, 418, 60, - 44, 60, 60, 60, 60, 122, 450, 59, 59, 67, 38, 67, 43, 43, 527, - 59, 458, 59, 39, 59, 59, 59, 59, 62, 418, 62, 44, 62, 62, 62, - 62, 68, 450, 68, 120, 69, 481, 69, 70, 527, 70, 71, 458, 71, 482, - 72, 119, 72, 73, 487, 73, 116, 499, 103, 70, - - 280, 68, 102, 71, 60, 60, 69, 481, 74, 73, 74, 502, 75, 101, 75, - 482, 67, 67, 96, 72, 487, 506, 59, 499, 280, 70, 93, 68, 93, 71, - 62, 62, 69, 92, 280, 73, 85, 502, 68, 68, 74, 75, 69, 69, 72, - 70, 70, 506, 71, 71, 280, 84, 72, 72, 550, 73, 73, 76, 76, 76, - 280, 76, 76, 76, 76, 74, 75, 83, 76, 280, 74, 74, 78, 64, 75, - 75, 77, 77, 77, 550, 77, 77, 77, 77, 558, 87, 87, 77, 93, 93, - 57, 54, 507, 87, 76, 87, 509, 87, 87, 87, - - 87, 88, 512, 88, 563, 88, 88, 88, 88, 558, 90, 53, 90, 77, 90, - 90, 90, 90, 507, 94, 94, 94, 509, 94, 94, 94, 94, 48, 512, 563, - 94, 95, 95, 95, 518, 95, 95, 95, 95, 105, 105, 110, 95, 110, 129, - 520, 129, 105, 47, 105, 41, 105, 105, 105, 105, 87, 94, 524, 19, 111, - 518, 111, 16, 88, 88, 519, 519, 532, 95, 15, 11, 520, 90, 90, 106, - 534, 106, 566, 106, 106, 106, 106, 107, 524, 107, 111, 107, 107, 107, 107, - 108, 0, 108, 532, 108, 108, 108, 108, 112, 537, - - 112, 534, 566, 110, 110, 577, 129, 129, 113, 105, 113, 111, 124, 544, 124, - 0, 124, 124, 124, 124, 0, 111, 111, 112, 113, 537, 0, 114, 114, 114, - 577, 114, 114, 114, 114, 519, 106, 106, 114, 544, 115, 115, 115, 0, 115, - 115, 115, 115, 586, 112, 113, 115, 108, 108, 223, 223, 397, 397, 397, 397, - 112, 112, 0, 323, 114, 0, 223, 223, 223, 223, 113, 113, 0, 586, 125, - 551, 125, 115, 125, 125, 125, 125, 130, 0, 130, 323, 130, 130, 130, 130, - 131, 131, 131, 552, 131, 131, 131, 131, 132, 132, - - 132, 551, 132, 132, 132, 132, 135, 545, 135, 132, 136, 323, 136, 137, 137, - 138, 545, 138, 140, 552, 140, 137, 556, 137, 223, 560, 136, 131, 561, 135, - 562, 564, 323, 598, 139, 132, 139, 141, 0, 141, 143, 568, 143, 0, 130, - 130, 138, 0, 556, 140, 0, 560, 136, 141, 561, 135, 562, 564, 598, 139, - 142, 139, 142, 143, 144, 569, 144, 568, 135, 135, 0, 138, 136, 136, 140, - 142, 545, 138, 138, 141, 140, 140, 0, 137, 137, 139, 145, 139, 145, 143, - 144, 569, 152, 142, 152, 0, 139, 139, 146, 141, - - 141, 142, 143, 143, 570, 146, 152, 146, 535, 535, 147, 145, 147, 149, 0, - 149, 144, 150, 142, 150, 573, 146, 142, 142, 147, 0, 144, 144, 148, 148, - 570, 153, 152, 153, 535, 0, 148, 145, 148, 156, 147, 156, 154, 150, 154, - 149, 573, 146, 145, 145, 147, 153, 0, 0, 152, 152, 155, 155, 0, 151, - 535, 151, 156, 0, 155, 147, 155, 146, 146, 150, 149, 154, 147, 147, 151, - 149, 149, 153, 535, 150, 150, 576, 177, 151, 177, 163, 151, 163, 156, 163, - 163, 163, 163, 153, 153, 0, 154, 578, 148, 148, - - 151, 156, 156, 0, 154, 154, 0, 576, 182, 151, 182, 174, 151, 174, 0, - 174, 174, 174, 174, 0, 579, 151, 151, 578, 0, 0, 155, 155, 175, 183, - 175, 183, 175, 175, 175, 175, 178, 0, 178, 0, 178, 178, 178, 178, 177, - 177, 579, 163, 163, 179, 179, 179, 0, 179, 179, 179, 179, 180, 180, 180, - 0, 180, 180, 180, 180, 184, 0, 184, 180, 581, 182, 182, 0, 185, 0, - 185, 186, 0, 186, 187, 0, 187, 420, 420, 420, 420, 179, 188, 186, 188, - 0, 183, 183, 185, 180, 581, 187, 0, 178, 178, - - 200, 0, 200, 188, 189, 0, 189, 188, 583, 191, 0, 191, 567, 567, 186, - 435, 435, 435, 435, 185, 584, 191, 187, 493, 493, 493, 493, 184, 184, 188, - 587, 189, 589, 188, 583, 185, 185, 0, 186, 186, 0, 187, 187, 190, 0, - 190, 584, 191, 593, 188, 188, 498, 498, 498, 498, 585, 587, 189, 589, 0, - 190, 0, 200, 200, 585, 597, 189, 189, 601, 0, 190, 191, 191, 197, 593, - 197, 602, 197, 197, 197, 197, 0, 567, 198, 603, 198, 190, 198, 198, 198, - 198, 597, 0, 201, 601, 201, 190, 201, 201, 201, - - 201, 213, 602, 213, 0, 190, 190, 202, 202, 202, 603, 202, 202, 202, 202, - 203, 203, 203, 0, 203, 203, 203, 203, 210, 585, 210, 203, 210, 210, 210, - 210, 211, 217, 211, 217, 211, 211, 211, 211, 0, 0, 214, 230, 214, 202, - 214, 214, 214, 214, 230, 0, 230, 203, 0, 0, 201, 201, 0, 0, 217, - 219, 484, 219, 213, 213, 215, 215, 215, 515, 215, 215, 215, 215, 216, 216, - 216, 0, 216, 216, 216, 216, 221, 221, 484, 216, 217, 218, 219, 218, 221, - 515, 221, 0, 0, 217, 217, 0, 222, 222, 225, - - 218, 225, 215, 214, 214, 222, 0, 222, 0, 484, 216, 230, 230, 219, 0, - 226, 515, 226, 225, 227, 0, 227, 219, 219, 588, 588, 218, 224, 224, 224, - 484, 224, 224, 224, 224, 0, 0, 515, 224, 0, 0, 228, 0, 228, 225, - 226, 0, 0, 218, 218, 590, 221, 221, 228, 231, 227, 231, 228, 229, 590, - 229, 225, 225, 232, 224, 232, 0, 222, 222, 0, 226, 0, 229, 233, 231, - 233, 0, 226, 226, 228, 227, 227, 227, 228, 238, 0, 238, 234, 0, 234, - 236, 0, 236, 232, 588, 0, 0, 233, 229, 0, - - 231, 234, 0, 228, 228, 0, 239, 238, 239, 582, 582, 582, 582, 0, 0, - 236, 231, 231, 232, 590, 229, 229, 0, 233, 0, 232, 232, 234, 0, 0, - 240, 240, 0, 238, 0, 233, 233, 239, 0, 0, 0, 236, 240, 240, 240, - 240, 238, 238, 604, 234, 234, 0, 236, 236, 237, 237, 237, 604, 237, 237, - 237, 237, 239, 0, 242, 237, 242, 0, 239, 239, 241, 241, 241, 542, 241, - 241, 241, 241, 243, 0, 243, 241, 244, 0, 244, 245, 0, 245, 246, 0, - 246, 237, 243, 0, 242, 542, 243, 245, 244, 247, - - 240, 247, 248, 0, 248, 0, 249, 241, 249, 0, 0, 246, 599, 599, 599, - 599, 0, 604, 243, 242, 0, 542, 243, 245, 244, 0, 242, 242, 0, 248, - 605, 247, 249, 0, 252, 0, 252, 246, 249, 605, 243, 243, 542, 0, 244, - 244, 0, 245, 245, 0, 246, 246, 257, 0, 257, 248, 247, 0, 249, 250, - 250, 247, 247, 249, 248, 248, 252, 257, 249, 249, 0, 250, 250, 250, 250, - 251, 251, 251, 0, 251, 251, 251, 251, 256, 0, 256, 251, 258, 571, 258, - 259, 252, 259, 257, 0, 0, 252, 252, 0, 605, - - 260, 0, 260, 0, 262, 0, 262, 259, 256, 261, 571, 261, 251, 0, 257, - 257, 263, 0, 263, 0, 0, 262, 264, 0, 264, 260, 0, 0, 265, 250, - 265, 0, 261, 259, 256, 0, 571, 266, 0, 266, 0, 0, 264, 263, 0, - 256, 256, 262, 0, 258, 258, 260, 259, 259, 267, 0, 267, 571, 261, 0, - 266, 0, 260, 260, 265, 0, 262, 262, 264, 263, 0, 261, 261, 0, 276, - 0, 276, 267, 263, 263, 268, 268, 0, 0, 264, 264, 266, 0, 0, 265, - 265, 265, 268, 268, 268, 268, 274, 0, 274, 266, - - 266, 0, 0, 267, 269, 269, 269, 0, 269, 269, 269, 269, 270, 270, 277, - 269, 267, 267, 275, 0, 275, 277, 274, 277, 270, 270, 270, 270, 271, 271, - 271, 0, 271, 271, 271, 271, 276, 276, 279, 271, 279, 269, 278, 278, 278, - 283, 0, 283, 274, 275, 268, 0, 0, 0, 285, 0, 285, 0, 274, 274, - 282, 283, 282, 0, 0, 271, 281, 281, 281, 279, 281, 281, 281, 281, 275, - 0, 0, 281, 284, 284, 275, 275, 270, 277, 277, 285, 284, 283, 284, 282, - 288, 0, 288, 289, 279, 289, 0, 290, 0, 290, - - 279, 279, 0, 281, 278, 278, 0, 283, 283, 290, 285, 295, 0, 295, 282, - 0, 285, 285, 293, 293, 0, 288, 282, 282, 0, 289, 293, 0, 293, 294, - 0, 294, 0, 0, 296, 290, 296, 0, 0, 297, 295, 297, 298, 0, 298, - 294, 288, 0, 284, 284, 289, 296, 288, 288, 298, 289, 289, 0, 0, 290, - 290, 299, 0, 299, 309, 295, 309, 306, 297, 306, 0, 294, 0, 295, 295, - 0, 300, 296, 300, 0, 298, 300, 300, 300, 301, 0, 301, 306, 293, 293, - 299, 294, 294, 297, 0, 309, 296, 296, 302, 302, - - 0, 297, 297, 0, 298, 298, 302, 0, 302, 305, 0, 305, 307, 306, 307, - 299, 301, 308, 0, 308, 309, 0, 0, 299, 299, 305, 309, 309, 0, 306, - 306, 312, 307, 312, 313, 0, 313, 308, 300, 300, 310, 301, 310, 314, 0, - 314, 301, 301, 0, 0, 0, 305, 310, 311, 0, 311, 0, 313, 307, 0, - 312, 0, 0, 308, 0, 0, 0, 0, 302, 302, 0, 305, 305, 311, 307, - 307, 0, 0, 310, 308, 308, 0, 315, 313, 315, 312, 316, 0, 316, 321, - 0, 321, 0, 312, 312, 0, 313, 313, 316, 311, - - 0, 0, 310, 310, 0, 314, 314, 0, 322, 0, 322, 0, 0, 0, 315, - 311, 311, 326, 321, 326, 322, 324, 324, 324, 316, 324, 324, 324, 324, 0, - 0, 0, 324, 325, 0, 325, 330, 0, 330, 315, 0, 0, 0, 321, 315, - 315, 322, 325, 316, 316, 0, 321, 321, 331, 331, 0, 0, 325, 324, 0, - 0, 331, 330, 331, 0, 0, 0, 325, 0, 0, 322, 322, 0, 325, 334, - 0, 334, 0, 0, 326, 326, 0, 0, 325, 0, 337, 0, 337, 330, 332, - 332, 338, 325, 338, 334, 325, 325, 0, 330, 330, - - 337, 332, 332, 332, 332, 333, 333, 333, 0, 333, 333, 333, 333, 0, 338, - 336, 333, 336, 339, 339, 334, 0, 0, 331, 331, 0, 337, 342, 0, 342, - 339, 339, 339, 339, 0, 336, 334, 334, 0, 342, 338, 341, 333, 341, 345, - 0, 345, 337, 337, 0, 344, 0, 344, 338, 338, 343, 341, 343, 345, 332, - 0, 336, 340, 340, 340, 342, 340, 340, 340, 340, 0, 341, 344, 340, 346, - 343, 346, 336, 336, 347, 0, 347, 341, 348, 345, 348, 0, 0, 339, 342, - 342, 349, 0, 349, 346, 0, 341, 0, 344, 340, - - 0, 343, 0, 341, 341, 0, 345, 345, 350, 0, 350, 0, 344, 344, 0, - 351, 351, 343, 343, 0, 346, 0, 0, 0, 0, 0, 350, 351, 351, 351, - 351, 0, 0, 354, 0, 354, 346, 346, 0, 353, 353, 347, 347, 0, 0, - 348, 348, 353, 0, 353, 0, 0, 350, 349, 349, 352, 352, 352, 354, 352, - 352, 352, 352, 355, 0, 355, 352, 357, 0, 357, 350, 350, 356, 0, 356, - 0, 358, 353, 358, 0, 359, 0, 359, 0, 354, 351, 0, 357, 355, 360, - 358, 360, 352, 0, 0, 354, 354, 0, 361, 0, - - 361, 364, 353, 364, 362, 360, 362, 356, 0, 353, 353, 0, 0, 357, 355, - 359, 358, 0, 361, 362, 0, 0, 363, 0, 363, 355, 355, 0, 0, 357, - 357, 360, 356, 0, 356, 356, 363, 0, 358, 358, 359, 0, 359, 359, 361, - 362, 365, 0, 365, 0, 0, 360, 360, 368, 0, 368, 374, 0, 374, 0, - 361, 361, 363, 364, 364, 0, 362, 362, 369, 0, 369, 365, 370, 0, 370, - 375, 375, 0, 0, 368, 0, 374, 0, 0, 363, 363, 0, 375, 375, 375, - 375, 0, 0, 0, 369, 0, 379, 365, 379, 0, - - 386, 370, 386, 0, 383, 368, 383, 374, 365, 365, 0, 0, 381, 0, 381, - 368, 368, 0, 374, 374, 369, 0, 379, 382, 0, 382, 370, 383, 0, 381, - 369, 369, 386, 0, 370, 370, 376, 376, 376, 382, 376, 376, 376, 376, 388, - 375, 388, 376, 379, 387, 0, 387, 389, 383, 389, 381, 0, 386, 379, 379, - 0, 0, 386, 386, 0, 382, 383, 383, 388, 390, 0, 390, 0, 376, 381, - 381, 391, 389, 391, 387, 0, 0, 0, 0, 0, 382, 382, 0, 392, 0, - 392, 396, 391, 396, 388, 0, 0, 0, 0, 390, - - 0, 0, 0, 389, 387, 0, 388, 388, 399, 399, 396, 387, 387, 0, 389, - 389, 0, 0, 391, 392, 399, 399, 399, 399, 390, 400, 400, 402, 0, 402, - 0, 390, 390, 400, 0, 400, 396, 0, 391, 391, 403, 0, 403, 0, 392, - 402, 0, 404, 0, 404, 392, 392, 0, 396, 396, 401, 401, 401, 403, 401, - 401, 401, 401, 405, 0, 405, 401, 404, 0, 0, 410, 402, 410, 0, 406, - 0, 406, 407, 399, 407, 409, 0, 409, 408, 403, 408, 410, 0, 405, 402, - 402, 0, 401, 404, 406, 400, 400, 407, 0, 411, - - 0, 411, 403, 403, 412, 409, 412, 0, 0, 404, 404, 0, 410, 408, 405, - 411, 425, 0, 425, 422, 406, 422, 0, 407, 0, 405, 405, 414, 0, 414, - 0, 409, 410, 410, 0, 412, 406, 406, 408, 407, 407, 411, 409, 409, 422, - 408, 408, 419, 0, 419, 415, 414, 415, 416, 0, 416, 424, 0, 424, 0, - 412, 411, 411, 0, 0, 415, 412, 412, 0, 0, 422, 419, 427, 416, 427, - 0, 424, 414, 425, 425, 0, 422, 422, 426, 0, 426, 428, 0, 428, 414, - 414, 415, 429, 429, 429, 426, 0, 419, 430, 416, - - 430, 427, 424, 431, 0, 431, 432, 0, 432, 419, 419, 0, 415, 415, 430, - 416, 416, 0, 424, 424, 433, 426, 433, 434, 434, 439, 427, 439, 0, 437, - 437, 434, 0, 434, 427, 427, 0, 0, 0, 0, 430, 437, 437, 437, 437, - 426, 426, 0, 428, 428, 440, 0, 440, 0, 429, 429, 433, 0, 0, 0, - 430, 430, 447, 0, 447, 431, 431, 0, 432, 432, 441, 0, 441, 438, 438, - 438, 0, 438, 438, 438, 438, 433, 433, 433, 438, 0, 0, 439, 439, 0, - 442, 0, 442, 434, 434, 441, 0, 0, 443, 437, - - 443, 0, 0, 444, 0, 444, 0, 445, 442, 445, 438, 0, 440, 440, 448, - 0, 448, 0, 0, 0, 446, 441, 446, 443, 447, 447, 0, 452, 444, 452, - 0, 0, 441, 441, 442, 449, 449, 445, 446, 0, 451, 0, 451, 449, 0, - 449, 0, 452, 453, 443, 453, 0, 442, 442, 444, 456, 0, 456, 0, 0, - 443, 443, 445, 0, 446, 444, 444, 451, 0, 445, 445, 456, 0, 452, 0, - 0, 448, 448, 457, 453, 0, 0, 446, 446, 0, 457, 457, 457, 0, 452, - 452, 0, 0, 451, 459, 0, 459, 456, 460, 0, - - 460, 0, 451, 451, 453, 449, 449, 461, 459, 461, 453, 453, 462, 0, 462, - 0, 0, 456, 456, 464, 0, 464, 463, 461, 463, 465, 465, 0, 0, 460, - 467, 467, 462, 0, 459, 0, 0, 465, 465, 465, 465, 0, 467, 467, 467, - 467, 0, 457, 457, 461, 0, 470, 463, 470, 460, 0, 459, 459, 462, 0, - 460, 460, 469, 0, 469, 471, 0, 471, 0, 461, 461, 472, 0, 472, 462, - 462, 473, 463, 473, 0, 469, 464, 464, 471, 463, 463, 466, 466, 466, 472, - 466, 466, 466, 466, 474, 465, 474, 466, 0, 479, - - 467, 479, 0, 490, 0, 0, 469, 0, 0, 471, 490, 0, 490, 470, 470, - 472, 479, 475, 475, 0, 478, 0, 478, 466, 469, 469, 0, 471, 471, 475, - 475, 475, 475, 472, 472, 483, 0, 483, 473, 473, 478, 0, 479, 475, 480, - 475, 480, 476, 476, 476, 0, 476, 476, 476, 476, 0, 474, 474, 476, 0, - 483, 479, 479, 0, 0, 485, 478, 485, 492, 475, 492, 475, 490, 490, 0, - 480, 489, 0, 489, 488, 0, 488, 478, 478, 476, 485, 483, 475, 486, 486, - 486, 488, 486, 486, 486, 486, 489, 483, 483, 486, - - 480, 0, 0, 491, 0, 491, 480, 480, 495, 0, 495, 485, 496, 0, 496, - 0, 0, 488, 491, 497, 0, 497, 489, 0, 503, 486, 503, 485, 485, 0, - 492, 492, 504, 0, 504, 505, 0, 505, 489, 489, 0, 488, 488, 511, 491, - 511, 0, 503, 508, 0, 508, 505, 504, 517, 0, 517, 0, 513, 511, 513, - 0, 0, 0, 0, 0, 491, 491, 523, 0, 523, 495, 495, 0, 503, 496, - 496, 0, 505, 504, 508, 0, 497, 497, 514, 511, 514, 503, 503, 513, 0, - 0, 521, 523, 521, 504, 504, 0, 505, 505, 0, - - 0, 522, 0, 522, 508, 511, 511, 521, 0, 514, 508, 508, 528, 513, 528, - 517, 517, 522, 523, 513, 513, 516, 516, 516, 0, 516, 516, 516, 516, 523, - 523, 526, 516, 521, 531, 514, 531, 0, 526, 0, 526, 0, 530, 522, 530, - 514, 514, 540, 0, 540, 538, 0, 538, 521, 521, 0, 0, 0, 516, 531, - 0, 0, 530, 522, 522, 538, 539, 0, 539, 0, 0, 549, 0, 549, 528, - 528, 554, 0, 554, 0, 548, 539, 548, 565, 555, 531, 555, 0, 530, 0, - 565, 538, 565, 0, 0, 0, 531, 531, 0, 0, - - 526, 526, 0, 0, 530, 530, 548, 539, 0, 540, 540, 0, 538, 538, 543, - 543, 543, 0, 543, 543, 543, 543, 0, 0, 559, 543, 559, 0, 539, 539, - 0, 0, 548, 549, 549, 0, 0, 0, 554, 554, 0, 0, 548, 548, 0, - 0, 555, 555, 0, 559, 0, 543, 565, 565, 572, 572, 572, 0, 572, 572, - 572, 572, 0, 0, 0, 572, 574, 574, 0, 0, 595, 595, 0, 0, 0, - 559, 0, 0, 574, 574, 574, 574, 595, 595, 595, 595, 559, 559, 0, 0, - 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 595, 609, 609, 609, 610, - 610, 610, 611, 0, 611, 612, 0, 612, 614, 0, 614, 615, 0, 615, 616, - 0, 616, 617, 0, 617, 618, 0, 618, 619, 0, 619, 620, 0, 620, 622, - 0, 622, 623, 0, 623, 625, 0, 625, 626, 0, 626, 628, 0, 628, 629, - 0, 629, 630, 0, 630, 631, 0, 631, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[609] = + { 0, + 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, + 100, 98, 73, 74, 98, 98, 76, 77, 98, 98, + 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 98, 98, 74, + 12, 13, 93, 98, 16, 15, 16, 12, 13, 44, + 20, 21, 44, 44, 24, 25, 44, 44, 44, 41, + 22, 41, 44, 44, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 44, 44, 12, 13, 51, + 45, 46, 51, 51, 51, 51, 51, 48, 51, 48, + 51, 51, 48, 51, 51, 12, 13, 60, 55, 56, + + 60, 60, 60, 60, 60, 57, 60, 57, 60, 57, + 57, 57, 57, 60, 60, 12, 13, 74, 0, 0, + 97, 0, 1, 0, 96, 73, 75, 0, 95, 95, + 0, 0, 74, 0, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 74, 93, 0, 12, + 1, 13, 93, 16, 1, 12, 1, 13, 21, 0, + 0, 43, 0, 0, 42, 20, 41, 41, 0, 0, + 23, 36, 26, 27, 41, 41, 28, 41, 41, 41, + 41, 46, 0, 0, 50, 0, 0, 49, 45, 48, + + 48, 0, 0, 47, 56, 0, 0, 59, 0, 0, + 58, 55, 57, 57, 0, 0, 57, 57, 57, 1, + 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 0, 95, 0, 95, 95, 0, + 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, + 0, 95, 1, 1, 1, 41, 41, 29, 41, 41, + 41, 41, 41, 41, 57, 57, 57, 0, 0, 0, + 0, 89, 0, 95, 95, 17, 95, 95, 95, 0, + 0, 95, 95, 95, 95, 0, 0, 95, 95, 95, + 80, 0, 95, 95, 95, 95, 95, 95, 95, 95, + + 95, 95, 92, 0, 95, 41, 41, 41, 41, 41, + 41, 41, 41, 52, 57, 57, 82, 0, 81, 0, + 95, 95, 0, 0, 95, 69, 0, 0, 0, 95, + 95, 0, 0, 95, 0, 95, 95, 95, 0, 0, + 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, + 0, 0, 95, 41, 41, 41, 41, 41, 41, 41, + 41, 57, 57, 62, 95, 0, 0, 95, 95, 95, + 69, 0, 0, 95, 0, 0, 91, 0, 95, 0, + 95, 95, 95, 90, 0, 95, 95, 95, 95, 95, + 95, 95, 70, 71, 72, 95, 84, 0, 0, 95, + + 0, 41, 41, 37, 41, 41, 38, 41, 41, 57, + 57, 95, 0, 95, 95, 95, 0, 0, 95, 85, + 0, 95, 0, 95, 18, 95, 95, 14, 95, 95, + 67, 19, 95, 95, 78, 0, 0, 0, 35, 33, + 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, + 95, 95, 95, 0, 0, 95, 95, 0, 95, 95, + 95, 95, 95, 68, 0, 0, 79, 0, 41, 31, + 41, 41, 30, 34, 0, 0, 0, 95, 95, 95, + 0, 0, 95, 0, 95, 0, 0, 95, 95, 95, + 95, 61, 83, 0, 39, 32, 40, 86, 0, 0, + + 0, 0, 95, 95, 95, 0, 0, 95, 0, 0, + 95, 0, 95, 95, 0, 0, 5, 0, 0, 0, + 95, 95, 95, 0, 10, 95, 0, 6, 0, 95, + 95, 0, 0, 0, 0, 0, 0, 95, 95, 63, + 11, 0, 0, 0, 0, 3, 0, 95, 66, 0, + 0, 0, 8, 65, 64, 0, 0, 0, 95, 0, + 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 9, 0, 0, 0, 0, 88, 7, + + 0, 0, 0, 0, 0, 2, 0, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 4, 1, 1, 1, 1, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 14, 14, 14, 14, 14, 14, 1, 18, 1, + 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 38, + 47, 47, 47, 47, 38, 47, 48, 49, 50, 51, + + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 38, 64, 65, 66, 67, 68, 69, 70, + 71, 38, 47, 47, 47, 47, 1, 47, 72, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[75] = + { 0, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3 + } ; + +static const flex_int16_t yy_base[632] = + { 0, + 0, 72, 74, 82, 144, 70, 218, 291, 364, 83, + 871, 3699, 3699, 241, 866, 858, 3699, 3699, 839, 87, + 243, 252, 95, 260, 245, 429, 67, 436, 432, 446, + 473, 501, 517, 512, 539, 532, 545, 609, 617, 268, + 831, 0, 586, 625, 0, 3699, 829, 808, 0, 3699, + 3699, 246, 808, 787, 3699, 3699, 771, 103, 651, 633, + 111, 659, 248, 755, 276, 487, 645, 667, 671, 674, + 677, 681, 684, 699, 703, 748, 767, 753, 0, 3699, + 3699, 249, 764, 747, 717, 119, 784, 792, 340, 801, + 448, 715, 717, 810, 822, 699, 0, 3699, 3699, 251, + + 710, 698, 679, 449, 838, 865, 873, 881, 471, 832, + 850, 889, 899, 918, 931, 677, 0, 258, 671, 676, + 3699, 646, 0, 903, 965, 3699, 270, 601, 835, 973, + 981, 989, 275, 589, 997, 1001, 1012, 1006, 1025, 1009, + 1028, 1051, 1031, 1055, 1077, 1096, 1101, 1127, 1104, 1108, + 1150, 1083, 1122, 1133, 1155, 1130, 475, 226, 571, 0, + 0, 0, 1176, 0, 0, 0, 0, 0, 286, 565, + 579, 3699, 577, 1202, 1219, 3699, 1173, 1227, 1240, 1248, + 3699, 1199, 1220, 1256, 1264, 1267, 1270, 1278, 1295, 1334, + 1300, 442, 554, 568, 3699, 565, 1364, 1374, 3699, 1291, + + 1384, 1398, 1406, 3699, 444, 513, 527, 3699, 512, 1414, + 1422, 3699, 1392, 1432, 1456, 1464, 1423, 1477, 1451, 0, + 1480, 1496, 953, 1518, 1490, 1506, 1510, 1532, 1549, 1440, + 1545, 1554, 1564, 1578, 481, 1581, 1645, 1575, 1597, 1629, + 1661, 1655, 1669, 1673, 1676, 1679, 1690, 1693, 1697, 1758, + 1766, 1725, 0, 0, 0, 1774, 1743, 1778, 1781, 1791, + 1800, 1795, 1807, 1813, 1819, 1828, 1845, 1879, 1895, 1911, + 1919, 312, 466, 1887, 1909, 1865, 1912, 1933, 1929, 698, + 1957, 1951, 1936, 1977, 1945, 68, 455, 1981, 1984, 1988, + 320, 449, 2017, 2020, 2002, 2025, 2030, 2033, 2052, 2067, + + 2075, 2097, 329, 446, 2100, 2058, 2103, 2108, 2055, 2131, + 2144, 2122, 2125, 2134, 2173, 2177, 345, 434, 563, 431, + 2180, 2199, 961, 2212, 2224, 2208, 39, 77, 422, 2227, + 2252, 2288, 2296, 2265, 213, 2306, 2276, 2282, 2317, 2353, + 2332, 2318, 2346, 2341, 2335, 2365, 2370, 2374, 2382, 2399, + 2414, 2446, 2438, 2424, 2454, 2463, 2458, 2467, 2471, 2480, + 2489, 2495, 2513, 2492, 2537, 419, 419, 2544, 2559, 2563, + 3699, 418, 424, 2547, 2574, 2627, 592, 332, 2587, 498, + 2603, 2614, 2595, 599, 330, 2591, 2640, 2635, 2643, 2660, + 2667, 2679, 3699, 3699, 3699, 2682, 943, 310, 2707, 2724, + + 2746, 2718, 2731, 2738, 2754, 2765, 2768, 2774, 2771, 2761, + 2790, 2795, 271, 2818, 2841, 2844, 545, 616, 2838, 1269, + 301, 2810, 417, 2847, 2807, 2874, 2863, 2877, 2883, 2889, + 2894, 2897, 2911, 2922, 1302, 298, 2928, 2964, 2916, 2941, + 2961, 2981, 2989, 2994, 2998, 3011, 2953, 3005, 3034, 622, + 3031, 3018, 3039, 459, 471, 3046, 3076, 632, 3085, 3089, + 3098, 3103, 3113, 3110, 3124, 3177, 3129, 266, 3153, 3142, + 3156, 3162, 3167, 3185, 3216, 3238, 483, 3211, 3190, 3235, + 652, 668, 3226, 1459, 3256, 3279, 659, 3270, 3267, 3201, + 3294, 3259, 1310, 259, 3299, 3303, 3310, 1338, 665, 523, + + 258, 682, 3315, 3323, 3326, 686, 759, 3339, 767, 242, + 3334, 768, 3348, 3374, 1466, 3412, 3344, 799, 864, 810, + 3382, 3392, 3358, 823, 3699, 3429, 617, 3403, 527, 3433, + 3425, 838, 122, 853, 1107, 121, 865, 3441, 3457, 3438, + 3699, 1671, 3505, 884, 1005, 3699, 117, 3471, 3462, 712, + 954, 961, 3699, 3467, 3475, 993, 116, 745, 3515, 996, + 996, 995, 762, 1002, 3481, 838, 1311, 1019, 1036, 1069, + 1786, 3545, 1091, 3565, 111, 1160, 866, 1163, 1191, 109, + 1234, 1596, 1276, 1291, 1353, 906, 1296, 1523, 1297, 1548, + 3699, 101, 1319, 3699, 3569, 93, 1331, 994, 1699, 3699, + + 1339, 1341, 1350, 1646, 1728, 3699, 87, 3699, 3641, 3644, + 3647, 3650, 97, 3653, 3656, 3659, 3662, 3665, 3668, 3671, + 91, 3674, 3677, 90, 3680, 3683, 89, 3686, 3689, 3692, + 3695 + } ; + +static const flex_int16_t yy_def[632] = + { 0, + 608, 1, 609, 609, 608, 5, 610, 610, 608, 9, + 608, 608, 608, 608, 611, 612, 608, 608, 608, 608, + 608, 613, 608, 613, 608, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, + 614, 615, 613, 613, 616, 608, 616, 617, 618, 608, + 608, 608, 619, 620, 608, 608, 608, 608, 608, 621, + 608, 621, 608, 608, 621, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 614, 615, 608, + 608, 608, 622, 623, 608, 608, 608, 624, 608, 624, + 608, 608, 624, 624, 624, 614, 615, 608, 608, 608, + + 625, 626, 608, 608, 608, 627, 608, 627, 608, 627, + 627, 627, 627, 627, 627, 614, 615, 608, 608, 611, + 608, 612, 628, 608, 608, 608, 608, 608, 613, 613, + 613, 613, 608, 608, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 608, 608, 608, 614, + 629, 615, 613, 616, 630, 617, 631, 618, 608, 608, + 619, 608, 620, 608, 608, 608, 621, 621, 621, 621, + 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 608, 608, 622, 608, 623, 608, 608, 608, 624, + + 624, 624, 624, 608, 608, 608, 625, 608, 626, 608, + 608, 608, 627, 627, 627, 627, 627, 627, 627, 628, + 613, 613, 608, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 608, 613, 613, 613, 613, 608, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, + 613, 613, 629, 630, 631, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 627, 627, 627, 608, 613, 608, + 613, 608, 608, 613, 613, 613, 613, 613, 613, 608, + 613, 613, 613, 613, 613, 608, 608, 613, 613, 613, + 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, + + 613, 613, 608, 608, 613, 621, 621, 621, 621, 621, + 621, 621, 621, 627, 627, 627, 608, 608, 608, 608, + 613, 613, 608, 613, 613, 613, 608, 608, 608, 613, + 613, 608, 613, 613, 608, 613, 613, 613, 608, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 608, 613, 613, 621, 621, 621, 621, 621, 621, 621, + 621, 627, 627, 613, 613, 608, 608, 613, 613, 613, + 608, 608, 608, 613, 608, 613, 608, 608, 613, 608, + 613, 613, 613, 608, 608, 613, 613, 613, 613, 613, + 613, 613, 608, 608, 608, 613, 608, 608, 608, 613, + + 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, + 627, 613, 608, 613, 613, 613, 608, 608, 613, 608, + 608, 613, 608, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 608, 608, 608, 613, 621, 621, + 621, 621, 621, 621, 621, 621, 627, 627, 613, 608, + 613, 613, 613, 608, 608, 613, 613, 608, 613, 613, + 613, 613, 613, 613, 608, 613, 608, 608, 621, 621, + 621, 621, 621, 621, 608, 613, 608, 613, 613, 613, + 608, 608, 613, 608, 613, 613, 608, 613, 613, 613, + 613, 613, 608, 608, 621, 621, 621, 608, 608, 608, + + 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, + 613, 608, 613, 613, 608, 613, 613, 608, 608, 608, + 613, 613, 613, 608, 608, 613, 608, 613, 608, 613, + 613, 608, 608, 608, 608, 608, 608, 613, 613, 613, + 608, 608, 613, 608, 608, 608, 608, 613, 613, 608, + 608, 608, 608, 613, 613, 608, 608, 608, 613, 608, + 608, 608, 608, 608, 613, 608, 608, 608, 608, 608, + 608, 613, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608 + } ; + +static const flex_int16_t yy_nxt[3774] = + { 0, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 12, 24, 24, 24, 24, 25, 12, 12, + 12, 26, 27, 28, 29, 30, 31, 27, 27, 32, + 27, 27, 27, 27, 27, 27, 33, 27, 34, 35, + 36, 27, 37, 27, 27, 27, 12, 26, 27, 28, + 29, 30, 31, 27, 27, 32, 27, 27, 27, 27, + 27, 27, 33, 34, 35, 36, 27, 37, 27, 27, + 27, 38, 39, 27, 40, 46, 608, 78, 608, 41, + 372, 47, 79, 46, 42, 43, 43, 43, 43, 48, + 116, 213, 200, 177, 49, 117, 124, 335, 124, 129, + + 125, 125, 125, 125, 124, 372, 124, 605, 125, 125, + 125, 125, 174, 595, 174, 373, 175, 175, 175, 175, + 174, 590, 174, 335, 175, 175, 175, 175, 197, 571, + 197, 574, 198, 198, 198, 198, 542, 545, 131, 132, + 373, 535, 515, 44, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 50, 62, 62, 62, + 62, 63, 64, 50, 50, 65, 66, 67, 67, 67, + 67, 67, 67, 68, 69, 67, 70, 67, 67, 71, + 72, 67, 73, 74, 75, 67, 67, 67, 67, 67, + 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, + + 69, 67, 70, 67, 67, 71, 72, 73, 74, 75, + 67, 67, 67, 67, 67, 76, 77, 67, 80, 81, + 82, 83, 84, 80, 80, 85, 86, 87, 88, 89, + 80, 90, 90, 90, 90, 91, 92, 80, 80, 158, + 158, 158, 158, 118, 126, 127, 126, 133, 169, 176, + 169, 192, 124, 205, 124, 380, 125, 125, 125, 125, + 118, 124, 484, 124, 80, 130, 130, 130, 130, 124, + 157, 124, 127, 130, 130, 130, 130, 133, 475, 465, + 380, 158, 158, 158, 158, 608, 437, 608, 169, 94, + 95, 80, 81, 82, 83, 84, 80, 80, 96, 86, + + 87, 88, 89, 97, 90, 90, 90, 90, 91, 92, + 80, 80, 119, 450, 128, 182, 134, 170, 399, 170, + 193, 375, 206, 131, 132, 272, 272, 272, 272, 119, + 351, 131, 132, 291, 291, 291, 291, 80, 450, 159, + 182, 128, 303, 303, 303, 303, 134, 179, 180, 197, + 339, 197, 332, 198, 198, 198, 198, 170, 317, 317, + 317, 317, 94, 95, 98, 99, 100, 101, 102, 98, + 98, 103, 104, 105, 106, 107, 98, 108, 108, 108, + 108, 109, 98, 98, 98, 110, 110, 111, 110, 110, + 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, + + 110, 110, 113, 110, 110, 110, 110, 110, 110, 110, + 98, 110, 110, 111, 110, 110, 110, 110, 110, 112, + 110, 110, 110, 110, 110, 110, 110, 113, 110, 110, + 110, 110, 110, 110, 110, 114, 115, 110, 608, 323, + 608, 608, 280, 608, 192, 608, 205, 608, 413, 199, + 192, 270, 417, 140, 268, 608, 458, 608, 210, 418, + 210, 135, 211, 211, 211, 211, 250, 136, 137, 240, + 138, 139, 212, 205, 413, 235, 141, 157, 417, 140, + 142, 458, 608, 235, 608, 418, 223, 135, 158, 158, + 158, 158, 136, 137, 143, 138, 608, 139, 608, 481, + + 131, 132, 141, 131, 132, 286, 142, 131, 132, 482, + 608, 144, 608, 193, 145, 206, 208, 131, 132, 193, + 143, 608, 502, 608, 481, 146, 608, 423, 608, 545, + 208, 286, 183, 205, 482, 147, 144, 151, 546, 145, + 148, 608, 206, 608, 131, 132, 159, 502, 608, 149, + 608, 146, 287, 423, 608, 150, 608, 183, 179, 180, + 154, 147, 519, 151, 152, 148, 156, 155, 454, 195, + 153, 195, 131, 132, 192, 149, 319, 319, 319, 319, + 150, 172, 172, 131, 132, 169, 154, 519, 131, 132, + 152, 157, 156, 155, 454, 124, 153, 124, 547, 163, + + 163, 163, 163, 131, 132, 377, 377, 377, 377, 133, + 131, 132, 384, 384, 384, 384, 131, 132, 608, 608, + 608, 127, 608, 608, 608, 608, 608, 608, 608, 118, + 608, 608, 608, 608, 608, 608, 608, 129, 608, 608, + 608, 608, 174, 455, 174, 157, 178, 178, 178, 178, + 121, 477, 176, 169, 608, 129, 608, 131, 132, 544, + 174, 487, 174, 129, 175, 175, 175, 175, 174, 455, + 174, 129, 178, 178, 178, 178, 608, 477, 608, 121, + 608, 506, 608, 608, 544, 608, 608, 487, 608, 507, + 608, 118, 608, 608, 512, 608, 161, 518, 123, 186, + + 280, 184, 208, 187, 179, 180, 185, 506, 608, 189, + 608, 520, 608, 208, 608, 507, 179, 180, 161, 188, + 512, 524, 170, 518, 327, 186, 608, 184, 608, 187, + 179, 180, 185, 204, 328, 189, 123, 520, 179, 180, + 190, 191, 179, 180, 188, 179, 180, 524, 179, 180, + 327, 195, 179, 180, 560, 179, 180, 608, 608, 608, + 328, 608, 608, 608, 608, 190, 191, 195, 169, 329, + 179, 180, 161, 181, 179, 180, 608, 608, 608, 560, + 608, 608, 608, 608, 564, 199, 192, 177, 202, 203, + 123, 172, 525, 197, 177, 197, 527, 198, 198, 198, + + 198, 197, 529, 197, 569, 201, 201, 201, 201, 564, + 197, 172, 197, 177, 201, 201, 201, 201, 525, 608, + 608, 608, 527, 608, 608, 608, 608, 167, 529, 569, + 192, 608, 608, 608, 534, 608, 608, 608, 608, 212, + 205, 608, 200, 608, 608, 537, 608, 210, 165, 210, + 161, 211, 211, 211, 211, 193, 200, 541, 123, 608, + 534, 608, 121, 202, 203, 535, 535, 550, 200, 121, + 608, 537, 202, 203, 210, 551, 210, 573, 214, 214, + 214, 214, 210, 541, 210, 217, 211, 211, 211, 211, + 210, 608, 210, 550, 214, 214, 214, 214, 608, 553, + + 608, 551, 573, 215, 216, 584, 131, 132, 608, 206, + 608, 217, 124, 558, 124, 608, 125, 125, 125, 125, + 608, 215, 216, 218, 219, 553, 608, 608, 608, 608, + 584, 608, 608, 608, 608, 536, 215, 216, 205, 558, + 608, 608, 608, 608, 608, 608, 608, 608, 593, 218, + 219, 213, 215, 216, 223, 223, 397, 397, 397, 397, + 215, 216, 608, 323, 213, 608, 272, 272, 272, 272, + 215, 216, 608, 593, 124, 561, 124, 213, 125, 125, + 125, 125, 124, 608, 124, 366, 130, 130, 130, 130, + 608, 608, 608, 562, 608, 608, 608, 608, 608, 608, + + 608, 561, 608, 608, 608, 608, 608, 545, 608, 129, + 608, 366, 608, 223, 223, 608, 546, 608, 608, 562, + 608, 608, 563, 608, 273, 566, 222, 129, 567, 221, + 568, 570, 367, 601, 608, 129, 608, 608, 608, 608, + 608, 576, 608, 608, 131, 132, 225, 608, 563, 228, + 608, 566, 222, 229, 567, 221, 568, 570, 601, 226, + 608, 227, 608, 232, 608, 577, 608, 576, 131, 132, + 608, 225, 131, 132, 228, 230, 547, 131, 132, 229, + 131, 132, 608, 224, 132, 226, 608, 227, 608, 232, + 233, 577, 608, 231, 608, 608, 131, 132, 235, 131, + + 132, 230, 131, 132, 578, 608, 247, 608, 535, 535, + 608, 234, 608, 608, 608, 608, 233, 608, 231, 608, + 581, 236, 131, 132, 238, 608, 131, 132, 240, 240, + 578, 608, 247, 608, 552, 608, 608, 234, 608, 608, + 239, 608, 608, 243, 608, 242, 581, 236, 131, 132, + 238, 248, 608, 608, 131, 132, 250, 250, 608, 608, + 552, 608, 252, 608, 608, 239, 608, 237, 132, 243, + 242, 249, 131, 132, 244, 131, 132, 248, 536, 131, + 132, 583, 608, 245, 608, 124, 246, 124, 252, 163, + 163, 163, 163, 131, 132, 608, 249, 585, 241, 132, + + 244, 131, 132, 608, 131, 132, 608, 583, 608, 245, + 608, 174, 246, 174, 608, 175, 175, 175, 175, 608, + 586, 131, 132, 585, 608, 608, 251, 132, 174, 608, + 174, 608, 175, 175, 175, 175, 174, 608, 174, 608, + 178, 178, 178, 178, 179, 180, 586, 131, 132, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 177, 587, + 179, 180, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 420, 420, 420, 420, 177, 608, 257, 608, + 608, 179, 180, 256, 177, 587, 258, 608, 179, 180, + + 608, 608, 608, 259, 608, 608, 608, 260, 588, 608, + 608, 608, 574, 574, 257, 435, 435, 435, 435, 256, + 589, 264, 258, 493, 493, 493, 493, 179, 180, 259, + 594, 261, 597, 260, 588, 179, 180, 608, 179, 180, + 608, 179, 180, 608, 608, 608, 589, 264, 598, 179, + 180, 498, 498, 498, 498, 590, 594, 261, 597, 608, + 262, 608, 202, 203, 591, 600, 179, 180, 602, 608, + 263, 179, 180, 197, 598, 197, 603, 198, 198, 198, + 198, 608, 575, 197, 604, 197, 262, 198, 198, 198, + 198, 600, 608, 197, 602, 197, 263, 201, 201, 201, + + 201, 608, 603, 608, 608, 179, 180, 608, 608, 608, + 604, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 210, 592, 210, 200, 211, 211, 211, + 211, 210, 608, 210, 608, 211, 211, 211, 211, 608, + 608, 210, 280, 210, 200, 214, 214, 214, 214, 608, + 608, 608, 200, 608, 608, 202, 203, 608, 608, 265, + 608, 484, 608, 215, 216, 608, 608, 608, 515, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 268, 268, 509, 213, 265, 608, 267, 608, 608, + 532, 608, 608, 608, 215, 216, 608, 270, 270, 608, + + 266, 608, 213, 215, 216, 608, 608, 608, 608, 509, + 213, 281, 132, 267, 608, 608, 532, 608, 274, 608, + 608, 608, 215, 216, 595, 595, 266, 608, 608, 608, + 510, 608, 608, 608, 608, 608, 608, 533, 223, 608, + 608, 608, 608, 608, 274, 275, 608, 608, 215, 216, + 590, 269, 132, 277, 608, 276, 608, 278, 608, 591, + 608, 131, 132, 608, 129, 608, 608, 271, 132, 608, + 275, 608, 279, 608, 282, 608, 608, 131, 132, 277, + 276, 131, 132, 278, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 283, 596, 608, 608, 284, 279, 608, + + 282, 285, 608, 131, 132, 608, 608, 289, 608, 582, + 582, 582, 582, 608, 608, 288, 131, 132, 283, 592, + 131, 132, 608, 284, 608, 131, 132, 285, 608, 608, + 240, 240, 608, 289, 608, 131, 132, 290, 608, 608, + 608, 288, 291, 291, 291, 291, 131, 132, 605, 131, + 132, 608, 131, 132, 608, 608, 608, 606, 608, 608, + 608, 608, 290, 608, 608, 235, 608, 608, 131, 132, + 608, 608, 608, 542, 608, 608, 608, 608, 608, 608, + 608, 240, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 129, 294, 608, 293, 556, 295, 297, 296, 608, + + 292, 608, 608, 608, 608, 608, 608, 129, 608, 608, + 608, 298, 599, 599, 599, 599, 608, 607, 294, 293, + 608, 556, 295, 297, 296, 608, 131, 132, 608, 300, + 605, 299, 301, 608, 608, 608, 608, 298, 302, 606, + 131, 132, 557, 608, 131, 132, 608, 131, 132, 608, + 131, 132, 608, 608, 608, 300, 299, 608, 301, 250, + 250, 131, 132, 302, 131, 132, 305, 307, 131, 132, + 608, 303, 303, 303, 303, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 250, 608, 571, 608, + 608, 305, 608, 307, 608, 608, 131, 132, 608, 607, + + 608, 608, 608, 608, 608, 608, 608, 308, 306, 608, + 579, 608, 129, 608, 179, 180, 608, 608, 608, 608, + 608, 311, 608, 608, 608, 309, 608, 608, 608, 304, + 608, 608, 310, 308, 306, 608, 579, 608, 608, 608, + 608, 608, 313, 312, 608, 179, 180, 311, 608, 179, + 180, 309, 179, 180, 608, 608, 608, 580, 310, 608, + 315, 608, 179, 180, 314, 608, 179, 180, 313, 312, + 608, 179, 180, 608, 608, 608, 608, 316, 179, 180, + 268, 268, 608, 608, 179, 180, 315, 608, 608, 314, + 215, 216, 317, 317, 317, 317, 608, 608, 608, 215, + + 216, 608, 608, 316, 608, 608, 608, 608, 608, 608, + 608, 608, 270, 270, 323, 268, 215, 216, 608, 608, + 608, 608, 321, 608, 319, 319, 319, 319, 608, 608, + 608, 608, 608, 608, 608, 608, 131, 132, 608, 270, + 608, 129, 608, 325, 608, 608, 608, 608, 321, 322, + 318, 608, 608, 608, 608, 608, 608, 608, 131, 132, + 608, 331, 608, 608, 608, 129, 608, 608, 608, 326, + 608, 608, 608, 608, 322, 608, 608, 280, 332, 332, + 131, 132, 320, 324, 132, 334, 608, 331, 608, 330, + 608, 608, 608, 608, 326, 608, 608, 608, 608, 608, + + 131, 132, 608, 129, 131, 132, 608, 131, 132, 338, + 334, 608, 608, 608, 330, 608, 131, 132, 339, 339, + 608, 336, 131, 132, 608, 337, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 338, 608, 608, 608, 608, + 342, 608, 608, 608, 608, 341, 336, 608, 333, 132, + 337, 343, 131, 132, 345, 131, 132, 608, 608, 131, + 132, 608, 608, 608, 608, 342, 608, 608, 344, 608, + 608, 341, 608, 131, 132, 608, 608, 343, 608, 608, + 345, 347, 348, 349, 608, 608, 608, 354, 340, 132, + 346, 131, 132, 344, 608, 357, 131, 132, 351, 351, + + 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, + 608, 608, 608, 354, 608, 346, 350, 608, 608, 608, + 357, 608, 608, 131, 132, 353, 179, 180, 608, 179, + 180, 608, 355, 608, 608, 608, 608, 356, 131, 132, + 608, 350, 608, 608, 608, 608, 131, 132, 608, 608, + 608, 353, 358, 608, 608, 608, 608, 361, 355, 608, + 360, 608, 608, 356, 608, 608, 608, 608, 352, 132, + 608, 131, 132, 359, 179, 180, 608, 608, 358, 179, + 180, 608, 608, 361, 608, 360, 608, 608, 608, 608, + 608, 608, 608, 179, 180, 608, 179, 180, 363, 359, + + 608, 608, 179, 180, 608, 215, 216, 608, 608, 608, + 608, 608, 608, 608, 362, 179, 180, 608, 364, 371, + 365, 608, 608, 608, 363, 608, 608, 608, 608, 608, + 608, 608, 323, 608, 608, 608, 608, 608, 608, 362, + 608, 608, 608, 364, 215, 216, 365, 368, 215, 216, + 608, 131, 132, 375, 375, 608, 608, 369, 129, 608, + 608, 608, 374, 608, 608, 608, 608, 370, 608, 608, + 131, 132, 608, 368, 608, 608, 608, 608, 608, 131, + 132, 608, 608, 369, 608, 608, 608, 608, 374, 332, + 332, 608, 370, 608, 379, 131, 132, 608, 131, 132, + + 382, 377, 377, 377, 377, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 383, 608, 332, 608, 339, 339, + 379, 608, 608, 376, 132, 608, 382, 608, 608, 608, + 384, 384, 384, 384, 608, 381, 131, 132, 608, 388, + 383, 608, 129, 608, 608, 608, 608, 131, 132, 608, + 608, 608, 608, 131, 132, 608, 386, 608, 391, 378, + 608, 381, 608, 608, 608, 388, 608, 608, 608, 608, + 608, 387, 390, 339, 608, 389, 608, 131, 132, 608, + 608, 393, 386, 608, 391, 394, 608, 608, 385, 131, + 132, 608, 608, 395, 392, 608, 387, 608, 390, 129, + + 608, 389, 608, 131, 132, 608, 131, 132, 608, 608, + 608, 608, 131, 132, 608, 351, 351, 131, 132, 608, + 392, 608, 608, 608, 608, 608, 396, 397, 397, 397, + 397, 608, 608, 608, 608, 608, 131, 132, 608, 399, + 399, 131, 132, 608, 608, 131, 132, 608, 608, 608, + 608, 608, 396, 131, 132, 608, 608, 608, 402, 608, + 608, 608, 608, 608, 608, 608, 351, 608, 608, 608, + 131, 132, 608, 608, 608, 608, 608, 400, 608, 608, + 608, 608, 608, 608, 402, 398, 608, 405, 403, 608, + 406, 608, 129, 608, 608, 179, 180, 608, 608, 608, + + 608, 608, 400, 608, 608, 408, 608, 404, 608, 401, + 132, 608, 608, 405, 403, 407, 406, 608, 409, 410, + 608, 608, 608, 608, 608, 179, 180, 608, 608, 179, + 180, 408, 404, 608, 179, 180, 411, 608, 179, 180, + 407, 608, 179, 180, 409, 410, 608, 608, 608, 608, + 608, 179, 180, 608, 608, 608, 608, 608, 608, 608, + 179, 180, 411, 131, 132, 608, 215, 216, 608, 608, + 608, 412, 608, 608, 608, 375, 375, 608, 608, 414, + 608, 419, 608, 608, 215, 216, 608, 420, 420, 420, + 420, 608, 608, 608, 415, 608, 608, 412, 608, 608, + + 608, 416, 608, 608, 608, 414, 608, 419, 131, 132, + 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, + 415, 608, 422, 608, 608, 608, 416, 426, 608, 424, + 131, 132, 427, 608, 131, 132, 608, 608, 608, 425, + 608, 608, 608, 608, 608, 421, 608, 375, 422, 608, + 608, 608, 608, 426, 608, 424, 608, 427, 131, 132, + 608, 608, 131, 132, 608, 425, 131, 132, 429, 608, + 608, 608, 608, 129, 131, 132, 608, 430, 608, 428, + 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, + 608, 608, 432, 608, 429, 608, 608, 608, 608, 431, + + 608, 608, 608, 430, 428, 608, 131, 132, 399, 399, + 434, 131, 132, 608, 131, 132, 608, 608, 432, 433, + 435, 435, 435, 435, 431, 437, 437, 608, 608, 608, + 608, 131, 132, 608, 608, 608, 434, 608, 131, 132, + 608, 608, 608, 608, 433, 439, 608, 608, 608, 608, + 131, 132, 608, 131, 132, 608, 608, 608, 440, 608, + 608, 608, 608, 608, 608, 608, 399, 441, 608, 608, + 608, 439, 608, 608, 608, 608, 608, 608, 436, 608, + 608, 608, 608, 608, 440, 608, 447, 608, 442, 179, + 180, 608, 129, 441, 443, 438, 132, 444, 608, 608, + + 608, 608, 179, 180, 608, 446, 608, 608, 608, 179, + 180, 608, 447, 445, 442, 448, 608, 608, 608, 608, + 443, 608, 608, 444, 608, 179, 180, 608, 608, 608, + 608, 446, 215, 216, 608, 449, 179, 180, 445, 179, + 180, 448, 179, 180, 457, 179, 180, 608, 608, 608, + 608, 451, 608, 608, 608, 608, 608, 608, 608, 608, + 449, 215, 216, 608, 608, 452, 131, 132, 608, 608, + 457, 456, 608, 453, 608, 608, 459, 451, 131, 132, + 608, 131, 132, 608, 608, 608, 608, 608, 608, 131, + 132, 452, 608, 462, 608, 460, 608, 456, 608, 453, + + 608, 461, 459, 608, 608, 608, 608, 608, 608, 131, + 132, 608, 131, 132, 463, 131, 132, 608, 131, 132, + 608, 460, 608, 465, 465, 608, 461, 608, 608, 437, + 437, 608, 608, 608, 131, 132, 608, 608, 608, 608, + 463, 467, 467, 467, 467, 131, 132, 608, 131, 132, + 608, 608, 608, 608, 131, 132, 464, 608, 608, 608, + 131, 132, 608, 608, 608, 131, 132, 608, 131, 132, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 464, 131, 132, 437, 608, 608, 179, 180, 608, + 608, 608, 608, 466, 132, 469, 608, 608, 608, 468, + + 608, 608, 608, 608, 608, 608, 608, 608, 470, 608, + 129, 608, 179, 180, 608, 608, 608, 608, 608, 608, + 608, 469, 608, 471, 215, 216, 608, 608, 472, 608, + 608, 608, 179, 180, 470, 475, 475, 473, 474, 608, + 608, 608, 608, 608, 608, 608, 608, 479, 608, 471, + 608, 608, 179, 180, 472, 608, 608, 608, 608, 608, + 179, 180, 473, 608, 474, 179, 180, 478, 608, 179, + 180, 483, 608, 479, 608, 608, 215, 216, 484, 480, + 608, 608, 179, 180, 608, 608, 485, 608, 608, 131, + 132, 608, 608, 478, 608, 608, 608, 483, 608, 608, + + 608, 608, 131, 132, 480, 476, 132, 608, 488, 608, + 131, 132, 608, 608, 608, 608, 608, 131, 132, 608, + 608, 608, 608, 490, 608, 465, 465, 608, 608, 489, + 437, 437, 491, 608, 488, 608, 608, 493, 493, 493, + 493, 608, 467, 467, 467, 467, 608, 486, 132, 490, + 608, 608, 492, 608, 489, 608, 131, 132, 491, 608, + 131, 132, 608, 608, 608, 608, 608, 608, 608, 131, + 132, 608, 608, 608, 131, 132, 608, 492, 608, 608, + 495, 131, 132, 496, 131, 132, 608, 608, 608, 497, + 608, 608, 608, 608, 608, 494, 608, 465, 608, 608, + + 468, 608, 608, 515, 608, 608, 495, 608, 608, 496, + 608, 608, 608, 179, 180, 497, 504, 475, 475, 608, + 608, 608, 608, 129, 179, 180, 608, 179, 180, 498, + 498, 498, 498, 179, 180, 608, 608, 608, 179, 180, + 503, 608, 504, 499, 608, 500, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 179, 180, 475, 608, + 508, 131, 132, 608, 608, 608, 503, 608, 608, 499, + 608, 500, 516, 132, 608, 505, 608, 608, 608, 608, + 608, 608, 131, 132, 129, 511, 508, 501, 608, 608, + 608, 513, 608, 608, 608, 608, 514, 131, 132, 484, + + 505, 608, 608, 608, 608, 608, 131, 132, 608, 608, + 608, 511, 608, 608, 608, 608, 608, 513, 517, 608, + 608, 608, 514, 608, 608, 129, 608, 131, 132, 608, + 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, + 608, 131, 132, 608, 517, 608, 608, 521, 608, 608, + 608, 523, 522, 608, 608, 608, 608, 608, 528, 608, + 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, + 179, 180, 608, 521, 179, 180, 608, 523, 522, 526, + 608, 179, 180, 608, 528, 608, 131, 132, 530, 608, + 608, 608, 540, 608, 131, 132, 608, 131, 132, 608, + + 608, 608, 608, 608, 526, 131, 132, 538, 608, 531, + 131, 132, 608, 530, 608, 131, 132, 539, 540, 131, + 132, 608, 608, 608, 608, 608, 608, 608, 608, 131, + 132, 542, 515, 538, 608, 531, 608, 608, 608, 608, + 608, 608, 608, 539, 608, 131, 132, 608, 608, 608, + 608, 608, 608, 131, 132, 608, 608, 608, 129, 549, + 608, 608, 548, 131, 132, 554, 608, 608, 608, 608, + 608, 608, 608, 608, 131, 132, 608, 608, 608, 608, + 608, 555, 608, 571, 608, 549, 608, 608, 548, 608, + 608, 554, 608, 608, 608, 608, 131, 132, 608, 608, + + 543, 132, 608, 608, 131, 132, 559, 555, 608, 131, + 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 542, 608, 608, 131, 132, + 608, 608, 559, 131, 132, 608, 608, 608, 131, 132, + 608, 608, 131, 132, 608, 608, 131, 132, 608, 565, + 608, 129, 572, 132, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 571, 574, 574, 608, 608, + 595, 595, 608, 608, 608, 565, 608, 608, 582, 582, + 582, 582, 599, 599, 599, 599, 131, 132, 608, 608, + 608, 129, 608, 608, 608, 608, 608, 608, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 575, 608, 608, 608, + 596, 45, 45, 45, 93, 93, 93, 120, 608, 120, + 122, 608, 122, 160, 608, 160, 162, 608, 162, 164, + 608, 164, 166, 608, 166, 168, 608, 168, 171, 608, + 171, 173, 608, 173, 194, 608, 194, 196, 608, 196, + 207, 608, 207, 209, 608, 209, 220, 608, 220, 253, + 608, 253, 254, 608, 254, 255, 608, 255, 11, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608 + } ; + +static const flex_int16_t yy_chk[3774] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 3, 27, 6, 27, 2, + 327, 3, 6, 4, 2, 2, 2, 2, 2, 4, + 10, 627, 624, 621, 4, 10, 20, 286, 20, 613, + + 20, 20, 20, 20, 23, 327, 23, 607, 23, 23, + 23, 23, 58, 596, 58, 328, 58, 58, 58, 58, + 61, 592, 61, 286, 61, 61, 61, 61, 86, 580, + 86, 575, 86, 86, 86, 86, 557, 547, 27, 27, + 328, 536, 533, 2, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 158, + 158, 158, 158, 14, 21, 21, 25, 25, 52, 63, + 63, 82, 21, 100, 21, 335, 21, 21, 21, 21, + 118, 22, 510, 22, 7, 22, 22, 22, 22, 24, + 40, 24, 127, 24, 24, 24, 24, 133, 501, 494, + 335, 40, 40, 40, 40, 65, 468, 65, 169, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 14, 413, 21, 65, 25, 52, 436, 63, + 82, 421, 100, 22, 22, 272, 272, 272, 272, 118, + 398, 24, 24, 291, 291, 291, 291, 8, 413, 40, + 65, 127, 303, 303, 303, 303, 133, 65, 65, 89, + 385, 89, 378, 89, 89, 89, 89, 169, 317, 317, + 317, 317, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 26, 367, + 26, 29, 329, 29, 192, 28, 205, 28, 366, 91, + 91, 320, 372, 29, 318, 30, 423, 30, 104, 373, + 104, 26, 104, 104, 104, 104, 304, 26, 26, 292, + 26, 28, 109, 109, 366, 287, 30, 157, 372, 29, + 30, 423, 31, 235, 31, 373, 273, 26, 157, 157, + 157, 157, 26, 26, 31, 26, 66, 28, 66, 454, + + 26, 26, 30, 29, 29, 235, 30, 28, 28, 455, + 32, 31, 32, 192, 31, 205, 209, 30, 30, 91, + 31, 34, 477, 34, 454, 32, 33, 380, 33, 529, + 207, 235, 66, 206, 455, 32, 31, 34, 529, 31, + 32, 36, 109, 36, 31, 31, 157, 477, 35, 33, + 35, 32, 235, 380, 37, 33, 37, 66, 66, 66, + 36, 32, 500, 34, 35, 32, 37, 36, 417, 196, + 35, 194, 32, 32, 193, 33, 319, 319, 319, 319, + 33, 173, 171, 34, 34, 170, 36, 500, 33, 33, + 35, 159, 37, 36, 417, 43, 35, 43, 529, 43, + + 43, 43, 43, 36, 36, 377, 377, 377, 377, 134, + 35, 35, 384, 384, 384, 384, 37, 37, 38, 38, + 38, 128, 38, 38, 38, 38, 39, 39, 39, 38, + 39, 39, 39, 39, 44, 44, 44, 39, 44, 44, + 44, 44, 60, 418, 60, 44, 60, 60, 60, 60, + 122, 450, 59, 59, 67, 38, 67, 43, 43, 527, + 59, 458, 59, 39, 59, 59, 59, 59, 62, 418, + 62, 44, 62, 62, 62, 62, 68, 450, 68, 120, + 69, 481, 69, 70, 527, 70, 71, 458, 71, 482, + 72, 119, 72, 73, 487, 73, 116, 499, 103, 70, + + 280, 68, 102, 71, 60, 60, 69, 481, 74, 73, + 74, 502, 75, 101, 75, 482, 67, 67, 96, 72, + 487, 506, 59, 499, 280, 70, 93, 68, 93, 71, + 62, 62, 69, 92, 280, 73, 85, 502, 68, 68, + 74, 75, 69, 69, 72, 70, 70, 506, 71, 71, + 280, 84, 72, 72, 550, 73, 73, 76, 76, 76, + 280, 76, 76, 76, 76, 74, 75, 83, 76, 280, + 74, 74, 78, 64, 75, 75, 77, 77, 77, 550, + 77, 77, 77, 77, 558, 87, 87, 77, 93, 93, + 57, 54, 507, 87, 76, 87, 509, 87, 87, 87, + + 87, 88, 512, 88, 563, 88, 88, 88, 88, 558, + 90, 53, 90, 77, 90, 90, 90, 90, 507, 94, + 94, 94, 509, 94, 94, 94, 94, 48, 512, 563, + 94, 95, 95, 95, 518, 95, 95, 95, 95, 105, + 105, 110, 95, 110, 129, 520, 129, 105, 47, 105, + 41, 105, 105, 105, 105, 87, 94, 524, 19, 111, + 518, 111, 16, 88, 88, 519, 519, 532, 95, 15, + 11, 520, 90, 90, 106, 534, 106, 566, 106, 106, + 106, 106, 107, 524, 107, 111, 107, 107, 107, 107, + 108, 0, 108, 532, 108, 108, 108, 108, 112, 537, + + 112, 534, 566, 110, 110, 577, 129, 129, 113, 105, + 113, 111, 124, 544, 124, 0, 124, 124, 124, 124, + 0, 111, 111, 112, 113, 537, 0, 114, 114, 114, + 577, 114, 114, 114, 114, 519, 106, 106, 114, 544, + 115, 115, 115, 0, 115, 115, 115, 115, 586, 112, + 113, 115, 108, 108, 223, 223, 397, 397, 397, 397, + 112, 112, 0, 323, 114, 0, 223, 223, 223, 223, + 113, 113, 0, 586, 125, 551, 125, 115, 125, 125, + 125, 125, 130, 0, 130, 323, 130, 130, 130, 130, + 131, 131, 131, 552, 131, 131, 131, 131, 132, 132, + + 132, 551, 132, 132, 132, 132, 135, 545, 135, 132, + 136, 323, 136, 137, 137, 138, 545, 138, 140, 552, + 140, 137, 556, 137, 223, 560, 136, 131, 561, 135, + 562, 564, 323, 598, 139, 132, 139, 141, 0, 141, + 143, 568, 143, 0, 130, 130, 138, 0, 556, 140, + 0, 560, 136, 141, 561, 135, 562, 564, 598, 139, + 142, 139, 142, 143, 144, 569, 144, 568, 135, 135, + 0, 138, 136, 136, 140, 142, 545, 138, 138, 141, + 140, 140, 0, 137, 137, 139, 145, 139, 145, 143, + 144, 569, 152, 142, 152, 0, 139, 139, 146, 141, + + 141, 142, 143, 143, 570, 146, 152, 146, 535, 535, + 147, 145, 147, 149, 0, 149, 144, 150, 142, 150, + 573, 146, 142, 142, 147, 0, 144, 144, 148, 148, + 570, 153, 152, 153, 535, 0, 148, 145, 148, 156, + 147, 156, 154, 150, 154, 149, 573, 146, 145, 145, + 147, 153, 0, 0, 152, 152, 155, 155, 0, 151, + 535, 151, 156, 0, 155, 147, 155, 146, 146, 150, + 149, 154, 147, 147, 151, 149, 149, 153, 535, 150, + 150, 576, 177, 151, 177, 163, 151, 163, 156, 163, + 163, 163, 163, 153, 153, 0, 154, 578, 148, 148, + + 151, 156, 156, 0, 154, 154, 0, 576, 182, 151, + 182, 174, 151, 174, 0, 174, 174, 174, 174, 0, + 579, 151, 151, 578, 0, 0, 155, 155, 175, 183, + 175, 183, 175, 175, 175, 175, 178, 0, 178, 0, + 178, 178, 178, 178, 177, 177, 579, 163, 163, 179, + 179, 179, 0, 179, 179, 179, 179, 180, 180, 180, + 0, 180, 180, 180, 180, 184, 0, 184, 180, 581, + 182, 182, 0, 185, 0, 185, 186, 0, 186, 187, + 0, 187, 420, 420, 420, 420, 179, 188, 186, 188, + 0, 183, 183, 185, 180, 581, 187, 0, 178, 178, + + 200, 0, 200, 188, 189, 0, 189, 188, 583, 191, + 0, 191, 567, 567, 186, 435, 435, 435, 435, 185, + 584, 191, 187, 493, 493, 493, 493, 184, 184, 188, + 587, 189, 589, 188, 583, 185, 185, 0, 186, 186, + 0, 187, 187, 190, 0, 190, 584, 191, 593, 188, + 188, 498, 498, 498, 498, 585, 587, 189, 589, 0, + 190, 0, 200, 200, 585, 597, 189, 189, 601, 0, + 190, 191, 191, 197, 593, 197, 602, 197, 197, 197, + 197, 0, 567, 198, 603, 198, 190, 198, 198, 198, + 198, 597, 0, 201, 601, 201, 190, 201, 201, 201, + + 201, 213, 602, 213, 0, 190, 190, 202, 202, 202, + 603, 202, 202, 202, 202, 203, 203, 203, 0, 203, + 203, 203, 203, 210, 585, 210, 203, 210, 210, 210, + 210, 211, 217, 211, 217, 211, 211, 211, 211, 0, + 0, 214, 230, 214, 202, 214, 214, 214, 214, 230, + 0, 230, 203, 0, 0, 201, 201, 0, 0, 217, + 219, 484, 219, 213, 213, 215, 215, 215, 515, 215, + 215, 215, 215, 216, 216, 216, 0, 216, 216, 216, + 216, 221, 221, 484, 216, 217, 218, 219, 218, 221, + 515, 221, 0, 0, 217, 217, 0, 222, 222, 225, + + 218, 225, 215, 214, 214, 222, 0, 222, 0, 484, + 216, 230, 230, 219, 0, 226, 515, 226, 225, 227, + 0, 227, 219, 219, 588, 588, 218, 224, 224, 224, + 484, 224, 224, 224, 224, 0, 0, 515, 224, 0, + 0, 228, 0, 228, 225, 226, 0, 0, 218, 218, + 590, 221, 221, 228, 231, 227, 231, 228, 229, 590, + 229, 225, 225, 232, 224, 232, 0, 222, 222, 0, + 226, 0, 229, 233, 231, 233, 0, 226, 226, 228, + 227, 227, 227, 228, 238, 0, 238, 234, 0, 234, + 236, 0, 236, 232, 588, 0, 0, 233, 229, 0, + + 231, 234, 0, 228, 228, 0, 239, 238, 239, 582, + 582, 582, 582, 0, 0, 236, 231, 231, 232, 590, + 229, 229, 0, 233, 0, 232, 232, 234, 0, 0, + 240, 240, 0, 238, 0, 233, 233, 239, 0, 0, + 0, 236, 240, 240, 240, 240, 238, 238, 604, 234, + 234, 0, 236, 236, 237, 237, 237, 604, 237, 237, + 237, 237, 239, 0, 242, 237, 242, 0, 239, 239, + 241, 241, 241, 542, 241, 241, 241, 241, 243, 0, + 243, 241, 244, 0, 244, 245, 0, 245, 246, 0, + 246, 237, 243, 0, 242, 542, 243, 245, 244, 247, + + 240, 247, 248, 0, 248, 0, 249, 241, 249, 0, + 0, 246, 599, 599, 599, 599, 0, 604, 243, 242, + 0, 542, 243, 245, 244, 0, 242, 242, 0, 248, + 605, 247, 249, 0, 252, 0, 252, 246, 249, 605, + 243, 243, 542, 0, 244, 244, 0, 245, 245, 0, + 246, 246, 257, 0, 257, 248, 247, 0, 249, 250, + 250, 247, 247, 249, 248, 248, 252, 257, 249, 249, + 0, 250, 250, 250, 250, 251, 251, 251, 0, 251, + 251, 251, 251, 256, 0, 256, 251, 258, 571, 258, + 259, 252, 259, 257, 0, 0, 252, 252, 0, 605, + + 260, 0, 260, 0, 262, 0, 262, 259, 256, 261, + 571, 261, 251, 0, 257, 257, 263, 0, 263, 0, + 0, 262, 264, 0, 264, 260, 0, 0, 265, 250, + 265, 0, 261, 259, 256, 0, 571, 266, 0, 266, + 0, 0, 264, 263, 0, 256, 256, 262, 0, 258, + 258, 260, 259, 259, 267, 0, 267, 571, 261, 0, + 266, 0, 260, 260, 265, 0, 262, 262, 264, 263, + 0, 261, 261, 0, 276, 0, 276, 267, 263, 263, + 268, 268, 0, 0, 264, 264, 266, 0, 0, 265, + 265, 265, 268, 268, 268, 268, 274, 0, 274, 266, + + 266, 0, 0, 267, 269, 269, 269, 0, 269, 269, + 269, 269, 270, 270, 277, 269, 267, 267, 275, 0, + 275, 277, 274, 277, 270, 270, 270, 270, 271, 271, + 271, 0, 271, 271, 271, 271, 276, 276, 279, 271, + 279, 269, 278, 278, 278, 283, 0, 283, 274, 275, + 268, 0, 0, 0, 285, 0, 285, 0, 274, 274, + 282, 283, 282, 0, 0, 271, 281, 281, 281, 279, + 281, 281, 281, 281, 275, 0, 0, 281, 284, 284, + 275, 275, 270, 277, 277, 285, 284, 283, 284, 282, + 288, 0, 288, 289, 279, 289, 0, 290, 0, 290, + + 279, 279, 0, 281, 278, 278, 0, 283, 283, 290, + 285, 295, 0, 295, 282, 0, 285, 285, 293, 293, + 0, 288, 282, 282, 0, 289, 293, 0, 293, 294, + 0, 294, 0, 0, 296, 290, 296, 0, 0, 297, + 295, 297, 298, 0, 298, 294, 288, 0, 284, 284, + 289, 296, 288, 288, 298, 289, 289, 0, 0, 290, + 290, 299, 0, 299, 309, 295, 309, 306, 297, 306, + 0, 294, 0, 295, 295, 0, 300, 296, 300, 0, + 298, 300, 300, 300, 301, 0, 301, 306, 293, 293, + 299, 294, 294, 297, 0, 309, 296, 296, 302, 302, + + 0, 297, 297, 0, 298, 298, 302, 0, 302, 305, + 0, 305, 307, 306, 307, 299, 301, 308, 0, 308, + 309, 0, 0, 299, 299, 305, 309, 309, 0, 306, + 306, 312, 307, 312, 313, 0, 313, 308, 300, 300, + 310, 301, 310, 314, 0, 314, 301, 301, 0, 0, + 0, 305, 310, 311, 0, 311, 0, 313, 307, 0, + 312, 0, 0, 308, 0, 0, 0, 0, 302, 302, + 0, 305, 305, 311, 307, 307, 0, 0, 310, 308, + 308, 0, 315, 313, 315, 312, 316, 0, 316, 321, + 0, 321, 0, 312, 312, 0, 313, 313, 316, 311, + + 0, 0, 310, 310, 0, 314, 314, 0, 322, 0, + 322, 0, 0, 0, 315, 311, 311, 326, 321, 326, + 322, 324, 324, 324, 316, 324, 324, 324, 324, 0, + 0, 0, 324, 325, 0, 325, 330, 0, 330, 315, + 0, 0, 0, 321, 315, 315, 322, 325, 316, 316, + 0, 321, 321, 331, 331, 0, 0, 325, 324, 0, + 0, 331, 330, 331, 0, 0, 0, 325, 0, 0, + 322, 322, 0, 325, 334, 0, 334, 0, 0, 326, + 326, 0, 0, 325, 0, 337, 0, 337, 330, 332, + 332, 338, 325, 338, 334, 325, 325, 0, 330, 330, + + 337, 332, 332, 332, 332, 333, 333, 333, 0, 333, + 333, 333, 333, 0, 338, 336, 333, 336, 339, 339, + 334, 0, 0, 331, 331, 0, 337, 342, 0, 342, + 339, 339, 339, 339, 0, 336, 334, 334, 0, 342, + 338, 341, 333, 341, 345, 0, 345, 337, 337, 0, + 344, 0, 344, 338, 338, 343, 341, 343, 345, 332, + 0, 336, 340, 340, 340, 342, 340, 340, 340, 340, + 0, 341, 344, 340, 346, 343, 346, 336, 336, 347, + 0, 347, 341, 348, 345, 348, 0, 0, 339, 342, + 342, 349, 0, 349, 346, 0, 341, 0, 344, 340, + + 0, 343, 0, 341, 341, 0, 345, 345, 350, 0, + 350, 0, 344, 344, 0, 351, 351, 343, 343, 0, + 346, 0, 0, 0, 0, 0, 350, 351, 351, 351, + 351, 0, 0, 354, 0, 354, 346, 346, 0, 353, + 353, 347, 347, 0, 0, 348, 348, 353, 0, 353, + 0, 0, 350, 349, 349, 352, 352, 352, 354, 352, + 352, 352, 352, 355, 0, 355, 352, 357, 0, 357, + 350, 350, 356, 0, 356, 0, 358, 353, 358, 0, + 359, 0, 359, 0, 354, 351, 0, 357, 355, 360, + 358, 360, 352, 0, 0, 354, 354, 0, 361, 0, + + 361, 364, 353, 364, 362, 360, 362, 356, 0, 353, + 353, 0, 0, 357, 355, 359, 358, 0, 361, 362, + 0, 0, 363, 0, 363, 355, 355, 0, 0, 357, + 357, 360, 356, 0, 356, 356, 363, 0, 358, 358, + 359, 0, 359, 359, 361, 362, 365, 0, 365, 0, + 0, 360, 360, 368, 0, 368, 374, 0, 374, 0, + 361, 361, 363, 364, 364, 0, 362, 362, 369, 0, + 369, 365, 370, 0, 370, 375, 375, 0, 0, 368, + 0, 374, 0, 0, 363, 363, 0, 375, 375, 375, + 375, 0, 0, 0, 369, 0, 379, 365, 379, 0, + + 386, 370, 386, 0, 383, 368, 383, 374, 365, 365, + 0, 0, 381, 0, 381, 368, 368, 0, 374, 374, + 369, 0, 379, 382, 0, 382, 370, 383, 0, 381, + 369, 369, 386, 0, 370, 370, 376, 376, 376, 382, + 376, 376, 376, 376, 388, 375, 388, 376, 379, 387, + 0, 387, 389, 383, 389, 381, 0, 386, 379, 379, + 0, 0, 386, 386, 0, 382, 383, 383, 388, 390, + 0, 390, 0, 376, 381, 381, 391, 389, 391, 387, + 0, 0, 0, 0, 0, 382, 382, 0, 392, 0, + 392, 396, 391, 396, 388, 0, 0, 0, 0, 390, + + 0, 0, 0, 389, 387, 0, 388, 388, 399, 399, + 396, 387, 387, 0, 389, 389, 0, 0, 391, 392, + 399, 399, 399, 399, 390, 400, 400, 402, 0, 402, + 0, 390, 390, 400, 0, 400, 396, 0, 391, 391, + 403, 0, 403, 0, 392, 402, 0, 404, 0, 404, + 392, 392, 0, 396, 396, 401, 401, 401, 403, 401, + 401, 401, 401, 405, 0, 405, 401, 404, 0, 0, + 410, 402, 410, 0, 406, 0, 406, 407, 399, 407, + 409, 0, 409, 408, 403, 408, 410, 0, 405, 402, + 402, 0, 401, 404, 406, 400, 400, 407, 0, 411, + + 0, 411, 403, 403, 412, 409, 412, 0, 0, 404, + 404, 0, 410, 408, 405, 411, 425, 0, 425, 422, + 406, 422, 0, 407, 0, 405, 405, 414, 0, 414, + 0, 409, 410, 410, 0, 412, 406, 406, 408, 407, + 407, 411, 409, 409, 422, 408, 408, 419, 0, 419, + 415, 414, 415, 416, 0, 416, 424, 0, 424, 0, + 412, 411, 411, 0, 0, 415, 412, 412, 0, 0, + 422, 419, 427, 416, 427, 0, 424, 414, 425, 425, + 0, 422, 422, 426, 0, 426, 428, 0, 428, 414, + 414, 415, 429, 429, 429, 426, 0, 419, 430, 416, + + 430, 427, 424, 431, 0, 431, 432, 0, 432, 419, + 419, 0, 415, 415, 430, 416, 416, 0, 424, 424, + 433, 426, 433, 434, 434, 439, 427, 439, 0, 437, + 437, 434, 0, 434, 427, 427, 0, 0, 0, 0, + 430, 437, 437, 437, 437, 426, 426, 0, 428, 428, + 440, 0, 440, 0, 429, 429, 433, 0, 0, 0, + 430, 430, 447, 0, 447, 431, 431, 0, 432, 432, + 441, 0, 441, 438, 438, 438, 0, 438, 438, 438, + 438, 433, 433, 433, 438, 0, 0, 439, 439, 0, + 442, 0, 442, 434, 434, 441, 0, 0, 443, 437, + + 443, 0, 0, 444, 0, 444, 0, 445, 442, 445, + 438, 0, 440, 440, 448, 0, 448, 0, 0, 0, + 446, 441, 446, 443, 447, 447, 0, 452, 444, 452, + 0, 0, 441, 441, 442, 449, 449, 445, 446, 0, + 451, 0, 451, 449, 0, 449, 0, 452, 453, 443, + 453, 0, 442, 442, 444, 456, 0, 456, 0, 0, + 443, 443, 445, 0, 446, 444, 444, 451, 0, 445, + 445, 456, 0, 452, 0, 0, 448, 448, 457, 453, + 0, 0, 446, 446, 0, 457, 457, 457, 0, 452, + 452, 0, 0, 451, 459, 0, 459, 456, 460, 0, + + 460, 0, 451, 451, 453, 449, 449, 461, 459, 461, + 453, 453, 462, 0, 462, 0, 0, 456, 456, 464, + 0, 464, 463, 461, 463, 465, 465, 0, 0, 460, + 467, 467, 462, 0, 459, 0, 0, 465, 465, 465, + 465, 0, 467, 467, 467, 467, 0, 457, 457, 461, + 0, 470, 463, 470, 460, 0, 459, 459, 462, 0, + 460, 460, 469, 0, 469, 471, 0, 471, 0, 461, + 461, 472, 0, 472, 462, 462, 473, 463, 473, 0, + 469, 464, 464, 471, 463, 463, 466, 466, 466, 472, + 466, 466, 466, 466, 474, 465, 474, 466, 0, 479, + + 467, 479, 0, 490, 0, 0, 469, 0, 0, 471, + 490, 0, 490, 470, 470, 472, 479, 475, 475, 0, + 478, 0, 478, 466, 469, 469, 0, 471, 471, 475, + 475, 475, 475, 472, 472, 483, 0, 483, 473, 473, + 478, 0, 479, 475, 480, 475, 480, 476, 476, 476, + 0, 476, 476, 476, 476, 0, 474, 474, 476, 0, + 483, 479, 479, 0, 0, 485, 478, 485, 492, 475, + 492, 475, 490, 490, 0, 480, 489, 0, 489, 488, + 0, 488, 478, 478, 476, 485, 483, 475, 486, 486, + 486, 488, 486, 486, 486, 486, 489, 483, 483, 486, + + 480, 0, 0, 491, 0, 491, 480, 480, 495, 0, + 495, 485, 496, 0, 496, 0, 0, 488, 491, 497, + 0, 497, 489, 0, 503, 486, 503, 485, 485, 0, + 492, 492, 504, 0, 504, 505, 0, 505, 489, 489, + 0, 488, 488, 511, 491, 511, 0, 503, 508, 0, + 508, 505, 504, 517, 0, 517, 0, 513, 511, 513, + 0, 0, 0, 0, 0, 491, 491, 523, 0, 523, + 495, 495, 0, 503, 496, 496, 0, 505, 504, 508, + 0, 497, 497, 514, 511, 514, 503, 503, 513, 0, + 0, 521, 523, 521, 504, 504, 0, 505, 505, 0, + + 0, 522, 0, 522, 508, 511, 511, 521, 0, 514, + 508, 508, 528, 513, 528, 517, 517, 522, 523, 513, + 513, 516, 516, 516, 0, 516, 516, 516, 516, 523, + 523, 526, 516, 521, 531, 514, 531, 0, 526, 0, + 526, 0, 530, 522, 530, 514, 514, 540, 0, 540, + 538, 0, 538, 521, 521, 0, 0, 0, 516, 531, + 0, 0, 530, 522, 522, 538, 539, 0, 539, 0, + 0, 549, 0, 549, 528, 528, 554, 0, 554, 0, + 548, 539, 548, 565, 555, 531, 555, 0, 530, 0, + 565, 538, 565, 0, 0, 0, 531, 531, 0, 0, + + 526, 526, 0, 0, 530, 530, 548, 539, 0, 540, + 540, 0, 538, 538, 543, 543, 543, 0, 543, 543, + 543, 543, 0, 0, 559, 543, 559, 0, 539, 539, + 0, 0, 548, 549, 549, 0, 0, 0, 554, 554, + 0, 0, 548, 548, 0, 0, 555, 555, 0, 559, + 0, 543, 565, 565, 572, 572, 572, 0, 572, 572, + 572, 572, 0, 0, 0, 572, 574, 574, 0, 0, + 595, 595, 0, 0, 0, 559, 0, 0, 574, 574, + 574, 574, 595, 595, 595, 595, 559, 559, 0, 0, + 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, + 595, 609, 609, 609, 610, 610, 610, 611, 0, 611, + 612, 0, 612, 614, 0, 614, 615, 0, 615, 616, + 0, 616, 617, 0, 617, 618, 0, 618, 619, 0, + 619, 620, 0, 620, 622, 0, 622, 623, 0, 623, + 625, 0, 625, 626, 0, 626, 628, 0, 628, 629, + 0, 629, 630, 0, 630, 631, 0, 631, 608, 608, + + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608 + } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -1451,7 +1766,7 @@ char *yytext; #include #include #include -#ifdef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -1463,72 +1778,73 @@ char *yytext; #include "ppparse.h" enum { - CB_COMPILE_STATUS_NONE, - CB_COMPILE_STATUS_TRUE, - CB_COMPILE_STATUS_FALSE, - CB_COMPILE_STATUS_FALSE_END, - CB_COMPILE_STATUS_TRUE_ELSE, - CB_COMPILE_STATUS_FALSE_ELSE, - CB_COMPILE_STATUS_ERROR + CB_COMPILE_STATUS_NONE, + CB_COMPILE_STATUS_TRUE, + CB_COMPILE_STATUS_FALSE, + CB_COMPILE_STATUS_FALSE_END, + CB_COMPILE_STATUS_TRUE_ELSE, + CB_COMPILE_STATUS_FALSE_ELSE, + CB_COMPILE_STATUS_ERROR }; -static char *plexbuff1 = NULL; -static char *plexbuff2 = NULL; -static size_t newline_count = 0; -static size_t within_comment = 0; -static size_t inside_bracket = 0; -static size_t consecutive_quotation = 0; -static int quotation_mark = 0; -static int last_line_1 = -1; -static int last_line_2 = -1; +static char *plexbuff1 = NULL; +static char *plexbuff2 = NULL; +static size_t newline_count = 0; +static size_t within_comment = 0; +static size_t inside_bracket = 0; +static size_t consecutive_quotation = 0; +static int quotation_mark = 0; +static int last_line_1 = -1; +static int last_line_2 = -1; /* for COBOL68 style COPY in data description entry */ -static int suppress_echo = 0; -static int current_division = PP_OUT_OF_DIVISION; -static int omit_data_entry_name = 0; -static int omit_data_redef_name = 0; +static int suppress_echo = 0; +static int current_division = PP_OUT_OF_DIVISION; +static int omit_data_entry_name = 0; +static int omit_data_redef_name = 0; #define MAX_DEPTH 10 -static int cb_compile_status = CB_COMPILE_STATUS_NONE; -static int cb_compile_status_list[MAX_DEPTH]; -static int compile_directive_depth = -1; +static int cb_compile_status = CB_COMPILE_STATUS_NONE; +static int cb_compile_status_list[MAX_DEPTH]; +static int compile_directive_depth = -1; + -static struct cb_replace_list *current_replace_list = NULL; +static struct cb_replace_list *current_replace_list = NULL; -static struct cb_replace_list *current_copy_replace_list = NULL; +static struct cb_replace_list *current_copy_replace_list = NULL; -static struct cb_joining_ext *current_joining_ext = NULL; +static struct cb_joining_ext *current_joining_ext = NULL; -static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ -static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ +static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ +static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ static struct copy_info { - struct copy_info *next; - char *file; - int line; - int replacing; - int joining; - int quotation_mark; - YY_BUFFER_STATE buffer; + struct copy_info *next; + char *file; + int line; + int replacing; + int joining; + int quotation_mark; + YY_BUFFER_STATE buffer; } *copy_stack = NULL; -#define YY_INPUT(buf, result, max_size) result = ppinput(buf, max_size); +#define YY_INPUT(buf, result, max_size) result = ppinput (buf, max_size); -static int ppinput(char *buf, int max_size); -static void ppecho(const char *text); +static int ppinput (char *buf, int max_size); +static void ppecho (const char *text); -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf); +#ifdef I18N_UTF8 +static void convert_ucs_hyphen_minus (char *namebuf); #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *datanamebuf); +static void ppecho_dataname (char *datanamebuf); -static void switch_to_buffer(const int lineno, const char *filename, - YY_BUFFER_STATE buffer); +static void switch_to_buffer (const int lineno, const char *filename, + YY_BUFFER_STATE buffer); -#line 1846 "pplex.c" +#line 1845 "pplex.c" -#line 1848 "pplex.c" +#line 1847 "pplex.c" #define INITIAL 0 #define PROCESS_STATE 1 @@ -1540,36 +1856,36 @@ static void switch_to_buffer(const int lineno, const char *filename, #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals(void); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(void); +int yylex_destroy ( void ); -int yyget_debug(void); +int yyget_debug ( void ); -void yyset_debug(int debug_flag); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra(void); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra(YY_EXTRA_TYPE user_defined); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in(void); +FILE *yyget_in ( void ); -void yyset_in(FILE *_in_str); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out(void); +FILE *yyget_out ( void ); -void yyset_out(FILE *_out_str); +void yyset_out ( FILE * _out_str ); -int yyget_leng(void); + int yyget_leng ( void ); -char *yyget_text(void); +char *yyget_text ( void ); -int yyget_lineno(void); +int yyget_lineno ( void ); -void yyset_lineno(int _line_number); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1577,31 +1893,31 @@ void yyset_lineno(int _line_number); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(void); +extern "C" int yywrap ( void ); #else -extern int yywrap(void); +extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT - -static void yyunput(int c, char *buf_ptr); - + + static void yyunput ( int c, char *buf_ptr ); + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void); +static int yyinput ( void ); #else -static int input(void); +static int input ( void ); #endif #endif @@ -1621,40 +1937,42 @@ static int input(void); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO \ - do { \ - if (fwrite(yytext, (size_t)yyleng, 1, yyout)) { \ - } \ - } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \ - int c = '*'; \ - int n; \ - for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ - buf[n] = (char)c; \ - if (c == '\n') \ - buf[n++] = (char)c; \ - if (c == EOF && ferror(yyin)) \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - result = n; \ - } else { \ - errno = 0; \ - while ((result = (int)fread(buf, 1, (yy_size_t)max_size, yyin)) == 0 && \ - ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -1673,7 +1991,7 @@ static int input(void); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ @@ -1684,9 +2002,9 @@ static int input(void); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(void); +extern int yylex (void); -#define YY_DECL int yylex(void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -1698,942 +2016,839 @@ extern int yylex(void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ break; +#define YY_BREAK /*LINTED*/break; #endif -#define YY_RULE_SETUP \ - if (yyleng > 0) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION /** The main scanner function which does all the work. */ -YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if (!(yy_init)) { - (yy_init) = 1; +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!(yy_start)) - (yy_start) = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } - yy_load_buffer_state(); - } + yy_load_buffer_state( ); + } - { + { #line 126 "pplex.l" -#line 2070 "pplex.c" - - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - yy_match: - do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_current_state != 608); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - - yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - - switch (yy_act) { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - - case 1: - YY_RULE_SETUP + + + + +#line 2069 "pplex.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 609 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 608 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 131 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 2: - YY_RULE_SETUP +{ + ppecho (" "); +} + YY_BREAK +case 2: +YY_RULE_SETUP #line 135 "pplex.l" - { - identification_division_line_number = cb_source_line; - ppecho("IDENTIFICATION DIVISION."); - } - YY_BREAK - case 3: - YY_RULE_SETUP +{ + identification_division_line_number = cb_source_line; + ppecho ("IDENTIFICATION DIVISION."); +} + YY_BREAK +case 3: +YY_RULE_SETUP #line 139 "pplex.l" - { - ppecho("ID DIVISION."); - } - YY_BREAK - case 4: - YY_RULE_SETUP +{ ppecho ("ID DIVISION."); } + YY_BREAK +case 4: +YY_RULE_SETUP #line 140 "pplex.l" - { - ppecho("FUNCTION DIVISION."); - } - YY_BREAK - case 5: - YY_RULE_SETUP +{ ppecho ("FUNCTION DIVISION."); } + YY_BREAK +case 5: +YY_RULE_SETUP #line 141 "pplex.l" - { - ppecho(yytext); - return PROGRAM_ID; - } - YY_BREAK - case 6: - YY_RULE_SETUP +{ ppecho (yytext); return PROGRAM_ID; } + YY_BREAK +case 6: +YY_RULE_SETUP #line 142 "pplex.l" - { - ppecho(yytext); - return FUNCTION_ID; - } - YY_BREAK - case 7: - YY_RULE_SETUP +{ ppecho (yytext); return FUNCTION_ID; } + YY_BREAK +case 7: +YY_RULE_SETUP #line 143 "pplex.l" - { - ppecho("ENVIRONMENT DIVISION"); - return ENVIRONMENT_DIVISION; - } - YY_BREAK - case 8: - YY_RULE_SETUP +{ ppecho ("ENVIRONMENT DIVISION"); return ENVIRONMENT_DIVISION; } + YY_BREAK +case 8: +YY_RULE_SETUP #line 144 "pplex.l" - { - position_in_source_code = POSITION_AFTER_WORKING_STORAGE; - ppecho("DATA DIVISION"); - return DATA_DIVISION; - } - YY_BREAK - case 9: - YY_RULE_SETUP +{ + position_in_source_code = POSITION_AFTER_WORKING_STORAGE; + ppecho ("DATA DIVISION"); + return DATA_DIVISION; +} + YY_BREAK +case 9: +YY_RULE_SETUP #line 149 "pplex.l" - { - if (copy_stack->next == NULL) { - procedure_division_line_number = cb_source_line; - position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; - } - ppecho("PROCEDURE DIVISION"); - return PROCEDURE_DIVISION; - } - YY_BREAK - case 10: - YY_RULE_SETUP +{ + if(copy_stack->next == NULL) { + procedure_division_line_number = cb_source_line; + position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; + } + ppecho ("PROCEDURE DIVISION"); + return PROCEDURE_DIVISION; +} + YY_BREAK +case 10: +YY_RULE_SETUP #line 157 "pplex.l" - { - ppecho("END PROGRAM"); - return END_PROGRAM; - } - YY_BREAK - case 11: - YY_RULE_SETUP +{ ppecho ("END PROGRAM"); return END_PROGRAM; } + YY_BREAK +case 11: +YY_RULE_SETUP #line 158 "pplex.l" - { - ppecho("END FUNCTION"); - return END_FUNCTION; - } - YY_BREAK - case 12: +{ ppecho ("END FUNCTION"); return END_FUNCTION; } + YY_BREAK +case 12: #line 161 "pplex.l" - case 13: - YY_RULE_SETUP +case 13: +YY_RULE_SETUP #line 161 "pplex.l" - { - ppecho(" "); - if (cb_source_format != CB_FORMAT_FIXED) { - ppecho(yytext); - } - } - YY_BREAK - case 14: - YY_RULE_SETUP +{ + ppecho (" "); + if (cb_source_format != CB_FORMAT_FIXED) { + ppecho (yytext); + } +} + YY_BREAK +case 14: +YY_RULE_SETUP #line 168 "pplex.l" - { - BEGIN PROCESS_STATE; - } - YY_BREAK - - case 15: - /* rule 15 can match eol */ - YY_RULE_SETUP +{ BEGIN PROCESS_STATE; } + YY_BREAK + +case 15: +/* rule 15 can match eol */ +YY_RULE_SETUP #line 171 "pplex.l" - { - BEGIN INITIAL; - unput('\n'); - } - YY_BREAK - case 16: - YY_RULE_SETUP +{ BEGIN INITIAL; unput ('\n'); } + YY_BREAK +case 16: +YY_RULE_SETUP #line 172 "pplex.l" - { - cb_warning(_("PROCESS statement is ignored")); - } - YY_BREAK +{ cb_warning (_("PROCESS statement is ignored")); } + YY_BREAK - case 17: - YY_RULE_SETUP +case 17: +YY_RULE_SETUP #line 175 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 18: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 18: +YY_RULE_SETUP #line 176 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 19: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 19: +YY_RULE_SETUP #line 177 "pplex.l" - { - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - - case 20: - /* rule 20 can match eol */ - YY_RULE_SETUP +{ BEGIN COPY_STATE; return REPLACE; } + YY_BREAK + +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP #line 180 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 21: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 21: +YY_RULE_SETUP #line 181 "pplex.l" - { /* ignore */ - } - YY_BREAK - case 22: - YY_RULE_SETUP +{ /* ignore */ } + YY_BREAK +case 22: +YY_RULE_SETUP #line 182 "pplex.l" - { - BEGIN INITIAL; - return '.'; - } - YY_BREAK - case 23: - YY_RULE_SETUP +{ BEGIN INITIAL; return '.'; } + YY_BREAK +case 23: +YY_RULE_SETUP #line 183 "pplex.l" - { - BEGIN PSEUDO_STATE; - return EQEQ; - } - YY_BREAK - case 24: - YY_RULE_SETUP +{ BEGIN PSEUDO_STATE; return EQEQ; } + YY_BREAK +case 24: +YY_RULE_SETUP #line 184 "pplex.l" - { - return '('; - } - YY_BREAK - case 25: - YY_RULE_SETUP +{ return '('; } + YY_BREAK +case 25: +YY_RULE_SETUP #line 185 "pplex.l" - { - return ')'; - } - YY_BREAK - case 26: - YY_RULE_SETUP +{ return ')'; } + YY_BREAK +case 26: +YY_RULE_SETUP #line 186 "pplex.l" - { - return BY; - } - YY_BREAK - case 27: - YY_RULE_SETUP +{ return BY; } + YY_BREAK +case 27: +YY_RULE_SETUP #line 187 "pplex.l" - { - return IN; - } - YY_BREAK - case 28: - YY_RULE_SETUP +{ return IN; } + YY_BREAK +case 28: +YY_RULE_SETUP #line 188 "pplex.l" - { - return OF; - } - YY_BREAK - case 29: - YY_RULE_SETUP +{ return OF; } + YY_BREAK +case 29: +YY_RULE_SETUP #line 189 "pplex.l" - { - return OFF; - } - YY_BREAK - case 30: - YY_RULE_SETUP +{ return OFF; } + YY_BREAK +case 30: +YY_RULE_SETUP #line 190 "pplex.l" - { - return SUPPRESS; - } - YY_BREAK - case 31: - YY_RULE_SETUP +{ return SUPPRESS; } + YY_BREAK +case 31: +YY_RULE_SETUP #line 191 "pplex.l" - { - return PRINTING; - } - YY_BREAK - case 32: - YY_RULE_SETUP +{ return PRINTING; } + YY_BREAK +case 32: +YY_RULE_SETUP #line 192 "pplex.l" - { - return REPLACING; - } - YY_BREAK - case 33: - YY_RULE_SETUP +{ return REPLACING; } + YY_BREAK +case 33: +YY_RULE_SETUP #line 193 "pplex.l" - { - return LEADING; - } - YY_BREAK - case 34: - YY_RULE_SETUP +{ return LEADING; } + YY_BREAK +case 34: +YY_RULE_SETUP #line 194 "pplex.l" - { - return TRAILING; - } - YY_BREAK - case 35: - YY_RULE_SETUP +{ return TRAILING; } + YY_BREAK +case 35: +YY_RULE_SETUP #line 195 "pplex.l" - { - return JOINING; - } - YY_BREAK - case 36: - YY_RULE_SETUP +{ return JOINING; } + YY_BREAK +case 36: +YY_RULE_SETUP #line 196 "pplex.l" - { - return AS; - } - YY_BREAK - case 37: - YY_RULE_SETUP +{ return AS; } + YY_BREAK +case 37: +YY_RULE_SETUP #line 197 "pplex.l" - { - return PREFIX; - } - YY_BREAK - case 38: - YY_RULE_SETUP +{ return PREFIX; } + YY_BREAK +case 38: +YY_RULE_SETUP #line 198 "pplex.l" - { - return SUFFIX; - } - YY_BREAK - case 39: - YY_RULE_SETUP +{ return SUFFIX; } + YY_BREAK +case 39: +YY_RULE_SETUP #line 199 "pplex.l" - { - return PREFIXING; - } - YY_BREAK - case 40: - YY_RULE_SETUP +{ return PREFIXING; } + YY_BREAK +case 40: +YY_RULE_SETUP #line 200 "pplex.l" - { - return SUFFIXING; - } - YY_BREAK - case 41: - YY_RULE_SETUP +{ return SUFFIXING; } + YY_BREAK +case 41: +YY_RULE_SETUP #line 201 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); #endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 42: + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 42: #line 207 "pplex.l" - case 43: +case 43: #line 208 "pplex.l" - case 44: - YY_RULE_SETUP +case 44: +YY_RULE_SETUP #line 208 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 45: - /* rule 45 can match eol */ - YY_RULE_SETUP +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 45: +/* rule 45 can match eol */ +YY_RULE_SETUP #line 212 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 46: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 46: +YY_RULE_SETUP #line 213 "pplex.l" - { - pplval.s = strdup(" "); - return TOKEN; - } - YY_BREAK - case 47: - YY_RULE_SETUP +{ pplval.s = strdup (" "); return TOKEN; } + YY_BREAK +case 47: +YY_RULE_SETUP #line 214 "pplex.l" - { - BEGIN COPY_STATE; - return EQEQ; - } - YY_BREAK - case 48: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return EQEQ; } + YY_BREAK +case 48: +YY_RULE_SETUP #line 215 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); #endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 49: + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 49: #line 221 "pplex.l" - case 50: +case 50: #line 222 "pplex.l" - case 51: - YY_RULE_SETUP +case 51: +YY_RULE_SETUP #line 222 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 52: - YY_RULE_SETUP +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 52: +YY_RULE_SETUP #line 226 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 53: - YY_RULE_SETUP +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 53: +YY_RULE_SETUP #line 227 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 54: - YY_RULE_SETUP +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 54: +YY_RULE_SETUP #line 228 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - case 55: - /* rule 55 can match eol */ - YY_RULE_SETUP +{ suppress_echo = 0; BEGIN COPY_STATE; return REPLACE; } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP #line 229 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 56: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 56: +YY_RULE_SETUP #line 230 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 57: - YY_RULE_SETUP +{ ppecho (" "); } + YY_BREAK +case 57: +YY_RULE_SETUP #line 231 "pplex.l" - { - BEGIN INITIAL; - if (!strcasecmp(yytext, "FILLER")) { - ppecho(yytext); - } else { - ppecho_dataname(yytext); - } - suppress_echo = 0; - if (cb_cobol68_copy_in_data_description) { - pplval.s = strdup(yytext); - return TOKEN; - } - } - YY_BREAK - case 58: +{ + BEGIN INITIAL; + if (!strcasecmp (yytext, "FILLER")) { + ppecho (yytext); + } else { + ppecho_dataname (yytext); + } + suppress_echo = 0; + if (cb_cobol68_copy_in_data_description) { + pplval.s = strdup (yytext); + return TOKEN; + } + } + YY_BREAK +case 58: #line 245 "pplex.l" - case 59: +case 59: #line 246 "pplex.l" - case 60: - YY_RULE_SETUP +case 60: +YY_RULE_SETUP #line 246 "pplex.l" - { - suppress_echo = 0; - BEGIN INITIAL; - ppecho(yytext); - } - YY_BREAK - - case 61: - YY_RULE_SETUP +{ suppress_echo = 0; BEGIN INITIAL; ppecho (yytext); } + YY_BREAK + +case 61: +YY_RULE_SETUP #line 249 "pplex.l" - { - suppress_echo = (omit_data_redef_name) ? 1 : 0; - ppecho(yytext); - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return REDEFINES; - } - } - YY_BREAK - case 62: +{ + suppress_echo = (omit_data_redef_name) ? 1 : 0; + ppecho (yytext); + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return REDEFINES; + } +} + YY_BREAK +case 62: #line 259 "pplex.l" - case 63: +case 63: #line 260 "pplex.l" - case 64: +case 64: #line 261 "pplex.l" - case 65: +case 65: #line 262 "pplex.l" - case 66: +case 66: #line 263 "pplex.l" - case 67: +case 67: #line 264 "pplex.l" - case 68: - YY_RULE_SETUP +case 68: +YY_RULE_SETUP #line 264 "pplex.l" - { - /* these words are treated as comments */ - if (cb_verify(cb_author_paragraph, yytext)) { - /* skip comments until the end of line */ - int c; - - within_comment = 1; - while ((c = input()) != EOF) { - if (c == '\n') { - break; - } - } - unput(c); - } - } - YY_BREAK - case 69: +{ + /* these words are treated as comments */ + if (cb_verify (cb_author_paragraph, yytext)) { + /* skip comments until the end of line */ + int c; + + within_comment = 1; + while ((c = input ()) != EOF) { + if (c == '\n') { + break; + } + } + unput (c); + } +} + YY_BREAK +case 69: #line 281 "pplex.l" - case 70: +case 70: #line 282 "pplex.l" - case 71: +case 71: #line 283 "pplex.l" - case 72: - YY_RULE_SETUP +case 72: +YY_RULE_SETUP #line 283 "pplex.l" - { - /* these words are comments in IBM COBOL */ - if (cb_verify(cb_eject_statement, yytext)) { - /* do nothing for now */ - } else { - /* ECHO; */ /* comment should be suppressed, shouldn't it? */ - } - } - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +{ + /* these words are comments in IBM COBOL */ + if (cb_verify (cb_eject_statement, yytext)) { + /* do nothing for now */ + } else { + /* ECHO; */ /* comment should be suppressed, shouldn't it? */ + } +} + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP #line 292 "pplex.l" - { - ppecho("\n"); - cb_source_line++; - } - YY_BREAK - case 74: - YY_RULE_SETUP +{ ppecho ("\n"); cb_source_line++; } + YY_BREAK +case 74: +YY_RULE_SETUP #line 294 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 75: - YY_RULE_SETUP +{ ppecho (" "); } + YY_BREAK +case 75: +YY_RULE_SETUP #line 296 "pplex.l" - { - if (inside_bracket) { - ppecho(", "); - } else { - ppecho(" "); - } - } - YY_BREAK - case 76: - YY_RULE_SETUP +{ + if (inside_bracket) { + ppecho (", "); + } else { + ppecho (" "); + } +} + YY_BREAK +case 76: +YY_RULE_SETUP #line 304 "pplex.l" - { - inside_bracket++; - ppecho("("); - } - YY_BREAK - case 77: - YY_RULE_SETUP +{ + inside_bracket++; + ppecho ("("); +} + YY_BREAK +case 77: +YY_RULE_SETUP #line 309 "pplex.l" - { - if (inside_bracket) { - inside_bracket--; - } - ppecho(")"); - } - YY_BREAK - case 78: +{ + if (inside_bracket) { + inside_bracket--; + } + ppecho (")"); +} + YY_BREAK +case 78: /* rule 78 can match eol */ #line 317 "pplex.l" - case 79: +case 79: /* rule 79 can match eol */ #line 318 "pplex.l" - case 80: +case 80: /* rule 80 can match eol */ #line 319 "pplex.l" - case 81: +case 81: /* rule 81 can match eol */ #line 320 "pplex.l" - case 82: +case 82: /* rule 82 can match eol */ #line 321 "pplex.l" - case 83: +case 83: /* rule 83 can match eol */ #line 322 "pplex.l" - case 84: +case 84: /* rule 84 can match eol */ #line 323 "pplex.l" - case 85: +case 85: /* rule 85 can match eol */ #line 324 "pplex.l" - case 86: +case 86: /* rule 86 can match eol */ #line 325 "pplex.l" - case 87: +case 87: /* rule 87 can match eol */ #line 326 "pplex.l" - case 88: +case 88: /* rule 88 can match eol */ #line 327 "pplex.l" - case 89: +case 89: /* rule 89 can match eol */ #line 328 "pplex.l" - case 90: +case 90: /* rule 90 can match eol */ #line 329 "pplex.l" - case 91: +case 91: /* rule 91 can match eol */ #line 330 "pplex.l" - case 92: - /* rule 92 can match eol */ - YY_RULE_SETUP +case 92: +/* rule 92 can match eol */ +YY_RULE_SETUP #line 330 "pplex.l" - { - /* each numeric is not a level-number */ - char *p, *pcrnt; - cobc_mbspc2ascii(yytext); - pcrnt = yytext; - while (*pcrnt) { - for (p = pcrnt; *p && *p != ' ' && *p != '\n'; p++) - ; - for (; *p == ' ' || *p == '\n'; p++) { - if (*p == '\n') { - cb_source_line++; - } - *p = '\0'; - } - ppecho(pcrnt); - if (*p) { - ppecho(" "); - } - pcrnt = p; - } - } - YY_BREAK - case 93: - YY_RULE_SETUP +{ + /* each numeric is not a level-number */ + char *p, *pcrnt; + cobc_mbspc2ascii (yytext); + pcrnt = yytext; + while (*pcrnt) { + for (p = pcrnt; *p && *p != ' ' && *p != '\n' ; p++) + ; + for ( ; *p == ' ' || *p == '\n'; p++) { + if (*p == '\n') { + cb_source_line++; + } + *p = '\0'; + } + ppecho (pcrnt); + if (*p) { + ppecho (" "); + } + pcrnt = p; + } +} + YY_BREAK +case 93: +YY_RULE_SETUP #line 352 "pplex.l" - { - char *p = yytext; - cobc_mbspc2ascii(yytext); - while (*p == ' ') { - p++; - } - suppress_echo = (omit_data_entry_name) ? 1 : 0; - ppecho(p); - if (current_division == PP_DATA_DIVISION) { - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return LEVEL_NUMBER; - } - } - } - YY_BREAK - case 94: - YY_RULE_SETUP +{ + char *p = yytext; + cobc_mbspc2ascii (yytext); + while (*p == ' ') { + p++; + } + suppress_echo = (omit_data_entry_name) ? 1 : 0; + ppecho (p); + if (current_division == PP_DATA_DIVISION) { + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return LEVEL_NUMBER; + } + } +} + YY_BREAK +case 94: +YY_RULE_SETUP #line 368 "pplex.l" - { - ppecho(yytext); - return yytext[0]; - } - YY_BREAK - case 95: - YY_RULE_SETUP +{ + ppecho (yytext); + return yytext[0]; +} + YY_BREAK +case 95: +YY_RULE_SETUP #line 373 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); #endif /*I18N_UTF8*/ - ppecho(yytext); - } - YY_BREAK - case 96: + ppecho (yytext); } + YY_BREAK +case 96: #line 379 "pplex.l" - case 97: +case 97: #line 380 "pplex.l" - case 98: - YY_RULE_SETUP +case 98: +YY_RULE_SETUP #line 380 "pplex.l" - { - ppecho(yytext); - } - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(PROCESS_STATE): - case YY_STATE_EOF(COPY_STATE): - case YY_STATE_EOF(PSEUDO_STATE): - case YY_STATE_EOF(DATANAME_JOIN_STATE): +{ ppecho (yytext); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PROCESS_STATE): +case YY_STATE_EOF(COPY_STATE): +case YY_STATE_EOF(PSEUDO_STATE): +case YY_STATE_EOF(DATANAME_JOIN_STATE): #line 382 "pplex.l" - { - struct copy_info *p; - - p = copy_stack; - - yy_delete_buffer(YY_CURRENT_BUFFER); - - /* Terminate at the end of all input */ - if (p->next == NULL) { - within_comment = 0; - newline_count = 0; - inside_bracket = 0; - current_replace_list = NULL; - current_copy_replace_list = NULL; - current_joining_ext = NULL; - text_queue1 = text_queue2 = NULL; - copy_stack = NULL; - quotation_mark = 0; - consecutive_quotation = 0; - last_line_1 = -1; - last_line_2 = -1; - yyterminate(); - } - - /* Close the current file */ - fclose(ppin); - - /* Switch to the last buffer */ - if (p->replacing) { - pp_set_copy_replace_list(NULL); - } - if (p->joining) { - pp_set_joining_ext(NULL); - } - switch_to_buffer(p->line, p->file, p->buffer); - quotation_mark = p->quotation_mark; - - copy_stack = p->next; - free(p); - } - YY_BREAK - case 99: - YY_RULE_SETUP +{ + struct copy_info *p; + + p = copy_stack; + + yy_delete_buffer (YY_CURRENT_BUFFER); + + /* Terminate at the end of all input */ + if (p->next == NULL) { + within_comment = 0; + newline_count = 0; + inside_bracket = 0; + current_replace_list = NULL; + current_copy_replace_list = NULL; + current_joining_ext = NULL; + text_queue1 = text_queue2 = NULL; + copy_stack = NULL; + quotation_mark = 0; + consecutive_quotation = 0; + last_line_1 = -1; + last_line_2 = -1; + yyterminate (); + } + + /* Close the current file */ + fclose (ppin); + + /* Switch to the last buffer */ + if (p->replacing) { + pp_set_copy_replace_list (NULL); + } + if (p->joining) { + pp_set_joining_ext (NULL); + } + switch_to_buffer (p->line, p->file, p->buffer); + quotation_mark = p->quotation_mark; + + copy_stack = p->next; + free (p); +} + YY_BREAK +case 99: +YY_RULE_SETUP #line 423 "pplex.l" - YY_FATAL_ERROR("flex scanner jammed"); - YY_BREAK -#line 2722 "pplex.c" - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ((yy_c_buf_p) <= - &YY_CURRENT_BUFFER_LVALUE - ->yy_ch_buf[(yy_n_chars)]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans(yy_current_state); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer()) { - case EOB_ACT_END_OF_FILE: { - (yy_did_buffer_switch_on_eof) = 0; - - if (yywrap()) { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 2721 "pplex.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2643,149 +2858,170 @@ YY_DECL { * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(void) { - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) - YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); - - if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == - 0) { /* Don't try to fill the buffer, so this is an EOF. */ - if ((yy_c_buf_p) - (yytext_ptr)-YY_MORE_ADJ == 1) { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int)((yy_c_buf_p) - (yytext_ptr)-1); - - for (i = 0; i < number_to_move; ++i) - *(dest++) = *(source++); - - if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = (int)((yy_c_buf_p)-b->yy_ch_buf); - - if (b->yy_is_our_buffer) { - int new_size = b->yy_buf_size * 2; - - if (new_size <= 0) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2)); - } else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if (!b->yy_ch_buf) - YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - } - - if (num_to_read > YY_READ_BUF_SIZE) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ((yy_n_chars) == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin); - } - - else { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)yyrealloc( - (void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state(void) { - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 609 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -2793,589 +3029,650 @@ static yy_state_type yy_get_previous_state(void) { * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) { - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { - yy_current_state = (int)yy_def[yy_current_state]; - if (yy_current_state >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 608); - - return yy_is_jam ? 0 : yy_current_state; + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 609 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 608); + + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT -static void yyunput(int c, char *yy_bp) { - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + - 2) { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE - ->yy_ch_buf[YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while (source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - *--dest = *--source; - - yy_cp += (int)(dest - source); - yy_bp += (int)(dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = - (int)YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2) - YY_FATAL_ERROR("flex scanner push-back overflow"); - } - - *--yy_cp = (char)c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; + static void yyunput (int c, char * yy_bp ) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void) + static int yyinput (void) #else -static int input(void) + static int input (void) #endif { - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR) { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else { /* need more input */ - int offset = (int)((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch (yy_get_next_buffer()) { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap()) - return 0; - - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *)(yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file) { - - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } - - yy_init_buffer(YY_CURRENT_BUFFER, input_file); - yy_load_buffer_state(); + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) { - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } -static void yy_load_buffer_state(void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c - * YY_BUF_SIZE. - * + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2)); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file); + yy_init_buffer( b, file ); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ -void yy_delete_buffer(YY_BUFFER_STATE b) { - - if (!b) - return; + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; - if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE)0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *)b); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; - - yy_flush_buffer(b); + int oerrno = errno; + + yy_flush_buffer( b ); - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER) { - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_is_interactive = 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } - errno = oerrno; + b->yy_is_interactive = 0; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ -void yy_flush_buffer(YY_BUFFER_STATE b) { - if (!b) - return; + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer) { - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ -void yypop_buffer_state(void) { - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; - } +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(void) { - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state **)yyalloc( - num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset((yy_buffer_stack), 0, - num_to_alloc * sizeof(struct yy_buffer_state *)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) { - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state **)yyrealloc( - (yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, - grow_size * sizeof(struct yy_buffer_state *)); - (yy_buffer_stack_max) = num_to_alloc; - } + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } } -/** Setup the input buffer state to scan directly from a user-specified - * character buffer. +/** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size) { - YY_BUFFER_STATE b; - - if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || - base[size - 1] != YY_END_OF_BUFFER_CHAR) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b); - - return b; +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr) { - - return yy_scan_bytes(yystr, (int)strlen(yystr)); +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, int _yybytes_len) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n); - if (!b) - YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error(const char *msg) { - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless -#define yyless(n) \ - do { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg); \ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ -int yyget_lineno(void) { return yylineno; } +int yyget_lineno (void) +{ + + return yylineno; +} /** Get the input stream. - * + * */ -FILE *yyget_in(void) { return yyin; } +FILE *yyget_in (void) +{ + return yyin; +} /** Get the output stream. - * + * */ -FILE *yyget_out(void) { return yyout; } +FILE *yyget_out (void) +{ + return yyout; +} /** Get the length of the current token. - * + * */ -int yyget_leng(void) { return yyleng; } +int yyget_leng (void) +{ + return yyleng; +} /** Get the current token. - * + * */ -char *yyget_text(void) { return yytext; } +char *yyget_text (void) +{ + return yytext; +} /** Set the current line number. * @param _line_number line number - * + * */ -void yyset_lineno(int _line_number) { yylineno = _line_number; } +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. - * + * * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str) { yyin = _in_str; } +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} -void yyset_out(FILE *_out_str) { yyout = _out_str; } +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} -int yyget_debug(void) { return yy_flex_debug; } +int yyget_debug (void) +{ + return yy_flex_debug; +} -void yyset_debug(int _bdebug) { yy_flex_debug = _bdebug; } +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} -static int yy_init_globals(void) { - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(void) { - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack)); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next - * time yylex() is called, initialization will occur. */ - yy_init_globals(); - - return 0; +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; } /* @@ -3383,1033 +3680,1089 @@ int yylex_destroy(void) { */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n) { - - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s) { - int n; - for (n = 0; s[n]; ++n) - ; +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size) { return malloc(size); } - -void *yyrealloc(void *ptr, yy_size_t size) { +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void yyfree(void *ptr) { - free((char *)ptr); /* see yyrealloc() for (char *) cast */ +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 423 "pplex.l" -void pp_set_replace_list(struct cb_replace_list *list) { - current_replace_list = list; + +void +pp_set_replace_list (struct cb_replace_list *list) +{ + current_replace_list = list; } -void pp_set_copy_replace_list(struct cb_replace_list *list) { - current_copy_replace_list = list; +void +pp_set_copy_replace_list (struct cb_replace_list *list) +{ + current_copy_replace_list = list; } -void pp_set_joining_ext(struct cb_joining_ext *ext) { - current_joining_ext = ext; +void +pp_set_joining_ext (struct cb_joining_ext *ext) +{ + current_joining_ext = ext; } -#ifdef I18N_UTF8 -#define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" -#define UTF8_MINUS_SIGN "\xE2\x88\x92" +#ifdef I18N_UTF8 +# define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" +# define UTF8_MINUS_SIGN "\xE2\x88\x92" #else /*!I18N_UTF8*/ -#define SJIS_MINUS_SIGN "\x81\x7c" +# define SJIS_MINUS_SIGN "\x81\x7c" #endif /*I18N_UTF8*/ -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf) { - char *p = namebuf; - while (NULL != (p = strstr(p, UTF8_MINUS_SIGN))) { - memcpy(p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; - } - return; +#ifdef I18N_UTF8 +static void +convert_ucs_hyphen_minus (char *namebuf) +{ + char *p = namebuf; + while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + return; } #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *namebuf) { - int extlen, namelen, seplen; - const char *ext; - const char *sep; +static void +ppecho_dataname (char *namebuf) +{ + int extlen, namelen, seplen; + const char *ext; + const char *sep; -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(namebuf); +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (namebuf); #endif /*I18N_UTF8*/ - if (!current_joining_ext) { - ppecho(namebuf); - } else { - ext = current_joining_ext->ext; - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - extlen = strlen(ext); - namelen = strlen(namebuf); -#ifdef I18N_UTF8 - if (!utf8_ext_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = UTF8_FULLWIDTH_HYPHEN_MINUS; - seplen = 3; - } -#else /*!I18N_UTF8*/ - if (!sjis_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = SJIS_MINUS_SIGN; - seplen = 2; - } + if (!current_joining_ext) { + ppecho (namebuf); + } else { + ext = current_joining_ext->ext; + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + extlen = strlen (ext); + namelen = strlen (namebuf); +#ifdef I18N_UTF8 + if (!utf8_ext_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = UTF8_FULLWIDTH_HYPHEN_MINUS; + seplen = 3; + } +#else /*!I18N_UTF8*/ + if (!sjis_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = SJIS_MINUS_SIGN; + seplen = 2; + } #endif /*I18N_UTF8*/ - if (current_joining_ext->type == joining_as_prefix) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), sep, seplen); - memcpy(&(plexbuff1[extlen + seplen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == joining_as_suffix) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), sep, seplen); - memcpy(&(plexbuff1[namelen + seplen]), ext, extlen + 1); - } else if (current_joining_ext->type == prefixing) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == suffixing) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), ext, extlen + 1); - } - ppecho(plexbuff1); - } + if (current_joining_ext->type == joining_as_prefix) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), sep, seplen); + memcpy (&(plexbuff1[extlen+seplen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == joining_as_suffix) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), sep, seplen); + memcpy (&(plexbuff1[namelen+seplen]), ext, extlen+1); + } else if (current_joining_ext->type == prefixing) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == suffixing) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), ext, extlen+1); + } + ppecho (plexbuff1); + } } -static void switch_to_buffer(const int line, const char *file, - YY_BUFFER_STATE buffer) { - char *p; - - cb_source_line = line; - cb_source_file = strdup(file); - for (p = cb_source_file; *p; p++) { - if (*p == '\\') { - *p = '/'; - } - } - yy_switch_to_buffer(buffer); - fprintf(yyout, "# %d \"%s\"\n", line, cb_source_file); +static void +switch_to_buffer (const int line, const char *file, YY_BUFFER_STATE buffer) +{ + char *p; + + cb_source_line = line; + cb_source_file = strdup (file); + for (p = cb_source_file; *p; p++) { + if (*p == '\\') { + *p = '/'; + } + } + yy_switch_to_buffer (buffer); + fprintf (yyout, "# %d \"%s\"\n", line, cb_source_file); } -int ppopen(const char *name, struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct copy_info *p; - - for (; newline_count > 0; newline_count--) { - ungetc('\n', ppin); - } - - /* Open the copy file */ - ppin = fopen(name, "rb"); - if (!ppin) { - if (cb_source_file) { - cb_error(_("%s: %s"), name, strerror(errno)); - } else { - perror(name); - } - return -1; - } - - /* Add to dependency list */ - if (cb_depend_file) { - cb_depend_list = cb_text_list_add(cb_depend_list, name); - } - - /* Preserve the current buffer */ - p = cobc_malloc(sizeof(struct copy_info)); - p->line = cb_source_line; - p->file = cb_source_file; - p->replacing = replace_list ? 1 : 0; - p->joining = joining_ext ? 1 : 0; - p->buffer = YY_CURRENT_BUFFER; - p->quotation_mark = quotation_mark; - p->next = copy_stack; - copy_stack = p; - - /* Switch to new buffer */ - if (replace_list) { - pp_set_copy_replace_list(replace_list); - } - if (joining_ext) { - pp_set_joining_ext(joining_ext); - } - switch_to_buffer(1, name, yy_create_buffer(ppin, YY_BUF_SIZE)); - return 0; +int +ppopen (const char *name, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct copy_info *p; + + for (; newline_count > 0; newline_count--) { + ungetc ('\n', ppin); + } + + /* Open the copy file */ + ppin = fopen (name, "rb"); + if (!ppin) { + if (cb_source_file) { + cb_error (_("%s: %s"), name, strerror (errno)); + } else { + perror (name); + } + return -1; + } + + /* Add to dependency list */ + if (cb_depend_file) { + cb_depend_list = cb_text_list_add (cb_depend_list, name); + } + + /* Preserve the current buffer */ + p = cobc_malloc (sizeof (struct copy_info)); + p->line = cb_source_line; + p->file = cb_source_file; + p->replacing = replace_list ? 1 : 0; + p->joining = joining_ext ? 1 : 0; + p->buffer = YY_CURRENT_BUFFER; + p->quotation_mark = quotation_mark; + p->next = copy_stack; + copy_stack = p; + + /* Switch to new buffer */ + if (replace_list) { + pp_set_copy_replace_list (replace_list); + } + if (joining_ext) { + pp_set_joining_ext (joining_ext); + } + switch_to_buffer (1, name, yy_create_buffer (ppin, YY_BUF_SIZE)); + return 0; } -int ppcopy(const char *name, const char *lib, - struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct cb_text_list *il; - struct cb_text_list *el; - char *s; - struct stat st; - - if (lib) { - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - snprintf(plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); - s = plexbuff1; - } else { - s = (char *)name; - } - - /* Find the file */ - if (stat(s, &st) == 0) { - return ppopen(s, joining_ext, replace_list); - } - if (!plexbuff2) { - plexbuff2 = cobc_malloc(COB_SMALL_BUFF); - } - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - if (*s != '/') { - for (il = cb_include_list; il; il = il->next) { - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s/%s%s", il->text, name, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - } - } - cb_error(_("%s: %s"), name, strerror(errno)); - return -1; +int +ppcopy (const char *name, const char *lib, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct cb_text_list *il; + struct cb_text_list *el; + char *s; + struct stat st; + + if (lib) { + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + snprintf (plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); + s = plexbuff1; + } else { + s = (char *)name; + } + + /* Find the file */ + if (stat (s, &st) == 0) { + return ppopen (s, joining_ext, replace_list); + } + if (!plexbuff2) { + plexbuff2 = cobc_malloc (COB_SMALL_BUFF); + } + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + if (*s != '/') { + for (il = cb_include_list; il; il = il->next) { + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s/%s%s", + il->text, name, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + } + } + cb_error (_("%s: %s"), name, strerror (errno)); + return -1; } /* Check directives */ /* This is horrible but we have to parse directives directly after the read */ /* as flex buffers up input and it is then too late to use the flex parser */ -static void check_directive(char *buff, int *line_size) { - char *s; - char *dirptr; - size_t cnt; - int n; - char sbuff[5][256]; - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != ' ') { - return; - } - s = &buff[7]; - } else { - s = buff; - } - for (; *s == ' '; s++) { - ; - } - dirptr = s; - if (*s != '>') { - return; - } - s++; - if (*s != '>') { - return; - } - s++; - if (*s == 'D') { - if (cb_flag_debugging_line) { - memset(dirptr, ' ', 3); - } else { - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - strcat(buff, " *> DEBUG\n"); - *line_size = strlen(buff); - newline_count = 0; - } - return; - } - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - if (n < 2 || strcasecmp(sbuff[0], "SOURCE")) { - cb_warning(_("Invalid directive - ignored")); - return; - } - switch (n) { - case 2: - if (!strcasecmp(sbuff[1], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[1], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[1], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - break; - case 3: - if (strcasecmp(sbuff[1], "FORMAT") && strcasecmp(sbuff[1], "IS")) { - break; - } - if (!strcasecmp(sbuff[2], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[2], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[2], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[2], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - default: - if (strcasecmp(sbuff[1], "FORMAT")) { - break; - } - if (strcasecmp(sbuff[2], "IS")) { - break; - } - if (!strcasecmp(sbuff[3], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[3], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[3], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[3], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - } - cb_warning(_("Invalid directive - ignored")); +static void +check_directive (char *buff, int *line_size) +{ + char *s; + char *dirptr; + size_t cnt; + int n; + char sbuff[5][256]; + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != ' ') { + return; + } + s = &buff[7]; + } else { + s = buff; + } + for (; *s == ' '; s++) { + ; + } + dirptr = s; + if (*s != '>') { + return; + } + s++; + if (*s != '>') { + return; + } + s++; + if (*s == 'D') { + if (cb_flag_debugging_line) { + memset (dirptr, ' ', 3); + } else { + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + strcat (buff, " *> DEBUG\n"); + *line_size = strlen (buff); + newline_count = 0; + } + return; + } + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + if (n < 2 || strcasecmp (sbuff[0], "SOURCE")) { + cb_warning (_("Invalid directive - ignored")); + return; + } + switch (n) { + case 2: + if (!strcasecmp (sbuff[1], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[1], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[1], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + break; + case 3: + if (strcasecmp (sbuff[1], "FORMAT") && + strcasecmp (sbuff[1], "IS")) { + break; + } + if (!strcasecmp (sbuff[2], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[2], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[2], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[2], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + default: + if (strcasecmp (sbuff[1], "FORMAT")) { + break; + } + if (strcasecmp (sbuff[2], "IS")) { + break; + } + if (!strcasecmp (sbuff[3], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[3], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[3], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[3], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + } + cb_warning (_("Invalid directive - ignored")); } -static void check_dollar_directive(char *buff, int *line_size) { - struct cb_constant_list *l; - char *s; - size_t cnt; - int n; - char sbuff[5][256]; - int isDEFINED, isNOT; - int i; - COB_UNUSED(n); - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != '$') { - return; - } - if (*line_size > cb_text_column + 1) { - strcpy(buff + cb_text_column, "\n"); - } - s = &buff[6]; - } else { - if (buff[1] != '$') { - return; - } - s = buff; - } - - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - - if (strcasecmp(sbuff[0], "$IF") == 0) { - compile_directive_depth++; - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF is nested more than 10 times")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $IF statement")); - return; - } - if (strlen(sbuff[1]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Arguments not enough to $IF statemen")); - return; - } - - isDEFINED = 0; - isNOT = 0; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - if (strcasecmp(sbuff[2], "NOT") == 0) { - isNOT = 1; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - } - if (strcasecmp(sbuff[2 + isNOT], "DEFINED") == 0) { - isDEFINED = 1; - } else if (strcasecmp(sbuff[2 + isNOT], "=") != 0 || - strlen(sbuff[3 + isNOT]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid argument $IF statemen")); - return; - } - l = cb_const_list; - while (l) { - if (strcasecmp(l->name, sbuff[1]) == 0) { - if (isDEFINED) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - break; - } else { - switch (l->type) { - case CB_CONSTANT_TYPE_ALPANUM: - if (strlen(sbuff[3 + isNOT]) < 3 || - sbuff[3 + isNOT] != strchr(sbuff[3 + isNOT], '\"') || - sbuff[3 + isNOT] == strrchr(sbuff[3 + isNOT], '\"') || - strlen(strchr(sbuff[3 + isNOT] + 1, '\"')) > 1) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("%s is not a string"), sbuff[3 + isNOT]); - return; - } - strcpy(strchr(sbuff[3 + isNOT] + 1, '\"'), ""); - if (strcasecmp(sbuff[3 + isNOT] + 1, l->alphavalue) == 0) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - } - break; - case CB_CONSTANT_TYPE_NUMERIC: - // TODO - break; - default: - break; - } - break; - } - } - l = l->next; - } - } else if (strcasecmp(sbuff[0], "$ELSE") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $ELSE statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $ELSE")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_TRUE_ELSE || - cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE_ELSE) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$ELSE has continued")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE_ELSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE_ELSE; - } else if (strcasecmp(sbuff[0], "$END") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $END statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $END")); - return; - } - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; - compile_directive_depth--; - } else if (strcasecmp(sbuff[0], "$SET") == 0) { - if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE)") == 0) { - cb_source_format = CB_FORMAT_FREE; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { - cb_source_format = CB_FORMAT_FIXED; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0) { - cb_source_format = CB_FORMAT_VARIABLE; - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $SET")); - return; - } - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $ statements")); - return; - } - - if (compile_directive_depth > -1) { - for (i = 0; i <= compile_directive_depth; i++) { - if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && - cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { - cb_compile_status = CB_COMPILE_STATUS_FALSE; - return; - } - } - } - if (*buff == '\n') { - cb_compile_status = CB_COMPILE_STATUS_FALSE_END; - } else { - cb_compile_status = CB_COMPILE_STATUS_TRUE; - } +static void +check_dollar_directive (char *buff, int *line_size) +{ + struct cb_constant_list *l; + char *s; + size_t cnt; + int n; + char sbuff[5][256]; + int isDEFINED, isNOT; + int i; + COB_UNUSED(n); + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != '$') { + return; + } + if (*line_size > cb_text_column + 1) { + strcpy (buff + cb_text_column, "\n"); + } + s = &buff[6]; + } else { + if (buff[1] != '$') { + return; + } + s = buff; + } + + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + + if (strcasecmp (sbuff[0], "$IF") == 0) { + compile_directive_depth++; + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF is nested more than 10 times")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $IF statement")); + return; + } + if (strlen (sbuff[1]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Arguments not enough to $IF statemen")); + return; + } + + isDEFINED = 0; + isNOT = 0; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + if (strcasecmp (sbuff[2], "NOT") == 0) { + isNOT = 1; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + if (strcasecmp (sbuff[2+isNOT], "DEFINED") == 0) { + isDEFINED = 1; + } else if (strcasecmp (sbuff[2+isNOT], "=") != 0 || + strlen (sbuff[3+isNOT]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid argument $IF statemen")); + return; + } + l = cb_const_list; + while (l) { + if (strcasecmp (l->name, sbuff[1]) == 0) { + if (isDEFINED) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + break; + } else { + switch (l->type) { + case CB_CONSTANT_TYPE_ALPANUM: + if (strlen (sbuff[3+isNOT]) < 3 || + sbuff[3+isNOT] != strchr (sbuff[3+isNOT], '\"') || + sbuff[3+isNOT] == strrchr (sbuff[3+isNOT], '\"') || + strlen (strchr (sbuff[3+isNOT]+1, '\"')) > 1) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("%s is not a string"), sbuff[3+isNOT]); + return; + } + strcpy (strchr (sbuff[3+isNOT]+1, '\"'), ""); + if (strcasecmp (sbuff[3+isNOT]+1, l->alphavalue) == 0) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + break; + case CB_CONSTANT_TYPE_NUMERIC: + //TODO + break; + default: + break; + } + break; + } + } + l = l->next; + } + } else if (strcasecmp (sbuff[0], "$ELSE") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $ELSE statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $ELSE")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_TRUE_ELSE || + cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE_ELSE) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$ELSE has continued")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE) + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE_ELSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE_ELSE; + } else if (strcasecmp (sbuff[0], "$END") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $END statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $END")); + return; + } + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; + compile_directive_depth--; + } else if (strcasecmp (sbuff[0], "$SET") == 0) { + if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE)") == 0) { + cb_source_format = CB_FORMAT_FREE; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { + cb_source_format = CB_FORMAT_FIXED; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ + cb_source_format = CB_FORMAT_VARIABLE; + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $SET")); + return; + } + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $ statements")); + return; + } + + if (compile_directive_depth > -1) { + for (i = 0; i <= compile_directive_depth; i++) { + if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && + cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { + cb_compile_status = CB_COMPILE_STATUS_FALSE; + return; + } + } + } + if (*buff == '\n') { + cb_compile_status = CB_COMPILE_STATUS_FALSE_END; + } else { + cb_compile_status = CB_COMPILE_STATUS_TRUE; + } } /* * Read line */ -static int ppinput(char *buff, int max_size) { +static int +ppinput (char *buff, int max_size) +{ - char *bp; - size_t gotcr; - size_t continuation = 0; - int ipchar; - int i; - int n; - int coln; - char *str1 = NULL; - char *str2 = NULL; - int comment_counter = 0; + char *bp; + size_t gotcr; + size_t continuation = 0; + int ipchar; + int i; + int n; + int coln; + int buff_len = 0; + char *str1 = NULL; + char *str2 = NULL; + int comment_counter = 0; start: - /* read a line */ - gotcr = 0; - ipchar = 0; - for (n = 0; n < 256 && ipchar != '\n';) { - ipchar = getc(ppin); - if (ipchar == EOF) { - if (n > 0) { - break; - } - if (newline_count == 0) { - return 0; - } - memset(buff, '\n', newline_count); - buff[newline_count] = 0; - newline_count = 0; - return strlen(buff); - } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && - cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE) { - if (ipchar != ' ' && ipchar != '\n') { - buff[n++] = ' '; - } - } - if (gotcr) { - if (ipchar != '\n') { - buff[n++] = '\r'; - } - gotcr = 0; - } - if (ipchar == '\r') { - gotcr = 1; - } else if (ipchar == '\t') { - buff[n++] = ' '; - while (n % cb_tab_width != 0) { - buff[n++] = ' '; - } - } else { - buff[n++] = ipchar; - } - } + /* read a line */ + gotcr = 0; + ipchar = 0; + for (n = 0; n < 256 && ipchar != '\n';) { + ipchar = getc (ppin); + if (ipchar == EOF) { + if (n > 0) { + break; + } + if (newline_count == 0) { + return 0; + } + memset (buff, '\n', newline_count); + buff[newline_count] = 0; + newline_count = 0; + return strlen (buff); + } + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 + && cb_source_format != CB_FORMAT_VARIABLE) { + if (ipchar != ' ' && ipchar != '\n') { + buff[n++] = ' '; + } + } + if (gotcr) { + if (ipchar != '\n') { + buff[n++] = '\r'; + } + gotcr = 0; + } + if (ipchar == '\r') { + gotcr = 1; + } else if (ipchar == '\t') { + buff[n++] = ' '; + while (n % cb_tab_width != 0) { + buff[n++] = ' '; + } + } else { + buff[n++] = ipchar; + } + } + + if (buff[n - 1] != '\n') { + cb_warning (_("Line not terminated by a newline")); + buff[n++] = '\n'; + } + buff[n] = 0; + if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { + strcpy (buff, "\n"); + return strlen (buff); + } + str1 = strstr (buff, "*>"); + if (str1 != NULL) { + if ((str1-buff) >= 7) { + str2 = strstr (str1, "\""); + if (str2 == NULL) { + buff[str1-buff] = '\n'; + buff[str1-buff +1] = '\0'; + n = strlen (buff); + } + } + } + check_directive (buff, &n); + check_dollar_directive (buff, &n); + if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { + return YY_NULL; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { + newline_count++; + comment_counter++; + goto start; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { + cb_compile_status = CB_COMPILE_STATUS_NONE; + newline_count++; + comment_counter++; + goto start; + } + + /* nothing more to do with free format */ + if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { + return n; + } + + /* line too short */ + if (n < 8) { + newline_count++; + comment_counter++; + goto start; + } + + if (cb_flag_mfcomment) { + if (buff[0] == '*' || buff[0] == '/') { + /*if(!cb_flag_no_cobol_comment) { + register_comment(0, buff, comment_counter++); + }*/ + newline_count++; + goto start; + } + } + /* check the indicator (column 7) */ + bp = buff + 7; + switch (buff[6]) { + case ' ': + break; + case '-': + continuation = 1; + break; + case 'd': + case 'D': + /* debugging line */ + if (cb_flag_debugging_line) { + break; + } + newline_count++; + comment_counter++; + goto start; + case '*': + case '/': + /* comment line */ + /*if(!cb_flag_no_cobol_comment) { + register_comment(6, buff, comment_counter++); + }*/ + newline_count++; + goto start; + default: + /* invalid indicator */ + cb_error (_("Invalid indicator '%c' at column 7"), buff[6]); + return YY_NULL; + } + + /* skip comments that follow after AUTHORS, etc. */ + if (within_comment) { + /* Check all of "Area A" */ + switch (n) { + case 8: + if (buff[7] == ' ') { + newline_count++; + comment_counter++; + goto start; + } + break; + case 9: + if (!memcmp (&buff[7], " ", 2)) { + newline_count++; + comment_counter++; + goto start; + } + break; + case 10: + if (!memcmp (&buff[7], " ", 3)) { + newline_count++; + comment_counter++; + goto start; + } + break; + default: + if (!memcmp (&buff[7], " ", 4)) { + newline_count++; + comment_counter++; + goto start; + } + break; + } + within_comment = 0; + } - if (buff[n - 1] != '\n') { - cb_warning(_("Line not terminated by a newline")); - buff[n++] = '\n'; - } - buff[n] = 0; - if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { - strcpy(buff, "\n"); - return strlen(buff); - } - str1 = strstr(buff, "*>"); - if (str1 != NULL) { - if ((str1 - buff) >= 7) { - str2 = strstr(str1, "\""); - if (str2 == NULL) { - buff[str1 - buff] = '\n'; - buff[str1 - buff + 1] = '\0'; - n = strlen(buff); - } - } - } - check_directive(buff, &n); - check_dollar_directive(buff, &n); - if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { - return YY_NULL; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { - newline_count++; - comment_counter++; - goto start; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { - cb_compile_status = CB_COMPILE_STATUS_NONE; - newline_count++; - comment_counter++; - goto start; - } - - /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED && - cb_source_format != CB_FORMAT_VARIABLE) { - return n; - } - - /* line too short */ - if (n < 8) { - newline_count++; - comment_counter++; - goto start; - } - - if (cb_flag_mfcomment) { - if (buff[0] == '*' || buff[0] == '/') { - /*if(!cb_flag_no_cobol_comment) { - register_comment(0, buff, comment_counter++); - }*/ - newline_count++; - goto start; - } - } - /* check the indicator (column 7) */ - bp = buff + 7; - switch (buff[6]) { - case ' ': - break; - case '-': - continuation = 1; - break; - case 'd': - case 'D': - /* debugging line */ - if (cb_flag_debugging_line) { - break; - } - newline_count++; - comment_counter++; - goto start; - case '*': - case '/': - /* comment line */ - /*if(!cb_flag_no_cobol_comment) { - register_comment(6, buff, comment_counter++); - }*/ - newline_count++; - goto start; - default: - /* invalid indicator */ - cb_error(_("Invalid indicator '%c' at column 7"), buff[6]); - return YY_NULL; - } - - /* skip comments that follow after AUTHORS, etc. */ - if (within_comment) { - /* Check all of "Area A" */ - switch (n) { - case 8: - if (buff[7] == ' ') { - newline_count++; - comment_counter++; - goto start; - } - break; - case 9: - if (!memcmp(&buff[7], " ", 2)) { - newline_count++; - comment_counter++; - goto start; - } - break; - case 10: - if (!memcmp(&buff[7], " ", 3)) { - newline_count++; - comment_counter++; - goto start; - } - break; - default: - if (!memcmp(&buff[7], " ", 4)) { - newline_count++; - comment_counter++; - goto start; - } - break; - } - within_comment = 0; - } - - /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { - - /* show warning if it is not whitespaces */ - if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { - for (coln = cb_text_column; coln < n; coln++) { - if (buff[coln] != ' ' && buff[coln] != '\n') { - cb_warning(_("Source text after column %d"), cb_text_column); - break; - } - } - } - - /* remove it */ - strcpy(buff + cb_text_column, "\n"); - last_line_2 = cb_source_line; - n = cb_text_column + 1; - } - - /* skip blank lines */ - for (i = 7; buff[i] == ' '; i++) - ; - if (buff[i] == '\n') { - newline_count++; - comment_counter++; - goto start; - } - - if (continuation) { - /* line continuation */ - for (; *bp == ' '; bp++) - ; - - /* validate concatenation */ - if (consecutive_quotation) { - if (bp[0] == quotation_mark && bp[1] == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - quotation_mark = 0; - consecutive_quotation = 0; - } else if (quotation_mark) { - /* literal concatenation */ - if (*bp == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - } - } else { - /* normal line */ - quotation_mark = 0; - consecutive_quotation = 0; - } - - /* check if string literal is to be continued */ - for (i = bp - buff; buff[i] != '\n'; i++) { - if (buff[i] == '\'' || buff[i] == '\"') { - if (quotation_mark == 0) { - /* literal start */ - quotation_mark = buff[i]; - } else if (quotation_mark == buff[i]) { - if (i == cb_text_column - 1) { - /* consecutive quotation */ - consecutive_quotation = 1; - } else { - /* literal end */ - quotation_mark = 0; - } - } - } - } - - /* truncate trailing spaces, including the newline */ - if (quotation_mark) { - for (; i < 72;) { - buff[i++] = ' '; - } - buff[i] = 0; - } else { - for (i--; buff[i] == ' '; i--) - ; - if (buff[i] == '\'' || buff[i] == '\"') { - buff[++i] = ' '; - } - buff[i + 1] = 0; - } - - if (continuation) { - memmove(buff, bp, strlen(bp) + 1); - newline_count++; - comment_counter++; - } else { - /* insert newlines at the start of the buffer */ - memmove(buff + newline_count, bp, strlen(bp) + 1); - memset(buff, '\n', newline_count); - newline_count = 1; - } +#ifdef I18N_UTF8 + unsigned char *p = (unsigned char *)buff; + if(utf8_ext_pick(p)){ + buff_len = (int) utf8_calc_sjis_size(p, strlen(buff)); + }else{ + buff_len = n; + } +#else /*!I18N_UTF8*/ + buff_len = n; +#endif /*I18N_UTF8*/ - return strlen(buff); + /* check the text that is longer than cb_text_column */ + if (buff_len > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + + /* show warning if it is not whitespaces */ + if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { + for (coln = cb_text_column; coln < n; coln++) { + if (buff[coln] != ' ' && buff[coln] != '\n') { + cb_warning (_("Source text after column %d"), + cb_text_column); + break; + } + } + } + + /* remove it */ +#ifdef I18N_UTF8 + p = (unsigned char *) buff; + strcpy (buff + utf8_calc_sjis_column(p, cb_text_column), "\n"); +#else /*!I18N_UTF8*/ + strcpy (buff + cb_text_column, "\n"); +#endif /*I18N_UTF8*/ + last_line_2 = cb_source_line; + n = cb_text_column + 1; + } + + /* skip blank lines */ + for (i = 7; buff[i] == ' '; i++) ; + if (buff[i] == '\n') { + newline_count++; + comment_counter++; + goto start; + } + + if (continuation) { + /* line continuation */ + for (; *bp == ' '; bp++) ; + + /* validate concatenation */ + if (consecutive_quotation) { + if (bp[0] == quotation_mark && bp[1] == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + quotation_mark = 0; + consecutive_quotation = 0; + } else if (quotation_mark) { + /* literal concatenation */ + if (*bp == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + } + } else { + /* normal line */ + quotation_mark = 0; + consecutive_quotation = 0; + } + + /* check if string literal is to be continued */ + for (i = bp - buff; buff[i] != '\n'; i++) { + if (buff[i] == '\'' || buff[i] == '\"') { + if (quotation_mark == 0) { + /* literal start */ + quotation_mark = buff[i]; + } else if (quotation_mark == buff[i]) { + if (i == cb_text_column - 1) { + /* consecutive quotation */ + consecutive_quotation = 1; + } else { + /* literal end */ + quotation_mark = 0; + } + } + } + } + + /* truncate trailing spaces, including the newline */ + if (quotation_mark) { + for (; i < 72;) { + buff[i++] = ' '; + } + buff[i] = 0; + } else { + for (i--; buff[i] == ' '; i--) ; + if (buff[i] == '\'' || buff[i] == '\"') { + buff[++i] = ' '; + } + buff[i + 1] = 0; + } + + if (continuation) { + memmove (buff, bp, strlen (bp) + 1); + newline_count++; + comment_counter++; + } else { + /* insert newlines at the start of the buffer */ + memmove (buff + newline_count, bp, strlen (bp) + 1); + memset (buff, '\n', newline_count); + newline_count = 1; + } + + return strlen (buff); } -static void ppecho_0(const char *text, struct cb_text_list **pqueue, - struct cb_replace_list **preplace, - void(ppecho_proc)(const char *)) { - - struct cb_replace_list *r; - struct cb_text_list *l; - struct cb_text_list *queue; - - if (suppress_echo) { - /* generate no output */ - } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { - ppecho_proc(text); - } else if (!*preplace) { - for (; *pqueue; *pqueue = (*pqueue)->next) { - ppecho_proc((*pqueue)->text); - } - ppecho_proc(text); - } else { - /* Do replacement */ - - *pqueue = cb_text_list_add(*pqueue, text); - - while (*pqueue) { - for (r = *preplace; r; r = r->next) { - queue = *pqueue; - for (l = r->old_text; l; l = l->next) { - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l == NULL) { - break; - } - while (queue && (queue->text[0] == ' ' || queue->text[0] == '\n')) { - queue = queue->next; - } - if (queue == NULL) { - return; /* partial match */ - } - if (r->replace_type == CB_REPLACE_LEADING) { - break; - } else if (r->replace_type == CB_REPLACE_TRAILING) { - break; - } else if (r->replace_type == CB_REPLACE_OTHER) { - if (strcasecmp(l->text, queue->text) != 0) { - break; - } - } - queue = queue->next; - } - if (r->replace_type == CB_REPLACE_LEADING) { - if (!l || !queue) { - continue; - } - if (strncasecmp(l->text, queue->text, strlen(l->text)) == 0) { - break; - } - } else if (r->replace_type == CB_REPLACE_TRAILING) { - if (!l || !queue || strlen(queue->text) < strlen(r->old_text->text)) { - continue; - } - if (strcasecmp(queue->text + strlen(queue->text) - - strlen(r->old_text->text), - r->old_text->text) == 0) { - break; - } - } else if (l == NULL) { - /* match */ - break; - } - } - - /* match */ - if (r && r->replace_type == CB_REPLACE_LEADING) { - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - ppecho_proc(queue->text + oldlen); - queue = queue->next; - } else if (r && r->replace_type == CB_REPLACE_TRAILING) { - int i; - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - for (i = 0; i < strlen(queue->text) - oldlen; i++) { - fputc(queue->text[i], ppout); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - queue = queue->next; - } else if (r && l == NULL) { - for (l = r->new_text; l; l = l->next) { - ppecho_proc(l->text); - } - } else { - /* no match */ - if (!*pqueue) { - break; - } - ppecho_proc((*pqueue)->text); - queue = (*pqueue)->next; - } - - while (*pqueue != queue) { - if (!*pqueue) - break; - - l = (*pqueue)->next; - free(*pqueue); - *pqueue = l; - } - } - } +static void +ppecho_0 (const char *text, + struct cb_text_list **pqueue, + struct cb_replace_list **preplace, + void (ppecho_proc)(const char *)) { + + struct cb_replace_list *r; + struct cb_text_list *l; + struct cb_text_list *queue; + + if (suppress_echo) { + /* generate no output */ + } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { + ppecho_proc (text); + } else if (!*preplace) { + for (; *pqueue; *pqueue = (*pqueue)->next) { + ppecho_proc ((*pqueue)->text); + } + ppecho_proc (text); + } else { + /* Do replacement */ + + *pqueue = cb_text_list_add (*pqueue, text); + + while (*pqueue) { + for (r = *preplace; r; r = r->next) { + queue = *pqueue; + for (l = r->old_text; l; l = l->next) { + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l == NULL) { + break; + } + while (queue && (queue->text[0] == ' ' || + queue->text[0] == '\n')) { + queue = queue->next; + } + if (queue == NULL) { + return; /* partial match */ + } + if (r->replace_type == CB_REPLACE_LEADING) { + break; + } else if (r->replace_type == CB_REPLACE_TRAILING) { + break; + } else if (r->replace_type == CB_REPLACE_OTHER) { + if (strcasecmp (l->text, queue->text) != 0) { + break; + } + } + queue = queue->next; + } + if (r->replace_type == CB_REPLACE_LEADING) { + if (!l || !queue) { + continue; + } + if (strncasecmp (l->text, queue->text, strlen (l->text)) == 0) { + break; + } + } else if (r->replace_type == CB_REPLACE_TRAILING) { + if (!l || !queue || strlen (queue->text) < strlen (r->old_text->text)) { + continue; + } + if (strcasecmp (queue->text + strlen (queue->text) - strlen (r->old_text->text), r->old_text->text) == 0) { + break; + } + } else if (l == NULL) { + /* match */ + break; + } + } + + /* match */ + if (r && r->replace_type == CB_REPLACE_LEADING) { + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + ppecho_proc (queue->text + oldlen); + queue = queue->next; + } else if (r && r->replace_type == CB_REPLACE_TRAILING) { + int i; + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + for (i = 0; i < strlen (queue->text) - oldlen; i++) { + fputc (queue->text[i], ppout); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + queue = queue->next; + } else if (r && l == NULL) { + for (l = r->new_text; l; l = l->next) { + ppecho_proc (l->text); + } + } else { + /* no match */ + if (!*pqueue) { + break; + } + ppecho_proc ((*pqueue)->text); + queue = (*pqueue)->next; + } + + while (*pqueue != queue) { + if (!*pqueue) break; + + l = (*pqueue)->next; + free (*pqueue); + *pqueue = l; + } + } + } } -static void ppecho_final(const char *text) { fputs(text, ppout); } - -static void ppecho_2(const char *text) { - /* process REPLACE */ - ppecho_0(text, &text_queue2, ¤t_replace_list, ppecho_final); +static void +ppecho_final (const char *text) +{ + fputs (text, ppout); } -static void ppecho_1(const char *text) { - /* process COPY REPLACING */ - ppecho_0(text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +static void +ppecho_2 (const char *text) +{ + /* process REPLACE */ + ppecho_0 (text, &text_queue2, ¤t_replace_list, ppecho_final); } -static void ppecho(const char *text) { ppecho_1(text); } +static void +ppecho_1 (const char *text) +{ + /* process COPY REPLACING */ + ppecho_0 (text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +} -void pp_set_current_division(int divno) { current_division = divno; } +static void +ppecho (const char *text) +{ + ppecho_1 (text); +} -void pp_omit_data_entry_name(int on_off) { omit_data_entry_name = on_off; } +void pp_set_current_division (int divno) +{ + current_division = divno; +} -void pp_omit_data_redef_name(int on_off) { omit_data_redef_name = on_off; } +void pp_omit_data_entry_name (int on_off) +{ + omit_data_entry_name = on_off; +} -void register_comment(int comment_mark_index, char *buffer, int delta) { - struct comment_info *p = malloc(sizeof(struct comment_info)); - p->file = cb_source_file; - p->line = cb_source_line + delta + 1; +void pp_omit_data_redef_name (int on_off) +{ + omit_data_redef_name = on_off; +} - // Remove the unnecessary part of the comment - int str_len_original_line = strlen(buffer); - int comment_end_index; - if (buffer[str_len_original_line - 1] == '\n') { - if (str_len_original_line >= 2 && - buffer[str_len_original_line - 1] == '\r') { - comment_end_index = str_len_original_line - 2; - } else { - comment_end_index = str_len_original_line - 1; - } - } else { - comment_end_index = str_len_original_line; - } - int comment_len = comment_end_index - comment_mark_index - 1; - p->comment = malloc(comment_len + 1); - memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); - p->comment[comment_len] = '\0'; - - p->prev = comment_info_list_last; - p->next = NULL; - p->is_base_cobol_file = copy_stack->next == NULL; - p->position_in_source_code = position_in_source_code; - if (comment_info_list_last != NULL) { - comment_info_list_last->next = p; - } - comment_info_list_last = p; - if (comment_info_list_head == NULL) { - comment_info_list_head = p; - } +void register_comment(int comment_mark_index, char* buffer, int delta) { + struct comment_info* p = malloc(sizeof(struct comment_info)); + p->file = cb_source_file; + p->line = cb_source_line + delta + 1; + + // Remove the unnecessary part of the comment + int str_len_original_line = strlen(buffer); + int comment_end_index; + if(buffer[str_len_original_line - 1] == '\n') { + if(str_len_original_line >= 2 && buffer[str_len_original_line - 1] == '\r') { + comment_end_index = str_len_original_line - 2; + } else { + comment_end_index = str_len_original_line - 1; + } + } else { + comment_end_index = str_len_original_line; + } + int comment_len = comment_end_index - comment_mark_index - 1; + p->comment = malloc(comment_len + 1); + memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); + p->comment[comment_len] = '\0'; + + p->prev = comment_info_list_last; + p->next = NULL; + p->is_base_cobol_file = copy_stack->next == NULL; + p->position_in_source_code = position_in_source_code; + if(comment_info_list_last != NULL) { + comment_info_list_last->next = p; + } + comment_info_list_last = p; + if(comment_info_list_head == NULL) { + comment_info_list_head = p; + } } diff --git a/cobj/pplex.l b/cobj/pplex.l index 76bd67c9..57aef810 100644 --- a/cobj/pplex.l +++ b/cobj/pplex.l @@ -453,8 +453,16 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; } return; } @@ -958,6 +966,7 @@ ppinput (char *buff, int max_size) int i; int n; int coln; + int buff_len = 0; char *str1 = NULL; char *str2 = NULL; int comment_counter = 0; @@ -1129,8 +1138,19 @@ start: within_comment = 0; } +#ifdef I18N_UTF8 + unsigned char *p = (unsigned char *)buff; + if(utf8_ext_pick(p)){ + buff_len = (int) utf8_calc_sjis_size(p, strlen(buff)); + }else{ + buff_len = n; + } +#else /*!I18N_UTF8*/ + buff_len = n; +#endif /*I18N_UTF8*/ + /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + if (buff_len > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { /* show warning if it is not whitespaces */ if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { @@ -1144,7 +1164,12 @@ start: } /* remove it */ +#ifdef I18N_UTF8 + p = (unsigned char *) buff; + strcpy (buff + utf8_calc_sjis_column(p, cb_text_column), "\n"); +#else /*!I18N_UTF8*/ strcpy (buff + cb_text_column, "\n"); +#endif /*I18N_UTF8*/ last_line_2 = cb_source_line; n = cb_text_column + 1; } diff --git a/configure b/configure index 53d72733..d94bc68a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.8. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.8-hotfix1. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.8' -PACKAGE_VERSION='1.1.8' -PACKAGE_STRING='opensource COBOL 4J 1.1.8' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.8-hotfix1' +PACKAGE_VERSION='1.1.8-hotfix1' +PACKAGE_STRING='opensource COBOL 4J 1.1.8-hotfix1' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.8 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.8-hotfix1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.8] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.8-hotfix1] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.8:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.8-hotfix1:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.8 +opensource COBOL 4J configure 1.1.8-hotfix1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.8, which was +It was created by opensource COBOL 4J $as_me 1.1.8-hotfix1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.8' - VERSION='1.1.8' + PACKAGE='opensource-cobol-4j-1.1.8-hotfix1' + VERSION='1.1.8-hotfix1' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.8, which was +This file was extended by opensource COBOL 4J $as_me 1.1.8-hotfix1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.8 +opensource COBOL 4J config.status 1.1.8-hotfix1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1f6d6e3a..1cad9e64 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.8],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.8]) +AC_INIT([opensource COBOL 4J],[1.1.8-hotfix1],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.8-hotfix1]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 2345f1e7..b3d05096 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,13 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.8-hotfix1 | Windows | 21 | +| 1.1.8-hotfix1 | Ubuntu 24.04 | 21 | +| 1.1.8-hotfix1 | AlmaLinux 9 | 11 | +| 1.1.8-hotfix1 | Amazon Linux 2023 | 21 | +| 1.1.8 | Windows | 21 | +| 1.1.8 | Ubuntu 24.04 | 21 | +| 1.1.8 | AlmaLinux 9 | 11 | +| 1.1.8 | Amazon Linux 2023 | 21 | | 1.1.7-hotfix1 | Windows | 21 | | 1.1.7-hotfix1 | Ubuntu 24.04 | 21 | | 1.1.7-hotfix1 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c43a54c6..167ee388 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.8" + version = "1.1.8-hotfix1" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index aa5cc73f..68478874 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.8"; + public static final String version = "1.1.8-hotfix1"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index b9f8cbe4..f9afb4d6 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.8"); + System.out.println("1.1.8-hotfix1"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 2dc27427..4651e0fc 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.8", + "opensourcecobol4j_version": "1.1.8-hotfix1", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.8", + "opensourcecobol4j_version": "1.1.8-hotfix1", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.8", + "opensourcecobol4j_version": "1.1.8-hotfix1", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.8", + "opensourcecobol4j_version": "1.1.8-hotfix1", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 965bfbc7..9dedf8e9 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.8]) -m4_define([AT_PACKAGE_VERSION], [1.1.8]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.8]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.8-hotfix1]) +m4_define([AT_PACKAGE_VERSION], [1.1.8-hotfix1]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.8-hotfix1]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/update-version.sh b/update-version.sh index 555e6b81..fb52f85f 100755 --- a/update-version.sh +++ b/update-version.sh @@ -26,6 +26,7 @@ update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/lib update_versions_in_file win/config.h # Rebuild +automake --add-missing autoreconf ./configure --prefix=/usr/ make diff --git a/win/config.h b/win/config.h index 12a05a38..bf5a08b7 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.8" +#define PACKAGE "opensource-cobol4j-1.1.8-hotfix1" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.8" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.8-hotfix1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.8" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.8-hotfix1" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.8" +#define PACKAGE_VERSION "1.1.8-hotfix1" /* Define a patch level */ #define PATCH_LEVEL 0 From 18832f2a731b54d5c3ee7a21930208977d26fa95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 14:10:50 +0900 Subject: [PATCH 110/188] Bump com.google.guava:guava from 33.4.7-jre to 33.4.8-jre in /libcobj (#620) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.4.7-jre to 33.4.8-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-version: 33.4.8-jre dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 167ee388..de26d56e 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.4.7-jre") + implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") From 5792addd80d118cac10b9fa6d0fdcfe75a9b45a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:08:29 +0900 Subject: [PATCH 111/188] Bump com.github.spotbugs from 6.1.7 to 6.1.9 in /libcobj (#623) Bumps com.github.spotbugs from 6.1.7 to 6.1.9. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.1.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index de26d56e..68d1d4cc 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.7" + id("com.github.spotbugs") version "6.1.9" } repositories { From e0b78946c2a4b3f3f44ef48cc1ba3032655e0403 Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Thu, 24 Apr 2025 10:25:38 +0900 Subject: [PATCH 112/188] Handle SJIS hyphens in group item variable names correctly (#624) This pull request addresses a bug where SJIS hyphens in variable names within group items were not being correctly converted during Cobol to Java code generation, leading to incorrect variable names in the generated Java code. --- cobj/codegen.c | 31 +---------- tests/i18n_sjis.src/user-defined-word.at | 71 ++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 30 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index 617e2b6c..b6a22d51 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -807,7 +807,6 @@ static int is_call_parameter(const struct cb_field *f) { } static int joutput_field_storage(struct cb_field *f, struct cb_field *top) { - const char *p; int flag_call_parameter = is_call_parameter(top); if (flag_call_parameter || (f->offset == 0 && strcmp(f->name, top->name) == 0)) { @@ -815,37 +814,9 @@ static int joutput_field_storage(struct cb_field *f, struct cb_field *top) { joutput(base_name); free(base_name); return flag_call_parameter; - } else if (cb_flag_short_variable) { - joutput(CB_PREFIX_BASE); - for (p = f->name; *p != '\0'; ++p) { - if (*p == '-') { - joutput("_"); - } else { - joutput("%c", *p); - } - } - } else if (cb_flag_serial_variable) { + } else { char *base_name = get_java_identifier_base(f); joutput(base_name); - } else { - joutput(CB_PREFIX_BASE); - struct cb_field *field = f; - int flag_first_iteration = 1; - while (field) { - if (flag_first_iteration) { - flag_first_iteration = 0; - } else { - joutput("__"); - } - for (p = field->name; *p != '\0'; ++p) { - if (*p == '-') { - joutput("_"); - } else { - joutput("%c", *p); - } - } - field = field->parent; - } } return 0; } diff --git a/tests/i18n_sjis.src/user-defined-word.at b/tests/i18n_sjis.src/user-defined-word.at index a4f78f33..0effdb2b 100644 --- a/tests/i18n_sjis.src/user-defined-word.at +++ b/tests/i18n_sjis.src/user-defined-word.at @@ -177,6 +177,77 @@ AT_CHECK([java prog], [0], [OK]) AT_CLEANUP + +AT_SETUP([Nihongo field name with SJIS hyphens]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 sdrs|c`s`P PIC X(10) VALUE "test-data1". + 01 sdrs|qdbnqcP. + 03 sdrs|c`s`Q PIC X(10) VALUE "test-data2". + 03 sdrs|qdbnqcQ. + 05 sdrs|c`s`R PIC X(10) VALUE "test-data3". + PROCEDURE DIVISION. + DISPLAY sdrs|c`s`P. + DISPLAY sdrs|c`s`Q. + DISPLAY sdrs|c`s`R. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog], [0], +[test-data1 +test-data2 +test-data3 +]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`P' > /dev/null], [0]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`Q__sdrsQqdbnqcP' > /dev/null], [0]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`R__sdrsQqdbnqcQ__sdrsQqdbnqcP' > /dev/null], [0]) + +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`P' > /dev/null], [1]) +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`Q__sdrs|qdbnqcP' > /dev/null], [1]) +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`R__sdrs|qdbnqcQ__sdrs|qdbnqcP' > /dev/null], [1]) + +AT_CLEANUP + + +AT_SETUP([Nihongo field name with SJIS hyphens using -fshort-variable ]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 sdrs|c`s`P PIC X(10) VALUE "test-data1". + 01 sdrs|qdbnqcP. + 03 sdrs|c`s`Q PIC X(10) VALUE "test-data2". + 03 sdrs|qdbnqcQ. + 05 sdrs|c`s`R PIC X(10) VALUE "test-data3". + PROCEDURE DIVISION. + DISPLAY sdrs|c`s`P. + DISPLAY sdrs|c`s`Q. + DISPLAY sdrs|c`s`R. +]) + +AT_CHECK([cobj -fshort-variable prog.cob]) +AT_CHECK([java prog], [0], +[test-data1 +test-data2 +test-data3 +]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`P' > /dev/null], [0]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`Q' > /dev/null], [0]) +AT_CHECK([cat prog.java | grep 'f_sdrsQc`s`R' > /dev/null], [0]) + +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`P' > /dev/null], [1]) +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`Q' > /dev/null], [1]) +AT_CHECK([cat prog.java | grep 'f_sdrs|c`s`R' > /dev/null], [1]) + +AT_CLEANUP + + AT_SETUP([Nihongo field name in numeric test msg.]) AT_DATA([prog.cob], [ From c6e606407b446b6a188975aa72c76e0ff0284ad4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:36:58 +0900 Subject: [PATCH 113/188] Bump com.github.spotbugs from 6.1.9 to 6.1.10 in /libcobj (#627) Bumps com.github.spotbugs from 6.1.9 to 6.1.10. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.1.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 68d1d4cc..42a312c7 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.9" + id("com.github.spotbugs") version "6.1.10" } repositories { From dd3167139dbe76a0e446cf109aea5ff912baf70b Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Thu, 1 May 2025 10:33:51 +0900 Subject: [PATCH 114/188] Add error message if unimplemented subroutines are used (#628) --- cobj/tree.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ cobj/typeck.c | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/cobj/tree.h b/cobj/tree.h index 647827ee..167c76b7 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -222,6 +222,56 @@ enum cb_usage { enum cb_operand_type { CB_SENDING_OPERAND, CB_RECEIVING_OPERAND }; +enum cb_system_routine { + SYSTEM, + CBL_AND, + CBL_CHANGE_DIR, + CBL_CHECK_FILE_EXIST, + CBL_CLOSE_FILE, + CBL_COPY_FILE, + CBL_CREATE_DIR, + CBL_CREATE_FILE, + CBL_DELETE_DIR, + CBL_DELETE_FILE, + CBL_EQ, + CBL_ERROR_PROC, + CBL_EXIT_PROC, + CBL_FLUSH_FILE, + CBL_GET_CURRENT_DIR, + CBL_IMP, + CBL_NIMP, + CBL_NOR, + CBL_NOT, + CBL_OC_NANOSLEEP, + CBL_OPEN_FILE, + CBL_OR, + CBL_READ_FILE, + CBL_RENAME_FILE, + CBL_TOLOWER, + CBL_TOUPPER, + CBL_WRITE_FILE, + CBL_XOR, + CBL_OC_KEISEN, + CBL_OC_ATTRIBUTE, + C$CHDIR, + C$COPY, + C$DELETE, + C$FILEINFO, + C$LIST_DIRECTORY, + C$GETPID, + C$JUSTIFY, + C$CALLEDBY, + C$MAKEDIR, + C$NARG, + C$SLEEP, + C$PARAMSIZE, + C$TOUPPER, + C$TOLOWER, + CBL_X91, + CBL_XF4, + CBL_XF5 +}; + /* * Tree */ diff --git a/cobj/typeck.c b/cobj/typeck.c index 7acff062..333769d8 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -3099,13 +3099,48 @@ void cb_emit_call(cb_tree prog, cb_tree cb_using, cb_tree returning, const struct system_table *psyst; for (psyst = (const struct system_table *)&system_tab[0]; psyst->syst_name; psyst++) { - if (!strcmp((const char *)CB_LITERAL(prog)->data, - (const char *)psyst->syst_name)) { + const char *data = (const char *)CB_LITERAL(prog)->data; + if (!strcmp(data, (const char *)psyst->syst_name)) { + // error if the subroutine is not implemented + switch (psyst - &system_tab[0]) { + case CBL_CHANGE_DIR: + case CBL_CHECK_FILE_EXIST: + case CBL_CLOSE_FILE: + case CBL_COPY_FILE: + case CBL_CREATE_DIR: + case CBL_CREATE_FILE: + case CBL_DELETE_DIR: + case CBL_DELETE_FILE: + case CBL_ERROR_PROC: + case CBL_EXIT_PROC: + case CBL_FLUSH_FILE: + case CBL_GET_CURRENT_DIR: + case CBL_IMP: + case CBL_OPEN_FILE: + case CBL_READ_FILE: + case CBL_RENAME_FILE: + case CBL_WRITE_FILE: + case CBL_OC_KEISEN: + case CBL_OC_ATTRIBUTE: + case C$CHDIR: + case C$COPY: + case C$DELETE: + case C$FILEINFO: + case C$GETPID: + case C$JUSTIFY: + case C$MAKEDIR: + case C$NARG: + case C$SLEEP: + case C$PARAMSIZE: + cb_error(_("%s not implemented"), data); + return; + } if (psyst->syst_params > cb_list_length(cb_using)) { cb_error(_("Wrong number of CALL parameters for '%s'"), (char *)psyst->syst_name); return; } + is_sys_call = 1; break; } From 5e6875d5de298051a7d86ecc2b8cd8f3cd008f9f Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 2 May 2025 09:45:42 +0900 Subject: [PATCH 115/188] Update the message of --version (#626) --- cobj/cobj.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cobj/cobj.c b/cobj/cobj.c index bbd70a2c..293524f9 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -848,8 +848,13 @@ static void cobc_print_version(void) { #endif /*I18N_UTF8*/ puts("----"); printf("cobj (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - puts("Copyright (C) 2021-2023 TOKYO SYSTEM HOUSE CO.,LTD."); + puts("Copyright (C) 2021-2025 TOKYO SYSTEM HOUSE CO.,LTD."); printf("Built %s\n", cb_oc_build_stamp); + puts("----"); + puts("cobc (opensource COBOL) 1.5.2.0"); + puts("----"); + puts("cobc (OpenCOBOL) 1.1"); + puts("Copyright (C) 2001-2009 Keisuke Nishida / Roger While"); } static void cobc_print_usage(void) { From b8dc34dffe978f7c1320bee00241458109347674 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 08:54:08 +0900 Subject: [PATCH 116/188] Bump com.github.spotbugs from 6.1.10 to 6.1.11 in /libcobj (#632) Bumps com.github.spotbugs from 6.1.10 to 6.1.11. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.1.11 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 42a312c7..967692f3 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.10" + id("com.github.spotbugs") version "6.1.11" } repositories { From d8ced0c8205ecafec61e39c260a746dda3ee23a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 19:29:15 +0900 Subject: [PATCH 117/188] Bump org.json:json from 20250107 to 20250517 in /libcobj (#642) Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20250107 to 20250517. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-version: '20250517' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 967692f3..70c9fdcb 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") testRuntimeOnly("org.junit.platform:junit-platform-launcher") - implementation("org.json:json:20250107") + implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") implementation("org.slf4j:slf4j-api:2.0.17") From 5f5e3b1615b3a32696bb27187a567db6cc9aad3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 09:25:48 +0900 Subject: [PATCH 118/188] Bump com.github.spotbugs from 6.1.11 to 6.1.12 in /libcobj (#645) Bumps com.github.spotbugs from 6.1.11 to 6.1.12. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.1.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 70c9fdcb..f38c4400 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.11" + id("com.github.spotbugs") version "6.1.12" } repositories { From a955ff26801d955870f80e4f37f95b4224c146b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 20:43:03 +0900 Subject: [PATCH 119/188] Bump com.diffplug.spotless from 7.0.3 to 7.0.4 in /libcobj (#650) Bumps com.diffplug.spotless from 7.0.3 to 7.0.4. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-version: 7.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f38c4400..a4eb01a4 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.3" + id("com.diffplug.spotless") version "7.0.4" id("java") id("maven-publish") pmd From 76cb6a9a21e5583dfde5ca41cce7deae4c4c04d9 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 29 May 2025 16:53:49 +0900 Subject: [PATCH 120/188] feat: Add `create` command of `cobj-idx` (#648) --- libcobj/Makefile.am | 1 + libcobj/Makefile.in | 1 + .../indexed_file/CobolFileKeyInfo.java | 13 + .../indexed_file/IndexedFileUtilMain.java | 394 +++++++++++++++--- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/cobj-idx.at | 1 + tests/cobj-idx.src/create.at | 308 ++++++++++++++ 8 files changed, 651 insertions(+), 69 deletions(-) create mode 100644 libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java create mode 100644 tests/cobj-idx.src/create.at diff --git a/libcobj/Makefile.am b/libcobj/Makefile.am index 8096f0f5..9e2d467b 100644 --- a/libcobj/Makefile.am +++ b/libcobj/Makefile.am @@ -69,6 +69,7 @@ SRC_FILES = \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java \ + ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java \ diff --git a/libcobj/Makefile.in b/libcobj/Makefile.in index 8742892f..f38cb6ac 100644 --- a/libcobj/Makefile.in +++ b/libcobj/Makefile.in @@ -346,6 +346,7 @@ SRC_FILES = \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultString.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/ui/CobolResultDouble.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java \ + ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/ErrorLib.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/LoadResult.java \ ./app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/UserDataFormat.java \ diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java new file mode 100644 index 00000000..a015d2bd --- /dev/null +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/CobolFileKeyInfo.java @@ -0,0 +1,13 @@ +package jp.osscons.opensourcecobol.libcobj.user_util.indexed_file; + +class CobolFileKeyInfo { + public int offset; + public int size; + public boolean duplicate; + + public CobolFileKeyInfo(int offset, int size, boolean duplicate) { + this.offset = offset; + this.size = size; + this.duplicate = duplicate; + } +} diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 2c394ab4..933af573 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -13,6 +13,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import jp.osscons.opensourcecobol.libcobj.common.CobolModule; import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; import jp.osscons.opensourcecobol.libcobj.data.CobolDataStorage; @@ -52,6 +54,8 @@ public static void main(String[] args) { options.addOption("v", "version", false, "Print the version"); options.addOption("n", "new", false, "Delete all data before loading"); options.addOption("f", "format", true, "Specify the format of the input and output data"); + options.addOption("s", "size", true, "Specify the record size of the indexed file."); + options.addOption("k", "key", true, "Specify the key information of the indexed file."); CommandLineParser parser = new DefaultParser(); CommandLine cmd; @@ -120,7 +124,19 @@ public static void main(String[] args) { String indexedFilePath = args[1]; int exitCode = processInfoCommand(indexedFilePath); System.exit(exitCode); - + } else if ("create".equals(subCommand)) { + try { + validateCreateCommandArgs(unrecognizedArgs, cmd); + String indexedFilePath = unrecognizedArgs[1]; + int recordSize = parseRecordSize(cmd); + List keyInfoList = parseKeyOptions(cmd); + validateKeyInfoList(keyInfoList, recordSize); + processCreateIndexedFile(indexedFilePath, recordSize, keyInfoList, cmd); + System.exit(0); + } catch (Exception e) { + System.err.println("error: " + e.getMessage()); + System.exit(1); + } } else if ("load".equals(subCommand)) { if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { if (unrecognizedArgs.length < 2) { @@ -180,6 +196,19 @@ private static void printHelpMessage() { System.out.println("cobj-idx info "); System.out.println(" Show information of the indexed file."); System.out.println(); + System.out.println( + "cobj-idx create --size= --key="); + System.out.println(" Create a new indexed file."); + System.out.println(" The record size and key information are specified by the options."); + System.out.println(" By default, this command does not overwrite the indexed file."); + System.out.println(" To overwrite the indexed file, use the --new option."); + System.out.println(" Example) cobj-idx create test.idx --size=100 --key=2,2:5,4:d15,5"); + System.out.println(" File name: test.idx"); + System.out.println(" Record size: 100"); + System.out.println(" Primary key: 2-3"); + System.out.println(" Alternate key (No Duplicates):5-8"); + System.out.println(" Alternate key (Duplicates): 15-19"); + System.out.println(); System.out.println("cobj-idx load "); System.out.println(" Load the data from stdin into the indexed file."); System.out.println(" The default format of the input data is SEQUENTIAL of COBOL."); @@ -223,6 +252,98 @@ private static void printHelpMessage() { System.out.println(" Print the version of cobj-idx."); } + /** + * Parse the key options and return a list of CobolFileKeyInfo. + * + * @param cmd the CommandLine object containing the parsed command line arguments + * @return a list of CobolFileKeyInfo objects parsed from the key options in the provided CommandLine argument + */ + private static List parseKeyOptions(CommandLine cmd) throws Exception { + if (cmd.hasOption("k")) { + ArrayList keyInfoList = new ArrayList<>(); + + String keyOption = cmd.getOptionValue("k"); + Pattern pattern = + Pattern.compile("[1-9][0-9]*,[1-9][0-9]*(:d?[1-9][0-9]*,[1-9][0-9]*)*"); + Matcher matcher = pattern.matcher(keyOption); + + if (!matcher.matches()) { + Pattern patternPrimaryKeyDup = + Pattern.compile("d[1-9][0-9]*,[1-9][0-9]*(:d?[1-9][0-9]*,[1-9][0-9]*)*"); + Matcher matcherPrimaryKeyDup = patternPrimaryKeyDup.matcher(keyOption); + if (matcherPrimaryKeyDup.matches()) { + throw new IllegalArgumentException( + "the first key (primary key) must not be a duplicate key."); + } + + Pattern patternContains0 = Pattern.compile("[0-9]+,[0-9]+(:d?[0-9]+,[0-9]+)*"); + matcher = patternContains0.matcher(keyOption); + if (matcher.matches()) { + String[] keys = keyOption.split(":"); + for (String key : keys) { + String[] keyInfo = key.split(","); + String offsetString = keyInfo[0]; + if (offsetString.startsWith("d")) { + offsetString = offsetString.substring(1); + } + + if ("0".equals(offsetString)) { + throw new IllegalArgumentException( + String.format( + "key offsets must be greater than 0: %s", keyOption)); + } else if (offsetString.startsWith("0")) { + throw new IllegalArgumentException( + String.format( + "key offsets must not start with 0: %s", keyOption)); + } + String sizeString = keyInfo[1]; + if ("0".equals(sizeString)) { + throw new IllegalArgumentException( + String.format( + "key sizes must be greater than 0: %s", keyOption)); + } else if (sizeString.startsWith("0")) { + throw new IllegalArgumentException( + String.format( + "key sizes must not start with 0: %s", keyOption)); + } + } + } + throw new IllegalArgumentException( + String.format("invalid key information: %s", keyOption)); + } + String[] keys = keyOption.split(":"); + for (int i = 0; i < keys.length; i++) { + String key = keys[i]; + boolean isFirstKey = (i == 0); + String[] keyInfo = key.split(","); + if (keyInfo.length != 2) { + throw new IllegalArgumentException( + String.format("invalid key information: %s", keyOption)); + } + String offsetString = keyInfo[0]; + boolean duplicate = false; + if (keyInfo[0].startsWith("d")) { + if (isFirstKey) { + throw new IllegalArgumentException( + String.format( + "the first key (primary key) must not be a duplicate" + + " key.")); + } + offsetString = keyInfo[0].substring(1); + duplicate = true; + } + int offset = Integer.parseInt(offsetString); + int size = Integer.parseInt(keyInfo[1]); + + CobolFileKeyInfo keyInfoObj = new CobolFileKeyInfo(offset, size, duplicate); + keyInfoList.add(keyInfoObj); + } + return keyInfoList; + } else { + throw new IllegalArgumentException("no key information is specified."); + } + } + /** * Process info sub command, which shows information of the indexed file. * @@ -450,12 +571,6 @@ private static OutputStream getOutputStream(Optional filePath) } } - /** - * Create a CobolFile instance from the path of the indexed file. - * - * @param indexedFilePath TODO: 準備中 - * @return CobolFile instance if success, otherwise empty. - */ private static Optional createCobolFileFromIndexedFilePath(String indexedFilePath) { SQLiteConfig config = new SQLiteConfig(); config.setReadOnly(true); @@ -465,88 +580,229 @@ private static Optional createCobolFileFromIndexedFilePath(String ind "jdbc:sqlite:" + indexedFilePath, config.toProperties()); Statement stmt = conn.createStatement(); ) { - // Retrieve the record size ResultSet rs = stmt.executeQuery( "select value from metadata_string_int where key = 'record_size'"); if (!rs.next()) { return Optional.empty(); } + int recordSize = rs.getInt("value"); - // Create a record field - byte[] recordByteArray = new byte[recordSize]; - CobolDataStorage recordDataStorage = new CobolDataStorage(recordByteArray); - AbstractCobolField recordField = - CobolFieldFactory.makeCobolField( - recordSize, - recordDataStorage, - new CobolFieldAttribute(1, 0, 0, 0, null)); + // Create a record field and data storage + AbstractCobolField recordField = createIndexedRecordField(recordSize); + CobolDataStorage recordDataStorage = recordField.getDataStorage(); // Retrive key information - List keyList = new ArrayList(); + List keyList = new ArrayList<>(); rs = stmt.executeQuery( - "select idx, offset, size, duplicate from metadata_key order by idx"); + "select idx, offset, size, duplicate from metadata_key order by" + + " idx"); while (rs.next()) { int offset = rs.getInt("offset"); int size = rs.getInt("size"); boolean duplicate = rs.getBoolean("duplicate"); - - CobolFileKey cobolFileKey = new CobolFileKey(); - cobolFileKey.setOffset(offset); - cobolFileKey.setFlag(duplicate ? 1 : 0); - AbstractCobolField keyField = - CobolFieldFactory.makeCobolField( - size, - recordDataStorage.getSubDataStorage(offset), - new CobolFieldAttribute(33, 0, 0, 0, null)); - cobolFileKey.setField(keyField); - - keyList.add(cobolFileKey); + addCobolFileKeyToList(keyList, recordDataStorage, offset, size, duplicate); } - // Construct a CobolFile instance - byte[] fileStatus = new byte[4]; - byte[] indxedFilePathBytes = indexedFilePath.getBytes(AbstractCobolField.charSetSJIS); - AbstractCobolField assignField = - CobolFieldFactory.makeCobolField( - indxedFilePathBytes.length, - new CobolDataStorage(indxedFilePathBytes), - new CobolFieldAttribute(33, 0, 0, 0, null)); - CobolFileKey[] keyArray = new CobolFileKey[keyList.size()]; - keyList.toArray(keyArray); - CobolFile cobolFile = - CobolFileFactory.makeCobolFileInstance( - "f", - fileStatus, - assignField, - recordField, - null, - recordSize, - recordSize, - keyArray.length, - keyArray, - (char) 3, - (char) 1, - (char) 0, - (char) 0, - false, - (char) 0, - (char) 0, - false, - false, - false, - (char) 0, - false, - (char) 2, - false, - false, - (char) 0); - conn.close(); - return Optional.of(cobolFile); + // Return a CobolFile instance + return Optional.of( + createCobolFileInstance(indexedFilePath, recordSize, recordField, keyList)); } catch (SQLException e) { return Optional.empty(); } } + + /** + * Create a CobolFile instance from the path of the indexed file. + * + * @param indexedFilePath TODO: 準備中 + * @return CobolFile instance if success, otherwise empty. + */ + private static Optional createCobolFile( + String indexedFilePath, Integer recordSize, List keyInfoList) { + SQLiteConfig config = new SQLiteConfig(); + config.setReadOnly(true); + + // Create a record field + AbstractCobolField recordField = createIndexedRecordField(recordSize); + CobolDataStorage recordDataStorage = recordField.getDataStorage(); + + // Retrive key information + List keyList = new ArrayList<>(); + for (CobolFileKeyInfo key : keyInfoList) { + addCobolFileKeyToList( + keyList, recordDataStorage, key.offset - 1, key.size, key.duplicate); + } + + // Return a CobolFile instance + return Optional.of( + createCobolFileInstance(indexedFilePath, recordSize, recordField, keyList)); + } + + private static AbstractCobolField createIndexedRecordField(int recordSize) { + byte[] recordByteArray = new byte[recordSize]; + CobolDataStorage recordDataStorage = new CobolDataStorage(recordByteArray); + return CobolFieldFactory.makeCobolField( + recordSize, recordDataStorage, new CobolFieldAttribute(1, 0, 0, 0, null)); + } + + private static void addCobolFileKeyToList( + List keyList, + CobolDataStorage recordStorage, + int offset, + int size, + boolean duplicate) { + + CobolFileKey cobolFileKey = new CobolFileKey(); + cobolFileKey.setOffset(offset); + cobolFileKey.setFlag(duplicate ? 1 : 0); + AbstractCobolField keyField = + CobolFieldFactory.makeCobolField( + size, + recordStorage.getSubDataStorage(offset), + new CobolFieldAttribute(33, 0, 0, 0, null)); + cobolFileKey.setField(keyField); + + keyList.add(cobolFileKey); + } + + private static CobolFile createCobolFileInstance( + String indexedFilePath, + int recordSize, + AbstractCobolField recordField, + List keyList) { + byte[] fileStatus = new byte[4]; + byte[] indxedFilePathBytes = indexedFilePath.getBytes(AbstractCobolField.charSetSJIS); + AbstractCobolField assignField = + CobolFieldFactory.makeCobolField( + indxedFilePathBytes.length, + new CobolDataStorage(indxedFilePathBytes), + new CobolFieldAttribute(33, 0, 0, 0, null)); + CobolFileKey[] keyArray = new CobolFileKey[keyList.size()]; + keyList.toArray(keyArray); + return CobolFileFactory.makeCobolFileInstance( + "f", + fileStatus, + assignField, + recordField, + null, + recordSize, + recordSize, + keyArray.length, + keyArray, + (char) 3, + (char) 1, + (char) 0, + (char) 0, + false, + (char) 0, + (char) 0, + false, + false, + false, + (char) 0, + false, + (char) 2, + false, + false, + (char) 0); + } + + private static void validateCreateCommandArgs(String[] unrecognizedArgs, CommandLine cmd) { + if (unrecognizedArgs.length < 2) { + throw new IllegalArgumentException("no indexed file is specified."); + } + if (!cmd.hasOption("s")) { + throw new IllegalArgumentException("no record size is specified."); + } + } + + private static int parseRecordSize(CommandLine cmd) { + String recordSizeString = cmd.getOptionValue("s"); + int recordSize; + try { + recordSize = Integer.parseInt(recordSizeString); + } catch (NumberFormatException e) { + throw new IllegalArgumentException( + String.format("invalid record size: %s", recordSizeString), e); + } + if (recordSize <= 0) { + throw new IllegalArgumentException( + String.format("invalid record size: %d", recordSize)); + } + return recordSize; + } + + private static void validateKeyInfoList(List keyInfoList, int recordSize) { + if (keyInfoList.isEmpty()) { + throw new IllegalArgumentException("no key information is specified."); + } else if (keyInfoList.get(0).duplicate) { + throw new IllegalArgumentException( + "the first key (primary key) must not be a duplicate key."); + } + for (CobolFileKeyInfo keyInfo : keyInfoList) { + if (keyInfo.offset <= 0 + || keyInfo.size <= 0 + || keyInfo.offset + keyInfo.size > recordSize + 1) { + throw new IllegalArgumentException( + String.format( + "invalid key information: offset=%d, size=%d, record size=%d", + keyInfo.offset, keyInfo.size, recordSize)); + } + } + // Check if key ranges overlap + for (int i = 0; i < keyInfoList.size(); i++) { + CobolFileKeyInfo key1Info = keyInfoList.get(i); + int key1IndexInf = key1Info.offset; + int key1IndexSup = key1Info.offset + key1Info.size - 1; + for (int j = 0; j < i; j++) { + CobolFileKeyInfo key2Info = keyInfoList.get(j); + int key2IndexInf = key2Info.offset; + int key2IndexSup = key2Info.offset + key2Info.size - 1; + if (!(key1IndexSup < key2IndexInf || key2IndexSup < key1IndexInf)) { + throw new IllegalArgumentException( + String.format( + "keys overlap: %d,%d and %d,%d", + key1Info.offset, + key1Info.size, + key2Info.offset, + key2Info.size)); + } + } + } + } + + private static void processCreateIndexedFile( + String indexedFilePath, + int recordSize, + List keyInfoList, + CommandLine cmd) { + Optional cobolFile = createCobolFile(indexedFilePath, recordSize, keyInfoList); + if (!cobolFile.isPresent()) { + throw new IllegalArgumentException( + String.format( + "failed to create a cobol file from the indexed file: %s", + indexedFilePath)); + } + CobolIndexedFile cobolIndexedFile = (CobolIndexedFile) cobolFile.get(); + boolean enableOverwriteOption = cmd.hasOption("n"); + boolean indexedFileAlreadyExists = new File(indexedFilePath).exists(); + if (enableOverwriteOption || !indexedFileAlreadyExists) { + CobolModule module = + new CobolModule(null, null, null, null, 0, '.', '$', ',', 1, 1, 1, 0, null); + CobolModule.push(module); + cobolIndexedFile.open(CobolFile.COB_OPEN_OUTPUT, 0, null); + if (CobolRuntimeException.code != 0) { + throw new IllegalArgumentException("failed to open the indexed file."); + } + cobolIndexedFile.close(0, null); + } else { + throw new IllegalArgumentException( + String.format( + "%s already exists. Use -n or --new option to overwrite it.", + indexedFilePath)); + } + } } diff --git a/tests/Makefile.am b/tests/Makefile.am index 59bcacbd..e9deb5e1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -198,6 +198,7 @@ command_line_options_DEPENDENCIES = \ cobj_idx_DEPENDENCIES = \ cobj-idx.at \ + cobj-idx.src/create.at \ cobj-idx.src/info.at \ cobj-idx.src/load.at \ cobj-idx.src/unload.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 759fb12c..68820e48 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -737,6 +737,7 @@ command_line_options_DEPENDENCIES = \ cobj_idx_DEPENDENCIES = \ cobj-idx.at \ + cobj-idx.src/create.at \ cobj-idx.src/info.at \ cobj-idx.src/load.at \ cobj-idx.src/unload.at \ diff --git a/tests/cobj-idx.at b/tests/cobj-idx.at index fc2edb05..0860e50e 100644 --- a/tests/cobj-idx.at +++ b/tests/cobj-idx.at @@ -1,5 +1,6 @@ AT_INIT([cobj-idx]) +m4_include([create.at]) m4_include([info.at]) m4_include([load.at]) m4_include([unload.at]) diff --git a/tests/cobj-idx.src/create.at b/tests/cobj-idx.src/create.at new file mode 100644 index 00000000..ce2a09f6 --- /dev/null +++ b/tests/cobj-idx.src/create.at @@ -0,0 +1,308 @@ +AT_SETUP([create: basic]) + +# Normal case: Test for basic INDEXED file creation +AT_CHECK([${COBJ_IDX} create test.idx --size=30 --key=1,5]) + +# Verify that the created file exists +AT_CHECK([test -f test.idx]) + +# Check information of the created INDEXED file using info command +AT_CHECK([${COBJ_IDX} info test.idx], [0], +[Size of a record: 30 +Number of records: 0 +Primary key position: 1-5 +]) + +AT_CLEANUP + +AT_SETUP([create: with multiple keys]) + +# Normal case: Test for INDEXED file creation with multiple keys +AT_CHECK([${COBJ_IDX} create multikey.idx --size=50 --key=1,5:10,3:d20,6], [0], [], []) + +# Verify that the created file exists +AT_CHECK([test -f multikey.idx]) + +# Check information of the created INDEXED file using info command +AT_CHECK([${COBJ_IDX} info multikey.idx], [0], +[Size of a record: 50 +Number of records: 0 +Primary key position: 1-5 +Alternate key position (No duplicate): 10-12 +Alternate key position (Duplicates): 20-25 +]) + +AT_CLEANUP + +AT_SETUP([create: overwrite existing file]) + +# Create an existing file first +AT_CHECK([${COBJ_IDX} create overwrite.idx --size=10 --key=1,3]) + +# Try to overwrite without --new option +AT_CHECK([${COBJ_IDX} create overwrite.idx --size=20 --key=1,5], [1], [], +[error: overwrite.idx already exists. Use -n or --new option to overwrite it. +]) + +# Overwrite with --new option +AT_CHECK([${COBJ_IDX} create overwrite.idx --size=20 --key=1,5 --new]) + +# Confirm that the file was overwritten +AT_CHECK([${COBJ_IDX} info overwrite.idx], [0], +[Size of a record: 20 +Number of records: 0 +Primary key position: 1-5 +]) + +AT_CLEANUP + +AT_SETUP([create: error no indexed file]) + +# Error case: No INDEXED file name is specified +AT_CHECK([${COBJ_IDX} create], [1], [], +[error: no indexed file is specified. +]) + +AT_CHECK([${COBJ_IDX} create --key=1,3], [1], [], +[error: no indexed file is specified. +]) + +AT_CHECK([${COBJ_IDX} create --key=1,3:5,2], [1], [], +[error: no indexed file is specified. +]) + + +AT_CLEANUP + +AT_SETUP([create: error no record size]) + +# Error case: No record size is specified +AT_CHECK([${COBJ_IDX} create nosize.idx], [1], [], +[error: no record size is specified. +]) + +AT_CLEANUP + +AT_SETUP([create: error invalid record size]) + +# Error case: Invalid record size (string) +AT_CHECK([${COBJ_IDX} create invalid.idx --size=abc --key=1,5], [1], [], +[error: invalid record size: abc +]) + +# Error case: Invalid record size (negative number) +AT_CHECK([${COBJ_IDX} create invalid.idx --size=-10 --key=1,5], [1], [], +[error: invalid record size: -10 +]) + +# Error case: Invalid record size (zero) +AT_CHECK([${COBJ_IDX} create invalid.idx --size=0 --key=1,5], [1], [], +[error: invalid record size: 0 +]) + +AT_CLEANUP + +AT_SETUP([create: error no key]) + +# Error case: No key information is specified +AT_CHECK([${COBJ_IDX} create nokey.idx --size=30], [1], [], +[error: no key information is specified. +]) + +AT_CLEANUP + +AT_SETUP([create: error primary key is duplicate]) + +# Error case: Primary key is specified as a duplicate key +AT_CHECK([${COBJ_IDX} create dupkey.idx --size=30 --key=d1,5], [1], [], +[error: the first key (primary key) must not be a duplicate key. +]) + +AT_CLEANUP + +AT_SETUP([create: error invalid key format]) + +# Error case: Invalid key information format +AT_CHECK([${COBJ_IDX} create badkey.idx --size=30 --key=1], [1], [], +[error: invalid key information: 1 +]) + +AT_CHECK([${COBJ_IDX} create badkey.idx --size=30 --key=a,5], [1], [], +[error: invalid key information: a,5 +]) + +AT_CLEANUP + +AT_SETUP([create: error key out of range]) + +# Error case: Key range exceeds record size +AT_CHECK([${COBJ_IDX} create outrange.idx --size=10 --key=5,10], [1], [], +[error: invalid key information: offset=5, size=10, record size=10 +]) + +# Error case: Offset is less than or equal to 0 +AT_CHECK([${COBJ_IDX} create badoffset.idx --size=30 --key=0,5], [1], [], +[error: key offsets must be greater than 0: 0,5 +]) + +# Error case: Size is less than or equal to 0 +AT_CHECK([${COBJ_IDX} create badsize.idx --size=30 --key=1,0], [1], [], +[error: key sizes must be greater than 0: 1,0 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=0,2:15,4:d20,5], [1], [], +[error: key offsets must be greater than 0: 0,2:15,4:d20,5 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=10,2:0,4:d20,5], [1], [], +[error: key offsets must be greater than 0: 10,2:0,4:d20,5 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=10,2:15,4:d0,5], [1], [], +[error: key offsets must be greater than 0: 10,2:15,4:d0,5 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=10,0:15,4:d20,5], [1], [], +[error: key sizes must be greater than 0: 10,0:15,4:d20,5 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=10,2:15,0:d20,5], [1], [], +[error: key sizes must be greater than 0: 10,2:15,0:d20,5 +]) + +AT_CHECK([${COBJ_IDX} create test.idx --size=100 --key=10,2:15,4:d20,0], [1], [], +[error: key sizes must be greater than 0: 10,2:15,4:d20,0 +]) + +AT_CLEANUP + +AT_SETUP([create: error overlapping keys]) + +# Error case: Overlapping key ranges +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:3,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:5,2 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:5,2 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:1,6 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:2,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:2,4 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=3,5:1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,1:1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,2:1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,1:1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,2:1,5 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,6:2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,5:2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:2,4 2> /dev/null], [1]) + +############### + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d3,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d5,2 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d5,2 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:d1,6 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:d2,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:d2,4 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=3,5:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,1:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,2:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,1:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=5,2:d1,5 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,6:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,5:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=1,5:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=2,4:d2,4 2> /dev/null], [1]) + +############### + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d3,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d5,2 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d5,1 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d5,2 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,4:d1,6 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,4:d2,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,4:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,4:d2,4 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:3,5:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:5,1:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:5,2:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:5,1:d1,5 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:5,2:d1,5 2> /dev/null], [1]) + +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,6:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,5:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:1,5:d2,4 2> /dev/null], [1]) +AT_CHECK([${COBJ_IDX} create overlap.idx --size=30 --key=15,5:2,4:d2,4 2> /dev/null], [1]) + +AT_CLEANUP + +AT_SETUP([create: load and unload after creation]) + +# Normal case: Create an INDEXED file +AT_CHECK([${COBJ_IDX} create loadtest.idx --size=30 --key=1,5]) + +# Prepare test data for loading +AT_DATA([load_data.txt], +[abcde12345test data record 1** +fghij67890test data record 2** +]) + +# Load data into the created file (LINE_SEQUENTIAL format) +AT_CHECK([${COBJ_IDX} load loadtest.idx load_data.txt --format=txt]) + +# Unload and verify the data +AT_CHECK([${COBJ_IDX} unload loadtest.idx --format=txt], [0], +[abcde12345test data record 1** +fghij67890test data record 2** +]) + +# Test loading and unloading with binary format +AT_DATA([binary_data.bin], +[key0112345binary format 1key0267890binary format 2 +]) + +# Create a new file +AT_CHECK([${COBJ_IDX} create bintest.idx --size=25 --key=1,5]) + +# Load binary data +AT_CHECK([${COBJ_IDX} load bintest.idx binary_data.bin]) + +# Unload and verify the data +AT_CHECK([${COBJ_IDX} unload bintest.idx], [0], +[key0112345binary format 1key0267890binary format 2 +]) + +# Test with a file having multiple keys +AT_CHECK([${COBJ_IDX} create multiloadtest.idx --size=30 --key=1,5:10,5:d20,5]) + +AT_DATA([multikey_data.txt], +[abcde12345hello67890key3@@@@@@ +fghij54321world12345key4@@@@@@ +klmno12345test 67890key5@@@@@@ +]) + +AT_CHECK([${COBJ_IDX} load multiloadtest.idx multikey_data.txt --format=txt]) + +# Unload and verify the data +AT_CHECK([${COBJ_IDX} unload multiloadtest.idx --format=txt], [0], +[abcde12345hello67890key3@@@@@@ +fghij54321world12345key4@@@@@@ +klmno12345test 67890key5@@@@@@ +]) + +AT_CLEANUP \ No newline at end of file From b812d7188f85d91840ba6354489e2005673f337a Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 29 May 2025 16:54:06 +0900 Subject: [PATCH 121/188] Fix non-ASCII characters in external items and external file descriptors (#629) --- cobj/codegen.c | 88 ++++++++--------------------- tests/misc.src/fd-external.at | 102 ++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 64 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index b6a22d51..dc90d557 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -839,15 +839,8 @@ static void joutput_base(struct cb_field *f) { // EDIT /* Base name */ - if (top->flag_external) { - strcpy(name, top->name); - char *nmp; - for (nmp = name; *nmp; nmp++) { - if (*nmp == '-') { - *nmp = '_'; - } - } - } else { + strcpy_identifier_cobol_to_java(name, top->name); + if (!top->flag_external) { register_data_storage_list(f, top); } @@ -2249,9 +2242,7 @@ static void joutput_initialize_fp(cb_tree x, struct cb_field *f) { } static void joutput_initialize_external(cb_tree x, struct cb_field *f) { - unsigned char *p; cb_tree file; - char name[COB_MINI_BUFF]; joutput_prefix(); joutput_data(x); @@ -2260,22 +2251,10 @@ static void joutput_initialize_external(cb_tree x, struct cb_field *f) { f->size); } else if (f->storage == CB_STORAGE_FILE) { file = CB_TREE(f->file); - strcpy(name, CB_FILE(file)->record->name); - for (p = (unsigned char *)name; *p; p++) { - if (*p == '-') { - *p = '_'; - } - } - joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", name, - f->size); + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", + CB_FILE(file)->record->name, f->size); } else { - strcpy(name, f->name); - for (p = (unsigned char *)name; *p; p++) { - if (islower(*p)) { - *p = (unsigned char)toupper(*p); - } - } - joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", name, + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", f->name, f->size); } } @@ -4401,13 +4380,11 @@ static void joutput_internal_function(struct cb_program *prog, cb_tree l; struct cb_field *f; struct cb_file *fl; - char *p; int i; // int n; int parmnum = 0; // int seen = 0; // int anyseen; - char name[COB_MINI_BUFF]; /* Program function */ // output ("static int\n%s_ (const int entry", prog->program_id); @@ -4654,15 +4631,11 @@ static void joutput_internal_function(struct cb_program *prog, for (l = prog->file_list; l; l = CB_CHAIN(l)) { f = CB_FILE(CB_VALUE(l))->record; if (f->flag_external) { - strcpy(name, f->name); - for (p = name; *p; p++) { - if (*p == '-') { - *p = '_'; - } - } - joutput_line("%s%s = CobolExternal.getStorageAddress (\"%s\", %d);", - CB_PREFIX_BASE, name, name, - CB_FILE(CB_VALUE(l))->record_max); + joutput_prefix(); + joutput_base(f); + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);", f->name, + CB_FILE(CB_VALUE(l))->record_max); + joutput_newline(); } } joutput_initial_values(prog->working_storage); @@ -4752,15 +4725,10 @@ static void joutput_internal_function(struct cb_program *prog, for (l = prog->file_list; l; l = CB_CHAIN(l)) { f = CB_FILE(CB_VALUE(l))->record; if (f->flag_external) { - strcpy(name, f->name); - for (p = name; *p; p++) { - if (*p == '-') { - *p = '_'; - } - } - joutput_line("%s%s = CobolExternal.getStorageAddress (\"%s\", %d);", - CB_PREFIX_BASE, name, name, - CB_FILE(CB_VALUE(l))->record_max); + joutput_prefix(); + joutput_base(f); + joutput_line(" = CobolExternal.getStorageAddress (\"%s\", %d);", + f->name, CB_FILE(CB_VALUE(l))->record_max); } } joutput_initial_values(prog->working_storage); @@ -5492,8 +5460,6 @@ static void joutput_declare_member_variables(struct cb_program *prog, struct base_list *blp; const char *prevprog; struct cb_field *f; - char *p; - char name[COB_MINI_BUFF]; /* CobolDecimal型変数の宣言 */ if (prog->decimal_index_max) { @@ -5611,27 +5577,21 @@ static void joutput_declare_member_variables(struct cb_program *prog, /* External items */ for (f = prog->working_storage; f; f = f->sister) { if (f->flag_external) { - strcpy(name, f->name); - for (p = name; *p; p++) { - if (*p == '-') { - *p = '_'; - } - } - joutput("private CobolDataStorage\t%s%s = null;", CB_PREFIX_BASE, name); - joutput(" /* %s */\n", f->name); + joutput_prefix(); + joutput("private CobolDataStorage "); + joutput_base(f); + joutput(" = null; /* %s */", f->name); + joutput_newline(); } } for (l = prog->file_list; l; l = CB_CHAIN(l)) { f = CB_FILE(CB_VALUE(l))->record; if (f->flag_external) { - strcpy(name, f->name); - for (p = name; *p; p++) { - if (*p == '-') { - *p = '_'; - } - } - joutput("private CobolDataStorage\t%s%s = null;", CB_PREFIX_BASE, name); - joutput(" /* %s */\n", f->name); + joutput_prefix(); + joutput("private CobolDataStorage "); + joutput_base(f); + joutput(" = null; /* %s */", f->name); + joutput_newline(); } } diff --git a/tests/misc.src/fd-external.at b/tests/misc.src/fd-external.at index 78c01f25..59376c1e 100644 --- a/tests/misc.src/fd-external.at +++ b/tests/misc.src/fd-external.at @@ -66,3 +66,105 @@ AT_CHECK([java prog], [0], ]) AT_CLEANUP + +AT_SETUP([FD EXTERNAL nihongo]) + +AT_DATA([prog1.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog1. + environment division. + input-output section. + file-control. + select f assign to 'file.txt' + organization is line sequential + access mode is sequential. + DATA DIVISION. + file section. + fd f is external. + 01 ab|P pic x(5). + working-storage section. + 01 ab|Q pic x(5) external. + PROCEDURE DIVISION. + initialize ab|P. + initialize ab|Q. + + open output f. + call "sub". + close f. + + open input f. + read f. + close f. + + display ab|P. + display ab|Q. + STOP RUN. +]) + +AT_DATA([prog2.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog2 is initial. + + environment division. + input-output section. + file-control. + select f assign to 'file.txt' + organization is line sequential + access mode is sequential. + DATA DIVISION. + file section. + fd f is external. + 01 ab|P pic x(5). + working-storage section. + 01 ab|Q pic x(5) external. + PROCEDURE DIVISION. + initialize ab|P. + initialize ab|Q. + + open output f. + call "sub". + close f. + + open input f. + read f. + close f. + + display ab|P. + display ab|Q. + STOP RUN. +]) + +AT_DATA([sub.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. sub. + environment division. + input-output section. + file-control. + select f assign to "file.txt" + organization is line sequential + access mode is sequential. + DATA DIVISION. + file section. + fd f is external. + 01 ab|P pic x(5). + working-storage section. + 01 ab|Q pic x(5) external. + PROCEDURE DIVISION. + move "abcde" to ab|P. + write ab|P. + move "12345" to ab|Q. + goback. +]) + +AT_CHECK([${COBJ} prog1.cbl prog2.cbl sub.cbl]) +AT_CHECK([java prog1], [0], +[abcde +12345 +]) + +AT_CHECK([java prog2], [0], +[abcde +12345 +]) + +AT_CLEANUP From 9cb3bec1f59996e056cc3d724f5e60fc8168d981 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 29 May 2025 16:54:29 +0900 Subject: [PATCH 122/188] Generate code coverage reports (#649) --- .github/workflows/coverage.yml | 65 ++++++++++++++++++++++++++++++++++ .github/workflows/push.yml | 5 +++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..14523211 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,65 @@ +name: Coverage + +on: + workflow_dispatch: + workflow_call: + +permissions: + contents: read + +env: + CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + - name: Install dependencies on Ubuntu + run: | + sudo apt-get update -y + sudo apt-get install -y build-essential gettext autoconf bison flex gcovr + + - name: Checkout opensource COBOL 4J + uses: actions/checkout@v4 + + - name: Install opensource COBOL 4J + run: | + ./configure --prefix=/usr/ CFLAGS='-fprofile-arcs -ftest-coverage' + make + sudo make install + + - name: Run NIST test + working-directory: tests/cobol85 + run: make test || true + + - name: Run other tests + working-directory: tests + run: | + tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "misc") + for test in "${tests[@]}"; do + ./"$test" || true + done + + - name: Generate a coverage report + working-directory: cobj + run: | + gcov -l ./*.gcda + gcovr -r . \ + -e cobj-parser -e cobj-scanner -e cobj-pplex -e cobj-ppparse \ + -e parser.c -e parser.y -e scanner.l -e scanner.c -e pplex.l -e pplex.c -e ppparse.y -e ppparse.c \ + -e flag-help.def -e warning-help.def -e warning.def \ + --html-details --html-self-contained --html -o report.html --txt-metric=branch + mkdir -p coverage-report + cp ./*.html coverage-report + + - name: Archive a coverage report + uses: actions/upload-artifact@v4 + with: + name: code-coverage-report + path: cobj/coverage-report/ \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5798dbb8..a898e238 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,6 +40,11 @@ jobs: os: ${{ matrix.os }} configure-args: --enable-utf8 + coverage: + needs: check-workflows + if: github.ref == 'refs/heads/develop' + uses: ./.github/workflows/coverage.yml + run-test-other: needs: build strategy: From 9a1f871f48596ea69ab5d6c02cf725ace28305db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 21:49:19 +0900 Subject: [PATCH 123/188] Bump com.github.spotbugs from 6.1.12 to 6.1.13 in /libcobj (#651) Bumps com.github.spotbugs from 6.1.12 to 6.1.13. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.1.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index a4eb01a4..a25a0e98 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.12" + id("com.github.spotbugs") version "6.1.13" } repositories { From 13e046180dfd469148480bbfe4eb06e65210bf80 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 30 May 2025 14:09:31 +0900 Subject: [PATCH 124/188] Release v1.1.9 (#652) --- CHANGELOG.md | 15 +++++++++++ ChangeLog | 4 +++ NEWS | 15 +++++++++++ README.md | 12 ++++----- README_JP.md | 12 ++++----- ReleaseNote.md | 13 +++++++--- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 88 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c2f5960..a6451b57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.9] - 2025-05-30 + +### Add + +* Add a sub command create for cobj-idx. + * `cobj-idx create` creates a new indexed file. + +### Fix + +* Handle non-ASCII characters in EXTERNAL items and EXTERNAL file names correctly. +* Show error messages if unimplemented subroutines are used. +* Fix non-ASCII characters in external items and external file descriptors + * The older version does not convert `-` in EXTERNAL items and EXTERNAL file names into another valid character in Java. + * The older version converts `BC` in EXTERNAL file names into invalid characters. + ## [1.1.8-hotfix1] - 2025-04-18 ### Fix diff --git a/ChangeLog b/ChangeLog index d39de482..181736bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-05-30 OSS Consortium + + * opensource COBOL 4J v1.1.9 released. + 2025-04-18 OSS Consortium * opensource COBOL 4J v1.1.8-hotfix1 released. diff --git a/NEWS b/NEWS index edb17f02..d9d8746e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,21 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +** New Features + +(1) Add a sub command create for cobj-idx. + * `cobj-idx create` creates a new indexed file. + +** Fix + +(1) Handle non-ASCII characters in EXTERNAL items and EXTERNAL file names correctly. +(2) Show error messages if unimplemented subroutines are used. +(3) Fix non-ASCII characters in external items and external file descriptors + * The older version does not convert `-` in EXTERNAL items and EXTERNAL file names into another valid character in Java. + * The older version converts `BC` in EXTERNAL file names into invalid characters. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.8-hotfix1 ** Bug Fixes diff --git a/README.md b/README.md index 6cbd2729..158dac20 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz -cd opensourcecobol4j-1.1.8-hotfix1 +curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz +tar zxvf opensourcecobol4j-v1.1.9.tar.gz +cd opensourcecobol4j-1.1.9 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz -cd opensourcecobol4j-1.1.8-hotfix1 +curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz +tar zxvf opensourcecobol4j-v1.1.9.tar.gz +cd opensourcecobol4j-1.1.9 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make diff --git a/README_JP.md b/README_JP.md index 81b004c3..7cc2779e 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz -cd opensourcecobol4j-1.1.8-hotfix1 +curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz +tar zxvf opensourcecobol4j-v1.1.9.tar.gz +cd opensourcecobol4j-1.1.9 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.8-hotfix1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.8-hotfix1.tar.gz -tar zxvf opensourcecobol4j-v1.1.8-hotfix1.tar.gz -cd opensourcecobol4j-1.1.8-hotfix1 +curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz +tar zxvf opensourcecobol4j-v1.1.9.tar.gz +cd opensourcecobol4j-1.1.9 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make diff --git a/ReleaseNote.md b/ReleaseNote.md index a892c077..6c431ec5 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,5 +1,12 @@ +### Add + +* Add a sub command create for cobj-idx. (#648) + * `cobj-idx create` creates a new indexed file. + ### Fix -* Fix code generations for some WRITE statements. - * Older versions of the compiler converts some WRITE statements into invalid Java code. -* Fix the compiler to handle source code with UTF-8 encoded half-width Katakana characters correctly. +* Handle non-ASCII characters in EXTERNAL items and EXTERNAL file names correctly. (#624) +* Show error messages if unimplemented subroutines are used. (#628) +* Fix non-ASCII characters in external items and external file descriptors. (#629) + * The older version does not convert `-` in EXTERNAL items and EXTERNAL file names into another valid character in Java. + * The older version converts `BC` in EXTERNAL file names into invalid characters. \ No newline at end of file diff --git a/configure b/configure index d94bc68a..65108a97 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.8-hotfix1. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.9. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.8-hotfix1' -PACKAGE_VERSION='1.1.8-hotfix1' -PACKAGE_STRING='opensource COBOL 4J 1.1.8-hotfix1' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.9' +PACKAGE_VERSION='1.1.9' +PACKAGE_STRING='opensource COBOL 4J 1.1.9' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.8-hotfix1 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.8-hotfix1] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.9] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.8-hotfix1:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.9:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.8-hotfix1 +opensource COBOL 4J configure 1.1.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.8-hotfix1, which was +It was created by opensource COBOL 4J $as_me 1.1.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.8-hotfix1' - VERSION='1.1.8-hotfix1' + PACKAGE='opensource-cobol-4j-1.1.9' + VERSION='1.1.9' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.8-hotfix1, which was +This file was extended by opensource COBOL 4J $as_me 1.1.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.8-hotfix1 +opensource COBOL 4J config.status 1.1.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 1cad9e64..d538d223 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.8-hotfix1],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.8-hotfix1]) +AC_INIT([opensource COBOL 4J],[1.1.9],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.9]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index b3d05096..5ab6ffe3 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.9 | Windows | 21 | +| 1.1.9 | Ubuntu 24.04 | 21 | +| 1.1.9 | AlmaLinux 9 | 11 | +| 1.1.9 | Amazon Linux 2023 | 21 | | 1.1.8-hotfix1 | Windows | 21 | | 1.1.8-hotfix1 | Ubuntu 24.04 | 21 | | 1.1.8-hotfix1 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index a25a0e98..314a597b 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.8-hotfix1" + version = "1.1.9" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 68478874..c1625729 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.8-hotfix1"; + public static final String version = "1.1.9"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index f9afb4d6..792f3c3f 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.8-hotfix1"); + System.out.println("1.1.9"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 4651e0fc..b2b34390 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.8-hotfix1", + "opensourcecobol4j_version": "1.1.9", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.8-hotfix1", + "opensourcecobol4j_version": "1.1.9", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.8-hotfix1", + "opensourcecobol4j_version": "1.1.9", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.8-hotfix1", + "opensourcecobol4j_version": "1.1.9", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 9dedf8e9..8ea3f4e4 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.8-hotfix1]) -m4_define([AT_PACKAGE_VERSION], [1.1.8-hotfix1]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.8-hotfix1]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.9]) +m4_define([AT_PACKAGE_VERSION], [1.1.9]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.9]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index bf5a08b7..85bc090a 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.8-hotfix1" +#define PACKAGE "opensource-cobol4j-1.1.9" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.8-hotfix1" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.9" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.8-hotfix1" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.9" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.8-hotfix1" +#define PACKAGE_VERSION "1.1.9" /* Define a patch level */ #define PATCH_LEVEL 0 From a9fb6e6bc91da9c753354c3d3e48e2d27d0b7eb4 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 30 May 2025 15:04:30 +0900 Subject: [PATCH 125/188] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 158dac20..395946ce 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250418 +docker pull opensourcecobol/opensourcecobol4j:20250530 ``` Execute the following commands in order to run the "Hello World" COBOL program. From 3780bf691eafecbec7f4ea40aafc2681b926f026 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 30 May 2025 15:05:09 +0900 Subject: [PATCH 126/188] Update README_JP.md --- README_JP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_JP.md b/README_JP.md index 7cc2779e..6b3f1fda 100644 --- a/README_JP.md +++ b/README_JP.md @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250418 +docker pull opensourcecobol/opensourcecobol4j:20250530 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 From 5a50d292cfd0c134746a58cc766e538d1e8604a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:45:11 +0900 Subject: [PATCH 127/188] Bump org.junit.jupiter:junit-jupiter from 5.12.2 to 5.13.0 in /libcobj (#657) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.12.2 to 5.13.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 314a597b..6deb9733 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.49.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.13.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From 5522047b4eb99364800e7f34e4c01ff5ae44c191 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:58:39 +0900 Subject: [PATCH 128/188] Bump org.xerial:sqlite-jdbc from 3.49.1.0 to 3.50.1.0 in /libcobj (#659) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.49.1.0 to 3.50.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.49.1.0...3.50.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-version: 3.50.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 6deb9733..c96b8957 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.8-jre") - implementation("org.xerial:sqlite-jdbc:3.49.1.0") + implementation("org.xerial:sqlite-jdbc:3.50.1.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.0") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From eebf61277ad219e371ea58eeb7ae67b866c818a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:58:48 +0900 Subject: [PATCH 129/188] Bump com.github.spotbugs from 6.1.13 to 6.2.0 in /libcobj (#660) Bumps com.github.spotbugs from 6.1.13 to 6.2.0. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c96b8957..13280350 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.1.13" + id("com.github.spotbugs") version "6.2.0" } repositories { From b3dc89c54560094026b12cf2380bb2afdab2d6c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:58:55 +0900 Subject: [PATCH 130/188] Bump org.junit.jupiter:junit-jupiter from 5.13.0 to 5.13.1 in /libcobj (#661) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.13.0 to 5.13.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 13280350..fc6abf18 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.50.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.13.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.13.1") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From d0541531f3f58c687043953d1a7edf8e88022500 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Wed, 11 Jun 2025 17:24:40 +0900 Subject: [PATCH 131/188] Fix CI trigger (#663) Remove trigger `review_requested` --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 36401c57..11cbaba1 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -2,7 +2,7 @@ name: test on pull request on: pull_request: - types: [opened, reopened, review_requested, synchronize] + types: [opened, reopened, synchronize] paths-ignore: - '*.md' - 'ChangeLog' From 2794a5ea1e3843bf11663b50caf741875665d808 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 12 Jun 2025 13:07:48 +0900 Subject: [PATCH 132/188] Remove the option `--edit-code-command` (#664) --- cobj/cobj.c | 8 -- cobj/cobj.h | 3 - cobj/codegen.c | 48 +--------- tests/Makefile.am | 1 - tests/Makefile.in | 1 - tests/command-line-options.at | 2 - .../edit-code-command.at | 94 ------------------- 7 files changed, 1 insertion(+), 156 deletions(-) delete mode 100644 tests/command-line-options.src/edit-code-command.at diff --git a/cobj/cobj.c b/cobj/cobj.c index 293524f9..6b0e2a36 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -194,9 +194,6 @@ char *cb_single_jar_name = NULL; int cb_flag_info_json = 0; char *cb_info_json_dir = NULL; -char edit_code_command[512]; -char edit_code_command_is_set = 0; - #define PROGRAM_ID_LIST_MAX_LEN 1024 char *program_id_list[PROGRAM_ID_LIST_MAX_LEN]; @@ -314,7 +311,6 @@ static const struct option long_options[] = { {"reference_check", no_argument, NULL, 'K'}, {"constant", optional_argument, NULL, '3'}, {"fdefaultbyte", required_argument, NULL, OPTION_ID_DEFAULT_BYTE}, - {"edit-code-command", optional_argument, NULL, '['}, #undef CB_FLAG #define CB_FLAG(var, name, doc) \ {"f" name, no_argument, &var, 1}, {"fno-" name, no_argument, &var, 0}, @@ -1206,10 +1202,6 @@ static int process_command_line(const int argc, char *argv[]) { perror(optarg); } break; - case '[': - strcpy(edit_code_command, optarg); - edit_code_command_is_set = 1; - break; case 'I': #ifdef _MSC_VER diff --git a/cobj/cobj.h b/cobj/cobj.h index 5c91309c..eb6f815f 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -175,9 +175,6 @@ DECLNORET extern void cobc_abort(const char *filename, extern size_t cobc_check_valid_name(char *name); -extern char edit_code_command[512]; -extern char edit_code_command_is_set; - #ifdef I18N_UTF8 #define COB_U8CSIZ 3 diff --git a/cobj/codegen.c b/cobj/codegen.c index dc90d557..f0242a74 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -187,7 +187,6 @@ static char *convert_byte_value_format(char value); static void append_label_id_map(struct cb_label *label); static void create_label_id_map(struct cb_program *prog); static void destroy_label_id_map(void); -static void joutput_edit_code_command(const char *target); static void joutput_label_variable(struct cb_label *label); static void joutput_label_variable_name(char *s, int key, @@ -675,35 +674,6 @@ static void joutput_local(const char *fmt, ...) { } } -static void joutput_edit_code_command(const char *target) { - if (!edit_code_command_is_set) { - return; - } - - char command[BUF_SIZE]; - char buf[BUF_SIZE]; - sprintf(command, "%s --target=%s", edit_code_command, target); - -#ifdef _WIN32 - FILE *fp = _popen(command, "r"); -#else - FILE *fp = popen(command, "r"); -#endif - if (fp == NULL) { - return; - } - memset(buf, 0, BUF_SIZE); - - while (fgets(buf, BUF_SIZE, fp) != NULL) { - joutput("%s", buf); - } -#ifdef _WIN32 - _pclose(fp); -#else - pclose(fp); -#endif -} - /* * Field */ @@ -6082,9 +6052,6 @@ void codegen(struct cb_program *prog, const int nested, char **program_id_list, if (cb_java_package_name) { joutput_line("package %s;\n", cb_java_package_name); } - if (edit_code_command_is_set) { - joutput_edit_code_command("file-header"); - } joutput_line("import java.io.UnsupportedEncodingException;"); joutput_line("import jp.osscons.opensourcecobol.libcobj.*;"); @@ -6113,17 +6080,7 @@ void codegen(struct cb_program *prog, const int nested, char **program_id_list, } }*/ - if (edit_code_command_is_set) { - joutput_edit_code_command("main-class-annotation"); - } - if (edit_code_command_is_set) { - joutput("public class %s implements CobolRunnable, ", prog->program_id); - joutput_edit_code_command("main-class-implements"); - joutput(" {\n"); - } else { - joutput_line("public class %s implements CobolRunnable {", - prog->program_id); - } + joutput_line("public class %s implements CobolRunnable {", prog->program_id); joutput_indent_level += 2; joutput("\n"); @@ -6135,9 +6092,6 @@ void codegen(struct cb_program *prog, const int nested, char **program_id_list, // output_storage ("union cob_call_union\tcob_unifunc;\n\n"); joutput_line("private CobolRunnable cob_unifunc;\n"); - if (edit_code_command_is_set) { - joutput_edit_code_command("main-class-contents"); - } joutput("\n"); joutput_line("@Override"); diff --git a/tests/Makefile.am b/tests/Makefile.am index e9deb5e1..3f4306c0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -185,7 +185,6 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/ffold-copy.at \ command-line-options.src/info-java-dir.at \ command-line-options.src/java-package.at \ - command-line-options.src/edit-code-command.at \ command-line-options.src/file-path.at \ command-line-options.src/fdefaultbyte.at \ command-line-options.src/ffunctions-all.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 68820e48..3e13f2b5 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -724,7 +724,6 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/ffold-copy.at \ command-line-options.src/info-java-dir.at \ command-line-options.src/java-package.at \ - command-line-options.src/edit-code-command.at \ command-line-options.src/file-path.at \ command-line-options.src/fdefaultbyte.at \ command-line-options.src/ffunctions-all.at \ diff --git a/tests/command-line-options.at b/tests/command-line-options.at index b057fd5b..bf321222 100644 --- a/tests/command-line-options.at +++ b/tests/command-line-options.at @@ -36,5 +36,3 @@ m4_include([jar.at]) m4_include([std.at]) m4_include([conf.at]) m4_include([Wimplicit-define.at]) - -# m4_include([edit-code-command.at]) diff --git a/tests/command-line-options.src/edit-code-command.at b/tests/command-line-options.src/edit-code-command.at deleted file mode 100644 index 7985cbb2..00000000 --- a/tests/command-line-options.src/edit-code-command.at +++ /dev/null @@ -1,94 +0,0 @@ -AT_SETUP([-edit-code-command]) - -AT_DATA([prog.cbl], [ - identification division. - program-id. prog. - procedure division. - display "hello". -]) - -AT_DATA([SampleInterface.java], [ - public interface SampleInterface { - public void sampleInterfaceRun(); - } -]) - -AT_DATA([CallSampleInterface.java], [ - public class CallSampleInterface { - public static void main(String@<:@@:>@ args) { - SampleInterface s = new prog(); - s.sampleInterfaceRun(); - } - } -]) - -AT_DATA([edit.sh], [ -#!/bin/bash - -while getopts c:t-: opt; do - optarg="$OPTARG" - if @<:@@<:@ "$opt" = - @:>@@:>@; then - opt="-${OPTARG%%=*}" - optarg="${OPTARG/${OPTARG%%=*}/}" - optarg="${optarg#=}" - - if @<:@@<:@ -z "$optarg" @:>@@:>@ && @<:@@<:@ ! "${!OPTIND}" = -* @:>@@:>@; then - optarg="${!OPTIND}" - shift - fi - fi - - case "-$opt" in - --target) - target="$optarg" - ;; - --class-name) - class_name="$optarg" - ;; - --) - break - ;; - esac -done -shift $((OPTIND - 1)) - - -case "$target" in - # when `--target=main-class` is specified - main-class-annotation) - echo "//annotation here" - exit 0 - ;; - # when `--target=file-header` is specified - file-header) - echo '//file-header here' - exit 0 - ;; - # when `--target=main-class` is specified - main-class-implements) - echo -n 'SampleInterface' - exit 0 - ;; - # when `--target=main-class` is specified - main-class-contents) - echo ' @Override' - echo ' public void sampleInterfaceRun() { System.out.println("COBOL"); }' - exit 0 - ;; -esac - -exit 1 - -]) - -AT_CHECK([${COBJ} -edit-code-command="bash edit.sh" prog.cbl], [0]) -AT_CHECK([java prog], [0], [hello -]) -AT_CHECK([javac CallSampleInterface.java]) -AT_CHECK([java CallSampleInterface], [0], [COBOL -]) -AT_CHECK([cat prog.java | grep 'annotation here' > /dev/null], [0]) -AT_CHECK([cat prog.java | grep 'file-header here' > /dev/null], [0]) -AT_CHECK([cobj --help | grep 'edit-code-command' > /dev/null], [0]) - -AT_CLEANUP \ No newline at end of file From 80eedf526202bed15d075167984dc6edd34d6e11 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:27:28 +0900 Subject: [PATCH 133/188] Improve a test to execute untested code in write_json_info in cobj/codegen.c (#667) --- tests/command-line-options.src/info-java-dir.at | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index b2b34390..0415356c 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -10,7 +10,8 @@ AT_DATA([callee.cbl], [ LINKAGE SECTION. 01 P1 PIC X ANY LENGTH. 01 P2 PIC 99. - PROCEDURE DIVISION USING P1 P2. + 01 P3 PIC 9V9. + PROCEDURE DIVISION USING P1 P2 P3. GOBACK. ]) @@ -38,6 +39,10 @@ AT_CHECK([cat info_callee.json], [0], { "variable_name": "P2", "java_type": "int" + }, + { + "variable_name": "P3", + "java_type": "double" } @:>@ } @@ -74,6 +79,10 @@ AT_CHECK([cat bbb/info_callee.json], [0], { "variable_name": "P2", "java_type": "int" + }, + { + "variable_name": "P3", + "java_type": "double" } @:>@ } From b420a195f76e901aa249f65b056154f64a89b653 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 20 Jun 2025 13:02:45 +0900 Subject: [PATCH 134/188] Implement the system routine `C$SLEEP` (#669) * feat: add C$SLEEP * refactor: suppress a PMD warning * fix: remove error message of C$SLEEP * fix: CobolSystemRoutine.C$SLEEP * test: add a test of C$SLEEP --- cobj/system.def | 2 +- cobj/typeck.c | 1 - .../libcobj/call/CobolSystemRoutine.java | 23 ++++++++ tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/run.at | 1 + tests/run.src/system-routines.at | 53 +++++++++++++++++++ 7 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 tests/run.src/system-routines.at diff --git a/cobj/system.def b/cobj/system.def index fc6c1646..298c9e1c 100644 --- a/cobj/system.def +++ b/cobj/system.def @@ -61,7 +61,7 @@ COB_SYSTEM_GEN ("C$JUSTIFY", 1, cob_acuw_justify) COB_SYSTEM_GEN ("C$CALLEDBY", 1, calledBy) COB_SYSTEM_GEN ("C$MAKEDIR", 1, cob_acuw_mkdir) COB_SYSTEM_GEN ("C$NARG", 1, cob_return_args) -COB_SYSTEM_GEN ("C$SLEEP", 1, cob_acuw_sleep) +COB_SYSTEM_GEN ("C$SLEEP", 1, C$SLEEP) COB_SYSTEM_GEN ("C$PARAMSIZE", 1, cob_parameter_size) COB_SYSTEM_GEN ("C$TOUPPER", 2, CBL_TOUPPER) COB_SYSTEM_GEN ("C$TOLOWER", 2, CBL_TOLOWER) diff --git a/cobj/typeck.c b/cobj/typeck.c index 333769d8..bcc17371 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -3130,7 +3130,6 @@ void cb_emit_call(cb_tree prog, cb_tree cb_using, cb_tree returning, case C$JUSTIFY: case C$MAKEDIR: case C$NARG: - case C$SLEEP: case C$PARAMSIZE: cb_error(_("%s not implemented"), data); return; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java index e8a9a773..4e0865a2 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java @@ -135,6 +135,29 @@ public static int SYSTEM(AbstractCobolField cmd) { return SYSTEM(cmd.getString()); } + /** + * 組み込み関数すうC$SLEEPの実装 + * opensource COBOLのlibcob/common.cのcob_acuw_sleep関数に相当する + * + * @param data C$SLEEPの引数として指定されたCOBOL変数のバイト列。 + */ + @SuppressWarnings("PMD.AvoidDollarSigns") + public static int C$SLEEP(CobolDataStorage data) { + CobolUtil.COB_CHK_PARMS("C$SLEEP", 3); + List params = CobolModule.getCurrentModule().cob_procedure_parameters; + if (!params.isEmpty() && params.get(0) != null) { + int n = params.get(0).getInt(); + if (n > 0 && n < 3600 * 24 * 7) { + try { + Thread.sleep(n * 1000L); + } catch (InterruptedException e) { + return 0; + } + } + } + return 0; + } + private interface Calculater { byte calc(byte b1, byte b2); } diff --git a/tests/Makefile.am b/tests/Makefile.am index 3f4306c0..5cb9f5a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -73,7 +73,8 @@ run_DEPENDENCIES = \ run.src/subscripts.at \ run.src/extensions.at \ run.src/return-code.at \ - run.src/functions.at + run.src/functions.at \ + run.src/system-routines.at data_rep_DEPENDENCIES = \ data-rep.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 3e13f2b5..50e8d69b 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -612,7 +612,8 @@ run_DEPENDENCIES = \ run.src/subscripts.at \ run.src/extensions.at \ run.src/return-code.at \ - run.src/functions.at + run.src/functions.at \ + run.src/system-routines.at data_rep_DEPENDENCIES = \ data-rep.at \ diff --git a/tests/run.at b/tests/run.at index 1b63ecfa..76ec8cd1 100644 --- a/tests/run.at +++ b/tests/run.at @@ -33,3 +33,4 @@ m4_include([miscellaneous.at]) m4_include([extensions.at]) m4_include([return-code.at]) m4_include([functions.at]) +m4_include([system-routines.at]) diff --git a/tests/run.src/system-routines.at b/tests/run.src/system-routines.at new file mode 100644 index 00000000..25e7ca65 --- /dev/null +++ b/tests/run.src/system-routines.at @@ -0,0 +1,53 @@ +AT_SETUP([C$SLEEP]) + +AT_DATA([prog1.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog1. + PROCEDURE DIVISION. + DISPLAY "Start". + CALL "C$SLEEP" USING 4. + DISPLAY "End". + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog1.cbl]) + +# Test that the prog1ram takes at least 2 seconds to execute +AT_CHECK([ +start_time=$(date +%s); +java prog1; +end_time=$(date +%s); +duration=$((end_time - start_time)); +test $duration -ge 2], [0], +[Start +End +]) + + +AT_DATA([prog2.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog2. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 WS-TIMEOUT PIC 9(4) COMP-3 VALUE 4. + PROCEDURE DIVISION. + DISPLAY "Start". + CALL "C$SLEEP" USING WS-TIMEOUT. + DISPLAY "End". + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog2.cbl]) + +# Test that the prog2ram takes at least 2 seconds to execute +AT_CHECK([ +start_time=$(date +%s); +java prog2; +end_time=$(date +%s); +duration=$((end_time - start_time)); +test $duration -ge 2], [0], +[Start +End +]) + +AT_CLEANUP \ No newline at end of file From 57507dc78b3c541ca05d3b3ca95486d08978ea84 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Sat, 21 Jun 2025 19:44:32 +0900 Subject: [PATCH 135/188] Add the documents about configuration parameters (#665) * docs: add the documents about configuration parameters * doc: minor fix * doc: fix typos * doc: rename * minor fix * doc: fix configuration-params-JP.md --- README.md | 1 + README_JP.md | 1 + doc/configuration-params-JP.md | 98 ++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 doc/configuration-params-JP.md diff --git a/README.md b/README.md index 395946ce..6bbd7418 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ java [PROGRAM-ID] * [The API reference of the runtime library `libcobj.jar`](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) +* [configuration-params-JP](./doc/configuration-params-JP.md) ## Development Progress diff --git a/README_JP.md b/README_JP.md index 6b3f1fda..40819fd7 100644 --- a/README_JP.md +++ b/README_JP.md @@ -159,6 +159,7 @@ java [PROGRAM-ID] * [ランタイムライブラリ`libcobj.jar`のAPIリファレンス](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) +* [configuration-params-JP](./doc/configuration-params-JP.md) ## 実装状況 実装済み機能: diff --git a/doc/configuration-params-JP.md b/doc/configuration-params-JP.md new file mode 100644 index 00000000..f4920966 --- /dev/null +++ b/doc/configuration-params-JP.md @@ -0,0 +1,98 @@ +# configuration-params-JP +## 概要 +opensource COBOL 4J のコンフィグファイルに記載されているパラメータについて説明する。 + +opensource COBOL 4J をインストールすると、デフォルトの設定ファイルが `/usr/local/share/opensource-cobol-4j-1.0.7/config/default.conf` に配置され、コンパイル時に参照されるようになっている。また、コンパイル時に `-conf` を使用することで参照するコンフィグファイルを変更することもできる。設定ファイルはリポジトリの `config` ディレクトリに格納されていて、デフォルトで参照される `default.conf` のほかに以下のものがある。これらは、それぞれファイル名に対応する方言を許容する設定ファイルである。 +* `boundary-limit.conf` +* `bs2000.conf` +* `cobol85.conf` +* `cobol2002.conf` +* `default-en.conf` +* `default-jp.conf` +* `ibm.conf` +* `jp-compat.conf` +* `mf.conf` +* `mvs.conf` + +これらの設定ファイルにあるほとんどのパラメータは `default.conf` のものと同じで値が異なる(`mvs.conf` に `not-reserved` というパラメータがあり、それは `default.conf` にはない)。パラメータ一覧の表にあるデフォルト値は `default.conf` のものである。 + +## 構文のサポートレベルについて +いくつかのパラメータは、値として `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` が選択できる。これにより、いくつかの構文をコンパイラがサポートするか、警告するか、拒否するかを選択することができる。 + +| レベル | 期待される表示(xxxは該当構文、〇〇〇はパラメータ一覧No.1のnameで設定した値が入る) | +| --- | --- | +| ok | 何も表示されない | +| archaic | 警告として xxx is archaic in 〇〇〇 が表示される| +| obsolete | 警告として xxx is obsolete in 〇〇〇 が表示される | +| skip | 何も表示されない | +| ignore | 警告として xxx ignored が表示される | +| unconformtable | エラーとして xxx does not conform to 〇〇〇 が表示される | +| error | 構文エラーが表示される | + +## パラメータ一覧 + +| No | パラメータ名 | 設定できる値 | デフォルト値 | パラメータの説明 | 備考 | +|----|--------------|--------------|--------------|------------------|------| +| 1 | name | 任意の文字列 | OpenCOBOL | 設定ファイル名 | | +| 2 | tab-width | 整数 | 8 | タブ文字を何文字分のスペースとして扱うかを決める | 動作が安定しない | +| 3 | text-column | 整数 | 72 | コードを何桁目まで記述できるかを決める | | +| 4 | default-organization | `record-sequential`, `line-sequential` | `record-sequential` | `SELECT`で`ORGANIZATION`が定義されていない場合に、ここにセットされている値を`ORGANIZATION`として扱う | | +| 5 | assign-clause | `cobol2002`, `mf`, `ibm`, `jph1` | `mf` | `SELECT`文の`ASSIGN`の書き方で、IBMやMFの書き方が使えるようになる | 動作が安定しない | +| 6 | filename-mapping | `yes`, `no` | `yes` | ファイル名を環境変数から取得することができる | | +| 7 | pretty-display | `yes`, `no` | `yes` | `USAGE BINARY`で定義したデータ項目の表示を設定する | 未実装 | +| 8 | auto-initialize | `yes`, `no` | `yes` | `WORKING-STORAGE SECTION`で`VALUE`を使って初期化していなくても自動で初期値を付与する | | +| 9 | complex-odo | `yes`, `no` | `no` | yesの場合は、集団項目の中(先頭や末尾ではなく)に`OCCURS ~ DEPENDING ON`があってもコンパイルが通る | | +| 10 | indirect-redefines | `yes`, `no` | `no` | `REDEFINES`を多段階で定義できるようにする | | +| 11 | binary-size | `2-4-8`, `1-2-4-8`, `1--8` | `1-2-4-8` | `PIC 9(n) BINARY`の変数が確保するバイト数を設定する | | +| 12 | binary-truncate | `yes`, `no` | `yes` | オーバーフロー時の切り捨てが発生した場合に例外を発生させる | 動作が安定しない | +| 13 | binary-byteorder | `native`, `big-endian` | `big-endian` | バイトの並びを設定する | Javaではバイトの並びはデフォルトでビッグエンディアンとなっている | +| 14 | abort-on-io-exception | `any`, `fatal`, `never` | `any` | ファイル操作のエラーハンドリングのレベルを設定する。ハンドリングのレベルによって、出力されるJavaのコードが違う。 | | +| 15 | larger-redefines-ok | `yes`, `no` | `no` | `REDEFINES`で定義した集団項目のサイズが元の集団項目のサイズを上回っている場合でもコンパイルできるようにする | | +| 16 | relaxed-syntax-check | `yes`, `no` | `no` | 以下のMFの書き方を許容できるようにする
・`INPUT-OUTPUT SECTION`という記述がなくてもよい
・`FILE SECTION`という記述がなくてもよい
・`REDEFINES`を書くときに、`PIC X(n) REDEFINES`のような書き方を許容する | | +| 17 | perform-osvs | `yes`, `no` | `no` | IBM OS/VS COBOLの方言を使えるようにする(PERFORMの扱い方が違う) | 未実装 | +| 18 | sticky-linkage | `yes`, `no` | `no` | `LINKAGE SECTION`にあるデータが`CALL`の呼び出しごとに初期化されずに保持されるようになる | 未実装 | +| 19 | assign_external | `yes`, `no` | `no` | 対象のCOBOLプログラムの`SELECT`文のすべての`ASSIGN`句に`EXTERNAL`が指定されているものとして扱うことができる | コンパイルオプションの`-assign_external`と同じ | +| 20 | relax-level-hierarchy | `yes`, `no` | `no` | データ項目の階層の数字の大小が不揃いでもコンパイルが通るようにする | | +| 21 | author-paragraph | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `AUTHOR`パラグラフを有効にするか決める | | +| 22 | memory-size-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `OBJECT-COMPUTER`節の`MEMORY SIZE`指定を有効にするか決める | | +| 23 | multiple-file-tape-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `I-O CONTROL`の`MULTIPLE FILE TAPE`指定を有効にするか決める | | +| 24 | label-records-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `FILE CONTROL`の`FD`句で`LABEL RECORDS`の指定を有効にするか決める | | +| 25 | value-of-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `FILE CONTROL`の`FD`句で`VALUE OF {WORD}`を有効にするか決める | | +| 26 | data-records-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `FILE CONTROL`の`FD`句で`DATA RECORD`を有効にするか決める | | +| 27 | top-level-occurs-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `skip` | 01および77のデータ項目に`OCCURS`を使えるか決める | | +| 28 | synchronized-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `ok` | データ定義において`SYNCHRONIZED`を有効にするか決める | | +| 29 | goto-statement-without-name | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `GO TO`のあとに何も指定しない書き方を有効にするか決める | | +| 30 | stop-literal-statement | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `STOP LITERAL`を有効にするかを設定する | 未実装 | +| 31 | debugging-line | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `CONFIGURATION SECTION`の`SOURCE-COMPUTER`の指定で、`WITH DEBUGGING MODE`の記述を有効にするか決める | | +| 32 | padding-character-clause | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `SELECT`文で`PADDING CHARACTER`の記述を有効にするか決める | | +| 33 | next-sentence-phrase | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `archaic` | `NEXT SENTENCE`を使えるかを決める | | +| 34 | eject-statement | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `skip` | `EJECT`を使えるか決める | 未実装 | +| 35 | entry-statement | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `obsolete` | `ENTRY`を使えるか決める | 未実装 | +| 36 | move-noninteger-to-alphanumeric | 同上 | `error` | 小数などの非整数を文字列型に`MOVE`できるようにする | 値がokの場合は警告が出て、errorの場合は出なかった | +| 37 | odo-without-to | `ok`, `archaic`, `obsolete`, `skip`, `ignore`, `unconformable`, `error` | `ok` | `OCCURS ~ DEPENDING ON`で`TO`を使って配列のサイズの最大値を定義していないときにエラーを出すようにする | | +| 38 | default-currency-symbol | 任意の1文字 | `$` | デフォルトの通貨記号(`$`、`\`など)を設定できる | | +| 39 | max-alpha-character-data-size | 整数 | 2147483647 | `PIC X`の最大サイズを設定する | | +| 40 | max-sjis-character-data-size | 整数 | 1073741823 | `PIC N`の最大サイズを設定する | | +| 41 | max-utf8-character-data-size | 整数 | 715827882 | `PIC N`の最大サイズを設定する | | +| 42 | c89-identifier-length-check | `yes`, `no` | `no` | `PROGRAM-ID`が31文字より多い場合に警告を出す | 動作が安定しない | +| 43 | allow-end-program-with-wrong-name | `yes`, `no` | `no` | `PROGRAM-ID`に書いてある単語と`END PROGRAM`に書いてある単語が異なるような記述を許容する | | +| 44 | allow-missing-also-clause-in-evaluate | `yes`, `no` | `no` | `EVALUATE`の条件式で`ALSO`が省略する記述を許容する | | +| 45 | allow-empty-imperative-statement | `yes`, `no` | `no` | `IF`や`EVALUATE`で空の無条件文を許容する | | +| 46 | enable-program-status-register | `yes`, `no` | `no` | `PROGRAM-STATUS`という特殊レジスタを使用できるようにする | | +| 47 | enable-sort-status-register | `yes`, `no` | `no` | `SORT-STATUS`という特殊レジスタを使用できるようにする | | +| 48 | enable-special-names-argument-clause | `yes`, `no` | `no` | `SPECIAL-NAMES`で`ARGUMENT-NUMBER`と`ARGUMENT-VALUE`を使えるようにする | | +| 49 | enable-special-names-environment-clause | `yes`, `no` | `no` | `SPECIAL-NAMES`で`ENVIRONMENT-NAME`と`ENVIRONMENT-VALUE`を使えるようにする | | +| 50 | enable-leng-intrinsic-function | `yes`, `no` | `no` | 組み込み関数`FUNCTION LENG`を使えるようにする | | +| 51 | enable-length-an-intrinsic-function | `yes`, `no` | `no` | 組み込み関数`FUNCTION LENGTH-AN`を使えるようにする | | +| 52 | enable-national-intrinsic-function | `yes`, `no` | `no` | 組み込み関数`FUNCTION NATIONAL`を使えるようにする | | +| 53 | use-invalidkey-handler-on-status34 | `yes`, `no` | `no` | SAMファイルの`READ/WRITE`で`INVALID KEY`の指定を可能にする | | +| 54 | cobol68-copy-in-data-description | `yes`, `no` | `no` | `DATA DIVISION`において、COBOL68スタイルの`COPY`を使えるか決める | [参考ページ](https://www.microfocus.com/documentation/visual-cobol/vc50all/DevHub/HRLHLHEXAM06.html) | +| 55 | switch-no-mnemonic | `yes`, `no` | `no` | `SPECIAL-NAMES`で設定するスイッチ名を別名がなくても参照可能にする | | +| 56 | allow-is-in-sort-key-spec | `yes`, `no` | `no` |`SORT`の`KEY`指定で`KEY IS`と書けるようにする | | +| 57 | allow-search-key-in-rhs | `yes`, `no` | `no` | `SEARCH ALL`文の検索条件の右辺にキー項目を記述できるようにする | | +| 58 | ignore-invalid-record-contains | `yes`, `no` | `no` | `FD`句の`RECORD CONTAINS`によるレコードのバイト数の制限を無視することができる | | +| 59 | enable-zero-division-error | `yes`, `no` | `no` | プログラムにゼロ除算があったときにコンパイルの段階でエラーを出す | | +| 60 | enable-check-subscript-out-of-bounds | `yes`, `no` | `no` | `OCCURS ~ DEPENDING ON`で定義した要素数以上の添え字にアクセスするコードがあった場合にコンパイルエラーを出す | | +| 61 | enable-expect-numeric-error | `yes`, `no` | `no` | 文字列型から数値型へのMOVEがあった場合、コンパイルエラーを出す | | +| 62 | enable-expect-compute-string-error | `yes`, `no` | `no` | 文字列と数値を計算しようとしたときにエラーを出す | 動作が安定しない | +| 63 | not-reserved | 任意の文字列 | `CYCLE`, `NORMAL` | 指定した文字列を予約語から一時的に除外する | mvs.confにあるパラメータでdefault.confにはない | \ No newline at end of file From 12ba4161727fe3a21dc962e0aca2a5e56c017ba0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:49:34 +0900 Subject: [PATCH 136/188] Bump org.junit.jupiter:junit-jupiter from 5.13.1 to 5.13.2 in /libcobj (#670) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.1 to 5.13.2. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index fc6abf18..de1e0089 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.50.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.13.1") + testImplementation("org.junit.jupiter:junit-jupiter:5.13.2") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From cb82f87208e199ad48f4a7c39d929f36d0ecbb4e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:49:45 +0900 Subject: [PATCH 137/188] Bump com.github.spotbugs from 6.2.0 to 6.2.1 in /libcobj (#671) Bumps com.github.spotbugs from 6.2.0 to 6.2.1. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index de1e0089..d2f440e6 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.0" + id("com.github.spotbugs") version "6.2.1" } repositories { From efb86a500b7a78220015b5c08eb7ba298d081101 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:34:58 +0900 Subject: [PATCH 138/188] Release 1.1.10 (#672) * chore: update version strings * doc: update docker image names * doc: update documents --- CHANGELOG.md | 12 +++++++++ ChangeLog | 4 +++ NEWS | 12 +++++++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 13 ++++------ configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 79 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6451b57..31f5fd84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.10] - 2025-06-30 + +### Add + +* Add a manual for the compiler configuration file (#665) +* Add a built-in subroutine + * C$SLEEP (#669) + +### Miscellaneous + +* Improve the test coverage slightly (#667, #664) + ## [1.1.9] - 2025-05-30 ### Add diff --git a/ChangeLog b/ChangeLog index 181736bc..c3feed80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-06-30 OSS Consortium + + * opensource COBOL 4J v1.1.10 released. + 2025-05-30 OSS Consortium * opensource COBOL 4J v1.1.9 released. diff --git a/NEWS b/NEWS index d9d8746e..775c0afd 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,18 @@ NEWS - user visible changes -*- outline -*- ** New Features +(1) Add a manual for the compiler configuration file (#665) +(2) Add a built-in subroutine + * C$SLEEP (#669) + +** Miscellaneous + +(1) Improve the test coverage slightly (#667, #664) + +----------------------------------------------------------------------- + +** New Features + (1) Add a sub command create for cobj-idx. * `cobj-idx create` creates a new indexed file. diff --git a/README.md b/README.md index 6bbd7418..c410a331 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz -tar zxvf opensourcecobol4j-v1.1.9.tar.gz -cd opensourcecobol4j-1.1.9 +curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz +tar zxvf opensourcecobol4j-v1.1.10.tar.gz +cd opensourcecobol4j-1.1.10 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz -tar zxvf opensourcecobol4j-v1.1.9.tar.gz -cd opensourcecobol4j-1.1.9 +curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz +tar zxvf opensourcecobol4j-v1.1.10.tar.gz +cd opensourcecobol4j-1.1.10 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250530 +docker pull opensourcecobol/opensourcecobol4j:20250630 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 40819fd7..0a653932 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz -tar zxvf opensourcecobol4j-v1.1.9.tar.gz -cd opensourcecobol4j-1.1.9 +curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz +tar zxvf opensourcecobol4j-v1.1.10.tar.gz +cd opensourcecobol4j-1.1.10 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.9.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.9.tar.gz -tar zxvf opensourcecobol4j-v1.1.9.tar.gz -cd opensourcecobol4j-1.1.9 +curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz +tar zxvf opensourcecobol4j-v1.1.10.tar.gz +cd opensourcecobol4j-1.1.10 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250530 +docker pull opensourcecobol/opensourcecobol4j:20250630 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index 6c431ec5..cfcf78d0 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,12 +1,9 @@ ### Add -* Add a sub command create for cobj-idx. (#648) - * `cobj-idx create` creates a new indexed file. +* Add a manual for the compiler configuration file (#665) +* Add a built-in subroutine + * C$SLEEP (#669) -### Fix +### Miscellaneous -* Handle non-ASCII characters in EXTERNAL items and EXTERNAL file names correctly. (#624) -* Show error messages if unimplemented subroutines are used. (#628) -* Fix non-ASCII characters in external items and external file descriptors. (#629) - * The older version does not convert `-` in EXTERNAL items and EXTERNAL file names into another valid character in Java. - * The older version converts `BC` in EXTERNAL file names into invalid characters. \ No newline at end of file +* Improve the test coverage slightly (#667, #664) \ No newline at end of file diff --git a/configure b/configure index 65108a97..1da31720 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.9. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.10. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.9' -PACKAGE_VERSION='1.1.9' -PACKAGE_STRING='opensource COBOL 4J 1.1.9' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.10' +PACKAGE_VERSION='1.1.10' +PACKAGE_STRING='opensource COBOL 4J 1.1.10' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.9 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.9] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.10] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.9:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.10:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.9 +opensource COBOL 4J configure 1.1.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.9, which was +It was created by opensource COBOL 4J $as_me 1.1.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.9' - VERSION='1.1.9' + PACKAGE='opensource-cobol-4j-1.1.10' + VERSION='1.1.10' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.9, which was +This file was extended by opensource COBOL 4J $as_me 1.1.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.9 +opensource COBOL 4J config.status 1.1.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d538d223..72879d78 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.9],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.9]) +AC_INIT([opensource COBOL 4J],[1.1.10],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.10]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 5ab6ffe3..b435b211 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.10 | Windows | 21 | +| 1.1.10 | Ubuntu 24.04 | 21 | +| 1.1.10 | AlmaLinux 9 | 11 | +| 1.1.10 | Amazon Linux 2023 | 21 | | 1.1.9 | Windows | 21 | | 1.1.9 | Ubuntu 24.04 | 21 | | 1.1.9 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d2f440e6..c98736f1 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.9" + version = "1.1.10" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index c1625729..699d62ef 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.9"; + public static final String version = "1.1.10"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 792f3c3f..8e0d0c8e 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.9"); + System.out.println("1.1.10"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 0415356c..8fa9750e 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -29,7 +29,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.9", + "opensourcecobol4j_version": "1.1.10", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -50,7 +50,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.9", + "opensourcecobol4j_version": "1.1.10", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -69,7 +69,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.9", + "opensourcecobol4j_version": "1.1.10", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -90,7 +90,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.9", + "opensourcecobol4j_version": "1.1.10", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 8ea3f4e4..dca605f6 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.9]) -m4_define([AT_PACKAGE_VERSION], [1.1.9]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.9]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.10]) +m4_define([AT_PACKAGE_VERSION], [1.1.10]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.10]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 85bc090a..46f1a32f 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.9" +#define PACKAGE "opensource-cobol4j-1.1.10" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.9" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.10" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.9" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.10" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.9" +#define PACKAGE_VERSION "1.1.10" /* Define a patch level */ #define PATCH_LEVEL 0 From bf9168ba4af08b577efb8d2f43351e2927a40f22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:17:54 +0900 Subject: [PATCH 139/188] Bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3 in /libcobj (#674) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.3. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c98736f1..d06659ad 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.50.1.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.13.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From 1bd4349968783a4af42e29f8dcef4f1c36dd35fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:12:08 +0900 Subject: [PATCH 140/188] Bump org.xerial:sqlite-jdbc from 3.50.1.0 to 3.50.2.0 in /libcobj (#673) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.50.1.0 to 3.50.2.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.50.1.0...3.50.2.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-version: 3.50.2.0 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d06659ad..bdbe342d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.8-jre") - implementation("org.xerial:sqlite-jdbc:3.50.1.0") + implementation("org.xerial:sqlite-jdbc:3.50.2.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From d7f8442cd3cba5dccbcb99eb6196685a5bfb7731 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 23:40:25 +0900 Subject: [PATCH 141/188] Bump com.diffplug.spotless from 7.0.4 to 7.1.0 in /libcobj (#675) Bumps com.diffplug.spotless from 7.0.4 to 7.1.0. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index bdbe342d..98a7466c 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.0.4" + id("com.diffplug.spotless") version "7.1.0" id("java") id("maven-publish") pmd From cb1da8d72b05e4e54a0f858f00abdde31cf73cc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Jul 2025 20:15:19 +0900 Subject: [PATCH 142/188] Bump com.github.spotbugs from 6.2.1 to 6.2.2 in /libcobj (#677) Bumps com.github.spotbugs from 6.2.1 to 6.2.2. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 98a7466c..dade2433 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.1" + id("com.github.spotbugs") version "6.2.2" } repositories { From efda7a71ddb5da697950585b9b36e25e32ca767f Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 18 Jul 2025 09:26:54 +0900 Subject: [PATCH 143/188] Improve the error handling for opening invalid formatted indexed files (#676) * fix: check formats of indexed files to open * test: remove unnecessary checks * fix: change constants to avoid overlaps * fix: add a file existing check * test: fix the test of opening an invalid indexed file * test: fix load.at not to call default error handlers * chore: end a transaction * refactor: CobolIndexedFile.java * test: prevent infinite loops --- .../libcobj/file/CobolFile.java | 32 +++++++++------ .../libcobj/file/CobolIndexedFile.java | 12 +++++- tests/cobj-idx.src/load.at | 7 +++- tests/run.src/miscellaneous.at | 40 +++++++++++++++++++ 4 files changed, 76 insertions(+), 15 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 9877b5b4..1236d37c 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -285,44 +285,50 @@ public class CobolFile { /** TODO: 準備中 */ protected static final int COB_STATUS_91_NOT_AVAILABLE = 91; + // ============================================== + // The following constants must not be equal + // to any of the above constants `COB_STATUS_*` + /** TODO: 準備中 */ - protected static final int COB_LINAGE_INVALID = 16384; + protected static final int ENOENT = 1002; /** TODO: 準備中 */ - protected static final int COB_NOT_CONFIGURED = 32768; + protected static final int EBADF = 1009; /** TODO: 準備中 */ - public static final int COB_SELECT_FILE_STATUS = 0x01; + protected static final int EACCESS = 1013; /** TODO: 準備中 */ - public static final int COB_SELECT_EXTERNAL = 0x02; + protected static final int EISDIR = 1021; /** TODO: 準備中 */ - public static final int COB_SELECT_LINAGE = 0x04; + protected static final int EROFS = 1030; /** TODO: 準備中 */ - public static final int COB_SELECT_SPLITKEY = 0x08; + protected static final int EAGAIN = 1011; + + // ============================================== /** TODO: 準備中 */ - protected static final int FNSTATUSSIZE = 3; + protected static final int COB_LINAGE_INVALID = 16384; /** TODO: 準備中 */ - protected static final int ENOENT = 2; + protected static final int COB_NOT_CONFIGURED = 32768; /** TODO: 準備中 */ - protected static final int EBADF = 9; + public static final int COB_SELECT_FILE_STATUS = 0x01; /** TODO: 準備中 */ - protected static final int EACCESS = 13; + public static final int COB_SELECT_EXTERNAL = 0x02; /** TODO: 準備中 */ - protected static final int EISDIR = 21; + public static final int COB_SELECT_LINAGE = 0x04; /** TODO: 準備中 */ - protected static final int EROFS = 30; + public static final int COB_SELECT_SPLITKEY = 0x08; /** TODO: 準備中 */ - protected static final int EAGAIN = 11; + protected static final int FNSTATUSSIZE = 3; /** TODO: 準備中 */ public static CobolFile errorFile; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index f23aec60..582f6d92 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -208,17 +208,27 @@ public int open_(String filename, int mode, int sharing) { boolean fileExists = new java.io.File(filename).exists(); + if (mode == COB_OPEN_INPUT && !fileExists) { + return ENOENT; + } + p.connection = null; try { p.connection = DriverManager.getConnection("jdbc:sqlite:" + filename, config.toProperties()); p.connection.setAutoCommit(false); + + // Check if the file is accessible + try (Statement st = p.connection.createStatement()) { + st.execute("select 1"); + } + p.connection.commit(); } catch (SQLException e) { int errorCode = e.getErrorCode(); if (errorCode == SQLiteErrorCode.SQLITE_BUSY.code) { return COB_STATUS_61_FILE_SHARING; } else { - return ENOENT; + return COB_STATUS_30_PERMANENT_ERROR; } } catch (Exception e) { return COB_STATUS_30_PERMANENT_ERROR; diff --git a/tests/cobj-idx.src/load.at b/tests/cobj-idx.src/load.at index e0754e98..5c7f4b01 100644 --- a/tests/cobj-idx.src/load.at +++ b/tests/cobj-idx.src/load.at @@ -13,7 +13,8 @@ AT_DATA([load.cbl], alternate record key is alt-key-1 alternate record key is alt-key-2 alternate record key is alt-key-dup-1 with duplicates - alternate record key is alt-key-dup-2 with duplicates. + alternate record key is alt-key-dup-2 with duplicates + file status is file-status. data division. file section. fd f. @@ -25,9 +26,13 @@ AT_DATA([load.cbl], 03 alt-key-dup-2 pic x(5). 03 rec-value pic x(5). working-storage section. + 01 file-status pic xx. procedure division. main-proc. open input f. + if file-status not = '00' + stop run + end-if. perform forever read f next at end diff --git a/tests/run.src/miscellaneous.at b/tests/run.src/miscellaneous.at index 0c18e283..4a91dc2d 100644 --- a/tests/run.src/miscellaneous.at +++ b/tests/run.src/miscellaneous.at @@ -2095,3 +2095,43 @@ AT_CHECK([java prog], [1], [], ]) AT_CLEANUP + +AT_SETUP([Open an invalid formatted indexed file]) + +AT_CHECK([echo invalid-data > invalid-formatted-file]) + +AT_DATA([prog.cbl], +[ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "invalid-formatted-file" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + PROCEDURE DIVISION. + MAIN-PROCEDURE. + + OPEN INPUT f. + DISPLAY FILE-STATUS. + CLOSE f. +]) + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([java prog], [0], +[30 +]) +AT_CLEANUP From 8b0f21f36d4dd50c057dfd0970fd605a822697d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 08:58:03 +0900 Subject: [PATCH 144/188] Bump org.xerial:sqlite-jdbc from 3.50.2.0 to 3.50.3.0 in /libcobj (#679) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.50.2.0 to 3.50.3.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.50.2.0...3.50.3.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-version: 3.50.3.0 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index dade2433..13b3846f 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.8-jre") - implementation("org.xerial:sqlite-jdbc:3.50.2.0") + implementation("org.xerial:sqlite-jdbc:3.50.3.0") implementation("commons-cli:commons-cli:1.9.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From bd3463cfb44ecd8d4c3537a048e69614a40b550e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 08:58:18 +0900 Subject: [PATCH 145/188] Bump org.junit.jupiter:junit-jupiter from 5.13.3 to 5.13.4 in /libcobj (#681) Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 13b3846f..527ce3e7 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -34,7 +34,7 @@ dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.50.3.0") implementation("commons-cli:commons-cli:1.9.0") - testImplementation("org.junit.jupiter:junit-jupiter:5.13.3") + testImplementation("org.junit.jupiter:junit-jupiter:5.13.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") spotbugs("com.github.spotbugs:spotbugs:4.8.6") From 48e1c40bb8426b6d27064d51fc6a67d772956bd6 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 25 Jul 2025 11:17:19 +0900 Subject: [PATCH 146/188] Release 1.1.11 (#683) --- CHANGELOG.md | 7 +++++ ChangeLog | 4 +++ NEWS | 7 +++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 10 +++---- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 67 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f5fd84..79afe414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.11] - 2025-07-25 + +### Fix + +* Fix OPEN operation for indexed files. (#676) + * The runtime library now correctly sets the file status to 30 when attempting to open indexed files with invalid or corrupted file formats. + ## [1.1.10] - 2025-06-30 ### Add diff --git a/ChangeLog b/ChangeLog index c3feed80..f31e63ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-07-25 OSS Consortium + + * opensource COBOL 4J v1.1.11 released. + 2025-06-30 OSS Consortium * opensource COBOL 4J v1.1.10 released. diff --git a/NEWS b/NEWS index 775c0afd..d4cceba1 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +** Bug Fixes + +(1) Fix OPEN operation for indexed files. (#676) + * The runtime library now correctly sets the file status to 30 when attempting to open indexed files with invalid or corrupted file formats. + +----------------------------------------------------------------------- + ** New Features (1) Add a manual for the compiler configuration file (#665) diff --git a/README.md b/README.md index c410a331..49f61cda 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz -tar zxvf opensourcecobol4j-v1.1.10.tar.gz -cd opensourcecobol4j-1.1.10 +curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz +tar zxvf opensourcecobol4j-v1.1.11.tar.gz +cd opensourcecobol4j-1.1.11 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz -tar zxvf opensourcecobol4j-v1.1.10.tar.gz -cd opensourcecobol4j-1.1.10 +curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz +tar zxvf opensourcecobol4j-v1.1.11.tar.gz +cd opensourcecobol4j-1.1.11 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250630 +docker pull opensourcecobol/opensourcecobol4j:20250725 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 0a653932..f8dba840 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz -tar zxvf opensourcecobol4j-v1.1.10.tar.gz -cd opensourcecobol4j-1.1.10 +curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz +tar zxvf opensourcecobol4j-v1.1.11.tar.gz +cd opensourcecobol4j-1.1.11 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.10.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.10.tar.gz -tar zxvf opensourcecobol4j-v1.1.10.tar.gz -cd opensourcecobol4j-1.1.10 +curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz +tar zxvf opensourcecobol4j-v1.1.11.tar.gz +cd opensourcecobol4j-1.1.11 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250630 +docker pull opensourcecobol/opensourcecobol4j:20250725 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index cfcf78d0..2b032fe0 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,9 +1,5 @@ -### Add +### Fix -* Add a manual for the compiler configuration file (#665) -* Add a built-in subroutine - * C$SLEEP (#669) - -### Miscellaneous +* Fix OPEN operation for indexed files. (#676) + * The runtime library now correctly sets the file status to 30 when attempting to open indexed files with invalid or corrupted file formats. -* Improve the test coverage slightly (#667, #664) \ No newline at end of file diff --git a/configure b/configure index 1da31720..1d427448 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.10. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.11. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.10' -PACKAGE_VERSION='1.1.10' -PACKAGE_STRING='opensource COBOL 4J 1.1.10' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.11' +PACKAGE_VERSION='1.1.11' +PACKAGE_STRING='opensource COBOL 4J 1.1.11' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.10 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.10] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.11] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.10:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.11:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.10 +opensource COBOL 4J configure 1.1.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.10, which was +It was created by opensource COBOL 4J $as_me 1.1.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.10' - VERSION='1.1.10' + PACKAGE='opensource-cobol-4j-1.1.11' + VERSION='1.1.11' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.10, which was +This file was extended by opensource COBOL 4J $as_me 1.1.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.10 +opensource COBOL 4J config.status 1.1.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 72879d78..5dd566bf 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.10],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.10]) +AC_INIT([opensource COBOL 4J],[1.1.11],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.11]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index b435b211..decff168 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.11 | Windows | 21 | +| 1.1.11 | Ubuntu 24.04 | 21 | +| 1.1.11 | AlmaLinux 9 | 11 | +| 1.1.11 | Amazon Linux 2023 | 21 | | 1.1.10 | Windows | 21 | | 1.1.10 | Ubuntu 24.04 | 21 | | 1.1.10 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 527ce3e7..c93b60ce 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.10" + version = "1.1.11" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 699d62ef..48c51ab4 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.10"; + public static final String version = "1.1.11"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 8e0d0c8e..e36f9bf3 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.10"); + System.out.println("1.1.11"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 8fa9750e..01263540 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -29,7 +29,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.10", + "opensourcecobol4j_version": "1.1.11", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -50,7 +50,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.10", + "opensourcecobol4j_version": "1.1.11", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -69,7 +69,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.10", + "opensourcecobol4j_version": "1.1.11", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -90,7 +90,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.10", + "opensourcecobol4j_version": "1.1.11", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index dca605f6..a92ee067 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.10]) -m4_define([AT_PACKAGE_VERSION], [1.1.10]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.10]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.11]) +m4_define([AT_PACKAGE_VERSION], [1.1.11]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.11]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 46f1a32f..8f41df6a 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.10" +#define PACKAGE "opensource-cobol4j-1.1.11" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.10" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.11" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.10" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.11" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.10" +#define PACKAGE_VERSION "1.1.11" /* Define a patch level */ #define PATCH_LEVEL 0 From c2a268755b4ed4ad9f8a40e523f6dc22148cba6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 14:39:49 +0900 Subject: [PATCH 147/188] Bump com.github.spotbugs from 6.2.2 to 6.2.3 in /libcobj (#685) Bumps com.github.spotbugs from 6.2.2 to 6.2.3. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c93b60ce..369a8571 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.2" + id("com.github.spotbugs") version "6.2.3" } repositories { From 13ef33e7a16472618b420dab1a77c7ed143f4b5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 14:39:59 +0900 Subject: [PATCH 148/188] Bump commons-cli:commons-cli from 1.9.0 to 1.10.0 in /libcobj (#684) Bumps [commons-cli:commons-cli](https://github.com/apache/commons-cli) from 1.9.0 to 1.10.0. - [Changelog](https://github.com/apache/commons-cli/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-cli/compare/rel/commons-cli-1.9.0...rel/commons-cli-1.10.0) --- updated-dependencies: - dependency-name: commons-cli:commons-cli dependency-version: 1.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 369a8571..17a2c0b8 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -33,7 +33,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.4.8-jre") implementation("org.xerial:sqlite-jdbc:3.50.3.0") - implementation("commons-cli:commons-cli:1.9.0") + implementation("commons-cli:commons-cli:1.10.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") implementation("org.json:json:20250517") From d844259c1e5902686174688e438dddc2c821be78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:47:15 +0900 Subject: [PATCH 149/188] Bump actions/download-artifact from 4 to 5 (#686) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/create-release.yml | 4 ++-- .github/workflows/test-cobj-api.yml | 2 +- .github/workflows/test-nist.yml | 2 +- .github/workflows/test-other.yml | 2 +- .github/workflows/windows-test.yml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 206349ea..6c06812b 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -30,12 +30,12 @@ jobs: run: gh release create ${{ github.ref }} -F ReleaseNote.md - name: Download cobj.exe - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: cobj.exe - name: Download libcobj.jar - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: libcobj.jar diff --git a/.github/workflows/test-cobj-api.yml b/.github/workflows/test-cobj-api.yml index b1b9c579..bf720e15 100644 --- a/.github/workflows/test-cobj-api.yml +++ b/.github/workflows/test-cobj-api.yml @@ -26,7 +26,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index a43315ff..2675c52d 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -32,7 +32,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index ec87da84..39dba0c7 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -29,7 +29,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 917b88ff..1e78afb4 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -15,13 +15,13 @@ jobs: - uses: actions/checkout@v4 - name: Download libcobj.jar - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: libcobj.jar path: libcobj/app/build/libs/ - name: Download cobj.exe - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: cobj.exe path: win/x64/Release/ From 2bf35e6ab7c1e4fa2f0cb0bb791af8ace0a85f84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 22:14:53 +0900 Subject: [PATCH 150/188] Bump actions/checkout from 4 to 5 (#689) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-gcc9.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/check-missing-javadoc.yml | 2 +- .github/workflows/check-workflows.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/create-release.yml | 4 ++-- .github/workflows/javadoc.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/update-github-pages.yml | 2 +- .github/workflows/windows-build.yml | 2 +- .github/workflows/windows-test.yml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-gcc9.yml b/.github/workflows/build-gcc9.yml index dfd332dc..13c00af2 100644 --- a/.github/workflows/build-gcc9.yml +++ b/.github/workflows/build-gcc9.yml @@ -21,7 +21,7 @@ jobs: sudo apt-get install -y gcc-9 build-essential gettext autoconf - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f8ec493..880a1322 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip bison flex - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install opensource COBOL 4J if: inputs.configure-args == '' diff --git a/.github/workflows/check-missing-javadoc.yml b/.github/workflows/check-missing-javadoc.yml index abd25362..f7f9d9bd 100644 --- a/.github/workflows/check-missing-javadoc.yml +++ b/.github/workflows/check-missing-javadoc.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y gcc-9 build-essential gettext autoconf - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/check-workflows.yml b/.github/workflows/check-workflows.yml index ed960900..99079fae 100644 --- a/.github/workflows/check-workflows.yml +++ b/.github/workflows/check-workflows.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install actionlint run: | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 14523211..1667e8fb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y build-essential gettext autoconf bison flex gcovr - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 6c06812b..e1650ffe 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -24,7 +24,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Create a Release run: gh release create ${{ github.ref }} -F ReleaseNote.md @@ -53,7 +53,7 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: | cd ../ mv opensourcecobol4j/* . diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index 5fb1e74d..b39ed45e 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -16,7 +16,7 @@ jobs: java-version: '21' - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Run javadoc working-directory: libcobj diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4614a523..57faeae3 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -13,7 +13,7 @@ jobs: image: almalinux:9 steps: - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - uses: actions/setup-java@v4 with: diff --git a/.github/workflows/update-github-pages.yml b/.github/workflows/update-github-pages.yml index 013259cf..3c41907e 100644 --- a/.github/workflows/update-github-pages.yml +++ b/.github/workflows/update-github-pages.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - uses: actions/setup-java@v4 with: diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index c6780e00..068002b5 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -24,7 +24,7 @@ jobs: uses: microsoft/setup-msbuild@v2.0.0 - name: Checkout opensource COBOL 4J - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Restore NuGet packages run: nuget restore ./win/ diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 1e78afb4..129dcf93 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Download libcobj.jar uses: actions/download-artifact@v5 From e7e19e5c17cad9e35fcd5cc9dc38858577e94cbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:36:44 +0900 Subject: [PATCH 151/188] Bump com.github.spotbugs from 6.2.3 to 6.2.4 in /libcobj (#688) Bumps com.github.spotbugs from 6.2.3 to 6.2.4. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 17a2c0b8..be9e7e75 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.3" + id("com.github.spotbugs") version "6.2.4" } repositories { From 663eb607c8f840e4f18cc5cc3394c485bbe9a6dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 09:21:52 +0900 Subject: [PATCH 152/188] Bump com.github.spotbugs from 6.2.4 to 6.2.5 in /libcobj (#691) Bumps com.github.spotbugs from 6.2.4 to 6.2.5. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index be9e7e75..5a76e3ac 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.4" + id("com.github.spotbugs") version "6.2.5" } repositories { From f984a8998ea7985a9ff0f3515e2a62249d8dc029 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:09:26 +0900 Subject: [PATCH 153/188] Implement locking of indexed files. (#690) * add: processUuid and processId * add: create a new table `file_lock` * refactor: suppress PMD warnings * fix: sql statement creating a new table `file_lock` * wip: wip * fix: a PMD warning * fix: a SpotBug warning * refactor: remove printStackTrace() * fix: check formats of indexed files to open * test: remove unnecessary checks * fix: change constants to avoid overlaps * fix: add a file existing check * test: fix the test of opening an invalid indexed file * test: fix load.at not to call default error handlers * chore: end a transaction * refactor: CobolIndexedFile.java * test: prevent infinite loops * refactor: CobolIndexedFile.java * wip: wip * fix: improve open_ in CobolIndexedFile.java * change: set transaction settings * set the transaction mode to EXCLUSIVE * set busy_timeout to 5000 * feat: implement file locks of indexed files * fix: change the condition of creating file_lock * change: set the transaction isolation to SERIALIZABLE * test: add tests of file locking of indexed files * change: the schema of the record key table * fix: an INSERT statement * fix: an insert statement for primary record tables * feat: add a new option `-default_select_lock_mode` * channge: insert information when calling read_() * fix: the method read_ * Implement file locking of indexed files (#678) * add: processUuid and processId * add: create a new table `file_lock` * refactor: suppress PMD warnings * fix: sql statement creating a new table `file_lock` * wip: wip * fix: a PMD warning * fix: a SpotBug warning * refactor: remove printStackTrace() * fix: check formats of indexed files to open * test: remove unnecessary checks * fix: change constants to avoid overlaps * fix: add a file existing check * test: fix the test of opening an invalid indexed file * test: fix load.at not to call default error handlers * chore: end a transaction * refactor: CobolIndexedFile.java * test: prevent infinite loops * refactor: CobolIndexedFile.java * wip: wip * fix: improve open_ in CobolIndexedFile.java * change: set transaction settings * set the transaction mode to EXCLUSIVE * set busy_timeout to 5000 * feat: implement file locks of indexed files * fix: change the condition of creating file_lock * change: set the transaction isolation to SERIALIZABLE * test: add tests of file locking of indexed files * Update libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: remove unnecessary comments * refactor: fix typo * refactor: fix typo --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: CobolIndexedFile.java * add: lock a record when READ NEXT is executed * add: unlock records when closing indexed files * fix: the process of unlocking a file lock * fix: controling transactions when rewriting records * fix: commit timing when writing records * fix: commits and rollbacks in WRITE, REWRITE and DELETE * change: -default_lock_mode to -lock-mode-automatic * refactor: code for commiting data * add: unlock the previous record after writing * add: unlock previous records after rewriting * add: impelment record lockings of DELETE * fix: constant numbers change the value of COB_LOCK_AUTOMATIC and COB_LOCK_MULTIPLE in CobolFile.java * chore: remove duplicated code * fix: close ResultSet not to lock database implicitly * fix: close ResultSet in CobolIndexedFile.java * add: NewIndexedCursor.java * wip: read forward * wip: read prev * fix: fetchRecord * fix: READ NEXT/PREVIOUS * fix: READ * fix: fetchRecord * fix: fetchRecord * fix: START * fix: START ~ KEY IS GREATER THAN * fix: START ~ KEY IS <= * fix: START and READ NEXT RECORD * refactor: resolve PMD warnings * chore: migrate NewIndexedCursor to IndexedCursor * fix: allow READ WITH LOCK/WITH NO LOCK if LOCK MODE IS AUTOMATIC * fix: call commit() in the end of READ and READ NEXT/PREV * fix: initialize previousLockedReclordKey in close_() * test: add some tests for record locking * fix: unlock Previous records at the end of READ * test: accelerate file locking tests * test: wip * test: add tests for `READ WITH LOCK` * test: check the final state of an indexed file * fix: do not read data when the file status is not 00 * test: move common java code for record lock tests * test: add tests for different records * test: add tests for input mode * test: add tests for the same process * fix: commit at the end of start_ * test: guarantee that OPEN,START,WRITE,REWRITE cannot lock indexed file records * test: fix tests for OPEN,START,WRITE and REWRITE * fix: processes of unlocking records * tests: add tests for unlocking records * tests: add tests of OPEN INPUT * test: add tests for LOCK MODE * test: add tests of -lock-mode-automatic * tests: move tests for indexed files lock to tests/indexed-lock * ci: run tests `indexed-lock` * chore: fix typo * fix: the syntax error of an sql statement in IndexedCursor.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/coverage.yml | 2 +- .github/workflows/pull-request.yml | 2 + .github/workflows/push.yml | 2 + .gitignore | 1 + cobj/cobj.c | 11 + cobj/cobj.h | 1 + cobj/parser.c | 2938 +++++++++-------- cobj/parser.h | 8 +- cobj/parser.y | 4 +- cobj/tree.c | 1 + .../libcobj/file/CobolFile.java | 15 +- .../libcobj/file/CobolIndexedFile.java | 693 +++- .../libcobj/file/IndexedCursor.java | 942 +++--- tests/.gitignore | 1 + tests/Makefile.am | 16 + tests/Makefile.in | 23 + tests/indexed-lock.at | 12 + .../access-different-record.at | 368 +++ tests/indexed-lock.src/access-same-record.at | 340 ++ tests/indexed-lock.src/file-lock.at | 228 ++ tests/indexed-lock.src/input-mode.at | 318 ++ tests/indexed-lock.src/lock-mode-automatic.at | 348 ++ tests/indexed-lock.src/lock-mode-clause.at | 427 +++ .../module-sync/setValue.java | 48 + tests/indexed-lock.src/module-sync/wait.java | 69 + tests/indexed-lock.src/open-input.at | 303 ++ .../open-start-write-rewrite.at | 333 ++ tests/indexed-lock.src/release-lock.at | 317 ++ tests/indexed-lock.src/same-process.at | 124 + tests/run.src/miscellaneous.at | 40 + 30 files changed, 5800 insertions(+), 2135 deletions(-) create mode 100644 tests/indexed-lock.at create mode 100644 tests/indexed-lock.src/access-different-record.at create mode 100644 tests/indexed-lock.src/access-same-record.at create mode 100644 tests/indexed-lock.src/file-lock.at create mode 100644 tests/indexed-lock.src/input-mode.at create mode 100644 tests/indexed-lock.src/lock-mode-automatic.at create mode 100644 tests/indexed-lock.src/lock-mode-clause.at create mode 100644 tests/indexed-lock.src/module-sync/setValue.java create mode 100644 tests/indexed-lock.src/module-sync/wait.java create mode 100644 tests/indexed-lock.src/open-input.at create mode 100644 tests/indexed-lock.src/open-start-write-rewrite.at create mode 100644 tests/indexed-lock.src/release-lock.at create mode 100644 tests/indexed-lock.src/same-process.at diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 1667e8fb..e9b0c04f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -41,7 +41,7 @@ jobs: - name: Run other tests working-directory: tests run: | - tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "misc") + tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "indexed-lock" "misc") for test in "${tests[@]}"; do ./"$test" || true done diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 11cbaba1..2b8cd063 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -54,6 +54,7 @@ jobs: - "syntax" - "cobj-idx" - "misc" + - "indexed-lock" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml with: @@ -74,6 +75,7 @@ jobs: - "run" - "syntax" - "cobj-idx" + - "indexed-lock" #- "misc" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a898e238..a1eefb61 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -58,6 +58,7 @@ jobs: - "run" - "syntax" - "cobj-idx" + - "indexed-lock" - "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml @@ -79,6 +80,7 @@ jobs: - "run" - "syntax" - "cobj-idx" + - "indexed-lock" #- "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml diff --git a/.gitignore b/.gitignore index 5da2e10f..9e4d9bb1 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ tests/jp-compat tests/cobj-idx tests/misc tests/run +tests/indexed-lock tests/*.log tests/syntax tests/cobol85/*/*.class diff --git a/cobj/cobj.c b/cobj/cobj.c index 6b0e2a36..78a5c1c4 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -145,10 +145,14 @@ int cb_flag_main = 0; int cb_default_byte_specified = 0; unsigned char cb_default_byte = 0; + +int cb_default_select_lock_mode = COB_LOCK_MANUAL; + #define OPTION_ID_DEFAULT_BYTE (1024) #define OPTION_ID_SINGLE_JAR (1025) #define OPTION_ID_JAR (1026) #define OPTION_ID_INFO_JSON (1027) +#define OPTION_ID_LOCK_MODE_AUTOMATIC (1028) int external_flg = 0; int errorcount = 0; @@ -311,6 +315,7 @@ static const struct option long_options[] = { {"reference_check", no_argument, NULL, 'K'}, {"constant", optional_argument, NULL, '3'}, {"fdefaultbyte", required_argument, NULL, OPTION_ID_DEFAULT_BYTE}, + {"lock-mode-automatic", no_argument, NULL, OPTION_ID_LOCK_MODE_AUTOMATIC}, #undef CB_FLAG #define CB_FLAG(var, name, doc) \ {"f" name, no_argument, &var, 1}, {"fno-" name, no_argument, &var, 0}, @@ -901,6 +906,8 @@ static void cobc_print_usage(void) { "representing a character")); puts(_(" * octodecimal 00..0377 " "representing a character")); + puts(_(" -lock-mode-automatic Set the default lock mode of " + "select clauses to AUTOMATIC")); puts(_(" -info-json-dir= Specify the directory path of " "JSON files that hold information of COBOL programs")); puts(_(" -java-package(=) Specify the package name of the " @@ -1156,6 +1163,10 @@ static int process_command_line(const int argc, char *argv[]) { fflush(stderr); break; + case OPTION_ID_LOCK_MODE_AUTOMATIC: + cb_default_select_lock_mode = COB_LOCK_AUTOMATIC; + break; + case '3': /* --constant */ if (optarg) { cb_constant_list_add(optarg); diff --git a/cobj/cobj.h b/cobj/cobj.h index eb6f815f..ea1af270 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -383,4 +383,5 @@ extern int cb_verify(const enum cb_support tag, const char *feature); extern int cb_flag_info_json; extern char *cb_info_json_dir; +extern int cb_default_select_lock_mode; #endif /* CB_COBC_H */ diff --git a/cobj/parser.c b/cobj/parser.c index f854df10..e80ebf1d 100644 --- a/cobj/parser.c +++ b/cobj/parser.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.8.2. */ +/* A Bison parser, made by GNU Bison 3.7.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30802 +#define YYBISON 30704 /* Bison version string. */ -#define YYBISON_VERSION "3.8.2" +#define YYBISON_VERSION "3.7.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1587,18 +1587,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -1696,23 +1684,17 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1971,7 +1953,7 @@ static const yytype_int16 yytranslate[] = }; #if YYDEBUG -/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 772, 772, 772, 816, 817, 821, 822, 827, 828, @@ -2073,62 +2055,62 @@ static const yytype_int16 yyrline[] = 5218, 5225, 5226, 5235, 5235, 5239, 5240, 5254, 5255, 5256, 5257, 5261, 5262, 5266, 5267, 5268, 5280, 5280, 5285, 5290, 5289, 5299, 5306, 5307, 5311, 5316, 5325, 5328, 5332, 5337, - 5344, 5351, 5352, 5356, 5357, 5362, 5374, 5374, 5403, 5404, - 5408, 5409, 5413, 5417, 5421, 5425, 5432, 5433, 5439, 5440, - 5441, 5445, 5446, 5455, 5455, 5470, 5470, 5481, 5482, 5491, - 5491, 5508, 5509, 5513, 5520, 5521, 5530, 5543, 5543, 5549, - 5554, 5553, 5564, 5565, 5569, 5571, 5570, 5581, 5582, 5587, - 5586, 5597, 5598, 5607, 5607, 5612, 5613, 5614, 5615, 5616, - 5622, 5631, 5635, 5644, 5651, 5652, 5658, 5659, 5663, 5672, - 5673, 5677, 5681, 5693, 5693, 5699, 5698, 5715, 5718, 5739, - 5740, 5743, 5744, 5748, 5749, 5754, 5759, 5767, 5779, 5784, - 5792, 5808, 5809, 5808, 5829, 5830, 5838, 5839, 5840, 5841, - 5842, 5846, 5847, 5856, 5856, 5861, 5861, 5868, 5869, 5870, - 5879, 5879, 5888, 5889, 5893, 5894, 5895, 5899, 5900, 5904, - 5905, 5914, 5914, 5920, 5924, 5928, 5935, 5936, 5945, 5952, - 5953, 5961, 5961, 5974, 5974, 5990, 5990, 5999, 6001, 6002, - 6011, 6011, 6021, 6022, 6027, 6028, 6033, 6040, 6041, 6046, - 6053, 6054, 6058, 6059, 6063, 6064, 6068, 6069, 6078, 6079, - 6080, 6084, 6108, 6111, 6119, 6129, 6134, 6139, 6144, 6151, - 6152, 6155, 6156, 6160, 6160, 6164, 6164, 6168, 6168, 6171, - 6172, 6176, 6183, 6184, 6188, 6200, 6200, 6217, 6218, 6223, - 6226, 6230, 6234, 6241, 6242, 6245, 6246, 6247, 6251, 6252, - 6265, 6273, 6280, 6282, 6281, 6291, 6293, 6292, 6307, 6311, - 6313, 6312, 6323, 6325, 6324, 6341, 6347, 6349, 6348, 6358, - 6360, 6359, 6375, 6380, 6385, 6395, 6394, 6406, 6405, 6421, - 6426, 6431, 6441, 6440, 6452, 6451, 6466, 6467, 6471, 6476, - 6481, 6491, 6490, 6502, 6501, 6518, 6521, 6533, 6540, 6547, - 6547, 6557, 6558, 6560, 6561, 6562, 6563, 6564, 6565, 6567, - 6568, 6569, 6570, 6571, 6572, 6574, 6575, 6577, 6578, 6579, - 6582, 6584, 6585, 6586, 6588, 6589, 6590, 6592, 6593, 6595, - 6596, 6597, 6598, 6599, 6601, 6602, 6603, 6604, 6605, 6606, - 6608, 6609, 6610, 6611, 6612, 6613, 6615, 6616, 6619, 6619, - 6619, 6620, 6620, 6621, 6621, 6622, 6622, 6622, 6623, 6623, - 6623, 6628, 6629, 6632, 6633, 6634, 6638, 6639, 6640, 6641, - 6642, 6643, 6644, 6645, 6646, 6657, 6669, 6684, 6685, 6690, - 6696, 6718, 6738, 6742, 6758, 6772, 6773, 6778, 6784, 6785, - 6790, 6799, 6800, 6801, 6805, 6816, 6817, 6821, 6831, 6832, - 6836, 6837, 6841, 6842, 6848, 6868, 6869, 6873, 6874, 6878, - 6879, 6883, 6884, 6885, 6886, 6887, 6888, 6889, 6890, 6891, - 6895, 6896, 6897, 6898, 6899, 6900, 6901, 6905, 6906, 6910, - 6911, 6915, 6916, 6920, 6921, 6932, 6933, 6937, 6938, 6939, - 6943, 6944, 6945, 6953, 6957, 6958, 6959, 6960, 6964, 6965, - 6969, 6979, 6993, 7016, 7028, 7029, 7039, 7040, 7044, 7045, - 7046, 7047, 7048, 7049, 7050, 7058, 7062, 7066, 7070, 7074, - 7078, 7082, 7086, 7090, 7094, 7098, 7102, 7109, 7110, 7111, - 7115, 7116, 7120, 7121, 7126, 7133, 7140, 7150, 7157, 7167, - 7174, 7188, 7198, 7199, 7203, 7204, 7208, 7209, 7213, 7214, - 7215, 7219, 7220, 7224, 7225, 7229, 7230, 7234, 7235, 7242, - 7242, 7243, 7243, 7244, 7244, 7245, 7245, 7247, 7247, 7248, - 7248, 7249, 7249, 7250, 7250, 7251, 7251, 7252, 7252, 7253, - 7253, 7254, 7254, 7255, 7255, 7256, 7256, 7257, 7257, 7258, - 7258, 7259, 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, - 7263, 7264, 7264, 7264, 7265, 7265, 7266, 7266, 7266, 7267, - 7267, 7268, 7268, 7269, 7269, 7270, 7270, 7271, 7271, 7272, - 7272, 7273, 7273, 7273, 7274, 7274, 7275, 7275, 7276, 7276, - 7277, 7277, 7278, 7278, 7279, 7279, 7280, 7280, 7280, 7281, - 7281, 7282, 7282, 7283, 7283, 7284, 7284, 7285, 7285, 7286, - 7286, 7287, 7287, 7289, 7289, 7290, 7290 + 5344, 5351, 5352, 5356, 5357, 5362, 5374, 5374, 5401, 5402, + 5406, 5407, 5411, 5415, 5419, 5423, 5430, 5431, 5437, 5438, + 5439, 5443, 5444, 5453, 5453, 5468, 5468, 5479, 5480, 5489, + 5489, 5506, 5507, 5511, 5518, 5519, 5528, 5541, 5541, 5547, + 5552, 5551, 5562, 5563, 5567, 5569, 5568, 5579, 5580, 5585, + 5584, 5595, 5596, 5605, 5605, 5610, 5611, 5612, 5613, 5614, + 5620, 5629, 5633, 5642, 5649, 5650, 5656, 5657, 5661, 5670, + 5671, 5675, 5679, 5691, 5691, 5697, 5696, 5713, 5716, 5737, + 5738, 5741, 5742, 5746, 5747, 5752, 5757, 5765, 5777, 5782, + 5790, 5806, 5807, 5806, 5827, 5828, 5836, 5837, 5838, 5839, + 5840, 5844, 5845, 5854, 5854, 5859, 5859, 5866, 5867, 5868, + 5877, 5877, 5886, 5887, 5891, 5892, 5893, 5897, 5898, 5902, + 5903, 5912, 5912, 5918, 5922, 5926, 5933, 5934, 5943, 5950, + 5951, 5959, 5959, 5972, 5972, 5988, 5988, 5997, 5999, 6000, + 6009, 6009, 6019, 6020, 6025, 6026, 6031, 6038, 6039, 6044, + 6051, 6052, 6056, 6057, 6061, 6062, 6066, 6067, 6076, 6077, + 6078, 6082, 6106, 6109, 6117, 6127, 6132, 6137, 6142, 6149, + 6150, 6153, 6154, 6158, 6158, 6162, 6162, 6166, 6166, 6169, + 6170, 6174, 6181, 6182, 6186, 6198, 6198, 6215, 6216, 6221, + 6224, 6228, 6232, 6239, 6240, 6243, 6244, 6245, 6249, 6250, + 6263, 6271, 6278, 6280, 6279, 6289, 6291, 6290, 6305, 6309, + 6311, 6310, 6321, 6323, 6322, 6339, 6345, 6347, 6346, 6356, + 6358, 6357, 6373, 6378, 6383, 6393, 6392, 6404, 6403, 6419, + 6424, 6429, 6439, 6438, 6450, 6449, 6464, 6465, 6469, 6474, + 6479, 6489, 6488, 6500, 6499, 6516, 6519, 6531, 6538, 6545, + 6545, 6555, 6556, 6558, 6559, 6560, 6561, 6562, 6563, 6565, + 6566, 6567, 6568, 6569, 6570, 6572, 6573, 6575, 6576, 6577, + 6580, 6582, 6583, 6584, 6586, 6587, 6588, 6590, 6591, 6593, + 6594, 6595, 6596, 6597, 6599, 6600, 6601, 6602, 6603, 6604, + 6606, 6607, 6608, 6609, 6610, 6611, 6613, 6614, 6617, 6617, + 6617, 6618, 6618, 6619, 6619, 6620, 6620, 6620, 6621, 6621, + 6621, 6626, 6627, 6630, 6631, 6632, 6636, 6637, 6638, 6639, + 6640, 6641, 6642, 6643, 6644, 6655, 6667, 6682, 6683, 6688, + 6694, 6716, 6736, 6740, 6756, 6770, 6771, 6776, 6782, 6783, + 6788, 6797, 6798, 6799, 6803, 6814, 6815, 6819, 6829, 6830, + 6834, 6835, 6839, 6840, 6846, 6866, 6867, 6871, 6872, 6876, + 6877, 6881, 6882, 6883, 6884, 6885, 6886, 6887, 6888, 6889, + 6893, 6894, 6895, 6896, 6897, 6898, 6899, 6903, 6904, 6908, + 6909, 6913, 6914, 6918, 6919, 6930, 6931, 6935, 6936, 6937, + 6941, 6942, 6943, 6951, 6955, 6956, 6957, 6958, 6962, 6963, + 6967, 6977, 6991, 7014, 7026, 7027, 7037, 7038, 7042, 7043, + 7044, 7045, 7046, 7047, 7048, 7056, 7060, 7064, 7068, 7072, + 7076, 7080, 7084, 7088, 7092, 7096, 7100, 7107, 7108, 7109, + 7113, 7114, 7118, 7119, 7124, 7131, 7138, 7148, 7155, 7165, + 7172, 7186, 7196, 7197, 7201, 7202, 7206, 7207, 7211, 7212, + 7213, 7217, 7218, 7222, 7223, 7227, 7228, 7232, 7233, 7240, + 7240, 7241, 7241, 7242, 7242, 7243, 7243, 7245, 7245, 7246, + 7246, 7247, 7247, 7248, 7248, 7249, 7249, 7250, 7250, 7251, + 7251, 7252, 7252, 7253, 7253, 7254, 7254, 7255, 7255, 7256, + 7256, 7257, 7257, 7258, 7258, 7259, 7259, 7260, 7260, 7261, + 7261, 7262, 7262, 7262, 7263, 7263, 7264, 7264, 7264, 7265, + 7265, 7266, 7266, 7267, 7267, 7268, 7268, 7269, 7269, 7270, + 7270, 7271, 7271, 7271, 7272, 7272, 7273, 7273, 7274, 7274, + 7275, 7275, 7276, 7276, 7277, 7277, 7278, 7278, 7278, 7279, + 7279, 7280, 7280, 7281, 7281, 7282, 7282, 7283, 7283, 7284, + 7284, 7285, 7285, 7287, 7287, 7288, 7288 }; #endif @@ -2420,6 +2402,61 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, + 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 43, + 45, 42, 47, 704, 94, 46, 61, 41, 40, 62, + 60, 58, 38 +}; +#endif + #define YYPACT_NINF (-2010) #define yypact_value_is_default(Yyn) \ @@ -2430,8 +2467,8 @@ yysymbol_name (yysymbol_kind_t yysymbol) #define yytable_value_is_error(Yyn) \ 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -2010, 206, 536, -2010, 153, 306, 195, -2010, -2010, -2010, @@ -2665,9 +2702,9 @@ static const yytype_int16 yypact[] = -2010, 4721, -2010, -2010 }; -/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { 2, 0, 0, 1, 0, 0, 0, 4, 6, 7, @@ -2901,7 +2938,7 @@ static const yytype_int16 yydefact[] = 509, 0, 1080, 553 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -2010, -2010, -2010, -2010, 1892, -2010, -2010, -2010, 44, -2010, @@ -2977,10 +3014,10 @@ static const yytype_int16 yypgoto[] = 1076, -129 }; -/* YYDEFGOTO[NTERM-NUM]. */ + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 2, 6, 7, 8, 24, 39, 69, 128, + -1, 1, 2, 6, 7, 8, 24, 39, 69, 128, 256, 9, 25, 40, 70, 90, 499, 73, 71, 35, 11, 21, 27, 42, 57, 58, 17, 37, 77, 97, 98, 191, 192, 178, 99, 179, 180, 181, 182, 502, @@ -3053,9 +3090,9 @@ static const yytype_int16 yydefgoto[] = 844, 1524 }; -/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 122, 258, 301, 194, 478, 686, 902, 1137, 560, 865, @@ -4174,8 +4211,8 @@ static const yytype_int16 yycheck[] = 450, -1, -1, -1, -1, -1, -1, -1, 458 }; -/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of - state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 464, 465, 0, 183, 311, 466, 467, 468, 474, @@ -4409,7 +4446,7 @@ static const yytype_int16 yystos[] = 1098, 49, 901, 1084 }; -/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { 0, 463, 465, 464, 466, 466, 467, 467, 469, 470, @@ -4569,7 +4606,7 @@ static const yytype_int16 yyr1[] = 1161, 1162, 1162, 1163, 1163, 1164, 1164 }; -/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 3, 1, 2, 1, 1, 0, 0, @@ -4738,7 +4775,6 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4779,7 +4815,10 @@ do { \ YYFPRINTF Args; \ } while (0) - +/* This macro is provided for backward compatibility. */ +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -4803,11 +4842,15 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YY_USE (yyoutput); + YYUSE (yyoutput); if (!yyvaluep) return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4921,13 +4964,13 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YY_USE (yyvaluep); + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4990,7 +5033,6 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; @@ -5016,7 +5058,7 @@ yyparse (void) if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - YYNOMEM; + goto yyexhaustedlab; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5044,7 +5086,7 @@ yyparse (void) # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - YYNOMEM; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5055,7 +5097,7 @@ yyparse (void) YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - YYNOMEM; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5077,7 +5119,6 @@ yyparse (void) } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; @@ -5213,7 +5254,7 @@ yyparse (void) cb_build_registers (); current_program->flag_main = cb_flag_main; } -#line 5217 "parser.c" +#line 5258 "parser.c" break; case 3: /* start: $@1 nested_list "end of file" */ @@ -5235,19 +5276,19 @@ yyparse (void) emit_entry (current_program->program_id, 0, NULL); } } -#line 5239 "parser.c" +#line 5280 "parser.c" break; case 8: /* $@2: %empty */ #line 827 "parser.y" { cb_validate_program_environment (current_program); } -#line 5245 "parser.c" +#line 5286 "parser.c" break; case 9: /* $@3: %empty */ #line 828 "parser.y" { cb_validate_program_data (current_program); } -#line 5251 "parser.c" +#line 5292 "parser.c" break; case 10: /* program_definition: identification_division environment_division $@2 data_division $@3 procedure_division nested_prog end_program */ @@ -5258,19 +5299,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5262 "parser.c" +#line 5303 "parser.c" break; case 11: /* $@4: %empty */ #line 841 "parser.y" { cb_validate_program_environment (current_program); } -#line 5268 "parser.c" +#line 5309 "parser.c" break; case 12: /* $@5: %empty */ #line 842 "parser.y" { cb_validate_program_data (current_program); } -#line 5274 "parser.c" +#line 5315 "parser.c" break; case 13: /* program_mandatory: identification_division environment_division $@4 data_division $@5 procedure_division nested_prog end_mandatory */ @@ -5281,19 +5322,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5285 "parser.c" +#line 5326 "parser.c" break; case 14: /* $@6: %empty */ #line 855 "parser.y" { cb_validate_program_environment (current_program); } -#line 5291 "parser.c" +#line 5332 "parser.c" break; case 15: /* $@7: %empty */ #line 856 "parser.y" { cb_validate_program_data (current_program); } -#line 5297 "parser.c" +#line 5338 "parser.c" break; case 21: /* end_program: "END PROGRAM" program_name '.' */ @@ -5322,7 +5363,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5326 "parser.c" +#line 5367 "parser.c" break; case 22: /* end_mandatory: "END PROGRAM" program_name '.' */ @@ -5349,7 +5390,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5353 "parser.c" +#line 5394 "parser.c" break; case 23: /* end_function: "END FUNCTION" program_name '.' */ @@ -5376,7 +5417,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5380 "parser.c" +#line 5421 "parser.c" break; case 24: /* $@8: %empty */ @@ -5420,7 +5461,7 @@ yyparse (void) depth++; current_program->program_id = cb_build_program_id (yyvsp[-1], yyvsp[0]); } -#line 5424 "parser.c" +#line 5465 "parser.c" break; case 26: /* function_division: "FUNCTION-ID" '.' program_name as_literal '.' */ @@ -5465,19 +5506,19 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5469 "parser.c" +#line 5510 "parser.c" break; case 29: /* as_literal: %empty */ #line 1045 "parser.y" { yyval = NULL; } -#line 5475 "parser.c" +#line 5516 "parser.c" break; case 30: /* as_literal: AS "Literal" */ #line 1046 "parser.y" { yyval = yyvsp[0]; } -#line 5481 "parser.c" +#line 5522 "parser.c" break; case 33: /* program_type_clause: COMMON */ @@ -5488,7 +5529,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5492 "parser.c" +#line 5533 "parser.c" break; case 34: /* program_type_clause: COMMON _init_or_recurs */ @@ -5499,7 +5540,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5503 "parser.c" +#line 5544 "parser.c" break; case 36: /* _init_or_recurs: "INITIAL" */ @@ -5507,7 +5548,7 @@ yyparse (void) { current_program->flag_initial = 1; } -#line 5511 "parser.c" +#line 5552 "parser.c" break; case 37: /* _init_or_recurs: RECURSIVE */ @@ -5516,7 +5557,7 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5520 "parser.c" +#line 5561 "parser.c" break; case 41: /* configuration_section: CONFIGURATION SECTION '.' configuration_list */ @@ -5526,7 +5567,7 @@ yyparse (void) cb_error (_("CONFIGURATION SECTION not allowed in nested programs")); } } -#line 5530 "parser.c" +#line 5571 "parser.c" break; case 53: /* with_debugging_mode: _with DEBUGGING MODE */ @@ -5534,13 +5575,13 @@ yyparse (void) { cb_verify (cb_debugging_line, "DEBUGGING MODE"); } -#line 5538 "parser.c" +#line 5579 "parser.c" break; case 54: /* computer_name: "Identifier" */ #line 1143 "parser.y" { } -#line 5544 "parser.c" +#line 5585 "parser.c" break; case 65: /* object_computer_memory: MEMORY SIZE _is integer object_char_or_word */ @@ -5548,7 +5589,7 @@ yyparse (void) { cb_verify (cb_memory_size_clause, "MEMORY SIZE"); } -#line 5552 "parser.c" +#line 5593 "parser.c" break; case 68: /* object_computer_sequence: _program coll_sequence _is reference */ @@ -5556,7 +5597,7 @@ yyparse (void) { current_program->collating_sequence = yyvsp[0]; } -#line 5560 "parser.c" +#line 5601 "parser.c" break; case 69: /* object_computer_segment: "SEGMENT-LIMIT" _is integer */ @@ -5564,7 +5605,7 @@ yyparse (void) { /* Ignore */ } -#line 5568 "parser.c" +#line 5609 "parser.c" break; case 75: /* repository_name: FUNCTION repository_literal_list INTRINSIC */ @@ -5572,7 +5613,7 @@ yyparse (void) { current_program->function_spec_list = yyvsp[-1]; } -#line 5576 "parser.c" +#line 5617 "parser.c" break; case 76: /* repository_name: FUNCTION ALL INTRINSIC */ @@ -5580,19 +5621,19 @@ yyparse (void) { functions_are_all = 1; } -#line 5584 "parser.c" +#line 5625 "parser.c" break; case 77: /* repository_literal_list: "Literal" */ #line 1228 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5590 "parser.c" +#line 5631 "parser.c" break; case 78: /* repository_literal_list: repository_literal_list "Literal" */ #line 1230 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5596 "parser.c" +#line 5637 "parser.c" break; case 96: /* mnemonic_name_clause: "Identifier" _is CRT */ @@ -5606,7 +5647,7 @@ yyparse (void) } /* current_program->flag_screen = 1; */ } -#line 5610 "parser.c" +#line 5651 "parser.c" break; case 97: /* $@9: %empty */ @@ -5620,7 +5661,7 @@ yyparse (void) } save_tree_2 = yyvsp[0]; } -#line 5624 "parser.c" +#line 5665 "parser.c" break; case 99: /* $@10: %empty */ @@ -5632,7 +5673,7 @@ yyparse (void) } save_tree_2 = NULL; } -#line 5636 "parser.c" +#line 5677 "parser.c" break; case 101: /* mnemonic_name_clause: "ARGUMENT-NUMBER" _is undefined_word */ @@ -5650,7 +5691,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-NUMBER clause is not yet supported")); } } -#line 5654 "parser.c" +#line 5695 "parser.c" break; case 102: /* mnemonic_name_clause: "ARGUMENT-VALUE" _is undefined_word */ @@ -5668,7 +5709,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-VALUE clause is not yet supported")); } } -#line 5672 "parser.c" +#line 5713 "parser.c" break; case 103: /* mnemonic_name_clause: "ENVIRONMENT-NAME" _is undefined_word */ @@ -5686,7 +5727,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-NAME clause is not yet supported")); } } -#line 5690 "parser.c" +#line 5731 "parser.c" break; case 104: /* mnemonic_name_clause: "ENVIRONMENT-VALUE" _is undefined_word */ @@ -5704,7 +5745,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-VALUE clause is not yet supported")); } } -#line 5708 "parser.c" +#line 5749 "parser.c" break; case 109: /* special_name_mnemonic_on_off: on_or_off _status _is undefined_word */ @@ -5716,19 +5757,19 @@ yyparse (void) cb_define_switch_name (yyvsp[0], save_tree_1, yyvsp[-3], save_tree_2); } } -#line 5720 "parser.c" +#line 5761 "parser.c" break; case 110: /* on_or_off: ON */ #line 1379 "parser.y" { yyval = cb_int1; } -#line 5726 "parser.c" +#line 5767 "parser.c" break; case 111: /* on_or_off: OFF */ #line 1380 "parser.y" { yyval = cb_int0; } -#line 5732 "parser.c" +#line 5773 "parser.c" break; case 112: /* $@11: %empty */ @@ -5736,7 +5777,7 @@ yyparse (void) { save_tree_1 = yyvsp[0]; } -#line 5740 "parser.c" +#line 5781 "parser.c" break; case 113: /* alphabet_name_clause: ALPHABET undefined_word $@11 _is alphabet_definition */ @@ -5745,31 +5786,31 @@ yyparse (void) current_program->alphabet_name_list = cb_list_add (current_program->alphabet_name_list, yyvsp[0]); } -#line 5749 "parser.c" +#line 5790 "parser.c" break; case 114: /* alphabet_definition: NATIVE */ #line 1399 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_NATIVE); } -#line 5755 "parser.c" +#line 5796 "parser.c" break; case 115: /* alphabet_definition: "STANDARD-1" */ #line 1400 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_1); } -#line 5761 "parser.c" +#line 5802 "parser.c" break; case 116: /* alphabet_definition: "STANDARD-2" */ #line 1401 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_2); } -#line 5767 "parser.c" +#line 5808 "parser.c" break; case 117: /* alphabet_definition: EBCDIC */ #line 1402 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_EBCDIC); } -#line 5773 "parser.c" +#line 5814 "parser.c" break; case 118: /* alphabet_definition: alphabet_literal_list */ @@ -5778,31 +5819,31 @@ yyparse (void) yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_CUSTOM); CB_ALPHABET_NAME (yyval)->custom_list = yyvsp[0]; } -#line 5782 "parser.c" +#line 5823 "parser.c" break; case 119: /* alphabet_literal_list: alphabet_literal */ #line 1411 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5788 "parser.c" +#line 5829 "parser.c" break; case 120: /* alphabet_literal_list: alphabet_literal_list alphabet_literal */ #line 1413 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5794 "parser.c" +#line 5835 "parser.c" break; case 121: /* alphabet_literal: alphabet_lits */ #line 1417 "parser.y" { yyval = yyvsp[0]; } -#line 5800 "parser.c" +#line 5841 "parser.c" break; case 122: /* alphabet_literal: alphabet_lits THRU alphabet_lits */ #line 1418 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 5806 "parser.c" +#line 5847 "parser.c" break; case 123: /* @12: %empty */ @@ -5811,7 +5852,7 @@ yyparse (void) yyval = cb_list_init (yyvsp[-1]); save_tree_2 = yyval; } -#line 5815 "parser.c" +#line 5856 "parser.c" break; case 124: /* alphabet_literal: alphabet_lits ALSO @12 alphabet_also_sequence */ @@ -5819,79 +5860,79 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 5823 "parser.c" +#line 5864 "parser.c" break; case 127: /* alphabet_lits: "Literal" */ #line 1436 "parser.y" { yyval = yyvsp[0]; } -#line 5829 "parser.c" +#line 5870 "parser.c" break; case 128: /* alphabet_lits: SPACE */ #line 1437 "parser.y" { yyval = cb_space; } -#line 5835 "parser.c" +#line 5876 "parser.c" break; case 129: /* alphabet_lits: ZERO */ #line 1438 "parser.y" { yyval = cb_zero; } -#line 5841 "parser.c" +#line 5882 "parser.c" break; case 130: /* alphabet_lits: QUOTE */ #line 1439 "parser.y" { yyval = cb_quote; } -#line 5847 "parser.c" +#line 5888 "parser.c" break; case 131: /* alphabet_lits: "HIGH-VALUE" */ #line 1440 "parser.y" { yyval = cb_norm_high; } -#line 5853 "parser.c" +#line 5894 "parser.c" break; case 132: /* alphabet_lits: "LOW-VALUE" */ #line 1441 "parser.y" { yyval = cb_norm_low; } -#line 5859 "parser.c" +#line 5900 "parser.c" break; case 133: /* alphabet_also_literal: "Literal" */ #line 1445 "parser.y" { cb_list_add (save_tree_2, yyvsp[0]); } -#line 5865 "parser.c" +#line 5906 "parser.c" break; case 134: /* alphabet_also_literal: SPACE */ #line 1446 "parser.y" { cb_list_add (save_tree_2, cb_space); } -#line 5871 "parser.c" +#line 5912 "parser.c" break; case 135: /* alphabet_also_literal: ZERO */ #line 1447 "parser.y" { cb_list_add (save_tree_2, cb_zero); } -#line 5877 "parser.c" +#line 5918 "parser.c" break; case 136: /* alphabet_also_literal: QUOTE */ #line 1448 "parser.y" { cb_list_add (save_tree_2, cb_quote); } -#line 5883 "parser.c" +#line 5924 "parser.c" break; case 137: /* alphabet_also_literal: "HIGH-VALUE" */ #line 1449 "parser.y" { cb_list_add (save_tree_2, cb_norm_high); } -#line 5889 "parser.c" +#line 5930 "parser.c" break; case 138: /* alphabet_also_literal: "LOW-VALUE" */ #line 1450 "parser.y" { cb_list_add (save_tree_2, cb_norm_low); } -#line 5895 "parser.c" +#line 5936 "parser.c" break; case 139: /* symbolic_characters_clause: SYMBOLIC _characters symbolic_characters_list */ @@ -5903,7 +5944,7 @@ yyparse (void) } PENDING ("SYMBOLIC CHARACTERS"); } -#line 5907 "parser.c" +#line 5948 "parser.c" break; case 140: /* symbolic_characters_list: char_list _is_are integer_list */ @@ -5916,31 +5957,31 @@ yyparse (void) yyval = NULL; } } -#line 5920 "parser.c" +#line 5961 "parser.c" break; case 141: /* char_list: undefined_word */ #line 1480 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5926 "parser.c" +#line 5967 "parser.c" break; case 142: /* char_list: char_list undefined_word */ #line 1481 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5932 "parser.c" +#line 5973 "parser.c" break; case 143: /* integer_list: integer */ #line 1485 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5938 "parser.c" +#line 5979 "parser.c" break; case 144: /* integer_list: integer_list integer */ #line 1486 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5944 "parser.c" +#line 5985 "parser.c" break; case 145: /* class_name_clause: CLASS undefined_word _is class_item_list */ @@ -5950,25 +5991,25 @@ yyparse (void) cb_list_add (current_program->class_name_list, cb_build_class_name (yyvsp[-2], yyvsp[0])); } -#line 5954 "parser.c" +#line 5995 "parser.c" break; case 146: /* class_item_list: class_item */ #line 1502 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5960 "parser.c" +#line 6001 "parser.c" break; case 147: /* class_item_list: class_item_list class_item */ #line 1503 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5966 "parser.c" +#line 6007 "parser.c" break; case 148: /* class_item: basic_value */ #line 1507 "parser.y" { yyval = yyvsp[0]; } -#line 5972 "parser.c" +#line 6013 "parser.c" break; case 149: /* class_item: basic_value THRU basic_value */ @@ -5981,7 +6022,7 @@ yyparse (void) yyval = cb_build_pair (yyvsp[0], yyvsp[-2]); } } -#line 5985 "parser.c" +#line 6026 "parser.c" break; case 150: /* locale_clause: LOCALE undefined_word _is reference */ @@ -5995,7 +6036,7 @@ yyparse (void) cb_list_add (current_program->locale_list, l); } } -#line 5999 "parser.c" +#line 6040 "parser.c" break; case 151: /* currency_sign_clause: CURRENCY _sign _is "Literal" */ @@ -6060,7 +6101,7 @@ yyparse (void) } current_program->currency_symbol = s[0]; } -#line 6064 "parser.c" +#line 6105 "parser.c" break; case 152: /* decimal_point_clause: "DECIMAL-POINT" _is COMMA */ @@ -6069,31 +6110,31 @@ yyparse (void) current_program->decimal_point = ','; current_program->numeric_separator = '.'; } -#line 6073 "parser.c" +#line 6114 "parser.c" break; case 153: /* cursor_clause: CURSOR _is reference */ #line 1615 "parser.y" { current_program->cursor_pos = yyvsp[0]; } -#line 6079 "parser.c" +#line 6120 "parser.c" break; case 154: /* crt_status_clause: CRT STATUS _is reference */ #line 1622 "parser.y" { current_program->crt_status = yyvsp[0]; } -#line 6085 "parser.c" +#line 6126 "parser.c" break; case 155: /* screen_control: "SCREEN-CONTROL" _is reference */ #line 1629 "parser.y" { PENDING ("SCREEN CONTROL"); } -#line 6091 "parser.c" +#line 6132 "parser.c" break; case 156: /* event_status: "EVENT-STATUS" _is reference */ #line 1635 "parser.y" { PENDING ("EVENT STATUS"); } -#line 6097 "parser.c" +#line 6138 "parser.c" break; case 159: /* $@13: %empty */ @@ -6106,7 +6147,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6110 "parser.c" +#line 6151 "parser.c" break; case 161: /* $@14: %empty */ @@ -6119,7 +6160,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6123 "parser.c" +#line 6164 "parser.c" break; case 167: /* $@15: %empty */ @@ -6138,7 +6179,7 @@ yyparse (void) current_program->file_list = cb_cons (CB_TREE (current_file), current_program->file_list); } -#line 6142 "parser.c" +#line 6183 "parser.c" break; case 168: /* file_control_entry: SELECT flag_optional undefined_word $@15 select_clause_sequence '.' */ @@ -6146,7 +6187,7 @@ yyparse (void) { validate_file (current_file, yyvsp[-3]); } -#line 6150 "parser.c" +#line 6191 "parser.c" break; case 186: /* assign_clause: ASSIGN _to _ext_clause _device assignment_name */ @@ -6154,7 +6195,7 @@ yyparse (void) { current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } -#line 6158 "parser.c" +#line 6199 "parser.c" break; case 187: /* assign_clause: ASSIGN _to _ext_clause DISK */ @@ -6163,7 +6204,7 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("DISK")); } -#line 6167 "parser.c" +#line 6208 "parser.c" break; case 188: /* assign_clause: ASSIGN _to _ext_clause PRINTER */ @@ -6172,13 +6213,13 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("PRINTER")); } -#line 6176 "parser.c" +#line 6217 "parser.c" break; case 191: /* _device: PRINTER */ #line 1745 "parser.y" { current_file->organization = COB_ORG_LINE_SEQUENTIAL; } -#line 6182 "parser.c" +#line 6223 "parser.c" break; case 193: /* _ext_clause: EXTERNAL */ @@ -6186,7 +6227,7 @@ yyparse (void) { current_file->external_assign = 1; } -#line 6190 "parser.c" +#line 6231 "parser.c" break; case 194: /* _ext_clause: DYNAMIC */ @@ -6194,7 +6235,7 @@ yyparse (void) { current_file->external_assign = 0; } -#line 6198 "parser.c" +#line 6239 "parser.c" break; case 196: /* assignment_name: DISPLAY */ @@ -6205,7 +6246,7 @@ yyparse (void) s = "$#@DUMMY@#$"; yyval = cb_build_alphanumeric_literal ((unsigned char *)s, strlen (s)); } -#line 6209 "parser.c" +#line 6250 "parser.c" break; case 197: /* assignment_name: _literal assignment_device_name_list */ @@ -6226,37 +6267,37 @@ yyparse (void) yyval = yyvsp[-1]; } } -#line 6230 "parser.c" +#line 6271 "parser.c" break; case 198: /* assignment_device_name_list: qualified_word */ #line 1788 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 6236 "parser.c" +#line 6277 "parser.c" break; case 199: /* assignment_device_name_list: assignment_device_name_list qualified_word */ #line 1789 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 6242 "parser.c" +#line 6283 "parser.c" break; case 201: /* access_mode: SEQUENTIAL */ #line 1799 "parser.y" { current_file->access_mode = COB_ACCESS_SEQUENTIAL; } -#line 6248 "parser.c" +#line 6289 "parser.c" break; case 202: /* access_mode: DYNAMIC */ #line 1800 "parser.y" { current_file->access_mode = COB_ACCESS_DYNAMIC; } -#line 6254 "parser.c" +#line 6295 "parser.c" break; case 203: /* access_mode: RANDOM */ #line 1801 "parser.y" { current_file->access_mode = COB_ACCESS_RANDOM; } -#line 6260 "parser.c" +#line 6301 "parser.c" break; case 204: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference flag_duplicates */ @@ -6280,7 +6321,7 @@ yyparse (void) l->next = p; } } -#line 6284 "parser.c" +#line 6325 "parser.c" break; case 205: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6324,7 +6365,7 @@ yyparse (void) } } } -#line 6328 "parser.c" +#line 6369 "parser.c" break; case 206: /* $@16: %empty */ @@ -6332,7 +6373,7 @@ yyparse (void) { key_component_list = NULL; } -#line 6336 "parser.c" +#line 6377 "parser.c" break; case 209: /* split_key: reference */ @@ -6349,25 +6390,25 @@ yyparse (void) c->next = comp; } } -#line 6353 "parser.c" +#line 6394 "parser.c" break; case 210: /* key_is_eq: %empty */ #line 1895 "parser.y" { yyval = NULL; } -#line 6359 "parser.c" +#line 6400 "parser.c" break; case 211: /* key_is_eq: SOURCE _is */ #line 1896 "parser.y" { yyval = cb_int1; } -#line 6365 "parser.c" +#line 6406 "parser.c" break; case 212: /* key_is_eq: '=' */ #line 1897 "parser.y" { yyval = cb_int('='); } -#line 6371 "parser.c" +#line 6412 "parser.c" break; case 213: /* collating_sequence_clause: coll_sequence _is "Identifier" */ @@ -6375,7 +6416,7 @@ yyparse (void) { PENDING ("COLLATING SEQUENCE"); } -#line 6379 "parser.c" +#line 6420 "parser.c" break; case 214: /* file_status_clause: file_or_sort STATUS _is reference opt_reference */ @@ -6386,25 +6427,25 @@ yyparse (void) PENDING ("2nd FILE STATUS"); } } -#line 6390 "parser.c" +#line 6431 "parser.c" break; case 219: /* lock_mode: MANUAL lock_with */ #line 1935 "parser.y" { current_file->lock_mode = COB_LOCK_MANUAL; } -#line 6396 "parser.c" +#line 6437 "parser.c" break; case 220: /* lock_mode: AUTOMATIC lock_with */ #line 1936 "parser.y" { current_file->lock_mode = COB_LOCK_AUTOMATIC; } -#line 6402 "parser.c" +#line 6443 "parser.c" break; case 221: /* lock_mode: EXCLUSIVE */ #line 1937 "parser.y" { current_file->lock_mode = COB_LOCK_EXCLUSIVE; } -#line 6408 "parser.c" +#line 6449 "parser.c" break; case 224: /* lock_with: WITH LOCK ON MULTIPLE lock_records */ @@ -6412,13 +6453,13 @@ yyparse (void) { current_file->lock_mode |= COB_LOCK_MULTIPLE; } -#line 6416 "parser.c" +#line 6457 "parser.c" break; case 225: /* lock_with: WITH ROLLBACK */ #line 1946 "parser.y" { PENDING ("WITH ROLLBACK"); } -#line 6422 "parser.c" +#line 6463 "parser.c" break; case 230: /* organization: INDEXED */ @@ -6431,7 +6472,7 @@ yyparse (void) organized_seen = 1; } } -#line 6435 "parser.c" +#line 6476 "parser.c" break; case 231: /* organization: RECORD _binary SEQUENTIAL */ @@ -6444,7 +6485,7 @@ yyparse (void) organized_seen = 1; } } -#line 6448 "parser.c" +#line 6489 "parser.c" break; case 232: /* organization: SEQUENTIAL */ @@ -6457,7 +6498,7 @@ yyparse (void) organized_seen = 1; } } -#line 6461 "parser.c" +#line 6502 "parser.c" break; case 233: /* organization: RELATIVE */ @@ -6470,7 +6511,7 @@ yyparse (void) organized_seen = 1; } } -#line 6474 "parser.c" +#line 6515 "parser.c" break; case 234: /* organization: LINE SEQUENTIAL */ @@ -6483,7 +6524,7 @@ yyparse (void) organized_seen = 1; } } -#line 6487 "parser.c" +#line 6528 "parser.c" break; case 235: /* padding_character_clause: PADDING _character _is reference_or_literal */ @@ -6491,13 +6532,13 @@ yyparse (void) { cb_verify (cb_padding_character_clause, "PADDING CHARACTER"); } -#line 6495 "parser.c" +#line 6536 "parser.c" break; case 236: /* record_delimiter_clause: RECORD DELIMITER _is "STANDARD-1" */ #line 2023 "parser.y" { /* ignored */ } -#line 6501 "parser.c" +#line 6542 "parser.c" break; case 237: /* record_key_clause: RECORD _key _is reference flag_duplicates */ @@ -6510,7 +6551,7 @@ yyparse (void) current_file->key = yyvsp[-1]; } -#line 6514 "parser.c" +#line 6555 "parser.c" break; case 238: /* record_key_clause: RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6546,55 +6587,55 @@ yyparse (void) current_file->component_list = key_component_list; } } -#line 6550 "parser.c" +#line 6591 "parser.c" break; case 239: /* relative_key_clause: RELATIVE _key _is reference */ #line 2077 "parser.y" { current_file->key = yyvsp[0]; } -#line 6556 "parser.c" +#line 6597 "parser.c" break; case 240: /* reserve_clause: RESERVE integer _area */ #line 2084 "parser.y" { /* ignored */ } -#line 6562 "parser.c" +#line 6603 "parser.c" break; case 241: /* reserve_clause: RESERVE NO */ #line 2085 "parser.y" { /* ignored */ } -#line 6568 "parser.c" +#line 6609 "parser.c" break; case 242: /* sharing_clause: SHARING _with sharing_option */ #line 2092 "parser.y" { current_file->sharing = yyvsp[0]; } -#line 6574 "parser.c" +#line 6615 "parser.c" break; case 243: /* sharing_option: ALL _other */ #line 2096 "parser.y" { yyval = NULL; PENDING ("SHARING ALL OTHER"); } -#line 6580 "parser.c" +#line 6621 "parser.c" break; case 244: /* sharing_option: NO _other */ #line 2097 "parser.y" { yyval = cb_int1; } -#line 6586 "parser.c" +#line 6627 "parser.c" break; case 245: /* sharing_option: READ ONLY */ #line 2098 "parser.y" { yyval = cb_int0; } -#line 6592 "parser.c" +#line 6633 "parser.c" break; case 246: /* nominal_key_clause: NOMINAL _key _is reference */ #line 2104 "parser.y" { PENDING ("NOMINAL KEY"); } -#line 6598 "parser.c" +#line 6639 "parser.c" break; case 257: /* same_clause: SAME same_option _area _for file_name_list */ @@ -6620,31 +6661,31 @@ yyparse (void) break; } } -#line 6624 "parser.c" +#line 6665 "parser.c" break; case 258: /* same_option: %empty */ #line 2159 "parser.y" { yyval = cb_int0; } -#line 6630 "parser.c" +#line 6671 "parser.c" break; case 259: /* same_option: RECORD */ #line 2160 "parser.y" { yyval = cb_int1; } -#line 6636 "parser.c" +#line 6677 "parser.c" break; case 260: /* same_option: SORT */ #line 2161 "parser.y" { yyval = cb_int2; } -#line 6642 "parser.c" +#line 6683 "parser.c" break; case 261: /* same_option: "SORT-MERGE" */ #line 2162 "parser.y" { yyval = cb_int2; } -#line 6648 "parser.c" +#line 6689 "parser.c" break; case 262: /* multiple_file_tape_clause: MULTIPLE _file _tape _contains multiple_file_list */ @@ -6652,13 +6693,13 @@ yyparse (void) { cb_verify (cb_multiple_file_tape_clause, "MULTIPLE FILE TAPE"); } -#line 6656 "parser.c" +#line 6697 "parser.c" break; case 265: /* multiple_file: file_name multiple_file_position */ #line 2180 "parser.y" { } -#line 6662 "parser.c" +#line 6703 "parser.c" break; case 271: /* apply_clause: APPLY "COMMITMENT-CONTROL" _on reference_list */ @@ -6666,7 +6707,7 @@ yyparse (void) { PENDING ("APPLY COMMITMENT-CONTROL"); } -#line 6670 "parser.c" +#line 6711 "parser.c" break; case 272: /* apply_clause: APPLY "CYL-OVERFLOW" _of "Literal" TRACKS ON reference_list */ @@ -6674,7 +6715,7 @@ yyparse (void) { PENDING ("APPLY CYL-OVERFLOW"); } -#line 6678 "parser.c" +#line 6719 "parser.c" break; case 273: /* apply_clause: APPLY "CORE-INDEX" TO reference ON reference_list */ @@ -6682,7 +6723,7 @@ yyparse (void) { PENDING ("APPLY CORE-INDEX"); } -#line 6686 "parser.c" +#line 6727 "parser.c" break; case 274: /* apply_clause: APPLY "FORMS-OVERLAY" TO reference ON reference_list */ @@ -6690,7 +6731,7 @@ yyparse (void) { PENDING ("APPLY FORMS-OVERLAY"); } -#line 6694 "parser.c" +#line 6735 "parser.c" break; case 275: /* apply_clause: APPLY "CLOSE-NOFEED" ON reference_list */ @@ -6698,13 +6739,13 @@ yyparse (void) { PENDING ("APPLY CLOSE-NOFEED"); } -#line 6702 "parser.c" +#line 6743 "parser.c" break; case 279: /* $@17: %empty */ #line 2238 "parser.y" { current_storage = CB_STORAGE_FILE; } -#line 6708 "parser.c" +#line 6749 "parser.c" break; case 281: /* $@18: %empty */ @@ -6718,7 +6759,7 @@ yyparse (void) } current_storage = CB_STORAGE_FILE; } -#line 6722 "parser.c" +#line 6763 "parser.c" break; case 285: /* file_description: file_type file_description_entry record_description_list */ @@ -6730,7 +6771,7 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6734 "parser.c" +#line 6775 "parser.c" break; case 286: /* file_description_sequence_without_type: file_description_entry record_description_list */ @@ -6742,19 +6783,19 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6746 "parser.c" +#line 6787 "parser.c" break; case 288: /* file_type: FD */ #line 2283 "parser.y" { yyval = cb_int0; } -#line 6752 "parser.c" +#line 6793 "parser.c" break; case 289: /* file_type: SD */ #line 2284 "parser.y" { yyval = cb_int1; } -#line 6758 "parser.c" +#line 6799 "parser.c" break; case 290: /* @19: %empty */ @@ -6769,7 +6810,7 @@ yyparse (void) current_file->organization = COB_ORG_SORT; } } -#line 6773 "parser.c" +#line 6814 "parser.c" break; case 291: /* file_description_entry: file_name @19 file_description_clause_sequence '.' */ @@ -6778,7 +6819,7 @@ yyparse (void) /* Shut up bison */ dummy_tree = yyvsp[-2]; } -#line 6782 "parser.c" +#line 6823 "parser.c" break; case 294: /* file_description_clause: _is EXTERNAL */ @@ -6789,7 +6830,7 @@ yyparse (void) } current_file->external = 1; } -#line 6793 "parser.c" +#line 6834 "parser.c" break; case 295: /* file_description_clause: _is GLOBAL */ @@ -6800,13 +6841,13 @@ yyparse (void) } current_file->global = 1; } -#line 6804 "parser.c" +#line 6845 "parser.c" break; case 306: /* block_contains_clause: BLOCK _contains integer opt_to_integer _records_or_characters */ #line 2347 "parser.y" { /* ignored */ } -#line 6810 "parser.c" +#line 6851 "parser.c" break; case 310: /* record_clause: RECORD _contains integer _characters */ @@ -6822,7 +6863,7 @@ yyparse (void) } } } -#line 6826 "parser.c" +#line 6867 "parser.c" break; case 311: /* record_clause: RECORD _contains integer TO integer _characters */ @@ -6851,7 +6892,7 @@ yyparse (void) } } } -#line 6855 "parser.c" +#line 6896 "parser.c" break; case 312: /* record_clause: RECORD _is VARYING _in _size opt_from_integer opt_to_integer _characters record_depending */ @@ -6876,7 +6917,7 @@ yyparse (void) cb_error (_("RECORD clause invalid")); } } -#line 6880 "parser.c" +#line 6921 "parser.c" break; case 314: /* record_depending: DEPENDING _on reference */ @@ -6884,31 +6925,31 @@ yyparse (void) { current_file->record_depending = yyvsp[0]; } -#line 6888 "parser.c" +#line 6929 "parser.c" break; case 315: /* opt_from_integer: %empty */ #line 2425 "parser.y" { yyval = NULL; } -#line 6894 "parser.c" +#line 6935 "parser.c" break; case 316: /* opt_from_integer: _from integer */ #line 2426 "parser.y" { yyval = yyvsp[0]; } -#line 6900 "parser.c" +#line 6941 "parser.c" break; case 317: /* opt_to_integer: %empty */ #line 2430 "parser.y" { yyval = NULL; } -#line 6906 "parser.c" +#line 6947 "parser.c" break; case 318: /* opt_to_integer: TO integer */ #line 2431 "parser.y" { yyval = yyvsp[0]; } -#line 6912 "parser.c" +#line 6953 "parser.c" break; case 319: /* label_records_clause: LABEL records label_option */ @@ -6916,7 +6957,7 @@ yyparse (void) { cb_verify (cb_label_records_clause, "LABEL RECORDS"); } -#line 6920 "parser.c" +#line 6961 "parser.c" break; case 322: /* value_of_clause: VALUE OF "Identifier" _is valueof_name */ @@ -6924,7 +6965,7 @@ yyparse (void) { cb_verify (cb_value_of_clause, "VALUE OF"); } -#line 6928 "parser.c" +#line 6969 "parser.c" break; case 323: /* value_of_clause: VALUE OF "FILE-ID" _is valueof_name */ @@ -6934,7 +6975,7 @@ yyparse (void) current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } } -#line 6938 "parser.c" +#line 6979 "parser.c" break; case 326: /* data_records_clause: DATA records no_reference_list */ @@ -6942,7 +6983,7 @@ yyparse (void) { cb_verify (cb_data_records_clause, "DATA RECORDS"); } -#line 6946 "parser.c" +#line 6987 "parser.c" break; case 327: /* linage_clause: LINAGE _is reference_or_literal _lines linage_sequence */ @@ -6961,7 +7002,7 @@ yyparse (void) current_linage++; } } -#line 6965 "parser.c" +#line 7006 "parser.c" break; case 333: /* linage_footing: _with FOOTING _at reference_or_literal _lines */ @@ -6969,7 +7010,7 @@ yyparse (void) { current_file->latfoot = yyvsp[-1]; } -#line 6973 "parser.c" +#line 7014 "parser.c" break; case 334: /* linage_top: _at TOP reference_or_literal _lines */ @@ -6977,7 +7018,7 @@ yyparse (void) { current_file->lattop = yyvsp[-1]; } -#line 6981 "parser.c" +#line 7022 "parser.c" break; case 335: /* linage_bottom: _at BOTTOM reference_or_literal */ @@ -6985,13 +7026,13 @@ yyparse (void) { current_file->latbot = yyvsp[0]; } -#line 6989 "parser.c" +#line 7030 "parser.c" break; case 336: /* recording_mode_clause: RECORDING _mode _is "Identifier" */ #line 2536 "parser.y" { /* ignore */ } -#line 6995 "parser.c" +#line 7036 "parser.c" break; case 337: /* code_set_clause: "CODE-SET" _is "Identifier" */ @@ -7008,7 +7049,7 @@ yyparse (void) } } } -#line 7012 "parser.c" +#line 7053 "parser.c" break; case 338: /* report_clause: REPORT _is report_name */ @@ -7016,7 +7057,7 @@ yyparse (void) { cb_warning (_("file descriptor REPORT IS")); } -#line 7020 "parser.c" +#line 7061 "parser.c" break; case 339: /* report_clause: REPORTS _are report_name */ @@ -7024,13 +7065,13 @@ yyparse (void) { cb_warning (_("file descriptor REPORTS ARE")); } -#line 7028 "parser.c" +#line 7069 "parser.c" break; case 341: /* $@20: %empty */ #line 2577 "parser.y" { current_storage = CB_STORAGE_WORKING; } -#line 7034 "parser.c" +#line 7075 "parser.c" break; case 342: /* working_storage_section: "WORKING-STORAGE" SECTION '.' $@20 record_description_list */ @@ -7041,19 +7082,19 @@ yyparse (void) cb_field_add (current_program->working_storage, CB_FIELD (yyvsp[0])); } } -#line 7045 "parser.c" +#line 7086 "parser.c" break; case 343: /* record_description_list: %empty */ #line 2588 "parser.y" { yyval = NULL; } -#line 7051 "parser.c" +#line 7092 "parser.c" break; case 344: /* record_description_list: record_description_list_1 */ #line 2589 "parser.y" { yyval = yyvsp[0]; } -#line 7057 "parser.c" +#line 7098 "parser.c" break; case 345: /* $@21: %empty */ @@ -7063,7 +7104,7 @@ yyparse (void) description_field = NULL; cb_clear_real_field (); } -#line 7067 "parser.c" +#line 7108 "parser.c" break; case 346: /* record_description_list_1: $@21 record_description_list_2 */ @@ -7076,7 +7117,7 @@ yyparse (void) } yyval = CB_TREE (description_field); } -#line 7080 "parser.c" +#line 7121 "parser.c" break; case 351: /* $@22: %empty */ @@ -7092,7 +7133,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7096 "parser.c" +#line 7137 "parser.c" break; case 352: /* data_description: level_number entry_name $@22 data_description_clause_sequence _maybe_next_level_number */ @@ -7109,7 +7150,7 @@ yyparse (void) description_field = current_field; } } -#line 7113 "parser.c" +#line 7154 "parser.c" break; case 353: /* $@23: %empty */ @@ -7125,7 +7166,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7129 "parser.c" +#line 7170 "parser.c" break; case 354: /* data_description: level_number_88 entry_name $@23 value_cond_clause */ @@ -7140,7 +7181,7 @@ yyparse (void) } } -#line 7144 "parser.c" +#line 7185 "parser.c" break; case 358: /* _maybe_next_level_number: "Literal" */ @@ -7162,7 +7203,7 @@ yyparse (void) cb_unget_token (LITERAL, yyvsp[0]); } } -#line 7166 "parser.c" +#line 7207 "parser.c" break; case 359: /* entry_name: %empty */ @@ -7172,7 +7213,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7176 "parser.c" +#line 7217 "parser.c" break; case 360: /* entry_name: FILLER */ @@ -7182,7 +7223,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7186 "parser.c" +#line 7227 "parser.c" break; case 361: /* entry_name: "Identifier" */ @@ -7192,7 +7233,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7196 "parser.c" +#line 7237 "parser.c" break; case 362: /* const_name: "Identifier" */ @@ -7202,7 +7243,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7206 "parser.c" +#line 7247 "parser.c" break; case 364: /* const_global: _is GLOBAL */ @@ -7211,25 +7252,25 @@ yyparse (void) current_field->flag_is_global = 1; cb_error (_("CONSTANT with GLOBAL clause is not yet supported")); } -#line 7215 "parser.c" +#line 7256 "parser.c" break; case 365: /* lit_or_length: literal */ #line 2741 "parser.y" { yyval = yyvsp[0]; } -#line 7221 "parser.c" +#line 7262 "parser.c" break; case 366: /* lit_or_length: LENGTH _of identifier_1 */ #line 2742 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7227 "parser.c" +#line 7268 "parser.c" break; case 367: /* lit_or_length: "BYTE-LENGTH" _of identifier_1 */ #line 2743 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7233 "parser.c" +#line 7274 "parser.c" break; case 368: /* constant_entry: level_number const_name CONSTANT const_global _as lit_or_length */ @@ -7249,7 +7290,7 @@ yyparse (void) /* Ignore return value */ cb_validate_78_item (CB_FIELD (x)); } -#line 7253 "parser.c" +#line 7294 "parser.c" break; case 369: /* data_description_clause_sequence: %empty */ @@ -7258,7 +7299,7 @@ yyparse (void) /* required to check redefines */ yyval = NULL; } -#line 7262 "parser.c" +#line 7303 "parser.c" break; case 370: /* data_description_clause_sequence: data_description_clause_sequence data_description_clause */ @@ -7267,7 +7308,7 @@ yyparse (void) /* required to check redefines */ yyval = cb_true; } -#line 7271 "parser.c" +#line 7312 "parser.c" break; case 386: /* redefines_clause: REDEFINES identifier_1 */ @@ -7287,7 +7328,7 @@ yyparse (void) YYERROR; } } -#line 7291 "parser.c" +#line 7332 "parser.c" break; case 387: /* external_clause: _is EXTERNAL as_extname */ @@ -7310,13 +7351,13 @@ yyparse (void) has_external = 1; } } -#line 7314 "parser.c" +#line 7355 "parser.c" break; case 388: /* as_extname: %empty */ #line 2845 "parser.y" { current_field->ename = NULL; } -#line 7320 "parser.c" +#line 7361 "parser.c" break; case 389: /* as_extname: AS "Literal" */ @@ -7327,7 +7368,7 @@ yyparse (void) x = CB_FIELD(cb_build_field (cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)))); current_field->ename = x->name; } -#line 7331 "parser.c" +#line 7372 "parser.c" break; case 390: /* global_clause: _is GLOBAL */ @@ -7345,25 +7386,25 @@ yyparse (void) current_field->flag_is_global = 1; } } -#line 7349 "parser.c" +#line 7390 "parser.c" break; case 391: /* picture_clause: PICTURE */ #line 2878 "parser.y" { current_field->pic = CB_PICTURE (yyvsp[0]); } -#line 7355 "parser.c" +#line 7396 "parser.c" break; case 394: /* usage: BINARY */ #line 2890 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7361 "parser.c" +#line 7402 "parser.c" break; case 395: /* usage: COMP */ #line 2891 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7367 "parser.c" +#line 7408 "parser.c" break; case 396: /* usage: "COMP-1" */ @@ -7372,7 +7413,7 @@ yyparse (void) current_field->usage = CB_USAGE_FLOAT; cb_error (_("COMP-1 not implemented")); } -#line 7376 "parser.c" +#line 7417 "parser.c" break; case 397: /* usage: "COMP-2" */ @@ -7381,49 +7422,49 @@ yyparse (void) current_field->usage = CB_USAGE_DOUBLE; cb_error (_("COMP-2 not implemented")); } -#line 7385 "parser.c" +#line 7426 "parser.c" break; case 398: /* usage: "COMP-3" */ #line 2902 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7391 "parser.c" +#line 7432 "parser.c" break; case 399: /* usage: "COMP-4" */ #line 2903 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7397 "parser.c" +#line 7438 "parser.c" break; case 400: /* usage: "COMP-5" */ #line 2904 "parser.y" { current_field->usage = CB_USAGE_COMP_5; } -#line 7403 "parser.c" +#line 7444 "parser.c" break; case 401: /* usage: "COMP-X" */ #line 2905 "parser.y" { current_field->usage = CB_USAGE_COMP_X; } -#line 7409 "parser.c" +#line 7450 "parser.c" break; case 402: /* usage: DISPLAY */ #line 2906 "parser.y" { current_field->usage = CB_USAGE_DISPLAY; } -#line 7415 "parser.c" +#line 7456 "parser.c" break; case 403: /* usage: INDEX */ #line 2907 "parser.y" { current_field->usage = CB_USAGE_INDEX; } -#line 7421 "parser.c" +#line 7462 "parser.c" break; case 404: /* usage: "PACKED-DECIMAL" */ #line 2908 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7427 "parser.c" +#line 7468 "parser.c" break; case 405: /* usage: POINTER */ @@ -7432,7 +7473,7 @@ yyparse (void) current_field->usage = CB_USAGE_POINTER; current_field->flag_is_pointer = 1; } -#line 7436 "parser.c" +#line 7477 "parser.c" break; case 406: /* usage: "PROGRAM-POINTER" */ @@ -7441,115 +7482,115 @@ yyparse (void) current_field->usage = CB_USAGE_PROGRAM_POINTER; current_field->flag_is_pointer = 1; } -#line 7445 "parser.c" +#line 7486 "parser.c" break; case 407: /* usage: "SIGNED-SHORT" */ #line 2919 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7451 "parser.c" +#line 7492 "parser.c" break; case 408: /* usage: "SIGNED-INT" */ #line 2920 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7457 "parser.c" +#line 7498 "parser.c" break; case 409: /* usage: "SIGNED-LONG" */ #line 2921 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7463 "parser.c" +#line 7504 "parser.c" break; case 410: /* usage: "UNSIGNED-SHORT" */ #line 2922 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7469 "parser.c" +#line 7510 "parser.c" break; case 411: /* usage: "UNSIGNED-INT" */ #line 2923 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7475 "parser.c" +#line 7516 "parser.c" break; case 412: /* usage: "UNSIGNED-LONG" */ #line 2924 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7481 "parser.c" +#line 7522 "parser.c" break; case 413: /* usage: "BINARY-CHAR" SIGNED */ #line 2925 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7487 "parser.c" +#line 7528 "parser.c" break; case 414: /* usage: "BINARY-CHAR" UNSIGNED */ #line 2926 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_CHAR; } -#line 7493 "parser.c" +#line 7534 "parser.c" break; case 415: /* usage: "BINARY-CHAR" */ #line 2927 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7499 "parser.c" +#line 7540 "parser.c" break; case 416: /* usage: "BINARY-SHORT" SIGNED */ #line 2928 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7505 "parser.c" +#line 7546 "parser.c" break; case 417: /* usage: "BINARY-SHORT" UNSIGNED */ #line 2929 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7511 "parser.c" +#line 7552 "parser.c" break; case 418: /* usage: "BINARY-SHORT" */ #line 2930 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7517 "parser.c" +#line 7558 "parser.c" break; case 419: /* usage: "BINARY-LONG" SIGNED */ #line 2931 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7523 "parser.c" +#line 7564 "parser.c" break; case 420: /* usage: "BINARY-LONG" UNSIGNED */ #line 2932 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7529 "parser.c" +#line 7570 "parser.c" break; case 421: /* usage: "BINARY-LONG" */ #line 2933 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7535 "parser.c" +#line 7576 "parser.c" break; case 422: /* usage: "BINARY-DOUBLE" SIGNED */ #line 2934 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7541 "parser.c" +#line 7582 "parser.c" break; case 423: /* usage: "BINARY-DOUBLE" UNSIGNED */ #line 2935 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7547 "parser.c" +#line 7588 "parser.c" break; case 424: /* usage: "BINARY-DOUBLE" */ #line 2936 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7553 "parser.c" +#line 7594 "parser.c" break; case 425: /* usage: "BINARY-C-LONG" SIGNED */ @@ -7561,7 +7602,7 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7565 "parser.c" +#line 7606 "parser.c" break; case 426: /* usage: "BINARY-C-LONG" UNSIGNED */ @@ -7573,7 +7614,7 @@ yyparse (void) current_field->usage = CB_USAGE_UNSIGNED_LONG; } } -#line 7577 "parser.c" +#line 7618 "parser.c" break; case 427: /* usage: "BINARY-C-LONG" */ @@ -7585,13 +7626,13 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7589 "parser.c" +#line 7630 "parser.c" break; case 428: /* usage: NATIONAL */ #line 2961 "parser.y" { PENDING ("USAGE NATIONAL");} -#line 7595 "parser.c" +#line 7636 "parser.c" break; case 429: /* sign_clause: _sign_is LEADING flag_separate */ @@ -7600,7 +7641,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 1; } -#line 7604 "parser.c" +#line 7645 "parser.c" break; case 430: /* sign_clause: _sign_is TRAILING flag_separate */ @@ -7609,7 +7650,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 0; } -#line 7613 "parser.c" +#line 7654 "parser.c" break; case 434: /* occurs_clause: OCCURS integer occurs_to_integer _times occurs_depending occurs_key_spec */ @@ -7626,19 +7667,19 @@ yyparse (void) } current_field->flag_occurs = 1; } -#line 7630 "parser.c" +#line 7671 "parser.c" break; case 435: /* occurs_to_integer: %empty */ #line 3006 "parser.y" { yyval = NULL; } -#line 7636 "parser.c" +#line 7677 "parser.c" break; case 436: /* occurs_to_integer: TO integer */ #line 3007 "parser.y" { yyval = yyvsp[0]; } -#line 7642 "parser.c" +#line 7683 "parser.c" break; case 438: /* occurs_depending: DEPENDING _on reference */ @@ -7646,7 +7687,7 @@ yyparse (void) { current_field->occurs_depending = yyvsp[0]; } -#line 7650 "parser.c" +#line 7691 "parser.c" break; case 441: /* occurs_keys: occurs_key_list */ @@ -7671,7 +7712,7 @@ yyparse (void) current_field->nkeys = nkeys; } } -#line 7675 "parser.c" +#line 7716 "parser.c" break; case 442: /* occurs_key: ascending_or_descending _key _is reference_list */ @@ -7688,31 +7729,31 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 7692 "parser.c" +#line 7733 "parser.c" break; case 443: /* occurs_key_list: occurs_key */ #line 3060 "parser.y" { yyval = yyvsp[0]; } -#line 7698 "parser.c" +#line 7739 "parser.c" break; case 444: /* occurs_key_list: occurs_key_list occurs_key */ #line 3061 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 7704 "parser.c" +#line 7745 "parser.c" break; case 445: /* ascending_or_descending: ASCENDING */ #line 3065 "parser.y" { yyval = cb_int (COB_ASCENDING); } -#line 7710 "parser.c" +#line 7751 "parser.c" break; case 446: /* ascending_or_descending: DESCENDING */ #line 3066 "parser.y" { yyval = cb_int (COB_DESCENDING); } -#line 7716 "parser.c" +#line 7757 "parser.c" break; case 449: /* occurs_indexed: INDEXED _by occurs_index_list */ @@ -7720,19 +7761,19 @@ yyparse (void) { current_field->index_list = yyvsp[0]; } -#line 7724 "parser.c" +#line 7765 "parser.c" break; case 450: /* occurs_index_list: occurs_index */ #line 3079 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7730 "parser.c" +#line 7771 "parser.c" break; case 451: /* occurs_index_list: occurs_index_list occurs_index */ #line 3081 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7736 "parser.c" +#line 7777 "parser.c" break; case 452: /* occurs_index: "Identifier" */ @@ -7740,25 +7781,25 @@ yyparse (void) { yyval = cb_build_index (yyvsp[0], cb_int1, 1, current_field); } -#line 7744 "parser.c" +#line 7785 "parser.c" break; case 453: /* justified_clause: JUSTIFIED _right */ #line 3095 "parser.y" { current_field->flag_justified = 1; } -#line 7750 "parser.c" +#line 7791 "parser.c" break; case 454: /* synchronized_clause: SYNCHRONIZED left_or_right */ #line 3102 "parser.y" { current_field->flag_synchronized = 1; } -#line 7756 "parser.c" +#line 7797 "parser.c" break; case 458: /* blank_clause: BLANK _when ZERO */ #line 3114 "parser.y" { current_field->flag_blank_zero = 1; } -#line 7762 "parser.c" +#line 7803 "parser.c" break; case 459: /* based_clause: BASED */ @@ -7782,43 +7823,43 @@ yyparse (void) current_field->flag_item_based = 1; } } -#line 7786 "parser.c" +#line 7827 "parser.c" break; case 460: /* value_clause: VALUE _is literal */ #line 3146 "parser.y" { current_field->values = cb_list_init (yyvsp[0]); } -#line 7792 "parser.c" +#line 7833 "parser.c" break; case 461: /* $@24: %empty */ #line 3150 "parser.y" { current_field->values = yyvsp[0]; } -#line 7798 "parser.c" +#line 7839 "parser.c" break; case 463: /* value_item_list: value_item */ #line 3155 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7804 "parser.c" +#line 7845 "parser.c" break; case 464: /* value_item_list: value_item_list value_item */ #line 3156 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7810 "parser.c" +#line 7851 "parser.c" break; case 465: /* value_item: literal */ #line 3160 "parser.y" { yyval = yyvsp[0]; } -#line 7816 "parser.c" +#line 7857 "parser.c" break; case 466: /* value_item: literal THRU literal */ #line 3161 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 7822 "parser.c" +#line 7863 "parser.c" break; case 468: /* false_is: "FALSE" _is literal */ @@ -7829,7 +7870,7 @@ yyparse (void) } current_field->false_88 = cb_list_init (yyvsp[0]); } -#line 7833 "parser.c" +#line 7874 "parser.c" break; case 469: /* renames_clause: RENAMES qualified_word */ @@ -7845,7 +7886,7 @@ yyparse (void) } } } -#line 7849 "parser.c" +#line 7890 "parser.c" break; case 470: /* renames_clause: RENAMES qualified_word THRU qualified_word */ @@ -7864,7 +7905,7 @@ yyparse (void) } } } -#line 7868 "parser.c" +#line 7909 "parser.c" break; case 471: /* any_length_clause: ANY LENGTH */ @@ -7876,7 +7917,7 @@ yyparse (void) current_field->flag_any_length = 1; } } -#line 7880 "parser.c" +#line 7921 "parser.c" break; case 473: /* $@25: %empty */ @@ -7887,7 +7928,7 @@ yyparse (void) cb_error (_("LOCAL-STORAGE not allowed in nested programs")); } } -#line 7891 "parser.c" +#line 7932 "parser.c" break; case 474: /* local_storage_section: "LOCAL-STORAGE" SECTION '.' $@25 record_description_list */ @@ -7897,13 +7938,13 @@ yyparse (void) current_program->local_storage = CB_FIELD (yyvsp[0]); } } -#line 7901 "parser.c" +#line 7942 "parser.c" break; case 476: /* $@26: %empty */ #line 3246 "parser.y" { current_storage = CB_STORAGE_LINKAGE; } -#line 7907 "parser.c" +#line 7948 "parser.c" break; case 477: /* linkage_section: LINKAGE SECTION '.' $@26 record_description_list */ @@ -7913,7 +7954,7 @@ yyparse (void) current_program->linkage_storage = CB_FIELD (yyvsp[0]); } } -#line 7917 "parser.c" +#line 7958 "parser.c" break; case 479: /* $@27: %empty */ @@ -7922,7 +7963,7 @@ yyparse (void) cb_error (_("REPORT SECTION not supported")); current_storage = CB_STORAGE_REPORT; } -#line 7926 "parser.c" +#line 7967 "parser.c" break; case 486: /* report_description_options: %empty */ @@ -7930,7 +7971,7 @@ yyparse (void) { cb_warning (_("Report description using defaults")); } -#line 7934 "parser.c" +#line 7975 "parser.c" break; case 488: /* report_description_option: _is GLOBAL */ @@ -7938,31 +7979,31 @@ yyparse (void) { cb_error (_("GLOBAL is not allowed with RD")); } -#line 7942 "parser.c" +#line 7983 "parser.c" break; case 497: /* identifier_list: identifier */ #line 3325 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7948 "parser.c" +#line 7989 "parser.c" break; case 498: /* identifier_list: identifier_list identifier */ #line 3326 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7954 "parser.c" +#line 7995 "parser.c" break; case 520: /* report_group_option: type_clause */ #line 3382 "parser.y" { cb_warning (_("looking for Report line TYPE")); } -#line 7960 "parser.c" +#line 8001 "parser.c" break; case 571: /* $@28: %empty */ #line 3487 "parser.y" { current_storage = CB_STORAGE_SCREEN; } -#line 7966 "parser.c" +#line 8007 "parser.c" break; case 572: /* screen_section: SCREEN SECTION '.' $@28 */ @@ -7970,7 +8011,7 @@ yyparse (void) { cb_error (_("SCREEN SECTION is not supported")); } -#line 7974 "parser.c" +#line 8015 "parser.c" break; case 574: /* $@29: %empty */ @@ -7984,7 +8025,7 @@ yyparse (void) cb_define_system_name ("SYSERR"); cb_set_in_procedure (); } -#line 7988 "parser.c" +#line 8029 "parser.c" break; case 575: /* $@30: %empty */ @@ -7998,7 +8039,7 @@ yyparse (void) emit_entry (current_program->source_name, 1, yyvsp[-4]); } } -#line 8002 "parser.c" +#line 8043 "parser.c" break; case 576: /* procedure_division: PROCEDURE DIVISION procedure_using_chaining procedure_returning '.' $@29 procedure_declaratives $@30 procedure_list */ @@ -8017,13 +8058,13 @@ yyparse (void) emit_statement (cb_build_perform_exit (current_section)); } } -#line 8021 "parser.c" +#line 8062 "parser.c" break; case 577: /* procedure_using_chaining: %empty */ #line 3536 "parser.y" { yyval = NULL; } -#line 8027 "parser.c" +#line 8068 "parser.c" break; case 578: /* $@31: %empty */ @@ -8032,13 +8073,13 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8036 "parser.c" +#line 8077 "parser.c" break; case 579: /* procedure_using_chaining: USING $@31 procedure_param_list */ #line 3542 "parser.y" { yyval = yyvsp[0]; } -#line 8042 "parser.c" +#line 8083 "parser.c" break; case 580: /* $@32: %empty */ @@ -8047,25 +8088,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; current_program->flag_chained = 1; } -#line 8051 "parser.c" +#line 8092 "parser.c" break; case 581: /* procedure_using_chaining: CHAINING $@32 procedure_param_list */ #line 3548 "parser.y" { yyval = yyvsp[0]; } -#line 8057 "parser.c" +#line 8098 "parser.c" break; case 582: /* procedure_param_list: procedure_param */ #line 3552 "parser.y" { yyval = yyvsp[0]; } -#line 8063 "parser.c" +#line 8104 "parser.c" break; case 583: /* procedure_param_list: procedure_param_list procedure_param */ #line 3554 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8069 "parser.c" +#line 8110 "parser.c" break; case 584: /* procedure_param: procedure_type size_optional procedure_optional "Identifier" */ @@ -8074,7 +8115,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), cb_build_identifier (yyvsp[0])); CB_SIZES (yyval) = size_mode; } -#line 8078 "parser.c" +#line 8119 "parser.c" break; case 586: /* procedure_type: _by REFERENCE */ @@ -8082,7 +8123,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8086 "parser.c" +#line 8127 "parser.c" break; case 587: /* procedure_type: _by VALUE */ @@ -8094,7 +8135,7 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8098 "parser.c" +#line 8139 "parser.c" break; case 589: /* size_optional: SIZE _is AUTO */ @@ -8106,7 +8147,7 @@ yyparse (void) size_mode = CB_SIZE_AUTO; } } -#line 8110 "parser.c" +#line 8151 "parser.c" break; case 590: /* size_optional: SIZE _is DEFAULT */ @@ -8118,7 +8159,7 @@ yyparse (void) size_mode = CB_SIZE_4; } } -#line 8122 "parser.c" +#line 8163 "parser.c" break; case 591: /* size_optional: UNSIGNED SIZE _is integer */ @@ -8151,7 +8192,7 @@ yyparse (void) } } } -#line 8155 "parser.c" +#line 8196 "parser.c" break; case 592: /* size_optional: SIZE _is integer */ @@ -8184,7 +8225,7 @@ yyparse (void) } } } -#line 8188 "parser.c" +#line 8229 "parser.c" break; case 594: /* procedure_optional: OPTIONAL */ @@ -8194,7 +8235,7 @@ yyparse (void) cb_error (_("OPTIONAL only allowed for BY REFERENCE items")); } } -#line 8198 "parser.c" +#line 8239 "parser.c" break; case 595: /* procedure_returning: %empty */ @@ -8204,7 +8245,7 @@ yyparse (void) cb_error (_("RETURNING clause is required for a FUNCTION")); } } -#line 8208 "parser.c" +#line 8249 "parser.c" break; case 596: /* procedure_returning: RETURNING "Identifier" */ @@ -8217,13 +8258,13 @@ yyparse (void) } } } -#line 8221 "parser.c" +#line 8262 "parser.c" break; case 598: /* $@33: %empty */ #line 3688 "parser.y" { in_declaratives = 1; } -#line 8227 "parser.c" +#line 8268 "parser.c" break; case 599: /* procedure_declaratives: DECLARATIVES '.' $@33 procedure_list END DECLARATIVES '.' */ @@ -8245,7 +8286,7 @@ yyparse (void) current_section = NULL; } } -#line 8249 "parser.c" +#line 8290 "parser.c" break; case 605: /* procedure: statements '.' */ @@ -8265,7 +8306,7 @@ yyparse (void) } /* check_unreached = 0; */ } -#line 8269 "parser.c" +#line 8310 "parser.c" break; case 606: /* procedure: error */ @@ -8273,7 +8314,7 @@ yyparse (void) { check_unreached = 0; } -#line 8277 "parser.c" +#line 8318 "parser.c" break; case 607: /* section_header: section_name SECTION opt_segment '.' */ @@ -8305,7 +8346,7 @@ yyparse (void) current_paragraph = NULL; emit_statement (CB_TREE (current_section)); } -#line 8309 "parser.c" +#line 8350 "parser.c" break; case 608: /* paragraph_header: "Identifier" '.' */ @@ -8343,7 +8384,7 @@ yyparse (void) } emit_statement (CB_TREE (current_paragraph)); } -#line 8347 "parser.c" +#line 8388 "parser.c" break; case 609: /* invalid_statement: section_name */ @@ -8356,19 +8397,19 @@ yyparse (void) } YYERROR; } -#line 8360 "parser.c" +#line 8401 "parser.c" break; case 610: /* section_name: "Identifier" */ #line 3831 "parser.y" { yyval = cb_build_section_name (yyvsp[0], 0); } -#line 8366 "parser.c" +#line 8407 "parser.c" break; case 612: /* opt_segment: "Literal" */ #line 3835 "parser.y" { /* ignore */ } -#line 8372 "parser.c" +#line 8413 "parser.c" break; case 613: /* @34: %empty */ @@ -8377,7 +8418,7 @@ yyparse (void) yyval = current_program->exec_list; current_program->exec_list = NULL; } -#line 8381 "parser.c" +#line 8422 "parser.c" break; case 614: /* @35: %empty */ @@ -8386,7 +8427,7 @@ yyparse (void) yyval = CB_TREE (current_statement); current_statement = NULL; } -#line 8390 "parser.c" +#line 8431 "parser.c" break; case 615: /* statement_list: @34 @35 statements */ @@ -8396,7 +8437,7 @@ yyparse (void) current_program->exec_list = yyvsp[-2]; current_statement = CB_STATEMENT (yyvsp[-1]); } -#line 8400 "parser.c" +#line 8441 "parser.c" break; case 616: /* statements: %empty */ @@ -8421,7 +8462,7 @@ yyparse (void) cb_cons (CB_TREE (current_paragraph), current_section->children); } } -#line 8425 "parser.c" +#line 8466 "parser.c" break; case 667: /* statement: "NEXT SENTENCE" */ @@ -8439,7 +8480,7 @@ yyparse (void) } check_unreached = 0; } -#line 8443 "parser.c" +#line 8484 "parser.c" break; case 668: /* $@36: %empty */ @@ -8451,7 +8492,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 8455 "parser.c" +#line 8496 "parser.c" break; case 670: /* accept_body: identifier opt_at_line_column opt_accp_attr on_accp_exception */ @@ -8459,7 +8500,7 @@ yyparse (void) { cb_emit_accept (yyvsp[-3], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 8463 "parser.c" +#line 8504 "parser.c" break; case 671: /* accept_body: identifier FROM ESCAPE KEY */ @@ -8467,7 +8508,7 @@ yyparse (void) { PENDING ("ACCEPT .. FROM ESCAPE KEY"); } -#line 8471 "parser.c" +#line 8512 "parser.c" break; case 672: /* accept_body: identifier FROM LINES */ @@ -8475,7 +8516,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 0); } -#line 8479 "parser.c" +#line 8520 "parser.c" break; case 673: /* accept_body: identifier FROM COLUMNS */ @@ -8483,7 +8524,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 1); } -#line 8487 "parser.c" +#line 8528 "parser.c" break; case 674: /* accept_body: identifier FROM DATE */ @@ -8491,7 +8532,7 @@ yyparse (void) { cb_emit_accept_date (yyvsp[-2]); } -#line 8495 "parser.c" +#line 8536 "parser.c" break; case 675: /* accept_body: identifier FROM DATE YYYYMMDD */ @@ -8499,7 +8540,7 @@ yyparse (void) { cb_emit_accept_date_yyyymmdd (yyvsp[-3]); } -#line 8503 "parser.c" +#line 8544 "parser.c" break; case 676: /* accept_body: identifier FROM DAY */ @@ -8507,7 +8548,7 @@ yyparse (void) { cb_emit_accept_day (yyvsp[-2]); } -#line 8511 "parser.c" +#line 8552 "parser.c" break; case 677: /* accept_body: identifier FROM DAY YYYYDDD */ @@ -8515,7 +8556,7 @@ yyparse (void) { cb_emit_accept_day_yyyyddd (yyvsp[-3]); } -#line 8519 "parser.c" +#line 8560 "parser.c" break; case 678: /* accept_body: identifier FROM "DAY-OF-WEEK" */ @@ -8523,7 +8564,7 @@ yyparse (void) { cb_emit_accept_day_of_week (yyvsp[-2]); } -#line 8527 "parser.c" +#line 8568 "parser.c" break; case 679: /* accept_body: identifier FROM TIME */ @@ -8531,7 +8572,7 @@ yyparse (void) { cb_emit_accept_time (yyvsp[-2]); } -#line 8535 "parser.c" +#line 8576 "parser.c" break; case 680: /* accept_body: identifier FROM "COMMAND-LINE" */ @@ -8539,7 +8580,7 @@ yyparse (void) { cb_emit_accept_command_line (yyvsp[-2]); } -#line 8543 "parser.c" +#line 8584 "parser.c" break; case 681: /* accept_body: identifier FROM "ENVIRONMENT-VALUE" on_accp_exception */ @@ -8547,7 +8588,7 @@ yyparse (void) { cb_emit_accept_environment (yyvsp[-3]); } -#line 8551 "parser.c" +#line 8592 "parser.c" break; case 682: /* accept_body: identifier FROM ENVIRONMENT simple_value on_accp_exception */ @@ -8555,7 +8596,7 @@ yyparse (void) { cb_emit_get_environment (yyvsp[-1], yyvsp[-4]); } -#line 8559 "parser.c" +#line 8600 "parser.c" break; case 683: /* accept_body: identifier FROM "ARGUMENT-NUMBER" */ @@ -8563,7 +8604,7 @@ yyparse (void) { cb_emit_accept_arg_number (yyvsp[-2]); } -#line 8567 "parser.c" +#line 8608 "parser.c" break; case 684: /* accept_body: identifier FROM "ARGUMENT-VALUE" on_accp_exception */ @@ -8571,7 +8612,7 @@ yyparse (void) { cb_emit_accept_arg_value (yyvsp[-3]); } -#line 8575 "parser.c" +#line 8616 "parser.c" break; case 685: /* accept_body: identifier FROM mnemonic_name */ @@ -8579,7 +8620,7 @@ yyparse (void) { cb_emit_accept_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 8583 "parser.c" +#line 8624 "parser.c" break; case 686: /* accept_body: identifier FROM "Identifier" */ @@ -8587,103 +8628,103 @@ yyparse (void) { cb_emit_accept_name (yyvsp[-2], yyvsp[0]); } -#line 8591 "parser.c" +#line 8632 "parser.c" break; case 687: /* opt_at_line_column: %empty */ #line 4041 "parser.y" { yyval = NULL; } -#line 8597 "parser.c" +#line 8638 "parser.c" break; case 688: /* opt_at_line_column: _at line_number column_number */ #line 4042 "parser.y" { yyval = cb_build_pair (yyvsp[-1], yyvsp[0]); } -#line 8603 "parser.c" +#line 8644 "parser.c" break; case 689: /* opt_at_line_column: _at column_number line_number */ #line 4043 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 8609 "parser.c" +#line 8650 "parser.c" break; case 690: /* opt_at_line_column: _at line_number */ #line 4044 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 8615 "parser.c" +#line 8656 "parser.c" break; case 691: /* opt_at_line_column: _at column_number */ #line 4045 "parser.y" { yyval = cb_build_pair (NULL, yyvsp[0]); } -#line 8621 "parser.c" +#line 8662 "parser.c" break; case 692: /* opt_at_line_column: AT simple_value */ #line 4046 "parser.y" { yyval = yyvsp[0]; } -#line 8627 "parser.c" +#line 8668 "parser.c" break; case 693: /* line_number: LINE _number id_or_lit */ #line 4050 "parser.y" { yyval = yyvsp[0]; } -#line 8633 "parser.c" +#line 8674 "parser.c" break; case 694: /* column_number: COLUMN _number id_or_lit */ #line 4054 "parser.y" { yyval = yyvsp[0]; } -#line 8639 "parser.c" +#line 8680 "parser.c" break; case 695: /* column_number: POSITION _number id_or_lit */ #line 4055 "parser.y" { yyval = yyvsp[0]; } -#line 8645 "parser.c" +#line 8686 "parser.c" break; case 700: /* accp_attr: BELL */ #line 4068 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 8651 "parser.c" +#line 8692 "parser.c" break; case 701: /* accp_attr: BLINK */ #line 4069 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 8657 "parser.c" +#line 8698 "parser.c" break; case 702: /* accp_attr: HIGHLIGHT */ #line 4070 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 8663 "parser.c" +#line 8704 "parser.c" break; case 703: /* accp_attr: LOWLIGHT */ #line 4071 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 8669 "parser.c" +#line 8710 "parser.c" break; case 704: /* accp_attr: "REVERSE-VIDEO" */ #line 4072 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 8675 "parser.c" +#line 8716 "parser.c" break; case 705: /* accp_attr: UNDERLINE */ #line 4073 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 8681 "parser.c" +#line 8722 "parser.c" break; case 706: /* accp_attr: OVERLINE */ #line 4074 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 8687 "parser.c" +#line 8728 "parser.c" break; case 707: /* accp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -8691,7 +8732,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 8695 "parser.c" +#line 8736 "parser.c" break; case 708: /* accp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -8699,7 +8740,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 8703 "parser.c" +#line 8744 "parser.c" break; case 709: /* accp_attr: SCROLL UP _opt_scroll_lines */ @@ -8707,7 +8748,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 8711 "parser.c" +#line 8752 "parser.c" break; case 710: /* accp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -8716,61 +8757,61 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 8720 "parser.c" +#line 8761 "parser.c" break; case 711: /* accp_attr: AUTO */ #line 4092 "parser.y" { dispattrs |= COB_SCREEN_AUTO; } -#line 8726 "parser.c" +#line 8767 "parser.c" break; case 712: /* accp_attr: FULL */ #line 4093 "parser.y" { dispattrs |= COB_SCREEN_FULL; } -#line 8732 "parser.c" +#line 8773 "parser.c" break; case 713: /* accp_attr: REQUIRED */ #line 4094 "parser.y" { dispattrs |= COB_SCREEN_REQUIRED; } -#line 8738 "parser.c" +#line 8779 "parser.c" break; case 714: /* accp_attr: SECURE */ #line 4095 "parser.y" { dispattrs |= COB_SCREEN_SECURE; } -#line 8744 "parser.c" +#line 8785 "parser.c" break; case 715: /* accp_attr: UPDATE */ #line 4096 "parser.y" { dispattrs |= COB_SCREEN_UPDATE; } -#line 8750 "parser.c" +#line 8791 "parser.c" break; case 716: /* accp_attr: PROMPT */ #line 4097 "parser.y" { dispattrs |= COB_SCREEN_PROMPT; } -#line 8756 "parser.c" +#line 8797 "parser.c" break; case 717: /* end_accept: %empty */ #line 4101 "parser.y" { terminator_warning (TERM_ACCEPT); } -#line 8762 "parser.c" +#line 8803 "parser.c" break; case 718: /* end_accept: "END-ACCEPT" */ #line 4102 "parser.y" { terminator_clear (TERM_ACCEPT); } -#line 8768 "parser.c" +#line 8809 "parser.c" break; case 719: /* $@37: %empty */ #line 4111 "parser.y" { BEGIN_STATEMENT ("ADD", TERM_ADD); } -#line 8774 "parser.c" +#line 8815 "parser.c" break; case 721: /* add_body: x_list TO arithmetic_x_list on_size_error */ @@ -8778,7 +8819,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '+', cb_build_binary_list (yyvsp[-3], '+')); } -#line 8782 "parser.c" +#line 8823 "parser.c" break; case 722: /* add_body: x_list add_to GIVING arithmetic_x_list on_size_error */ @@ -8786,7 +8827,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (yyvsp[-4], '+')); } -#line 8790 "parser.c" +#line 8831 "parser.c" break; case 723: /* add_body: CORRESPONDING identifier TO identifier flag_rounded on_size_error */ @@ -8794,31 +8835,31 @@ yyparse (void) { cb_emit_corresponding (cb_build_add, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 8798 "parser.c" +#line 8839 "parser.c" break; case 725: /* add_to: TO x */ #line 4132 "parser.y" { cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 8804 "parser.c" +#line 8845 "parser.c" break; case 726: /* end_add: %empty */ #line 4136 "parser.y" { terminator_warning (TERM_ADD); } -#line 8810 "parser.c" +#line 8851 "parser.c" break; case 727: /* end_add: "END-ADD" */ #line 4137 "parser.y" { terminator_clear (TERM_ADD); } -#line 8816 "parser.c" +#line 8857 "parser.c" break; case 728: /* $@38: %empty */ #line 4146 "parser.y" { BEGIN_STATEMENT ("ALLOCATE", 0); } -#line 8822 "parser.c" +#line 8863 "parser.c" break; case 730: /* allocate_body: "Identifier" flag_initialized allocate_returning */ @@ -8826,7 +8867,7 @@ yyparse (void) { cb_emit_allocate (yyvsp[-2], yyvsp[0], NULL, yyvsp[-1]); } -#line 8830 "parser.c" +#line 8871 "parser.c" break; case 731: /* allocate_body: expr CHARACTERS flag_initialized RETURNING target_x */ @@ -8834,19 +8875,19 @@ yyparse (void) { cb_emit_allocate (NULL, yyvsp[0], yyvsp[-4], yyvsp[-2]); } -#line 8838 "parser.c" +#line 8879 "parser.c" break; case 732: /* allocate_returning: %empty */ #line 4162 "parser.y" { yyval = NULL; } -#line 8844 "parser.c" +#line 8885 "parser.c" break; case 733: /* allocate_returning: RETURNING target_x */ #line 4163 "parser.y" { yyval = yyvsp[0]; } -#line 8850 "parser.c" +#line 8891 "parser.c" break; case 734: /* alter_statement: ALTER alter_options */ @@ -8854,13 +8895,13 @@ yyparse (void) { cb_error (_("ALTER statement is obsolete and unsupported")); } -#line 8858 "parser.c" +#line 8899 "parser.c" break; case 739: /* $@39: %empty */ #line 4191 "parser.y" { BEGIN_STATEMENT ("CALL", TERM_CALL); } -#line 8864 "parser.c" +#line 8905 "parser.c" break; case 740: /* call_statement: CALL $@39 id_or_lit_or_func call_using call_returning call_on_exception call_not_on_exception end_call */ @@ -8868,13 +8909,13 @@ yyparse (void) { cb_emit_call (yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1]); } -#line 8872 "parser.c" +#line 8913 "parser.c" break; case 741: /* call_using: %empty */ #line 4201 "parser.y" { yyval = NULL; } -#line 8878 "parser.c" +#line 8919 "parser.c" break; case 742: /* $@40: %empty */ @@ -8883,25 +8924,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8887 "parser.c" +#line 8928 "parser.c" break; case 743: /* call_using: USING $@40 call_param_list */ #line 4207 "parser.y" { yyval = yyvsp[0]; } -#line 8893 "parser.c" +#line 8934 "parser.c" break; case 744: /* call_param_list: call_param */ #line 4211 "parser.y" { yyval = yyvsp[0]; } -#line 8899 "parser.c" +#line 8940 "parser.c" break; case 745: /* call_param_list: call_param_list call_param */ #line 4213 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8905 "parser.c" +#line 8946 "parser.c" break; case 746: /* call_param: call_type OMITTED */ @@ -8912,7 +8953,7 @@ yyparse (void) } yyval = cb_build_pair (cb_int (call_mode), cb_null); } -#line 8916 "parser.c" +#line 8957 "parser.c" break; case 747: /* call_param: call_type size_optional x */ @@ -8921,7 +8962,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), yyvsp[0]); CB_SIZES (yyval) = size_mode; } -#line 8925 "parser.c" +#line 8966 "parser.c" break; case 749: /* call_type: _by REFERENCE */ @@ -8929,7 +8970,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8933 "parser.c" +#line 8974 "parser.c" break; case 750: /* call_type: _by CONTENT */ @@ -8941,7 +8982,7 @@ yyparse (void) call_mode = CB_CALL_BY_CONTENT; } } -#line 8945 "parser.c" +#line 8986 "parser.c" break; case 751: /* call_type: _by VALUE */ @@ -8953,25 +8994,25 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8957 "parser.c" +#line 8998 "parser.c" break; case 752: /* call_returning: %empty */ #line 4256 "parser.y" { yyval = NULL; } -#line 8963 "parser.c" +#line 9004 "parser.c" break; case 753: /* call_returning: RETURNING identifier */ #line 4257 "parser.y" { yyval = yyvsp[0]; } -#line 8969 "parser.c" +#line 9010 "parser.c" break; case 754: /* call_returning: GIVING identifier */ #line 4258 "parser.y" { yyval = yyvsp[0]; } -#line 8975 "parser.c" +#line 9016 "parser.c" break; case 755: /* call_on_exception: %empty */ @@ -8979,7 +9020,7 @@ yyparse (void) { yyval = NULL; } -#line 8983 "parser.c" +#line 9024 "parser.c" break; case 756: /* $@41: %empty */ @@ -8987,7 +9028,7 @@ yyparse (void) { check_unreached = 0; } -#line 8991 "parser.c" +#line 9032 "parser.c" break; case 757: /* call_on_exception: exception_or_overflow $@41 statement_list */ @@ -8995,7 +9036,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 8999 "parser.c" +#line 9040 "parser.c" break; case 758: /* call_not_on_exception: %empty */ @@ -9003,7 +9044,7 @@ yyparse (void) { yyval = NULL; } -#line 9007 "parser.c" +#line 9048 "parser.c" break; case 759: /* $@42: %empty */ @@ -9011,7 +9052,7 @@ yyparse (void) { check_unreached = 0; } -#line 9015 "parser.c" +#line 9056 "parser.c" break; case 760: /* call_not_on_exception: not_exception_or_overflow $@42 statement_list */ @@ -9019,25 +9060,25 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 9023 "parser.c" +#line 9064 "parser.c" break; case 761: /* end_call: %empty */ #line 4292 "parser.y" { terminator_warning (TERM_CALL); } -#line 9029 "parser.c" +#line 9070 "parser.c" break; case 762: /* end_call: "END-CALL" */ #line 4293 "parser.y" { terminator_clear (TERM_CALL); } -#line 9035 "parser.c" +#line 9076 "parser.c" break; case 763: /* $@43: %empty */ #line 4302 "parser.y" { BEGIN_STATEMENT ("CANCEL", 0); } -#line 9041 "parser.c" +#line 9082 "parser.c" break; case 766: /* cancel_list: cancel_list id_or_lit */ @@ -9045,7 +9086,7 @@ yyparse (void) { cb_emit_cancel (yyvsp[0]); } -#line 9049 "parser.c" +#line 9090 "parser.c" break; case 767: /* cancel_list: ALL */ @@ -9053,13 +9094,13 @@ yyparse (void) { cb_emit_cancel_all (); } -#line 9057 "parser.c" +#line 9098 "parser.c" break; case 768: /* $@44: %empty */ #line 4323 "parser.y" { BEGIN_STATEMENT ("CLOSE", 0); } -#line 9063 "parser.c" +#line 9104 "parser.c" break; case 771: /* close_list: close_list file_name close_option */ @@ -9070,43 +9111,43 @@ yyparse (void) cb_emit_close (yyvsp[-1], yyvsp[0]); } } -#line 9074 "parser.c" +#line 9115 "parser.c" break; case 772: /* close_option: %empty */ #line 4339 "parser.y" { yyval = cb_int (COB_CLOSE_NORMAL); } -#line 9080 "parser.c" +#line 9121 "parser.c" break; case 773: /* close_option: reel_or_unit */ #line 4340 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT); } -#line 9086 "parser.c" +#line 9127 "parser.c" break; case 774: /* close_option: reel_or_unit _for REMOVAL */ #line 4341 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT_REMOVAL); } -#line 9092 "parser.c" +#line 9133 "parser.c" break; case 775: /* close_option: _with NO REWIND */ #line 4342 "parser.y" { yyval = cb_int (COB_CLOSE_NO_REWIND); } -#line 9098 "parser.c" +#line 9139 "parser.c" break; case 776: /* close_option: _with LOCK */ #line 4343 "parser.y" { yyval = cb_int (COB_CLOSE_LOCK); } -#line 9104 "parser.c" +#line 9145 "parser.c" break; case 779: /* $@45: %empty */ #line 4354 "parser.y" { BEGIN_STATEMENT ("COMPUTE", TERM_COMPUTE); } -#line 9110 "parser.c" +#line 9151 "parser.c" break; case 781: /* compute_body: arithmetic_x_list comp_equal expr on_size_error */ @@ -9114,19 +9155,19 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-3], 0, yyvsp[-1]); } -#line 9118 "parser.c" +#line 9159 "parser.c" break; case 782: /* end_compute: %empty */ #line 4367 "parser.y" { terminator_warning (TERM_COMPUTE); } -#line 9124 "parser.c" +#line 9165 "parser.c" break; case 783: /* end_compute: "END-COMPUTE" */ #line 4368 "parser.y" { terminator_clear (TERM_COMPUTE); } -#line 9130 "parser.c" +#line 9171 "parser.c" break; case 786: /* commit_statement: COMMIT */ @@ -9135,7 +9176,7 @@ yyparse (void) BEGIN_STATEMENT ("COMMIT", 0); cb_emit_commit (); } -#line 9139 "parser.c" +#line 9180 "parser.c" break; case 787: /* continue_statement: CONTINUE */ @@ -9144,13 +9185,13 @@ yyparse (void) BEGIN_STATEMENT ("CONTINUE", 0); cb_emit_continue (); } -#line 9148 "parser.c" +#line 9189 "parser.c" break; case 788: /* $@46: %empty */ #line 4404 "parser.y" { BEGIN_STATEMENT ("DELETE", TERM_DELETE); } -#line 9154 "parser.c" +#line 9195 "parser.c" break; case 789: /* delete_statement: DELETE $@46 file_name _record opt_invalid_key end_delete */ @@ -9160,25 +9201,25 @@ yyparse (void) cb_emit_delete (yyvsp[-3]); } } -#line 9164 "parser.c" +#line 9205 "parser.c" break; case 790: /* end_delete: %empty */ #line 4415 "parser.y" { terminator_warning (TERM_DELETE); } -#line 9170 "parser.c" +#line 9211 "parser.c" break; case 791: /* end_delete: "END-DELETE" */ #line 4416 "parser.y" { terminator_clear (TERM_DELETE); } -#line 9176 "parser.c" +#line 9217 "parser.c" break; case 792: /* $@47: %empty */ #line 4425 "parser.y" { BEGIN_STATEMENT ("DELETE-FILE", 0); } -#line 9182 "parser.c" +#line 9223 "parser.c" break; case 793: /* delete_file_statement: DELETE $@47 "FILE" file_name_list */ @@ -9192,7 +9233,7 @@ yyparse (void) } } } -#line 9196 "parser.c" +#line 9237 "parser.c" break; case 794: /* $@48: %empty */ @@ -9204,7 +9245,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 9208 "parser.c" +#line 9249 "parser.c" break; case 796: /* display_body: id_or_lit "UPON ENVIRONMENT-NAME" on_disp_exception */ @@ -9212,7 +9253,7 @@ yyparse (void) { cb_emit_env_name (yyvsp[-2]); } -#line 9216 "parser.c" +#line 9257 "parser.c" break; case 797: /* display_body: id_or_lit "UPON ENVIRONMENT-VALUE" on_disp_exception */ @@ -9220,7 +9261,7 @@ yyparse (void) { cb_emit_env_value (yyvsp[-2]); } -#line 9224 "parser.c" +#line 9265 "parser.c" break; case 798: /* display_body: id_or_lit "UPON ARGUMENT-NUMBER" on_disp_exception */ @@ -9228,7 +9269,7 @@ yyparse (void) { cb_emit_arg_number (yyvsp[-2]); } -#line 9232 "parser.c" +#line 9273 "parser.c" break; case 799: /* display_body: id_or_lit "UPON COMMAND-LINE" on_disp_exception */ @@ -9236,7 +9277,7 @@ yyparse (void) { cb_emit_command_line (yyvsp[-2]); } -#line 9240 "parser.c" +#line 9281 "parser.c" break; case 800: /* display_body: x_list opt_at_line_column with_clause on_disp_exception */ @@ -9244,7 +9285,7 @@ yyparse (void) { cb_emit_display (yyvsp[-3], cb_int0, yyvsp[-1], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 9248 "parser.c" +#line 9289 "parser.c" break; case 801: /* display_body: x_list opt_at_line_column UPON mnemonic_name with_clause on_disp_exception */ @@ -9252,7 +9293,7 @@ yyparse (void) { cb_emit_display_mnemonic (yyvsp[-5], yyvsp[-2], yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9256 "parser.c" +#line 9297 "parser.c" break; case 802: /* display_body: x_list opt_at_line_column UPON "Identifier" with_clause on_disp_exception */ @@ -9261,7 +9302,7 @@ yyparse (void) cb_tree word = cb_build_display_upon_direct (yyvsp[-2]); cb_emit_display (yyvsp[-5], word, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9265 "parser.c" +#line 9306 "parser.c" break; case 803: /* display_body: x_list opt_at_line_column UPON PRINTER with_clause on_disp_exception */ @@ -9269,7 +9310,7 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9273 "parser.c" +#line 9314 "parser.c" break; case 804: /* display_body: x_list opt_at_line_column UPON CRT with_clause on_disp_exception */ @@ -9277,79 +9318,79 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9281 "parser.c" +#line 9322 "parser.c" break; case 805: /* with_clause: %empty */ #line 4497 "parser.y" { yyval = cb_int1; } -#line 9287 "parser.c" +#line 9328 "parser.c" break; case 806: /* with_clause: _with "NO ADVANCING" */ #line 4498 "parser.y" { yyval = cb_int0; } -#line 9293 "parser.c" +#line 9334 "parser.c" break; case 807: /* with_clause: WITH disp_attrs */ #line 4499 "parser.y" { yyval = cb_int1; } -#line 9299 "parser.c" +#line 9340 "parser.c" break; case 810: /* disp_attr: BELL */ #line 4509 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 9305 "parser.c" +#line 9346 "parser.c" break; case 811: /* disp_attr: BLINK */ #line 4510 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 9311 "parser.c" +#line 9352 "parser.c" break; case 812: /* disp_attr: ERASE EOL */ #line 4511 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOL; } -#line 9317 "parser.c" +#line 9358 "parser.c" break; case 813: /* disp_attr: ERASE EOS */ #line 4512 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOS; } -#line 9323 "parser.c" +#line 9364 "parser.c" break; case 814: /* disp_attr: HIGHLIGHT */ #line 4513 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 9329 "parser.c" +#line 9370 "parser.c" break; case 815: /* disp_attr: LOWLIGHT */ #line 4514 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 9335 "parser.c" +#line 9376 "parser.c" break; case 816: /* disp_attr: "REVERSE-VIDEO" */ #line 4515 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 9341 "parser.c" +#line 9382 "parser.c" break; case 817: /* disp_attr: UNDERLINE */ #line 4516 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 9347 "parser.c" +#line 9388 "parser.c" break; case 818: /* disp_attr: OVERLINE */ #line 4517 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 9353 "parser.c" +#line 9394 "parser.c" break; case 819: /* disp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -9357,7 +9398,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 9361 "parser.c" +#line 9402 "parser.c" break; case 820: /* disp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -9365,7 +9406,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 9369 "parser.c" +#line 9410 "parser.c" break; case 821: /* disp_attr: SCROLL UP _opt_scroll_lines */ @@ -9373,7 +9414,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 9377 "parser.c" +#line 9418 "parser.c" break; case 822: /* disp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -9382,37 +9423,37 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 9386 "parser.c" +#line 9427 "parser.c" break; case 823: /* disp_attr: "BLANK-LINE" */ #line 4535 "parser.y" { dispattrs |= COB_SCREEN_BLANK_LINE; } -#line 9392 "parser.c" +#line 9433 "parser.c" break; case 824: /* disp_attr: "BLANK-SCREEN" */ #line 4536 "parser.y" { dispattrs |= COB_SCREEN_BLANK_SCREEN; } -#line 9398 "parser.c" +#line 9439 "parser.c" break; case 825: /* end_display: %empty */ #line 4540 "parser.y" { terminator_warning (TERM_DISPLAY); } -#line 9404 "parser.c" +#line 9445 "parser.c" break; case 826: /* end_display: "END-DISPLAY" */ #line 4541 "parser.y" { terminator_clear (TERM_DISPLAY); } -#line 9410 "parser.c" +#line 9451 "parser.c" break; case 827: /* $@49: %empty */ #line 4550 "parser.y" { BEGIN_STATEMENT ("DIVIDE", TERM_DIVIDE); } -#line 9416 "parser.c" +#line 9457 "parser.c" break; case 829: /* divide_body: x INTO arithmetic_x_list on_size_error */ @@ -9420,7 +9461,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '/', yyvsp[-3]); } -#line 9424 "parser.c" +#line 9465 "parser.c" break; case 830: /* divide_body: x INTO x GIVING arithmetic_x_list on_size_error */ @@ -9428,7 +9469,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-3], '/', yyvsp[-5])); } -#line 9432 "parser.c" +#line 9473 "parser.c" break; case 831: /* divide_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -9436,7 +9477,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '/', yyvsp[-3])); } -#line 9440 "parser.c" +#line 9481 "parser.c" break; case 832: /* divide_body: x INTO x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9444,7 +9485,7 @@ yyparse (void) { cb_emit_divide (yyvsp[-5], yyvsp[-7], yyvsp[-3], yyvsp[-1]); } -#line 9448 "parser.c" +#line 9489 "parser.c" break; case 833: /* divide_body: x BY x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9452,25 +9493,25 @@ yyparse (void) { cb_emit_divide (yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); } -#line 9456 "parser.c" +#line 9497 "parser.c" break; case 834: /* end_divide: %empty */ #line 4579 "parser.y" { terminator_warning (TERM_DIVIDE); } -#line 9462 "parser.c" +#line 9503 "parser.c" break; case 835: /* end_divide: "END-DIVIDE" */ #line 4580 "parser.y" { terminator_clear (TERM_DIVIDE); } -#line 9468 "parser.c" +#line 9509 "parser.c" break; case 836: /* $@50: %empty */ #line 4589 "parser.y" { BEGIN_STATEMENT ("ENTRY", 0); } -#line 9474 "parser.c" +#line 9515 "parser.c" break; case 837: /* entry_statement: ENTRY $@50 "Literal" call_using */ @@ -9486,7 +9527,7 @@ yyparse (void) } check_unreached = 0; } -#line 9490 "parser.c" +#line 9531 "parser.c" break; case 838: /* $@51: %empty */ @@ -9500,7 +9541,7 @@ yyparse (void) eval_inc = 0; eval_inc2 = 0; } -#line 9504 "parser.c" +#line 9545 "parser.c" break; case 839: /* evaluate_statement: EVALUATE $@51 evaluate_subject_list evaluate_condition_list end_evaluate */ @@ -9509,13 +9550,13 @@ yyparse (void) cb_emit_evaluate (yyvsp[-2], yyvsp[-1]); eval_level--; } -#line 9513 "parser.c" +#line 9554 "parser.c" break; case 840: /* evaluate_subject_list: evaluate_subject */ #line 4629 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9519 "parser.c" +#line 9560 "parser.c" break; case 841: /* evaluate_subject_list: evaluate_subject_list _also evaluate_subject */ @@ -9526,7 +9567,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9530 "parser.c" +#line 9571 "parser.c" break; case 842: /* evaluate_subject: expr */ @@ -9539,7 +9580,7 @@ yyparse (void) eval_check[eval_level][eval_inc++] = 1; } } -#line 9543 "parser.c" +#line 9584 "parser.c" break; case 843: /* evaluate_subject: "TRUE" */ @@ -9548,7 +9589,7 @@ yyparse (void) yyval = cb_true; eval_check[eval_level][eval_inc++] = 2; } -#line 9552 "parser.c" +#line 9593 "parser.c" break; case 844: /* evaluate_subject: "FALSE" */ @@ -9557,7 +9598,7 @@ yyparse (void) yyval = cb_false; eval_check[eval_level][eval_inc++] = 3; } -#line 9561 "parser.c" +#line 9602 "parser.c" break; case 845: /* evaluate_condition_list: evaluate_case_list evaluate_other */ @@ -9587,19 +9628,19 @@ yyparse (void) yyval = cb_list_add (yyval, yyvsp[0]); } } -#line 9591 "parser.c" +#line 9632 "parser.c" break; case 846: /* evaluate_case_list: evaluate_case */ #line 4692 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9597 "parser.c" +#line 9638 "parser.c" break; case 847: /* evaluate_case_list: evaluate_case_list evaluate_case */ #line 4694 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 9603 "parser.c" +#line 9644 "parser.c" break; case 848: /* $@52: %empty */ @@ -9607,7 +9648,7 @@ yyparse (void) { check_unreached = 0; } -#line 9611 "parser.c" +#line 9652 "parser.c" break; case 849: /* evaluate_case: evaluate_when_list $@52 statement_list */ @@ -9619,7 +9660,7 @@ yyparse (void) yyval = cb_cons (yyvsp[0], yyvsp[-2]); eval_inc2 = 0; } -#line 9623 "parser.c" +#line 9664 "parser.c" break; case 850: /* evaluate_other: %empty */ @@ -9627,7 +9668,7 @@ yyparse (void) { yyval = NULL; } -#line 9631 "parser.c" +#line 9672 "parser.c" break; case 851: /* $@53: %empty */ @@ -9635,7 +9676,7 @@ yyparse (void) { check_unreached = 0; } -#line 9639 "parser.c" +#line 9680 "parser.c" break; case 852: /* evaluate_other: "WHEN OTHER" $@53 statement_list */ @@ -9647,25 +9688,25 @@ yyparse (void) yyval = cb_cons (yyvsp[0], NULL); eval_inc2 = 0; } -#line 9651 "parser.c" +#line 9692 "parser.c" break; case 853: /* evaluate_when_list: WHEN evaluate_object_list */ #line 4732 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9657 "parser.c" +#line 9698 "parser.c" break; case 854: /* evaluate_when_list: evaluate_when_list WHEN evaluate_object_list */ #line 4734 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9663 "parser.c" +#line 9704 "parser.c" break; case 855: /* evaluate_object_list: evaluate_object */ #line 4738 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9669 "parser.c" +#line 9710 "parser.c" break; case 856: /* evaluate_object_list: evaluate_object_list _also evaluate_object */ @@ -9676,7 +9717,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9680 "parser.c" +#line 9721 "parser.c" break; case 857: /* evaluate_object: partial_expr opt_evaluate_thru_expr */ @@ -9709,61 +9750,61 @@ yyparse (void) eval_inc2++; } } -#line 9713 "parser.c" +#line 9754 "parser.c" break; case 858: /* evaluate_object: ANY */ #line 4779 "parser.y" { yyval = cb_any; eval_inc2++; } -#line 9719 "parser.c" +#line 9760 "parser.c" break; case 859: /* evaluate_object: "TRUE" */ #line 4780 "parser.y" { yyval = cb_true; eval_inc2++; } -#line 9725 "parser.c" +#line 9766 "parser.c" break; case 860: /* evaluate_object: "FALSE" */ #line 4781 "parser.y" { yyval = cb_false; eval_inc2++; } -#line 9731 "parser.c" +#line 9772 "parser.c" break; case 861: /* opt_evaluate_thru_expr: %empty */ #line 4784 "parser.y" { yyval = NULL; } -#line 9737 "parser.c" +#line 9778 "parser.c" break; case 862: /* opt_evaluate_thru_expr: THRU expr */ #line 4785 "parser.y" { yyval = yyvsp[0]; } -#line 9743 "parser.c" +#line 9784 "parser.c" break; case 863: /* end_evaluate: %empty */ #line 4789 "parser.y" { terminator_warning (TERM_EVALUATE); } -#line 9749 "parser.c" +#line 9790 "parser.c" break; case 864: /* end_evaluate: "END-EVALUATE" */ #line 4790 "parser.y" { terminator_clear (TERM_EVALUATE); } -#line 9755 "parser.c" +#line 9796 "parser.c" break; case 865: /* $@54: %empty */ #line 4799 "parser.y" { BEGIN_STATEMENT ("EXIT", 0); } -#line 9761 "parser.c" +#line 9802 "parser.c" break; case 867: /* exit_body: %empty */ #line 4804 "parser.y" { /* nothing */ } -#line 9767 "parser.c" +#line 9808 "parser.c" break; case 868: /* exit_body: PROGRAM */ @@ -9775,7 +9816,7 @@ yyparse (void) check_unreached = 1; cb_emit_exit (0); } -#line 9779 "parser.c" +#line 9820 "parser.c" break; case 869: /* exit_body: PERFORM */ @@ -9787,7 +9828,7 @@ yyparse (void) cb_emit_java_break (); } } -#line 9791 "parser.c" +#line 9832 "parser.c" break; case 870: /* exit_body: PERFORM CYCLE */ @@ -9799,7 +9840,7 @@ yyparse (void) cb_emit_java_continue (); } } -#line 9803 "parser.c" +#line 9844 "parser.c" break; case 871: /* exit_body: SECTION */ @@ -9821,7 +9862,7 @@ yyparse (void) cb_emit_goto (cb_list_init (current_section->exit_label_ref), NULL); } } -#line 9825 "parser.c" +#line 9866 "parser.c" break; case 872: /* exit_body: PARAGRAPH */ @@ -9843,13 +9884,13 @@ yyparse (void) cb_emit_goto (cb_list_init (current_paragraph->exit_label_ref), NULL); } } -#line 9847 "parser.c" +#line 9888 "parser.c" break; case 873: /* $@55: %empty */ #line 4872 "parser.y" { BEGIN_STATEMENT ("FREE", 0); } -#line 9853 "parser.c" +#line 9894 "parser.c" break; case 874: /* free_statement: FREE $@55 target_x_list */ @@ -9857,13 +9898,13 @@ yyparse (void) { cb_emit_free (yyvsp[0]); } -#line 9861 "parser.c" +#line 9902 "parser.c" break; case 875: /* $@56: %empty */ #line 4885 "parser.y" { BEGIN_STATEMENT ("GENERATE", 0); } -#line 9867 "parser.c" +#line 9908 "parser.c" break; case 876: /* generate_statement: GENERATE $@56 identifier */ @@ -9871,13 +9912,13 @@ yyparse (void) { PENDING("GENERATE"); } -#line 9875 "parser.c" +#line 9916 "parser.c" break; case 877: /* $@57: %empty */ #line 4898 "parser.y" { BEGIN_STATEMENT ("GO TO", 0); } -#line 9881 "parser.c" +#line 9922 "parser.c" break; case 878: /* goto_statement: GO _to $@57 procedure_name_list goto_depending */ @@ -9885,7 +9926,7 @@ yyparse (void) { cb_emit_goto (yyvsp[-1], yyvsp[0]); } -#line 9889 "parser.c" +#line 9930 "parser.c" break; case 879: /* goto_depending: %empty */ @@ -9894,7 +9935,7 @@ yyparse (void) check_unreached = 1; yyval = NULL; } -#line 9898 "parser.c" +#line 9939 "parser.c" break; case 880: /* goto_depending: DEPENDING _on identifier */ @@ -9903,13 +9944,13 @@ yyparse (void) check_unreached = 0; yyval = yyvsp[0]; } -#line 9907 "parser.c" +#line 9948 "parser.c" break; case 881: /* $@58: %empty */ #line 4924 "parser.y" { BEGIN_STATEMENT ("GOBACK", 0); } -#line 9913 "parser.c" +#line 9954 "parser.c" break; case 882: /* goback_statement: GOBACK $@58 */ @@ -9918,13 +9959,13 @@ yyparse (void) check_unreached = 1; cb_emit_exit (1); } -#line 9922 "parser.c" +#line 9963 "parser.c" break; case 883: /* $@59: %empty */ #line 4937 "parser.y" { BEGIN_STATEMENT ("IF", TERM_IF); } -#line 9928 "parser.c" +#line 9969 "parser.c" break; case 884: /* $@60: %empty */ @@ -9932,7 +9973,7 @@ yyparse (void) { check_unreached = 0; } -#line 9936 "parser.c" +#line 9977 "parser.c" break; case 885: /* if_statement: IF $@59 condition _then $@60 statement_list if_else_sentence end_if */ @@ -9943,7 +9984,7 @@ yyparse (void) } cb_emit_if (yyvsp[-5], yyvsp[-2], yyvsp[-1]); } -#line 9947 "parser.c" +#line 9988 "parser.c" break; case 887: /* if_else_sentence: %empty */ @@ -9951,7 +9992,7 @@ yyparse (void) { yyval = NULL; } -#line 9955 "parser.c" +#line 9996 "parser.c" break; case 888: /* $@61: %empty */ @@ -9959,7 +10000,7 @@ yyparse (void) { check_unreached = 0; } -#line 9963 "parser.c" +#line 10004 "parser.c" break; case 889: /* if_else_sentence: ELSE $@61 statement_list */ @@ -9970,25 +10011,25 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 9974 "parser.c" +#line 10015 "parser.c" break; case 890: /* end_if: %empty */ #line 4972 "parser.y" { terminator_warning (TERM_IF); } -#line 9980 "parser.c" +#line 10021 "parser.c" break; case 891: /* end_if: "END-IF" */ #line 4973 "parser.y" { terminator_clear (TERM_IF); } -#line 9986 "parser.c" +#line 10027 "parser.c" break; case 892: /* $@62: %empty */ #line 4982 "parser.y" { BEGIN_STATEMENT ("INITIALIZE", 0); } -#line 9992 "parser.c" +#line 10033 "parser.c" break; case 893: /* initialize_statement: INITIALIZE $@62 target_x_list initialize_filler initialize_value initialize_replacing initialize_default */ @@ -9996,127 +10037,127 @@ yyparse (void) { cb_emit_initialize (yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10000 "parser.c" +#line 10041 "parser.c" break; case 894: /* initialize_filler: %empty */ #line 4990 "parser.y" { yyval = NULL; } -#line 10006 "parser.c" +#line 10047 "parser.c" break; case 895: /* initialize_filler: _with FILLER */ #line 4991 "parser.y" { yyval = cb_true; } -#line 10012 "parser.c" +#line 10053 "parser.c" break; case 896: /* initialize_value: %empty */ #line 4995 "parser.y" { yyval = NULL; } -#line 10018 "parser.c" +#line 10059 "parser.c" break; case 897: /* initialize_value: ALL _to VALUE */ #line 4996 "parser.y" { yyval = cb_true; } -#line 10024 "parser.c" +#line 10065 "parser.c" break; case 898: /* initialize_value: initialize_category _to VALUE */ #line 4997 "parser.y" { yyval = yyvsp[-2]; } -#line 10030 "parser.c" +#line 10071 "parser.c" break; case 899: /* initialize_replacing: %empty */ #line 5001 "parser.y" { yyval = NULL; } -#line 10036 "parser.c" +#line 10077 "parser.c" break; case 900: /* initialize_replacing: REPLACING initialize_replacing_list */ #line 5003 "parser.y" { yyval = yyvsp[0]; } -#line 10042 "parser.c" +#line 10083 "parser.c" break; case 901: /* initialize_replacing_list: initialize_replacing_item */ #line 5007 "parser.y" { yyval = yyvsp[0]; } -#line 10048 "parser.c" +#line 10089 "parser.c" break; case 902: /* initialize_replacing_list: initialize_replacing_list initialize_replacing_item */ #line 5009 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10054 "parser.c" +#line 10095 "parser.c" break; case 903: /* initialize_replacing_item: initialize_category _data BY x */ #line 5013 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[0]); } -#line 10060 "parser.c" +#line 10101 "parser.c" break; case 904: /* initialize_category: ALPHABETIC */ #line 5017 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHABETIC); } -#line 10066 "parser.c" +#line 10107 "parser.c" break; case 905: /* initialize_category: ALPHANUMERIC */ #line 5018 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC); } -#line 10072 "parser.c" +#line 10113 "parser.c" break; case 906: /* initialize_category: NUMERIC */ #line 5019 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC); } -#line 10078 "parser.c" +#line 10119 "parser.c" break; case 907: /* initialize_category: "ALPHANUMERIC-EDITED" */ #line 5020 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC_EDITED); } -#line 10084 "parser.c" +#line 10125 "parser.c" break; case 908: /* initialize_category: "NUMERIC-EDITED" */ #line 5021 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC_EDITED); } -#line 10090 "parser.c" +#line 10131 "parser.c" break; case 909: /* initialize_category: NATIONAL */ #line 5022 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL); } -#line 10096 "parser.c" +#line 10137 "parser.c" break; case 910: /* initialize_category: "NATIONAL-EDITED" */ #line 5023 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL_EDITED); } -#line 10102 "parser.c" +#line 10143 "parser.c" break; case 911: /* initialize_default: %empty */ #line 5027 "parser.y" { yyval = NULL; } -#line 10108 "parser.c" +#line 10149 "parser.c" break; case 912: /* initialize_default: DEFAULT */ #line 5028 "parser.y" { yyval = cb_true; } -#line 10114 "parser.c" +#line 10155 "parser.c" break; case 913: /* $@63: %empty */ #line 5037 "parser.y" { BEGIN_STATEMENT ("INITIATE", 0); } -#line 10120 "parser.c" +#line 10161 "parser.c" break; case 914: /* initiate_statement: INITIATE $@63 identifier_list */ @@ -10124,7 +10165,7 @@ yyparse (void) { PENDING("INITIATE"); } -#line 10128 "parser.c" +#line 10169 "parser.c" break; case 915: /* $@64: %empty */ @@ -10134,121 +10175,121 @@ yyparse (void) sending_id = 0; inspect_keyword = 0; } -#line 10138 "parser.c" +#line 10179 "parser.c" break; case 917: /* send_identifier: identifier */ #line 5059 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 0; } -#line 10144 "parser.c" +#line 10185 "parser.c" break; case 918: /* send_identifier: literal */ #line 5060 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10150 "parser.c" +#line 10191 "parser.c" break; case 919: /* send_identifier: function */ #line 5061 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10156 "parser.c" +#line 10197 "parser.c" break; case 922: /* inspect_item: inspect_tallying */ #line 5070 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 0); } -#line 10162 "parser.c" +#line 10203 "parser.c" break; case 923: /* inspect_item: inspect_replacing */ #line 5071 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int1, 1); } -#line 10168 "parser.c" +#line 10209 "parser.c" break; case 924: /* inspect_item: inspect_converting */ #line 5072 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 2); } -#line 10174 "parser.c" +#line 10215 "parser.c" break; case 925: /* $@65: %empty */ #line 5078 "parser.y" { cb_init_tarrying (); } -#line 10180 "parser.c" +#line 10221 "parser.c" break; case 926: /* inspect_tallying: TALLYING $@65 tallying_list */ #line 5079 "parser.y" { yyval = yyvsp[0]; } -#line 10186 "parser.c" +#line 10227 "parser.c" break; case 927: /* tallying_list: tallying_item */ #line 5083 "parser.y" { yyval = yyvsp[0]; } -#line 10192 "parser.c" +#line 10233 "parser.c" break; case 928: /* tallying_list: tallying_list tallying_item */ #line 5084 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10198 "parser.c" +#line 10239 "parser.c" break; case 929: /* tallying_item: simple_value FOR */ #line 5088 "parser.y" { yyval = cb_build_tarrying_data (yyvsp[-1]); } -#line 10204 "parser.c" +#line 10245 "parser.c" break; case 930: /* tallying_item: CHARACTERS inspect_region */ #line 5089 "parser.y" { yyval = cb_build_tarrying_characters (yyvsp[0]); } -#line 10210 "parser.c" +#line 10251 "parser.c" break; case 931: /* tallying_item: ALL */ #line 5090 "parser.y" { yyval = cb_build_tarrying_all (); } -#line 10216 "parser.c" +#line 10257 "parser.c" break; case 932: /* tallying_item: LEADING */ #line 5091 "parser.y" { yyval = cb_build_tarrying_leading (); } -#line 10222 "parser.c" +#line 10263 "parser.c" break; case 933: /* tallying_item: TRAILING */ #line 5092 "parser.y" { yyval = cb_build_tarrying_trailing (); } -#line 10228 "parser.c" +#line 10269 "parser.c" break; case 934: /* tallying_item: simple_value inspect_region */ #line 5093 "parser.y" { yyval = cb_build_tarrying_value (yyvsp[-1], yyvsp[0]); } -#line 10234 "parser.c" +#line 10275 "parser.c" break; case 935: /* inspect_replacing: REPLACING replacing_list */ #line 5099 "parser.y" { yyval = yyvsp[0]; inspect_keyword = 0; } -#line 10240 "parser.c" +#line 10281 "parser.c" break; case 936: /* replacing_list: replacing_item */ #line 5103 "parser.y" { yyval = yyvsp[0]; } -#line 10246 "parser.c" +#line 10287 "parser.c" break; case 937: /* replacing_list: replacing_list replacing_item */ #line 5104 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10252 "parser.c" +#line 10293 "parser.c" break; case 938: /* replacing_item: CHARACTERS BY simple_value inspect_region */ @@ -10257,43 +10298,43 @@ yyparse (void) yyval = cb_build_replacing_characters (yyvsp[-1], yyvsp[0], save_tree_1); inspect_keyword = 0; } -#line 10261 "parser.c" +#line 10302 "parser.c" break; case 939: /* replacing_item: rep_keyword replacing_region */ #line 5113 "parser.y" { yyval = yyvsp[0]; } -#line 10267 "parser.c" +#line 10308 "parser.c" break; case 940: /* rep_keyword: %empty */ #line 5117 "parser.y" { /* Nothing */ } -#line 10273 "parser.c" +#line 10314 "parser.c" break; case 941: /* rep_keyword: ALL */ #line 5118 "parser.y" { inspect_keyword = 1; } -#line 10279 "parser.c" +#line 10320 "parser.c" break; case 942: /* rep_keyword: LEADING */ #line 5119 "parser.y" { inspect_keyword = 2; } -#line 10285 "parser.c" +#line 10326 "parser.c" break; case 943: /* rep_keyword: FIRST */ #line 5120 "parser.y" { inspect_keyword = 3; } -#line 10291 "parser.c" +#line 10332 "parser.c" break; case 944: /* rep_keyword: TRAILING */ #line 5121 "parser.y" { inspect_keyword = 4; } -#line 10297 "parser.c" +#line 10338 "parser.c" break; case 945: /* replacing_region: simple_value BY simple_all_value inspect_region */ @@ -10318,7 +10359,7 @@ yyparse (void) break; } } -#line 10322 "parser.c" +#line 10363 "parser.c" break; case 946: /* inspect_converting: CONVERTING simple_value TO simple_all_value inspect_region */ @@ -10330,31 +10371,31 @@ yyparse (void) yyval = cb_build_converting (yyvsp[-3], yyvsp[-1], yyvsp[0]); } } -#line 10334 "parser.c" +#line 10375 "parser.c" break; case 947: /* inspect_region: %empty */ #line 5164 "parser.y" { yyval = cb_build_inspect_region_start (); } -#line 10340 "parser.c" +#line 10381 "parser.c" break; case 948: /* inspect_region: inspect_region before_or_after _initial x */ #line 5166 "parser.y" { yyval = cb_build_inspect_region (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10346 "parser.c" +#line 10387 "parser.c" break; case 951: /* $@66: %empty */ #line 5177 "parser.y" { BEGIN_STATEMENT ("MERGE", 0); } -#line 10352 "parser.c" +#line 10393 "parser.c" break; case 953: /* $@67: %empty */ #line 5187 "parser.y" { BEGIN_STATEMENT ("MOVE", 0); } -#line 10358 "parser.c" +#line 10399 "parser.c" break; case 955: /* move_body: x TO target_x_list */ @@ -10362,7 +10403,7 @@ yyparse (void) { cb_emit_move (yyvsp[-2], yyvsp[0]); } -#line 10366 "parser.c" +#line 10407 "parser.c" break; case 956: /* move_body: CORRESPONDING x TO target_x_list */ @@ -10370,13 +10411,13 @@ yyparse (void) { cb_emit_move_corresponding (yyvsp[-2], yyvsp[0]); } -#line 10374 "parser.c" +#line 10415 "parser.c" break; case 957: /* $@68: %empty */ #line 5208 "parser.y" { BEGIN_STATEMENT ("MULTIPLY", TERM_MULTIPLY); } -#line 10380 "parser.c" +#line 10421 "parser.c" break; case 959: /* multiply_body: x BY arithmetic_x_list on_size_error */ @@ -10384,7 +10425,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '*', yyvsp[-3]); } -#line 10388 "parser.c" +#line 10429 "parser.c" break; case 960: /* multiply_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -10392,25 +10433,25 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '*', yyvsp[-3])); } -#line 10396 "parser.c" +#line 10437 "parser.c" break; case 961: /* end_multiply: %empty */ #line 5225 "parser.y" { terminator_warning (TERM_MULTIPLY); } -#line 10402 "parser.c" +#line 10443 "parser.c" break; case 962: /* end_multiply: "END-MULTIPLY" */ #line 5226 "parser.y" { terminator_clear (TERM_MULTIPLY); } -#line 10408 "parser.c" +#line 10449 "parser.c" break; case 963: /* $@69: %empty */ #line 5235 "parser.y" { BEGIN_STATEMENT ("OPEN", 0); } -#line 10414 "parser.c" +#line 10455 "parser.c" break; case 966: /* open_list: open_list open_mode open_sharing file_name_list open_option */ @@ -10424,67 +10465,67 @@ yyparse (void) } } } -#line 10428 "parser.c" +#line 10469 "parser.c" break; case 967: /* open_mode: INPUT */ #line 5254 "parser.y" { yyval = cb_int (COB_OPEN_INPUT); } -#line 10434 "parser.c" +#line 10475 "parser.c" break; case 968: /* open_mode: OUTPUT */ #line 5255 "parser.y" { yyval = cb_int (COB_OPEN_OUTPUT); } -#line 10440 "parser.c" +#line 10481 "parser.c" break; case 969: /* open_mode: "I-O" */ #line 5256 "parser.y" { yyval = cb_int (COB_OPEN_I_O); } -#line 10446 "parser.c" +#line 10487 "parser.c" break; case 970: /* open_mode: EXTEND */ #line 5257 "parser.y" { yyval = cb_int (COB_OPEN_EXTEND); } -#line 10452 "parser.c" +#line 10493 "parser.c" break; case 971: /* open_sharing: %empty */ #line 5261 "parser.y" { yyval = NULL; } -#line 10458 "parser.c" +#line 10499 "parser.c" break; case 972: /* open_sharing: SHARING _with sharing_option */ #line 5262 "parser.y" { yyval = yyvsp[0]; } -#line 10464 "parser.c" +#line 10505 "parser.c" break; case 973: /* open_option: %empty */ #line 5266 "parser.y" { yyval = NULL; } -#line 10470 "parser.c" +#line 10511 "parser.c" break; case 974: /* open_option: _with NO REWIND */ #line 5267 "parser.y" { yyval = NULL; } -#line 10476 "parser.c" +#line 10517 "parser.c" break; case 975: /* open_option: _with LOCK */ #line 5268 "parser.y" { PENDING ("OPEN ... WITH LOCK"); } -#line 10482 "parser.c" +#line 10523 "parser.c" break; case 976: /* $@70: %empty */ #line 5280 "parser.y" { BEGIN_STATEMENT ("PERFORM", TERM_PERFORM); } -#line 10488 "parser.c" +#line 10529 "parser.c" break; case 978: /* perform_body: perform_procedure perform_option */ @@ -10492,7 +10533,7 @@ yyparse (void) { cb_emit_perform (yyvsp[0], yyvsp[-1]); } -#line 10496 "parser.c" +#line 10537 "parser.c" break; case 979: /* $@71: %empty */ @@ -10501,7 +10542,7 @@ yyparse (void) perform_stack = cb_cons (yyvsp[0], perform_stack); check_unreached = 0; } -#line 10505 "parser.c" +#line 10546 "parser.c" break; case 980: /* perform_body: perform_option $@71 statement_list end_perform */ @@ -10510,7 +10551,7 @@ yyparse (void) perform_stack = CB_CHAIN (perform_stack); cb_emit_perform (yyvsp[-3], yyvsp[-1]); } -#line 10514 "parser.c" +#line 10555 "parser.c" break; case 981: /* perform_body: perform_option "END-PERFORM" */ @@ -10518,19 +10559,19 @@ yyparse (void) { cb_emit_perform (yyvsp[-1], NULL); } -#line 10522 "parser.c" +#line 10563 "parser.c" break; case 982: /* end_perform: %empty */ #line 5306 "parser.y" { terminator_error (); } -#line 10528 "parser.c" +#line 10569 "parser.c" break; case 983: /* end_perform: "END-PERFORM" */ #line 5307 "parser.y" { terminator_clear (TERM_PERFORM); } -#line 10534 "parser.c" +#line 10575 "parser.c" break; case 984: /* perform_procedure: procedure_name */ @@ -10539,7 +10580,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $1 */ yyval = cb_build_pair (yyvsp[0], yyvsp[0]); } -#line 10543 "parser.c" +#line 10584 "parser.c" break; case 985: /* perform_procedure: procedure_name THRU procedure_name */ @@ -10548,7 +10589,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $3 */ yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 10552 "parser.c" +#line 10593 "parser.c" break; case 986: /* perform_option: %empty */ @@ -10556,7 +10597,7 @@ yyparse (void) { yyval = cb_build_perform_once (NULL); } -#line 10560 "parser.c" +#line 10601 "parser.c" break; case 987: /* perform_option: FOREVER */ @@ -10564,7 +10605,7 @@ yyparse (void) { yyval = cb_build_perform_forever (NULL); } -#line 10568 "parser.c" +#line 10609 "parser.c" break; case 988: /* perform_option: id_or_lit_or_func TIMES */ @@ -10573,7 +10614,7 @@ yyparse (void) yyval = cb_build_perform_times (yyvsp[-1]); current_program->loop_counter++; } -#line 10577 "parser.c" +#line 10618 "parser.c" break; case 989: /* perform_option: perform_test UNTIL condition */ @@ -10584,7 +10625,7 @@ yyparse (void) varying = cb_list_init (cb_build_perform_varying (NULL, NULL, NULL, yyvsp[0])); yyval = cb_build_perform_until (yyvsp[-2], varying); } -#line 10588 "parser.c" +#line 10629 "parser.c" break; case 990: /* perform_option: perform_test VARYING perform_varying_list */ @@ -10592,31 +10633,31 @@ yyparse (void) { yyval = cb_build_perform_until (yyvsp[-2], yyvsp[0]); } -#line 10596 "parser.c" +#line 10637 "parser.c" break; case 991: /* perform_test: %empty */ #line 5351 "parser.y" { yyval = CB_BEFORE; } -#line 10602 "parser.c" +#line 10643 "parser.c" break; case 992: /* perform_test: _with TEST before_or_after */ #line 5352 "parser.y" { yyval = yyvsp[0]; } -#line 10608 "parser.c" +#line 10649 "parser.c" break; case 993: /* perform_varying_list: perform_varying */ #line 5356 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 10614 "parser.c" +#line 10655 "parser.c" break; case 994: /* perform_varying_list: perform_varying_list AFTER perform_varying */ #line 5358 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 10620 "parser.c" +#line 10661 "parser.c" break; case 995: /* perform_varying: identifier FROM x BY x UNTIL condition */ @@ -10624,13 +10665,13 @@ yyparse (void) { yyval = cb_build_perform_varying (yyvsp[-6], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10628 "parser.c" +#line 10669 "parser.c" break; case 996: /* $@72: %empty */ #line 5374 "parser.y" { BEGIN_STATEMENT ("READ", TERM_READ); } -#line 10634 "parser.c" +#line 10675 "parser.c" break; case 997: /* read_statement: READ $@72 file_name flag_next _record read_into with_lock read_key read_handler end_read */ @@ -10643,9 +10684,7 @@ yyparse (void) CB_FILE(cb_ref (yyvsp[-7]))->organization != COB_ORG_INDEXED)) { current_statement->handler_id = COB_EC_I_O_PERMANENT_ERROR; } - if (yyvsp[-3] && (CB_FILE(cb_ref (yyvsp[-7]))->lock_mode & COB_LOCK_AUTOMATIC)) { - cb_error (_("LOCK clause invalid with file LOCK AUTOMATIC")); - } else if (yyvsp[-2] && + if (yyvsp[-2] && (CB_FILE(cb_ref (yyvsp[-7]))->organization != COB_ORG_RELATIVE && CB_FILE(cb_ref (yyvsp[-7]))->organization != COB_ORG_INDEXED)) { cb_error (_("KEY clause invalid with this file type")); @@ -10658,145 +10697,145 @@ yyparse (void) } } } -#line 10662 "parser.c" +#line 10701 "parser.c" break; case 998: /* read_into: %empty */ -#line 5403 "parser.y" +#line 5401 "parser.y" { yyval = NULL; } -#line 10668 "parser.c" +#line 10707 "parser.c" break; case 999: /* read_into: INTO identifier */ -#line 5404 "parser.y" +#line 5402 "parser.y" { yyval = yyvsp[0]; } -#line 10674 "parser.c" +#line 10713 "parser.c" break; case 1000: /* with_lock: %empty */ -#line 5408 "parser.y" +#line 5406 "parser.y" { yyval = NULL; } -#line 10680 "parser.c" +#line 10719 "parser.c" break; case 1001: /* with_lock: IGNORING LOCK */ -#line 5410 "parser.y" +#line 5408 "parser.y" { yyval = cb_int3; } -#line 10688 "parser.c" +#line 10727 "parser.c" break; case 1002: /* with_lock: _with LOCK */ -#line 5414 "parser.y" +#line 5412 "parser.y" { yyval = cb_int1; } -#line 10696 "parser.c" +#line 10735 "parser.c" break; case 1003: /* with_lock: _with NO LOCK */ -#line 5418 "parser.y" +#line 5416 "parser.y" { yyval = cb_int2; } -#line 10704 "parser.c" +#line 10743 "parser.c" break; case 1004: /* with_lock: _with IGNORE LOCK */ -#line 5422 "parser.y" +#line 5420 "parser.y" { yyval = cb_int3; } -#line 10712 "parser.c" +#line 10751 "parser.c" break; case 1005: /* with_lock: _with WAIT */ -#line 5426 "parser.y" +#line 5424 "parser.y" { yyval = cb_int4; } -#line 10720 "parser.c" +#line 10759 "parser.c" break; case 1006: /* read_key: %empty */ -#line 5432 "parser.y" +#line 5430 "parser.y" { yyval = NULL; } -#line 10726 "parser.c" +#line 10765 "parser.c" break; case 1007: /* read_key: KEY _is identifier_list */ -#line 5434 "parser.y" +#line 5432 "parser.y" { yyval = yyvsp[0]; } -#line 10734 "parser.c" +#line 10773 "parser.c" break; case 1011: /* end_read: %empty */ -#line 5445 "parser.y" +#line 5443 "parser.y" { terminator_warning (TERM_READ); } -#line 10740 "parser.c" +#line 10779 "parser.c" break; case 1012: /* end_read: "END-READ" */ -#line 5446 "parser.y" +#line 5444 "parser.y" { terminator_clear (TERM_READ); } -#line 10746 "parser.c" +#line 10785 "parser.c" break; case 1013: /* $@73: %empty */ -#line 5455 "parser.y" +#line 5453 "parser.y" { BEGIN_STATEMENT ("RELEASE", 0); } -#line 10752 "parser.c" +#line 10791 "parser.c" break; case 1014: /* release_statement: RELEASE $@73 record_name write_from */ -#line 5457 "parser.y" +#line 5455 "parser.y" { if (yyvsp[-1] != cb_error_node) { cb_emit_release (yyvsp[-1], yyvsp[0]); } } -#line 10762 "parser.c" +#line 10801 "parser.c" break; case 1015: /* $@74: %empty */ -#line 5470 "parser.y" +#line 5468 "parser.y" { BEGIN_STATEMENT ("RETURN", TERM_RETURN); } -#line 10768 "parser.c" +#line 10807 "parser.c" break; case 1016: /* return_statement: RETURN $@74 file_name _record read_into at_end end_return */ -#line 5473 "parser.y" +#line 5471 "parser.y" { if (yyvsp[-4] != cb_error_node) { cb_emit_return (yyvsp[-4], yyvsp[-2]); } } -#line 10778 "parser.c" +#line 10817 "parser.c" break; case 1017: /* end_return: %empty */ -#line 5481 "parser.y" +#line 5479 "parser.y" { terminator_warning (TERM_RETURN); } -#line 10784 "parser.c" +#line 10823 "parser.c" break; case 1018: /* end_return: "END-RETURN" */ -#line 5482 "parser.y" +#line 5480 "parser.y" { terminator_clear (TERM_RETURN); } -#line 10790 "parser.c" +#line 10829 "parser.c" break; case 1019: /* $@75: %empty */ -#line 5491 "parser.y" +#line 5489 "parser.y" { BEGIN_STATEMENT ("REWRITE", TERM_REWRITE); } -#line 10796 "parser.c" +#line 10835 "parser.c" break; case 1020: /* rewrite_statement: REWRITE $@75 record_name write_from write_lock opt_invalid_key end_rewrite */ -#line 5494 "parser.y" +#line 5492 "parser.y" { if (yyvsp[-4] != cb_error_node) { if (cb_use_invalidkey_handler_on_status34 && @@ -10808,238 +10847,238 @@ yyparse (void) cb_emit_rewrite (yyvsp[-4], yyvsp[-3], yyvsp[-2]); } } -#line 10812 "parser.c" +#line 10851 "parser.c" break; case 1021: /* write_lock: %empty */ -#line 5508 "parser.y" +#line 5506 "parser.y" { yyval = NULL; } -#line 10818 "parser.c" +#line 10857 "parser.c" break; case 1022: /* write_lock: _with LOCK */ -#line 5510 "parser.y" +#line 5508 "parser.y" { yyval = cb_int1; } -#line 10826 "parser.c" +#line 10865 "parser.c" break; case 1023: /* write_lock: _with NO LOCK */ -#line 5514 "parser.y" +#line 5512 "parser.y" { yyval = cb_int2; } -#line 10834 "parser.c" +#line 10873 "parser.c" break; case 1024: /* end_rewrite: %empty */ -#line 5520 "parser.y" +#line 5518 "parser.y" { terminator_warning (TERM_REWRITE); } -#line 10840 "parser.c" +#line 10879 "parser.c" break; case 1025: /* end_rewrite: "END-REWRITE" */ -#line 5521 "parser.y" +#line 5519 "parser.y" { terminator_clear (TERM_REWRITE); } -#line 10846 "parser.c" +#line 10885 "parser.c" break; case 1026: /* rollback_statement: ROLLBACK */ -#line 5531 "parser.y" +#line 5529 "parser.y" { BEGIN_STATEMENT ("ROLLBACK", 0); cb_emit_rollback (); } -#line 10855 "parser.c" +#line 10894 "parser.c" break; case 1027: /* $@76: %empty */ -#line 5543 "parser.y" +#line 5541 "parser.y" { BEGIN_STATEMENT ("SEARCH", TERM_SEARCH); } -#line 10861 "parser.c" +#line 10900 "parser.c" break; case 1029: /* search_body: table_name search_varying search_at_end search_whens */ -#line 5550 "parser.y" +#line 5548 "parser.y" { cb_emit_search (yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10869 "parser.c" +#line 10908 "parser.c" break; case 1030: /* $@77: %empty */ -#line 5554 "parser.y" +#line 5552 "parser.y" { check_unreached = 0; } -#line 10877 "parser.c" +#line 10916 "parser.c" break; case 1031: /* search_body: ALL table_name search_at_end WHEN expr $@77 statement_list */ -#line 5558 "parser.y" +#line 5556 "parser.y" { cb_emit_search_all (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10885 "parser.c" +#line 10924 "parser.c" break; case 1032: /* search_varying: %empty */ -#line 5564 "parser.y" +#line 5562 "parser.y" { yyval = NULL; } -#line 10891 "parser.c" +#line 10930 "parser.c" break; case 1033: /* search_varying: VARYING identifier */ -#line 5565 "parser.y" +#line 5563 "parser.y" { yyval = yyvsp[0]; } -#line 10897 "parser.c" +#line 10936 "parser.c" break; case 1034: /* search_at_end: %empty */ -#line 5569 "parser.y" +#line 5567 "parser.y" { yyval = NULL; } -#line 10903 "parser.c" +#line 10942 "parser.c" break; case 1035: /* $@78: %empty */ -#line 5571 "parser.y" +#line 5569 "parser.y" { check_unreached = 0; } -#line 10911 "parser.c" +#line 10950 "parser.c" break; case 1036: /* search_at_end: _at END $@78 statement_list */ -#line 5575 "parser.y" +#line 5573 "parser.y" { yyval = yyvsp[0]; } -#line 10919 "parser.c" +#line 10958 "parser.c" break; case 1037: /* search_whens: search_when */ -#line 5581 "parser.y" +#line 5579 "parser.y" { yyval = yyvsp[0]; } -#line 10925 "parser.c" +#line 10964 "parser.c" break; case 1038: /* search_whens: search_when search_whens */ -#line 5582 "parser.y" +#line 5580 "parser.y" { yyval = yyvsp[-1]; CB_IF (yyvsp[-1])->stmt2 = yyvsp[0]; } -#line 10931 "parser.c" +#line 10970 "parser.c" break; case 1039: /* $@79: %empty */ -#line 5587 "parser.y" +#line 5585 "parser.y" { check_unreached = 0; } -#line 10939 "parser.c" +#line 10978 "parser.c" break; case 1040: /* search_when: WHEN condition $@79 statement_list */ -#line 5591 "parser.y" +#line 5589 "parser.y" { yyval = cb_build_if (yyvsp[-2], yyvsp[0], NULL); } -#line 10947 "parser.c" +#line 10986 "parser.c" break; case 1041: /* end_search: %empty */ -#line 5597 "parser.y" +#line 5595 "parser.y" { terminator_warning (TERM_SEARCH); } -#line 10953 "parser.c" +#line 10992 "parser.c" break; case 1042: /* end_search: "END-SEARCH" */ -#line 5598 "parser.y" +#line 5596 "parser.y" { terminator_clear (TERM_SEARCH); } -#line 10959 "parser.c" +#line 10998 "parser.c" break; case 1043: /* $@80: %empty */ -#line 5607 "parser.y" +#line 5605 "parser.y" { BEGIN_STATEMENT ("SET", 0); } -#line 10965 "parser.c" +#line 11004 "parser.c" break; case 1050: /* set_environment: ENVIRONMENT simple_value TO simple_value */ -#line 5623 "parser.y" +#line 5621 "parser.y" { cb_emit_setenv (yyvsp[-2], yyvsp[0]); } -#line 10973 "parser.c" +#line 11012 "parser.c" break; case 1051: /* set_to: target_x_list TO ENTRY alnum_or_id */ -#line 5632 "parser.y" +#line 5630 "parser.y" { cb_emit_set_to (yyvsp[-3], cb_build_ppointer (yyvsp[0])); } -#line 10981 "parser.c" +#line 11020 "parser.c" break; case 1052: /* set_to: target_x_list TO x */ -#line 5636 "parser.y" +#line 5634 "parser.y" { cb_emit_set_to (yyvsp[-2], yyvsp[0]); } -#line 10989 "parser.c" +#line 11028 "parser.c" break; case 1053: /* set_up_down: target_x_list up_or_down BY x */ -#line 5645 "parser.y" +#line 5643 "parser.y" { cb_emit_set_up_down (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10997 "parser.c" +#line 11036 "parser.c" break; case 1054: /* up_or_down: UP */ -#line 5651 "parser.y" +#line 5649 "parser.y" { yyval = cb_int0; } -#line 11003 "parser.c" +#line 11042 "parser.c" break; case 1055: /* up_or_down: DOWN */ -#line 5652 "parser.y" +#line 5650 "parser.y" { yyval = cb_int1; } -#line 11009 "parser.c" +#line 11048 "parser.c" break; case 1058: /* set_to_on_off: mnemonic_name_list TO on_or_off */ -#line 5664 "parser.y" +#line 5662 "parser.y" { cb_emit_set_on_off (yyvsp[-2], yyvsp[0]); } -#line 11017 "parser.c" +#line 11056 "parser.c" break; case 1061: /* set_to_true_false: target_x_list TO "TRUE" */ -#line 5678 "parser.y" +#line 5676 "parser.y" { cb_emit_set_true (yyvsp[-2]); } -#line 11025 "parser.c" +#line 11064 "parser.c" break; case 1062: /* set_to_true_false: target_x_list TO "FALSE" */ -#line 5682 "parser.y" +#line 5680 "parser.y" { cb_emit_set_false (yyvsp[-2]); } -#line 11033 "parser.c" +#line 11072 "parser.c" break; case 1063: /* $@81: %empty */ -#line 5693 "parser.y" +#line 5691 "parser.y" { BEGIN_STATEMENT ("SORT", 0); } -#line 11039 "parser.c" +#line 11078 "parser.c" break; case 1065: /* $@82: %empty */ -#line 5699 "parser.y" +#line 5697 "parser.y" { cb_emit_sort_init (yyvsp[-3], yyvsp[-2], yyvsp[0]); if (CB_FILE_P (cb_ref (yyvsp[-3])) && yyvsp[-2] == NULL) { @@ -11048,27 +11087,27 @@ yyparse (void) /* used in sort_input/sort_output */ save_tree_1 = yyvsp[-3]; } -#line 11052 "parser.c" +#line 11091 "parser.c" break; case 1066: /* sort_body: qualified_word sort_key_list sort_duplicates sort_collating $@82 sort_input sort_output */ -#line 5708 "parser.y" +#line 5706 "parser.y" { cb_emit_sort_finish (yyvsp[-6]); } -#line 11060 "parser.c" +#line 11099 "parser.c" break; case 1067: /* sort_key_list: %empty */ -#line 5715 "parser.y" +#line 5713 "parser.y" { yyval = NULL; } -#line 11068 "parser.c" +#line 11107 "parser.c" break; case 1068: /* sort_key_list: sort_key_list _on ascending_or_descending _key _is opt_key_list */ -#line 5720 "parser.y" +#line 5718 "parser.y" { cb_tree l; @@ -11085,51 +11124,51 @@ yyparse (void) yyval = cb_list_append (yyvsp[-5], yyvsp[0]); } } -#line 11089 "parser.c" +#line 11128 "parser.c" break; case 1069: /* opt_key_list: %empty */ -#line 5739 "parser.y" +#line 5737 "parser.y" { yyval = NULL; } -#line 11095 "parser.c" +#line 11134 "parser.c" break; case 1070: /* opt_key_list: opt_key_list qualified_word */ -#line 5740 "parser.y" +#line 5738 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11101 "parser.c" +#line 11140 "parser.c" break; case 1072: /* sort_duplicates: with_dups _in_order */ -#line 5744 "parser.y" +#line 5742 "parser.y" { /* nothing */ } -#line 11107 "parser.c" +#line 11146 "parser.c" break; case 1073: /* sort_collating: %empty */ -#line 5748 "parser.y" +#line 5746 "parser.y" { yyval = cb_null; } -#line 11113 "parser.c" +#line 11152 "parser.c" break; case 1074: /* sort_collating: coll_sequence _is reference */ -#line 5749 "parser.y" +#line 5747 "parser.y" { yyval = cb_ref (yyvsp[0]); } -#line 11119 "parser.c" +#line 11158 "parser.c" break; case 1075: /* sort_input: %empty */ -#line 5754 "parser.y" +#line 5752 "parser.y" { if (CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("File sort requires USING or INPUT PROCEDURE")); } } -#line 11129 "parser.c" +#line 11168 "parser.c" break; case 1076: /* sort_input: USING file_name_list */ -#line 5760 "parser.y" +#line 5758 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("USING invalid with table SORT")); @@ -11137,11 +11176,11 @@ yyparse (void) cb_emit_sort_using (save_tree_1, yyvsp[0]); } } -#line 11141 "parser.c" +#line 11180 "parser.c" break; case 1077: /* sort_input: INPUT PROCEDURE _is perform_procedure */ -#line 5768 "parser.y" +#line 5766 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("INPUT PROCEDURE invalid with table SORT")); @@ -11149,21 +11188,21 @@ yyparse (void) cb_emit_sort_input (yyvsp[0], save_tree_1); } } -#line 11153 "parser.c" +#line 11192 "parser.c" break; case 1078: /* sort_output: %empty */ -#line 5779 "parser.y" +#line 5777 "parser.y" { if (CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("File sort requires GIVING or OUTPUT PROCEDURE")); } } -#line 11163 "parser.c" +#line 11202 "parser.c" break; case 1079: /* sort_output: GIVING file_name_list */ -#line 5785 "parser.y" +#line 5783 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("GIVING invalid with table SORT")); @@ -11171,11 +11210,11 @@ yyparse (void) cb_emit_sort_giving (save_tree_1, yyvsp[0]); } } -#line 11175 "parser.c" +#line 11214 "parser.c" break; case 1080: /* sort_output: OUTPUT PROCEDURE _is perform_procedure */ -#line 5793 "parser.y" +#line 5791 "parser.y" { if (!CB_FILE_P (cb_ref (save_tree_1))) { cb_error (_("OUTPUT PROCEDURE invalid with table SORT")); @@ -11183,23 +11222,23 @@ yyparse (void) cb_emit_sort_output (yyvsp[0], save_tree_1); } } -#line 11187 "parser.c" +#line 11226 "parser.c" break; case 1081: /* $@83: %empty */ -#line 5808 "parser.y" +#line 5806 "parser.y" { BEGIN_STATEMENT ("START", TERM_START); } -#line 11193 "parser.c" +#line 11232 "parser.c" break; case 1082: /* @84: %empty */ -#line 5809 "parser.y" +#line 5807 "parser.y" { yyval = cb_int (COB_EQ); } -#line 11199 "parser.c" +#line 11238 "parser.c" break; case 1083: /* start_statement: START $@83 file_name @84 start_key opt_invalid_key end_start */ -#line 5812 "parser.y" +#line 5810 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[-4]))) { if (CB_FILE (cb_ref (yyvsp[-4]))->organization != COB_ORG_INDEXED && @@ -11214,394 +11253,394 @@ yyparse (void) yyval = cb_error_node; } } -#line 11218 "parser.c" +#line 11257 "parser.c" break; case 1084: /* start_key: %empty */ -#line 5829 "parser.y" +#line 5827 "parser.y" { yyval = NULL; } -#line 11224 "parser.c" +#line 11263 "parser.c" break; case 1085: /* start_key: KEY _is start_op identifier_list */ -#line 5831 "parser.y" +#line 5829 "parser.y" { yyvsp[-4] = yyvsp[-1]; yyval = yyvsp[0]; } -#line 11233 "parser.c" +#line 11272 "parser.c" break; case 1086: /* start_op: flag_not eq */ -#line 5838 "parser.y" +#line 5836 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_NE : COB_EQ); } -#line 11239 "parser.c" +#line 11278 "parser.c" break; case 1087: /* start_op: flag_not gt */ -#line 5839 "parser.y" +#line 5837 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LE : COB_GT); } -#line 11245 "parser.c" +#line 11284 "parser.c" break; case 1088: /* start_op: flag_not lt */ -#line 5840 "parser.y" +#line 5838 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GE : COB_LT); } -#line 11251 "parser.c" +#line 11290 "parser.c" break; case 1089: /* start_op: flag_not ge */ -#line 5841 "parser.y" +#line 5839 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LT : COB_GE); } -#line 11257 "parser.c" +#line 11296 "parser.c" break; case 1090: /* start_op: flag_not le */ -#line 5842 "parser.y" +#line 5840 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GT : COB_LE); } -#line 11263 "parser.c" +#line 11302 "parser.c" break; case 1091: /* end_start: %empty */ -#line 5846 "parser.y" +#line 5844 "parser.y" { terminator_warning (TERM_START); } -#line 11269 "parser.c" +#line 11308 "parser.c" break; case 1092: /* end_start: "END-START" */ -#line 5847 "parser.y" +#line 5845 "parser.y" { terminator_clear (TERM_START); } -#line 11275 "parser.c" +#line 11314 "parser.c" break; case 1093: /* $@85: %empty */ -#line 5856 "parser.y" +#line 5854 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11281 "parser.c" +#line 11320 "parser.c" break; case 1094: /* stop_statement: STOP RUN $@85 stop_returning */ -#line 5858 "parser.y" +#line 5856 "parser.y" { cb_emit_stop_run (yyvsp[0]); } -#line 11289 "parser.c" +#line 11328 "parser.c" break; case 1095: /* $@86: %empty */ -#line 5861 "parser.y" +#line 5859 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11295 "parser.c" +#line 11334 "parser.c" break; case 1096: /* stop_statement: STOP "Literal" $@86 */ -#line 5862 "parser.y" +#line 5860 "parser.y" { cb_verify (cb_stop_literal_statement, "STOP literal"); } -#line 11303 "parser.c" +#line 11342 "parser.c" break; case 1097: /* stop_returning: %empty */ -#line 5868 "parser.y" +#line 5866 "parser.y" { yyval = current_program->cb_return_code; } -#line 11309 "parser.c" +#line 11348 "parser.c" break; case 1098: /* stop_returning: RETURNING x */ -#line 5869 "parser.y" +#line 5867 "parser.y" { yyval = yyvsp[0]; } -#line 11315 "parser.c" +#line 11354 "parser.c" break; case 1099: /* stop_returning: GIVING x */ -#line 5870 "parser.y" +#line 5868 "parser.y" { yyval = yyvsp[0]; } -#line 11321 "parser.c" +#line 11360 "parser.c" break; case 1100: /* $@87: %empty */ -#line 5879 "parser.y" +#line 5877 "parser.y" { BEGIN_STATEMENT ("STRING", TERM_STRING); } -#line 11327 "parser.c" +#line 11366 "parser.c" break; case 1101: /* string_statement: STRING $@87 string_item_list INTO identifier opt_with_pointer on_overflow end_string */ -#line 5882 "parser.y" +#line 5880 "parser.y" { cb_emit_string (yyvsp[-5], yyvsp[-3], yyvsp[-2]); } -#line 11335 "parser.c" +#line 11374 "parser.c" break; case 1102: /* string_item_list: string_item */ -#line 5888 "parser.y" +#line 5886 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11341 "parser.c" +#line 11380 "parser.c" break; case 1103: /* string_item_list: string_item_list string_item */ -#line 5889 "parser.y" +#line 5887 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11347 "parser.c" +#line 11386 "parser.c" break; case 1104: /* string_item: x */ -#line 5893 "parser.y" +#line 5891 "parser.y" { yyval = yyvsp[0]; } -#line 11353 "parser.c" +#line 11392 "parser.c" break; case 1105: /* string_item: DELIMITED _by SIZE */ -#line 5894 "parser.y" +#line 5892 "parser.y" { yyval = cb_build_pair (cb_int0, NULL); } -#line 11359 "parser.c" +#line 11398 "parser.c" break; case 1106: /* string_item: DELIMITED _by x */ -#line 5895 "parser.y" +#line 5893 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 11365 "parser.c" +#line 11404 "parser.c" break; case 1107: /* opt_with_pointer: %empty */ -#line 5899 "parser.y" +#line 5897 "parser.y" { yyval = cb_int0; } -#line 11371 "parser.c" +#line 11410 "parser.c" break; case 1108: /* opt_with_pointer: _with POINTER identifier */ -#line 5900 "parser.y" +#line 5898 "parser.y" { yyval = yyvsp[0]; } -#line 11377 "parser.c" +#line 11416 "parser.c" break; case 1109: /* end_string: %empty */ -#line 5904 "parser.y" +#line 5902 "parser.y" { terminator_warning (TERM_STRING); } -#line 11383 "parser.c" +#line 11422 "parser.c" break; case 1110: /* end_string: "END-STRING" */ -#line 5905 "parser.y" +#line 5903 "parser.y" { terminator_clear (TERM_STRING); } -#line 11389 "parser.c" +#line 11428 "parser.c" break; case 1111: /* $@88: %empty */ -#line 5914 "parser.y" +#line 5912 "parser.y" { BEGIN_STATEMENT ("SUBTRACT", TERM_SUBTRACT); } -#line 11395 "parser.c" +#line 11434 "parser.c" break; case 1113: /* subtract_body: x_list FROM arithmetic_x_list on_size_error */ -#line 5921 "parser.y" +#line 5919 "parser.y" { cb_emit_arithmetic (yyvsp[-1], '-', cb_build_binary_list (yyvsp[-3], '+')); } -#line 11403 "parser.c" +#line 11442 "parser.c" break; case 1114: /* subtract_body: x_list FROM x GIVING arithmetic_x_list on_size_error */ -#line 5925 "parser.y" +#line 5923 "parser.y" { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (cb_cons (yyvsp[-3], yyvsp[-5]), '-')); } -#line 11411 "parser.c" +#line 11450 "parser.c" break; case 1115: /* subtract_body: CORRESPONDING identifier FROM identifier flag_rounded on_size_error */ -#line 5929 "parser.y" +#line 5927 "parser.y" { cb_emit_corresponding (cb_build_sub, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 11419 "parser.c" +#line 11458 "parser.c" break; case 1116: /* end_subtract: %empty */ -#line 5935 "parser.y" +#line 5933 "parser.y" { terminator_warning (TERM_SUBTRACT); } -#line 11425 "parser.c" +#line 11464 "parser.c" break; case 1117: /* end_subtract: "END-SUBTRACT" */ -#line 5936 "parser.y" +#line 5934 "parser.y" { terminator_clear (TERM_SUBTRACT); } -#line 11431 "parser.c" +#line 11470 "parser.c" break; case 1118: /* suppress_statement: SUPPRESS _printing */ -#line 5946 "parser.y" +#line 5944 "parser.y" { BEGIN_STATEMENT ("SUPPRESS", 0); PENDING("SUPPRESS"); } -#line 11440 "parser.c" +#line 11479 "parser.c" break; case 1121: /* $@89: %empty */ -#line 5961 "parser.y" +#line 5959 "parser.y" { BEGIN_STATEMENT ("TERMINATE", 0); } -#line 11446 "parser.c" +#line 11485 "parser.c" break; case 1122: /* terminate_statement: TERMINATE $@89 identifier_list */ -#line 5963 "parser.y" +#line 5961 "parser.y" { PENDING("TERMINATE"); } -#line 11454 "parser.c" +#line 11493 "parser.c" break; case 1123: /* $@90: %empty */ -#line 5974 "parser.y" +#line 5972 "parser.y" { BEGIN_STATEMENT ("TRANSFORM", 0); } -#line 11460 "parser.c" +#line 11499 "parser.c" break; case 1124: /* transform_statement: TRANSFORM $@90 identifier FROM simple_value TO simple_all_value */ -#line 5976 "parser.y" +#line 5974 "parser.y" { cb_tree x; x = cb_build_converting (yyvsp[-2], yyvsp[0], cb_build_inspect_region_start ()); cb_emit_inspect (yyvsp[-4], x, cb_int0, 2); } -#line 11471 "parser.c" +#line 11510 "parser.c" break; case 1125: /* $@91: %empty */ -#line 5990 "parser.y" +#line 5988 "parser.y" { BEGIN_STATEMENT ("UNLOCK", 0); } -#line 11477 "parser.c" +#line 11516 "parser.c" break; case 1126: /* unlock_statement: UNLOCK $@91 file_name opt_record */ -#line 5992 "parser.y" +#line 5990 "parser.y" { if (yyvsp[-1] != cb_error_node) { cb_emit_unlock (yyvsp[-1]); } } -#line 11487 "parser.c" +#line 11526 "parser.c" break; case 1130: /* $@92: %empty */ -#line 6011 "parser.y" +#line 6009 "parser.y" { BEGIN_STATEMENT ("UNSTRING", TERM_UNSTRING); } -#line 11493 "parser.c" +#line 11532 "parser.c" break; case 1131: /* unstring_statement: UNSTRING $@92 identifier unstring_delimited unstring_into opt_with_pointer unstring_tallying on_overflow end_unstring */ -#line 6015 "parser.y" +#line 6013 "parser.y" { cb_emit_unstring (yyvsp[-6], yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2]); } -#line 11501 "parser.c" +#line 11540 "parser.c" break; case 1132: /* unstring_delimited: %empty */ -#line 6021 "parser.y" +#line 6019 "parser.y" { yyval = NULL; } -#line 11507 "parser.c" +#line 11546 "parser.c" break; case 1133: /* unstring_delimited: DELIMITED _by unstring_delimited_list */ -#line 6023 "parser.y" +#line 6021 "parser.y" { yyval = yyvsp[0]; } -#line 11513 "parser.c" +#line 11552 "parser.c" break; case 1134: /* unstring_delimited_list: unstring_delimited_item */ -#line 6027 "parser.y" +#line 6025 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11519 "parser.c" +#line 11558 "parser.c" break; case 1135: /* unstring_delimited_list: unstring_delimited_list OR unstring_delimited_item */ -#line 6029 "parser.y" +#line 6027 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 11525 "parser.c" +#line 11564 "parser.c" break; case 1136: /* unstring_delimited_item: flag_all simple_value */ -#line 6034 "parser.y" +#line 6032 "parser.y" { yyval = cb_build_unstring_delimited (yyvsp[-1], yyvsp[0]); } -#line 11533 "parser.c" +#line 11572 "parser.c" break; case 1137: /* unstring_into: INTO unstring_into_item */ -#line 6040 "parser.y" +#line 6038 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11539 "parser.c" +#line 11578 "parser.c" break; case 1138: /* unstring_into: unstring_into unstring_into_item */ -#line 6042 "parser.y" +#line 6040 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11545 "parser.c" +#line 11584 "parser.c" break; case 1139: /* unstring_into_item: identifier unstring_into_delimiter unstring_into_count */ -#line 6047 "parser.y" +#line 6045 "parser.y" { yyval = cb_build_unstring_into (yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 11553 "parser.c" +#line 11592 "parser.c" break; case 1140: /* unstring_into_delimiter: %empty */ -#line 6053 "parser.y" +#line 6051 "parser.y" { yyval = NULL; } -#line 11559 "parser.c" +#line 11598 "parser.c" break; case 1141: /* unstring_into_delimiter: DELIMITER _in identifier */ -#line 6054 "parser.y" +#line 6052 "parser.y" { yyval = yyvsp[0]; } -#line 11565 "parser.c" +#line 11604 "parser.c" break; case 1142: /* unstring_into_count: %empty */ -#line 6058 "parser.y" +#line 6056 "parser.y" { yyval = NULL; } -#line 11571 "parser.c" +#line 11610 "parser.c" break; case 1143: /* unstring_into_count: COUNT _in identifier */ -#line 6059 "parser.y" +#line 6057 "parser.y" { yyval = yyvsp[0]; } -#line 11577 "parser.c" +#line 11616 "parser.c" break; case 1144: /* unstring_tallying: %empty */ -#line 6063 "parser.y" +#line 6061 "parser.y" { yyval = NULL; } -#line 11583 "parser.c" +#line 11622 "parser.c" break; case 1145: /* unstring_tallying: TALLYING _in identifier */ -#line 6064 "parser.y" +#line 6062 "parser.y" { yyval = yyvsp[0]; } -#line 11589 "parser.c" +#line 11628 "parser.c" break; case 1146: /* end_unstring: %empty */ -#line 6068 "parser.y" +#line 6066 "parser.y" { terminator_warning (TERM_UNSTRING); } -#line 11595 "parser.c" +#line 11634 "parser.c" break; case 1147: /* end_unstring: "END-UNSTRING" */ -#line 6069 "parser.y" +#line 6067 "parser.y" { terminator_clear (TERM_UNSTRING); } -#line 11601 "parser.c" +#line 11640 "parser.c" break; case 1151: /* use_exception: USE use_global _after _standard exception_or_error _procedure _on use_exception_target */ -#line 6087 "parser.y" +#line 6085 "parser.y" { if (!in_declaratives) { cb_error (_("USE statement must be within DECLARATIVES")); @@ -11619,28 +11658,28 @@ yyparse (void) } } } -#line 11623 "parser.c" +#line 11662 "parser.c" break; case 1152: /* use_global: %empty */ -#line 6108 "parser.y" +#line 6106 "parser.y" { use_global_ind = 0; } -#line 11631 "parser.c" +#line 11670 "parser.c" break; case 1153: /* use_global: GLOBAL */ -#line 6112 "parser.y" +#line 6110 "parser.y" { use_global_ind = 1; current_program->flag_global_use = 1; } -#line 11640 "parser.c" +#line 11679 "parser.c" break; case 1154: /* use_exception_target: file_name_list */ -#line 6120 "parser.y" +#line 6118 "parser.y" { cb_tree l; @@ -11650,69 +11689,69 @@ yyparse (void) } } } -#line 11654 "parser.c" +#line 11693 "parser.c" break; case 1155: /* use_exception_target: INPUT */ -#line 6130 "parser.y" +#line 6128 "parser.y" { current_program->global_handler[COB_OPEN_INPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_INPUT].handler_prog = current_program; } -#line 11663 "parser.c" +#line 11702 "parser.c" break; case 1156: /* use_exception_target: OUTPUT */ -#line 6135 "parser.y" +#line 6133 "parser.y" { current_program->global_handler[COB_OPEN_OUTPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_OUTPUT].handler_prog = current_program; } -#line 11672 "parser.c" +#line 11711 "parser.c" break; case 1157: /* use_exception_target: "I-O" */ -#line 6140 "parser.y" +#line 6138 "parser.y" { current_program->global_handler[COB_OPEN_I_O].handler_label = current_section; current_program->global_handler[COB_OPEN_I_O].handler_prog = current_program; } -#line 11681 "parser.c" +#line 11720 "parser.c" break; case 1158: /* use_exception_target: EXTEND */ -#line 6145 "parser.y" +#line 6143 "parser.y" { current_program->global_handler[COB_OPEN_EXTEND].handler_label = current_section; current_program->global_handler[COB_OPEN_EXTEND].handler_prog = current_program; } -#line 11690 "parser.c" +#line 11729 "parser.c" break; case 1171: /* use_debugging: USE _for DEBUGGING _on use_debugging_target */ -#line 6177 "parser.y" +#line 6175 "parser.y" { PENDING ("USE FOR DEBUGGING"); } -#line 11698 "parser.c" +#line 11737 "parser.c" break; case 1174: /* use_reporting: USE use_global BEFORE REPORTING identifier */ -#line 6189 "parser.y" +#line 6187 "parser.y" { PENDING ("USE BEFORE REPORTING"); } -#line 11706 "parser.c" +#line 11745 "parser.c" break; case 1175: /* $@93: %empty */ -#line 6200 "parser.y" +#line 6198 "parser.y" { BEGIN_STATEMENT ("WRITE", TERM_WRITE); } -#line 11712 "parser.c" +#line 11751 "parser.c" break; case 1176: /* write_statement: WRITE $@93 record_name write_from write_lock write_option write_handler end_write */ -#line 6203 "parser.y" +#line 6201 "parser.y" { if (yyvsp[-5] != cb_error_node) { if (cb_use_invalidkey_handler_on_status34 && @@ -11724,759 +11763,759 @@ yyparse (void) cb_emit_write (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[-3]); } } -#line 11728 "parser.c" +#line 11767 "parser.c" break; case 1177: /* write_from: %empty */ -#line 6217 "parser.y" +#line 6215 "parser.y" { yyval = NULL; } -#line 11734 "parser.c" +#line 11773 "parser.c" break; case 1178: /* write_from: FROM id_or_lit */ -#line 6218 "parser.y" +#line 6216 "parser.y" { yyval = yyvsp[0]; } -#line 11740 "parser.c" +#line 11779 "parser.c" break; case 1179: /* write_option: %empty */ -#line 6223 "parser.y" +#line 6221 "parser.y" { yyval = cb_int0; } -#line 11748 "parser.c" +#line 11787 "parser.c" break; case 1180: /* write_option: before_or_after _advancing num_id_or_lit _line_or_lines */ -#line 6227 "parser.y" +#line 6225 "parser.y" { yyval = cb_build_write_advancing_lines (yyvsp[-3], yyvsp[-1]); } -#line 11756 "parser.c" +#line 11795 "parser.c" break; case 1181: /* write_option: before_or_after _advancing mnemonic_name */ -#line 6231 "parser.y" +#line 6229 "parser.y" { yyval = cb_build_write_advancing_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 11764 "parser.c" +#line 11803 "parser.c" break; case 1182: /* write_option: before_or_after _advancing PAGE */ -#line 6235 "parser.y" +#line 6233 "parser.y" { yyval = cb_build_write_advancing_page (yyvsp[-2]); } -#line 11772 "parser.c" +#line 11811 "parser.c" break; case 1183: /* before_or_after: BEFORE */ -#line 6241 "parser.y" +#line 6239 "parser.y" { yyval = CB_BEFORE; } -#line 11778 "parser.c" +#line 11817 "parser.c" break; case 1184: /* before_or_after: AFTER */ -#line 6242 "parser.y" +#line 6240 "parser.y" { yyval = CB_AFTER; } -#line 11784 "parser.c" +#line 11823 "parser.c" break; case 1188: /* end_write: %empty */ -#line 6251 "parser.y" +#line 6249 "parser.y" { terminator_warning (TERM_WRITE); } -#line 11790 "parser.c" +#line 11829 "parser.c" break; case 1189: /* end_write: "END-WRITE" */ -#line 6252 "parser.y" +#line 6250 "parser.y" { terminator_clear (TERM_WRITE); } -#line 11796 "parser.c" +#line 11835 "parser.c" break; case 1190: /* on_accp_exception: opt_on_exception opt_not_on_exception */ -#line 6267 "parser.y" +#line 6265 "parser.y" { current_statement->handler_id = COB_EC_IMP_ACCEPT; } -#line 11804 "parser.c" +#line 11843 "parser.c" break; case 1191: /* on_disp_exception: opt_on_exception opt_not_on_exception */ -#line 6275 "parser.y" +#line 6273 "parser.y" { current_statement->handler_id = COB_EC_IMP_DISPLAY; } -#line 11812 "parser.c" +#line 11851 "parser.c" break; case 1193: /* $@94: %empty */ -#line 6282 "parser.y" +#line 6280 "parser.y" { check_unreached = 0; } -#line 11820 "parser.c" +#line 11859 "parser.c" break; case 1194: /* opt_on_exception: EXCEPTION $@94 statement_list */ -#line 6286 "parser.y" +#line 6284 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11828 "parser.c" +#line 11867 "parser.c" break; case 1196: /* $@95: %empty */ -#line 6293 "parser.y" +#line 6291 "parser.y" { check_unreached = 0; } -#line 11836 "parser.c" +#line 11875 "parser.c" break; case 1197: /* opt_not_on_exception: "NOT EXCEPTION" $@95 statement_list */ -#line 6297 "parser.y" +#line 6295 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11844 "parser.c" +#line 11883 "parser.c" break; case 1200: /* $@96: %empty */ -#line 6313 "parser.y" +#line 6311 "parser.y" { check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11853 "parser.c" +#line 11892 "parser.c" break; case 1201: /* opt_on_size_error: "SIZE ERROR" $@96 statement_list */ -#line 6318 "parser.y" +#line 6316 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11861 "parser.c" +#line 11900 "parser.c" break; case 1203: /* $@97: %empty */ -#line 6325 "parser.y" +#line 6323 "parser.y" { check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11870 "parser.c" +#line 11909 "parser.c" break; case 1204: /* opt_not_on_size_error: "NOT SIZE ERROR" $@97 statement_list */ -#line 6330 "parser.y" +#line 6328 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11878 "parser.c" +#line 11917 "parser.c" break; case 1205: /* on_overflow: opt_on_overflow opt_not_on_overflow */ -#line 6342 "parser.y" +#line 6340 "parser.y" { current_statement->handler_id = COB_EC_OVERFLOW; } -#line 11886 "parser.c" +#line 11925 "parser.c" break; case 1207: /* $@98: %empty */ -#line 6349 "parser.y" +#line 6347 "parser.y" { check_unreached = 0; } -#line 11894 "parser.c" +#line 11933 "parser.c" break; case 1208: /* opt_on_overflow: OVERFLOW $@98 statement_list */ -#line 6353 "parser.y" +#line 6351 "parser.y" { current_statement->handler1 = yyvsp[0]; } -#line 11902 "parser.c" +#line 11941 "parser.c" break; case 1210: /* $@99: %empty */ -#line 6360 "parser.y" +#line 6358 "parser.y" { check_unreached = 0; } -#line 11910 "parser.c" +#line 11949 "parser.c" break; case 1211: /* opt_not_on_overflow: "NOT OVERFLOW" $@99 statement_list */ -#line 6364 "parser.y" +#line 6362 "parser.y" { current_statement->handler2 = yyvsp[0]; } -#line 11918 "parser.c" +#line 11957 "parser.c" break; case 1212: /* at_end: at_end_sentence */ -#line 6376 "parser.y" +#line 6374 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[0]; } -#line 11927 "parser.c" +#line 11966 "parser.c" break; case 1213: /* at_end: not_at_end_sentence */ -#line 6381 "parser.y" +#line 6379 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler2 = yyvsp[0]; } -#line 11936 "parser.c" +#line 11975 "parser.c" break; case 1214: /* at_end: at_end_sentence not_at_end_sentence */ -#line 6386 "parser.y" +#line 6384 "parser.y" { current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 11946 "parser.c" +#line 11985 "parser.c" break; case 1215: /* $@100: %empty */ -#line 6395 "parser.y" +#line 6393 "parser.y" { check_unreached = 0; } -#line 11954 "parser.c" +#line 11993 "parser.c" break; case 1216: /* at_end_sentence: END $@100 statement_list */ -#line 6399 "parser.y" +#line 6397 "parser.y" { yyval = yyvsp[0]; } -#line 11962 "parser.c" +#line 12001 "parser.c" break; case 1217: /* $@101: %empty */ -#line 6406 "parser.y" +#line 6404 "parser.y" { check_unreached = 0; } -#line 11970 "parser.c" +#line 12009 "parser.c" break; case 1218: /* not_at_end_sentence: "NOT END" $@101 statement_list */ -#line 6410 "parser.y" +#line 6408 "parser.y" { yyval = yyvsp[0]; } -#line 11978 "parser.c" +#line 12017 "parser.c" break; case 1219: /* at_eop: at_eop_sentence */ -#line 6422 "parser.y" +#line 6420 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[0]; } -#line 11987 "parser.c" +#line 12026 "parser.c" break; case 1220: /* at_eop: not_at_eop_sentence */ -#line 6427 "parser.y" +#line 6425 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler2 = yyvsp[0]; } -#line 11996 "parser.c" +#line 12035 "parser.c" break; case 1221: /* at_eop: at_eop_sentence not_at_eop_sentence */ -#line 6432 "parser.y" +#line 6430 "parser.y" { current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12006 "parser.c" +#line 12045 "parser.c" break; case 1222: /* $@102: %empty */ -#line 6441 "parser.y" +#line 6439 "parser.y" { check_unreached = 0; } -#line 12014 "parser.c" +#line 12053 "parser.c" break; case 1223: /* at_eop_sentence: EOP $@102 statement_list */ -#line 6445 "parser.y" +#line 6443 "parser.y" { yyval = yyvsp[0]; } -#line 12022 "parser.c" +#line 12061 "parser.c" break; case 1224: /* $@103: %empty */ -#line 6452 "parser.y" +#line 6450 "parser.y" { check_unreached = 0; } -#line 12030 "parser.c" +#line 12069 "parser.c" break; case 1225: /* not_at_eop_sentence: "NOT EOP" $@103 statement_list */ -#line 6456 "parser.y" +#line 6454 "parser.y" { yyval = yyvsp[0]; } -#line 12038 "parser.c" +#line 12077 "parser.c" break; case 1228: /* invalid_key: invalid_key_sentence */ -#line 6472 "parser.y" +#line 6470 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[0]; } -#line 12047 "parser.c" +#line 12086 "parser.c" break; case 1229: /* invalid_key: not_invalid_key_sentence */ -#line 6477 "parser.y" +#line 6475 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler2 = yyvsp[0]; } -#line 12056 "parser.c" +#line 12095 "parser.c" break; case 1230: /* invalid_key: invalid_key_sentence not_invalid_key_sentence */ -#line 6482 "parser.y" +#line 6480 "parser.y" { current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12066 "parser.c" +#line 12105 "parser.c" break; case 1231: /* $@104: %empty */ -#line 6491 "parser.y" +#line 6489 "parser.y" { check_unreached = 0; } -#line 12074 "parser.c" +#line 12113 "parser.c" break; case 1232: /* invalid_key_sentence: "INVALID KEY" $@104 statement_list */ -#line 6495 "parser.y" +#line 6493 "parser.y" { yyval = yyvsp[0]; } -#line 12082 "parser.c" +#line 12121 "parser.c" break; case 1233: /* $@105: %empty */ -#line 6502 "parser.y" +#line 6500 "parser.y" { check_unreached = 0; } -#line 12090 "parser.c" +#line 12129 "parser.c" break; case 1234: /* not_invalid_key_sentence: "NOT INVALID KEY" $@105 statement_list */ -#line 6506 "parser.y" +#line 6504 "parser.y" { yyval = yyvsp[0]; } -#line 12098 "parser.c" +#line 12137 "parser.c" break; case 1235: /* _opt_scroll_lines: %empty */ -#line 6518 "parser.y" +#line 6516 "parser.y" { yyval = cb_one; } -#line 12106 "parser.c" +#line 12145 "parser.c" break; case 1236: /* _opt_scroll_lines: _by num_id_or_lit _line_or_lines */ -#line 6522 "parser.y" +#line 6520 "parser.y" { yyval = yyvsp[-1]; } -#line 12114 "parser.c" +#line 12153 "parser.c" break; case 1237: /* condition: expr */ -#line 6534 "parser.y" +#line 6532 "parser.y" { yyval = cb_build_cond (yyvsp[0]); } -#line 12122 "parser.c" +#line 12161 "parser.c" break; case 1238: /* expr: partial_expr */ -#line 6541 "parser.y" +#line 6539 "parser.y" { yyval = cb_build_expr (yyvsp[0]); } -#line 12130 "parser.c" +#line 12169 "parser.c" break; case 1239: /* $@106: %empty */ -#line 6547 "parser.y" +#line 6545 "parser.y" { current_expr = NULL; } -#line 12138 "parser.c" +#line 12177 "parser.c" break; case 1240: /* partial_expr: $@106 expr_tokens */ -#line 6551 "parser.y" +#line 6549 "parser.y" { yyval = cb_list_reverse (current_expr); } -#line 12146 "parser.c" +#line 12185 "parser.c" break; case 1241: /* expr_tokens: expr_token x */ -#line 6557 "parser.y" +#line 6555 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12152 "parser.c" +#line 12191 "parser.c" break; case 1242: /* expr_tokens: expr_tokens ')' */ -#line 6558 "parser.y" +#line 6556 "parser.y" { push_expr (')', NULL); } -#line 12158 "parser.c" +#line 12197 "parser.c" break; case 1243: /* expr_tokens: expr_token OMITTED */ -#line 6560 "parser.y" +#line 6558 "parser.y" { push_expr ('O', NULL); } -#line 12164 "parser.c" +#line 12203 "parser.c" break; case 1244: /* expr_tokens: expr_token NUMERIC */ -#line 6561 "parser.y" +#line 6559 "parser.y" { push_expr ('9', NULL); } -#line 12170 "parser.c" +#line 12209 "parser.c" break; case 1245: /* expr_tokens: expr_token ALPHABETIC */ -#line 6562 "parser.y" +#line 6560 "parser.y" { push_expr ('A', NULL); } -#line 12176 "parser.c" +#line 12215 "parser.c" break; case 1246: /* expr_tokens: expr_token "ALPHABETIC-LOWER" */ -#line 6563 "parser.y" +#line 6561 "parser.y" { push_expr ('L', NULL); } -#line 12182 "parser.c" +#line 12221 "parser.c" break; case 1247: /* expr_tokens: expr_token "ALPHABETIC-UPPER" */ -#line 6564 "parser.y" +#line 6562 "parser.y" { push_expr ('U', NULL); } -#line 12188 "parser.c" +#line 12227 "parser.c" break; case 1248: /* expr_tokens: expr_token CLASS_NAME */ -#line 6565 "parser.y" +#line 6563 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12194 "parser.c" +#line 12233 "parser.c" break; case 1249: /* expr_tokens: expr_tokens OMITTED */ -#line 6567 "parser.y" +#line 6565 "parser.y" { push_expr ('O', NULL); } -#line 12200 "parser.c" +#line 12239 "parser.c" break; case 1250: /* expr_tokens: expr_tokens NUMERIC */ -#line 6568 "parser.y" +#line 6566 "parser.y" { push_expr ('9', NULL); } -#line 12206 "parser.c" +#line 12245 "parser.c" break; case 1251: /* expr_tokens: expr_tokens ALPHABETIC */ -#line 6569 "parser.y" +#line 6567 "parser.y" { push_expr ('A', NULL); } -#line 12212 "parser.c" +#line 12251 "parser.c" break; case 1252: /* expr_tokens: expr_tokens "ALPHABETIC-LOWER" */ -#line 6570 "parser.y" +#line 6568 "parser.y" { push_expr ('L', NULL); } -#line 12218 "parser.c" +#line 12257 "parser.c" break; case 1253: /* expr_tokens: expr_tokens "ALPHABETIC-UPPER" */ -#line 6571 "parser.y" +#line 6569 "parser.y" { push_expr ('U', NULL); } -#line 12224 "parser.c" +#line 12263 "parser.c" break; case 1254: /* expr_tokens: expr_tokens CLASS_NAME */ -#line 6572 "parser.y" +#line 6570 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12230 "parser.c" +#line 12269 "parser.c" break; case 1255: /* expr_tokens: expr_token POSITIVE */ -#line 6574 "parser.y" +#line 6572 "parser.y" { push_expr ('P', NULL); } -#line 12236 "parser.c" +#line 12275 "parser.c" break; case 1256: /* expr_tokens: expr_token NEGATIVE */ -#line 6575 "parser.y" +#line 6573 "parser.y" { push_expr ('N', NULL); } -#line 12242 "parser.c" +#line 12281 "parser.c" break; case 1257: /* expr_tokens: expr_tokens POSITIVE */ -#line 6577 "parser.y" +#line 6575 "parser.y" { push_expr ('P', NULL); } -#line 12248 "parser.c" +#line 12287 "parser.c" break; case 1258: /* expr_tokens: expr_tokens NEGATIVE */ -#line 6578 "parser.y" +#line 6576 "parser.y" { push_expr ('N', NULL); } -#line 12254 "parser.c" +#line 12293 "parser.c" break; case 1259: /* expr_tokens: expr_tokens ZERO */ -#line 6579 "parser.y" +#line 6577 "parser.y" { push_expr ('x', cb_zero); } -#line 12260 "parser.c" +#line 12299 "parser.c" break; case 1263: /* expr_token: expr_token '(' */ -#line 6586 "parser.y" +#line 6584 "parser.y" { push_expr ('(', NULL); } -#line 12266 "parser.c" +#line 12305 "parser.c" break; case 1264: /* expr_token: expr_token '+' */ -#line 6588 "parser.y" +#line 6586 "parser.y" { push_expr ('+', NULL); } -#line 12272 "parser.c" +#line 12311 "parser.c" break; case 1265: /* expr_token: expr_token '-' */ -#line 6589 "parser.y" +#line 6587 "parser.y" { push_expr ('-', NULL); } -#line 12278 "parser.c" +#line 12317 "parser.c" break; case 1266: /* expr_token: expr_token '^' */ -#line 6590 "parser.y" +#line 6588 "parser.y" { push_expr ('^', NULL); } -#line 12284 "parser.c" +#line 12323 "parser.c" break; case 1267: /* expr_token: expr_token NOT */ -#line 6592 "parser.y" +#line 6590 "parser.y" { push_expr ('!', NULL); } -#line 12290 "parser.c" +#line 12329 "parser.c" break; case 1268: /* expr_token: expr_tokens NOT */ -#line 6593 "parser.y" +#line 6591 "parser.y" { push_expr ('!', NULL); } -#line 12296 "parser.c" +#line 12335 "parser.c" break; case 1269: /* expr_token: expr_tokens '+' */ -#line 6595 "parser.y" +#line 6593 "parser.y" { push_expr ('+', NULL); } -#line 12302 "parser.c" +#line 12341 "parser.c" break; case 1270: /* expr_token: expr_tokens '-' */ -#line 6596 "parser.y" +#line 6594 "parser.y" { push_expr ('-', NULL); } -#line 12308 "parser.c" +#line 12347 "parser.c" break; case 1271: /* expr_token: expr_tokens '*' */ -#line 6597 "parser.y" +#line 6595 "parser.y" { push_expr ('*', NULL); } -#line 12314 "parser.c" +#line 12353 "parser.c" break; case 1272: /* expr_token: expr_tokens '/' */ -#line 6598 "parser.y" +#line 6596 "parser.y" { push_expr ('/', NULL); } -#line 12320 "parser.c" +#line 12359 "parser.c" break; case 1273: /* expr_token: expr_tokens '^' */ -#line 6599 "parser.y" +#line 6597 "parser.y" { push_expr ('^', NULL); } -#line 12326 "parser.c" +#line 12365 "parser.c" break; case 1274: /* expr_token: expr_tokens eq */ -#line 6601 "parser.y" +#line 6599 "parser.y" { push_expr ('=', NULL); } -#line 12332 "parser.c" +#line 12371 "parser.c" break; case 1275: /* expr_token: expr_tokens gt */ -#line 6602 "parser.y" +#line 6600 "parser.y" { push_expr ('>', NULL); } -#line 12338 "parser.c" +#line 12377 "parser.c" break; case 1276: /* expr_token: expr_tokens lt */ -#line 6603 "parser.y" +#line 6601 "parser.y" { push_expr ('<', NULL); } -#line 12344 "parser.c" +#line 12383 "parser.c" break; case 1277: /* expr_token: expr_tokens ge */ -#line 6604 "parser.y" +#line 6602 "parser.y" { push_expr (']', NULL); } -#line 12350 "parser.c" +#line 12389 "parser.c" break; case 1278: /* expr_token: expr_tokens le */ -#line 6605 "parser.y" +#line 6603 "parser.y" { push_expr ('[', NULL); } -#line 12356 "parser.c" +#line 12395 "parser.c" break; case 1279: /* expr_token: expr_tokens NE */ -#line 6606 "parser.y" +#line 6604 "parser.y" { push_expr ('~', NULL); } -#line 12362 "parser.c" +#line 12401 "parser.c" break; case 1280: /* expr_token: expr_token eq */ -#line 6608 "parser.y" +#line 6606 "parser.y" { push_expr ('=', NULL); } -#line 12368 "parser.c" +#line 12407 "parser.c" break; case 1281: /* expr_token: expr_token gt */ -#line 6609 "parser.y" +#line 6607 "parser.y" { push_expr ('>', NULL); } -#line 12374 "parser.c" +#line 12413 "parser.c" break; case 1282: /* expr_token: expr_token lt */ -#line 6610 "parser.y" +#line 6608 "parser.y" { push_expr ('<', NULL); } -#line 12380 "parser.c" +#line 12419 "parser.c" break; case 1283: /* expr_token: expr_token ge */ -#line 6611 "parser.y" +#line 6609 "parser.y" { push_expr (']', NULL); } -#line 12386 "parser.c" +#line 12425 "parser.c" break; case 1284: /* expr_token: expr_token le */ -#line 6612 "parser.y" +#line 6610 "parser.y" { push_expr ('[', NULL); } -#line 12392 "parser.c" +#line 12431 "parser.c" break; case 1285: /* expr_token: expr_token NE */ -#line 6613 "parser.y" +#line 6611 "parser.y" { push_expr ('~', NULL); } -#line 12398 "parser.c" +#line 12437 "parser.c" break; case 1286: /* expr_token: expr_tokens AND */ -#line 6615 "parser.y" +#line 6613 "parser.y" { push_expr ('&', NULL); } -#line 12404 "parser.c" +#line 12443 "parser.c" break; case 1287: /* expr_token: expr_tokens OR */ -#line 6616 "parser.y" +#line 6614 "parser.y" { push_expr ('|', NULL); } -#line 12410 "parser.c" +#line 12449 "parser.c" break; case 1301: /* exp_list: exp */ -#line 6628 "parser.y" +#line 6626 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12416 "parser.c" +#line 12455 "parser.c" break; case 1302: /* exp_list: exp_list e_sep exp */ -#line 6629 "parser.y" +#line 6627 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 12422 "parser.c" +#line 12461 "parser.c" break; case 1306: /* exp: arith_x */ -#line 6638 "parser.y" +#line 6636 "parser.y" { yyval = yyvsp[0]; } -#line 12428 "parser.c" +#line 12467 "parser.c" break; case 1307: /* exp: exp '+' exp */ -#line 6639 "parser.y" +#line 6637 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '+', yyvsp[0]); } -#line 12434 "parser.c" +#line 12473 "parser.c" break; case 1308: /* exp: exp '-' exp */ -#line 6640 "parser.y" +#line 6638 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '-', yyvsp[0]); } -#line 12440 "parser.c" +#line 12479 "parser.c" break; case 1309: /* exp: exp '*' exp */ -#line 6641 "parser.y" +#line 6639 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '*', yyvsp[0]); } -#line 12446 "parser.c" +#line 12485 "parser.c" break; case 1310: /* exp: exp '/' exp */ -#line 6642 "parser.y" +#line 6640 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '/', yyvsp[0]); } -#line 12452 "parser.c" +#line 12491 "parser.c" break; case 1311: /* exp: '+' exp */ -#line 6643 "parser.y" +#line 6641 "parser.y" { yyval = yyvsp[0]; } -#line 12458 "parser.c" +#line 12497 "parser.c" break; case 1312: /* exp: '-' exp */ -#line 6644 "parser.y" +#line 6642 "parser.y" { yyval = cb_build_binary_op (cb_zero, '-', yyvsp[0]); } -#line 12464 "parser.c" +#line 12503 "parser.c" break; case 1313: /* exp: exp '^' exp */ -#line 6645 "parser.y" +#line 6643 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '^', yyvsp[0]); } -#line 12470 "parser.c" +#line 12509 "parser.c" break; case 1314: /* exp: '(' exp ')' */ -#line 6646 "parser.y" +#line 6644 "parser.y" { yyval = yyvsp[-1]; } -#line 12476 "parser.c" +#line 12515 "parser.c" break; case 1315: /* linage_counter: "LINAGE-COUNTER" */ -#line 6658 "parser.y" +#line 6656 "parser.y" { if (current_linage > 1) { cb_error (_("LINAGE-COUNTER must be qualified here")); @@ -12488,11 +12527,11 @@ yyparse (void) yyval = linage_file->linage_ctr; } } -#line 12492 "parser.c" +#line 12531 "parser.c" break; case 1316: /* linage_counter: "LINAGE-COUNTER" in_of "Identifier" */ -#line 6670 "parser.y" +#line 6668 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[0]))) { yyval = CB_FILE (cb_ref (yyvsp[0]))->linage_ctr; @@ -12501,29 +12540,29 @@ yyparse (void) yyval = cb_error_node; } } -#line 12505 "parser.c" +#line 12544 "parser.c" break; case 1317: /* arithmetic_x_list: arithmetic_x */ -#line 6684 "parser.y" +#line 6682 "parser.y" { yyval = yyvsp[0]; } -#line 12511 "parser.c" +#line 12550 "parser.c" break; case 1318: /* arithmetic_x_list: arithmetic_x_list arithmetic_x */ -#line 6686 "parser.y" +#line 6684 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 12517 "parser.c" +#line 12556 "parser.c" break; case 1319: /* arithmetic_x: x flag_rounded */ -#line 6690 "parser.y" +#line 6688 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 12523 "parser.c" +#line 12562 "parser.c" break; case 1320: /* record_name: qualified_word */ -#line 6697 "parser.y" +#line 6695 "parser.y" { cb_tree x; cb_tree r; @@ -12540,11 +12579,11 @@ yyparse (void) } yyval = x; } -#line 12544 "parser.c" +#line 12583 "parser.c" break; case 1321: /* table_name: qualified_word */ -#line 6719 "parser.y" +#line 6717 "parser.y" { cb_tree x; @@ -12559,19 +12598,19 @@ yyparse (void) yyval = yyvsp[0]; } } -#line 12563 "parser.c" +#line 12602 "parser.c" break; case 1322: /* file_name_list: file_name */ -#line 6739 "parser.y" +#line 6737 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12571 "parser.c" +#line 12610 "parser.c" break; case 1323: /* file_name_list: file_name_list file_name */ -#line 6743 "parser.y" +#line 6741 "parser.y" { cb_tree l; @@ -12584,11 +12623,11 @@ yyparse (void) yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } } -#line 12588 "parser.c" +#line 12627 "parser.c" break; case 1324: /* file_name: "Identifier" */ -#line 6759 "parser.y" +#line 6757 "parser.y" { if (CB_FILE_P (cb_ref (yyvsp[0]))) { yyval = yyvsp[0]; @@ -12597,106 +12636,106 @@ yyparse (void) yyval = cb_error_node; } } -#line 12601 "parser.c" +#line 12640 "parser.c" break; case 1325: /* mnemonic_name_list: mnemonic_name */ -#line 6772 "parser.y" +#line 6770 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12607 "parser.c" +#line 12646 "parser.c" break; case 1326: /* mnemonic_name_list: mnemonic_name_list mnemonic_name */ -#line 6774 "parser.y" +#line 6772 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12613 "parser.c" +#line 12652 "parser.c" break; case 1327: /* mnemonic_name: "MNEMONIC NAME" */ -#line 6778 "parser.y" +#line 6776 "parser.y" { yyval = yyvsp[0]; } -#line 12619 "parser.c" +#line 12658 "parser.c" break; case 1328: /* procedure_name_list: %empty */ -#line 6784 "parser.y" +#line 6782 "parser.y" { yyval = NULL; } -#line 12625 "parser.c" +#line 12664 "parser.c" break; case 1329: /* procedure_name_list: procedure_name_list procedure_name */ -#line 6786 "parser.y" +#line 6784 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12631 "parser.c" +#line 12670 "parser.c" break; case 1330: /* procedure_name: label */ -#line 6791 "parser.y" +#line 6789 "parser.y" { yyval = yyvsp[0]; CB_REFERENCE (yyval)->offset = CB_TREE (current_section); current_program->label_list = cb_cons (yyval, current_program->label_list); } -#line 12641 "parser.c" +#line 12680 "parser.c" break; case 1334: /* integer_label: "Literal" */ -#line 6806 "parser.y" +#line 6804 "parser.y" { yyval = cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)); yyval->source_file = yyvsp[0]->source_file; yyval->source_line = yyvsp[0]->source_line; } -#line 12651 "parser.c" +#line 12690 "parser.c" break; case 1335: /* reference_list: reference */ -#line 6816 "parser.y" +#line 6814 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12657 "parser.c" +#line 12696 "parser.c" break; case 1336: /* reference_list: reference_list reference */ -#line 6817 "parser.y" +#line 6815 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12663 "parser.c" +#line 12702 "parser.c" break; case 1337: /* reference: qualified_word */ -#line 6822 "parser.y" +#line 6820 "parser.y" { yyval = yyvsp[0]; current_program->reference_list = cb_cons (yyval, current_program->reference_list); } -#line 12672 "parser.c" +#line 12711 "parser.c" break; case 1338: /* no_reference_list: qualified_word */ -#line 6831 "parser.y" +#line 6829 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12678 "parser.c" +#line 12717 "parser.c" break; case 1339: /* no_reference_list: no_reference_list qualified_word */ -#line 6832 "parser.y" +#line 6830 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12684 "parser.c" +#line 12723 "parser.c" break; case 1340: /* opt_reference: %empty */ -#line 6836 "parser.y" +#line 6834 "parser.y" { yyval = NULL; } -#line 12690 "parser.c" +#line 12729 "parser.c" break; case 1341: /* opt_reference: reference */ -#line 6837 "parser.y" +#line 6835 "parser.y" { yyval = yyvsp[0]; } -#line 12696 "parser.c" +#line 12735 "parser.c" break; case 1344: /* undefined_word: "Identifier" */ -#line 6849 "parser.y" +#line 6847 "parser.y" { yyval = yyvsp[0]; if (CB_REFERENCE (yyval)->word->count > 0) { @@ -12704,160 +12743,160 @@ yyparse (void) yyval = cb_error_node; } } -#line 12708 "parser.c" +#line 12747 "parser.c" break; case 1345: /* target_x_list: target_x */ -#line 6868 "parser.y" +#line 6866 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12714 "parser.c" +#line 12753 "parser.c" break; case 1346: /* target_x_list: target_x_list target_x */ -#line 6869 "parser.y" +#line 6867 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12720 "parser.c" +#line 12759 "parser.c" break; case 1348: /* target_x: ADDRESS _of identifier_1 */ -#line 6874 "parser.y" +#line 6872 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12726 "parser.c" +#line 12765 "parser.c" break; case 1349: /* x_list: x */ -#line 6878 "parser.y" +#line 6876 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12732 "parser.c" +#line 12771 "parser.c" break; case 1350: /* x_list: x_list x */ -#line 6879 "parser.y" +#line 6877 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12738 "parser.c" +#line 12777 "parser.c" break; case 1352: /* x: LENGTH _of identifier_1 */ -#line 6884 "parser.y" +#line 6882 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12744 "parser.c" +#line 12783 "parser.c" break; case 1353: /* x: LENGTH _of basic_literal */ -#line 6885 "parser.y" +#line 6883 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12750 "parser.c" +#line 12789 "parser.c" break; case 1354: /* x: LENGTH _of function */ -#line 6886 "parser.y" +#line 6884 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12756 "parser.c" +#line 12795 "parser.c" break; case 1355: /* x: ADDRESS _of prog_or_entry alnum_or_id */ -#line 6887 "parser.y" +#line 6885 "parser.y" { yyval = cb_build_ppointer (yyvsp[0]); } -#line 12762 "parser.c" +#line 12801 "parser.c" break; case 1356: /* x: ADDRESS _of identifier_1 */ -#line 6888 "parser.y" +#line 6886 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12768 "parser.c" +#line 12807 "parser.c" break; case 1361: /* arith_x: LENGTH _of identifier_1 */ -#line 6896 "parser.y" +#line 6894 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12774 "parser.c" +#line 12813 "parser.c" break; case 1362: /* arith_x: LENGTH _of basic_literal */ -#line 6897 "parser.y" +#line 6895 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12780 "parser.c" +#line 12819 "parser.c" break; case 1363: /* arith_x: LENGTH _of function */ -#line 6898 "parser.y" +#line 6896 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12786 "parser.c" +#line 12825 "parser.c" break; case 1369: /* alnum_or_id: identifier_1 */ -#line 6910 "parser.y" +#line 6908 "parser.y" { yyval = yyvsp[0]; } -#line 12792 "parser.c" +#line 12831 "parser.c" break; case 1370: /* alnum_or_id: "Literal" */ -#line 6911 "parser.y" +#line 6909 "parser.y" { yyval = yyvsp[0]; } -#line 12798 "parser.c" +#line 12837 "parser.c" break; case 1382: /* num_id_or_lit: ZERO */ -#line 6945 "parser.y" +#line 6943 "parser.y" { yyval = cb_zero; } -#line 12804 "parser.c" +#line 12843 "parser.c" break; case 1383: /* identifier: identifier_1 */ -#line 6953 "parser.y" +#line 6951 "parser.y" { yyval = cb_build_identifier (yyvsp[0]); } -#line 12810 "parser.c" +#line 12849 "parser.c" break; case 1384: /* identifier_1: qualified_word */ -#line 6957 "parser.y" +#line 6955 "parser.y" { yyval = yyvsp[0]; } -#line 12816 "parser.c" +#line 12855 "parser.c" break; case 1385: /* identifier_1: qualified_word subref */ -#line 6958 "parser.y" +#line 6956 "parser.y" { yyval = yyvsp[-1]; } -#line 12822 "parser.c" +#line 12861 "parser.c" break; case 1386: /* identifier_1: qualified_word refmod */ -#line 6959 "parser.y" +#line 6957 "parser.y" { yyval = yyvsp[-1]; } -#line 12828 "parser.c" +#line 12867 "parser.c" break; case 1387: /* identifier_1: qualified_word subref refmod */ -#line 6960 "parser.y" +#line 6958 "parser.y" { yyval = yyvsp[-2]; } -#line 12834 "parser.c" +#line 12873 "parser.c" break; case 1388: /* qualified_word: "Identifier" */ -#line 6964 "parser.y" +#line 6962 "parser.y" { yyval = yyvsp[0]; } -#line 12840 "parser.c" +#line 12879 "parser.c" break; case 1389: /* qualified_word: "Identifier" in_of qualified_word */ -#line 6965 "parser.y" +#line 6963 "parser.y" { yyval = yyvsp[-2]; CB_REFERENCE (yyvsp[-2])->chain = yyvsp[0]; } -#line 12846 "parser.c" +#line 12885 "parser.c" break; case 1390: /* subref: '(' exp_list ')' */ -#line 6970 "parser.y" +#line 6968 "parser.y" { if (cb_ref (yyvsp[-3]) != cb_error_node) { yyval = yyvsp[-3]; CB_REFERENCE (yyvsp[-3])->subs = cb_list_reverse (yyvsp[-1]); } } -#line 12857 "parser.c" +#line 12896 "parser.c" break; case 1391: /* refmod: '(' exp ':' ')' */ -#line 6980 "parser.y" +#line 6978 "parser.y" { if (cb_ref (yyvsp[-4]) != cb_error_node) { CB_REFERENCE (yyvsp[-4])->value = CB_TREE (cb_field (yyvsp[-4])); @@ -12871,11 +12910,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-4])->offset = yyvsp[-2]; } } -#line 12875 "parser.c" +#line 12914 "parser.c" break; case 1392: /* refmod: '(' exp ':' exp ')' */ -#line 6994 "parser.y" +#line 6992 "parser.y" { if (cb_ref (yyvsp[-5]) != cb_error_node) { CB_REFERENCE (yyvsp[-5])->value = CB_TREE (cb_field (yyvsp[-5])); @@ -12891,11 +12930,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-5])->length = yyvsp[-1]; } } -#line 12895 "parser.c" +#line 12934 "parser.c" break; case 1393: /* integer: "Literal" */ -#line 7017 "parser.y" +#line 7015 "parser.y" { if (cb_tree_category (yyvsp[0]) != CB_CATEGORY_NUMERIC) { cb_error (_("Integer value expected")); @@ -12904,437 +12943,437 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 12908 "parser.c" +#line 12947 "parser.c" break; case 1394: /* literal: basic_literal */ -#line 7028 "parser.y" +#line 7026 "parser.y" { yyval = yyvsp[0]; } -#line 12914 "parser.c" +#line 12953 "parser.c" break; case 1395: /* literal: ALL basic_value */ -#line 7030 "parser.y" +#line 7028 "parser.y" { yyval = yyvsp[0]; if (CB_LITERAL_P (yyvsp[0])) { CB_LITERAL (yyvsp[0])->all = 1; } } -#line 12925 "parser.c" +#line 12964 "parser.c" break; case 1396: /* basic_literal: basic_value */ -#line 7039 "parser.y" +#line 7037 "parser.y" { yyval = yyvsp[0]; } -#line 12931 "parser.c" +#line 12970 "parser.c" break; case 1397: /* basic_literal: basic_literal '&' basic_value */ -#line 7040 "parser.y" +#line 7038 "parser.y" { yyval = cb_concat_literals (yyvsp[-2], yyvsp[0]); } -#line 12937 "parser.c" +#line 12976 "parser.c" break; case 1398: /* basic_value: "Literal" */ -#line 7044 "parser.y" +#line 7042 "parser.y" { yyval = yyvsp[0]; } -#line 12943 "parser.c" +#line 12982 "parser.c" break; case 1399: /* basic_value: SPACE */ -#line 7045 "parser.y" +#line 7043 "parser.y" { yyval = cb_space; } -#line 12949 "parser.c" +#line 12988 "parser.c" break; case 1400: /* basic_value: ZERO */ -#line 7046 "parser.y" +#line 7044 "parser.y" { yyval = cb_zero; } -#line 12955 "parser.c" +#line 12994 "parser.c" break; case 1401: /* basic_value: QUOTE */ -#line 7047 "parser.y" +#line 7045 "parser.y" { yyval = cb_quote; } -#line 12961 "parser.c" +#line 13000 "parser.c" break; case 1402: /* basic_value: "HIGH-VALUE" */ -#line 7048 "parser.y" +#line 7046 "parser.y" { yyval = cb_high; } -#line 12967 "parser.c" +#line 13006 "parser.c" break; case 1403: /* basic_value: "LOW-VALUE" */ -#line 7049 "parser.y" +#line 7047 "parser.y" { yyval = cb_low; } -#line 12973 "parser.c" +#line 13012 "parser.c" break; case 1404: /* basic_value: "NULL" */ -#line 7050 "parser.y" +#line 7048 "parser.y" { yyval = cb_null; } -#line 12979 "parser.c" +#line 13018 "parser.c" break; case 1405: /* function: "FUNCTION CURRENT-DATE" func_refmod */ -#line 7059 "parser.y" +#line 7057 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12987 "parser.c" +#line 13026 "parser.c" break; case 1406: /* function: "FUNCTION WHEN-COMPILED" func_refmod */ -#line 7063 "parser.y" +#line 7061 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12995 "parser.c" +#line 13034 "parser.c" break; case 1407: /* function: "FUNCTION UPPER-CASE" '(' exp ')' func_refmod */ -#line 7067 "parser.y" +#line 7065 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13003 "parser.c" +#line 13042 "parser.c" break; case 1408: /* function: "FUNCTION LOWER-CASE" '(' exp ')' func_refmod */ -#line 7071 "parser.y" +#line 7069 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13011 "parser.c" +#line 13050 "parser.c" break; case 1409: /* function: "FUNCTION REVERSE" '(' exp ')' func_refmod */ -#line 7075 "parser.y" +#line 7073 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13019 "parser.c" +#line 13058 "parser.c" break; case 1410: /* function: "FUNCTION CONCATENATE" '(' exp_list ')' func_refmod */ -#line 7079 "parser.y" +#line 7077 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13027 "parser.c" +#line 13066 "parser.c" break; case 1411: /* function: "FUNCTION SUBSTITUTE" '(' exp_list ')' func_refmod */ -#line 7083 "parser.y" +#line 7081 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13035 "parser.c" +#line 13074 "parser.c" break; case 1412: /* function: "FUNCTION SUBSTITUTE-CASE" '(' exp_list ')' func_refmod */ -#line 7087 "parser.y" +#line 7085 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13043 "parser.c" +#line 13082 "parser.c" break; case 1413: /* function: "FUNCTION TRIM" '(' trim_args ')' func_refmod */ -#line 7091 "parser.y" +#line 7089 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13051 "parser.c" +#line 13090 "parser.c" break; case 1414: /* function: "FUNCTION NUMVALC" '(' numvalc_args ')' */ -#line 7095 "parser.y" +#line 7093 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-3], yyvsp[-1], NULL); } -#line 13059 "parser.c" +#line 13098 "parser.c" break; case 1415: /* function: "FUNCTION LOCALE" '(' locale_dt_args ')' func_refmod */ -#line 7099 "parser.y" +#line 7097 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13067 "parser.c" +#line 13106 "parser.c" break; case 1416: /* function: "FUNCTION" func_args */ -#line 7103 "parser.y" +#line 7101 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], yyvsp[0], NULL); } -#line 13075 "parser.c" +#line 13114 "parser.c" break; case 1417: /* func_refmod: %empty */ -#line 7109 "parser.y" +#line 7107 "parser.y" { yyval = NULL; } -#line 13081 "parser.c" +#line 13120 "parser.c" break; case 1418: /* func_refmod: '(' exp ':' ')' */ -#line 7110 "parser.y" +#line 7108 "parser.y" { yyval = cb_build_pair (yyvsp[-2], NULL); } -#line 13087 "parser.c" +#line 13126 "parser.c" break; case 1419: /* func_refmod: '(' exp ':' exp ')' */ -#line 7111 "parser.y" +#line 7109 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[-1]); } -#line 13093 "parser.c" +#line 13132 "parser.c" break; case 1420: /* func_args: %empty */ -#line 7115 "parser.y" +#line 7113 "parser.y" { yyval = NULL; } -#line 13099 "parser.c" +#line 13138 "parser.c" break; case 1421: /* func_args: '(' list_func_args ')' */ -#line 7116 "parser.y" +#line 7114 "parser.y" { yyval = yyvsp[-1]; } -#line 13105 "parser.c" +#line 13144 "parser.c" break; case 1422: /* list_func_args: %empty */ -#line 7120 "parser.y" +#line 7118 "parser.y" { yyval = NULL; } -#line 13111 "parser.c" +#line 13150 "parser.c" break; case 1423: /* list_func_args: exp_list */ -#line 7121 "parser.y" +#line 7119 "parser.y" { yyval = yyvsp[0]; } -#line 13117 "parser.c" +#line 13156 "parser.c" break; case 1424: /* trim_args: exp */ -#line 7127 "parser.y" +#line 7125 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_int0); } -#line 13128 "parser.c" +#line 13167 "parser.c" break; case 1425: /* trim_args: exp e_sep LEADING */ -#line 7134 "parser.y" +#line 7132 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int1); } -#line 13139 "parser.c" +#line 13178 "parser.c" break; case 1426: /* trim_args: exp e_sep TRAILING */ -#line 7141 "parser.y" +#line 7139 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int2); } -#line 13150 "parser.c" +#line 13189 "parser.c" break; case 1427: /* numvalc_args: exp */ -#line 7151 "parser.y" +#line 7149 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13161 "parser.c" +#line 13200 "parser.c" break; case 1428: /* numvalc_args: exp e_sep exp */ -#line 7158 "parser.y" +#line 7156 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, yyvsp[0]); } -#line 13172 "parser.c" +#line 13211 "parser.c" break; case 1429: /* locale_dt_args: exp */ -#line 7168 "parser.y" +#line 7166 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13183 "parser.c" +#line 13222 "parser.c" break; case 1430: /* locale_dt_args: exp e_sep reference */ -#line 7175 "parser.y" +#line 7173 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_ref (yyvsp[0])); } -#line 13194 "parser.c" +#line 13233 "parser.c" break; case 1431: /* not_const_word: %empty */ -#line 7188 "parser.y" +#line 7186 "parser.y" { non_const_word = 1; } -#line 13202 "parser.c" +#line 13241 "parser.c" break; case 1432: /* flag_all: %empty */ -#line 7198 "parser.y" +#line 7196 "parser.y" { yyval = cb_int0; } -#line 13208 "parser.c" +#line 13247 "parser.c" break; case 1433: /* flag_all: ALL */ -#line 7199 "parser.y" +#line 7197 "parser.y" { yyval = cb_int1; } -#line 13214 "parser.c" +#line 13253 "parser.c" break; case 1434: /* flag_duplicates: %empty */ -#line 7203 "parser.y" +#line 7201 "parser.y" { yyval = cb_int0; } -#line 13220 "parser.c" +#line 13259 "parser.c" break; case 1435: /* flag_duplicates: with_dups */ -#line 7204 "parser.y" +#line 7202 "parser.y" { yyval = cb_int1; } -#line 13226 "parser.c" +#line 13265 "parser.c" break; case 1436: /* flag_initialized: %empty */ -#line 7208 "parser.y" +#line 7206 "parser.y" { yyval = NULL; } -#line 13232 "parser.c" +#line 13271 "parser.c" break; case 1437: /* flag_initialized: INITIALIZED */ -#line 7209 "parser.y" +#line 7207 "parser.y" { yyval = cb_int1; } -#line 13238 "parser.c" +#line 13277 "parser.c" break; case 1438: /* flag_next: %empty */ -#line 7213 "parser.y" +#line 7211 "parser.y" { yyval = cb_int0; } -#line 13244 "parser.c" +#line 13283 "parser.c" break; case 1439: /* flag_next: NEXT */ -#line 7214 "parser.y" +#line 7212 "parser.y" { yyval = cb_int1; } -#line 13250 "parser.c" +#line 13289 "parser.c" break; case 1440: /* flag_next: PREVIOUS */ -#line 7215 "parser.y" +#line 7213 "parser.y" { yyval = cb_int2; } -#line 13256 "parser.c" +#line 13295 "parser.c" break; case 1441: /* flag_not: %empty */ -#line 7219 "parser.y" +#line 7217 "parser.y" { yyval = cb_int0; } -#line 13262 "parser.c" +#line 13301 "parser.c" break; case 1442: /* flag_not: NOT */ -#line 7220 "parser.y" +#line 7218 "parser.y" { yyval = cb_int1; } -#line 13268 "parser.c" +#line 13307 "parser.c" break; case 1443: /* flag_optional: %empty */ -#line 7224 "parser.y" +#line 7222 "parser.y" { yyval = cb_int0; } -#line 13274 "parser.c" +#line 13313 "parser.c" break; case 1444: /* flag_optional: OPTIONAL */ -#line 7225 "parser.y" +#line 7223 "parser.y" { yyval = cb_int1; } -#line 13280 "parser.c" +#line 13319 "parser.c" break; case 1445: /* flag_rounded: %empty */ -#line 7229 "parser.y" +#line 7227 "parser.y" { yyval = cb_int0; } -#line 13286 "parser.c" +#line 13325 "parser.c" break; case 1446: /* flag_rounded: ROUNDED */ -#line 7230 "parser.y" +#line 7228 "parser.y" { yyval = cb_int1; } -#line 13292 "parser.c" +#line 13331 "parser.c" break; case 1447: /* flag_separate: %empty */ -#line 7234 "parser.y" +#line 7232 "parser.y" { yyval = cb_int0; } -#line 13298 "parser.c" +#line 13337 "parser.c" break; case 1448: /* flag_separate: SEPARATE _character */ -#line 7235 "parser.y" +#line 7233 "parser.y" { yyval = cb_int1; } -#line 13304 "parser.c" +#line 13343 "parser.c" break; case 1460: /* _also: ALSO */ -#line 7248 "parser.y" +#line 7246 "parser.y" { yyval = cb_int1; } -#line 13310 "parser.c" +#line 13349 "parser.c" break; case 1489: /* _is: %empty */ -#line 7263 "parser.y" +#line 7261 "parser.y" { yyval = NULL; } -#line 13316 "parser.c" +#line 13355 "parser.c" break; case 1490: /* _is: IS */ -#line 7263 "parser.y" +#line 7261 "parser.y" { yyval = cb_int1; } -#line 13322 "parser.c" +#line 13361 "parser.c" break; case 1501: /* _literal: %empty */ -#line 7268 "parser.y" +#line 7266 "parser.y" { yyval = NULL; } -#line 13328 "parser.c" +#line 13367 "parser.c" break; case 1502: /* _literal: "Literal" */ -#line 7268 "parser.y" +#line 7266 "parser.y" { yyval = yyvsp[0]; } -#line 13334 "parser.c" +#line 13373 "parser.c" break; -#line 13338 "parser.c" +#line 13377 "parser.c" default: break; } @@ -13416,7 +13455,6 @@ yyparse (void) label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; - ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -13477,7 +13515,7 @@ yyparse (void) `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturnlab; + goto yyreturn; /*-----------------------------------. @@ -13485,22 +13523,24 @@ yyparse (void) `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturnlab; + goto yyreturn; -/*-----------------------------------------------------------. -| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | -`-----------------------------------------------------------*/ +#if !defined yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturnlab; + goto yyreturn; +#endif -/*----------------------------------------------------------. -| yyreturnlab -- parsing is finished, clean up and return. | -`----------------------------------------------------------*/ -yyreturnlab: +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -13527,5 +13567,5 @@ yyparse (void) return yyresult; } -#line 7293 "parser.y" +#line 7291 "parser.y" diff --git a/cobj/parser.h b/cobj/parser.h index e3f2fe0c..e5bb7c26 100644 --- a/cobj/parser.h +++ b/cobj/parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.8.2. */ +/* A Bison parser, made by GNU Bison 3.7.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -515,8 +515,6 @@ typedef int YYSTYPE; extern YYSTYPE yylval; - int yyparse (void); - #endif /* !YY_YY_PARSER_H_INCLUDED */ diff --git a/cobj/parser.y b/cobj/parser.y index 4ac06570..00b85122 100644 --- a/cobj/parser.y +++ b/cobj/parser.y @@ -5382,9 +5382,7 @@ read_statement: CB_FILE(cb_ref ($3))->organization != COB_ORG_INDEXED)) { current_statement->handler_id = COB_EC_I_O_PERMANENT_ERROR; } - if ($7 && (CB_FILE(cb_ref ($3))->lock_mode & COB_LOCK_AUTOMATIC)) { - cb_error (_("LOCK clause invalid with file LOCK AUTOMATIC")); - } else if ($8 && + if ($8 && (CB_FILE(cb_ref ($3))->organization != COB_ORG_RELATIVE && CB_FILE(cb_ref ($3))->organization != COB_ORG_INDEXED)) { cb_error (_("KEY clause invalid with this file type")); diff --git a/cobj/tree.c b/cobj/tree.c index 6ca181a0..3bd85e75 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -1725,6 +1725,7 @@ struct cb_file *build_file(cb_tree name) { p->access_mode = COB_ACCESS_SEQUENTIAL; p->handler = CB_LABEL(cb_standard_error_handler); p->handler_prog = current_program; + p->lock_mode = cb_default_select_lock_mode; if (external_flg == 1) { p->external_assign = 1; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 1236d37c..56e9a6b2 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -346,10 +346,10 @@ public class CobolFile { protected static final int COB_LOCK_MANUAL = 2; /** TODO: 準備中 */ - protected static final int COB_LOCK_AUTOMATIC = 3; + protected static final int COB_LOCK_AUTOMATIC = 4; /** TODO: 準備中 */ - protected static final int COB_LOCK_MULTIPLE = 1; + protected static final int COB_LOCK_MULTIPLE = 8; /** TODO: 準備中 */ protected static final int COB_LOCK_MASK = 0x7; @@ -1436,17 +1436,6 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp readOpts &= ~COB_READ_LOCK; } - if (this.organization == COB_ORG_INDEXED /* && bdb_env != null */) { - if (this.open_mode != COB_OPEN_I_O || (this.lock_mode & COB_LOCK_EXCLUSIVE) != 0) { - readOpts &= ~COB_READ_LOCK; - } else if ((this.lock_mode & COB_LOCK_AUTOMATIC) != 0 - && (readOpts & COB_READ_NO_LOCK) == 0) { - readOpts |= COB_READ_LOCK; - } - } else { - readOpts &= ~COB_READ_LOCK; - } - int ret; if (key != null) { ret = this.read_(key, readOpts); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index 582f6d92..8f355cef 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -18,10 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.file; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; @@ -42,6 +38,7 @@ public class CobolIndexedFile extends CobolFile { private boolean callStart = false; private boolean commitOnModification = true; private int fetchKeyIndex = -1; + private byte[] previousLockedRecordKey = null; /** TODO: 準備中 */ public static final int COB_EQ = 1; @@ -61,6 +58,9 @@ public class CobolIndexedFile extends CobolFile { /** TODO: 準備中 */ public static final int COB_NE = 6; + private static String storedProcessUuid = null; + private static String storedProcessId = null; + /** * TODO: 準備中 * @@ -144,6 +144,24 @@ public CobolIndexedFile( fileVersion); } + private static String getProcessUuid() { + if (CobolIndexedFile.storedProcessUuid == null) { + CobolIndexedFile.storedProcessUuid = java.util.UUID.randomUUID().toString(); + } + return CobolIndexedFile.storedProcessUuid; + } + + private static String getProcessId() { + if (CobolIndexedFile.storedProcessId == null) { + CobolIndexedFile.storedProcessId = + String.valueOf( + java.lang.management.ManagementFactory.getRuntimeMXBean() + .getName() + .split("@")[0]); + } + return CobolIndexedFile.storedProcessId; + } + private static String getIndexName(int index) { return String.format("index%d", index); } @@ -193,33 +211,71 @@ private byte[] DBT_SET(AbstractCobolField field) { @Override public int open_(String filename, int mode, int sharing) { IndexedFile p = new IndexedFile(); + this.filei = p; - SQLiteConfig config = new SQLiteConfig(); - config.setReadOnly(mode == COB_OPEN_INPUT); + // If the file does not exist and the mode is COB_OPEN_INPUT, return ENOENT + boolean fileExists = new java.io.File(filename).exists(); + if (mode == COB_OPEN_INPUT && !fileExists) { + return ENOENT; + } - if (mode == COB_OPEN_OUTPUT) { - Path path = Paths.get(filename); + // Establish a connection to the database + int getConnectionStatus = this.getConnection(filename); + + // If the connection could not be established, return the error code + if (getConnectionStatus != COB_STATUS_00_SUCCESS) { + return getConnectionStatus; + } + + try { + // Acquire a file lock + boolean succeedToFileLock = this.acquireFileLock(filename, mode, fileExists); + if (succeedToFileLock) { + if (mode == COB_OPEN_OUTPUT) { + this.deleteAllTablesExceptForFileLockTable(); + } + this.createAllTablesIfNotExists(); + if (mode == COB_OPEN_OUTPUT) { + this.writeMetaData(p); + } + p.connection.commit(); + this.setInitialParameters(filename); + return COB_STATUS_00_SUCCESS; + } else { + try { + p.connection.close(); + } catch (SQLException closeEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_61_FILE_SHARING; + } + } catch (SQLException e) { try { - Files.deleteIfExists(path); - } catch (IOException e) { + p.connection.close(); + } catch (SQLException closeEx) { return COB_STATUS_30_PERMANENT_ERROR; } + return COB_STATUS_30_PERMANENT_ERROR; } + } - boolean fileExists = new java.io.File(filename).exists(); - - if (mode == COB_OPEN_INPUT && !fileExists) { - return ENOENT; - } + private int getConnection(String filename) { + IndexedFile p = this.filei; + // Establishes a connection to the SQLite database using the provided filename. + SQLiteConfig config = new SQLiteConfig(); + config.setReadOnly(false); p.connection = null; try { p.connection = DriverManager.getConnection("jdbc:sqlite:" + filename, config.toProperties()); + p.connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); p.connection.setAutoCommit(false); // Check if the file is accessible try (Statement st = p.connection.createStatement()) { + // Wait for finishing other processes' transactions up to 5 seconds + st.execute("PRAGMA busy_timeout = 5000"); st.execute("select 1"); } p.connection.commit(); @@ -233,67 +289,172 @@ public int open_(String filename, int mode, int sharing) { } catch (Exception e) { return COB_STATUS_30_PERMANENT_ERROR; } + return COB_STATUS_00_SUCCESS; + } - p.filenamelen = filename.length(); - p.last_dupno = new int[this.nkeys]; - p.rewrite_sec_key = new int[this.nkeys]; + private String getOpenModeString(int mode) { + switch (mode) { + case COB_OPEN_INPUT: + return "INPUT"; + case COB_OPEN_OUTPUT: + return "OUTPUT"; + case COB_OPEN_I_O: + return "I-O"; + case COB_OPEN_EXTEND: + return "EXTEND"; + default: + return null; + } + } - int maxsize = 0; - for (int i = 0; i < this.nkeys; ++i) { - if (this.keys[i].getField().getSize() > maxsize) { - maxsize = this.keys[i].getField().getSize(); + private boolean acquireFileLock(String filename, int mode, boolean fileExists) + throws SQLException { + if (!checkFileIsLocked(filename, mode, fileExists)) { + return false; // File is already locked + } + + IndexedFile p = this.filei; + + // Insert a new lock record into the file_lock table + String openMode = this.getOpenModeString(mode); + if (openMode == null) { + return false; // Invalid open mode + } + String insertSql = + "insert into file_lock (locked_by, process_id, locked_at, open_mode) values (?, ?," + + " datetime('now'), ?)"; + String processUuid = this.getProcessUuid(); + String processId = this.getProcessId(); + + try (PreparedStatement statement = p.connection.prepareStatement(insertSql)) { + statement.setString(1, processUuid); + statement.setString(2, processId); + statement.setString(3, openMode); + int insertedRecordsCount = statement.executeUpdate(); + if (insertedRecordsCount != 1) { + p.connection.rollback(); + return false; } + p.connection.commit(); + return true; + } catch (SQLException e) { + p.connection.rollback(); + return false; } + } - if (mode == COB_OPEN_OUTPUT - || (!fileExists && (mode == COB_OPEN_EXTEND || mode == COB_OPEN_I_O))) { - try { - for (int i = 0; i < this.nkeys; ++i) { - String tableName = getTableName(i); - Statement statement = p.connection.createStatement(); - if (i == 0) { + private boolean checkFileIsLocked(String filename, int mode, boolean fileExists) + throws SQLException { + IndexedFile p = this.filei; + try (Statement statement = p.connection.createStatement()) { + if (mode == COB_OPEN_OUTPUT + || (!fileExists && (mode == COB_OPEN_EXTEND || mode == COB_OPEN_I_O))) { + String query = + "select exists(select 1 from sqlite_master where type = 'table' and name =" + + " 'file_lock')"; + try (ResultSet rs = statement.executeQuery(query)) { + // If the file_lock table does not exist, create it and return true + if (!rs.next() || rs.getInt(1) == 0) { + statement.execute( + "CREATE TABLE if not exists file_lock (locked_by text primary key," + + " process_id text, locked_at timestamp, open_mode text" + + " CONSTRAINT check_open_mode CHECK (open_mode IN ('INPUT'," + + " 'OUTPUT', 'I-O', 'EXTEND')))"); + return true; + } + } + } + + String query; + if (mode == COB_OPEN_OUTPUT) { + query = "select exists(select 1 from file_lock)"; + } else { + query = "select exists(select 1 from file_lock where open_mode = 'OUTPUT')"; + } + try (ResultSet rs = statement.executeQuery(query)) { + // If the file is already locked, return false + if (rs.next() && rs.getInt(1) == 1) { + p.connection.rollback(); + return false; + } + } + return true; + } catch (SQLException e) { + p.connection.rollback(); + return false; + } + } + + private void deleteAllTablesExceptForFileLockTable() throws SQLException { + IndexedFile p = this.filei; + try (Statement statement = p.connection.createStatement()) { + for (int i = 0; i < this.nkeys; ++i) { + statement.execute("drop table if exists " + getTableName(i)); + } + statement.execute("drop table if exists metadata_string_int"); + statement.execute("drop table if exists metadata_key"); + } + } + + private void createAllTablesIfNotExists() throws SQLException { + IndexedFile p = this.filei; + try (Statement statement = p.connection.createStatement()) { + for (int i = 0; i < this.nkeys; ++i) { + String tableName = getTableName(i); + if (i == 0) { + statement.execute( + String.format( + "create table if not exists %s (" + + "key blob not null primary key," + + "value blob not null," + + "locked_by text," + + "process_id text," + + "locked_at timestamp" + + ")", + tableName)); + } else { + if (this.keys[i].getFlag() == 0) { statement.execute( String.format( - "create table %s (key blob not null primary key, value blob" - + " not null)", - tableName)); + "create table if not exists %s (key blob not null primary" + + " key, value blob not null, constraint %s foreign key" + + " (value) references %s (key))", + tableName, getConstraintName(i), getTableName(0))); } else { - if (this.keys[i].getFlag() == 0) { - statement.execute( - String.format( - "create table %s (key blob not null primary key, value" - + " blob not null, constraint %s foreign key" - + " (value) references %s (key))", - tableName, getConstraintName(i), getTableName(0))); - } else { - statement.execute( - String.format( - "create table %s (key blob not null, value blob not" - + " null, dupNo integer not null, constraint %s" - + " foreign key (value) references %s (key))", - tableName, getConstraintName(i), getTableName(0))); - } statement.execute( String.format( - "create index %s on %s(value)", - getSubIndexName(i), tableName)); + "create table if not exists %s (key blob not null, value" + + " blob not null, dupNo integer not null, constraint" + + " %s foreign key (value) references %s (key))", + tableName, getConstraintName(i), getTableName(0))); } statement.execute( String.format( - "create index %s on %s(key)", getIndexName(i), tableName)); - statement.close(); + "create index if not exists %s on %s(value)", + getSubIndexName(i), tableName)); } - this.writeMetaData(p); - if (this.commitOnModification) { - p.connection.commit(); - } - } catch (SQLException e) { - return COB_STATUS_30_PERMANENT_ERROR; + statement.execute( + String.format( + "create index if not exists %s on %s(key)", + getIndexName(i), tableName)); + } + } + } + + private void setInitialParameters(String filename) { + IndexedFile p = this.filei; + p.filenamelen = filename.length(); + p.last_dupno = new int[this.nkeys]; + p.rewrite_sec_key = new int[this.nkeys]; + + int maxsize = 0; + for (int i = 0; i < this.nkeys; ++i) { + if (this.keys[i].getField().getSize() > maxsize) { + maxsize = this.keys[i].getField().getSize(); } } p.temp_key = new CobolDataStorage(maxsize + 4); - this.filei = p; p.key_index = 0; p.last_key = null; @@ -307,7 +468,6 @@ public int open_(String filename, int mode, int sharing) { this.callStart = false; this.fetchKeyIndex = -1; - return 0; } // Write a metadata to the database @@ -315,11 +475,11 @@ private void writeMetaData(IndexedFile p) throws SQLException { Statement statement = p.connection.createStatement(); // Create a table to store metadata statement.execute( - "create table metadata_string_int (key text not null primary key, value integer not" - + " null)"); + "create table if not exists metadata_string_int (key text not null primary key," + + " value integer not null)"); statement.execute( - "create table metadata_key (idx integer not null primary key, offset integer not" - + " null, size integer not null, duplicate boolean)"); + "create table if not exists metadata_key (idx integer not null primary key, offset" + + " integer not null, size integer not null, duplicate boolean)"); statement.close(); // Store the size of a record @@ -352,7 +512,29 @@ public int close_(int opt) { this.closeCursor(); + previousLockedRecordKey = null; + try { + try (Statement statement = p.connection.createStatement()) { + // Close the file lock + String deleteFileLockSql = "delete from file_lock where locked_by = ?"; + try (PreparedStatement deleteFileLockStatement = + p.connection.prepareStatement(deleteFileLockSql)) { + deleteFileLockStatement.setString(1, this.getProcessUuid()); + deleteFileLockStatement.executeUpdate(); + } + String unlockRecordsSql = + String.format( + "update %s set locked_by = null, process_id = null, locked_at =" + + " null where locked_by = ?", + getTableName(0)); + try (PreparedStatement unlockRecordsStatement = + p.connection.prepareStatement(unlockRecordsSql)) { + unlockRecordsStatement.setString(1, this.getProcessUuid()); + unlockRecordsStatement.executeUpdate(); + } + } + p.connection.commit(); p.connection.close(); } catch (SQLException e) { return COB_STATUS_30_PERMANENT_ERROR; @@ -410,12 +592,96 @@ public int start_(int cond, AbstractCobolField key) { if (ret == COB_STATUS_00_SUCCESS) { this.callStart = true; } + try { + IndexedFile p = this.filei; + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } return ret; } - @Override - public int read_(AbstractCobolField key, int readOpts) { + private boolean shouldLockRecord(int readOpts) { + if (this.open_mode != COB_OPEN_I_O) { + return false; + } + if ((readOpts & CobolFile.COB_READ_LOCK) != 0) { + return true; + } else if ((readOpts & CobolFile.COB_READ_NO_LOCK) != 0) { + return false; + } else { + return this.lock_mode != CobolFile.COB_LOCK_MANUAL; + } + } + + private boolean checkOtherProcessLockedRecord(byte[] key) throws SQLException { IndexedFile p = this.filei; + String query = + String.format( + "select exists(select 1 from %s where key = ? and locked_by != ?)", + getTableName(0)); + try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { + selectStatement.setBytes(1, key); + selectStatement.setString(2, this.getProcessUuid()); + try (ResultSet rs = selectStatement.executeQuery()) { + return rs.next() && rs.getInt(1) == 1; + } + } + } + + private boolean lockRecord(byte[] key) throws SQLException { + IndexedFile p = this.filei; + String updateSql = + String.format( + "update %s set locked_by = ?, process_id = ?, locked_at = datetime('now')" + + " where key = ?", + getTableName(0)); + try (PreparedStatement updateStatement = p.connection.prepareStatement(updateSql)) { + updateStatement.setString(1, this.getProcessUuid()); + updateStatement.setString(2, this.getProcessId()); + updateStatement.setBytes(3, key); + int updatedRecordcount = updateStatement.executeUpdate(); + return updatedRecordcount == 1; + } + } + + private void unlockPreviousRecord() throws SQLException { + if (previousLockedRecordKey == null) { + previousLockedRecordKey = null; + return; + } + IndexedFile p = this.filei; + String updateSql = + String.format( + "update %s set locked_by = null, process_id = null, locked_at = null where" + + " key = ?", + getTableName(0)); + try (PreparedStatement updateStatement = p.connection.prepareStatement(updateSql)) { + updateStatement.setBytes(1, previousLockedRecordKey); + updateStatement.executeUpdate(); + } + previousLockedRecordKey = null; + } + + private void unlockPreviousRecord(byte[] key) throws SQLException { + if (previousLockedRecordKey == null) { + previousLockedRecordKey = key; + return; + } + IndexedFile p = this.filei; + String updateSql = + String.format( + "update %s set locked_by = null, process_id = null, locked_at = null where" + + " key = ?", + getTableName(0)); + try (PreparedStatement updateStatement = p.connection.prepareStatement(updateSql)) { + updateStatement.setBytes(1, previousLockedRecordKey); + updateStatement.executeUpdate(); + } + previousLockedRecordKey = key; + } + + private int read_internal(AbstractCobolField key, int readOpts) { boolean testLock = false; this.callStart = false; int ret = this.indexed_start_internal(COB_EQ, key, readOpts, testLock); @@ -423,29 +689,82 @@ public int read_(AbstractCobolField key, int readOpts) { return ret; } + return COB_STATUS_00_SUCCESS; + } + + @Override + public int read_(AbstractCobolField key, int readOpts) { + IndexedFile p = this.filei; + int retCode = read_internal(key, readOpts); + if (retCode != COB_STATUS_00_SUCCESS) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return retCode; + } + byte[] primaryKey = DBT_SET(this.keys[0].getField()); + if (shouldLockRecord(readOpts)) { + try { + if (checkOtherProcessLockedRecord(primaryKey)) { + p.connection.rollback(); + return COB_STATUS_51_RECORD_LOCKED; + } + if (!lockRecord(primaryKey)) { + p.connection.rollback(); + return COB_STATUS_30_PERMANENT_ERROR; + } + unlockPreviousRecord(primaryKey); + p.connection.commit(); + } catch (SQLException e) { + try { + p.connection.rollback(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + try { + unlockPreviousRecord(primaryKey); + p.connection.commit(); + } catch (SQLException e) { + try { + p.connection.rollback(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + } + this.record.setSize(p.data.length); this.record.getDataStorage().memcpy(p.data, p.data.length); - return COB_STATUS_00_SUCCESS; } - @Override - public int readNext(int readOpts) { + private int readNext_internal(int readOpts) { IndexedFile p = this.filei; + // Immediately after START is called if (this.callStart) { this.callStart = false; this.indexedFirstRead = false; - this.record.setSize(p.data.length); - if (this.cursor.isPresent()) { - IndexedCursor cursor = this.cursor.get(); - if ((readOpts & CobolFile.COB_READ_PREVIOUS) != 0 - && cursor.getComparator() == COB_LE - && this.record.getDataStorage().memcmp(p.data, p.data.length) != 0) { - this.callStart = false; - return this.readNext(readOpts); + // If this statement is READ NEXT RECORD and + // the START statement was like `START ~~ KEY IS <=` + if ((readOpts & CobolFile.COB_READ_NEXT) != 0 + && cursor.get().getComparator() == COB_LE) { + AbstractCobolField specifiedKey = this.keys[p.key_index].getField(); + int specifiedKeySize = specifiedKey.getSize(); + int readKeySize = p.key.length; + int length = Math.min(specifiedKeySize, readKeySize); + // The key fetched by START is not the same as the specified key + if (specifiedKey.getDataStorage().memcmp(p.key, length) != 0) { + // READ the next record + return readNext_internal(readOpts); } } - this.record.getDataStorage().memcpy(p.data, p.data.length); return COB_STATUS_00_SUCCESS; } @@ -507,10 +826,59 @@ public int readNext(int readOpts) { p.key = result.key; p.data = result.value; + this.indexedFirstRead = false; + return COB_STATUS_00_SUCCESS; + } + + @Override + public int readNext(int readOpts) { + IndexedFile p = this.filei; + int retCode = readNext_internal(readOpts); + if (retCode != COB_STATUS_00_SUCCESS) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return retCode; + } + byte[] primaryKey = DBT_SET(this.keys[0].getField()); + if (shouldLockRecord(readOpts)) { + try { + if (checkOtherProcessLockedRecord(primaryKey)) { + p.connection.rollback(); + return COB_STATUS_51_RECORD_LOCKED; + } + if (!lockRecord(primaryKey)) { + p.connection.rollback(); + return COB_STATUS_30_PERMANENT_ERROR; + } + unlockPreviousRecord(primaryKey); + p.connection.commit(); + } catch (SQLException e) { + try { + p.connection.rollback(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + try { + unlockPreviousRecord(primaryKey); + p.connection.commit(); + } catch (SQLException e) { + try { + p.connection.rollback(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + } this.record.setSize(p.data.length); this.record.getDataStorage().memcpy(p.data, p.data.length); - - this.indexedFirstRead = false; return COB_STATUS_00_SUCCESS; } @@ -527,8 +895,9 @@ private boolean keyExistsInTable(IndexedFile p, int index, byte[] key) { try (PreparedStatement selectStatement = p.connection.prepareStatement(query)) { selectStatement.setBytes(1, key); selectStatement.setFetchSize(0); - ResultSet rs = selectStatement.executeQuery(); - return rs.next(); + try (ResultSet rs = selectStatement.executeQuery()) { + return rs.next(); + } } catch (SQLException e) { return false; } @@ -544,8 +913,9 @@ private int getNextKeyDupNo(Connection conn, int index, byte[] key) { conn.prepareStatement( String.format( "select ifnull(max(dupNo), -1) from %s", getTableName(index))); - ResultSet rs = selectStatement.executeQuery(); - return rs.getInt(1) + 1; + try (ResultSet rs = selectStatement.executeQuery()) { + return rs.getInt(1) + 1; + } } catch (SQLException e) { return 0; } @@ -586,13 +956,13 @@ private int indexed_write_internal(boolean rewrite, int[] dupNumbers, int opt) { p.data = DBT_SET(this.record); try (PreparedStatement insertStatement = p.connection.prepareStatement( - String.format("insert into %s values (?, ?)", getTableName(0)))) { + String.format( + "insert into %s (key, value, locked_by, process_id, locked_at) " + + "values (?, ?, null, null, null)", + getTableName(0)))) { insertStatement.setBytes(1, p.key); insertStatement.setBytes(2, p.data); insertStatement.execute(); - if (this.commitOnModification) { - p.connection.commit(); - } } catch (SQLException e) { return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); } @@ -632,9 +1002,6 @@ private int indexed_write_internal(boolean rewrite, int[] dupNumbers, int opt) { } insertStatement.execute(); insertStatement.close(); - if (this.commitOnModification) { - p.connection.commit(); - } } catch (SQLException e) { return returnWith(p, closeCursor, 0, COB_STATUS_51_RECORD_LOCKED); } @@ -663,7 +1030,26 @@ public int write_(int opt) { byte[] keyBytes = p.key; p.last_key.memcpy(keyBytes, keyBytes.length); - return indexed_write_internal(false, opt); + int ret = indexed_write_internal(false, opt); + if (ret == COB_STATUS_00_SUCCESS) { + try { + unlockPreviousRecord(); + if (this.commitOnModification) { + p.connection.commit(); + } + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + try { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return ret; + } + } + return ret; } /** Equivalent to check_alt_keys in libcob/fileio.c */ @@ -696,8 +1082,9 @@ private static boolean checkTable(IndexedFile p, int index, byte[] key, byte[] p selectStatement.setBytes(1, key); selectStatement.setBytes(2, primaryKey); selectStatement.setFetchSize(0); - ResultSet rs = selectStatement.executeQuery(); - return rs.next(); + try (ResultSet rs = selectStatement.executeQuery()) { + return rs.next(); + } } catch (SQLException e) { return false; } @@ -715,18 +1102,67 @@ public int rewrite_(int opt) { return COB_STATUS_21_KEY_INVALID; } + byte[] currentKey = DBT_SET(this.keys[0].getField()); + try { + if (checkOtherProcessLockedRecord(currentKey)) { + unlockPreviousRecord(); + p.connection.commit(); + return COB_STATUS_51_RECORD_LOCKED; + } + if (!lockRecord(currentKey)) { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + return COB_STATUS_30_PERMANENT_ERROR; + } + } catch (SQLException e) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + p.key = DBT_SET(this.keys[0].getField()); int[] dupNumbers = new int[this.nkeys]; java.util.Arrays.fill(dupNumbers, -1); - int ret = this.indexed_delete_internal(true, dupNumbers); + int deleteRet = this.indexed_delete_internal(true, dupNumbers); - if (ret != COB_STATUS_00_SUCCESS) { + if (deleteRet != COB_STATUS_00_SUCCESS) { p.write_cursor_open = false; - return ret; + try { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return deleteRet; + } + return deleteRet; } - return this.indexed_write_internal(true, dupNumbers, opt); + int writeRet = this.indexed_write_internal(true, dupNumbers, opt); + if (writeRet == COB_STATUS_00_SUCCESS) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException e) { + p.write_cursor_open = false; + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + p.write_cursor_open = false; + try { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } + return writeRet; } private int indexed_delete_internal(boolean rewrite) { @@ -767,11 +1203,12 @@ private int indexed_delete_internal(boolean rewrite, int[] dupNumbers) { String.format( "select dupNo from %s where value = ?", getTableName(i)))) { statement.setBytes(1, p.key); - ResultSet rs = statement.executeQuery(); - if (rs.next()) { - int dupNo = rs.getInt(1); - if (dupNumbers != null) { - dupNumbers[i] = dupNo; + try (ResultSet rs = statement.executeQuery()) { + if (rs.next()) { + int dupNo = rs.getInt(1); + if (dupNumbers != null) { + dupNumbers[i] = dupNo; + } } } } catch (SQLException e) { @@ -789,14 +1226,6 @@ private int indexed_delete_internal(boolean rewrite, int[] dupNumbers) { } } - if (this.commitOnModification) { - try { - p.connection.commit(); - } catch (SQLException e) { - return returnWith(p, closeCursor, 0, COB_STATUS_30_PERMANENT_ERROR); - } - } - this.updateWhileReading = true; return COB_STATUS_00_SUCCESS; @@ -804,7 +1233,49 @@ private int indexed_delete_internal(boolean rewrite, int[] dupNumbers) { @Override public int delete_() { - return this.indexed_delete_internal(false); + IndexedFile p = this.filei; + byte[] currentKey = DBT_SET(this.keys[0].getField()); + try { + if (checkOtherProcessLockedRecord(currentKey)) { + unlockPreviousRecord(); + p.connection.commit(); + return COB_STATUS_51_RECORD_LOCKED; + } + if (!lockRecord(currentKey)) { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + return COB_STATUS_30_PERMANENT_ERROR; + } + } catch (SQLException e) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_30_PERMANENT_ERROR; + } + + int ret = this.indexed_delete_internal(false); + + if (ret == COB_STATUS_00_SUCCESS) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + } else { + try { + p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException rollbackEx) { + return ret; + } + } + return ret; } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java index 2772b5bd..627880f9 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/IndexedCursor.java @@ -1,30 +1,9 @@ -/* - * Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3.0, - * or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ package jp.osscons.opensourcecobol.libcobj.file; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; import java.util.Optional; /** Represents a result of fetching a data from SQLite tables. */ @@ -71,172 +50,206 @@ enum CursorReadOption { LAST } +/** + * Represents a cursor for navigating through indexed data in a CobolIndexedFile. + */ +enum CursorPosition { + BEFORE_FIRST, + AFTER_LAST, + IN_TABLE, +} + /** Emulates a cursor in SQLite */ final class IndexedCursor { - /** a cursor to the top direction */ - private Optional backwardCursor; - - /** a cursor to the bottom direction */ - private Optional forwardCursor; - - /** a connection to the SQLite database */ - private Connection conn; + private final Connection conn; + private byte[] key; + private final int tableIndex; + private final boolean isDuplicate; + private int comparator; - /** firstFetch is true if and only if the cursor has not read any data yet */ + // variables for cursor state private boolean firstFetch; + private CursorPosition position; + private Optional previousFetchResult; - /** a position in buffers that stores the read data */ - private int cursorIndex; - - /** one of COB_EQ, COB_LT, COB_LE, COB_GT, COB_GE in CobolIndexedFile.java */ - private int comparator; - - /** isDuplicate is true if and only if the table key allows duplicates */ - private boolean isDuplicate; + private IndexedCursor( + Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { + this.conn = conn; + this.key = key; + this.tableIndex = tableIndex; + this.isDuplicate = isDuplicate; + this.comparator = comparator; - /** a key */ - private byte[] key; + this.firstFetch = true; + this.position = CursorPosition.IN_TABLE; + this.previousFetchResult = Optional.empty(); + } - /** forwardBuffer stores data located to the bottom direction from the first read position */ - List forwardBuffer; + static Optional createCursor( + Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { + return Optional.of(new IndexedCursor(conn, key, tableIndex, isDuplicate, comparator)); + } - /** bakckwardBuffer stores data located to the first direction from the first read position */ - List backwardBuffer; + static boolean matchKeyHead(byte[] originalKey, byte[] fetchKey) { + if (originalKey.length > fetchKey.length) { + return false; + } + for (int i = 0; i < originalKey.length; ++i) { + if (originalKey[i] != fetchKey[i]) { + return false; + } + } + return true; + } - /** the index of the table */ - private int tableIndex; + Optional reloadCursor() { + return Optional.of(this); + } - private boolean nextCursorFetchKeyDiffrent; - private boolean prevCursorFetchKeyDiffrent; + void close() {} - /** - * TODO: 準備中 - * - * @param comparator TODO: 準備中 - */ void setComparator(int comparator) { this.comparator = comparator; } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ int getComparator() { return this.comparator; } - private IndexedCursor( - Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { - this.conn = conn; - this.key = new byte[key.length]; - System.arraycopy(key, 0, this.key, 0, key.length); - this.cursorIndex = 0; - this.comparator = comparator; - this.firstFetch = true; - this.isDuplicate = isDuplicate; - this.tableIndex = tableIndex; - this.nextCursorFetchKeyDiffrent = false; - this.prevCursorFetchKeyDiffrent = false; - this.forwardBuffer = new ArrayList(); - this.backwardBuffer = new ArrayList(); + Optional read(CursorReadOption opt) { + if (opt == CursorReadOption.NEXT) { + return this.next(); + } else if (opt == CursorReadOption.PREV) { + return this.prev(); + } else { + return Optional.empty(); + } } - /** - * TODO: 準備中 - * - * @param conn TODO: 準備中 - * @param key TODO: 準備中 - * @param tableIndex TODO: 準備中 - * @param isDuplicate TODO: 準備中 - * @param comparator TODO: 準備中 - * @return TODO: 準備中 - */ - static Optional createCursor( - Connection conn, byte[] key, int tableIndex, boolean isDuplicate, int comparator) { - IndexedCursor cursor = new IndexedCursor(conn, key, tableIndex, isDuplicate, comparator); - cursor.forwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, true); - cursor.backwardCursor = getCursor(conn, key, tableIndex, isDuplicate, comparator, false); - if (!cursor.forwardCursor.isPresent() || !cursor.backwardCursor.isPresent()) { - return Optional.empty(); + private static String getCompOperator(int comparator) { + if (comparator == CobolIndexedFile.COB_EQ) { + // for partial key match, we use ">=" instead of "=" + return ">="; + } else if (comparator == CobolIndexedFile.COB_GE) { + return ">="; + } else if (comparator == CobolIndexedFile.COB_LE) { + return "<="; + } else if (comparator == CobolIndexedFile.COB_GT) { + return ">"; + } else if (comparator == CobolIndexedFile.COB_LT) { + return "<"; } else { - return Optional.of(cursor); + return null; } } - Optional reloadCursor() { - if (this.firstFetch) { - return createCursor( - this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); - } + Optional fetchFirstRecord() { + this.previousFetchResult = Optional.empty(); + this.position = CursorPosition.IN_TABLE; - int newComparator; - if (this.comparator == CobolIndexedFile.COB_EQ) { - newComparator = CobolIndexedFile.COB_EQ; - } else { - newComparator = CobolIndexedFile.COB_GE; - } + final boolean isPrimaryTable = this.tableIndex == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(this.tableIndex); - FetchResult result; - if (this.cursorIndex < 0) { - result = this.backwardBuffer.get(-this.cursorIndex - 1); + String query; + if (isPrimaryTable) { + query = String.format("select key, value from %s order by key limit 1", primaryTable); + } else if (this.isDuplicate) { + query = + String.format( + "select key, value from %s order by key, dupNo limit 1", subTable); } else { - result = this.forwardBuffer.get(this.cursorIndex); + query = String.format("select key, value from %s order by key limit 1", subTable); } - - IndexedCursor newCursor = - new IndexedCursor( - this.conn, this.key, this.tableIndex, this.isDuplicate, this.comparator); - newCursor.forwardCursor = - reloadedCursor( - this.conn, - this.tableIndex, - this.isDuplicate, - newComparator, - result, - this.comparator, - true); - newCursor.backwardCursor = - reloadedCursor( - this.conn, - this.tableIndex, - this.isDuplicate, - newComparator, - result, - this.comparator, - false); - - Optional reFetchResult = - reFetch(this.conn, this.tableIndex, this.isDuplicate, result); - if (reFetchResult.isPresent()) { - FetchResult r = reFetchResult.get(); - newCursor.forwardBuffer.add(r); - newCursor.cursorIndex = 0; - newCursor.firstFetch = false; + try (Statement stmt = this.conn.createStatement(); + ResultSet rs = stmt.executeQuery(query)) { + if (rs.next()) { + byte[] key = rs.getBytes("key"); + byte[] value = rs.getBytes("value"); + if (isDuplicate) { + int dupNo = rs.getInt("dupNo"); + return Optional.of(new FetchResult(key, value, dupNo)); + } else { + return Optional.of(new FetchResult(key, value, 0)); + } + } else { + return Optional.empty(); + } + } catch (Exception e) { + return Optional.empty(); } + } - if (!newCursor.forwardCursor.isPresent() || !newCursor.backwardCursor.isPresent()) { - return Optional.empty(); + Optional fetchLastRecord() { + this.previousFetchResult = Optional.empty(); + this.position = CursorPosition.IN_TABLE; + + final boolean isPrimaryTable = this.tableIndex == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(this.tableIndex); + + String query; + if (isPrimaryTable) { + query = + String.format( + "select key, value from %s order by key desc limit 1", primaryTable); + } else if (this.isDuplicate) { + query = + String.format( + "select key, value from %s order by key desc, dupNo desc limit 1", + subTable); } else { - return Optional.of(newCursor); + query = String.format("select key, value from %s order by key desc limit 1", subTable); + } + try (Statement stmt = this.conn.createStatement(); + ResultSet rs = stmt.executeQuery(query)) { + if (rs.next()) { + byte[] key = rs.getBytes("key"); + byte[] value = rs.getBytes("value"); + if (isDuplicate) { + int dupNo = rs.getInt("dupNo"); + return Optional.of(new FetchResult(key, value, dupNo)); + } else { + return Optional.of(new FetchResult(key, value, 0)); + } + } else { + return Optional.empty(); + } + } catch (Exception e) { + return Optional.empty(); } } - private static Optional reFetch( - Connection conn, int tableIndex, boolean isDuplicate, FetchResult result) { - final boolean isPrimaryTable = tableIndex == 0; + Optional forwardNextRecord() { + this.position = CursorPosition.IN_TABLE; + + final boolean isPrimaryTable = this.tableIndex == 0; final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(tableIndex); - final String query; + final String subTable = CobolIndexedFile.getTableName(this.tableIndex); + + final String compOperator; + byte[] key; + if (this.previousFetchResult.isPresent()) { + compOperator = ">"; + key = this.previousFetchResult.get().key; + } else { + compOperator = ">="; + key = this.key; + } + + String query; if (isPrimaryTable) { - query = String.format("select key, value from %s where key == ?", primaryTable); - } else if (isDuplicate) { + query = + String.format( + "select key, value from %s where key %s ? order by key limit 1", + primaryTable, compOperator); + } else if (this.isDuplicate) { query = String.format( "select %s.key, %s.value, %s.dupNo from " + "%s join %s on %s.value = %s.key " - + "where %s.key == ? and %s.dupNo == ?", + + "where (%s.key == ? and %s.dupNo %s ?) or %s.key %s ? " + + "order by %s.key, %s.dupNo limit 1", subTable, primaryTable, subTable, @@ -245,488 +258,311 @@ private static Optional reFetch( subTable, primaryTable, subTable, + subTable, + compOperator, + subTable, + compOperator, + subTable, subTable); } else { query = String.format( "select %s.key, %s.value from " + "%s join %s on %s.value = %s.key " - + "where %s.key == ?", + + "where %s.key %s ? " + + "order by %s.key limit 1", subTable, primaryTable, subTable, primaryTable, subTable, primaryTable, + subTable, + compOperator, subTable); } - try { - PreparedStatement statement = conn.prepareStatement(query); - if (isDuplicate) { - statement.setBytes(1, result.key); - statement.setInt(2, result.dupNo); - } else { - statement.setBytes(1, result.key); + try (PreparedStatement stmt = this.conn.prepareStatement(query)) { + stmt.setBytes(1, key); + if (this.isDuplicate) { + int dupNo = + this.previousFetchResult.isPresent() + ? this.previousFetchResult.get().dupNo + : 0; + stmt.setInt(2, dupNo); + stmt.setBytes(3, key); } - statement.setFetchSize(0); - ResultSet rs = statement.executeQuery(); - if (rs.next()) { - byte[] key = rs.getBytes(1); - byte[] value = rs.getBytes(2); - if (isDuplicate) { - int dupNo = rs.getInt(3); - return Optional.of(new FetchResult(key, value, dupNo)); + try (ResultSet rs = stmt.executeQuery()) { + if (rs.next()) { + byte[] fetchedKey = rs.getBytes("key"); + byte[] value = rs.getBytes("value"); + if (isDuplicate) { + int dupNo = rs.getInt("dupNo"); + return Optional.of(new FetchResult(fetchedKey, value, dupNo)); + } else { + return Optional.of(new FetchResult(fetchedKey, value, 0)); + } } else { - return Optional.of(new FetchResult(key, value)); + this.position = CursorPosition.AFTER_LAST; + return Optional.empty(); } } - return Optional.empty(); - } catch (SQLException e) { + } catch (Exception e) { return Optional.empty(); } } - private static Optional reloadedCursor( - Connection conn, - int tableIndex, - boolean isDuplicate, - int comparator, - FetchResult result, - int comparaotr, - boolean forward) { + Optional backwardPrevRecord() { + this.position = CursorPosition.IN_TABLE; - final String compOperator = forward ? ">" : "<"; - - final String sortOrder = forward ? "" : "desc"; - - final String queryPreffix = - getReloadCursorQueryPrefix(tableIndex, isDuplicate, compOperator, sortOrder); - - final String querySuffix = getQuerySuffix(tableIndex, isDuplicate, sortOrder); - - final String query = queryPreffix + querySuffix; + final boolean isPrimaryTable = this.tableIndex == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(this.tableIndex); - try { - PreparedStatement statement = conn.prepareStatement(query); - if (isDuplicate) { - statement.setBytes(1, result.key); - statement.setInt(2, result.dupNo); - statement.setBytes(3, result.key); - } else { - statement.setBytes(1, result.key); - } - statement.setFetchSize(0); - return Optional.ofNullable(statement.executeQuery()); - } catch (SQLException e) { - return Optional.empty(); + final String compOperator; + byte[] key; + if (this.previousFetchResult.isPresent()) { + compOperator = "<"; + key = this.previousFetchResult.get().key; + } else { + compOperator = "<="; + key = this.key; } - } - private static String getReloadCursorQueryPrefix( - int index, boolean isDuplicate, String compOperator, String sortOrder) { - final boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); + String query; if (isPrimaryTable) { - return String.format( - "select key, value from %s where key %s ? order by key %s", - primaryTable, compOperator, sortOrder); - } else if (isDuplicate) { - return String.format( - "select %s.key, %s.value, %s.dupNo from " - + "%s join %s on %s.value = %s.key " - + "where (%s.key == ? and %s.dupNo %s ?) or %s.key %s ? " - + "order by %s.key %s", - subTable, - primaryTable, - subTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - subTable, - compOperator, - subTable, - compOperator, - subTable, - sortOrder); + query = + String.format( + "select key, value from %s where key %s ? order by key desc limit 1", + primaryTable, compOperator); + } else if (this.isDuplicate) { + query = + String.format( + "select %s.key, %s.value, %s.dupNo from " + + "%s join %s on %s.value = %s.key " + + "where (%s.key == ? and %s.dupNo %s ?) or %s.key %s ? " + + "order by %s.key desc, %s.dupNo desc limit 1", + subTable, + primaryTable, + subTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + subTable, + compOperator, + subTable, + compOperator, + subTable, + subTable); } else { - return String.format( - "select %s.key, %s.value from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? " - + "order by %s.key %s", - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); + query = + String.format( + "select %s.key, %s.value from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? " + + "order by %s.key desc limit 1", + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable); } - } - static boolean matchKeyHead(byte[] originalKey, byte[] fetchKey) { - if (originalKey.length > fetchKey.length) { - return false; - } - for (int i = 0; i < originalKey.length; ++i) { - if (originalKey[i] != fetchKey[i]) { - return false; + try (PreparedStatement stmt = this.conn.prepareStatement(query)) { + stmt.setBytes(1, key); + if (this.isDuplicate) { + int dupNo = + this.previousFetchResult.isPresent() + ? this.previousFetchResult.get().dupNo + : 0; + stmt.setInt(2, dupNo); + stmt.setBytes(3, key); } - } - return true; - } - - private Optional fetchNext(ResultSet cursor) { - if (this.comparator == CobolIndexedFile.COB_EQ && this.nextCursorFetchKeyDiffrent) { - return Optional.empty(); - } - try { - if (cursor.next()) { - byte[] fetchKey = cursor.getBytes(1); - byte[] fetchValue = cursor.getBytes(2); - if (this.comparator == CobolIndexedFile.COB_EQ - && !matchKeyHead(this.key, fetchKey)) { - this.nextCursorFetchKeyDiffrent = true; - return Optional.empty(); - } - FetchResult result; - if (this.isDuplicate) { - int dupNo = cursor.getInt(3); - result = new FetchResult(fetchKey, fetchValue, dupNo); + try (ResultSet rs = stmt.executeQuery()) { + if (rs.next()) { + byte[] fetchedKey = rs.getBytes("key"); + byte[] value = rs.getBytes("value"); + if (isDuplicate) { + int dupNo = rs.getInt("dupNo"); + return Optional.of(new FetchResult(fetchedKey, value, dupNo)); + } else { + return Optional.of(new FetchResult(fetchedKey, value, 0)); + } } else { - result = new FetchResult(fetchKey, fetchValue); + this.position = CursorPosition.AFTER_LAST; + return Optional.empty(); } - return Optional.of(result); - } else { - return Optional.empty(); } - } catch (SQLException e) { + } catch (Exception e) { return Optional.empty(); } } - private Optional fetchPrev(ResultSet cursor) { - if (this.comparator == CobolIndexedFile.COB_EQ && this.prevCursorFetchKeyDiffrent) { - return Optional.empty(); - } - try { - if (cursor.next()) { - byte[] fetchKey = cursor.getBytes(1); - byte[] fetchValue = cursor.getBytes(2); - if (this.comparator == CobolIndexedFile.COB_EQ - && !matchKeyHead(this.key, fetchKey)) { - this.prevCursorFetchKeyDiffrent = true; - return Optional.empty(); - } - FetchResult result; - if (this.isDuplicate) { - int dupNo = cursor.getInt(3); - result = new FetchResult(fetchKey, fetchValue, dupNo); - } else { - result = new FetchResult(fetchKey, fetchValue); - } - return Optional.of(result); - } else { - return Optional.empty(); - } - } catch (SQLException e) { - return Optional.empty(); + private String getSortOrderForStartStatement(int comparator) { + if (comparator == CobolIndexedFile.COB_LT || comparator == CobolIndexedFile.COB_LE) { + return "desc"; + } else { + return "asc"; } } - Optional next() { - if (!this.forwardCursor.isPresent()) { - return Optional.empty(); + Optional fetchRecord() { + this.previousFetchResult = Optional.empty(); + this.position = CursorPosition.IN_TABLE; + + final boolean isPrimaryTable = this.tableIndex == 0; + final String primaryTable = CobolIndexedFile.getTableName(0); + final String subTable = CobolIndexedFile.getTableName(this.tableIndex); + final String compOperator = this.getCompOperator(this.comparator); + final String sortOrder = getSortOrderForStartStatement(this.comparator); + + String query; + if (isPrimaryTable) { + query = + String.format( + "select key, value from %s where key %s ? order by key %s", + primaryTable, compOperator, sortOrder); + } else if (this.isDuplicate) { + query = + String.format( + "select %s.key, %s.value, %s.dupNo from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? " + + "order by %s.key %s, %s.dupNo %s", + subTable, + primaryTable, + subTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable, + sortOrder, + subTable, + sortOrder); + } else { + query = + String.format( + "select %s.key, %s.value from " + + "%s join %s on %s.value = %s.key " + + "where %s.key %s ? " + + "order by %s.key %s", + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + primaryTable, + subTable, + compOperator, + subTable, + sortOrder); } - ResultSet cursor = this.forwardCursor.get(); - if (this.firstFetch) { - this.cursorIndex = 0; - Optional fetchResult = this.fetchNext(cursor); - if (this.comparator == CobolIndexedFile.COB_GT) { - while (fetchResult.isPresent()) { - FetchResult result = fetchResult.get(); - if (!matchKeyHead(this.key, result.key)) { - break; + byte[] key; + if (this.previousFetchResult.isPresent()) { + key = this.previousFetchResult.get().key; + } else { + key = this.key; + } + + try (PreparedStatement stmt = this.conn.prepareStatement(query)) { + stmt.setBytes(1, key); + try (ResultSet rs = stmt.executeQuery()) { + if (rs.next()) { + byte[] fetchedKey = rs.getBytes("key"); + if (this.comparator == CobolIndexedFile.COB_EQ + && !matchKeyHead(this.key, fetchedKey)) { + return Optional.empty(); + } else if (this.comparator == CobolIndexedFile.COB_GT) { + // exclude records that partially match the key + while (matchKeyHead(this.key, fetchedKey)) { + if (!rs.next()) { + return Optional.empty(); + } + fetchedKey = rs.getBytes("key"); + } } - fetchResult = this.fetchNext(cursor); + byte[] value = rs.getBytes("value"); + if (isDuplicate) { + int dupNo = rs.getInt("dupNo"); + return Optional.of(new FetchResult(fetchedKey, value, dupNo)); + } else { + return Optional.of(new FetchResult(fetchedKey, value)); + } + } else { + this.position = CursorPosition.AFTER_LAST; + return Optional.empty(); } } - this.firstFetch = false; - if (fetchResult.isPresent()) { - this.forwardBuffer.add(fetchResult.get()); - } - return fetchResult; - } else if (this.cursorIndex >= this.forwardBuffer.size()) { + } catch (Exception e) { return Optional.empty(); - } else if (-this.cursorIndex > this.backwardBuffer.size()) { - ++this.cursorIndex; - return Optional.empty(); - } else if (this.cursorIndex == this.forwardBuffer.size() - 1) { - Optional fetchResult = this.fetchNext(cursor); - if (fetchResult.isPresent()) { - this.forwardBuffer.add(fetchResult.get()); - ++this.cursorIndex; - } - return fetchResult; - } else if (this.cursorIndex < -1) { - ++this.cursorIndex; - return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); - } else { - ++this.cursorIndex; - return Optional.of(forwardBuffer.get(this.cursorIndex)); } } - Optional prev() { - if (!this.backwardCursor.isPresent()) { - return Optional.empty(); - } - ResultSet cursor = this.backwardCursor.get(); - if (this.firstFetch) { - this.cursorIndex = -1; - Optional fetchResult = this.fetchPrev(cursor); - if (fetchResult.isPresent()) { - this.firstFetch = false; - this.backwardBuffer.add(fetchResult.get()); - } - return fetchResult; - } else if (this.cursorIndex > this.forwardBuffer.size()) { - --this.cursorIndex; - return Optional.empty(); - } else if (-this.cursorIndex - 1 >= this.backwardBuffer.size()) { + Optional next() { + if (this.position == CursorPosition.AFTER_LAST) { return Optional.empty(); - } else if (-this.cursorIndex == this.backwardBuffer.size()) { - Optional fetchResult = this.fetchPrev(cursor); - if (fetchResult.isPresent()) { - this.backwardBuffer.add(fetchResult.get()); - --this.cursorIndex; - } - return fetchResult; - } else if (this.cursorIndex > 0) { - --this.cursorIndex; - return Optional.of(forwardBuffer.get(this.cursorIndex)); - } else { - --this.cursorIndex; - return Optional.of(backwardBuffer.get(-this.cursorIndex - 1)); } - } - void close() { - try { - if (backwardCursor.isPresent()) { - backwardCursor.get().close(); - } - if (forwardCursor.isPresent()) { - forwardCursor.get().close(); + Optional result; + if (this.firstFetch) { + if (this.position == CursorPosition.BEFORE_FIRST) { + result = fetchFirstRecord(); + } else { + result = fetchRecord(); } - } catch (SQLException e) { - return; - } - } - - Optional read(CursorReadOption opt) { - if (opt == CursorReadOption.NEXT) { - return this.next(); - } else if (opt == CursorReadOption.PREV) { - return this.prev(); } else { - return Optional.empty(); - } - } - - private static Optional getCursor( - Connection conn, - byte[] key, - int index, - boolean isDuplicate, - int comparator, - boolean forward) { - final Optional optionalCompOperator = getCompOperator(comparator, forward); - - if (!optionalCompOperator.isPresent()) { - return Optional.empty(); + result = forwardNextRecord(); } - - final String compOperator = optionalCompOperator.get(); - - final String sortOrder = forward ? "" : "desc"; - - final String queryPreffix = getQueryPrefix(index, compOperator, sortOrder, isDuplicate); - - final String querySuffix = getQuerySuffix(index, isDuplicate, sortOrder); - - final String query = queryPreffix + querySuffix; - - try { - PreparedStatement statement = conn.prepareStatement(query); - statement.setBytes(1, key); - statement.setFetchSize(0); - return Optional.ofNullable(statement.executeQuery()); - } catch (SQLException e) { - return Optional.empty(); + if (result.isPresent()) { + this.firstFetch = false; + this.position = CursorPosition.IN_TABLE; } + this.previousFetchResult = result; + return result; } - private static Optional getCompOperator(int comparator, boolean forward) { - if (comparator == CobolIndexedFile.COB_EQ - || comparator == CobolIndexedFile.COB_GE - || comparator == CobolIndexedFile.COB_LT) { - return Optional.of(forward ? ">=" : "<"); - } else if (comparator == CobolIndexedFile.COB_GT || comparator == CobolIndexedFile.COB_LE) { - return Optional.of(forward ? ">" : "<="); - } else { + Optional prev() { + if (this.position == CursorPosition.BEFORE_FIRST) { return Optional.empty(); } - } - private static String getQueryPrefix( - int index, String compOperator, String sortOrder, boolean isDuplicate) { - final boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); - if (isPrimaryTable) { - return String.format( - "select key, value from %s where key %s ? order by key %s", - primaryTable, compOperator, sortOrder); - } else if (isDuplicate) { - return String.format( - "select %s.key, %s.value, %s.dupNo from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? order by %s.key %s", - subTable, - primaryTable, - subTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); + Optional result; + if (this.firstFetch) { + if (this.position == CursorPosition.AFTER_LAST) { + result = fetchLastRecord(); + } else { + result = fetchRecord(); + } } else { - return String.format( - "select %s.key, %s.value from " - + "%s join %s on %s.value = %s.key " - + "where %s.key %s ? order by %s.key %s", - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - compOperator, - subTable, - sortOrder); + result = backwardPrevRecord(); } - } - private Optional getCursorForFirstLast( - int index, boolean isDuplicate, CursorReadOption option) { - final String query = getQueryForFirstLast(index, isDuplicate, option); - try { - Statement statement = this.conn.createStatement(); - return Optional.ofNullable(statement.executeQuery(query)); - } catch (SQLException e) { - return Optional.empty(); + if (result.isPresent()) { + this.firstFetch = false; + this.position = CursorPosition.IN_TABLE; } + this.previousFetchResult = result; + return result; } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ boolean moveToFirst() { - Optional cursor = - getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.FIRST); - if (!cursor.isPresent()) { - return false; - } - this.forwardCursor = cursor; - this.backwardCursor = Optional.empty(); this.firstFetch = true; - this.cursorIndex = 0; + this.position = CursorPosition.BEFORE_FIRST; return true; } - /** - * TODO: 準備中 - * - * @return TODO: 準備中 - */ boolean moveToLast() { - Optional cursor = - getCursorForFirstLast(this.tableIndex, this.isDuplicate, CursorReadOption.LAST); - if (!cursor.isPresent()) { - return false; - } - this.backwardCursor = cursor; - this.forwardCursor = Optional.empty(); this.firstFetch = true; - this.cursorIndex = 0; + this.position = CursorPosition.AFTER_LAST; return true; } - - private static String getQueryForFirstLast( - int index, boolean isDuplicate, CursorReadOption option) { - final String sortOrder; - if (option == CursorReadOption.FIRST) { - sortOrder = ""; - } else { - sortOrder = "desc"; - } - - boolean isPrimaryTable = index == 0; - final String primaryTable = CobolIndexedFile.getTableName(0); - final String subTable = CobolIndexedFile.getTableName(index); - - if (isPrimaryTable) { - return String.format( - "select key, value from %s order by key %s", primaryTable, sortOrder); - } else { - String optionColumn; - if (isDuplicate) { - optionColumn = String.format(", %s.dupNo", subTable); - } else { - optionColumn = ""; - } - String query = - String.format( - "select %s.key, %s.value %s from " - + "%s join %s on %s.value = %s.key " - + "order by %s.key %s", - subTable, - primaryTable, - optionColumn, - subTable, - primaryTable, - subTable, - primaryTable, - subTable, - sortOrder); - if (isDuplicate) { - return query + String.format(", dupNo %s", sortOrder); - } else { - return query; - } - } - } - - private static String getQuerySuffix(int index, boolean isDuplicate, String sortOrder) { - if (isDuplicate) { - final String tableName = CobolIndexedFile.getTableName(index); - return String.format(", %s.dupNo %s", tableName, sortOrder); - } else { - return ""; - } - } } diff --git a/tests/.gitignore b/tests/.gitignore index dc3ff865..fa865cd1 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -6,4 +6,5 @@ run~ syntax~ command-line-options~ cobj-idx~ +indexed-lock~ *.dir diff --git a/tests/Makefile.am b/tests/Makefile.am index 5cb9f5a2..5efa5da9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -30,6 +30,7 @@ TESTS = syntax \ jp-compat \ command-line-options \ cobj-idx \ + indexed-lock \ misc else TESTS = syntax \ @@ -41,6 +42,7 @@ TESTS = syntax \ jp-compat \ command-line-options \ cobj-idx \ + indexed-lock \ misc endif @@ -204,6 +206,19 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/unload.at \ cobj-idx.src/misc.at +indexed_lock_DEPENDENCIES = \ + indexed-lock.at \ + indexed-lock.src/file-lock.at \ + indexed-lock.src/access-same-record.at \ + indexed-lock.src/access-different-record.at \ + indexed-lock.src/input-mode.at \ + indexed-lock.src/same-process.at \ + indexed-lock.src/open-start-write-rewrite.at \ + indexed-lock.src/release-lock.at \ + indexed-lock.src/open-input.at \ + indexed-lock.src/lock-mode-clause.at \ + indexed-lock.src/lock-mode-automatic.at + misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ misc.src/index-comp.at \ @@ -287,4 +302,5 @@ $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) +$(srcdir)/indexed-lock: $(indexed_lock_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) diff --git a/tests/Makefile.in b/tests/Makefile.in index 50e8d69b..fe002ccd 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -570,6 +570,7 @@ SUBDIRS = cobol85 @I18N_UTF8_FALSE@ jp-compat \ @I18N_UTF8_FALSE@ command-line-options \ @I18N_UTF8_FALSE@ cobj-idx \ +@I18N_UTF8_FALSE@ indexed-lock \ @I18N_UTF8_FALSE@ misc @I18N_UTF8_TRUE@TESTS = syntax \ @@ -581,6 +582,7 @@ SUBDIRS = cobol85 @I18N_UTF8_TRUE@ jp-compat \ @I18N_UTF8_TRUE@ command-line-options \ @I18N_UTF8_TRUE@ cobj-idx \ +@I18N_UTF8_TRUE@ indexed-lock \ @I18N_UTF8_TRUE@ misc syntax_DEPENDENCIES = \ @@ -743,6 +745,19 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/unload.at \ cobj-idx.src/misc.at +indexed_lock_DEPENDENCIES = \ + indexed-lock.at \ + indexed-lock.src/file-lock.at \ + indexed-lock.src/access-same-record.at \ + indexed-lock.src/access-different-record.at \ + indexed-lock.src/input-mode.at \ + indexed-lock.src/same-process.at \ + indexed-lock.src/open-start-write-rewrite.at \ + indexed-lock.src/release-lock.at \ + indexed-lock.src/open-input.at \ + indexed-lock.src/lock-mode-clause.at \ + indexed-lock.src/lock-mode-automatic.at + misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ misc.src/index-comp.at \ @@ -1141,6 +1156,13 @@ cobj-idx.log: cobj-idx --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +indexed-lock.log: indexed-lock + @p='indexed-lock'; \ + b='indexed-lock'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) misc.log: misc @p='misc'; \ b='misc'; \ @@ -1382,6 +1404,7 @@ $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) +$(srcdir)/indexed-lock: $(indexed_lock_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/indexed-lock.at b/tests/indexed-lock.at new file mode 100644 index 00000000..509cdc66 --- /dev/null +++ b/tests/indexed-lock.at @@ -0,0 +1,12 @@ +AT_INIT([indexed-lock]) + +m4_include([file-lock.at]) +m4_include([access-same-record.at]) +m4_include([access-different-record.at]) +m4_include([input-mode.at]) +m4_include([same-process.at]) +m4_include([open-start-write-rewrite.at]) +m4_include([release-lock.at]) +m4_include([open-input.at]) +m4_include([lock-mode-clause.at]) +m4_include([lock-mode-automatic.at]) diff --git a/tests/indexed-lock.src/access-different-record.at b/tests/indexed-lock.src/access-different-record.at new file mode 100644 index 00000000..61038b92 --- /dev/null +++ b/tests/indexed-lock.src/access-different-record.at @@ -0,0 +1,368 @@ +AT_SETUP([Record locking of indexed files (different records)]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" + +declare -A PROGRAM_ID_TABLE1_FOR_WRITE + +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ"@:>@="id_read1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_lock1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_no_lock1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_START"@:>@="id_start_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_lock1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_no_lock1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_WRITE"@:>@="id_write1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1_write" +PROGRAM_ID_TABLE1_FOR_WRITE@<:@"$OPERATION_DELETE"@:>@="id_delete1_write" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" + + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e 's/@WRITE_RECORD@/MOVE "AAAA2BBBB2CCCC2" TO REC. WRITE REC./' |\ + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl + + cat prog1.template.cbl | + sed -e 's/@WRITE_RECORD@//' |\ + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1_FOR_WRITE@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* + + if test "$OPERATION2" == "$OPERATION_WRITE"; then + java ${PROGRAM_ID_TABLE1_FOR_WRITE@<:@$OPERATION1@:>@} > prog1.log & + else + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + fi + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record not changed" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + @WRITE_RECORD@ + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + CLOSE f. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA2_____*****" TO REC. + MOVE REC TO REC-BACKUP. + + @OPERATION@ + + DISPLAY FILE-STATUS. + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP + diff --git a/tests/indexed-lock.src/access-same-record.at b/tests/indexed-lock.src/access-same-record.at new file mode 100644 index 00000000..47c5e19f --- /dev/null +++ b/tests/indexed-lock.src/access-same-record.at @@ -0,0 +1,340 @@ +AT_SETUP([Record locking of indexed files (same record)]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" + + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + CLOSE f. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + + @OPERATION@ + + DISPLAY FILE-STATUS. + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/file-lock.at b/tests/indexed-lock.src/file-lock.at new file mode 100644 index 00000000..a2af932f --- /dev/null +++ b/tests/indexed-lock.src/file-lock.at @@ -0,0 +1,228 @@ +AT_SETUP([File locking of indexed files]) +AT_DATA([make_indexed_file.cbl],[ + identification division. + program-id. make_indexed_file@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to external "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + working-storage section. + 01 indexed-file-status pic 99. + procedure division. + main-procedure. + + open output indexed-file. + close indexed-file. +]) + +AT_DATA([prog1.cbl], [ + identification division. + program-id. prog1@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + select shared-file1 + assign to "shared1@@id@@.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2@@id@@.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 indexed-file-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * open the indexed file before the other process does. + open @@open_mode@@ indexed-file. + + * Notify the other process that + * this process opened the indexed file. + open output shared-file1. + close shared-file1. + + * Wait for the other process to finish. + call "C$SLEEP" using 1. + perform forever + open input shared-file2 + if shared-file2-status = 0 + exit perform + end-if + close shared-file2 + call "C$SLEEP" using 1 + end-perform. + close shared-file2. + + * Close the indexed file after the other process has finished. + close indexed-file. +]) + +AT_DATA([prog2.cbl], [ + identification division. + program-id. prog2@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + select shared-file1 + assign to "shared1@@id@@.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2@@id@@.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 indexed-file-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * Wait for the other process to open the indexed file. + call "C$SLEEP" using 1. + perform forever + open input shared-file1 + if shared-file1-status = 0 + close shared-file1 + exit perform + end-if + close shared-file1 + call "C$SLEEP" using 1 + end-perform. + + * Open the indexed file that another process has already opened. + open @@open_mode@@ indexed-file. + display indexed-file-status. + close indexed-file. + + * Notify the other process that + * this process finished. + open output shared-file2. + close shared-file2. +]) + +AT_DATA([run.sh], [ +#!/bin/bash + +function run_test() { + SEQ_NUMBER=$1 + OPEN_MODE_1=$2 + OPEN_MODE_2=$3 + EXPECTED_EXIT_CODE=$4 + + rm -f *.dat + + TEST_ID="$(echo "${OPEN_MODE_1}_${OPEN_MODE_2}" | sed 's/-/_/g')" + + PROGRAM_NAME_1="prog1${TEST_ID}" + PROGRAM_NAME_2="prog2${TEST_ID}" + + cat "prog1.cbl" | + sed "s/@@id@@/${TEST_ID}/g" | + sed "s/@@open_mode@@/${OPEN_MODE_1}/g" \ + > ${PROGRAM_NAME_1}.cbl + + cat "prog2.cbl" | + sed "s/@@id@@/${TEST_ID}/g" | + sed "s/@@open_mode@@/${OPEN_MODE_2}/g" \ + > ${PROGRAM_NAME_2}.cbl + + cat "make_indexed_file.cbl" | + sed "s/@@id@@/${TEST_ID}/g" \ + > make_indexed_file${TEST_ID}.cbl + + cobj ${PROGRAM_NAME_1}.cbl ${PROGRAM_NAME_2}.cbl make_indexed_file${TEST_ID}.cbl + + java make_indexed_file${TEST_ID} + + java $PROGRAM_NAME_1 & + PID1=$! + + java $PROGRAM_NAME_2 > ${TEST_ID}.log & + PID2=$! + + wait $PID1 $PID2 + if test "$(cat ${TEST_ID}.log)" != "${EXPECTED_EXIT_CODE}"; then + echo "<${SEQ_NUMBER}> Test ${TEST_ID} failed. Expected exit code: ${EXPECTED_EXIT_CODE}, got: $(cat ${TEST_ID}.log)" \ + exit 1 + fi +} + +################################### + +run_test 00 INPUT INPUT 00 +run_test 01 INPUT OUTPUT 61 +run_test 02 INPUT I-O 00 +run_test 03 INPUT EXTEND 00 +run_test 04 OUTPUT INPUT 61 +run_test 05 OUTPUT OUTPUT 61 +run_test 06 OUTPUT I-O 61 +run_test 07 OUTPUT EXTEND 61 +run_test 08 I-O INPUT 00 +run_test 09 I-O OUTPUT 61 +run_test 10 I-O I-O 00 +run_test 11 I-O EXTEND 00 +run_test 12 EXTEND INPUT 00 +run_test 13 EXTEND OUTPUT 61 +run_test 14 EXTEND I-O 00 +run_test 15 EXTEND EXTEND 00 +]) + +AT_CHECK([bash run.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/input-mode.at b/tests/indexed-lock.src/input-mode.at new file mode 100644 index 00000000..f2d1b6c4 --- /dev/null +++ b/tests/indexed-lock.src/input-mode.at @@ -0,0 +1,318 @@ +AT_SETUP([Record locking of indexed files (input mode)]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" + + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_START" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" + +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + CLOSE f. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN INPUT f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + + @OPERATION@ + + DISPLAY FILE-STATUS. + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/lock-mode-automatic.at b/tests/indexed-lock.src/lock-mode-automatic.at new file mode 100644 index 00000000..543a6930 --- /dev/null +++ b/tests/indexed-lock.src/lock-mode-automatic.at @@ -0,0 +1,348 @@ +AT_SETUP([-lock-mode-automatic]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." +OPERATION_OPEN="INITIALIZE DUMMY." # dummy operation +OPERATION_CLOSE="CLOSE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" + "OPERATION_OPEN" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_OPEN"@:>@="id_open1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_CLOSE"@:>@="id_close1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_OPEN"@:>@="id_open2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_CLOSE"@:>@="id_close2" + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl -lock-mode-automatic +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* f.dat pro1.log prog2.log + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + + CLOSE F. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + @OPERATION@ + + DISPLAY FILE-STATUS. + + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/lock-mode-clause.at b/tests/indexed-lock.src/lock-mode-clause.at new file mode 100644 index 00000000..e1856c2d --- /dev/null +++ b/tests/indexed-lock.src/lock-mode-clause.at @@ -0,0 +1,427 @@ +AT_SETUP([LOCK MODE IS MANUAL/AUTOMATIC]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." +OPERATION_OPEN="INITIALIZE DUMMY." # dummy operation +OPERATION_CLOSE="CLOSE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" + "OPERATION_OPEN" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_OPEN"@:>@="id_open1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_CLOSE"@:>@="id_close1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_OPEN"@:>@="id_open2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_CLOSE"@:>@="id_close2" + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@LOCK-MODE@/MANUAL/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* f.dat pro1.log prog2.log + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +# Compile programs with automatic locking +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@LOCK-MODE@/AUTOMATIC/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +run_test "$OPERATION_READ" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "51" "not changed" "record not changed" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + LOCK MODE IS @LOCK-MODE@ + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + + CLOSE F. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + LOCK MODE IS MANUAL + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + @OPERATION@ + + DISPLAY FILE-STATUS. + + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP \ No newline at end of file diff --git a/tests/indexed-lock.src/module-sync/setValue.java b/tests/indexed-lock.src/module-sync/setValue.java new file mode 100644 index 00000000..716dda2e --- /dev/null +++ b/tests/indexed-lock.src/module-sync/setValue.java @@ -0,0 +1,48 @@ +import java.io.UnsupportedEncodingException; +import jp.osscons.opensourcecobol.libcobj.*; +import jp.osscons.opensourcecobol.libcobj.common.*; +import jp.osscons.opensourcecobol.libcobj.data.*; +import jp.osscons.opensourcecobol.libcobj.exceptions.*; +import jp.osscons.opensourcecobol.libcobj.termio.*; +import jp.osscons.opensourcecobol.libcobj.call.*; +import jp.osscons.opensourcecobol.libcobj.file.*; +import jp.osscons.opensourcecobol.libcobj.ui.*; +import java.util.Optional; +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.HashMap; +import java.util.Map; +import java.io.FileNotFoundException; + +public class setValue implements CobolRunnable { + private static Map namedPipeWriters = new HashMap<>(); + @Override + public int run(CobolDataStorage... argStorages) { + AbstractCobolField NamedPipeField = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); + AbstractCobolField valueField = CobolModule.getCurrentModule().cob_procedure_parameters.get(1); + String namedPipe = NamedPipeField.getString().trim(); + String value = valueField.getString().trim(); + + try(BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(namedPipe)))){ + writer.write(value); + writer.close(); + } catch (IOException e) { + e.printStackTrace(); + return -1; + } + + return 0; + } + + @Override + public void cancel() { + return; + } + + @Override + public boolean isActive() { + return false; + } +} \ No newline at end of file diff --git a/tests/indexed-lock.src/module-sync/wait.java b/tests/indexed-lock.src/module-sync/wait.java new file mode 100644 index 00000000..89471eca --- /dev/null +++ b/tests/indexed-lock.src/module-sync/wait.java @@ -0,0 +1,69 @@ +import java.io.UnsupportedEncodingException; +import jp.osscons.opensourcecobol.libcobj.*; +import jp.osscons.opensourcecobol.libcobj.common.*; +import jp.osscons.opensourcecobol.libcobj.data.*; +import jp.osscons.opensourcecobol.libcobj.exceptions.*; +import jp.osscons.opensourcecobol.libcobj.termio.*; +import jp.osscons.opensourcecobol.libcobj.call.*; +import jp.osscons.opensourcecobol.libcobj.file.*; +import jp.osscons.opensourcecobol.libcobj.ui.*; +import java.util.Optional; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.Map; +import java.io.FileNotFoundException; + +public class wait implements CobolRunnable { + private static Map namedPipeReaders = new HashMap<>(); + @Override + public int run(CobolDataStorage... argStorages) { + AbstractCobolField namedPipeField = CobolModule.getCurrentModule().cob_procedure_parameters.get(0); + AbstractCobolField valueField = CobolModule.getCurrentModule().cob_procedure_parameters.get(1); + String namedPipe = namedPipeField.getString().trim(); + String value = valueField.getString().trim(); + + while(true) { + try(BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(namedPipe)))) { + + String line; + while ((line = reader.readLine()) != null) { + if (line.equals(value)) { + return 0; + } else { + Thread.sleep(200); + continue; + } + } + } catch (FileNotFoundException e) { + try { + Thread.sleep(200); + } catch (InterruptedException ie) { + ie.printStackTrace(); + Thread.currentThread().interrupt(); + return -1; + } + continue; + } catch (IOException e) { + e.printStackTrace(); + return -1; + } catch (InterruptedException e) { + e.printStackTrace(); + Thread.currentThread().interrupt(); + return -1; + } + } + } + + @Override + public void cancel() { + return; + } + + @Override + public boolean isActive() { + return false; + } +} \ No newline at end of file diff --git a/tests/indexed-lock.src/open-input.at b/tests/indexed-lock.src/open-input.at new file mode 100644 index 00000000..6fb5328c --- /dev/null +++ b/tests/indexed-lock.src/open-input.at @@ -0,0 +1,303 @@ +AT_SETUP([READ with OPEN INPUT cannot lock record]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." +OPERATION_OPEN="INITIALIZE DUMMY." # dummy operation +OPERATION_CLOSE="CLOSE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" + "OPERATION_OPEN" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_OPEN"@:>@="id_open1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_CLOSE"@:>@="id_close1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_OPEN"@:>@="id_open2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_CLOSE"@:>@="id_close2" + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* f.dat pro1.log prog2.log + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN INPUT f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + + CLOSE F. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + @OPERATION@ + + DISPLAY FILE-STATUS. + + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". + +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP + diff --git a/tests/indexed-lock.src/open-start-write-rewrite.at b/tests/indexed-lock.src/open-start-write-rewrite.at new file mode 100644 index 00000000..8b8dad47 --- /dev/null +++ b/tests/indexed-lock.src/open-start-write-rewrite.at @@ -0,0 +1,333 @@ +AT_SETUP([OPEN,START,WRITE,REWRITE cannot lock indexed file records]) +AT_DATA([a.sh], [ + +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." +OPERATION_OPEN="INITIALIZE DUMMY." # dummy operation + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" + "OPERATION_OPEN" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_OPEN"@:>@="id_open1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_OPEN"@:>@="id_open2" + + +PROGRAM1_OPERATIONS=( + "$OPERATION_OPEN" + "$OPERATION_START" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + if test "${operation}" == "$OPERATION_WRITE"; then + cat prog1.template.cbl | + sed -e "s/@WRITE_REC@//g" |\ + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + else + cat prog1.template.cbl | + sed -e "s/@WRITE_REC@/WRITE REC./g" |\ + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + fi + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* f.dat pro1.log prog2.log + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_OPEN" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_OPEN" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_OPEN" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_START" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_START" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_START" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_WRITE" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_WRITE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_WRITE" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" + +run_test "$OPERATION_REWRITE" "$OPERATION_READ" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_READ_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_READ_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_START" "00" "00" "not changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_READ_NEXT_RECORD" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "00" "00" "changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_WRITE" "00" "22" "not changed" "record not changed" +run_test "$OPERATION_REWRITE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_REWRITE" "$OPERATION_DELETE" "00" "00" "not changed" "record deleted" +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + * WRITE REC. + @WRITE_REC@ + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + CLOSE f. + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + + @OPERATION@ + + DISPLAY FILE-STATUS. + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". + + +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/release-lock.at b/tests/indexed-lock.src/release-lock.at new file mode 100644 index 00000000..affe4a33 --- /dev/null +++ b/tests/indexed-lock.src/release-lock.at @@ -0,0 +1,317 @@ +AT_SETUP([Operations except for READ unlock previously locked records]) +AT_DATA([a.sh], [ +javac wait.java setValue.java + +OPERATION_READ="READ F." +OPERATION_READ_WITH_LOCK="READ F WITH LOCK." +OPERATION_READ_WITH_NO_LOCK="READ F WITH NO LOCK." +OPERATION_START="START F KEY IS = REC-KEY." +OPERATION_READ_NEXT_RECORD="START F KEY IS = REC-KEY. READ F NEXT RECORD." +OPERATION_READ_NEXT_RECORD_WITH_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH LOCK." +OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK="START F KEY IS = REC-KEY. READ F NEXT RECORD WITH NO LOCK." +OPERATION_WRITE="WRITE REC." +OPERATION_REWRITE="REWRITE REC." +OPERATION_DELETE="DELETE F." +OPERATION_OPEN="INITIALIZE DUMMY." # dummy operation +OPERATION_CLOSE="CLOSE F." + +OPERATIONS=( + "OPERATION_READ" + "OPERATION_READ_WITH_LOCK" + "OPERATION_READ_WITH_NO_LOCK" + "OPERATION_START" + "OPERATION_READ_NEXT_RECORD" + "OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "OPERATION_WRITE" + "OPERATION_REWRITE" + "OPERATION_DELETE" + "OPERATION_OPEN" + "OPERATION_CLOSE" +) + + +declare -A PROGRAM_ID_TABLE1 + +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ"@:>@="id_read1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_START"@:>@="id_start1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_WRITE"@:>@="id_write1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_REWRITE"@:>@="id_rewrite1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_DELETE"@:>@="id_delete1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_OPEN"@:>@="id_open1" +PROGRAM_ID_TABLE1@<:@"$OPERATION_CLOSE"@:>@="id_close1" + +declare -A PROGRAM_ID_TABLE2 + +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ"@:>@="id_read2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_LOCK"@:>@="id_read_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_WITH_NO_LOCK"@:>@="id_read_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_START"@:>@="id_start2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD"@:>@="id_read_next_rec2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_LOCK"@:>@="id_read_next_rec_with_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK"@:>@="id_read_next_rec_with_no_lock2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_WRITE"@:>@="id_write2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_REWRITE"@:>@="id_rewrite2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_DELETE"@:>@="id_delete2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_OPEN"@:>@="id_open2" +PROGRAM_ID_TABLE2@<:@"$OPERATION_CLOSE"@:>@="id_close2" + +PROGRAM1_OPERATIONS=( + "$OPERATION_READ" + "$OPERATION_READ_WITH_LOCK" + "$OPERATION_READ_WITH_NO_LOCK" + "$OPERATION_START" + "$OPERATION_READ_NEXT_RECORD" + "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" + "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" + "$OPERATION_WRITE" + "$OPERATION_REWRITE" + "$OPERATION_DELETE" + "$OPERATION_CLOSE" +) + +PROGRAM2_OPERATIONS=( + "$OPERATION_REWRITE" +) + +for operation in "${PROGRAM1_OPERATIONS@<:@@@:>@}"; do + if test "${operation}" == "$OPERATION_CLOSE"; then + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@CLOSE_FILE@//" |\ + sed -e "s/@WRITE-REC@/AAAA2/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + elif test "${operation}" == "$OPERATION_WRITE"; then + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@CLOSE_FILE@/CLOSE F./" |\ + sed -e "s/@WRITE-REC@/AAAA3/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + else + cat prog1.template.cbl | + sed -e "s/@OPERATION@/${operation}/" |\ + sed -e "s/@CLOSE_FILE@/CLOSE F./" |\ + sed -e "s/@WRITE-REC@/AAAA2/" |\ + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE1@<:@${operation}@:>@}/" \ + > prog1.cbl + fi + cobj prog1.cbl +done + +for operation in "${PROGRAM2_OPERATIONS@<:@@@:>@}"; do + cat prog2.template.cbl | + sed -e "s/@PROGRAM_ID@/${PROGRAM_ID_TABLE2@<:@${operation}@:>@}/" \ + > prog2.cbl + cobj prog2.cbl +done + + +function run_test() { + if test "$1" == "" -o "$2" == "" -o "$3" == "" -o "$4" == "" -o "$5" == "" -o "$6" == ""; then + echo empty strings are in arguments + echo "\$1: $1" + echo "\$2: $2" + echo "\$3: $3" + echo "\$4: $4" + echo "\$5: $5" + echo "\$6: $6" + return 1 + fi + OPERATION1=$1 + OPERATION2=$2 + PROG1_STATUS=$3 + PROG2_STATUS=$4 + PROG2_MESSAGE=$5 + FINAL_RECORD_STATE=$6 + + rm -f playground-record-lock-* f.dat pro1.log prog2.log + + java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + PID1=$! + java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + PID2=$! + + wait $PID1 $PID2 + + echo "$PROG1_STATUS" > prog1.expected.log + echo "$FINAL_RECORD_STATE" >> prog1.expected.log + + echo "$PROG2_STATUS" > prog2.expected.log + echo "$PROG2_MESSAGE" >> prog2.expected.log + + if ! diff prog1.log prog1.expected.log || ! diff prog2.log prog2.expected.log; then + echo "$OPERATION1, $OPERATION2, $PROG1_STATUS, $PROG2_STATUS, $PROG2_MESSAGE" + echo prog1.log === + cat prog1.log + echo prog1.expected.log === + cat prog1.expected.log + echo prog2.log === + cat prog2.log + echo prog2.expected.log === + cat prog2.expected.log + fi +} + +run_test "$OPERATION_READ" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_START" "$OPERATION_REWRITE" "00" "51" "not changed" "record not changed" +run_test "$OPERATION_READ_NEXT_RECORD" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_WRITE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_REWRITE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_DELETE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" +run_test "$OPERATION_CLOSE" "$OPERATION_REWRITE" "00" "00" "not changed" "record rewritten" + +]) + + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) + +AT_DATA([prog1.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + MOVE "AAAA2" TO REC-KEY. + MOVE "BBBB2" TO REC-KEY2. + MOVE "CCCC2" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + MOVE "@WRITE-REC@" TO REC-KEY. + @OPERATION@ + + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "end of prog2". + + @CLOSE_FILE@ + + OPEN INPUT f. + MOVE "AAAA1" TO REC-KEY. + READ F. + + IF FILE-STATUS = "23" + DISPLAY "record deleted" + GO TO FINISH + END-IF. + + IF REC = "AAAA1_____*****" + DISPLAY "record rewritten" + GO TO FINISH + END-IF. + + IF REC = "AAAA1BBBB1CCCC1" + DISPLAY "record not changed" + ELSE + DISPLAY "unexpected: rec=" REC + END-IF. + + FINISH. + CLOSE f. + +]) + +AT_DATA([prog2.template.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. @PROGRAM_ID@. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-BACKUP PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + + INITIALIZE REC. + MOVE "AAAA1_____*****" TO REC. + MOVE REC TO REC-BACKUP. + REWRITE REC. + + DISPLAY FILE-STATUS. + + IF REC = REC-BACKUP + DISPLAY "not changed" + ELSE + DISPLAY "changed" + END-IF. + + CLOSE f. + + CALL "setValue" USING + "playground-record-lock-02" + "end of prog2". + +]) + +AT_CHECK([bash a.sh]) +AT_CLEANUP diff --git a/tests/indexed-lock.src/same-process.at b/tests/indexed-lock.src/same-process.at new file mode 100644 index 00000000..dce1f297 --- /dev/null +++ b/tests/indexed-lock.src/same-process.at @@ -0,0 +1,124 @@ +AT_SETUP([Record locking of indexed files (same process)]) +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 COMMAND-COUNTER-1 PIC 9(3) VALUE 0. + 01 COMMAND-COUNTER-2 PIC 9(3) VALUE 0. + + PROCEDURE DIVISION. + + OPERATIONS-TEST. + + PERFORM VARYING COMMAND-COUNTER-1 FROM 1 BY 1 + UNTIL COMMAND-COUNTER-1 > 1 + PERFORM VARYING COMMAND-COUNTER-2 FROM 1 BY 1 + UNTIL COMMAND-COUNTER-2 > 1 + * initialize file + OPEN OUTPUT f + MOVE "AAAA1" TO REC-KEY + MOVE "BBBB1" TO REC-KEY2 + MOVE "CCCC1" TO REC-DATA + WRITE REC + CLOSE f + * test read operations + OPEN I-O f + MOVE "AAAA1" TO REC-KEY + EVALUATE COMMAND-COUNTER-1 + WHEN 1 + READ f + WHEN 2 + READ f WITH LOCK + WHEN 3 + READ f WITH NO LOCK + WHEN 4 + START F KEY IS = REC-KEY + READ f NEXT RECORD + WHEN 5 + START F KEY IS = REC-KEY + READ f NEXT RECORD WITH LOCK + WHEN 6 + START F KEY IS = REC-KEY + READ f NEXT RECORD WITH NO LOCK + WHEN OTHER + CONTINUE + END-EVALUATE + + IF FILE-STATUS NOT = "00" + DISPLAY "COMMAND-COUNTER-1: " COMMAND-COUNTER-1 + DISPLAY "FILE-STATUS: " FILE-STATUS + END-IF + + MOVE "AAAA1" TO REC-KEY + EVALUATE COMMAND-COUNTER-2 + WHEN 1 + READ f + WHEN 2 + READ f WITH LOCK + WHEN 3 + READ f WITH NO LOCK + WHEN 4 + START F KEY IS = REC-KEY + WHEN 5 + START F KEY IS = REC-KEY + READ f NEXT RECORD + WHEN 6 + START F KEY IS = REC-KEY + READ f NEXT RECORD WITH LOCK + WHEN 7 + START F KEY IS = REC-KEY + READ f NEXT RECORD WITH NO LOCK + WHEN 8 + WRITE REC + WHEN 9 + REWRITE REC + WHEN 10 + DELETE F + WHEN OTHER + CONTINUE + END-EVALUATE + * WRITE operation fails + IF COMMAND-COUNTER-2 = 8 + IF FILE-STATUS NOT = "22" + DISPLAY "COMMAND-COUNTER-2: " + COMMAND-COUNTER-2 + DISPLAY "FILE-STATUS: " FILE-STATUS + END-IF + ELSE + * other operations succeed + IF FILE-STATUS NOT = "00" + DISPLAY "COMMAND-COUNTER-2: " + COMMAND-COUNTER-2 + DISPLAY "FILE-STATUS: " FILE-STATUS + END-IF + END-IF + CLOSE f + END-PERFORM + END-PERFORM. + STOP RUN. +]) + +AT_CHECK([cobj prog.cbl]) +AT_CHECK([java prog]) +AT_CLEANUP diff --git a/tests/run.src/miscellaneous.at b/tests/run.src/miscellaneous.at index 4a91dc2d..cc3ddfb2 100644 --- a/tests/run.src/miscellaneous.at +++ b/tests/run.src/miscellaneous.at @@ -2135,3 +2135,43 @@ AT_CHECK([java prog], [0], [30 ]) AT_CLEANUP + +AT_SETUP([Open an invalid formatted indexed file]) + +AT_CHECK([echo invalid-data > invalid-formatted-file]) + +AT_DATA([prog.cbl], +[ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "invalid-formatted-file" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + PROCEDURE DIVISION. + MAIN-PROCEDURE. + + OPEN INPUT f. + DISPLAY FILE-STATUS. + CLOSE f. +]) + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([java prog], [0], +[30 +]) +AT_CLEANUP From b1b4b5150bee6468159ed72bf9899b7bb5e6c431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 22:21:41 +0900 Subject: [PATCH 154/188] Bump actions/setup-java from 4 to 5 (#692) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-gcc9.yml | 2 +- .github/workflows/build.yml | 4 ++-- .github/workflows/check-missing-javadoc.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/javadoc.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test-cobj-api.yml | 2 +- .github/workflows/test-nist.yml | 2 +- .github/workflows/test-other.yml | 2 +- .github/workflows/update-github-pages.yml | 2 +- .github/workflows/windows-build.yml | 2 +- .github/workflows/windows-test.yml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-gcc9.yml b/.github/workflows/build-gcc9.yml index 13c00af2..a1c613c4 100644 --- a/.github/workflows/build-gcc9.yml +++ b/.github/workflows/build-gcc9.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 880a1322..f5f72046 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,13 +20,13 @@ jobs: container: image: ${{ inputs.os }} steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 if: inputs.os == 'ubuntu:24.04' with: distribution: 'temurin' java-version: '21' - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 if: inputs.os == 'almalinux:9' with: distribution: 'temurin' diff --git a/.github/workflows/check-missing-javadoc.yml b/.github/workflows/check-missing-javadoc.yml index f7f9d9bd..fba8fc18 100644 --- a/.github/workflows/check-missing-javadoc.yml +++ b/.github/workflows/check-missing-javadoc.yml @@ -15,7 +15,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e9b0c04f..e6882827 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e1650ffe..d101109c 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -58,7 +58,7 @@ jobs: cd ../ mv opensourcecobol4j/* . mv libcobj/* opensourcecobol4j - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: java-version: '11' distribution: 'temurin' diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index b39ed45e..ef5dae7a 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 57faeae3..128069ef 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout opensource COBOL 4J uses: actions/checkout@v5 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/test-cobj-api.yml b/.github/workflows/test-cobj-api.yml index bf720e15..15deb982 100644 --- a/.github/workflows/test-cobj-api.yml +++ b/.github/workflows/test-cobj-api.yml @@ -30,7 +30,7 @@ jobs: with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 if: inputs.os != 'amazonlinux:2023' with: distribution: 'temurin' diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index 2675c52d..ac29b4d5 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -37,7 +37,7 @@ jobs: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - name: Install Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 if: inputs.os != 'amazonlinux:2023' with: distribution: 'temurin' diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index 39dba0c7..4fa88bd8 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -33,7 +33,7 @@ jobs: with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 if: inputs.os != 'amazonlinux:2023' with: distribution: 'temurin' diff --git a/.github/workflows/update-github-pages.yml b/.github/workflows/update-github-pages.yml index 3c41907e..b286406d 100644 --- a/.github/workflows/update-github-pages.yml +++ b/.github/workflows/update-github-pages.yml @@ -36,7 +36,7 @@ jobs: - name: Checkout uses: actions/checkout@v5 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 068002b5..f367e55c 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -15,7 +15,7 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 129dcf93..6ece70d5 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -27,7 +27,7 @@ jobs: path: win/x64/Release/ - name: Install Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '11' From 70bb24c8742b448f2c44b03bbe871102553079c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 09:26:04 +0900 Subject: [PATCH 155/188] Bump actions/upload-pages-artifact from 3 to 4 (#696) Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/update-github-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-github-pages.yml b/.github/workflows/update-github-pages.yml index b286406d..516ccc74 100644 --- a/.github/workflows/update-github-pages.yml +++ b/.github/workflows/update-github-pages.yml @@ -52,7 +52,7 @@ jobs: uses: actions/configure-pages@v5 - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v4 with: # Upload entire repository path: 'github-pages' From dbcfae7489eb664e027052467cbed57dd9e6201d Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Tue, 26 Aug 2025 10:55:37 +0900 Subject: [PATCH 156/188] Set file status to 92 when opening old indexed file (#694) * feat: set file status 92 when opening old files * fix: set file status 92 correctly * tests: add tests for opening old indexed files * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../libcobj/file/CobolFile.java | 12 ++++ .../libcobj/file/CobolIndexedFile.java | 46 +++++++++++++++ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/indexed-lock.at | 1 + .../indexed-file/old_indexed_file.dat | Bin 0 -> 40960 bytes tests/indexed-lock.src/old-file.at | 53 ++++++++++++++++++ 7 files changed, 114 insertions(+) create mode 100644 tests/indexed-lock.src/indexed-file/old_indexed_file.dat create mode 100644 tests/indexed-lock.src/old-file.at diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 56e9a6b2..348c8697 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -285,6 +285,12 @@ public class CobolFile { /** TODO: 準備中 */ protected static final int COB_STATUS_91_NOT_AVAILABLE = 91; + /** + * File status 92: Version incompatibility. + * Indicates that the file operation failed due to a version mismatch between the file and the program. + */ + protected static final int COB_STATUS_92_VERSION_INCOMPATIBLE = 92; + // ============================================== // The following constants must not be equal // to any of the above constants `COB_STATUS_*` @@ -1103,6 +1109,9 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { case COB_STATUS_91_NOT_AVAILABLE: saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); return; + case COB_STATUS_92_VERSION_INCOMPATIBLE: + saveStatus(COB_STATUS_92_VERSION_INCOMPATIBLE, fnstatus); + return; case COB_LINAGE_INVALID: saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); return; @@ -2066,6 +2075,9 @@ public void cob_delete_file(AbstractCobolField fnstatus) { case COB_STATUS_91_NOT_AVAILABLE: saveStatus(COB_STATUS_91_NOT_AVAILABLE, fnstatus); return; + case COB_STATUS_92_VERSION_INCOMPATIBLE: + saveStatus(COB_STATUS_92_VERSION_INCOMPATIBLE, fnstatus); + return; case COB_LINAGE_INVALID: saveStatus(COB_STATUS_57_I_O_LINAGE, fnstatus); return; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index 8f355cef..f82588c8 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -227,6 +227,13 @@ public int open_(String filename, int mode, int sharing) { return getConnectionStatus; } + if(fileExists) { + int code = this.checkVersionOld(); + if(code != COB_STATUS_00_SUCCESS) { + return code; + } + } + try { // Acquire a file lock boolean succeedToFileLock = this.acquireFileLock(filename, mode, fileExists); @@ -292,6 +299,45 @@ private int getConnection(String filename) { return COB_STATUS_00_SUCCESS; } + private int checkVersionOld() { + IndexedFile p = this.filei; + try (Statement st = p.connection.createStatement()) { + String fileLockTableExistsSql = + "select exists(select 1 from sqlite_master where type = 'table' and name = 'file_lock')"; + ResultSet fileLockTableExistsResultSet = st.executeQuery(fileLockTableExistsSql); + if (fileLockTableExistsResultSet.next()) { + boolean fileLockTableExists = fileLockTableExistsResultSet.getInt(1) == 1; + if(!fileLockTableExists) { + return COB_STATUS_92_VERSION_INCOMPATIBLE; + } + } else { + return COB_STATUS_92_VERSION_INCOMPATIBLE; // file_lock table does not exist + } + + boolean lockedByColumnExists = false; + boolean processIdColumnExists = false; + boolean lockedAtColumnExists = false; + try (ResultSet rs = st.executeQuery("PRAGMA table_info('table0')")) { + while (rs.next()) { + String columnName = rs.getString("name"); + if ("locked_by".equals(columnName)) { + lockedByColumnExists = true; + } else if ("process_id".equals(columnName)) { + processIdColumnExists = true; + } else if ("locked_at".equals(columnName)) { + lockedAtColumnExists = true; + } + if (lockedByColumnExists && processIdColumnExists && lockedAtColumnExists) { + return COB_STATUS_00_SUCCESS; // All required columns exist + } + } + } + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } + return COB_STATUS_92_VERSION_INCOMPATIBLE; + } + private String getOpenModeString(int mode) { switch (mode) { case COB_OPEN_INPUT: diff --git a/tests/Makefile.am b/tests/Makefile.am index 5efa5da9..7be45806 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -217,6 +217,7 @@ indexed_lock_DEPENDENCIES = \ indexed-lock.src/release-lock.at \ indexed-lock.src/open-input.at \ indexed-lock.src/lock-mode-clause.at \ + indexed-lock.src/old-file.at \ indexed-lock.src/lock-mode-automatic.at misc_DEPENDENCIES = \ diff --git a/tests/Makefile.in b/tests/Makefile.in index fe002ccd..3e02765c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -756,6 +756,7 @@ indexed_lock_DEPENDENCIES = \ indexed-lock.src/release-lock.at \ indexed-lock.src/open-input.at \ indexed-lock.src/lock-mode-clause.at \ + indexed-lock.src/old-file.at \ indexed-lock.src/lock-mode-automatic.at misc_DEPENDENCIES = \ diff --git a/tests/indexed-lock.at b/tests/indexed-lock.at index 509cdc66..79c9b197 100644 --- a/tests/indexed-lock.at +++ b/tests/indexed-lock.at @@ -10,3 +10,4 @@ m4_include([release-lock.at]) m4_include([open-input.at]) m4_include([lock-mode-clause.at]) m4_include([lock-mode-automatic.at]) +m4_include([old-file.at]) diff --git a/tests/indexed-lock.src/indexed-file/old_indexed_file.dat b/tests/indexed-lock.src/indexed-file/old_indexed_file.dat new file mode 100644 index 0000000000000000000000000000000000000000..b9ce57294704732c8d6809d867dacfc91aa04050 GIT binary patch literal 40960 zcmeI*O-~a+7{KuvO5eb;CMIn-7$-pzs>F1IClaH8J(v&@l!L}Yv!w%WEW5bfnqs_^ zqu<8Q;Ro>uoaE^2j+7QkI2Zqu?lL>GFVFmD(_}i6@NRq4kG0whqXREiE8@P8QoK@1 z2$3<{jM*+y-ejgP4$NOUl)ovP5zl@+C^_e%c<;M#J~_Xf<+p=^Ocnq*?%z_W+#sPV83A=KZxnFs4zb0%M;X+2~WkkXM!FZ_*bvpy&hn- zUdUBGtVrPpE#2#UX`9ho!|TRjdfXTjNy8meSX|BJD)aMlJH0I3xoPX%{J+58Y`w0( zH$LVmt_lNXYm=a>>)Bl8(Y*YaR(870;mdO)mk%n3?vS>t+IOe(NdU(d)!yCivmHHSvLqY%n1Q0*~0R#|0009ILKmdWs7O2Qf`N^6| zZn|4H$=xu?O(yuI^GBEu2>}EUKmY**5I_I{1Q0*~0R--rKp|5uroRL*{=ZutOKT87 z009ILKmY**5I_I{1P~Y!7>xhz`u|hmoDS8JMF0T=5I_I{1Q0*~0R#|00D*}Xn3L1x zav@#+&;0*H_awn1fB*srAb Date: Wed, 27 Aug 2025 11:49:47 +0900 Subject: [PATCH 157/188] Add `cobj-idx migrate` and `cobj-idx unlock` (#693) * add: processUuid and processId * add: create a new table `file_lock` * refactor: suppress PMD warnings * fix: sql statement creating a new table `file_lock` * wip: wip * fix: a PMD warning * fix: a SpotBug warning * refactor: remove printStackTrace() * fix: check formats of indexed files to open * test: remove unnecessary checks * fix: change constants to avoid overlaps * fix: add a file existing check * test: fix the test of opening an invalid indexed file * test: fix load.at not to call default error handlers * chore: end a transaction * refactor: CobolIndexedFile.java * test: prevent infinite loops * refactor: CobolIndexedFile.java * wip: wip * fix: improve open_ in CobolIndexedFile.java * change: set transaction settings * set the transaction mode to EXCLUSIVE * set busy_timeout to 5000 * feat: implement file locks of indexed files * fix: change the condition of creating file_lock * change: set the transaction isolation to SERIALIZABLE * test: add tests of file locking of indexed files * change: the schema of the record key table * fix: an INSERT statement * fix: an insert statement for primary record tables * feat: add a new option `-default_select_lock_mode` * channge: insert information when calling read_() * fix: the method read_ * Implement file locking of indexed files (#678) * add: processUuid and processId * add: create a new table `file_lock` * refactor: suppress PMD warnings * fix: sql statement creating a new table `file_lock` * wip: wip * fix: a PMD warning * fix: a SpotBug warning * refactor: remove printStackTrace() * fix: check formats of indexed files to open * test: remove unnecessary checks * fix: change constants to avoid overlaps * fix: add a file existing check * test: fix the test of opening an invalid indexed file * test: fix load.at not to call default error handlers * chore: end a transaction * refactor: CobolIndexedFile.java * test: prevent infinite loops * refactor: CobolIndexedFile.java * wip: wip * fix: improve open_ in CobolIndexedFile.java * change: set transaction settings * set the transaction mode to EXCLUSIVE * set busy_timeout to 5000 * feat: implement file locks of indexed files * fix: change the condition of creating file_lock * change: set the transaction isolation to SERIALIZABLE * test: add tests of file locking of indexed files * Update libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: remove unnecessary comments * refactor: fix typo * refactor: fix typo --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: CobolIndexedFile.java * add: lock a record when READ NEXT is executed * add: unlock records when closing indexed files * fix: the process of unlocking a file lock * fix: controling transactions when rewriting records * fix: commit timing when writing records * fix: commits and rollbacks in WRITE, REWRITE and DELETE * change: -default_lock_mode to -lock-mode-automatic * refactor: code for commiting data * add: unlock the previous record after writing * add: unlock previous records after rewriting * add: impelment record lockings of DELETE * fix: constant numbers change the value of COB_LOCK_AUTOMATIC and COB_LOCK_MULTIPLE in CobolFile.java * chore: remove duplicated code * fix: close ResultSet not to lock database implicitly * fix: close ResultSet in CobolIndexedFile.java * add: NewIndexedCursor.java * wip: read forward * wip: read prev * fix: fetchRecord * fix: READ NEXT/PREVIOUS * fix: READ * fix: fetchRecord * fix: fetchRecord * fix: START * fix: START ~ KEY IS GREATER THAN * fix: START ~ KEY IS <= * fix: START and READ NEXT RECORD * refactor: resolve PMD warnings * chore: migrate NewIndexedCursor to IndexedCursor * fix: allow READ WITH LOCK/WITH NO LOCK if LOCK MODE IS AUTOMATIC * fix: call commit() in the end of READ and READ NEXT/PREV * fix: initialize previousLockedReclordKey in close_() * test: add some tests for record locking * fix: unlock Previous records at the end of READ * test: accelerate file locking tests * test: wip * test: add tests for `READ WITH LOCK` * test: check the final state of an indexed file * fix: do not read data when the file status is not 00 * test: move common java code for record lock tests * test: add tests for different records * test: add tests for input mode * test: add tests for the same process * fix: commit at the end of start_ * test: guarantee that OPEN,START,WRITE,REWRITE cannot lock indexed file records * test: fix tests for OPEN,START,WRITE and REWRITE * fix: processes of unlocking records * tests: add tests for unlocking records * tests: add tests of OPEN INPUT * test: add tests for LOCK MODE * test: add tests of -lock-mode-automatic * tests: move tests for indexed files lock to tests/indexed-lock * ci: run tests `indexed-lock` * chore: fix typo * feat: add `cobj-idx migrate` * feat: add `cobj-idx unlock` * test: add a test for `cobj-idx migrate` * test: add a test for `cobj-idx unlock` * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: simplify some `if` conditions --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../indexed_file/IndexedFileUtilMain.java | 96 ++++++++++ tests/Makefile.am | 2 + tests/Makefile.in | 2 + tests/cobj-idx.at | 3 +- tests/cobj-idx.src/migrate.at | 76 ++++++++ tests/cobj-idx.src/test-data/indexed_file.dat | Bin 0 -> 40960 bytes tests/cobj-idx.src/unlock.at | 173 ++++++++++++++++++ 7 files changed, 351 insertions(+), 1 deletion(-) create mode 100644 tests/cobj-idx.src/migrate.at create mode 100644 tests/cobj-idx.src/test-data/indexed_file.dat create mode 100644 tests/cobj-idx.src/unlock.at diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 933af573..dd760163 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -137,6 +137,40 @@ public static void main(String[] args) { System.err.println("error: " + e.getMessage()); System.exit(1); } + } else if ("migrate".equals(subCommand)) { + if (unrecognizedArgs.length != 2) { + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); + } else { + System.err.println("error: too many indexed files are specified."); + } + System.exit(1); + } + String indexedFilePath = unrecognizedArgs[1]; + try { + migrateIndexedFile(indexedFilePath); + } catch (Exception e) { + System.err.println("error: " + e.getMessage()); + System.exit(1); + } + System.exit(0); + } else if ("unlock".equals(subCommand)) { + if (unrecognizedArgs.length != 2) { + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); + } else { + System.err.println("error: too many indexed files are specified."); + } + System.exit(1); + } + String indexedFilePath = unrecognizedArgs[1]; + try { + unlockIndexedFile(indexedFilePath); + } catch (Exception e) { + System.err.println("error: " + e.getMessage()); + System.exit(1); + } + System.exit(0); } else if ("load".equals(subCommand)) { if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { if (unrecognizedArgs.length < 2) { @@ -226,6 +260,14 @@ private static void printHelpMessage() { " Write the records stored in the indexed file into the output file."); System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); System.out.println(); + System.out.println("cobj-idx migrate "); + System.out.println( + " Migrate the indexed file whose version is older than 1.1.12 to the latest" + + " version."); + System.out.println(); + System.out.println("cobj-idx unlock "); + System.out.println(" Unlock all locks of the indexed file."); + System.out.println(); System.out.println("Options:"); System.out.println(); System.out.println("-f , --format="); @@ -413,6 +455,60 @@ private static int processInfoCommand(String indexedFilePath) { } } + private static void migrateIndexedFile(String indexedFilePath) throws Exception { + try (Connection conn = DriverManager.getConnection("jdbc:sqlite:" + indexedFilePath); + Statement st = conn.createStatement()) { + String createTableSql = + "CREATE TABLE IF NOT EXISTS file_lock (locked_by text primary key,process_id" + + " text,locked_at timestamp,open_mode text CONSTRAINT check_open_mode" + + " CHECK (open_mode IN ('INPUT', 'OUTPUT', 'I-O', 'EXTEND')))"; + st.executeUpdate(createTableSql); + + boolean lockedByColumnExists = false; + boolean processIdColumnExists = false; + boolean lockedAtColumnExists = false; + try (ResultSet rs = st.executeQuery("PRAGMA table_info('table0')")) { + while (rs.next()) { + String columnName = rs.getString("name"); + if ("locked_by".equals(columnName)) { + lockedByColumnExists = true; + } else if ("process_id".equals(columnName)) { + processIdColumnExists = true; + } else if ("locked_at".equals(columnName)) { + lockedAtColumnExists = true; + } + if (lockedByColumnExists && processIdColumnExists && lockedAtColumnExists) { + break; + } + } + } + if (!lockedByColumnExists) { + st.executeUpdate("ALTER TABLE table0 ADD COLUMN locked_by text"); + } + if (!processIdColumnExists) { + st.executeUpdate("ALTER TABLE table0 ADD COLUMN process_id text"); + } + if (!lockedAtColumnExists) { + st.executeUpdate("ALTER TABLE table0 ADD COLUMN locked_at timestamp"); + } + } catch (SQLException e) { + throw new Exception( + String.format("failed to connect to the indexed file: %s", indexedFilePath), e); + } + } + + private static void unlockIndexedFile(String indexedFilePath) throws Exception { + try (Connection conn = DriverManager.getConnection("jdbc:sqlite:" + indexedFilePath); + Statement st = conn.createStatement()) { + st.executeUpdate("DELETE FROM file_lock"); + st.executeUpdate( + "UPDATE table0 SET locked_by = NULL, process_id = NULL, locked_at = NULL"); + } catch (SQLException e) { + throw new Exception( + String.format("failed to connect to the indexed file: %s", indexedFilePath), e); + } + } + /** * Process load sub command, which loads data inputted from stdin to the indexed file. * diff --git a/tests/Makefile.am b/tests/Makefile.am index 7be45806..2c68394d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -204,6 +204,8 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/info.at \ cobj-idx.src/load.at \ cobj-idx.src/unload.at \ + cobj-idx.src/migrate.at \ + cobj-idx.src/unlock.at \ cobj-idx.src/misc.at indexed_lock_DEPENDENCIES = \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 3e02765c..923c4437 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -743,6 +743,8 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/info.at \ cobj-idx.src/load.at \ cobj-idx.src/unload.at \ + cobj-idx.src/migrate.at \ + cobj-idx.src/unlock.at \ cobj-idx.src/misc.at indexed_lock_DEPENDENCIES = \ diff --git a/tests/cobj-idx.at b/tests/cobj-idx.at index 0860e50e..80fb4bde 100644 --- a/tests/cobj-idx.at +++ b/tests/cobj-idx.at @@ -5,4 +5,5 @@ m4_include([info.at]) m4_include([load.at]) m4_include([unload.at]) m4_include([cobj-idx.src/misc.at]) - +m4_include([migrate.at]) +m4_include([unlock.at]) diff --git a/tests/cobj-idx.src/migrate.at b/tests/cobj-idx.src/migrate.at new file mode 100644 index 00000000..bbf6ddff --- /dev/null +++ b/tests/cobj-idx.src/migrate.at @@ -0,0 +1,76 @@ +AT_SETUP([migrate]) + +AT_DATA([check_file.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. check_file. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "indexed_file.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + DISPLAY REC. + + MOVE "AAAA2" TO REC-KEY. + REWRITE REC. + + MOVE "AAAA2" TO REC-KEY. + READ F WITH LOCK. + DISPLAY REC. + + MOVE "AAAA2" TO REC-KEY. + DELETE F. + DISPLAY FILE-STATUS. + + MOVE "AAAA1" TO REC-KEY. + START F KEY IS = REC-KEY. + PERFORM FOREVER + READ F NEXT RECORD + AT END + EXIT PERFORM + NOT AT END + DISPLAY REC + END-READ + END-PERFORM. + CLOSE f. +]) + +# copy the indexed file created with the older compiler to the current directory +AT_CHECK([cp ../../cobj-idx.src/test-data/indexed_file.dat .]) + +# convert the indexed file to the current format +AT_CHECK([${COBJ_IDX} migrate indexed_file.dat]) + +# check the converted file +AT_CHECK([${COMPILE} check_file.cbl]) +AT_CHECK([java check_file], [0], +[AAAA1BBBB1CCCC1 +AAAA2BBBB1CCCC1 +00 +AAAA1BBBB1CCCC1 +AAAA3BBBB3CCCC3 +]) +AT_CLEANUP \ No newline at end of file diff --git a/tests/cobj-idx.src/test-data/indexed_file.dat b/tests/cobj-idx.src/test-data/indexed_file.dat new file mode 100644 index 0000000000000000000000000000000000000000..a40fc42a3203e0818c5f0ea83a71cb17ad970e25 GIT binary patch literal 40960 zcmeI*O>g5w7{KwFxOv+p86>1wJs?IZD>YD|IN`Jsf_BLPX|>YA9zYx-rvsR6*dEVh>}P&sMVi`Hzj$~*DU3eI z@}s!W1M#MiQhcJd5Tb6ETXs21Zhzx!$8P0P{zcik_~6I4TIxhJ-}phO$Lbfg(>`v0 z*g9!#wSKZiBm@vZ009ILKmY**5O_@l7VkFe;hj73+3g}8PtB1j;z?Y@qi@X9<@~LC zpAUB*4fUhlz57GGT%)&>$+1q-!W^1hr&*!X`E;tE|rmv;0l z`QEH4p3I+2ll|DviN;wrHF4Tq+^*Nd!9XrPS`Bkn7uByKIn@t=xrOG zF3hnFdTrp}#nbuK0K3CRE&OUAMUqa;@$B2FoxP3Xd6AX-qcxF?qBVuhyR}-lxhWr( z&B|3&_AaWQ2L9QDPlsPxAA6QaXQ}qJF6i!FwHCg!DZef&XY=uL^V&-D^U9?ol>O>1 zqK&!>;F(ADNB8UM3Y{uhhbiH(zvR_>+zNDE9*U6Vq@%GcCIW>Sv+;P`}y@2>}EUKmY** z5I_I{1Q0*~0R*m#Ko|s__jYX>l&d|P2KQ_lgq72ZzN_fFioUDphw`){aut!Qh+IYF zZtw@{ccK1Of7%TR0R#|0009ILKmY**5I_I{1YS*nX3&vt);|c&a{Wpp=rmm!^Z!?K zOom?KmY**5I_I{ Z1Q0*~f!AK3E~`SyX0=)qRnd@*>VM?gjA{S? literal 0 HcmV?d00001 diff --git a/tests/cobj-idx.src/unlock.at b/tests/cobj-idx.src/unlock.at new file mode 100644 index 00000000..981e7c3e --- /dev/null +++ b/tests/cobj-idx.src/unlock.at @@ -0,0 +1,173 @@ +AT_SETUP([unlock]) + +# Create a sample indexed file named 'indexed_file.dat' and exit the program without closing the file +AT_DATA([create_and_exit.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. create_and_exit. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "indexed_file.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + MOVE "AAAA1" TO REC-KEY. + READ f WITH LOCK. + CALL "force_exit". +]) + +AT_DATA([force_exit.java], [ +import java.io.UnsupportedEncodingException; +import jp.osscons.opensourcecobol.libcobj.*; +import jp.osscons.opensourcecobol.libcobj.common.*; +import jp.osscons.opensourcecobol.libcobj.data.*; +import jp.osscons.opensourcecobol.libcobj.exceptions.*; +import jp.osscons.opensourcecobol.libcobj.termio.*; +import jp.osscons.opensourcecobol.libcobj.call.*; +import jp.osscons.opensourcecobol.libcobj.file.*; +import jp.osscons.opensourcecobol.libcobj.ui.*; +import java.util.Optional; + +public class force_exit implements CobolRunnable { + @Override + public int run(CobolDataStorage... argStorages) { + System.exit(0); + return 0; + } + + @Override + public void cancel() { + return; + } + + @Override + public boolean isActive() { + return false; + } +} +]) + +AT_DATA([check_file_lock.cbl],[ + IDENTIFICATION DIVISION. + PROGRAM-ID. check_file_lock. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "indexed_file.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + DISPLAY FILE-STATUS. + CLOSE f. +]) + +AT_DATA([check_record_lock.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. check_record_lock. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "indexed_file.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + PROCEDURE DIVISION. + MAIN-PROCEDURE. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + DISPLAY FILE-STATUS. + + CLOSE f. +]) + +AT_CHECK([${COMPILE} *.cbl]) +AT_CHECK([javac force_exit.java]) + +# Create the indexed file and exit the program without closing the file +AT_CHECK([java create_and_exit]) +# Check the file is locked +AT_CHECK([java check_file_lock], [0], +[61 +]) + +AT_CHECK([rm -f indexed_file.dat]) +# Create the indexed file and exit the program without closing the file +AT_CHECK([java create_and_exit]) +# Unlock the file +AT_CHECK([${COBJ_IDX} unlock indexed_file.dat]) +# Check the file lock is released +AT_CHECK([java check_file_lock], [0], +[00 +]) + +AT_CHECK([rm -f indexed_file.dat]) +# Create the indexed file and exit the program without closing the file +AT_CHECK([java create_and_exit]) +# Unlock the file +AT_CHECK([${COBJ_IDX} unlock indexed_file.dat]) +# Check the record lock is released +AT_CHECK([java check_record_lock], [0], +[00 +]) + +AT_CLEANUP \ No newline at end of file From 5f0c42c4d2db08b9184151889308d7e76e7dcfe8 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Wed, 27 Aug 2025 14:35:55 +0900 Subject: [PATCH 158/188] Fix flaky indexed lock (#695) * feat: set file status 92 when opening old files * fix: set file status 92 correctly * tests: add tests for opening old indexed files * test: fix flaky tests --- tests/indexed-lock.src/access-different-record.at | 6 +++--- tests/indexed-lock.src/access-same-record.at | 4 ++-- tests/indexed-lock.src/file-lock.at | 6 +++--- tests/indexed-lock.src/input-mode.at | 4 ++-- tests/indexed-lock.src/lock-mode-automatic.at | 4 ++-- tests/indexed-lock.src/lock-mode-clause.at | 4 ++-- tests/indexed-lock.src/old-file.at | 2 +- tests/indexed-lock.src/open-input.at | 4 ++-- tests/indexed-lock.src/open-start-write-rewrite.at | 4 ++-- tests/indexed-lock.src/release-lock.at | 4 ++-- tests/indexed-lock.src/same-process.at | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/indexed-lock.src/access-different-record.at b/tests/indexed-lock.src/access-different-record.at index 61038b92..00d8e40b 100644 --- a/tests/indexed-lock.src/access-different-record.at +++ b/tests/indexed-lock.src/access-different-record.at @@ -134,12 +134,12 @@ function run_test() { rm -f playground-record-lock-* if test "$OPERATION2" == "$OPERATION_WRITE"; then - java ${PROGRAM_ID_TABLE1_FOR_WRITE@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1_FOR_WRITE@<:@$OPERATION1@:>@} > prog1.log & else - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & fi PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/access-same-record.at b/tests/indexed-lock.src/access-same-record.at index 47c5e19f..b3d942cc 100644 --- a/tests/indexed-lock.src/access-same-record.at +++ b/tests/indexed-lock.src/access-same-record.at @@ -112,9 +112,9 @@ function run_test() { rm -f playground-record-lock-* - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/file-lock.at b/tests/indexed-lock.src/file-lock.at index a2af932f..68032cf1 100644 --- a/tests/indexed-lock.src/file-lock.at +++ b/tests/indexed-lock.src/file-lock.at @@ -189,12 +189,12 @@ function run_test() { cobj ${PROGRAM_NAME_1}.cbl ${PROGRAM_NAME_2}.cbl make_indexed_file${TEST_ID}.cbl - java make_indexed_file${TEST_ID} + java -Xlog:perf+memops=off make_indexed_file${TEST_ID} - java $PROGRAM_NAME_1 & + java -Xlog:perf+memops=off $PROGRAM_NAME_1 & PID1=$! - java $PROGRAM_NAME_2 > ${TEST_ID}.log & + java -Xlog:perf+memops=off $PROGRAM_NAME_2 > ${TEST_ID}.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/input-mode.at b/tests/indexed-lock.src/input-mode.at index f2d1b6c4..16df00d9 100644 --- a/tests/indexed-lock.src/input-mode.at +++ b/tests/indexed-lock.src/input-mode.at @@ -106,9 +106,9 @@ function run_test() { rm -f playground-record-lock-* - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/lock-mode-automatic.at b/tests/indexed-lock.src/lock-mode-automatic.at index 543a6930..bb671510 100644 --- a/tests/indexed-lock.src/lock-mode-automatic.at +++ b/tests/indexed-lock.src/lock-mode-automatic.at @@ -119,9 +119,9 @@ function run_test() { rm -f playground-record-lock-* f.dat pro1.log prog2.log - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/lock-mode-clause.at b/tests/indexed-lock.src/lock-mode-clause.at index e1856c2d..e622ac34 100644 --- a/tests/indexed-lock.src/lock-mode-clause.at +++ b/tests/indexed-lock.src/lock-mode-clause.at @@ -120,9 +120,9 @@ function run_test() { rm -f playground-record-lock-* f.dat pro1.log prog2.log - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/old-file.at b/tests/indexed-lock.src/old-file.at index a7c9ce44..680c52a5 100644 --- a/tests/indexed-lock.src/old-file.at +++ b/tests/indexed-lock.src/old-file.at @@ -44,7 +44,7 @@ AT_DATA([open_file_status.at], [ AT_CHECK([${COBJ} open_file_status.at]) AT_CHECK([cp ../../indexed-lock.src/indexed-file/old_indexed_file.dat indexed_file.dat]) -AT_CHECK([java open_file_status], [0], +AT_CHECK([java -Xlog:perf+memops=off open_file_status], [0], [92 92 92 diff --git a/tests/indexed-lock.src/open-input.at b/tests/indexed-lock.src/open-input.at index 6fb5328c..f6c1b631 100644 --- a/tests/indexed-lock.src/open-input.at +++ b/tests/indexed-lock.src/open-input.at @@ -115,9 +115,9 @@ function run_test() { rm -f playground-record-lock-* f.dat pro1.log prog2.log - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/open-start-write-rewrite.at b/tests/indexed-lock.src/open-start-write-rewrite.at index 8b8dad47..7022b91e 100644 --- a/tests/indexed-lock.src/open-start-write-rewrite.at +++ b/tests/indexed-lock.src/open-start-write-rewrite.at @@ -124,9 +124,9 @@ function run_test() { rm -f playground-record-lock-* f.dat pro1.log prog2.log - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/release-lock.at b/tests/indexed-lock.src/release-lock.at index affe4a33..743a4dc9 100644 --- a/tests/indexed-lock.src/release-lock.at +++ b/tests/indexed-lock.src/release-lock.at @@ -133,9 +133,9 @@ function run_test() { rm -f playground-record-lock-* f.dat pro1.log prog2.log - java ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE1@<:@$OPERATION1@:>@} > prog1.log & PID1=$! - java ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & + java -Xlog:perf+memops=off ${PROGRAM_ID_TABLE2@<:@$OPERATION2@:>@} > prog2.log & PID2=$! wait $PID1 $PID2 diff --git a/tests/indexed-lock.src/same-process.at b/tests/indexed-lock.src/same-process.at index dce1f297..807df9d5 100644 --- a/tests/indexed-lock.src/same-process.at +++ b/tests/indexed-lock.src/same-process.at @@ -120,5 +120,5 @@ AT_DATA([prog.cbl], [ ]) AT_CHECK([cobj prog.cbl]) -AT_CHECK([java prog]) +AT_CHECK([java -Xlog:perf+memops=off prog]) AT_CLEANUP From d08f70c6375ae8ce422010fe3c98ab0a46c0e4d6 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:25:17 +0900 Subject: [PATCH 159/188] doc: add documentation of locking for indexed files (#700) * doc: add documentation of locking for indexed files * doc: fix documents * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update doc/specification-locking-indexed-file_JP.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update locking specification * Update locking specification --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Momoka Shimada <103632708+mo-shimada@users.noreply.github.com> --- README.md | 1 + README_JP.md | 1 + doc/specification-locking-indexed-file.md | 44 +++++++++++++++++++ doc/specification-locking-indexed-file_JP.md | 45 ++++++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 doc/specification-locking-indexed-file.md create mode 100644 doc/specification-locking-indexed-file_JP.md diff --git a/README.md b/README.md index 49f61cda..399d9bf9 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ java [PROGRAM-ID] * [The API reference of the runtime library `libcobj.jar`](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) * [configuration-params-JP](./doc/configuration-params-JP.md) +* [The specification of locking for INDEXED files in opensource COBOL 4J](./doc/specification-locking-indexed-file.md) ## Development Progress diff --git a/README_JP.md b/README_JP.md index f8dba840..b51ecf52 100644 --- a/README_JP.md +++ b/README_JP.md @@ -160,6 +160,7 @@ java [PROGRAM-ID] * [ランタイムライブラリ`libcobj.jar`のAPIリファレンス](https://opensourcecobol.github.io/opensourcecobol4j/javadoc/libcobj/index.html) * [opensource COBOL 4J: Java変換解説](./doc/converted_Java_file_JP.md) * [configuration-params-JP](./doc/configuration-params-JP.md) +* [INDEXEDファイルのロックの仕様](./doc/specification-locking-indexed-file_JP.md) ## 実装状況 実装済み機能: diff --git a/doc/specification-locking-indexed-file.md b/doc/specification-locking-indexed-file.md new file mode 100644 index 00000000..138996ca --- /dev/null +++ b/doc/specification-locking-indexed-file.md @@ -0,0 +1,44 @@ +# INDEXED File Locking Specification + +## LOCK MODE in the SELECT Statement + +- The SELECT statement's LOCK MODE can only specify AUTOMATIC or MANUAL. +- When omitted, the default value for LOCK MODE is MANUAL + - When `-lock-mode-automatic` is specified at compile time, the default value for omitted LOCK MODE becomes AUTOMATIC. + +## Record Locking Behavior + +- When a file is opened with OPEN I-O and a READ statement without WITH NO LOCK or WITH LOCK is executed: + - If the SELECT statement's LOCK MODE is MANUAL, the record is not locked + - If the SELECT statement's LOCK MODE is AUTOMATIC, the record is locked +- When a file is opened with OPEN I-O and a READ statement with WITH LOCK is executed, the record is locked +- When a file is opened with OPEN I-O and a READ statement with WITH NO LOCK is executed, the record is not locked +- When processing fails due to record locking, the file status becomes 51 + +## File Locking Behavior + +- When a file is opened with OPEN OUTPUT, a file lock is applied to the file +- When processing fails due to file locking, the file status becomes 61 + +## Migrating Legacy INDEXED Files to the New Version + +Legacy INDEXED files cannot be used directly with the new version of opensource COBOL 4J. +To convert INDEXED files created with legacy versions to be compatible with the new version, please use the following command: + +```sh +cobj-idx migrate <> +``` + +This command converts the specified INDEXED file to be compatible with the new version. + +## Unlocking INDEXED Files + +The following command can release all file locks and record locks on an INDEXED file: + +```sh +cobj-idx unlock <> +``` + +## Behavior When Opening Legacy INDEXED Files + +When attempting to open legacy INDEXED files, the file status becomes 92. diff --git a/doc/specification-locking-indexed-file_JP.md b/doc/specification-locking-indexed-file_JP.md new file mode 100644 index 00000000..93b851f3 --- /dev/null +++ b/doc/specification-locking-indexed-file_JP.md @@ -0,0 +1,45 @@ + +# INDEXEDファイルのロック仕様 + +## SELECT句のLOCK MODE + +- SELECT句のLOCK MODEにはAUTOMATICかMANUALのみ指定可能である。 +- 省略した場合のLOCK MODEのデフォルト値はMANUAL + - コンパイル時に`-lock-mode-automatic`を指定した場合、LOCK MODEを省略した場合のデフォルト値はAUTOMATICになる。 + +## レコードロックの動作 + +- OPEN I-Oでファイルを開き、WITH NO LOCKもWITH LOCKも指定されないREAD文を実行したとき + - SELECT句のLOCK MODEがMANUALの場合、当該レコードをロックしない + - SELECT句のLOCK MODEがAUTOMATICの場合、当該レコードをロックする +- OPEN I-Oでファイルを開き、WITH LOCK指定のあるREAD文を実行したとき、当該レコードをロックする +- OPEN I-Oでファイルを開き、WITH NO LOCK指定のあるREAD文を実行したとき、当該レコードをロックしない +- レコードロックにより処理が失敗した場合、ファイルステータスが51となる + +## ファイルロックの動作 + +- OPEN OUTPUTで開いたときに、当該ファイルにファイルロックがかかる +- ファイルロックにより処理が失敗した場合、ファイルステータスは61となる + +## 古いバージョンのINDEXEDファイルを新バージョンに対応させる。 + +古いバージョンのINDEXEDファイルは、直接最新バージョンのopensource COBOL 4Jでは使用できません。 +古いバージョンで作成したINDEXEDファイルを新バージョンに対応したものに変換するには、以下のコマンドを実行してください。 + +```sh +cobj-idx migrate <> +``` + +これにより、指定したINDEXEDファイルが新バージョンに対応したものに変換される。 + +## INDEXEDファイルのロックを解除する + +下記のコマンドで、INDEXEDファイルにかかったファイルロックとすべてのレコードロックを解除できる。 + +```sh +cobj-idx unlock <> +``` + +## 古いバージョンのINDEXEDファイルを開いたときの動作 + +古いバージョンのINDEXEDファイルを開こうとした場合、ファイルステータスが92となる。 \ No newline at end of file From b7a33f29cb4880932ea54956c4da034eba386b67 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 28 Aug 2025 14:51:19 +0900 Subject: [PATCH 160/188] Unlock previously locked records when executing READ, WRITE, REWRITE, DELETE and CLOSE (#699) * feat: set file status 92 when opening old files * fix: set file status 92 correctly * tests: add tests for opening old indexed files * test: fix flaky tests * fix: unlock records locked not by other processes * fix: unlock previous records when failing to lock a record * chore: unlock the previous record (write) * fix: unlock the previous record (rewrite) * fix: unlock previous records * Update libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: an invalid comment * refactor: format Java files --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../libcobj/file/CobolFile.java | 32 ++ .../libcobj/file/CobolIndexedFile.java | 45 ++- tests/indexed-lock.src/release-lock.at | 279 ++++++++++++++++++ 3 files changed, 350 insertions(+), 6 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 348c8697..1b6c65a4 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -907,6 +907,24 @@ private static String concatString(String... strs) { return sb.toString(); } + /** + * This method is mainly for unlocking the indexed files. + * + * @return true if post-processing is successful, false otherwise. + */ + protected boolean postProcess() { + return true; + } + + private void runPostProcess(AbstractCobolField fnstatus) { + postProcess(); + // TODO: Implement error handling + // boolean postProcessSucceeded = postProcess(); + // if(!postProcessSucceeded) { + // this.saveStatus(COB_STATUS_30_PERMANENT_ERROR, fnstatus); + // } + } + /** * TODO: 準備中 * @@ -1408,10 +1426,12 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp if (this.flag_nonexistent) { if (this.flag_first_read == 0) { saveStatus(COB_STATUS_23_KEY_NOT_EXISTS, fnstatus); + runPostProcess(fnstatus); return; } this.flag_first_read = 0; saveStatus(COB_STATUS_10_END_OF_FILE, fnstatus); + runPostProcess(fnstatus); return; } @@ -1419,10 +1439,12 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp if (key == null) { if (this.flag_end_of_file && (readOpts & COB_READ_PREVIOUS) == 0) { saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); + runPostProcess(fnstatus); return; } if (this.flag_begin_of_file && (readOpts & COB_READ_PREVIOUS) != 0) { saveStatus(COB_STATUS_46_READ_ERROR, fnstatus); + runPostProcess(fnstatus); return; } } @@ -1431,6 +1453,7 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp || this.open_mode == COB_OPEN_OUTPUT || this.open_mode == COB_OPEN_EXTEND) { saveStatus(COB_STATUS_47_INPUT_DENIED, fnstatus); + runPostProcess(fnstatus); return; } @@ -1558,6 +1581,7 @@ public void write(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) || this.open_mode == COB_OPEN_INPUT || this.open_mode == COB_OPEN_I_O) { saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); + runPostProcess(fnstatus); return; } } else { @@ -1565,6 +1589,7 @@ public void write(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) || this.open_mode == COB_OPEN_INPUT || this.open_mode == COB_OPEN_EXTEND) { saveStatus(COB_STATUS_48_OUTPUT_DENIED, fnstatus); + runPostProcess(fnstatus); return; } } @@ -1578,6 +1603,7 @@ public void write(AbstractCobolField rec, int opt, AbstractCobolField fnstatus) if (this.record.getSize() < this.record_min || this.record_max < this.record.getSize()) { saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + runPostProcess(fnstatus); return; } @@ -1657,20 +1683,24 @@ public void rewrite(AbstractCobolField rec, int opt, AbstractCobolField fnstatus if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); + runPostProcess(fnstatus); return; } if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); + runPostProcess(fnstatus); return; } if (this.organization == COB_ORG_SEQUENTIAL) { if (this.record.getSize() != rec.getSize()) { saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + runPostProcess(fnstatus); return; } if (this.record_size != null) { if (this.record.getSize() != this.record_size.getInt()) { saveStatus(COB_STATUS_44_RECORD_OVERFLOW, fnstatus); + runPostProcess(fnstatus); return; } } @@ -1721,11 +1751,13 @@ public void delete(AbstractCobolField fnstatus) { if (this.open_mode == COB_OPEN_CLOSED || this.open_mode != COB_OPEN_I_O) { saveStatus(COB_STATUS_49_I_O_DENIED, fnstatus); + runPostProcess(fnstatus); return; } if (this.access_mode == COB_ACCESS_SEQUENTIAL && !readDone) { saveStatus(COB_STATUS_43_READ_NOT_DONE, fnstatus); + runPostProcess(fnstatus); return; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java index f82588c8..368dc37f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolIndexedFile.java @@ -227,9 +227,9 @@ public int open_(String filename, int mode, int sharing) { return getConnectionStatus; } - if(fileExists) { + if (fileExists) { int code = this.checkVersionOld(); - if(code != COB_STATUS_00_SUCCESS) { + if (code != COB_STATUS_00_SUCCESS) { return code; } } @@ -303,11 +303,12 @@ private int checkVersionOld() { IndexedFile p = this.filei; try (Statement st = p.connection.createStatement()) { String fileLockTableExistsSql = - "select exists(select 1 from sqlite_master where type = 'table' and name = 'file_lock')"; + "select exists(select 1 from sqlite_master where type = 'table' and name =" + + " 'file_lock')"; ResultSet fileLockTableExistsResultSet = st.executeQuery(fileLockTableExistsSql); if (fileLockTableExistsResultSet.next()) { boolean fileLockTableExists = fileLockTableExistsResultSet.getInt(1) == 1; - if(!fileLockTableExists) { + if (!fileLockTableExists) { return COB_STATUS_92_VERSION_INCOMPATIBLE; } } else { @@ -700,15 +701,26 @@ private void unlockPreviousRecord() throws SQLException { String updateSql = String.format( "update %s set locked_by = null, process_id = null, locked_at = null where" - + " key = ?", + + " key = ? and locked_by = ?", getTableName(0)); try (PreparedStatement updateStatement = p.connection.prepareStatement(updateSql)) { updateStatement.setBytes(1, previousLockedRecordKey); + updateStatement.setString(2, this.getProcessUuid()); updateStatement.executeUpdate(); } previousLockedRecordKey = null; } + @Override + protected boolean postProcess() { + try { + unlockPreviousRecord(); + } catch (SQLException e) { + return false; + } + return true; + } + private void unlockPreviousRecord(byte[] key) throws SQLException { if (previousLockedRecordKey == null) { previousLockedRecordKey = key; @@ -718,10 +730,11 @@ private void unlockPreviousRecord(byte[] key) throws SQLException { String updateSql = String.format( "update %s set locked_by = null, process_id = null, locked_at = null where" - + " key = ?", + + " key = ? and locked_by = ?", getTableName(0)); try (PreparedStatement updateStatement = p.connection.prepareStatement(updateSql)) { updateStatement.setBytes(1, previousLockedRecordKey); + updateStatement.setString(2, this.getProcessUuid()); updateStatement.executeUpdate(); } previousLockedRecordKey = key; @@ -756,10 +769,14 @@ public int read_(AbstractCobolField key, int readOpts) { try { if (checkOtherProcessLockedRecord(primaryKey)) { p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); return COB_STATUS_51_RECORD_LOCKED; } if (!lockRecord(primaryKey)) { p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); return COB_STATUS_30_PERMANENT_ERROR; } unlockPreviousRecord(primaryKey); @@ -894,10 +911,14 @@ public int readNext(int readOpts) { try { if (checkOtherProcessLockedRecord(primaryKey)) { p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); return COB_STATUS_51_RECORD_LOCKED; } if (!lockRecord(primaryKey)) { p.connection.rollback(); + unlockPreviousRecord(); + p.connection.commit(); return COB_STATUS_30_PERMANENT_ERROR; } unlockPreviousRecord(primaryKey); @@ -1069,6 +1090,12 @@ public int write_(int opt) { } else if (this.access_mode == COB_ACCESS_SEQUENTIAL) { byte[] keyBytes = p.key; if (p.last_key.memcmp(keyBytes, keyBytes.length) > 0) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } return COB_STATUS_21_KEY_INVALID; } } @@ -1145,6 +1172,12 @@ public int rewrite_(int opt) { if (this.access_mode == COB_ACCESS_SEQUENTIAL && !IndexedCursor.matchKeyHead(p.key, DBT_SET(this.keys[0].getField()))) { + try { + unlockPreviousRecord(); + p.connection.commit(); + } catch (SQLException e) { + return COB_STATUS_30_PERMANENT_ERROR; + } return COB_STATUS_21_KEY_INVALID; } diff --git a/tests/indexed-lock.src/release-lock.at b/tests/indexed-lock.src/release-lock.at index 743a4dc9..6e477e2e 100644 --- a/tests/indexed-lock.src/release-lock.at +++ b/tests/indexed-lock.src/release-lock.at @@ -315,3 +315,282 @@ AT_DATA([prog2.template.cbl], [ AT_CHECK([bash a.sh]) AT_CLEANUP + +AT_SETUP([unlock (READ)]) +AT_DATA([p1.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. p1. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + MOVE "AAAA2" TO REC-KEY. + MOVE "BBBB2" TO REC-KEY2. + MOVE "CCCC2" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + DISPLAY FILE-STATUS. + + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is locked". + CALL "wait" USING + "playground-record-lock-02" + "AAAA2 record is released". + + MOVE "AAAA2" TO REC-KEY. + REWRITE REC. + DISPLAY FILE-STATUS. + CLOSE f. + CALL "setValue" USING + "playground-record-lock-03" + "end of p1". +]) + +AT_DATA([p2.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. p2. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-EMPTY PIC X(15) VALUE "AAAA1 ". + 01 REC-BACKUP PIC X(15). + 01 DUMMY PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is locked". + + OPEN I-O f. + DISPLAY FILE-STATUS. + + INITIALIZE REC. + MOVE "AAAA2" TO REC. + READ F WITH LOCK. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-02" + "AAAA2 record is released". + + CALL "wait" USING + "playground-record-lock-03" + "end of p1". + + CLOSE f. +]) + +AT_DATA([run.sh], [ + java -Xlog:perf+memops=off p1 > p1.log & + PID1=$! + java -Xlog:perf+memops=off p2 > p2.log & + PID2=$! + wait $PID1 $PID2 +]) + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cobj p1.cbl p2.cbl]) +AT_CHECK([javac wait.java setValue.java]) + +# run a test +AT_CHECK([bash run.sh] +) +AT_CHECK([cat p1.log], [0], +[00 +00 +]) + +AT_CHECK([cat p2.log], [0], +[00 +51 +]) + +AT_CLEANUP + +AT_SETUP([unlock (REWRITE)]) +AT_DATA([p1.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. p1. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS SEQUENTIAL + RECORD KEY IS REC-KEY + * LOCK MODE IS AUTOMATIC + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 DUMMY PIC X(10) VALUE "DUMMY DATA". + PROCEDURE DIVISION. + MAIN-PROCEDURE. + OPEN OUTPUT f. + MOVE "AAAA1" TO REC-KEY. + MOVE "BBBB1" TO REC-KEY2. + MOVE "CCCC1" TO REC-DATA. + WRITE REC. + MOVE "AAAA2" TO REC-KEY. + MOVE "BBBB2" TO REC-KEY2. + MOVE "CCCC2" TO REC-DATA. + WRITE REC. + CLOSE f. + + OPEN I-O f. + MOVE "AAAA1" TO REC-KEY. + START f KEY IS = REC-KEY. + READ F WITH LOCK. + MOVE "AAAA2" TO REC-KEY. + REWRITE REC. + DISPLAY FILE-STATUS. + + + CALL "setValue" USING + "playground-record-lock-01" + "AAAA1 record is released". + CALL "wait" USING + "playground-record-lock-02" + "end of p2". + + CLOSE f. +]) + +AT_DATA([p2.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. p2. + + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT F ASSIGN TO "f.dat" + ORGANIZATION IS INDEXED + ACCESS MODE IS DYNAMIC + RECORD KEY IS REC-KEY + ALTERNATE RECORD KEY IS REC-KEY2 WITH DUPLICATES + FILE STATUS IS FILE-STATUS. + + DATA DIVISION. + FILE SECTION. + FD f. + 01 REC. + 05 REC-KEY PIC X(5). + 05 REC-KEY2 PIC X(5). + 05 REC-DATA PIC X(5). + + WORKING-STORAGE SECTION. + 01 FILE-STATUS PIC XX. + 01 REC-EMPTY PIC X(15) VALUE "AAAA1 ". + 01 REC-BACKUP PIC X(15). + 01 DUMMY PIC X(15). + PROCEDURE DIVISION. + MAIN-PROCEDURE. + CALL "wait" USING + "playground-record-lock-01" + "AAAA1 record is released". + + OPEN I-O f. + + INITIALIZE REC. + + MOVE "AAAA1" TO REC-KEY. + READ F WITH LOCK. + DISPLAY FILE-STATUS. + + CALL "setValue" USING + "playground-record-lock-02" + "end of p2". + + CLOSE f. +]) + +AT_DATA([run.sh], [ + java -Xlog:perf+memops=off p1 > p1.log & + PID1=$! + java -Xlog:perf+memops=off p2 > p2.log & + PID2=$! + wait $PID1 $PID2 +]) + +AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cobj p1.cbl p2.cbl]) +AT_CHECK([javac wait.java setValue.java]) + +# run a test +AT_CHECK([bash run.sh]) + +AT_CHECK([cat p1.log], [0], +[21 +]) + +AT_CHECK([cat p2.log], [0], +[00 +]) + +AT_CLEANUP \ No newline at end of file From d66776196f7d13e2563b1bb14d80e705f0788072 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 28 Aug 2025 16:28:25 +0900 Subject: [PATCH 161/188] Release 1.1.12 (#701) * chore: update the version number * doc: update CHANGELOG.md ChangeLog NEWS ReleaseNote.md * doc: update requirements-all.md * doc: update manual of cobj-idx * doc: update docker image tags in documents --- CHANGELOG.md | 12 ++++++++ ChangeLog | 4 +++ NEWS | 18 ++++++++++++ README.md | 28 +++++++++++++------ README_JP.md | 28 +++++++++++++------ ReleaseNote.md | 11 +++++--- configure | 26 ++++++++--------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++-- win/config.h | 8 +++--- 15 files changed, 113 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79afe414..bb4146f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [1.1.12] - 2025-08-28 + +### Add + +* Implemented new file locking and record locking for INDEXED files. +* Add a new sub command `migrate` for `cobj-idx`. + * With this command, you can convert an old version of an INDEXED file to a new version compatible with the latest opensource COBOL 4J. +* Add a new sub command `unlock` for `cobj-idx`. + * With this command, you can unlock all record locks and file locks on an INDEXED file. +* Add documentation of locking for INDEXED files. + ## [1.1.11] - 2025-07-25 ### Fix diff --git a/ChangeLog b/ChangeLog index f31e63ae..bae45e82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-08-28 OSS Consortium + + * opensource COBOL 4J v1.1.12 released. + 2025-07-25 OSS Consortium * opensource COBOL 4J v1.1.11 released. diff --git a/NEWS b/NEWS index d4cceba1..7799ce77 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,21 @@ NEWS - user visible changes -*- outline -*- +* opensource COBOL 4J 1.1.12 + +** New Features + +(1) Implemented new file locking and record locking for INDEXED files. +(2) Add a new sub command `migrate` for `cobj-idx`. + * With this command, you can convert an old version of an INDEXED file to a new version compatible with the latest opensource COBOL 4J. +(3) Add a new sub command `unlock` for `cobj-idx`. + * With this command, you can unlock all record locks and file locks on an INDEXED file. +(4) Add documentation of locking for INDEXED files. + + ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.11 + ** Bug Fixes (1) Fix OPEN operation for indexed files. (#676) @@ -9,6 +23,8 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.10 + ** New Features (1) Add a manual for the compiler configuration file (#665) @@ -21,6 +37,8 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.1.9 + ** New Features (1) Add a sub command create for cobj-idx. diff --git a/README.md b/README.md index 399d9bf9..0ff5e4ef 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz -tar zxvf opensourcecobol4j-v1.1.11.tar.gz -cd opensourcecobol4j-1.1.11 +curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz +tar zxvf opensourcecobol4j-v1.1.12.tar.gz +cd opensourcecobol4j-1.1.12 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz -tar zxvf opensourcecobol4j-v1.1.11.tar.gz -cd opensourcecobol4j-1.1.11 +curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz +tar zxvf opensourcecobol4j-v1.1.12.tar.gz +cd opensourcecobol4j-1.1.12 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250725 +docker pull opensourcecobol/opensourcecobol4j:20250828 ``` Execute the following commands in order to run the "Hello World" COBOL program. @@ -233,11 +233,22 @@ cobj-idx - A utility tool to handle an indexed file of opensource COBOL 4J Usage: cobj-idx [options] -Sub commands: cobj-idx info Show information of the indexed file. +cobj-idx create --size= --key= + Create a new indexed file. + The record size and key information are specified by the options. + By default, this command does not overwrite the indexed file. + To overwrite the indexed file, use the --new option. + Example) cobj-idx create test.idx --size=100 --key=2,2:5,4:d15,5 + File name: test.idx + Record size: 100 + Primary key: 2-3 + Alternate key (No Duplicates):5-8 + Alternate key (Duplicates): 15-19 + cobj-idx load Load the data from stdin into the indexed file. The default format of the input data is SEQUENTIAL of COBOL. @@ -271,6 +282,7 @@ Options: -v, --version Print the version of cobj-idx. + ``` ## cobj-api diff --git a/README_JP.md b/README_JP.md index b51ecf52..20a535f0 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz -tar zxvf opensourcecobol4j-v1.1.11.tar.gz -cd opensourcecobol4j-1.1.11 +curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz +tar zxvf opensourcecobol4j-v1.1.12.tar.gz +cd opensourcecobol4j-1.1.12 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.11.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.11.tar.gz -tar zxvf opensourcecobol4j-v1.1.11.tar.gz -cd opensourcecobol4j-1.1.11 +curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz +tar zxvf opensourcecobol4j-v1.1.12.tar.gz +cd opensourcecobol4j-1.1.12 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250725 +docker pull opensourcecobol/opensourcecobol4j:20250828 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 @@ -218,11 +218,22 @@ cobj-idx - A utility tool to handle an indexed file of opensource COBOL 4J Usage: cobj-idx [options] -Sub commands: cobj-idx info Show information of the indexed file. +cobj-idx create --size= --key= + Create a new indexed file. + The record size and key information are specified by the options. + By default, this command does not overwrite the indexed file. + To overwrite the indexed file, use the --new option. + Example) cobj-idx create test.idx --size=100 --key=2,2:5,4:d15,5 + File name: test.idx + Record size: 100 + Primary key: 2-3 + Alternate key (No Duplicates):5-8 + Alternate key (Duplicates): 15-19 + cobj-idx load Load the data from stdin into the indexed file. The default format of the input data is SEQUENTIAL of COBOL. @@ -256,6 +267,7 @@ Options: -v, --version Print the version of cobj-idx. + ``` ## cobj-api diff --git a/ReleaseNote.md b/ReleaseNote.md index 2b032fe0..c94b89c7 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,5 +1,8 @@ -### Fix - -* Fix OPEN operation for indexed files. (#676) - * The runtime library now correctly sets the file status to 30 when attempting to open indexed files with invalid or corrupted file formats. +### Add +* Implemented new file locking and record locking for INDEXED files. +* Add a new sub command `migrate` for `cobj-idx`. + * With this command, you can convert an old version of an INDEXED file to a new version compatible with the latest opensource COBOL 4J. +* Add a new sub command `unlock` for `cobj-idx`. + * With this command, you can unlock all record locks and file locks on an INDEXED file. +* Add documentation of locking for INDEXED files. diff --git a/configure b/configure index 1d427448..ff5d3f09 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.11. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.12. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.11' -PACKAGE_VERSION='1.1.11' -PACKAGE_STRING='opensource COBOL 4J 1.1.11' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.12' +PACKAGE_VERSION='1.1.12' +PACKAGE_STRING='opensource COBOL 4J 1.1.12' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.11 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.11] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.12] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.11:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.12:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.11 +opensource COBOL 4J configure 1.1.12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.11, which was +It was created by opensource COBOL 4J $as_me 1.1.12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.11' - VERSION='1.1.11' + PACKAGE='opensource-cobol-4j-1.1.12' + VERSION='1.1.12' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.11, which was +This file was extended by opensource COBOL 4J $as_me 1.1.12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.11 +opensource COBOL 4J config.status 1.1.12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 5dd566bf..73d87449 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.11],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.11]) +AC_INIT([opensource COBOL 4J],[1.1.12],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.12]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index decff168..3deb09bd 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.12 | Windows | 21 | +| 1.1.12 | Ubuntu 24.04 | 21 | +| 1.1.12 | AlmaLinux 9 | 11 | +| 1.1.12 | Amazon Linux 2023 | 21 | | 1.1.11 | Windows | 21 | | 1.1.11 | Ubuntu 24.04 | 21 | | 1.1.11 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 5a76e3ac..47dbb406 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.11" + version = "1.1.12" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 48c51ab4..e7cd01b9 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.11"; + public static final String version = "1.1.12"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index e36f9bf3..83b2b596 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.11"); + System.out.println("1.1.12"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 01263540..29cb3a3c 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -29,7 +29,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.11", + "opensourcecobol4j_version": "1.1.12", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -50,7 +50,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.11", + "opensourcecobol4j_version": "1.1.12", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -69,7 +69,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.11", + "opensourcecobol4j_version": "1.1.12", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -90,7 +90,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.11", + "opensourcecobol4j_version": "1.1.12", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index a92ee067..dd603d25 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.11]) -m4_define([AT_PACKAGE_VERSION], [1.1.11]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.11]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.12]) +m4_define([AT_PACKAGE_VERSION], [1.1.12]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.12]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 8f41df6a..03dd19ba 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.11" +#define PACKAGE "opensource-cobol4j-1.1.12" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.11" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.12" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.11" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.12" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.11" +#define PACKAGE_VERSION "1.1.12" /* Define a patch level */ #define PATCH_LEVEL 0 From 06316ae4b5081892069fd2e461a2bc5c2ededcb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 09:22:00 +0900 Subject: [PATCH 162/188] Bump com.github.spotbugs from 6.2.5 to 6.2.6 in /libcobj (#705) Bumps com.github.spotbugs from 6.2.5 to 6.2.6. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 47dbb406..31e50564 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.5" + id("com.github.spotbugs") version "6.2.6" } repositories { From c6adbb174b7d84c9322edf0d905a6bb92663a601 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Sep 2025 10:57:30 +0900 Subject: [PATCH 163/188] Enable Gradle cache in build.yml and windows-build.yml workflows using gradle/actions/setup-gradle (#702) * Initial plan * Enable Gradle cache in GitHub Actions workflows Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Remove accidental test files that were not part of the caching changes Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Add Gradle cache to create-release.yml workflow The create-release.yml workflow also uses Gradle for publishing packages but was missing the gradle-build-action caching configuration. This adds the proper setup step with gradle-version: wrapper to enable caching for the publish job as well. Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Replace deprecated gradle/gradle-build-action with gradle/actions/setup-gradle Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Limit Gradle cache to windows-build.yml only as requested Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Enable Gradle cache in build.yml workflow for make command optimization Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> --- .github/workflows/build.yml | 5 +++++ .github/workflows/windows-build.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5f72046..7044067f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,6 +53,11 @@ jobs: - name: Checkout opensource COBOL 4J uses: actions/checkout@v5 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: wrapper + - name: Install opensource COBOL 4J if: inputs.configure-args == '' run: | diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index f367e55c..077b2ada 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -29,6 +29,11 @@ jobs: - name: Restore NuGet packages run: nuget restore ./win/ + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: wrapper + - name: Install opensource COBOL 4J working-directory: libcobj run: ./gradlew shadowJar From 1b57f70125878011fffd0bc69a0ad3d35dad70e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:58:44 +0900 Subject: [PATCH 164/188] Bump com.diffplug.spotless from 7.1.0 to 7.2.1 in /libcobj (#682) Bumps com.diffplug.spotless from 7.1.0 to 7.2.1. --- updated-dependencies: - dependency-name: com.diffplug.spotless dependency-version: 7.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 31e50564..f4cb0794 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { application id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.diffplug.spotless") version "7.1.0" + id("com.diffplug.spotless") version "7.2.1" id("java") id("maven-publish") pmd From 58dacae4aa85ba5600a727b8d30dc1e4ef7352ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 15:30:13 +0900 Subject: [PATCH 165/188] Build(deps): Bump gradle/actions from 3 to 4 (#711) Bumps [gradle/actions](https://github.com/gradle/actions) from 3 to 4. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](https://github.com/gradle/actions/compare/v3...v4) --- updated-dependencies: - dependency-name: gradle/actions dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/windows-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7044067f..48a01f57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: uses: actions/checkout@v5 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: gradle-version: wrapper diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 077b2ada..4fd32797 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -30,7 +30,7 @@ jobs: run: nuget restore ./win/ - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: gradle-version: wrapper From 54b8f2d88b3a6f3bd065c7e3aa662aa272848a36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 08:56:53 +0900 Subject: [PATCH 166/188] Build(deps): Bump com.github.spotbugs from 6.2.6 to 6.2.7 in /libcobj (#712) Bumps com.github.spotbugs from 6.2.6 to 6.2.7. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.2.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index f4cb0794..3c890dde 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.6" + id("com.github.spotbugs") version "6.2.7" } repositories { From b13ddd284beebbdd280a6314f2599e165c8283e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 08:56:50 +0900 Subject: [PATCH 167/188] Build(deps): Bump com.github.spotbugs from 6.2.7 to 6.3.0 in /libcobj (#713) Bumps com.github.spotbugs from 6.2.7 to 6.3.0. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 3c890dde..17dab737 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.2.7" + id("com.github.spotbugs") version "6.3.0" } repositories { From 7dd43679af76cf0d40a75980ba5e8e148ae4d21d Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:12:36 +0900 Subject: [PATCH 168/188] Fix locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE (#714) * fix: file locks of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE * test: add basic tests * chore: rename `indexed-lock` to `file-lock` --- .github/workflows/coverage.yml | 2 +- .github/workflows/pull-request.yml | 4 +- .github/workflows/push.yml | 4 +- .gitignore | 2 +- .../libcobj/file/CobolFile.java | 8 +- .../libcobj/file/CobolRelativeFile.java | 19 +- .../opensourcecobol/libcobj/file/FileIO.java | 1 + tests/.gitignore | 2 +- tests/Makefile.am | 30 +- tests/Makefile.in | 36 +- tests/{indexed-lock.at => file-lock.at} | 4 +- .../access-different-record.at | 4 +- .../access-same-record.at | 4 +- .../indexed-file/old_indexed_file.dat | Bin .../input-mode.at | 4 +- tests/file-lock.src/lock-file.at | 543 ++++++++++++++++++ .../lock-mode-automatic.at | 4 +- .../lock-mode-clause.at | 4 +- .../module-sync/setValue.java | 0 .../module-sync/wait.java | 0 .../old-file.at | 2 +- .../open-input.at | 4 +- .../open-start-write-rewrite.at | 4 +- .../release-lock.at | 12 +- .../same-process.at | 0 tests/indexed-lock.src/file-lock.at | 228 -------- 26 files changed, 620 insertions(+), 305 deletions(-) rename tests/{indexed-lock.at => file-lock.at} (86%) rename tests/{indexed-lock.src => file-lock.src}/access-different-record.at (99%) rename tests/{indexed-lock.src => file-lock.src}/access-same-record.at (99%) rename tests/{indexed-lock.src => file-lock.src}/indexed-file/old_indexed_file.dat (100%) rename tests/{indexed-lock.src => file-lock.src}/input-mode.at (99%) create mode 100644 tests/file-lock.src/lock-file.at rename tests/{indexed-lock.src => file-lock.src}/lock-mode-automatic.at (99%) rename tests/{indexed-lock.src => file-lock.src}/lock-mode-clause.at (99%) rename tests/{indexed-lock.src => file-lock.src}/module-sync/setValue.java (100%) rename tests/{indexed-lock.src => file-lock.src}/module-sync/wait.java (100%) rename tests/{indexed-lock.src => file-lock.src}/old-file.at (93%) rename tests/{indexed-lock.src => file-lock.src}/open-input.at (98%) rename tests/{indexed-lock.src => file-lock.src}/open-start-write-rewrite.at (99%) rename tests/{indexed-lock.src => file-lock.src}/release-lock.at (97%) rename tests/{indexed-lock.src => file-lock.src}/same-process.at (100%) delete mode 100644 tests/indexed-lock.src/file-lock.at diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e6882827..4655cdde 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -41,7 +41,7 @@ jobs: - name: Run other tests working-directory: tests run: | - tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "indexed-lock" "misc") + tests=("command-line-options" "data-rep" "i18n_sjis" "jp-compat" "run" "syntax" "cobj-idx" "file-lock" "misc") for test in "${tests[@]}"; do ./"$test" || true done diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2b8cd063..b50a9379 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -54,7 +54,7 @@ jobs: - "syntax" - "cobj-idx" - "misc" - - "indexed-lock" + - "file-lock" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml with: @@ -75,7 +75,7 @@ jobs: - "run" - "syntax" - "cobj-idx" - - "indexed-lock" + - "file-lock" #- "misc" os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] uses: ./.github/workflows/test-other.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a1eefb61..18d39930 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -58,7 +58,7 @@ jobs: - "run" - "syntax" - "cobj-idx" - - "indexed-lock" + - "file-lock" - "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml @@ -80,7 +80,7 @@ jobs: - "run" - "syntax" - "cobj-idx" - - "indexed-lock" + - "file-lock" #- "misc" os: ["ubuntu:24.04"] uses: ./.github/workflows/test-other.yml diff --git a/.gitignore b/.gitignore index 9e4d9bb1..cef26e9c 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,7 @@ tests/jp-compat tests/cobj-idx tests/misc tests/run -tests/indexed-lock +tests/file-lock tests/*.log tests/syntax tests/cobol85/*/*.class diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 1b6c65a4..f3747fcf 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -1210,13 +1210,13 @@ public int open_(String filename, int mode, int sharing) throws IOException { FileLock fl = null; if (!filename.startsWith("/dev/")) { try { - boolean lockFlag; + boolean isSharedLock; if (sharing != 0 || mode == COB_OPEN_OUTPUT) { - lockFlag = false; + isSharedLock = false; } else { - lockFlag = true; + isSharedLock = true; } - fl = fp.tryLock(0L, Long.MAX_VALUE, lockFlag); + fl = fp.tryLock(0L, Long.MAX_VALUE, isSharedLock); } catch (NonWritableChannelException e) { fp.close(); return EBADF; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java index 72ee7ff8..a49f5b6f 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java @@ -22,7 +22,6 @@ import java.nio.ByteBuffer; import java.nio.channels.*; import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField; @@ -140,12 +139,7 @@ public int open_(String filename, int mode, int sharing) throws IOException { this.fp.seek(0); break; case COB_OPEN_OUTPUT: - Path path = Paths.get(filename); - if (Files.exists(path)) { - Files.delete(path); - } this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); - this.fp.seek(0); break; case COB_OPEN_I_O: this.fp = new RandomAccessFile(this.assign.fieldToString(), "rw"); @@ -175,13 +169,13 @@ public int open_(String filename, int mode, int sharing) throws IOException { FileLock fl = null; if (!filename.startsWith("/dev/")) { try { - boolean lockFlag; + boolean isSharedLock; if (sharing != 0 || mode == COB_OPEN_OUTPUT) { - lockFlag = false; + isSharedLock = false; } else { - lockFlag = true; + isSharedLock = true; } - fl = ch.tryLock(0L, Long.MAX_VALUE, lockFlag); + fl = ch.tryLock(0L, Long.MAX_VALUE, isSharedLock); } catch (NonWritableChannelException e) { this.fp.close(); return EBADF; @@ -198,6 +192,11 @@ public int open_(String filename, int mode, int sharing) throws IOException { } } + if(mode == COB_OPEN_OUTPUT) { + this.fp.setLength(0); + this.fp.seek(0); + } + this.file.setRandomAccessFile(this.fp, fl); if ((this.flag_select_features & COB_SELECT_LINAGE) != 0) { if (this.file_linage_check()) { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java index 8ca82b46..b3634358 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/FileIO.java @@ -90,6 +90,7 @@ void setRandomAccessFile(RandomAccessFile ra, FileLock fl) { this.useStdOut = false; this.useStdIn = false; this.fc = ra.getChannel(); + this.fl = fl; } /** diff --git a/tests/.gitignore b/tests/.gitignore index fa865cd1..2d979a6a 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -6,5 +6,5 @@ run~ syntax~ command-line-options~ cobj-idx~ -indexed-lock~ +file-lock~ *.dir diff --git a/tests/Makefile.am b/tests/Makefile.am index 2c68394d..c9653eba 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -30,7 +30,7 @@ TESTS = syntax \ jp-compat \ command-line-options \ cobj-idx \ - indexed-lock \ + file-lock \ misc else TESTS = syntax \ @@ -42,7 +42,7 @@ TESTS = syntax \ jp-compat \ command-line-options \ cobj-idx \ - indexed-lock \ + file-lock \ misc endif @@ -209,18 +209,18 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/misc.at indexed_lock_DEPENDENCIES = \ - indexed-lock.at \ - indexed-lock.src/file-lock.at \ - indexed-lock.src/access-same-record.at \ - indexed-lock.src/access-different-record.at \ - indexed-lock.src/input-mode.at \ - indexed-lock.src/same-process.at \ - indexed-lock.src/open-start-write-rewrite.at \ - indexed-lock.src/release-lock.at \ - indexed-lock.src/open-input.at \ - indexed-lock.src/lock-mode-clause.at \ - indexed-lock.src/old-file.at \ - indexed-lock.src/lock-mode-automatic.at + file-lock.at \ + file-lock.src/lock-file.at \ + file-lock.src/access-same-record.at \ + file-lock.src/access-different-record.at \ + file-lock.src/input-mode.at \ + file-lock.src/same-process.at \ + file-lock.src/open-start-write-rewrite.at \ + file-lock.src/release-lock.at \ + file-lock.src/open-input.at \ + file-lock.src/lock-mode-clause.at \ + file-lock.src/old-file.at \ + file-lock.src/lock-mode-automatic.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -305,5 +305,5 @@ $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) -$(srcdir)/indexed-lock: $(indexed_lock_DEPENDENCIES) +$(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) diff --git a/tests/Makefile.in b/tests/Makefile.in index 923c4437..9075bfd1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -570,7 +570,7 @@ SUBDIRS = cobol85 @I18N_UTF8_FALSE@ jp-compat \ @I18N_UTF8_FALSE@ command-line-options \ @I18N_UTF8_FALSE@ cobj-idx \ -@I18N_UTF8_FALSE@ indexed-lock \ +@I18N_UTF8_FALSE@ file-lock \ @I18N_UTF8_FALSE@ misc @I18N_UTF8_TRUE@TESTS = syntax \ @@ -582,7 +582,7 @@ SUBDIRS = cobol85 @I18N_UTF8_TRUE@ jp-compat \ @I18N_UTF8_TRUE@ command-line-options \ @I18N_UTF8_TRUE@ cobj-idx \ -@I18N_UTF8_TRUE@ indexed-lock \ +@I18N_UTF8_TRUE@ file-lock \ @I18N_UTF8_TRUE@ misc syntax_DEPENDENCIES = \ @@ -748,18 +748,18 @@ cobj_idx_DEPENDENCIES = \ cobj-idx.src/misc.at indexed_lock_DEPENDENCIES = \ - indexed-lock.at \ - indexed-lock.src/file-lock.at \ - indexed-lock.src/access-same-record.at \ - indexed-lock.src/access-different-record.at \ - indexed-lock.src/input-mode.at \ - indexed-lock.src/same-process.at \ - indexed-lock.src/open-start-write-rewrite.at \ - indexed-lock.src/release-lock.at \ - indexed-lock.src/open-input.at \ - indexed-lock.src/lock-mode-clause.at \ - indexed-lock.src/old-file.at \ - indexed-lock.src/lock-mode-automatic.at + file-lock.at \ + file-lock.src/lock-file.at \ + file-lock.src/access-same-record.at \ + file-lock.src/access-different-record.at \ + file-lock.src/input-mode.at \ + file-lock.src/same-process.at \ + file-lock.src/open-start-write-rewrite.at \ + file-lock.src/release-lock.at \ + file-lock.src/open-input.at \ + file-lock.src/lock-mode-clause.at \ + file-lock.src/old-file.at \ + file-lock.src/lock-mode-automatic.at misc_DEPENDENCIES = \ misc.src/signed-comp3.at \ @@ -1159,9 +1159,9 @@ cobj-idx.log: cobj-idx --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -indexed-lock.log: indexed-lock - @p='indexed-lock'; \ - b='indexed-lock'; \ +file-lock.log: file-lock + @p='file-lock'; \ + b='file-lock'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1407,7 +1407,7 @@ $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) $(srcdir)/cobj-idx: $(cobj_idx_DEPENDENCIES) -$(srcdir)/indexed-lock: $(indexed_lock_DEPENDENCIES) +$(srcdir)/file-lock: $(indexed_lock_DEPENDENCIES) $(srcdir)/misc: $(misc_DEPENDENCIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/indexed-lock.at b/tests/file-lock.at similarity index 86% rename from tests/indexed-lock.at rename to tests/file-lock.at index 79c9b197..24985fce 100644 --- a/tests/indexed-lock.at +++ b/tests/file-lock.at @@ -1,6 +1,6 @@ -AT_INIT([indexed-lock]) +AT_INIT([file-lock]) -m4_include([file-lock.at]) +m4_include([lock-file.at]) m4_include([access-same-record.at]) m4_include([access-different-record.at]) m4_include([input-mode.at]) diff --git a/tests/indexed-lock.src/access-different-record.at b/tests/file-lock.src/access-different-record.at similarity index 99% rename from tests/indexed-lock.src/access-different-record.at rename to tests/file-lock.src/access-different-record.at index 00d8e40b..52fccb2a 100644 --- a/tests/indexed-lock.src/access-different-record.at +++ b/tests/file-lock.src/access-different-record.at @@ -231,8 +231,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/access-same-record.at b/tests/file-lock.src/access-same-record.at similarity index 99% rename from tests/indexed-lock.src/access-same-record.at rename to tests/file-lock.src/access-same-record.at index b3d942cc..21e3414e 100644 --- a/tests/indexed-lock.src/access-same-record.at +++ b/tests/file-lock.src/access-same-record.at @@ -206,8 +206,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/indexed-file/old_indexed_file.dat b/tests/file-lock.src/indexed-file/old_indexed_file.dat similarity index 100% rename from tests/indexed-lock.src/indexed-file/old_indexed_file.dat rename to tests/file-lock.src/indexed-file/old_indexed_file.dat diff --git a/tests/indexed-lock.src/input-mode.at b/tests/file-lock.src/input-mode.at similarity index 99% rename from tests/indexed-lock.src/input-mode.at rename to tests/file-lock.src/input-mode.at index 16df00d9..0b6ae385 100644 --- a/tests/indexed-lock.src/input-mode.at +++ b/tests/file-lock.src/input-mode.at @@ -183,8 +183,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_READ_NEXT_RECORD ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/file-lock.src/lock-file.at b/tests/file-lock.src/lock-file.at new file mode 100644 index 00000000..bfe47620 --- /dev/null +++ b/tests/file-lock.src/lock-file.at @@ -0,0 +1,543 @@ +AT_SETUP([File locking of indexed files]) +AT_DATA([make_indexed_file.cbl],[ + identification division. + program-id. make_indexed_file@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to external "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + working-storage section. + 01 indexed-file-status pic 99. + procedure division. + main-procedure. + + open output indexed-file. + close indexed-file. +]) + +AT_DATA([prog1.cbl], [ + identification division. + program-id. prog1@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + select shared-file1 + assign to "shared1@@id@@.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2@@id@@.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 indexed-file-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * open the indexed file before the other process does. + open @@open_mode@@ indexed-file. + + * Notify the other process that + * this process opened the indexed file. + open output shared-file1. + close shared-file1. + + * Wait for the other process to finish. + call "C$SLEEP" using 1. + perform forever + open input shared-file2 + if shared-file2-status = 0 + exit perform + end-if + close shared-file2 + call "C$SLEEP" using 1 + end-perform. + close shared-file2. + + * Close the indexed file after the other process has finished. + close indexed-file. +]) + +AT_DATA([prog2.cbl], [ + identification division. + program-id. prog2@@id@@. + + environment division. + input-output section. + + file-control. + select indexed-file + assign to "indexed@@id@@.dat" + organization is indexed + record key is rec-key + file status is indexed-file-status. + + select shared-file1 + assign to "shared1@@id@@.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2@@id@@.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd indexed-file. + 01 dup-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 indexed-file-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * Wait for the other process to open the indexed file. + call "C$SLEEP" using 1. + perform forever + open input shared-file1 + if shared-file1-status = 0 + close shared-file1 + exit perform + end-if + close shared-file1 + call "C$SLEEP" using 1 + end-perform. + + * Open the indexed file that another process has already opened. + open @@open_mode@@ indexed-file. + display indexed-file-status. + close indexed-file. + + * Notify the other process that + * this process finished. + open output shared-file2. + close shared-file2. +]) + +AT_DATA([run.sh], [ +#!/bin/bash + +function run_test() { + SEQ_NUMBER=$1 + OPEN_MODE_1=$2 + OPEN_MODE_2=$3 + EXPECTED_EXIT_CODE=$4 + + rm -f *.dat + + TEST_ID="$(echo "${OPEN_MODE_1}_${OPEN_MODE_2}" | sed 's/-/_/g')" + + PROGRAM_NAME_1="prog1${TEST_ID}" + PROGRAM_NAME_2="prog2${TEST_ID}" + + cat "prog1.cbl" | + sed "s/@@id@@/${TEST_ID}/g" | + sed "s/@@open_mode@@/${OPEN_MODE_1}/g" \ + > ${PROGRAM_NAME_1}.cbl + + cat "prog2.cbl" | + sed "s/@@id@@/${TEST_ID}/g" | + sed "s/@@open_mode@@/${OPEN_MODE_2}/g" \ + > ${PROGRAM_NAME_2}.cbl + + cat "make_indexed_file.cbl" | + sed "s/@@id@@/${TEST_ID}/g" \ + > make_indexed_file${TEST_ID}.cbl + + cobj ${PROGRAM_NAME_1}.cbl ${PROGRAM_NAME_2}.cbl make_indexed_file${TEST_ID}.cbl + + java -Xlog:perf+memops=off make_indexed_file${TEST_ID} + + java -Xlog:perf+memops=off $PROGRAM_NAME_1 & + PID1=$! + + java -Xlog:perf+memops=off $PROGRAM_NAME_2 > ${TEST_ID}.log & + PID2=$! + + wait $PID1 $PID2 + if test "$(cat ${TEST_ID}.log)" != "${EXPECTED_EXIT_CODE}"; then + echo "<${SEQ_NUMBER}> Test ${TEST_ID} failed. Expected exit code: ${EXPECTED_EXIT_CODE}, got: $(cat ${TEST_ID}.log)" \ + exit 1 + fi +} + +################################### + +run_test 00 INPUT INPUT 00 +run_test 01 INPUT OUTPUT 61 +run_test 02 INPUT I-O 00 +run_test 03 INPUT EXTEND 00 +run_test 04 OUTPUT INPUT 61 +run_test 05 OUTPUT OUTPUT 61 +run_test 06 OUTPUT I-O 61 +run_test 07 OUTPUT EXTEND 61 +run_test 08 I-O INPUT 00 +run_test 09 I-O OUTPUT 61 +run_test 10 I-O I-O 00 +run_test 11 I-O EXTEND 00 +run_test 12 EXTEND INPUT 00 +run_test 13 EXTEND OUTPUT 61 +run_test 14 EXTEND I-O 00 +run_test 15 EXTEND EXTEND 00 +]) + +AT_CHECK([bash run.sh]) +AT_CLEANUP + +AT_SETUP([File locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE files]) +AT_DATA([prog1-template.cbl],[ + identification division. + program-id. + prog1_@@id@@. + environment division. + input-output section. + + file-control. + select f + assign to "file.dat" + organization is @@file_organization@@ + file status is f-status. + + select shared-file1 + assign to "shared1.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd f. + 01 f-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 f-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * create the target file. + open output f. + close f. + + * open the target file before the other process does. + open @@open_mode@@ f. + + * Notify the other process that + * this process opened the target file. + open output shared-file1. + close shared-file1. + + * Wait for the other process to finish. + *call "C$SLEEP" using 1. + perform forever + open input shared-file2 + if shared-file2-status = 0 + exit perform + end-if + close shared-file2 + * call "C$SLEEP" using 1 + end-perform. + close shared-file2. + + * Close the target file after the other process has finished. + close f. +]) + +AT_DATA([prog2-template.cbl],[ + identification division. + program-id. + prog2_@@id@@. + environment division. + input-output section. + + file-control. + select f + assign to "file.dat" + organization is @@file_organization@@ + file status is f-status. + + select shared-file1 + assign to "shared1.dat" + organization is sequential + file status is shared-file1-status. + + select shared-file2 + assign to "shared2.dat" + organization is sequential + file status is shared-file2-status. + + data division. + file section. + fd f. + 01 f-record. + 05 rec-key pic x(5). + 05 rec-value pic x(5). + fd shared-file1. + 01 shared-record1 pic x(10). + fd shared-file2. + 01 shared-record2 pic x(10). + working-storage section. + 01 f-status pic 99. + 01 shared-file1-status pic 99. + 01 shared-file2-status pic 99. + procedure division. + main-procedure. + + * Wait for the other process to open the indexed file. + *call "C$SLEEP" using 1. + perform forever + open input shared-file1 + if shared-file1-status = 0 + close shared-file1 + exit perform + end-if + close shared-file1 + * call "C$SLEEP" using 1 + end-perform. + + * Open the target file that another process has already opened. + open @@open_mode@@ f. + display f-status. + close f. + + * Notify the other process that + * this process finished. + open output shared-file2. + close shared-file2. +]) + +AT_DATA([run.sh], [ +#!/bin/bash + +set -e + +COMPILER="cobj" +RUNNER="java -Xlog:perf+memops=off" + +rm -f file.dat shared1.dat shared2.dat + +function compile_all() { + for ORGANIZATION in "sequential" "line sequential" "relative"; do + for OPEN_MODE_1 in "INPUT" "OUTPUT" "I-O" "EXTEND"; do + for OPEN_MODE_2 in "INPUT" "OUTPUT" "I-O" "EXTEND"; do + ID=$(echo "${ORGANIZATION:0:1}_${OPEN_MODE_1}_${OPEN_MODE_2}" | sed 's/-/_/g') + PROGRAM_ID_1="prog1_${ID}" + PROGRAM_ID_2="prog2_${ID}" + PROGRAM1_FILE="${PROGRAM_ID_1}.cbl" + PROGRAM2_FILE="${PROGRAM_ID_2}.cbl" + + cat prog1-template.cbl | + sed "s/@@id@@/${ID}/g; s/@@file_organization@@/${ORGANIZATION}/g; s/@@open_mode@@/${OPEN_MODE_1}/g" \ + > "${PROGRAM1_FILE}" + cat prog2-template.cbl | + sed "s/@@id@@/${ID}/g; s/@@file_organization@@/${ORGANIZATION}/g; s/@@open_mode@@/${OPEN_MODE_2}/g" \ + > "${PROGRAM2_FILE}" + + "${COMPILER}" "${PROGRAM1_FILE}" "${PROGRAM2_FILE}" + done + done + done +} + +function run_test() { + ORGANIZATION="$1" + OPEN_MODE_1="$2" + OPEN_MODE_2="$3" + + ID=$(echo "${ORGANIZATION:0:1}_${OPEN_MODE_1}_${OPEN_MODE_2}" | sed 's/-/_/g') + PROGRAM_ID_1="prog1_${ID}" + PROGRAM_ID_2="prog2_${ID}" + PROGRAM1_FILE="${PROGRAM_ID_1}.cbl" + PROGRAM2_FILE="${PROGRAM_ID_2}.cbl" + PROGRAM1_LOG="${PROGRAM_ID_1}.log" + PROGRAM2_LOG="${PROGRAM_ID_2}.log" + + rm -f file.dat shared1.dat shared2.dat + + cat prog1-template.cbl | + sed "s/@@id@@/${ID}/g; s/@@file_organization@@/${ORGANIZATION}/g; s/@@open_mode@@/${OPEN_MODE_1}/g" \ + > "${PROGRAM1_FILE}" + cat prog2-template.cbl | + sed "s/@@id@@/${ID}/g; s/@@file_organization@@/${ORGANIZATION}/g; s/@@open_mode@@/${OPEN_MODE_2}/g" \ + > "${PROGRAM2_FILE}" + + "${COMPILER}" "${PROGRAM1_FILE}" "${PROGRAM2_FILE}" + + ${RUNNER} "${PROGRAM_ID_1}"& + PID1=$! + ${RUNNER} "${PROGRAM_ID_2}" > "${PROGRAM2_LOG}" & + PID2=$! + wait $PID1 $PID2 + + echo "${ORGANIZATION} - ${OPEN_MODE_1} & ${OPEN_MODE_2} - $(cat "${PROGRAM2_LOG}")" +} + +# First, compile all combinations +compile_all + +# Then, run a specific test case +run_test "sequential" "INPUT" "INPUT" +run_test "sequential" "INPUT" "OUTPUT" +run_test "sequential" "INPUT" "I-O" +run_test "sequential" "INPUT" "EXTEND" + +run_test "sequential" "OUTPUT" "INPUT" +run_test "sequential" "OUTPUT" "OUTPUT" +run_test "sequential" "OUTPUT" "I-O" +run_test "sequential" "OUTPUT" "EXTEND" + +run_test "sequential" "I-O" "INPUT" +run_test "sequential" "I-O" "OUTPUT" +run_test "sequential" "I-O" "I-O" +run_test "sequential" "I-O" "EXTEND" + +run_test "sequential" "EXTEND" "INPUT" +run_test "sequential" "EXTEND" "OUTPUT" +run_test "sequential" "EXTEND" "I-O" +run_test "sequential" "EXTEND" "EXTEND" + +run_test "line sequential" "INPUT" "INPUT" +run_test "line sequential" "INPUT" "OUTPUT" +run_test "line sequential" "INPUT" "I-O" +run_test "line sequential" "INPUT" "EXTEND" + +run_test "line sequential" "OUTPUT" "INPUT" +run_test "line sequential" "OUTPUT" "OUTPUT" +run_test "line sequential" "OUTPUT" "I-O" +run_test "line sequential" "OUTPUT" "EXTEND" + +run_test "line sequential" "I-O" "INPUT" +run_test "line sequential" "I-O" "OUTPUT" +run_test "line sequential" "I-O" "I-O" +run_test "line sequential" "I-O" "EXTEND" + +run_test "line sequential" "EXTEND" "INPUT" +run_test "line sequential" "EXTEND" "OUTPUT" +run_test "line sequential" "EXTEND" "I-O" +run_test "line sequential" "EXTEND" "EXTEND" + +run_test "relative" "INPUT" "INPUT" +run_test "relative" "INPUT" "OUTPUT" +run_test "relative" "INPUT" "I-O" +run_test "relative" "INPUT" "EXTEND" + +run_test "relative" "OUTPUT" "INPUT" +run_test "relative" "OUTPUT" "OUTPUT" +run_test "relative" "OUTPUT" "I-O" +run_test "relative" "OUTPUT" "EXTEND" + +run_test "relative" "I-O" "INPUT" +run_test "relative" "I-O" "OUTPUT" +run_test "relative" "I-O" "I-O" +run_test "relative" "I-O" "EXTEND" + +run_test "relative" "EXTEND" "INPUT" +run_test "relative" "EXTEND" "OUTPUT" +run_test "relative" "EXTEND" "I-O" +run_test "relative" "EXTEND" "EXTEND" +]) + +AT_CHECK([bash run.sh], [0], +[sequential - INPUT & INPUT - 00 +sequential - INPUT & OUTPUT - 61 +sequential - INPUT & I-O - 61 +sequential - INPUT & EXTEND - 61 +sequential - OUTPUT & INPUT - 61 +sequential - OUTPUT & OUTPUT - 61 +sequential - OUTPUT & I-O - 61 +sequential - OUTPUT & EXTEND - 61 +sequential - I-O & INPUT - 61 +sequential - I-O & OUTPUT - 61 +sequential - I-O & I-O - 61 +sequential - I-O & EXTEND - 61 +sequential - EXTEND & INPUT - 61 +sequential - EXTEND & OUTPUT - 61 +sequential - EXTEND & I-O - 61 +sequential - EXTEND & EXTEND - 61 +line sequential - INPUT & INPUT - 00 +line sequential - INPUT & OUTPUT - 61 +line sequential - INPUT & I-O - 61 +line sequential - INPUT & EXTEND - 61 +line sequential - OUTPUT & INPUT - 61 +line sequential - OUTPUT & OUTPUT - 61 +line sequential - OUTPUT & I-O - 61 +line sequential - OUTPUT & EXTEND - 61 +line sequential - I-O & INPUT - 61 +line sequential - I-O & OUTPUT - 61 +line sequential - I-O & I-O - 61 +line sequential - I-O & EXTEND - 61 +line sequential - EXTEND & INPUT - 61 +line sequential - EXTEND & OUTPUT - 61 +line sequential - EXTEND & I-O - 61 +line sequential - EXTEND & EXTEND - 61 +relative - INPUT & INPUT - 00 +relative - INPUT & OUTPUT - 61 +relative - INPUT & I-O - 61 +relative - INPUT & EXTEND - 61 +relative - OUTPUT & INPUT - 61 +relative - OUTPUT & OUTPUT - 61 +relative - OUTPUT & I-O - 61 +relative - OUTPUT & EXTEND - 61 +relative - I-O & INPUT - 61 +relative - I-O & OUTPUT - 61 +relative - I-O & I-O - 61 +relative - I-O & EXTEND - 61 +relative - EXTEND & INPUT - 61 +relative - EXTEND & OUTPUT - 61 +relative - EXTEND & I-O - 61 +relative - EXTEND & EXTEND - 61 +]) +AT_CLEANUP \ No newline at end of file diff --git a/tests/indexed-lock.src/lock-mode-automatic.at b/tests/file-lock.src/lock-mode-automatic.at similarity index 99% rename from tests/indexed-lock.src/lock-mode-automatic.at rename to tests/file-lock.src/lock-mode-automatic.at index bb671510..f96c9eff 100644 --- a/tests/indexed-lock.src/lock-mode-automatic.at +++ b/tests/file-lock.src/lock-mode-automatic.at @@ -213,8 +213,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/lock-mode-clause.at b/tests/file-lock.src/lock-mode-clause.at similarity index 99% rename from tests/indexed-lock.src/lock-mode-clause.at rename to tests/file-lock.src/lock-mode-clause.at index e622ac34..0bb43e5e 100644 --- a/tests/indexed-lock.src/lock-mode-clause.at +++ b/tests/file-lock.src/lock-mode-clause.at @@ -290,8 +290,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_NO_LOCK" "$OPERATION_DELETE" ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/module-sync/setValue.java b/tests/file-lock.src/module-sync/setValue.java similarity index 100% rename from tests/indexed-lock.src/module-sync/setValue.java rename to tests/file-lock.src/module-sync/setValue.java diff --git a/tests/indexed-lock.src/module-sync/wait.java b/tests/file-lock.src/module-sync/wait.java similarity index 100% rename from tests/indexed-lock.src/module-sync/wait.java rename to tests/file-lock.src/module-sync/wait.java diff --git a/tests/indexed-lock.src/old-file.at b/tests/file-lock.src/old-file.at similarity index 93% rename from tests/indexed-lock.src/old-file.at rename to tests/file-lock.src/old-file.at index 680c52a5..8e2ab9e3 100644 --- a/tests/indexed-lock.src/old-file.at +++ b/tests/file-lock.src/old-file.at @@ -43,7 +43,7 @@ AT_DATA([open_file_status.at], [ ]) AT_CHECK([${COBJ} open_file_status.at]) -AT_CHECK([cp ../../indexed-lock.src/indexed-file/old_indexed_file.dat indexed_file.dat]) +AT_CHECK([cp ../../file-lock.src/indexed-file/old_indexed_file.dat indexed_file.dat]) AT_CHECK([java -Xlog:perf+memops=off open_file_status], [0], [92 92 diff --git a/tests/indexed-lock.src/open-input.at b/tests/file-lock.src/open-input.at similarity index 98% rename from tests/indexed-lock.src/open-input.at rename to tests/file-lock.src/open-input.at index f6c1b631..65941cb2 100644 --- a/tests/indexed-lock.src/open-input.at +++ b/tests/file-lock.src/open-input.at @@ -165,8 +165,8 @@ run_test "$OPERATION_READ_NEXT_RECORD_WITH_LOCK" "$OPERATION_DELETE" ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/open-start-write-rewrite.at b/tests/file-lock.src/open-start-write-rewrite.at similarity index 99% rename from tests/indexed-lock.src/open-start-write-rewrite.at rename to tests/file-lock.src/open-start-write-rewrite.at index 7022b91e..aa5e9b16 100644 --- a/tests/indexed-lock.src/open-start-write-rewrite.at +++ b/tests/file-lock.src/open-start-write-rewrite.at @@ -196,8 +196,8 @@ run_test "$OPERATION_REWRITE" "$OPERATION_DELETE" "00" "0 ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. diff --git a/tests/indexed-lock.src/release-lock.at b/tests/file-lock.src/release-lock.at similarity index 97% rename from tests/indexed-lock.src/release-lock.at rename to tests/file-lock.src/release-lock.at index 6e477e2e..cefde4f5 100644 --- a/tests/indexed-lock.src/release-lock.at +++ b/tests/file-lock.src/release-lock.at @@ -174,8 +174,8 @@ run_test "$OPERATION_CLOSE" "$OPERATION_REWRITE" "00" " ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_DATA([prog1.template.cbl], [ IDENTIFICATION DIVISION. @@ -442,8 +442,8 @@ AT_DATA([run.sh], [ wait $PID1 $PID2 ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_CHECK([cobj p1.cbl p2.cbl]) AT_CHECK([javac wait.java setValue.java]) @@ -577,8 +577,8 @@ AT_DATA([run.sh], [ wait $PID1 $PID2 ]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/wait.java .]) -AT_CHECK([cp ../../indexed-lock.src/module-sync/setValue.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/wait.java .]) +AT_CHECK([cp ../../file-lock.src/module-sync/setValue.java .]) AT_CHECK([cobj p1.cbl p2.cbl]) AT_CHECK([javac wait.java setValue.java]) diff --git a/tests/indexed-lock.src/same-process.at b/tests/file-lock.src/same-process.at similarity index 100% rename from tests/indexed-lock.src/same-process.at rename to tests/file-lock.src/same-process.at diff --git a/tests/indexed-lock.src/file-lock.at b/tests/indexed-lock.src/file-lock.at deleted file mode 100644 index 68032cf1..00000000 --- a/tests/indexed-lock.src/file-lock.at +++ /dev/null @@ -1,228 +0,0 @@ -AT_SETUP([File locking of indexed files]) -AT_DATA([make_indexed_file.cbl],[ - identification division. - program-id. make_indexed_file@@id@@. - - environment division. - input-output section. - - file-control. - select indexed-file - assign to external "indexed@@id@@.dat" - organization is indexed - record key is rec-key - file status is indexed-file-status. - - data division. - file section. - fd indexed-file. - 01 dup-record. - 05 rec-key pic x(5). - 05 rec-value pic x(5). - working-storage section. - 01 indexed-file-status pic 99. - procedure division. - main-procedure. - - open output indexed-file. - close indexed-file. -]) - -AT_DATA([prog1.cbl], [ - identification division. - program-id. prog1@@id@@. - - environment division. - input-output section. - - file-control. - select indexed-file - assign to "indexed@@id@@.dat" - organization is indexed - record key is rec-key - file status is indexed-file-status. - - select shared-file1 - assign to "shared1@@id@@.dat" - organization is sequential - file status is shared-file1-status. - - select shared-file2 - assign to "shared2@@id@@.dat" - organization is sequential - file status is shared-file2-status. - - data division. - file section. - fd indexed-file. - 01 dup-record. - 05 rec-key pic x(5). - 05 rec-value pic x(5). - fd shared-file1. - 01 shared-record1 pic x(10). - fd shared-file2. - 01 shared-record2 pic x(10). - working-storage section. - 01 indexed-file-status pic 99. - 01 shared-file1-status pic 99. - 01 shared-file2-status pic 99. - procedure division. - main-procedure. - - * open the indexed file before the other process does. - open @@open_mode@@ indexed-file. - - * Notify the other process that - * this process opened the indexed file. - open output shared-file1. - close shared-file1. - - * Wait for the other process to finish. - call "C$SLEEP" using 1. - perform forever - open input shared-file2 - if shared-file2-status = 0 - exit perform - end-if - close shared-file2 - call "C$SLEEP" using 1 - end-perform. - close shared-file2. - - * Close the indexed file after the other process has finished. - close indexed-file. -]) - -AT_DATA([prog2.cbl], [ - identification division. - program-id. prog2@@id@@. - - environment division. - input-output section. - - file-control. - select indexed-file - assign to "indexed@@id@@.dat" - organization is indexed - record key is rec-key - file status is indexed-file-status. - - select shared-file1 - assign to "shared1@@id@@.dat" - organization is sequential - file status is shared-file1-status. - - select shared-file2 - assign to "shared2@@id@@.dat" - organization is sequential - file status is shared-file2-status. - - data division. - file section. - fd indexed-file. - 01 dup-record. - 05 rec-key pic x(5). - 05 rec-value pic x(5). - fd shared-file1. - 01 shared-record1 pic x(10). - fd shared-file2. - 01 shared-record2 pic x(10). - working-storage section. - 01 indexed-file-status pic 99. - 01 shared-file1-status pic 99. - 01 shared-file2-status pic 99. - procedure division. - main-procedure. - - * Wait for the other process to open the indexed file. - call "C$SLEEP" using 1. - perform forever - open input shared-file1 - if shared-file1-status = 0 - close shared-file1 - exit perform - end-if - close shared-file1 - call "C$SLEEP" using 1 - end-perform. - - * Open the indexed file that another process has already opened. - open @@open_mode@@ indexed-file. - display indexed-file-status. - close indexed-file. - - * Notify the other process that - * this process finished. - open output shared-file2. - close shared-file2. -]) - -AT_DATA([run.sh], [ -#!/bin/bash - -function run_test() { - SEQ_NUMBER=$1 - OPEN_MODE_1=$2 - OPEN_MODE_2=$3 - EXPECTED_EXIT_CODE=$4 - - rm -f *.dat - - TEST_ID="$(echo "${OPEN_MODE_1}_${OPEN_MODE_2}" | sed 's/-/_/g')" - - PROGRAM_NAME_1="prog1${TEST_ID}" - PROGRAM_NAME_2="prog2${TEST_ID}" - - cat "prog1.cbl" | - sed "s/@@id@@/${TEST_ID}/g" | - sed "s/@@open_mode@@/${OPEN_MODE_1}/g" \ - > ${PROGRAM_NAME_1}.cbl - - cat "prog2.cbl" | - sed "s/@@id@@/${TEST_ID}/g" | - sed "s/@@open_mode@@/${OPEN_MODE_2}/g" \ - > ${PROGRAM_NAME_2}.cbl - - cat "make_indexed_file.cbl" | - sed "s/@@id@@/${TEST_ID}/g" \ - > make_indexed_file${TEST_ID}.cbl - - cobj ${PROGRAM_NAME_1}.cbl ${PROGRAM_NAME_2}.cbl make_indexed_file${TEST_ID}.cbl - - java -Xlog:perf+memops=off make_indexed_file${TEST_ID} - - java -Xlog:perf+memops=off $PROGRAM_NAME_1 & - PID1=$! - - java -Xlog:perf+memops=off $PROGRAM_NAME_2 > ${TEST_ID}.log & - PID2=$! - - wait $PID1 $PID2 - if test "$(cat ${TEST_ID}.log)" != "${EXPECTED_EXIT_CODE}"; then - echo "<${SEQ_NUMBER}> Test ${TEST_ID} failed. Expected exit code: ${EXPECTED_EXIT_CODE}, got: $(cat ${TEST_ID}.log)" \ - exit 1 - fi -} - -################################### - -run_test 00 INPUT INPUT 00 -run_test 01 INPUT OUTPUT 61 -run_test 02 INPUT I-O 00 -run_test 03 INPUT EXTEND 00 -run_test 04 OUTPUT INPUT 61 -run_test 05 OUTPUT OUTPUT 61 -run_test 06 OUTPUT I-O 61 -run_test 07 OUTPUT EXTEND 61 -run_test 08 I-O INPUT 00 -run_test 09 I-O OUTPUT 61 -run_test 10 I-O I-O 00 -run_test 11 I-O EXTEND 00 -run_test 12 EXTEND INPUT 00 -run_test 13 EXTEND OUTPUT 61 -run_test 14 EXTEND I-O 00 -run_test 15 EXTEND EXTEND 00 -]) - -AT_CHECK([bash run.sh]) -AT_CLEANUP From e3088bb370245254fd7daaf29da8c969ac17b3f7 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:03:20 +0900 Subject: [PATCH 169/188] Use the label `windows-2022` instead of `windows-latest` (#718) --- .github/workflows/windows-build.yml | 2 +- .github/workflows/windows-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 4fd32797..8cec9681 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -13,7 +13,7 @@ permissions: jobs: build: - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/setup-java@v5 with: diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 6ece70d5..3e4ce48c 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -9,7 +9,7 @@ on: jobs: test: - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/checkout@v5 From f8c93d136410f8ab264f4136cd4f6fbe85a24ad7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:19:02 +0900 Subject: [PATCH 170/188] Build(deps): Bump com.github.spotbugs from 6.3.0 to 6.4.2 in /libcobj (#720) Bumps com.github.spotbugs from 6.3.0 to 6.4.2. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.4.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 17dab737..4d91a6e3 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.3.0" + id("com.github.spotbugs") version "6.4.2" } repositories { From c302ca2b65058fa561500779c64e1987b9551cc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:19:21 +0900 Subject: [PATCH 171/188] Build(deps): Bump com.google.guava:guava in /libcobj (#721) Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.4.8-jre to 33.5.0-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-version: 33.5.0-jre dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 4d91a6e3..d1003063 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -31,7 +31,7 @@ tasks { } dependencies { - implementation("com.google.guava:guava:33.4.8-jre") + implementation("com.google.guava:guava:33.5.0-jre") implementation("org.xerial:sqlite-jdbc:3.50.3.0") implementation("commons-cli:commons-cli:1.10.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.4") From ae2469f67d3106fe5541eabf65ab3bb6e9d13030 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:33:33 +0900 Subject: [PATCH 172/188] Fix variable length SEQUENTIAL files (#722) * fix: set limits of sequential file records * test: add tests for variable length files * chore: remove unnecessary spaces * fix: check that the record size is not less than record_min --- .../libcobj/file/CobolRelativeFile.java | 2 +- .../libcobj/file/CobolSequentialFile.java | 2 + tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/TEST_VAR_LENGTH.txt | Bin 0 -> 787 bytes tests/misc.src/variable-length-file.at | 51 ++++++++++++++++++ 7 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 tests/misc.src/TEST_VAR_LENGTH.txt create mode 100644 tests/misc.src/variable-length-file.at diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java index a49f5b6f..46385377 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java @@ -192,7 +192,7 @@ public int open_(String filename, int mode, int sharing) throws IOException { } } - if(mode == COB_OPEN_OUTPUT) { + if (mode == COB_OPEN_OUTPUT) { this.fp.setLength(0); this.fp.seek(0); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java index d5e33800..86916d50 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolSequentialFile.java @@ -135,6 +135,8 @@ public int readNext(int readOpts) { } } int size = ByteBuffer.wrap(sbuff).getInt(); + size = Math.max(size, this.record_min); + size = Math.min(size, this.record_max); this.record.setSize(size); } diff --git a/tests/Makefile.am b/tests/Makefile.am index c9653eba..0006440a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -261,7 +261,8 @@ misc_DEPENDENCIES = \ misc.src/fix-subtract.at \ misc.src/display-numeric-NUMERIC-class.at \ misc.src/display-inspect-sign.at \ - misc.src/comp1-comp2.at + misc.src/comp1-comp2.at \ + misc.src/variable-length-file.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 9075bfd1..a37c42d2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -800,7 +800,8 @@ misc_DEPENDENCIES = \ misc.src/fix-subtract.at \ misc.src/display-numeric-NUMERIC-class.at \ misc.src/display-inspect-sign.at \ - misc.src/comp1-comp2.at + misc.src/comp1-comp2.at \ + misc.src/variable-length-file.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index c6a735ff..af958f71 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -56,3 +56,4 @@ m4_include([fix-subtract.at]) m4_include([display-numeric-NUMERIC-class.at]) m4_include([display-inspect-sign.at]) m4_include([comp1-comp2.at]) +m4_include([variable-length-file.at]) diff --git a/tests/misc.src/TEST_VAR_LENGTH.txt b/tests/misc.src/TEST_VAR_LENGTH.txt new file mode 100644 index 0000000000000000000000000000000000000000..8ab1827b43ce830fd90698f85eb82bbe7f3617d6 GIT binary patch literal 787 fcmZQzVCM7j@i9dP3dkH(DI^(%Q7{?;!!ZN^4r*qn literal 0 HcmV?d00001 diff --git a/tests/misc.src/variable-length-file.at b/tests/misc.src/variable-length-file.at new file mode 100644 index 00000000..9192fc1f --- /dev/null +++ b/tests/misc.src/variable-length-file.at @@ -0,0 +1,51 @@ +AT_SETUP([READING VARIABLE LENGTH FILE]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT TEST-FILE + ASSIGN TO "../../misc.src/TEST_VAR_LENGTH.txt". + DATA DIVISION. + FILE SECTION. + FD TEST-FILE. + 01 REC-1 PIC X(18). + 01 REC-2 PIC X(54). + PROCEDURE DIVISION. + MAIN-PARA. + MOVE SPACES TO REC-1 REC-2. + PERFORM OPEN-FILE. + PERFORM READ-REC. + PERFORM CLOSE-FILE. + STOP RUN. + + OPEN-FILE. + OPEN INPUT TEST-FILE. + + READ-REC. + DISPLAY "REC-1: " REC-1. + DISPLAY "REC-2: " REC-2. + READ TEST-FILE. + DISPLAY "REC-1: " REC-1. + DISPLAY "REC-2: " REC-2. + + CLOSE-FILE. + CLOSE TEST-FILE. +]) + +// Checking the number of bytes +AT_CHECK([od -N 4 -t x1 -An ../../misc.src/TEST_VAR_LENGTH.txt], [0], +[ 00 00 03 0e +]) + +AT_CHECK([${COMPILE} prog.cbl], [0]) +AT_CHECK([${RUN_MODULE} prog], [0], +[REC-1: @&t@ +REC-2: @&t@ +REC-1: LLL5555555555555 5 +REC-2: LLL5555555555555 555555555555L555555555555555555555555 +]) + +AT_CLEANUP \ No newline at end of file From 1c85e3d313e1a343c9ec89cb9ac72130f7711698 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Sep 2025 17:55:35 +0900 Subject: [PATCH 173/188] Add multiple file support to cobj-idx migrate and unlock commands with enhanced testing (#708) * Initial plan * Implement multiple file support for cobj-idx migrate and unlock commands Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> * Enhance migrate test with dynamic file verification using ASSIGN EXTERNAL Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> --- .../indexed_file/IndexedFileUtilMain.java | 54 +++++++++---------- libcobj/bin/cobj-idx | 5 +- tests/cobj-idx.src/migrate.at | 30 +++++++++-- tests/cobj-idx.src/unlock.at | 13 +++++ 4 files changed, 70 insertions(+), 32 deletions(-) diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index dd760163..0b9f7ad0 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -138,39 +138,37 @@ public static void main(String[] args) { System.exit(1); } } else if ("migrate".equals(subCommand)) { - if (unrecognizedArgs.length != 2) { - if (unrecognizedArgs.length < 2) { - System.err.println("error: no indexed file is specified."); - } else { - System.err.println("error: too many indexed files are specified."); - } + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); System.exit(1); } - String indexedFilePath = unrecognizedArgs[1]; - try { - migrateIndexedFile(indexedFilePath); - } catch (Exception e) { - System.err.println("error: " + e.getMessage()); - System.exit(1); + boolean hasError = false; + for (int i = 1; i < unrecognizedArgs.length; i++) { + String indexedFilePath = unrecognizedArgs[i]; + try { + migrateIndexedFile(indexedFilePath); + } catch (Exception e) { + System.err.println("error: " + e.getMessage()); + hasError = true; + } } - System.exit(0); + System.exit(hasError ? 1 : 0); } else if ("unlock".equals(subCommand)) { - if (unrecognizedArgs.length != 2) { - if (unrecognizedArgs.length < 2) { - System.err.println("error: no indexed file is specified."); - } else { - System.err.println("error: too many indexed files are specified."); - } + if (unrecognizedArgs.length < 2) { + System.err.println("error: no indexed file is specified."); System.exit(1); } - String indexedFilePath = unrecognizedArgs[1]; - try { - unlockIndexedFile(indexedFilePath); - } catch (Exception e) { - System.err.println("error: " + e.getMessage()); - System.exit(1); + boolean hasError = false; + for (int i = 1; i < unrecognizedArgs.length; i++) { + String indexedFilePath = unrecognizedArgs[i]; + try { + unlockIndexedFile(indexedFilePath); + } catch (Exception e) { + System.err.println("error: " + e.getMessage()); + hasError = true; + } } - System.exit(0); + System.exit(hasError ? 1 : 0); } else if ("load".equals(subCommand)) { if (unrecognizedArgs.length < 2 || unrecognizedArgs.length > 3) { if (unrecognizedArgs.length < 2) { @@ -260,12 +258,12 @@ private static void printHelpMessage() { " Write the records stored in the indexed file into the output file."); System.out.println(" The default format of the output data is SEQUENTIAL of COBOL."); System.out.println(); - System.out.println("cobj-idx migrate "); + System.out.println("cobj-idx migrate [...]"); System.out.println( " Migrate the indexed file whose version is older than 1.1.12 to the latest" + " version."); System.out.println(); - System.out.println("cobj-idx unlock "); + System.out.println("cobj-idx unlock [...]"); System.out.println(" Unlock all locks of the indexed file."); System.out.println(); System.out.println("Options:"); diff --git a/libcobj/bin/cobj-idx b/libcobj/bin/cobj-idx index 3cc8777b..1f05b658 100755 --- a/libcobj/bin/cobj-idx +++ b/libcobj/bin/cobj-idx @@ -1,3 +1,6 @@ #!/bin/bash -java jp.osscons.opensourcecobol.libcobj.user_util.indexed_file.IndexedFileUtilMain $@ \ No newline at end of file +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +LIBCOBJ_JAR="$SCRIPT_DIR/../app/build/libs/libcobj.jar" + +java -cp "$LIBCOBJ_JAR" jp.osscons.opensourcecobol.libcobj.user_util.indexed_file.IndexedFileUtilMain $@ \ No newline at end of file diff --git a/tests/cobj-idx.src/migrate.at b/tests/cobj-idx.src/migrate.at index bbf6ddff..175820df 100644 --- a/tests/cobj-idx.src/migrate.at +++ b/tests/cobj-idx.src/migrate.at @@ -7,7 +7,7 @@ AT_DATA([check_file.cbl], [ ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. - SELECT F ASSIGN TO "indexed_file.dat" + SELECT F ASSIGN TO INDEX_FILE_PATH ORGANIZATION IS INDEXED ACCESS MODE IS DYNAMIC RECORD KEY IS REC-KEY @@ -65,12 +65,36 @@ AT_CHECK([cp ../../cobj-idx.src/test-data/indexed_file.dat .]) AT_CHECK([${COBJ_IDX} migrate indexed_file.dat]) # check the converted file -AT_CHECK([${COMPILE} check_file.cbl]) -AT_CHECK([java check_file], [0], +AT_CHECK([${COMPILE} --assign_external check_file.cbl]) +AT_CHECK([INDEX_FILE_PATH=indexed_file.dat java check_file], [0], [AAAA1BBBB1CCCC1 AAAA2BBBB1CCCC1 00 AAAA1BBBB1CCCC1 AAAA3BBBB3CCCC3 ]) + +# Test migrate with multiple files +AT_CHECK([cp ../../cobj-idx.src/test-data/indexed_file.dat indexed_file2.dat]) +AT_CHECK([cp ../../cobj-idx.src/test-data/indexed_file.dat indexed_file3.dat]) +AT_CHECK([${COBJ_IDX} migrate indexed_file2.dat indexed_file3.dat]) + +# check that indexed_file2.dat works properly after migration +AT_CHECK([INDEX_FILE_PATH=indexed_file2.dat java check_file], [0], +[AAAA1BBBB1CCCC1 +AAAA2BBBB1CCCC1 +00 +AAAA1BBBB1CCCC1 +AAAA3BBBB3CCCC3 +]) + +# check that indexed_file3.dat works properly after migration +AT_CHECK([INDEX_FILE_PATH=indexed_file3.dat java check_file], [0], +[AAAA1BBBB1CCCC1 +AAAA2BBBB1CCCC1 +00 +AAAA1BBBB1CCCC1 +AAAA3BBBB3CCCC3 +]) + AT_CLEANUP \ No newline at end of file diff --git a/tests/cobj-idx.src/unlock.at b/tests/cobj-idx.src/unlock.at index 981e7c3e..bdc2ee77 100644 --- a/tests/cobj-idx.src/unlock.at +++ b/tests/cobj-idx.src/unlock.at @@ -170,4 +170,17 @@ AT_CHECK([java check_record_lock], [0], [00 ]) +# Test unlock with multiple files +AT_CHECK([rm -f indexed_file.dat indexed_file2.dat]) +# Create multiple locked files +AT_CHECK([java create_and_exit]) +AT_CHECK([cp indexed_file.dat indexed_file2.dat]) +AT_CHECK([java create_and_exit]) # This will leave indexed_file.dat locked +# Unlock multiple files +AT_CHECK([${COBJ_IDX} unlock indexed_file.dat indexed_file2.dat]) +# Check both files are unlocked +AT_CHECK([java check_file_lock], [0], +[00 +]) + AT_CLEANUP \ No newline at end of file From 755fa9840f7d2528094a13fce62237558ae13040 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Mon, 29 Sep 2025 14:20:55 +0900 Subject: [PATCH 174/188] Release 1.1.13 (#724) * chore: update the version number * doc: update documents * doc: fix NEWS slightly --- CHANGELOG.md | 10 +++++++ ChangeLog | 4 +++ NEWS | 15 +++++++++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 14 +++++----- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 82 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb4146f4..0f2cfd9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.13] - 2025-09-29 + +### Fixed + +* Fix file locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE file types. (#714) +* Fix reading process for variable length SEQUENTIAL files. (#722) + +## Miscellaneous + +* `cobj-idx unlock` and `cobj-idx migrate` can handle multiple files at once. (#708) ## [1.1.12] - 2025-08-28 diff --git a/ChangeLog b/ChangeLog index bae45e82..c25f3c4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-09-29 OSS Consortium + + * opensource COBOL 4J v1.1.13 released. + 2025-08-28 OSS Consortium * opensource COBOL 4J v1.1.12 released. diff --git a/NEWS b/NEWS index 7799ce77..787bf422 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,20 @@ NEWS - user visible changes -*- outline -*- +----------------------------------------------------------------------- + +* opensource COBOL 4J 1.1.13 + +** Bug Fixes + +(1) Fix file locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE file types. +(2) Fix reading process for variable length SEQUENTIAL files. + +** Miscellaneous + +(1) `cobj-idx unlock` and `cobj-idx migrate` can handle multiple files at once. + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.1.12 ** New Features diff --git a/README.md b/README.md index 0ff5e4ef..8bffeb28 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz -tar zxvf opensourcecobol4j-v1.1.12.tar.gz -cd opensourcecobol4j-1.1.12 +curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz +tar zxvf opensourcecobol4j-v1.1.13.tar.gz +cd opensourcecobol4j-1.1.13 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz -tar zxvf opensourcecobol4j-v1.1.12.tar.gz -cd opensourcecobol4j-1.1.12 +curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz +tar zxvf opensourcecobol4j-v1.1.13.tar.gz +cd opensourcecobol4j-1.1.13 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250828 +docker pull opensourcecobol/opensourcecobol4j:20250929 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 20a535f0..07717afb 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz -tar zxvf opensourcecobol4j-v1.1.12.tar.gz -cd opensourcecobol4j-1.1.12 +curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz +tar zxvf opensourcecobol4j-v1.1.13.tar.gz +cd opensourcecobol4j-1.1.13 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.12.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.12.tar.gz -tar zxvf opensourcecobol4j-v1.1.12.tar.gz -cd opensourcecobol4j-1.1.12 +curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz +tar zxvf opensourcecobol4j-v1.1.13.tar.gz +cd opensourcecobol4j-1.1.13 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250828 +docker pull opensourcecobol/opensourcecobol4j:20250929 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index c94b89c7..f7ac4e16 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,8 +1,8 @@ -### Add +### Fixed -* Implemented new file locking and record locking for INDEXED files. -* Add a new sub command `migrate` for `cobj-idx`. - * With this command, you can convert an old version of an INDEXED file to a new version compatible with the latest opensource COBOL 4J. -* Add a new sub command `unlock` for `cobj-idx`. - * With this command, you can unlock all record locks and file locks on an INDEXED file. -* Add documentation of locking for INDEXED files. +* Fix file locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE file types. (#714) +* Fix reading process for variable length SEQUENTIAL files. (#722) + +## Miscellaneous + +* `cobj-idx unlock` and `cobj-idx migrate` can handle multiple files at once. (#708) \ No newline at end of file diff --git a/configure b/configure index ff5d3f09..2d6b4e36 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.12. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.13. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.12' -PACKAGE_VERSION='1.1.12' -PACKAGE_STRING='opensource COBOL 4J 1.1.12' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.13' +PACKAGE_VERSION='1.1.13' +PACKAGE_STRING='opensource COBOL 4J 1.1.13' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.12 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.12] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.13] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.12:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.13:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.12 +opensource COBOL 4J configure 1.1.13 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.12, which was +It was created by opensource COBOL 4J $as_me 1.1.13, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.12' - VERSION='1.1.12' + PACKAGE='opensource-cobol-4j-1.1.13' + VERSION='1.1.13' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.12, which was +This file was extended by opensource COBOL 4J $as_me 1.1.13, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.12 +opensource COBOL 4J config.status 1.1.13 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 73d87449..14d401f3 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.12],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.12]) +AC_INIT([opensource COBOL 4J],[1.1.13],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.13]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 3deb09bd..24cba2d4 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.13 | Windows | 21 | +| 1.1.13 | Ubuntu 24.04 | 21 | +| 1.1.13 | AlmaLinux 9 | 11 | +| 1.1.13 | Amazon Linux 2023 | 21 | | 1.1.12 | Windows | 21 | | 1.1.12 | Ubuntu 24.04 | 21 | | 1.1.12 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index d1003063..8e133a4d 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.12" + version = "1.1.13" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index e7cd01b9..436b8e87 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.12"; + public static final String version = "1.1.13"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 83b2b596..c138aeac 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.12"); + System.out.println("1.1.13"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 29cb3a3c..005d7029 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -29,7 +29,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.12", + "opensourcecobol4j_version": "1.1.13", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -50,7 +50,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.12", + "opensourcecobol4j_version": "1.1.13", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -69,7 +69,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.12", + "opensourcecobol4j_version": "1.1.13", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -90,7 +90,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.12", + "opensourcecobol4j_version": "1.1.13", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index dd603d25..e49ee4bf 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.12]) -m4_define([AT_PACKAGE_VERSION], [1.1.12]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.12]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.13]) +m4_define([AT_PACKAGE_VERSION], [1.1.13]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.13]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index 03dd19ba..bf933811 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.12" +#define PACKAGE "opensource-cobol4j-1.1.13" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.12" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.13" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.12" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.13" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.12" +#define PACKAGE_VERSION "1.1.13" /* Define a patch level */ #define PATCH_LEVEL 0 From b211b08c5316b1671a8115224370652ee6cac7d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 09:02:38 +0900 Subject: [PATCH 175/188] Build(deps): Bump gradle/actions from 4 to 5 (#726) Bumps [gradle/actions](https://github.com/gradle/actions) from 4 to 5. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](https://github.com/gradle/actions/compare/v4...v5) --- updated-dependencies: - dependency-name: gradle/actions dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/windows-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48a01f57..29c58d99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: uses: actions/checkout@v5 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@v5 with: gradle-version: wrapper diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 8cec9681..750dcb97 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -30,7 +30,7 @@ jobs: run: nuget restore ./win/ - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@v5 with: gradle-version: wrapper From 7ea264b01be92f29e5f5b6168aedc9f25aac600f Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 24 Oct 2025 09:53:14 +0900 Subject: [PATCH 176/188] Improve Java code output for string literals concatenated with '&' (#731) * feat: improve output strings concatenated with & * fix: Minor bug fix * fix: Minor bug fix * fix: bugfix for memory access error * fix: remove unneccessary code * style: minor refactoring * test add a test * test: add a test * style: format * test: minor fix for added test * refactor: minor refactor for handling &-concatinated strings * fix: fix warning of a test script for &-concatenated strings * refactor: minor refactoring for &-concatenated strings * refactor: minor refactoring for &-concatenated strings --- cobj/codegen.c | 59 ++++++++++++++++++++++--- cobj/tree.c | 56 ++++++++++++++++++++++- cobj/tree.h | 20 +++++++++ tests/Makefile.am | 3 +- tests/Makefile.in | 3 +- tests/misc.at | 1 + tests/misc.src/convert-string-concat.at | 40 +++++++++++++++++ 7 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 tests/misc.src/convert-string-concat.at diff --git a/cobj/codegen.c b/cobj/codegen.c index f0242a74..8770cc13 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -79,6 +79,8 @@ static const char *excp_current_program_id = NULL; static const char *excp_current_section = NULL; static const char *excp_current_paragraph = NULL; static struct cb_program *current_prog; +static size_t *sgmt_sizes = NULL; +static size_t sgmt_count = 0; extern int cb_default_byte_specified; extern unsigned char cb_default_byte; @@ -463,6 +465,7 @@ struct string_literal_cache { enum cb_string_category category; char *var_name; struct string_literal_cache *next; + size_t *segment_sizes; /* segment sizes for strings concatenated with '&' */ }; int string_literal_id = 0; @@ -531,7 +534,8 @@ static enum cb_string_category get_string_category(const unsigned char *s, } static void joutput_string_write(const unsigned char *s, int size, - enum cb_string_category category) { + enum cb_string_category category, + const size_t *tmp_sgmt_sizes) { int i; #ifdef I18N_UTF8 @@ -552,7 +556,11 @@ static void joutput_string_write(const unsigned char *s, int size, } else { joutput("CobolUtil.stringToBytes("); } - + if (tmp_sgmt_sizes) { + joutput_indent_level += 2; + joutput_newline(); + joutput_prefix(); + } joutput("\""); #ifdef I18N_UTF8 @@ -568,6 +576,8 @@ static void joutput_string_write(const unsigned char *s, int size, } #else int output_multibyte = 0; + int sum_sgmt_size = 0; + int sgmt_index = 0; for (i = 0; i < size; i++) { int c = s[i]; if (!output_multibyte && (c == '\"' || c == '\\')) { @@ -577,11 +587,33 @@ static void joutput_string_write(const unsigned char *s, int size, } else { joutput("%c", c); } + + // insert line breaks between segments concatenated with '&' + if (tmp_sgmt_sizes && i < size - 1) { + size_t segment_end_position = + sum_sgmt_size + tmp_sgmt_sizes[sgmt_index] - 1; + if (i == segment_end_position) { + joutput("\" + "); + joutput_newline(); + joutput_prefix(); + joutput("\""); + sum_sgmt_size += tmp_sgmt_sizes[sgmt_index]; + sgmt_index++; + } + } output_multibyte = !output_multibyte && ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)); } #endif - joutput("\")"); + if (tmp_sgmt_sizes) { + joutput("\""); + joutput_newline(); + joutput_indent_level -= 2; + joutput_prefix(); + joutput(")"); + } else { + joutput("\")"); + } } else { if (param_wrap_string_flag) { joutput("CobolDataStorage.makeCobolDataStorage("); @@ -631,6 +663,16 @@ static void joutput_string(const unsigned char *s, int size) { new_literal_cache->var_name[var_name_length + 1 + i] = '\0'; } + // set segment sizes to new cache + if (sgmt_sizes) { + new_literal_cache->segment_sizes = cobc_malloc(sizeof(size_t) * sgmt_count); + memcpy(new_literal_cache->segment_sizes, sgmt_sizes, + sizeof(size_t) * sgmt_count); + sgmt_sizes = NULL; + } else { + new_literal_cache->segment_sizes = NULL; + } + // add the new cache to string_literal_list new_literal_cache->next = string_literal_list; string_literal_list = new_literal_cache; @@ -658,7 +700,8 @@ static void joutput_all_string_literals() { joutput_prefix(); joutput("public static final %s %s = ", data_type, l->var_name); param_wrap_string_flag = l->param_wrap_string_flag; - joutput_string_write(l->string_value, l->size, l->category); + joutput_string_write(l->string_value, l->size, l->category, + l->segment_sizes); joutput(";\n"); l = l->next; } @@ -2280,6 +2323,13 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { /* Initialize by value */ if (p->val && f->values) { cb_tree value = CB_VALUE(f->values); + struct cb_literal *l = CB_LITERAL_P(value) ? CB_LITERAL(value) : NULL; + // save the size information of '&' concatenated segments + if (l && l->segment_count > 0) { + sgmt_sizes = cobc_malloc(sizeof(size_t) * l->segment_count); + memcpy(sgmt_sizes, l->segment_sizes, sizeof(size_t) * l->segment_count); + sgmt_count = l->segment_count; + } /* NATIONAL also needs no editing but mbchar conversion. */ if (CB_TREE_CATEGORY(x) == CB_CATEGORY_NATIONAL) { @@ -2340,7 +2390,6 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { /* We do not use joutput_move here because we do not want to have the value be edited. */ - struct cb_literal *l = CB_LITERAL(value); static char *buff = NULL; static int lastsize = 0; if (!buff) { diff --git a/cobj/tree.c b/cobj/tree.c index 3bd85e75..d0462bb3 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -455,6 +455,31 @@ struct cb_literal *build_literal(enum cb_category category, return p; } +struct cb_literal *build_concat_literal(enum cb_category category, + const unsigned char *data, size_t size1, + size_t size2, size_t *sgmt_sizes, + size_t sgmt_count) { + struct cb_literal *p; + size_t size = size1 + size2; + p = make_tree(CB_TAG_LITERAL, category, sizeof(struct cb_literal)); + p->data = cobc_malloc((size_t)(size + 1)); + p->size = size; + memcpy(p->data, data, (size_t)size); + + // set segment sizes + if (!sgmt_sizes) { + p->segment_sizes = cobc_malloc(sizeof(size_t) * 2); + p->segment_sizes[0] = size1; + } else { + p->segment_sizes = cobc_malloc(sizeof(size_t) * (sgmt_count + 1)); + memcpy(p->segment_sizes, sgmt_sizes, sizeof(size_t) * sgmt_count); + } + p->segment_sizes[sgmt_count] = size2; + p->segment_count = sgmt_count + 1; + + return p; +} + char *cb_name(cb_tree x) { if (!treenamebuff) { treenamebuff = cobc_malloc(COB_NORMAL_BUFF); @@ -1030,6 +1055,22 @@ cb_tree cb_build_national_literal(const unsigned char *data, size_t size) { return CB_TREE(build_literal(CB_CATEGORY_NATIONAL, data, size)); } +cb_tree cb_build_concat_alphanumeric_literal(const unsigned char *data, + size_t size1, size_t size2, + size_t *sgmt_sizes, + size_t sgmt_count) { + return CB_TREE(build_concat_literal(CB_CATEGORY_ALPHANUMERIC, data, size1, + size2, sgmt_sizes, sgmt_count)); +} + +cb_tree cb_build_concat_national_literal(const unsigned char *data, + size_t size1, size_t size2, + size_t *sgmt_sizes, + size_t sgmt_count) { + return CB_TREE(build_concat_literal(CB_CATEGORY_NATIONAL, data, size1, size2, + sgmt_sizes, sgmt_count)); +} + cb_tree cb_concat_literals(cb_tree x1, cb_tree x2) { unsigned char *buff; cb_tree x; @@ -1037,14 +1078,17 @@ cb_tree cb_concat_literals(cb_tree x1, cb_tree x2) { unsigned char *data2; size_t size1; size_t size2; + struct cb_literal *l; if (x1 == cb_error_node || x2 == cb_error_node) { return cb_error_node; } if (CB_LITERAL_P(x1)) { + l = CB_LITERAL(x1); data1 = CB_LITERAL(x1)->data; size1 = CB_LITERAL(x1)->size; } else if (CB_CONST_P(x1)) { + l = CB_LITERAL(x1); size1 = 1; if (x1 == cb_space) { data1 = (unsigned char *)" "; @@ -1090,8 +1134,18 @@ cb_tree cb_concat_literals(cb_tree x1, cb_tree x2) { buff = cobc_malloc(size1 + size2 + 3); memcpy(buff, data1, size1); memcpy(buff + size1, data2, size2); - x = cb_build_alphanumeric_literal(buff, size1 + size2); + if (!l->segment_count) { + l->segment_count = 1; + } + if (x1->category == CB_CATEGORY_NATIONAL) { + x = cb_build_concat_national_literal(buff, size1, size2, l->segment_sizes, + l->segment_count); + } else { + x = cb_build_concat_alphanumeric_literal( + buff, size1, size2, l->segment_sizes, l->segment_count); + } free(buff); + return x; } diff --git a/cobj/tree.h b/cobj/tree.h index 167c76b7..c652cd63 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -467,9 +467,17 @@ extern cb_tree cb_build_system_name(enum cb_system_name_category category, * Literal */ +struct cb_literal_segment { + size_t size; + unsigned char *data; + struct cb_literal_segment *next; +}; + struct cb_literal { struct cb_tree_common common; size_t size; + size_t *segment_sizes; /* segment sizes for strings concatenated with '&' */ + size_t segment_count; unsigned char *data; signed char all; signed char sign; /* unsigned: 0 negative: -1 positive: 1 */ @@ -489,6 +497,14 @@ extern cb_tree cb_build_alphanumeric_literal(const unsigned char *data, extern cb_tree cb_build_national_literal(const unsigned char *data, size_t size); extern cb_tree cb_concat_literals(cb_tree x1, cb_tree x2); +extern cb_tree cb_build_concat_alphanumeric_literal(const unsigned char *data, + size_t size1, size_t size2, + size_t *sgmt_sizes, + size_t sgmt_count); +extern cb_tree cb_build_concat_national_literal(const unsigned char *data, + size_t size1, size_t size2, + size_t *sgmt_sizes, + size_t sgmt_count); /* * Decimal @@ -1438,6 +1454,10 @@ extern void level_except_error(cb_tree x, const char *clause); struct cb_literal *build_literal(enum cb_category category, const unsigned char *data, size_t size); +struct cb_literal *build_concat_literal(enum cb_category category, + const unsigned char *data, size_t size1, + size_t size2, size_t *sgmt_sizes, + size_t sgmt_count); /* field.c */ extern size_t cb_needs_01; diff --git a/tests/Makefile.am b/tests/Makefile.am index 0006440a..9e3053e1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -262,7 +262,8 @@ misc_DEPENDENCIES = \ misc.src/display-numeric-NUMERIC-class.at \ misc.src/display-inspect-sign.at \ misc.src/comp1-comp2.at \ - misc.src/variable-length-file.at + misc.src/variable-length-file.at \ + misc.src/convert-string-concat.at \ EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a37c42d2..fc0413a9 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -801,7 +801,8 @@ misc_DEPENDENCIES = \ misc.src/display-numeric-NUMERIC-class.at \ misc.src/display-inspect-sign.at \ misc.src/comp1-comp2.at \ - misc.src/variable-length-file.at + misc.src/variable-length-file.at \ + misc.src/convert-string-concat.at \ EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/misc.at b/tests/misc.at index af958f71..1db81ab4 100644 --- a/tests/misc.at +++ b/tests/misc.at @@ -57,3 +57,4 @@ m4_include([display-numeric-NUMERIC-class.at]) m4_include([display-inspect-sign.at]) m4_include([comp1-comp2.at]) m4_include([variable-length-file.at]) +m4_include([convert-string-concat.at]) diff --git a/tests/misc.src/convert-string-concat.at b/tests/misc.src/convert-string-concat.at new file mode 100644 index 00000000..44926293 --- /dev/null +++ b/tests/misc.src/convert-string-concat.at @@ -0,0 +1,40 @@ +AT_SETUP([convert '&' concatenated strings to Java]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X-CONCAT PIC X(25) VALUE "abcde" + & "fghij" + & "klmno" + & "pqrst" + & "uvwxy". + 01 N-CONCAT PIC N(25) VALUE "" + & "" + & "" + & "‚Ă" + & "Ȃɂʂ˂". + PROCEDURE DIVISION. + MAIN-RTN. + DISPLAY X-CONCAT. + DISPLAY N-CONCAT. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([java prog], [0], +[abcdefghijklmnopqrstuvwxy +‚ĂƂȂɂʂ˂ +]) +AT_CHECK([grep -q ' "abcde" +' prog.java]) +AT_CHECK([grep -q ' "fghij" +' prog.java]) +AT_CHECK([grep -q ' "klmno" +' prog.java]) +AT_CHECK([grep -q ' "pqrst" +' prog.java]) +AT_CHECK([grep -q ' "uvwxy"' prog.java]) +AT_CHECK([grep -q ' "" +' prog.java]) +AT_CHECK([grep -q ' "" +' prog.java]) +AT_CHECK([grep -q ' "" +' prog.java]) +AT_CHECK([grep -q ' "‚Ă" +' prog.java]) +AT_CHECK([grep -q ' "Ȃɂʂ˂"' prog.java]) +AT_CLEANUP From e398e2b085477f57bbb768716a8ce597fc3a097b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:44:43 +0900 Subject: [PATCH 177/188] Build(deps): Bump com.github.spotbugs from 6.4.2 to 6.4.4 in /libcobj (#729) Bumps com.github.spotbugs from 6.4.2 to 6.4.4. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.4.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 8e133a4d..c22244ea 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.4.2" + id("com.github.spotbugs") version "6.4.4" } repositories { From 682fbd68d752e2ea00794f8f030fd43ecc76d45a Mon Sep 17 00:00:00 2001 From: Kio Watanabe <111848844+kio-watanabe@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:56:33 +0900 Subject: [PATCH 178/188] build: update target Windows SDK to latest version (#732) --- .github/workflows/windows-build.yml | 2 +- .github/workflows/windows-test.yml | 2 +- win/cobj/cobj.vcxproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 750dcb97..32e5fd45 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -13,7 +13,7 @@ permissions: jobs: build: - runs-on: windows-2022 + runs-on: windows-latest steps: - uses: actions/setup-java@v5 with: diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 3e4ce48c..6ece70d5 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -9,7 +9,7 @@ on: jobs: test: - runs-on: windows-2022 + runs-on: windows-latest steps: - uses: actions/checkout@v5 diff --git a/win/cobj/cobj.vcxproj b/win/cobj/cobj.vcxproj index c74ea73b..2e1d9ef6 100644 --- a/win/cobj/cobj.vcxproj +++ b/win/cobj/cobj.vcxproj @@ -10,7 +10,7 @@ {d69ade50-ab78-4311-95a7-a9676e9bac36} Win32Proj cobj - 10.0.22621.0 + 10.0 10.0.17134.0 From 1f1d835aa789c82273ed47a327f51f3da63877be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 09:03:38 +0900 Subject: [PATCH 179/188] Build(deps): Bump actions/download-artifact from 5 to 6 (#733) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/create-release.yml | 4 ++-- .github/workflows/test-cobj-api.yml | 2 +- .github/workflows/test-nist.yml | 2 +- .github/workflows/test-other.yml | 2 +- .github/workflows/windows-test.yml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index d101109c..9d335524 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -30,12 +30,12 @@ jobs: run: gh release create ${{ github.ref }} -F ReleaseNote.md - name: Download cobj.exe - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: cobj.exe - name: Download libcobj.jar - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: libcobj.jar diff --git a/.github/workflows/test-cobj-api.yml b/.github/workflows/test-cobj-api.yml index 15deb982..a5a62cc7 100644 --- a/.github/workflows/test-cobj-api.yml +++ b/.github/workflows/test-cobj-api.yml @@ -26,7 +26,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index ac29b4d5..87322f9e 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -32,7 +32,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index 4fa88bd8..a75fcd99 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -29,7 +29,7 @@ jobs: - name: Get the artifact name run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 6ece70d5..41435157 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -15,13 +15,13 @@ jobs: - uses: actions/checkout@v5 - name: Download libcobj.jar - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: libcobj.jar path: libcobj/app/build/libs/ - name: Download cobj.exe - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: cobj.exe path: win/x64/Release/ From 649974246b2cefb192efccabf13b824e53b8e94c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 09:04:00 +0900 Subject: [PATCH 180/188] Build(deps): Bump actions/upload-artifact from 4 to 5 (#734) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/test-other.yml | 2 +- .github/workflows/windows-build.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29c58d99..af812483 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,7 @@ jobs: mv opensourcecobol4j.tar.gz opensourcecobol4j - name: Upload an artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} path: opensourcecobol4j.tar.gz \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4655cdde..fc0c0462 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -59,7 +59,7 @@ jobs: cp ./*.html coverage-report - name: Archive a coverage report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: code-coverage-report path: cobj/coverage-report/ \ No newline at end of file diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index a75fcd99..646d2eaa 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -80,7 +80,7 @@ jobs: - name: Upload log files if tests fail if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: ${{ inputs.test-name }}-${{ env.ARTIFACT_NAME }}-log path: tests/${{ inputs.test-name }}.dir/ diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 32e5fd45..4710ad40 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -43,14 +43,14 @@ jobs: - name: Upload libcobj.jar if: ${{inputs.upload-artifacts}} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: libcobj.jar path: libcobj/app/build/libs/libcobj.jar - name: Upload cobj.exe if: ${{inputs.upload-artifacts}} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: cobj.exe path: win/x64/Release/cobj.exe \ No newline at end of file From a20956e6e4204992c84f72bc7bc54d4258db630f Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:14:58 +0900 Subject: [PATCH 181/188] Fix program status (#735) * fix: PRGRAM-STATUS * test: fix the test of COB_DATE func * refactor: simplify codegen.c --- cobj/codegen.c | 21 ++++++++++++++++----- tests/jp-compat.src/job-date.at | 2 +- tests/jp-compat.src/spl-registers.at | 1 - 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index 8770cc13..cb220af8 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -5544,11 +5544,12 @@ static void joutput_declare_member_variables(struct cb_program *prog, prevprog = blp->curr_prog; joutput_prefix(); joutput("/* PROGRAM-ID : %s */\n", prevprog); - joutput_prefix(); - joutput("private CobolDataStorage %s;", base_name, blp->f->memory_size); + } + joutput_prefix(); + if (strcmp(blp->f->name, "RETURN-CODE") == 0) { + joutput("public CobolDataStorage %s;", base_name); } else { - joutput_prefix(); - joutput("private CobolDataStorage %s;", base_name, blp->f->memory_size); + joutput("private CobolDataStorage %s;", base_name); } free(base_name); joutput("\t/* %s */\n", blp->f->name); @@ -6237,8 +6238,18 @@ void codegen(struct cb_program *prog, const int nested, char **program_id_list, //} joutput_line("CobolDecimal.cobInitNumeric();"); - joutput_line("new %s().%s_(0);", prog->program_id, prog->program_id); + if (cb_enable_program_status_register) { + joutput_line("%s $module$ = new %s();", prog->program_id, prog->program_id); + joutput_line("$module$.%s_(0);", prog->program_id); + } else { + joutput_line("new %s().%s_(0);", prog->program_id, prog->program_id); + } joutput_line("CobolStopRunException.stopRun();"); + + if (cb_enable_program_status_register) { + joutput_line("System.exit($module$.b_RETURN_CODE.intValue());"); + } + joutput_indent_level -= 2; joutput_line("}\n"); diff --git a/tests/jp-compat.src/job-date.at b/tests/jp-compat.src/job-date.at index a0f2026d..bf5a69c7 100644 --- a/tests/jp-compat.src/job-date.at +++ b/tests/jp-compat.src/job-date.at @@ -240,7 +240,7 @@ AT_DATA([prog.cob], [ ]) AT_CHECK([${COMPILE_JP_COMPAT} prog.cob]) -AT_CHECK([COB_DATE=`date +%Y/%m/%d` java prog], [0], [0 +AT_CHECK([COB_DATE=`date +%Y/%m/%d` java prog || true], [0], [0 ]) AT_CLEANUP diff --git a/tests/jp-compat.src/spl-registers.at b/tests/jp-compat.src/spl-registers.at index 27327097..602ba436 100644 --- a/tests/jp-compat.src/spl-registers.at +++ b/tests/jp-compat.src/spl-registers.at @@ -1,5 +1,4 @@ AT_SETUP([PROGRAM-STATUS]) -AT_CHECK([${SKIP_TEST}]) AT_DATA([prog.cob], [ IDENTIFICATION DIVISION. From 9a0c4c7ccbb611d03262cf29c8fea6c185c69706 Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Fri, 31 Oct 2025 15:39:41 +0900 Subject: [PATCH 182/188] Release 1.1.14 (#736) * update version 1.13 -> 1.14 * doc: update documents --- CHANGELOG.md | 10 +++++++ ChangeLog | 4 +++ NEWS | 15 +++++++++++ README.md | 14 +++++----- README_JP.md | 14 +++++----- ReleaseNote.md | 12 ++++----- configure | 26 +++++++++---------- configure.ac | 2 +- doc/requirements-all.md | 4 +++ libcobj/app/build.gradle.kts | 2 +- .../opensourcecobol/libcobj/Const.java | 2 +- .../user_util/cobj_api/ApiFilesOptions.java | 2 +- .../command-line-options.src/info-java-dir.at | 8 +++--- tests/package.m4 | 6 ++--- win/config.h | 8 +++--- 15 files changed, 81 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f2cfd9e..e0e6b048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.14] - 2025-10-31 +### Improved +* `cobj` now preserves string concatenation structure in the generated Java code. (#731) + +### Fixed +* Fix the implementation of `PROGRAM STATUS`. (#735) + +### Miscellaneous +* For Windows support, tests are now run on Windows Server 2025. (#732) + ## [1.1.13] - 2025-09-29 ### Fixed diff --git a/ChangeLog b/ChangeLog index c25f3c4b..5878a795 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2025-10-31 OSS Consortium + + * opensource COBOL 4J v1.1.14 released. + 2025-09-29 OSS Consortium * opensource COBOL 4J v1.1.13 released. diff --git a/NEWS b/NEWS index 787bf422..b2891f43 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,20 @@ NEWS - user visible changes -*- outline -*- +* opensource COBOL 4J 1.1.14 + +** Improvement +(1) `cobj` now preserves string concatenation structure in the generated Java code. + +** Bug Fixes + +(1) Fix the implementation of `PROGRAM STATUS`. + +** Miscellaneous + +(1) For Windows support, tests are now run on Windows Server 2025. + +----------------------------------------------------------------------- + ----------------------------------------------------------------------- * opensource COBOL 4J 1.1.13 diff --git a/README.md b/README.md index 8bffeb28..35cd8499 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz -tar zxvf opensourcecobol4j-v1.1.13.tar.gz -cd opensourcecobol4j-1.1.13 +curl -L -o opensourcecobol4j-v1.1.14.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.14.tar.gz +tar zxvf opensourcecobol4j-v1.1.14.tar.gz +cd opensourcecobol4j-1.1.14 ./configure --prefix=/usr/ make sudo make install @@ -63,9 +63,9 @@ sudo make install In order to install a compiler for UTF-8 encoded COBOL source code, run the following commands. ``` -curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz -tar zxvf opensourcecobol4j-v1.1.13.tar.gz -cd opensourcecobol4j-1.1.13 +curl -L -o opensourcecobol4j-v1.1.14.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.14.tar.gz +tar zxvf opensourcecobol4j-v1.1.14.tar.gz +cd opensourcecobol4j-1.1.14 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -137,7 +137,7 @@ https://www.oracle.com/java/technologies/downloads/?er=221886#java8-windows The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:20250929 +docker pull opensourcecobol/opensourcecobol4j:20251031 ``` Execute the following commands in order to run the "Hello World" COBOL program. diff --git a/README_JP.md b/README_JP.md index 07717afb..4cea69bd 100644 --- a/README_JP.md +++ b/README_JP.md @@ -46,9 +46,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### opensource COBOL 4Jのインストール ``` -curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz -tar zxvf opensourcecobol4j-v1.1.13.tar.gz -cd opensourcecobol4j-1.1.13 +curl -L -o opensourcecobol4j-v1.1.14.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.14.tar.gz +tar zxvf opensourcecobol4j-v1.1.14.tar.gz +cd opensourcecobol4j-1.1.14 ./configure --prefix=/usr/ make sudo make install @@ -57,9 +57,9 @@ sudo make install UTF-8のCOBOLソースコード対応版コンパイラをインストールする場合は、下記のコマンドを実行する。 ``` -curl -L -o opensourcecobol4j-v1.1.13.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.13.tar.gz -tar zxvf opensourcecobol4j-v1.1.13.tar.gz -cd opensourcecobol4j-1.1.13 +curl -L -o opensourcecobol4j-v1.1.14.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.14.tar.gz +tar zxvf opensourcecobol4j-v1.1.14.tar.gz +cd opensourcecobol4j-1.1.14 ./configure --prefix=/usr/ --enable-utf8 touch cobj/*.m4 make @@ -126,7 +126,7 @@ Windows版のopensource COBOL 4JはVisual Studioに含まれるCLコンパイラ opensource COBOL 4JのDockerコンテナを利用できます。 ```bash -docker pull opensourcecobol/opensourcecobol4j:20250929 +docker pull opensourcecobol/opensourcecobol4j:20251031 ``` 以下のコマンドを実行して、"Hello World"のCOBOLプログラムを実行します。 diff --git a/ReleaseNote.md b/ReleaseNote.md index f7ac4e16..ac034cb0 100644 --- a/ReleaseNote.md +++ b/ReleaseNote.md @@ -1,8 +1,8 @@ -### Fixed - -* Fix file locking of SEQUENTIAL, LINE SEQUENTIAL and RELATIVE file types. (#714) -* Fix reading process for variable length SEQUENTIAL files. (#722) +### Improved +* `cobj` now preserves string concatenation structure in the generated Java code. (#731) -## Miscellaneous +### Fixed +* Fix the implementation of `PROGRAM STATUS`. (#735) -* `cobj-idx unlock` and `cobj-idx migrate` can handle multiple files at once. (#708) \ No newline at end of file +### Miscellaneous +* For Windows support, tests are now run on Windows Server 2025. (#732) diff --git a/configure b/configure index 2d6b4e36..6e97ce2b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.13. +# Generated by GNU Autoconf 2.69 for opensource COBOL 4J 1.1.14. # # Report bugs to . # @@ -589,9 +589,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.1.13' -PACKAGE_VERSION='1.1.13' -PACKAGE_STRING='opensource COBOL 4J 1.1.13' +PACKAGE_TARNAME='opensource-cobol-4j-1.1.14' +PACKAGE_VERSION='1.1.14' +PACKAGE_STRING='opensource COBOL 4J 1.1.14' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.1.13 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.1.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.1.13] + [DATAROOTDIR/doc/opensource-cobol-4j-1.1.14] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1454,7 +1454,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.13:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.1.14:";; esac cat <<\_ACEOF @@ -1581,7 +1581,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.1.13 +opensource COBOL 4J configure 1.1.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2133,7 +2133,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.1.13, which was +It was created by opensource COBOL 4J $as_me 1.1.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3024,8 +3024,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.1.13' - VERSION='1.1.13' + PACKAGE='opensource-cobol-4j-1.1.14' + VERSION='1.1.14' cat >>confdefs.h <<_ACEOF @@ -23446,7 +23446,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.1.13, which was +This file was extended by opensource COBOL 4J $as_me 1.1.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23512,7 +23512,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -opensource COBOL 4J config.status 1.1.13 +opensource COBOL 4J config.status 1.1.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 14d401f3..34b7526f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.1.13],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.13]) +AC_INIT([opensource COBOL 4J],[1.1.14],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.1.14]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 24cba2d4..4bd25f6d 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,9 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.1.14 | Windows | 21 | +| 1.1.14 | Ubuntu 24.04 | 21 | +| 1.1.14 | AlmaLinux 9 | 11 | +| 1.1.14 | Amazon Linux 2023 | 21 | | 1.1.13 | Windows | 21 | | 1.1.13 | Ubuntu 24.04 | 21 | | 1.1.13 | AlmaLinux 9 | 11 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index c22244ea..40fe55cf 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -80,7 +80,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.1.13" + version = "1.1.14" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index 436b8e87..2fbeb377 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -23,5 +23,5 @@ public class Const { /** TODO: 準備中 */ - public static final String version = "1.1.13"; + public static final String version = "1.1.14"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index c138aeac..5e352e56 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -46,7 +46,7 @@ static void getOptions(String[] args) { System.exit(0); break; case "v": - System.out.println("1.1.13"); + System.out.println("1.1.14"); System.exit(0); break; case "java-package": diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 005d7029..a4cdd7c8 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -29,7 +29,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.13", + "opensourcecobol4j_version": "1.1.14", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -50,7 +50,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.13", + "opensourcecobol4j_version": "1.1.14", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -69,7 +69,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.1.13", + "opensourcecobol4j_version": "1.1.14", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -90,7 +90,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.1.13", + "opensourcecobol4j_version": "1.1.14", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index e49ee4bf..e4e96494 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.13]) -m4_define([AT_PACKAGE_VERSION], [1.1.13]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.13]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.1.14]) +m4_define([AT_PACKAGE_VERSION], [1.1.14]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.1.14]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/win/config.h b/win/config.h index bf933811..fb43990b 100644 --- a/win/config.h +++ b/win/config.h @@ -299,7 +299,7 @@ #define ICONV_CONST /* Name of package */ -#define PACKAGE "opensource-cobol4j-1.1.13" +#define PACKAGE "opensource-cobol4j-1.1.14" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "ws-opensource-cobol-contact@osscons.jp" @@ -308,13 +308,13 @@ #define PACKAGE_NAME "opensource COBOL 4J" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensource COBOL 4J 1.1.13" +#define PACKAGE_STRING "opensource COBOL 4J 1.1.14" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "opensource-cobol4j-1.1.13" +#define PACKAGE_TARNAME "opensource-cobol4j-1.1.14" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.13" +#define PACKAGE_VERSION "1.1.14" /* Define a patch level */ #define PATCH_LEVEL 0 From 9487422665429b6c90de909d1c6e243c808cb04d Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:53:19 +0900 Subject: [PATCH 183/188] fix: remove an extra backslash in tests/Makefile.am (#737) --- tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 9e3053e1..b0d89750 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -263,7 +263,7 @@ misc_DEPENDENCIES = \ misc.src/display-inspect-sign.at \ misc.src/comp1-comp2.at \ misc.src/variable-length-file.at \ - misc.src/convert-string-concat.at \ + misc.src/convert-string-concat.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ diff --git a/tests/Makefile.in b/tests/Makefile.in index fc0413a9..a6fe74f8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -802,7 +802,7 @@ misc_DEPENDENCIES = \ misc.src/display-inspect-sign.at \ misc.src/comp1-comp2.at \ misc.src/variable-length-file.at \ - misc.src/convert-string-concat.at \ + misc.src/convert-string-concat.at EXTRA_DIST = $(srcdir)/package.m4 \ $(TESTS) \ From ea41d1a60c0e8f4a358baedfef8c6f43bb91790e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 23:39:51 +0900 Subject: [PATCH 184/188] Build(deps): Bump org.xerial:sqlite-jdbc in /libcobj (#740) Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.50.3.0 to 3.51.0.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.50.3.0...3.51.0.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-version: 3.51.0.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 40fe55cf..bcc4f350 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -32,7 +32,7 @@ tasks { dependencies { implementation("com.google.guava:guava:33.5.0-jre") - implementation("org.xerial:sqlite-jdbc:3.50.3.0") + implementation("org.xerial:sqlite-jdbc:3.51.0.0") implementation("commons-cli:commons-cli:1.10.0") testImplementation("org.junit.jupiter:junit-jupiter:5.13.4") testRuntimeOnly("org.junit.platform:junit-platform-launcher") From 72936103c14bed6b1bcbc909960e606cf8e7f761 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 20:24:46 +0900 Subject: [PATCH 185/188] Build(deps): Bump com.github.spotbugs from 6.4.4 to 6.4.5 in /libcobj (#742) Bumps com.github.spotbugs from 6.4.4 to 6.4.5. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-version: 6.4.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libcobj/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index bcc4f350..b57f5f3a 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { id("java") id("maven-publish") pmd - id("com.github.spotbugs") version "6.4.4" + id("com.github.spotbugs") version "6.4.5" } repositories { From 5f52306e42fae7952c51d02a80a5ef114bec5592 Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:47:07 +0900 Subject: [PATCH 186/188] fix: the help message of -single-jar (#746) --- cobj/cobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobj/cobj.c b/cobj/cobj.c index 78a5c1c4..48cafbad 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -914,7 +914,7 @@ static void cobc_print_usage(void) { "generated source code")); puts(_(" -m, -jar Create .jar and " "remove class files")); - puts(_(" -single-jar= Create .jar and " + puts(_(" -single-jar= Create and " "remove class files")); puts(_(" The JAR file contains all class " "files of all specified COBOL programs")); From 2664dd962f0b6178fcc9c318b532b03dfe324b1a Mon Sep 17 00:00:00 2001 From: Takuto Hashimoto Date: Wed, 19 Nov 2025 08:56:59 +0900 Subject: [PATCH 187/188] Fix the bug about EXTERNAL data item (#747) * fix: codegen.c * Fix a bug about data items with EXTERNAL * test: EXTERNAL item tests in run/miscellaneous.at * Enable the skipped tests about EXTERNAL * fix the format in codegen.c * fix: reflect Copilot reviews * test: Add test for EXTERNAL data item * fix: remove the commented lines * fix: separate the if statement --- cobj/codegen.c | 87 ++++++++++++---------------------- tests/run.src/miscellaneous.at | 73 ++++++++++++++++++++++++++-- 2 files changed, 100 insertions(+), 60 deletions(-) diff --git a/cobj/codegen.c b/cobj/codegen.c index cb220af8..ece49c9f 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -853,40 +853,32 @@ static void joutput_base(struct cb_field *f) { // EDIT /* Base name */ strcpy_identifier_cobol_to_java(name, top->name); - if (!top->flag_external) { - register_data_storage_list(f, top); - } + + register_data_storage_list(f, top); if (!top->flag_base) { - if (!top->flag_external) { - if (!top->flag_local || top->flag_is_global) { - bl = cobc_malloc(sizeof(struct base_list)); - bl->f = top; - bl->curr_prog = excp_current_program_id; - bl->next = base_cache; - base_cache = bl; + if (!top->flag_local || top->flag_is_global) { + bl = cobc_malloc(sizeof(struct base_list)); + bl->f = top; + bl->curr_prog = excp_current_program_id; + bl->next = base_cache; + base_cache = bl; + } else { + if (current_prog->flag_global_use) { + joutput_local("unsigned char\t\t*%s%s = NULL;", CB_PREFIX_BASE, name); + joutput_local("\t/* %s */\n", top->name); + joutput_local("static unsigned char\t*save_%s%s;\n", CB_PREFIX_BASE, + name); } else { - if (current_prog->flag_global_use) { - joutput_local("unsigned char\t\t*%s%s = NULL;", CB_PREFIX_BASE, name); - joutput_local("unsigned char\t\t*%s%s = NULL;", CB_PREFIX_BASE, name); - joutput_local("\t/* %s */\n", top->name); - joutput_local("static unsigned char\t*save_%s%s;\n", CB_PREFIX_BASE, - name); - } else { - joutput_local("unsigned char\t*%s%s = NULL;", CB_PREFIX_BASE, name); - joutput_local("\t/* %s */\n", top->name); - } + joutput_local("unsigned char\t*%s%s = NULL;", CB_PREFIX_BASE, name); + joutput_local("\t/* %s */\n", top->name); } } top->flag_base = 1; } - if (top->flag_external) { - joutput("%s%s", CB_PREFIX_BASE, name); - } else { - if (joutput_field_storage(f, top) && f->offset != 0) { - joutput(".getSubDataStorage(%d)", f->offset); - } + if (joutput_field_storage(f, top) && f->offset != 0) { + joutput(".getSubDataStorage(%d)", f->offset); } if (cb_field_variable_address(f)) { @@ -2260,14 +2252,14 @@ static void joutput_initialize_external(cb_tree x, struct cb_field *f) { joutput_prefix(); joutput_data(x); if (f->ename) { - joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", f->ename, + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);", f->ename, f->size); } else if (f->storage == CB_STORAGE_FILE) { file = CB_TREE(f->file); - joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);", CB_FILE(file)->record->name, f->size); } else { - joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);\n", f->name, + joutput(" = CobolExternal.getStorageAddress (\"%s\", %d);", f->name, f->size); } } @@ -2597,12 +2589,6 @@ static void joutput_initialize(struct cb_initialize *p) { int c; f = cb_field(p->var); - if (f->flag_external) { - joutput_initialize_external(p->var, f); - if (!p->flag_statement) { - return; - } - } switch (initialize_type(p, f, 1)) { case INITIALIZE_NONE: break; @@ -2622,6 +2608,7 @@ static void joutput_initialize(struct cb_initialize *p) { break; } } + /* * SEARCH */ @@ -4240,6 +4227,10 @@ static void joutput_initial_values(struct cb_field *p) { if (p->flag_no_init && !p->count) { continue; } + /* EXTERNAL items */ + if (p->flag_external) { + continue; + } int tmp_flag = integer_reference_flag; integer_reference_flag = 1; joutput_stmt(cb_build_initialize(x, cb_true, NULL, def, 0), @@ -5079,6 +5070,11 @@ static void joutput_init_method(struct cb_program *prog) { joutput_prefix(); joutput("%s = new CobolDataStorage(%d);", base_name, blp->f->memory_size); + } + + if (blp->f->flag_external) { + joutput_initialize_external(cb_build_field_reference(blp->f, NULL), + blp->f); } else { joutput_prefix(); joutput("%s = new CobolDataStorage(%d);", base_name, @@ -5594,27 +5590,6 @@ static void joutput_declare_member_variables(struct cb_program *prog, joutput("\n"); } - /* External items */ - for (f = prog->working_storage; f; f = f->sister) { - if (f->flag_external) { - joutput_prefix(); - joutput("private CobolDataStorage "); - joutput_base(f); - joutput(" = null; /* %s */", f->name); - joutput_newline(); - } - } - for (l = prog->file_list; l; l = CB_CHAIN(l)) { - f = CB_FILE(CB_VALUE(l))->record; - if (f->flag_external) { - joutput_prefix(); - joutput("private CobolDataStorage "); - joutput_base(f); - joutput(" = null; /* %s */", f->name); - joutput_newline(); - } - } - /* AbstractCobolField型変数の宣言(非定数) */ if (field_cache) { joutput_line("/* Fields */\n"); diff --git a/tests/run.src/miscellaneous.at b/tests/run.src/miscellaneous.at index cc3ddfb2..4e2eee58 100644 --- a/tests/run.src/miscellaneous.at +++ b/tests/run.src/miscellaneous.at @@ -88,7 +88,6 @@ AT_CLEANUP AT_SETUP([EXTERNAL data item]) -AT_CHECK([${SKIP_TEST}]) AT_DATA([callee.cob], [ IDENTIFICATION DIVISION. @@ -122,7 +121,7 @@ AT_DATA([caller.cob], [ AT_CHECK([${COMPILE_MODULE} callee.cob]) AT_CHECK([${COMPILE} caller.cob]) -AT_CHECK([java prog], [0], +AT_CHECK([${RUN_MODULE} caller], [0], [Hello World ]) @@ -131,7 +130,6 @@ AT_CLEANUP AT_SETUP([EXTERNAL AS data item]) -AT_CHECK([${SKIP_TEST}]) AT_DATA([callee.cob], [ IDENTIFICATION DIVISION. @@ -168,7 +166,7 @@ AT_DATA([caller.cob], [ AT_CHECK([${COMPILE_MODULE} callee.cob]) AT_CHECK([${COMPILE} caller.cob]) -AT_CHECK([java prog], [0], +AT_CHECK([${RUN_MODULE} caller], [0], [Extrn Hello World @@ -176,6 +174,73 @@ World AT_CLEANUP +AT_SETUP([EXTERNAL group data item]) + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A EXTERNAL. + 03 A1 PIC X(5). + 03 A2 PIC X(3). + 03 A3. + 05 A3-1 PIC 9(1). + 05 A3-2 PIC 9(1). + PROCEDURE DIVISION. + MOVE "HELLO" TO A1. + MOVE "ABC" TO A2. + MOVE 12 TO A3. + + DISPLAY A. + DISPLAY A1. + DISPLAY A2. + DISPLAY A3. + + MOVE "DEF" TO A2. + DISPLAY A. + + CALL "sub". + + MOVE 5 TO A3-2. + + DISPLAY A. + + STOP RUN. +]) + +AT_DATA([sub.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. sub. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A EXTERNAL. + 03 A1 PIC X(5). + 03 A2 PIC X(3). + 03 A3. + 05 A3-1 PIC 9(1). + 05 A3-2 PIC 9(1). + PROCEDURE DIVISION. + DISPLAY A. + MOVE 34 TO A3. + MOVE "WORLD" TO A1. + GOBACK. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([${COBJ} sub.cbl]) +AT_CHECK([java prog], [0], +[HELLOABC12 +HELLO +ABC +12 +HELLODEF12 +HELLODEF12 +WORLDDEF35 +]) + +AT_CLEANUP + AT_SETUP([java command validation]) From 97ec3c5342ec94096c3ec3ed1f6d12f56cc645f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 23:35:25 +0900 Subject: [PATCH 188/188] Build(deps): Bump actions/checkout from 5 to 6 (#751) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-gcc9.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/check-missing-javadoc.yml | 2 +- .github/workflows/check-workflows.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/create-release.yml | 4 ++-- .github/workflows/javadoc.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/update-github-pages.yml | 2 +- .github/workflows/windows-build.yml | 2 +- .github/workflows/windows-test.yml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-gcc9.yml b/.github/workflows/build-gcc9.yml index a1c613c4..e5b00791 100644 --- a/.github/workflows/build-gcc9.yml +++ b/.github/workflows/build-gcc9.yml @@ -21,7 +21,7 @@ jobs: sudo apt-get install -y gcc-9 build-essential gettext autoconf - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af812483..a39026b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip bison flex - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 diff --git a/.github/workflows/check-missing-javadoc.yml b/.github/workflows/check-missing-javadoc.yml index fba8fc18..db1d33a5 100644 --- a/.github/workflows/check-missing-javadoc.yml +++ b/.github/workflows/check-missing-javadoc.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y gcc-9 build-essential gettext autoconf - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/check-workflows.yml b/.github/workflows/check-workflows.yml index 99079fae..bcf40c1b 100644 --- a/.github/workflows/check-workflows.yml +++ b/.github/workflows/check-workflows.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install actionlint run: | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fc0c0462..762ab48a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y build-essential gettext autoconf bison flex gcovr - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install opensource COBOL 4J run: | diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 9d335524..86ac6147 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -24,7 +24,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Create a Release run: gh release create ${{ github.ref }} -F ReleaseNote.md @@ -53,7 +53,7 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: | cd ../ mv opensourcecobol4j/* . diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index ef5dae7a..69c800f5 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -16,7 +16,7 @@ jobs: java-version: '21' - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Run javadoc working-directory: libcobj diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 128069ef..e93fe0c9 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -13,7 +13,7 @@ jobs: image: almalinux:9 steps: - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - uses: actions/setup-java@v5 with: diff --git a/.github/workflows/update-github-pages.yml b/.github/workflows/update-github-pages.yml index 516ccc74..2bbbb9ed 100644 --- a/.github/workflows/update-github-pages.yml +++ b/.github/workflows/update-github-pages.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - uses: actions/setup-java@v5 with: diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 4710ad40..a2042e91 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -24,7 +24,7 @@ jobs: uses: microsoft/setup-msbuild@v2.0.0 - name: Checkout opensource COBOL 4J - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Restore NuGet packages run: nuget restore ./win/ diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 41435157..bdc31601 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Download libcobj.jar uses: actions/download-artifact@v6