3 # MKparametrized.sh -- generate indirection vectors for various sort methods
5 # The output of this script is C source for an array specifying whether
6 # termcap strings should undergo parameter and padding translation.
11 * parametrized.h --- is a termcap capability parametrized?
13 * Note: this file is generated using parametrized.sh, do not edit by hand.
14 * A value of -1 in the table means suppress both pad and % translations.
15 * A value of 0 in the table means do pad but not % translations.
16 * A value of 1 in the table means do both pad and % translations.
19 static short const parametrized[] = {
22 # We detect whether % translations should be done by looking for #[0-9] in the
23 # description field. We presently suppress padding translation only for the
24 # XENIX acs_* capabilities. Maybe someday we'll dedicate a flag field for
25 # this, that would be cleaner....
29 $1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
30 $0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
31 {print "0,\t/* ", $2, " */"; count++;}
32 END {printf("} /* %d entries */;\n\n", count);}