Go to the documentation of this file.
37 for (j =
i - 1; j > 0; j--)
38 p[j] = p[j] + p[j - 1];
39 for (j = 0; j <=
i; j++)
49 struct tm testtime = { .tm_year = 100, .tm_mon = 11, .tm_mday = 20 };
53 printf(
"Short text in unlimited buffer: %u/%u\n", (
unsigned)strlen(
b.str),
b.len);
59 printf(
"Long text in unlimited buffer: %u/%u\n", (
unsigned)strlen(
b.str),
b.len);
64 printf(
"Long text in limited buffer: %u/%u\n", (
unsigned)strlen(
b.str),
b.len);
69 printf(
"Short text in automatic buffer: %u/%u\n", (
unsigned)strlen(
b.str),
b.len);
73 printf(
"Long text in automatic buffer: %u/%u\n", (
unsigned)strlen(
b.str)/8*8,
b.len);
78 printf(
"Long text count only buffer: %u/%u\n", (
unsigned)strlen(
b.str),
b.len);
82 printf(
"Long text count only buffer: %u/%u\n", (
unsigned)strlen(buf),
b.len);
86 printf(
"strftime full: %u/%u \"%s\"\n", (
unsigned)strlen(buf),
b.len,
b.str);
91 printf(
"strftime truncated: %u/%u \"%s\"\n", (
unsigned)strlen(buf),
b.len,
b.str);
#define AV_BPRINT_SIZE_UNLIMITED
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm)
Append a formatted date and time to a print buffer.
#define AV_BPRINT_SIZE_COUNT_ONLY
#define AV_BPRINT_SIZE_AUTOMATIC
#define FF_ARRAY_ELEMS(a)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static void bprint_pascal(AVBPrint *b, unsigned size)
printf("static const uint8_t my_array[100] = {\n")
void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size)
Init a print buffer using a pre-existing buffer.
#define i(width, name, range_min, range_max)
void av_bprintf(AVBPrint *buf, const char *fmt,...)