/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Unfortunate hack to test if the buffer has been Init()ialized
*/
int
-MemBuf::isNull()
+MemBuf::isNull() const
{
if (!buf && !max_capacity && !capacity && !size)
return 1; /* is null (not initialized) */
* calls memcpy, appends exactly size bytes,
* extends buffer or creates buffer if needed.
*/
-void MemBuf::append(const char *newContent, mb_size_t sz)
+void MemBuf::append(const char *newContent, int sz)
{
assert(sz >= 0);
assert(buf || (0==capacity && 0==size));
*space() = '\0';
}
-/* calls memBufVPrintf */
-void
-MemBuf::Printf(const char *fmt,...)
-{
- va_list args;
- va_start(args, fmt);
- vappendf(fmt, args);
- va_end(args);
-}
-
/**
* vappendf for other printf()'s to use; calls vsnprintf, extends buf if needed
*/
memBufReport(MemBuf * mb)
{
assert(mb);
- mb->Printf("memBufReport is not yet implemented @?@\n");
+ mb->appendf("memBufReport is not yet implemented @?@\n");
}