]> git.bzium.org - embe/choinka.git/blobdiff - choinka.c
Uporządkowanie kolejności include’ów.
[embe/choinka.git] / choinka.c
index 05dc29947ed4308844f4e1d5630b7f846983833b..62461df3fb45b218ea86d796a77543669a90487e 100644 (file)
--- a/choinka.c
+++ b/choinka.c
@@ -1,7 +1,7 @@
-#include <term.h>
 #include <ncurses.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <term.h>
 #include <time.h>
 
 typedef struct {
@@ -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 {