eof.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <link rel="up" title="FatFs" href="../00index_e.html">
  7. <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/eof.html">
  8. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  9. <title>FatFs - f_eof</title>
  10. </head>
  11. <body>
  12. <div class="para func">
  13. <h2>f_eof</h2>
  14. <p>The f_eof function tests for end-of-file on a file.</p>
  15. <pre>
  16. int f_eof (
  17. FIL* <span class="arg">fp</span> <span class="c">/* [IN] File object */</span>
  18. );
  19. </pre>
  20. </div>
  21. <div class="para arg">
  22. <h4>Parameters</h4>
  23. <dl class="par">
  24. <dt>fp</dt>
  25. <dd>Pointer to the open file object structure.</dd>
  26. </dl>
  27. </div>
  28. <div class="para ret">
  29. <h4>Return Values</h4>
  30. <p>The <tt>f_eof</tt> function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.</p>
  31. </div>
  32. <div class="para desc">
  33. <h4>Description</h4>
  34. <p>In this revision, this function is implemented as a macro. It does not have any validation and mutual exclusion.</p>
  35. <pre>
  36. <span class="k">#define</span> f_eof(fp) ((int)((fp)->fptr == (fp)->fsize))
  37. </pre>
  38. </div>
  39. <div class="para comp">
  40. <h4>QuickInfo</h4>
  41. <p>Always available.</p>
  42. </div>
  43. <div class="para ref">
  44. <h4>See Also</h4>
  45. <p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
  46. </div>
  47. <p class="foot"><a href="../00index_e.html">Return</a></p>
  48. </body>
  49. </html>