summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authoragc <agc>2006-11-28 23:04:54 +0000
committeragc <agc>2006-11-28 23:04:54 +0000
commit395a6d37e9371099cf9493adeddbb386783bcd22 (patch)
treeb022a40b64c0cd290fb1ca68b2ae172fd41a02cd /time
parent5ca4007642dd52d1965fe863ea8692e94ad6a41e (diff)
downloadpkgsrc-395a6d37e9371099cf9493adeddbb386783bcd22.tar.gz
Quieten some more warnings which gcc4 gripes about
Diffstat (limited to 'time')
-rw-r--r--time/xchrono/distinfo6
-rw-r--r--time/xchrono/patches/patch-ab94
-rw-r--r--time/xchrono/patches/patch-ac21
3 files changed, 109 insertions, 12 deletions
diff --git a/time/xchrono/distinfo b/time/xchrono/distinfo
index 2997d31bf82..cb05676fb1b 100644
--- a/time/xchrono/distinfo
+++ b/time/xchrono/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.4 2005/02/23 19:14:56 wiz Exp $
+$NetBSD: distinfo,v 1.5 2006/11/28 23:04:54 agc Exp $
SHA1 (xchrono.shar) = 8cc61b949ff4c1972cfa810831d562d058fa9e2f
RMD160 (xchrono.shar) = 8d599f4e594cc0a43c3425841ac8a6670daeaf7e
Size (xchrono.shar) = 56292 bytes
SHA1 (patch-aa) = 59c5946422c0ac76907e1d512dd64b9a1899029d
-SHA1 (patch-ab) = 414ed2bfc2aa0aeafaf50c4980bb8394ca3e1407
-SHA1 (patch-ac) = e2da170e8509caed02e4ab7eda8737767aa7ebbb
+SHA1 (patch-ab) = 73c54769d4c915e1d19f0c94e84731d65a5c5ec4
+SHA1 (patch-ac) = af11c1aeb2cd507896082573756f85522e885bd2
diff --git a/time/xchrono/patches/patch-ab b/time/xchrono/patches/patch-ab
index 42ac45a99ad..60433f4e0bf 100644
--- a/time/xchrono/patches/patch-ab
+++ b/time/xchrono/patches/patch-ab
@@ -1,20 +1,24 @@
-$NetBSD: patch-ab,v 1.1 2002/06/15 20:40:26 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.2 2006/11/28 23:04:55 agc Exp $
the time stuff is needed to compile on alpha, the other stuff kills
compiler warnings
--- MultiClock.c.orig Sat Jun 15 16:09:44 2002
+++ MultiClock.c
-@@ -33,7 +33,7 @@
+@@ -33,9 +33,10 @@
#include <X11/Xaw/XawInit.h>
#include "MultiClockP.h"
-extern long time();
++#include <stdio.h>
+#include <time.h>
static void clock_tic(), updateClocks(), DrawHand(), DrawSecond(), SetSeg(), DrawClockFace();
- static erase_hands(), round();
+-static erase_hands(), round();
++static erase_hands(), xchrono_round();
-@@ -177,7 +177,7 @@
+ /* Private Definitions */
+
+@@ -177,7 +178,7 @@
{
ClassField(numberOfSlots) += CLOCK_LIST_SIZE;
ClassField(clockList) =
@@ -23,7 +27,7 @@ compiler warnings
sizeof(ClockWidget)*ClassField(numberOfSlots));
}
-@@ -239,7 +239,7 @@
+@@ -239,7 +240,7 @@
if(!w->clock.analog) {
char *str;
struct tm tm, *localtime();
@@ -32,7 +36,7 @@ compiler warnings
(void) time(&time_value);
tm = *localtime(&time_value);
str = asctime(&tm);
-@@ -391,7 +391,7 @@
+@@ -391,7 +392,7 @@
XtIntervalId *id;
{
ClockWidget w = (ClockWidget) client_data;
@@ -41,7 +45,7 @@ compiler warnings
char localTimezone[TZ_BUFLEN];
char *tzenv = getenv("TZ");
struct tm *localtime();
-@@ -417,7 +417,7 @@
+@@ -417,11 +418,11 @@
{
(*list)->clock.show_second_hand =
(ClassField(updateInterval) <= SECOND_HAND_TIME);
@@ -50,3 +54,79 @@ compiler warnings
{
if ((*list)->clock.timezone)
{
+- sprintf (tzEnviron, "TZ=%s", (*list)->clock.timezone);
++ snprintf (tzEnviron, sizeof(tzEnviron), "TZ=%s", (*list)->clock.timezone);
+ putenv (tzEnviron);
+ tzset ();
+ }
+@@ -433,7 +434,7 @@
+
+ if (tzenv)
+ {
+- sprintf (tzEnviron, "TZ=%s", localTimezone);
++ snprintf (tzEnviron, sizeof(tzEnviron), "TZ=%s", localTimezone);
+ putenv (tzEnviron);
+ }
+ #ifndef SYSV
+@@ -525,7 +526,7 @@
+ }
+ else am_pm = "AM";
+
+- sprintf (time_string, "%d/%d", tm.tm_mon+1, tm.tm_mday);
++ snprintf (time_string, sizeof(time_string), "%d/%d", tm.tm_mon+1, tm.tm_mday);
+ {
+ int len = strlen (time_string);
+ int x = w->core.width -
+@@ -760,14 +761,14 @@
+ wc = width * cosangle;
+ ws = width * sinangle;
+ SetSeg(w,
+- x = w->clock.centerX + round(length * sinangle),
+- y = w->clock.centerY - round(length * cosangle),
+- x1 = w->clock.centerX - round(ws + wc),
+- y1 = w->clock.centerY + round(wc - ws)); /* 1 ---- 2 */
++ x = w->clock.centerX + xchrono_round(length * sinangle),
++ y = w->clock.centerY - xchrono_round(length * cosangle),
++ x1 = w->clock.centerX - xchrono_round(ws + wc),
++ y1 = w->clock.centerY + xchrono_round(wc - ws)); /* 1 ---- 2 */
+ /* 2 */
+ SetSeg(w, x1, y1,
+- x2 = w->clock.centerX - round(ws - wc),
+- y2 = w->clock.centerY + round(wc + ws)); /* 2 ----- 3 */
++ x2 = w->clock.centerX - xchrono_round(ws - wc),
++ y2 = w->clock.centerY + xchrono_round(wc + ws)); /* 2 ----- 3 */
+
+ SetSeg(w, x2, y2, x, y); /* 3 ----- 1(4) */
+ }
+@@ -834,14 +835,14 @@
+ ws = width * sinangle;
+ /*1 ---- 2 */
+ SetSeg(w,
+- x = w->clock.centerX + round(length * sinangle),
+- y = w->clock.centerY - round(length * cosangle),
+- w->clock.centerX + round(ms - wc),
+- w->clock.centerY - round(mc + ws) );
+- SetSeg(w, w->clock.centerX + round(offset *sinangle),
+- w->clock.centerY - round(offset * cosangle), /* 2-----3 */
+- w->clock.centerX + round(ms + wc),
+- w->clock.centerY - round(mc - ws));
++ x = w->clock.centerX + xchrono_round(length * sinangle),
++ y = w->clock.centerY - xchrono_round(length * cosangle),
++ w->clock.centerX + xchrono_round(ms - wc),
++ w->clock.centerY - xchrono_round(mc + ws) );
++ SetSeg(w, w->clock.centerX + xchrono_round(offset *sinangle),
++ w->clock.centerY - xchrono_round(offset * cosangle), /* 2-----3 */
++ w->clock.centerX + xchrono_round(ms + wc),
++ w->clock.centerY - xchrono_round(mc - ws));
+ w->clock.segbuffptr->x = x;
+ w->clock.segbuffptr++->y = y;
+ w->clock.numseg ++;
+@@ -886,7 +887,7 @@
+ w->clock.numseg = 0;
+ }
+
+-static int round(x)
++static int xchrono_round(x)
+ double x;
+ {
+ return(x >= 0.0 ? (int)(x + .5) : (int)(x - .5));
diff --git a/time/xchrono/patches/patch-ac b/time/xchrono/patches/patch-ac
index 78fea55dd1e..c6a6fdadab9 100644
--- a/time/xchrono/patches/patch-ac
+++ b/time/xchrono/patches/patch-ac
@@ -1,8 +1,16 @@
-$NetBSD: patch-ac,v 1.1 2003/01/30 22:37:27 simonb Exp $
+$NetBSD: patch-ac,v 1.2 2006/11/28 23:04:55 agc Exp $
--- xchrono.c.orig Fri Jan 31 09:23:44 2003
+++ xchrono.c
-@@ -91,9 +91,7 @@ static struct {
+@@ -29,6 +29,7 @@
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
++#include <stdio.h>
+
+ #include <X11/Xatom.h>
+ #include <X11/Intrinsic.h>
+@@ -91,9 +92,7 @@
#define TOKYO (HAWAII+1)
{ "Japan", "Tokyo" },
#define SYDNEY (TOKYO+1)
@@ -13,3 +21,12 @@ $NetBSD: patch-ac,v 1.1 2003/01/30 22:37:27 simonb Exp $
#define LONDON (SYDNEY+1)
{ "GB-Eire", "London" },
#define PARIS (LONDON+1)
+@@ -231,7 +230,7 @@
+ { XtNheight, (XtArgVal) 0 },
+ };
+
+-void main(argc, argv)
++int main(argc, argv)
+ int argc;
+ char **argv;
+ {