/* Handle conditionals, which are also applied to physical lines. Conditions
are of the form ".ifdef ANYTEXT" and are treated as true if any macro
- expansion occured on the rest of the line. A preliminary test for the leading
+ expansion occurred on the rest of the line. A preliminary test for the leading
'.' saves effort on most lines. */
if (*ss == '.')
inttype = US"octal ";
/* Integer: a simple(ish) case; allow octal and hex formats, and
- suffixes K, M and G. The different types affect output, not input. */
+ suffixes K, M, G, and T. The different types affect output, not input. */
case opt_mkint:
case opt_int:
if (errno != ERANGE && *endptr)
{
- uschar * mp = US"GgMmKk\0"; /* YyZzEePpTtGgMmKk */
+ uschar * mp = US"TtGgMmKk\0"; /* YyZzEePpTtGgMmKk */
if ((mp = Ustrchr(mp, *endptr)))
{
*(int *)ol->value = value;
break;
- /* Integer held in K: again, allow octal and hex formats, and suffixes K, M,
- G and T. */
+ /* Integer held in K: again, allow formats and suffixes as above. */
case opt_Kint:
{
if (errno != ERANGE && *endptr)
{
- uschar * mp = US"EePpTtGgMmKk\0"; /* YyZzEePpTtGgMmKk */
+ uschar * mp = US"ZzEePpTtGgMmKk\0"; /* YyZzEePpTtGgMmKk */
if ((mp = Ustrchr(mp, *endptr)))
{
endptr++;
- do
+ while (*(mp += 2))
{
if (lvalue > EXIM_ARITH_MAX/1024 || lvalue < EXIM_ARITH_MIN/1024)
{
}
lvalue *= 1024;
}
- while (*(mp += 2));
}
else
lvalue = (lvalue + 512)/1024;
int_eximarith_t x = *((int_eximarith_t *)value);
if (!no_labels) printf("%s = ", name);
if (x == 0) printf("0\n");
+ else if ((x & ((1<<30)-1)) == 0) printf(PR_EXIM_ARITH "T\n", x >> 30);
else if ((x & ((1<<20)-1)) == 0) printf(PR_EXIM_ARITH "G\n", x >> 20);
else if ((x & ((1<<10)-1)) == 0) printf(PR_EXIM_ARITH "M\n", x >> 10);
else printf(PR_EXIM_ARITH "K\n", x);