libbsddialog: add persistent gauge open/update/flush/close

Complete the gauge API with a caller-owned lifecycle (as dialog(3) has had since 2013) so embedders can update a live gauge without tearing down curses each tick. Keep the existing pipe-driven bsddialog_gauge() path; when fd < 0 it uses the new lifecycle internally.

Add the minimal embedder helpers and scrollback-safe paint path the persistent gauge needs under keep_tite (werase, L-shaped shadow, backdrop sync, untouchwin before doupdate) so updates do not emit CSI-H/CSI-2J into the terminal scrollback.

Related FreeBSD discussion (DNM staging): https://reviews.freebsd.org/D58118

Unblocks bsdpv work discussed in https://reviews.freebsd.org/D58133

Merge request reports

Loading