From e913247fec162437920266182834aedadcb03004 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 31 Oct 2017 15:51:02 -0500 Subject: Rename test_*.c to demo_*.c (because "make test_$CMD" means something already), fluff out README, and add a comment to hostid explaining its deprecation. --- toys/example/demo_many_options.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 toys/example/demo_many_options.c (limited to 'toys/example/demo_many_options.c') diff --git a/toys/example/demo_many_options.c b/toys/example/demo_many_options.c new file mode 100644 index 00000000..e071d26c --- /dev/null +++ b/toys/example/demo_many_options.c @@ -0,0 +1,22 @@ +/* test_many_options.c - test more than 32 bits worth of option flags + * + * Copyright 2015 Rob Landley + +USE_TEST_MANY_OPTIONS(NEWTOY(test_many_options, "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba", TOYFLAG_BIN)) + +config TEST_MANY_OPTIONS + bool "test_many_options" + default n + help + usage: test_many_options -[a-zA-Z] + + Print the optflags value of the command arguments, in hex. +*/ + +#define FOR_test_many_options +#include "toys.h" + +void test_many_options_main(void) +{ + xprintf("optflags=%llx\n", toys.optflags); +} -- cgit v1.2.3