doc/classes/AtariDos.src/M000407.html in ripxplore-0.11.0 vs doc/classes/AtariDos.src/M000407.html in ripxplore-0.12.0

- old
+ new

@@ -3,41 +3,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>files (AtariDos)</title> + <title>host_system (AtariDos)</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/file_systems/AtariDos.rb, line 27</span> -<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">files</span>(<span class="ruby-identifier">file_system_image</span>) - <span class="ruby-identifier">files</span>=<span class="ruby-constant">FileContainer</span>.<span class="ruby-identifier">new</span> -<span class="ruby-comment cmt"># @file_start_sectors={} </span> - <span class="ruby-constant">ATARI_DOS_CATALOG_START_SECTOR</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-constant">ATARI_DOS_CATALOG_END_SECTOR</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sector_no</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">catalog_sector_data</span>=<span class="ruby-identifier">file_system_image</span>.<span class="ruby-identifier">get_sector</span>(<span class="ruby-value">0</span>,<span class="ruby-identifier">sector_no</span>) - <span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-value">7</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record_no</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">catalog_record_data</span>=<span class="ruby-identifier">catalog_sector_data</span>[<span class="ruby-identifier">record_no</span><span class="ruby-operator">*</span><span class="ruby-constant">ATARI_DOS_FILE_RECORD_LENGTH</span>,<span class="ruby-constant">ATARI_DOS_FILE_RECORD_LENGTH</span>] - <span class="ruby-identifier">directory_flag</span>,<span class="ruby-identifier">file_length</span>,<span class="ruby-identifier">start_sector</span>,<span class="ruby-identifier">filename_prefix</span>,<span class="ruby-identifier">filename_ext</span>=<span class="ruby-identifier">catalog_record_data</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">&quot;CvvA8A3&quot;</span>) - <span class="ruby-identifier">file_name</span>=<span class="ruby-node">&quot;#{filename_prefix}.#{filename_ext}&quot;</span> -<span class="ruby-comment cmt"># puts &quot;%08b %02x %02x %s&quot; % [directory_flag,file_length,start_sector,file_name] </span> - <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">start_sector</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">start_sector</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">file_system_image</span>.<span class="ruby-identifier">image_format</span>.<span class="ruby-identifier">sector_count</span><span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">directory_flag</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0x80</span> <span class="ruby-operator">!=</span><span class="ruby-value">0x80</span>)) <span class="ruby-keyword kw">then</span> - <span class="ruby-identifier">current_sector</span>=<span class="ruby-identifier">start_sector</span> - <span class="ruby-identifier">file_contents</span>=<span class="ruby-value str">&quot;&quot;</span> - <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">current_sector!</span>=<span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">current_sector</span><span class="ruby-operator">&lt;=</span><span class="ruby-identifier">file_system_image</span>.<span class="ruby-identifier">image_format</span>.<span class="ruby-identifier">sector_count</span> - <span class="ruby-identifier">file_sector_data</span>=<span class="ruby-identifier">file_system_image</span>.<span class="ruby-identifier">get_sector</span>(<span class="ruby-value">0</span>,<span class="ruby-identifier">current_sector</span>) - <span class="ruby-comment cmt">#raise &quot;invalid sector #{current_sector} in #{file_name}&quot; if file_sector_data.nil? </span> - <span class="ruby-identifier">bytes_used</span>=(<span class="ruby-identifier">file_sector_data</span>[<span class="ruby-value">127</span>] <span class="ruby-operator">&amp;</span> <span class="ruby-value">0x7</span><span class="ruby-constant">F</span>) - <span class="ruby-identifier">file_contents</span><span class="ruby-operator">+=</span><span class="ruby-identifier">file_sector_data</span>[<span class="ruby-value">0</span>,<span class="ruby-identifier">bytes_used</span>] - <span class="ruby-identifier">next_sector_hi</span>=(<span class="ruby-identifier">file_sector_data</span>[<span class="ruby-value">125</span>] <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00000011</span>) - <span class="ruby-identifier">next_sector_lo</span>=<span class="ruby-identifier">file_sector_data</span>[<span class="ruby-value">126</span>] - <span class="ruby-identifier">current_sector</span>=<span class="ruby-identifier">next_sector_hi</span><span class="ruby-operator">*</span><span class="ruby-value">0x100</span><span class="ruby-operator">+</span><span class="ruby-identifier">next_sector_lo</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">files</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-constant">NativeFileType</span>.<span class="ruby-identifier">best_fit</span>(<span class="ruby-identifier">file_system_image</span>,<span class="ruby-identifier">file_name</span>,<span class="ruby-identifier">file_contents</span>,<span class="ruby-identifier">filename_ext</span>) - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">files</span> + <pre><span class="ruby-comment cmt"># File lib/file_systems/AtariDos.rb, line 15</span> +<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">host_system</span> + <span class="ruby-constant">Atari800</span> <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file