/* $Id: buffer.h,v 1.1 2004/10/24 21:25:35 jonz Exp $ */

/*
 DSPAM
 COPYRIGHT (C) 2002-2004 NETWORK DWEEBS CORPORATION

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

/* buffer: dynamic character string operations */

#ifndef _BUFFER_H
#define _BUFFER_H

/* buffer object */
typedef struct
{
  long	size;
  long	used;
  char *data;
} buffer;

/* constructor and destructor */
buffer *buffer_create	(const char *);
void	buffer_destroy	(buffer *);

/* public buffer functions */
int buffer_copy		(buffer *, const char *);
int buffer_cat		(buffer *, const char *);
int buffer_clear	(buffer *);

#endif /* _BUFFER_H */
