View | Details | Raw Unified | Return to bug 171690
Collapse All | Expand All

(-)tty-clock/Makefile (-7 / +2 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=		tty-clock
8
PORTNAME=		tty-clock
9
PORTVERSION=		2.0.0
9
PORTVERSION=		2.0.0
10
PORTREVISION=		1
10
CATEGORIES=		sysutils
11
CATEGORIES=		sysutils
11
MASTER_SITES=		http://github.com/xorg62/${PORTNAME}/tarball/
12
MASTER_SITES=		http://github.com/xorg62/${PORTNAME}/tarball/
12
DISTNAME=		a82fd71
13
DISTNAME=		a82fd71
Lines 30-39 Link Here
30
do-install:
31
do-install:
31
	${INSTALL_PROGRAM} ${WRKSRC}/tty-clock ${PREFIX}/bin
32
	${INSTALL_PROGRAM} ${WRKSRC}/tty-clock ${PREFIX}/bin
32
33
33
.include <bsd.port.pre.mk>
34
.include <bsd.port.mk>
34
35
.if ${OSVERSION} > 900007
36
BROKEN=	Core dumps on FreeBSD 9+
37
.endif
38
39
.include <bsd.port.post.mk>
(-)tty-clock/files/patch-ttyclock.c (+53 lines)
Line 0 Link Here
1
--- ttyclock.c.orig	2009-06-17 19:07:38.000000000 +0100
2
+++ ttyclock.c	2012-09-16 18:16:24.000000000 +0100
3
@@ -174,19 +174,19 @@
4
 }
5
 
6
 void
7
-draw_number(int n, int x, int y)
8
+draw_number(int n, int y, int x)
9
 {
10
-     int i, sy = y;
11
+     int i, sx = x;
12
 
13
-     for(i = 0; i < 30; ++i, ++sy)
14
+     for(i = 0; i < 30; ++i, ++sx)
15
      {
16
-          if(sy == y + 6)
17
+          if(sx == x + 6)
18
           {
19
-               sy = y;
20
-               ++x;
21
+               sx = x;
22
+               ++y;
23
           }
24
           wbkgdset(ttyclock->framewin, COLOR_PAIR(number[n][i/2]));
25
-          mvwaddch(ttyclock->framewin, x, sy, ' ');
26
+          mvwaddch(ttyclock->framewin, y, sx, ' ');
27
      }
28
      wrefresh(ttyclock->framewin);
29
 
30
@@ -209,11 +209,6 @@
31
      draw_number(ttyclock->date.minute[0], 1, 20);
32
      draw_number(ttyclock->date.minute[1], 1, 27);
33
 
34
-     /* Draw the date */
35
-     wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
36
-     mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
37
-     wrefresh(ttyclock->datewin);
38
-
39
      /* Draw second if the option is enable */
40
      if(ttyclock->option.second)
41
      {
42
@@ -227,6 +222,11 @@
43
           draw_number(ttyclock->date.second[1], 1, 46);
44
      }
45
 
46
+     /* Draw the date */
47
+     wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
48
+     mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
49
+     wrefresh(ttyclock->datewin);
50
+
51
      return;
52
 }
53

Return to bug 171690