forked from exercism/cobol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
from appveyor to sourceforge (exercism#128)
* from appveyor to sourceforge * different server * 7z * 7z * yaml issue fixed * slashes * 7z oddities * directories * $HOME ? * atbash tweak * cache management fix * commented out extraneous DISPLAY in proof.ci.cob files * eol issue * line ends fixed * strangenesses * SPACE instead of "" in CUT files * Trim additional line * Debug * Try simplify environment variables * More debugging * More tweaking * Fix path * Fix path * Fix path * Fix env * Streamline * eof is lf * acronym * acronym * sqrt * Fix paths * Fix cache path --------- Co-authored-by: Erik Schierboom <[email protected]>
- Loading branch information
1 parent
6da8588
commit 8f81a31
Showing
30 changed files
with
94 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$env:Path = "${env:GITHUB_WORKSPACE}\gnucobol\bin;${env:GITHUB_WORKSPACE}\bin;${env:Path}" | ||
[System.Environment]::SetEnvironmentVariable('COB_CONFIG_DIR', "${env:GITHUB_WORKSPACE}\gnucobol\config") | ||
[System.Environment]::SetEnvironmentVariable('COB_COPY_DIR', "${env:GITHUB_WORKSPACE}\gnucobol\copy") | ||
[System.Environment]::SetEnvironmentVariable('COB_CFLAGS', "-I ${env:GITHUB_WORKSPACE}\gnucobol\include") | ||
[System.Environment]::SetEnvironmentVariable('COB_LDFLAGS', "-L ${env:GITHUB_WORKSPACE}\gnucobol\lib") | ||
[System.Environment]::SetEnvironmentVariable('COB_LIBRARY_PATH', "${env:GITHUB_WORKSPACE}\gnucobol\lib") | ||
[System.Environment]::SetEnvironmentVariable('COB_LIBS', "${env:GITHUB_WORKSPACE}\gnucobol\bin\libcob-4.dll") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,50 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. ACRONYM. | ||
PROGRAM-ID. acronym. | ||
AUTHOR. kapitaali. | ||
ENVIRONMENT DIVISION. | ||
DATA DIVISION. | ||
FILE SECTION. | ||
|
||
WORKING-STORAGE SECTION. | ||
01 WS-ACRONYM PIC X(80). | ||
01 WS-RESULT PIC X(20). | ||
|
||
01 LEN PIC 99. | ||
01 PICKNEXT PIC 9. | ||
01 COUNTER PIC 99. | ||
01 IDX PIC 99. | ||
01 CHAR PIC X. | ||
|
||
PROCEDURE DIVISION. | ||
ABBREVIATE. | ||
PERFORM STR-LENGTH. | ||
MOVE 1 TO IDX. | ||
MOVE SPACES TO WS-RESULT. | ||
MOVE 1 TO PICKNEXT. | ||
PERFORM VARYING COUNTER FROM 1 BY 1 UNTIL COUNTER = LEN | ||
MOVE WS-ACRONYM(COUNTER:1) TO CHAR | ||
EVALUATE CHAR | ||
WHEN "_" | ||
CONTINUE | ||
WHEN SPACE | ||
MOVE 1 TO PICKNEXT | ||
CONTINUE | ||
WHEN "-" | ||
MOVE 1 TO PICKNEXT | ||
CONTINUE | ||
WHEN OTHER | ||
IF PICKNEXT = 1 | ||
MOVE FUNCTION UPPER-CASE(CHAR) | ||
TO WS-RESULT(IDX:1) | ||
ADD 1 TO IDX | ||
END-IF | ||
MOVE 0 TO PICKNEXT | ||
END-PERFORM. | ||
|
||
STR-LENGTH. | ||
MOVE 0 TO LEN. | ||
MOVE FUNCTION LENGTH(WS-ACRONYM) TO IDX. | ||
PERFORM VARYING IDX FROM FUNCTION LENGTH(WS-ACRONYM) | ||
BY -1 UNTIL WS-ACRONYM(IDX:1) <> " " | ||
ADD 1 TO LEN | ||
END-PERFORM. | ||
COMPUTE LEN = 80 - LEN. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,4 +142,3 @@ | |
MOVE WS-RESULT TO WS-DIGITS. | ||
PERFORM STR-LENGTH. | ||
MOVE SPACES TO WS-RESULT(LEN:1). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,4 +50,4 @@ | |
MOVE CHAR-ERROR TO WS-ERROR | ||
NEXT SENTENCE | ||
END-IF | ||
END-PERFORM. | ||
END-PERFORM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,4 @@ | |
MOVE "Whatever." TO WS-RESULT | ||
END-IF | ||
END-EVALUATE | ||
END-IF. | ||
END-IF. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,5 @@ | |
ADD 1 TO WS-STEPS | ||
END-PERFORM. | ||
|
||
DISPLAY WS-STEPS. | ||
DISPLAY WS-ERROR. | ||
*DISPLAY WS-STEPS. | ||
*DISPLAY WS-ERROR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ | |
HELLO-WORLD. | ||
MOVE "Hello, World!" TO WS-RESULT. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,4 @@ | |
MOVE "FALSE" TO WS-VALID | ||
END-IF. | ||
|
||
DISPLAY WS-VALID. | ||
*DISPLAY WS-VALID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ | |
MOVE WS-NUMBER TO WS-RESULT | ||
END-IF. | ||
|
||
DISPLAY WS-RESULT. | ||
*DISPLAY WS-RESULT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
MOVE FUNCTION TRIM(WS-STRING LEADING) | ||
TO WS-STRING. | ||
|
||
DISPLAY WS-STRING. | ||
*DISPLAY WS-STRING. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
INSPECT WS-COMPLEMENT CONVERTING WS-DNA | ||
TO WS-RNA. | ||
|
||
DISPLAY WS-COMPLEMENT. | ||
*DISPLAY WS-COMPLEMENT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,4 +71,3 @@ | |
ALL "c" BY COLUMN-LETTER-CHARACTERS(3). | ||
MAKE-ROMAN-EXIT. | ||
EXIT. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,4 @@ | |
END-IF | ||
|
||
SET LETTER-INDEX UP BY 1 | ||
END-PERFORM. | ||
END-PERFORM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ | |
|
||
PROCEDURE DIVISION. | ||
SQUARE-ROOT. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,4 +227,3 @@ | |
END-PERFORM. | ||
BUBBLE-SORT-EXIT. | ||
EXIT. | ||
|