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 &quot;ASCII FLAG&quot;</span> - <span class="ruby-identifier">s</span>=<span class="ruby-value str">&quot;&quot;</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">&lt;&lt;</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 &quot;Binary CoCo BASIC file format inconsistant (file size record was = $#{&quot;%X&quot; % file_size}, real file size=$#{&quot;%X&quot; % (contents.length-3)}&quot; 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">&lt;&lt;</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">&lt;</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">&amp;&amp;</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">&lt;&lt;</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">&quot;#{line_number} &quot;</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">&lt;</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">&amp;&amp;</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">&gt;=</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">&amp;&amp;</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">&quot;\n&quot;</span> - - <span class="ruby-identifier">value</span> = <span class="ruby-identifier">contents</span>[<span class="ruby-identifier">p</span>]<span class="ruby-operator">&lt;&lt;</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">&gt;</span><span class="ruby-value">0</span> + } <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file