Module Name: othersrc
Committed By: agc
Date: Sun Nov 29 01:40:12 UTC 2015
Modified Files:
othersrc/external/bsd/ibbs/dist: ibbs.h
Log Message:
clean up the header file:
+ put c++ compilation guards around the function prototypes
+ use a typedef so that we're less verbose in the header file
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/ibbs/dist/ibbs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/ibbs/dist/ibbs.h
diff -u othersrc/external/bsd/ibbs/dist/ibbs.h:1.1.1.1 othersrc/external/bsd/ibbs/dist/ibbs.h:1.2
--- othersrc/external/bsd/ibbs/dist/ibbs.h:1.1.1.1 Mon Nov 23 05:56:00 2015
+++ othersrc/external/bsd/ibbs/dist/ibbs.h Sun Nov 29 01:40:12 2015
@@ -28,14 +28,29 @@
#include <inttypes.h>
struct ibbs_ctx_t; /* opaque structure */
+typedef struct ibbs_ctx_t ibbs_ctx_t;
-struct ibbs_ctx_t *ibbs_init(void);
-void ibbs_free(struct ibbs_ctx_t */*ctx*/);
+#ifndef __BEGIN_DECLS
+# if defined(__cplusplus)
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+# else
+# define __BEGIN_DECLS
+# define __END_DECLS
+# endif
+#endif
+
+__BEGIN_DECLS
-int ibbs_srandom(struct ibbs_ctx_t */*ctx*/, uint32_t /*seed*/);
+ibbs_ctx_t *ibbs_init(void);
+void ibbs_free(ibbs_ctx_t */*ctx*/);
+
+int ibbs_srandom(ibbs_ctx_t */*ctx*/, uint32_t /*seed*/);
uint32_t ibbs_get_microseconds(void);
-ssize_t ibbs_rand_bytes(struct ibbs_ctx_t */*ctx*/, void */*buf*/, size_t /*size*/);
-uint32_t ibbs_get32(struct ibbs_ctx_t */*ctx*/);
-uint64_t ibbs_get64(struct ibbs_ctx_t */*ctx*/);
+ssize_t ibbs_rand_bytes(ibbs_ctx_t */*ctx*/, void */*buf*/, size_t /*size*/);
+uint32_t ibbs_get32(ibbs_ctx_t */*ctx*/);
+uint64_t ibbs_get64(ibbs_ctx_t */*ctx*/);
+
+__END_DECLS
#endif