Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Stdlib (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="Stdlib (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="Stdlib (The Red Hat newlib C Library)">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <link href="index.html#Top" rel="start" title="Top">
  13. <link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
  14. <link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
  15. <link href="index.html#Top" rel="up" title="Top">
  16. <link href="_005fExit.html#g_t_005fExit" rel="next" title="_Exit">
  17. <link href="Introduction.html#Introduction" rel="prev" title="Introduction">
  18. <style type="text/css">
  19. <!--
  20. a.summary-letter {text-decoration: none}
  21. blockquote.indentedblock {margin-right: 0em}
  22. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  23. blockquote.smallquotation {font-size: smaller}
  24. div.display {margin-left: 3.2em}
  25. div.example {margin-left: 3.2em}
  26. div.lisp {margin-left: 3.2em}
  27. div.smalldisplay {margin-left: 3.2em}
  28. div.smallexample {margin-left: 3.2em}
  29. div.smalllisp {margin-left: 3.2em}
  30. kbd {font-style: oblique}
  31. pre.display {font-family: inherit}
  32. pre.format {font-family: inherit}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. pre.smalldisplay {font-family: inherit; font-size: smaller}
  36. pre.smallexample {font-size: smaller}
  37. pre.smallformat {font-family: inherit; font-size: smaller}
  38. pre.smalllisp {font-size: smaller}
  39. span.nolinebreak {white-space: nowrap}
  40. span.roman {font-family: initial; font-weight: normal}
  41. span.sansserif {font-family: sans-serif; font-weight: normal}
  42. ul.no-bullet {list-style: none}
  43. -->
  44. </style>
  45. </head>
  46. <body lang="en">
  47. <a name="Stdlib"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="Ctype.html#Ctype" accesskey="n" rel="next">Ctype</a>, Previous: <a href="Introduction.html#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  51. </div>
  52. <hr>
  53. <a name="Standard-Utility-Functions-_0028stdlib_002eh_0029"></a>
  54. <h2 class="chapter">2 Standard Utility Functions (<samp>stdlib.h</samp>)</h2>
  55. <p>This chapter groups utility functions useful in a variety of programs.
  56. The corresponding declarations are in the header file <samp>stdlib.h</samp>.
  57. </p>
  58. <table class="menu" border="0" cellspacing="0">
  59. <tr><td align="left" valign="top">&bull; <a href="_005fExit.html#g_t_005fExit" accesskey="1">_Exit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">End program execution without cleaning up
  60. </td></tr>
  61. <tr><td align="left" valign="top">&bull; <a href="a64l.html#a64l" accesskey="2">a64l</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to long long
  62. </td></tr>
  63. <tr><td align="left" valign="top">&bull; <a href="abort.html#abort" accesskey="3">abort</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Abnormal termination of a program
  64. </td></tr>
  65. <tr><td align="left" valign="top">&bull; <a href="abs.html#abs" accesskey="4">abs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Integer absolute value (magnitude)
  66. </td></tr>
  67. <tr><td align="left" valign="top">&bull; <a href="assert.html#assert" accesskey="5">assert</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Macro for Debugging Diagnostics
  68. </td></tr>
  69. <tr><td align="left" valign="top">&bull; <a href="atexit.html#atexit" accesskey="6">atexit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Request execution of functions at program exit
  70. </td></tr>
  71. <tr><td align="left" valign="top">&bull; <a href="atof.html#atof" accesskey="7">atof</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to double or float
  72. </td></tr>
  73. <tr><td align="left" valign="top">&bull; <a href="atoi.html#atoi" accesskey="8">atoi</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to integer
  74. </td></tr>
  75. <tr><td align="left" valign="top">&bull; <a href="atoll.html#atoll" accesskey="9">atoll</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to long long
  76. </td></tr>
  77. <tr><td align="left" valign="top">&bull; <a href="bsearch.html#bsearch">bsearch</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Binary search
  78. </td></tr>
  79. <tr><td align="left" valign="top">&bull; <a href="calloc.html#calloc">calloc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Allocate space for arrays
  80. </td></tr>
  81. <tr><td align="left" valign="top">&bull; <a href="div.html#div">div</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Divide two integers
  82. </td></tr>
  83. <tr><td align="left" valign="top">&bull; <a href="ecvtbuf.html#ecvtbuf">ecvtbuf</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Double or float to string of digits
  84. </td></tr>
  85. <tr><td align="left" valign="top">&bull; <a href="ecvt.html#ecvt">ecvt</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Double or float to string of digits (malloc result)
  86. </td></tr>
  87. <tr><td align="left" valign="top">&bull; <a href="_005f_005fenv_005flock.html#g_t_005f_005fenv_005flock">__env_lock</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Lock environment list for getenv and setenv
  88. </td></tr>
  89. <tr><td align="left" valign="top">&bull; <a href="gcvt.html#gcvt">gcvt</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Format double or float as string
  90. </td></tr>
  91. <tr><td align="left" valign="top">&bull; <a href="exit.html#exit">exit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">End program execution
  92. </td></tr>
  93. <tr><td align="left" valign="top">&bull; <a href="getenv.html#getenv">getenv</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Look up environment variable
  94. </td></tr>
  95. <tr><td align="left" valign="top">&bull; <a href="itoa.html#itoa">itoa</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Integer to string
  96. </td></tr>
  97. <tr><td align="left" valign="top">&bull; <a href="labs.html#labs">labs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Long integer absolute value (magnitude)
  98. </td></tr>
  99. <tr><td align="left" valign="top">&bull; <a href="ldiv.html#ldiv">ldiv</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Divide two long integers
  100. </td></tr>
  101. <tr><td align="left" valign="top">&bull; <a href="llabs.html#llabs">llabs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Long long integer absolute value (magnitude)
  102. </td></tr>
  103. <tr><td align="left" valign="top">&bull; <a href="lldiv.html#lldiv">lldiv</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Divide two long long integers
  104. </td></tr>
  105. <tr><td align="left" valign="top">&bull; <a href="malloc.html#malloc">malloc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Allocate and manage memory (malloc, realloc, free)
  106. </td></tr>
  107. <tr><td align="left" valign="top">&bull; <a href="mallinfo.html#mallinfo">mallinfo</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Get information about allocated memory
  108. </td></tr>
  109. <tr><td align="left" valign="top">&bull; <a href="_005f_005fmalloc_005flock.html#g_t_005f_005fmalloc_005flock">__malloc_lock</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Lock memory pool for malloc and free
  110. </td></tr>
  111. <tr><td align="left" valign="top">&bull; <a href="mbsrtowcs.html#mbsrtowcs">mbsrtowcs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Convert a character string to a wide-character string
  112. </td></tr>
  113. <tr><td align="left" valign="top">&bull; <a href="mbstowcs.html#mbstowcs">mbstowcs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Minimal multibyte string to wide string converter
  114. </td></tr>
  115. <tr><td align="left" valign="top">&bull; <a href="mblen.html#mblen">mblen</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Minimal multibyte length
  116. </td></tr>
  117. <tr><td align="left" valign="top">&bull; <a href="mbtowc.html#mbtowc">mbtowc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Minimal multibyte to wide character converter
  118. </td></tr>
  119. <tr><td align="left" valign="top">&bull; <a href="on_005fexit.html#on_005fexit">on_exit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Request execution of functions at program exit
  120. </td></tr>
  121. <tr><td align="left" valign="top">&bull; <a href="qsort.html#qsort">qsort</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Array sort
  122. </td></tr>
  123. <tr><td align="left" valign="top">&bull; <a href="rand.html#rand">rand</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pseudo-random numbers
  124. </td></tr>
  125. <tr><td align="left" valign="top">&bull; <a href="random.html#random">random</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pseudo-random numbers
  126. </td></tr>
  127. <tr><td align="left" valign="top">&bull; <a href="rand48.html#rand48">rand48</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Uniformly distributed pseudo-random numbers
  128. </td></tr>
  129. <tr><td align="left" valign="top">&bull; <a href="rpmatch.html#rpmatch">rpmatch</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Determine whether response is affirmative or negative
  130. </td></tr>
  131. <tr><td align="left" valign="top">&bull; <a href="strtod.html#strtod">strtod</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to double or float
  132. </td></tr>
  133. <tr><td align="left" valign="top">&bull; <a href="strtol.html#strtol">strtol</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to long
  134. </td></tr>
  135. <tr><td align="left" valign="top">&bull; <a href="strtoll.html#strtoll">strtoll</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to long long
  136. </td></tr>
  137. <tr><td align="left" valign="top">&bull; <a href="strtoul.html#strtoul">strtoul</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to unsigned long
  138. </td></tr>
  139. <tr><td align="left" valign="top">&bull; <a href="strtoull.html#strtoull">strtoull</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">String to unsigned long long
  140. </td></tr>
  141. <tr><td align="left" valign="top">&bull; <a href="wcsrtombs.html#wcsrtombs">wcsrtombs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Convert a wide-character string to a character string
  142. </td></tr>
  143. <tr><td align="left" valign="top">&bull; <a href="wcstod.html#wcstod">wcstod</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wide string to double or float
  144. </td></tr>
  145. <tr><td align="left" valign="top">&bull; <a href="wcstol.html#wcstol">wcstol</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wide string to long
  146. </td></tr>
  147. <tr><td align="left" valign="top">&bull; <a href="wcstoll.html#wcstoll">wcstoll</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wide string to long long
  148. </td></tr>
  149. <tr><td align="left" valign="top">&bull; <a href="wcstoul.html#wcstoul">wcstoul</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wide string to unsigned long
  150. </td></tr>
  151. <tr><td align="left" valign="top">&bull; <a href="wcstoull.html#wcstoull">wcstoull</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Wide string to unsigned long long
  152. </td></tr>
  153. <tr><td align="left" valign="top">&bull; <a href="system.html#system">system</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Execute command string
  154. </td></tr>
  155. <tr><td align="left" valign="top">&bull; <a href="utoa.html#utoa">utoa</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Unsigned integer to string
  156. </td></tr>
  157. <tr><td align="left" valign="top">&bull; <a href="wcstombs.html#wcstombs">wcstombs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Minimal wide string to multibyte string converter
  158. </td></tr>
  159. <tr><td align="left" valign="top">&bull; <a href="wctomb.html#wctomb">wctomb</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Minimal wide character to multibyte converter
  160. </td></tr>
  161. </table>
  162. <hr>
  163. <div class="header">
  164. <p>
  165. Next: <a href="Ctype.html#Ctype" accesskey="n" rel="next">Ctype</a>, Previous: <a href="Introduction.html#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  166. </div>
  167. </body>
  168. </html>