X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fviewer.c;h=a82b0d03c73f21a2996f23da81f500b6befc2dcb;hb=455a6a71b6a1f49e9454a64856b77f8e85915f26;hp=4031948d2ec195ac3e7c717cf70cdbd484d8d47e;hpb=74ee02092252d171c59425ee5ed18636a97bba13;p=smdp.git diff --git a/src/viewer.c b/src/viewer.c index 4031948..a82b0d0 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -117,7 +117,7 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert) { } // set max_cols - max_cols = (i > max_cols) ? i : max_cols; + max_cols = MAX(i, max_cols); // iterate to next line offset = prev_blank(line->text, offset + COLS); @@ -125,16 +125,16 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert) { lc++; } // set max_cols one last time - max_cols = (i > max_cols) ? i : max_cols; + max_cols = MAX(i, max_cols); } else { // set max_cols - max_cols = (line->length > max_cols) ? line->length : max_cols; + max_cols = MAX(line->length, max_cols); } lc++; line = line->next; } - max_lines = (lc > max_lines) ? lc : max_lines; + max_lines = MAX(lc, max_lines); slide = slide->next; }