In particular, - Remove reference to deprecated X11R6 directory. - Replace FLAGS variable with CFLAGS, CPPFLAGS, and LDFLAGS. - Honor CC, PREFIX, and DESTDIR variables. - Use INSTALL instead of cp for installation. - Remove redundant -lXext flag. - Move contents of wmitime directory to top directory to ease the building process.
Inspired in part by the Debian patches [1,2]. [1] http://sources.debian.net/src/wmitime/0.3%2B20120605-1/debian/patches/20-makefile-CC.patch/ [2] http://sources.debian.net/src/wmitime/0.3%2B20120605-1/debian/patches/make-install.patch/ --- wmitime/Makefile | 30 ++ wmitime/README | 1 - wmitime/french.h | 30 ++ wmitime/language.h | 35 ++ wmitime/wmitime-master-led.xpm | 135 ++++++ wmitime/wmitime-master.xpm | 135 ++++++ wmitime/wmitime.c | 721 +++++++++++++++++++++++++++++++++ wmitime/wmitime/Makefile | 47 --- wmitime/wmitime/french.h | 30 -- wmitime/wmitime/language.h | 35 -- wmitime/wmitime/wmitime-master-led.xpm | 135 ------ wmitime/wmitime/wmitime-master.xpm | 135 ------ wmitime/wmitime/wmitime.c | 721 --------------------------------- 13 files changed, 1086 insertions(+), 1104 deletions(-) create mode 100644 wmitime/Makefile create mode 100644 wmitime/french.h create mode 100644 wmitime/language.h create mode 100644 wmitime/wmitime-master-led.xpm create mode 100644 wmitime/wmitime-master.xpm create mode 100644 wmitime/wmitime.c delete mode 100644 wmitime/wmitime/Makefile delete mode 100644 wmitime/wmitime/french.h delete mode 100644 wmitime/wmitime/language.h delete mode 100644 wmitime/wmitime/wmitime-master-led.xpm delete mode 100644 wmitime/wmitime/wmitime-master.xpm delete mode 100644 wmitime/wmitime/wmitime.c diff --git a/wmitime/Makefile b/wmitime/Makefile new file mode 100644 index 0000000..c928067 --- /dev/null +++ b/wmitime/Makefile @@ -0,0 +1,30 @@ +#LANG = fr +LIBS = -lXpm -lXext -lX11 -lm +CFLAGS = -O2 -Wall +OBJS = wmitime.o \ + wmgeneral/wmgeneral.o \ + wmgeneral/misc.o \ + wmgeneral/list.o +INSTALL = install +PREFIX = /usr/local +BINDIR = $(PREFIX)/bin + +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -D$(LANG) -c $< -o $*.o + +wmitime: $(OBJS) + $(CC) $(LDFLAGS) -o wmitime $^ $(LIBS) + +all:: wmtime + +clean:: + for i in $(OBJS) ; do \ + rm -f $$i ; \ + done + rm -f wmitime + rm -f *~ + +install:: wmitime + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) wmitime $(DESTDIR)$(BINDIR) + @echo "wmitime Installation finished..." diff --git a/wmitime/README b/wmitime/README index 1b8caf2..c26ffa8 100644 --- a/wmitime/README +++ b/wmitime/README @@ -20,7 +20,6 @@ Let me know what you think of it. ;) Installing -------------------------------------------------------------- -cd wmitime make make install diff --git a/wmitime/french.h b/wmitime/french.h new file mode 100644 index 0000000..17d86f0 --- /dev/null +++ b/wmitime/french.h @@ -0,0 +1,30 @@ +// french.h +// Created by [email protected] +// 08-jan-1999 + +static char daynames[7][3] = +{ + {"Di"}, + {"Lu"}, + {"Ma"}, + {"Me"}, + {"Je"}, + {"Ve"}, + {"Sa"} +}; + +static char monthnames[12][4] = +{ + {"Jan"}, + {"Fev"}, + {"Mar"}, + {"Avr"}, + {"Mai"}, + {"Jun"}, + {"Jui"}, + {"Aou"}, + {"Sep"}, + {"Oct"}, + {"Nov"}, + {"Dec"} +}; diff --git a/wmitime/language.h b/wmitime/language.h new file mode 100644 index 0000000..88b67a1 --- /dev/null +++ b/wmitime/language.h @@ -0,0 +1,35 @@ +// language.h + +static char daynames[7][3] = +{ + {"Su"}, + {"Mo"}, + {"Tu"}, + {"We"}, + {"Th"}, + {"Fr"}, + {"Sa"} +}; + +static char monthnames[12][4] = +{ + {"Jan"}, + {"Feb"}, + {"Mar"}, + {"Apr"}, + {"May"}, + {"Jun"}, + {"Jul"}, + {"Aug"}, + {"Sep"}, + {"Oct"}, + {"Nov"}, + {"Dec"} +}; + + + + + + + diff --git a/wmitime/wmitime-master-led.xpm b/wmitime/wmitime-master-led.xpm new file mode 100644 index 0000000..ede97a7 --- /dev/null +++ b/wmitime/wmitime-master-led.xpm @@ -0,0 +1,135 @@ +/* XPM */ +static char * wmitime_master_xpm[] = { +"240 100 32 1", +". c #0000FF", +" c None", +"+ c #202020", +"@ c #000000", +"# c #C7C3C7", +"$ c #004941", +"% c #020205", +"& c #010101", +"* c #040405", +"= c #000001", +"- c #04040C", +"; c #000002", +"> c #060609", +", c #20B2AE", +"' c #107D79", +") c #188A86", +"! c #070707", +"~ c #020202", +"{ c #020203", +"] c #FFFFFF", +"^ c #20B1AD", +"/ c #20B0AC", +"( c #20AEAA", +"_ c #007D71", +": c #B60418", +"< c #00EB00", +"[ c #283C38", +"} c #F7F3FF", +"| c #71E371", +"1 c #494949", +"2 c #7A7A7A", +"3 c #BCBCBC", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...............................................................................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", +"....@#######################################################....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....................................@@@@@@@@@@@@@@@@@@@@@@@@....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....................................@++++++++++++++++++++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"................%@&@&*=.............@+++$$$+++$$$+++$$$++++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", +".............=@@@+++++@@@%..........@++$+++$+$+++$+$+++$+++#....+...............................................................................................................................................................................", +"...........-@@+++++++++++@@;........@++$+++$+$+++$+$+++$+++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +"..........>@+++++++++++++++@>.......@+++$$$+++$$$+++$$$++++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".........*@+++++++++++++++++@*......@++$+++$+$+++$+$+++$+++#....+..+++,,,,+++$$$$'+',,,,)+',,,,'+'$$$$'+',,,,'+',,,,)+',,,,'+',,,,)+',,,,)++++++................................................................................................", +"........&@+++++++++++++++++++@>.....@++$+++$+$+++$+$+++$+++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", +".......;@+++++++++++++++++++++@-....@+++$$$+++$$$+++$$$++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", +".......@+++++++++++++++++++++++@....@++++++++++++++++++++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++++++................................................................................................", +"......=@+++++++++++++++++++++++@%...@#######################....+..++'$$$$'++$$$$'+',,,,'+',,,,'+',,,,'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", +"......@+++++++++++++++++++++++++@...............................+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++++++................................................................................................", +"......@+++++++++++++++++++++++++@............!~@@@~!............+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", +".....{@+++++++++++++++++++++++++@#.........~@@+++++@@~..........+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", +".....@+++++++++++++++++++++++++++#.......!@@+++++++++@@!........+..+++,,,,+++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", +".....@+++++++++++++++++++++++++++#.......@+++++++++++++@........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".....@+++++++++++++@+++++++++++++#......~@+++++++++++++@~.......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".....@+++++++++++++++++++++++++++#......@+++++++++++++++@.......+...............................................................................................................................................................................", +".....@+++++++++++++++++++++++++++#.....!@+++++++++++++++@#......+........!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!........", +".....=@+++++++++++++++++++++++++##.....~+++++++++++++++++#......+......~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@,,,++@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~......", +"......@+++++++++++++++++++++++++#......@+++++++++++++++++#......+....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@,,,,,++++@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....", +"......@+++++++++++++++++++++++++#......@++++++++]++++++++#......+....@+++++++++++++@....@+++++++++++++@....@+++++++++++++@....@,++++++++++++@....@,,,,,,,++++++@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,^^^,,,,@....", +"......%@+++++++++++++++++++++++##......@+++++++++++++++++#......+...~@+++++++++++++@~..~@+++++++++++++@~..~@+++++++++++++@~..~@,,+++++++++++@~..~@,,,,,,,++++++@~..~@,,,,,,,,,,,,+@~..~@,,,,,,,,,,,,,@~..~@,,,,,,,,,,,,,@~..~@,,/,,,,,,,,/,@~...", +".......@+++++++++++++++++++++++#.......~+++++++++++++++++#......+...@+++++++++++++++@..@+++++++++++++++@..@+++++++++++++++@..@,,,,+++++++++++@..@,,,,,,,,+++++++@..@,,,,,,,,,,,,+++@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@...", +".......-@+++++++++++++++++++++##.......!@+++++++++++++++##......+..!@+++++++++++++++@#!@+++++++++++++++@#!@+++++++++++++++@#!@,,,,,++++++++++@#!@,,,,,,,,+++++++@#!@,,,,,,,,,,,++++@#!@,,,,,,,,,,,,,,,@#!@,,,,,,,,,,,,,,,@#!@,(,,,,,,,,,,,,(@#..", +"........>@+++++++++++++++++++##.........@+++++++++++++++#.......+..~+++++++++++++++++#~+++++++++++++++++#~+++++++++++++++++#~,,,,,,,++++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,,,++++++#~,,,,,,,,,,,,,,,,,#~,,,,,,,,,,,,,,,,,#~,,^,,,,,,,,,,,,^,#..", +".........*@+++++++++++++++++##..........@@+++++++++++++##.......+..@+++++++++++++++++#@+++++++++++++++++#@+++++++++++++++++#@,,,,,,,,+++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,+++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#@,,^,,,,,,,,,,,,^,#..", +"..........>@+++++++++++++++##............@+++++++++++++#........+..@++++++++@++++++++#@++++++++@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#..", +"...........-@@+++++++++++###.............@@@+++++++++###........+..@+++++++++++++++++#@+++++++,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#..", +".............%@@@+++++####.................@@@+++++###..........+..~+++++++++++++++++#~++++++,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,+,,,,,,,#~,,,,,,,,,,,,,,,,,#..", +"................#######......................#######............+..!@+++++++++++++++##!@++++,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,++,,,,,##!@,(,,,,,,,,,,,,,##..", +"................................................................+...@+++++++++++++++#..@+++,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++,,,,#..@,,,,,,,,,,,,,,,#...", +"....@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...@@+++++++++++++##..@@+,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++,,##..@@,,/,,,,,,,,/,##...", +"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+....@+++++++++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,+++++,#....@,,,,,^^^^^,,,#....", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+....@@@+++++++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,,,,,###....", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+......@@@+++++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,,,###......", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+........#######............#######............#######............#######............#######............#######............#######............#######............#######........", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....#################..@####################################....+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", +"++,,,+++$$$_+_,,,_+_,,,_+_$$$_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+++++++++++++++++++.................................................................................................................................................................", +"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++++++++++++,++++++..+::+..+<<+..+[[+...............................................................................................................................................", +"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++,++++,++++,++++++..:}::..<}<<..[[[[...............................................................................................................................................", +"+_$$$_++$$$_+_,,,_++,,,_+_,,,_+_,,,_+_,,,_++$$$_+$,,,$+_,,,_++_++++_+++,+++++++..::::..<<<<..[[[[...+,$|........................................................................................................................................", +"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,+++++++++++,+++++++..+::+..+<<+..+[[+...............................................................................................................................................", +"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,++,++++,++,++++++++.................................................................................................................................................................", +"++,,,+++$$$,+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++_++++_++,++++++++.................................................................................................................................................................", +"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", +"+$,,,$+_,,,++_,,,_+_,,,++_,,,_+_,,,_+_,,,_+_$$$_++$$$_++$$$_+_$$$_+_$$$++,$$$,+_,,,++_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_$$$_+_$$$_+_$$$_+_$$$_+_$$$_+_,,,_++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,+++,+,+++$+,,+,,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+,+++,+,+++,+$+++,++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,++,$+,+++$+,+,+,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+$,+,$+,+++,+$++,$++++................................................................................", +"+_,,,_+_,,,++_$$$++_$$$_+_,,,++_,,,++_$,,_+_,,,_++$$$_++$$$_+_,,$++_$$$++_$$$_+_$$$_+_$$$_+_,,,_+_,$$_+_,,,++_,,,_++$_$++_$$$_+_$$$_+_$$$_++$,$++_,,,_++$,$+++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,++,$+,+++$+,+++,+,+++,+,+++,+,+++$+,+,+,+,+++,+$+++,+$+,+$+,+++,+,+++,+,+,+,+$,+,$+$+++,+$,++$++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,+++,+,+++$+,+++,+,+++,+,+++,+,+++$+,++,,+,+++,+$+++,+$+,+$+,+++,+,+++,+,,+,,+,+++,+$+++,+,+++$++++................................................................................", +"+_$$$_+_,,,++_,,,_+,,,,++_,,,_+,$$$++_,,,_+_$$$_++$$$,+_,,,_+_$$$_+_,,,$+_$$$_+,$$$,+_,,,_+_$$$++_,,,_+_$$$_+_,,,_++$_$++$,,,,++,,,++,$$$,+_$$$,__,,,_+_,,,_++++................................................................................", +"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", +"................................................................................................................................................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", +".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"$_,.............................................................................................................................................................................................................................................", +"123.............................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................"}; diff --git a/wmitime/wmitime-master.xpm b/wmitime/wmitime-master.xpm new file mode 100644 index 0000000..ede97a7 --- /dev/null +++ b/wmitime/wmitime-master.xpm @@ -0,0 +1,135 @@ +/* XPM */ +static char * wmitime_master_xpm[] = { +"240 100 32 1", +". c #0000FF", +" c None", +"+ c #202020", +"@ c #000000", +"# c #C7C3C7", +"$ c #004941", +"% c #020205", +"& c #010101", +"* c #040405", +"= c #000001", +"- c #04040C", +"; c #000002", +"> c #060609", +", c #20B2AE", +"' c #107D79", +") c #188A86", +"! c #070707", +"~ c #020202", +"{ c #020203", +"] c #FFFFFF", +"^ c #20B1AD", +"/ c #20B0AC", +"( c #20AEAA", +"_ c #007D71", +": c #B60418", +"< c #00EB00", +"[ c #283C38", +"} c #F7F3FF", +"| c #71E371", +"1 c #494949", +"2 c #7A7A7A", +"3 c #BCBCBC", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...............................................................................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", +"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", +"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", +"....@#######################################################....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....................................@@@@@@@@@@@@@@@@@@@@@@@@....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", +"....................................@++++++++++++++++++++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", +"................%@&@&*=.............@+++$$$+++$$$+++$$$++++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", +".............=@@@+++++@@@%..........@++$+++$+$+++$+$+++$+++#....+...............................................................................................................................................................................", +"...........-@@+++++++++++@@;........@++$+++$+$+++$+$+++$+++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +"..........>@+++++++++++++++@>.......@+++$$$+++$$$+++$$$++++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".........*@+++++++++++++++++@*......@++$+++$+$+++$+$+++$+++#....+..+++,,,,+++$$$$'+',,,,)+',,,,'+'$$$$'+',,,,'+',,,,)+',,,,'+',,,,)+',,,,)++++++................................................................................................", +"........&@+++++++++++++++++++@>.....@++$+++$+$+++$+$+++$+++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", +".......;@+++++++++++++++++++++@-....@+++$$$+++$$$+++$$$++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", +".......@+++++++++++++++++++++++@....@++++++++++++++++++++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++++++................................................................................................", +"......=@+++++++++++++++++++++++@%...@#######################....+..++'$$$$'++$$$$'+',,,,'+',,,,'+',,,,'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", +"......@+++++++++++++++++++++++++@...............................+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++++++................................................................................................", +"......@+++++++++++++++++++++++++@............!~@@@~!............+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", +".....{@+++++++++++++++++++++++++@#.........~@@+++++@@~..........+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", +".....@+++++++++++++++++++++++++++#.......!@@+++++++++@@!........+..+++,,,,+++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", +".....@+++++++++++++++++++++++++++#.......@+++++++++++++@........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".....@+++++++++++++@+++++++++++++#......~@+++++++++++++@~.......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", +".....@+++++++++++++++++++++++++++#......@+++++++++++++++@.......+...............................................................................................................................................................................", +".....@+++++++++++++++++++++++++++#.....!@+++++++++++++++@#......+........!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!........", +".....=@+++++++++++++++++++++++++##.....~+++++++++++++++++#......+......~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@,,,++@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~......", +"......@+++++++++++++++++++++++++#......@+++++++++++++++++#......+....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@,,,,,++++@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....", +"......@+++++++++++++++++++++++++#......@++++++++]++++++++#......+....@+++++++++++++@....@+++++++++++++@....@+++++++++++++@....@,++++++++++++@....@,,,,,,,++++++@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,^^^,,,,@....", +"......%@+++++++++++++++++++++++##......@+++++++++++++++++#......+...~@+++++++++++++@~..~@+++++++++++++@~..~@+++++++++++++@~..~@,,+++++++++++@~..~@,,,,,,,++++++@~..~@,,,,,,,,,,,,+@~..~@,,,,,,,,,,,,,@~..~@,,,,,,,,,,,,,@~..~@,,/,,,,,,,,/,@~...", +".......@+++++++++++++++++++++++#.......~+++++++++++++++++#......+...@+++++++++++++++@..@+++++++++++++++@..@+++++++++++++++@..@,,,,+++++++++++@..@,,,,,,,,+++++++@..@,,,,,,,,,,,,+++@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@...", +".......-@+++++++++++++++++++++##.......!@+++++++++++++++##......+..!@+++++++++++++++@#!@+++++++++++++++@#!@+++++++++++++++@#!@,,,,,++++++++++@#!@,,,,,,,,+++++++@#!@,,,,,,,,,,,++++@#!@,,,,,,,,,,,,,,,@#!@,,,,,,,,,,,,,,,@#!@,(,,,,,,,,,,,,(@#..", +"........>@+++++++++++++++++++##.........@+++++++++++++++#.......+..~+++++++++++++++++#~+++++++++++++++++#~+++++++++++++++++#~,,,,,,,++++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,,,++++++#~,,,,,,,,,,,,,,,,,#~,,,,,,,,,,,,,,,,,#~,,^,,,,,,,,,,,,^,#..", +".........*@+++++++++++++++++##..........@@+++++++++++++##.......+..@+++++++++++++++++#@+++++++++++++++++#@+++++++++++++++++#@,,,,,,,,+++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,+++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#@,,^,,,,,,,,,,,,^,#..", +"..........>@+++++++++++++++##............@+++++++++++++#........+..@++++++++@++++++++#@++++++++@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#..", +"...........-@@+++++++++++###.............@@@+++++++++###........+..@+++++++++++++++++#@+++++++,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#..", +".............%@@@+++++####.................@@@+++++###..........+..~+++++++++++++++++#~++++++,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,+,,,,,,,#~,,,,,,,,,,,,,,,,,#..", +"................#######......................#######............+..!@+++++++++++++++##!@++++,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,++,,,,,##!@,(,,,,,,,,,,,,,##..", +"................................................................+...@+++++++++++++++#..@+++,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++,,,,#..@,,,,,,,,,,,,,,,#...", +"....@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...@@+++++++++++++##..@@+,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++,,##..@@,,/,,,,,,,,/,##...", +"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+....@+++++++++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,+++++,#....@,,,,,^^^^^,,,#....", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+....@@@+++++++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,,,,,###....", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+......@@@+++++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,,,###......", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+........#######............#######............#######............#######............#######............#######............#######............#######............#######........", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +"....#################..@####################################....+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"................................................................+...............................................................................................................................................................................", +"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", +"++,,,+++$$$_+_,,,_+_,,,_+_$$$_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+++++++++++++++++++.................................................................................................................................................................", +"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++++++++++++,++++++..+::+..+<<+..+[[+...............................................................................................................................................", +"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++,++++,++++,++++++..:}::..<}<<..[[[[...............................................................................................................................................", +"+_$$$_++$$$_+_,,,_++,,,_+_,,,_+_,,,_+_,,,_++$$$_+$,,,$+_,,,_++_++++_+++,+++++++..::::..<<<<..[[[[...+,$|........................................................................................................................................", +"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,+++++++++++,+++++++..+::+..+<<+..+[[+...............................................................................................................................................", +"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,++,++++,++,++++++++.................................................................................................................................................................", +"++,,,+++$$$,+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++_++++_++,++++++++.................................................................................................................................................................", +"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", +"+$,,,$+_,,,++_,,,_+_,,,++_,,,_+_,,,_+_,,,_+_$$$_++$$$_++$$$_+_$$$_+_$$$++,$$$,+_,,,++_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_$$$_+_$$$_+_$$$_+_$$$_+_$$$_+_,,,_++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,+++,+,+++$+,,+,,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+,+++,+,+++,+$+++,++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,++,$+,+++$+,+,+,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+$,+,$+,+++,+$++,$++++................................................................................", +"+_,,,_+_,,,++_$$$++_$$$_+_,,,++_,,,++_$,,_+_,,,_++$$$_++$$$_+_,,$++_$$$++_$$$_+_$$$_+_$$$_+_,,,_+_,$$_+_,,,++_,,,_++$_$++_$$$_+_$$$_+_$$$_++$,$++_,,,_++$,$+++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,++,$+,+++$+,+++,+,+++,+,+++,+,+++$+,+,+,+,+++,+$+++,+$+,+$+,+++,+,+++,+,+,+,+$,+,$+$+++,+$,++$++++................................................................................", +"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,+++,+,+++$+,+++,+,+++,+,+++,+,+++$+,++,,+,+++,+$+++,+$+,+$+,+++,+,+++,+,,+,,+,+++,+$+++,+,+++$++++................................................................................", +"+_$$$_+_,,,++_,,,_+,,,,++_,,,_+,$$$++_,,,_+_$$$_++$$$,+_,,,_+_$$$_+_,,,$+_$$$_+,$$$,+_,,,_+_$$$++_,,,_+_$$$_+_,,,_++$_$++$,,,,++,,,++,$$$,+_$$$,__,,,_+_,,,_++++................................................................................", +"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", +"................................................................................................................................................................................................................................................", +"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", +".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", +".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", +".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"$_,.............................................................................................................................................................................................................................................", +"123.............................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................"}; diff --git a/wmitime/wmitime.c b/wmitime/wmitime.c new file mode 100644 index 0000000..e72d16a --- /dev/null +++ b/wmitime/wmitime.c @@ -0,0 +1,721 @@ +/* + + wmitime.c -- internet time clock + + by Dave Clark ([email protected]) (http://www.neotokyo.org/illusion) + + This software is licensed through the GNU General Public Lisence. + +*/ + +#include <stdlib.h> +#include <stdio.h> +#include <time.h> +#include <string.h> +#include <fcntl.h> +#include <unistd.h> +#include <ctype.h> +#include <math.h> + +#include <sys/wait.h> +#include <sys/stat.h> +#include <sys/param.h> +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/socket.h> + +#include <X11/Xlib.h> +#include <X11/xpm.h> +#include <X11/extensions/shape.h> + +#include "wmgeneral/wmgeneral.h" +#include "wmgeneral/misc.h" + +#ifdef fr_FR +#define fr +#endif + +#ifdef fr +#include "french.h" +#else +#include "language.h" +#endif + +#include "wmitime-master.xpm" +char wmitime_mask_bits[64*64]; +int wmitime_mask_width = 64; +int wmitime_mask_height = 64; + +#define WMITIME_VERSION "0.1" + +#define CHAR_WIDTH 5 +#define CHAR_HEIGHT 7 + +#define BCHAR_WIDTH 6 +#define BCHAR_HEIGHT 9 + +#define MY_PI (3.14159) + +extern char **environ; + +char *ProgName; + +char uconfig_file[256]; + +time_t curtime; +time_t prevtime; + +int prevhourx=19; +int prevhoury=33; +int prevminx=19; +int prevminy=33; + +static struct tm *clk; + +int TwelveHour=0; + +void usage(void); +void printversion(void); +void BlitString(char *name, int x, int y); +void BlitNum(int num, int x, int y); +void wmitime_routine(int, char **); +int PortWatch( short port ); +int ReadConfigInt(FILE *fp, char *setting, int *value); +int ReadConfigString(FILE *fp, char *setting, char *value); +int Read_Config_File( char *filename ); +void DrawInetTime(void); +void DrawStdTime(void); +void DrawDate(void); +void DrawInetWheel(void); +void DrawStdWheel(void); +void DrawLine(int x1, int y1, int x2, int y2, int sourcex, int sourcey); + +int main(int argc, char *argv[]) { + + int i; + + uconfig_file[0] = 0; + + /* Parse Command Line */ + + ProgName = argv[0]; + if (strlen(ProgName) >= 5) + ProgName += (strlen(ProgName) - 5); + + for (i=1; i<argc; i++) { + char *arg = argv[i]; + + if (*arg=='-') { + switch (arg[1]) { + case 'd' : + if (strcmp(arg+1, "display")) { + usage(); + exit(1); + } + break; + case 'g' : + if (strcmp(arg+1, "geometry")) { + usage(); + exit(1); + } + break; + case 'v' : + printversion(); + exit(0); + break; + case 'c' : + if (argc > (i+1)) + { + strcpy(uconfig_file, argv[i+1]); + i++; + } + break; + case '1' : + if (arg[2] == '2') + { + // Twelve-hour mode + TwelveHour = 1; + } + break; + default: + usage(); + exit(0); + break; + } + } + } + + wmitime_routine(argc, argv); + + return 0; +} + +/*******************************************************************************\ +|* wmitime_routine *| +\*******************************************************************************/ + +void wmitime_routine(int argc, char **argv) +{ + int i; + XEvent Event; + int but_stat = -1; + + +// char config_file[512]; + + createXBMfromXPM(wmitime_mask_bits, wmitime_master_xpm, wmitime_mask_width, wmitime_mask_height); + + openXwindow(argc, argv, wmitime_master_xpm, wmitime_mask_bits, wmitime_mask_width, wmitime_mask_height); + + AddMouseRegion(0, 5, 6, 58, 16); + + // We don't need a config file (yet)... + +#if 0 + // Read config file + + if (uconfig_file[0] != 0) + { + // user-specified config file + fprintf(stderr, "Using user-specified config file '%s'.\n", uconfig_file); + Read_Config_File(uconfig_file); + } + else + { + sprintf(config_file, "%s/.wmitimerc", getenv("HOME")); + + if (!Read_Config_File(config_file)) + { + // Fall back to /etc/wminetrc + sprintf(config_file, "/etc/wmitimerc"); + + Read_Config_File(config_file); + } + } +#endif + + RedrawWindow(); + + prevtime = time(0) - 1; + + while (1) + { + curtime = time(0); + + if ( curtime > prevtime) + { + prevtime = curtime; + + clk = localtime(&curtime); + + // Update display + + DrawInetTime(); + + DrawStdTime(); + + DrawInetWheel(); + + DrawDate(); + + DrawStdWheel(); + + RedrawWindow(); + + } + + // X Events + while (XPending(display)) + { + XNextEvent(display, &Event); + switch (Event.type) + { + case Expose: + RedrawWindow(); + break; + case DestroyNotify: + XCloseDisplay(display); + exit(0); + break; + case ButtonPress: + i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); + + but_stat = i; + break; + case ButtonRelease: + i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); + + if (but_stat == i && but_stat >= 0) + { + switch (but_stat) + { + case 0 : + TwelveHour = (!TwelveHour); + prevtime--; + break; + case 1 : + break; + case 2: + break; + case 3: + break; + case 4: + break; + + } + } + but_stat = -1; +// RedrawWindow(); + break; + } + } + + usleep(100000); + } +} + + +void DrawInetTime(void) +{ + int iTime; + + // Compute Inet Time + iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); + iTime=iTime+((timezone-1)+3600); + if (clk->tm_isdst) + iTime-=3600; + iTime=(iTime*1000)/86400; + + if (iTime >= 1000) + iTime-=1000; + else + if (iTime < 0) + iTime+=1000; + + // Blit it + + BlitNum(iTime, 38, 18); + +} + +void DrawStdTime(void) +{ + int xoff=0, yoff=0; + int srcx=0, srcy=0; + int i,j; + char blitstr[32]; + int len; + + i = clk->tm_hour; + + if (TwelveHour) + { + if (i > 12) + i-=12; + + if (i==0) + i=12; + + sprintf(blitstr, "%2i:%02i:%02i", i, clk->tm_min, clk->tm_sec); + } + else + { + sprintf(blitstr, "%02i:%02i:%02i", i, clk->tm_min, clk->tm_sec); + } + + + + len = strlen(blitstr); + + // Set starting co-ordinates... + xoff = 6; + yoff = 6; + + // Blit it. + for( i=0; i<len; i++) + { + if (blitstr[i] == ':') + { + copyXPMArea(138, 23, 4, BCHAR_HEIGHT, xoff, yoff); + xoff+=4; + } + else if (isdigit(blitstr[i])) + { + j = blitstr[i] - '0'; + srcx = 68; + srcy = 23; + + while (j) + { + j--; + srcx += (BCHAR_WIDTH + 1); + } + + copyXPMArea(srcx, srcy, BCHAR_WIDTH+1, BCHAR_HEIGHT, xoff, yoff); + xoff+=(BCHAR_WIDTH + 1); + } + else + { + copyXPMArea(66, 10, BCHAR_WIDTH+1, BCHAR_HEIGHT, xoff, yoff); + xoff+=(BCHAR_WIDTH + 1); + } + } + +} + +void DrawDate(void) +{ + char BlitStr[20]; + + sprintf(BlitStr, "%s", daynames[clk->tm_wday]); + BlitString( BlitStr, 6, 50); + +#ifdef fr + + // French date model + sprintf(BlitStr, "%s", monthnames[clk->tm_mon]); + BlitString( BlitStr, 40, 50); + + sprintf(BlitStr, "%02i", clk->tm_mday); + BlitString( BlitStr, 25, 50); +#else + + sprintf(BlitStr, "%s", monthnames[clk->tm_mon]); + BlitString( BlitStr, 25, 50); + + sprintf(BlitStr, "%02i", clk->tm_mday); + BlitString( BlitStr, 45, 50); + +#endif +} + +void DrawInetWheel(void) +{ + int WheelPos=0; + int i; + int xoff=0, yoff=0; + int iTime; + + // Calculate Wheel Position... + iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); + iTime=iTime+((timezone-1)+3600); + if (clk->tm_isdst) + iTime-=3600; + iTime=(iTime*1000)/8640; + + if (iTime >= 10000) + iTime-=10000; + else + if (iTime < 0) + iTime+=10000; + + iTime %= 10; + + WheelPos = floor( (iTime *8) / 10); + + // Draw the Wheel... + i=WheelPos; + yoff=35; + xoff=67; + + xoff+=19; + + while(i) + { + xoff +=19; + i--; + } + + copyXPMArea(xoff, yoff, 19, 19, 39, 29); + +} + + +void DrawStdWheel(void) +{ + //19x33 = center + //radius of 14 + + int sx, sy; + int cx, cy; + int dx, dy; + int hr; + double psi; + + cx=19; + cy=33; + + sx = 2; + sy = 97; + + // Hour Hand... + + DrawLine(cx, cy, prevhourx, prevhoury, 66, 9); // erase old line + + hr = (clk->tm_hour % 12); + + psi = hr * (M_PI / 6.0); + psi += clk->tm_min * (M_PI / 360); + + dx = floor(sin(psi) * 22 * 0.5 + 0.5); + dy = floor(-cos(psi) * 16 * 0.5 + 0.5); + + dx += cx; + dy += cy; + + prevhourx=dx; + prevhoury=dy; + + DrawLine(cx, cy, dx, dy, sx, sy); + + // Minute Hand... + + DrawLine(cx, cy, prevminx, prevminy, 66, 9); // erase old line + + cx=19; + cy=33; + sx = 2; + sy = 96; + + psi = clk->tm_min * (M_PI / 30.0); + psi += clk->tm_sec * (M_PI / 1800); + + dx = floor(sin(psi) * 22 * 0.7 + 0.5); + dy = floor(-cos(psi) * 16 * 0.7 + 0.5); + + dx += cx; + dy += cy; + + prevminx = dx; + prevminy = dy; + + + DrawLine(cx, cy, dx, dy, sx, sy); +} + +void DrawLine(int x1, int y1, int x2, int y2, int sourcex, int sourcey) +{ + int x, y; + int deltax, deltay; + int xs, ys; + + float xd=0, yd=0; + float xi, yi; + + x = x1; + y = y1; + + + if ( (x2-x1) < 0) + xs = -1; + else + xs = 1; + + if ( (y2-y1) < 0) + ys = -1; + else + ys = 1; + + deltax = abs( x2 - x1 ); + deltay = abs( y2 - y1 ); + + if (deltay !=0) + xi = (float) ((float)deltax / (float) deltay); + else + xi=0; + + if (deltax !=0) + yi = (float) ((float)deltay / (float) deltax); + else + yi=0; + + if ( deltax > deltay ) + { + for (x=x1; x!= x2; x+= xs) + { + yd += yi; + y += (int) (yd * ys); + + copyXPMArea(sourcex, sourcey, 1, 1, x, y); + + yd -= (int) yd; + } + } + else + { + for (y=y1; y!= y2; y+= ys) + { + xd += xi; + x += (int) (xd * xs); + + copyXPMArea(sourcex, sourcey, 1, 1, x, y); + + xd -= (int) xd; + } + } +} + + + +// Blits a string at given co-ordinates +void BlitString(char *name, int x, int y) +{ + int i; + int c; + int k; + + k = x; + for (i=0; name[i]; i++) + { + + c = toupper(name[i]); + if (c >= 'A' && c <= 'Z') + { // its a letter + c -= 'A'; + copyXPMArea(c * 6, 74, 6, 8, k, y); + k += 6; + } + else + { // its a number or symbol + c -= '0'; + copyXPMArea(c * 6, 64, 6, 8, k, y); + k += 6; + } + } + +} + +void BlitNum(int num, int x, int y) +{ + char buf[1024]; + int newx=x; + + sprintf(buf, "%03i", num); + + BlitString(buf, newx, y); +} + + +// ReadConfigSetting +int ReadConfigString(FILE *fp, char *setting, char *value) +{ + char str[1024]; + char buf[1024]; + int i; + int len; + int slen; + char *p=NULL; + + + if (!fp) + { + return 0; + } + + sprintf(str, "%s=", setting); + slen = strlen(str); + + fseek(fp, 0, SEEK_SET); + + while ( !feof(fp) ) + { + + if (!fgets(buf, 512, fp)) + break; + + len = strlen(buf); + + // strip linefeed + for (i=0; i!=len; i++) + { + if (buf[i] == '\n') + { + buf[i] = 0; + } + } + + //printf("Scanning '%s'...\n", buf); + if ( strncmp(buf, str, strlen(str)) == 0) + { + // found our setting + + for(i=0; i!=slen; i++) + { + if ( buf[i] == '=' ) + { + p=buf+i+1; + strcpy(value, p); + return 1; + } + } + + } + } + + return 0; +} + +int ReadConfigInt(FILE *fp, char *setting, int *value) +{ + char buf[1024]; + + if (ReadConfigString(fp, setting, (char *) &buf)) + { + *value = atoi(buf); + return 1; + } + + return 0; +} + +int Read_Config_File( char *filename ) +{ + FILE *fp; + + fp = fopen(filename, "r"); + if (fp) + { + + fclose(fp); + return 1; + } + else + { + perror("Read_Config_File"); + fprintf(stderr, "Unable to open %s, no settings read.\n", filename); + return 0; + } + +} + + + + + + + +/*******************************************************************************\ +|* usage *| +\*******************************************************************************/ + +void usage(void) +{ + fprintf(stderr, "\nWMiTIME - illusion <[email protected]> http://www.neotokyo.org/illusion\n\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, " -12 12-hour mode\n"); + fprintf(stderr, " -display <display name>\n"); + fprintf(stderr, " -geometry +XPOS+YPOS initial window position\n"); +// fprintf(stderr, " -c <filename> use specified config file\n"); + fprintf(stderr, " -h this help screen\n"); + fprintf(stderr, " -v print the version number\n"); + fprintf(stderr, "\n"); +} + +/*******************************************************************************\ +|* printversion *| +\*******************************************************************************/ + +void printversion(void) +{ + fprintf(stderr, "wmitime v%s\n", WMITIME_VERSION); +} diff --git a/wmitime/wmitime/Makefile b/wmitime/wmitime/Makefile deleted file mode 100644 index 1b1185d..0000000 --- a/wmitime/wmitime/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -#LANG = fr -LIBDIR = -L/usr/X11R6/lib -LIBS = -lXpm -lXext -lX11 -lm -FLAGS = -O2 -OBJS = wmitime.o \ - ../wmgeneral/wmgeneral.o \ - ../wmgeneral/misc.o \ - ../wmgeneral/list.o - - -.c.o: - cc -I/usr/X11R6/share/include $(FLAGS) -D$(LANG) -c -Wall $< -o $*.o - -wmtime: $(OBJS) - cc $(FLAGS) -D$(LANG) -o wmitime $^ -lXext $(LIBDIR) $(LIBS) - -all:: wmtime - -clean:: - for i in $(OBJS) ; do \ - rm -f $$i ; \ - done - rm -f wmitime - rm -f *~ - -install:: wmitime - cp -f wmitime /usr/local/bin/ - chmod 755 /usr/local/bin/wmitime - chown root:root /usr/local/bin/wmitime -# cp wminetrc $(HOME)/.wminetrc -# chmod 600 $(HOME)/.wminetrc -# cp wminetrc /etc/wminetrc -# chmod 644 /etc/wminetrc - @echo "wmitime Installation finished..." - - - - - - - - - - - - - diff --git a/wmitime/wmitime/french.h b/wmitime/wmitime/french.h deleted file mode 100644 index 17d86f0..0000000 --- a/wmitime/wmitime/french.h +++ /dev/null @@ -1,30 +0,0 @@ -// french.h -// Created by [email protected] -// 08-jan-1999 - -static char daynames[7][3] = -{ - {"Di"}, - {"Lu"}, - {"Ma"}, - {"Me"}, - {"Je"}, - {"Ve"}, - {"Sa"} -}; - -static char monthnames[12][4] = -{ - {"Jan"}, - {"Fev"}, - {"Mar"}, - {"Avr"}, - {"Mai"}, - {"Jun"}, - {"Jui"}, - {"Aou"}, - {"Sep"}, - {"Oct"}, - {"Nov"}, - {"Dec"} -}; diff --git a/wmitime/wmitime/language.h b/wmitime/wmitime/language.h deleted file mode 100644 index 88b67a1..0000000 --- a/wmitime/wmitime/language.h +++ /dev/null @@ -1,35 +0,0 @@ -// language.h - -static char daynames[7][3] = -{ - {"Su"}, - {"Mo"}, - {"Tu"}, - {"We"}, - {"Th"}, - {"Fr"}, - {"Sa"} -}; - -static char monthnames[12][4] = -{ - {"Jan"}, - {"Feb"}, - {"Mar"}, - {"Apr"}, - {"May"}, - {"Jun"}, - {"Jul"}, - {"Aug"}, - {"Sep"}, - {"Oct"}, - {"Nov"}, - {"Dec"} -}; - - - - - - - diff --git a/wmitime/wmitime/wmitime-master-led.xpm b/wmitime/wmitime/wmitime-master-led.xpm deleted file mode 100644 index ede97a7..0000000 --- a/wmitime/wmitime/wmitime-master-led.xpm +++ /dev/null @@ -1,135 +0,0 @@ -/* XPM */ -static char * wmitime_master_xpm[] = { -"240 100 32 1", -". c #0000FF", -" c None", -"+ c #202020", -"@ c #000000", -"# c #C7C3C7", -"$ c #004941", -"% c #020205", -"& c #010101", -"* c #040405", -"= c #000001", -"- c #04040C", -"; c #000002", -"> c #060609", -", c #20B2AE", -"' c #107D79", -") c #188A86", -"! c #070707", -"~ c #020202", -"{ c #020203", -"] c #FFFFFF", -"^ c #20B1AD", -"/ c #20B0AC", -"( c #20AEAA", -"_ c #007D71", -": c #B60418", -"< c #00EB00", -"[ c #283C38", -"} c #F7F3FF", -"| c #71E371", -"1 c #494949", -"2 c #7A7A7A", -"3 c #BCBCBC", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...............................................................................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", -"....@#######################################################....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....................................@@@@@@@@@@@@@@@@@@@@@@@@....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....................................@++++++++++++++++++++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"................%@&@&*=.............@+++$$$+++$$$+++$$$++++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", -".............=@@@+++++@@@%..........@++$+++$+$+++$+$+++$+++#....+...............................................................................................................................................................................", -"...........-@@+++++++++++@@;........@++$+++$+$+++$+$+++$+++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -"..........>@+++++++++++++++@>.......@+++$$$+++$$$+++$$$++++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".........*@+++++++++++++++++@*......@++$+++$+$+++$+$+++$+++#....+..+++,,,,+++$$$$'+',,,,)+',,,,'+'$$$$'+',,,,'+',,,,)+',,,,'+',,,,)+',,,,)++++++................................................................................................", -"........&@+++++++++++++++++++@>.....@++$+++$+$+++$+$+++$+++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", -".......;@+++++++++++++++++++++@-....@+++$$$+++$$$+++$$$++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", -".......@+++++++++++++++++++++++@....@++++++++++++++++++++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++++++................................................................................................", -"......=@+++++++++++++++++++++++@%...@#######################....+..++'$$$$'++$$$$'+',,,,'+',,,,'+',,,,'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", -"......@+++++++++++++++++++++++++@...............................+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++++++................................................................................................", -"......@+++++++++++++++++++++++++@............!~@@@~!............+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", -".....{@+++++++++++++++++++++++++@#.........~@@+++++@@~..........+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", -".....@+++++++++++++++++++++++++++#.......!@@+++++++++@@!........+..+++,,,,+++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", -".....@+++++++++++++++++++++++++++#.......@+++++++++++++@........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".....@+++++++++++++@+++++++++++++#......~@+++++++++++++@~.......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".....@+++++++++++++++++++++++++++#......@+++++++++++++++@.......+...............................................................................................................................................................................", -".....@+++++++++++++++++++++++++++#.....!@+++++++++++++++@#......+........!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!........", -".....=@+++++++++++++++++++++++++##.....~+++++++++++++++++#......+......~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@,,,++@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~......", -"......@+++++++++++++++++++++++++#......@+++++++++++++++++#......+....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@,,,,,++++@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....", -"......@+++++++++++++++++++++++++#......@++++++++]++++++++#......+....@+++++++++++++@....@+++++++++++++@....@+++++++++++++@....@,++++++++++++@....@,,,,,,,++++++@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,^^^,,,,@....", -"......%@+++++++++++++++++++++++##......@+++++++++++++++++#......+...~@+++++++++++++@~..~@+++++++++++++@~..~@+++++++++++++@~..~@,,+++++++++++@~..~@,,,,,,,++++++@~..~@,,,,,,,,,,,,+@~..~@,,,,,,,,,,,,,@~..~@,,,,,,,,,,,,,@~..~@,,/,,,,,,,,/,@~...", -".......@+++++++++++++++++++++++#.......~+++++++++++++++++#......+...@+++++++++++++++@..@+++++++++++++++@..@+++++++++++++++@..@,,,,+++++++++++@..@,,,,,,,,+++++++@..@,,,,,,,,,,,,+++@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@...", -".......-@+++++++++++++++++++++##.......!@+++++++++++++++##......+..!@+++++++++++++++@#!@+++++++++++++++@#!@+++++++++++++++@#!@,,,,,++++++++++@#!@,,,,,,,,+++++++@#!@,,,,,,,,,,,++++@#!@,,,,,,,,,,,,,,,@#!@,,,,,,,,,,,,,,,@#!@,(,,,,,,,,,,,,(@#..", -"........>@+++++++++++++++++++##.........@+++++++++++++++#.......+..~+++++++++++++++++#~+++++++++++++++++#~+++++++++++++++++#~,,,,,,,++++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,,,++++++#~,,,,,,,,,,,,,,,,,#~,,,,,,,,,,,,,,,,,#~,,^,,,,,,,,,,,,^,#..", -".........*@+++++++++++++++++##..........@@+++++++++++++##.......+..@+++++++++++++++++#@+++++++++++++++++#@+++++++++++++++++#@,,,,,,,,+++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,+++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#@,,^,,,,,,,,,,,,^,#..", -"..........>@+++++++++++++++##............@+++++++++++++#........+..@++++++++@++++++++#@++++++++@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#..", -"...........-@@+++++++++++###.............@@@+++++++++###........+..@+++++++++++++++++#@+++++++,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#..", -".............%@@@+++++####.................@@@+++++###..........+..~+++++++++++++++++#~++++++,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,+,,,,,,,#~,,,,,,,,,,,,,,,,,#..", -"................#######......................#######............+..!@+++++++++++++++##!@++++,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,++,,,,,##!@,(,,,,,,,,,,,,,##..", -"................................................................+...@+++++++++++++++#..@+++,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++,,,,#..@,,,,,,,,,,,,,,,#...", -"....@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...@@+++++++++++++##..@@+,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++,,##..@@,,/,,,,,,,,/,##...", -"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+....@+++++++++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,+++++,#....@,,,,,^^^^^,,,#....", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+....@@@+++++++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,,,,,###....", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+......@@@+++++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,,,###......", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+........#######............#######............#######............#######............#######............#######............#######............#######............#######........", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....#################..@####################################....+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", -"++,,,+++$$$_+_,,,_+_,,,_+_$$$_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+++++++++++++++++++.................................................................................................................................................................", -"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++++++++++++,++++++..+::+..+<<+..+[[+...............................................................................................................................................", -"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++,++++,++++,++++++..:}::..<}<<..[[[[...............................................................................................................................................", -"+_$$$_++$$$_+_,,,_++,,,_+_,,,_+_,,,_+_,,,_++$$$_+$,,,$+_,,,_++_++++_+++,+++++++..::::..<<<<..[[[[...+,$|........................................................................................................................................", -"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,+++++++++++,+++++++..+::+..+<<+..+[[+...............................................................................................................................................", -"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,++,++++,++,++++++++.................................................................................................................................................................", -"++,,,+++$$$,+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++_++++_++,++++++++.................................................................................................................................................................", -"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", -"+$,,,$+_,,,++_,,,_+_,,,++_,,,_+_,,,_+_,,,_+_$$$_++$$$_++$$$_+_$$$_+_$$$++,$$$,+_,,,++_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_$$$_+_$$$_+_$$$_+_$$$_+_$$$_+_,,,_++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,+++,+,+++$+,,+,,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+,+++,+,+++,+$+++,++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,++,$+,+++$+,+,+,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+$,+,$+,+++,+$++,$++++................................................................................", -"+_,,,_+_,,,++_$$$++_$$$_+_,,,++_,,,++_$,,_+_,,,_++$$$_++$$$_+_,,$++_$$$++_$$$_+_$$$_+_$$$_+_,,,_+_,$$_+_,,,++_,,,_++$_$++_$$$_+_$$$_+_$$$_++$,$++_,,,_++$,$+++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,++,$+,+++$+,+++,+,+++,+,+++,+,+++$+,+,+,+,+++,+$+++,+$+,+$+,+++,+,+++,+,+,+,+$,+,$+$+++,+$,++$++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,+++,+,+++$+,+++,+,+++,+,+++,+,+++$+,++,,+,+++,+$+++,+$+,+$+,+++,+,+++,+,,+,,+,+++,+$+++,+,+++$++++................................................................................", -"+_$$$_+_,,,++_,,,_+,,,,++_,,,_+,$$$++_,,,_+_$$$_++$$$,+_,,,_+_$$$_+_,,,$+_$$$_+,$$$,+_,,,_+_$$$++_,,,_+_$$$_+_,,,_++$_$++$,,,,++,,,++,$$$,+_$$$,__,,,_+_,,,_++++................................................................................", -"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", -"................................................................................................................................................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", -".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"$_,.............................................................................................................................................................................................................................................", -"123.............................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................"}; diff --git a/wmitime/wmitime/wmitime-master.xpm b/wmitime/wmitime/wmitime-master.xpm deleted file mode 100644 index ede97a7..0000000 --- a/wmitime/wmitime/wmitime-master.xpm +++ /dev/null @@ -1,135 +0,0 @@ -/* XPM */ -static char * wmitime_master_xpm[] = { -"240 100 32 1", -". c #0000FF", -" c None", -"+ c #202020", -"@ c #000000", -"# c #C7C3C7", -"$ c #004941", -"% c #020205", -"& c #010101", -"* c #040405", -"= c #000001", -"- c #04040C", -"; c #000002", -"> c #060609", -", c #20B2AE", -"' c #107D79", -") c #188A86", -"! c #070707", -"~ c #020202", -"{ c #020203", -"] c #FFFFFF", -"^ c #20B1AD", -"/ c #20B0AC", -"( c #20AEAA", -"_ c #007D71", -": c #B60418", -"< c #00EB00", -"[ c #283C38", -"} c #F7F3FF", -"| c #71E371", -"1 c #494949", -"2 c #7A7A7A", -"3 c #BCBCBC", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...............................................................................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+...............................................................................................................................................................................", -"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"....@++$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....@++$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", -"....@+++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+.+$++++$+$++++$+++++$++++$+$++++$+++++$++++$+$++++$+...........................................................................................................................", -"....@#######################################################....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....................................@@@@@@@@@@@@@@@@@@@@@@@@....+.+$++++$+$++++$++$++$++++$+$++++$++$++$++++$+$++++$+...........................................................................................................................", -"....................................@++++++++++++++++++++++#....+.++$$$$+++$$$$+++++++$$$$+++$$$$+++++++$$$$+++$$$$++...........................................................................................................................", -"................%@&@&*=.............@+++$$$+++$$$+++$$$++++#....+.+++++++++++++++++++++++++++++++++++++++++++++++++++...........................................................................................................................", -".............=@@@+++++@@@%..........@++$+++$+$+++$+$+++$+++#....+...............................................................................................................................................................................", -"...........-@@+++++++++++@@;........@++$+++$+$+++$+$+++$+++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -"..........>@+++++++++++++++@>.......@+++$$$+++$$$+++$$$++++#....+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".........*@+++++++++++++++++@*......@++$+++$+$+++$+$+++$+++#....+..+++,,,,+++$$$$'+',,,,)+',,,,'+'$$$$'+',,,,'+',,,,)+',,,,'+',,,,)+',,,,)++++++................................................................................................", -"........&@+++++++++++++++++++@>.....@++$+++$+$+++$+$+++$+++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", -".......;@+++++++++++++++++++++@-....@+++$$$+++$$$+++$$$++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++,+++................................................................................................", -".......@+++++++++++++++++++++++@....@++++++++++++++++++++++#....+..++,++++,+$++++,+$++++,+$++++,+,++++,+,++++$+,++++$+$++++,+,++++,+,++++,++++++................................................................................................", -"......=@+++++++++++++++++++++++@%...@#######################....+..++'$$$$'++$$$$'+',,,,'+',,,,'+',,,,'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", -"......@+++++++++++++++++++++++++@...............................+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++++++................................................................................................", -"......@+++++++++++++++++++++++++@............!~@@@~!............+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", -".....{@+++++++++++++++++++++++++@#.........~@@+++++@@~..........+..++,++++,+$++++,+,++++$+$++++,+$++++,+$++++,+,++++,+$++++,+,++++,+$++++,++,+++................................................................................................", -".....@+++++++++++++++++++++++++++#.......!@@+++++++++@@!........+..+++,,,,+++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++$$$$'+',,,,'+',,,,'++++++................................................................................................", -".....@+++++++++++++++++++++++++++#.......@+++++++++++++@........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".....@+++++++++++++@+++++++++++++#......~@+++++++++++++@~.......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................................", -".....@+++++++++++++++++++++++++++#......@+++++++++++++++@.......+...............................................................................................................................................................................", -".....@+++++++++++++++++++++++++++#.....!@+++++++++++++++@#......+........!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!............!~@@@~!........", -".....=@+++++++++++++++++++++++++##.....~+++++++++++++++++#......+......~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@+++++@@~........~@@,,,++@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~........~@@,,,,,@@~......", -"......@+++++++++++++++++++++++++#......@+++++++++++++++++#......+....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@+++++++++@@!....!@@,,,,,++++@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....!@@,,,,,,,,,@@!....", -"......@+++++++++++++++++++++++++#......@++++++++]++++++++#......+....@+++++++++++++@....@+++++++++++++@....@+++++++++++++@....@,++++++++++++@....@,,,,,,,++++++@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,,,,,,,,@....@,,,,,,^^^,,,,@....", -"......%@+++++++++++++++++++++++##......@+++++++++++++++++#......+...~@+++++++++++++@~..~@+++++++++++++@~..~@+++++++++++++@~..~@,,+++++++++++@~..~@,,,,,,,++++++@~..~@,,,,,,,,,,,,+@~..~@,,,,,,,,,,,,,@~..~@,,,,,,,,,,,,,@~..~@,,/,,,,,,,,/,@~...", -".......@+++++++++++++++++++++++#.......~+++++++++++++++++#......+...@+++++++++++++++@..@+++++++++++++++@..@+++++++++++++++@..@,,,,+++++++++++@..@,,,,,,,,+++++++@..@,,,,,,,,,,,,+++@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@..@,,,,,,,,,,,,,,,@...", -".......-@+++++++++++++++++++++##.......!@+++++++++++++++##......+..!@+++++++++++++++@#!@+++++++++++++++@#!@+++++++++++++++@#!@,,,,,++++++++++@#!@,,,,,,,,+++++++@#!@,,,,,,,,,,,++++@#!@,,,,,,,,,,,,,,,@#!@,,,,,,,,,,,,,,,@#!@,(,,,,,,,,,,,,(@#..", -"........>@+++++++++++++++++++##.........@+++++++++++++++#.......+..~+++++++++++++++++#~+++++++++++++++++#~+++++++++++++++++#~,,,,,,,++++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,,,++++++#~,,,,,,,,,,,,,,,,,#~,,,,,,,,,,,,,,,,,#~,,^,,,,,,,,,,,,^,#..", -".........*@+++++++++++++++++##..........@@+++++++++++++##.......+..@+++++++++++++++++#@+++++++++++++++++#@+++++++++++++++++#@,,,,,,,,+++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,+++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#@,,^,,,,,,,,,,,,^,#..", -"..........>@+++++++++++++++##............@+++++++++++++#........+..@++++++++@++++++++#@++++++++@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@++++++++#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#@,,,,,,,,@,,,,,,,,#..", -"...........-@@+++++++++++###.............@@@+++++++++###........+..@+++++++++++++++++#@+++++++,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,++++++++#@,,,,,,,,,,,,,,,,,#@,,,,,,,,,,,,,,,,,#..", -".............%@@@+++++####.................@@@+++++###..........+..~+++++++++++++++++#~++++++,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,++++++++#~,,,,,,,,,+,,,,,,,#~,,,,,,,,,,,,,,,,,#..", -"................#######......................#######............+..!@+++++++++++++++##!@++++,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,+++++++##!@,,,,,,,,++,,,,,##!@,(,,,,,,,,,,,,,##..", -"................................................................+...@+++++++++++++++#..@+++,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++++++#..@,,,,,,,,+++,,,,#..@,,,,,,,,,,,,,,,#...", -"....@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....+...@@+++++++++++++##..@@+,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++++##..@@,,,,,,,++++,,##..@@,,/,,,,,,,,/,##...", -"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+....@+++++++++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,++++++#....@,,,,,,,+++++,#....@,,,,,^^^^^,,,#....", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+....@@@+++++++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,++++###....@@@,,,,,,,,,###....", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+......@@@+++++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,++###........@@@,,,,,###......", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+........#######............#######............#######............#######............#######............#######............#######............#######............#######........", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@++$+++$+$+++$++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++$$$+++$$$+++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....@+++++++++++++++#..@+++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -"....#################..@####################################....+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"................................................................+...............................................................................................................................................................................", -"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", -"++,,,+++$$$_+_,,,_+_,,,_+_$$$_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+++++++++++++++++++.................................................................................................................................................................", -"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++++++++++++,++++++..+::+..+<<+..+[[+...............................................................................................................................................", -"+,+++,+$+++,+$+++,+$+++,+,+++,+,+++$+,+++$+$+++,+,+++,+,+++,++,++++,++++,++++++..:}::..<}<<..[[[[...............................................................................................................................................", -"+_$$$_++$$$_+_,,,_++,,,_+_,,,_+_,,,_+_,,,_++$$$_+$,,,$+_,,,_++_++++_+++,+++++++..::::..<<<<..[[[[...+,$|........................................................................................................................................", -"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,+++++++++++,+++++++..+::+..+<<+..+[[+...............................................................................................................................................", -"+,+++,+$+++,+,+++$+$+++,+$+++,+$+++,+,+++,+$+++,+,+++,+$+++,++,++++,++,++++++++.................................................................................................................................................................", -"++,,,+++$$$,+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++$$$_+_,,,_+_,,,_++_++++_++,++++++++.................................................................................................................................................................", -"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", -"+$,,,$+_,,,++_,,,_+_,,,++_,,,_+_,,,_+_,,,_+_$$$_++$$$_++$$$_+_$$$_+_$$$++,$$$,+_,,,++_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_,,,_+_$$$_+_$$$_+_$$$_+_$$$_+_$$$_+_,,,_++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,+++,+,+++$+,,+,,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+,+++,+,+++,+$+++,++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++$+,+++,+$+++,+$+++,+,++,$+,+++$+,+,+,+,+++,+,+++,+,+++,+,+++,+,+++,+,+++$+$+,+$+,+++,+,+++,+,+++,+$,+,$+,+++,+$++,$++++................................................................................", -"+_,,,_+_,,,++_$$$++_$$$_+_,,,++_,,,++_$,,_+_,,,_++$$$_++$$$_+_,,$++_$$$++_$$$_+_$$$_+_$$$_+_,,,_+_,$$_+_,,,++_,,,_++$_$++_$$$_+_$$$_+_$$$_++$,$++_,,,_++$,$+++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,++,$+,+++$+,+++,+,+++,+,+++,+,+++$+,+,+,+,+++,+$+++,+$+,+$+,+++,+,+++,+,+,+,+$,+,$+$+++,+$,++$++++................................................................................", -"+,+++,+,+++,+,+++$+,+++,+,+++$+,+++$+,+++,+,+++,+$+++,+$+++,+,+++,+,+++$+,+++,+,+++,+,+++,+,+++$+,++,,+,+++,+$+++,+$+,+$+,+++,+,+++,+,,+,,+,+++,+$+++,+,+++$++++................................................................................", -"+_$$$_+_,,,++_,,,_+,,,,++_,,,_+,$$$++_,,,_+_$$$_++$$$,+_,,,_+_$$$_+_,,,$+_$$$_+,$$$,+_,,,_+_$$$++_,,,_+_$$$_+_,,,_++$_$++$,,,,++,,,++,$$$,+_$$$,__,,,_+_,,,_++++................................................................................", -"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++................................................................................", -"................................................................................................................................................................................................................................................", -"....@++++++++++++++++++++++++++++++++++++++++++++++++++++++#....+...............................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++++++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$+++++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....+$+++$+$+++$+$+++$+$+++$+$+++$++$++$+++$+$+++$+$+++$++.....................................................................................................................................................................................", -".....++$$$+++$$$+++$$$+++$$$+++$$$+++$+++$$$+++$$$+++$$$+++.....................................................................................................................................................................................", -".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", -".....++++++++++++++++++++++++++++++++++++++++++++++++++++++.....................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"$_,.............................................................................................................................................................................................................................................", -"123.............................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................", -"................................................................................................................................................................................................................................................"}; diff --git a/wmitime/wmitime/wmitime.c b/wmitime/wmitime/wmitime.c deleted file mode 100644 index c4b87f3..0000000 --- a/wmitime/wmitime/wmitime.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - - wmitime.c -- internet time clock - - by Dave Clark ([email protected]) (http://www.neotokyo.org/illusion) - - This software is licensed through the GNU General Public Lisence. - -*/ - -#include <stdlib.h> -#include <stdio.h> -#include <time.h> -#include <string.h> -#include <fcntl.h> -#include <unistd.h> -#include <ctype.h> -#include <math.h> - -#include <sys/wait.h> -#include <sys/stat.h> -#include <sys/param.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/socket.h> - -#include <X11/Xlib.h> -#include <X11/xpm.h> -#include <X11/extensions/shape.h> - -#include "../wmgeneral/wmgeneral.h" -#include "../wmgeneral/misc.h" - -#ifdef fr_FR -#define fr -#endif - -#ifdef fr -#include "french.h" -#else -#include "language.h" -#endif - -#include "wmitime-master.xpm" -char wmitime_mask_bits[64*64]; -int wmitime_mask_width = 64; -int wmitime_mask_height = 64; - -#define WMITIME_VERSION "0.1" - -#define CHAR_WIDTH 5 -#define CHAR_HEIGHT 7 - -#define BCHAR_WIDTH 6 -#define BCHAR_HEIGHT 9 - -#define MY_PI (3.14159) - -extern char **environ; - -char *ProgName; - -char uconfig_file[256]; - -time_t curtime; -time_t prevtime; - -int prevhourx=19; -int prevhoury=33; -int prevminx=19; -int prevminy=33; - -static struct tm *clk; - -int TwelveHour=0; - -void usage(void); -void printversion(void); -void BlitString(char *name, int x, int y); -void BlitNum(int num, int x, int y); -void wmitime_routine(int, char **); -int PortWatch( short port ); -int ReadConfigInt(FILE *fp, char *setting, int *value); -int ReadConfigString(FILE *fp, char *setting, char *value); -int Read_Config_File( char *filename ); -void DrawInetTime(void); -void DrawStdTime(void); -void DrawDate(void); -void DrawInetWheel(void); -void DrawStdWheel(void); -void DrawLine(int x1, int y1, int x2, int y2, int sourcex, int sourcey); - -int main(int argc, char *argv[]) { - - int i; - - uconfig_file[0] = 0; - - /* Parse Command Line */ - - ProgName = argv[0]; - if (strlen(ProgName) >= 5) - ProgName += (strlen(ProgName) - 5); - - for (i=1; i<argc; i++) { - char *arg = argv[i]; - - if (*arg=='-') { - switch (arg[1]) { - case 'd' : - if (strcmp(arg+1, "display")) { - usage(); - exit(1); - } - break; - case 'g' : - if (strcmp(arg+1, "geometry")) { - usage(); - exit(1); - } - break; - case 'v' : - printversion(); - exit(0); - break; - case 'c' : - if (argc > (i+1)) - { - strcpy(uconfig_file, argv[i+1]); - i++; - } - break; - case '1' : - if (arg[2] == '2') - { - // Twelve-hour mode - TwelveHour = 1; - } - break; - default: - usage(); - exit(0); - break; - } - } - } - - wmitime_routine(argc, argv); - - return 0; -} - -/*******************************************************************************\ -|* wmitime_routine *| -\*******************************************************************************/ - -void wmitime_routine(int argc, char **argv) -{ - int i; - XEvent Event; - int but_stat = -1; - - -// char config_file[512]; - - createXBMfromXPM(wmitime_mask_bits, wmitime_master_xpm, wmitime_mask_width, wmitime_mask_height); - - openXwindow(argc, argv, wmitime_master_xpm, wmitime_mask_bits, wmitime_mask_width, wmitime_mask_height); - - AddMouseRegion(0, 5, 6, 58, 16); - - // We don't need a config file (yet)... - -#if 0 - // Read config file - - if (uconfig_file[0] != 0) - { - // user-specified config file - fprintf(stderr, "Using user-specified config file '%s'.\n", uconfig_file); - Read_Config_File(uconfig_file); - } - else - { - sprintf(config_file, "%s/.wmitimerc", getenv("HOME")); - - if (!Read_Config_File(config_file)) - { - // Fall back to /etc/wminetrc - sprintf(config_file, "/etc/wmitimerc"); - - Read_Config_File(config_file); - } - } -#endif - - RedrawWindow(); - - prevtime = time(0) - 1; - - while (1) - { - curtime = time(0); - - if ( curtime > prevtime) - { - prevtime = curtime; - - clk = localtime(&curtime); - - // Update display - - DrawInetTime(); - - DrawStdTime(); - - DrawInetWheel(); - - DrawDate(); - - DrawStdWheel(); - - RedrawWindow(); - - } - - // X Events - while (XPending(display)) - { - XNextEvent(display, &Event); - switch (Event.type) - { - case Expose: - RedrawWindow(); - break; - case DestroyNotify: - XCloseDisplay(display); - exit(0); - break; - case ButtonPress: - i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); - - but_stat = i; - break; - case ButtonRelease: - i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); - - if (but_stat == i && but_stat >= 0) - { - switch (but_stat) - { - case 0 : - TwelveHour = (!TwelveHour); - prevtime--; - break; - case 1 : - break; - case 2: - break; - case 3: - break; - case 4: - break; - - } - } - but_stat = -1; -// RedrawWindow(); - break; - } - } - - usleep(100000); - } -} - - -void DrawInetTime(void) -{ - int iTime; - - // Compute Inet Time - iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); - iTime=iTime+((timezone-1)+3600); - if (clk->tm_isdst) - iTime-=3600; - iTime=(iTime*1000)/86400; - - if (iTime >= 1000) - iTime-=1000; - else - if (iTime < 0) - iTime+=1000; - - // Blit it - - BlitNum(iTime, 38, 18); - -} - -void DrawStdTime(void) -{ - int xoff=0, yoff=0; - int srcx=0, srcy=0; - int i,j; - char blitstr[32]; - int len; - - i = clk->tm_hour; - - if (TwelveHour) - { - if (i > 12) - i-=12; - - if (i==0) - i=12; - - sprintf(blitstr, "%2i:%02i:%02i", i, clk->tm_min, clk->tm_sec); - } - else - { - sprintf(blitstr, "%02i:%02i:%02i", i, clk->tm_min, clk->tm_sec); - } - - - - len = strlen(blitstr); - - // Set starting co-ordinates... - xoff = 6; - yoff = 6; - - // Blit it. - for( i=0; i<len; i++) - { - if (blitstr[i] == ':') - { - copyXPMArea(138, 23, 4, BCHAR_HEIGHT, xoff, yoff); - xoff+=4; - } - else if (isdigit(blitstr[i])) - { - j = blitstr[i] - '0'; - srcx = 68; - srcy = 23; - - while (j) - { - j--; - srcx += (BCHAR_WIDTH + 1); - } - - copyXPMArea(srcx, srcy, BCHAR_WIDTH+1, BCHAR_HEIGHT, xoff, yoff); - xoff+=(BCHAR_WIDTH + 1); - } - else - { - copyXPMArea(66, 10, BCHAR_WIDTH+1, BCHAR_HEIGHT, xoff, yoff); - xoff+=(BCHAR_WIDTH + 1); - } - } - -} - -void DrawDate(void) -{ - char BlitStr[20]; - - sprintf(BlitStr, "%s", daynames[clk->tm_wday]); - BlitString( BlitStr, 6, 50); - -#ifdef fr - - // French date model - sprintf(BlitStr, "%s", monthnames[clk->tm_mon]); - BlitString( BlitStr, 40, 50); - - sprintf(BlitStr, "%02i", clk->tm_mday); - BlitString( BlitStr, 25, 50); -#else - - sprintf(BlitStr, "%s", monthnames[clk->tm_mon]); - BlitString( BlitStr, 25, 50); - - sprintf(BlitStr, "%02i", clk->tm_mday); - BlitString( BlitStr, 45, 50); - -#endif -} - -void DrawInetWheel(void) -{ - int WheelPos=0; - int i; - int xoff=0, yoff=0; - int iTime; - - // Calculate Wheel Position... - iTime=(clk->tm_hour*3600+clk->tm_min*60+clk->tm_sec); - iTime=iTime+((timezone-1)+3600); - if (clk->tm_isdst) - iTime-=3600; - iTime=(iTime*1000)/8640; - - if (iTime >= 10000) - iTime-=10000; - else - if (iTime < 0) - iTime+=10000; - - iTime %= 10; - - WheelPos = floor( (iTime *8) / 10); - - // Draw the Wheel... - i=WheelPos; - yoff=35; - xoff=67; - - xoff+=19; - - while(i) - { - xoff +=19; - i--; - } - - copyXPMArea(xoff, yoff, 19, 19, 39, 29); - -} - - -void DrawStdWheel(void) -{ - //19x33 = center - //radius of 14 - - int sx, sy; - int cx, cy; - int dx, dy; - int hr; - double psi; - - cx=19; - cy=33; - - sx = 2; - sy = 97; - - // Hour Hand... - - DrawLine(cx, cy, prevhourx, prevhoury, 66, 9); // erase old line - - hr = (clk->tm_hour % 12); - - psi = hr * (M_PI / 6.0); - psi += clk->tm_min * (M_PI / 360); - - dx = floor(sin(psi) * 22 * 0.5 + 0.5); - dy = floor(-cos(psi) * 16 * 0.5 + 0.5); - - dx += cx; - dy += cy; - - prevhourx=dx; - prevhoury=dy; - - DrawLine(cx, cy, dx, dy, sx, sy); - - // Minute Hand... - - DrawLine(cx, cy, prevminx, prevminy, 66, 9); // erase old line - - cx=19; - cy=33; - sx = 2; - sy = 96; - - psi = clk->tm_min * (M_PI / 30.0); - psi += clk->tm_sec * (M_PI / 1800); - - dx = floor(sin(psi) * 22 * 0.7 + 0.5); - dy = floor(-cos(psi) * 16 * 0.7 + 0.5); - - dx += cx; - dy += cy; - - prevminx = dx; - prevminy = dy; - - - DrawLine(cx, cy, dx, dy, sx, sy); -} - -void DrawLine(int x1, int y1, int x2, int y2, int sourcex, int sourcey) -{ - int x, y; - int deltax, deltay; - int xs, ys; - - float xd=0, yd=0; - float xi, yi; - - x = x1; - y = y1; - - - if ( (x2-x1) < 0) - xs = -1; - else - xs = 1; - - if ( (y2-y1) < 0) - ys = -1; - else - ys = 1; - - deltax = abs( x2 - x1 ); - deltay = abs( y2 - y1 ); - - if (deltay !=0) - xi = (float) ((float)deltax / (float) deltay); - else - xi=0; - - if (deltax !=0) - yi = (float) ((float)deltay / (float) deltax); - else - yi=0; - - if ( deltax > deltay ) - { - for (x=x1; x!= x2; x+= xs) - { - yd += yi; - y += (int) (yd * ys); - - copyXPMArea(sourcex, sourcey, 1, 1, x, y); - - yd -= (int) yd; - } - } - else - { - for (y=y1; y!= y2; y+= ys) - { - xd += xi; - x += (int) (xd * xs); - - copyXPMArea(sourcex, sourcey, 1, 1, x, y); - - xd -= (int) xd; - } - } -} - - - -// Blits a string at given co-ordinates -void BlitString(char *name, int x, int y) -{ - int i; - int c; - int k; - - k = x; - for (i=0; name[i]; i++) - { - - c = toupper(name[i]); - if (c >= 'A' && c <= 'Z') - { // its a letter - c -= 'A'; - copyXPMArea(c * 6, 74, 6, 8, k, y); - k += 6; - } - else - { // its a number or symbol - c -= '0'; - copyXPMArea(c * 6, 64, 6, 8, k, y); - k += 6; - } - } - -} - -void BlitNum(int num, int x, int y) -{ - char buf[1024]; - int newx=x; - - sprintf(buf, "%03i", num); - - BlitString(buf, newx, y); -} - - -// ReadConfigSetting -int ReadConfigString(FILE *fp, char *setting, char *value) -{ - char str[1024]; - char buf[1024]; - int i; - int len; - int slen; - char *p=NULL; - - - if (!fp) - { - return 0; - } - - sprintf(str, "%s=", setting); - slen = strlen(str); - - fseek(fp, 0, SEEK_SET); - - while ( !feof(fp) ) - { - - if (!fgets(buf, 512, fp)) - break; - - len = strlen(buf); - - // strip linefeed - for (i=0; i!=len; i++) - { - if (buf[i] == '\n') - { - buf[i] = 0; - } - } - - //printf("Scanning '%s'...\n", buf); - if ( strncmp(buf, str, strlen(str)) == 0) - { - // found our setting - - for(i=0; i!=slen; i++) - { - if ( buf[i] == '=' ) - { - p=buf+i+1; - strcpy(value, p); - return 1; - } - } - - } - } - - return 0; -} - -int ReadConfigInt(FILE *fp, char *setting, int *value) -{ - char buf[1024]; - - if (ReadConfigString(fp, setting, (char *) &buf)) - { - *value = atoi(buf); - return 1; - } - - return 0; -} - -int Read_Config_File( char *filename ) -{ - FILE *fp; - - fp = fopen(filename, "r"); - if (fp) - { - - fclose(fp); - return 1; - } - else - { - perror("Read_Config_File"); - fprintf(stderr, "Unable to open %s, no settings read.\n", filename); - return 0; - } - -} - - - - - - - -/*******************************************************************************\ -|* usage *| -\*******************************************************************************/ - -void usage(void) -{ - fprintf(stderr, "\nWMiTIME - illusion <[email protected]> http://www.neotokyo.org/illusion\n\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, " -12 12-hour mode\n"); - fprintf(stderr, " -display <display name>\n"); - fprintf(stderr, " -geometry +XPOS+YPOS initial window position\n"); -// fprintf(stderr, " -c <filename> use specified config file\n"); - fprintf(stderr, " -h this help screen\n"); - fprintf(stderr, " -v print the version number\n"); - fprintf(stderr, "\n"); -} - -/*******************************************************************************\ -|* printversion *| -\*******************************************************************************/ - -void printversion(void) -{ - fprintf(stderr, "wmitime v%s\n", WMITIME_VERSION); -} -- 2.1.0 -- To unsubscribe, send mail to [email protected].
