Rework to use bsddialog
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I changed the api, sorry, you should change
terminalwidth() -> bsddialog_terminalwidth();
terminalwidth(); -> bsddialog_terminalwidth();
if (listitems[i].on == 'X') -> if (listitems[i].on == true)
Now warnings are fixed.
Important: "Bus error (core dump)", to reproduce:
<NO> -> Europe -> Italy -> <No> -> <Cancel>
I am investigating
usr.sbin/tzsetup/tzsetup.c | ||
---|---|---|
155–156 | bsddialog_terminalheight()) | |
156 | bsddialog_terminalheight()) | |
176–177 | bsddialog_terminalwidth()) | |
177 | bsddialog_terminalwidth(); | |
185 | if (listitems[i].on == true) |
Important:
Please, for now use
terminalheight() - 2
and
terminalwidth() -3
to fix a silent error (unpleasant consequence: the enter key has not effect with long menus)
I am going to write documented functions:
getwidget_height()/width() (they already exist but as internal utils).
Sorry for the fix after the "Accept"
usr.sbin/tzsetup/tzsetup.c | ||
---|---|---|
155–156 | fix | |
156 | fix | |
176–177 | if (width > terminalwidth() -3) | |
177 | width = terminalwidth() -3; |