strbuf_setlen(sb, sb->len + sb2->len);
}
-void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len)
-{
- strbuf_grow(sb, len);
- memcpy(sb->buf + sb->len, sb->buf + pos, len);
- strbuf_setlen(sb, sb->len + len);
-}
-
void strbuf_addchars(struct strbuf *sb, int c, size_t n)
{
strbuf_grow(sb, n);
}
void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
- int tz_offset, const char *tz_name)
+ int tz_offset, int suppress_tz_name)
{
struct strbuf munged_fmt = STRBUF_INIT;
size_t hint = 128;
fmt++;
break;
case 'Z':
- if (tz_name) {
- strbuf_addstr(&munged_fmt, tz_name);
+ if (suppress_tz_name) {
fmt++;
break;
}