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