Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand toys.optargs to 64 bits so people adding more options to ls do…
…n't run out. Keep the low 32 bits of FLAG_x constants as 32 bit numbers so that at least on little endian platforms it's still normal 32 bit math outside of lib/args.c.
- Loading branch information
Showing
4 changed files
with
42 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); | ||
} |