+ ctx->oldest + (ctx->newest - ctx->oldest) * i / (MAXCOLOUR-1);
+ }
+ for (i = 0; i <= MAXCOLOUR; i++) {
+ char buf[80];
+
+ if (i == 0) {
+ strcpy(buf, "< ");
+ round_and_format_age(ctx, ctx->thresholds[0], buf+5, 0);
+ } else if (i == MAXCOLOUR) {
+ strcpy(buf, "> ");
+ round_and_format_age(ctx, ctx->thresholds[MAXCOLOUR-1], buf+5, 0);
+ } else {
+ unsigned long long midrange =
+ (ctx->thresholds[i-1] + ctx->thresholds[i]) / 2;
+ round_and_format_age(ctx, midrange, buf, 0);
+ }
+
+ ctx->titletexts[i] = dupstr(buf);