From e68ae2746516de29890d0dc64a58572b5f3c5c80 Mon Sep 17 00:00:00 2001 From: Jason Bowen Date: Mon, 30 Oct 2023 17:02:36 -0500 Subject: [PATCH] Increase max rows to display Intended to address https://github.com/resurrecting-open-source-projects/cbm/issues/2 about only showing 7 interfaces. The max number of rows was just a "magic number" set to 8 with a //TODO next to it. I've changed it to a #define and set it to 64. Admittedly this is also arbitrary, but it's less likely to cut off useful data than 8. --- src/cbm.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cbm.cpp b/src/cbm.cpp index 590aafe..23430d7 100644 --- a/src/cbm.cpp +++ b/src/cbm.cpp @@ -43,6 +43,11 @@ #include #include +// Set the max number of rows (and thus interfaces) to display. The +// choice of 64 is arbitrary, but less likely to cut off interfaces +// than the original value of 8. +#define MAX_ROWS 64 + // Externs extern int optind, opterr, optopt; @@ -186,7 +191,7 @@ int main(int argc, char **argv) { // Position the interface table interfaceTable.setPosition(2, 2); interfaceTable.setSize(screen.getWidth() - 4, - 8); // TODO + MAX_ROWS); // TODO // Create the detail table VerticalTable detailTable(screen); @@ -337,7 +342,7 @@ int main(int argc, char **argv) { // Position the interface table interfaceTable.setPosition(2, 2); interfaceTable.setSize(screen.getWidth() - 4, - 8); // TODO + MAX_ROWS); // TODO // Position the detail table detailTable.setPosition(2, 12); // TODO