pub fn clamp_winsize(cols: u16, rows: u16) -> (u16, u16)
Clamp window-size values to a sane range, preventing zero-sized or absurdly large values.