Lines Matching refs:room
36 static int av_bprint_alloc(AVBPrint *buf, unsigned room)
45 min_size = buf->len + 1 + FFMIN(UINT_MAX - buf->len - 1, room);
96 unsigned room;
102 room = av_bprint_room(buf);
103 dst = room ? buf->str + buf->len : NULL;
105 extra_len = vsnprintf(dst, room, fmt, vl);
109 if (extra_len < room)
119 unsigned room;
125 room = av_bprint_room(buf);
126 dst = room ? buf->str + buf->len : NULL;
128 extra_len = vsnprintf(dst, room, fmt, vl);
132 if (extra_len < room)
142 unsigned room, real_n;
145 room = av_bprint_room(buf);
146 if (n < room)
151 if (room) {
152 real_n = FFMIN(n, room - 1);
160 unsigned room, real_n;
163 room = av_bprint_room(buf);
164 if (size < room)
169 if (room) {
170 real_n = FFMIN(size, room - 1);
178 unsigned room;
184 room = av_bprint_room(buf);
185 if (room && (l = strftime(buf->str + buf->len, room, fmt, tm)))
187 /* strftime does not tell us how much room it would need: let us
189 room = !room ? strlen(fmt) + 1 :
190 room <= INT_MAX / 2 ? room * 2 : INT_MAX;
191 if (av_bprint_alloc(buf, room)) {
193 room = av_bprint_room(buf);
194 if (room < 1024) {
204 if (room) {
208 memset(buf->str + buf->len, '!', room);
209 memcpy(buf->str + buf->len, txt, FFMIN(sizeof(txt) - 1, room));
210 av_bprint_grow(buf, room); /* force truncation */