summaryrefslogtreecommitdiff
path: root/h/counters.h
diff options
context:
space:
mode:
Diffstat (limited to 'h/counters.h')
-rw-r--r--h/counters.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/h/counters.h b/h/counters.h
index 0fbb11a..391dbe1 100644
--- a/h/counters.h
+++ b/h/counters.h
@@ -15,12 +15,16 @@
#ifndef COUNTERS_H
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
/* ------------------------------------------------------- */
/* Macros for a multi-dimensional counter. */
/* Declare the counter name nn, maximum di mxdi, dimensions di, & count */
-#define DCOUNT(nn, mxdi, di, start, reset, endp1) \
- int nn[mxdi]; /* counter value */ \
+#define DCOUNT(nn, mxdi, di, start, reset, endp1) \
+ int nn[mxdi]; /* counter value */ \
int nn##_di = (di); /* Number of dimensions */ \
int nn##_stt = (start); /* start count value */ \
int nn##_rst = (reset); /* reset on carry value */ \
@@ -256,5 +260,9 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
+#ifdef __cplusplus
+ }
+#endif
+
#define COUNTERS_H
#endif /* COUNTERS_H */