wdvi

network DVI viewer
Log | Files | Refs

commit 82ecfd270f2531f666764de0178afbe5f68c6573
parent b76d02ee26b0cde22a870f6b649c90111714ce3e
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Sat, 11 Mar 2023 18:12:45 +0000

use proper indentation in set_fg_color()

Diffstat:
Mspecial.c | 40++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/special.c b/special.c @@ -867,30 +867,30 @@ set_fg_color(const struct rgb *color) { struct fgrec **fgpp; - if (fg_current != NULL - && color->r == fg_current->color.r - && color->g == fg_current->color.g - && color->b == fg_current->color.b) - return; + if (fg_current != NULL && + color->r == fg_current->color.r && + color->g == fg_current->color.g && + color->b == fg_current->color.b) + return; for (fgpp = &bg_current->fg_head;;) { - fg_current = *fgpp; - if (fg_current == NULL) { /* if color is not in list */ - fg_current = *fgpp = xmalloc(sizeof *fg_current); - fg_current->next = NULL; - fg_current->color = *color; - fg_current->pixel_good = False; - break; - } - if (fg_current->color.r == color->r - && fg_current->color.g == color->g - && fg_current->color.b == color->b) - break; - fgpp = &fg_current->next; + fg_current = *fgpp; + if (fg_current == NULL) { /* if color is not in list */ + fg_current = *fgpp = xmalloc(sizeof *fg_current); + fg_current->next = NULL; + fg_current->color = *color; + fg_current->pixel_good = False; + break; + } + if (fg_current->color.r == color->r && + fg_current->color.g == color->g && + fg_current->color.b == color->b) + break; + fgpp = &fg_current->next; } if (debug & DBG_DVI) - printf("Changing fg color to %5d %5d %5d\n", - color->r, color->g, color->b); + printf("Changing fg color to %5d %5d %5d\n", + color->r, color->g, color->b); } static void