doc/classes/CocoBasic.src/M000415.html in ripxplore-0.13.0 vs doc/classes/CocoBasic.src/M000415.html in ripxplore-0.14.0
- old
+ new
@@ -3,70 +3,18 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>to_listing (CocoBasic)</title>
+ <title>file_system_file_types (CocoBasic)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File lib/native_file_types/coco/CocoBasic.rb, line 146</span>
-<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_listing</span>
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">contents</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aux_code</span><span class="ruby-operator">==</span><span class="ruby-value">0x</span><span class="ruby-constant">FF</span> <span class="ruby-comment cmt">#Aux Code is "ASCII FLAG"</span>
- <span class="ruby-identifier">s</span>=<span class="ruby-value str">""</span>
- <span class="ruby-identifier">p</span>=<span class="ruby-value">0</span>
-
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0xff</span> <span class="ruby-keyword kw">then</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">file_size</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]<span class="ruby-operator"><<</span><span class="ruby-value">8</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">file_size</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
-<span class="ruby-comment cmt"># raise "Binary CoCo BASIC file format inconsistant (file size record was = $#{"%X" % file_size}, real file size=$#{"%X" % (contents.length-3)}" if file_size != (contents.length-3)</span>
- <span class="ruby-keyword kw">end</span>
-
- <span class="ruby-identifier">value</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]<span class="ruby-operator"><<</span><span class="ruby-value">8</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">value</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
-
- <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">p</span><span class="ruby-operator"><</span><span class="ruby-identifier">contents</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>)
- <span class="ruby-identifier">line_number</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]<span class="ruby-operator"><<</span><span class="ruby-value">8</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">line_number</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
-
- <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span> <span class="ruby-node">"#{line_number} "</span>
-
- <span class="ruby-identifier">character</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
-
- <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">p</span><span class="ruby-operator"><</span><span class="ruby-identifier">contents</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">character</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>)
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">character</span> <span class="ruby-operator">==</span> <span class="ruby-value">0xff</span> <span class="ruby-keyword kw">then</span>
- <span class="ruby-identifier">character</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span><span class="ruby-constant">FUNCTION_TOKENS</span>[<span class="ruby-identifier">character</span>]
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">character</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0x80</span>
- <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span><span class="ruby-constant">COMMAND_TOKENS</span>[<span class="ruby-identifier">character</span>]
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">character</span> <span class="ruby-operator">==</span> <span class="ruby-value">0x3a</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0x83</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0x84</span> )
- <span class="ruby-comment cmt">#When colon-apostrophe is encountered, the colon is dropped. */</span>
- <span class="ruby-comment cmt">#When colon-ELSE is encountered, the colon is dropped. */</span>
- <span class="ruby-keyword kw">else</span>
- <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span>(<span class="ruby-identifier">character</span> <span class="ruby-operator">%</span> <span class="ruby-value">0x80</span>).<span class="ruby-identifier">chr</span>
- <span class="ruby-keyword kw">end</span>
-
- <span class="ruby-identifier">character</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-keyword kw">end</span>
-
- <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span><span class="ruby-value str">"\n"</span>
-
- <span class="ruby-identifier">value</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]<span class="ruby-operator"><<</span><span class="ruby-value">8</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-identifier">value</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>].<span class="ruby-identifier">nil?</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-keyword kw">end</span>
- <span class="ruby-identifier">s</span>
+ <pre><span class="ruby-comment cmt"># File lib/native_file_types/coco/CocoBasic.rb, line 8</span>
+<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">file_system_file_types</span>
+ {
+ <span class="ruby-constant">RsDos</span>=<span class="ruby-operator">></span><span class="ruby-value">0</span>
+ }
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file