From 3e1df877417c7d6acaffb3d070953644709785ce Mon Sep 17 00:00:00 2001 From: borutr Date: Fri, 11 Apr 2003 07:48:02 +0000 Subject: [PATCH] update to version 1.1.1 - re-added C++ stuff to make it still more portable git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2505 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- support/Util/dbuf.c | 4 ++-- support/Util/dbuf.h | 33 +++++++++++++++++++++------------ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/support/Util/dbuf.c b/support/Util/dbuf.c index cde35f20..68966f76 100644 --- a/support/Util/dbuf.c +++ b/support/Util/dbuf.c @@ -1,8 +1,8 @@ /* dbuf.c - Dynamic buffer implementation - version 1.1.0, March 28th, 2003 + version 1.1.1, April 11th, 2003 - Copyright (c) 2003 Borut Razem + Copyright (c) 2002-2003 Borut Razem This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/support/Util/dbuf.h b/support/Util/dbuf.h index c2a37044..6a7f9920 100644 --- a/support/Util/dbuf.h +++ b/support/Util/dbuf.h @@ -1,8 +1,8 @@ /* dbuf.h - Dynamic buffer interface - version 1.1.0, March 28th, 2003 + version 1.1.1, April 11th, 2003 - Copyright (c) 2003 Borut Razem + Copyright (c) 2002-2003 Borut Razem This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -34,16 +34,25 @@ struct dbuf_s { void *buf; /* pointer to the buffer, allocated on heap */ }; -struct dbuf_s *dbuf_new (size_t size); -int dbuf_init (struct dbuf_s *dbuf, size_t size); -int dbuf_set_size (struct dbuf_s *dbuf, size_t size); -int dbuf_append (struct dbuf_s *dbuf, const void *buf, size_t size); -const void *dbuf_get_buf (struct dbuf_s *dbuf); -size_t dbuf_get_size (struct dbuf_s *dbuf); -const char *dbuf_c_str (struct dbuf_s *dbuf); + +#ifdef __cplusplus +extern "C" { +#endif + +struct dbuf_s *dbuf_new(size_t size); +int dbuf_init(struct dbuf_s *dbuf, size_t size); +int dbuf_set_size(struct dbuf_s *dbuf, size_t size); +int dbuf_append(struct dbuf_s *dbuf, const void *buf, size_t size); +const void *dbuf_get_buf(struct dbuf_s *dbuf); +size_t dbuf_get_size(struct dbuf_s *dbuf); +const char *dbuf_c_str(struct dbuf_s *dbuf); int dbuf_trim(struct dbuf_s *dbuf); -void *dbuf_detach (struct dbuf_s *dbuf); -void dbuf_destroy (struct dbuf_s *dbuf); -void dbuf_delete (struct dbuf_s *dbuf); +void *dbuf_detach(struct dbuf_s *dbuf); +void dbuf_destroy(struct dbuf_s *dbuf); +void dbuf_delete(struct dbuf_s *dbuf); + +#ifdef __cplusplus +} +#endif #endif /* __DBUF_H */ -- 2.30.2