2020-07-31 22:16:11 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
2021-10-26 03:34:27 +08:00
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.9.2" / >
2020-07-31 22:16:11 +08:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > Algorithms_in_C: conversions/int_to_string.c File Reference< / title >
< link href = "../../tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "../../jquery.js" > < / script >
< script type = "text/javascript" src = "../../dynsections.js" > < / script >
< link href = "../../navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "../../resize.js" > < / script >
< script type = "text/javascript" src = "../../navtreedata.js" > < / script >
< script type = "text/javascript" src = "../../navtree.js" > < / script >
< link href = "../../search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "../../search/searchdata.js" > < / script >
< script type = "text/javascript" src = "../../search/search.js" > < / script >
< script type = "text/x-mathjax-config" >
2021-10-26 03:34:27 +08:00
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
2020-07-31 22:16:11 +08:00
});
< / script >
< script type = "text/javascript" async = "async" src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js" > < / script >
< link href = "../../doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
2021-10-26 03:34:27 +08:00
< div id = "projectname" > Algorithms_in_C< span id = "projectnumber" >   1.0.0< / span >
2020-07-31 22:16:11 +08:00
< / div >
< div id = "projectbrief" > Set of algorithms implemented in C.< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2021-10-26 03:34:27 +08:00
<!-- Generated by Doxygen 1.9.2 -->
2020-07-31 22:16:11 +08:00
< script type = "text/javascript" >
2021-10-26 03:34:27 +08:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
2020-07-31 22:16:11 +08:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "../../menudata.js" > < / script >
< script type = "text/javascript" src = "../../menu.js" > < / script >
< script type = "text/javascript" >
2021-10-26 03:34:27 +08:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2020-07-31 22:16:11 +08:00
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2021-10-26 03:34:27 +08:00
/* @license-end */
< / script >
2020-07-31 22:16:11 +08:00
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
2021-10-26 03:34:27 +08:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2020-07-31 22:16:11 +08:00
$(document).ready(function(){initNavTree('dd/d53/int__to__string_8c.html','../../'); initResizable(); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions< / a > < / div >
2021-10-26 03:34:27 +08:00
< div class = "headertitle" > < div class = "title" > int_to_string.c File Reference< / div > < / div >
2020-07-31 22:16:11 +08:00
< / div > <!-- header -->
< div class = "contents" >
< p > Convert a positive integer to string (non-standard function) representation.
< a href = "#details" > More...< / a > < / p >
< div class = "textblock" > < code > #include < assert.h> < / code > < br / >
< code > #include < inttypes.h> < / code > < br / >
< code > #include < stdio.h> < / code > < br / >
< code > #include < stdlib.h> < / code > < br / >
< code > #include < string.h> < / code > < br / >
< code > #include < time.h> < / code > < br / >
< / div > < div class = "textblock" > < div class = "dynheader" >
Include dependency graph for int_to_string.c:< / div >
< div class = "dyncontent" >
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "../../db/d37/int__to__string_8c__incl.svg" width = "531" height = "127" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe >
< / div >
< / div >
< / div > < table class = "memberdecls" >
2021-10-26 03:34:27 +08:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
2020-07-31 22:16:11 +08:00
Functions< / h2 > < / td > < / tr >
2021-10-26 03:34:27 +08:00
< tr class = "memitem:aeb4be1a1db1c5fea06e9d8b87e6c3973" > < td class = "memItemLeft" align = "right" valign = "top" > char *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > int_to_string< / a > (uint16_t value, char *dest, int base)< / td > < / tr >
< tr class = "memdesc:aeb4be1a1db1c5fea06e9d8b87e6c3973" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter. < a href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aeb4be1a1db1c5fea06e9d8b87e6c3973" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-07-31 22:16:11 +08:00
< tr class = "memitem:aa8dca7b867074164d5f45b0f3851269d" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d53/int__to__string_8c.html#aa8dca7b867074164d5f45b0f3851269d" > test< / a > ()< / td > < / tr >
< tr class = "memdesc:aa8dca7b867074164d5f45b0f3851269d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Test function. < a href = "../../dd/d53/int__to__string_8c.html#aa8dca7b867074164d5f45b0f3851269d" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aa8dca7b867074164d5f45b0f3851269d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2021-10-26 03:34:27 +08:00
< tr class = "memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d53/int__to__string_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4" > main< / a > ()< / td > < / tr >
< tr class = "memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Driver Code. < a href = "../../dd/d53/int__to__string_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4" > More...< / a > < br / > < / td > < / tr >
2020-07-31 22:16:11 +08:00
< tr class = "separator:ae66f6b31b5ad750f1fe042a706a4e3d4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
2021-10-26 03:34:27 +08:00
< div class = "textblock" > < p > Convert a positive integer to string (non-standard function) representation. < / p >
2020-07-31 22:16:11 +08:00
< / div > < h2 class = "groupheader" > Function Documentation< / h2 >
2021-10-26 03:34:27 +08:00
< a id = "aeb4be1a1db1c5fea06e9d8b87e6c3973" name = "aeb4be1a1db1c5fea06e9d8b87e6c3973" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aeb4be1a1db1c5fea06e9d8b87e6c3973" > ◆ < / a > < / span > int_to_string()< / h2 >
2020-07-31 22:16:11 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2021-10-26 03:34:27 +08:00
< td class = "memname" > char * int_to_string < / td >
2020-07-31 22:16:11 +08:00
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > value< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char *  < / td >
< td class = "paramname" > < em > dest< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > base< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > value< / td > < td > Value to be converted to a string. < / td > < / tr >
< tr > < td class = "paramname" > dest< / td > < td > pointer to array in memory to store the resulting null-terminated string. < / td > < / tr >
< tr > < td class = "paramname" > base< / td > < td > Numerical base used to represent the value as a string, between 2 and 16, where 10 means decimal base, 16 hexadecimal, 8 octal, and 2 binary. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the resulting null-terminated string, same as parameter str. < / dd > < / dl >
< dl class = "section note" > < dt > Note< / dt > < dd > The destination array must be pre-allocated by the calling function. < / dd > < / dl >
2021-10-26 03:34:27 +08:00
< div class = "fragment" > < div class = "line" > < a id = "l00026" name = "l00026" > < / a > < span class = "lineno" > 26< / span > {< / div >
< div class = "line" > < a id = "l00027" name = "l00027" > < / a > < span class = "lineno" > 27< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > char< / span > hex_table[] = {< span class = "charliteral" > ' 0' < / span > , < span class = "charliteral" > ' 1' < / span > , < span class = "charliteral" > ' 2' < / span > , < span class = "charliteral" > ' 3' < / span > , < span class = "charliteral" > ' 4' < / span > , < span class = "charliteral" > ' 5' < / span > , < span class = "charliteral" > ' 6' < / span > , < span class = "charliteral" > ' 7' < / span > ,< / div >
< div class = "line" > < a id = "l00028" name = "l00028" > < / a > < span class = "lineno" > 28< / span > < span class = "charliteral" > ' 8' < / span > , < span class = "charliteral" > ' 9' < / span > , < span class = "charliteral" > ' a' < / span > , < span class = "charliteral" > ' b' < / span > , < span class = "charliteral" > ' c' < / span > , < span class = "charliteral" > ' d' < / span > , < span class = "charliteral" > ' e' < / span > , < span class = "charliteral" > ' f' < / span > };< / div >
< div class = "line" > < a id = "l00029" name = "l00029" > < / a > < span class = "lineno" > 29< / span > < / div >
< div class = "line" > < a id = "l00030" name = "l00030" > < / a > < span class = "lineno" > 30< / span > < span class = "keywordtype" > int< / span > len = 0;< / div >
< div class = "line" > < a id = "l00031" name = "l00031" > < / a > < span class = "lineno" > 31< / span > < span class = "keywordflow" > do< / span > < / div >
< div class = "line" > < a id = "l00032" name = "l00032" > < / a > < span class = "lineno" > 32< / span > {< / div >
< div class = "line" > < a id = "l00033" name = "l00033" > < / a > < span class = "lineno" > 33< / span > dest[len++] = hex_table[value % base];< / div >
< div class = "line" > < a id = "l00034" name = "l00034" > < / a > < span class = "lineno" > 34< / span > value /= base;< / div >
< div class = "line" > < a id = "l00035" name = "l00035" > < / a > < span class = "lineno" > 35< / span > } < span class = "keywordflow" > while< / span > (value != 0);< / div >
< div class = "line" > < a id = "l00036" name = "l00036" > < / a > < span class = "lineno" > 36< / span > < / div >
< div class = "line" > < a id = "l00037" name = "l00037" > < / a > < span class = "lineno" > 37< / span > < span class = "comment" > /* reverse characters */< / span > < / div >
< div class = "line" > < a id = "l00038" name = "l00038" > < / a > < span class = "lineno" > 38< / span > < span class = "keywordflow" > for< / span > (< span class = "keywordtype" > int< / span > i = 0, limit = len / 2; i < limit; ++i)< / div >
< div class = "line" > < a id = "l00039" name = "l00039" > < / a > < span class = "lineno" > 39< / span > {< / div >
< div class = "line" > < a id = "l00040" name = "l00040" > < / a > < span class = "lineno" > 40< / span > < span class = "keywordtype" > char< / span > t = dest[i];< / div >
< div class = "line" > < a id = "l00041" name = "l00041" > < / a > < span class = "lineno" > 41< / span > dest[i] = dest[len - 1 - i];< / div >
< div class = "line" > < a id = "l00042" name = "l00042" > < / a > < span class = "lineno" > 42< / span > dest[len - 1 - i] = t;< / div >
< div class = "line" > < a id = "l00043" name = "l00043" > < / a > < span class = "lineno" > 43< / span > }< / div >
< div class = "line" > < a id = "l00044" name = "l00044" > < / a > < span class = "lineno" > 44< / span > dest[len] = < span class = "charliteral" > ' \0' < / span > ;< / div >
< div class = "line" > < a id = "l00045" name = "l00045" > < / a > < span class = "lineno" > 45< / span > < span class = "keywordflow" > return< / span > dest;< / div >
< div class = "line" > < a id = "l00046" name = "l00046" > < / a > < span class = "lineno" > 46< / span > }< / div >
2020-07-31 22:16:11 +08:00
< / div > <!-- fragment -->
< / div >
< / div >
2021-10-26 03:34:27 +08:00
< a id = "ae66f6b31b5ad750f1fe042a706a4e3d4" name = "ae66f6b31b5ad750f1fe042a706a4e3d4" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ae66f6b31b5ad750f1fe042a706a4e3d4" > ◆ < / a > < / span > main()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int main < / td >
< td > (< / td >
< td class = "paramtype" > void  < / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Driver Code. < / p >
< div class = "fragment" > < div class = "line" > < a id = "l00078" name = "l00078" > < / a > < span class = "lineno" > 78< / span > {< / div >
< div class = "line" > < a id = "l00079" name = "l00079" > < / a > < span class = "lineno" > 79< / span > < span class = "comment" > /* Intializes random number generator */< / span > < / div >
< div class = "line" > < a id = "l00080" name = "l00080" > < / a > < span class = "lineno" > 80< / span > srand(time(NULL));< / div >
< div class = "line" > < a id = "l00081" name = "l00081" > < / a > < span class = "lineno" > 81< / span > < a class = "code hl_function" href = "../../dd/d53/int__to__string_8c.html#aa8dca7b867074164d5f45b0f3851269d" > test< / a > ();< / div >
< div class = "line" > < a id = "l00082" name = "l00082" > < / a > < span class = "lineno" > 82< / span > < span class = "keywordflow" > return< / span > 0;< / div >
< div class = "line" > < a id = "l00083" name = "l00083" > < / a > < span class = "lineno" > 83< / span > }< / div >
< div class = "ttc" id = "aint__to__string_8c_html_aa8dca7b867074164d5f45b0f3851269d" > < div class = "ttname" > < a href = "../../dd/d53/int__to__string_8c.html#aa8dca7b867074164d5f45b0f3851269d" > test< / a > < / div > < div class = "ttdeci" > static void test()< / div > < div class = "ttdoc" > Test function.< / div > < div class = "ttdef" > < b > Definition:< / b > int_to_string.c:51< / div > < / div >
< / div > <!-- fragment --> < div class = "dynheader" >
Here is the call graph for this function:< / div >
< div class = "dyncontent" >
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "../../dd/d53/int__to__string_8c_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width = "296" height = "38" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe >
< / div >
< / div >
< / div >
< / div >
< a id = "aa8dca7b867074164d5f45b0f3851269d" name = "aa8dca7b867074164d5f45b0f3851269d" > < / a >
2020-07-31 22:16:11 +08:00
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aa8dca7b867074164d5f45b0f3851269d" > ◆ < / a > < / span > test()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > static void test < / td >
< td > (< / td >
2020-08-27 00:14:44 +08:00
< td class = "paramtype" > void  < / td >
2020-07-31 22:16:11 +08:00
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Test function. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > < code > void< / code > < / dd > < / dl >
2021-10-26 03:34:27 +08:00
< div class = "fragment" > < div class = "line" > < a id = "l00052" name = "l00052" > < / a > < span class = "lineno" > 52< / span > {< / div >
< div class = "line" > < a id = "l00053" name = "l00053" > < / a > < span class = "lineno" > 53< / span > < span class = "keyword" > const< / span > < span class = "keywordtype" > int< / span > < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > = 100;< / div >
< div class = "line" > < a id = "l00054" name = "l00054" > < / a > < span class = "lineno" > 54< / span > < span class = "keywordtype" > char< / span > *str1 = (< span class = "keywordtype" > char< / span > *)< a class = "code hl_define" href = "../../d2/ddd/malloc__dbg_8h.html#afdddaa949a93c1ef559a638e98f9c21b" > calloc< / a > (< span class = "keyword" > sizeof< / span > (< span class = "keywordtype" > char< / span > ), < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > );< / div >
< div class = "line" > < a id = "l00055" name = "l00055" > < / a > < span class = "lineno" > 55< / span > < span class = "keywordtype" > char< / span > *str2 = (< span class = "keywordtype" > char< / span > *)< a class = "code hl_define" href = "../../d2/ddd/malloc__dbg_8h.html#afdddaa949a93c1ef559a638e98f9c21b" > calloc< / a > (< span class = "keyword" > sizeof< / span > (< span class = "keywordtype" > char< / span > ), < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > );< / div >
< div class = "line" > < a id = "l00056" name = "l00056" > < / a > < span class = "lineno" > 56< / span > < / div >
< div class = "line" > < a id = "l00057" name = "l00057" > < / a > < span class = "lineno" > 57< / span > < span class = "keywordflow" > for< / span > (< span class = "keywordtype" > int< / span > i = 1; i < = 100; ++i) < span class = "comment" > /* test 100 random numbers */< / span > < / div >
< div class = "line" > < a id = "l00058" name = "l00058" > < / a > < span class = "lineno" > 58< / span > {< / div >
< div class = "line" > < a id = "l00059" name = "l00059" > < / a > < span class = "lineno" > 59< / span > < span class = "comment" > /* Generate value from 0 to 100 */< / span > < / div >
< div class = "line" > < a id = "l00060" name = "l00060" > < / a > < span class = "lineno" > 60< / span > < span class = "keywordtype" > int< / span > value = rand() % 100;< / div >
< div class = "line" > < a id = "l00061" name = "l00061" > < / a > < span class = "lineno" > 61< / span > < / div >
< div class = "line" > < a id = "l00062" name = "l00062" > < / a > < span class = "lineno" > 62< / span > < span class = "comment" > // assert(strcmp(itoa(value, str1, 2), int_to_string(value, str2, 2)) ==< / span > < / div >
< div class = "line" > < a id = "l00063" name = "l00063" > < / a > < span class = "lineno" > 63< / span > < span class = "comment" > // 0);< / span > < / div >
< div class = "line" > < a id = "l00064" name = "l00064" > < / a > < span class = "lineno" > 64< / span > snprintf(str1, < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > , < span class = "stringliteral" > " %o" < / span > , value); < span class = "comment" > //* standard C - to octal */< / span > < / div >
< div class = "line" > < a id = "l00065" name = "l00065" > < / a > < span class = "lineno" > 65< / span > assert(strcmp(str1, < a class = "code hl_function" href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > int_to_string< / a > (value, str2, 8)) == 0);< / div >
< div class = "line" > < a id = "l00066" name = "l00066" > < / a > < span class = "lineno" > 66< / span > snprintf(str1, < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > , < span class = "stringliteral" > " %d" < / span > , value); < span class = "comment" > /* standard C - to decimal */< / span > < / div >
< div class = "line" > < a id = "l00067" name = "l00067" > < / a > < span class = "lineno" > 67< / span > assert(strcmp(str1, < a class = "code hl_function" href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > int_to_string< / a > (value, str2, 10)) == 0);< / div >
< div class = "line" > < a id = "l00068" name = "l00068" > < / a > < span class = "lineno" > 68< / span > snprintf(str1, < a class = "code hl_variable" href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > , < span class = "stringliteral" > " %x" < / span > , value); < span class = "comment" > /* standard C - to hexadecimal */< / span > < / div >
< div class = "line" > < a id = "l00069" name = "l00069" > < / a > < span class = "lineno" > 69< / span > assert(strcmp(str1, < a class = "code hl_function" href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > int_to_string< / a > (value, str2, 16)) == 0);< / div >
< div class = "line" > < a id = "l00070" name = "l00070" > < / a > < span class = "lineno" > 70< / span > }< / div >
< div class = "line" > < a id = "l00071" name = "l00071" > < / a > < span class = "lineno" > 71< / span > < / div >
< div class = "line" > < a id = "l00072" name = "l00072" > < / a > < span class = "lineno" > 72< / span > < a class = "code hl_define" href = "../../d2/ddd/malloc__dbg_8h.html#a9cc854374299a1dd933bf62029761768" > free< / a > (str1);< / div >
< div class = "line" > < a id = "l00073" name = "l00073" > < / a > < span class = "lineno" > 73< / span > < a class = "code hl_define" href = "../../d2/ddd/malloc__dbg_8h.html#a9cc854374299a1dd933bf62029761768" > free< / a > (str2);< / div >
< div class = "line" > < a id = "l00074" name = "l00074" > < / a > < span class = "lineno" > 74< / span > }< / div >
< div class = "ttc" id = "aint__to__string_8c_html_aeb4be1a1db1c5fea06e9d8b87e6c3973" > < div class = "ttname" > < a href = "../../dd/d53/int__to__string_8c.html#aeb4be1a1db1c5fea06e9d8b87e6c3973" > int_to_string< / a > < / div > < div class = "ttdeci" > char * int_to_string(uint16_t value, char *dest, int base)< / div > < div class = "ttdoc" > Converts an integer value to a null-terminated string using the specified base and stores the result ...< / div > < div class = "ttdef" > < b > Definition:< / b > int_to_string.c:25< / div > < / div >
2021-02-18 06:41:16 +08:00
< div class = "ttc" id = "amalloc__dbg_8h_html_a9cc854374299a1dd933bf62029761768" > < div class = "ttname" > < a href = "../../d2/ddd/malloc__dbg_8h.html#a9cc854374299a1dd933bf62029761768" > free< / a > < / div > < div class = "ttdeci" > #define free(ptr)< / div > < div class = "ttdoc" > This macro replace the standard free function with free_dbg.< / div > < div class = "ttdef" > < b > Definition:< / b > malloc_dbg.h:26< / div > < / div >
< div class = "ttc" id = "amalloc__dbg_8h_html_afdddaa949a93c1ef559a638e98f9c21b" > < div class = "ttname" > < a href = "../../d2/ddd/malloc__dbg_8h.html#afdddaa949a93c1ef559a638e98f9c21b" > calloc< / a > < / div > < div class = "ttdeci" > #define calloc(elemCount, elemSize)< / div > < div class = "ttdoc" > This macro replace the standard calloc function with calloc_dbg.< / div > < div class = "ttdef" > < b > Definition:< / b > malloc_dbg.h:22< / div > < / div >
2021-02-06 03:52:57 +08:00
< div class = "ttc" id = "aprime__seive_8c_html_ac1215a37edfa07d37edf6ec65f2235c7" > < div class = "ttname" > < a href = "../../db/dd5/prime__seive_8c.html#ac1215a37edfa07d37edf6ec65f2235c7" > MAX_SIZE< / a > < / div > < div class = "ttdeci" > const unsigned long long MAX_SIZE< / div > < div class = "ttdoc" > for assert for standard input output for general purpose standard library< / div > < div class = "ttdef" > < b > Definition:< / b > prime_seive.c:11< / div > < / div >
2020-07-31 22:16:11 +08:00
< / div > <!-- fragment --> < div class = "dynheader" >
Here is the call graph for this function:< / div >
< div class = "dyncontent" >
2021-10-26 03:34:27 +08:00
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "../../dd/d53/int__to__string_8c_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width = "198" height = "38" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe >
2020-07-31 22:16:11 +08:00
< / div >
< / div >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "../../dir_9babc524d57e25f3d9f4179cabc3599e.html" > conversions< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../dd/d53/int__to__string_8c.html" > int_to_string.c< / a > < / li >
2021-10-26 03:34:27 +08:00
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "../../doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.2 < / li >
2020-07-31 22:16:11 +08:00
< / ul >
< / div >
< / body >
< / html >