?? filesys_8h.html
字號:
00499 next.<a class="code" href="unionAddress.html#o0">l</a> = <a class="code" href="buffer_8c.html#a0">diskSect</a>.<a class="code" href="unionDiskBlock.html#o4">Fat32Table</a>[entryNumber];00500 }00501 }<span class="comment">//This repeats until there is a discontinuity</span>00502 00503 <span class="comment">/* next.l now has the cluster entry for last cluster in fragment</span>00504 <span class="comment"> it has a high value if eof (see FAT spec) */</span>00505 00506 00507 ConsoleWrite(<span class="stringliteral">"Size: "</span>);00508 ConsolePutUInt(fragment[c].length);00509 ConsoleWrite(<span class="stringliteral">"sectors."</span>);00510 00511 <span class="comment">//EOF test</span>00512 <span class="keywordflow">if</span> ((next.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o3">b3</a>&0x08) <span class="comment">//Quick test</span>00513 && ((next.<a class="code" href="unionAddress.html#o0">l</a>>0x0ffffff0) | !<a class="code" href="filesys_8h.html#a0">IS_FAT_32</a>)){ <span class="comment">//Complete test</span>00514 <span class="comment">//EOF</span>00515 ConsoleWrite(<span class="stringliteral">" <EOF>\r"</span>);00516 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o3">b3</a> = 0xff;00517 }<span class="keywordflow">else</span>{00518 00519 <span class="comment">//Determine next physical sector for next fragment</span>00520 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> = next.<a class="code" href="unionAddress.html#o0">l</a>;00521 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> *= <a class="code" href="filesys_8c.html#a5">fatSectorsPerCluster</a>;00522 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> += <a class="code" href="filesys_8c.html#a4">dataStart</a>;00523 }00524 00525 c++; <span class="comment">//Advance to next fragment number</span>00526 00527 <span class="keywordflow">if</span> (c==<a class="code" href="filesys_8c.html#a0">MAX_NUMBER_FRAGMENTS</a>){00528 <span class="comment">//End of RAM space allocated for fragment table</span>00529 <span class="comment">//Force end-of-file</span>00530 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o3">b3</a>=0xff;00531 }00532 00533 }<span class="comment">//break or continue to next cluster</span>00534 00535 <span class="keywordflow">return</span> c; <span class="comment">//Return number of fragments;</span>00536 }</div></pre><p>Here is the call graph for this function:<p><center><img src="filesys_8h_a10_cgraph.png" border="0" usemap="#filesys_8h_a10_cgraph_map" alt=""></center><map name="filesys_8h_a10_cgraph_map"><area href="storage_8h.html#a2" shape="rect" coords="189,31,290,54" alt=""><area href="mmc_8c.html#a9" shape="rect" coords="341,7,466,31" alt=""><area href="mmc_8h.html#a2" shape="rect" coords="365,54,442,78" alt=""></map> </td> </tr></table><a class="anchor" name="a9" doxytag="filesys.h::FGetChar" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned char FGetChar </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read a character from current file. <p>This can be called after calling OpenFile. It is a slow method for reading character based file data. fileSize holds the number of characters still left in file to be read, check for fileSize=0 to detect end-of-file. If FGetChar is called after the end of file is reached, it does nothing and returns 0. <p>Definition at line <a class="el" href="filesys_8c-source.html#l00561">561</a> of file <a class="el" href="filesys_8c-source.html">filesys.c</a>.<p>References <a class="el" href="buffer_8h-source.html#l00107">DiskBlock::Raw::buf</a>, <a class="el" href="buffer_8c-source.html#l00013">dataBufPtr</a>, <a class="el" href="buffer_8c-source.html#l00010">diskSect</a>, <a class="el" href="filesys_8c-source.html#l00047">fileSize</a>, <a class="el" href="buffer_8h-source.html#l00129">Address::l</a>, <a class="el" href="filesys_8c-source.html#l00541">LoadNextSector()</a>, <a class="el" href="board_8h-source.html#l00280">Public</a>, <a class="el" href="unionDiskBlock.html#o1">DiskBlock::raw</a>, <a class="el" href="storage_8c-source.html#l00110">ReadDiskSector()</a>, and <a class="el" href="buffer_8c-source.html#l00015">sectorAddress</a>.<p>Referenced by <a class="el" href="aviplay_8c-source.html#l00015">GetAVIBlock()</a>.<p><pre class="fragment"><div>00561 {00562 00563 <span class="keywordflow">if</span> (!<a class="code" href="filesys_8c.html#a7">fileSize</a>) <span class="keywordflow">return</span> 0; <span class="comment">//return 0 for end-of-file</span>00564 00565 <span class="keywordflow">if</span> (<a class="code" href="buffer_8c.html#a1">dataBufPtr</a>==0){00566 <span class="comment">/* A file has been opened but not read from yet, so read the first</span>00567 <span class="comment"> sector. */</span>00568 <a class="code" href="storage_8h.html#a2">ReadDiskSector</a>(<a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a>);00569 <a class="code" href="buffer_8c.html#a1">dataBufPtr</a> = <a class="code" href="buffer_8c.html#a0">diskSect</a>.<a class="code" href="unionDiskBlock.html#o1">raw</a>.<a class="code" href="structDiskBlock_1_1Raw.html#o0">buf</a>;00570 }00571 00572 <span class="keywordflow">if</span> (<a class="code" href="buffer_8c.html#a1">dataBufPtr</a>><a class="code" href="buffer_8c.html#a0">diskSect</a>.<a class="code" href="unionDiskBlock.html#o1">raw</a>.<a class="code" href="structDiskBlock_1_1Raw.html#o0">buf</a>+511){00573 <span class="comment">/* An end of sector has been reached, read the next sector */</span> 00574 <span class="keywordflow">if</span> (<a class="code" href="filesys_8c.html#a20">LoadNextSector</a>()){00575 <span class="comment">/* Error, end-of-file according to FAT records */</span>00576 <span class="keywordflow">return</span> 0; <span class="comment">/* must return something */</span>00577 }00578 <a class="code" href="buffer_8c.html#a1">dataBufPtr</a>=<a class="code" href="buffer_8c.html#a0">diskSect</a>.<a class="code" href="unionDiskBlock.html#o1">raw</a>.<a class="code" href="structDiskBlock_1_1Raw.html#o0">buf</a>;00579 }00580 00581 <span class="comment">/* Everything should now be ok for reading a byte. */</span>00582 00583 <a class="code" href="filesys_8c.html#a7">fileSize</a>--;00584 <span class="keywordflow">return</span> (*<a class="code" href="buffer_8c.html#a1">dataBufPtr</a>++);00585 }</div></pre><p>Here is the call graph for this function:<p><center><img src="filesys_8h_a9_cgraph.png" border="0" usemap="#filesys_8h_a9_cgraph_map" alt=""></center><map name="filesys_8h_a9_cgraph_map"><area href="filesys_8c.html#a20" shape="rect" coords="133,56,235,80" alt=""><area href="storage_8h.html#a2" shape="rect" coords="429,56,530,80" alt=""><area href="filesys_8c.html#a18" shape="rect" coords="285,6,378,30" alt=""></map> </td> </tr></table><a class="anchor" name="a7" doxytag="filesys.h::InitFileSystem" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned char InitFileSystem </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -