puts.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  8. <title>FatFs - fputs</title>
  9. </head>
  10. <body>
  11. <div class="para">
  12. <h2>fputs</h2>
  13. <p>The fputs function writes a string to the file.</p>
  14. <pre>
  15. int fputs (
  16. const char* <em>Str</em>, /* String */
  17. FIL* <em>FileObject</em> /* File object */
  18. );
  19. </pre>
  20. </div>
  21. <div class="para">
  22. <h4>Parameters</h4>
  23. <dl class="par">
  24. <dt>Str</dt>
  25. <dd>Pointer to the null terminated string to be written. The null character will not be written.</dd>
  26. <dt>FileObject</dt>
  27. <dd>Pointer to the open file object structure.</dd>
  28. </dl>
  29. </div>
  30. <div class="para">
  31. <h4>Return Value</h4>
  32. <p>When the function succeeded, number of characters written (not minus value) is returned. When the function failed due to disk full or any error, an <tt>EOF</tt> will be returned.</p>
  33. </div>
  34. <div class="para">
  35. <h4>Description</h4>
  36. <p>The fputs() is a wrapper function of <a href="putc.html">fputc()</a>. This function is available when read-write configuration and <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set 2, a <tt>'\n'</tt> is extended to <tt>"\r\n"</tt>.</p>
  37. </div>
  38. <div class="para">
  39. <h4>Reference</h4>
  40. <p><tt><a href="open.html">f_open</a>, <a href="putc.html">fputc</a>, <a href="printf.html">fprintf</a>, <a href="gets.html">fgets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
  41. </div>
  42. <p class="foot"><a href="../00index_e.html">Return</a></p>
  43. </body>
  44. </html>