From 8b64a3e64775ddf779f828560543393bdcf2f31d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 18 Dec 2015 16:39:59 -0600 Subject: Next giant chunk of ps work: add _NAME_TAG bitmask values to tags.h (leading underscore version is 1<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. --- scripts/mktags.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/mktags.c') diff --git a/scripts/mktags.c b/scripts/mktags.c index e6fceeab..3604260c 100644 --- a/scripts/mktags.c +++ b/scripts/mktags.c @@ -47,8 +47,10 @@ int main(int argc, char *argv[]) if (!isalpha(*s) && !isdigit(*s)) *s = '_'; s++; } - printf("% *d\n", - 30-printf("#define %s_%.*s", tag, (int)(s-start), start), ++idx); + printf("#define %s_%*.*s %d\n", tag, -40, (int)(s-start), start, idx); + printf("#define _%s_%*.*s (1%s<<%d)\n", tag, -39, (int)(s-start), start, + idx>31 ? "LL": "", idx); + idx++; } free(line); } -- cgit v1.2.3