toybox/toys/example/demo_many_options.c
<<
>>
Prefs
   1/* demo_many_options.c - test more than 32 bits worth of option flags
   2 *
   3 * Copyright 2015 Rob Landley <rob@landley.net>
   4
   5USE_DEMO_MANY_OPTIONS(NEWTOY(demo_many_options, "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba", TOYFLAG_BIN))
   6
   7config DEMO_MANY_OPTIONS
   8  bool "demo_many_options"
   9  default n
  10  help
  11    usage: demo_many_options -[a-zA-Z]
  12
  13    Print the optflags value of the command arguments, in hex.
  14*/
  15
  16#define FOR_demo_many_options
  17#include "toys.h"
  18
  19void demo_many_options_main(void)
  20{
  21  xprintf("optflags=%llx\n", toys.optflags);
  22}
  23