From 1f2928827d5fad5cc66cfd8e157f168997ab05c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Bartoszkiewicz?= Date: Mon, 7 Dec 2009 01:21:10 +0100 Subject: [PATCH] =?utf8?q?Zoptymalizowanie=20wypisywania=20atrybut=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- choinka.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/choinka.c b/choinka.c index 05dc299..9c03183 100644 --- a/choinka.c +++ b/choinka.c @@ -37,6 +37,9 @@ char rysunek[] = void ustaw(atrybut const* attr) { + static atrybut ostatni = {-1, -1}; + if (ostatni.attr == attr->attr && ostatni.kolor == attr->kolor) return; + ostatni = *attr; if (attr->attr & A_BOLD) { putp(enter_bold_mode); } else { -- 2.45.2