azbycxdw909 / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

(Glulx) Spurious asterisks in external text files #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a glulx file that outputs to an external text file (creating an 
external file using fileusage_TextMode)
2. Append to the file multiple times
3. Open the external file.

What is the expected output? What do you see instead?

The external file should reflect the text output, but also includes an 
asterisk marking each point at which text was appended to the external 
file.

What version of the product are you using? On what operating system?

gargoyle-2009-08-25-windows

Please provide any additional information below.

Glk spec provides for a number of changes to a TextMode file, but 
inserting an asterisk to mark an append doesn't seem to be one of them. 
From the spec:

"fileusage_TextMode: The file contents will be transformed to a platform-
native text file as they are written out. Newlines may be converted to 
linefeeds or linefeed-plus-carriage-return combinations; Latin-1 
characters may be converted to native character codes. When reading a file 
in text mode, native line breaks will be converted back to newline (0x0A) 
characters, and native character codes may be converted to Latin-1. [Line 
breaks will always be converted; other conversions are more questionable. 
If you write out a file in text mode, and then read it back in text mode, 
high-bit characters (128 to 255) may be transformed or lost.]"

This appears to be a historical thing--asterisks are also added in this 
way by Spatterlight, WinGlulxe, and WinGit, though not by Zoom.

An emerging use for external text files is to allow a game/tool to output 
source code based on user input to the game; the collaboration tool 
created for Alabaster and my own WIP both do this. The introduction of 
unnecessary asterisks complicates this application, as users will have to 
search-and-replace to remove asterisks. (In a complicated operation like 
the production of source code, there will often be a great many asterisks.)

Original issue reported on code.google.com by Ek.Temple@gmail.com on 3 Mar 2010 at 8:29

GoogleCodeExporter commented 8 years ago
Fixed in r237.

More discussion can be found here:
http://groups.google.com/group/rec.arts.int-fiction/browse_thread/thread/e0cb9e3
47fb71f9d

Original comment by bcressey@gmail.com on 4 Mar 2010 at 7:51