[Scummvm-git-logs] scummvm master -> c4d0f4fa8e96c42a85cba6a6ab96b223982a68f1

lotharsm mail at serra.me
Sat Jan 9 13:39:45 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c4d0f4fa8e AMIGAOS: Fixes to the automatic installation (#2721)


Commit: c4d0f4fa8e96c42a85cba6a6ab96b223982a68f1
    https://github.com/scummvm/scummvm/commit/c4d0f4fa8e96c42a85cba6a6ab96b223982a68f1
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2021-01-09T14:39:41+01:00

Commit Message:
AMIGAOS: Fixes to the automatic installation (#2721)

* AMIGAOS: amigaos.mk fixes

switch to AmigaOS makedir, as mkdir seems to break pathes/dirs

* AMIGAOS: Fix RM2AG.rexx

New tables have been introduced which start with a bunch of minus (-) signs.
That broke the script at exactly 3.10 (where the tables are) by leaving it.

Updated the complete condition.

* AMIGAOS: amigaos.mk

Fix some comment oversights

* AMIGAOS: RM2AG.rexx

Fix an oversight

* AMIGAOS: amigaos.mk

Last oversight

* AMIGAOS: Update RM2AG.rexx.in

Changed paths:
    backends/platform/sdl/amigaos/amigaos.mk
    dists/amigaos/RM2AG.rexx
    dists/amigaos/RM2AG.rexx.in


diff --git a/backends/platform/sdl/amigaos/amigaos.mk b/backends/platform/sdl/amigaos/amigaos.mk
index f020e61741..fb6ee93d52 100644
--- a/backends/platform/sdl/amigaos/amigaos.mk
+++ b/backends/platform/sdl/amigaos/amigaos.mk
@@ -1,11 +1,20 @@
 # Special target to create an AmigaOS snapshot installation.
+#
+# WORKAROUNDS:
+#
+# 'mkdir' seems to incorrectly set permissions to path/dirs on AmigaOS.
+# Once a vanilla installation was created, none of the special subdirectories
+# are found/accessible (extras, themes, plugins), instead ScummVM reports
+# missing theme files and a valid translation.dat.
+# Switching to AmigaOS' own "makedir" until there is a fix or other solution. 
+#
 amigaosdist: $(EXECUTABLE) $(PLUGINS)
-	mkdir -p $(AMIGAOSPATH)
-	mkdir -p $(AMIGAOSPATH)/extras
+	makedir ALL FORCE $(AMIGAOSPATH)
+	makedir ALL FORCE $(AMIGAOSPATH)/extras
 	cp ${srcdir}/dists/amigaos/scummvm_drawer.info $(AMIGAOSPATH).info
 	cp ${srcdir}/dists/amigaos/scummvm.info $(AMIGAOSPATH)/$(EXECUTABLE).info
 ifdef DIST_FILES_DOCS
-	mkdir -p $(AMIGAOSPATH)/doc
+	makedir ALL FORCE $(AMIGAOSPATH)/doc
 	cp -r $(srcdir)/doc/ $(AMIGAOSPATH)
 	cp $(DIST_FILES_DOCS) $(AMIGAOSPATH)/doc/
 	# Prepare README.md for AmigaGuide conversion.
@@ -28,17 +37,17 @@ ifdef DIST_FILES_VKEYBD
 	cp $(DIST_FILES_VKEYBD) $(AMIGAOSPATH)/extras/
 endif
 ifdef DIST_FILES_THEMES
-	mkdir -p $(AMIGAOSPATH)/themes
+	makedir ALL FORCE $(AMIGAOSPATH)/themes
 	cp $(DIST_FILES_THEMES) $(AMIGAOSPATH)/themes/
 endif
 	# Strip and copy engine plugins.
 ifdef DYNAMIC_MODULES
-	mkdir -p $(AMIGAOSPATH)/plugins
+	makedir ALL FORCE $(AMIGAOSPATH)/plugins
 	$(foreach plugin, $(PLUGINS), $(STRIP) $(plugin) -o $(AMIGAOSPATH)/$(plugin);)
 	# Shared objects on AmigaOS change. To avoid conflicts with old or
 	# outdated .so's, always remove and install them completely.
 	rm -rf $(AMIGAOSPATH)/sobjs
-	mkdir -p $(AMIGAOSPATH)/sobjs
+	makedir ALL FORCE $(AMIGAOSPATH)/sobjs
 	# Extract and install compiled-in shared libraries.
 	# Not every AmigaOS installation, especially vanilla ones, have
 	# every mandatory shared library installed in the correct place.
diff --git a/dists/amigaos/RM2AG.rexx b/dists/amigaos/RM2AG.rexx
index 4326542f88..2af9e2d41d 100644
--- a/dists/amigaos/RM2AG.rexx
+++ b/dists/amigaos/RM2AG.rexx
@@ -1,8 +1,7 @@
 /*
-$VER: RM2AG.rexx 0.24 (23.08.2020) README(.md) to .guide converter.
-This script converts a given markdown README file (right now, only
-ScummVM is supported) to a basic hypertext AmigaGuide file and installs
-it to a given path, if available.
+$VER: RM2AG.rexx 0.25 (09.01.2021) README (.md) to .guide converter.
+Converts the ScummVM markdown README file to a basic hypertext AmigaGuide
+file and installs it to the given path.
 */
 
 PARSE ARG readme_md install_path
@@ -17,10 +16,10 @@ IF ~ARG() THEN DO
 END
 
 /*
-If the given filename/path has spaces in it, AmigaDOS/CLI
-will add extra quotation marks to secure a sane working path.
-Get rid of them to make AREXX find the file and remove leading
-and trailing spaces.
+If the given filename/path has spaces in it, AmigaDOS/CLI will add extra
+quotation marks to secure a sane working path.
+Get rid of them to make AREXX find the file and remove leading and trailing
+spaces.
 */
 IF ~EXISTS(readme_md) THEN DO
 	SAY readme_md' not available!'
@@ -42,7 +41,7 @@ ELSE DO
 	Check for destination path and create it, if needed.
 	*/
 	IF ~EXISTS(install_path'/') THEN
-		ADDRESS COMMAND 'makedir 'install_path
+		ADDRESS COMMAND 'makedir ALL FORCE 'install_path
 END
 
 IF ~OPEN(check_readme,readme_md,'R') THEN DO
@@ -75,7 +74,7 @@ IF ~OPEN(guide_write,'README.guide','W') THEN DO
 END
 
 /*
-Prepare the AmigaGuide file, add intro and fixed text.
+Prepare AmigaGuide file, add intro and fixed text.
 */
 CALL WRITELN guide_write,'@DATABASE ScummVM README.guide'
 CALL WRITELN guide_write,'@$VER: ScummVM Readme 2.3.0git'
@@ -102,9 +101,9 @@ DO WHILE EOF(readme_read) = 0
 
 	/*
 	Check for any "rolled over" lines and, if available, read in the rest
-	(on the following line) and rejoin them again before processing any further.
-	e.g.	- [<>3.6.3<>) Broken Sword games
-		cutscenes](#363-broken-sword-games-cutscenes)
+	(on the following line) and rejoin them before processing any further.
+	e.g.      - [3.11) Flight of the Amazon Queen
+        notes](#311-flight-of-the-amazon-queen-notes)
 	*/
 	IF POS('- [<>',working_line) > 0 THEN DO
 		IF POS('(#',working_line) = 0 THEN DO
@@ -121,15 +120,15 @@ DO WHILE EOF(readme_read) = 0
 	ELSE DO
 		/*
 		Fix empty chapters:
-		Two chapters (1.0 and 7.8) are "empty", consisting of only
-		it`s chapter names. Link them to their respective sub chapters
-		(1.1 and 7.8.1) to not display a blank page.
+		Two chapters (1.0 and 7.8) are "empty", consisting of only it's
+		chapter names. Link them to their respective sub chapters (1.1 and
+		7.8.1) to not display a blank page.
 		If chapter 1.0 is found, add a link node to chapter 1.1.
 		*/
 		IF POS('  - [<>1.0<>)',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'[<>')
 			CALL WRITELN guide_write,'  @{" 1.0 " Link "1.1"} 'SUBSTR(working_line,1,LASTPOS(']',working_line)-1)
@@ -140,17 +139,17 @@ DO WHILE EOF(readme_read) = 0
 		*/
 		IF POS('      - [<>7.8<>)',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'[<>')
 			CALL WRITELN guide_write,'    @{" 7.8 " Link "7.8.1"} 'SUBSTR(working_line,1,LASTPOS(']',working_line)-1)
 		END
 
 		/*
-		If a single number main chapter is found (1.0 upto 9.0),
-		prepare and write the link node.
-		Just for the record:
+		If a single number main chapter is found (1.0 upto 9.0), prepare and
+		write the link node.
+		Note:
 		A "\" (backslash) is treated as escape character in AmigaGuides.
 		Remove it from the node links.
 		*/
@@ -158,34 +157,34 @@ DO WHILE EOF(readme_read) = 0
 			CALL WRITELN guide_write,' '
 			CALL WRITELN guide_write,'  @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'-[<>')
 		END
 
 		/*
-		If a level one sub chapter is found (i.e. 1.1, 1.2 etc.),
-		prepare and write the link node.
+		If a level one sub chapter is found (i.e. 1.1, 1.2 etc.), prepare and
+		write the link node.
 		*/
 		IF POS('- [<>',working_line) = 7 THEN DO
 			CALL WRITELN guide_write,'    @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'.[<>')
 		END
 
 		/*
-		If a level two sub chapter is found (i.e. 3.6.1, 3.6.2 etc.),
-		prepare and write the link node.
+		If a level two sub chapter is found (i.e. 3.6.1, 3.6.2 etc.), prepare
+		and write the link node.
 		*/
 		IF POS('- [<>',working_line) = 11 THEN DO
 			CALL WRITELN guide_write,'      @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'.[<>')
 		END
@@ -193,8 +192,8 @@ DO WHILE EOF(readme_read) = 0
 END
 
 /*
-Finish TOC (hardcoded as the outro text would be read in last,
-but needs to be written after TOC creation finished).
+Finish TOC (hardcoded as the outro text would be read in last, but needs to
+be written after TOC creation finished).
 */
 CALL WRITELN guide_write,'-----'
 CALL WRITELN guide_write,' '
@@ -224,40 +223,40 @@ DO WHILE EOF(readme_read) = 0
 	ELSE DO
 		/*
 		Fix empty chapters:
-		Two chapters (1.0 and 7.8) are "empty", consisting of only
-		it`s chapter names. Link them to their respective sub chapters
-		(1.1 and 7.8.1) to not display a blank page.
-		If chapter 1.1 is found, don`t close the NODE, just write the line.
+		Two chapters (1.0 and 7.8) are "empty", consisting of only it's
+		chapter names. Link them to their respective sub chapters (1.1 and
+		7.8.1) to not display a blank page.
+		If chapter 1.1 is found, don't close the NODE, just write the line.
 		*/
 		IF POS('<>1.1<>',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 		END
 
 		/*
-		If chapter 7.8.1 is found don`t close the NODE, just write the line.
+		If chapter 7.8.1 is found don't close the NODE, just write the line.
 		*/
 		IF POS('<>7.8.1<>',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 		END
 
 		IF POS('<>',working_line) > 0 THEN DO
 			/*
-			Check for link references inside the text and create link
-			nodes for them.
+			Check for link references inside the text and create link nodes
+			for them.
 			*/
 			IF POS('section <>',working_line) > 0 THEN DO
 				working_line=SUBSTR(working_line,1,POS('<>',working_line)-1)'@{"'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"}'SUBSTR(working_line,LASTPOS('<>',working_line)+2)
 				/*
-				Get rid of the markers, so the following loops won`t
-				process them again.
+				Get rid of the markers, so the following loops won't process
+				them again.
 				*/
 				CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 			END
@@ -269,7 +268,7 @@ DO WHILE EOF(readme_read) = 0
 				CALL WRITELN guide_write,'@NODE "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'" "'COMPRESS(working_line,'<>#')'"'
 				CALL WRITELN guide_write,' '
 				/*
-				Get rid of the markers, so the following loops won`t process
+				Get rid of the markers, so the following loops won't process
 				them again.
 				*/
 				CALL WRITELN guide_write,COMPRESS(working_line,'<>')
@@ -277,15 +276,15 @@ DO WHILE EOF(readme_read) = 0
 		END
 	END
 	/*
-	Read in the line at the end of the second loop, as the first line to
-	work with was already read in on the end of the first loop.
+	Read in the line at the end of the second loop, as the first line to work
+	with was already read in on the end of the first loop.
 	*/
 	working_line=READLN(readme_read)
 
 	/*
 	If the outtro text has been found, leave loop and prepare for closing.
 	*/
-	IF POS('-----',working_line,1) =1 THEN
+	IF WORD(working_line,1) = '-----' THEN
 		LEAVE
 END
 
@@ -306,10 +305,9 @@ IF ~CLOSE(guide_write) THEN DO
 END
 
 /*
-Install finished README.guide to installation path
-and delete README.guide.
+Install finished README.guide to installation path and delete it on closure.
 */
-ADDRESS COMMAND 'copy README.guide 'install_path
-ADDRESS COMMAND 'delete README.guide'
+ADDRESS COMMAND 'copy QUIET README.guide 'install_path
+ADDRESS COMMAND 'delete FORCE QUIET README.guide'
 
 EXIT
diff --git a/dists/amigaos/RM2AG.rexx.in b/dists/amigaos/RM2AG.rexx.in
index b3b92bb1be..3d7f889f06 100644
--- a/dists/amigaos/RM2AG.rexx.in
+++ b/dists/amigaos/RM2AG.rexx.in
@@ -1,8 +1,7 @@
 /*
-$VER: RM2AG.rexx 0.24 (23.08.2020) README(.md) to .guide converter.
-This script converts a given markdown README file (right now, only
-ScummVM is supported) to a basic hypertext AmigaGuide file and installs
-it to a given path, if available.
+$VER: RM2AG.rexx 0.25 (09.01.2021) README (.md) to .guide converter.
+Converts the ScummVM markdown README file to a basic hypertext AmigaGuide
+file and installs it to the given path.
 */
 
 PARSE ARG readme_md install_path
@@ -17,10 +16,10 @@ IF ~ARG() THEN DO
 END
 
 /*
-If the given filename/path has spaces in it, AmigaDOS/CLI
-will add extra quotation marks to secure a sane working path.
-Get rid of them to make AREXX find the file and remove leading
-and trailing spaces.
+If the given filename/path has spaces in it, AmigaDOS/CLI will add extra
+quotation marks to secure a sane working path.
+Get rid of them to make AREXX find the file and remove leading and trailing
+spaces.
 */
 IF ~EXISTS(readme_md) THEN DO
 	SAY readme_md' not available!'
@@ -42,7 +41,7 @@ ELSE DO
 	Check for destination path and create it, if needed.
 	*/
 	IF ~EXISTS(install_path'/') THEN
-		ADDRESS COMMAND 'makedir 'install_path
+		ADDRESS COMMAND 'makedir ALL FORCE 'install_path
 END
 
 IF ~OPEN(check_readme,readme_md,'R') THEN DO
@@ -75,7 +74,7 @@ IF ~OPEN(guide_write,'README.guide','W') THEN DO
 END
 
 /*
-Prepare the AmigaGuide file, add intro and fixed text.
+Prepare AmigaGuide file, add intro and fixed text.
 */
 CALL WRITELN guide_write,'@DATABASE ScummVM README.guide'
 CALL WRITELN guide_write,'@$VER: ScummVM Readme @VERSION@'
@@ -102,9 +101,9 @@ DO WHILE EOF(readme_read) = 0
 
 	/*
 	Check for any "rolled over" lines and, if available, read in the rest
-	(on the following line) and rejoin them again before processing any further.
-	e.g.	- [<>3.6.3<>) Broken Sword games
-		cutscenes](#363-broken-sword-games-cutscenes)
+	(on the following line) and rejoin them before processing any further.
+	e.g.      - [3.11) Flight of the Amazon Queen
+        notes](#311-flight-of-the-amazon-queen-notes)
 	*/
 	IF POS('- [<>',working_line) > 0 THEN DO
 		IF POS('(#',working_line) = 0 THEN DO
@@ -121,16 +120,15 @@ DO WHILE EOF(readme_read) = 0
 	ELSE DO
 		/*
 		Fix empty chapters:
-		Two chapters (1.0 and 7.8) are "empty", consisting of only
-		it`s chapter names. Link them to their respective sub chapters
-		(1.1 and 7.8.1) to not display a blank page.
-
+		Two chapters (1.0 and 7.8) are "empty", consisting of only it's
+		chapter names. Link them to their respective sub chapters (1.1 and
+		7.8.1) to not display a blank page.
 		If chapter 1.0 is found, add a link node to chapter 1.1.
 		*/
 		IF POS('  - [<>1.0<>)',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'[<>')
 			CALL WRITELN guide_write,'  @{" 1.0 " Link "1.1"} 'SUBSTR(working_line,1,LASTPOS(']',working_line)-1)
@@ -141,17 +139,17 @@ DO WHILE EOF(readme_read) = 0
 		*/
 		IF POS('      - [<>7.8<>)',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'[<>')
 			CALL WRITELN guide_write,'    @{" 7.8 " Link "7.8.1"} 'SUBSTR(working_line,1,LASTPOS(']',working_line)-1)
 		END
 
 		/*
-		If a single number main chapter is found (1.0 upto 9.0),
-		prepare and write the link node.
-		Just for the record:
+		If a single number main chapter is found (1.0 upto 9.0), prepare and
+		write the link node.
+		Note:
 		A "\" (backslash) is treated as escape character in AmigaGuides.
 		Remove it from the node links.
 		*/
@@ -159,34 +157,34 @@ DO WHILE EOF(readme_read) = 0
 			CALL WRITELN guide_write,' '
 			CALL WRITELN guide_write,'  @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'-[<>')
 		END
 
 		/*
-		If a level one sub chapter is found (i.e. 1.1, 1.2 etc.),
-		prepare and write the link node.
+		If a level one sub chapter is found (i.e. 1.1, 1.2 etc.), prepare and
+		write the link node.
 		*/
 		IF POS('- [<>',working_line) = 7 THEN DO
 			CALL WRITELN guide_write,'    @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'.[<>')
 		END
 
 		/*
-		If a level two sub chapter is found (i.e. 3.6.1, 3.6.2 etc.),
-		prepare and write the link node.
+		If a level two sub chapter is found (i.e. 3.6.1, 3.6.2 etc.), prepare
+		and write the link node.
 		*/
 		IF POS('- [<>',working_line) = 11 THEN DO
 			CALL WRITELN guide_write,'      @{" 'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2) '" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"} 'COMPRESS(SUBSTR(working_line,1,LASTPOS(']',working_line)-1),'*<>[]\')
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			working_line=COMPRESS(working_line,'.[<>')
 		END
@@ -194,8 +192,8 @@ DO WHILE EOF(readme_read) = 0
 END
 
 /*
-Finish TOC (hardcoded as the outro text would be read in last,
-but needs to be written after TOC creation finished).
+Finish TOC (hardcoded as the outro text would be read in last, but needs to
+be written after TOC creation finished).
 */
 CALL WRITELN guide_write,'-----'
 CALL WRITELN guide_write,' '
@@ -225,41 +223,40 @@ DO WHILE EOF(readme_read) = 0
 	ELSE DO
 		/*
 		Fix empty chapters:
-		Two chapters (1.0 and 7.8) are "empty", consisting of only
-		it`s chapter names. Link them to their respective sub chapters
-		(1.1 and 7.8.1) to not display a blank page.
-
-		If chapter 1.1 is found, don`t close the NODE, just write the line.
+		Two chapters (1.0 and 7.8) are "empty", consisting of only it's
+		chapter names. Link them to their respective sub chapters (1.1 and
+		7.8.1) to not display a blank page.
+		If chapter 1.1 is found, don't close the NODE, just write the line.
 		*/
 		IF POS('<>1.1<>',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 		END
 
 		/*
-		If chapter 7.8.1 is found don`t close the NODE, just write the line.
+		If chapter 7.8.1 is found don't close the NODE, just write the line.
 		*/
 		IF POS('<>7.8.1<>',working_line) = 1 THEN DO
 			/*
-			Get rid of the markers, so the following loops won`t process
-			them again.
+			Get rid of the markers, so the following loops won't process them
+			again.
 			*/
 			CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 		END
 
 		IF POS('<>',working_line) > 0 THEN DO
 			/*
-			Check for link references inside the text and create link
-			nodes for them.
+			Check for link references inside the text and create link nodes
+			for them.
 			*/
 			IF POS('section <>',working_line) > 0 THEN DO
 				working_line=SUBSTR(working_line,1,POS('<>',working_line)-1)'@{"'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'" Link "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'"}'SUBSTR(working_line,LASTPOS('<>',working_line)+2)
 				/*
-				Get rid of the markers, so the following loops won`t
-				process them again.
+				Get rid of the markers, so the following loops won't process
+				them again.
 				*/
 				CALL WRITELN guide_write,COMPRESS(working_line,'<>')
 			END
@@ -271,7 +268,7 @@ DO WHILE EOF(readme_read) = 0
 				CALL WRITELN guide_write,'@NODE "'SUBSTR(working_line,POS('<>',working_line)+2,LASTPOS('<>',working_line)-POS('<>',working_line)-2)'" "'COMPRESS(working_line,'<>#')'"'
 				CALL WRITELN guide_write,' '
 				/*
-				Get rid of the markers, so the following loops won`t process
+				Get rid of the markers, so the following loops won't process
 				them again.
 				*/
 				CALL WRITELN guide_write,COMPRESS(working_line,'<>')
@@ -279,15 +276,15 @@ DO WHILE EOF(readme_read) = 0
 		END
 	END
 	/*
-	Read in the line at the end of the second loop, as the first line to
-	work with was already read in on the end of the first loop.
+	Read in the line at the end of the second loop, as the first line to work
+	with was already read in on the end of the first loop.
 	*/
 	working_line=READLN(readme_read)
 
 	/*
 	If the outtro text has been found, leave loop and prepare for closing.
 	*/
-	IF POS('-----',working_line,1) =1 THEN
+	IF WORD(working_line,1) = '-----' THEN
 		LEAVE
 END
 
@@ -308,10 +305,9 @@ IF ~CLOSE(guide_write) THEN DO
 END
 
 /*
-Install finished README.guide to installation path
-and delete README.guide.
+Install finished README.guide to installation path and delete it on closure.
 */
-ADDRESS COMMAND 'copy README.guide 'install_path
-ADDRESS COMMAND 'delete README.guide'
+ADDRESS COMMAND 'copy QUIET README.guide 'install_path
+ADDRESS COMMAND 'delete FORCE QUIET README.guide'
 
 EXIT




More information about the Scummvm-git-logs mailing list