node.c (359B)
1 /* 2 * small program for generating octree node bytes 3 */ 4 5 #include <u.h> 6 #include <libc.h> 7 8 #include "octree.h" 9 10 void 11 main (int argc, char **argv) 12 { 13 Node n; 14 if (argc < 1) { 15 fprint(2, "%s id [flags]", argv[0]); 16 exits("usage"); 17 } 18 n.id=strtoull(argv[1], 0, 10); 19 if (argc >= 2) n.flags = strtoull(argv[2], 0, 10); 20 write(1, &n, NODESIZE); 21 exits(nil); 22 }