aboutsummaryrefslogtreecommitdiff
path: root/toys/example/test_many_options.c
blob: d2f5c846c30de1c84ad86fb0705d5e05603aa7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* test_many_options.c - test more than 32 bits worth of option flags
 *
 * Copyright 2015 Rob Landley <rob@landley.net>

USE_TEST_MANY_OPTIONS(NEWTOY(test_many_options, "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba", TOYFLAG_USR|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);
}