commit e18bbd961d4c24c28934ad74f0f895c9d28ac866
parent 6142a381e0c04c703bfa75a25a1807dcc2aa37cc
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sun, 14 Mar 2021 19:11:26 +0000
node.c: simple program for providing octree data
Diffstat:
A | node.c | | | 22 | ++++++++++++++++++++++ |
1 file changed, 22 insertions(+), 0 deletions(-)
diff --git a/node.c b/node.c
@@ -0,0 +1,22 @@
+/*
+ * small program for generating octree node bytes
+ */
+
+#include <u.h>
+#include <libc.h>
+
+#include "octree.h"
+
+void
+main (int argc, char **argv)
+{
+ Node n;
+ if (argc < 1) {
+ fprint(2, "%s id [flags]", argv[0]);
+ exits("usage");
+ }
+ n.id=strtoull(argv[1], 0, 10);
+ if (argc >= 2) n.flags = strtoull(argv[2], 0, 10);
+ write(1, &n, NODESIZE);
+ exits(nil);
+}