str.c revision 8e361d2906b0e44f7175a20981f8d2280645b58b
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "printf-format-fix.h"
#include "str.h"
#include <stdio.h>
{
}
{
return ret;
}
{
}
{
}
{
}
{
/* remove the \0 - we don't want to keep it */
}
}
{
str_add_nul(*str);
return buffer_free_without_data(str);
}
{
}
{
}
{
}
{
return buffer_get_used_size(str);
}
{
return FALSE;
}
{
}
{
len = 0;
len++;
}
{
}
{
const char *cstr;
}
{
}
{
#define SNPRINTF_INITIAL_EXTRA_SIZE 256
char *tmp;
unsigned int init_size;
/* the format string is modified only if %m exists in it. it happens
only in error conditions, so don't try to t_push() here since it'll
just slow down the normal code path. */
/* @UNSAFE */
/* didn't fit with the first guess. now we know the size,
so try again. */
}
/* drop the unused data, including terminating NUL */
}
{
}
{
}
{
}