(apl_ent.family == 2 && apl_ent.prefix < 128))
{
isc_buffer_putuint8(aclb, '/');
- isc_buffer_putdecint(aclb, apl_ent.prefix);
+ isc_buffer_printf(aclb, "%" PRId8, apl_ent.prefix);
}
isc_buffer_putstr(aclb, "; ");
}
b->used = length;
}
-void
-isc_buffer_putdecint(isc_buffer_t *b, int64_t v) {
- unsigned int l = 0;
- unsigned char *cp;
- char buf[21];
- isc_result_t result;
-
- REQUIRE(ISC_BUFFER_VALID(b));
-
- /* xxxwpk do it more low-level way ? */
- l = snprintf(buf, 21, "%" PRId64, v);
- RUNTIME_CHECK(l <= 21);
- if (b->autore) {
- result = isc_buffer_reserve(b, l);
- REQUIRE(result == ISC_R_SUCCESS);
- }
- REQUIRE(isc_buffer_availablelength(b) >= l);
-
- cp = isc_buffer_used(b);
- memmove(cp, buf, l);
- b->used += l;
-}
-
isc_result_t
isc_buffer_dup(isc_mem_t *mctx, isc_buffer_t **dstp, const isc_buffer_t *src) {
isc_buffer_t *dst = NULL;
*\li The used pointer in 'b' is advanced by 'length'.
*/
-void
-isc_buffer_putdecint(isc_buffer_t *b, int64_t v);
-/*!<
- * \brief Put decimal representation of 'v' in b
- *
- * Requires:
- *\li 'b' is a valid buffer.
- *
- *\li The length of the available region of 'b' is at least strlen(dec('v'))
- * or the buffer has autoreallocation enabled.
- *
- * Ensures:
- *\li The used pointer in 'b' is advanced by strlen(dec('v')).
- */
-
isc_result_t
isc_buffer_copyregion(isc_buffer_t *b, const isc_region_t *r);
/*!<