update to version 1.1.1 - re-added C++ stuff to make it still more portable
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 11 Apr 2003 07:48:02 +0000 (07:48 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 11 Apr 2003 07:48:02 +0000 (07:48 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2505 4a8a32a2-be11-0410-ad9d-d568d2c75423

support/Util/dbuf.c
support/Util/dbuf.h

index cde35f2078f2f74c6a321b42aad2d49d78297be6..68966f763ae746a392bceb6e9877783c5c43143e 100644 (file)
@@ -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
index c2a37044a2d5f58e80d4f7538a2d785e2d7f89cf..6a7f992096055c7d0df3477dea07187993b6c08f 100644 (file)
@@ -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 */