URI:
       Merge pull request #24 from wessels/master - tty-clock - port of tty-clock to OpenBSD, with pledge/unveil added as goodie.
  HTML git clone https://git.drkhsh.at/tty-clock.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 9f75de2af9c10e0ebae62fcc0e4f1a288c965779
   DIR parent 4e6b4cae8aad23bd52ab17134ea32ef5619fcfb0
  HTML Author: xorg62 <xorg62@gmail.com>
       Date:   Thu, 19 Mar 2015 02:26:06 +0100
       
       Merge pull request #24 from wessels/master
       
       Offered as a simpler fix for making the seconds colon blink.
       Diffstat:
         M ttyclock.c                          |      32 ++++++++-----------------------
       
       1 file changed, 8 insertions(+), 24 deletions(-)
       ---
   DIR diff --git a/ttyclock.c b/ttyclock.c
       @@ -253,30 +253,14 @@ draw_clock(void)
             /* Draw hour numbers */
             draw_number(ttyclock->date.hour[0], 1, 1);
             draw_number(ttyclock->date.hour[1], 1, 8);
       +     chtype dotcolor = COLOR_PAIR(1);
       +     if (ttyclock->option.blink && time(NULL) % 2 == 0)
       +          dotcolor = COLOR_PAIR(2);
        
       -     if (ttyclock->option.blink){
       -       time_t seconds;
       -       seconds = time(NULL);
       -
       -       if (seconds % 2 != 0){
       -           /* 2 dot for number separation */
       -           wbkgdset(ttyclock->framewin, COLOR_PAIR(1));
       -           mvwaddstr(ttyclock->framewin, 2, 16, "  ");
       -           mvwaddstr(ttyclock->framewin, 4, 16, "  ");
       -       }
       -       else if (seconds % 2 == 0){
       -           /*2 dot black for blinking */
       -           wbkgdset(ttyclock->framewin, COLOR_PAIR(2));
       -           mvwaddstr(ttyclock->framewin, 2, 16, "  ");
       -           mvwaddstr(ttyclock->framewin, 4, 16, "  ");
       -       }
       -     }
       -     else{
       -       /* 2 dot for number separation */
       -       wbkgdset(ttyclock->framewin, COLOR_PAIR(1));
       -       mvwaddstr(ttyclock->framewin, 2, 16, "  ");
       -       mvwaddstr(ttyclock->framewin, 4, 16, "  ");
       -     }
       +     /* 2 dot for number separation */
       +     wbkgdset(ttyclock->framewin, dotcolor);
       +     mvwaddstr(ttyclock->framewin, 2, 16, "  ");
       +     mvwaddstr(ttyclock->framewin, 4, 16, "  ");
        
             /* Draw minute numbers */
             draw_number(ttyclock->date.minute[0], 1, 20);
       @@ -299,7 +283,7 @@ draw_clock(void)
             if(ttyclock->option.second)
             {
                  /* Again 2 dot for number separation */
       -          wbkgdset(ttyclock->framewin, COLOR_PAIR(1));
       +          wbkgdset(ttyclock->framewin, dotcolor);
                  mvwaddstr(ttyclock->framewin, 2, NORMFRAMEW, "  ");
                  mvwaddstr(ttyclock->framewin, 4, NORMFRAMEW, "  ");