From 0ce9c970cf1f04781b118a59f97f3eb1664b66e8 Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Tue, 29 Jul 2014 16:36:06 +0000 Subject: Rename x11-*/ patch-xy patches to reflect the files they modify. Finally, this is the last of it. --- x11-clocks/tclock/Makefile | 3 +- x11-clocks/tclock/files/patch-aa | 112 --------------------------------- x11-clocks/tclock/files/patch-tclock.c | 112 +++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 114 deletions(-) delete mode 100644 x11-clocks/tclock/files/patch-aa create mode 100644 x11-clocks/tclock/files/patch-tclock.c (limited to 'x11-clocks/tclock') diff --git a/x11-clocks/tclock/Makefile b/x11-clocks/tclock/Makefile index c85371dea1b9..0b7704986c3f 100644 --- a/x11-clocks/tclock/Makefile +++ b/x11-clocks/tclock/Makefile @@ -7,13 +7,12 @@ PORTREVISION= 2 CATEGORIES= x11-clocks MASTER_SITES= http://www.linta.de/distfiles/ \ ftp://ftp.uni-potsdam.de/pub/X11/tools/clocks/ -EXTRACT_SUFX= .tar.Z MAINTAINER= aehlig@linta.de COMMENT= Transparent analog clock for x11 NO_WRKSUBDIR= yes -USES= imake +USES= imake tar:Z USE_XORG= x11 xext PLIST_FILES= bin/tclock man/man1/${PORTNAME}.1.gz diff --git a/x11-clocks/tclock/files/patch-aa b/x11-clocks/tclock/files/patch-aa deleted file mode 100644 index f00126bca744..000000000000 --- a/x11-clocks/tclock/files/patch-aa +++ /dev/null @@ -1,112 +0,0 @@ ---- tclock.c.orig 1992-12-21 19:56:29.000000000 +0000 -+++ tclock.c 2011-06-20 18:42:37.000000000 +0100 -@@ -22,7 +22,10 @@ - */ - - #include -+#include -+#include - #include -+#include - #include - #include - #include -@@ -51,7 +54,7 @@ - int screen_number; - Window rootWindow, mainWindow; - int ShapeEventNumber, ShapeErrorNumber; --long clock; -+time_t lclock; - struct tm lastTimes, times; - Pixmap border, clip; - GC clearGC, drawGC; -@@ -212,7 +215,7 @@ - XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet); - XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet); - -- XFlush(display, 1); -+ XFlush(display); - - /* This call to XPending ensures that if the window gets closed, we die */ - XPending(display); -@@ -222,8 +225,6 @@ - strToTP(s) - char *s; - { -- extern -- char *malloc(); - - XTextProperty *tp = (XTextProperty *)malloc(sizeof *tp); - XStringListToTextProperty(&s, 1, tp); -@@ -233,11 +234,11 @@ - int - sigalrm() - { -- clock = time(0); -- times = *localtime(&clock); -+ lclock = time(0); -+ times = *localtime(&lclock); - times.tm_hour = times.tm_hour * 5 + times.tm_min / 12; - reshape(); -- signal(SIGALRM, sigalrm); /* For SysV lusers */ -+ signal(SIGALRM, (void *)sigalrm); /* For SysV lusers */ - } - - unsigned long -@@ -294,7 +295,7 @@ - strcpy(appClass, "Tclock"); - } - --void -+int - main(ac, av) - int ac; - char **av; -@@ -309,6 +310,7 @@ - extern - char *getenv(); - char *displayName, fn[1000]; -+ char *sdb; - int parseReturn, rc; - - XrmParseCommand(&db, option, numOptions, "tclock", &ac, av); -@@ -330,7 +332,7 @@ - display = XOpenDisplay(displayName); - if(display == 0) - { -- fprintf("Couldn't open display %s\n", displayName); -+ fprintf(stderr, "Couldn't open display %s\n", displayName); - exit(-1); - } - -@@ -341,13 +343,14 @@ - exit(1); - - db = XrmGetStringDatabase(tclockDefaults); -- XrmMergeDatabases(XrmGetStringDatabase(XResourceManagerString(display)), &db); -+ if(sdb = XResourceManagerString(display)) -+ XrmMergeDatabases(XrmGetStringDatabase(sdb), &db); - - sprintf(fn, "%s/.Xdefaults", getenv("HOME")); - if(access(fn, R_OK) == 0) - XrmMergeDatabases(XrmGetFileDatabase(fn), &db); - -- if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT")) == 0) -+ if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT"), R_OK) == 0) - XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db); - - XrmMergeDatabases(cmdDB, &db); -@@ -410,7 +413,7 @@ - XMapRaised(display, mainWindow); - XFlush(display); - -- signal(SIGALRM, sigalrm); -+ signal(SIGALRM, (void *)sigalrm); - new.it_interval.tv_sec = 1; - new.it_value.tv_sec = 1; - new.it_interval.tv_usec = 0; -@@ -420,4 +423,3 @@ - for(;;) - sigpause(0); - } -- diff --git a/x11-clocks/tclock/files/patch-tclock.c b/x11-clocks/tclock/files/patch-tclock.c new file mode 100644 index 000000000000..f00126bca744 --- /dev/null +++ b/x11-clocks/tclock/files/patch-tclock.c @@ -0,0 +1,112 @@ +--- tclock.c.orig 1992-12-21 19:56:29.000000000 +0000 ++++ tclock.c 2011-06-20 18:42:37.000000000 +0100 +@@ -22,7 +22,10 @@ + */ + + #include ++#include ++#include + #include ++#include + #include + #include + #include +@@ -51,7 +54,7 @@ + int screen_number; + Window rootWindow, mainWindow; + int ShapeEventNumber, ShapeErrorNumber; +-long clock; ++time_t lclock; + struct tm lastTimes, times; + Pixmap border, clip; + GC clearGC, drawGC; +@@ -212,7 +215,7 @@ + XShapeCombineMask(display, mainWindow, ShapeBounding, 0, 0, border, ShapeSet); + XShapeCombineMask(display, mainWindow, ShapeClip, 0, 0, clip, ShapeSet); + +- XFlush(display, 1); ++ XFlush(display); + + /* This call to XPending ensures that if the window gets closed, we die */ + XPending(display); +@@ -222,8 +225,6 @@ + strToTP(s) + char *s; + { +- extern +- char *malloc(); + + XTextProperty *tp = (XTextProperty *)malloc(sizeof *tp); + XStringListToTextProperty(&s, 1, tp); +@@ -233,11 +234,11 @@ + int + sigalrm() + { +- clock = time(0); +- times = *localtime(&clock); ++ lclock = time(0); ++ times = *localtime(&lclock); + times.tm_hour = times.tm_hour * 5 + times.tm_min / 12; + reshape(); +- signal(SIGALRM, sigalrm); /* For SysV lusers */ ++ signal(SIGALRM, (void *)sigalrm); /* For SysV lusers */ + } + + unsigned long +@@ -294,7 +295,7 @@ + strcpy(appClass, "Tclock"); + } + +-void ++int + main(ac, av) + int ac; + char **av; +@@ -309,6 +310,7 @@ + extern + char *getenv(); + char *displayName, fn[1000]; ++ char *sdb; + int parseReturn, rc; + + XrmParseCommand(&db, option, numOptions, "tclock", &ac, av); +@@ -330,7 +332,7 @@ + display = XOpenDisplay(displayName); + if(display == 0) + { +- fprintf("Couldn't open display %s\n", displayName); ++ fprintf(stderr, "Couldn't open display %s\n", displayName); + exit(-1); + } + +@@ -341,13 +343,14 @@ + exit(1); + + db = XrmGetStringDatabase(tclockDefaults); +- XrmMergeDatabases(XrmGetStringDatabase(XResourceManagerString(display)), &db); ++ if(sdb = XResourceManagerString(display)) ++ XrmMergeDatabases(XrmGetStringDatabase(sdb), &db); + + sprintf(fn, "%s/.Xdefaults", getenv("HOME")); + if(access(fn, R_OK) == 0) + XrmMergeDatabases(XrmGetFileDatabase(fn), &db); + +- if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT")) == 0) ++ if(getenv("XENVIRONMENT") && access(getenv("XENVIRONMENT"), R_OK) == 0) + XrmMergeDatabases(XrmGetFileDatabase(getenv("XENVIRONMENT")), &db); + + XrmMergeDatabases(cmdDB, &db); +@@ -410,7 +413,7 @@ + XMapRaised(display, mainWindow); + XFlush(display); + +- signal(SIGALRM, sigalrm); ++ signal(SIGALRM, (void *)sigalrm); + new.it_interval.tv_sec = 1; + new.it_value.tv_sec = 1; + new.it_interval.tv_usec = 0; +@@ -420,4 +423,3 @@ + for(;;) + sigpause(0); + } +- -- cgit v1.2.3