summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-07-25 05:20:53 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-07-25 05:20:53 +0000
commite8be68be04c2f7eecb14c951de72fd1589944c87 (patch)
tree9781599976fcf08def4c91694027356f7a9aa567 /sys/kern
parent65c318b95179c222675601130a9b5b2b0f3e0cb6 (diff)
add {struct,member,export} keywords, tsarna@endicor.com
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/genassym.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh
index 9ab8967c81d..e3296b99399 100644
--- a/sys/kern/genassym.sh
+++ b/sys/kern/genassym.sh
@@ -1,5 +1,5 @@
-# $OpenBSD: genassym.sh,v 1.1 1997/03/27 11:50:45 niklas Exp $
-# $NetBSD: genassym.sh,v 1.6 1997/03/13 22:47:20 gwr Exp $
+# $OpenBSD: genassym.sh,v 1.2 1997/07/25 05:20:52 mickey Exp $
+# $NetBSD: genassym.sh,v 1.7 1997/06/25 03:09:06 thorpej Exp $
#
# Copyright (c) 1997 Matthias Pfaller.
@@ -76,6 +76,22 @@ $0 ~ /^endif/ {
next;
}
+/^struct[ \t]/ {
+ structname = $2;
+ $0 = "define " structname "_SIZEOF sizeof(struct " structname ")";
+ /* fall through */
+}
+
+/^member[ \t]/ {
+ $0 = "define " $2 " offsetof(struct " structname ", " $2 ")";
+ /* fall through */
+}
+
+/^export[ \t]/ {
+ $0 = "define " $2 " " $2;
+ /* fall through */
+}
+
/^define[ \t]/ {
if (defining == 0) {
defining = 1;