mirror of
https://github.com/rtlduino/RTL8710AF_GCC.git
synced 2026-07-14 23:35:42 +00:00
motify compile link error
motify compile link error
This commit is contained in:
parent
923914edae
commit
03e74a8e50
5418 changed files with 1367914 additions and 206149 deletions
|
|
@ -0,0 +1,49 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Arglists - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Syscalls.html#Syscalls" title="Syscalls">
|
||||
<link rel="next" href="Document-Index.html#Document-Index" title="Document Index">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Arglists"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Document-Index.html#Document-Index">Document Index</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Syscalls.html#Syscalls">Syscalls</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">13 Variable Argument Lists</h2>
|
||||
|
||||
<p>The <code>printf</code> family of functions is defined to accept a variable
|
||||
number of arguments, rather than a fixed argument list. You can define
|
||||
your own functions with a variable argument list, by using macro
|
||||
definitions from either <samp><span class="file">stdarg.h</span></samp> (for compatibility with ANSI C)
|
||||
or from <samp><span class="file">varargs.h</span></samp> (for compatibility with a popular convention
|
||||
prior to ANSI C).
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Stdarg.html#Stdarg">Stdarg</a>
|
||||
<li><a accesskey="2" href="Varargs.html#Varargs">Varargs</a>
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Ctype - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="next" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Ctype"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Stdio.html#Stdio">Stdio</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Stdlib.html#Stdlib">Stdlib</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">3 Character Type Macros and Functions (<samp><span class="file">ctype.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter groups macros (which are also available as subroutines)
|
||||
to classify characters into several categories (alphabetic,
|
||||
numeric, control characters, whitespace, and so on), or to perform
|
||||
simple character mappings.
|
||||
|
||||
<p>The header file <samp><span class="file">ctype.h</span></samp> defines the macros.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="isalnum.html#isalnum">isalnum</a>: Alphanumeric character predicate
|
||||
<li><a accesskey="2" href="isalpha.html#isalpha">isalpha</a>: Alphabetic character predicate
|
||||
<li><a accesskey="3" href="isascii.html#isascii">isascii</a>: ASCII character predicate
|
||||
<li><a accesskey="4" href="iscntrl.html#iscntrl">iscntrl</a>: Control character predicate
|
||||
<li><a accesskey="5" href="isdigit.html#isdigit">isdigit</a>: Decimal digit predicate
|
||||
<li><a accesskey="6" href="islower.html#islower">islower</a>: Lowercase character predicate
|
||||
<li><a accesskey="7" href="isprint.html#isprint">isprint</a>: Printable character predicates (isprint, isgraph)
|
||||
<li><a accesskey="8" href="ispunct.html#ispunct">ispunct</a>: Punctuation character predicate
|
||||
<li><a accesskey="9" href="isspace.html#isspace">isspace</a>: Whitespace character predicate
|
||||
<li><a href="isupper.html#isupper">isupper</a>: Uppercase character predicate
|
||||
<li><a href="isxdigit.html#isxdigit">isxdigit</a>: Hexadecimal digit predicate
|
||||
<li><a href="toascii.html#toascii">toascii</a>: Force integers to ASCII range
|
||||
<li><a href="tolower.html#tolower">tolower</a>: Translate characters to lowercase
|
||||
<li><a href="toupper.html#toupper">toupper</a>: Translate characters to uppercase
|
||||
<li><a href="iswalnum.html#iswalnum">iswalnum</a>: Alphanumeric wide character predicate
|
||||
<li><a href="iswalpha.html#iswalpha">iswalpha</a>: Alphabetic wide character predicate
|
||||
<li><a href="iswblank.html#iswblank">iswblank</a>: Blank wide character predicate
|
||||
<li><a href="iswcntrl.html#iswcntrl">iswcntrl</a>: Control wide character predicate
|
||||
<li><a href="iswdigit.html#iswdigit">iswdigit</a>: Decimal digit wide character predicate
|
||||
<li><a href="iswgraph.html#iswgraph">iswgraph</a>: Graphic wide character predicate
|
||||
<li><a href="iswlower.html#iswlower">iswlower</a>: Lowercase wide character predicate
|
||||
<li><a href="iswprint.html#iswprint">iswprint</a>: Printable wide character predicate
|
||||
<li><a href="iswpunct.html#iswpunct">iswpunct</a>: Punctuation wide character predicate
|
||||
<li><a href="iswspace.html#iswspace">iswspace</a>: Whitespace wide character predicate
|
||||
<li><a href="iswupper.html#iswupper">iswupper</a>: Uppercase wide character predicate
|
||||
<li><a href="iswxdigit.html#iswxdigit">iswxdigit</a>: Hexadecimal digit wide character predicate
|
||||
<li><a href="iswctype.html#iswctype">iswctype</a>: Extensible wide-character test
|
||||
<li><a href="wctype.html#wctype">wctype</a>: Compute wide-character test type
|
||||
<li><a href="towlower.html#towlower">towlower</a>: Translate wide characters to lowercase
|
||||
<li><a href="towupper.html#towupper">towupper</a>: Translate wide characters to uppercase
|
||||
<li><a href="towctrans.html#towctrans">towctrans</a>: Extensible wide-character translation
|
||||
<li><a href="wctrans.html#wctrans">wctrans</a>: Compute wide-character translation type
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,841 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Document Index - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Arglists.html#Arglists" title="Arglists">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Document-Index"></a>
|
||||
Previous: <a rel="previous" accesskey="p" href="Arglists.html#Arglists">Arglists</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">Document Index</h2>
|
||||
|
||||
<ul class="index-cp" compact>
|
||||
<li><a href="_005f_005fenv_005flock.html#index-g_t_005f_005fenv_005flock-28"><code>__env_lock</code></a>: <a href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a></li>
|
||||
<li><a href="_005f_005fenv_005flock.html#index-g_t_005f_005fenv_005funlock-29"><code>__env_unlock</code></a>: <a href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a></li>
|
||||
<li><a href="fpurge.html#index-g_t_005f_005ffpurge-183"><code>__fpurge</code></a>: <a href="fpurge.html#fpurge">fpurge</a></li>
|
||||
<li><a href="_005f_005fmalloc_005flock.html#index-g_t_005f_005fmalloc_005flock-55"><code>__malloc_lock</code></a>: <a href="_005f_005fmalloc_005flock.html#g_t_005f_005fmalloc_005flock">__malloc_lock</a></li>
|
||||
<li><a href="_005f_005fmalloc_005flock.html#index-g_t_005f_005fmalloc_005funlock-56"><code>__malloc_unlock</code></a>: <a href="_005f_005fmalloc_005flock.html#g_t_005f_005fmalloc_005flock">__malloc_lock</a></li>
|
||||
<li><a href="_005f_005ftz_005flock.html#index-g_t_005f_005ftz_005flock-441"><code>__tz_lock</code></a>: <a href="_005f_005ftz_005flock.html#g_t_005f_005ftz_005flock">__tz_lock</a></li>
|
||||
<li><a href="_005f_005ftz_005flock.html#index-g_t_005f_005ftz_005funlock-442"><code>__tz_unlock</code></a>: <a href="_005f_005ftz_005flock.html#g_t_005f_005ftz_005flock">__tz_lock</a></li>
|
||||
<li><a href="asctime.html#index-g_t_005fasctime_005fr-429"><code>_asctime_r</code></a>: <a href="asctime.html#asctime">asctime</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005fasiprintf_005fr-276"><code>_asiprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005fasniprintf_005fr-278"><code>_asniprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005fasnprintf_005fr-296"><code>_asnprintf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005fasprintf_005fr-290"><code>_asprintf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="atoi.html#index-g_t_005fatoi_005fr-12"><code>_atoi_r</code></a>: <a href="atoi.html#atoi">atoi</a></li>
|
||||
<li><a href="atoi.html#index-g_t_005fatol_005fr-13"><code>_atol_r</code></a>: <a href="atoi.html#atoi">atoi</a></li>
|
||||
<li><a href="atoll.html#index-g_t_005fatoll_005fr-15"><code>_atoll_r</code></a>: <a href="atoll.html#atoll">atoll</a></li>
|
||||
<li><a href="calloc.html#index-g_t_005fcalloc_005fr-18"><code>_calloc_r</code></a>: <a href="calloc.html#calloc">calloc</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fclose_005fr-486"><code>_close_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="diprintf.html#index-g_t_005fdiprintf_005fr-147"><code>_diprintf_r</code></a>: <a href="diprintf.html#diprintf">diprintf</a></li>
|
||||
<li><a href="dprintf.html#index-g_t_005fdprintf_005fr-151"><code>_dprintf_r</code></a>: <a href="dprintf.html#dprintf">dprintf</a></li>
|
||||
<li><a href="Stubs.html#index-g_t_005fexit-466"><code>_exit</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="_005fExit.html#index-g_t_005fExit-1"><code>_Exit</code></a>: <a href="_005fExit.html#g_t_005fExit">_Exit</a></li>
|
||||
<li><a href="fclose.html#index-g_t_005ffclose_005fr-155"><code>_fclose_r</code></a>: <a href="fclose.html#fclose">fclose</a></li>
|
||||
<li><a href="fcloseall.html#index-g_t_005ffcloseall_005fr-157"><code>_fcloseall_r</code></a>: <a href="fcloseall.html#fcloseall">fcloseall</a></li>
|
||||
<li><a href="fdopen.html#index-g_t_005ffdopen_005fr-159"><code>_fdopen_r</code></a>: <a href="fdopen.html#fdopen">fdopen</a></li>
|
||||
<li><a href="fflush.html#index-g_t_005ffflush_005fr-163"><code>_fflush_r</code></a>: <a href="fflush.html#fflush">fflush</a></li>
|
||||
<li><a href="fgetc.html#index-g_t_005ffgetc_005fr-165"><code>_fgetc_r</code></a>: <a href="fgetc.html#fgetc">fgetc</a></li>
|
||||
<li><a href="fgetpos.html#index-g_t_005ffgetpos_005fr-167"><code>_fgetpos_r</code></a>: <a href="fgetpos.html#fgetpos">fgetpos</a></li>
|
||||
<li><a href="fgets.html#index-g_t_005ffgets_005fr-169"><code>_fgets_r</code></a>: <a href="fgets.html#fgets">fgets</a></li>
|
||||
<li><a href="fgetwc.html#index-g_t_005ffgetwc_005fr-171"><code>_fgetwc_r</code></a>: <a href="fgetwc.html#fgetwc">fgetwc</a></li>
|
||||
<li><a href="fgetws.html#index-g_t_005ffgetws_005fr-175"><code>_fgetws_r</code></a>: <a href="fgetws.html#fgetws">fgetws</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005ffiprintf_005fr-268"><code>_fiprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siscanf.html#index-g_t_005ffiscanf_005fr-282"><code>_fiscanf_r</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="fopen.html#index-g_t_005ffopen_005fr-179"><code>_fopen_r</code></a>: <a href="fopen.html#fopen">fopen</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005ffork_005fr-490"><code>_fork_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005ffprintf_005fr-286"><code>_fprintf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="fpurge.html#index-g_t_005ffpurge_005fr-182"><code>_fpurge_r</code></a>: <a href="fpurge.html#fpurge">fpurge</a></li>
|
||||
<li><a href="fputc.html#index-g_t_005ffputc_005fr-185"><code>_fputc_r</code></a>: <a href="fputc.html#fputc">fputc</a></li>
|
||||
<li><a href="fputs.html#index-g_t_005ffputs_005fr-187"><code>_fputs_r</code></a>: <a href="fputs.html#fputs">fputs</a></li>
|
||||
<li><a href="fputwc.html#index-g_t_005ffputwc_005fr-189"><code>_fputwc_r</code></a>: <a href="fputwc.html#fputwc">fputwc</a></li>
|
||||
<li><a href="fputws.html#index-g_t_005ffputws_005fr-193"><code>_fputws_r</code></a>: <a href="fputws.html#fputws">fputws</a></li>
|
||||
<li><a href="fread.html#index-g_t_005ffread_005fr-195"><code>_fread_r</code></a>: <a href="fread.html#fread">fread</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005ffree_005fr-46"><code>_free_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="freopen.html#index-g_t_005ffreopen_005fr-197"><code>_freopen_r</code></a>: <a href="freopen.html#freopen">freopen</a></li>
|
||||
<li><a href="sscanf.html#index-g_t_005ffscanf_005fr-300"><code>_fscanf_r</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="fseek.html#index-g_t_005ffseek_005fr-200"><code>_fseek_r</code></a>: <a href="fseek.html#fseek">fseek</a></li>
|
||||
<li><a href="fseek.html#index-g_t_005ffseeko_005fr-201"><code>_fseeko_r</code></a>: <a href="fseek.html#fseek">fseek</a></li>
|
||||
<li><a href="fsetpos.html#index-g_t_005ffsetpos_005fr-203"><code>_fsetpos_r</code></a>: <a href="fsetpos.html#fsetpos">fsetpos</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005ffstat_005fr-493"><code>_fstat_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="ftell.html#index-g_t_005fftell_005fr-206"><code>_ftell_r</code></a>: <a href="ftell.html#ftell">ftell</a></li>
|
||||
<li><a href="ftell.html#index-g_t_005fftello_005fr-207"><code>_ftello_r</code></a>: <a href="ftell.html#ftell">ftell</a></li>
|
||||
<li><a href="fwide.html#index-g_t_005ffwide_005fr-212"><code>_fwide_r</code></a>: <a href="fwide.html#fwide">fwide</a></li>
|
||||
<li><a href="swprintf.html#index-g_t_005ffwprintf_005fr-304"><code>_fwprintf_r</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="fwrite.html#index-g_t_005ffwrite_005fr-214"><code>_fwrite_r</code></a>: <a href="fwrite.html#fwrite">fwrite</a></li>
|
||||
<li><a href="swscanf.html#index-g_t_005ffwscanf_005fr-312"><code>_fwscanf_r</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
<li><a href="getc.html#index-g_t_005fgetc_005fr-216"><code>_getc_r</code></a>: <a href="getc.html#getc">getc</a></li>
|
||||
<li><a href="getc_005funlocked.html#index-g_t_005fgetc_005funlocked_005fr-218"><code>_getc_unlocked_r</code></a>: <a href="getc_005funlocked.html#getc_005funlocked">getc_unlocked</a></li>
|
||||
<li><a href="getchar.html#index-g_t_005fgetchar_005fr-220"><code>_getchar_r</code></a>: <a href="getchar.html#getchar">getchar</a></li>
|
||||
<li><a href="getchar_005funlocked.html#index-g_t_005fgetchar_005funlocked_005fr-222"><code>_getchar_unlocked_r</code></a>: <a href="getchar_005funlocked.html#getchar_005funlocked">getchar_unlocked</a></li>
|
||||
<li><a href="gets.html#index-g_t_005fgets_005fr-226"><code>_gets_r</code></a>: <a href="gets.html#gets">gets</a></li>
|
||||
<li><a href="fgetwc.html#index-g_t_005fgetwc_005fr-173"><code>_getwc_r</code></a>: <a href="fgetwc.html#fgetwc">fgetwc</a></li>
|
||||
<li><a href="getwchar.html#index-g_t_005fgetwchar_005fr-229"><code>_getwchar_r</code></a>: <a href="getwchar.html#getwchar">getwchar</a></li>
|
||||
<li><a href="Reentrancy.html#index-g_t_005fimpure_005fptr-454"><code>_impure_ptr</code></a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005fiprintf_005fr-270"><code>_iprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siscanf.html#index-g_t_005fiscanf_005fr-280"><code>_iscanf_r</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005flink_005fr-494"><code>_link_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="setlocale.html#index-g_t_005flocaleconv_005fr-448"><code>_localeconv_r</code></a>: <a href="setlocale.html#setlocale">setlocale</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005flseek_005fr-487"><code>_lseek_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="mallinfo.html#index-g_t_005fmallinfo_005fr-52"><code>_mallinfo_r</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005fmalloc_005fr-43"><code>_malloc_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="mallinfo.html#index-g_t_005fmalloc_005fstats_005fr-53"><code>_malloc_stats_r</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005fmalloc_005fusable_005fsize_005fr-48"><code>_malloc_usable_size_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="mallinfo.html#index-g_t_005fmallopt_005fr-54"><code>_mallopt_r</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="mbsrtowcs.html#index-g_t_005fmbsnrtowcs_005fr-61"><code>_mbsnrtowcs_r</code></a>: <a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a></li>
|
||||
<li><a href="mbsrtowcs.html#index-g_t_005fmbsrtowcs_005fr-59"><code>_mbsrtowcs_r</code></a>: <a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005fmemalign_005fr-47"><code>_memalign_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmkdtemp_005fr-237"><code>_mkdtemp_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmkostemp_005fr-240"><code>_mkostemp_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmkostemps_005fr-241"><code>_mkostemps_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmkstemp_005fr-238"><code>_mkstemp_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmkstemps_005fr-239"><code>_mkstemps_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-g_t_005fmktemp_005fr-236"><code>_mktemp_r</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fopen_005fr-485"><code>_open_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="perror.html#index-g_t_005fperror_005fr-245"><code>_perror_r</code></a>: <a href="perror.html#perror">perror</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005fprintf_005fr-288"><code>_printf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="putc.html#index-g_t_005fputc_005fr-247"><code>_putc_r</code></a>: <a href="putc.html#putc">putc</a></li>
|
||||
<li><a href="putc_005funlocked.html#index-g_t_005fputc_005funlocked_005fr-249"><code>_putc_unlocked_r</code></a>: <a href="putc_005funlocked.html#putc_005funlocked">putc_unlocked</a></li>
|
||||
<li><a href="putchar.html#index-g_t_005fputchar_005fr-251"><code>_putchar_r</code></a>: <a href="putchar.html#putchar">putchar</a></li>
|
||||
<li><a href="puts.html#index-g_t_005fputs_005fr-254"><code>_puts_r</code></a>: <a href="puts.html#puts">puts</a></li>
|
||||
<li><a href="fputwc.html#index-g_t_005fputwc_005fr-191"><code>_putwc_r</code></a>: <a href="fputwc.html#fputwc">fputwc</a></li>
|
||||
<li><a href="putwchar.html#index-g_t_005fputwchar_005fr-257"><code>_putwchar_r</code></a>: <a href="putwchar.html#putwchar">putwchar</a></li>
|
||||
<li><a href="raise.html#index-g_t_005fraise_005fr-425"><code>_raise_r</code></a>: <a href="raise.html#raise">raise</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fread_005fr-488"><code>_read_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005frealloc_005fr-44"><code>_realloc_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="malloc.html#index-g_t_005freallocf_005fr-45"><code>_reallocf_r</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="Reentrancy.html#index-g_t_005freent-450"><code>_reent</code></a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="remove.html#index-g_t_005fremove_005fr-259"><code>_remove_r</code></a>: <a href="remove.html#remove">remove</a></li>
|
||||
<li><a href="rewind.html#index-g_t_005frewind_005fr-262"><code>_rewind_r</code></a>: <a href="rewind.html#rewind">rewind</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fsbrk_005fr-496"><code>_sbrk_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="sscanf.html#index-g_t_005fscanf_005fr-298"><code>_scanf_r</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="setlocale.html#index-g_t_005fsetlocale_005fr-447"><code>_setlocale_r</code></a>: <a href="setlocale.html#setlocale">setlocale</a></li>
|
||||
<li><a href="signal.html#index-g_t_005fsignal_005fr-427"><code>_signal_r</code></a>: <a href="signal.html#signal">signal</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005fsiprintf_005fr-272"><code>_siprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siscanf.html#index-g_t_005fsiscanf_005fr-284"><code>_siscanf_r</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="siprintf.html#index-g_t_005fsniprintf_005fr-274"><code>_sniprintf_r</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005fsnprintf_005fr-294"><code>_snprintf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="sprintf.html#index-g_t_005fsprintf_005fr-292"><code>_sprintf_r</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="sscanf.html#index-g_t_005fsscanf_005fr-302"><code>_sscanf_r</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fstat_005fr-492"><code>_stat_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="strtod.html#index-g_t_005fstrtod_005fr-80"><code>_strtod_r</code></a>: <a href="strtod.html#strtod">strtod</a></li>
|
||||
<li><a href="strtol.html#index-g_t_005fstrtol_005fr-83"><code>_strtol_r</code></a>: <a href="strtol.html#strtol">strtol</a></li>
|
||||
<li><a href="strtoll.html#index-g_t_005fstrtoll_005fr-85"><code>_strtoll_r</code></a>: <a href="strtoll.html#strtoll">strtoll</a></li>
|
||||
<li><a href="strtoul.html#index-g_t_005fstrtoul_005fr-87"><code>_strtoul_r</code></a>: <a href="strtoul.html#strtoul">strtoul</a></li>
|
||||
<li><a href="strtoull.html#index-g_t_005fstrtoull_005fr-89"><code>_strtoull_r</code></a>: <a href="strtoull.html#strtoull">strtoull</a></li>
|
||||
<li><a href="swprintf.html#index-g_t_005fswprintf_005fr-308"><code>_swprintf_r</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="swscanf.html#index-g_t_005fswscanf_005fr-314"><code>_swscanf_r</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
<li><a href="system.html#index-g_t_005fsystem_005fr-107"><code>_system_r</code></a>: <a href="system.html#system">system</a></li>
|
||||
<li><a href="tmpnam.html#index-g_t_005ftempnam_005fr-320"><code>_tempnam_r</code></a>: <a href="tmpnam.html#tmpnam">tmpnam</a></li>
|
||||
<li><a href="tmpfile.html#index-g_t_005ftmpfile_005fr-316"><code>_tmpfile_r</code></a>: <a href="tmpfile.html#tmpfile">tmpfile</a></li>
|
||||
<li><a href="tmpnam.html#index-g_t_005ftmpnam_005fr-319"><code>_tmpnam_r</code></a>: <a href="tmpnam.html#tmpnam">tmpnam</a></li>
|
||||
<li><a href="tolower.html#index-g_t_005ftolower-124"><code>_tolower</code></a>: <a href="tolower.html#tolower">tolower</a></li>
|
||||
<li><a href="toupper.html#index-g_t_005ftoupper-126"><code>_toupper</code></a>: <a href="toupper.html#toupper">toupper</a></li>
|
||||
<li><a href="tzset.html#index-g_t_005ftzset_005fr-444"><code>_tzset_r</code></a>: <a href="tzset.html#tzset">tzset</a></li>
|
||||
<li><a href="ungetc.html#index-g_t_005fungetc_005fr-322"><code>_ungetc_r</code></a>: <a href="ungetc.html#ungetc">ungetc</a></li>
|
||||
<li><a href="ungetwc.html#index-g_t_005fungetwc_005fr-324"><code>_ungetwc_r</code></a>: <a href="ungetwc.html#ungetwc">ungetwc</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005funlink_005fr-495"><code>_unlink_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fvasiprintf_005fr-364"><code>_vasiprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fvasniprintf_005fr-366"><code>_vasniprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvasnprintf_005fr-336"><code>_vasnprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvasprintf_005fr-334"><code>_vasprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="diprintf.html#index-g_t_005fvdiprintf_005fr-149"><code>_vdiprintf_r</code></a>: <a href="diprintf.html#diprintf">diprintf</a></li>
|
||||
<li><a href="dprintf.html#index-g_t_005fvdprintf_005fr-153"><code>_vdprintf_r</code></a>: <a href="dprintf.html#dprintf">dprintf</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fvfiprintf_005fr-358"><code>_vfiprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-g_t_005fvfiscanf_005fr-370"><code>_vfiscanf_r</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvfprintf_005fr-326"><code>_vfprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-g_t_005fvfscanf_005fr-338"><code>_vfscanf_r</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-g_t_005fvfwprintf_005fr-344"><code>_vfwprintf_r</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-g_t_005fvfwscanf-350"><code>_vfwscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fviprintf_005fr-356"><code>_viprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-g_t_005fviscanf_005fr-368"><code>_viscanf_r</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvprintf_005fr-328"><code>_vprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-g_t_005fvscanf_005fr-340"><code>_vscanf_r</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fvsiprintf_005fr-360"><code>_vsiprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-g_t_005fvsiscanf_005fr-372"><code>_vsiscanf_r</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="viprintf.html#index-g_t_005fvsniprintf_005fr-362"><code>_vsniprintf_r</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvsnprintf_005fr-332"><code>_vsnprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-g_t_005fvsprintf_005fr-330"><code>_vsprintf_r</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-g_t_005fvsscanf_005fr-342"><code>_vsscanf_r</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-g_t_005fvswprintf_005fr-348"><code>_vswprintf_r</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-g_t_005fvswscanf-354"><code>_vswscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-g_t_005fvwprintf_005fr-346"><code>_vwprintf_r</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-g_t_005fvwscanf-352"><code>_vwscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fwait_005fr-491"><code>_wait_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="wcsdup.html#index-g_t_005fwcsdup_005fr-413"><code>_wcsdup_r</code></a>: <a href="wcsdup.html#wcsdup">wcsdup</a></li>
|
||||
<li><a href="wcsrtombs.html#index-g_t_005fwcsnrtombs_005fr-93"><code>_wcsnrtombs_r</code></a>: <a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a></li>
|
||||
<li><a href="wcsrtombs.html#index-g_t_005fwcsrtombs_005fr-91"><code>_wcsrtombs_r</code></a>: <a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a></li>
|
||||
<li><a href="wcstod.html#index-g_t_005fwcstod_005fr-95"><code>_wcstod_r</code></a>: <a href="wcstod.html#wcstod">wcstod</a></li>
|
||||
<li><a href="wcstod.html#index-g_t_005fwcstof_005fr-97"><code>_wcstof_r</code></a>: <a href="wcstod.html#wcstod">wcstod</a></li>
|
||||
<li><a href="wcstol.html#index-g_t_005fwcstol_005fr-99"><code>_wcstol_r</code></a>: <a href="wcstol.html#wcstol">wcstol</a></li>
|
||||
<li><a href="wcstoll.html#index-g_t_005fwcstoll_005fr-101"><code>_wcstoll_r</code></a>: <a href="wcstoll.html#wcstoll">wcstoll</a></li>
|
||||
<li><a href="wcstoul.html#index-g_t_005fwcstoul_005fr-103"><code>_wcstoul_r</code></a>: <a href="wcstoul.html#wcstoul">wcstoul</a></li>
|
||||
<li><a href="wcstoull.html#index-g_t_005fwcstoull_005fr-105"><code>_wcstoull_r</code></a>: <a href="wcstoull.html#wcstoull">wcstoull</a></li>
|
||||
<li><a href="swprintf.html#index-g_t_005fwprintf_005fr-306"><code>_wprintf_r</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="Reentrant-Syscalls.html#index-g_t_005fwrite_005fr-489"><code>_write_r</code></a>: <a href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a></li>
|
||||
<li><a href="swscanf.html#index-g_t_005fwscanf_005fr-310"><code>_wscanf_r</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
<li><a href="a64l.html#index-a64l-2"><code>a64l</code></a>: <a href="a64l.html#a64l">a64l</a></li>
|
||||
<li><a href="abort.html#index-abort-4"><code>abort</code></a>: <a href="abort.html#abort">abort</a></li>
|
||||
<li><a href="abs.html#index-abs-5"><code>abs</code></a>: <a href="abs.html#abs">abs</a></li>
|
||||
<li><a href="asctime.html#index-asctime-428"><code>asctime</code></a>: <a href="asctime.html#asctime">asctime</a></li>
|
||||
<li><a href="siprintf.html#index-asiprintf-275"><code>asiprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siprintf.html#index-asniprintf-277"><code>asniprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="sprintf.html#index-asnprintf-295"><code>asnprintf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="sprintf.html#index-asprintf-289"><code>asprintf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="assert.html#index-assert-6"><code>assert</code></a>: <a href="assert.html#assert">assert</a></li>
|
||||
<li><a href="atexit.html#index-atexit-7"><code>atexit</code></a>: <a href="atexit.html#atexit">atexit</a></li>
|
||||
<li><a href="atof.html#index-atof-8"><code>atof</code></a>: <a href="atof.html#atof">atof</a></li>
|
||||
<li><a href="atof.html#index-atoff-9"><code>atoff</code></a>: <a href="atof.html#atof">atof</a></li>
|
||||
<li><a href="atoi.html#index-atoi-10"><code>atoi</code></a>: <a href="atoi.html#atoi">atoi</a></li>
|
||||
<li><a href="atoi.html#index-atol-11"><code>atol</code></a>: <a href="atoi.html#atoi">atoi</a></li>
|
||||
<li><a href="atoll.html#index-atoll-14"><code>atoll</code></a>: <a href="atoll.html#atoll">atoll</a></li>
|
||||
<li><a href="bcmp.html#index-bcmp-373"><code>bcmp</code></a>: <a href="bcmp.html#bcmp">bcmp</a></li>
|
||||
<li><a href="bsearch.html#index-bsearch-16"><code>bsearch</code></a>: <a href="bsearch.html#bsearch">bsearch</a></li>
|
||||
<li><a href="bzero.html#index-bzero-374"><code>bzero</code></a>: <a href="bzero.html#bzero">bzero</a></li>
|
||||
<li><a href="calloc.html#index-calloc-17"><code>calloc</code></a>: <a href="calloc.html#calloc">calloc</a></li>
|
||||
<li><a href="clearerr.html#index-clearerr-145"><code>clearerr</code></a>: <a href="clearerr.html#clearerr">clearerr</a></li>
|
||||
<li><a href="clock.html#index-clock-430"><code>clock</code></a>: <a href="clock.html#clock">clock</a></li>
|
||||
<li><a href="Stubs.html#index-close-467"><code>close</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="ctime.html#index-ctime-431"><code>ctime</code></a>: <a href="ctime.html#ctime">ctime</a></li>
|
||||
<li><a href="ctime.html#index-ctime_005fr-432"><code>ctime_r</code></a>: <a href="ctime.html#ctime">ctime</a></li>
|
||||
<li><a href="difftime.html#index-difftime-433"><code>difftime</code></a>: <a href="difftime.html#difftime">difftime</a></li>
|
||||
<li><a href="diprintf.html#index-diprintf-146"><code>diprintf</code></a>: <a href="diprintf.html#diprintf">diprintf</a></li>
|
||||
<li><a href="div.html#index-div-19"><code>div</code></a>: <a href="div.html#div">div</a></li>
|
||||
<li><a href="dprintf.html#index-dprintf-150"><code>dprintf</code></a>: <a href="dprintf.html#dprintf">dprintf</a></li>
|
||||
<li><a href="rand48.html#index-drand48-70"><code>drand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="ecvt.html#index-ecvt-20"><code>ecvt</code></a>: <a href="ecvt.html#ecvt">ecvt</a></li>
|
||||
<li><a href="ecvtbuf.html#index-ecvtbuf-26"><code>ecvtbuf</code></a>: <a href="ecvtbuf.html#ecvtbuf">ecvtbuf</a></li>
|
||||
<li><a href="ecvt.html#index-ecvtf-21"><code>ecvtf</code></a>: <a href="ecvt.html#ecvt">ecvt</a></li>
|
||||
<li><a href="Stubs.html#index-environ-468"><code>environ</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="getenv.html#index-environ-32"><code>environ</code></a>: <a href="getenv.html#getenv">getenv</a></li>
|
||||
<li><a href="rand48.html#index-erand48-71"><code>erand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="Stubs.html#index-g_t_0040code_007berrno_007d-global-vs-macro-465"><code>errno</code> global vs macro</a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="Stubs.html#index-execve-469"><code>execve</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="exit.html#index-exit-30"><code>exit</code></a>: <a href="exit.html#exit">exit</a></li>
|
||||
<li><a href="Reentrancy.html#index-extra-argument_002c-reentrant-fns-455">extra argument, reentrant fns</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="fclose.html#index-fclose-154"><code>fclose</code></a>: <a href="fclose.html#fclose">fclose</a></li>
|
||||
<li><a href="fcloseall.html#index-fcloseall-156"><code>fcloseall</code></a>: <a href="fcloseall.html#fcloseall">fcloseall</a></li>
|
||||
<li><a href="ecvt.html#index-fcvt-22"><code>fcvt</code></a>: <a href="ecvt.html#ecvt">ecvt</a></li>
|
||||
<li><a href="ecvtbuf.html#index-fcvtbuf-27"><code>fcvtbuf</code></a>: <a href="ecvtbuf.html#ecvtbuf">ecvtbuf</a></li>
|
||||
<li><a href="ecvt.html#index-fcvtf-23"><code>fcvtf</code></a>: <a href="ecvt.html#ecvt">ecvt</a></li>
|
||||
<li><a href="fdopen.html#index-fdopen-158"><code>fdopen</code></a>: <a href="fdopen.html#fdopen">fdopen</a></li>
|
||||
<li><a href="feof.html#index-feof-160"><code>feof</code></a>: <a href="feof.html#feof">feof</a></li>
|
||||
<li><a href="ferror.html#index-ferror-161"><code>ferror</code></a>: <a href="ferror.html#ferror">ferror</a></li>
|
||||
<li><a href="fflush.html#index-fflush-162"><code>fflush</code></a>: <a href="fflush.html#fflush">fflush</a></li>
|
||||
<li><a href="ffs.html#index-ffs-458"><code>ffs</code></a>: <a href="ffs.html#ffs">ffs</a></li>
|
||||
<li><a href="fgetc.html#index-fgetc-164"><code>fgetc</code></a>: <a href="fgetc.html#fgetc">fgetc</a></li>
|
||||
<li><a href="fgetpos.html#index-fgetpos-166"><code>fgetpos</code></a>: <a href="fgetpos.html#fgetpos">fgetpos</a></li>
|
||||
<li><a href="fgets.html#index-fgets-168"><code>fgets</code></a>: <a href="fgets.html#fgets">fgets</a></li>
|
||||
<li><a href="fgetwc.html#index-fgetwc-170"><code>fgetwc</code></a>: <a href="fgetwc.html#fgetwc">fgetwc</a></li>
|
||||
<li><a href="fgetws.html#index-fgetws-174"><code>fgetws</code></a>: <a href="fgetws.html#fgetws">fgetws</a></li>
|
||||
<li><a href="fileno.html#index-fileno-176"><code>fileno</code></a>: <a href="fileno.html#fileno">fileno</a></li>
|
||||
<li><a href="siprintf.html#index-fiprintf-267"><code>fiprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siscanf.html#index-fiscanf-281"><code>fiscanf</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="fmemopen.html#index-fmemopen-177"><code>fmemopen</code></a>: <a href="fmemopen.html#fmemopen">fmemopen</a></li>
|
||||
<li><a href="fopen.html#index-fopen-178"><code>fopen</code></a>: <a href="fopen.html#fopen">fopen</a></li>
|
||||
<li><a href="fopencookie.html#index-fopencookie-180"><code>fopencookie</code></a>: <a href="fopencookie.html#fopencookie">fopencookie</a></li>
|
||||
<li><a href="Stubs.html#index-fork-470"><code>fork</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="sprintf.html#index-fprintf-285"><code>fprintf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="fpurge.html#index-fpurge-181"><code>fpurge</code></a>: <a href="fpurge.html#fpurge">fpurge</a></li>
|
||||
<li><a href="fputc.html#index-fputc-184"><code>fputc</code></a>: <a href="fputc.html#fputc">fputc</a></li>
|
||||
<li><a href="fputs.html#index-fputs-186"><code>fputs</code></a>: <a href="fputs.html#fputs">fputs</a></li>
|
||||
<li><a href="fputwc.html#index-fputwc-188"><code>fputwc</code></a>: <a href="fputwc.html#fputwc">fputwc</a></li>
|
||||
<li><a href="fputws.html#index-fputws-192"><code>fputws</code></a>: <a href="fputws.html#fputws">fputws</a></li>
|
||||
<li><a href="fread.html#index-fread-194"><code>fread</code></a>: <a href="fread.html#fread">fread</a></li>
|
||||
<li><a href="malloc.html#index-free-40"><code>free</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="freopen.html#index-freopen-196"><code>freopen</code></a>: <a href="freopen.html#freopen">freopen</a></li>
|
||||
<li><a href="funopen.html#index-fropen-209"><code>fropen</code></a>: <a href="funopen.html#funopen">funopen</a></li>
|
||||
<li><a href="sscanf.html#index-fscanf-299"><code>fscanf</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="fseek.html#index-fseek-198"><code>fseek</code></a>: <a href="fseek.html#fseek">fseek</a></li>
|
||||
<li><a href="fseek.html#index-fseeko-199"><code>fseeko</code></a>: <a href="fseek.html#fseek">fseek</a></li>
|
||||
<li><a href="fsetpos.html#index-fsetpos-202"><code>fsetpos</code></a>: <a href="fsetpos.html#fsetpos">fsetpos</a></li>
|
||||
<li><a href="Stubs.html#index-fstat-471"><code>fstat</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="ftell.html#index-ftell-204"><code>ftell</code></a>: <a href="ftell.html#ftell">ftell</a></li>
|
||||
<li><a href="ftell.html#index-ftello-205"><code>ftello</code></a>: <a href="ftell.html#ftell">ftell</a></li>
|
||||
<li><a href="funopen.html#index-funopen-208"><code>funopen</code></a>: <a href="funopen.html#funopen">funopen</a></li>
|
||||
<li><a href="fwide.html#index-fwide-211"><code>fwide</code></a>: <a href="fwide.html#fwide">fwide</a></li>
|
||||
<li><a href="funopen.html#index-fwopen-210"><code>fwopen</code></a>: <a href="funopen.html#funopen">funopen</a></li>
|
||||
<li><a href="swprintf.html#index-fwprintf-303"><code>fwprintf</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="fwrite.html#index-fwrite-213"><code>fwrite</code></a>: <a href="fwrite.html#fwrite">fwrite</a></li>
|
||||
<li><a href="swscanf.html#index-fwscanf-311"><code>fwscanf</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
<li><a href="gvcvt.html#index-gcvt-24"><code>gcvt</code></a>: <a href="gvcvt.html#gvcvt">gvcvt</a></li>
|
||||
<li><a href="gvcvt.html#index-gcvtf-25"><code>gcvtf</code></a>: <a href="gvcvt.html#gvcvt">gvcvt</a></li>
|
||||
<li><a href="getc.html#index-getc-215"><code>getc</code></a>: <a href="getc.html#getc">getc</a></li>
|
||||
<li><a href="getc_005funlocked.html#index-getc_005funlocked-217"><code>getc_unlocked</code></a>: <a href="getc_005funlocked.html#getc_005funlocked">getc_unlocked</a></li>
|
||||
<li><a href="getchar.html#index-getchar-219"><code>getchar</code></a>: <a href="getchar.html#getchar">getchar</a></li>
|
||||
<li><a href="getchar_005funlocked.html#index-getchar_005funlocked-221"><code>getchar_unlocked</code></a>: <a href="getchar_005funlocked.html#getchar_005funlocked">getchar_unlocked</a></li>
|
||||
<li><a href="getdelim.html#index-getdelim-223"><code>getdelim</code></a>: <a href="getdelim.html#getdelim">getdelim</a></li>
|
||||
<li><a href="getenv.html#index-getenv-31"><code>getenv</code></a>: <a href="getenv.html#getenv">getenv</a></li>
|
||||
<li><a href="getline.html#index-getline-224"><code>getline</code></a>: <a href="getline.html#getline">getline</a></li>
|
||||
<li><a href="Stubs.html#index-getpid-472"><code>getpid</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="gets.html#index-gets-225"><code>gets</code></a>: <a href="gets.html#gets">gets</a></li>
|
||||
<li><a href="getw.html#index-getw-227"><code>getw</code></a>: <a href="getw.html#getw">getw</a></li>
|
||||
<li><a href="fgetwc.html#index-getwc-172"><code>getwc</code></a>: <a href="fgetwc.html#fgetwc">fgetwc</a></li>
|
||||
<li><a href="getwchar.html#index-getwchar-228"><code>getwchar</code></a>: <a href="getwchar.html#getwchar">getwchar</a></li>
|
||||
<li><a href="Reentrancy.html#index-global-reentrancy-structure-453">global reentrancy structure</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="gmtime.html#index-gmtime-434"><code>gmtime</code></a>: <a href="gmtime.html#gmtime">gmtime</a></li>
|
||||
<li><a href="gmtime.html#index-gmtime_005fr-435"><code>gmtime_r</code></a>: <a href="gmtime.html#gmtime">gmtime</a></li>
|
||||
<li><a href="index.html#index-index-375"><code>index</code></a>: <a href="index.html#index">index</a></li>
|
||||
<li><a href="siprintf.html#index-iprintf-269"><code>iprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="isalnum.html#index-isalnum-110"><code>isalnum</code></a>: <a href="isalnum.html#isalnum">isalnum</a></li>
|
||||
<li><a href="isalpha.html#index-isalpha-111"><code>isalpha</code></a>: <a href="isalpha.html#isalpha">isalpha</a></li>
|
||||
<li><a href="isascii.html#index-isascii-112"><code>isascii</code></a>: <a href="isascii.html#isascii">isascii</a></li>
|
||||
<li><a href="Stubs.html#index-isatty-473"><code>isatty</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="siscanf.html#index-iscanf-279"><code>iscanf</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="iscntrl.html#index-iscntrl-113"><code>iscntrl</code></a>: <a href="iscntrl.html#iscntrl">iscntrl</a></li>
|
||||
<li><a href="isdigit.html#index-isdigit-114"><code>isdigit</code></a>: <a href="isdigit.html#isdigit">isdigit</a></li>
|
||||
<li><a href="isprint.html#index-isgraph-117"><code>isgraph</code></a>: <a href="isprint.html#isprint">isprint</a></li>
|
||||
<li><a href="islower.html#index-islower-115"><code>islower</code></a>: <a href="islower.html#islower">islower</a></li>
|
||||
<li><a href="isprint.html#index-isprint-116"><code>isprint</code></a>: <a href="isprint.html#isprint">isprint</a></li>
|
||||
<li><a href="ispunct.html#index-ispunct-118"><code>ispunct</code></a>: <a href="ispunct.html#ispunct">ispunct</a></li>
|
||||
<li><a href="isspace.html#index-isspace-119"><code>isspace</code></a>: <a href="isspace.html#isspace">isspace</a></li>
|
||||
<li><a href="isupper.html#index-isupper-120"><code>isupper</code></a>: <a href="isupper.html#isupper">isupper</a></li>
|
||||
<li><a href="iswalnum.html#index-iswalnum-127"><code>iswalnum</code></a>: <a href="iswalnum.html#iswalnum">iswalnum</a></li>
|
||||
<li><a href="iswalpha.html#index-iswalpha-128"><code>iswalpha</code></a>: <a href="iswalpha.html#iswalpha">iswalpha</a></li>
|
||||
<li><a href="iswblank.html#index-iswblank-130"><code>iswblank</code></a>: <a href="iswblank.html#iswblank">iswblank</a></li>
|
||||
<li><a href="iswcntrl.html#index-iswcntrl-129"><code>iswcntrl</code></a>: <a href="iswcntrl.html#iswcntrl">iswcntrl</a></li>
|
||||
<li><a href="iswctype.html#index-iswctype-139"><code>iswctype</code></a>: <a href="iswctype.html#iswctype">iswctype</a></li>
|
||||
<li><a href="iswdigit.html#index-iswdigit-131"><code>iswdigit</code></a>: <a href="iswdigit.html#iswdigit">iswdigit</a></li>
|
||||
<li><a href="iswgraph.html#index-iswgraph-132"><code>iswgraph</code></a>: <a href="iswgraph.html#iswgraph">iswgraph</a></li>
|
||||
<li><a href="iswlower.html#index-iswlower-133"><code>iswlower</code></a>: <a href="iswlower.html#iswlower">iswlower</a></li>
|
||||
<li><a href="iswprint.html#index-iswprint-134"><code>iswprint</code></a>: <a href="iswprint.html#iswprint">iswprint</a></li>
|
||||
<li><a href="iswpunct.html#index-iswpunct-135"><code>iswpunct</code></a>: <a href="iswpunct.html#iswpunct">iswpunct</a></li>
|
||||
<li><a href="iswspace.html#index-iswspace-136"><code>iswspace</code></a>: <a href="iswspace.html#iswspace">iswspace</a></li>
|
||||
<li><a href="iswupper.html#index-iswupper-137"><code>iswupper</code></a>: <a href="iswupper.html#iswupper">iswupper</a></li>
|
||||
<li><a href="iswxdigit.html#index-iswxdigit-138"><code>iswxdigit</code></a>: <a href="iswxdigit.html#iswxdigit">iswxdigit</a></li>
|
||||
<li><a href="isxdigit.html#index-isxdigit-121"><code>isxdigit</code></a>: <a href="isxdigit.html#isxdigit">isxdigit</a></li>
|
||||
<li><a href="rand48.html#index-jrand48-75"><code>jrand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="Stubs.html#index-kill-474"><code>kill</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="a64l.html#index-l64a-3"><code>l64a</code></a>: <a href="a64l.html#a64l">a64l</a></li>
|
||||
<li><a href="labs.html#index-labs-33"><code>labs</code></a>: <a href="labs.html#labs">labs</a></li>
|
||||
<li><a href="rand48.html#index-lcong48-78"><code>lcong48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="ldiv.html#index-ldiv-34"><code>ldiv</code></a>: <a href="ldiv.html#ldiv">ldiv</a></li>
|
||||
<li><a href="Stubs.html#index-link-475"><code>link</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="Syscalls.html#index-linking-the-C-library-461">linking the C library</a>: <a href="Syscalls.html#Syscalls">Syscalls</a></li>
|
||||
<li><a href="Reentrancy.html#index-list-of-reentrant-functions-456">list of reentrant functions</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="llabs.html#index-llabs-35"><code>llabs</code></a>: <a href="llabs.html#llabs">llabs</a></li>
|
||||
<li><a href="lldiv.html#index-lldiv-36"><code>lldiv</code></a>: <a href="lldiv.html#lldiv">lldiv</a></li>
|
||||
<li><a href="setlocale.html#index-localeconv-446"><code>localeconv</code></a>: <a href="setlocale.html#setlocale">setlocale</a></li>
|
||||
<li><a href="localtime.html#index-localtime-436"><code>localtime</code></a>: <a href="localtime.html#localtime">localtime</a></li>
|
||||
<li><a href="localtime.html#index-localtime_005fr-437"><code>localtime_r</code></a>: <a href="localtime.html#localtime">localtime</a></li>
|
||||
<li><a href="rand48.html#index-lrand48-72"><code>lrand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="Stubs.html#index-lseek-476"><code>lseek</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="mallinfo.html#index-mallinfo-49"><code>mallinfo</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="malloc.html#index-malloc-37"><code>malloc</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="mallinfo.html#index-malloc_005fstats-50"><code>malloc_stats</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="malloc.html#index-malloc_005fusable_005fsize-42"><code>malloc_usable_size</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="mallinfo.html#index-mallopt-51"><code>mallopt</code></a>: <a href="mallinfo.html#mallinfo">mallinfo</a></li>
|
||||
<li><a href="mblen.html#index-mblen-57"><code>mblen</code></a>: <a href="mblen.html#mblen">mblen</a></li>
|
||||
<li><a href="mbsrtowcs.html#index-mbsnrtowcs-60"><code>mbsnrtowcs</code></a>: <a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a></li>
|
||||
<li><a href="mbsrtowcs.html#index-mbsrtowcs-58"><code>mbsrtowcs</code></a>: <a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a></li>
|
||||
<li><a href="mbstowcs.html#index-mbstowcs-62"><code>mbstowcs</code></a>: <a href="mbstowcs.html#mbstowcs">mbstowcs</a></li>
|
||||
<li><a href="mbtowc.html#index-mbtowc-63"><code>mbtowc</code></a>: <a href="mbtowc.html#mbtowc">mbtowc</a></li>
|
||||
<li><a href="malloc.html#index-memalign-41"><code>memalign</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="memchr.html#index-memchr-376"><code>memchr</code></a>: <a href="memchr.html#memchr">memchr</a></li>
|
||||
<li><a href="memcmp.html#index-memcmp-377"><code>memcmp</code></a>: <a href="memcmp.html#memcmp">memcmp</a></li>
|
||||
<li><a href="memmem.html#index-memmem-378"><code>memmem</code></a>: <a href="memmem.html#memmem">memmem</a></li>
|
||||
<li><a href="memmove.html#index-memmove-379"><code>memmove</code></a>: <a href="memmove.html#memmove">memmove</a></li>
|
||||
<li><a href="memset.html#index-memset-380"><code>memset</code></a>: <a href="memset.html#memset">memset</a></li>
|
||||
<li><a href="mktemp.html#index-mkdtemp-231"><code>mkdtemp</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-mkostemp-234"><code>mkostemp</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-mkostemps-235"><code>mkostemps</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-mkstemp-232"><code>mkstemp</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-mkstemps-233"><code>mkstemps</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktemp.html#index-mktemp-230"><code>mktemp</code></a>: <a href="mktemp.html#mktemp">mktemp</a></li>
|
||||
<li><a href="mktime.html#index-mktime-438"><code>mktime</code></a>: <a href="mktime.html#mktime">mktime</a></li>
|
||||
<li><a href="rand48.html#index-mrand48-74"><code>mrand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="rand48.html#index-nrand48-73"><code>nrand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="on_005fexit.html#index-on_005fexit-64"><code>on_exit</code></a>: <a href="on_005fexit.html#on_005fexit">on_exit</a></li>
|
||||
<li><a href="Stubs.html#index-open-477"><code>open</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="open_005fmemstream.html#index-open_005fmemstream-242"><code>open_memstream</code></a>: <a href="open_005fmemstream.html#open_005fmemstream">open_memstream</a></li>
|
||||
<li><a href="open_005fmemstream.html#index-open_005fwmemstream-243"><code>open_wmemstream</code></a>: <a href="open_005fmemstream.html#open_005fmemstream">open_memstream</a></li>
|
||||
<li><a href="Stubs.html#index-OS-interface-subroutines-464">OS interface subroutines</a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="perror.html#index-perror-244"><code>perror</code></a>: <a href="perror.html#perror">perror</a></li>
|
||||
<li><a href="sprintf.html#index-printf-287"><code>printf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="psignal.html#index-psignal-423"><code>psignal</code></a>: <a href="psignal.html#psignal">psignal</a></li>
|
||||
<li><a href="putc.html#index-putc-246"><code>putc</code></a>: <a href="putc.html#putc">putc</a></li>
|
||||
<li><a href="putc_005funlocked.html#index-putc_005funlocked-248"><code>putc_unlocked</code></a>: <a href="putc_005funlocked.html#putc_005funlocked">putc_unlocked</a></li>
|
||||
<li><a href="putchar.html#index-putchar-250"><code>putchar</code></a>: <a href="putchar.html#putchar">putchar</a></li>
|
||||
<li><a href="putchar_005funlocked.html#index-putchar_005funlocked-252"><code>putchar_unlocked</code></a>: <a href="putchar_005funlocked.html#putchar_005funlocked">putchar_unlocked</a></li>
|
||||
<li><a href="puts.html#index-puts-253"><code>puts</code></a>: <a href="puts.html#puts">puts</a></li>
|
||||
<li><a href="putw.html#index-putw-255"><code>putw</code></a>: <a href="putw.html#putw">putw</a></li>
|
||||
<li><a href="fputwc.html#index-putwc-190"><code>putwc</code></a>: <a href="fputwc.html#fputwc">fputwc</a></li>
|
||||
<li><a href="putwchar.html#index-putwchar-256"><code>putwchar</code></a>: <a href="putwchar.html#putwchar">putwchar</a></li>
|
||||
<li><a href="qsort.html#index-qsort-65"><code>qsort</code></a>: <a href="qsort.html#qsort">qsort</a></li>
|
||||
<li><a href="raise.html#index-raise-424"><code>raise</code></a>: <a href="raise.html#raise">raise</a></li>
|
||||
<li><a href="rand.html#index-rand-66"><code>rand</code></a>: <a href="rand.html#rand">rand</a></li>
|
||||
<li><a href="rand48.html#index-rand48-69"><code>rand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="rand.html#index-rand_005fr-68"><code>rand_r</code></a>: <a href="rand.html#rand">rand</a></li>
|
||||
<li><a href="Stubs.html#index-read-478"><code>read</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="malloc.html#index-realloc-38"><code>realloc</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="malloc.html#index-reallocf-39"><code>reallocf</code></a>: <a href="malloc.html#malloc">malloc</a></li>
|
||||
<li><a href="Reentrancy.html#index-reent_002eh-451"><code>reent.h</code></a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="Reentrancy.html#index-reentrancy-449">reentrancy</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="Reentrancy.html#index-reentrancy-structure-452">reentrancy structure</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="Reentrancy.html#index-reentrant-function-list-457">reentrant function list</a>: <a href="Reentrancy.html#Reentrancy">Reentrancy</a></li>
|
||||
<li><a href="remove.html#index-remove-258"><code>remove</code></a>: <a href="remove.html#remove">remove</a></li>
|
||||
<li><a href="rename.html#index-rename-260"><code>rename</code></a>: <a href="rename.html#rename">rename</a></li>
|
||||
<li><a href="rewind.html#index-rewind-261"><code>rewind</code></a>: <a href="rewind.html#rewind">rewind</a></li>
|
||||
<li><a href="rindex.html#index-rindex-381"><code>rindex</code></a>: <a href="rindex.html#rindex">rindex</a></li>
|
||||
<li><a href="Stubs.html#index-sbrk-479"><code>sbrk</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="sscanf.html#index-scanf-297"><code>scanf</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="rand48.html#index-seed48-77"><code>seed48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="setbuf.html#index-setbuf-263"><code>setbuf</code></a>: <a href="setbuf.html#setbuf">setbuf</a></li>
|
||||
<li><a href="setbuffer.html#index-setbuffer-264"><code>setbuffer</code></a>: <a href="setbuffer.html#setbuffer">setbuffer</a></li>
|
||||
<li><a href="setlinebuf.html#index-setlinebuf-265"><code>setlinebuf</code></a>: <a href="setlinebuf.html#setlinebuf">setlinebuf</a></li>
|
||||
<li><a href="setlocale.html#index-setlocale-445"><code>setlocale</code></a>: <a href="setlocale.html#setlocale">setlocale</a></li>
|
||||
<li><a href="setvbuf.html#index-setvbuf-266"><code>setvbuf</code></a>: <a href="setvbuf.html#setvbuf">setvbuf</a></li>
|
||||
<li><a href="signal.html#index-signal-426"><code>signal</code></a>: <a href="signal.html#signal">signal</a></li>
|
||||
<li><a href="siprintf.html#index-siprintf-271"><code>siprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="siscanf.html#index-siscanf-283"><code>siscanf</code></a>: <a href="siscanf.html#siscanf">siscanf</a></li>
|
||||
<li><a href="siprintf.html#index-sniprintf-273"><code>sniprintf</code></a>: <a href="siprintf.html#siprintf">siprintf</a></li>
|
||||
<li><a href="sprintf.html#index-snprintf-293"><code>snprintf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="sprintf.html#index-sprintf-291"><code>sprintf</code></a>: <a href="sprintf.html#sprintf">sprintf</a></li>
|
||||
<li><a href="rand.html#index-srand-67"><code>srand</code></a>: <a href="rand.html#rand">rand</a></li>
|
||||
<li><a href="rand48.html#index-srand48-76"><code>srand48</code></a>: <a href="rand48.html#rand48">rand48</a></li>
|
||||
<li><a href="sscanf.html#index-sscanf-301"><code>sscanf</code></a>: <a href="sscanf.html#sscanf">sscanf</a></li>
|
||||
<li><a href="Stubs.html#index-stat-480"><code>stat</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="stpcpy.html#index-stpcpy-382"><code>stpcpy</code></a>: <a href="stpcpy.html#stpcpy">stpcpy</a></li>
|
||||
<li><a href="stpncpy.html#index-stpncpy-383"><code>stpncpy</code></a>: <a href="stpncpy.html#stpncpy">stpncpy</a></li>
|
||||
<li><a href="strcasecmp.html#index-strcasecmp-384"><code>strcasecmp</code></a>: <a href="strcasecmp.html#strcasecmp">strcasecmp</a></li>
|
||||
<li><a href="strcasestr.html#index-strcasestr-385"><code>strcasestr</code></a>: <a href="strcasestr.html#strcasestr">strcasestr</a></li>
|
||||
<li><a href="strcat.html#index-strcat-386"><code>strcat</code></a>: <a href="strcat.html#strcat">strcat</a></li>
|
||||
<li><a href="strchr.html#index-strchr-387"><code>strchr</code></a>: <a href="strchr.html#strchr">strchr</a></li>
|
||||
<li><a href="strcmp.html#index-strcmp-388"><code>strcmp</code></a>: <a href="strcmp.html#strcmp">strcmp</a></li>
|
||||
<li><a href="strcoll.html#index-strcoll-389"><code>strcoll</code></a>: <a href="strcoll.html#strcoll">strcoll</a></li>
|
||||
<li><a href="strcpy.html#index-strcpy-390"><code>strcpy</code></a>: <a href="strcpy.html#strcpy">strcpy</a></li>
|
||||
<li><a href="strcspn.html#index-strcspn-391"><code>strcspn</code></a>: <a href="strcspn.html#strcspn">strcspn</a></li>
|
||||
<li><a href="strerror.html#index-strerror-392"><code>strerror</code></a>: <a href="strerror.html#strerror">strerror</a></li>
|
||||
<li><a href="strerror_005fr.html#index-strerror_005fr-393"><code>strerror_r</code></a>: <a href="strerror_005fr.html#strerror_005fr">strerror_r</a></li>
|
||||
<li><a href="strftime.html#index-strftime-439"><code>strftime</code></a>: <a href="strftime.html#strftime">strftime</a></li>
|
||||
<li><a href="strlen.html#index-strlen-394"><code>strlen</code></a>: <a href="strlen.html#strlen">strlen</a></li>
|
||||
<li><a href="strlwr.html#index-strlwr-395"><code>strlwr</code></a>: <a href="strlwr.html#strlwr">strlwr</a></li>
|
||||
<li><a href="strncasecmp.html#index-strncasecmp-396"><code>strncasecmp</code></a>: <a href="strncasecmp.html#strncasecmp">strncasecmp</a></li>
|
||||
<li><a href="strncat.html#index-strncat-397"><code>strncat</code></a>: <a href="strncat.html#strncat">strncat</a></li>
|
||||
<li><a href="strncmp.html#index-strncmp-398"><code>strncmp</code></a>: <a href="strncmp.html#strncmp">strncmp</a></li>
|
||||
<li><a href="strncpy.html#index-strncpy-399"><code>strncpy</code></a>: <a href="strncpy.html#strncpy">strncpy</a></li>
|
||||
<li><a href="strnlen.html#index-strnlen-400"><code>strnlen</code></a>: <a href="strnlen.html#strnlen">strnlen</a></li>
|
||||
<li><a href="strpbrk.html#index-strpbrk-401"><code>strpbrk</code></a>: <a href="strpbrk.html#strpbrk">strpbrk</a></li>
|
||||
<li><a href="strrchr.html#index-strrchr-402"><code>strrchr</code></a>: <a href="strrchr.html#strrchr">strrchr</a></li>
|
||||
<li><a href="strtok.html#index-strsep-408"><code>strsep</code></a>: <a href="strtok.html#strtok">strtok</a></li>
|
||||
<li><a href="strsignal.html#index-strsignal-403"><code>strsignal</code></a>: <a href="strsignal.html#strsignal">strsignal</a></li>
|
||||
<li><a href="strspn.html#index-strspn-404"><code>strspn</code></a>: <a href="strspn.html#strspn">strspn</a></li>
|
||||
<li><a href="strstr.html#index-strstr-405"><code>strstr</code></a>: <a href="strstr.html#strstr">strstr</a></li>
|
||||
<li><a href="strtod.html#index-strtod-79"><code>strtod</code></a>: <a href="strtod.html#strtod">strtod</a></li>
|
||||
<li><a href="strtod.html#index-strtof-81"><code>strtof</code></a>: <a href="strtod.html#strtod">strtod</a></li>
|
||||
<li><a href="strtok.html#index-strtok-406"><code>strtok</code></a>: <a href="strtok.html#strtok">strtok</a></li>
|
||||
<li><a href="strtok.html#index-strtok_005fr-407"><code>strtok_r</code></a>: <a href="strtok.html#strtok">strtok</a></li>
|
||||
<li><a href="strtol.html#index-strtol-82"><code>strtol</code></a>: <a href="strtol.html#strtol">strtol</a></li>
|
||||
<li><a href="strtoll.html#index-strtoll-84"><code>strtoll</code></a>: <a href="strtoll.html#strtoll">strtoll</a></li>
|
||||
<li><a href="strtoul.html#index-strtoul-86"><code>strtoul</code></a>: <a href="strtoul.html#strtoul">strtoul</a></li>
|
||||
<li><a href="strtoull.html#index-strtoull-88"><code>strtoull</code></a>: <a href="strtoull.html#strtoull">strtoull</a></li>
|
||||
<li><a href="strupr.html#index-strupr-409"><code>strupr</code></a>: <a href="strupr.html#strupr">strupr</a></li>
|
||||
<li><a href="strxfrm.html#index-strxfrm-410"><code>strxfrm</code></a>: <a href="strxfrm.html#strxfrm">strxfrm</a></li>
|
||||
<li><a href="Stubs.html#index-stubs-462">stubs</a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="Stubs.html#index-subroutines-for-OS-interface-463">subroutines for OS interface</a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="swprintf.html#index-swprintf-307"><code>swprintf</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="swscanf.html#index-swscanf-313"><code>swscanf</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
<li><a href="system.html#index-system-106"><code>system</code></a>: <a href="system.html#system">system</a></li>
|
||||
<li><a href="tmpnam.html#index-tempnam-318"><code>tempnam</code></a>: <a href="tmpnam.html#tmpnam">tmpnam</a></li>
|
||||
<li><a href="time.html#index-time-440"><code>time</code></a>: <a href="time.html#time">time</a></li>
|
||||
<li><a href="Stubs.html#index-times-481"><code>times</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="tmpfile.html#index-tmpfile-315"><code>tmpfile</code></a>: <a href="tmpfile.html#tmpfile">tmpfile</a></li>
|
||||
<li><a href="tmpnam.html#index-tmpnam-317"><code>tmpnam</code></a>: <a href="tmpnam.html#tmpnam">tmpnam</a></li>
|
||||
<li><a href="toascii.html#index-toascii-122"><code>toascii</code></a>: <a href="toascii.html#toascii">toascii</a></li>
|
||||
<li><a href="tolower.html#index-tolower-123"><code>tolower</code></a>: <a href="tolower.html#tolower">tolower</a></li>
|
||||
<li><a href="toupper.html#index-toupper-125"><code>toupper</code></a>: <a href="toupper.html#toupper">toupper</a></li>
|
||||
<li><a href="towctrans.html#index-towctrans-143"><code>towctrans</code></a>: <a href="towctrans.html#towctrans">towctrans</a></li>
|
||||
<li><a href="towlower.html#index-towlower-141"><code>towlower</code></a>: <a href="towlower.html#towlower">towlower</a></li>
|
||||
<li><a href="towupper.html#index-towupper-142"><code>towupper</code></a>: <a href="towupper.html#towupper">towupper</a></li>
|
||||
<li><a href="tzset.html#index-tzset-443"><code>tzset</code></a>: <a href="tzset.html#tzset">tzset</a></li>
|
||||
<li><a href="unctrl.html#index-unctrl-459"><code>unctrl</code></a>: <a href="unctrl.html#unctrl">unctrl</a></li>
|
||||
<li><a href="unctrl.html#index-unctrllen-460"><code>unctrllen</code></a>: <a href="unctrl.html#unctrl">unctrl</a></li>
|
||||
<li><a href="ungetc.html#index-ungetc-321"><code>ungetc</code></a>: <a href="ungetc.html#ungetc">ungetc</a></li>
|
||||
<li><a href="ungetwc.html#index-ungetwc-323"><code>ungetwc</code></a>: <a href="ungetwc.html#ungetwc">ungetwc</a></li>
|
||||
<li><a href="Stubs.html#index-unlink-482"><code>unlink</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="va_005falist.html#index-va_005falist-500"><code>va_alist</code></a>: <a href="va_005falist.html#va_005falist">va_alist</a></li>
|
||||
<li><a href="va_005farg_002dtrad.html#index-va_005farg-503"><code>va_arg</code></a>: <a href="va_005farg_002dtrad.html#va_005farg_002dtrad">va_arg-trad</a></li>
|
||||
<li><a href="va_005farg.html#index-va_005farg-498"><code>va_arg</code></a>: <a href="va_005farg.html#va_005farg">va_arg</a></li>
|
||||
<li><a href="va_005falist.html#index-va_005fdcl-501"><code>va_dcl</code></a>: <a href="va_005falist.html#va_005falist">va_alist</a></li>
|
||||
<li><a href="va_005fend_002dtrad.html#index-va_005fend-504"><code>va_end</code></a>: <a href="va_005fend_002dtrad.html#va_005fend_002dtrad">va_end-trad</a></li>
|
||||
<li><a href="va_005fend.html#index-va_005fend-499"><code>va_end</code></a>: <a href="va_005fend.html#va_005fend">va_end</a></li>
|
||||
<li><a href="va_005fstart_002dtrad.html#index-va_005fstart-502"><code>va_start</code></a>: <a href="va_005fstart_002dtrad.html#va_005fstart_002dtrad">va_start-trad</a></li>
|
||||
<li><a href="va_005fstart.html#index-va_005fstart-497"><code>va_start</code></a>: <a href="va_005fstart.html#va_005fstart">va_start</a></li>
|
||||
<li><a href="viprintf.html#index-vasiprintf-363"><code>vasiprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viprintf.html#index-vasniprintf-365"><code>vasniprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-vasnprintf-335"><code>vasnprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-vasprintf-333"><code>vasprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="diprintf.html#index-vdiprintf-148"><code>vdiprintf</code></a>: <a href="diprintf.html#diprintf">diprintf</a></li>
|
||||
<li><a href="dprintf.html#index-vdprintf-152"><code>vdprintf</code></a>: <a href="dprintf.html#dprintf">dprintf</a></li>
|
||||
<li><a href="viprintf.html#index-vfiprintf-357"><code>vfiprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-vfiscanf-369"><code>vfiscanf</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="vfprintf.html#index-vfprintf-325"><code>vfprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-vfscanf-337"><code>vfscanf</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-vfwprintf-343"><code>vfwprintf</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-vfwscanf-349"><code>vfwscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="viprintf.html#index-viprintf-355"><code>viprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-viscanf-367"><code>viscanf</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="vfprintf.html#index-vprintf-327"><code>vprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-vscanf-339"><code>vscanf</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="viprintf.html#index-vsiprintf-359"><code>vsiprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="viscanf.html#index-vsiscanf-371"><code>vsiscanf</code></a>: <a href="viscanf.html#viscanf">viscanf</a></li>
|
||||
<li><a href="viprintf.html#index-vsniprintf-361"><code>vsniprintf</code></a>: <a href="viprintf.html#viprintf">viprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-vsnprintf-331"><code>vsnprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfprintf.html#index-vsprintf-329"><code>vsprintf</code></a>: <a href="vfprintf.html#vfprintf">vfprintf</a></li>
|
||||
<li><a href="vfscanf.html#index-vsscanf-341"><code>vsscanf</code></a>: <a href="vfscanf.html#vfscanf">vfscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-vswprintf-347"><code>vswprintf</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-vswscanf-353"><code>vswscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="vfwprintf.html#index-vwprintf-345"><code>vwprintf</code></a>: <a href="vfwprintf.html#vfwprintf">vfwprintf</a></li>
|
||||
<li><a href="vfwscanf.html#index-vwscanf-351"><code>vwscanf</code></a>: <a href="vfwscanf.html#vfwscanf">vfwscanf</a></li>
|
||||
<li><a href="Stubs.html#index-wait-483"><code>wait</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="wcscasecmp.html#index-wcscasecmp-411"><code>wcscasecmp</code></a>: <a href="wcscasecmp.html#wcscasecmp">wcscasecmp</a></li>
|
||||
<li><a href="wcscat.html#index-wcscat-415"><code>wcscat</code></a>: <a href="wcscat.html#wcscat">wcscat</a></li>
|
||||
<li><a href="wcscoll.html#index-wcscoll-416"><code>wcscoll</code></a>: <a href="wcscoll.html#wcscoll">wcscoll</a></li>
|
||||
<li><a href="wcsdup.html#index-wcsdup-412"><code>wcsdup</code></a>: <a href="wcsdup.html#wcsdup">wcsdup</a></li>
|
||||
<li><a href="wcsftime.html#index-wcsftime-417"><code>wcsftime</code></a>: <a href="wcsftime.html#wcsftime">wcsftime</a></li>
|
||||
<li><a href="wcsncasecmp.html#index-wcsncasecmp-414"><code>wcsncasecmp</code></a>: <a href="wcsncasecmp.html#wcsncasecmp">wcsncasecmp</a></li>
|
||||
<li><a href="wcsnlen.html#index-wcsnlen-418"><code>wcsnlen</code></a>: <a href="wcsnlen.html#wcsnlen">wcsnlen</a></li>
|
||||
<li><a href="wcsrtombs.html#index-wcsnrtombs-92"><code>wcsnrtombs</code></a>: <a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a></li>
|
||||
<li><a href="wcsrtombs.html#index-wcsrtombs-90"><code>wcsrtombs</code></a>: <a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a></li>
|
||||
<li><a href="wcstod.html#index-wcstod-94"><code>wcstod</code></a>: <a href="wcstod.html#wcstod">wcstod</a></li>
|
||||
<li><a href="wcstod.html#index-wcstof-96"><code>wcstof</code></a>: <a href="wcstod.html#wcstod">wcstod</a></li>
|
||||
<li><a href="wcstok.html#index-wcstok-419"><code>wcstok</code></a>: <a href="wcstok.html#wcstok">wcstok</a></li>
|
||||
<li><a href="wcstol.html#index-wcstol-98"><code>wcstol</code></a>: <a href="wcstol.html#wcstol">wcstol</a></li>
|
||||
<li><a href="wcstoll.html#index-wcstoll-100"><code>wcstoll</code></a>: <a href="wcstoll.html#wcstoll">wcstoll</a></li>
|
||||
<li><a href="wcstombs.html#index-wcstombs-108"><code>wcstombs</code></a>: <a href="wcstombs.html#wcstombs">wcstombs</a></li>
|
||||
<li><a href="wcstoul.html#index-wcstoul-102"><code>wcstoul</code></a>: <a href="wcstoul.html#wcstoul">wcstoul</a></li>
|
||||
<li><a href="wcstoull.html#index-wcstoull-104"><code>wcstoull</code></a>: <a href="wcstoull.html#wcstoull">wcstoull</a></li>
|
||||
<li><a href="wcswidth.html#index-wcswidth-420"><code>wcswidth</code></a>: <a href="wcswidth.html#wcswidth">wcswidth</a></li>
|
||||
<li><a href="wcsxfrm.html#index-wcsxfrm-421"><code>wcsxfrm</code></a>: <a href="wcsxfrm.html#wcsxfrm">wcsxfrm</a></li>
|
||||
<li><a href="wctomb.html#index-wctomb-109"><code>wctomb</code></a>: <a href="wctomb.html#wctomb">wctomb</a></li>
|
||||
<li><a href="wctrans.html#index-wctrans-144"><code>wctrans</code></a>: <a href="wctrans.html#wctrans">wctrans</a></li>
|
||||
<li><a href="wctype.html#index-wctype-140"><code>wctype</code></a>: <a href="wctype.html#wctype">wctype</a></li>
|
||||
<li><a href="wcwidth.html#index-wcwidth-422"><code>wcwidth</code></a>: <a href="wcwidth.html#wcwidth">wcwidth</a></li>
|
||||
<li><a href="swprintf.html#index-wprintf-305"><code>wprintf</code></a>: <a href="swprintf.html#swprintf">swprintf</a></li>
|
||||
<li><a href="Stubs.html#index-write-484"><code>write</code></a>: <a href="Stubs.html#Stubs">Stubs</a></li>
|
||||
<li><a href="swscanf.html#index-wscanf-309"><code>wscanf</code></a>: <a href="swscanf.html#swscanf">swscanf</a></li>
|
||||
</ul>
|
||||
<div class="contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
<li><a name="toc_Top" href="index.html#Top">The Red Hat newlib C Library</a>
|
||||
<li><a name="toc_Introduction" href="Introduction.html#Introduction">1 Introduction</a>
|
||||
<li><a name="toc_Stdlib" href="Stdlib.html#Stdlib">2 Standard Utility Functions (<samp><span class="file">stdlib.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="_005fExit.html#_005fExit">2.1 <code>_Exit</code>—end program execution with no cleanup processing</a>
|
||||
<li><a href="a64l.html#a64l">2.2 <code>a64l</code>, <code>l64a</code>—convert between radix-64 ASCII string and long</a>
|
||||
<li><a href="abort.html#abort">2.3 <code>abort</code>—abnormal termination of a program</a>
|
||||
<li><a href="abs.html#abs">2.4 <code>abs</code>—integer absolute value (magnitude)</a>
|
||||
<li><a href="assert.html#assert">2.5 <code>assert</code>—macro for debugging diagnostics</a>
|
||||
<li><a href="atexit.html#atexit">2.6 <code>atexit</code>—request execution of functions at program exit</a>
|
||||
<li><a href="atof.html#atof">2.7 <code>atof</code>, <code>atoff</code>—string to double or float</a>
|
||||
<li><a href="atoi.html#atoi">2.8 <code>atoi</code>, <code>atol</code>—string to integer</a>
|
||||
<li><a href="atoll.html#atoll">2.9 <code>atoll</code>—convert a string to a long long integer</a>
|
||||
<li><a href="bsearch.html#bsearch">2.10 <code>bsearch</code>—binary search</a>
|
||||
<li><a href="calloc.html#calloc">2.11 <code>calloc</code>—allocate space for arrays</a>
|
||||
<li><a href="div.html#div">2.12 <code>div</code>—divide two integers</a>
|
||||
<li><a href="ecvt.html#ecvt">2.13 <code>ecvt</code>, <code>ecvtf</code>, <code>fcvt</code>, <code>fcvtf</code>—double or float to string</a>
|
||||
<li><a href="gvcvt.html#gvcvt">2.14 <code>gvcvt</code>, <code>gcvtf</code>—format double or float as string</a>
|
||||
<li><a href="ecvtbuf.html#ecvtbuf">2.15 <code>ecvtbuf</code>, <code>fcvtbuf</code>—double or float to string</a>
|
||||
<li><a href="_005f_005fenv_005flock.html#_005f_005fenv_005flock">2.16 <code>__env_lock</code>, <code>__env_unlock</code>—lock environ variable</a>
|
||||
<li><a href="exit.html#exit">2.17 <code>exit</code>—end program execution</a>
|
||||
<li><a href="getenv.html#getenv">2.18 <code>getenv</code>—look up environment variable</a>
|
||||
<li><a href="labs.html#labs">2.19 <code>labs</code>—long integer absolute value</a>
|
||||
<li><a href="ldiv.html#ldiv">2.20 <code>ldiv</code>—divide two long integers</a>
|
||||
<li><a href="llabs.html#llabs">2.21 <code>llabs</code>—compute the absolute value of an long long integer.</a>
|
||||
<li><a href="lldiv.html#lldiv">2.22 <code>lldiv</code>—divide two long long integers</a>
|
||||
<li><a href="malloc.html#malloc">2.23 <code>malloc</code>, <code>realloc</code>, <code>free</code>—manage memory</a>
|
||||
<li><a href="mallinfo.html#mallinfo">2.24 <code>mallinfo</code>, <code>malloc_stats</code>, <code>mallopt</code>—malloc support</a>
|
||||
<li><a href="_005f_005fmalloc_005flock.html#_005f_005fmalloc_005flock">2.25 <code>__malloc_lock</code>, <code>__malloc_unlock</code>—lock malloc pool</a>
|
||||
<li><a href="mblen.html#mblen">2.26 <code>mblen</code>—minimal multibyte length function</a>
|
||||
<li><a href="mbsrtowcs.html#mbsrtowcs">2.27 <code>mbsrtowcs</code>, <code>mbsnrtowcs</code>—convert a character string to a wide-character string</a>
|
||||
<li><a href="mbstowcs.html#mbstowcs">2.28 <code>mbstowcs</code>—minimal multibyte string to wide char converter</a>
|
||||
<li><a href="mbtowc.html#mbtowc">2.29 <code>mbtowc</code>—minimal multibyte to wide char converter</a>
|
||||
<li><a href="on_005fexit.html#on_005fexit">2.30 <code>on_exit</code>—request execution of function with argument at program exit</a>
|
||||
<li><a href="qsort.html#qsort">2.31 <code>qsort</code>—sort an array</a>
|
||||
<li><a href="rand.html#rand">2.32 <code>rand</code>, <code>srand</code>—pseudo-random numbers</a>
|
||||
<li><a href="rand48.html#rand48">2.33 <code>rand48</code>, <code>drand48</code>, <code>erand48</code>, <code>lrand48</code>, <code>nrand48</code>, <code>mrand48</code>, <code>jrand48</code>, <code>srand48</code>, <code>seed48</code>, <code>lcong48</code>—pseudo-random number generators and initialization routines</a>
|
||||
<li><a href="strtod.html#strtod">2.34 <code>strtod</code>, <code>strtof</code>—string to double or float</a>
|
||||
<li><a href="strtol.html#strtol">2.35 <code>strtol</code>—string to long</a>
|
||||
<li><a href="strtoll.html#strtoll">2.36 <code>strtoll</code>—string to long long</a>
|
||||
<li><a href="strtoul.html#strtoul">2.37 <code>strtoul</code>—string to unsigned long</a>
|
||||
<li><a href="strtoull.html#strtoull">2.38 <code>strtoull</code>—string to unsigned long long</a>
|
||||
<li><a href="wcsrtombs.html#wcsrtombs">2.39 <code>wcsrtombs</code>, <code>wcsnrtombs</code>—convert a wide-character string to a character string</a>
|
||||
<li><a href="wcstod.html#wcstod">2.40 <code>wcstod</code>, <code>wcstof</code>—wide char string to double or float</a>
|
||||
<li><a href="wcstol.html#wcstol">2.41 <code>wcstol</code>—wide string to long</a>
|
||||
<li><a href="wcstoll.html#wcstoll">2.42 <code>wcstoll</code>—wide string to long long</a>
|
||||
<li><a href="wcstoul.html#wcstoul">2.43 <code>wcstoul</code>—wide string to unsigned long</a>
|
||||
<li><a href="wcstoull.html#wcstoull">2.44 <code>wcstoull</code>—wide string to unsigned long long</a>
|
||||
<li><a href="system.html#system">2.45 <code>system</code>—execute command string</a>
|
||||
<li><a href="wcstombs.html#wcstombs">2.46 <code>wcstombs</code>—minimal wide char string to multibyte string converter</a>
|
||||
<li><a href="wctomb.html#wctomb">2.47 <code>wctomb</code>—minimal wide char to multibyte converter</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Ctype" href="Ctype.html#Ctype">3 Character Type Macros and Functions (<samp><span class="file">ctype.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="isalnum.html#isalnum">3.1 <code>isalnum</code>—alphanumeric character predicate</a>
|
||||
<li><a href="isalpha.html#isalpha">3.2 <code>isalpha</code>—alphabetic character predicate</a>
|
||||
<li><a href="isascii.html#isascii">3.3 <code>isascii</code>—ASCII character predicate</a>
|
||||
<li><a href="iscntrl.html#iscntrl">3.4 <code>iscntrl</code>—control character predicate</a>
|
||||
<li><a href="isdigit.html#isdigit">3.5 <code>isdigit</code>—decimal digit predicate</a>
|
||||
<li><a href="islower.html#islower">3.6 <code>islower</code>—lowercase character predicate</a>
|
||||
<li><a href="isprint.html#isprint">3.7 <code>isprint</code>, <code>isgraph</code>—printable character predicates</a>
|
||||
<li><a href="ispunct.html#ispunct">3.8 <code>ispunct</code>—punctuation character predicate</a>
|
||||
<li><a href="isspace.html#isspace">3.9 <code>isspace</code>—whitespace character predicate</a>
|
||||
<li><a href="isupper.html#isupper">3.10 <code>isupper</code>—uppercase character predicate</a>
|
||||
<li><a href="isxdigit.html#isxdigit">3.11 <code>isxdigit</code>—hexadecimal digit predicate</a>
|
||||
<li><a href="toascii.html#toascii">3.12 <code>toascii</code>—force integers to ASCII range</a>
|
||||
<li><a href="tolower.html#tolower">3.13 <code>tolower</code>—translate characters to lowercase</a>
|
||||
<li><a href="toupper.html#toupper">3.14 <code>toupper</code>—translate characters to uppercase</a>
|
||||
<li><a href="iswalnum.html#iswalnum">3.15 <code>iswalnum</code>—alphanumeric wide character test</a>
|
||||
<li><a href="iswalpha.html#iswalpha">3.16 <code>iswalpha</code>—alphabetic wide character test</a>
|
||||
<li><a href="iswcntrl.html#iswcntrl">3.17 <code>iswcntrl</code>—control wide character test</a>
|
||||
<li><a href="iswblank.html#iswblank">3.18 <code>iswblank</code>—blank wide character test</a>
|
||||
<li><a href="iswdigit.html#iswdigit">3.19 <code>iswdigit</code>—decimal digit wide character test</a>
|
||||
<li><a href="iswgraph.html#iswgraph">3.20 <code>iswgraph</code>—graphic wide character test</a>
|
||||
<li><a href="iswlower.html#iswlower">3.21 <code>iswlower</code>—lowercase wide character test</a>
|
||||
<li><a href="iswprint.html#iswprint">3.22 <code>iswprint</code>—printable wide character test</a>
|
||||
<li><a href="iswpunct.html#iswpunct">3.23 <code>iswpunct</code>—punctuation wide character test</a>
|
||||
<li><a href="iswspace.html#iswspace">3.24 <code>iswspace</code>—whitespace wide character test</a>
|
||||
<li><a href="iswupper.html#iswupper">3.25 <code>iswupper</code>—uppercase wide character test</a>
|
||||
<li><a href="iswxdigit.html#iswxdigit">3.26 <code>iswxdigit</code>—hexadecimal digit wide character test</a>
|
||||
<li><a href="iswctype.html#iswctype">3.27 <code>iswctype</code>—extensible wide-character test</a>
|
||||
<li><a href="wctype.html#wctype">3.28 <code>wctype</code>—get wide-character classification type</a>
|
||||
<li><a href="towlower.html#towlower">3.29 <code>towlower</code>—translate wide characters to lowercase</a>
|
||||
<li><a href="towupper.html#towupper">3.30 <code>towupper</code>—translate wide characters to uppercase</a>
|
||||
<li><a href="towctrans.html#towctrans">3.31 <code>towctrans</code>—extensible wide-character translation</a>
|
||||
<li><a href="wctrans.html#wctrans">3.32 <code>wctrans</code>—get wide-character translation type</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Stdio" href="Stdio.html#Stdio">4 Input and Output (<samp><span class="file">stdio.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="clearerr.html#clearerr">4.1 <code>clearerr</code>—clear file or stream error indicator</a>
|
||||
<li><a href="diprintf.html#diprintf">4.2 <code>diprintf</code>, <code>vdiprintf</code>—print to a file descriptor (integer only)</a>
|
||||
<li><a href="dprintf.html#dprintf">4.3 <code>dprintf</code>, <code>vdprintf</code>—print to a file descriptor</a>
|
||||
<li><a href="fclose.html#fclose">4.4 <code>fclose</code>—close a file</a>
|
||||
<li><a href="fcloseall.html#fcloseall">4.5 <code>fcloseall</code>—close all files</a>
|
||||
<li><a href="fdopen.html#fdopen">4.6 <code>fdopen</code>—turn open file into a stream</a>
|
||||
<li><a href="feof.html#feof">4.7 <code>feof</code>—test for end of file</a>
|
||||
<li><a href="ferror.html#ferror">4.8 <code>ferror</code>—test whether read/write error has occurred</a>
|
||||
<li><a href="fflush.html#fflush">4.9 <code>fflush</code>—flush buffered file output</a>
|
||||
<li><a href="fgetc.html#fgetc">4.10 <code>fgetc</code>—get a character from a file or stream</a>
|
||||
<li><a href="fgetpos.html#fgetpos">4.11 <code>fgetpos</code>—record position in a stream or file</a>
|
||||
<li><a href="fgets.html#fgets">4.12 <code>fgets</code>—get character string from a file or stream</a>
|
||||
<li><a href="fgetwc.html#fgetwc">4.13 <code>fgetwc</code>, <code>getwc</code>—get a wide character from a file or stream</a>
|
||||
<li><a href="fgetws.html#fgetws">4.14 <code>fgetws</code>—get wide character string from a file or stream</a>
|
||||
<li><a href="fileno.html#fileno">4.15 <code>fileno</code>—return file descriptor associated with stream</a>
|
||||
<li><a href="fmemopen.html#fmemopen">4.16 <code>fmemopen</code>—open a stream around a fixed-length string</a>
|
||||
<li><a href="fopen.html#fopen">4.17 <code>fopen</code>—open a file</a>
|
||||
<li><a href="fopencookie.html#fopencookie">4.18 <code>fopencookie</code>—open a stream with custom callbacks</a>
|
||||
<li><a href="fpurge.html#fpurge">4.19 <code>fpurge</code>—discard pending file I/O</a>
|
||||
<li><a href="fputc.html#fputc">4.20 <code>fputc</code>—write a character on a stream or file</a>
|
||||
<li><a href="fputs.html#fputs">4.21 <code>fputs</code>—write a character string in a file or stream</a>
|
||||
<li><a href="fputwc.html#fputwc">4.22 <code>fputwc</code>, <code>putwc</code>—write a wide character on a stream or file</a>
|
||||
<li><a href="fputws.html#fputws">4.23 <code>fputws</code>—write a wide character string in a file or stream</a>
|
||||
<li><a href="fread.html#fread">4.24 <code>fread</code>—read array elements from a file</a>
|
||||
<li><a href="freopen.html#freopen">4.25 <code>freopen</code>—open a file using an existing file descriptor</a>
|
||||
<li><a href="fseek.html#fseek">4.26 <code>fseek</code>, <code>fseeko</code>—set file position</a>
|
||||
<li><a href="fsetpos.html#fsetpos">4.27 <code>fsetpos</code>—restore position of a stream or file</a>
|
||||
<li><a href="ftell.html#ftell">4.28 <code>ftell</code>, <code>ftello</code>—return position in a stream or file</a>
|
||||
<li><a href="funopen.html#funopen">4.29 <code>funopen</code>, <code>fropen</code>, <code>fwopen</code>—open a stream with custom callbacks</a>
|
||||
<li><a href="fwide.html#fwide">4.30 <code>fwide</code>—set and determine the orientation of a FILE stream</a>
|
||||
<li><a href="fwrite.html#fwrite">4.31 <code>fwrite</code>—write array elements</a>
|
||||
<li><a href="getc.html#getc">4.32 <code>getc</code>—read a character (macro)</a>
|
||||
<li><a href="getc_005funlocked.html#getc_005funlocked">4.33 <code>getc_unlocked</code>—non-thread-safe version of getc (macro)</a>
|
||||
<li><a href="getchar.html#getchar">4.34 <code>getchar</code>—read a character (macro)</a>
|
||||
<li><a href="getchar_005funlocked.html#getchar_005funlocked">4.35 <code>getchar_unlocked</code>—non-thread-safe version of getchar (macro)</a>
|
||||
<li><a href="getdelim.html#getdelim">4.36 <code>getdelim</code>—read a line up to a specified line delimiter</a>
|
||||
<li><a href="getline.html#getline">4.37 <code>getline</code>—read a line from a file</a>
|
||||
<li><a href="gets.html#gets">4.38 <code>gets</code>—get character string (obsolete, use <code>fgets</code> instead)</a>
|
||||
<li><a href="getw.html#getw">4.39 <code>getw</code>—read a word (int)</a>
|
||||
<li><a href="getwchar.html#getwchar">4.40 <code>getwchar</code>—read a wide character from standard input</a>
|
||||
<li><a href="mktemp.html#mktemp">4.41 <code>mktemp</code>, <code>mkstemp</code>, <code>mkostemp</code>, <code>mkstemps</code>,</a>
|
||||
<li><a href="open_005fmemstream.html#open_005fmemstream">4.42 <code>open_memstream</code>, <code>open_wmemstream</code>—open a write stream around an arbitrary-length string</a>
|
||||
<li><a href="perror.html#perror">4.43 <code>perror</code>—print an error message on standard error</a>
|
||||
<li><a href="putc.html#putc">4.44 <code>putc</code>—write a character (macro)</a>
|
||||
<li><a href="putc_005funlocked.html#putc_005funlocked">4.45 <code>putc_unlocked</code>—non-thread-safe version of putc (macro)</a>
|
||||
<li><a href="putchar.html#putchar">4.46 <code>putchar</code>—write a character (macro)</a>
|
||||
<li><a href="putchar_005funlocked.html#putchar_005funlocked">4.47 <code>putchar_unlocked</code>—non-thread-safe version of putchar (macro)</a>
|
||||
<li><a href="puts.html#puts">4.48 <code>puts</code>—write a character string</a>
|
||||
<li><a href="putw.html#putw">4.49 <code>putw</code>—write a word (int)</a>
|
||||
<li><a href="putwchar.html#putwchar">4.50 <code>putwchar</code>—write a wide character to standard output</a>
|
||||
<li><a href="remove.html#remove">4.51 <code>remove</code>—delete a file's name</a>
|
||||
<li><a href="rename.html#rename">4.52 <code>rename</code>—rename a file</a>
|
||||
<li><a href="rewind.html#rewind">4.53 <code>rewind</code>—reinitialize a file or stream</a>
|
||||
<li><a href="setbuf.html#setbuf">4.54 <code>setbuf</code>—specify full buffering for a file or stream</a>
|
||||
<li><a href="setbuffer.html#setbuffer">4.55 <code>setbuffer</code>—specify full buffering for a file or stream with size</a>
|
||||
<li><a href="setlinebuf.html#setlinebuf">4.56 <code>setlinebuf</code>—specify line buffering for a file or stream</a>
|
||||
<li><a href="setvbuf.html#setvbuf">4.57 <code>setvbuf</code>—specify file or stream buffering</a>
|
||||
<li><a href="siprintf.html#siprintf">4.58 <code>siprintf</code>, <code>fiprintf</code>, <code>iprintf</code>, <code>sniprintf</code>, <code>asiprintf</code>, <code>asniprintf</code>—format output (integer only)</a>
|
||||
<li><a href="siscanf.html#siscanf">4.59 <code>siscanf</code>, <code>fiscanf</code>, <code>iscanf</code>—scan and format non-floating input</a>
|
||||
<li><a href="sprintf.html#sprintf">4.60 <code>sprintf</code>, <code>fprintf</code>, <code>printf</code>, <code>snprintf</code>, <code>asprintf</code>, <code>asnprintf</code>—format output</a>
|
||||
<li><a href="sscanf.html#sscanf">4.61 <code>sscanf</code>, <code>fscanf</code>, <code>scanf</code>—scan and format input</a>
|
||||
<li><a href="swprintf.html#swprintf">4.62 <code>swprintf</code>, <code>fwprintf</code>, <code>wprintf</code>—wide character format output</a>
|
||||
<li><a href="swscanf.html#swscanf">4.63 <code>swscanf</code>, <code>fwscanf</code>, <code>wscanf</code>—scan and format wide character input</a>
|
||||
<li><a href="tmpfile.html#tmpfile">4.64 <code>tmpfile</code>—create a temporary file</a>
|
||||
<li><a href="tmpnam.html#tmpnam">4.65 <code>tmpnam</code>, <code>tempnam</code>—name for a temporary file</a>
|
||||
<li><a href="ungetc.html#ungetc">4.66 <code>ungetc</code>—push data back into a stream</a>
|
||||
<li><a href="ungetwc.html#ungetwc">4.67 <code>ungetwc</code>—push wide character data back into a stream</a>
|
||||
<li><a href="vfprintf.html#vfprintf">4.68 <code>vfprintf</code>, <code>vprintf</code>, <code>vsprintf</code>, <code>vsnprintf</code>, <code>vasprintf</code>, <code>vasnprintf</code>—format argument list</a>
|
||||
<li><a href="vfscanf.html#vfscanf">4.69 <code>vfscanf</code>, <code>vscanf</code>, <code>vsscanf</code>—format argument list</a>
|
||||
<li><a href="vfwprintf.html#vfwprintf">4.70 <code>vfwprintf</code>, <code>vwprintf</code>, <code>vswprintf</code>—wide character format argument list</a>
|
||||
<li><a href="vfwscanf.html#vfwscanf">4.71 <code>vfwscanf</code>, <code>vwscanf</code>, <code>vswscanf</code>—scan and format argument list from wide character input</a>
|
||||
<li><a href="viprintf.html#viprintf">4.72 <code>viprintf</code>, <code>vfiprintf</code>, <code>vsiprintf</code>, <code>vsniprintf</code>, <code>vasiprintf</code>, <code>vasniprintf</code>—format argument list (integer only)</a>
|
||||
<li><a href="viscanf.html#viscanf">4.73 <code>viscanf</code>, <code>vfiscanf</code>, <code>vsiscanf</code>—format argument list</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Strings" href="Strings.html#Strings">5 Strings and Memory (<samp><span class="file">string.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="bcmp.html#bcmp">5.1 <code>bcmp</code>—compare two memory areas</a>
|
||||
<li><a href="bcopy.html#bcopy">5.2 <code>bcopy</code>—copy memory regions</a>
|
||||
<li><a href="bzero.html#bzero">5.3 <code>bzero</code>—initialize memory to zero</a>
|
||||
<li><a href="index.html#index">5.4 <code>index</code>—search for character in string</a>
|
||||
<li><a href="memccpy.html#memccpy">5.5 <code>memccpy</code>—copy memory regions with end-token check</a>
|
||||
<li><a href="memchr.html#memchr">5.6 <code>memchr</code>—find character in memory</a>
|
||||
<li><a href="memcmp.html#memcmp">5.7 <code>memcmp</code>—compare two memory areas</a>
|
||||
<li><a href="memcpy.html#memcpy">5.8 <code>memcpy</code>—copy memory regions</a>
|
||||
<li><a href="memmem.html#memmem">5.9 <code>memmem</code>—find memory segment</a>
|
||||
<li><a href="memmove.html#memmove">5.10 <code>memmove</code>—move possibly overlapping memory</a>
|
||||
<li><a href="mempcpy.html#mempcpy">5.11 <code>mempcpy</code>—copy memory regions and return end pointer</a>
|
||||
<li><a href="memset.html#memset">5.12 <code>memset</code>—set an area of memory</a>
|
||||
<li><a href="rindex.html#rindex">5.13 <code>rindex</code>—reverse search for character in string</a>
|
||||
<li><a href="stpcpy.html#stpcpy">5.14 <code>stpcpy</code>—copy string returning a pointer to its end</a>
|
||||
<li><a href="stpncpy.html#stpncpy">5.15 <code>stpncpy</code>—counted copy string returning a pointer to its end</a>
|
||||
<li><a href="strcasecmp.html#strcasecmp">5.16 <code>strcasecmp</code>—case-insensitive character string compare</a>
|
||||
<li><a href="strcasestr.html#strcasestr">5.17 <code>strcasestr</code>—case-insensitive character string search</a>
|
||||
<li><a href="strcat.html#strcat">5.18 <code>strcat</code>—concatenate strings</a>
|
||||
<li><a href="strchr.html#strchr">5.19 <code>strchr</code>—search for character in string</a>
|
||||
<li><a href="strcmp.html#strcmp">5.20 <code>strcmp</code>—character string compare</a>
|
||||
<li><a href="strcoll.html#strcoll">5.21 <code>strcoll</code>—locale-specific character string compare</a>
|
||||
<li><a href="strcpy.html#strcpy">5.22 <code>strcpy</code>—copy string</a>
|
||||
<li><a href="strcspn.html#strcspn">5.23 <code>strcspn</code>—count characters not in string</a>
|
||||
<li><a href="strerror.html#strerror">5.24 <code>strerror</code>—convert error number to string</a>
|
||||
<li><a href="strerror_005fr.html#strerror_005fr">5.25 <code>strerror_r</code>—convert error number to string and copy to buffer</a>
|
||||
<li><a href="strlen.html#strlen">5.26 <code>strlen</code>—character string length</a>
|
||||
<li><a href="strlwr.html#strlwr">5.27 <code>strlwr</code>—force string to lowercase</a>
|
||||
<li><a href="strncasecmp.html#strncasecmp">5.28 <code>strncasecmp</code>—case-insensitive character string compare</a>
|
||||
<li><a href="strncat.html#strncat">5.29 <code>strncat</code>—concatenate strings</a>
|
||||
<li><a href="strncmp.html#strncmp">5.30 <code>strncmp</code>—character string compare</a>
|
||||
<li><a href="strncpy.html#strncpy">5.31 <code>strncpy</code>—counted copy string</a>
|
||||
<li><a href="strnlen.html#strnlen">5.32 <code>strnlen</code>—character string length</a>
|
||||
<li><a href="strpbrk.html#strpbrk">5.33 <code>strpbrk</code>—find characters in string</a>
|
||||
<li><a href="strrchr.html#strrchr">5.34 <code>strrchr</code>—reverse search for character in string</a>
|
||||
<li><a href="strsignal.html#strsignal">5.35 <code>strsignal</code>—convert signal number to string</a>
|
||||
<li><a href="strspn.html#strspn">5.36 <code>strspn</code>—find initial match</a>
|
||||
<li><a href="strstr.html#strstr">5.37 <code>strstr</code>—find string segment</a>
|
||||
<li><a href="strtok.html#strtok">5.38 <code>strtok</code>, <code>strtok_r</code>, <code>strsep</code>—get next token from a string</a>
|
||||
<li><a href="strupr.html#strupr">5.39 <code>strupr</code>—force string to uppercase</a>
|
||||
<li><a href="strxfrm.html#strxfrm">5.40 <code>strxfrm</code>—transform string</a>
|
||||
<li><a href="swab.html#swab">5.41 <code>swab</code>—swap adjacent bytes</a>
|
||||
<li><a href="wcscasecmp.html#wcscasecmp">5.42 <code>wcscasecmp</code>—case-insensitive wide character string compare</a>
|
||||
<li><a href="wcsdup.html#wcsdup">5.43 <code>wcsdup</code>—wide character string duplicate</a>
|
||||
<li><a href="wcsncasecmp.html#wcsncasecmp">5.44 <code>wcsncasecmp</code>—case-insensitive wide character string compare</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Wchar-strings" href="Wchar-strings.html#Wchar-strings">6 Wide Character Strings (<samp><span class="file">wchar.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="wmemchr.html#wmemchr">6.1 <code>wmemchr</code>—find a wide character in memory</a>
|
||||
<li><a href="wmemcmp.html#wmemcmp">6.2 <code>wmemcmp</code>—compare wide characters in memory</a>
|
||||
<li><a href="wmemcpy.html#wmemcpy">6.3 <code>wmemcpy</code>—copy wide characters in memory</a>
|
||||
<li><a href="wmemmove.html#wmemmove">6.4 <code>wmemmove</code>—copy wide characters in memory with overlapping areas</a>
|
||||
<li><a href="wmemset.html#wmemset">6.5 <code>wmemset</code>—set wide characters in memory</a>
|
||||
<li><a href="wcscat.html#wcscat">6.6 <code>wcscat</code>—concatenate two wide-character strings</a>
|
||||
<li><a href="wcschr.html#wcschr">6.7 <code>wcschr</code>—wide-character string scanning operation</a>
|
||||
<li><a href="wcscmp.html#wcscmp">6.8 <code>wcscmp</code>—compare two wide-character strings</a>
|
||||
<li><a href="wcscoll.html#wcscoll">6.9 <code>wcscoll</code>—locale-specific wide-character string compare</a>
|
||||
<li><a href="wcscpy.html#wcscpy">6.10 <code>wcscpy</code>—copy a wide-character string</a>
|
||||
<li><a href="wcpcpy.html#wcpcpy">6.11 <code>wcpcpy</code>—copy a wide-character string returning a pointer to its end</a>
|
||||
<li><a href="wcscspn.html#wcscspn">6.12 <code>wcscspn</code>—get length of a complementary wide substring</a>
|
||||
<li><a href="wcsftime.html#wcsftime">6.13 <code>wcsftime</code>–convert date and time to a formatted wide-character string</a>
|
||||
<li><a href="wcslcat.html#wcslcat">6.14 <code>wcslcat</code>—concatenate wide-character strings to specified length</a>
|
||||
<li><a href="wcslcpy.html#wcslcpy">6.15 <code>wcslcpy</code>—copy a wide-character string to specified length</a>
|
||||
<li><a href="wcslen.html#wcslen">6.16 <code>wcslen</code>—get wide-character string length</a>
|
||||
<li><a href="wcsncat.html#wcsncat">6.17 <code>wcsncat</code>—concatenate part of two wide-character strings</a>
|
||||
<li><a href="wcsncmp.html#wcsncmp">6.18 <code>wcsncmp</code>—compare part of two wide-character strings</a>
|
||||
<li><a href="wcsncpy.html#wcsncpy">6.19 <code>wcsncpy</code>—copy part of a wide-character string</a>
|
||||
<li><a href="wcpncpy.html#wcpncpy">6.20 <code>wcpncpy</code>—copy part of a wide-character string returning a pointer to its end</a>
|
||||
<li><a href="wcsnlen.html#wcsnlen">6.21 <code>wcsnlen</code>—get fixed-size wide-character string length</a>
|
||||
<li><a href="wcspbrk.html#wcspbrk">6.22 <code>wcspbrk</code>—–scan wide-character string for a wide-character code</a>
|
||||
<li><a href="wcsrchr.html#wcsrchr">6.23 <code>wcsrchr</code>—wide-character string scanning operation</a>
|
||||
<li><a href="wcsspn.html#wcsspn">6.24 <code>wcsspn</code>—get length of a wide substring</a>
|
||||
<li><a href="wcsstr.html#wcsstr">6.25 <code>wcsstr</code>—find a wide-character substring</a>
|
||||
<li><a href="wcstok.html#wcstok">6.26 <code>wcstok</code>—get next token from a string</a>
|
||||
<li><a href="wcswidth.html#wcswidth">6.27 <code>wcswidth</code>—number of column positions of a wide-character string</a>
|
||||
<li><a href="wcsxfrm.html#wcsxfrm">6.28 <code>wcsxfrm</code>—locale-specific wide-character string transformation</a>
|
||||
<li><a href="wcwidth.html#wcwidth">6.29 <code>wcwidth</code>—number of column positions of a wide-character code</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Signals" href="Signals.html#Signals">7 Signal Handling (<samp><span class="file">signal.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="psignal.html#psignal">7.1 <code>psignal</code>—print a signal message on standard error</a>
|
||||
<li><a href="raise.html#raise">7.2 <code>raise</code>—send a signal</a>
|
||||
<li><a href="signal.html#signal">7.3 <code>signal</code>—specify handler subroutine for a signal</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Timefns" href="Timefns.html#Timefns">8 Time Functions (<samp><span class="file">time.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="asctime.html#asctime">8.1 <code>asctime</code>—format time as string</a>
|
||||
<li><a href="clock.html#clock">8.2 <code>clock</code>—cumulative processor time</a>
|
||||
<li><a href="ctime.html#ctime">8.3 <code>ctime</code>—convert time to local and format as string</a>
|
||||
<li><a href="difftime.html#difftime">8.4 <code>difftime</code>—subtract two times</a>
|
||||
<li><a href="gmtime.html#gmtime">8.5 <code>gmtime</code>—convert time to UTC traditional form</a>
|
||||
<li><a href="localtime.html#localtime">8.6 <code>localtime</code>—convert time to local representation</a>
|
||||
<li><a href="mktime.html#mktime">8.7 <code>mktime</code>—convert time to arithmetic representation</a>
|
||||
<li><a href="strftime.html#strftime">8.8 <code>strftime</code>—convert date and time to a formatted string</a>
|
||||
<li><a href="time.html#time">8.9 <code>time</code>—get current calendar time (as single number)</a>
|
||||
<li><a href="_005f_005ftz_005flock.html#_005f_005ftz_005flock">8.10 <code>__tz_lock</code>, <code>__tz_unlock</code>—lock time zone global variables</a>
|
||||
<li><a href="tzset.html#tzset">8.11 <code>tzset</code>—set timezone characteristics from TZ environment variable</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Locale" href="Locale.html#Locale">9 Locale (<samp><span class="file">locale.h</span></samp>)</a>
|
||||
<ul>
|
||||
<li><a href="setlocale.html#setlocale">9.1 <code>setlocale</code>, <code>localeconv</code>—select or query locale</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Reentrancy" href="Reentrancy.html#Reentrancy">10 Reentrancy</a>
|
||||
<li><a name="toc_Misc" href="Misc.html#Misc">11 Miscellaneous Macros and Functions</a>
|
||||
<ul>
|
||||
<li><a href="ffs.html#ffs">11.1 <code>ffs</code>—find first bit set in a word</a>
|
||||
<li><a href="unctrl.html#unctrl">11.2 <code>unctrl</code>—get printable representation of a character</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Syscalls" href="Syscalls.html#Syscalls">12 System Calls</a>
|
||||
<ul>
|
||||
<li><a href="Stubs.html#Stubs">12.1 Definitions for OS interface</a>
|
||||
<li><a href="Reentrant-Syscalls.html#Reentrant-Syscalls">12.2 Reentrant covers for OS subroutines</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Arglists" href="Arglists.html#Arglists">13 Variable Argument Lists</a>
|
||||
<ul>
|
||||
<li><a href="Stdarg.html#Stdarg">13.1 ANSI-standard macros, <samp><span class="file">stdarg.h</span></samp></a>
|
||||
<ul>
|
||||
<li><a href="va_005fstart.html#va_005fstart">13.1.1 Initialize variable argument list</a>
|
||||
<li><a href="va_005farg.html#va_005farg">13.1.2 Extract a value from argument list</a>
|
||||
<li><a href="va_005fend.html#va_005fend">13.1.3 Abandon a variable argument list</a>
|
||||
</li></ul>
|
||||
<li><a href="Varargs.html#Varargs">13.2 Traditional macros, <samp><span class="file">varargs.h</span></samp></a>
|
||||
<ul>
|
||||
<li><a href="va_005falist.html#va_005falist">13.2.1 Declare variable arguments</a>
|
||||
<li><a href="va_005fstart_002dtrad.html#va_005fstart_002dtrad">13.2.2 Initialize variable argument list</a>
|
||||
<li><a href="va_005farg_002dtrad.html#va_005farg_002dtrad">13.2.3 Extract a value from argument list</a>
|
||||
<li><a href="va_005fend_002dtrad.html#va_005fend_002dtrad">13.2.4 Abandon a variable argument list</a>
|
||||
</li></ul>
|
||||
</li></ul>
|
||||
<li><a name="toc_Document-Index" href="Document-Index.html#Document-Index">Document Index</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Introduction - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="index.html#Top" title="Top">
|
||||
<link rel="next" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Introduction"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Stdlib.html#Stdlib">Stdlib</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">1 Introduction</h2>
|
||||
|
||||
<p>This reference manual describes the functions provided by the Red Hat
|
||||
“newlib” version of the standard ANSI C library. This document is not
|
||||
intended as an overview or a tutorial for the C library. Each library
|
||||
function is listed with a synopsis of its use, a brief description,
|
||||
return values (including error handling), and portability issues.
|
||||
|
||||
<p>Some of the library functions depend on support from the underlying
|
||||
operating system and may not be available on every platform. For
|
||||
embedded systems in particular, many of these underlying operating
|
||||
system services may not be available or may not be fully functional.
|
||||
The specific operating system subroutines required for a particular
|
||||
library function are listed in the “Portability” section of the
|
||||
function description. See <a href="Syscalls.html#Syscalls">Syscalls</a>, for a description of the
|
||||
relevant operating system calls.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Locale - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="next" href="Reentrancy.html#Reentrancy" title="Reentrancy">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Locale"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Reentrancy.html#Reentrancy">Reentrancy</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Timefns.html#Timefns">Timefns</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">9 Locale (<samp><span class="file">locale.h</span></samp>)</h2>
|
||||
|
||||
<p>A <dfn>locale</dfn> is the name for a collection of parameters (affecting
|
||||
collating sequences and formatting conventions) that may be different
|
||||
depending on location or culture. The <code>"C"</code> locale is the only
|
||||
one defined in the ANSI C standard.
|
||||
|
||||
<p>This is a minimal implementation, supporting only the required <code>"C"</code>
|
||||
value for locale; strings representing other locales are not
|
||||
honored. (<code>""</code> is also accepted; it represents the default locale
|
||||
for an implementation, here equivalent to <code>"C"</code>.
|
||||
|
||||
<p><samp><span class="file">locale.h</span></samp> defines the structure <code>lconv</code> to collect the
|
||||
information on a locale, with the following fields:
|
||||
|
||||
<dl>
|
||||
<dt><code>char *decimal_point</code><dd>The decimal point character used to format “ordinary” numbers (all
|
||||
numbers except those referring to amounts of money). <code>"."</code> in the
|
||||
C locale.
|
||||
|
||||
<br><dt><code>char *thousands_sep</code><dd>The character (if any) used to separate groups of digits, when
|
||||
formatting ordinary numbers.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *grouping</code><dd>Specifications for how many digits to group (if any grouping is done at
|
||||
all) when formatting ordinary numbers. The <em>numeric value</em> of each
|
||||
character in the string represents the number of digits for the next
|
||||
group, and a value of <code>0</code> (that is, the string's trailing
|
||||
<code>NULL</code>) means to continue grouping digits using the last value
|
||||
specified. Use <code>CHAR_MAX</code> to indicate that no further grouping is
|
||||
desired. <code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *int_curr_symbol</code><dd>The international currency symbol (first three characters), if any, and
|
||||
the character used to separate it from numbers.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *currency_symbol</code><dd>The local currency symbol, if any.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *mon_decimal_point</code><dd>The symbol used to delimit fractions in amounts of money.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *mon_thousands_sep</code><dd>Similar to <code>thousands_sep</code>, but used for amounts of money.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *mon_grouping</code><dd>Similar to <code>grouping</code>, but used for amounts of money.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *positive_sign</code><dd>A string to flag positive amounts of money when formatting.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char *negative_sign</code><dd>A string to flag negative amounts of money when formatting.
|
||||
<code>""</code> in the C locale.
|
||||
|
||||
<br><dt><code>char int_frac_digits</code><dd>The number of digits to display when formatting amounts of money to
|
||||
international conventions.
|
||||
<code>CHAR_MAX</code> (the largest number representable as a <code>char</code>) in
|
||||
the C locale.
|
||||
|
||||
<br><dt><code>char frac_digits</code><dd>The number of digits to display when formatting amounts of money to
|
||||
local conventions.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char p_cs_precedes</code><dd><code>1</code> indicates the local currency symbol is used before a
|
||||
<em>positive or zero</em> formatted amount of money; <code>0</code> indicates
|
||||
the currency symbol is placed after the formatted number.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char p_sep_by_space</code><dd><code>1</code> indicates the local currency symbol must be separated from
|
||||
<em>positive or zero</em> numbers by a space; <code>0</code> indicates that it
|
||||
is immediately adjacent to numbers.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char n_cs_precedes</code><dd><code>1</code> indicates the local currency symbol is used before a
|
||||
<em>negative</em> formatted amount of money; <code>0</code> indicates
|
||||
the currency symbol is placed after the formatted number.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char n_sep_by_space</code><dd><code>1</code> indicates the local currency symbol must be separated from
|
||||
<em>negative</em> numbers by a space; <code>0</code> indicates that it
|
||||
is immediately adjacent to numbers.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char p_sign_posn</code><dd>Controls the position of the <em>positive</em> sign for
|
||||
numbers representing money. <code>0</code> means parentheses surround the
|
||||
number; <code>1</code> means the sign is placed before both the number and the
|
||||
currency symbol; <code>2</code> means the sign is placed after both the number
|
||||
and the currency symbol; <code>3</code> means the sign is placed just before
|
||||
the currency symbol; and <code>4</code> means the sign is placed just after
|
||||
the currency symbol.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
|
||||
<br><dt><code>char n_sign_posn</code><dd>Controls the position of the <em>negative</em> sign for numbers
|
||||
representing money, using the same rules as <code>p_sign_posn</code>.
|
||||
<code>CHAR_MAX</code> in the C locale.
|
||||
</dl>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="setlocale.html#setlocale">setlocale</a>: Select or query locale
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Misc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Reentrancy.html#Reentrancy" title="Reentrancy">
|
||||
<link rel="next" href="Syscalls.html#Syscalls" title="Syscalls">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Misc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Syscalls.html#Syscalls">Syscalls</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Reentrancy.html#Reentrancy">Reentrancy</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">11 Miscellaneous Macros and Functions</h2>
|
||||
|
||||
<p>This chapter describes miscellaneous routines not covered elsewhere.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="ffs.html#ffs">ffs</a>: Return first bit set in a word
|
||||
<li><a accesskey="2" href="unctrl.html#unctrl">unctrl</a>: Return printable representation of a character
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Reentrancy - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Locale.html#Locale" title="Locale">
|
||||
<link rel="next" href="Misc.html#Misc" title="Misc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Reentrancy"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Misc.html#Misc">Misc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Locale.html#Locale">Locale</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">10 Reentrancy</h2>
|
||||
|
||||
<p><a name="index-reentrancy-449"></a>Reentrancy is a characteristic of library functions which allows multiple
|
||||
processes to use the same address space with assurance that the values stored
|
||||
in those spaces will remain constant between calls. The Red Hat
|
||||
newlib implementation of the library functions ensures that
|
||||
whenever possible, these library functions are reentrant. However,
|
||||
there are some functions that can not be trivially made reentrant.
|
||||
Hooks have been provided to allow you to use these functions in a fully
|
||||
reentrant fashion.
|
||||
|
||||
<p><a name="index-g_t_005freent-450"></a><a name="index-reent_002eh-451"></a><a name="index-reentrancy-structure-452"></a>These hooks use the structure <code>_reent</code> defined in <samp><span class="file">reent.h</span></samp>.
|
||||
A variable defined as ‘<samp><span class="samp">struct _reent</span></samp>’ is called a <dfn>reentrancy
|
||||
structure</dfn>. All functions which must manipulate global information are
|
||||
available in two versions. The first version has the usual name, and
|
||||
uses a single global instance of the reentrancy structure. The second
|
||||
has a different name, normally formed by prepending ‘<samp><span class="samp">_</span></samp>’ and
|
||||
appending ‘<samp><span class="samp">_r</span></samp>’, and takes a pointer to the particular reentrancy
|
||||
structure to use.
|
||||
|
||||
<p>For example, the function <code>fopen</code> takes two arguments, <var>file</var>
|
||||
and <var>mode</var>, and uses the global reentrancy structure. The function
|
||||
<code>_fopen_r</code> takes the arguments, <var>struct_reent</var>, which is a
|
||||
pointer to an instance of the reentrancy structure, <var>file</var>
|
||||
and <var>mode</var>.
|
||||
|
||||
<p>There are two versions of ‘<samp><span class="samp">struct _reent</span></samp>’, a normal one and one
|
||||
for small memory systems, controlled by the <code>_REENT_SMALL</code>
|
||||
definition from the (automatically included) <samp><span class="file"><sys/config.h></span></samp>.
|
||||
|
||||
<p><a name="index-global-reentrancy-structure-453"></a><a name="index-g_t_005fimpure_005fptr-454"></a>Each function which uses the global reentrancy structure uses the global
|
||||
variable <code>_impure_ptr</code>, which points to a reentrancy structure.
|
||||
|
||||
<p>This means that you have two ways to achieve reentrancy. Both require
|
||||
that each thread of execution control initialize a unique global
|
||||
variable of type ‘<samp><span class="samp">struct _reent</span></samp>’:
|
||||
|
||||
<ol type=1 start=1>
|
||||
<li><a name="index-extra-argument_002c-reentrant-fns-455"></a>Use the reentrant versions of the library functions, after initializing
|
||||
a global reentrancy structure for each process. Use the pointer to this
|
||||
structure as the extra argument for all library functions.
|
||||
|
||||
<li>Ensure that each thread of execution control has a pointer to its own
|
||||
unique reentrancy structure in the global variable <code>_impure_ptr</code>,
|
||||
and call the standard library subroutines.
|
||||
</ol>
|
||||
|
||||
<p><a name="index-list-of-reentrant-functions-456"></a><a name="index-reentrant-function-list-457"></a>The following functions are provided in both reentrant
|
||||
and non-reentrant versions.
|
||||
|
||||
<pre class="example"><br><em>Equivalent for errno variable:</em><br>
|
||||
_errno_r
|
||||
|
||||
<br><em>Locale functions:</em><br>
|
||||
_localeconv_r _setlocale_r
|
||||
|
||||
<br><em>Equivalents for stdio variables:</em><br>
|
||||
_stdin_r _stdout_r _stderr_r
|
||||
|
||||
|
||||
<br><em>Stdio functions:</em><br>
|
||||
_fdopen_r _perror_r _tempnam_r
|
||||
_fopen_r _putchar_r _tmpnam_r
|
||||
_getchar_r _puts_r _tmpfile_r
|
||||
_gets_r _remove_r _vfprintf_r
|
||||
_iprintf_r _rename_r _vsnprintf_r
|
||||
_mkstemp_r _snprintf_r _vsprintf_r
|
||||
_mktemp_t _sprintf_r
|
||||
|
||||
<br><em>Signal functions:</em><br>
|
||||
_init_signal_r _signal_r
|
||||
_kill_r __sigtramp_r
|
||||
_raise_r
|
||||
|
||||
<br><em>Stdlib functions:</em><br>
|
||||
_calloc_r _mblen_r _setenv_r
|
||||
_dtoa_r _mbstowcs_r _srand_r
|
||||
_free_r _mbtowc_r _strtod_r
|
||||
_getenv_r _memalign_r _strtol_r
|
||||
_mallinfo_r _mstats_r _strtoul_r
|
||||
_malloc_r _putenv_r _system_r
|
||||
_malloc_r _rand_r _wcstombs_r
|
||||
_malloc_stats_r _realloc_r _wctomb_r
|
||||
|
||||
<br><em>String functions:</em><br>
|
||||
_strdup_r _strtok_r
|
||||
|
||||
<br><em>System functions:</em><br>
|
||||
_close_r _link_r _unlink_r
|
||||
_execve_r _lseek_r _wait_r
|
||||
_fcntl_r _open_r _write_r
|
||||
_fork_r _read_r
|
||||
_fstat_r _sbrk_r
|
||||
_gettimeofday_r _stat_r
|
||||
_getpid_r _times_r
|
||||
|
||||
|
||||
<br><em>Time function:</em><br>
|
||||
_asctime_r
|
||||
</pre>
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Reentrant Syscalls - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Syscalls.html#Syscalls" title="Syscalls">
|
||||
<link rel="prev" href="Stubs.html#Stubs" title="Stubs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Reentrant-Syscalls"></a>
|
||||
Previous: <a rel="previous" accesskey="p" href="Stubs.html#Stubs">Stubs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Syscalls.html#Syscalls">Syscalls</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">12.2 Reentrant covers for OS subroutines</h3>
|
||||
|
||||
<p>Since the system subroutines are used by other library routines that
|
||||
require reentrancy, <samp><span class="file">libc.a</span></samp> provides cover routines (for example,
|
||||
the reentrant version of <code>fork</code> is <code>_fork_r</code>). These cover
|
||||
routines are consistent with the other reentrant subroutines in this
|
||||
library, and achieve reentrancy by using a reserved global data block
|
||||
(see <a href="Reentrancy.html#Reentrancy">Reentrancy</a>).
|
||||
|
||||
<!-- FIXME!!! The following ignored text specifies how this section ought -->
|
||||
<!-- to work; however, both standalone info and Emacs info mode fail when -->
|
||||
<!-- confronted with nodes beginning `_' as of 24may93. Restore when Info -->
|
||||
<!-- readers fixed! -->
|
||||
<dl>
|
||||
<dt><code>_open_r</code><a name="index-g_t_005fopen_005fr-485"></a><dd>A reentrant version of <code>open</code>. It takes a pointer
|
||||
to the global data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _open_r(void *<var>reent</var>,
|
||||
const char *<var>file</var>, int <var>flags</var>, int <var>mode</var>);
|
||||
</pre>
|
||||
<br><dt><code>_close_r</code><a name="index-g_t_005fclose_005fr-486"></a><dd>A reentrant version of <code>close</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _close_r(void *<var>reent</var>, int <var>fd</var>);
|
||||
</pre>
|
||||
<br><dt><code>_lseek_r</code><a name="index-g_t_005flseek_005fr-487"></a><dd>A reentrant version of <code>lseek</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> off_t _lseek_r(void *<var>reent</var>,
|
||||
int <var>fd</var>, off_t <var>pos</var>, int <var>whence</var>);
|
||||
</pre>
|
||||
<br><dt><code>_read_r</code><a name="index-g_t_005fread_005fr-488"></a><dd>A reentrant version of <code>read</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> long _read_r(void *<var>reent</var>,
|
||||
int <var>fd</var>, void *<var>buf</var>, size_t <var>cnt</var>);
|
||||
</pre>
|
||||
<br><dt><code>_write_r</code><a name="index-g_t_005fwrite_005fr-489"></a><dd>A reentrant version of <code>write</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> long _write_r(void *<var>reent</var>,
|
||||
int <var>fd</var>, const void *<var>buf</var>, size_t <var>cnt</var>);
|
||||
</pre>
|
||||
<br><dt><code>_fork_r</code><a name="index-g_t_005ffork_005fr-490"></a><dd>A reentrant version of <code>fork</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _fork_r(void *<var>reent</var>);
|
||||
</pre>
|
||||
<br><dt><code>_wait_r</code><a name="index-g_t_005fwait_005fr-491"></a><dd>A reentrant version of <code>wait</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _wait_r(void *<var>reent</var>, int *<var>status</var>);
|
||||
</pre>
|
||||
<br><dt><code>_stat_r</code><a name="index-g_t_005fstat_005fr-492"></a><dd>A reentrant version of <code>stat</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _stat_r(void *<var>reent</var>,
|
||||
const char *<var>file</var>, struct stat *<var>pstat</var>);
|
||||
</pre>
|
||||
<br><dt><code>_fstat_r</code><a name="index-g_t_005ffstat_005fr-493"></a><dd>A reentrant version of <code>fstat</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _fstat_r(void *<var>reent</var>,
|
||||
int <var>fd</var>, struct stat *<var>pstat</var>);
|
||||
</pre>
|
||||
<br><dt><code>_link_r</code><a name="index-g_t_005flink_005fr-494"></a><dd>A reentrant version of <code>link</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _link_r(void *<var>reent</var>,
|
||||
const char *<var>old</var>, const char *<var>new</var>);
|
||||
</pre>
|
||||
<br><dt><code>_unlink_r</code><a name="index-g_t_005funlink_005fr-495"></a><dd>A reentrant version of <code>unlink</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> int _unlink_r(void *<var>reent</var>, const char *<var>file</var>);
|
||||
</pre>
|
||||
<br><dt><code>_sbrk_r</code><a name="index-g_t_005fsbrk_005fr-496"></a><dd>A reentrant version of <code>sbrk</code>. It takes a pointer to the global
|
||||
data block, which holds <code>errno</code>.
|
||||
|
||||
<pre class="example"> char *_sbrk_r(void *<var>reent</var>, size_t <var>incr</var>);
|
||||
</pre>
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Signals - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Wchar-strings.html#Wchar-strings" title="Wchar strings">
|
||||
<link rel="next" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Signals"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Timefns.html#Timefns">Timefns</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Wchar-strings.html#Wchar-strings">Wchar strings</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">7 Signal Handling (<samp><span class="file">signal.h</span></samp>)</h2>
|
||||
|
||||
<p>A <dfn>signal</dfn> is an event that interrupts the normal flow of control
|
||||
in your program. Your operating environment normally defines the full
|
||||
set of signals available (see <samp><span class="file">sys/signal.h</span></samp>), as well as the
|
||||
default means of dealing with them—typically, either printing an
|
||||
error message and aborting your program, or ignoring the signal.
|
||||
|
||||
<p>All systems support at least the following signals:
|
||||
<dl>
|
||||
<dt><code>SIGABRT</code><dd>Abnormal termination of a program; raised by the <<abort>> function.
|
||||
|
||||
<br><dt><code>SIGFPE</code><dd>A domain error in arithmetic, such as overflow, or division by zero.
|
||||
|
||||
<br><dt><code>SIGILL</code><dd>Attempt to execute as a function data that is not executable.
|
||||
|
||||
<br><dt><code>SIGINT</code><dd>Interrupt; an interactive attention signal.
|
||||
|
||||
<br><dt><code>SIGSEGV</code><dd>An attempt to access a memory location that is not available.
|
||||
|
||||
<br><dt><code>SIGTERM</code><dd>A request that your program end execution.
|
||||
</dl>
|
||||
|
||||
<p>Two functions are available for dealing with asynchronous
|
||||
signals—one to allow your program to send signals to itself (this is
|
||||
called <dfn>raising</dfn> a signal), and one to specify subroutines (called
|
||||
<dfn>handlers</dfn> to handle particular signals that you anticipate may
|
||||
occur—whether raised by your own program or the operating environment.
|
||||
|
||||
<p>To support these functions, <samp><span class="file">signal.h</span></samp> defines three macros:
|
||||
|
||||
<dl>
|
||||
<dt><code>SIG_DFL</code><dd>Used with the <code>signal</code> function in place of a pointer to a
|
||||
handler subroutine, to select the operating environment's default
|
||||
handling of a signal.
|
||||
|
||||
<br><dt><code>SIG_IGN</code><dd>Used with the <code>signal</code> function in place of a pointer to a
|
||||
handler, to ignore a particular signal.
|
||||
|
||||
<br><dt><code>SIG_ERR</code><dd>Returned by the <code>signal</code> function in place of a pointer to a
|
||||
handler, to indicate that your request to set up a handler could not
|
||||
be honored for some reason.
|
||||
</dl>
|
||||
|
||||
<p><samp><span class="file">signal.h</span></samp> also defines an integral type, <code>sig_atomic_t</code>.
|
||||
This type is not used in any function declarations; it exists only to
|
||||
allow your signal handlers to declare a static storage location where
|
||||
they may store a signal value. (Static storage is not otherwise
|
||||
reliable from signal handlers.)
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="psignal.html#psignal">psignal</a>: Print a signal message to standard error
|
||||
<li><a accesskey="2" href="raise.html#raise">raise</a>: Send a signal
|
||||
<li><a accesskey="3" href="signal.html#signal">signal</a>: Specify handler subroutine for a signal
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Stdarg - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Arglists.html#Arglists" title="Arglists">
|
||||
<link rel="next" href="Varargs.html#Varargs" title="Varargs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Stdarg"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Varargs.html#Varargs">Varargs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Arglists.html#Arglists">Arglists</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">13.1 ANSI-standard macros, <samp><span class="file">stdarg.h</span></samp></h3>
|
||||
|
||||
<p>In ANSI C, a function has a variable number of arguments when its
|
||||
parameter list ends in an ellipsis (<code>...</code>). The parameter list
|
||||
must also include at least one explicitly named argument; that argument
|
||||
is used to initialize the variable list data structure.
|
||||
|
||||
<p>ANSI C defines three macros (<code>va_start</code>, <code>va_arg</code>, and
|
||||
<code>va_end</code>) to operate on variable argument lists. <samp><span class="file">stdarg.h</span></samp>
|
||||
also defines a special type to represent variable argument lists: this
|
||||
type is called <code>va_list</code>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="va_005fstart.html#va_005fstart">va_start</a>
|
||||
<li><a accesskey="2" href="va_005farg.html#va_005farg">va_arg</a>
|
||||
<li><a accesskey="3" href="va_005fend.html#va_005fend">va_end</a>
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Stdio - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="next" href="Strings.html#Strings" title="Strings">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Stdio"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Strings.html#Strings">Strings</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Ctype.html#Ctype">Ctype</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">4 Input and Output (<samp><span class="file">stdio.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter comprises functions to manage files
|
||||
or other input/output streams. Among these functions are subroutines
|
||||
to generate or scan strings according to specifications from a format string.
|
||||
|
||||
<p>The underlying facilities for input and output depend on the host
|
||||
system, but these functions provide a uniform interface.
|
||||
|
||||
<p>The corresponding declarations are in <samp><span class="file">stdio.h</span></samp>.
|
||||
|
||||
<p>The reentrant versions of these functions use macros
|
||||
|
||||
<pre class="example"> _stdin_r(<var>reent</var>)
|
||||
_stdout_r(<var>reent</var>)
|
||||
_stderr_r(<var>reent</var>)
|
||||
</pre>
|
||||
<p class="noindent">instead of the globals <code>stdin</code>, <code>stdout</code>, and
|
||||
<code>stderr</code>. The argument <[reent]> is a pointer to a reentrancy
|
||||
structure.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="clearerr.html#clearerr">clearerr</a>: Clear file or stream error indicator
|
||||
<li><a accesskey="2" href="diprintf.html#diprintf">diprintf</a>: Print to a file descriptor (integer only)
|
||||
<li><a accesskey="3" href="dprintf.html#dprintf">dprintf</a>: Print to a file descriptor
|
||||
<li><a accesskey="4" href="fclose.html#fclose">fclose</a>: Close a file
|
||||
<li><a accesskey="5" href="fcloseall.html#fcloseall">fcloseall</a>: Close all files
|
||||
<li><a accesskey="6" href="fdopen.html#fdopen">fdopen</a>: Turn an open file into a stream
|
||||
<li><a accesskey="7" href="feof.html#feof">feof</a>: Test for end of file
|
||||
<li><a accesskey="8" href="ferror.html#ferror">ferror</a>: Test whether read/write error has occurred
|
||||
<li><a accesskey="9" href="fflush.html#fflush">fflush</a>: Flush buffered file output
|
||||
<li><a href="fgetc.html#fgetc">fgetc</a>: Get a character from a file or stream
|
||||
<li><a href="fgetpos.html#fgetpos">fgetpos</a>: Record position in a stream or file
|
||||
<li><a href="fgets.html#fgets">fgets</a>: Get character string from a file or stream
|
||||
<li><a href="fgetwc.html#fgetwc">fgetwc</a>: Get a wide character from a file or stream
|
||||
<li><a href="fgetws.html#fgetws">fgetws</a>: Get a wide character string from a file or stream
|
||||
<li><a href="fileno.html#fileno">fileno</a>: Get file descriptor associated with stream
|
||||
<li><a href="fmemopen.html#fmemopen">fmemopen</a>: Open a stream around a fixed-length buffer
|
||||
<li><a href="fopen.html#fopen">fopen</a>: Open a file
|
||||
<li><a href="fopencookie.html#fopencookie">fopencookie</a>: Open a stream with custom callbacks
|
||||
<li><a href="fpurge.html#fpurge">fpurge</a>: Discard all pending I/O on a stream
|
||||
<li><a href="fputc.html#fputc">fputc</a>: Write a character on a stream or file
|
||||
<li><a href="fputs.html#fputs">fputs</a>: Write a character string in a file or stream
|
||||
<li><a href="fputwc.html#fputwc">fputwc</a>: Write a wide character to a file or stream
|
||||
<li><a href="fputws.html#fputws">fputws</a>: Write a wide character string to a file or stream
|
||||
<li><a href="fread.html#fread">fread</a>: Read array elements from a file
|
||||
<li><a href="freopen.html#freopen">freopen</a>: Open a file using an existing file descriptor
|
||||
<li><a href="fseek.html#fseek">fseek</a>: Set file position
|
||||
<li><a href="fsetpos.html#fsetpos">fsetpos</a>: Restore position of a stream or file
|
||||
<li><a href="ftell.html#ftell">ftell</a>: Return position in a stream or file
|
||||
<li><a href="funopen.html#funopen">funopen</a>: Open a stream with custom callbacks
|
||||
<li><a href="fwide.html#fwide">fwide</a>: Set and determine the orientation of a FILE stream
|
||||
<li><a href="fwrite.html#fwrite">fwrite</a>: Write array elements from memory to a file or stream
|
||||
<li><a href="getc.html#getc">getc</a>: Get a character from a file or stream (macro)
|
||||
<li><a href="getc_005funlocked.html#getc_005funlocked">getc_unlocked</a>: Get a character from a file or stream (macro)
|
||||
<li><a href="getchar.html#getchar">getchar</a>: Get a character from standard input (macro)
|
||||
<li><a href="getchar_005funlocked.html#getchar_005funlocked">getchar_unlocked</a>: Get a character from standard input (macro)
|
||||
<li><a href="getdelim.html#getdelim">getdelim</a>: Get character string from a file or stream
|
||||
<li><a href="getline.html#getline">getline</a>: Get character string from a file or stream
|
||||
<li><a href="gets.html#gets">gets</a>: Get character string from standard input (obsolete)
|
||||
<li><a href="getw.html#getw">getw</a>: Get a word (int) from a file or stream
|
||||
<li><a href="getwchar.html#getwchar">getwchar</a>: Get a wide character from standard input
|
||||
<li><a href="mktemp.html#mktemp">mktemp</a>: Generate unused file name
|
||||
<li><a href="open_005fmemstream.html#open_005fmemstream">open_memstream</a>: Open a write stream around an arbitrary-length buffer
|
||||
<li><a href="perror.html#perror">perror</a>: Print an error message on standard error
|
||||
<li><a href="putc.html#putc">putc</a>: Write a character on a stream or file (macro)
|
||||
<li><a href="putc_005funlocked.html#putc_005funlocked">putc_unlocked</a>: Write a character on a stream or file (macro)
|
||||
<li><a href="putchar.html#putchar">putchar</a>: Write a character on standard output (macro)
|
||||
<li><a href="putchar_005funlocked.html#putchar_005funlocked">putchar_unlocked</a>: Write a character on standard output (macro)
|
||||
<li><a href="puts.html#puts">puts</a>: Write a character string on standard output
|
||||
<li><a href="putw.html#putw">putw</a>: Write a word (int) to a file or stream
|
||||
<li><a href="putwchar.html#putwchar">putwchar</a>: Write a wide character to standard output
|
||||
<li><a href="remove.html#remove">remove</a>: Delete a file's name
|
||||
<li><a href="rename.html#rename">rename</a>: Rename a file
|
||||
<li><a href="rewind.html#rewind">rewind</a>: Reinitialize a file or stream
|
||||
<li><a href="setbuf.html#setbuf">setbuf</a>: Specify full buffering for a file or stream
|
||||
<li><a href="setbuffer.html#setbuffer">setbuffer</a>: Specify full buffering for a file or stream with size
|
||||
<li><a href="setlinebuf.html#setlinebuf">setlinebuf</a>: Specify line buffering for a file or stream
|
||||
<li><a href="setvbuf.html#setvbuf">setvbuf</a>: Specify buffering for a file or stream
|
||||
<li><a href="siprintf.html#siprintf">siprintf</a>: Write formatted output (integer only)
|
||||
<li><a href="siscanf.html#siscanf">siscanf</a>: Scan and format input (integer only)
|
||||
<li><a href="sprintf.html#sprintf">sprintf</a>: Write formatted output
|
||||
<li><a href="sscanf.html#sscanf">sscanf</a>: Scan and format input
|
||||
<li><a href="swprintf.html#swprintf">swprintf</a>: Write formatted wide character output
|
||||
<li><a href="swscanf.html#swscanf">swscanf</a>: Scan and format wide character input
|
||||
<li><a href="tmpfile.html#tmpfile">tmpfile</a>: Create a temporary file
|
||||
<li><a href="tmpnam.html#tmpnam">tmpnam</a>: Generate name for a temporary file
|
||||
<li><a href="ungetc.html#ungetc">ungetc</a>: Push data back into a stream
|
||||
<li><a href="ungetwc.html#ungetwc">ungetwc</a>: Push wide character data back into a stream
|
||||
<li><a href="vfprintf.html#vfprintf">vfprintf</a>: Format variable argument list
|
||||
<li><a href="vfscanf.html#vfscanf">vfscanf</a>: Scan variable argument list
|
||||
<li><a href="vfwprintf.html#vfwprintf">vfwprintf</a>: Format variable wide character argument list
|
||||
<li><a href="vfwscanf.html#vfwscanf">vfwscanf</a>: Scan and format argument list from wide character input
|
||||
<li><a href="viprintf.html#viprintf">viprintf</a>: Format variable argument list (integer only)
|
||||
<li><a href="viscanf.html#viscanf">viscanf</a>: Scan variable format list (integer only)
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Stdlib - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Introduction.html#Introduction" title="Introduction">
|
||||
<link rel="next" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Stdlib"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Ctype.html#Ctype">Ctype</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Introduction.html#Introduction">Introduction</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">2 Standard Utility Functions (<samp><span class="file">stdlib.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter groups utility functions useful in a variety of programs.
|
||||
The corresponding declarations are in the header file <samp><span class="file">stdlib.h</span></samp>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="_005fExit.html#g_t_005fExit">_Exit</a>: End program execution without cleaning up
|
||||
<li><a accesskey="2" href="a64l.html#a64l">a64l</a>: String to long long
|
||||
<li><a accesskey="3" href="abort.html#abort">abort</a>: Abnormal termination of a program
|
||||
<li><a accesskey="4" href="abs.html#abs">abs</a>: Integer absolute value (magnitude)
|
||||
<li><a accesskey="5" href="assert.html#assert">assert</a>: Macro for Debugging Diagnostics
|
||||
<li><a accesskey="6" href="atexit.html#atexit">atexit</a>: Request execution of functions at program exit
|
||||
<li><a accesskey="7" href="atof.html#atof">atof</a>: String to double or float
|
||||
<li><a accesskey="8" href="atoi.html#atoi">atoi</a>: String to integer
|
||||
<li><a accesskey="9" href="atoll.html#atoll">atoll</a>: String to long long
|
||||
<li><a href="bsearch.html#bsearch">bsearch</a>: Binary search
|
||||
<li><a href="calloc.html#calloc">calloc</a>: Allocate space for arrays
|
||||
<li><a href="div.html#div">div</a>: Divide two integers
|
||||
<li><a href="ecvtbuf.html#ecvtbuf">ecvtbuf</a>: Double or float to string of digits
|
||||
<li><a href="ecvt.html#ecvt">ecvt</a>: Double or float to string of digits (malloc result)
|
||||
<li><a href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a>: Lock environment list for getenv and setenv
|
||||
<li><a href="gvcvt.html#gvcvt">gvcvt</a>: Format double or float as string
|
||||
<li><a href="exit.html#exit">exit</a>: End program execution
|
||||
<li><a href="getenv.html#getenv">getenv</a>: Look up environment variable
|
||||
<li><a href="labs.html#labs">labs</a>: Long integer absolute value (magnitude)
|
||||
<li><a href="ldiv.html#ldiv">ldiv</a>: Divide two long integers
|
||||
<li><a href="llabs.html#llabs">llabs</a>: Long long integer absolute value (magnitude)
|
||||
<li><a href="lldiv.html#lldiv">lldiv</a>: Divide two long long integers
|
||||
<li><a href="malloc.html#malloc">malloc</a>: Allocate and manage memory (malloc, realloc, free)
|
||||
<li><a href="mallinfo.html#mallinfo">mallinfo</a>: Get information about allocated memory
|
||||
<li><a href="_005f_005fmalloc_005flock.html#g_t_005f_005fmalloc_005flock">__malloc_lock</a>: Lock memory pool for malloc and free
|
||||
<li><a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a>: Convert a character string to a wide-character string
|
||||
<li><a href="mbstowcs.html#mbstowcs">mbstowcs</a>: Minimal multibyte string to wide string converter
|
||||
<li><a href="mblen.html#mblen">mblen</a>: Minimal multibyte length
|
||||
<li><a href="mbtowc.html#mbtowc">mbtowc</a>: Minimal multibyte to wide character converter
|
||||
<li><a href="on_005fexit.html#on_005fexit">on_exit</a>: Request execution of functions at program exit
|
||||
<li><a href="qsort.html#qsort">qsort</a>: Array sort
|
||||
<li><a href="rand.html#rand">rand</a>: Pseudo-random numbers
|
||||
<li><a href="rand48.html#rand48">rand48</a>: Uniformly distributed pseudo-random numbers
|
||||
<li><a href="strtod.html#strtod">strtod</a>: String to double or float
|
||||
<li><a href="strtol.html#strtol">strtol</a>: String to long
|
||||
<li><a href="strtoll.html#strtoll">strtoll</a>: String to long long
|
||||
<li><a href="strtoul.html#strtoul">strtoul</a>: String to unsigned long
|
||||
<li><a href="strtoull.html#strtoull">strtoull</a>: String to unsigned long long
|
||||
<li><a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a>: Convert a wide-character string to a character string
|
||||
<li><a href="wcstod.html#wcstod">wcstod</a>: Wide string to double or float
|
||||
<li><a href="wcstol.html#wcstol">wcstol</a>: Wide string to long
|
||||
<li><a href="wcstoll.html#wcstoll">wcstoll</a>: Wide string to long long
|
||||
<li><a href="wcstoul.html#wcstoul">wcstoul</a>: Wide string to unsigned long
|
||||
<li><a href="wcstoull.html#wcstoull">wcstoull</a>: Wide string to unsigned long long
|
||||
<li><a href="system.html#system">system</a>: Execute command string
|
||||
<li><a href="wcstombs.html#wcstombs">wcstombs</a>: Minimal wide string to multibyte string converter
|
||||
<li><a href="wctomb.html#wctomb">wctomb</a>: Minimal wide character to multibyte converter
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Strings - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="next" href="Wchar-strings.html#Wchar-strings" title="Wchar strings">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Strings"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Wchar-strings.html#Wchar-strings">Wchar strings</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Stdio.html#Stdio">Stdio</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">5 Strings and Memory (<samp><span class="file">string.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter describes string-handling functions and functions for
|
||||
managing areas of memory. The corresponding declarations are in
|
||||
<samp><span class="file">string.h</span></samp>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="bcmp.html#bcmp">bcmp</a>: Compare two memory areas
|
||||
<li><a accesskey="2" href="bcopy.html#bcopy">bcopy</a>: Copy memory regions
|
||||
<li><a accesskey="3" href="bzero.html#bzero">bzero</a>: Initialize memory to zero
|
||||
<li><a accesskey="4" href="index.html#index">index</a>: Search for character in string
|
||||
<li><a accesskey="5" href="memccpy.html#memccpy">memccpy</a>: Copy memory regions up to end-token
|
||||
<li><a accesskey="6" href="memchr.html#memchr">memchr</a>: Find character in memory
|
||||
<li><a accesskey="7" href="memcmp.html#memcmp">memcmp</a>: Compare two memory areas
|
||||
<li><a accesskey="8" href="memcpy.html#memcpy">memcpy</a>: Copy memory regions
|
||||
<li><a accesskey="9" href="memmem.html#memmem">memmem</a>: Find memory segment
|
||||
<li><a href="memmove.html#memmove">memmove</a>: Move possibly overlapping memory
|
||||
<li><a href="mempcpy.html#mempcpy">mempcpy</a>: Copy memory regions and locate end
|
||||
<li><a href="memset.html#memset">memset</a>: Set an area of memory
|
||||
<li><a href="rindex.html#rindex">rindex</a>: Reverse search for character in string
|
||||
<li><a href="stpcpy.html#stpcpy">stpcpy</a>: Copy string returning a pointer to its end
|
||||
<li><a href="stpncpy.html#stpncpy">stpncpy</a>: Counted copy string returning a pointer to its end
|
||||
<li><a href="strcasecmp.html#strcasecmp">strcasecmp</a>: Compare strings ignoring case
|
||||
<li><a href="strcasestr.html#strcasestr">strcasestr</a>: Find string segment ignoring case
|
||||
<li><a href="strcat.html#strcat">strcat</a>: Concatenate strings
|
||||
<li><a href="strchr.html#strchr">strchr</a>: Search for character in string
|
||||
<li><a href="strcmp.html#strcmp">strcmp</a>: Character string compare
|
||||
<li><a href="strcoll.html#strcoll">strcoll</a>: Locale-specific character string compare
|
||||
<li><a href="strcpy.html#strcpy">strcpy</a>: Copy string
|
||||
<li><a href="strcspn.html#strcspn">strcspn</a>: Count chars not in string
|
||||
<li><a href="strerror.html#strerror">strerror</a>: Convert error number to string
|
||||
<li><a href="strerror_005fr.html#strerror_005fr">strerror_r</a>: Convert error number to string
|
||||
<li><a href="strlen.html#strlen">strlen</a>: Character string length
|
||||
<li><a href="strlwr.html#strlwr">strlwr</a>: Convert string to lowercase
|
||||
<li><a href="strncasecmp.html#strncasecmp">strncasecmp</a>: Compare strings ignoring case
|
||||
<li><a href="strncat.html#strncat">strncat</a>: Concatenate strings
|
||||
<li><a href="strncmp.html#strncmp">strncmp</a>: Character string compare
|
||||
<li><a href="strncpy.html#strncpy">strncpy</a>: Counted copy string
|
||||
<li><a href="strnlen.html#strnlen">strnlen</a>: Character string length
|
||||
<li><a href="strpbrk.html#strpbrk">strpbrk</a>: Find chars in string
|
||||
<li><a href="strrchr.html#strrchr">strrchr</a>: Reverse search for character in string
|
||||
<li><a href="strsignal.html#strsignal">strsignal</a>: Return signal message string
|
||||
<li><a href="strspn.html#strspn">strspn</a>: Find initial match
|
||||
<li><a href="strstr.html#strstr">strstr</a>: Find string segment
|
||||
<li><a href="strtok.html#strtok">strtok</a>: Get next token from a string
|
||||
<li><a href="strupr.html#strupr">strupr</a>: Convert string to upper case
|
||||
<li><a href="strxfrm.html#strxfrm">strxfrm</a>: Transform string
|
||||
<li><a href="swab.html#swab">swab</a>: Swap adjacent bytes
|
||||
<li><a href="wcscasecmp.html#wcscasecmp">wcscasecmp</a>: Compare wide character strings ignoring case
|
||||
<li><a href="wcsdup.html#wcsdup">wcsdup</a>: Wide character string duplicate
|
||||
<li><a href="wcsncasecmp.html#wcsncasecmp">wcsncasecmp</a>: Compare wide character strings ignoring case
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Stubs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Syscalls.html#Syscalls" title="Syscalls">
|
||||
<link rel="next" href="Reentrant-Syscalls.html#Reentrant-Syscalls" title="Reentrant Syscalls">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Stubs"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Syscalls.html#Syscalls">Syscalls</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">12.1 Definitions for OS interface</h3>
|
||||
|
||||
<p><a name="index-stubs-462"></a>
|
||||
<a name="index-subroutines-for-OS-interface-463"></a><a name="index-OS-interface-subroutines-464"></a>This is the complete set of system definitions (primarily subroutines)
|
||||
required; the examples shown implement the minimal functionality
|
||||
required to allow <code>libc</code> to link, and fail gracefully where OS
|
||||
services are not available.
|
||||
|
||||
<p>Graceful failure is permitted by returning an error code. A minor
|
||||
complication arises here: the C library must be compatible with
|
||||
development environments that supply fully functional versions of these
|
||||
subroutines. Such environments usually return error codes in a global
|
||||
<code>errno</code>. However, the Red Hat newlib C library provides a <em>macro</em>
|
||||
definition for <code>errno</code> in the header file <samp><span class="file">errno.h</span></samp>, as part
|
||||
of its support for reentrant routines (see <a href="Reentrancy.html#Reentrancy">Reentrancy</a>).
|
||||
|
||||
<p><a name="index-g_t_0040code_007berrno_007d-global-vs-macro-465"></a>The bridge between these two interpretations of <code>errno</code> is
|
||||
straightforward: the C library routines with OS interface calls
|
||||
capture the <code>errno</code> values returned globally, and record them in
|
||||
the appropriate field of the reentrancy structure (so that you can query
|
||||
them using the <code>errno</code> macro from <samp><span class="file">errno.h</span></samp>).
|
||||
|
||||
<p>This mechanism becomes visible when you write stub routines for OS
|
||||
interfaces. You must include <samp><span class="file">errno.h</span></samp>, then disable the macro,
|
||||
like this:
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
</pre>
|
||||
<p class="noindent">The examples in this chapter include this treatment of <code>errno</code>.
|
||||
|
||||
<dl>
|
||||
<dt><code>_exit</code><a name="index-g_t_005fexit-466"></a><dd>Exit a program without cleaning up files. If your system doesn't
|
||||
provide this, it is best to avoid linking with subroutines that require
|
||||
it (<code>exit</code>, <code>system</code>).
|
||||
|
||||
<br><dt><code>close</code><a name="index-close-467"></a><dd>Close a file. Minimal implementation:
|
||||
|
||||
<pre class="example"> int close(int file) {
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>environ</code><a name="index-environ-468"></a><dd>A pointer to a list of environment variables and their values. For a
|
||||
minimal environment, this empty list is adequate:
|
||||
|
||||
<pre class="example"> char *__env[1] = { 0 };
|
||||
char **environ = __env;
|
||||
</pre>
|
||||
<br><dt><code>execve</code><a name="index-execve-469"></a><dd>Transfer control to a new process. Minimal implementation (for a system
|
||||
without processes):
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int execve(char *name, char **argv, char **env) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>fork</code><a name="index-fork-470"></a><dd>Create a new process. Minimal implementation (for a system without processes):
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int fork(void) {
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>fstat</code><a name="index-fstat-471"></a><dd>Status of an open file. For consistency with other minimal
|
||||
implementations in these examples, all files are regarded as character
|
||||
special devices. The <samp><span class="file">sys/stat.h</span></samp> header file required is
|
||||
distributed in the <samp><span class="file">include</span></samp> subdirectory for this C library.
|
||||
|
||||
<pre class="example"> #include <sys/stat.h>
|
||||
int fstat(int file, struct stat *st) {
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>getpid</code><a name="index-getpid-472"></a><dd>Process-ID; this is sometimes used to generate strings unlikely to
|
||||
conflict with other processes. Minimal implementation, for a system
|
||||
without processes:
|
||||
|
||||
<pre class="example"> int getpid(void) {
|
||||
return 1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>isatty</code><a name="index-isatty-473"></a><dd>Query whether output stream is a terminal. For consistency with the
|
||||
other minimal implementations, which only support output to
|
||||
<code>stdout</code>, this minimal implementation is suggested:
|
||||
|
||||
<pre class="example"> int isatty(int file) {
|
||||
return 1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>kill</code><a name="index-kill-474"></a><dd>Send a signal. Minimal implementation:
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int kill(int pid, int sig) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>link</code><a name="index-link-475"></a><dd>Establish a new name for an existing file. Minimal implementation:
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int link(char *old, char *new) {
|
||||
errno = EMLINK;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>lseek</code><a name="index-lseek-476"></a><dd>Set position in a file. Minimal implementation:
|
||||
|
||||
<pre class="example"> int lseek(int file, int ptr, int dir) {
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>open</code><a name="index-open-477"></a><dd>Open a file. Minimal implementation:
|
||||
|
||||
<pre class="example"> int open(const char *name, int flags, int mode) {
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>read</code><a name="index-read-478"></a><dd>Read from a file. Minimal implementation:
|
||||
|
||||
<pre class="example"> int read(int file, char *ptr, int len) {
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>sbrk</code><a name="index-sbrk-479"></a><dd>Increase program data space. As <code>malloc</code> and related functions
|
||||
depend on this, it is useful to have a working implementation. The
|
||||
following suffices for a standalone system; it exploits the symbol
|
||||
<code>_end</code> automatically defined by the GNU linker.
|
||||
|
||||
<pre class="example"> caddr_t sbrk(int incr) {
|
||||
extern char _end; /* <span class="roman">Defined by the linker</span> */
|
||||
static char *heap_end;
|
||||
char *prev_heap_end;
|
||||
|
||||
if (heap_end == 0) {
|
||||
heap_end = &_end;
|
||||
}
|
||||
prev_heap_end = heap_end;
|
||||
if (heap_end + incr > stack_ptr) {
|
||||
write (1, "Heap and stack collision\n", 25);
|
||||
abort ();
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>stat</code><a name="index-stat-480"></a><dd>Status of a file (by name). Minimal implementation:
|
||||
|
||||
<pre class="example"> int stat(char *file, struct stat *st) {
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>times</code><a name="index-times-481"></a><dd>Timing information for current process. Minimal implementation:
|
||||
|
||||
<pre class="example"> int times(struct tms *buf) {
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>unlink</code><a name="index-unlink-482"></a><dd>Remove a file's directory entry. Minimal implementation:
|
||||
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int unlink(char *name) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>wait</code><a name="index-wait-483"></a><dd>Wait for a child process. Minimal implementation:
|
||||
<pre class="example"> #include <errno.h>
|
||||
#undef errno
|
||||
extern int errno;
|
||||
int wait(int *status) {
|
||||
errno = ECHILD;
|
||||
return -1;
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>write</code><a name="index-write-484"></a><dd>Write to a file. <samp><span class="file">libc</span></samp> subroutines will use this
|
||||
system routine for output to all files, <em>including</em>
|
||||
<code>stdout</code>—so if you need to generate any output, for example to a
|
||||
serial port for debugging, you should make your minimal <code>write</code>
|
||||
capable of doing this. The following minimal implementation is an
|
||||
incomplete example; it relies on a <code>outbyte</code> subroutine (not
|
||||
shown; typically, you must write this in assembler from examples
|
||||
provided by your hardware manufacturer) to actually perform the output.
|
||||
|
||||
<pre class="example"> int write(int file, char *ptr, int len) {
|
||||
int todo;
|
||||
|
||||
for (todo = 0; todo < len; todo++) {
|
||||
outbyte (*ptr++);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
</pre>
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Syscalls - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Misc.html#Misc" title="Misc">
|
||||
<link rel="next" href="Arglists.html#Arglists" title="Arglists">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Syscalls"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Arglists.html#Arglists">Arglists</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Misc.html#Misc">Misc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">12 System Calls</h2>
|
||||
|
||||
<p><a name="index-linking-the-C-library-461"></a>The C subroutine library depends on a handful of subroutine calls for
|
||||
operating system services. If you use the C library on a system that
|
||||
complies with the POSIX.1 standard (also known as IEEE 1003.1), most of
|
||||
these subroutines are supplied with your operating system.
|
||||
|
||||
<p>If some of these subroutines are not provided with your system—in
|
||||
the extreme case, if you are developing software for a “bare board”
|
||||
system, without an OS—you will at least need to provide do-nothing
|
||||
stubs (or subroutines with minimal functionality) to allow your
|
||||
programs to link with the subroutines in <code>libc.a</code>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Stubs.html#Stubs">Stubs</a>: Definitions for OS interface
|
||||
<li><a accesskey="2" href="Reentrant-Syscalls.html#Reentrant-Syscalls">Reentrant Syscalls</a>: Reentrant covers for OS subroutines
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Timefns - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Signals.html#Signals" title="Signals">
|
||||
<link rel="next" href="Locale.html#Locale" title="Locale">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Timefns"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Locale.html#Locale">Locale</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Signals.html#Signals">Signals</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">8 Time Functions (<samp><span class="file">time.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter groups functions used either for reporting on time
|
||||
(elapsed, current, or compute time) or to perform calculations based
|
||||
on time.
|
||||
|
||||
<p>The header file <samp><span class="file">time.h</span></samp> defines three types. <code>clock_t</code> and
|
||||
<code>time_t</code> are both used for representations of time particularly
|
||||
suitable for arithmetic. (In this implementation, quantities of type
|
||||
<code>clock_t</code> have the highest resolution possible on your machine,
|
||||
and quantities of type <code>time_t</code> resolve to seconds.) <code>size_t</code>
|
||||
is also defined if necessary for quantities representing sizes.
|
||||
|
||||
<p><samp><span class="file">time.h</span></samp> also defines the structure <code>tm</code> for the traditional
|
||||
representation of Gregorian calendar time as a series of numbers, with
|
||||
the following fields:
|
||||
|
||||
<dl>
|
||||
<dt><code>tm_sec</code><dd>Seconds, between 0 and 60 inclusive (60 allows for leap seconds).
|
||||
|
||||
<br><dt><code>tm_min</code><dd>Minutes, between 0 and 59 inclusive.
|
||||
|
||||
<br><dt><code>tm_hour</code><dd>Hours, between 0 and 23 inclusive.
|
||||
|
||||
<br><dt><code>tm_mday</code><dd>Day of the month, between 1 and 31 inclusive.
|
||||
|
||||
<br><dt><code>tm_mon</code><dd>Month, between 0 (January) and 11 (December).
|
||||
|
||||
<br><dt><code>tm_year</code><dd>Year (since 1900), can be negative for earlier years.
|
||||
|
||||
<br><dt><code>tm_wday</code><dd>Day of week, between 0 (Sunday) and 6 (Saturday).
|
||||
|
||||
<br><dt><code>tm_yday</code><dd>Number of days elapsed since last January 1, between 0 and 365 inclusive.
|
||||
|
||||
<br><dt><code>tm_isdst</code><dd>Daylight Savings Time flag: positive means DST in effect, zero means DST
|
||||
not in effect, negative means no information about DST is available.
|
||||
Although for mktime(), negative means that it should decide if DST is in
|
||||
effect or not.
|
||||
</dl>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="asctime.html#asctime">asctime</a>: Format time as string
|
||||
<li><a accesskey="2" href="clock.html#clock">clock</a>: Cumulative processor time
|
||||
<li><a accesskey="3" href="ctime.html#ctime">ctime</a>: Convert time to local and format as string
|
||||
<li><a accesskey="4" href="difftime.html#difftime">difftime</a>: Subtract two times
|
||||
<li><a accesskey="5" href="gmtime.html#gmtime">gmtime</a>: Convert time to UTC (GMT) traditional representation
|
||||
<li><a accesskey="6" href="localtime.html#localtime">localtime</a>: Convert time to local representation
|
||||
<li><a accesskey="7" href="mktime.html#mktime">mktime</a>: Convert time to arithmetic representation
|
||||
<li><a accesskey="8" href="strftime.html#strftime">strftime</a>: Convert date and time to a user-formatted string
|
||||
<li><a accesskey="9" href="time.html#time">time</a>: Get current calendar time (as single number)
|
||||
<li><a href="_005f_005ftz_005flock.html#g_t_005f_005ftz_005flock">__tz_lock</a>: Lock time zone global variables
|
||||
<li><a href="tzset.html#tzset">tzset</a>: Set timezone info
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Varargs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Arglists.html#Arglists" title="Arglists">
|
||||
<link rel="prev" href="Stdarg.html#Stdarg" title="Stdarg">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Varargs"></a>
|
||||
Previous: <a rel="previous" accesskey="p" href="Stdarg.html#Stdarg">Stdarg</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Arglists.html#Arglists">Arglists</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">13.2 Traditional macros, <samp><span class="file">varargs.h</span></samp></h3>
|
||||
|
||||
<p>If your C compiler predates ANSI C, you may still be able to use
|
||||
variable argument lists using the macros from the <samp><span class="file">varargs.h</span></samp>
|
||||
header file. These macros resemble their ANSI counterparts, but have
|
||||
important differences in usage. In particular, since traditional C has
|
||||
no declaration mechanism for variable argument lists, two additional
|
||||
macros are provided simply for the purpose of defining functions with
|
||||
variable argument lists.
|
||||
|
||||
<p>As with <samp><span class="file">stdarg.h</span></samp>, the type <code>va_list</code> is used to hold a data
|
||||
structure representing a variable argument list.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="va_005falist.html#va_005falist">va_alist</a>
|
||||
<li><a accesskey="2" href="va_005fstart_002dtrad.html#va_005fstart_002dtrad">va_start-trad</a>
|
||||
<li><a accesskey="3" href="va_005farg_002dtrad.html#va_005farg_002dtrad">va_arg-trad</a>
|
||||
<li><a accesskey="4" href="va_005fend_002dtrad.html#va_005fend_002dtrad">va_end-trad</a>
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Wchar strings - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Strings.html#Strings" title="Strings">
|
||||
<link rel="next" href="Signals.html#Signals" title="Signals">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Wchar-strings"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Signals.html#Signals">Signals</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Strings.html#Strings">Strings</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">6 Wide Character Strings (<samp><span class="file">wchar.h</span></samp>)</h2>
|
||||
|
||||
<p>This chapter describes wide-character string-handling functions and
|
||||
managing areas of memory containing wide characters. The corresponding
|
||||
declarations are in <samp><span class="file">wchar.h</span></samp>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="wmemchr.html#wmemchr">wmemchr</a>: Find wide character in memory
|
||||
<li><a accesskey="2" href="wmemcmp.html#wmemcmp">wmemcmp</a>: Compare two wide-character memory areas
|
||||
<li><a accesskey="3" href="wmemcpy.html#wmemcpy">wmemcpy</a>: Copy wide-character memory regions
|
||||
<li><a accesskey="4" href="wmemmove.html#wmemmove">wmemmove</a>: Move possibly overlapping wide-character memory
|
||||
<li><a accesskey="5" href="wmemset.html#wmemset">wmemset</a>: Set an area of memory to a specified wide character
|
||||
<li><a accesskey="6" href="wcscat.html#wcscat">wcscat</a>: Concatenate wide-character strings
|
||||
<li><a accesskey="7" href="wcschr.html#wcschr">wcschr</a>: Search for wide character in string
|
||||
<li><a accesskey="8" href="wcscmp.html#wcscmp">wcscmp</a>: Wide-character string compare
|
||||
<li><a accesskey="9" href="wcscoll.html#wcscoll">wcscoll</a>: Locale-specific wide-character string compare
|
||||
<li><a href="wcscpy.html#wcscpy">wcscpy</a>: Copy wide-character string
|
||||
<li><a href="wcpcpy.html#wcpcpy">wcpcpy</a>: Copy a wide-character string returning a pointer to its end
|
||||
<li><a href="wcscspn.html#wcscspn">wcscspn</a>: Count wide characters not in string
|
||||
<li><a href="wcsftime.html#wcsftime">wcsftime</a>: Convert date and time to a formatted wide-character string
|
||||
<li><a href="wcslcat.html#wcslcat">wcslcat</a>: Concatenate wide-character strings to specified length
|
||||
<li><a href="wcslcpy.html#wcslcpy">wcslcpy</a>: Copy wide-character string to specified length
|
||||
<li><a href="wcslen.html#wcslen">wcslen</a>: Wide-character string length
|
||||
<li><a href="wcsncat.html#wcsncat">wcsncat</a>: Concatenate wide-character strings
|
||||
<li><a href="wcsncmp.html#wcsncmp">wcsncmp</a>: Wide-character string compare
|
||||
<li><a href="wcsncpy.html#wcsncpy">wcsncpy</a>: Counted copy wide-character string
|
||||
<li><a href="wcpncpy.html#wcpncpy">wcpncpy</a>: Copy part of a wide-character string returning a pointer to its end
|
||||
<li><a href="wcsnlen.html#wcsnlen">wcsnlen</a>: Wide-character string length with maximum limit
|
||||
<li><a href="wcspbrk.html#wcspbrk">wcspbrk</a>: Find wide characters in string
|
||||
<li><a href="wcsrchr.html#wcsrchr">wcsrchr</a>: Reverse search for wide character in string
|
||||
<li><a href="wcsspn.html#wcsspn">wcsspn</a>: Find initial match in wide-character string
|
||||
<li><a href="wcsstr.html#wcsstr">wcsstr</a>: Find wide-character string segment
|
||||
<li><a href="wcstok.html#wcstok">wcstok</a>: Tokenize wide-character string
|
||||
<li><a href="wcswidth.html#wcswidth">wcswidth</a>: Number of column positions of a wide-character string
|
||||
<li><a href="wcsxfrm.html#wcsxfrm">wcsxfrm</a>: Locale-specific wide-character string transformation
|
||||
<li><a href="wcwidth.html#wcwidth">wcwidth</a>: Number of column positions of a wide-character code
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>_Exit - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="next" href="a64l.html#a64l" title="a64l">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="_Exit"></a>
|
||||
<a name="g_t_005fExit"></a>
|
||||
Next: <a rel="next" accesskey="n" href="a64l.html#a64l">a64l</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.1 <code>_Exit</code>—end program execution with no cleanup processing</h3>
|
||||
|
||||
<p><a name="index-g_t_005fExit-1"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
void _Exit(int <var>code</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>_Exit</code> to return control from a program to the host operating
|
||||
environment. Use the argument <var>code</var> to pass an exit status to the
|
||||
operating environment: two particular values, <code>EXIT_SUCCESS</code> and
|
||||
<code>EXIT_FAILURE</code>, are defined in `<code>stdlib.h</code>' to indicate success or
|
||||
failure in a portable fashion.
|
||||
|
||||
<p><code>_Exit</code> differs from <code>exit</code> in that it does not run any
|
||||
application-defined cleanup functions registered with <code>atexit</code> and
|
||||
it does not clean up files and streams. It is identical to <code>_exit</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>_Exit</code> does not return to its caller.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>_Exit</code> is defined by the C99 standard.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>_exit</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>__env_lock - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="ecvt.html#ecvt" title="ecvt">
|
||||
<link rel="next" href="gvcvt.html#gvcvt" title="gvcvt">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="__env_lock"></a>
|
||||
<a name="g_t_005f_005fenv_005flock"></a>
|
||||
Next: <a rel="next" accesskey="n" href="gvcvt.html#gvcvt">gvcvt</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ecvt.html#ecvt">ecvt</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.16 <code>__env_lock</code>, <code>__env_unlock</code>—lock environ variable</h3>
|
||||
|
||||
<p><a name="index-g_t_005f_005fenv_005flock-28"></a><a name="index-g_t_005f_005fenv_005funlock-29"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <envlock.h>
|
||||
void __env_lock (struct _reent *<var>reent</var>);
|
||||
void __env_unlock (struct _reent *<var>reent</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>setenv</code> family of routines call these functions when they need to
|
||||
modify the environ variable. The version of these routines supplied in the
|
||||
library use the lock API defined in sys/lock.h. If multiple threads of
|
||||
execution can call <code>setenv</code>, or if <code>setenv</code> can be called reentrantly,
|
||||
then you need to define your own versions of these functions in order to
|
||||
safely lock the memory pool during a call. If you do not, the memory pool
|
||||
may become corrupted.
|
||||
|
||||
<p>A call to <code>setenv</code> may call <code>__env_lock</code> recursively; that is,
|
||||
the sequence of calls may go <code>__env_lock</code>, <code>__env_lock</code>,
|
||||
<code>__env_unlock</code>, <code>__env_unlock</code>. Any implementation of these
|
||||
routines must be careful to avoid causing a thread to wait for a lock
|
||||
that it already holds.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>__malloc_lock - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="mallinfo.html#mallinfo" title="mallinfo">
|
||||
<link rel="next" href="mbsrtowcs.html#mbsrtowcs" title="mbsrtowcs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="__malloc_lock"></a>
|
||||
<a name="g_t_005f_005fmalloc_005flock"></a>
|
||||
Next: <a rel="next" accesskey="n" href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="mallinfo.html#mallinfo">mallinfo</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.25 <code>__malloc_lock</code>, <code>__malloc_unlock</code>—lock malloc pool</h3>
|
||||
|
||||
<p><a name="index-g_t_005f_005fmalloc_005flock-55"></a><a name="index-g_t_005f_005fmalloc_005funlock-56"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <malloc.h>
|
||||
void __malloc_lock (struct _reent *<var>reent</var>);
|
||||
void __malloc_unlock (struct _reent *<var>reent</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>malloc</code> family of routines call these functions when they need to lock
|
||||
the memory pool. The version of these routines supplied in the library use
|
||||
the lock API defined in sys/lock.h. If multiple threads of execution can
|
||||
call <code>malloc</code>, or if <code>malloc</code> can be called reentrantly, then you need to
|
||||
define your own versions of these functions in order to safely lock the
|
||||
memory pool during a call. If you do not, the memory pool may become
|
||||
corrupted.
|
||||
|
||||
<p>A call to <code>malloc</code> may call <code>__malloc_lock</code> recursively; that is,
|
||||
the sequence of calls may go <code>__malloc_lock</code>, <code>__malloc_lock</code>,
|
||||
<code>__malloc_unlock</code>, <code>__malloc_unlock</code>. Any implementation of these
|
||||
routines must be careful to avoid causing a thread to wait for a lock
|
||||
that it already holds.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>__tz_lock - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="prev" href="time.html#time" title="time">
|
||||
<link rel="next" href="tzset.html#tzset" title="tzset">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="__tz_lock"></a>
|
||||
<a name="g_t_005f_005ftz_005flock"></a>
|
||||
Next: <a rel="next" accesskey="n" href="tzset.html#tzset">tzset</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="time.html#time">time</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.10 <code>__tz_lock</code>, <code>__tz_unlock</code>—lock time zone global variables</h3>
|
||||
|
||||
<p><a name="index-g_t_005f_005ftz_005flock-441"></a><a name="index-g_t_005f_005ftz_005funlock-442"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include "local.h"
|
||||
void __tz_lock (void);
|
||||
void __tz_unlock (void);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>tzset</code> facility functions call these functions when they need to
|
||||
ensure the values of global variables. The version of these routines
|
||||
supplied in the library use the lock API defined in sys/lock.h. If multiple
|
||||
threads of execution can call the time functions and give up scheduling in
|
||||
the middle, then you you need to define your own versions of these functions
|
||||
in order to safely lock the time zone variables during a call. If you do
|
||||
not, the results of <code>localtime</code>, <code>mktime</code>, <code>ctime</code>, and <code>strftime</code>
|
||||
are undefined.
|
||||
|
||||
<p>The lock <code>__tz_lock</code> may not be called recursively; that is,
|
||||
a call <code>__tz_lock</code> will always lock all subsequent <code>__tz_lock</code> calls
|
||||
until the corresponding <code>__tz_unlock</code> call on the same thread is made.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>a64l - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="_005fExit.html#g_t_005fExit" title="_Exit">
|
||||
<link rel="next" href="abort.html#abort" title="abort">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="a64l"></a>
|
||||
Next: <a rel="next" accesskey="n" href="abort.html#abort">abort</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="_005fExit.html#g_t_005fExit">_Exit</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.2 <code>a64l</code>, <code>l64a</code>—convert between radix-64 ASCII string and long</h3>
|
||||
|
||||
<p><a name="index-a64l-2"></a><a name="index-l64a-3"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
long a64l(const char *<var>input</var>);
|
||||
char *l64a(long <var>input</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Conversion is performed between long and radix-64 characters. The
|
||||
<code>l64a</code> routine transforms up to 32 bits of input value starting from
|
||||
least significant bits to the most significant bits. The input value
|
||||
is split up into a maximum of 5 groups of 6 bits and possibly one
|
||||
group of 2 bits (bits 31 and 30).
|
||||
|
||||
<p>Each group of 6 bits forms a value from 0–63 which is translated into
|
||||
a character as follows:
|
||||
|
||||
<ul>
|
||||
<li>0 = '.'
|
||||
<li>1 = '/'
|
||||
<li>2–11 = '0' to '9'
|
||||
<li>12–37 = 'A' to 'Z'
|
||||
<li>38–63 = 'a' to 'z'
|
||||
</ul>
|
||||
|
||||
<p>When the remaining bits are zero or all bits have been translated, a
|
||||
null terminator is appended to the string. An input value of 0
|
||||
results in the empty string.
|
||||
|
||||
<p>The <code>a64l</code> function performs the reverse translation. Each
|
||||
character is used to generate a 6-bit value for up to 30 bits and then
|
||||
a 2-bit value to complete a 32-bit result. The null terminator means
|
||||
that the remaining digits are 0. An empty input string or NULL string
|
||||
results in 0L. An invalid string results in undefined behavior. If
|
||||
the size of a long is greater than 32 bits, the result is sign-extended.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>l64a</code> returns a null-terminated string of 0 to 6 characters.
|
||||
<code>a64l</code> returns the 32-bit translated value from the input character string.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>l64a</code> and <code>a64l</code> are non-ANSI and are defined by the Single Unix Specification.
|
||||
|
||||
<p>Supporting OS subroutines required: None.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>abort - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="a64l.html#a64l" title="a64l">
|
||||
<link rel="next" href="abs.html#abs" title="abs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="abort"></a>
|
||||
Next: <a rel="next" accesskey="n" href="abs.html#abs">abs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="a64l.html#a64l">a64l</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.3 <code>abort</code>—abnormal termination of a program</h3>
|
||||
|
||||
<p><a name="index-abort-4"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
void abort(void);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>abort</code> to signal that your program has detected a condition it
|
||||
cannot deal with. Normally, <code>abort</code> ends your program's execution.
|
||||
|
||||
<p>Before terminating your program, <code>abort</code> raises the exception <code>SIGABRT</code>
|
||||
(using `<code>raise(SIGABRT)</code>'). If you have used <code>signal</code> to register
|
||||
an exception handler for this condition, that handler has the
|
||||
opportunity to retain control, thereby avoiding program termination.
|
||||
|
||||
<p>In this implementation, <code>abort</code> does not perform any stream- or
|
||||
file-related cleanup (the host environment may do so; if not, you can
|
||||
arrange for your program to do its own cleanup with a <code>SIGABRT</code>
|
||||
exception handler).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>abort</code> does not return to its caller.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>abort</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>_exit</code> and optionally, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>abs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="abort.html#abort" title="abort">
|
||||
<link rel="next" href="assert.html#assert" title="assert">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="abs"></a>
|
||||
Next: <a rel="next" accesskey="n" href="assert.html#assert">assert</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="abort.html#abort">abort</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.4 <code>abs</code>—integer absolute value (magnitude)</h3>
|
||||
|
||||
<p><a name="index-abs-5"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
int abs(int <var>i</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>abs</code> returns
|
||||
the absolute value of <var>i</var> (also called the magnitude
|
||||
of <var>i</var>). That is, if <var>i</var> is negative, the result is the opposite
|
||||
of <var>i</var>, but if <var>i</var> is nonnegative the result is <var>i</var>.
|
||||
|
||||
<p>The similar function <code>labs</code> uses and returns <code>long</code> rather than <code>int</code> values.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The result is a nonnegative integer.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>abs</code> is ANSI.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>asctime - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="next" href="clock.html#clock" title="clock">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="asctime"></a>
|
||||
Next: <a rel="next" accesskey="n" href="clock.html#clock">clock</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.1 <code>asctime</code>—format time as string</h3>
|
||||
|
||||
<p><a name="index-asctime-428"></a><a name="index-g_t_005fasctime_005fr-429"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <time.h>
|
||||
char *asctime(const struct tm *<var>clock</var>);
|
||||
char *_asctime_r(const struct tm *<var>clock</var>, char *<var>buf</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Format the time value at <var>clock</var> into a string of the form
|
||||
<pre class="smallexample"> Wed Jun 15 11:38:07 1988\n\0
|
||||
</pre>
|
||||
<p>The string is generated in a static buffer; each call to <code>asctime</code>
|
||||
overwrites the string generated by previous calls.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
A pointer to the string containing a formatted timestamp.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>asctime</code>.
|
||||
|
||||
<p><code>asctime</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>assert - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="abs.html#abs" title="abs">
|
||||
<link rel="next" href="atexit.html#atexit" title="atexit">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="assert"></a>
|
||||
Next: <a rel="next" accesskey="n" href="atexit.html#atexit">atexit</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="abs.html#abs">abs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.5 <code>assert</code>—macro for debugging diagnostics</h3>
|
||||
|
||||
<p><a name="index-assert-6"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <assert.h>
|
||||
void assert(int <var>expression</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use this macro to embed debuggging diagnostic statements in
|
||||
your programs. The argument <var>expression</var> should be an
|
||||
expression which evaluates to true (nonzero) when your program
|
||||
is working as you intended.
|
||||
|
||||
<p>When <var>expression</var> evaluates to false (zero), <code>assert</code>
|
||||
calls <code>abort</code>, after first printing a message showing what
|
||||
failed and where:
|
||||
|
||||
<pre class="smallexample"> Assertion failed: <var>expression</var>, file <var>filename</var>, line <var>lineno</var>, function: <var>func</var>
|
||||
</pre>
|
||||
<p>If the name of the current function is not known (for example,
|
||||
when using a C89 compiler that does not understand __func__),
|
||||
the function location is omitted.
|
||||
|
||||
<p>The macro is defined to permit you to turn off all uses of
|
||||
<code>assert</code> at compile time by defining <code>NDEBUG</code> as a
|
||||
preprocessor variable. If you do this, the <code>assert</code> macro
|
||||
expands to
|
||||
|
||||
<pre class="smallexample"> (void(0))
|
||||
</pre>
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>assert</code> does not return a value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
The <code>assert</code> macro is required by ANSI, as is the behavior
|
||||
when <code>NDEBUG</code> is defined.
|
||||
|
||||
<p>Supporting OS subroutines required (only if enabled): <code>close</code>, <code>fstat</code>,
|
||||
<code>getpid</code>, <code>isatty</code>, <code>kill</code>, <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>atexit - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="assert.html#assert" title="assert">
|
||||
<link rel="next" href="atof.html#atof" title="atof">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="atexit"></a>
|
||||
Next: <a rel="next" accesskey="n" href="atof.html#atof">atof</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="assert.html#assert">assert</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.6 <code>atexit</code>—request execution of functions at program exit</h3>
|
||||
|
||||
<p><a name="index-atexit-7"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
int atexit (void (*<var>function</var>)(void));
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
You can use <code>atexit</code> to enroll functions in a list of functions that
|
||||
will be called when your program terminates normally. The argument is
|
||||
a pointer to a user-defined function (which must not require arguments and
|
||||
must not return a result).
|
||||
|
||||
<p>The functions are kept in a LIFO stack; that is, the last function
|
||||
enrolled by <code>atexit</code> will be the first to execute when your program
|
||||
exits.
|
||||
|
||||
<p>There is no built-in limit to the number of functions you can enroll
|
||||
in this list; however, after every group of 32 functions is enrolled,
|
||||
<code>atexit</code> will call <code>malloc</code> to get space for the next part of the
|
||||
list. The initial list of 32 functions is statically allocated, so
|
||||
you can always count on at least that many slots available.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>atexit</code> returns <code>0</code> if it succeeds in enrolling your function,
|
||||
<code>-1</code> if it fails (possible only if no space was available for
|
||||
<code>malloc</code> to extend the list of functions).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atexit</code> is required by the ANSI standard, which also specifies that
|
||||
implementations must support enrolling at least 32 functions.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>atof - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="atexit.html#atexit" title="atexit">
|
||||
<link rel="next" href="atoi.html#atoi" title="atoi">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="atof"></a>
|
||||
Next: <a rel="next" accesskey="n" href="atoi.html#atoi">atoi</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atexit.html#atexit">atexit</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.7 <code>atof</code>, <code>atoff</code>—string to double or float</h3>
|
||||
|
||||
<p><a name="index-atof-8"></a><a name="index-atoff-9"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
double atof(const char *<var>s</var>);
|
||||
float atoff(const char *<var>s</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>atof</code> converts the initial portion of a string to a <code>double</code>.
|
||||
<code>atoff</code> converts the initial portion of a string to a <code>float</code>.
|
||||
|
||||
<p>The functions parse the character string <var>s</var>,
|
||||
locating a substring which can be converted to a floating-point
|
||||
value. The substring must match the format:
|
||||
<pre class="smallexample"> [+|-]<var>digits</var>[.][<var>digits</var>][(e|E)[+|-]<var>digits</var>]
|
||||
</pre>
|
||||
<p>The substring converted is the longest initial
|
||||
fragment of <var>s</var> that has the expected format, beginning with
|
||||
the first non-whitespace character. The substring
|
||||
is empty if <code>str</code> is empty, consists entirely
|
||||
of whitespace, or if the first non-whitespace character is
|
||||
something other than <code>+</code>, <code>-</code>, <code>.</code>, or a digit.
|
||||
|
||||
<p><code>atof(</code><var>s</var><code>)</code> is implemented as <code>strtod(</code><var>s</var><code>, NULL)</code>.
|
||||
<code>atoff(</code><var>s</var><code>)</code> is implemented as <code>strtof(</code><var>s</var><code>, NULL)</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>atof</code> returns the converted substring value, if any, as a
|
||||
<code>double</code>; or <code>0.0</code>, if no conversion could be performed.
|
||||
If the correct value is out of the range of representable values, plus
|
||||
or minus <code>HUGE_VAL</code> is returned, and <code>ERANGE</code> is stored in
|
||||
<code>errno</code>.
|
||||
If the correct value would cause underflow, <code>0.0</code> is returned
|
||||
and <code>ERANGE</code> is stored in <code>errno</code>.
|
||||
|
||||
<p><code>atoff</code> obeys the same rules as <code>atof</code>, except that it
|
||||
returns a <code>float</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atof</code> is ANSI C. <code>atof</code>, <code>atoi</code>, and <code>atol</code> are subsumed by <code>strod</code>
|
||||
and <code>strol</code>, but are used extensively in existing code. These functions are
|
||||
less reliable, but may be faster if the argument is verified to be in a valid
|
||||
range.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>atoi - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="atof.html#atof" title="atof">
|
||||
<link rel="next" href="atoll.html#atoll" title="atoll">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="atoi"></a>
|
||||
Next: <a rel="next" accesskey="n" href="atoll.html#atoll">atoll</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atof.html#atof">atof</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.8 <code>atoi</code>, <code>atol</code>—string to integer</h3>
|
||||
|
||||
<p><a name="index-atoi-10"></a><a name="index-atol-11"></a><a name="index-g_t_005fatoi_005fr-12"></a><a name="index-g_t_005fatol_005fr-13"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
int atoi(const char *<var>s</var>);
|
||||
long atol(const char *<var>s</var>);
|
||||
int _atoi_r(struct _reent *<var>ptr</var>, const char *<var>s</var>);
|
||||
long _atol_r(struct _reent *<var>ptr</var>, const char *<var>s</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>atoi</code> converts the initial portion of a string to an <code>int</code>.
|
||||
<code>atol</code> converts the initial portion of a string to a <code>long</code>.
|
||||
|
||||
<p><code>atoi(s)</code> is implemented as <code>(int)strtol(s, NULL, 10).</code>
|
||||
<code>atol(s)</code> is implemented as <code>strtol(s, NULL, 10).</code>
|
||||
|
||||
<p><code>_atoi_r</code> and <code>_atol_r</code> are reentrant versions of <code>atoi</code> and
|
||||
<code>atol</code> respectively, passing the reentrancy struct pointer.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The functions return the converted value, if any. If no conversion was
|
||||
made, <code>0</code> is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atoi</code>, <code>atol</code> are ANSI.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>atoll - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="atoi.html#atoi" title="atoi">
|
||||
<link rel="next" href="bsearch.html#bsearch" title="bsearch">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="atoll"></a>
|
||||
Next: <a rel="next" accesskey="n" href="bsearch.html#bsearch">bsearch</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atoi.html#atoi">atoi</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.9 <code>atoll</code>—convert a string to a long long integer</h3>
|
||||
|
||||
<p><a name="index-atoll-14"></a><a name="index-g_t_005fatoll_005fr-15"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
long long atoll(const char *<var>str</var>);
|
||||
long long _atoll_r(struct _reent *<var>ptr</var>, const char *<var>str</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The function <code>atoll</code> converts the initial portion of the string
|
||||
pointed to by <code>*</code><var>str</var> to a type <code>long long</code>. A call to
|
||||
atoll(str) in this implementation is equivalent to
|
||||
strtoll(str, (char **)NULL, 10) including behavior on error.
|
||||
|
||||
<p>The alternate function <code>_atoll_r</code> is a reentrant version. The
|
||||
extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The converted value.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>atoll</code> is ISO 9899 (C99) and POSIX 1003.1-2001 compatable.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>bcmp - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Strings.html#Strings" title="Strings">
|
||||
<link rel="next" href="bcopy.html#bcopy" title="bcopy">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="bcmp"></a>
|
||||
Next: <a rel="next" accesskey="n" href="bcopy.html#bcopy">bcopy</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Strings.html#Strings">Strings</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.1 <code>bcmp</code>—compare two memory areas</h3>
|
||||
|
||||
<p><a name="index-bcmp-373"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <strings.h>
|
||||
int bcmp(const void *<var>s1</var>, const void *<var>s2</var>, size_t <var>n</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
This function compares not more than <var>n</var> bytes of the
|
||||
object pointed to by <var>s1</var> with the object pointed to by <var>s2</var>.
|
||||
|
||||
<p>This function is identical to <code>memcmp</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The function returns an integer greater than, equal to or
|
||||
less than zero according to whether the object pointed to by
|
||||
<var>s1</var> is greater than, equal to or less than the object
|
||||
pointed to by <var>s2</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>bcmp</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>bcopy - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Strings.html#Strings" title="Strings">
|
||||
<link rel="prev" href="bcmp.html#bcmp" title="bcmp">
|
||||
<link rel="next" href="bzero.html#bzero" title="bzero">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="bcopy"></a>
|
||||
Next: <a rel="next" accesskey="n" href="bzero.html#bzero">bzero</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="bcmp.html#bcmp">bcmp</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Strings.html#Strings">Strings</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.2 <code>bcopy</code>—copy memory regions</h3>
|
||||
|
||||
<p><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <strings.h>
|
||||
void bcopy(const void *<var>in</var>, void *<var>out</var>, size_t <var>n</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
This function copies <var>n</var> bytes from the memory region
|
||||
pointed to by <var>in</var> to the memory region pointed to by
|
||||
<var>out</var>.
|
||||
|
||||
<p>This function is implemented in term of <code>memmove</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>bcopy</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>bsearch - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="atoll.html#atoll" title="atoll">
|
||||
<link rel="next" href="calloc.html#calloc" title="calloc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="bsearch"></a>
|
||||
Next: <a rel="next" accesskey="n" href="calloc.html#calloc">calloc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="atoll.html#atoll">atoll</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.10 <code>bsearch</code>—binary search</h3>
|
||||
|
||||
<p><a name="index-bsearch-16"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
void *bsearch(const void *<var>key</var>, const void *<var>base</var>,
|
||||
size_t <var>nmemb</var>, size_t <var>size</var>,
|
||||
int (*<var>compar</var>)(const void *, const void *));
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>bsearch</code> searches an array beginning at <var>base</var> for any element
|
||||
that matches <var>key</var>, using binary search. <var>nmemb</var> is the element
|
||||
count of the array; <var>size</var> is the size of each element.
|
||||
|
||||
<p>The array must be sorted in ascending order with respect to the
|
||||
comparison function <var>compar</var> (which you supply as the last argument of
|
||||
<code>bsearch</code>).
|
||||
|
||||
<p>You must define the comparison function <code>(*</code><var>compar</var><code>)</code> to have two
|
||||
arguments; its result must be negative if the first argument is
|
||||
less than the second, zero if the two arguments match, and
|
||||
positive if the first argument is greater than the second (where
|
||||
“less than” and “greater than” refer to whatever arbitrary
|
||||
ordering is appropriate).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Returns a pointer to an element of <var>array</var> that matches <var>key</var>. If
|
||||
more than one matching element is available, the result may point to
|
||||
any of them.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>bsearch</code> is ANSI.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>bzero - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Strings.html#Strings" title="Strings">
|
||||
<link rel="prev" href="bcopy.html#bcopy" title="bcopy">
|
||||
<link rel="next" href="index.html#index" title="index">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="bzero"></a>
|
||||
Next: <a rel="next" accesskey="n" href="index.html#index">index</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="bcopy.html#bcopy">bcopy</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Strings.html#Strings">Strings</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.3 <code>bzero</code>—initialize memory to zero</h3>
|
||||
|
||||
<p><a name="index-bzero-374"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <strings.h>
|
||||
void bzero(void *<var>b</var>, size_t <var>length</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>bzero</code> initializes <var>length</var> bytes of memory, starting at address
|
||||
<var>b</var>, to zero.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>bzero</code> does not return a result.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>bzero</code> is in the Berkeley Software Distribution.
|
||||
Neither ANSI C nor the System V Interface Definition (Issue 2) require
|
||||
<code>bzero</code>.
|
||||
|
||||
<p><code>bzero</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>calloc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="bsearch.html#bsearch" title="bsearch">
|
||||
<link rel="next" href="div.html#div" title="div">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="calloc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="div.html#div">div</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="bsearch.html#bsearch">bsearch</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.11 <code>calloc</code>—allocate space for arrays</h3>
|
||||
|
||||
<p><a name="index-calloc-17"></a><a name="index-g_t_005fcalloc_005fr-18"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
void *calloc(size_t <var>n</var>, size_t <var>s</var>);
|
||||
void *_calloc_r(void *<var>reent</var>, size_t <var>n</var>, size_t <var>s</var>);
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>calloc</code> to request a block of memory sufficient to hold an
|
||||
array of <var>n</var> elements, each of which has size <var>s</var>.
|
||||
|
||||
<p>The memory allocated by <code>calloc</code> comes out of the same memory pool
|
||||
used by <code>malloc</code>, but the memory block is initialized to all zero
|
||||
bytes. (To avoid the overhead of initializing the space, use
|
||||
<code>malloc</code> instead.)
|
||||
|
||||
<p>The alternate function <code>_calloc_r</code> is reentrant.
|
||||
The extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, a pointer to the newly allocated space.
|
||||
|
||||
<p>If unsuccessful, <code>NULL</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>calloc</code> is ANSI.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>clearerr - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="next" href="diprintf.html#diprintf" title="diprintf">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="clearerr"></a>
|
||||
Next: <a rel="next" accesskey="n" href="diprintf.html#diprintf">diprintf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.1 <code>clearerr</code>—clear file or stream error indicator</h3>
|
||||
|
||||
<p><a name="index-clearerr-145"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
void clearerr(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>stdio</code> functions maintain an error indicator with each file
|
||||
pointer <var>fp</var>, to record whether any read or write errors have
|
||||
occurred on the associated file or stream. Similarly, it maintains an
|
||||
end-of-file indicator to record whether there is no more data in the
|
||||
file.
|
||||
|
||||
<p>Use <code>clearerr</code> to reset both of these indicators.
|
||||
|
||||
<p>See <code>ferror</code> and <code>feof</code> to query the two indicators.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>clearerr</code> does not return a result.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>clearerr</code>.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>clock - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="prev" href="asctime.html#asctime" title="asctime">
|
||||
<link rel="next" href="ctime.html#ctime" title="ctime">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="clock"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ctime.html#ctime">ctime</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="asctime.html#asctime">asctime</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.2 <code>clock</code>—cumulative processor time</h3>
|
||||
|
||||
<p><a name="index-clock-430"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <time.h>
|
||||
clock_t clock(void);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Calculates the best available approximation of the cumulative amount
|
||||
of time used by your program since it started. To convert the result
|
||||
into seconds, divide by the macro <code>CLOCKS_PER_SEC</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The amount of processor time used so far by your program, in units
|
||||
defined by the machine-dependent macro <code>CLOCKS_PER_SEC</code>. If no
|
||||
measurement is available, the result is (clock_t)<code>-1</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>clock</code> and <code>CLOCKS_PER_SEC</code>.
|
||||
|
||||
<p>Supporting OS subroutine required: <code>times</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ctime - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="prev" href="clock.html#clock" title="clock">
|
||||
<link rel="next" href="difftime.html#difftime" title="difftime">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ctime"></a>
|
||||
Next: <a rel="next" accesskey="n" href="difftime.html#difftime">difftime</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="clock.html#clock">clock</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.3 <code>ctime</code>—convert time to local and format as string</h3>
|
||||
|
||||
<p><a name="index-ctime-431"></a><a name="index-ctime_005fr-432"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <time.h>
|
||||
char *ctime(const time_t *<var>clock</var>);
|
||||
char *ctime_r(const time_t *<var>clock</var>, char *<var>buf</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Convert the time value at <var>clock</var> to local time (like <code>localtime</code>)
|
||||
and format it into a string of the form
|
||||
<pre class="smallexample"> Wed Jun 15 11:38:07 1988\n\0
|
||||
</pre>
|
||||
<p>(like <code>asctime</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
A pointer to the string containing a formatted timestamp.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>ctime</code>.
|
||||
|
||||
<p><code>ctime</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>difftime - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="prev" href="ctime.html#ctime" title="ctime">
|
||||
<link rel="next" href="gmtime.html#gmtime" title="gmtime">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="difftime"></a>
|
||||
Next: <a rel="next" accesskey="n" href="gmtime.html#gmtime">gmtime</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ctime.html#ctime">ctime</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.4 <code>difftime</code>—subtract two times</h3>
|
||||
|
||||
<p><a name="index-difftime-433"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <time.h>
|
||||
double difftime(time_t <var>tim1</var>, time_t <var>tim2</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Subtracts the two times in the arguments: `<var>tim1</var><code> - </code><var>tim2</var>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The difference (in seconds) between <var>tim2</var> and <var>tim1</var>, as a <code>double</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>difftime</code>, and defines its result to be in seconds
|
||||
in all implementations.
|
||||
|
||||
<p><code>difftime</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>diprintf - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="clearerr.html#clearerr" title="clearerr">
|
||||
<link rel="next" href="dprintf.html#dprintf" title="dprintf">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="diprintf"></a>
|
||||
Next: <a rel="next" accesskey="n" href="dprintf.html#dprintf">dprintf</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="clearerr.html#clearerr">clearerr</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.2 <code>diprintf</code>, <code>vdiprintf</code>—print to a file descriptor (integer only)</h3>
|
||||
|
||||
<p><a name="index-diprintf-146"></a><a name="index-g_t_005fdiprintf_005fr-147"></a><a name="index-vdiprintf-148"></a><a name="index-g_t_005fvdiprintf_005fr-149"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
int diprintf(int <var>fd</var>, const char *<var>format</var>, ...);
|
||||
int vdiprintf(int <var>fd</var>, const char *<var>format</var>, va_list <var>ap</var>);
|
||||
int _diprintf_r(struct _reent *<var>ptr</var>, int <var>fd</var>,
|
||||
const char *<var>format</var>, ...);
|
||||
int _vdiprintf_r(struct _reent *<var>ptr</var>, int <var>fd</var>,
|
||||
const char *<var>format</var>, va_list <var>ap</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>diprintf</code> and <code>vdiprintf</code> are similar to <code>dprintf</code> and <code>vdprintf</code>,
|
||||
except that only integer format specifiers are processed.
|
||||
|
||||
<p>The functions <code>_diprintf_r</code> and <code>_vdiprintf_r</code> are simply
|
||||
reentrant versions of the functions above.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Similar to <code>dprintf</code> and <code>vdprintf</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
This set of functions is an integer-only extension, and is not portable.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>div - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="calloc.html#calloc" title="calloc">
|
||||
<link rel="next" href="ecvtbuf.html#ecvtbuf" title="ecvtbuf">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="div"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ecvtbuf.html#ecvtbuf">ecvtbuf</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="calloc.html#calloc">calloc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.12 <code>div</code>—divide two integers</h3>
|
||||
|
||||
<p><a name="index-div-19"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
div_t div(int <var>n</var>, int <var>d</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Divide
|
||||
<var>n</var>/<var>d</var>,
|
||||
returning quotient and remainder as two integers in a structure <code>div_t</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The result is represented with the structure
|
||||
|
||||
<pre class="smallexample"> typedef struct
|
||||
{
|
||||
int quot;
|
||||
int rem;
|
||||
} div_t;
|
||||
</pre>
|
||||
<p>where the <code>quot</code> field represents the quotient, and <code>rem</code> the
|
||||
remainder. For nonzero <var>d</var>, if `<var>r</var><code> = div(</code><var>n</var><code>,</code><var>d</var><code>);</code>' then
|
||||
<var>n</var> equals `<var>r</var><code>.rem + </code><var>d</var><code>*</code><var>r</var><code>.quot</code>'.
|
||||
|
||||
<p>To divide <code>long</code> rather than <code>int</code> values, use the similar
|
||||
function <code>ldiv</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>div</code> is ANSI.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>dprintf - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="diprintf.html#diprintf" title="diprintf">
|
||||
<link rel="next" href="fclose.html#fclose" title="fclose">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="dprintf"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fclose.html#fclose">fclose</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="diprintf.html#diprintf">diprintf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.3 <code>dprintf</code>, <code>vdprintf</code>—print to a file descriptor</h3>
|
||||
|
||||
<p><a name="index-dprintf-150"></a><a name="index-g_t_005fdprintf_005fr-151"></a><a name="index-vdprintf-152"></a><a name="index-g_t_005fvdprintf_005fr-153"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
int dprintf(int <var>fd</var>, const char *restrict <var>format</var>, ...);
|
||||
int vdprintf(int <var>fd</var>, const char *restrict <var>format</var>,
|
||||
va_list <var>ap</var>);
|
||||
int _dprintf_r(struct _reent *<var>ptr</var>, int <var>fd</var>,
|
||||
const char *restrict <var>format</var>, ...);
|
||||
int _vdprintf_r(struct _reent *<var>ptr</var>, int <var>fd</var>,
|
||||
const char *restrict <var>format</var>, va_list <var>ap</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>dprintf</code> and <code>vdprintf</code> allow printing a format, similarly to
|
||||
<code>printf</code>, but write to a file descriptor instead of to a <code>FILE</code>
|
||||
stream.
|
||||
|
||||
<p>The functions <code>_dprintf_r</code> and <code>_vdprintf_r</code> are simply
|
||||
reentrant versions of the functions above.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The return value and errors are exactly as for <code>write</code>, except that
|
||||
<code>errno</code> may also be set to <code>ENOMEM</code> if the heap is exhausted.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
This function is originally a GNU extension in glibc and is not portable.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ecvt - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="ecvtbuf.html#ecvtbuf" title="ecvtbuf">
|
||||
<link rel="next" href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock" title="__env_lock">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ecvt"></a>
|
||||
Next: <a rel="next" accesskey="n" href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ecvtbuf.html#ecvtbuf">ecvtbuf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.13 <code>ecvt</code>, <code>ecvtf</code>, <code>fcvt</code>, <code>fcvtf</code>—double or float to string</h3>
|
||||
|
||||
<p><a name="index-ecvt-20"></a><a name="index-ecvtf-21"></a><a name="index-fcvt-22"></a><a name="index-fcvtf-23"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
|
||||
char *ecvt(double <var>val</var>, int <var>chars</var>, int *<var>decpt</var>, int *<var>sgn</var>);
|
||||
char *ecvtf(float <var>val</var>, int <var>chars</var>, int *<var>decpt</var>, int *<var>sgn</var>);
|
||||
|
||||
char *fcvt(double <var>val</var>, int <var>decimals</var>,
|
||||
int *<var>decpt</var>, int *<var>sgn</var>);
|
||||
char *fcvtf(float <var>val</var>, int <var>decimals</var>,
|
||||
int *<var>decpt</var>, int *<var>sgn</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>ecvt</code> and <code>fcvt</code> produce (null-terminated) strings of digits
|
||||
representating the <code>double</code> number <var>val</var>.
|
||||
<code>ecvtf</code> and <code>fcvtf</code> produce the corresponding character
|
||||
representations of <code>float</code> numbers.
|
||||
|
||||
<p>(The <code>stdlib</code> functions <code>ecvtbuf</code> and <code>fcvtbuf</code> are reentrant
|
||||
versions of <code>ecvt</code> and <code>fcvt</code>.)
|
||||
|
||||
<p>The only difference between <code>ecvt</code> and <code>fcvt</code> is the
|
||||
interpretation of the second argument (<var>chars</var> or <var>decimals</var>).
|
||||
For <code>ecvt</code>, the second argument <var>chars</var> specifies the total number
|
||||
of characters to write (which is also the number of significant digits
|
||||
in the formatted string, since these two functions write only digits).
|
||||
For <code>fcvt</code>, the second argument <var>decimals</var> specifies the number of
|
||||
characters to write after the decimal point; all digits for the integer
|
||||
part of <var>val</var> are always included.
|
||||
|
||||
<p>Since <code>ecvt</code> and <code>fcvt</code> write only digits in the output string,
|
||||
they record the location of the decimal point in <code>*</code><var>decpt</var>, and
|
||||
the sign of the number in <code>*</code><var>sgn</var>. After formatting a number,
|
||||
<code>*</code><var>decpt</var> contains the number of digits to the left of the
|
||||
decimal point. <code>*</code><var>sgn</var> contains <code>0</code> if the number is positive,
|
||||
and <code>1</code> if it is negative.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
All four functions return a pointer to the new string containing a
|
||||
character representation of <var>val</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
None of these functions are ANSI C.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ecvtbuf - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="div.html#div" title="div">
|
||||
<link rel="next" href="ecvt.html#ecvt" title="ecvt">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ecvtbuf"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ecvt.html#ecvt">ecvt</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="div.html#div">div</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.15 <code>ecvtbuf</code>, <code>fcvtbuf</code>—double or float to string</h3>
|
||||
|
||||
<p><a name="index-ecvtbuf-26"></a><a name="index-fcvtbuf-27"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
|
||||
char *ecvtbuf(double <var>val</var>, int <var>chars</var>, int *<var>decpt</var>,
|
||||
int *<var>sgn</var>, char *<var>buf</var>);
|
||||
|
||||
char *fcvtbuf(double <var>val</var>, int <var>decimals</var>, int *<var>decpt</var>,
|
||||
int *<var>sgn</var>, char *<var>buf</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>ecvtbuf</code> and <code>fcvtbuf</code> produce (null-terminated) strings
|
||||
of digits representating the <code>double</code> number <var>val</var>.
|
||||
|
||||
<p>The only difference between <code>ecvtbuf</code> and <code>fcvtbuf</code> is the
|
||||
interpretation of the second argument (<var>chars</var> or
|
||||
<var>decimals</var>). For <code>ecvtbuf</code>, the second argument <var>chars</var>
|
||||
specifies the total number of characters to write (which is
|
||||
also the number of significant digits in the formatted string,
|
||||
since these two functions write only digits). For <code>fcvtbuf</code>,
|
||||
the second argument <var>decimals</var> specifies the number of
|
||||
characters to write after the decimal point; all digits for
|
||||
the integer part of <var>val</var> are always included.
|
||||
|
||||
<p>Since <code>ecvtbuf</code> and <code>fcvtbuf</code> write only digits in the
|
||||
output string, they record the location of the decimal point
|
||||
in <code>*</code><var>decpt</var>, and the sign of the number in <code>*</code><var>sgn</var>.
|
||||
After formatting a number, <code>*</code><var>decpt</var> contains the number
|
||||
of digits to the left of the decimal point. <code>*</code><var>sgn</var>
|
||||
contains <code>0</code> if the number is positive, and <code>1</code> if it is
|
||||
negative. For both functions, you supply a pointer <var>buf</var> to
|
||||
an area of memory to hold the converted string.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Both functions return a pointer to <var>buf</var>, the string
|
||||
containing a character representation of <var>val</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither function is ANSI C.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>exit - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="gvcvt.html#gvcvt" title="gvcvt">
|
||||
<link rel="next" href="getenv.html#getenv" title="getenv">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="exit"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getenv.html#getenv">getenv</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="gvcvt.html#gvcvt">gvcvt</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.17 <code>exit</code>—end program execution</h3>
|
||||
|
||||
<p><a name="index-exit-30"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
void exit(int <var>code</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>exit</code> to return control from a program to the host operating
|
||||
environment. Use the argument <var>code</var> to pass an exit status to the
|
||||
operating environment: two particular values, <code>EXIT_SUCCESS</code> and
|
||||
<code>EXIT_FAILURE</code>, are defined in `<code>stdlib.h</code>' to indicate success or
|
||||
failure in a portable fashion.
|
||||
|
||||
<p><code>exit</code> does two kinds of cleanup before ending execution of your
|
||||
program. First, it calls all application-defined cleanup functions
|
||||
you have enrolled with <code>atexit</code>. Second, files and streams are
|
||||
cleaned up: any pending output is delivered to the host system, each
|
||||
open file or stream is closed, and files created by <code>tmpfile</code> are
|
||||
deleted.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>exit</code> does not return to its caller.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>exit</code>, and specifies that <code>EXIT_SUCCESS</code> and
|
||||
<code>EXIT_FAILURE</code> must be defined.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>_exit</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fclose - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="dprintf.html#dprintf" title="dprintf">
|
||||
<link rel="next" href="fcloseall.html#fcloseall" title="fcloseall">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fclose"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fcloseall.html#fcloseall">fcloseall</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="dprintf.html#dprintf">dprintf</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.4 <code>fclose</code>—close a file</h3>
|
||||
|
||||
<p><a name="index-fclose-154"></a><a name="index-g_t_005ffclose_005fr-155"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fclose(FILE *<var>fp</var>);
|
||||
int _fclose_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
If the file or stream identified by <var>fp</var> is open, <code>fclose</code> closes
|
||||
it, after first ensuring that any pending data is written (by calling
|
||||
<code>fflush(</code><var>fp</var><code>)</code>).
|
||||
|
||||
<p>The alternate function <code>_fclose_r</code> is a reentrant version.
|
||||
The extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fclose</code> returns <code>0</code> if successful (including when <var>fp</var> is
|
||||
<code>NULL</code> or not an open file); otherwise, it returns <code>EOF</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fclose</code> is required by ANSI C.
|
||||
|
||||
<p>Required OS subroutines: <code>close</code>, <code>fstat</code>, <code>isatty</code>, <code>lseek</code>,
|
||||
<code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fcloseall - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fclose.html#fclose" title="fclose">
|
||||
<link rel="next" href="fdopen.html#fdopen" title="fdopen">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fcloseall"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fdopen.html#fdopen">fdopen</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fclose.html#fclose">fclose</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.5 <code>fcloseall</code>—close all files</h3>
|
||||
|
||||
<p><a name="index-fcloseall-156"></a><a name="index-g_t_005ffcloseall_005fr-157"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fcloseall(void);
|
||||
int _fcloseall_r (struct _reent *<var>ptr</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fcloseall</code> closes all files in the current reentrancy struct's domain.
|
||||
The function <code>_fcloseall_r</code> is the same function, except the reentrancy
|
||||
struct is passed in as the <var>ptr</var> argument.
|
||||
|
||||
<p>This function is not recommended as it closes all streams, including
|
||||
the std streams.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fclose</code> returns <code>0</code> if all closes are successful. Otherwise,
|
||||
EOF is returned.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fcloseall</code> is a glibc extension.
|
||||
|
||||
<p>Required OS subroutines: <code>close</code>, <code>fstat</code>, <code>isatty</code>, <code>lseek</code>,
|
||||
<code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fdopen - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fcloseall.html#fcloseall" title="fcloseall">
|
||||
<link rel="next" href="feof.html#feof" title="feof">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fdopen"></a>
|
||||
Next: <a rel="next" accesskey="n" href="feof.html#feof">feof</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fcloseall.html#fcloseall">fcloseall</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.6 <code>fdopen</code>—turn open file into a stream</h3>
|
||||
|
||||
<p><a name="index-fdopen-158"></a><a name="index-g_t_005ffdopen_005fr-159"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *fdopen(int <var>fd</var>, const char *<var>mode</var>);
|
||||
FILE *_fdopen_r(struct _reent *<var>reent</var>,
|
||||
int <var>fd</var>, const char *<var>mode</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fdopen</code> produces a file descriptor of type <code>FILE *</code>, from a
|
||||
descriptor for an already-open file (returned, for example, by the
|
||||
system subroutine <code>open</code> rather than by <code>fopen</code>).
|
||||
The <var>mode</var> argument has the same meanings as in <code>fopen</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
File pointer or <code>NULL</code>, as for <code>fopen</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fdopen</code> is ANSI.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>feof - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fdopen.html#fdopen" title="fdopen">
|
||||
<link rel="next" href="ferror.html#ferror" title="ferror">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="feof"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ferror.html#ferror">ferror</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fdopen.html#fdopen">fdopen</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.7 <code>feof</code>—test for end of file</h3>
|
||||
|
||||
<p><a name="index-feof-160"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int feof(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>feof</code> tests whether or not the end of the file identified by <var>fp</var>
|
||||
has been reached.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>feof</code> returns <code>0</code> if the end of file has not yet been reached; if
|
||||
at end of file, the result is nonzero.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>feof</code> is required by ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ferror - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="feof.html#feof" title="feof">
|
||||
<link rel="next" href="fflush.html#fflush" title="fflush">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ferror"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fflush.html#fflush">fflush</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="feof.html#feof">feof</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.8 <code>ferror</code>—test whether read/write error has occurred</h3>
|
||||
|
||||
<p><a name="index-ferror-161"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int ferror(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>stdio</code> functions maintain an error indicator with each file
|
||||
pointer <var>fp</var>, to record whether any read or write errors have
|
||||
occurred on the associated file or stream.
|
||||
Use <code>ferror</code> to query this indicator.
|
||||
|
||||
<p>See <code>clearerr</code> to reset the error indicator.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>ferror</code> returns <code>0</code> if no errors have occurred; it returns a
|
||||
nonzero value otherwise.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>ferror</code>.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fflush - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="ferror.html#ferror" title="ferror">
|
||||
<link rel="next" href="fgetc.html#fgetc" title="fgetc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fflush"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fgetc.html#fgetc">fgetc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ferror.html#ferror">ferror</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.9 <code>fflush</code>—flush buffered file output</h3>
|
||||
|
||||
<p><a name="index-fflush-162"></a><a name="index-g_t_005ffflush_005fr-163"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fflush(FILE *<var>fp</var>);
|
||||
|
||||
int _fflush_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
The <code>stdio</code> output functions can buffer output before delivering it
|
||||
to the host system, in order to minimize the overhead of system calls.
|
||||
|
||||
<p>Use <code>fflush</code> to deliver any such pending output (for the file
|
||||
or stream identified by <var>fp</var>) to the host system.
|
||||
|
||||
<p>If <var>fp</var> is <code>NULL</code>, <code>fflush</code> delivers pending output from all
|
||||
open files.
|
||||
|
||||
<p>Additionally, if <var>fp</var> is a seekable input stream visiting a file
|
||||
descriptor, set the position of the file descriptor to match next
|
||||
unread byte, useful for obeying POSIX semantics when ending a process
|
||||
without consuming all input from the stream.
|
||||
|
||||
<p>The alternate function <code>_fflush_r</code> is a reentrant version, where the
|
||||
extra argument <var>reent</var> is a pointer to a reentrancy structure, and
|
||||
<var>fp</var> must not be NULL.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fflush</code> returns <code>0</code> unless it encounters a write error; in that
|
||||
situation, it returns <code>EOF</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fflush</code>. The behavior on input streams is only
|
||||
specified by POSIX, and not all implementations follow POSIX rules.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ffs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Misc.html#Misc" title="Misc">
|
||||
<link rel="next" href="unctrl.html#unctrl" title="unctrl">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ffs"></a>
|
||||
Next: <a rel="next" accesskey="n" href="unctrl.html#unctrl">unctrl</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Misc.html#Misc">Misc</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">11.1 <code>ffs</code>—find first bit set in a word</h3>
|
||||
|
||||
<p><a name="index-ffs-458"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <strings.h>
|
||||
int ffs(int <var>word</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
|
||||
<p><code>ffs</code> returns the first bit set in a word.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>ffs</code> returns 0 if <var>c</var> is 0, 1 if <var>c</var> is odd, 2 if <var>c</var> is a multiple of
|
||||
2, etc.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>ffs</code> is not ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fgetc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fflush.html#fflush" title="fflush">
|
||||
<link rel="next" href="fgetpos.html#fgetpos" title="fgetpos">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fgetc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fgetpos.html#fgetpos">fgetpos</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fflush.html#fflush">fflush</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.10 <code>fgetc</code>—get a character from a file or stream</h3>
|
||||
|
||||
<p><a name="index-fgetc-164"></a><a name="index-g_t_005ffgetc_005fr-165"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fgetc(FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
int _fgetc_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>fgetc</code> to get the next single character from the file or stream
|
||||
identified by <var>fp</var>. As a side effect, <code>fgetc</code> advances the file's
|
||||
current position indicator.
|
||||
|
||||
<p>For a macro version of this function, see <code>getc</code>.
|
||||
|
||||
<p>The function <code>_fgetc_r</code> is simply a reentrant version of
|
||||
<code>fgetc</code> that is passed the additional reentrant structure
|
||||
pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next character (read as an <code>unsigned char</code>, and cast to
|
||||
<code>int</code>), unless there is no more data, or the host system reports a
|
||||
read error; in either of these situations, <code>fgetc</code> returns <code>EOF</code>.
|
||||
|
||||
<p>You can distinguish the two situations that cause an <code>EOF</code> result by
|
||||
using the <code>ferror</code> and <code>feof</code> functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fgetc</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fgetpos - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fgetc.html#fgetc" title="fgetc">
|
||||
<link rel="next" href="fgets.html#fgets" title="fgets">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fgetpos"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fgets.html#fgets">fgets</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fgetc.html#fgetc">fgetc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.11 <code>fgetpos</code>—record position in a stream or file</h3>
|
||||
|
||||
<p><a name="index-fgetpos-166"></a><a name="index-g_t_005ffgetpos_005fr-167"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fgetpos(FILE *restrict <var>fp</var>, fpos_t *restrict <var>pos</var>);
|
||||
int _fgetpos_r(struct _reent *<var>ptr</var>, FILE *restrict <var>fp</var>, fpos_t *restrict <var>pos</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Objects of type <code>FILE</code> can have a “position” that records how much
|
||||
of the file your program has already read. Many of the <code>stdio</code> functions
|
||||
depend on this position, and many change it as a side effect.
|
||||
|
||||
<p>You can use <code>fgetpos</code> to report on the current position for a file
|
||||
identified by <var>fp</var>; <code>fgetpos</code> will write a value
|
||||
representing that position at <code>*</code><var>pos</var>. Later, you can
|
||||
use this value with <code>fsetpos</code> to return the file to this
|
||||
position.
|
||||
|
||||
<p>In the current implementation, <code>fgetpos</code> simply uses a character
|
||||
count to represent the file position; this is the same number that
|
||||
would be returned by <code>ftell</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fgetpos</code> returns <code>0</code> when successful. If <code>fgetpos</code> fails, the
|
||||
result is <code>1</code>. Failure occurs on streams that do not support
|
||||
positioning; the global <code>errno</code> indicates this condition with the
|
||||
value <code>ESPIPE</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fgetpos</code> is required by the ANSI C standard, but the meaning of the
|
||||
value it records is not specified beyond requiring that it be
|
||||
acceptable as an argument to <code>fsetpos</code>. In particular, other
|
||||
conforming C implementations may return a different result from
|
||||
<code>ftell</code> than what <code>fgetpos</code> writes at <code>*</code><var>pos</var>.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fgets - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fgetpos.html#fgetpos" title="fgetpos">
|
||||
<link rel="next" href="fgetwc.html#fgetwc" title="fgetwc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fgets"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fgetwc.html#fgetwc">fgetwc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fgetpos.html#fgetpos">fgetpos</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.12 <code>fgets</code>—get character string from a file or stream</h3>
|
||||
|
||||
<p><a name="index-fgets-168"></a><a name="index-g_t_005ffgets_005fr-169"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
char *fgets(char *restrict <var>buf</var>, int <var>n</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
char *_fgets_r(struct _reent *<var>ptr</var>, char *restrict <var>buf</var>, int <var>n</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Reads at most <var>n-1</var> characters from <var>fp</var> until a newline
|
||||
is found. The characters including to the newline are stored
|
||||
in <var>buf</var>. The buffer is terminated with a 0.
|
||||
|
||||
<p>The <code>_fgets_r</code> function is simply the reentrant version of
|
||||
<code>fgets</code> and is passed an additional reentrancy structure
|
||||
pointer: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fgets</code> returns the buffer passed to it, with the data
|
||||
filled in. If end of file occurs with some data already
|
||||
accumulated, the data is returned with no other indication. If
|
||||
no data are read, NULL is returned instead.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fgets</code> should replace all uses of <code>gets</code>. Note however
|
||||
that <code>fgets</code> returns all of the data, while <code>gets</code> removes
|
||||
the trailing newline (with no indication that it has done so.)
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fgetwc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fgets.html#fgets" title="fgets">
|
||||
<link rel="next" href="fgetws.html#fgetws" title="fgetws">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fgetwc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fgetws.html#fgetws">fgetws</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fgets.html#fgets">fgets</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.13 <code>fgetwc</code>, <code>getwc</code>—get a wide character from a file or stream</h3>
|
||||
|
||||
<p><a name="index-fgetwc-170"></a><a name="index-g_t_005ffgetwc_005fr-171"></a><a name="index-getwc-172"></a><a name="index-g_t_005fgetwc_005fr-173"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t fgetwc(FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t _fgetwc_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t getwc(FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t _getwc_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>fgetwc</code> to get the next wide character from the file or stream
|
||||
identified by <var>fp</var>. As a side effect, <code>fgetwc</code> advances the file's
|
||||
current position indicator.
|
||||
|
||||
<p>The <code>getwc</code> function or macro functions identically to <code>fgetwc</code>. It
|
||||
may be implemented as a macro, and may evaluate its argument more than
|
||||
once. There is no reason ever to use it.
|
||||
|
||||
<p><code>_fgetwc_r</code> and <code>_getwc_r</code> are simply reentrant versions of
|
||||
<code>fgetwc</code> and <code>getwc</code> that are passed the additional reentrant
|
||||
structure pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next wide character cast to <code>wint_t</code>), unless there is no more data,
|
||||
or the host system reports a read error; in either of these situations,
|
||||
<code>fgetwc</code> and <code>getwc</code> return <code>WEOF</code>.
|
||||
|
||||
<p>You can distinguish the two situations that cause an <code>EOF</code> result by
|
||||
using the <code>ferror</code> and <code>feof</code> functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.1-2001
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fgetws - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fgetwc.html#fgetwc" title="fgetwc">
|
||||
<link rel="next" href="fileno.html#fileno" title="fileno">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fgetws"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fileno.html#fileno">fileno</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fgetwc.html#fgetwc">fgetwc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.14 <code>fgetws</code>—get wide character string from a file or stream</h3>
|
||||
|
||||
<p><a name="index-fgetws-174"></a><a name="index-g_t_005ffgetws_005fr-175"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wchar.h>
|
||||
wchar_t *fgetws(wchar_t *__restrict <var>ws</var>, int <var>n</var>,
|
||||
FILE *__restrict <var>fp</var>);
|
||||
|
||||
#include <wchar.h>
|
||||
wchar_t *_fgetws_r(struct _reent *<var>ptr</var>, wchar_t *<var>ws</var>,
|
||||
int <var>n</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Reads at most <var>n-1</var> wide characters from <var>fp</var> until a newline
|
||||
is found. The wide characters including to the newline are stored
|
||||
in <var>ws</var>. The buffer is terminated with a 0.
|
||||
|
||||
<p>The <code>_fgetws_r</code> function is simply the reentrant version of
|
||||
<code>fgetws</code> and is passed an additional reentrancy structure
|
||||
pointer: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fgetws</code> returns the buffer passed to it, with the data
|
||||
filled in. If end of file occurs with some data already
|
||||
accumulated, the data is returned with no other indication. If
|
||||
no data are read, NULL is returned instead.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.1-2001
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fileno - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fgetws.html#fgetws" title="fgetws">
|
||||
<link rel="next" href="fmemopen.html#fmemopen" title="fmemopen">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fileno"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fmemopen.html#fmemopen">fmemopen</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fgetws.html#fgetws">fgetws</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.15 <code>fileno</code>—return file descriptor associated with stream</h3>
|
||||
|
||||
<p><a name="index-fileno-176"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fileno(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
You can use <code>fileno</code> to return the file descriptor identified by <var>fp</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fileno</code> returns a non-negative integer when successful.
|
||||
If <var>fp</var> is not an open stream, <code>fileno</code> returns -1.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fileno</code> is not part of ANSI C.
|
||||
POSIX requires <code>fileno</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: none.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fmemopen - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fileno.html#fileno" title="fileno">
|
||||
<link rel="next" href="fopen.html#fopen" title="fopen">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fmemopen"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fopen.html#fopen">fopen</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fileno.html#fileno">fileno</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.16 <code>fmemopen</code>—open a stream around a fixed-length string</h3>
|
||||
|
||||
<p><a name="index-fmemopen-177"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *fmemopen(void *restrict <var>buf</var>, size_t <var>size</var>,
|
||||
const char *restrict <var>mode</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fmemopen</code> creates a seekable <code>FILE</code> stream that wraps a
|
||||
fixed-length buffer of <var>size</var> bytes starting at <var>buf</var>. The stream
|
||||
is opened with <var>mode</var> treated as in <code>fopen</code>, where append mode
|
||||
starts writing at the first NUL byte. If <var>buf</var> is NULL, then
|
||||
<var>size</var> bytes are automatically provided as if by <code>malloc</code>, with
|
||||
the initial size of 0, and <var>mode</var> must contain <code>+</code> so that data
|
||||
can be read after it is written.
|
||||
|
||||
<p>The stream maintains a current position, which moves according to
|
||||
bytes read or written, and which can be one past the end of the array.
|
||||
The stream also maintains a current file size, which is never greater
|
||||
than <var>size</var>. If <var>mode</var> starts with <code>r</code>, the position starts at
|
||||
<code>0</code>, and file size starts at <var>size</var> if <var>buf</var> was provided. If
|
||||
<var>mode</var> starts with <code>w</code>, the position and file size start at <code>0</code>,
|
||||
and if <var>buf</var> was provided, the first byte is set to NUL. If
|
||||
<var>mode</var> starts with <code>a</code>, the position and file size start at the
|
||||
location of the first NUL byte, or else <var>size</var> if <var>buf</var> was
|
||||
provided.
|
||||
|
||||
<p>When reading, NUL bytes have no significance, and reads cannot exceed
|
||||
the current file size. When writing, the file size can increase up to
|
||||
<var>size</var> as needed, and NUL bytes may be embedded in the stream (see
|
||||
<code>open_memstream</code> for an alternative that automatically enlarges the
|
||||
buffer). When the stream is flushed or closed after a write that
|
||||
changed the file size, a NUL byte is written at the current position
|
||||
if there is still room; if the stream is not also open for reading, a
|
||||
NUL byte is additionally written at the last byte of <var>buf</var> when the
|
||||
stream has exceeded <var>size</var>, so that a write-only <var>buf</var> is always
|
||||
NUL-terminated when the stream is flushed or closed (and the initial
|
||||
<var>size</var> should take this into account). It is not possible to seek
|
||||
outside the bounds of <var>size</var>. A NUL byte written during a flush is
|
||||
restored to its previous value when seeking elsewhere in the string.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The return value is an open FILE pointer on success. On error,
|
||||
<code>NULL</code> is returned, and <code>errno</code> will be set to EINVAL if <var>size</var>
|
||||
is zero or <var>mode</var> is invalid, ENOMEM if <var>buf</var> was NULL and memory
|
||||
could not be allocated, or EMFILE if too many streams are already
|
||||
open.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
This function is being added to POSIX 200x, but is not in POSIX 2001.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>sbrk</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fopen - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fmemopen.html#fmemopen" title="fmemopen">
|
||||
<link rel="next" href="fopencookie.html#fopencookie" title="fopencookie">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fopen"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fopencookie.html#fopencookie">fopencookie</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fmemopen.html#fmemopen">fmemopen</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.17 <code>fopen</code>—open a file</h3>
|
||||
|
||||
<p><a name="index-fopen-178"></a><a name="index-g_t_005ffopen_005fr-179"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *fopen(const char *<var>file</var>, const char *<var>mode</var>);
|
||||
|
||||
FILE *_fopen_r(struct _reent *<var>reent</var>,
|
||||
const char *<var>file</var>, const char *<var>mode</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fopen</code> initializes the data structures needed to read or write a
|
||||
file. Specify the file's name as the string at <var>file</var>, and the kind
|
||||
of access you need to the file with the string at <var>mode</var>.
|
||||
|
||||
<p>The alternate function <code>_fopen_r</code> is a reentrant version.
|
||||
The extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p>Three fundamental kinds of access are available: read, write, and append.
|
||||
<code>*</code><var>mode</var> must begin with one of the three characters `<code>r</code>',
|
||||
`<code>w</code>', or `<code>a</code>', to select one of these:
|
||||
|
||||
<dl>
|
||||
<dt><code>r</code><dd>Open the file for reading; the operation will fail if the file does
|
||||
not exist, or if the host system does not permit you to read it.
|
||||
|
||||
<br><dt><code>w</code><dd>Open the file for writing <em>from the beginning</em> of the file:
|
||||
effectively, this always creates a new file. If the file whose name you
|
||||
specified already existed, its old contents are discarded.
|
||||
|
||||
<br><dt><code>a</code><dd>Open the file for appending data, that is writing from the end of
|
||||
file. When you open a file this way, all data always goes to the
|
||||
current end of file; you cannot change this using <code>fseek</code>.
|
||||
</dl>
|
||||
|
||||
<p>Some host systems distinguish between “binary” and “text” files.
|
||||
Such systems may perform data transformations on data written to, or
|
||||
read from, files opened as “text”.
|
||||
If your system is one of these, then you can append a `<code>b</code>' to any
|
||||
of the three modes above, to specify that you are opening the file as
|
||||
a binary file (the default is to open the file as a text file).
|
||||
|
||||
<p>`<code>rb</code>', then, means “read binary”; `<code>wb</code>', “write binary”; and
|
||||
`<code>ab</code>', “append binary”.
|
||||
|
||||
<p>To make C programs more portable, the `<code>b</code>' is accepted on all
|
||||
systems, whether or not it makes a difference.
|
||||
|
||||
<p>Finally, you might need to both read and write from the same file.
|
||||
You can also append a `<code>+</code>' to any of the three modes, to permit
|
||||
this. (If you want to append both `<code>b</code>' and `<code>+</code>', you can do it
|
||||
in either order: for example, <code>"rb+"</code> means the same thing as
|
||||
<code>"r+b"</code> when used as a mode string.)
|
||||
|
||||
<p>Use <code>"r+"</code> (or <code>"rb+"</code>) to permit reading and writing anywhere in
|
||||
an existing file, without discarding any data; <code>"w+"</code> (or <code>"wb+"</code>)
|
||||
to create a new file (or begin by discarding all data from an old one)
|
||||
that permits reading and writing anywhere in it; and <code>"a+"</code> (or
|
||||
<code>"ab+"</code>) to permit reading anywhere in an existing file, but writing
|
||||
only at the end.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fopen</code> returns a file pointer which you can use for other file
|
||||
operations, unless the file you requested could not be opened; in that
|
||||
situation, the result is <code>NULL</code>. If the reason for failure was an
|
||||
invalid string at <var>mode</var>, <code>errno</code> is set to <code>EINVAL</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fopen</code> is required by ANSI C.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>open</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fopencookie - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fopen.html#fopen" title="fopen">
|
||||
<link rel="next" href="fpurge.html#fpurge" title="fpurge">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fopencookie"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fpurge.html#fpurge">fpurge</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fopen.html#fopen">fopen</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.18 <code>fopencookie</code>—open a stream with custom callbacks</h3>
|
||||
|
||||
<p><a name="index-fopencookie-180"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *fopencookie(const void *<var>cookie</var>, const char *<var>mode</var>,
|
||||
cookie_io_functions_t <var>functions</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fopencookie</code> creates a <code>FILE</code> stream where I/O is performed using
|
||||
custom callbacks. The callbacks are registered via the structure:
|
||||
|
||||
<p>typedef ssize_t (*cookie_read_function_t)(void *_cookie, char *_buf,
|
||||
size_t _n);
|
||||
typedef ssize_t (*cookie_write_function_t)(void *_cookie,
|
||||
const char *_buf, size_t _n);
|
||||
typedef int (*cookie_seek_function_t)(void *_cookie, off_t *_off,
|
||||
int _whence);
|
||||
typedef int (*cookie_close_function_t)(void *_cookie);
|
||||
|
||||
<pre class="smallexample"> typedef struct
|
||||
{
|
||||
cookie_read_function_t *read;
|
||||
cookie_write_function_t *write;
|
||||
cookie_seek_function_t *seek;
|
||||
cookie_close_function_t *close;
|
||||
} cookie_io_functions_t;
|
||||
</pre>
|
||||
<p>The stream is opened with <var>mode</var> treated as in <code>fopen</code>. The
|
||||
callbacks <var>functions.read</var> and <var>functions.write</var> may only be NULL
|
||||
when <var>mode</var> does not require them.
|
||||
|
||||
<p><var>functions.read</var> should return -1 on failure, or else the number of
|
||||
bytes read (0 on EOF). It is similar to <code>read</code>, except that
|
||||
<var>cookie</var> will be passed as the first argument.
|
||||
|
||||
<p><var>functions.write</var> should return -1 on failure, or else the number of
|
||||
bytes written. It is similar to <code>write</code>, except that <var>cookie</var>
|
||||
will be passed as the first argument.
|
||||
|
||||
<p><var>functions.seek</var> should return -1 on failure, and 0 on success, with
|
||||
<var>_off</var> set to the current file position. It is a cross between
|
||||
<code>lseek</code> and <code>fseek</code>, with the <var>_whence</var> argument interpreted in
|
||||
the same manner. A NULL <var>functions.seek</var> makes the stream behave
|
||||
similarly to a pipe in relation to stdio functions that require
|
||||
positioning.
|
||||
|
||||
<p><var>functions.close</var> should return -1 on failure, or 0 on success. It
|
||||
is similar to <code>close</code>, except that <var>cookie</var> will be passed as the
|
||||
first argument. A NULL <var>functions.close</var> merely flushes all data
|
||||
then lets <code>fclose</code> succeed. A failed close will still invalidate
|
||||
the stream.
|
||||
|
||||
<p>Read and write I/O functions are allowed to change the underlying
|
||||
buffer on fully buffered or line buffered streams by calling
|
||||
<code>setvbuf</code>. They are also not required to completely fill or empty
|
||||
the buffer. They are not, however, allowed to change streams from
|
||||
unbuffered to buffered or to change the state of the line buffering
|
||||
flag. They must also be prepared to have read or write calls occur on
|
||||
buffers other than the one most recently specified.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The return value is an open FILE pointer on success. On error,
|
||||
<code>NULL</code> is returned, and <code>errno</code> will be set to EINVAL if a
|
||||
function pointer is missing or <var>mode</var> is invalid, ENOMEM if the
|
||||
stream cannot be created, or EMFILE if too many streams are already
|
||||
open.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
This function is a newlib extension, copying the prototype from Linux.
|
||||
It is not portable. See also the <code>funopen</code> interface from BSD.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>sbrk</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fpurge - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fopencookie.html#fopencookie" title="fopencookie">
|
||||
<link rel="next" href="fputc.html#fputc" title="fputc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fpurge"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fputc.html#fputc">fputc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fopencookie.html#fopencookie">fopencookie</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.19 <code>fpurge</code>—discard pending file I/O</h3>
|
||||
|
||||
<p><a name="index-fpurge-181"></a><a name="index-g_t_005ffpurge_005fr-182"></a><a name="index-g_t_005f_005ffpurge-183"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fpurge(FILE *<var>fp</var>);
|
||||
|
||||
int _fpurge_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio_ext.h>
|
||||
void __fpurge(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use <code>fpurge</code> to clear all buffers of the given stream. For output
|
||||
streams, this discards data not yet written to disk. For input streams,
|
||||
this discards any data from <code>ungetc</code> and any data retrieved from disk
|
||||
but not yet read via <code>getc</code>. This is more severe than <code>fflush</code>,
|
||||
and generally is only needed when manually altering the underlying file
|
||||
descriptor of a stream.
|
||||
|
||||
<p><code>__fpurge</code> behaves exactly like <code>fpurge</code> but does not return a value.
|
||||
|
||||
<p>The alternate function <code>_fpurge_r</code> is a reentrant version, where the
|
||||
extra argument <var>reent</var> is a pointer to a reentrancy structure, and
|
||||
<var>fp</var> must not be NULL.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fpurge</code> returns <code>0</code> unless <var>fp</var> is not valid, in which case it
|
||||
returns <code>EOF</code> and sets <code>errno</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
These functions are not portable to any standard.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fputc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fpurge.html#fpurge" title="fpurge">
|
||||
<link rel="next" href="fputs.html#fputs" title="fputs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fputc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fputs.html#fputs">fputs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fpurge.html#fpurge">fpurge</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.20 <code>fputc</code>—write a character on a stream or file</h3>
|
||||
|
||||
<p><a name="index-fputc-184"></a><a name="index-g_t_005ffputc_005fr-185"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fputc(int <var>ch</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
int _fputc_r(struct _rent *<var>ptr</var>, int <var>ch</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fputc</code> converts the argument <var>ch</var> from an <code>int</code> to an
|
||||
<code>unsigned char</code>, then writes it to the file or stream identified by
|
||||
<var>fp</var>.
|
||||
|
||||
<p>If the file was opened with append mode (or if the stream cannot
|
||||
support positioning), then the new character goes at the end of the
|
||||
file or stream. Otherwise, the new character is written at the
|
||||
current value of the position indicator, and the position indicator
|
||||
oadvances by one.
|
||||
|
||||
<p>For a macro version of this function, see <code>putc</code>.
|
||||
|
||||
<p>The <code>_fputc_r</code> function is simply a reentrant version of <code>fputc</code>
|
||||
that takes an additional reentrant structure argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, <code>fputc</code> returns its argument <var>ch</var>. If an error
|
||||
intervenes, the result is <code>EOF</code>. You can use `<code>ferror(</code><var>fp</var><code>)</code>' to
|
||||
query for errors.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>fputc</code> is required by ANSI C.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fputs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fputc.html#fputc" title="fputc">
|
||||
<link rel="next" href="fputwc.html#fputwc" title="fputwc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fputs"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fputwc.html#fputwc">fputwc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fputc.html#fputc">fputc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.21 <code>fputs</code>—write a character string in a file or stream</h3>
|
||||
|
||||
<p><a name="index-fputs-186"></a><a name="index-g_t_005ffputs_005fr-187"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fputs(const char *restrict <var>s</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
int _fputs_r(struct _reent *<var>ptr</var>, const char *restrict <var>s</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fputs</code> writes the string at <var>s</var> (but without the trailing null)
|
||||
to the file or stream identified by <var>fp</var>.
|
||||
|
||||
<p><code>_fputs_r</code> is simply the reentrant version of <code>fputs</code> that takes
|
||||
an additional reentrant struct pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, the result is <code>0</code>; otherwise, the result is <code>EOF</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fputs</code>, but does not specify that the result on
|
||||
success must be <code>0</code>; any non-negative value is permitted.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fputwc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fputs.html#fputs" title="fputs">
|
||||
<link rel="next" href="fputws.html#fputws" title="fputws">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fputwc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fputws.html#fputws">fputws</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fputs.html#fputs">fputs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.22 <code>fputwc</code>, <code>putwc</code>—write a wide character on a stream or file</h3>
|
||||
|
||||
<p><a name="index-fputwc-188"></a><a name="index-g_t_005ffputwc_005fr-189"></a><a name="index-putwc-190"></a><a name="index-g_t_005fputwc_005fr-191"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t fputwc(wchar_t <var>wc</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t _fputwc_r(struct _reent *<var>ptr</var>, wchar_t <var>wc</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t putwc(wchar_t <var>wc</var>, FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
wint_t _putwc_r(struct _reent *<var>ptr</var>, wchar_t <var>wc</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fputwc</code> writes the wide character argument <var>wc</var> to the file or
|
||||
stream identified by <var>fp</var>.
|
||||
|
||||
<p>If the file was opened with append mode (or if the stream cannot
|
||||
support positioning), then the new wide character goes at the end of the
|
||||
file or stream. Otherwise, the new wide character is written at the
|
||||
current value of the position indicator, and the position indicator
|
||||
oadvances by one.
|
||||
|
||||
<p>The <code>putwc</code> function or macro functions identically to <code>fputwc</code>. It
|
||||
may be implemented as a macro, and may evaluate its argument more than
|
||||
once. There is no reason ever to use it.
|
||||
|
||||
<p>The <code>_fputwc_r</code> and <code>_putwc_r</code> functions are simply reentrant versions
|
||||
of <code>fputwc</code> and <code>putwc</code> that take an additional reentrant structure
|
||||
argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, <code>fputwc</code> and <code>putwc</code> return their argument <var>wc</var>.
|
||||
If an error intervenes, the result is <code>EOF</code>. You can use
|
||||
`<code>ferror(</code><var>fp</var><code>)</code>' to query for errors.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.1-2001
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fputws - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fputwc.html#fputwc" title="fputwc">
|
||||
<link rel="next" href="fread.html#fread" title="fread">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fputws"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fread.html#fread">fread</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fputwc.html#fputwc">fputwc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.23 <code>fputws</code>—write a wide character string in a file or stream</h3>
|
||||
|
||||
<p><a name="index-fputws-192"></a><a name="index-g_t_005ffputws_005fr-193"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wchar.h>
|
||||
int fputws(const wchar_t *__restrict <var>ws</var>, FILE *__restrict <var>fp</var>);
|
||||
|
||||
#include <wchar.h>
|
||||
int _fputws_r(struct _reent *<var>ptr</var>, const wchar_t *<var>ws</var>,
|
||||
FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fputws</code> writes the wide character string at <var>ws</var> (but without the
|
||||
trailing null) to the file or stream identified by <var>fp</var>.
|
||||
|
||||
<p><code>_fputws_r</code> is simply the reentrant version of <code>fputws</code> that takes
|
||||
an additional reentrant struct pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, the result is a non-negative integer; otherwise, the result
|
||||
is <code>-1</code> to indicate an error.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.1-2001
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fread - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fputws.html#fputws" title="fputws">
|
||||
<link rel="next" href="freopen.html#freopen" title="freopen">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fread"></a>
|
||||
Next: <a rel="next" accesskey="n" href="freopen.html#freopen">freopen</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fputws.html#fputws">fputws</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.24 <code>fread</code>—read array elements from a file</h3>
|
||||
|
||||
<p><a name="index-fread-194"></a><a name="index-g_t_005ffread_005fr-195"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
size_t fread(void *restrict <var>buf</var>, size_t <var>size</var>, size_t <var>count</var>,
|
||||
FILE *restrict <var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
size_t _fread_r(struct _reent *<var>ptr</var>, void *restrict <var>buf</var>,
|
||||
size_t <var>size</var>, size_t <var>count</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fread</code> attempts to copy, from the file or stream identified by
|
||||
<var>fp</var>, <var>count</var> elements (each of size <var>size</var>) into memory,
|
||||
starting at <var>buf</var>. <code>fread</code> may copy fewer elements than
|
||||
<var>count</var> if an error, or end of file, intervenes.
|
||||
|
||||
<p><code>fread</code> also advances the file position indicator (if any) for
|
||||
<var>fp</var> by the number of <em>characters</em> actually read.
|
||||
|
||||
<p><code>_fread_r</code> is simply the reentrant version of <code>fread</code> that
|
||||
takes an additional reentrant structure pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The result of <code>fread</code> is the number of elements it succeeded in
|
||||
reading.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fread</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>freopen - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fread.html#fread" title="fread">
|
||||
<link rel="next" href="fseek.html#fseek" title="fseek">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="freopen"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fseek.html#fseek">fseek</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fread.html#fread">fread</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.25 <code>freopen</code>—open a file using an existing file descriptor</h3>
|
||||
|
||||
<p><a name="index-freopen-196"></a><a name="index-g_t_005ffreopen_005fr-197"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *freopen(const char *restrict <var>file</var>, const char *restrict <var>mode</var>,
|
||||
FILE *restrict <var>fp</var>);
|
||||
FILE *_freopen_r(struct _reent *<var>ptr</var>, const char *restrict <var>file</var>,
|
||||
const char *restrict <var>mode</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Use this variant of <code>fopen</code> if you wish to specify a particular file
|
||||
descriptor <var>fp</var> (notably <code>stdin</code>, <code>stdout</code>, or <code>stderr</code>) for
|
||||
the file.
|
||||
|
||||
<p>If <var>fp</var> was associated with another file or stream, <code>freopen</code>
|
||||
closes that other file or stream (but ignores any errors while closing
|
||||
it).
|
||||
|
||||
<p><var>file</var> and <var>mode</var> are used just as in <code>fopen</code>.
|
||||
|
||||
<p>If <var>file</var> is <code>NULL</code>, the underlying stream is modified rather than
|
||||
closed. The file cannot be given a more permissive access mode (for
|
||||
example, a <var>mode</var> of "w" will fail on a read-only file descriptor),
|
||||
but can change status such as append or binary mode. If modification
|
||||
is not possible, failure occurs.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If successful, the result is the same as the argument <var>fp</var>. If the
|
||||
file cannot be opened as specified, the result is <code>NULL</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>freopen</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>open</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fseek - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="freopen.html#freopen" title="freopen">
|
||||
<link rel="next" href="fsetpos.html#fsetpos" title="fsetpos">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fseek"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fsetpos.html#fsetpos">fsetpos</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="freopen.html#freopen">freopen</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.26 <code>fseek</code>, <code>fseeko</code>—set file position</h3>
|
||||
|
||||
<p><a name="index-fseek-198"></a><a name="index-fseeko-199"></a><a name="index-g_t_005ffseek_005fr-200"></a><a name="index-g_t_005ffseeko_005fr-201"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fseek(FILE *<var>fp</var>, long <var>offset</var>, int <var>whence</var>)
|
||||
int fseeko(FILE *<var>fp</var>, off_t <var>offset</var>, int <var>whence</var>)
|
||||
int _fseek_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>,
|
||||
long <var>offset</var>, int <var>whence</var>)
|
||||
int _fseeko_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>,
|
||||
off_t <var>offset</var>, int <var>whence</var>)
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Objects of type <code>FILE</code> can have a “position” that records how much
|
||||
of the file your program has already read. Many of the <code>stdio</code> functions
|
||||
depend on this position, and many change it as a side effect.
|
||||
|
||||
<p>You can use <code>fseek</code>/<code>fseeko</code> to set the position for the file identified by
|
||||
<var>fp</var>. The value of <var>offset</var> determines the new position, in one
|
||||
of three ways selected by the value of <var>whence</var> (defined as macros
|
||||
in `<code>stdio.h</code>'):
|
||||
|
||||
<p><code>SEEK_SET</code>—<var>offset</var> is the absolute file position (an offset
|
||||
from the beginning of the file) desired. <var>offset</var> must be positive.
|
||||
|
||||
<p><code>SEEK_CUR</code>—<var>offset</var> is relative to the current file position.
|
||||
<var>offset</var> can meaningfully be either positive or negative.
|
||||
|
||||
<p><code>SEEK_END</code>—<var>offset</var> is relative to the current end of file.
|
||||
<var>offset</var> can meaningfully be either positive (to increase the size
|
||||
of the file) or negative.
|
||||
|
||||
<p>See <code>ftell</code>/<code>ftello</code> to determine the current file position.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fseek</code>/<code>fseeko</code> return <code>0</code> when successful. On failure, the
|
||||
result is <code>EOF</code>. The reason for failure is indicated in <code>errno</code>:
|
||||
either <code>ESPIPE</code> (the stream identified by <var>fp</var> doesn't support
|
||||
repositioning) or <code>EINVAL</code> (invalid file position).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fseek</code>.
|
||||
|
||||
<p><code>fseeko</code> is defined by the Single Unix specification.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fsetpos - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fseek.html#fseek" title="fseek">
|
||||
<link rel="next" href="ftell.html#ftell" title="ftell">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fsetpos"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ftell.html#ftell">ftell</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fseek.html#fseek">fseek</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.27 <code>fsetpos</code>—restore position of a stream or file</h3>
|
||||
|
||||
<p><a name="index-fsetpos-202"></a><a name="index-g_t_005ffsetpos_005fr-203"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int fsetpos(FILE *<var>fp</var>, const fpos_t *<var>pos</var>);
|
||||
int _fsetpos_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>,
|
||||
const fpos_t *<var>pos</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Objects of type <code>FILE</code> can have a “position” that records how much
|
||||
of the file your program has already read. Many of the <code>stdio</code> functions
|
||||
depend on this position, and many change it as a side effect.
|
||||
|
||||
<p>You can use <code>fsetpos</code> to return the file identified by <var>fp</var> to a previous
|
||||
position <code>*</code><var>pos</var> (after first recording it with <code>fgetpos</code>).
|
||||
|
||||
<p>See <code>fseek</code> for a similar facility.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>fgetpos</code> returns <code>0</code> when successful. If <code>fgetpos</code> fails, the
|
||||
result is <code>1</code>. The reason for failure is indicated in <code>errno</code>:
|
||||
either <code>ESPIPE</code> (the stream identified by <var>fp</var> doesn't support
|
||||
repositioning) or <code>EINVAL</code> (invalid file position).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fsetpos</code>, but does not specify the nature of
|
||||
<code>*</code><var>pos</var> beyond identifying it as written by <code>fgetpos</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ftell - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fsetpos.html#fsetpos" title="fsetpos">
|
||||
<link rel="next" href="funopen.html#funopen" title="funopen">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ftell"></a>
|
||||
Next: <a rel="next" accesskey="n" href="funopen.html#funopen">funopen</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fsetpos.html#fsetpos">fsetpos</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.28 <code>ftell</code>, <code>ftello</code>—return position in a stream or file</h3>
|
||||
|
||||
<p><a name="index-ftell-204"></a><a name="index-ftello-205"></a><a name="index-g_t_005fftell_005fr-206"></a><a name="index-g_t_005fftello_005fr-207"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
long ftell(FILE *<var>fp</var>);
|
||||
off_t ftello(FILE *<var>fp</var>);
|
||||
long _ftell_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
off_t _ftello_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Objects of type <code>FILE</code> can have a “position” that records how much
|
||||
of the file your program has already read. Many of the <code>stdio</code> functions
|
||||
depend on this position, and many change it as a side effect.
|
||||
|
||||
<p>The result of <code>ftell</code>/<code>ftello</code> is the current position for a file
|
||||
identified by <var>fp</var>. If you record this result, you can later
|
||||
use it with <code>fseek</code>/<code>fseeko</code> to return the file to this
|
||||
position. The difference between <code>ftell</code> and <code>ftello</code> is that
|
||||
<code>ftell</code> returns <code>long</code> and <code>ftello</code> returns <code>off_t</code>.
|
||||
|
||||
<p>In the current implementation, <code>ftell</code>/<code>ftello</code> simply uses a character
|
||||
count to represent the file position; this is the same number that
|
||||
would be recorded by <code>fgetpos</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>ftell</code>/<code>ftello</code> return the file position, if possible. If they cannot do
|
||||
this, they return <code>-1L</code>. Failure occurs on streams that do not support
|
||||
positioning; the global <code>errno</code> indicates this condition with the
|
||||
value <code>ESPIPE</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>ftell</code> is required by the ANSI C standard, but the meaning of its
|
||||
result (when successful) is not specified beyond requiring that it be
|
||||
acceptable as an argument to <code>fseek</code>. In particular, other
|
||||
conforming C implementations may return a different result from
|
||||
<code>ftell</code> than what <code>fgetpos</code> records.
|
||||
|
||||
<p><code>ftello</code> is defined by the Single Unix specification.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>funopen - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="ftell.html#ftell" title="ftell">
|
||||
<link rel="next" href="fwide.html#fwide" title="fwide">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="funopen"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fwide.html#fwide">fwide</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ftell.html#ftell">ftell</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.29 <code>funopen</code>, <code>fropen</code>, <code>fwopen</code>—open a stream with custom callbacks</h3>
|
||||
|
||||
<p><a name="index-funopen-208"></a><a name="index-fropen-209"></a><a name="index-fwopen-210"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
FILE *funopen(const void *<var>cookie</var>,
|
||||
int (*<var>readfn</var>) (void *cookie, char *buf, int n),
|
||||
int (*<var>writefn</var>) (void *cookie, const char *buf, int n),
|
||||
fpos_t (*<var>seekfn</var>) (void *cookie, fpos_t off, int whence),
|
||||
int (*<var>closefn</var>) (void *cookie));
|
||||
FILE *fropen(const void *<var>cookie</var>,
|
||||
int (*<var>readfn</var>) (void *cookie, char *buf, int n));
|
||||
FILE *fwopen(const void *<var>cookie</var>,
|
||||
int (*<var>writefn</var>) (void *cookie, const char *buf, int n));
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>funopen</code> creates a <code>FILE</code> stream where I/O is performed using
|
||||
custom callbacks. At least one of <var>readfn</var> and <var>writefn</var> must be
|
||||
provided, which determines whether the stream behaves with mode <"r">,
|
||||
<"w">, or <"r+">.
|
||||
|
||||
<p><var>readfn</var> should return -1 on failure, or else the number of bytes
|
||||
read (0 on EOF). It is similar to <code>read</code>, except that <int> rather
|
||||
than <size_t> bounds a transaction size, and <var>cookie</var> will be passed
|
||||
as the first argument. A NULL <var>readfn</var> makes attempts to read the
|
||||
stream fail.
|
||||
|
||||
<p><var>writefn</var> should return -1 on failure, or else the number of bytes
|
||||
written. It is similar to <code>write</code>, except that <int> rather than
|
||||
<size_t> bounds a transaction size, and <var>cookie</var> will be passed as
|
||||
the first argument. A NULL <var>writefn</var> makes attempts to write the
|
||||
stream fail.
|
||||
|
||||
<p><var>seekfn</var> should return (fpos_t)-1 on failure, or else the current
|
||||
file position. It is similar to <code>lseek</code>, except that <var>cookie</var>
|
||||
will be passed as the first argument. A NULL <var>seekfn</var> makes the
|
||||
stream behave similarly to a pipe in relation to stdio functions that
|
||||
require positioning. This implementation assumes fpos_t and off_t are
|
||||
the same type.
|
||||
|
||||
<p><var>closefn</var> should return -1 on failure, or 0 on success. It is
|
||||
similar to <code>close</code>, except that <var>cookie</var> will be passed as the
|
||||
first argument. A NULL <var>closefn</var> merely flushes all data then lets
|
||||
<code>fclose</code> succeed. A failed close will still invalidate the stream.
|
||||
|
||||
<p>Read and write I/O functions are allowed to change the underlying
|
||||
buffer on fully buffered or line buffered streams by calling
|
||||
<code>setvbuf</code>. They are also not required to completely fill or empty
|
||||
the buffer. They are not, however, allowed to change streams from
|
||||
unbuffered to buffered or to change the state of the line buffering
|
||||
flag. They must also be prepared to have read or write calls occur on
|
||||
buffers other than the one most recently specified.
|
||||
|
||||
<p>The functions <code>fropen</code> and <code>fwopen</code> are convenience macros around
|
||||
<code>funopen</code> that only use the specified callback.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The return value is an open FILE pointer on success. On error,
|
||||
<code>NULL</code> is returned, and <code>errno</code> will be set to EINVAL if a
|
||||
function pointer is missing, ENOMEM if the stream cannot be created,
|
||||
or EMFILE if too many streams are already open.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
This function is a newlib extension, copying the prototype from BSD.
|
||||
It is not portable. See also the <code>fopencookie</code> interface from Linux.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>sbrk</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fwide - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="funopen.html#funopen" title="funopen">
|
||||
<link rel="next" href="fwrite.html#fwrite" title="fwrite">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fwide"></a>
|
||||
Next: <a rel="next" accesskey="n" href="fwrite.html#fwrite">fwrite</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="funopen.html#funopen">funopen</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.30 <code>fwide</code>—set and determine the orientation of a FILE stream</h3>
|
||||
|
||||
<p><a name="index-fwide-211"></a><a name="index-g_t_005ffwide_005fr-212"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wchar.h>
|
||||
int fwide(FILE *<var>fp</var>, int <var>mode</var>)
|
||||
|
||||
int _fwide_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>, int <var>mode</var>)
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
When <var>mode</var> is zero, the <code>fwide</code> function determines the current
|
||||
orientation of <var>fp</var>. It returns a value > 0 if <var>fp</var> is
|
||||
wide-character oriented, i.e. if wide character I/O is permitted but
|
||||
char I/O is disallowed. It returns a value < 0 if <var>fp</var> is byte
|
||||
oriented, i.e. if char I/O is permitted but wide character I/O is
|
||||
disallowed. It returns zero if <var>fp</var> has no orientation yet; in
|
||||
this case the next I/O operation might change the orientation (to byte
|
||||
oriented if it is a char I/O operation, or to wide-character oriented
|
||||
if it is a wide character I/O operation).
|
||||
|
||||
<p>Once a stream has an orientation, it cannot be changed and persists
|
||||
until the stream is closed, unless the stream is re-opened with freopen,
|
||||
which removes the orientation of the stream.
|
||||
|
||||
<p>When <var>mode</var> is non-zero, the <code>fwide</code> function first attempts to set
|
||||
<var>fp</var>'s orientation (to wide-character oriented if <var>mode</var> > 0, or to
|
||||
byte oriented if <var>mode</var> < 0). It then returns a value denoting the
|
||||
current orientation, as above.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The <code>fwide</code> function returns <var>fp</var>'s orientation, after possibly
|
||||
changing it. A return value > 0 means wide-character oriented. A return
|
||||
value < 0 means byte oriented. A return value of zero means undecided.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99, POSIX.1-2001.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>fwrite - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fwide.html#fwide" title="fwide">
|
||||
<link rel="next" href="getc.html#getc" title="getc">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="fwrite"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getc.html#getc">getc</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fwide.html#fwide">fwide</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.31 <code>fwrite</code>—write array elements</h3>
|
||||
|
||||
<p><a name="index-fwrite-213"></a><a name="index-g_t_005ffwrite_005fr-214"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
size_t fwrite(const void *restrict <var>buf</var>, size_t <var>size</var>,
|
||||
size_t <var>count</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
size_t _fwrite_r(struct _reent *<var>ptr</var>, const void *restrict <var>buf</var>, size_t <var>size</var>,
|
||||
size_t <var>count</var>, FILE *restrict <var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>fwrite</code> attempts to copy, starting from the memory location
|
||||
<var>buf</var>, <var>count</var> elements (each of size <var>size</var>) into the file or
|
||||
stream identified by <var>fp</var>. <code>fwrite</code> may copy fewer elements than
|
||||
<var>count</var> if an error intervenes.
|
||||
|
||||
<p><code>fwrite</code> also advances the file position indicator (if any) for
|
||||
<var>fp</var> by the number of <em>characters</em> actually written.
|
||||
|
||||
<p><code>_fwrite_r</code> is simply the reentrant version of <code>fwrite</code> that
|
||||
takes an additional reentrant structure argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
If <code>fwrite</code> succeeds in writing all the elements you specify, the
|
||||
result is the same as the argument <var>count</var>. In any event, the
|
||||
result is the number of complete elements that <code>fwrite</code> copied to
|
||||
the file.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>fwrite</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getc - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="fwrite.html#fwrite" title="fwrite">
|
||||
<link rel="next" href="getc_005funlocked.html#getc_005funlocked" title="getc_unlocked">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getc"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getc_005funlocked.html#getc_005funlocked">getc_unlocked</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="fwrite.html#fwrite">fwrite</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.32 <code>getc</code>—read a character (macro)</h3>
|
||||
|
||||
<p><a name="index-getc-215"></a><a name="index-g_t_005fgetc_005fr-216"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getc(FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
int _getc_r(struct _reent *<var>ptr</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getc</code> is a macro, defined in <code>stdio.h</code>. You can use <code>getc</code>
|
||||
to get the next single character from the file or stream
|
||||
identified by <var>fp</var>. As a side effect, <code>getc</code> advances the file's
|
||||
current position indicator.
|
||||
|
||||
<p>For a subroutine version of this macro, see <code>fgetc</code>.
|
||||
|
||||
<p>The <code>_getc_r</code> function is simply the reentrant version of <code>getc</code>
|
||||
which passes an additional reentrancy structure pointer argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next character (read as an <code>unsigned char</code>, and cast to
|
||||
<code>int</code>), unless there is no more data, or the host system reports a
|
||||
read error; in either of these situations, <code>getc</code> returns <code>EOF</code>.
|
||||
|
||||
<p>You can distinguish the two situations that cause an <code>EOF</code> result by
|
||||
using the <code>ferror</code> and <code>feof</code> functions.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>getc</code>; it suggests, but does not require, that
|
||||
<code>getc</code> be implemented as a macro. The standard explicitly permits
|
||||
macro implementations of <code>getc</code> to use the argument more than once;
|
||||
therefore, in a portable program, you should not use an expression
|
||||
with side effects as the <code>getc</code> argument.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getc_unlocked - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getc.html#getc" title="getc">
|
||||
<link rel="next" href="getchar.html#getchar" title="getchar">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getc_unlocked"></a>
|
||||
<a name="getc_005funlocked"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getchar.html#getchar">getchar</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getc.html#getc">getc</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.33 <code>getc_unlocked</code>—non-thread-safe version of getc (macro)</h3>
|
||||
|
||||
<p><a name="index-getc_005funlocked-217"></a><a name="index-g_t_005fgetc_005funlocked_005fr-218"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getc_unlocked(FILE *<var>fp</var>);
|
||||
|
||||
#include <stdio.h>
|
||||
int _getc_unlocked_r(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getc_unlocked</code> is a non-thread-safe version of <code>getc</code> declared in
|
||||
<code>stdio.h</code>. <code>getc_unlocked</code> may only safely be used within a scope
|
||||
protected by flockfile() (or ftrylockfile()) and funlockfile(). These
|
||||
functions may safely be used in a multi-threaded program if and only
|
||||
if they are called while the invoking thread owns the ( FILE *)
|
||||
object, as is the case after a successful call to the flockfile() or
|
||||
ftrylockfile() functions. If threads are disabled, then
|
||||
<code>getc_unlocked</code> is equivalent to <code>getc</code>.
|
||||
|
||||
<p>The <code>_getc_unlocked_r</code> function is simply the reentrant version of
|
||||
<code>get_unlocked</code> which passes an additional reentrancy structure pointer
|
||||
argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
See <code>getc</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
POSIX 1003.1 requires <code>getc_unlocked</code>. <code>getc_unlocked</code> may be
|
||||
implemented as a macro, so arguments should not have side-effects.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getchar - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getc_005funlocked.html#getc_005funlocked" title="getc_unlocked">
|
||||
<link rel="next" href="getchar_005funlocked.html#getchar_005funlocked" title="getchar_unlocked">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getchar"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getchar_005funlocked.html#getchar_005funlocked">getchar_unlocked</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getc_005funlocked.html#getc_005funlocked">getc_unlocked</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.34 <code>getchar</code>—read a character (macro)</h3>
|
||||
|
||||
<p><a name="index-getchar-219"></a><a name="index-g_t_005fgetchar_005fr-220"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getchar(void);
|
||||
|
||||
int _getchar_r(struct _reent *<var>reent</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getchar</code> is a macro, defined in <code>stdio.h</code>. You can use <code>getchar</code>
|
||||
to get the next single character from the standard input stream.
|
||||
As a side effect, <code>getchar</code> advances the standard input's
|
||||
current position indicator.
|
||||
|
||||
<p>The alternate function <code>_getchar_r</code> is a reentrant version. The
|
||||
extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next character (read as an <code>unsigned char</code>, and cast to
|
||||
<code>int</code>), unless there is no more data, or the host system reports a
|
||||
read error; in either of these situations, <code>getchar</code> returns <code>EOF</code>.
|
||||
|
||||
<p>You can distinguish the two situations that cause an <code>EOF</code> result by
|
||||
using `<code>ferror(stdin)</code>' and `<code>feof(stdin)</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>getchar</code>; it suggests, but does not require, that
|
||||
<code>getchar</code> be implemented as a macro.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getchar_unlocked - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getchar.html#getchar" title="getchar">
|
||||
<link rel="next" href="getdelim.html#getdelim" title="getdelim">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getchar_unlocked"></a>
|
||||
<a name="getchar_005funlocked"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getdelim.html#getdelim">getdelim</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getchar.html#getchar">getchar</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.35 <code>getchar_unlocked</code>—non-thread-safe version of getchar (macro)</h3>
|
||||
|
||||
<p><a name="index-getchar_005funlocked-221"></a><a name="index-g_t_005fgetchar_005funlocked_005fr-222"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getchar_unlocked();
|
||||
|
||||
#include <stdio.h>
|
||||
int _getchar_unlocked_r(struct _reent *<var>ptr</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getchar_unlocked</code> is a non-thread-safe version of <code>getchar</code>
|
||||
declared in <code>stdio.h</code>. <code>getchar_unlocked</code> may only safely be used
|
||||
within a scope protected by flockfile() (or ftrylockfile()) and
|
||||
funlockfile(). These functions may safely be used in a multi-threaded
|
||||
program if and only if they are called while the invoking thread owns
|
||||
the ( FILE *) object, as is the case after a successful call to the
|
||||
flockfile() or ftrylockfile() functions. If threads are disabled,
|
||||
then <code>getchar_unlocked</code> is equivalent to <code>getchar</code>.
|
||||
|
||||
<p>The <code>_getchar_unlocked_r</code> function is simply the reentrant version of
|
||||
<code>getchar_unlocked</code> which passes an addtional reentrancy structure pointer
|
||||
argument: <var>ptr</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
See <code>getchar</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
POSIX 1003.1 requires <code>getchar_unlocked</code>. <code>getchar_unlocked</code> may
|
||||
be implemented as a macro.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getdelim - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getchar_005funlocked.html#getchar_005funlocked" title="getchar_unlocked">
|
||||
<link rel="next" href="getline.html#getline" title="getline">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getdelim"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getline.html#getline">getline</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getchar_005funlocked.html#getchar_005funlocked">getchar_unlocked</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.36 <code>getdelim</code>—read a line up to a specified line delimiter</h3>
|
||||
|
||||
<p><a name="index-getdelim-223"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getdelim(char **<var>bufptr</var>, size_t *<var>n</var>,
|
||||
int <var>delim</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getdelim</code> reads a file <var>fp</var> up to and possibly including a specified
|
||||
delimiter <var>delim</var>. The line is read into a buffer pointed to
|
||||
by <var>bufptr</var> and designated with size *<var>n</var>. If the buffer is
|
||||
not large enough, it will be dynamically grown by <code>getdelim</code>.
|
||||
As the buffer is grown, the pointer to the size <var>n</var> will be
|
||||
updated.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>getdelim</code> returns <code>-1</code> if no characters were successfully read;
|
||||
otherwise, it returns the number of bytes successfully read.
|
||||
At end of file, the result is nonzero.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>getdelim</code> is a glibc extension.
|
||||
|
||||
<p>No supporting OS subroutines are directly required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getenv - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="exit.html#exit" title="exit">
|
||||
<link rel="next" href="labs.html#labs" title="labs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getenv"></a>
|
||||
Next: <a rel="next" accesskey="n" href="labs.html#labs">labs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="exit.html#exit">exit</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.18 <code>getenv</code>—look up environment variable</h3>
|
||||
|
||||
<p><a name="index-getenv-31"></a><a name="index-environ-32"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
char *getenv(const char *<var>name</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getenv</code> searches the list of environment variable names and values
|
||||
(using the global pointer “<code>char **environ</code>”) for a variable whose
|
||||
name matches the string at <var>name</var>. If a variable name matches,
|
||||
<code>getenv</code> returns a pointer to the associated value.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
A pointer to the (string) value of the environment variable, or
|
||||
<code>NULL</code> if there is no such environment variable.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>getenv</code> is ANSI, but the rules for properly forming names of environment
|
||||
variables vary from one system to another.
|
||||
|
||||
<p><code>getenv</code> requires a global pointer <code>environ</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getline - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getdelim.html#getdelim" title="getdelim">
|
||||
<link rel="next" href="gets.html#gets" title="gets">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getline"></a>
|
||||
Next: <a rel="next" accesskey="n" href="gets.html#gets">gets</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getdelim.html#getdelim">getdelim</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.37 <code>getline</code>—read a line from a file</h3>
|
||||
|
||||
<p><a name="index-getline-224"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
ssize_t getline(char **<var>bufptr</var>, size_t *<var>n</var>, FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getline</code> reads a file <var>fp</var> up to and possibly including the
|
||||
newline character. The line is read into a buffer pointed to
|
||||
by <var>bufptr</var> and designated with size *<var>n</var>. If the buffer is
|
||||
not large enough, it will be dynamically grown by <code>getdelim</code>.
|
||||
As the buffer is grown, the pointer to the size <var>n</var> will be
|
||||
updated.
|
||||
|
||||
<p><code>getline</code> is equivalent to getdelim(bufptr, n, '\n', fp);
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>getline</code> returns <code>-1</code> if no characters were successfully read,
|
||||
otherwise, it returns the number of bytes successfully read.
|
||||
at end of file, the result is nonzero.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>getline</code> is a glibc extension.
|
||||
|
||||
<p>No supporting OS subroutines are directly required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>gets - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getline.html#getline" title="getline">
|
||||
<link rel="next" href="getw.html#getw" title="getw">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="gets"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getw.html#getw">getw</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getline.html#getline">getline</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.38 <code>gets</code>—get character string (obsolete, use <code>fgets</code> instead)</h3>
|
||||
|
||||
<p><a name="index-gets-225"></a><a name="index-g_t_005fgets_005fr-226"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
|
||||
char *gets(char *<var>buf</var>);
|
||||
|
||||
char *_gets_r(struct _reent *<var>reent</var>, char *<var>buf</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
Reads characters from standard input until a newline is found.
|
||||
The characters up to the newline are stored in <var>buf</var>. The
|
||||
newline is discarded, and the buffer is terminated with a 0.
|
||||
|
||||
<p>This is a <em>dangerous</em> function, as it has no way of checking
|
||||
the amount of space available in <var>buf</var>. One of the attacks
|
||||
used by the Internet Worm of 1988 used this to overrun a
|
||||
buffer allocated on the stack of the finger daemon and
|
||||
overwrite the return address, causing the daemon to execute
|
||||
code downloaded into it over the connection.
|
||||
|
||||
<p>The alternate function <code>_gets_r</code> is a reentrant version. The extra
|
||||
argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>gets</code> returns the buffer passed to it, with the data filled
|
||||
in. If end of file occurs with some data already accumulated,
|
||||
the data is returned with no other indication. If end of file
|
||||
occurs with no data in the buffer, NULL is returned.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getw - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="gets.html#gets" title="gets">
|
||||
<link rel="next" href="getwchar.html#getwchar" title="getwchar">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getw"></a>
|
||||
Next: <a rel="next" accesskey="n" href="getwchar.html#getwchar">getwchar</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="gets.html#gets">gets</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.39 <code>getw</code>—read a word (int)</h3>
|
||||
|
||||
<p><a name="index-getw-227"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdio.h>
|
||||
int getw(FILE *<var>fp</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getw</code> is a function, defined in <code>stdio.h</code>. You can use <code>getw</code>
|
||||
to get the next word from the file or stream identified by <var>fp</var>. As
|
||||
a side effect, <code>getw</code> advances the file's current position
|
||||
indicator.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next word (read as an <code>int</code>), unless there is no more
|
||||
data or the host system reports a read error; in either of these
|
||||
situations, <code>getw</code> returns <code>EOF</code>. Since <code>EOF</code> is a valid
|
||||
<code>int</code>, you must use <code>ferror</code> or <code>feof</code> to distinguish these
|
||||
situations.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>getw</code> is a remnant of K&R C; it is not part of any ISO C Standard.
|
||||
<code>fread</code> should be used instead. In fact, this implementation of
|
||||
<code>getw</code> is based upon <code>fread</code>.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>fread</code>.
|
||||
<br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>getwchar - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdio.html#Stdio" title="Stdio">
|
||||
<link rel="prev" href="getw.html#getw" title="getw">
|
||||
<link rel="next" href="mktemp.html#mktemp" title="mktemp">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="getwchar"></a>
|
||||
Next: <a rel="next" accesskey="n" href="mktemp.html#mktemp">mktemp</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="getw.html#getw">getw</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.40 <code>getwchar</code>—read a wide character from standard input</h3>
|
||||
|
||||
<p><a name="index-getwchar-228"></a><a name="index-g_t_005fgetwchar_005fr-229"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wchar.h>
|
||||
wint_t getwchar(void);
|
||||
|
||||
wint_t _getwchar_r(struct _reent *<var>reent</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>getwchar</code> function or macro is the wide character equivalent of
|
||||
the <code>getchar</code> function. You can use <code>getwchar</code> to get the next
|
||||
wide character from the standard input stream. As a side effect,
|
||||
<code>getwchar</code> advances the standard input's current position indicator.
|
||||
|
||||
<p>The alternate function <code>_getwchar_r</code> is a reentrant version. The
|
||||
extra argument <var>reent</var> is a pointer to a reentrancy structure.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The next wide character cast to <code>wint_t</code>, unless there is no more
|
||||
data, or the host system reports a read error; in either of these
|
||||
situations, <code>getwchar</code> returns <code>WEOF</code>.
|
||||
|
||||
<p>You can distinguish the two situations that cause an <code>WEOF</code> result by
|
||||
using `<code>ferror(stdin)</code>' and `<code>feof(stdin)</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
C99
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>gmtime - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Timefns.html#Timefns" title="Timefns">
|
||||
<link rel="prev" href="difftime.html#difftime" title="difftime">
|
||||
<link rel="next" href="localtime.html#localtime" title="localtime">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="gmtime"></a>
|
||||
Next: <a rel="next" accesskey="n" href="localtime.html#localtime">localtime</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="difftime.html#difftime">difftime</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">8.5 <code>gmtime</code>—convert time to UTC traditional form</h3>
|
||||
|
||||
<p><a name="index-gmtime-434"></a><a name="index-gmtime_005fr-435"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <time.h>
|
||||
struct tm *gmtime(const time_t *<var>clock</var>);
|
||||
struct tm *gmtime_r(const time_t *<var>clock</var>, struct tm *<var>res</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>gmtime</code> takes the time at <var>clock</var> representing the number
|
||||
of elapsed seconds since 00:00:00 on January 1, 1970, Universal
|
||||
Coordinated Time (UTC, also known in some countries as GMT,
|
||||
Greenwich Mean time) and converts it to a <code>struct tm</code>
|
||||
representation.
|
||||
|
||||
<p><code>gmtime</code> constructs the traditional time representation in static
|
||||
storage; each call to <code>gmtime</code> or <code>localtime</code> will overwrite the
|
||||
information generated by previous calls to either function.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
A pointer to the traditional time representation (<code>struct tm</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
ANSI C requires <code>gmtime</code>.
|
||||
|
||||
<p><code>gmtime</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>gvcvt - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib">
|
||||
<link rel="prev" href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock" title="__env_lock">
|
||||
<link rel="next" href="exit.html#exit" title="exit">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="gvcvt"></a>
|
||||
Next: <a rel="next" accesskey="n" href="exit.html#exit">exit</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.14 <code>gvcvt</code>, <code>gcvtf</code>—format double or float as string</h3>
|
||||
|
||||
<p><a name="index-gcvt-24"></a><a name="index-gcvtf-25"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <stdlib.h>
|
||||
|
||||
char *gcvt(double <var>val</var>, int <var>precision</var>, char *<var>buf</var>);
|
||||
char *gcvtf(float <var>val</var>, int <var>precision</var>, char *<var>buf</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>gcvt</code> writes a fully formatted number as a null-terminated
|
||||
string in the buffer <code>*</code><var>buf</var>. <code>gdvtf</code> produces corresponding
|
||||
character representations of <code>float</code> numbers.
|
||||
|
||||
<p><code>gcvt</code> uses the same rules as the <code>printf</code> format
|
||||
`<code>%.</code><var>precision</var><code>g</code>'—only negative values are signed (with
|
||||
`<code>-</code>'), and either exponential or ordinary decimal-fraction format
|
||||
is chosen depending on the number of significant digits (specified by
|
||||
<var>precision</var>).
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
The result is a pointer to the formatted representation of <var>val</var>
|
||||
(the same as the argument <var>buf</var>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
Neither function is ANSI C.
|
||||
|
||||
<p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
|
||||
<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="../index.html#dir" title="(dir)">
|
||||
<link rel="next" href="Introduction.html#Introduction" title="Introduction">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Top"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Introduction.html#Introduction">Introduction</a>,
|
||||
Up: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">The Red Hat newlib C Library</h2>
|
||||
|
||||
<!-- The menu contents depend on the configuration, so we include them -->
|
||||
<!-- as a separate file -->
|
||||
<!-- switch to set SIGNALS on or off, according to whether config picks up -->
|
||||
<!-- signal subdirectory: -->
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Introduction.html#Introduction">Introduction</a>
|
||||
<li><a accesskey="2" href="Stdlib.html#Stdlib">Stdlib</a>
|
||||
<li><a accesskey="3" href="Ctype.html#Ctype">Ctype</a>
|
||||
<li><a accesskey="4" href="Stdio.html#Stdio">Stdio</a>
|
||||
|
||||
<li><a accesskey="5" href="Strings.html#Strings">Strings</a>
|
||||
<li><a accesskey="6" href="Wchar-strings.html#Wchar-strings">Wchar strings</a>
|
||||
|
||||
<li><a accesskey="7" href="Signals.html#Signals">Signals</a>
|
||||
|
||||
<li><a accesskey="8" href="Timefns.html#Timefns">Timefns</a>
|
||||
<li><a accesskey="9" href="Locale.html#Locale">Locale</a>
|
||||
<li><a href="Reentrancy.html#Reentrancy">Reentrancy</a>
|
||||
|
||||
<li><a href="Misc.html#Misc">Misc</a>
|
||||
<li><a href="Syscalls.html#Syscalls">Syscalls</a>
|
||||
<li><a href="Arglists.html#Arglists">Arglists</a>
|
||||
|
||||
<li><a href="Document-Index.html#Document-Index">Document Index</a>
|
||||
</ul>
|
||||
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="index"></a>
|
||||
Next: <a rel="next" accesskey="n" href="memccpy.html#memccpy">memccpy</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="bzero.html#bzero">bzero</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Strings.html#Strings">Strings</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.4 <code>index</code>—search for character in string</h3>
|
||||
|
||||
<p><a name="index-index-375"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <strings.h>
|
||||
char * index(const char *<var>string</var>, int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
This function finds the first occurence of <var>c</var> (converted to
|
||||
a char) in the string pointed to by <var>string</var> (including the
|
||||
terminating null character).
|
||||
|
||||
<p>This function is identical to <code>strchr</code>.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
Returns a pointer to the located character, or a null pointer
|
||||
if <var>c</var> does not occur in <var>string</var>.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>index</code> requires no supporting OS subroutines.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isalnum - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="next" href="isalpha.html#isalpha" title="isalpha">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isalnum"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isalpha.html#isalpha">isalpha</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.1 <code>isalnum</code>—alphanumeric character predicate</h3>
|
||||
|
||||
<p><a name="index-isalnum-110"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isalnum(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isalnum</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for alphabetic or
|
||||
numeric ASCII characters, and <code>0</code> for other arguments. It is defined
|
||||
only if <var>c</var> is representable as an unsigned char or if <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isalnum</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isalnum</code> returns non-zero if <var>c</var> is a letter (<code>a</code>–<code>z</code> or
|
||||
<code>A</code>–<code>Z</code>) or a digit (<code>0</code>–<code>9</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isalnum</code> is ANSI C.
|
||||
|
||||
<p>No OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isalpha - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isalnum.html#isalnum" title="isalnum">
|
||||
<link rel="next" href="isascii.html#isascii" title="isascii">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isalpha"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isascii.html#isascii">isascii</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isalnum.html#isalnum">isalnum</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.2 <code>isalpha</code>—alphabetic character predicate</h3>
|
||||
|
||||
<p><a name="index-isalpha-111"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isalpha(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isalpha</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero when <var>c</var> represents an
|
||||
alphabetic ASCII character, and 0 otherwise. It is defined only if
|
||||
<var>c</var> is representable as an unsigned char or if <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isalpha</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isalpha</code> returns non-zero if <var>c</var> is a letter (<code>A</code>–<code>Z</code> or
|
||||
<code>a</code>–<code>z</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isalpha</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isascii - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isalpha.html#isalpha" title="isalpha">
|
||||
<link rel="next" href="iscntrl.html#iscntrl" title="iscntrl">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isascii"></a>
|
||||
Next: <a rel="next" accesskey="n" href="iscntrl.html#iscntrl">iscntrl</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isalpha.html#isalpha">isalpha</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.3 <code>isascii</code>—ASCII character predicate</h3>
|
||||
|
||||
<p><a name="index-isascii-112"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isascii(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isascii</code> is a macro which returns non-zero when <var>c</var> is an ASCII
|
||||
character, and 0 otherwise. It is defined for all integer values.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isascii</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isascii</code> returns non-zero if the low order byte of <var>c</var> is in the range
|
||||
0 to 127 (<code>0x00</code>–<code>0x7F</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isascii</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>iscntrl - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isascii.html#isascii" title="isascii">
|
||||
<link rel="next" href="isdigit.html#isdigit" title="isdigit">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="iscntrl"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isdigit.html#isdigit">isdigit</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isascii.html#isascii">isascii</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.4 <code>iscntrl</code>—control character predicate</h3>
|
||||
|
||||
<p><a name="index-iscntrl-113"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int iscntrl(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>iscntrl</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for control characters, and 0
|
||||
for other characters. It is defined only if <var>c</var> is representable as an
|
||||
unsigned char or if <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef iscntrl</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>iscntrl</code> returns non-zero if <var>c</var> is a delete character or ordinary
|
||||
control character (<code>0x7F</code> or <code>0x00</code>–<code>0x1F</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>iscntrl</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isdigit - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="iscntrl.html#iscntrl" title="iscntrl">
|
||||
<link rel="next" href="islower.html#islower" title="islower">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isdigit"></a>
|
||||
Next: <a rel="next" accesskey="n" href="islower.html#islower">islower</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="iscntrl.html#iscntrl">iscntrl</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.5 <code>isdigit</code>—decimal digit predicate</h3>
|
||||
|
||||
<p><a name="index-isdigit-114"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isdigit(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isdigit</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for decimal digits, and 0 for
|
||||
other characters. It is defined only if <var>c</var> is representable as an
|
||||
unsigned char or if <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isdigit</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isdigit</code> returns non-zero if <var>c</var> is a decimal digit (<code>0</code>–<code>9</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isdigit</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>islower - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isdigit.html#isdigit" title="isdigit">
|
||||
<link rel="next" href="isprint.html#isprint" title="isprint">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="islower"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isprint.html#isprint">isprint</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isdigit.html#isdigit">isdigit</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.6 <code>islower</code>—lowercase character predicate</h3>
|
||||
|
||||
<p><a name="index-islower-115"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int islower(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>islower</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for minuscules
|
||||
(lowercase alphabetic characters), and 0 for other characters.
|
||||
It is defined only if <var>c</var> is representable as an unsigned char or if
|
||||
<var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef islower</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>islower</code> returns non-zero if <var>c</var> is a lowercase letter (<code>a</code>–<code>z</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>islower</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isprint - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="islower.html#islower" title="islower">
|
||||
<link rel="next" href="ispunct.html#ispunct" title="ispunct">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isprint"></a>
|
||||
Next: <a rel="next" accesskey="n" href="ispunct.html#ispunct">ispunct</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="islower.html#islower">islower</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.7 <code>isprint</code>, <code>isgraph</code>—printable character predicates</h3>
|
||||
|
||||
<p><a name="index-isprint-116"></a><a name="index-isgraph-117"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isprint(int <var>c</var>);
|
||||
int isgraph(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isprint</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for printable
|
||||
characters, and 0 for other character arguments.
|
||||
It is defined only if <var>c</var> is representable as an unsigned char or if
|
||||
<var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining either macro using `<code>#undef isprint</code>' or `<code>#undef isgraph</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isprint</code> returns non-zero if <var>c</var> is a printing character,
|
||||
(<code>0x20</code>–<code>0x7E</code>).
|
||||
<code>isgraph</code> behaves identically to <code>isprint</code>, except that the space
|
||||
character (<code>0x20</code>) is excluded.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isprint</code> and <code>isgraph</code> are ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ispunct - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isprint.html#isprint" title="isprint">
|
||||
<link rel="next" href="isspace.html#isspace" title="isspace">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ispunct"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isspace.html#isspace">isspace</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isprint.html#isprint">isprint</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.8 <code>ispunct</code>—punctuation character predicate</h3>
|
||||
|
||||
<p><a name="index-ispunct-118"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int ispunct(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>ispunct</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for printable
|
||||
punctuation characters, and 0 for other characters. It is defined only
|
||||
if <var>c</var> is representable as an unsigned char or if <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef ispunct</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>ispunct</code> returns non-zero if <var>c</var> is a printable punctuation character
|
||||
(<code>isgraph(</code><var>c</var><code>) && !isalnum(</code><var>c</var><code>)</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>ispunct</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isspace - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="ispunct.html#ispunct" title="ispunct">
|
||||
<link rel="next" href="isupper.html#isupper" title="isupper">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isspace"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isupper.html#isupper">isupper</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ispunct.html#ispunct">ispunct</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.9 <code>isspace</code>—whitespace character predicate</h3>
|
||||
|
||||
<p><a name="index-isspace-119"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isspace(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isspace</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for whitespace
|
||||
characters, and 0 for other characters. It is defined only when <code>isascii</code>(<var>c</var>) is true or <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isspace</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isspace</code> returns non-zero if <var>c</var> is a space, tab, carriage return, new
|
||||
line, vertical tab, or formfeed (<code>0x09</code>–<code>0x0D</code>, <code>0x20</code>).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isspace</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>isupper - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="isspace.html#isspace" title="isspace">
|
||||
<link rel="next" href="isxdigit.html#isxdigit" title="isxdigit">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="isupper"></a>
|
||||
Next: <a rel="next" accesskey="n" href="isxdigit.html#isxdigit">isxdigit</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="isspace.html#isspace">isspace</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.10 <code>isupper</code>—uppercase character predicate</h3>
|
||||
|
||||
<p><a name="index-isupper-120"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <ctype.h>
|
||||
int isupper(int <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>isupper</code> is a macro which classifies ASCII integer values by table
|
||||
lookup. It is a predicate returning non-zero for uppercase letters
|
||||
(<code>A</code>–<code>Z</code>), and 0 for other characters. It is defined only when
|
||||
<code>isascii</code>(<var>c</var>) is true or <var>c</var> is EOF.
|
||||
|
||||
<p>You can use a compiled subroutine instead of the macro definition by
|
||||
undefining the macro using `<code>#undef isupper</code>'.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>isupper</code> returns non-zero if <var>c</var> is a uppercase letter (A-Z).
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>isupper</code> is ANSI C.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>iswalnum - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="toupper.html#toupper" title="toupper">
|
||||
<link rel="next" href="iswalpha.html#iswalpha" title="iswalpha">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="iswalnum"></a>
|
||||
Next: <a rel="next" accesskey="n" href="iswalpha.html#iswalpha">iswalpha</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="toupper.html#toupper">toupper</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.15 <code>iswalnum</code>—alphanumeric wide character test</h3>
|
||||
|
||||
<p><a name="index-iswalnum-127"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wctype.h>
|
||||
int iswalnum(wint_t <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>iswalnum</code> is a function which classifies wide-character values that
|
||||
are alphanumeric.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>iswalnum</code> returns non-zero if <var>c</var> is a alphanumeric wide character.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>iswalnum</code> is C99.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>iswalpha - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Ctype.html#Ctype" title="Ctype">
|
||||
<link rel="prev" href="iswalnum.html#iswalnum" title="iswalnum">
|
||||
<link rel="next" href="iswblank.html#iswblank" title="iswblank">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family:serif; font-weight:normal; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="iswalpha"></a>
|
||||
Next: <a rel="next" accesskey="n" href="iswblank.html#iswblank">iswblank</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="iswalnum.html#iswalnum">iswalnum</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.16 <code>iswalpha</code>—alphabetic wide character test</h3>
|
||||
|
||||
<p><a name="index-iswalpha-128"></a><strong>Synopsis</strong>
|
||||
<pre class="example"> #include <wctype.h>
|
||||
int iswalpha(wint_t <var>c</var>);
|
||||
|
||||
</pre>
|
||||
<p><strong>Description</strong><br>
|
||||
<code>iswalpha</code> is a function which classifies wide-character values that
|
||||
are alphabetic.
|
||||
|
||||
<p><br>
|
||||
<strong>Returns</strong><br>
|
||||
<code>iswalpha</code> returns non-zero if <var>c</var> is an alphabetic wide character.
|
||||
|
||||
<p><br>
|
||||
<strong>Portability</strong><br>
|
||||
<code>iswalpha</code> is C99.
|
||||
|
||||
<p>No supporting OS subroutines are required.
|
||||
|
||||
<p><br>
|
||||
|
||||
</body></html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue