<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2015-04-16 00:35:09 +0900 (Thu, 16 Apr 2015)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4">2f4eb82d4f845a187b3af6190b02abd64307e1c4</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Support formatted size is larger case</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#diff-0">lib/str.c</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/str.c (+12 -3)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2084">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2085">2085</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2086">2086</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2087">2087</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2088">2088</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2089">2089</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2090">2090</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2091">2091</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2092">2092</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2093">2093</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2094">2094</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2095">2095</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0L2096">2096</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2084">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2085">2085</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2086">2086</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2087">2087</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2088">2088</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2089">2089</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2090">2090</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2091">2091</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2092">2092</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2093">2093</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2094">2094</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2095">2095</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2096">2096</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2097">2097</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2098">2098</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2099">2099</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2100">2100</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2101">2101</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2102">2102</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2103">2103</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2104">2104</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/2f4eb82d4f845a187b3af6190b02abd64307e1c4#L0R2105">2105</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -2085,12 +2085,21 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">ftoa_(grn_ctx *ctx, grn_obj *buf, double d)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> char *curr;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> size_t len;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define DIGIT_NUMBER 15</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- grn_bulk_reserve(ctx, buf, DIGIT_NUMBER + 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+#define FIRST_BUFFER_SIZE (DIGIT_NUMBER + 3)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ grn_bulk_reserve(ctx, buf, FIRST_BUFFER_SIZE);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> curr = GRN_BULK_CURR(buf);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> len = grn_snprintf(curr,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- DIGIT_NUMBER + 1,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- DIGIT_NUMBER + 1,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ FIRST_BUFFER_SIZE,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ FIRST_BUFFER_SIZE,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "%#.*g", DIGIT_NUMBER, d);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (len >= FIRST_BUFFER_SIZE) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ grn_bulk_reserve(ctx, buf, len + 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ curr = GRN_BULK_CURR(buf);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ len = grn_snprintf(curr,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ len + 1,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ len + 1,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "%#.*g", DIGIT_NUMBER, d);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #undef DIGIT_NUMBER</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (curr[len - 1] == '.') {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_BULK_INCR_LEN(buf, len);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>