You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
4.8KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>stdio_ext (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="stdio_ext (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="stdio_ext (The Red Hat newlib C Library)">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <link href="index.html#Top" rel="start" title="Top">
  13. <link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
  14. <link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
  15. <link href="Stdio.html#Stdio" rel="up" title="Stdio">
  16. <link href="swprintf.html#swprintf" rel="next" title="swprintf">
  17. <link href="sscanf.html#sscanf" rel="prev" title="sscanf">
  18. <style type="text/css">
  19. <!--
  20. a.summary-letter {text-decoration: none}
  21. blockquote.indentedblock {margin-right: 0em}
  22. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  23. blockquote.smallquotation {font-size: smaller}
  24. div.display {margin-left: 3.2em}
  25. div.example {margin-left: 3.2em}
  26. div.lisp {margin-left: 3.2em}
  27. div.smalldisplay {margin-left: 3.2em}
  28. div.smallexample {margin-left: 3.2em}
  29. div.smalllisp {margin-left: 3.2em}
  30. kbd {font-style: oblique}
  31. pre.display {font-family: inherit}
  32. pre.format {font-family: inherit}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. pre.smalldisplay {font-family: inherit; font-size: smaller}
  36. pre.smallexample {font-size: smaller}
  37. pre.smallformat {font-family: inherit; font-size: smaller}
  38. pre.smalllisp {font-size: smaller}
  39. span.nolinebreak {white-space: nowrap}
  40. span.roman {font-family: initial; font-weight: normal}
  41. span.sansserif {font-family: sans-serif; font-weight: normal}
  42. ul.no-bullet {list-style: none}
  43. -->
  44. </style>
  45. </head>
  46. <body lang="en">
  47. <a name="stdio_005fext"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="swprintf.html#swprintf" accesskey="n" rel="next">swprintf</a>, Previous: <a href="sscanf.html#sscanf" accesskey="p" rel="prev">sscanf</a>, Up: <a href="Stdio.html#Stdio" accesskey="u" rel="up">Stdio</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  51. </div>
  52. <hr>
  53. <a name="stdio_005fext_002c_005f_005ffbufsize_002c_005f_005ffpending_002c_005f_005fflbf_002c_005f_005ffreadable_002c_005f_005ffwritable_002c_005f_005ffreading_002c_005f_005ffwriting_002d_002d_002daccess-internals-of-FILE-structure"></a>
  54. <h3 class="section">4.63 <code>stdio_ext</code>,<code>__fbufsize</code>,<code>__fpending</code>,<code>__flbf</code>,<code>__freadable</code>,<code>__fwritable</code>,<code>__freading</code>,<code>__fwriting</code>&mdash;access internals of FILE structure</h3>
  55. <a name="index-_005f_005ffbufsize"></a>
  56. <a name="index-_005f_005ffpending"></a>
  57. <a name="index-_005f_005fflbf"></a>
  58. <a name="index-_005f_005ffreadable"></a>
  59. <a name="index-_005f_005ffwritable"></a>
  60. <a name="index-_005f_005ffreading"></a>
  61. <a name="index-_005f_005ffwriting"></a>
  62. <p><strong>Synopsis</strong>
  63. </p><div class="example">
  64. <pre class="example">#include &lt;stdio.h&gt;
  65. #include &lt;stdio_ext.h&gt;
  66. size_t __fbufsize(FILE *<var>fp</var>);
  67. size_t __fpending(FILE *<var>fp</var>);
  68. int __flbf(FILE *<var>fp</var>);
  69. int __freadable(FILE *<var>fp</var>);
  70. int __fwritable(FILE *<var>fp</var>);
  71. int __freading(FILE *<var>fp</var>);
  72. int __fwriting(FILE *<var>fp</var>);
  73. </pre></div>
  74. <p><strong>Description</strong><br>
  75. These functions provides access to the internals of the FILE structure <var>fp</var>.
  76. </p>
  77. <br>
  78. <p><strong>Returns</strong><br>
  79. <code>__fbufsize</code> returns the number of bytes in the buffer of stream <var>fp</var>.
  80. </p>
  81. <p><code>__fpending</code> returns the number of bytes in the output buffer of stream <var>fp</var>.
  82. </p>
  83. <p><code>__flbf</code> returns nonzero if stream <var>fp</var> is line-buffered, and <code>0</code> if not.
  84. </p>
  85. <p><code>__freadable</code> returns nonzero if stream <var>fp</var> may be read, and <code>0</code> if not.
  86. </p>
  87. <p><code>__fwritable</code> returns nonzero if stream <var>fp</var> may be written, and <code>0</code> if not.
  88. </p>
  89. <p><code>__freading</code> returns nonzero if stream <var>fp</var> if the last operation on
  90. it was a read, or if it read-only, and <code>0</code> if not.
  91. </p>
  92. <p><code>__fwriting</code> returns nonzero if stream <var>fp</var> if the last operation on
  93. it was a write, or if it write-only, and <code>0</code> if not.
  94. </p>
  95. <br>
  96. <p><strong>Portability</strong><br>
  97. These functions originate from Solaris and are also provided by GNU libc.
  98. </p>
  99. <p>No supporting OS subroutines are required.
  100. </p>
  101. <br>
  102. </body>
  103. </html>