diff options
author | Guillem Jover <guillem@debian.org> | 2010-02-10 02:13:30 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2010-02-19 06:48:25 +0100 |
commit | f426b031ac858fa30ace69959a43b61fb40f4be9 (patch) | |
tree | a0e97079c2501679cecfecb310a59b7ce4af8483 /dselect/baselist.cc | |
parent | 078c24defe2304d7f7a8012c2960b3f06ad0c3b0 (diff) | |
download | dpkg-f426b031ac858fa30ace69959a43b61fb40f4be9.tar.gz |
dselect: Use max/min instead of lesserint/greaterint
Diffstat (limited to 'dselect/baselist.cc')
-rw-r--r-- | dselect/baselist.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dselect/baselist.cc b/dselect/baselist.cc index 81accf596..68904fcc3 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -281,7 +281,7 @@ void baselist::dosearch() { int offset, index; if (debug) fprintf(debug,"baselist[%p]::dosearch(); searchstring=`%s'\n", this,searchstring); - for (offset=1, index=greaterint(topofscreen,cursorline+1); + for (offset = 1, index = max(topofscreen, cursorline + 1); offset<nitems; offset++, index++) { if (index >= nitems) index -= nitems; @@ -298,8 +298,8 @@ void baselist::dosearch() { void baselist::refreshinfo() { pnoutrefresh(infopad, infotopofscreen,leftofscreen, info_row,0, - lesserint(info_row + info_height - 1, info_row + MAX_DISPLAY_INFO - 1), - lesserint(total_width - leftofscreen - 1, xmax - 1)); + min(info_row + info_height - 1, info_row + MAX_DISPLAY_INFO - 1), + min(total_width - leftofscreen - 1, xmax - 1)); if (whatinfo_height) { mywerase(whatinfowin); |