<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Roger L Costello via Unicode wrote:<br>
</div>
<blockquote type="cite" cite="mid:SA0PR09MB690790C12F29D4C7AC9DF663C8C70@SA0PR09MB6907.namprd09.prod.outlook.com">
<pre wrap="">[…]
2. The C function atoi() converts a string of digits to a number. I have seen the source code for atoi(). The source code that I saw was dated around the year 2000. Can you point me to the modern source code for atoi()?
/Roger
</pre>
</blockquote>
<br>
<br>
Here is the implementation from the FreeBSD libc:
<a class="moz-txt-link-freetext" href="https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtol.c">https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtol.c</a><br>
<br>
(<code>strtol</code> and <code>strtol_l</code> are defined in that
source file. <code>atoi</code> and <code>atoi_l</code> just wrap
them<span class="pl-en">, passing <code>NULL</code> for <code>endptr</code>
and <code>10</code> for <code>base</code>.)<br>
<br>
—Har.<br>
</span>
</body>
</html>