aboutsummaryrefslogtreecommitdiff
path: root/scripts/mktags.c
AgeCommit message (Collapse)Author
2019-01-19Fix various warnings building on FreeBSD.Rob Landley
2016-02-05Debian unstable is even more pedantic than previous debian.Rob Landley
2015-12-18Next giant chunk of ps work: add _NAME_TAG bitmask values to tags.hRob Landley
(leading underscore version is 1<<NAME_TAG version, with 1LL for >31 shift), suck lots of magic constants out of ps and use tag macros instead, redo command line display so there's now 6 variants (CMD COMM ARGS from posix, NAME CMDLINE from android, and COMMAND for completeness). Document more cases where posix is nuts or widely ignored.
2015-12-13Start of TAGGED_ARRAY() infrastructure.Rob Landley
This lets you have struct arrays with a string as the first member, ala: struct {char *name; int x, y} blah thingy[] = TAGGED_ARRAY(BLAH, {"one", 1, 2}, {"two", 3, 4}, {"three", 5, 6} ); And it produces #defines for the array index of each, ala: #define BLAH_one 0 #define BLAH_two 1 #define BLAH_three 2 So you can use thingy[BLAH_two].x and still reorder the elements at will. Note: if you screw up the array initializers, temporarily replace TAGGED_ARRAY(BLAH, with { and the ); with }; and the compiler will give you better error messages. (With the macro the compiler reports errors on the TAGGED_ARRAY line, not where the comma is missing in its contents.) Currently the TAGGED_ARRAY( and ); must be on their own lines, and the { and start of each attached string must be on the same line.