str.c revision cd466fe7b84b0223735a6469c7f7bc225f65996d
/* Copyright (c) 2002-2003 Timo Sirainen */
#include "lib.h"
#include "buffer.h"
#include "printf-upper-bound.h"
#include "str.h"
#include <stdio.h>
{
}
{
}
{
}
{
/* no space - doesn't happen with our dynamically growing
strings though, but make sure it's \0 terminated. */
if (len == 0)
return FALSE;
len--;
i_panic("BUG in str_c()");
}
/* remove the \0 - we don't want to keep it */
return TRUE;
}
{
if (!str_add_nul(str))
return "";
}
{
}
{
if (!str_add_nul(str))
return NULL;
}
{
return buffer_get_used_size(str);
}
{
}
{
len = 0;
len++;
}
{
}
{
const char *cstr;
}
{
}
{
char *buf;
int ret;
#ifdef HAVE_VSNPRINTF
#else
#endif
}
{
}
{
}