]> git.gag.com Git - fw/sdcc/blobdiff - support/Util/dbuf.h
support/Util/dbuf.h: remove C++ stuff to make it portable
[fw/sdcc] / support / Util / dbuf.h
index 2ac978d7f17d3bd8319f44f1a2062a6849b34cd3..c2a37044a2d5f58e80d4f7538a2d785e2d7f89cf 100644 (file)
 #ifndef __DBUF_H
 #define __DBUF_H
 
-#ifndef _WIN32
-#include <ansidecl.h>
-#else
-#define PARAMS(paramlist)   paramlist
-#endif
-
 struct dbuf_s {
   size_t alloc;   /* size of allocated buffer in bytes */
   size_t len;     /* actual size of the buffer in bytes */
   void *buf;      /* pointer to the buffer, allocated on heap */
 };
 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct dbuf_s *dbuf_new PARAMS ((size_t size));
-int dbuf_init PARAMS ((struct dbuf_s *dbuf, size_t size));
-int dbuf_set_size PARAMS ((struct dbuf_s *dbuf, size_t size));
-int dbuf_append PARAMS ((struct dbuf_s *dbuf, const void *buf, size_t size));
-const void *dbuf_get_buf PARAMS ((struct dbuf_s *dbuf));
-size_t dbuf_get_size PARAMS ((struct dbuf_s *dbuf));
-const char *dbuf_c_str PARAMS ((struct dbuf_s *dbuf));
+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 PARAMS ((struct dbuf_s *dbuf));
-void dbuf_destroy PARAMS ((struct dbuf_s *dbuf));
-void dbuf_delete PARAMS ((struct dbuf_s *dbuf));
-
-#ifdef __cplusplus
-}
-#endif
+void *dbuf_detach (struct dbuf_s *dbuf);
+void dbuf_destroy (struct dbuf_s *dbuf);
+void dbuf_delete (struct dbuf_s *dbuf);
 
 #endif  /* __DBUF_H */