Skip to content

Commit

Permalink
UPD src compile.bat -- autoconfigure unix lines
Browse files Browse the repository at this point in the history
Improvements in the 'compile.bat' script:

 - automatically set line endings mode into UNIX-LINES in the host Forth system
   if the line endings in the working directory are LF.

 - change the current directory to 'src' independently of the current directory.
  • Loading branch information
Ruvim committed Oct 4, 2020
1 parent fde39fe commit 912933a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compile.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cd ..
cd /d %~dp0 && cd ..
@echo Wait a bit while compiling...
@jpf375c.exe src\spf.f
@jpf375c.exe src\tc-configure-lines.f src\spf.f
5 changes: 5 additions & 0 deletions src/tc-configure-lines.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SOURCE + 1 CHARS - C@ 0xA = CHAR | AND PARSE | UNIX-LINES
2DROP
\ If the last character in the buffer is LF (0xA)
\ then this file has LF line endigns and the current mode is not UNIX-LINES.
\ Perform UNIX-LINES in this case. Otherwise do nothing.

0 comments on commit 912933a

Please sign in to comment.