Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 53cdef6e32fa82d27e145245880bbaa9 > files > 135

avr-libc-docs-1.7.1-13.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
    <title>avr-libc: &lt;stdlib.h&gt;: General utilities</title>
    <link href="dox.css" rel="stylesheet" type="text/css">
  </head>
<body>
<center>
<table width="80%">
  <tr>
    <td align="left"><a href="http://www.nongnu.org/avr-libc/">AVR Libc Home Page</a></td>
    <td align="center" colspan=4><img src="avrs.png" alt="AVRs" align="middle" border="0"></td>
    <td align="right"><a href="https://savannah.nongnu.org/projects/avr-libc/">AVR Libc Development Pages</a></td>
  </tr>
  <tr>
    <td align="center" width="13%"><a href="index.html">Main Page</a></td>
    <td align="center" width="13%"><a href="pages.html">User Manual</a></td>
    <td align="center" width="13%"><a href="modules.html">Library Reference</a></td>
    <td align="center" width="13%"><a href="FAQ.html">FAQ</a></td>
    <td align="center" width="13%"><a href="globals.html">Alphabetical Index</a></td>
    <td align="center" width="13%"><a href="group__demos.html">Example Projects</a></td>
  </tr>
</table>
</center>
<hr width="80%">
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>&lt;stdlib.h&gt;: General utilities</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdiv__t.html">div_t</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structldiv__t.html">ldiv_t</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga690f251553b39fd4f31894826141b61a">RAND_MAX</a>&#160;&#160;&#160;0x7FFF</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gad37588b5e19ccf152d3e4447098402e2">__compar_fn_t</a> )(const void *, const void *)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga63e28bec3592384b44606f011634c5a8">abort</a> (void) __ATTR_NORETURN__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gadb8c83badc195efc1229799391fececc">abs</a> (int __i)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gae017047d6d0a688ccb622ff062dcd230">labs</a> (long __i)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga885c1ccefb716ff16ab73a57003140be">bsearch</a> (const void *__key, const void *__base, size_t __nmemb, size_t __size, int(*__compar)(const void *, const void *))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdiv__t.html">div_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga7486ea9a8a90ac6b93bed37d08ebbd9e">div</a> (int __num, int __denom) __asm__(&quot;__divmodhi4&quot;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structldiv__t.html">ldiv_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga5b688b463f9faaa82f31ac7587e06849">ldiv</a> (long __num, long __denom) __asm__(&quot;__divmodsi4&quot;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gafd4bf2faec43342e7ad3d2ab37bac1fe">qsort</a> (void *__base, size_t __nmemb, size_t __size, <a class="el" href="group__avr__stdlib.html#gad37588b5e19ccf152d3e4447098402e2">__compar_fn_t</a> __compar)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol</a> (const char *__nptr, char **__endptr, int __base)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul</a> (const char *__nptr, char **__endptr, int __base)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga764de49bd918caf24ce1caf3a10b3823">atol</a> (const char *__s) __ATTR_PURE__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga3a1fe00c1327bbabc76688a7a1d73370">atoi</a> (const char *__s) __ATTR_PURE__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga137096a48cc0c731052cadfb69c39b34">exit</a> (int __status) __ATTR_NORETURN__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc</a> (size_t __size) __ATTR_MALLOC__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gafb8699abb1f51d920a176e695ff3be8a">free</a> (void *__ptr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga51ac965dacbc9daf922f469bdcfe00c2">calloc</a> (size_t __nele, size_t __size) __ATTR_MALLOC__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gafd300bad8b4dd2e88b07d464d76c92aa">realloc</a> (void *__ptr, size_t __size) __ATTR_MALLOC__</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga5ee4d110a3bb55d2eadda05e3ebedf8a">strtod</a> (const char *__nptr, char **__endptr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga689c9d3c4c04463aa31d329937789d06">atof</a> (const char *__nptr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gacceff9dc95bb3c5562dc9e61fc3d9075">srand</a> (unsigned int __seed)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gaf5085001be836a0f2a5d3269a7c9fd04">rand_r</a> (unsigned long *__ctx)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gaffadd67736fd340e893fb22c207de597">__malloc_margin</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga9310042b3956282440c091d20cb98c5f">__malloc_heap_start</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga4d7b1bf0f75d529cc75229a266132115">__malloc_heap_end</a></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Non-standard (i.e. non-ISO C) functions.</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga1d4c7b84110553544081a69a0fc49c52">ltoa</a> (long int __val, char *__s, int __radix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga5816f25bd0f45787cc16bebf6a735d8a">utoa</a> (unsigned int __val, char *__s, int __radix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga66e31b615d9ef1a19c452d64d7250112">ultoa</a> (unsigned long int __val, char *__s, int __radix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga4fca27496ca29c0a723d197696641eff">srandom</a> (unsigned long __seed)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#gaa99a0733f06d2b9960a1401c2721af1e">random_r</a> (unsigned long *__ctx)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga4f6b3dd51c1f8519d5b8fce1dbf7a665">itoa</a> (int __val, char *__s, int __radix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga3bd31f0d9a9127548b734e7ca03cc6df">RANDOM_MAX</a>&#160;&#160;&#160;0x7FFFFFFF</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Conversion functions for double arguments.</h2></td></tr>
<tr><td colspan="2"><p><a class="anchor" id="amgrp67796e0946dab291b611cb32584a051f"></a> Note that these functions are not located in the default library, <code>libc.a</code>, but in the mathematical library, <code>libm.a</code>. So when linking the application, the <code>-lm</code> option needs to be specified. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre</a> (double __val, char *__s, unsigned char __prec, unsigned char __flags)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga060c998e77fb5fc0d3168b3ce8771d42">dtostrf</a> (double __val, signed char __width, unsigned char __prec, char *__s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga815d0d26e215d9b78af1cb2288d22361">DTOSTR_ALWAYS_SIGN</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga268774f80047812307365f3113109767">DTOSTR_PLUS_SIGN</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__stdlib.html#ga125348f1e1fed1793426f4c4dc6fb2f7">DTOSTR_UPPERCASE</a>&#160;&#160;&#160;0x04</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &lt;<a class="code" href="stdlib_8h.html">stdlib.h</a>&gt;</span> 
</pre></div><p>This file declares some basic C macros and functions as defined by the ISO standard, plus some AVR-specific extensions. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga815d0d26e215d9b78af1cb2288d22361"></a><!-- doxytag: member="stdlib.h::DTOSTR_ALWAYS_SIGN" ref="ga815d0d26e215d9b78af1cb2288d22361" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DTOSTR_ALWAYS_SIGN&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Bit value that can be passed in <code>flags</code> to <a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre()</a>. </p>

</div>
</div>
<a class="anchor" id="ga268774f80047812307365f3113109767"></a><!-- doxytag: member="stdlib.h::DTOSTR_PLUS_SIGN" ref="ga268774f80047812307365f3113109767" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DTOSTR_PLUS_SIGN&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Bit value that can be passed in <code>flags</code> to <a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre()</a>. </p>

</div>
</div>
<a class="anchor" id="ga125348f1e1fed1793426f4c4dc6fb2f7"></a><!-- doxytag: member="stdlib.h::DTOSTR_UPPERCASE" ref="ga125348f1e1fed1793426f4c4dc6fb2f7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DTOSTR_UPPERCASE&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Bit value that can be passed in <code>flags</code> to <a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre()</a>. </p>

</div>
</div>
<a class="anchor" id="ga690f251553b39fd4f31894826141b61a"></a><!-- doxytag: member="stdlib.h::RAND_MAX" ref="ga690f251553b39fd4f31894826141b61a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RAND_MAX&#160;&#160;&#160;0x7FFF</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Highest number that can be generated by <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a>. </p>

</div>
</div>
<a class="anchor" id="ga3bd31f0d9a9127548b734e7ca03cc6df"></a><!-- doxytag: member="stdlib.h::RANDOM_MAX" ref="ga3bd31f0d9a9127548b734e7ca03cc6df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RANDOM_MAX&#160;&#160;&#160;0x7FFFFFFF</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Highest number that can be generated by <a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random()</a>. </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gad37588b5e19ccf152d3e4447098402e2"></a><!-- doxytag: member="stdlib.h::__compar_fn_t" ref="gad37588b5e19ccf152d3e4447098402e2" args=")(const void *, const void *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* <a class="el" href="group__avr__stdlib.html#gad37588b5e19ccf152d3e4447098402e2">__compar_fn_t</a>)(const void *, const void *)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Comparision function type for <a class="el" href="group__avr__stdlib.html#gafd4bf2faec43342e7ad3d2ab37bac1fe">qsort()</a>, just for convenience. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga63e28bec3592384b44606f011634c5a8"></a><!-- doxytag: member="stdlib.h::abort" ref="ga63e28bec3592384b44606f011634c5a8" args="(void) __ATTR_NORETURN__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void abort </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga63e28bec3592384b44606f011634c5a8">abort()</a> function causes abnormal program termination to occur. This realization disables interrupts and jumps to _exit() function with argument equal to 1. In the limited AVR environment, execution is effectively halted by entering an infinite loop. </p>

</div>
</div>
<a class="anchor" id="gadb8c83badc195efc1229799391fececc"></a><!-- doxytag: member="stdlib.h::abs" ref="gadb8c83badc195efc1229799391fececc" args="(int __i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int abs </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__i</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gadb8c83badc195efc1229799391fececc">abs()</a> function computes the absolute value of the integer <code>i</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The <a class="el" href="group__avr__stdlib.html#gadb8c83badc195efc1229799391fececc">abs()</a> and <a class="el" href="group__avr__stdlib.html#gae017047d6d0a688ccb622ff062dcd230">labs()</a> functions are builtins of gcc. </dd></dl>

</div>
</div>
<a class="anchor" id="ga689c9d3c4c04463aa31d329937789d06"></a><!-- doxytag: member="stdlib.h::atof" ref="ga689c9d3c4c04463aa31d329937789d06" args="(const char *__nptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double atof </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>nptr</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga689c9d3c4c04463aa31d329937789d06">atof()</a> function converts the initial portion of the string pointed to by <em>nptr</em> to double representation.</p>
<p>It is equivalent to calling </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="group__avr__stdlib.html#ga5ee4d110a3bb55d2eadda05e3ebedf8a">strtod</a>(nptr, (<span class="keywordtype">char</span> **)0); 
</pre></div> 
</div>
</div>
<a class="anchor" id="ga3a1fe00c1327bbabc76688a7a1d73370"></a><!-- doxytag: member="stdlib.h::atoi" ref="ga3a1fe00c1327bbabc76688a7a1d73370" args="(const char *__s) __ATTR_PURE__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int atoi </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>s</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert a string to an integer. </p>
<p>The <a class="el" href="group__avr__stdlib.html#ga3a1fe00c1327bbabc76688a7a1d73370" title="Convert a string to an integer.">atoi()</a> function converts the initial portion of the string pointed to by <code>s</code> to integer representation. In contrast to</p>
<div class="fragment"><pre class="fragment"> (int)<a class="code" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol</a>(s, (<span class="keywordtype">char</span> **)NULL, 10); 
</pre></div><p>this function does not detect overflow (<code>errno</code> is not changed and the result value is not predictable), uses smaller memory (flash and stack) and works more quickly. </p>

</div>
</div>
<a class="anchor" id="ga764de49bd918caf24ce1caf3a10b3823"></a><!-- doxytag: member="stdlib.h::atol" ref="ga764de49bd918caf24ce1caf3a10b3823" args="(const char *__s) __ATTR_PURE__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long atol </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>s</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert a string to a long integer. </p>
<p>The <a class="el" href="group__avr__stdlib.html#ga764de49bd918caf24ce1caf3a10b3823" title="Convert a string to a long integer.">atol()</a> function converts the initial portion of the string pointed to by <code>s</code> to long integer representation. In contrast to</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol</a>(s, (<span class="keywordtype">char</span> **)NULL, 10); 
</pre></div><p>this function does not detect overflow (<code>errno</code> is not changed and the result value is not predictable), uses smaller memory (flash and stack) and works more quickly. </p>

</div>
</div>
<a class="anchor" id="ga885c1ccefb716ff16ab73a57003140be"></a><!-- doxytag: member="stdlib.h::bsearch" ref="ga885c1ccefb716ff16ab73a57003140be" args="(const void *__key, const void *__base, size_t __nmemb, size_t __size, int(*__compar)(const void *, const void *))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* bsearch </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"> <em>__key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"> <em>__base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *, const void *)&#160;</td>
          <td class="paramname"> <em>__compar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga885c1ccefb716ff16ab73a57003140be">bsearch()</a> function searches an array of <code>nmemb</code> objects, the initial member of which is pointed to by <code>base</code>, for a member that matches the object pointed to by <code>key</code>. The size of each member of the array is specified by <code>size</code>.</p>
<p>The contents of the array should be in ascending sorted order according to the comparison function referenced by <code>compar</code>. The <code>compar</code> routine is expected to have two arguments which point to the key object and to an array member, in that order, and should return an integer less than, equal to, or greater than zero if the key object is found, respectively, to be less than, to match, or be greater than the array member.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga885c1ccefb716ff16ab73a57003140be">bsearch()</a> function returns a pointer to a matching member of the array, or a null pointer if no match is found. If two members compare as equal, which member is matched is unspecified. </p>

</div>
</div>
<a class="anchor" id="ga51ac965dacbc9daf922f469bdcfe00c2"></a><!-- doxytag: member="stdlib.h::calloc" ref="ga51ac965dacbc9daf922f469bdcfe00c2" args="(size_t __nele, size_t __size) __ATTR_MALLOC__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* calloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__nele</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Allocate <code>nele</code> elements of <code>size</code> each. Identical to calling <code><a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a></code> using <code>nele * size</code> as argument, except the allocated memory will be cleared to zero. </p>

</div>
</div>
<a class="anchor" id="ga7486ea9a8a90ac6b93bed37d08ebbd9e"></a><!-- doxytag: member="stdlib.h::div" ref="ga7486ea9a8a90ac6b93bed37d08ebbd9e" args="(int __num, int __denom) __asm__(&quot;__divmodhi4&quot;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structdiv__t.html">div_t</a> div </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__denom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga7486ea9a8a90ac6b93bed37d08ebbd9e">div()</a> function computes the value <code>num/denom</code> and returns the quotient and remainder in a structure named <code><a class="el" href="structdiv__t.html">div_t</a></code> that contains two int members named <code>quot</code> and <code>rem</code>. </p>

</div>
</div>
<a class="anchor" id="ga6c140bdd3b9bd740a1490137317caa44"></a><!-- doxytag: member="stdlib.h::dtostre" ref="ga6c140bdd3b9bd740a1490137317caa44" args="(double __val, char *__s, unsigned char __prec, unsigned char __flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* dtostre </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"> <em>__prec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"> <em>__flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre()</a> function converts the double value passed in <code>val</code> into an ASCII representation that will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<p>Conversion is done in the format <code>"[-]d.ddde±dd"</code> where there is one digit before the decimal-point character and the number of digits after it is equal to the precision <code>prec</code>; if the precision is zero, no decimal-point character appears. If <code>flags</code> has the DTOSTRE_UPPERCASE bit set, the letter <code>'E'</code> (rather than <code>'e'</code> ) will be used to introduce the exponent. The exponent always contains two digits; if the value is zero, the exponent is <code>"00"</code>.</p>
<p>If <code>flags</code> has the DTOSTRE_ALWAYS_SIGN bit set, a space character will be placed into the leading position for positive numbers.</p>
<p>If <code>flags</code> has the DTOSTRE_PLUS_SIGN bit set, a plus sign will be used instead of a space character in this case.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga6c140bdd3b9bd740a1490137317caa44">dtostre()</a> function returns the pointer to the converted string <code>s</code>. </p>

</div>
</div>
<a class="anchor" id="ga060c998e77fb5fc0d3168b3ce8771d42"></a><!-- doxytag: member="stdlib.h::dtostrf" ref="ga060c998e77fb5fc0d3168b3ce8771d42" args="(double __val, signed char __width, unsigned char __prec, char *__s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* dtostrf </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">signed char&#160;</td>
          <td class="paramname"> <em>__width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"> <em>__prec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga060c998e77fb5fc0d3168b3ce8771d42">dtostrf()</a> function converts the double value passed in <code>val</code> into an ASCII representationthat will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<p>Conversion is done in the format <code>"[-]d.ddd"</code>. The minimum field width of the output string (including the <code>'</code>.' and the possible sign for negative values) is given in <code>width</code>, and <code>prec</code> determines the number of digits after the decimal sign. <code>width</code> is signed value, negative for left adjustment.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga060c998e77fb5fc0d3168b3ce8771d42">dtostrf()</a> function returns the pointer to the converted string <code>s</code>. </p>

</div>
</div>
<a class="anchor" id="ga137096a48cc0c731052cadfb69c39b34"></a><!-- doxytag: member="stdlib.h::exit" ref="ga137096a48cc0c731052cadfb69c39b34" args="(int __status) __ATTR_NORETURN__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void exit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__status</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga137096a48cc0c731052cadfb69c39b34">exit()</a> function terminates the application. Since there is no environment to return to, <code>status</code> is ignored, and code execution will eventually reach an infinite loop, thereby effectively halting all code processing. Before entering the infinite loop, interrupts are globally disabled.</p>
<p>In a C++ context, global destructors will be called before halting execution. </p>

</div>
</div>
<a class="anchor" id="gafb8699abb1f51d920a176e695ff3be8a"></a><!-- doxytag: member="stdlib.h::free" ref="gafb8699abb1f51d920a176e695ff3be8a" args="(void *__ptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void free </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"> <em>__ptr</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gafb8699abb1f51d920a176e695ff3be8a">free()</a> function causes the allocated memory referenced by <code>ptr</code> to be made available for future allocations. If <code>ptr</code> is NULL, no action occurs. </p>

</div>
</div>
<a class="anchor" id="ga4f6b3dd51c1f8519d5b8fce1dbf7a665"></a><!-- doxytag: member="stdlib.h::itoa" ref="ga4f6b3dd51c1f8519d5b8fce1dbf7a665" args="(int __val, char *__s, int __radix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* itoa </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert an integer to a string. </p>
<p>The function <a class="el" href="group__avr__stdlib.html#ga4f6b3dd51c1f8519d5b8fce1dbf7a665" title="Convert an integer to a string.">itoa()</a> converts the integer value from <code>val</code> into an ASCII representation that will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The minimal size of the buffer <code>s</code> depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 * sizeof (int) + 1 characters, i.e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the buffer is too small, you risk a buffer overflow.</dd></dl>
<p>Conversion is done using the <code>radix</code> as base, which may be a number between 2 (binary conversion) and up to 36. If <code>radix</code> is greater than 10, the next digit after <code>'9'</code> will be the letter <code>'a'</code>.</p>
<p>If radix is 10 and val is negative, a minus sign will be prepended.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga4f6b3dd51c1f8519d5b8fce1dbf7a665" title="Convert an integer to a string.">itoa()</a> function returns the pointer passed as <code>s</code>. </p>

</div>
</div>
<a class="anchor" id="gae017047d6d0a688ccb622ff062dcd230"></a><!-- doxytag: member="stdlib.h::labs" ref="gae017047d6d0a688ccb622ff062dcd230" args="(long __i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long labs </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"> <em>__i</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gae017047d6d0a688ccb622ff062dcd230">labs()</a> function computes the absolute value of the long integer <code>i</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The <a class="el" href="group__avr__stdlib.html#gadb8c83badc195efc1229799391fececc">abs()</a> and <a class="el" href="group__avr__stdlib.html#gae017047d6d0a688ccb622ff062dcd230">labs()</a> functions are builtins of gcc. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5b688b463f9faaa82f31ac7587e06849"></a><!-- doxytag: member="stdlib.h::ldiv" ref="ga5b688b463f9faaa82f31ac7587e06849" args="(long __num, long __denom) __asm__(&quot;__divmodsi4&quot;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structldiv__t.html">ldiv_t</a> ldiv </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"> <em>__num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"> <em>__denom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga5b688b463f9faaa82f31ac7587e06849">ldiv()</a> function computes the value <code>num/denom</code> and returns the quotient and remainder in a structure named <code><a class="el" href="structldiv__t.html">ldiv_t</a></code> that contains two long integer members named <code>quot</code> and <code>rem</code>. </p>

</div>
</div>
<a class="anchor" id="ga1d4c7b84110553544081a69a0fc49c52"></a><!-- doxytag: member="stdlib.h::ltoa" ref="ga1d4c7b84110553544081a69a0fc49c52" args="(long int __val, char *__s, int __radix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ltoa </td>
          <td>(</td>
          <td class="paramtype">long int&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert a long integer to a string. </p>
<p>The function <a class="el" href="group__avr__stdlib.html#ga1d4c7b84110553544081a69a0fc49c52" title="Convert a long integer to a string.">ltoa()</a> converts the long integer value from <code>val</code> into an ASCII representation that will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The minimal size of the buffer <code>s</code> depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 * sizeof (long int) + 1 characters, i.e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the buffer is too small, you risk a buffer overflow.</dd></dl>
<p>Conversion is done using the <code>radix</code> as base, which may be a number between 2 (binary conversion) and up to 36. If <code>radix</code> is greater than 10, the next digit after <code>'9'</code> will be the letter <code>'a'</code>.</p>
<p>If radix is 10 and val is negative, a minus sign will be prepended.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga1d4c7b84110553544081a69a0fc49c52" title="Convert a long integer to a string.">ltoa()</a> function returns the pointer passed as <code>s</code>. </p>

</div>
</div>
<a class="anchor" id="ga4996af830ebe744d9678e5251dfd3ebd"></a><!-- doxytag: member="stdlib.h::malloc" ref="ga4996af830ebe744d9678e5251dfd3ebd" args="(size_t __size) __ATTR_MALLOC__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* malloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__size</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a> function allocates <code>size</code> bytes of memory. If <a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a> fails, a NULL pointer is returned.</p>
<p>Note that <a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a> does <em>not</em> initialize the returned memory to zero bytes.</p>
<p>See the chapter about <a class="el" href="malloc.html">malloc() usage</a> for implementation details. </p>

</div>
</div>
<a class="anchor" id="gafd4bf2faec43342e7ad3d2ab37bac1fe"></a><!-- doxytag: member="stdlib.h::qsort" ref="gafd4bf2faec43342e7ad3d2ab37bac1fe" args="(void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qsort </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"> <em>__base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__avr__stdlib.html#gad37588b5e19ccf152d3e4447098402e2">__compar_fn_t</a>&#160;</td>
          <td class="paramname"> <em>__compar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gafd4bf2faec43342e7ad3d2ab37bac1fe">qsort()</a> function is a modified partition-exchange sort, or quicksort.</p>
<p>The <a class="el" href="group__avr__stdlib.html#gafd4bf2faec43342e7ad3d2ab37bac1fe">qsort()</a> function sorts an array of <code>nmemb</code> objects, the initial member of which is pointed to by <code>base</code>. The size of each object is specified by <code>size</code>. The contents of the array base are sorted in ascending order according to a comparison function pointed to by <code>compar</code>, which requires two arguments pointing to the objects being compared.</p>
<p>The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. </p>

</div>
</div>
<a class="anchor" id="gae23144bcbb8e3742b00eb687c36654d1"></a><!-- doxytag: member="stdlib.h::rand" ref="gae23144bcbb8e3742b00eb687c36654d1" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rand </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a> function computes a sequence of pseudo-random integers in the range of 0 to <code>RAND_MAX</code> (as defined by the header file &lt;<a class="el" href="stdlib_8h.html">stdlib.h</a>&gt;).</p>
<p>The <a class="el" href="group__avr__stdlib.html#gacceff9dc95bb3c5562dc9e61fc3d9075">srand()</a> function sets its argument <code>seed</code> as the seed for a new sequence of pseudo-random numbers to be returned by <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a>. These sequences are repeatable by calling <a class="el" href="group__avr__stdlib.html#gacceff9dc95bb3c5562dc9e61fc3d9075">srand()</a> with the same seed value.</p>
<p>If no seed value is provided, the functions are automatically seeded with a value of 1.</p>
<p>In compliance with the C standard, these functions operate on <code>int</code> arguments. Since the underlying algorithm already uses 32-bit calculations, this causes a loss of precision. See <code><a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random()</a></code> for an alternate set of functions that retains full 32-bit precision. </p>

</div>
</div>
<a class="anchor" id="gaf5085001be836a0f2a5d3269a7c9fd04"></a><!-- doxytag: member="stdlib.h::rand_r" ref="gaf5085001be836a0f2a5d3269a7c9fd04" args="(unsigned long *__ctx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rand_r </td>
          <td>(</td>
          <td class="paramtype">unsigned long *&#160;</td>
          <td class="paramname"> <em>__ctx</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Variant of <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a> that stores the context in the user-supplied variable located at <code>ctx</code> instead of a static library variable so the function becomes re-entrant. </p>

</div>
</div>
<a class="anchor" id="ga114aeb1751119382aaf3340355b22cfd"></a><!-- doxytag: member="stdlib.h::random" ref="ga114aeb1751119382aaf3340355b22cfd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long random </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random()</a> function computes a sequence of pseudo-random integers in the range of 0 to <code>RANDOM_MAX</code> (as defined by the header file &lt;<a class="el" href="stdlib_8h.html">stdlib.h</a>&gt;).</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga4fca27496ca29c0a723d197696641eff">srandom()</a> function sets its argument <code>seed</code> as the seed for a new sequence of pseudo-random numbers to be returned by <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a>. These sequences are repeatable by calling <a class="el" href="group__avr__stdlib.html#ga4fca27496ca29c0a723d197696641eff">srandom()</a> with the same seed value.</p>
<p>If no seed value is provided, the functions are automatically seeded with a value of 1. </p>

</div>
</div>
<a class="anchor" id="gaa99a0733f06d2b9960a1401c2721af1e"></a><!-- doxytag: member="stdlib.h::random_r" ref="gaa99a0733f06d2b9960a1401c2721af1e" args="(unsigned long *__ctx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long random_r </td>
          <td>(</td>
          <td class="paramtype">unsigned long *&#160;</td>
          <td class="paramname"> <em>__ctx</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Variant of <a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random()</a> that stores the context in the user-supplied variable located at <code>ctx</code> instead of a static library variable so the function becomes re-entrant. </p>

</div>
</div>
<a class="anchor" id="gafd300bad8b4dd2e88b07d464d76c92aa"></a><!-- doxytag: member="stdlib.h::realloc" ref="gafd300bad8b4dd2e88b07d464d76c92aa" args="(void *__ptr, size_t __size) __ATTR_MALLOC__" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* realloc </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"> <em>__ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"> <em>__size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gafd300bad8b4dd2e88b07d464d76c92aa">realloc()</a> function tries to change the size of the region allocated at <code>ptr</code> to the new <code>size</code> value. It returns a pointer to the new region. The returned pointer might be the same as the old pointer, or a pointer to a completely different region.</p>
<p>The contents of the returned region up to either the old or the new size value (whatever is less) will be identical to the contents of the old region, even in case a new region had to be allocated.</p>
<p>It is acceptable to pass <code>ptr</code> as NULL, in which case <a class="el" href="group__avr__stdlib.html#gafd300bad8b4dd2e88b07d464d76c92aa">realloc()</a> will behave identical to <a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a>.</p>
<p>If the new memory cannot be allocated, <a class="el" href="group__avr__stdlib.html#gafd300bad8b4dd2e88b07d464d76c92aa">realloc()</a> returns NULL, and the region at <code>ptr</code> will not be changed. </p>

</div>
</div>
<a class="anchor" id="gacceff9dc95bb3c5562dc9e61fc3d9075"></a><!-- doxytag: member="stdlib.h::srand" ref="gacceff9dc95bb3c5562dc9e61fc3d9075" args="(unsigned int __seed)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void srand </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"> <em>__seed</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pseudo-random number generator seeding; see <a class="el" href="group__avr__stdlib.html#gae23144bcbb8e3742b00eb687c36654d1">rand()</a>. </p>

</div>
</div>
<a class="anchor" id="ga4fca27496ca29c0a723d197696641eff"></a><!-- doxytag: member="stdlib.h::srandom" ref="ga4fca27496ca29c0a723d197696641eff" args="(unsigned long __seed)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void srandom </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"> <em>__seed</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pseudo-random number generator seeding; see <a class="el" href="group__avr__stdlib.html#ga114aeb1751119382aaf3340355b22cfd">random()</a>. </p>

</div>
</div>
<a class="anchor" id="ga5ee4d110a3bb55d2eadda05e3ebedf8a"></a><!-- doxytag: member="stdlib.h::strtod" ref="ga5ee4d110a3bb55d2eadda05e3ebedf8a" args="(const char *__nptr, char **__endptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double strtod </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>nptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"> <em>endptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#ga5ee4d110a3bb55d2eadda05e3ebedf8a">strtod()</a> function converts the initial portion of the string pointed to by <em>nptr</em> to double representation.</p>
<p>The expected form of the string is an optional plus ( <code>'+'</code> ) or minus sign ( <code>'-'</code> ) followed by a sequence of digits optionally containing a decimal-point character, optionally followed by an exponent. An exponent consists of an <code>'E'</code> or <code>'e'</code>, followed by an optional plus or minus sign, followed by a sequence of digits.</p>
<p>Leading white-space characters in the string are skipped.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga5ee4d110a3bb55d2eadda05e3ebedf8a">strtod()</a> function returns the converted value, if any.</p>
<p>If <em>endptr</em> is not <code>NULL</code>, a pointer to the character after the last character used in the conversion is stored in the location referenced by <em>endptr</em>.</p>
<p>If no conversion is performed, zero is returned and the value of <em>nptr</em> is stored in the location referenced by <em>endptr</em>.</p>
<p>If the correct value would cause overflow, plus or minus <code>INFINITY</code> is returned (according to the sign of the value), and <code>ERANGE</code> is stored in <code>errno</code>. If the correct value would cause underflow, zero is returned and <code>ERANGE</code> is stored in <code>errno</code>. </p>

</div>
</div>
<a class="anchor" id="gaf8ce3b8dae3d45c34c3b172de503f7b3"></a><!-- doxytag: member="stdlib.h::strtol" ref="gaf8ce3b8dae3d45c34c3b172de503f7b3" args="(const char *__nptr, char **__endptr, int __base)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long strtol </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>__nptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"> <em>__endptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol()</a> function converts the string in <code>nptr</code> to a long value. The conversion is done according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.</p>
<p>The string may begin with an arbitrary amount of white space (as determined by <a class="el" href="group__ctype.html#ga16e58710aba8108549a1a3c33691b24e">isspace()</a>) followed by a single optional <code>'+'</code> or <code>'-'</code> sign. If <code>base</code> is zero or 16, the string may then include a <code>"0x"</code> prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is <code>'0'</code>, in which case it is taken as 8 (octal).</p>
<p>The remainder of the string is converted to a long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter <code>'A'</code> in either upper or lower case represents 10, <code>'B'</code> represents 11, and so forth, with <code>'Z'</code> representing 35.)</p>
<p>If <code>endptr</code> is not NULL, <a class="el" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol()</a> stores the address of the first invalid character in <code>*endptr</code>. If there were no digits at all, however, <a class="el" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol()</a> stores the original value of <code>nptr</code> in <code>endptr</code>. (Thus, if <code>*nptr</code> is not <code>'\0'</code> but <code>**endptr</code> is <code>'\0'</code> on return, the entire string was valid.)</p>
<p>The <a class="el" href="group__avr__stdlib.html#gaf8ce3b8dae3d45c34c3b172de503f7b3">strtol()</a> function returns the result of the conversion, unless the value would underflow or overflow. If no conversion could be performed, 0 is returned. If an overflow or underflow occurs, <code>errno</code> is set to <a class="el" href="group__avr__errno.html">ERANGE</a> and the function return value is clamped to <code>LONG_MIN</code> or <code>LONG_MAX</code>, respectively. </p>

</div>
</div>
<a class="anchor" id="gaea44aa48bda8261f794dcb2d1e7ab2b2"></a><!-- doxytag: member="stdlib.h::strtoul" ref="gaea44aa48bda8261f794dcb2d1e7ab2b2" args="(const char *__nptr, char **__endptr, int __base)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long strtoul </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"> <em>__nptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"> <em>__endptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The <a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul()</a> function converts the string in <code>nptr</code> to an unsigned long value. The conversion is done according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.</p>
<p>The string may begin with an arbitrary amount of white space (as determined by <a class="el" href="group__ctype.html#ga16e58710aba8108549a1a3c33691b24e">isspace()</a>) followed by a single optional <code>'+'</code> or <code>'-'</code> sign. If <code>base</code> is zero or 16, the string may then include a <code>"0x"</code> prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is <code>'0'</code>, in which case it is taken as 8 (octal).</p>
<p>The remainder of the string is converted to an unsigned long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter <code>'A'</code> in either upper or lower case represents 10, <code>'B'</code> represents 11, and so forth, with <code>'Z'</code> representing 35.)</p>
<p>If <code>endptr</code> is not NULL, <a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul()</a> stores the address of the first invalid character in <code>*endptr</code>. If there were no digits at all, however, <a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul()</a> stores the original value of <code>nptr</code> in <code>endptr</code>. (Thus, if <code>*nptr</code> is not <code>'\0'</code> but <code>**endptr</code> is <code>'\0'</code> on return, the entire string was valid.)</p>
<p>The <a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul()</a> function return either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion, unless the original (non-negated) value would overflow; in the latter case, <a class="el" href="group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2">strtoul()</a> returns ULONG_MAX, and <code>errno</code> is set to <a class="el" href="group__avr__errno.html">ERANGE</a>. If no conversion could be performed, 0 is returned. </p>

</div>
</div>
<a class="anchor" id="ga66e31b615d9ef1a19c452d64d7250112"></a><!-- doxytag: member="stdlib.h::ultoa" ref="ga66e31b615d9ef1a19c452d64d7250112" args="(unsigned long int __val, char *__s, int __radix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ultoa </td>
          <td>(</td>
          <td class="paramtype">unsigned long int&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert an unsigned long integer to a string. </p>
<p>The function <a class="el" href="group__avr__stdlib.html#ga66e31b615d9ef1a19c452d64d7250112" title="Convert an unsigned long integer to a string.">ultoa()</a> converts the unsigned long integer value from <code>val</code> into an ASCII representation that will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The minimal size of the buffer <code>s</code> depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 * sizeof (unsigned long int) + 1 characters, i.e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the buffer is too small, you risk a buffer overflow.</dd></dl>
<p>Conversion is done using the <code>radix</code> as base, which may be a number between 2 (binary conversion) and up to 36. If <code>radix</code> is greater than 10, the next digit after <code>'9'</code> will be the letter <code>'a'</code>.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga66e31b615d9ef1a19c452d64d7250112" title="Convert an unsigned long integer to a string.">ultoa()</a> function returns the pointer passed as <code>s</code>. </p>

</div>
</div>
<a class="anchor" id="ga5816f25bd0f45787cc16bebf6a735d8a"></a><!-- doxytag: member="stdlib.h::utoa" ref="ga5816f25bd0f45787cc16bebf6a735d8a" args="(unsigned int __val, char *__s, int __radix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* utoa </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"> <em>__val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"> <em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>__radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert an unsigned integer to a string. </p>
<p>The function <a class="el" href="group__avr__stdlib.html#ga5816f25bd0f45787cc16bebf6a735d8a" title="Convert an unsigned integer to a string.">utoa()</a> converts the unsigned integer value from <code>val</code> into an ASCII representation that will be stored under <code>s</code>. The caller is responsible for providing sufficient storage in <code>s</code>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The minimal size of the buffer <code>s</code> depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 * sizeof (unsigned int) + 1 characters, i.e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>If the buffer is too small, you risk a buffer overflow.</dd></dl>
<p>Conversion is done using the <code>radix</code> as base, which may be a number between 2 (binary conversion) and up to 36. If <code>radix</code> is greater than 10, the next digit after <code>'9'</code> will be the letter <code>'a'</code>.</p>
<p>The <a class="el" href="group__avr__stdlib.html#ga5816f25bd0f45787cc16bebf6a735d8a" title="Convert an unsigned integer to a string.">utoa()</a> function returns the pointer passed as <code>s</code>. </p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga4d7b1bf0f75d529cc75229a266132115"></a><!-- doxytag: member="stdlib.h::__malloc_heap_end" ref="ga4d7b1bf0f75d529cc75229a266132115" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="group__avr__stdlib.html#ga4d7b1bf0f75d529cc75229a266132115">__malloc_heap_end</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code><a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a></code> <a class="el" href="malloc.html#malloc_tunables">tunable</a>. </p>

</div>
</div>
<a class="anchor" id="ga9310042b3956282440c091d20cb98c5f"></a><!-- doxytag: member="stdlib.h::__malloc_heap_start" ref="ga9310042b3956282440c091d20cb98c5f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="group__avr__stdlib.html#ga9310042b3956282440c091d20cb98c5f">__malloc_heap_start</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code><a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a></code> <a class="el" href="malloc.html#malloc_tunables">tunable</a>. </p>

</div>
</div>
<a class="anchor" id="gaffadd67736fd340e893fb22c207de597"></a><!-- doxytag: member="stdlib.h::__malloc_margin" ref="gaffadd67736fd340e893fb22c207de597" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="group__avr__stdlib.html#gaffadd67736fd340e893fb22c207de597">__malloc_margin</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><code><a class="el" href="group__avr__stdlib.html#ga4996af830ebe744d9678e5251dfd3ebd">malloc()</a></code> <a class="el" href="malloc.html#malloc_tunables">tunable</a>. </p>

</div>
</div>
</div>

<hr width="80%">
<p><center>Automatically generated by Doxygen 1.7.2 on Wed Feb 16 2011.</center></p>

</body>
</html>