/*
- * Copyright (c) 1995-1999, Index Data.
+ * Copyright (c) 1995-2000, Index Data.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: wrbuf.c,v $
- * Revision 1.6 1999-10-28 11:36:40 adam
+ * Revision 1.9 2000-02-29 13:44:55 adam
+ * Check for config.h (currently not generated).
+ *
+ * Revision 1.8 1999/11/30 13:47:12 adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7 1999/11/03 09:05:56 adam
+ * Implemented wrbuf_puts.
+ *
+ * Revision 1.6 1999/10/28 11:36:40 adam
* wrbuf_write allows zero buffer length.
*
* Revision 1.5 1999/08/27 09:40:32 adam
* Growing buffer for writing various stuff.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
-#include <wrbuf.h>
+#include <yaz/wrbuf.h>
WRBUF wrbuf_alloc(void)
{
b->pos += size;
return 0;
}
+
+int wrbuf_puts(WRBUF b, const char *buf)
+{
+ wrbuf_write(b, buf, strlen(buf)+1); /* '\0'-terminate as well */
+ (b->pos)--; /* don't include '\0' in count */
+ return 0;
+}