<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanakaBox</author_name>
  <author_url>https://blog.hatena.ne.jp/tanakaBox/</author_url>
  <blog_title>ボクノス</blog_title>
  <blog_url>https://boxnos.hatenablog.com/</blog_url>
  <categories>
    <anon>GCC</anon>
  </categories>
  <description>16進文字列を数値に変換するhtoiを実装せよ。0xのある場合も考慮しなければならない。という問題。GCC拡張のcase 'a' ... 'f'を使ってみた。 #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int htoi(char *s) { unsigned int i = 0; int tmp; if (*s == '0' &amp;&amp; *(s + 1) == 'x') s += 2; for (; *s != '\0'; s++) { tmp = i * 16 + *s; switch(*s) { default: return (int) i; case 'a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20070811%2F1186840959&quot; title=&quot; K&amp;amp;Rを読もう(27) 問題2-3 htoi - ボクノス&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-08-11 23:02:39</published>
  <title> K&amp;Rを読もう(27) 問題2-3 htoi</title>
  <type>rich</type>
  <url>https://boxnos.hatenablog.com/entry/20070811/1186840959</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
