OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [FileSystem/] [FatFs-0.7e/] [doc/] [en/] [gets.html] - Blame information for rev 606

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 606 jeremybenn
<!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="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
8
<title>FatFs - f_gets</title>
9
</head>
10
 
11
<body>
12
 
13
<div class="para">
14
<h2>f_gets</h2>
15
<p>The f_gets reads a string from the file.</p>
16
<pre>
17
char* f_gets (
18
  char* <em>Str</em>,        /* Read buffer */
19
  int <em>Size</em>,         /* Size of the read buffer */
20
  FIL* <em>FileObject</em>   /* File object */
21
);
22
</pre>
23
</div>
24
 
25
<div class="para">
26
<h4>Parameters</h4>
27
<dl class="par">
28
<dt>Str</dt>
29
<dd>Pointer to read buffer to store the read string.</dd>
30
<dt>Size</dt>
31
<dd>Size of the read buffer.</dd>
32
<dt>FileObject</dt>
33
<dd>Pointer to the open file object structure.</dd>
34
</dl>
35
</div>
36
 
37
 
38
<div class="para">
39
<h4>Return Values</h4>
40
<p>When the function succeeded, <tt>Str</tt> will be returuned.</p>
41
</div>
42
 
43
 
44
<div class="para">
45
<h4>Description</h4>
46
<p>The f_gets() is a wrapper function of <a href="read.html">f_read()</a>. The read operation continues until a <tt>'\n'</tt> is stored, reached end of file or buffer is filled with Size - 1 characters. The read string is terminated with a <tt>'\0'</tt>. When the file has reached end of the file or any error occured during read operation, f_gets() returns a <tt>NULL</tt>. The EOF and error status can be examined with <tt>f_eof()</tt> and <tt>f_error()</tt> macro.</p>
47
</div>
48
 
49
 
50
<div class="para">
51
<h4>QuickInfo</h4>
52
<p>Available when <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\r'</tt>s contained in the file are stripped out.</p>
53
</div>
54
 
55
 
56
<div class="para">
57
<h4>See Also</h4>
58
<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="printf.html">f_printf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
59
</div>
60
 
61
<p class="foot"><a href="../00index_e.html">Return</a></p>
62
</body>
63
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.