summaryrefslogtreecommitdiffhomepage
path: root/m4
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-23 06:47:13 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-23 06:47:13 +0200
commit73a915189ace996d406131716f0ce42bf2a7192c (patch)
tree59c4f18edb20586920b00bf1f87b0f588171c774 /m4
parent48f4d85f18795619035ad00f14f9e1c743275801 (diff)
Add a macro for references
Diffstat (limited to 'm4')
-rw-r--r--m4/ref.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/ref.m4 b/m4/ref.m4
new file mode 100644
index 0000000..482763b
--- /dev/null
+++ b/m4/ref.m4
@@ -0,0 +1,6 @@
+m4_define(__REFCNT, 0)
+m4_define(MKREF, ‘‘
+ m4_define(‘‘__REFCNT’’, m4_incr(__REFCNT))
+ m4_define(‘‘__REF_$1’’, __REFCNT)
+’’)
+m4_define(REF, ‘‘__REF_$1’’)