dsktool 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dskexplorer.rb +15 -4
- data/bin/dskexplorer.rb~ +275 -0
- data/bin/dsktool.rb +1 -1
- data/bin/dsktool.rb~ +150 -0
- data/lib/DSK.rb~ +134 -0
- data/test/tc_dos_disks.rb~ +79 -0
- metadata +65 -252
- data/doc/classes/AppleSoftFile.src/M000011.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000012.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000013.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000014.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000020.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000021.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000022.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000026.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000027.html +0 -18
- data/doc/classes/AppleSoftFile.src/M000028.html +0 -18
- data/doc/classes/BinaryFile.src/M000023.html +0 -18
- data/doc/classes/BinaryFile.src/M000024.html +0 -18
- data/doc/classes/BinaryFile.src/M000025.html +0 -18
- data/doc/classes/BinaryFile.src/M000026.html +0 -19
- data/doc/classes/BinaryFile.src/M000029.html +0 -18
- data/doc/classes/BinaryFile.src/M000030.html +0 -18
- data/doc/classes/BinaryFile.src/M000031.html +0 -19
- data/doc/classes/BinaryFile.src/M000039.html +0 -18
- data/doc/classes/BinaryFile.src/M000040.html +0 -18
- data/doc/classes/BinaryFile.src/M000041.html +0 -19
- data/doc/classes/BinaryFile.src/M000045.html +0 -18
- data/doc/classes/BinaryFile.src/M000046.html +0 -18
- data/doc/classes/BinaryFile.src/M000047.html +0 -19
- data/doc/classes/CatalogServlet.html +0 -146
- data/doc/classes/CatalogServlet.src/M000015.html +0 -20
- data/doc/classes/CatalogServlet.src/M000021.html +0 -20
- data/doc/classes/D65.src/M000009.html +0 -18
- data/doc/classes/D65.src/M000010.html +0 -18
- data/doc/classes/D65.src/M000011.html +0 -64
- data/doc/classes/D65.src/M000018.html +0 -18
- data/doc/classes/D65.src/M000019.html +0 -64
- data/doc/classes/D65.src/M000024.html +0 -18
- data/doc/classes/D65.src/M000025.html +0 -64
- data/doc/classes/DOSDisk.src/M000014.html +0 -20
- data/doc/classes/DOSDisk.src/M000015.html +0 -20
- data/doc/classes/DOSDisk.src/M000016.html +0 -19
- data/doc/classes/DOSDisk.src/M000017.html +0 -76
- data/doc/classes/DOSDisk.src/M000023.html +0 -20
- data/doc/classes/DOSDisk.src/M000024.html +0 -19
- data/doc/classes/DOSDisk.src/M000025.html +0 -76
- data/doc/classes/DOSDisk.src/M000029.html +0 -20
- data/doc/classes/DOSDisk.src/M000030.html +0 -19
- data/doc/classes/DOSDisk.src/M000031.html +0 -76
- data/doc/classes/DOSFile.src/M000026.html +0 -22
- data/doc/classes/DOSFile.src/M000027.html +0 -22
- data/doc/classes/DOSFile.src/M000028.html +0 -17
- data/doc/classes/DOSFile.src/M000029.html +0 -18
- data/doc/classes/DOSFile.src/M000032.html +0 -22
- data/doc/classes/DOSFile.src/M000033.html +0 -17
- data/doc/classes/DOSFile.src/M000034.html +0 -18
- data/doc/classes/DOSFile.src/M000042.html +0 -22
- data/doc/classes/DOSFile.src/M000043.html +0 -18
- data/doc/classes/DOSFile.src/M000044.html +0 -18
- data/doc/classes/DOSFile.src/M000048.html +0 -22
- data/doc/classes/DOSFile.src/M000049.html +0 -18
- data/doc/classes/DOSFile.src/M000050.html +0 -18
- data/doc/classes/DOSFile.src/M000051.html +0 -31
- data/doc/classes/DSK.src/M000021.html +0 -19
- data/doc/classes/DSK.src/M000022.html +0 -18
- data/doc/classes/DSK.src/M000023.html +0 -40
- data/doc/classes/DSK.src/M000024.html +0 -23
- data/doc/classes/DSK.src/M000027.html +0 -18
- data/doc/classes/DSK.src/M000028.html +0 -22
- data/doc/classes/DSK.src/M000029.html +0 -22
- data/doc/classes/DSK.src/M000030.html +0 -34
- data/doc/classes/DSK.src/M000031.html +0 -19
- data/doc/classes/DSK.src/M000032.html +0 -18
- data/doc/classes/DSK.src/M000033.html +0 -18
- data/doc/classes/DSK.src/M000034.html +0 -22
- data/doc/classes/DSK.src/M000035.html +0 -22
- data/doc/classes/DSK.src/M000036.html +0 -34
- data/doc/classes/DSK.src/M000037.html +0 -19
- data/doc/classes/DSK.src/M000038.html +0 -18
- data/doc/classes/DSK.src/M000039.html +0 -40
- data/doc/classes/DSK.src/M000040.html +0 -23
- data/doc/classes/DirectoryServlet.html +0 -146
- data/doc/classes/DirectoryServlet.src/M000017.html +0 -20
- data/doc/classes/DirectoryServlet.src/M000023.html +0 -20
- data/doc/classes/IntegerBasicFile.src/M000006.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000007.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000008.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000012.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000013.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000014.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000018.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000019.html +0 -18
- data/doc/classes/IntegerBasicFile.src/M000020.html +0 -18
- data/doc/classes/RDoc.html +0 -141
- data/doc/classes/RDoc.src/M000032.html +0 -40
- data/doc/classes/RDoc.src/M000033.html +0 -40
- data/doc/classes/RDoc.src/M000038.html +0 -40
- data/doc/classes/RDoc.src/M000048.html +0 -40
- data/doc/classes/RDoc.src/M000055.html +0 -40
- data/doc/classes/SCAsmFile.html +0 -226
- data/doc/classes/SCAsmFile.src/M000025.html +0 -18
- data/doc/classes/SCAsmFile.src/M000026.html +0 -18
- data/doc/classes/SCAsmFile.src/M000027.html +0 -18
- data/doc/classes/SCAsmFile.src/M000028.html +0 -36
- data/doc/classes/SCAsmFile.src/M000035.html +0 -18
- data/doc/classes/SCAsmFile.src/M000036.html +0 -18
- data/doc/classes/SCAsmFile.src/M000037.html +0 -18
- data/doc/classes/SCAsmFile.src/M000038.html +0 -36
- data/doc/classes/SCAsmFile.src/M000041.html +0 -18
- data/doc/classes/SCAsmFile.src/M000042.html +0 -18
- data/doc/classes/SCAsmFile.src/M000043.html +0 -18
- data/doc/classes/SCAsmFile.src/M000044.html +0 -36
- data/doc/classes/ShowFileServlet.html +0 -146
- data/doc/classes/ShowFileServlet.src/M000026.html +0 -21
- data/doc/classes/ShowFileServlet.src/M000032.html +0 -22
- data/doc/classes/TestDOSDisks.src/M000004.html +0 -41
- data/doc/classes/TestDOSDisks.src/M000005.html +0 -27
- data/doc/classes/TestDOSDisks.src/M000006.html +0 -24
- data/doc/classes/TestDOSDisks.src/M000007.html +0 -19
- data/doc/classes/TestDOSDisks.src/M000008.html +0 -19
- data/doc/classes/TestDOSDisks.src/M000009.html +0 -25
- data/doc/classes/TestDOSDisks.src/M000010.html +0 -41
- data/doc/classes/TestDOSDisks.src/M000011.html +0 -27
- data/doc/classes/TestDOSDisks.src/M000012.html +0 -24
- data/doc/classes/TestDOSDisks.src/M000013.html +0 -19
- data/doc/classes/TestDOSDisks.src/M000014.html +0 -19
- data/doc/classes/TestDOSDisks.src/M000015.html +0 -25
- data/doc/classes/TestDOSDisks.src/M000016.html +0 -41
- data/doc/classes/TestDOSDisks.src/M000017.html +0 -27
- data/doc/classes/TestDisassembly.src/M000007.html +0 -19
- data/doc/classes/TestDisassembly.src/M000008.html +0 -19
- data/doc/classes/TestDisassembly.src/M000009.html +0 -19
- data/doc/classes/TestDisassembly.src/M000016.html +0 -19
- data/doc/classes/TestDisassembly.src/M000022.html +0 -19
- data/doc/classes/TextFile.src/M000029.html +0 -18
- data/doc/classes/TextFile.src/M000030.html +0 -18
- data/doc/classes/TextFile.src/M000031.html +0 -18
- data/doc/classes/TextFile.src/M000032.html +0 -20
- data/doc/classes/TextFile.src/M000035.html +0 -18
- data/doc/classes/TextFile.src/M000036.html +0 -18
- data/doc/classes/TextFile.src/M000037.html +0 -20
- data/doc/classes/TextFile.src/M000045.html +0 -18
- data/doc/classes/TextFile.src/M000046.html +0 -18
- data/doc/classes/TextFile.src/M000047.html +0 -20
- data/doc/classes/TextFile.src/M000052.html +0 -18
- data/doc/classes/TextFile.src/M000053.html +0 -18
- data/doc/classes/TextFile.src/M000054.html +0 -20
- data/doc/dot/f_0.dot +0 -58
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +0 -14
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +0 -23
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/f_3.dot +0 -32
- data/doc/dot/f_3.png +0 -0
- data/doc/dot/f_4.dot +0 -88
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_5.dot +0 -23
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_6.dot +0 -30
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_7.dot +0 -32
- data/doc/dot/f_7.png +0 -0
- data/doc/dot/f_8.dot +0 -32
- data/doc/dot/f_8.png +0 -0
- data/doc/dot/f_9.dot +0 -14
- data/doc/dot/f_9.png +0 -0
- data/doc/dot/m_0_0.dot +0 -30
- data/doc/dot/m_0_0.png +0 -0
- data/doc/dot/m_6_0.dot +0 -30
- data/doc/dot/m_6_0.png +0 -0
- data/doc/files/bin/dskexplorer_rb.html +0 -339
- data/doc/files/bin/dskexplorer_rb.src/M000001.html +0 -21
- data/doc/files/bin/dskexplorer_rb.src/M000002.html +0 -21
- data/doc/files/bin/dskexplorer_rb.src/M000003.html +0 -22
- data/doc/files/bin/dskexplorer_rb.src/M000004.html +0 -19
- data/doc/files/bin/dskexplorer_rb.src/M000005.html +0 -20
- data/doc/files/bin/dskexplorer_rb.src/M000006.html +0 -22
- data/doc/files/bin/dskexplorer_rb.src/M000007.html +0 -20
- data/doc/files/bin/dskexplorer_rb.src/M000008.html +0 -43
- data/doc/files/bin/dskexplorer_rb.src/M000009.html +0 -55
- data/doc/files/bin/dskexplorer_rb.src/M000010.html +0 -43
- data/doc/files/bin/dskexplorer_rb.src/M000011.html +0 -34
- data/doc/files/bin/dskserver_rb.html +0 -247
- data/doc/files/bin/dskserver_rb.src/M000001.html +0 -22
- data/doc/files/bin/dskserver_rb.src/M000002.html +0 -19
- data/doc/files/bin/dskserver_rb.src/M000003.html +0 -62
- data/doc/files/bin/dskserver_rb.src/M000004.html +0 -39
- data/doc/files/bin/dskserver_rb.src/M000005.html +0 -26
- data/doc/files/lib/rdoc_patch_rb.html +0 -114
- data/test/white_11a.dsk +0 -0
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>get_sector (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 57</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
15
|
-
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">track</span><span class="ruby-operator">*</span><span class="ruby-value">16</span><span class="ruby-operator">*</span><span class="ruby-value">256</span><span class="ruby-operator">+</span><span class="ruby-identifier">sector</span><span class="ruby-operator">*</span><span class="ruby-value">256</span>
|
16
|
-
<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">255</span>]
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>files (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 62</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>
|
15
|
-
<span class="ruby-ivar">@files</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>is_dsk_file? (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 12</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-identifier">filename</span>)
|
15
|
-
<span class="ruby-operator">!</span>(<span class="ruby-identifier">filename</span>.<span class="ruby-identifier">upcase</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/\.DSK$|\.DSK\.GZ$|\.PO$|\.PO\.GZ$/</span>).<span class="ruby-identifier">nil?</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>is_dos33? (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 18</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_dos33?</span>
|
15
|
-
<span class="ruby-comment cmt"># VTOC is at offset 0x11000</span>
|
16
|
-
<span class="ruby-comment cmt"># bytes 1/2/3 are a track number, sector number and DOS version number</span>
|
17
|
-
<span class="ruby-comment cmt"># see if these are reasonable values</span>
|
18
|
-
|
19
|
-
(<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11001</span>]<span class="ruby-operator"><=</span><span class="ruby-value">34</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11002</span>]<span class="ruby-operator"><=</span><span class="ruby-value">15</span>) <span class="ruby-operator">&&</span> (<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-value">0x11003</span>]<span class="ruby-operator">==</span><span class="ruby-value">3</span>)
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 28</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file_bytes</span>=<span class="ruby-value str">"\0"</span><span class="ruby-operator">*</span><span class="ruby-constant">DSK_FILE_LENGTH</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">file_bytes</span>.<span class="ruby-identifier">length!</span>=<span class="ruby-constant">DSK_FILE_LENGTH</span>) <span class="ruby-keyword kw">then</span>
|
16
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"DSK files must be #{DSK_FILE_LENGTH} bytes long (was #{file_bytes.length} bytes)"</span>
|
17
|
-
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-ivar">@file_bytes</span>=<span class="ruby-identifier">file_bytes</span>
|
19
|
-
<span class="ruby-ivar">@files</span>={}
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>read (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 37</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>)
|
15
|
-
<span class="ruby-comment cmt">#is the file extension .gz?</span>
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">filename</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/\.gz$/</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-identifier">require</span> <span class="ruby-value str">'zlib'</span>
|
18
|
-
<span class="ruby-identifier">file_bytes</span>=<span class="ruby-constant">Zlib</span><span class="ruby-operator">::</span><span class="ruby-constant">GzipReader</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-value str">"rb"</span>)).<span class="ruby-identifier">read</span>
|
19
|
-
<span class="ruby-keyword kw">else</span>
|
20
|
-
<span class="ruby-identifier">file_bytes</span>=<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-value str">"rb"</span>).<span class="ruby-identifier">read</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">file_bytes</span>.<span class="ruby-identifier">length!</span>=<span class="ruby-constant">DSK_FILE_LENGTH</span>) <span class="ruby-keyword kw">then</span>
|
23
|
-
<span class="ruby-identifier">abort</span>(<span class="ruby-node">"#{filename} is not a valid DSK format file"</span>)
|
24
|
-
<span class="ruby-keyword kw">end</span>
|
25
|
-
|
26
|
-
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file_bytes</span>)
|
27
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>)
|
28
|
-
<span class="ruby-identifier">require</span> <span class="ruby-value str">'DOSDisk'</span>
|
29
|
-
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DOSDisk</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file_bytes</span>)
|
30
|
-
<span class="ruby-keyword kw">end</span>
|
31
|
-
<span class="ruby-identifier">dsk</span>
|
32
|
-
<span class="ruby-keyword kw">end</span></pre>
|
33
|
-
</body>
|
34
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>get_sector (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 57</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
15
|
-
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">track</span><span class="ruby-operator">*</span><span class="ruby-value">16</span><span class="ruby-operator">*</span><span class="ruby-value">256</span><span class="ruby-operator">+</span><span class="ruby-identifier">sector</span><span class="ruby-operator">*</span><span class="ruby-value">256</span>
|
16
|
-
<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">255</span>]
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>files (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 62</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>
|
15
|
-
<span class="ruby-ivar">@files</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,40 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>dump_sector (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 67</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
15
|
-
|
16
|
-
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">track</span><span class="ruby-operator">*</span><span class="ruby-value">16</span><span class="ruby-operator">*</span><span class="ruby-value">256</span><span class="ruby-operator">+</span><span class="ruby-identifier">sector</span><span class="ruby-operator">*</span><span class="ruby-value">256</span>
|
17
|
-
<span class="ruby-identifier">s</span>=<span class="ruby-ivar">@file_bytes</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">255</span>]
|
18
|
-
|
19
|
-
<span class="ruby-identifier">print_hline</span>
|
20
|
-
<span class="ruby-identifier">printf</span>(<span class="ruby-value str">"TRACK: $%02X SECTOR $%02X\ OFFSET $%04X\n"</span>,<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>,<span class="ruby-identifier">start_byte</span>)
|
21
|
-
<span class="ruby-identifier">printf</span> <span class="ruby-value str">"\t"</span>
|
22
|
-
|
23
|
-
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">printf</span>(<span class="ruby-value str">"%02X "</span>,<span class="ruby-identifier">x</span>) }
|
24
|
-
<span class="ruby-identifier">puts</span>
|
25
|
-
<span class="ruby-identifier">print_hline</span>
|
26
|
-
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line_number</span><span class="ruby-operator">|</span>
|
27
|
-
<span class="ruby-identifier">lhs</span>=<span class="ruby-value str">""</span>
|
28
|
-
<span class="ruby-identifier">rhs</span>=<span class="ruby-value str">""</span>
|
29
|
-
<span class="ruby-identifier">start_byte</span>=<span class="ruby-identifier">line_number</span><span class="ruby-operator">*</span><span class="ruby-value">16</span>
|
30
|
-
<span class="ruby-identifier">line</span>=<span class="ruby-identifier">s</span>[<span class="ruby-identifier">start_byte</span><span class="ruby-operator">..</span><span class="ruby-identifier">start_byte</span><span class="ruby-operator">+</span><span class="ruby-value">15</span>]
|
31
|
-
<span class="ruby-identifier">line</span>.<span class="ruby-identifier">each_byte</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span>
|
32
|
-
<span class="ruby-identifier">lhs</span><span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%02X "</span>, <span class="ruby-identifier">byte</span>)
|
33
|
-
<span class="ruby-identifier">rhs</span><span class="ruby-operator">+=</span> (<span class="ruby-identifier">byte</span><span class="ruby-operator">%</span><span class="ruby-value">128</span>).<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/[\x00-\x1f]/</span>,<span class="ruby-value str">'.'</span>)
|
34
|
-
}
|
35
|
-
<span class="ruby-identifier">printf</span>(<span class="ruby-value str">"%02X\t%s %s\n"</span>,<span class="ruby-identifier">start_byte</span>,<span class="ruby-identifier">lhs</span>,<span class="ruby-identifier">rhs</span>)
|
36
|
-
}
|
37
|
-
|
38
|
-
<span class="ruby-keyword kw">end</span></pre>
|
39
|
-
</body>
|
40
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>dump_disk (DSK)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DSK.rb, line 94</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_disk</span>
|
15
|
-
|
16
|
-
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">34</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">track</span><span class="ruby-operator">|</span>
|
17
|
-
(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">15</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sector</span><span class="ruby-operator">|</span>
|
18
|
-
<span class="ruby-identifier">dump_sector</span>(<span class="ruby-identifier">track</span>,<span class="ruby-identifier">sector</span>)
|
19
|
-
}
|
20
|
-
}
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,146 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: DirectoryServlet</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">DirectoryServlet</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/bin/dskexplorer_rb.html">
|
59
|
-
bin/dskexplorer.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
HTTPServlet::AbstractServlet
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
<div id="diagram">
|
81
|
-
<map id="map" name="map">
|
82
|
-
<area shape="RECT" coords="5,101,101,149" href="CatalogServlet.html" alt="CatalogServlet">
|
83
|
-
<area shape="RECT" coords="125,101,229,149" href="DirectoryServlet.html" alt="DirectoryServlet">
|
84
|
-
<area shape="RECT" coords="253,101,357,149" href="ShowFileServlet.html" alt="ShowFileServlet">
|
85
|
-
<area shape="RECT" coords="95,5,260,53" href="HTTPServlet/AbstractServlet.html" alt="HTTPServlet::AbstractServlet">
|
86
|
-
</map>
|
87
|
-
<img src="../dot/f_0.png" usemap="#map" border=0 alt="TopLevel">
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="method-list">
|
95
|
-
<h3 class="section-bar">Methods</h3>
|
96
|
-
|
97
|
-
<div class="name-list">
|
98
|
-
<a href="#M000023">do_GET</a>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
<!-- if includes -->
|
106
|
-
|
107
|
-
<div id="section">
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<!-- if method_list -->
|
117
|
-
<div id="methods">
|
118
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
119
|
-
|
120
|
-
<div id="method-M000023" class="method-detail">
|
121
|
-
<a name="M000023"></a>
|
122
|
-
|
123
|
-
<div class="method-heading">
|
124
|
-
<a href="DirectoryServlet.src/M000023.html" target="Code" class="method-signature"
|
125
|
-
onclick="popupCode('DirectoryServlet.src/M000023.html');return false;">
|
126
|
-
<span class="method-name">do_GET</span><span class="method-args">(req,res)</span>
|
127
|
-
</a>
|
128
|
-
</div>
|
129
|
-
|
130
|
-
<div class="method-description">
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
</div>
|
136
|
-
|
137
|
-
|
138
|
-
</div>
|
139
|
-
|
140
|
-
|
141
|
-
<div id="validator-badges">
|
142
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
143
|
-
</div>
|
144
|
-
|
145
|
-
</body>
|
146
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>do_GET (DirectoryServlet)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File bin/dskserver.rb, line 138</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_GET</span>(<span class="ruby-identifier">req</span>,<span class="ruby-identifier">res</span>)
|
15
|
-
<span class="ruby-identifier">relative_path</span>=<span class="ruby-constant">CGI</span>.<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">req</span>.<span class="ruby-identifier">path</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^\/dir/</span>,<span class="ruby-value str">""</span>)
|
16
|
-
<span class="ruby-identifier">res</span>[<span class="ruby-value str">'Content-Type'</span>]=<span class="ruby-value str">"text/html"</span>
|
17
|
-
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>=<span class="ruby-identifier">common_header</span><span class="ruby-operator">+</span><span class="ruby-identifier">make_navigation_path</span>(<span class="ruby-identifier">relative_path</span>)<span class="ruby-operator">+</span><span class="ruby-identifier">common_footer</span>
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>do_GET (DirectoryServlet)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File bin/dskexplorer.rb, line 204</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_GET</span>(<span class="ruby-identifier">req</span>,<span class="ruby-identifier">res</span>)
|
15
|
-
<span class="ruby-identifier">relative_path</span>=<span class="ruby-constant">URI</span>.<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">req</span>.<span class="ruby-identifier">path</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^\/dir/</span>,<span class="ruby-value str">""</span>)
|
16
|
-
<span class="ruby-identifier">res</span>[<span class="ruby-value str">'Content-Type'</span>]=<span class="ruby-value str">"text/html"</span>
|
17
|
-
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>=<span class="ruby-identifier">common_header</span><span class="ruby-operator">+</span><span class="ruby-identifier">make_navigation_path</span>(<span class="ruby-identifier">relative_path</span>)<span class="ruby-operator">+</span><span class="ruby-identifier">common_footer</span>
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>file_type (IntegerBasicFile)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 107</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_type</span>
|
15
|
-
<span class="ruby-value str">"I"</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|