doc/files/bin/dskexplorer_rb.src/M000013.html in dsktool-0.2.1 vs doc/files/bin/dskexplorer_rb.src/M000013.html in dsktool-0.4.1

- old
+ new

@@ -8,24 +8,27 @@ <title>show_file (bin/dskexplorer.rb)</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 bin/dskexplorer.rb, line 245</span> + <pre><span class="ruby-comment cmt"># File bin/dskexplorer.rb, line 247</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_file</span>(<span class="ruby-identifier">relative_path</span>,<span class="ruby-identifier">filename</span>,<span class="ruby-identifier">display_mode</span>) <span class="ruby-identifier">absolute_path</span>=<span class="ruby-identifier">make_absolute_path</span>(<span class="ruby-identifier">relative_path</span>) <span class="ruby-identifier">dsk</span>=<span class="ruby-identifier">get_dsk_from_cache</span>(<span class="ruby-identifier">absolute_path</span>) <span class="ruby-identifier">file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-identifier">filename</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">s</span>=<span class="ruby-node">&quot;&lt;i&gt;#{filename} not found&lt;/i&gt;&quot;</span> <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">s</span>=<span class="ruby-value str">&quot;&lt;hl&gt;&lt;pre&gt;&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">display_mode</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;hex&quot;</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-identifier">html_escape</span>(<span class="ruby-identifier">file</span>.<span class="ruby-identifier">hex_dump</span>) - <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">display_mode</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;list&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:disassembly</span>) - <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-identifier">html_escape</span>(<span class="ruby-identifier">file</span>.<span class="ruby-identifier">disassembly</span>) + <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">display_mode</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;list&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:disassembly</span>) <span class="ruby-keyword kw">then</span> + <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-identifier">html_escape</span>(<span class="ruby-identifier">file</span>.<span class="ruby-identifier">disassembly</span>) + <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">display_mode</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;png&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_png</span>) <span class="ruby-keyword kw">then</span> + <span class="ruby-identifier">png_url</span>=<span class="ruby-node">&quot;/png/#{uri_encode(relative_path)}?filename=#{uri_encode(filename)}&quot;</span> + <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-node">&quot;&lt;IMG SRC=#{png_url} HEIGHT=384 WIDTH=560&gt;&quot;</span> <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">file</span>.<span class="ruby-identifier">to_s</span>) + <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-identifier">html_escape</span>(<span class="ruby-identifier">file</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">s</span><span class="ruby-operator">&lt;&lt;</span><span class="ruby-value str">&quot;\n&lt;/pre&gt;&lt;hl&gt;&quot;</span> <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">end</span></pre> \ No newline at end of file