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/pkgtop.cc | |
parent | 078c24defe2304d7f7a8012c2960b3f06ad0c3b0 (diff) | |
download | dpkg-f426b031ac858fa30ace69959a43b61fb40f4be9.tar.gz |
dselect: Use max/min instead of lesserint/greaterint
Diffstat (limited to 'dselect/pkgtop.cc')
-rw-r--r-- | dselect/pkgtop.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc index b5ff3869e..826877c76 100644 --- a/dselect/pkgtop.cc +++ b/dselect/pkgtop.cc @@ -108,10 +108,10 @@ void packagelist::redrawthisstate() { const char *section= table[cursorline]->pkg->section; const char *priority= pkgprioritystring(table[cursorline]->pkg); char *buf= new char[500+ - greaterint((table[cursorline]->pkg->name - ? strlen(table[cursorline]->pkg->name) : 0), - (section ? strlen(section) : 0) + - (priority ? strlen(priority) : 0))]; + max((table[cursorline]->pkg->name ? + strlen(table[cursorline]->pkg->name) : 0), + (section ? strlen(section) : 0) + + (priority ? strlen(priority) : 0))]; if (table[cursorline]->pkg->name) { sprintf(buf, @@ -130,7 +130,7 @@ void packagelist::redrawthisstate() { } mvwaddnstr(thisstatepad,0,0, buf, total_width); pnoutrefresh(thisstatepad, 0,leftofscreen, thisstate_row,0, - thisstate_row, lesserint(total_width - 1, xmax - 1)); + thisstate_row, min(total_width - 1, xmax - 1)); delete[] buf; } |