[tin-dev] page.c:draw_page_header() unnecessary call of fcol()
Dennis Preiser
dennis at d--p.de
Thu Oct 8 19:12:26 CEST 2020
Hi,
In page.c:draw_page_header() we have two consecutive calls to
fcol(tinrc.col_head) without a call in between that changes fcol.
I think the second call is not necessary.
Dennis
--- tin-2.4.5_r4/src/page.c 2020-10-08 18:37:19.000000000 +0200
+++ tin-2.4.5_r5/src/page.c 2020-10-08 18:46:04.000000000 +0200
@@ -1436,15 +1436,15 @@ draw_page_header(
if (right_len > cCOLS / 3 + 1)
right_len = cCOLS / 3 + 1;
+# ifdef HAVE_COLOR
+ fcol(tinrc.col_head);
+# endif /* HAVE_COLOR */
+
/*
* first line
*/
cur_pos = 0;
-# ifdef HAVE_COLOR
- fcol(tinrc.col_head);
-# endif /* HAVE_COLOR */
-
/* date */
if ((wtmp = char2wchar_t(buf)) != NULL) {
my_fputws(wtmp, stdout);
@@ -1504,10 +1504,6 @@ draw_page_header(
*/
cur_pos = 0;
-# ifdef HAVE_COLOR
- fcol(tinrc.col_head);
-# endif /* HAVE_COLOR */
-
/* line count */
if (arts[this_resp].line_count < 0)
strcpy(buf, "?");
@@ -1673,15 +1669,15 @@ draw_page_header(
*/
right_len = MAX((strlen(_(txt_thread_x_of_n)) - 6 + 8), (strlen(_(txt_art_x_of_n)) - 6 + 8));
+# ifdef HAVE_COLOR
+ fcol(tinrc.col_head);
+# endif /* HAVE_COLOR */
+
/*
* first line
*/
cur_pos = 0;
-# ifdef HAVE_COLOR
- fcol(tinrc.col_head);
-# endif /* HAVE_COLOR */
-
/* date */
my_fputs(buf, stdout);
cur_pos += strlen(buf);
@@ -1732,10 +1728,6 @@ draw_page_header(
*/
cur_pos = 0;
-# ifdef HAVE_COLOR
- fcol(tinrc.col_head);
-# endif /* HAVE_COLOR */
-
/* line count */
/* an accurate line count will appear in the footer anymay */
if (arts[this_resp].line_count < 0)
More information about the tin-dev
mailing list