[Pkg-wmaker-commits] [wmclock] 23/66: Imported Upstream version 1.0.13

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 10:52:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmclock.

commit d4f30cbe7ea71717f0f0dc597c3b33b8a5e2d0da
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Jan 4 22:50:34 2015 -0600

    Imported Upstream version 1.0.13
---
 ChangeLog                 |  17 ++++++
 INSTALL                   |   4 +-
 Imakefile                 |   7 ++-
 lang.croatian/month.xpm   |  82 +++++++++++++++++++++++++++++
 lang.croatian/weekday.xpm |  48 +++++++++++++++++
 lang.english/weekday.xpm  |   6 +--
 lang.polish/month.txt     |  12 +++++
 lang.polish/month.xpm     |  79 ++++++++++++++++++++++++++++
 lang.polish/weekday.txt   |   7 +++
 lang.polish/weekday.xpm   |  48 +++++++++++++++++
 month.xpm                 |   1 +
 weekday.xpm               |   1 +
 wmclock.c                 |  99 ++++++++++++++++++++++++-----------
 wmclock.man.in            |   5 +-
 wmclock.spec              | 128 ----------------------------------------------
 wmclock.spec.in           |   2 +-
 16 files changed, 378 insertions(+), 168 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c1fd14f..f748682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,23 @@
    cvs2cl.pl.  See http://www.red-bean.com/~kfogel/cvs2cl.shtml for more.
   -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+- -+-
 
+2010-12-03 20:28  brucec
+	* Imakefile: Bumped version to 1.0.13, add warning flags.
+	
+	* INSTALL: Updated compiler and flags example.
+
+	* wmclock.c, weekday.xpm: Integrated Debian nopolling patch and 
+	FreeBSD's weekday and year patches. Added function prototypes.
+
+	* wmclock.spec.in: Bumped version to 1.0.13, changed ExecPrefix to 
+	/usr/local since /usr/X11R6 is obsolete.
+
+	* lang.polish: Added Polish language files, contributed by 
+	oyd11 at softhome.net
+
+	* lang.croatian: Added Croatian language files, contributed by Josip
+	Deanovic <djosip at croadria.com>
+
 2000-04-13 07:49  jmknoble
 
 	* wmclock.spec.in: Add ChangeLog to %%doc directory.
diff --git a/INSTALL b/INSTALL
index aade52e..8a7e943 100644
--- a/INSTALL
+++ b/INSTALL
@@ -30,7 +30,7 @@ System.
       options for the C compiler using the `CC' and `CDEBUGFLAGS'
       variables, respectively.  For example:
       
-          make CC=egcs CDEBUGFLAGS='-O6 -mpentium'
+          make CC=clang CDEBUGFLAGS='-O4 -march=pentium2'
 
 
   (3) Test wmclock:
@@ -51,7 +51,7 @@ System.
       
           make install.share
 
-  (5) You're done.  See the README me file accompanying this one for
+  (5) You're done.  See the README file accompanying this one for
       instructions on installing wmclock into Window Maker's dock.
 
 -- 
diff --git a/Imakefile b/Imakefile
index 91c6879..2c0f828 100644
--- a/Imakefile
+++ b/Imakefile
@@ -1,10 +1,13 @@
 NAME		= wmclock
-VERSION		= 1.0.12.2
-DATE		= 2000-Apr-13
+VERSION		= 1.0.12.3
+DATE		= 2010-Dec-03
 
 MAKE_CHANGELOG	= cvs2cl
 
 DEFINES		= -DVERSION=\"$(VERSION)\"
+CFLAGS         += -Wall -pedantic -Wshadow -Wmissing-prototypes -Wcast-align 
+CFLAGS         += -Wcast-qual -Wchar-subscripts -Wpointer-arith 
+CFLAGS         += -Wredundant-decls -Wstrict-prototypes
 
 XPMLIB		= -L/usr/lib/X11 -lXpm   
 DEPLIBS		= $(DEPXLIB) 
diff --git a/lang.croatian/month.xpm b/lang.croatian/month.xpm
new file mode 100644
index 0000000..18ee155
--- /dev/null
+++ b/lang.croatian/month.xpm
@@ -0,0 +1,82 @@
+/* XPM */
+static char * month_xpm[] = {
+"22 72 7 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #AAAAAA",
+"@	c #000000",
+"#	c #555555",
+"$	c #AEAAAE",
+"%	c #515551",
+"......................",
+"...+@@@@.... at ......@..",
+"... at .......+@.....+ at ..",
+"...+@@+.... at +.....@+..",
+"...... at ...@@... at ..@...",
+"..@@@@+... at .....@@....",
+"......................",
+". at ...@..@@@@@.. at .....@",
+". at +.@+.+ at .....+@....+@",
+".+ at .@..@@@@... at +....@+",
+"..@@... at .....@+.. at ..@.",
+".. at ...#@@@@..@@@..@@..",
+"..........@@..........",
+"..+@@@..@@@@@@.. at ..$@.",
+".. at ...@....$@..$@.. at ..",
+".+ at ..@+...@$...@$.$@..",
+". at ...@..$@$.... at ..@...",
+".@@@@..$@@@@@@.%@@....",
+"......................",
+"..@@@@@..@@@@@.... at ...",
+"...+ at ....@... at ....@...",
+"... at +...@@@@@.... at .@..",
+"..+ at ....@... at ...@@@@..",
+".. at ....@.... at ..@... at ..",
+"......................",
+"...+@@@@.. at ...@.... at ..",
+"... at ......@+. at +...+@..",
+"...+@@+...+ at .@.... at +..",
+"...... at ....@@....@@...",
+"..@@@@+.... at .....@....",
+"......................",
+".... at .....@....@@@@@..",
+"...+ at ....+@...+ at ...@..",
+"... at +....@+...@@@@@...",
+".. at +....@@.... at .......",
+"..@@@... at ....@........",
+"......................",
+"..+@@@@..@@@@@..@@@@@.",
+".. at ......@... at .+@... at .",
+"..+@@+..@@@@@..@@@@@..",
+"..... at ..@... at ..@......",
+".@@@@+. at ....@. at .......",
+"......................",
+"..... at ..@..+@@@.... at ..",
+"....+ at .@... at ...@..+ at ..",
+"....@@@...+ at ..@+.. at +..",
+"...#@.. at ..@... at ..@+...",
+"..+ at ...@..@@@@...@@@..",
+"......................",
+"....@@@@@.. at ..$@.... at .",
+".... at ...@.$@.. at ....+@.",
+"...@@@@@..@$.$@.... at +.",
+"... at ...@.. at ..@.. at ..@..",
+".. at ....@..%@@....@@...",
+"......................",
+"..... at .....@...+@@@@..",
+"....+ at ....+@... at ......",
+".... at +....@+...+@@+...",
+"... at +....@@....... at ...",
+"...@@@... at ....@@@@+...",
+"......................",
+"...+@@@@.@@@@@.. at ..$@.",
+"... at ......+@...$@.. at ..",
+"...+@@+... at +...@$.$@..",
+"...... at ..+@.... at ..@...",
+"..@@@@+.. at .....%@@....",
+"......................",
+"...@@@@@..@@@@@..+@@@.",
+"..+ at ...@.. at ...@.. at ...@",
+"..@@@@@..@@@@@..+ at ..@+",
+".. at ......@... at ..@... at .",
+". at ......@.... at ..@@@@.."};
diff --git a/lang.croatian/weekday.xpm b/lang.croatian/weekday.xpm
new file mode 100644
index 0000000..ab92c6c
--- /dev/null
+++ b/lang.croatian/weekday.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * weekday_xpm[] = {
+"20 42 3 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #000000",
+"....................",
+".++++...++++..+...+.",
+".+...+.+....+.++..+.",
+".++++..+....+.+.+.+.",
+".+.....+....+.+..++.",
+".+......++++..+...+.",
+"....................",
+".+...+.+++++..++++..",
+".+...+...+...+....+.",
+".+...+...+...+....+.",
+".+...+...+...+....+.",
+"..+++....+....++++..",
+"....................",
+"..++++.+++++..+++++.",
+".+.....+....+...+...",
+"..+++..+++++....+...",
+".....+.+...+....+...",
+".++++..+....+.+++++.",
+"...++...............",
+"..++++.+++++.+++++..",
+".+.....+.......+....",
+".+.....++++....+....",
+".+.....+.......+....",
+"..++++.+++++...+....",
+"....................",
+".++++..+++++.+++++..",
+".+...+.+.......+....",
+".++++..++++....+....",
+".+.....+.......+....",
+".+.....+++++...+....",
+"....................",
+"..++++.+....+.++++..",
+".+.....+....+.+...+.",
+"..+++..+....+.++++..",
+".....+.+....+.+...+.",
+".++++...++++..++++..",
+"....................",
+".+...+.+++++.++++...",
+".++..+.+.....+...+..",
+".+.+.+.++++..+...+..",
+".+..++.+.....+...+..",
+".+...+.+++++.++++..."};
diff --git a/lang.english/weekday.xpm b/lang.english/weekday.xpm
index 2d6803a..ae49bb5 100644
--- a/lang.english/weekday.xpm
+++ b/lang.english/weekday.xpm
@@ -27,11 +27,11 @@ static char *weekday_xpm[] = {
 "b..bb..b.bbbbb.bbb.b",
 "b.bbbb.b.....b....bb",
 "bbbbbbbbbbbbbbbbbbbb",
-"b.....b.bbb.b.....bb",
+"b.....b.bbb.b.bbbb.b",
 "bbb.bbb.bbb.b.bbbb.b",
-"bbb.bbb.....b.....bb",
-"bbb.bbb.bbb.b.bbb.bb",
+"bbb.bbb.....b.bbbb.b",
 "bbb.bbb.bbb.b.bbbb.b",
+"bbb.bbb.bbb.bb....bb",
 "bbbbbbbbbbbbbbbbbbbb",
 "b.....b.....bb.....b",
 "b.bbbbb.bbbb.bbb.bbb",
diff --git a/lang.polish/month.txt b/lang.polish/month.txt
new file mode 100644
index 0000000..5ea18f9
--- /dev/null
+++ b/lang.polish/month.txt
@@ -0,0 +1,12 @@
+styczeń         (january)
+luty
+marzec
+kwiecień
+maj
+czerwiec
+lipiec
+sierpień
+wrzesień
+październik
+listopad
+grudzień
diff --git a/lang.polish/month.xpm b/lang.polish/month.xpm
new file mode 100644
index 0000000..efc646a
--- /dev/null
+++ b/lang.polish/month.xpm
@@ -0,0 +1,79 @@
+/* XPM */
+static char * month_xpm[] = {
+"22 72 4 1",
+" 	c #FFFFFFFFFFFF",
+"X	c #000000000000",
+".	c #AEBAAAAAAEBA",
+"o	c #514455555144",
+"                      ",
+"   .XXX.  XXXXX X   X ",
+"   X   X    X   X. X. ",
+"   XXX     X.    X.   ",
+" X   X    X.     X    ",
+" .XXX.   X.     .X    ",
+"                      ",
+"   XX   .X  .X XXXXX. ",
+"  XX    X   X.   X.   ",
+"  XX    X  .X    X.   ",
+" XX.    X  .X   X.    ",
+" XXXXXX XXXX.   X.    ",
+"                      ",
+" X  X  X    .XX .XXXXX",
+" X.XX  X    X X    .X ",
+"X X.X X X  .XX.   .X  ",
+"X X X XXX  X  X .X    ",
+"X   X X  X X  X XXXXX.",
+"                      ",
+"  .X  X. .X  X .X  .X ",
+"  X  XX  X  X  X   XX ",
+" .XX.   .X oX X   .X. ",
+".X  X.  X o.X X   XX  ",
+"XX   X. .X   X   .X   ",
+"                      ",
+"  X    X    X      X  ",
+"  X. .XX    X      X  ",
+" X X X X   X X     X  ",
+" X  X  X  XXXX .  X.  ",
+"X      X X   X .XXX   ",
+"                      ",
+" .XXXX XXXXo .XXX .XXo",
+" X       oX  X    X  X",
+".X     oX    XXX  XXo ",
+"X     oX    X.   X  X ",
+"XXXXX XXXXo XXX  X   X",
+"                      ",
+"  XX     X   .XXX.    ",
+"  XX     X   X   X    ",
+" X.     XX   XXXX.    ",
+".XX     X   X         ",
+"XXXXXX X.  .X         ",
+"                      ",
+"   .XXX.  X  XXX  XXX.",
+"   X   X  X X.    X  X",
+"   XXX   X. XXXX .XXX.",
+" X   X   X. X    X. X ",
+" .XXX.  X. XXXX. X   X",
+"                      ",
+" .X  X .X .XX  .XXXXXo",
+" X  X  X  X  X     oX ",
+".X oX X  .XXX.   oX   ",
+"X o X X  X. X   oX    ",
+".X   X   X   X oXXXXX.",
+"               oX.    ",
+"  XXXX   X     .      ",
+" X   X   X   XXXXo    ",
+" XXXX.  X X    oX     ",
+"XX     XXXX oXX       ",
+"X.    X   X XXXXXX    ",
+"                      ",
+"  XX   oX oXXX  XXXXXX",
+"  X    X  Xo  o   Xo  ",
+" XX   oX  oX     XX   ",
+" X    X o   X   XX    ",
+"XXXXX X  XXXo   XX    ",
+"                      ",
+" XXXXXo .XXXo  X  X   ",
+" X      X   X  X  X   ",
+"X. oXX .XXXo  .X  X   ",
+"X    X X. X   X  X.   ",
+"XXXXXX X   X  oXXX    "};
diff --git a/lang.polish/weekday.txt b/lang.polish/weekday.txt
new file mode 100644
index 0000000..582398e
--- /dev/null
+++ b/lang.polish/weekday.txt
@@ -0,0 +1,7 @@
+niedziela        (sunday)
+poniedziałek
+wtorek
+środa
+czwartek
+piątek
+sobota
diff --git a/lang.polish/weekday.xpm b/lang.polish/weekday.xpm
new file mode 100644
index 0000000..d484ae4
--- /dev/null
+++ b/lang.polish/weekday.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * weekday_xpm[] = {
+"20 42 3 1",
+" 	c #FFFFFFFFFFFF",
+".	c #000000000000",
+"X	c #BEFBBEFBBEFB",
+"                    ",
+" ....   ....  .   . ",
+" .   . .X  X. .X  . ",
+" ....  .    . . . . ",
+" .     .X  X. .  X. ",
+" .      ....  .  .. ",
+"                    ",
+" .  X  . .....  ..  ",
+" .  .  .   .   . X. ",
+" .  .  .   .   ...  ",
+"  . . .    .   .  . ",
+"   . .     .   .  . ",
+"   .X               ",
+"  ...X ....  ...    ",
+" .     .  X. .X .   ",
+"  ...  ....  .  .   ",
+"     . .  .  .  .   ",
+" X...  .   . ...    ",
+"                    ",
+" .... ..... .     . ",
+" .       X. .  X  . ",
+" .     X.   .  .  . ",
+" .    X.     . . .  ",
+" .... .....   . .   ",
+"                    ",
+" ....   .....  .  .X",
+" .   .    .    . .X ",
+" ....     .    ..X  ",
+" .        .    . .X ",
+" .        .    .  .X",
+"                    ",
+"  ....  ...   ....  ",
+" .     .X X.  .   . ",
+"  ...  .   .  ....  ",
+"     . .X X.  .   . ",
+" ....   ...   ....  ",
+"                    ",
+" ..   .  ....  ..... ",
+" .X.  .  .X  .     . ",
+" . .  .  .   .   X.  ",
+" .  .X.  .X  . X.    ",
+" .   ..  ....  ..... "};
diff --git a/month.xpm b/month.xpm
new file mode 120000
index 0000000..9d65086
--- /dev/null
+++ b/month.xpm
@@ -0,0 +1 @@
+./lang.english/month.xpm
\ No newline at end of file
diff --git a/weekday.xpm b/weekday.xpm
new file mode 120000
index 0000000..f7e9add
--- /dev/null
+++ b/weekday.xpm
@@ -0,0 +1 @@
+./lang.english/weekday.xpm
\ No newline at end of file
diff --git a/wmclock.c b/wmclock.c
index 5844331..fe18e3b 100644
--- a/wmclock.c
+++ b/wmclock.c
@@ -20,6 +20,7 @@
  * with the software or the use or other dealings in the software.
  */
 
+#include <sys/select.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/time.h>
@@ -116,6 +117,30 @@
 #include "xpm/mask.xbm"
 #include "xpm/mask.xpm"
 
+typedef struct _XpmIcon {
+    Pixmap        pixmap;
+    Pixmap        mask;
+    XpmAttributes attributes;
+} XpmIcon;
+
+void showUsage(void);
+void showVersion(void);
+int buildCommand(char *, char **, int *, int *);
+void executeCommand(char *);
+void showError(const char *, const char*);
+void showFatalError(const char *, const char*);
+void GetXpms(void);
+int flushExposeEvents(Window);
+void redrawWindow(XpmIcon *);
+Pixel GetColor(const char *);
+int mytime(void);
+void showYear(void);
+void showTime12(void);
+void showTime24(void);
+void showTime(void);
+char* extractProgName(char *);
+int processArgs(int, char **);
+
 /**********************************************************************/
 int enable12HourClock = 0;	/* default value is 24h format */
 int enableShapedWindow = 1;	/* default value is noshape */
@@ -141,7 +166,8 @@ int yPos[NUM_Y_POSITIONS];
 Display    *dpy;
 Window     rootWindow;
 int        screen;
-/* int        xFd; */
+int        xFd;
+fd_set     xFdSet;
 int        displayDepth;
 XSizeHints sizeHints;
 XWMHints   wmHints;
@@ -168,12 +194,6 @@ int   useUserClockXpm = 0;
 int   useUserMonthXpm = 0;
 int   useUserWeekdayXpm = 0;
 
-typedef struct _XpmIcon {
-    Pixmap        pixmap;
-    Pixmap        mask;
-    XpmAttributes attributes;
-} XpmIcon;
-
 XpmIcon clockBg, led, months, dateNums, weekdays;
 XpmIcon visible;
 
@@ -195,6 +215,7 @@ char *usageText[] = {
 #endif /* !ONLY_SHAPED_WINDOW */
 "    -monthxpm <filename>    get month names from pixmap in <filename>",
 "    -weekdayxpm <filename>  get weekday names from pixmap in <filename>",
+"    -version                display the version",
 NULL
 };
 
@@ -202,7 +223,7 @@ char *version = VERSION;
 
 /**********************************************************************/
 /* Display usage information */
-void showUsage()
+void showUsage(void)
 {
    char **cpp;
    
@@ -230,10 +251,10 @@ int buildCommand(char *command, char **buf, int *buf_len, int *i)
    status = append_string_to_buf(buf, buf_len, i, command);
    if (APPEND_FAILURE == status)
     {
-       return(0);
+       return (0);
     }
    status = append_string_to_buf(buf, buf_len, i, " &");
-   return((APPEND_FAILURE == status) ? 0 : 1);
+   return ((APPEND_FAILURE == status) ? 0 : 1);
 }
 
 /* Execute the given shell command */
@@ -254,13 +275,13 @@ void executeCommand(char *command)
 }
 
 /* Display an error message */
-void showError(char *message, char *data)
+void showError(const char *message, const char *data)
 {
    fprintf(stderr,"%s: can't %s %s\n", progName, message, data);
 }
 
 /* Display an error message and exit */
-void showFatalError(char *message, char *data)
+void showFatalError(const char *message, const char *data)
 {
    showError(message, data);
    exit(1);
@@ -427,7 +448,7 @@ void redrawWindow(XpmIcon *v)
 }
 
 /* Get a Pixel for the given color name */
-Pixel GetColor(char *colorName)
+Pixel GetColor(const char *colorName)
 {
    XColor            color;
    XWindowAttributes attributes;
@@ -446,7 +467,7 @@ Pixel GetColor(char *colorName)
 }
 
 /* Fetch the system time and time zone */
-int mytime()
+int mytime(void)
 {
    struct timeval  tv;
    struct timezone tz;
@@ -457,7 +478,7 @@ int mytime()
 }
 
 /* Display the current year in the LED display */
-void showYear()
+void showYear(void)
 {
    int year;
    int digitXOffset;
@@ -470,11 +491,11 @@ void showYear()
    XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC,
 	     digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT,
 	     xPos[DIGIT_1_X_POS], yPos[DIGIT_Y_POS]);
-   digitXOffset = LED_NUM_WIDTH * (year % 1000);
+   digitXOffset = LED_NUM_WIDTH * ((year % 100) % 10);
    XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC,
 	     digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT,
 	     xPos[DIGIT_2_X_POS], yPos[DIGIT_Y_POS]);
-   digitXOffset = LED_NUM_WIDTH * (year % 100);
+   digitXOffset = LED_NUM_WIDTH * ((year / 10) % 10);
    XCopyArea(dpy, led.pixmap, visible.pixmap, normalGC,
 	     digitXOffset , digitYOffset, LED_NUM_WIDTH, LED_NUM_HEIGHT,
 	     xPos[DIGIT_3_X_POS], yPos[DIGIT_Y_POS]);
@@ -485,7 +506,7 @@ void showYear()
 }
 
 /* Display time in twelve-hour mode, with am/pm indicator */
-void showTime12()
+void showTime12(void)
 {
    int digitXOffset;
    int digitYOffset;
@@ -533,7 +554,7 @@ void showTime12()
 }
 
 /* Display time in 24-hour mode, without am/pm indicator */
-void showTime24()
+void showTime24(void)
 {
    int digitXOffset;
    int digitYOffset;
@@ -557,7 +578,7 @@ void showTime24()
 	     xPos[DIGIT_4_X_POS], yPos[DIGIT_Y_POS]);
 }
 
-void showTime()
+void showTime(void)
 {
    int xOffset;
    int yOffset;
@@ -648,7 +669,7 @@ char *extractProgName(char *argv0)
 	   prog_name++;
 	}
     }
-   return(prog_name);
+   return (prog_name);
 }
 
 /* Process program arguments and set corresponding options */
@@ -786,7 +807,7 @@ int processArgs(int argc, char **argv)
 	   showUsage();
 	}
     }
-   return(i);
+   return (i);
 }
 
 /**********************************************************************/
@@ -801,6 +822,7 @@ int main(int argc, char **argv)
    XTextProperty wmName;
    XClassHint    classHint;
    Pixmap        shapeMask;
+   struct timeval nextEvent;
    
    /* Parse command line options */
    progName = extractProgName(argv[0]);
@@ -842,7 +864,7 @@ int main(int argc, char **argv)
    screen       = DefaultScreen(dpy);
    rootWindow   = RootWindow(dpy, screen);
    displayDepth = DefaultDepth(dpy, screen);
-   /* xFd          = XConnectionNumber(dpy); */
+   xFd          = XConnectionNumber(dpy);
    
    /* Icon Daten nach XImage konvertieren */
    GetXpms();
@@ -1042,16 +1064,31 @@ int main(int argc, char **argv)
 	   poll((struct poll *) 0, (size_t) 0, 50);	/* 5/100 sec */
 	}
 #else
-       if (enableYearDisplay)
-	{
-	   usleep(200000L);	/* 1/5 sec */
-	}
+       /* We compute the date of next event, in order to avoid polling */
+       if (enableBlinking)
+	 {
+	   gettimeofday(&nextEvent,NULL);
+	   nextEvent.tv_sec = 0;
+	   nextEvent.tv_usec = 1000000-nextEvent.tv_usec;
+	 }
        else
-	{
-	   usleep(50000L);	/* 5/100 sec */
-	}
+	 {
+	   if (enableYearDisplay)
+	     {
+	       nextEvent.tv_sec = 86400-actualTime%86400;
+	       nextEvent.tv_usec = 0;
+	     }
+	   else
+	     {
+	       nextEvent.tv_sec = 60-actualTime%60;
+	       nextEvent.tv_usec = 0;
+	     }
+	 }
+       FD_ZERO(&xFdSet);
+       FD_SET(xFd,&xFdSet);
+       select(FD_SETSIZE,&xFdSet,NULL,NULL,&nextEvent);
 #endif
     }
-   return(0);
+   return (0);
 }
 
diff --git a/wmclock.man.in b/wmclock.man.in
index bf0f018..e7c719e 100644
--- a/wmclock.man.in
+++ b/wmclock.man.in
@@ -31,7 +31,7 @@ a dockable clock for the Window Maker window manager
 .\" ----------------------------------------------------------------
 .SH SYNOPSIS
 .HP
-\fBwmclock\fP [{\-12|\-24|\-year}] [\-noblink] [\-exe \fIprogram\fP]
+\fBwmclock\fP [{\-12|\-24|\-year}] [\-noblink] [\-version] [\-exe \fIprogram\fP]
 [\-led \fIcolor\fP] [\-monthxpm \fIfilename\fP] [\-weekdayxpm
 \fIfilename\fP]
 .\" ----------------------------------------------------------------
@@ -64,6 +64,9 @@ The separator between the hours and minutes in the time display blinks
 by default.  This option turns off the blinking and displays a steadily
 lit separator instead.
 .TP
+\fB\-version\fB
+Displays the version of Wmclock.
+.TP
 \fB\-exe\fR \fIcommand\fR
 Run
 .I command
diff --git a/wmclock.spec b/wmclock.spec
deleted file mode 100644
index 224f0f2..0000000
--- a/wmclock.spec
+++ /dev/null
@@ -1,128 +0,0 @@
-# User-Defined Macros:
-# %%define <name> <expansion>
-%define Name		wmclock
-%define Version		1.0.12.2
-%define Release		1
-%define Prefix		/usr
-%define ExecPrefix	/usr/X11R6
-Summary: dockable clock applet for Window Maker
-Name: %{Name}
-Version: %{Version}
-Release: %{Release}
-#Epoch: 
-Copyright: GPL
-Group: User Interface/X
-URL: http://www.pobox.com/~jmknoble/WindowMaker/wmclock/
-Source0: http://www.pobox.com/~jmknoble/WindowMaker/wmclock/%{Name}-%{Version}.tar.gz
-#Patch0: 
-#Prefix: %{Prefix}
-BuildRoot: /tmp/%{Name}-%{Version}-%{Release}-root
-#Provides: 
-#Requires: 
-#Obsoletes: 
-
-%description
-Wmclock is an applet which displays the date and time in a dockable
-tile in the same style as the clock from the NEXTSTEP(tm) operating
-system.  Wmclock is specially designed for the Window Maker window
-manager, by Alfredo Kojima, and features multiple language support,
-twenty-four-hour and twelve-hour (am/pm) time display, and, optionally,
-can run a user-specified program on a mouse click.  Wmclock is derived
-from asclock, a similar clock for the AfterStep window manager.
-
-%prep
-%setup
-#%patch0 -b .orig
-
-#function Replace() {
-#  local fil="$1"
-#  local sep="$2"
-#  local old="$3"
-#  local new="$4"
-#  local suf="$5"
-#  [ -z "${suf}" ] && suf='~'
-#  mv -f ${fil} ${fil}${suf}
-#  cat ${fil}${suf} | sed -e "s${sep}${old}${sep}${new}${sep}g" >$fil
-#}
-
-%build
-if [ -z "${CC}" ]; then
-  if [ -n "`which gcc`" ]; then
-    CC="gcc"
-  else
-    CC="cc"
-  fi
-fi
-export CC
-
-./configure --lang english
-make CC="${CC}" CDEBUGFLAGS="${RPM_OPT_FLAGS}"
-
-%install
-function CheckBuildRoot() {
-  # do a few sanity checks on the BuildRoot
-  # to make sure we don't damage a system
-  case "${RPM_BUILD_ROOT}" in
-    ''|' '|/|/bin|/boot|/dev|/etc|/home|/lib|/mnt|/root|/sbin|/tmp|/usr|/var)
-      echo "Yikes!  Don't use '${RPM_BUILD_ROOT}' for a BuildRoot!"
-      echo "The BuildRoot gets deleted when this package is rebuilt;"
-      echo "something like '/tmp/build-blah' is a better choice."
-      return 1
-    ;;
-    *) return 0
-    ;;
-  esac
-}
-function CleanBuildRoot() {
-  if CheckBuildRoot; then
-    rm -rf "${RPM_BUILD_ROOT}"
-  else
-    exit 1
-  fi
-}
-CleanBuildRoot
-
-for i in \
-  %{Prefix} \
-  %{Prefix}/share \
-  %{Prefix}/share/%{Name} \
-  %{ExecPrefix} \
-; do
-  mkdir -p "${RPM_BUILD_ROOT}${i}"
-done
-
-make DESTDIR="${RPM_BUILD_ROOT}" install
-make DESTDIR="${RPM_BUILD_ROOT}" install.man
-make DESTDIR="${RPM_BUILD_ROOT}" install.share
-
-%clean
-function CheckBuildRoot() {
-  # do a few sanity checks on the BuildRoot
-  # to make sure we don't damage a system
-  case "${RPM_BUILD_ROOT}" in
-    ''|' '|/|/bin|/boot|/dev|/etc|/home|/lib|/mnt|/root|/sbin|/tmp|/usr|/var)
-      echo "Yikes!  Don't use '${RPM_BUILD_ROOT}' for a BuildRoot!"
-      echo "The BuildRoot gets deleted when this package is rebuilt;"
-      echo "something like '/tmp/build-blah' is a better choice."
-      return 1
-    ;;
-    *) return 0
-    ;;
-  esac
-}
-function CleanBuildRoot() {
-  if CheckBuildRoot; then
-    rm -rf "${RPM_BUILD_ROOT}"
-  else
-    exit 1
-  fi
-}
-CleanBuildRoot
-
-%files
-%attr(-   ,root,root) %doc COPYING ChangeLog INSTALL README
-%attr(0755,root,root) %{ExecPrefix}/bin/wmclock
-%attr(0755,root,root) %{ExecPrefix}/man/man1/wmclock.1*
-%attr(0755,root,root) %dir %{Prefix}/share/wmclock
-%attr(-   ,root,root) %{Prefix}/share/wmclock/*
-
diff --git a/wmclock.spec.in b/wmclock.spec.in
index 328f589..39bc603 100644
--- a/wmclock.spec.in
+++ b/wmclock.spec.in
@@ -4,7 +4,7 @@
 %define Version		@VERSION@
 %define Release		1
 %define Prefix		/usr
-%define ExecPrefix	/usr/X11R6
+%define ExecPrefix	/usr/local
 Summary: dockable clock applet for Window Maker
 Name: %{Name}
 Version: %{Version}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmclock.git



More information about the Pkg-wmaker-commits mailing list