Rework to use bsddialog
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 42914 Build 39802: arc lint + arc unit
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 | ||
|---|---|---|
| 151 | bsddialog_terminalheight()) | |
| 152 | bsddialog_terminalheight()) | |
| 172 | bsddialog_terminalwidth()) | |
| 173 | bsddialog_terminalwidth(); | |
| 181 | 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 | ||
|---|---|---|
| 151 | fix | |
| 152 | fix | |
| 172 | if (width > terminalwidth() -3) | |
| 173 | width = terminalwidth() -3; | |