diff --git a/man/remind.1 b/man/remind.1 index 7df72b76..a7398e76 100644 --- a/man/remind.1 +++ b/man/remind.1 @@ -2065,6 +2065,14 @@ then \fBONCE\fR directives will be ignored. .B $InfDelta (read-only) If non-zero, then the \fB\-t\fR option was supplied on the command line. .TP +.B $IntMax (read-only) +The largest representable \fBINT\fR. On a machine with 32-bit signed integers +using twos-complement representation, this will be 2147483647. +.TP +.B $IntMin (read-only) +The smallest representable \fBINT\fR. On a machine with 32-bit signed integers +using twos-complement representation, this will be -2147483648. +.TP .B $LatDeg, $LatMin, $LatSec These specify the latitude of your location. \fB$LatDeg\fR can range from \-90 to 90, and the others from \-59 to 59. Northern latitudes diff --git a/src/var.c b/src/var.c index dcc9dcd6..6b2629dc 100644 --- a/src/var.c +++ b/src/var.c @@ -17,6 +17,7 @@ #include #include +#include #include "types.h" #include "expr.h" #include "globals.h" @@ -31,6 +32,9 @@ #define VALUE ErrMsg[E_VAL] #define UNDEF ErrMsg[E_UNDEF] +static int IntMin = INT_MIN; +static int IntMax = INT_MAX; + static Var *VHashTbl[VAR_HASH_SIZE]; typedef int (*SysVarFunc)(int, Value *); @@ -661,6 +665,8 @@ static SysVar SysVarArr[] = { {"HushMode", 0, INT_TYPE, &Hush, 0, 0 }, {"IgnoreOnce", 0, INT_TYPE, &IgnoreOnce, 0, 0 }, {"InfDelta", 0, INT_TYPE, &InfiniteDelta, 0, 0 }, + {"IntMax", 0, INT_TYPE, &IntMax, 0, 0 }, + {"IntMin", 0, INT_TYPE, &IntMin, 0, 0 }, {"LatDeg", 1, INT_TYPE, &LatDeg, -90, 90 }, {"LatMin", 1, INT_TYPE, &LatMin, -59, 59 }, {"LatSec", 1, INT_TYPE, &LatSec, -59, 59 },