*/
#include "includes.h"
-RCSID("$Id: buffer.c,v 1.4 1999/11/24 19:53:44 markus Exp $");
+RCSID("$Id: buffer.c,v 1.5 2000/04/12 10:22:38 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
buffer_get(Buffer *buffer, char *buf, unsigned int len)
{
if (len > buffer->end - buffer->offset)
- fatal("buffer_get trying to get more bytes than in buffer");
+ fatal("buffer_get: trying to get more bytes than in buffer");
memcpy(buf, buffer->buf + buffer->offset, len);
buffer->offset += len;
}
buffer_consume(Buffer *buffer, unsigned int bytes)
{
if (bytes > buffer->end - buffer->offset)
- fatal("buffer_get trying to get more bytes than in buffer");
+ fatal("buffer_consume: trying to get more bytes than in buffer");
buffer->offset += bytes;
}
buffer_consume_end(Buffer *buffer, unsigned int bytes)
{
if (bytes > buffer->end - buffer->offset)
- fatal("buffer_get trying to get more bytes than in buffer");
+ fatal("buffer_consume_end: trying to get more bytes than in buffer");
buffer->end -= bytes;
}