statelen++;
assert(space >= 0);
+
if (space == 0 || statelen >= space)
goto the_end;
newfie = TRUE;
} else
prefix = _("File:");
+
assert(statelen < space);
+
prefixlen = strnlenpt(prefix, space - statelen);
/* If newfie is FALSE, we need a space after prefix. */
if (!newfie && prefixlen + statelen < space)
mvwaddnstr(topwin, 0, 0, state, COLS);
else {
assert(COLS - statelen - 2 >= 0);
+
mvwaddch(topwin, 0, COLS - statelen - 2, ' ');
mvwaddnstr(topwin, 0, COLS - statelen - 1, state, statelen);
}