cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

stdlib_8h.html (30869B)


      1<!-- HTML header for doxygen 1.8.14-->
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3<html xmlns="http://www.w3.org/1999/xhtml">
      4<head>
      5<meta http-equiv="cache-control" content="max-age=86400"/>
      6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
      8<meta name="generator" content="Doxygen 1.8.20"/>
      9<meta name="viewport" content="width=device-width, initial-scale=1"/>
     10<title>GBDK 2020 Docs: stdlib.h File Reference</title>
     11<link href="tabs.css" rel="stylesheet" type="text/css"/>
     12<script type="text/javascript" src="jquery.js"></script>
     13<script type="text/javascript" src="dynsections.js"></script>
     14<link href="navtree.css" rel="stylesheet" type="text/css"/>
     15<script type="text/javascript" src="resize.js"></script>
     16<script type="text/javascript" src="navtreedata.js"></script>
     17<script type="text/javascript" src="navtree.js"></script>
     18<link href="search/search.css" rel="stylesheet" type="text/css"/>
     19<script type="text/javascript" src="search/searchdata.js"></script>
     20<script type="text/javascript" src="search/search.js"></script>
     21<link href="doxygen.css" rel="stylesheet" type="text/css" />
     22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
     23</head>
     24<body>
     25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     26<div id="titlearea">
     27<table cellspacing="0" cellpadding="0">
     28 <tbody>
     29 <tr style="height: 56px;">
     30  <td id="projectalign" style="padding-left: 0.5em;">
     31   <div id="projectname">GBDK 2020 Docs
     32   &#160;<span id="projectnumber">4.0.6</span>
     33   </div>
     34   <div id="projectbrief">API Documentation for GBDK 2020</div>
     35  </td>
     36 </tr>
     37 </tbody>
     38</table>
     39</div>
     40<!-- end header part -->
     41<!-- Generated by Doxygen 1.8.20 -->
     42<script type="text/javascript">
     43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     44var searchBox = new SearchBox("searchBox", "search",false,'Search');
     45/* @license-end */
     46</script>
     47<script type="text/javascript" src="menudata.js"></script>
     48<script type="text/javascript" src="menu.js"></script>
     49<script type="text/javascript">
     50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     51$(function() {
     52  initMenu('',true,false,'search.php','Search');
     53  $(document).ready(function() { init_search(); });
     54});
     55/* @license-end */</script>
     56<div id="main-nav"></div>
     57</div><!-- top -->
     58<div id="side-nav" class="ui-resizable side-nav-resizable">
     59  <div id="nav-tree">
     60    <div id="nav-tree-contents">
     61      <div id="nav-sync" class="sync"></div>
     62    </div>
     63  </div>
     64  <div id="splitbar" style="-moz-user-select:none;" 
     65       class="ui-resizable-handle">
     66  </div>
     67</div>
     68<script type="text/javascript">
     69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     70$(document).ready(function(){initNavTree('stdlib_8h.html',''); initResizable(); });
     71/* @license-end */
     72</script>
     73<div id="doc-content">
     74<!-- window showing the filter options -->
     75<div id="MSearchSelectWindow"
     76     onmouseover="return searchBox.OnSearchSelectShow()"
     77     onmouseout="return searchBox.OnSearchSelectHide()"
     78     onkeydown="return searchBox.OnSearchSelectKey(event)">
     79</div>
     80
     81<!-- iframe showing the search results (closed by default) -->
     82<div id="MSearchResultsWindow">
     83<iframe src="javascript:void(0)" frameborder="0" 
     84        name="MSearchResults" id="MSearchResults">
     85</iframe>
     86</div>
     87
     88<div class="header">
     89  <div class="summary">
     90<a href="#define-members">Macros</a> &#124;
     91<a href="#func-members">Functions</a>  </div>
     92  <div class="headertitle">
     93<div class="title">stdlib.h File Reference</div>  </div>
     94</div><!--header-->
     95<div class="contents">
     96<div class="textblock"><code>#include &lt;<a class="el" href="types_8h_source.html">types.h</a>&gt;</code><br />
     97</div>
     98<p><a href="stdlib_8h_source.html">Go to the source code of this file.</a></p>
     99<table class="memberdecls">
    100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
    101Macros</h2></td></tr>
    102<tr class="memitem:a83798998ad669e85a8f75d6490191760"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a83798998ad669e85a8f75d6490191760">__reentrant</a></td></tr>
    103<tr class="separator:a83798998ad669e85a8f75d6490191760"><td class="memSeparator" colspan="2">&#160;</td></tr>
    104</table><table class="memberdecls">
    105<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    106Functions</h2></td></tr>
    107<tr class="memitem:a55e99c539cf7723ec15e856b7e0a8cee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a55e99c539cf7723ec15e856b7e0a8cee">exit</a> (int status)</td></tr>
    108<tr class="separator:a55e99c539cf7723ec15e856b7e0a8cee"><td class="memSeparator" colspan="2">&#160;</td></tr>
    109<tr class="memitem:a3bb2d2cacc5535004757ebbc640079fb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a3bb2d2cacc5535004757ebbc640079fb">abs</a> (int i) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    110<tr class="separator:a3bb2d2cacc5535004757ebbc640079fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
    111<tr class="memitem:a8b7210ba18f750970a2db3c73a841a22"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a8b7210ba18f750970a2db3c73a841a22">labs</a> (long num) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    112<tr class="separator:a8b7210ba18f750970a2db3c73a841a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
    113<tr class="memitem:a30670a60464f77af17dfb353353d6df8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi</a> (const char *s)</td></tr>
    114<tr class="separator:a30670a60464f77af17dfb353353d6df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
    115<tr class="memitem:a825c37450147a643edbcb1a435518307"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a825c37450147a643edbcb1a435518307">atol</a> (const char *s)</td></tr>
    116<tr class="separator:a825c37450147a643edbcb1a435518307"><td class="memSeparator" colspan="2">&#160;</td></tr>
    117<tr class="memitem:aac2ea595a9ea8f5ebd883a0bc05eba5c"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#aac2ea595a9ea8f5ebd883a0bc05eba5c">itoa</a> (int n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    118<tr class="separator:aac2ea595a9ea8f5ebd883a0bc05eba5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
    119<tr class="memitem:a38c070016cb06132360cfa5bacc2ed19"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a38c070016cb06132360cfa5bacc2ed19">uitoa</a> (unsigned int n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    120<tr class="separator:a38c070016cb06132360cfa5bacc2ed19"><td class="memSeparator" colspan="2">&#160;</td></tr>
    121<tr class="memitem:a6374e62474a5a76c7ace9a59fb1cc829"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a6374e62474a5a76c7ace9a59fb1cc829">ltoa</a> (long n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    122<tr class="separator:a6374e62474a5a76c7ace9a59fb1cc829"><td class="memSeparator" colspan="2">&#160;</td></tr>
    123<tr class="memitem:ac22b79fe0c1279eabc3daf57328008d2"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#ac22b79fe0c1279eabc3daf57328008d2">ultoa</a> (unsigned long n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    124<tr class="separator:ac22b79fe0c1279eabc3daf57328008d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
    125<tr class="memitem:a62b7798461bd461da64c5f9d35feddf7"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a62b7798461bd461da64c5f9d35feddf7">calloc</a> (<a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
    126<tr class="separator:a62b7798461bd461da64c5f9d35feddf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
    127<tr class="memitem:a7ac38fce3243a7dcf448301ee9ffd392"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">malloc</a> (<a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
    128<tr class="separator:a7ac38fce3243a7dcf448301ee9ffd392"><td class="memSeparator" colspan="2">&#160;</td></tr>
    129<tr class="memitem:a1a6b5e8d2f1c37e5b43e4345586075be"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a1a6b5e8d2f1c37e5b43e4345586075be">realloc</a> (void *ptr, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
    130<tr class="separator:a1a6b5e8d2f1c37e5b43e4345586075be"><td class="memSeparator" colspan="2">&#160;</td></tr>
    131<tr class="memitem:afbedc913aa4651b3c3b4b3aecd9b4711"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#afbedc913aa4651b3c3b4b3aecd9b4711">free</a> (void *ptr)</td></tr>
    132<tr class="separator:afbedc913aa4651b3c3b4b3aecd9b4711"><td class="memSeparator" colspan="2">&#160;</td></tr>
    133<tr class="memitem:ab0ace018fe7dfa1720930d2dce0c45e3"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#ab0ace018fe7dfa1720930d2dce0c45e3">bsearch</a> (const void *key, const void *base, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size, int(*compar)(const void *, const void *) <a class="el" href="stdlib_8h.html#a83798998ad669e85a8f75d6490191760">__reentrant</a>)</td></tr>
    134<tr class="separator:ab0ace018fe7dfa1720930d2dce0c45e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
    135<tr class="memitem:a02d9d6443b9e613802b2e9c5c71caf59"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a02d9d6443b9e613802b2e9c5c71caf59">qsort</a> (void *base, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size, int(*compar)(const void *, const void *) <a class="el" href="stdlib_8h.html#a83798998ad669e85a8f75d6490191760">__reentrant</a>)</td></tr>
    136<tr class="separator:a02d9d6443b9e613802b2e9c5c71caf59"><td class="memSeparator" colspan="2">&#160;</td></tr>
    137</table>
    138<h2 class="groupheader">Macro Definition Documentation</h2>
    139<a id="a83798998ad669e85a8f75d6490191760"></a>
    140<h2 class="memtitle"><span class="permalink"><a href="#a83798998ad669e85a8f75d6490191760">&#9670;&nbsp;</a></span>__reentrant</h2>
    141
    142<div class="memitem">
    143<div class="memproto">
    144      <table class="memname">
    145        <tr>
    146          <td class="memname">#define __reentrant</td>
    147        </tr>
    148      </table>
    149</div><div class="memdoc">
    150<p>file stdlib.h 'Standard library' functions, for whatever that means. </p>
    151
    152</div>
    153</div>
    154<h2 class="groupheader">Function Documentation</h2>
    155<a id="a55e99c539cf7723ec15e856b7e0a8cee"></a>
    156<h2 class="memtitle"><span class="permalink"><a href="#a55e99c539cf7723ec15e856b7e0a8cee">&#9670;&nbsp;</a></span>exit()</h2>
    157
    158<div class="memitem">
    159<div class="memproto">
    160      <table class="memname">
    161        <tr>
    162          <td class="memname">void exit </td>
    163          <td>(</td>
    164          <td class="paramtype">int&#160;</td>
    165          <td class="paramname"><em>status</em></td><td>)</td>
    166          <td></td>
    167        </tr>
    168      </table>
    169</div><div class="memdoc">
    170<p>Causes normal program termination and the value of status is returned to the parent. All open streams are flushed and closed. </p>
    171
    172</div>
    173</div>
    174<a id="a3bb2d2cacc5535004757ebbc640079fb"></a>
    175<h2 class="memtitle"><span class="permalink"><a href="#a3bb2d2cacc5535004757ebbc640079fb">&#9670;&nbsp;</a></span>abs()</h2>
    176
    177<div class="memitem">
    178<div class="memproto">
    179      <table class="memname">
    180        <tr>
    181          <td class="memname">int abs </td>
    182          <td>(</td>
    183          <td class="paramtype">int&#160;</td>
    184          <td class="paramname"><em>i</em></td><td>)</td>
    185          <td></td>
    186        </tr>
    187      </table>
    188</div><div class="memdoc">
    189<p>Returns the absolute value of int <b>i</b> </p><dl class="params"><dt>Parameters</dt><dd>
    190  <table class="params">
    191    <tr><td class="paramname">i</td><td>Int to obtain absolute value of</td></tr>
    192  </table>
    193  </dd>
    194</dl>
    195<p>If i is negative, returns -i; else returns i. </p>
    196
    197</div>
    198</div>
    199<a id="a8b7210ba18f750970a2db3c73a841a22"></a>
    200<h2 class="memtitle"><span class="permalink"><a href="#a8b7210ba18f750970a2db3c73a841a22">&#9670;&nbsp;</a></span>labs()</h2>
    201
    202<div class="memitem">
    203<div class="memproto">
    204      <table class="memname">
    205        <tr>
    206          <td class="memname">long labs </td>
    207          <td>(</td>
    208          <td class="paramtype">long&#160;</td>
    209          <td class="paramname"><em>num</em></td><td>)</td>
    210          <td></td>
    211        </tr>
    212      </table>
    213</div><div class="memdoc">
    214<p>Returns the absolute value of long int <b>num</b></p>
    215<dl class="params"><dt>Parameters</dt><dd>
    216  <table class="params">
    217    <tr><td class="paramname">num</td><td>Long integer to obtain absolute value of </td></tr>
    218  </table>
    219  </dd>
    220</dl>
    221
    222</div>
    223</div>
    224<a id="a30670a60464f77af17dfb353353d6df8"></a>
    225<h2 class="memtitle"><span class="permalink"><a href="#a30670a60464f77af17dfb353353d6df8">&#9670;&nbsp;</a></span>atoi()</h2>
    226
    227<div class="memitem">
    228<div class="memproto">
    229      <table class="memname">
    230        <tr>
    231          <td class="memname">int atoi </td>
    232          <td>(</td>
    233          <td class="paramtype">const char *&#160;</td>
    234          <td class="paramname"><em>s</em></td><td>)</td>
    235          <td></td>
    236        </tr>
    237      </table>
    238</div><div class="memdoc">
    239<p>Converts an ASCII string to an int</p>
    240<dl class="params"><dt>Parameters</dt><dd>
    241  <table class="params">
    242    <tr><td class="paramname">s</td><td>String to convert to an int</td></tr>
    243  </table>
    244  </dd>
    245</dl>
    246<p>The string may be of the format </p><div class="fragment"><div class="line">[\s]*[+-][<a class="code" href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">\d</a>]+[\D]*</div>
    247</div><!-- fragment --><p> i.e. any number of spaces, an optional + or -, then an arbitrary number of digits.</p>
    248<p>The result is undefined if the number doesnt fit in an int.</p>
    249<p>Returns: Int value of string </p>
    250
    251</div>
    252</div>
    253<a id="a825c37450147a643edbcb1a435518307"></a>
    254<h2 class="memtitle"><span class="permalink"><a href="#a825c37450147a643edbcb1a435518307">&#9670;&nbsp;</a></span>atol()</h2>
    255
    256<div class="memitem">
    257<div class="memproto">
    258      <table class="memname">
    259        <tr>
    260          <td class="memname">long atol </td>
    261          <td>(</td>
    262          <td class="paramtype">const char *&#160;</td>
    263          <td class="paramname"><em>s</em></td><td>)</td>
    264          <td></td>
    265        </tr>
    266      </table>
    267</div><div class="memdoc">
    268<p>Converts an ASCII string to a long. </p><dl class="params"><dt>Parameters</dt><dd>
    269  <table class="params">
    270    <tr><td class="paramname">s</td><td>String to convert to an long int </td></tr>
    271  </table>
    272  </dd>
    273</dl>
    274<dl class="section see"><dt>See also</dt><dd><a class="el" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi()</a></dd></dl>
    275<p>Returns: Long int value of string </p>
    276
    277</div>
    278</div>
    279<a id="aac2ea595a9ea8f5ebd883a0bc05eba5c"></a>
    280<h2 class="memtitle"><span class="permalink"><a href="#aac2ea595a9ea8f5ebd883a0bc05eba5c">&#9670;&nbsp;</a></span>itoa()</h2>
    281
    282<div class="memitem">
    283<div class="memproto">
    284      <table class="memname">
    285        <tr>
    286          <td class="memname">char* itoa </td>
    287          <td>(</td>
    288          <td class="paramtype">int&#160;</td>
    289          <td class="paramname"><em>n</em>, </td>
    290        </tr>
    291        <tr>
    292          <td class="paramkey"></td>
    293          <td></td>
    294          <td class="paramtype">char *&#160;</td>
    295          <td class="paramname"><em>s</em>, </td>
    296        </tr>
    297        <tr>
    298          <td class="paramkey"></td>
    299          <td></td>
    300          <td class="paramtype">unsigned char&#160;</td>
    301          <td class="paramname"><em>radix</em>&#160;</td>
    302        </tr>
    303        <tr>
    304          <td></td>
    305          <td>)</td>
    306          <td></td><td></td>
    307        </tr>
    308      </table>
    309</div><div class="memdoc">
    310<p>Converts an int into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
    311  <table class="params">
    312    <tr><td class="paramname">n</td><td>Int to convert to a string </td></tr>
    313    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    314    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
    315  </table>
    316  </dd>
    317</dl>
    318<p>Returns: Pointer to converted string </p>
    319
    320</div>
    321</div>
    322<a id="a38c070016cb06132360cfa5bacc2ed19"></a>
    323<h2 class="memtitle"><span class="permalink"><a href="#a38c070016cb06132360cfa5bacc2ed19">&#9670;&nbsp;</a></span>uitoa()</h2>
    324
    325<div class="memitem">
    326<div class="memproto">
    327      <table class="memname">
    328        <tr>
    329          <td class="memname">char* uitoa </td>
    330          <td>(</td>
    331          <td class="paramtype">unsigned int&#160;</td>
    332          <td class="paramname"><em>n</em>, </td>
    333        </tr>
    334        <tr>
    335          <td class="paramkey"></td>
    336          <td></td>
    337          <td class="paramtype">char *&#160;</td>
    338          <td class="paramname"><em>s</em>, </td>
    339        </tr>
    340        <tr>
    341          <td class="paramkey"></td>
    342          <td></td>
    343          <td class="paramtype">unsigned char&#160;</td>
    344          <td class="paramname"><em>radix</em>&#160;</td>
    345        </tr>
    346        <tr>
    347          <td></td>
    348          <td>)</td>
    349          <td></td><td></td>
    350        </tr>
    351      </table>
    352</div><div class="memdoc">
    353<p>Converts an unsigned int into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
    354  <table class="params">
    355    <tr><td class="paramname">n</td><td>Unsigned Int to convert to a string </td></tr>
    356    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    357    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
    358  </table>
    359  </dd>
    360</dl>
    361<p>Returns: Pointer to converted string </p>
    362
    363</div>
    364</div>
    365<a id="a6374e62474a5a76c7ace9a59fb1cc829"></a>
    366<h2 class="memtitle"><span class="permalink"><a href="#a6374e62474a5a76c7ace9a59fb1cc829">&#9670;&nbsp;</a></span>ltoa()</h2>
    367
    368<div class="memitem">
    369<div class="memproto">
    370      <table class="memname">
    371        <tr>
    372          <td class="memname">char* ltoa </td>
    373          <td>(</td>
    374          <td class="paramtype">long&#160;</td>
    375          <td class="paramname"><em>n</em>, </td>
    376        </tr>
    377        <tr>
    378          <td class="paramkey"></td>
    379          <td></td>
    380          <td class="paramtype">char *&#160;</td>
    381          <td class="paramname"><em>s</em>, </td>
    382        </tr>
    383        <tr>
    384          <td class="paramkey"></td>
    385          <td></td>
    386          <td class="paramtype">unsigned char&#160;</td>
    387          <td class="paramname"><em>radix</em>&#160;</td>
    388        </tr>
    389        <tr>
    390          <td></td>
    391          <td>)</td>
    392          <td></td><td></td>
    393        </tr>
    394      </table>
    395</div><div class="memdoc">
    396<p>Converts a long into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
    397  <table class="params">
    398    <tr><td class="paramname">n</td><td>Long int to convert to a string </td></tr>
    399    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    400    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
    401  </table>
    402  </dd>
    403</dl>
    404<p>Returns: Pointer to converted string </p>
    405
    406</div>
    407</div>
    408<a id="ac22b79fe0c1279eabc3daf57328008d2"></a>
    409<h2 class="memtitle"><span class="permalink"><a href="#ac22b79fe0c1279eabc3daf57328008d2">&#9670;&nbsp;</a></span>ultoa()</h2>
    410
    411<div class="memitem">
    412<div class="memproto">
    413      <table class="memname">
    414        <tr>
    415          <td class="memname">char* ultoa </td>
    416          <td>(</td>
    417          <td class="paramtype">unsigned long&#160;</td>
    418          <td class="paramname"><em>n</em>, </td>
    419        </tr>
    420        <tr>
    421          <td class="paramkey"></td>
    422          <td></td>
    423          <td class="paramtype">char *&#160;</td>
    424          <td class="paramname"><em>s</em>, </td>
    425        </tr>
    426        <tr>
    427          <td class="paramkey"></td>
    428          <td></td>
    429          <td class="paramtype">unsigned char&#160;</td>
    430          <td class="paramname"><em>radix</em>&#160;</td>
    431        </tr>
    432        <tr>
    433          <td></td>
    434          <td>)</td>
    435          <td></td><td></td>
    436        </tr>
    437      </table>
    438</div><div class="memdoc">
    439<p>Converts an unsigned long into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
    440  <table class="params">
    441    <tr><td class="paramname">n</td><td>Unsigned Long Int to convert to a string </td></tr>
    442    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    443    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
    444  </table>
    445  </dd>
    446</dl>
    447<p>Returns: Pointer to converted string </p>
    448
    449</div>
    450</div>
    451<a id="a62b7798461bd461da64c5f9d35feddf7"></a>
    452<h2 class="memtitle"><span class="permalink"><a href="#a62b7798461bd461da64c5f9d35feddf7">&#9670;&nbsp;</a></span>calloc()</h2>
    453
    454<div class="memitem">
    455<div class="memproto">
    456      <table class="memname">
    457        <tr>
    458          <td class="memname">void* calloc </td>
    459          <td>(</td>
    460          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    461          <td class="paramname"><em>nmemb</em>, </td>
    462        </tr>
    463        <tr>
    464          <td class="paramkey"></td>
    465          <td></td>
    466          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    467          <td class="paramname"><em>size</em>&#160;</td>
    468        </tr>
    469        <tr>
    470          <td></td>
    471          <td>)</td>
    472          <td></td><td></td>
    473        </tr>
    474      </table>
    475</div><div class="memdoc">
    476<p>Memory allocation functions </p>
    477
    478</div>
    479</div>
    480<a id="a7ac38fce3243a7dcf448301ee9ffd392"></a>
    481<h2 class="memtitle"><span class="permalink"><a href="#a7ac38fce3243a7dcf448301ee9ffd392">&#9670;&nbsp;</a></span>malloc()</h2>
    482
    483<div class="memitem">
    484<div class="memproto">
    485      <table class="memname">
    486        <tr>
    487          <td class="memname">void* malloc </td>
    488          <td>(</td>
    489          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    490          <td class="paramname"><em>size</em></td><td>)</td>
    491          <td></td>
    492        </tr>
    493      </table>
    494</div><div class="memdoc">
    495
    496</div>
    497</div>
    498<a id="a1a6b5e8d2f1c37e5b43e4345586075be"></a>
    499<h2 class="memtitle"><span class="permalink"><a href="#a1a6b5e8d2f1c37e5b43e4345586075be">&#9670;&nbsp;</a></span>realloc()</h2>
    500
    501<div class="memitem">
    502<div class="memproto">
    503      <table class="memname">
    504        <tr>
    505          <td class="memname">void* realloc </td>
    506          <td>(</td>
    507          <td class="paramtype">void *&#160;</td>
    508          <td class="paramname"><em>ptr</em>, </td>
    509        </tr>
    510        <tr>
    511          <td class="paramkey"></td>
    512          <td></td>
    513          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    514          <td class="paramname"><em>size</em>&#160;</td>
    515        </tr>
    516        <tr>
    517          <td></td>
    518          <td>)</td>
    519          <td></td><td></td>
    520        </tr>
    521      </table>
    522</div><div class="memdoc">
    523
    524</div>
    525</div>
    526<a id="afbedc913aa4651b3c3b4b3aecd9b4711"></a>
    527<h2 class="memtitle"><span class="permalink"><a href="#afbedc913aa4651b3c3b4b3aecd9b4711">&#9670;&nbsp;</a></span>free()</h2>
    528
    529<div class="memitem">
    530<div class="memproto">
    531      <table class="memname">
    532        <tr>
    533          <td class="memname">void free </td>
    534          <td>(</td>
    535          <td class="paramtype">void *&#160;</td>
    536          <td class="paramname"><em>ptr</em></td><td>)</td>
    537          <td></td>
    538        </tr>
    539      </table>
    540</div><div class="memdoc">
    541
    542</div>
    543</div>
    544<a id="ab0ace018fe7dfa1720930d2dce0c45e3"></a>
    545<h2 class="memtitle"><span class="permalink"><a href="#ab0ace018fe7dfa1720930d2dce0c45e3">&#9670;&nbsp;</a></span>bsearch()</h2>
    546
    547<div class="memitem">
    548<div class="memproto">
    549      <table class="memname">
    550        <tr>
    551          <td class="memname">void* bsearch </td>
    552          <td>(</td>
    553          <td class="paramtype">const void *&#160;</td>
    554          <td class="paramname"><em>key</em>, </td>
    555        </tr>
    556        <tr>
    557          <td class="paramkey"></td>
    558          <td></td>
    559          <td class="paramtype">const void *&#160;</td>
    560          <td class="paramname"><em>base</em>, </td>
    561        </tr>
    562        <tr>
    563          <td class="paramkey"></td>
    564          <td></td>
    565          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    566          <td class="paramname"><em>nmemb</em>, </td>
    567        </tr>
    568        <tr>
    569          <td class="paramkey"></td>
    570          <td></td>
    571          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    572          <td class="paramname"><em>size</em>, </td>
    573        </tr>
    574        <tr>
    575          <td class="paramkey"></td>
    576          <td></td>
    577          <td class="paramtype">int(*)(const void *, const void *) <a class="el" href="stdlib_8h.html#a83798998ad669e85a8f75d6490191760">__reentrant</a>&#160;</td>
    578          <td class="paramname"><em>compar</em>&#160;</td>
    579        </tr>
    580        <tr>
    581          <td></td>
    582          <td>)</td>
    583          <td></td><td></td>
    584        </tr>
    585      </table>
    586</div><div class="memdoc">
    587<p>search a sorted array of <b>nmemb</b> items </p><dl class="params"><dt>Parameters</dt><dd>
    588  <table class="params">
    589    <tr><td class="paramname">key</td><td>Pointer to object that is the key for the search </td></tr>
    590    <tr><td class="paramname">base</td><td>Pointer to first object in the array to search </td></tr>
    591    <tr><td class="paramname">nmemb</td><td>Number of elements in the array </td></tr>
    592    <tr><td class="paramname">size</td><td>Size in bytes of each element in the array </td></tr>
    593    <tr><td class="paramname">compar</td><td>Function used to compare two elements of the array</td></tr>
    594  </table>
    595  </dd>
    596</dl>
    597<p>Returns: Pointer to array entry that matches the search key. If key is not found, NULL is returned. </p>
    598
    599</div>
    600</div>
    601<a id="a02d9d6443b9e613802b2e9c5c71caf59"></a>
    602<h2 class="memtitle"><span class="permalink"><a href="#a02d9d6443b9e613802b2e9c5c71caf59">&#9670;&nbsp;</a></span>qsort()</h2>
    603
    604<div class="memitem">
    605<div class="memproto">
    606      <table class="memname">
    607        <tr>
    608          <td class="memname">void qsort </td>
    609          <td>(</td>
    610          <td class="paramtype">void *&#160;</td>
    611          <td class="paramname"><em>base</em>, </td>
    612        </tr>
    613        <tr>
    614          <td class="paramkey"></td>
    615          <td></td>
    616          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    617          <td class="paramname"><em>nmemb</em>, </td>
    618        </tr>
    619        <tr>
    620          <td class="paramkey"></td>
    621          <td></td>
    622          <td class="paramtype"><a class="el" href="asm_2gbz80_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
    623          <td class="paramname"><em>size</em>, </td>
    624        </tr>
    625        <tr>
    626          <td class="paramkey"></td>
    627          <td></td>
    628          <td class="paramtype">int(*)(const void *, const void *) <a class="el" href="stdlib_8h.html#a83798998ad669e85a8f75d6490191760">__reentrant</a>&#160;</td>
    629          <td class="paramname"><em>compar</em>&#160;</td>
    630        </tr>
    631        <tr>
    632          <td></td>
    633          <td>)</td>
    634          <td></td><td></td>
    635        </tr>
    636      </table>
    637</div><div class="memdoc">
    638<p>Sort an array of <b>nmemb</b> items </p><dl class="params"><dt>Parameters</dt><dd>
    639  <table class="params">
    640    <tr><td class="paramname">base</td><td>Pointer to first object in the array to sort </td></tr>
    641    <tr><td class="paramname">nmemb</td><td>Number of elements in the array </td></tr>
    642    <tr><td class="paramname">size</td><td>Size in bytes of each element in the array </td></tr>
    643    <tr><td class="paramname">compar</td><td>Function used to compare and sort two elements of the array </td></tr>
    644  </table>
    645  </dd>
    646</dl>
    647
    648</div>
    649</div>
    650</div><!-- contents -->
    651</div><!-- doc-content -->
    652<div class="ttc" id="agb_8h_html_a0a3d95ad0ab8ad213016101d2e9c3d3e"><div class="ttname"><a href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a></div><div class="ttdeci">void d</div><div class="ttdef"><b>Definition:</b> gb.h:608</div></div>
    653<!-- HTML footer for doxygen 1.8.14-->
    654<!-- start footer part -->
    655<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    656</div>
    657</body>
    658</html>